RTEMS 4.11Annotated Report
Wed Apr 11 10:56:48 2012
02005a30 <IMFS_dump_directory>:
*/
static void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
2005a30: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2005a34: fa 06 20 50 ld [ %i0 + 0x50 ], %i5
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 ));
2005a38: b8 06 20 54 add %i0, 0x54, %i4
2005a3c: 35 00 80 90 sethi %hi(0x2024000), %i2
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 );
2005a40: 80 a7 40 1c cmp %i5, %i4
2005a44: 02 80 00 2f be 2005b00 <IMFS_dump_directory+0xd0>
2005a48: b4 16 a0 98 or %i2, 0x98, %i2
2005a4c: 31 00 80 88 sethi %hi(0x2022000), %i0
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
2005a50: 27 00 80 88 sethi %hi(0x2022000), %l3
return;
}
puts("");
2005a54: 21 00 80 88 sethi %hi(0x2022000), %l0
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
2005a58: 25 00 80 88 sethi %hi(0x2022000), %l2
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2005a5c: 23 00 80 88 sethi %hi(0x2022000), %l1
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2005a60: b0 16 21 10 or %i0, 0x110, %i0
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
2005a64: a6 14 e1 80 or %l3, 0x180, %l3
return;
}
puts("");
2005a68: a0 14 20 a8 or %l0, 0xa8, %l0
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
2005a6c: a4 14 a1 68 or %l2, 0x168, %l2
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2005a70: a2 14 61 50 or %l1, 0x150, %l1
!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++ )
2005a74: 80 a6 60 00 cmp %i1, 0
2005a78: 06 80 00 0c bl 2005aa8 <IMFS_dump_directory+0x78> <== NEVER TAKEN
2005a7c: b6 10 20 00 clr %i3
fprintf(stdout, "...." );
2005a80: c2 06 80 00 ld [ %i2 ], %g1
2005a84: 90 10 00 18 mov %i0, %o0
2005a88: d6 00 60 08 ld [ %g1 + 8 ], %o3
2005a8c: 92 10 20 01 mov 1, %o1
2005a90: 40 00 3c 77 call 2014c6c <fwrite>
2005a94: 94 10 20 04 mov 4, %o2
!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++ )
2005a98: b6 06 e0 01 inc %i3
2005a9c: 80 a6 40 1b cmp %i1, %i3
2005aa0: 36 bf ff f9 bge,a 2005a84 <IMFS_dump_directory+0x54>
2005aa4: c2 06 80 00 ld [ %i2 ], %g1
IMFS_jnode_t *the_jnode
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
2005aa8: c2 06 80 00 ld [ %i2 ], %g1
2005aac: 90 07 60 0c add %i5, 0xc, %o0
2005ab0: 40 00 39 4d call 2013fe4 <fputs>
2005ab4: d2 00 60 08 ld [ %g1 + 8 ], %o1
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
2005ab8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
2005abc: d4 00 40 00 ld [ %g1 ], %o2
switch( IMFS_type( the_jnode ) ) {
2005ac0: 80 a2 a0 06 cmp %o2, 6
2005ac4: 28 80 00 11 bleu,a 2005b08 <IMFS_dump_directory+0xd8> <== ALWAYS TAKEN
2005ac8: 95 2a a0 02 sll %o2, 2, %o2
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
2005acc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2005ad0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2005ad4: 40 00 38 f3 call 2013ea0 <fprintf> <== NOT EXECUTED
2005ad8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
2005adc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
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 ) )
2005ae0: c2 00 40 00 ld [ %g1 ], %g1
2005ae4: 80 a0 60 00 cmp %g1, 0
2005ae8: 22 80 00 19 be,a 2005b4c <IMFS_dump_directory+0x11c>
2005aec: 90 10 00 1d mov %i5, %o0
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 ) {
2005af0: fa 07 40 00 ld [ %i5 ], %i5
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 );
2005af4: 80 a7 40 1c cmp %i5, %i4
2005af8: 12 bf ff e0 bne 2005a78 <IMFS_dump_directory+0x48>
2005afc: 80 a6 60 00 cmp %i1, 0
2005b00: 81 c7 e0 08 ret
2005b04: 81 e8 00 00 restore
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( IMFS_type( the_jnode ) ) {
2005b08: 03 00 80 16 sethi %hi(0x2005800), %g1
2005b0c: 82 10 62 14 or %g1, 0x214, %g1 ! 2005a14 <bsp_interrupt_handler_default+0x18>
2005b10: c2 00 40 0a ld [ %g1 + %o2 ], %g1
2005b14: 81 c0 40 00 jmp %g1
2005b18: 01 00 00 00 nop
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2005b1c: c2 06 80 00 ld [ %i2 ], %g1
2005b20: 90 10 00 11 mov %l1, %o0
2005b24: d6 00 60 08 ld [ %g1 + 8 ], %o3
2005b28: 92 10 20 01 mov 1, %o1
2005b2c: 40 00 3c 50 call 2014c6c <fwrite>
2005b30: 94 10 20 13 mov 0x13, %o2
2005b34: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
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 ) )
2005b38: c2 00 40 00 ld [ %g1 ], %g1
2005b3c: 80 a0 60 00 cmp %g1, 0
2005b40: 32 bf ff ed bne,a 2005af4 <IMFS_dump_directory+0xc4> <== ALWAYS TAKEN
2005b44: fa 07 40 00 ld [ %i5 ], %i5
IMFS_dump_directory( the_jnode, level + 1 );
2005b48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005b4c: 7f ff ff b9 call 2005a30 <IMFS_dump_directory>
2005b50: 92 06 60 01 add %i1, 1, %o1
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 ) {
2005b54: 10 bf ff e8 b 2005af4 <IMFS_dump_directory+0xc4>
2005b58: fa 07 40 00 ld [ %i5 ], %i5
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
2005b5c: c2 06 80 00 ld [ %i2 ], %g1
2005b60: d4 07 60 54 ld [ %i5 + 0x54 ], %o2
2005b64: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005b68: d6 07 60 58 ld [ %i5 + 0x58 ], %o3
2005b6c: 13 00 80 88 sethi %hi(0x2022000), %o1
2005b70: 40 00 38 cc call 2013ea0 <fprintf>
2005b74: 92 12 61 30 or %o1, 0x130, %o1 ! 2022130 <rtems_filesystem_table+0x1734>
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
return;
}
puts("");
2005b78: 40 00 40 45 call 2015c8c <puts>
2005b7c: 90 10 00 10 mov %l0, %o0
2005b80: 10 bf ff d8 b 2005ae0 <IMFS_dump_directory+0xb0>
2005b84: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
2005b88: c2 06 80 00 ld [ %i2 ], %g1
2005b8c: d4 07 60 50 ld [ %i5 + 0x50 ], %o2
2005b90: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005b94: d6 07 60 54 ld [ %i5 + 0x54 ], %o3
2005b98: 13 00 80 88 sethi %hi(0x2022000), %o1
2005b9c: 40 00 38 c1 call 2013ea0 <fprintf>
2005ba0: 92 12 61 18 or %o1, 0x118, %o1 ! 2022118 <rtems_filesystem_table+0x171c>
2005ba4: 30 bf ff f5 b,a 2005b78 <IMFS_dump_directory+0x148>
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( IMFS_type( the_jnode ) ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
2005ba8: c2 06 80 00 ld [ %i2 ], %g1
2005bac: 90 10 20 2f mov 0x2f, %o0
2005bb0: 40 00 38 d8 call 2013f10 <fputc>
2005bb4: d2 00 60 08 ld [ %g1 + 8 ], %o1
2005bb8: 30 bf ff f0 b,a 2005b78 <IMFS_dump_directory+0x148>
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
2005bbc: c2 06 80 00 ld [ %i2 ], %g1
2005bc0: 90 10 00 12 mov %l2, %o0
2005bc4: d6 00 60 08 ld [ %g1 + 8 ], %o3
2005bc8: 92 10 20 01 mov 1, %o1
2005bcc: 40 00 3c 28 call 2014c6c <fwrite>
2005bd0: 94 10 20 12 mov 0x12, %o2
2005bd4: 10 bf ff c3 b 2005ae0 <IMFS_dump_directory+0xb0>
2005bd8: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
2005bdc: c2 06 80 00 ld [ %i2 ], %g1
2005be0: d4 07 60 54 ld [ %i5 + 0x54 ], %o2
2005be4: d0 00 60 08 ld [ %g1 + 8 ], %o0
2005be8: 13 00 80 88 sethi %hi(0x2022000), %o1
2005bec: 40 00 38 ad call 2013ea0 <fprintf>
2005bf0: 92 12 61 40 or %o1, 0x140, %o1 ! 2022140 <rtems_filesystem_table+0x1744>
2005bf4: 30 bf ff e1 b,a 2005b78 <IMFS_dump_directory+0x148>
0200bff4 <IMFS_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
200bff4: 9d e3 bf a0 save %sp, -96, %sp
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;
200bff8: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
bool access_ok = rtems_filesystem_eval_path_check_access(
200bffc: 90 10 00 18 mov %i0, %o0
200c000: d4 07 20 30 ld [ %i4 + 0x30 ], %o2
200c004: d6 17 20 3c lduh [ %i4 + 0x3c ], %o3
200c008: d8 17 20 3e lduh [ %i4 + 0x3e ], %o4
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
200c00c: ba 10 00 18 mov %i0, %i5
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(
200c010: 92 10 20 01 mov 1, %o1
200c014: 40 00 03 39 call 200ccf8 <rtems_filesystem_eval_path_check_access>
200c018: b0 10 20 01 mov 1, %i0
dir->st_mode,
dir->st_uid,
dir->st_gid
);
if ( access_ok ) {
200c01c: 80 8a 20 ff btst 0xff, %o0
200c020: 02 80 00 36 be 200c0f8 <IMFS_eval_token+0x104>
200c024: 80 a6 e0 01 cmp %i3, 1
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
200c028: 02 80 00 3c be 200c118 <IMFS_eval_token+0x124>
200c02c: 80 a6 e0 02 cmp %i3, 2
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
200c030: 22 80 00 5a be,a 200c198 <IMFS_eval_token+0x1a4>
200c034: c2 4e 80 00 ldsb [ %i2 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200c038: f2 07 20 50 ld [ %i4 + 0x50 ], %i1
if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) {
return dir->Parent;
} 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 );
200c03c: b0 07 20 54 add %i4, 0x54, %i0
while ( current != tail ) {
200c040: 80 a6 40 18 cmp %i1, %i0
200c044: 02 80 00 33 be 200c110 <IMFS_eval_token+0x11c>
200c048: 90 06 60 0c add %i1, 0xc, %o0
IMFS_jnode_t *entry = (IMFS_jnode_t *) current;
bool match = strncmp( entry->name, token, tokenlen ) == 0
200c04c: 92 10 00 1a mov %i2, %o1
200c050: 40 00 13 95 call 2010ea4 <strncmp>
200c054: 94 10 00 1b mov %i3, %o2
&& entry->name [tokenlen] == '\0';
200c058: 80 a2 20 00 cmp %o0, 0
200c05c: 12 80 00 29 bne 200c100 <IMFS_eval_token+0x10c>
200c060: 82 06 40 1b add %i1, %i3, %g1
200c064: c2 48 60 0c ldsb [ %g1 + 0xc ], %g1
200c068: 80 a0 60 00 cmp %g1, 0
200c06c: 32 80 00 26 bne,a 200c104 <IMFS_eval_token+0x110>
200c070: f2 06 40 00 ld [ %i1 ], %i1
);
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
200c074: 80 a6 60 00 cmp %i1, 0
200c078: 02 80 00 20 be 200c0f8 <IMFS_eval_token+0x104>
200c07c: b0 10 20 02 mov 2, %i0
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
200c080: c2 06 60 4c ld [ %i1 + 0x4c ], %g1
bool terminal = !rtems_filesystem_eval_path_has_path( ctx );
200c084: c4 07 60 04 ld [ %i5 + 4 ], %g2
200c088: c2 00 40 00 ld [ %g1 ], %g1
200c08c: 80 a0 00 02 cmp %g0, %g2
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
200c090: c0 27 60 0c clr [ %i5 + 0xc ]
200c094: b0 60 3f ff subx %g0, -1, %i0
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)) {
200c098: 80 a0 60 02 cmp %g1, 2
200c09c: 02 80 00 37 be 200c178 <IMFS_eval_token+0x184>
200c0a0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
entry = entry->info.hard_link.link_node;
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
200c0a4: 80 a0 60 03 cmp %g1, 3
200c0a8: 02 80 00 22 be 200c130 <IMFS_eval_token+0x13c>
200c0ac: 80 a0 60 00 cmp %g1, 0
IMFS_jnode_types_t type
)
{
rtems_filesystem_global_location_t **fs_root_ptr = NULL;
if ( type == IMFS_DIRECTORY ) {
200c0b0: 32 80 00 26 bne,a 200c148 <IMFS_eval_token+0x154>
200c0b4: b0 0e 20 ff and %i0, 0xff, %i0
if ( node->info.directory.mt_fs != NULL ) {
200c0b8: c2 06 60 5c ld [ %i1 + 0x5c ], %g1
200c0bc: 80 a0 60 00 cmp %g1, 0
200c0c0: 02 80 00 48 be 200c1e0 <IMFS_eval_token+0x1ec>
200c0c4: 90 10 00 1d mov %i5, %o0
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
200c0c8: d4 06 60 30 ld [ %i1 + 0x30 ], %o2
200c0cc: d6 16 60 3c lduh [ %i1 + 0x3c ], %o3
200c0d0: d8 16 60 3e lduh [ %i1 + 0x3e ], %o4
{
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;
200c0d4: b8 00 60 18 add %g1, 0x18, %i4
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
200c0d8: 92 10 20 01 mov 1, %o1
200c0dc: 40 00 03 07 call 200ccf8 <rtems_filesystem_eval_path_check_access>
200c0e0: b0 10 20 01 mov 1, %i0
RTEMS_FS_PERMS_EXEC,
entry->st_mode,
entry->st_uid,
entry->st_gid
);
if ( access_ok ) {
200c0e4: 80 8a 20 ff btst 0xff, %o0
200c0e8: 02 80 00 04 be 200c0f8 <IMFS_eval_token+0x104> <== NEVER TAKEN
200c0ec: 90 10 00 1d mov %i5, %o0
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
200c0f0: 7f ff e3 26 call 2004d88 <rtems_filesystem_eval_path_restart>
200c0f4: 92 10 00 1c mov %i4, %o1
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
}
}
return status;
}
200c0f8: 81 c7 e0 08 ret
200c0fc: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200c100: f2 06 40 00 ld [ %i1 ], %i1
} 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 ) {
200c104: 80 a6 00 19 cmp %i0, %i1
200c108: 12 bf ff d1 bne 200c04c <IMFS_eval_token+0x58>
200c10c: 90 06 60 0c add %i1, 0xc, %o0
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
}
}
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
200c110: 81 c7 e0 08 ret
200c114: 91 e8 20 02 restore %g0, 2, %o0
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
200c118: c2 4e 80 00 ldsb [ %i2 ], %g1
200c11c: 80 a0 60 2e cmp %g1, 0x2e
200c120: 32 bf ff c7 bne,a 200c03c <IMFS_eval_token+0x48>
200c124: f2 07 20 50 ld [ %i4 + 0x50 ], %i1
200c128: 10 bf ff d3 b 200c074 <IMFS_eval_token+0x80>
200c12c: b2 10 00 1c mov %i4, %i1
if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) {
entry = entry->info.hard_link.link_node;
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
200c130: 80 88 a0 10 btst 0x10, %g2
200c134: 32 80 00 22 bne,a 200c1bc <IMFS_eval_token+0x1c8>
200c138: f8 06 60 50 ld [ %i1 + 0x50 ], %i4
200c13c: b0 8e 20 ff andcc %i0, 0xff, %i0
200c140: 22 80 00 1f be,a 200c1bc <IMFS_eval_token+0x1c8>
200c144: f8 06 60 50 ld [ %i1 + 0x50 ], %i4
} else {
rtems_filesystem_global_location_t **fs_root_ptr =
IMFS_is_mount_point( entry, type );
if ( fs_root_ptr == NULL ) {
--dir->reference_count;
200c148: c4 17 20 34 lduh [ %i4 + 0x34 ], %g2
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;
200c14c: c2 06 60 4c ld [ %i1 + 0x4c ], %g1
200c150: 84 00 bf ff add %g2, -1, %g2
200c154: c4 37 20 34 sth %g2, [ %i4 + 0x34 ]
++entry->reference_count;
200c158: c4 16 60 34 lduh [ %i1 + 0x34 ], %g2
200c15c: c2 00 60 04 ld [ %g1 + 4 ], %g1
200c160: 84 00 a0 01 inc %g2
200c164: c4 36 60 34 sth %g2, [ %i1 + 0x34 ]
currentloc->node_access = entry;
200c168: f2 27 60 20 st %i1, [ %i5 + 0x20 ]
200c16c: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
200c170: 81 c7 e0 08 ret
200c174: 81 e8 00 00 restore
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)) {
200c178: 80 88 a0 08 btst 8, %g2
200c17c: 12 80 00 05 bne 200c190 <IMFS_eval_token+0x19c>
200c180: b0 0e 20 ff and %i0, 0xff, %i0
200c184: 80 a6 20 00 cmp %i0, 0
200c188: 32 bf ff f1 bne,a 200c14c <IMFS_eval_token+0x158> <== ALWAYS TAKEN
200c18c: c4 17 20 34 lduh [ %i4 + 0x34 ], %g2
entry = entry->info.hard_link.link_node;
200c190: 10 bf ff ee b 200c148 <IMFS_eval_token+0x154>
200c194: f2 06 60 50 ld [ %i1 + 0x50 ], %i1
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
200c198: 80 a0 60 2e cmp %g1, 0x2e
200c19c: 32 bf ff a8 bne,a 200c03c <IMFS_eval_token+0x48>
200c1a0: f2 07 20 50 ld [ %i4 + 0x50 ], %i1
200c1a4: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1
200c1a8: 80 a0 60 2e cmp %g1, 0x2e
200c1ac: 32 bf ff a4 bne,a 200c03c <IMFS_eval_token+0x48> <== NEVER TAKEN
200c1b0: f2 07 20 50 ld [ %i4 + 0x50 ], %i1 <== NOT EXECUTED
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
return dir;
} else {
if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) {
return dir->Parent;
200c1b4: 10 bf ff b0 b 200c074 <IMFS_eval_token+0x80>
200c1b8: f2 07 20 08 ld [ %i4 + 8 ], %i1
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
200c1bc: b0 10 20 01 mov 1, %i0
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
const char *target = entry->info.sym_link.name;
rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) );
200c1c0: 40 00 13 08 call 2010de0 <strlen>
200c1c4: 90 10 00 1c mov %i4, %o0
200c1c8: 92 10 00 1c mov %i4, %o1
200c1cc: 94 10 00 08 mov %o0, %o2
200c1d0: 7f ff e3 06 call 2004de8 <rtems_filesystem_eval_path_recursive>
200c1d4: 90 10 00 1d mov %i5, %o0
if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) {
entry = entry->info.hard_link.link_node;
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
200c1d8: 81 c7 e0 08 ret
200c1dc: 81 e8 00 00 restore
200c1e0: 10 bf ff da b 200c148 <IMFS_eval_token+0x154>
200c1e4: b0 0e 20 ff and %i0, 0xff, %i0
02003978 <IMFS_fifo_lseek>:
static off_t IMFS_fifo_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
2003978: 9d e3 bf a0 save %sp, -96, %sp
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
200397c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
2003980: 92 10 00 19 mov %i1, %o1
2003984: d0 00 60 50 ld [ %g1 + 0x50 ], %o0
2003988: 98 10 00 18 mov %i0, %o4
200398c: 94 10 00 1a mov %i2, %o2
2003990: 40 00 2d 62 call 200ef18 <pipe_lseek>
2003994: 96 10 00 1b mov %i3, %o3
2003998: b1 3a 20 1f sra %o0, 0x1f, %i0
IMFS_FIFO_RETURN(err);
200399c: 80 a6 20 00 cmp %i0, 0
20039a0: 06 80 00 04 bl 20039b0 <IMFS_fifo_lseek+0x38> <== ALWAYS TAKEN
20039a4: b2 10 00 08 mov %o0, %i1
}
20039a8: 81 c7 e0 08 ret <== NOT EXECUTED
20039ac: 81 e8 00 00 restore <== NOT EXECUTED
off_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
20039b0: 40 00 36 23 call 201123c <__errno>
20039b4: 31 3f ff ff sethi %hi(0xfffffc00), %i0
20039b8: 82 20 00 19 neg %i1, %g1
20039bc: c2 22 00 00 st %g1, [ %o0 ]
20039c0: b0 16 23 ff or %i0, 0x3ff, %i0
}
20039c4: 81 c7 e0 08 ret
20039c8: 93 e8 00 18 restore %g0, %i0, %o1
020039cc <IMFS_fifo_write>:
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20039cc: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
20039d0: fa 06 20 24 ld [ %i0 + 0x24 ], %i5
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20039d4: 96 10 00 18 mov %i0, %o3
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
20039d8: d0 07 60 50 ld [ %i5 + 0x50 ], %o0
20039dc: 92 10 00 19 mov %i1, %o1
20039e0: 40 00 2c b9 call 200ecc4 <pipe_write>
20039e4: 94 10 00 1a mov %i2, %o2
if (err > 0) {
20039e8: b0 92 20 00 orcc %o0, 0, %i0
20039ec: 04 80 00 09 ble 2003a10 <IMFS_fifo_write+0x44>
20039f0: 90 07 bf f8 add %fp, -8, %o0
IMFS_mtime_ctime_update(jnode);
20039f4: 40 00 04 52 call 2004b3c <gettimeofday>
20039f8: 92 10 20 00 clr %o1
20039fc: c2 07 bf f8 ld [ %fp + -8 ], %g1
2003a00: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
2003a04: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
2003a08: 81 c7 e0 08 ret
2003a0c: 81 e8 00 00 restore
}
IMFS_FIFO_RETURN(err);
2003a10: 80 a6 20 00 cmp %i0, 0
2003a14: 12 80 00 04 bne 2003a24 <IMFS_fifo_write+0x58> <== ALWAYS TAKEN
2003a18: 01 00 00 00 nop
}
2003a1c: 81 c7 e0 08 ret <== NOT EXECUTED
2003a20: 81 e8 00 00 restore <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
2003a24: 40 00 36 06 call 201123c <__errno>
2003a28: 01 00 00 00 nop
2003a2c: 82 20 00 18 neg %i0, %g1
2003a30: c2 22 00 00 st %g1, [ %o0 ]
}
2003a34: 81 c7 e0 08 ret
2003a38: 91 e8 3f ff restore %g0, -1, %o0
0200c238 <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
)
{
200c238: 9d e3 bf 80 save %sp, -128, %sp
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
200c23c: c6 06 20 18 ld [ %i0 + 0x18 ], %g3
200c240: c8 00 e0 08 ld [ %g3 + 8 ], %g4
200c244: d4 00 c0 00 ld [ %g3 ], %o2
200c248: d6 00 e0 04 ld [ %g3 + 4 ], %o3
200c24c: d8 00 e0 0c ld [ %g3 + 0xc ], %o4
200c250: da 00 e0 10 ld [ %g3 + 0x10 ], %o5
200c254: de 00 e0 14 ld [ %g3 + 0x14 ], %o7
200c258: f8 00 e0 18 ld [ %g3 + 0x18 ], %i4
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
200c25c: c2 01 20 4c ld [ %g4 + 0x4c ], %g1
* 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;
200c260: ba 10 00 04 mov %g4, %i5
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
200c264: c4 00 40 00 ld [ %g1 ], %g2
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
200c268: d4 27 bf e4 st %o2, [ %fp + -28 ]
200c26c: d6 27 bf e8 st %o3, [ %fp + -24 ]
200c270: c8 27 bf ec st %g4, [ %fp + -20 ]
200c274: d8 27 bf f0 st %o4, [ %fp + -16 ]
200c278: da 27 bf f4 st %o5, [ %fp + -12 ]
200c27c: de 27 bf f8 st %o7, [ %fp + -8 ]
200c280: f8 27 bf fc st %i4, [ %fp + -4 ]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
200c284: c0 20 e0 08 clr [ %g3 + 8 ]
200c288: c2 00 60 04 ld [ %g1 + 4 ], %g1
do {
next = jnode->Parent;
200c28c: f8 07 60 08 ld [ %i5 + 8 ], %i4
loc.node_access = (void *)jnode;
200c290: fa 27 bf ec st %i5, [ %fp + -20 ]
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
200c294: 80 a0 a0 00 cmp %g2, 0
200c298: 12 80 00 1d bne 200c30c <IMFS_fsunmount+0xd4> <== NEVER TAKEN
200c29c: c2 27 bf f4 st %g1, [ %fp + -12 ]
200c2a0: c4 07 60 50 ld [ %i5 + 0x50 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c2a4: 82 07 60 54 add %i5, 0x54, %g1
200c2a8: 80 a0 80 01 cmp %g2, %g1
200c2ac: 02 80 00 18 be 200c30c <IMFS_fsunmount+0xd4>
200c2b0: 80 a7 60 00 cmp %i5, 0
if ( result != 0 )
rtems_fatal_error_occurred( 0xdeadbeef );
IMFS_node_destroy( jnode );
jnode = next;
}
if ( jnode != NULL ) {
200c2b4: 02 80 00 22 be 200c33c <IMFS_fsunmount+0x104> <== NEVER TAKEN
200c2b8: 01 00 00 00 nop
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
200c2bc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200c2c0: c4 00 40 00 ld [ %g1 ], %g2
if ( IMFS_is_directory( jnode ) ) {
200c2c4: 80 a0 a0 00 cmp %g2, 0
200c2c8: 32 bf ff f1 bne,a 200c28c <IMFS_fsunmount+0x54> <== NEVER TAKEN
200c2cc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c2d0: c6 07 60 50 ld [ %i5 + 0x50 ], %g3
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c2d4: 88 07 60 54 add %i5, 0x54, %g4
if ( jnode_has_children( jnode ) )
200c2d8: 80 a0 c0 04 cmp %g3, %g4
200c2dc: 02 bf ff eb be 200c288 <IMFS_fsunmount+0x50>
200c2e0: 80 a0 e0 00 cmp %g3, 0
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
200c2e4: 02 80 00 16 be 200c33c <IMFS_fsunmount+0x104> <== NEVER TAKEN
200c2e8: ba 10 00 03 mov %g3, %i5
200c2ec: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1
200c2f0: c4 00 40 00 ld [ %g1 ], %g2
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;
200c2f4: c2 00 60 04 ld [ %g1 + 4 ], %g1
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
do {
next = jnode->Parent;
200c2f8: f8 07 60 08 ld [ %i5 + 8 ], %i4
loc.node_access = (void *)jnode;
200c2fc: fa 27 bf ec st %i5, [ %fp + -20 ]
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
200c300: 80 a0 a0 00 cmp %g2, 0
200c304: 02 bf ff e7 be 200c2a0 <IMFS_fsunmount+0x68>
200c308: c2 27 bf f4 st %g1, [ %fp + -12 ]
result = IMFS_rmnod( NULL, &loc );
200c30c: 90 10 20 00 clr %o0
200c310: 7f ff db f7 call 20032ec <IMFS_rmnod>
200c314: 92 07 bf e4 add %fp, -28, %o1
if ( result != 0 )
200c318: 80 a2 20 00 cmp %o0, 0
200c31c: 12 80 00 0a bne 200c344 <IMFS_fsunmount+0x10c> <== NEVER TAKEN
200c320: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
rtems_fatal_error_occurred( 0xdeadbeef );
IMFS_node_destroy( jnode );
200c324: 7f ff db 11 call 2002f68 <IMFS_node_destroy>
200c328: 90 10 00 1d mov %i5, %o0
jnode = next;
200c32c: ba 10 00 1c mov %i4, %i5
}
if ( jnode != NULL ) {
200c330: 80 a7 60 00 cmp %i5, 0
200c334: 32 bf ff e3 bne,a 200c2c0 <IMFS_fsunmount+0x88>
200c338: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
200c33c: 81 c7 e0 08 ret
200c340: 81 e8 00 00 restore
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
result = IMFS_rmnod( NULL, &loc );
if ( result != 0 )
rtems_fatal_error_occurred( 0xdeadbeef );
200c344: 7f ff f0 3c call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
200c348: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
02002e4c <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]
)
{
2002e4c: 9d e3 bf a0 save %sp, -96, %sp
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
2002e50: 90 10 20 01 mov 1, %o0
2002e54: 40 00 01 cb call 2003580 <calloc>
2002e58: 92 10 20 24 mov 0x24, %o1
if ( fs_info != NULL ) {
2002e5c: ba 92 20 00 orcc %o0, 0, %i5
2002e60: 02 80 00 36 be 2002f38 <IMFS_initialize_support+0xec>
2002e64: 03 00 80 73 sethi %hi(0x201cc00), %g1
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
2002e68: c4 00 62 c4 ld [ %g1 + 0x2c4 ], %g2 ! 201cec4 <imfs_instance.6401>
memcpy(
2002e6c: 92 10 00 1a mov %i2, %o1
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++;
2002e70: 86 00 a0 01 add %g2, 1, %g3
memcpy(
2002e74: 94 10 20 1c mov 0x1c, %o2
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++;
2002e78: c4 27 40 00 st %g2, [ %i5 ]
2002e7c: c6 20 62 c4 st %g3, [ %g1 + 0x2c4 ]
memcpy(
2002e80: 40 00 34 9c call 20100f0 <memcpy>
2002e84: 90 07 60 08 add %i5, 8, %o0
fs_info->node_controls,
node_controls,
sizeof( fs_info->node_controls )
);
root_node = IMFS_allocate_node(
2002e88: d2 07 60 08 ld [ %i5 + 8 ], %o1
2002e8c: 90 10 00 1d mov %i5, %o0
2002e90: 96 10 20 00 clr %o3
2002e94: 15 00 80 6b sethi %hi(0x201ac00), %o2
2002e98: 9a 10 20 00 clr %o5
2002e9c: 94 12 a0 10 or %o2, 0x10, %o2
2002ea0: 19 00 00 10 sethi %hi(0x4000), %o4
2002ea4: 40 00 24 06 call 200bebc <IMFS_allocate_node>
2002ea8: 98 13 21 ed or %o4, 0x1ed, %o4 ! 41ed <PROM_START+0x41ed>
"",
0,
(S_IFDIR | 0755),
NULL
);
if ( root_node != NULL ) {
2002eac: b8 92 20 00 orcc %o0, 0, %i4
2002eb0: 02 80 00 22 be 2002f38 <IMFS_initialize_support+0xec> <== NEVER TAKEN
2002eb4: 90 06 20 28 add %i0, 0x28, %o0
mt_entry->fs_info = fs_info;
2002eb8: fa 26 20 20 st %i5, [ %i0 + 0x20 ]
mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
2002ebc: 13 00 80 6d sethi %hi(0x201b400), %o1
2002ec0: 94 10 20 30 mov 0x30, %o2
2002ec4: 40 00 34 8b call 20100f0 <memcpy>
2002ec8: 92 12 60 f4 or %o1, 0xf4, %o1
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;
2002ecc: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
mt_entry->mt_fs_root->location.node_access = root_node;
2002ed0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2002ed4: c6 00 a0 04 ld [ %g2 + 4 ], %g3
errno = ENOMEM;
rv = -1;
}
if ( rv == 0 ) {
IMFS_determine_bytes_per_block(
2002ed8: 05 00 80 71 sethi %hi(0x201c400), %g2
2002edc: c4 00 a3 78 ld [ %g2 + 0x378 ], %g2 ! 201c778 <imfs_rq_memfile_bytes_per_block>
NULL
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
mt_entry->mt_fs_root->location.node_access = root_node;
2002ee0: f8 20 60 08 st %i4, [ %g1 + 8 ]
mt_entry->mt_fs_root->location.ops = op_table;
2002ee4: f2 20 60 14 st %i1, [ %g1 + 0x14 ]
/*
* 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) {
2002ee8: 80 a0 a0 10 cmp %g2, 0x10
2002eec: 02 80 00 0f be 2002f28 <IMFS_initialize_support+0xdc>
2002ef0: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
2002ef4: 86 10 20 05 mov 5, %g3
2002ef8: 80 a0 a0 0f cmp %g2, 0xf
2002efc: 04 80 00 0a ble 2002f24 <IMFS_initialize_support+0xd8>
2002f00: 82 10 20 20 mov 0x20, %g1
/*
* 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) {
2002f04: 80 a0 80 01 cmp %g2, %g1
2002f08: 22 80 00 09 be,a 2002f2c <IMFS_initialize_support+0xe0>
2002f0c: 03 00 80 73 sethi %hi(0x201cc00), %g1
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
2002f10: 26 80 00 06 bl,a 2002f28 <IMFS_initialize_support+0xdc> <== NEVER TAKEN
2002f14: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
2002f18: 86 80 ff ff addcc %g3, -1, %g3
2002f1c: 12 bf ff fa bne 2002f04 <IMFS_initialize_support+0xb8> <== ALWAYS TAKEN
2002f20: 83 28 60 01 sll %g1, 1, %g1
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
2002f24: 84 10 20 80 mov 0x80, %g2
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
2002f28: 03 00 80 73 sethi %hi(0x201cc00), %g1
2002f2c: c4 20 62 c0 st %g2, [ %g1 + 0x2c0 ] ! 201cec0 <imfs_memfile_bytes_per_block>
IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
);
}
return rv;
}
2002f30: 81 c7 e0 08 ret
2002f34: 91 e8 20 00 restore %g0, 0, %o0
} else {
errno = ENOMEM;
rv = -1;
}
} else {
errno = ENOMEM;
2002f38: 40 00 32 12 call 200f780 <__errno>
2002f3c: b0 10 3f ff mov -1, %i0
2002f40: 82 10 20 0c mov 0xc, %g1
2002f44: c2 22 00 00 st %g1, [ %o0 ]
2002f48: 81 c7 e0 08 ret
2002f4c: 81 e8 00 00 restore
0200489c <IMFS_make_generic_node>:
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
200489c: 9d e3 bf 40 save %sp, -192, %sp
int rv = 0;
mode &= ~rtems_filesystem_umask;
20048a0: 03 00 80 83 sethi %hi(0x2020c00), %g1
20048a4: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 2020e0c <rtems_current_user_env>
20048a8: c4 00 60 08 ld [ %g1 + 8 ], %g2
switch (mode & S_IFMT) {
20048ac: 03 00 00 08 sethi %hi(0x2000), %g1
void *context
)
{
int rv = 0;
mode &= ~rtems_filesystem_umask;
20048b0: b2 2e 40 02 andn %i1, %g2, %i1
switch (mode & S_IFMT) {
20048b4: 05 00 00 3c sethi %hi(0xf000), %g2
20048b8: 84 0e 40 02 and %i1, %g2, %g2
20048bc: 80 a0 80 01 cmp %g2, %g1
20048c0: 22 80 00 0c be,a 20048f0 <IMFS_make_generic_node+0x54>
20048c4: c2 06 80 00 ld [ %i2 ], %g1
20048c8: 08 80 00 30 bleu 2004988 <IMFS_make_generic_node+0xec> <== NEVER TAKEN
20048cc: 03 00 00 04 sethi %hi(0x1000), %g1
20048d0: 03 00 00 18 sethi %hi(0x6000), %g1
20048d4: 80 a0 80 01 cmp %g2, %g1
20048d8: 02 80 00 05 be 20048ec <IMFS_make_generic_node+0x50>
20048dc: 03 00 00 20 sethi %hi(0x8000), %g1
20048e0: 80 a0 80 01 cmp %g2, %g1
20048e4: 12 80 00 2c bne 2004994 <IMFS_make_generic_node+0xf8> <== ALWAYS TAKEN
20048e8: 01 00 00 00 nop
rv = -1;
break;
}
if ( rv == 0 ) {
if ( node_control->imfs_type == IMFS_GENERIC ) {
20048ec: c2 06 80 00 ld [ %i2 ], %g1
20048f0: 80 a0 60 07 cmp %g1, 7
20048f4: 12 80 00 35 bne 20049c8 <IMFS_make_generic_node+0x12c>
20048f8: 92 10 00 18 mov %i0, %o1
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 =
20048fc: 94 10 20 78 mov 0x78, %o2
2004900: 40 00 09 2f call 2006dbc <rtems_filesystem_eval_path_start>
2004904: 90 07 bf a4 add %fp, -92, %o0
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
if ( IMFS_is_imfs_instance( currentloc ) ) {
2004908: 7f ff ff d2 call 2004850 <IMFS_is_imfs_instance>
200490c: ba 10 00 08 mov %o0, %i5
2004910: 80 8a 20 ff btst 0xff, %o0
2004914: 02 80 00 26 be 20049ac <IMFS_make_generic_node+0x110>
2004918: 90 07 bf a4 add %fp, -92, %o0
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
new_node = IMFS_create_node_with_control(
200491c: d4 07 bf ac ld [ %fp + -84 ], %o2
2004920: d6 07 bf b0 ld [ %fp + -80 ], %o3
if ( IMFS_is_imfs_instance( currentloc ) ) {
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
2004924: f6 27 bf e0 st %i3, [ %fp + -32 ]
new_node = IMFS_create_node_with_control(
2004928: 90 10 00 1d mov %i5, %o0
200492c: 92 10 00 1a mov %i2, %o1
2004930: 98 10 00 19 mov %i1, %o4
2004934: 9a 07 bf e0 add %fp, -32, %o5
2004938: 40 00 2f 42 call 2010640 <IMFS_create_node_with_control>
200493c: b0 10 3f ff mov -1, %i0
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
mode,
&info
);
if ( new_node != NULL ) {
2004940: 80 a2 20 00 cmp %o0, 0
2004944: 02 80 00 1d be 20049b8 <IMFS_make_generic_node+0x11c>
2004948: 92 10 20 00 clr %o1
IMFS_jnode_t *parent = currentloc->node_access;
200494c: fa 07 60 08 ld [ %i5 + 8 ], %i5
IMFS_update_ctime( parent );
2004950: 40 00 02 b0 call 2005410 <gettimeofday>
2004954: 90 07 bf f8 add %fp, -8, %o0
2004958: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_update_mtime( parent );
200495c: 90 07 bf f8 add %fp, -8, %o0
);
if ( new_node != NULL ) {
IMFS_jnode_t *parent = currentloc->node_access;
IMFS_update_ctime( parent );
2004960: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
IMFS_update_mtime( parent );
2004964: 40 00 02 ab call 2005410 <gettimeofday>
2004968: 92 10 20 00 clr %o1
200496c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2004970: b0 10 20 00 clr %i0
2004974: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
} else {
rtems_filesystem_eval_path_error( &ctx, ENOTSUP );
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
2004978: 40 00 09 17 call 2006dd4 <rtems_filesystem_eval_path_cleanup>
200497c: 90 07 bf a4 add %fp, -92, %o0
2004980: 81 c7 e0 08 ret
2004984: 81 e8 00 00 restore
{
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
2004988: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200498c: 22 bf ff d9 be,a 20048f0 <IMFS_make_generic_node+0x54> <== NOT EXECUTED
2004990: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
case S_IFCHR:
case S_IFIFO:
case S_IFREG:
break;
default:
errno = EINVAL;
2004994: 40 00 3d 59 call 2013ef8 <__errno>
2004998: b0 10 3f ff mov -1, %i0
200499c: 82 10 20 16 mov 0x16, %g1
20049a0: c2 22 00 00 st %g1, [ %o0 ]
20049a4: 81 c7 e0 08 ret
20049a8: 81 e8 00 00 restore
IMFS_update_mtime( parent );
} else {
rv = -1;
}
} else {
rtems_filesystem_eval_path_error( &ctx, ENOTSUP );
20049ac: 92 10 20 86 mov 0x86, %o1
20049b0: 40 00 08 3b call 2006a9c <rtems_filesystem_eval_path_error>
20049b4: b0 10 3f ff mov -1, %i0
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
20049b8: 40 00 09 07 call 2006dd4 <rtems_filesystem_eval_path_cleanup>
20049bc: 90 07 bf a4 add %fp, -92, %o0
20049c0: 81 c7 e0 08 ret
20049c4: 81 e8 00 00 restore
} else {
errno = EINVAL;
20049c8: 40 00 3d 4c call 2013ef8 <__errno>
20049cc: b0 10 3f ff mov -1, %i0
20049d0: 82 10 20 16 mov 0x16, %g1
20049d4: c2 22 00 00 st %g1, [ %o0 ]
rv = -1;
}
}
return rv;
}
20049d8: 81 c7 e0 08 ret
20049dc: 81 e8 00 00 restore
0200e7f0 <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
200e7f0: 9d e3 bf 98 save %sp, -104, %sp
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200e7f4: 03 00 80 73 sethi %hi(0x201cc00), %g1
200e7f8: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 ! 201cec0 <imfs_memfile_bytes_per_block>
200e7fc: b9 37 60 02 srl %i5, 2, %i4
200e800: 92 10 00 1c mov %i4, %o1
200e804: 40 00 27 8d call 2018638 <.umul>
200e808: 90 07 20 01 add %i4, 1, %o0
200e80c: 92 10 00 1c mov %i4, %o1
200e810: 40 00 27 8a call 2018638 <.umul>
200e814: 90 02 20 01 inc %o0
200e818: 92 10 00 1d mov %i5, %o1
200e81c: 40 00 27 87 call 2018638 <.umul>
200e820: 90 02 3f ff add %o0, -1, %o0
200e824: 82 10 20 00 clr %g1
200e828: 80 a0 40 19 cmp %g1, %i1
200e82c: 04 80 00 42 ble 200e934 <IMFS_memfile_extend+0x144> <== ALWAYS TAKEN
200e830: b8 10 00 18 mov %i0, %i4
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200e834: f0 07 20 50 ld [ %i4 + 0x50 ], %i0 <== NOT EXECUTED
200e838: 80 a6 40 18 cmp %i1, %i0
200e83c: 04 80 00 2a ble 200e8e4 <IMFS_memfile_extend+0xf4> <== ALWAYS TAKEN
200e840: e0 07 20 54 ld [ %i4 + 0x54 ], %l0
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e844: a3 3f 60 1f sra %i5, 0x1f, %l1 <== NOT EXECUTED
200e848: 96 10 00 1d mov %i5, %o3
200e84c: 94 10 00 11 mov %l1, %o2
200e850: 90 10 00 19 mov %i1, %o0
200e854: 40 00 29 0b call 2018c80 <__divdi3>
200e858: 92 10 00 1a mov %i2, %o1
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e85c: 90 10 00 18 mov %i0, %o0
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e860: b6 10 00 09 mov %o1, %i3
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e864: 94 10 00 11 mov %l1, %o2
200e868: 92 10 00 10 mov %l0, %o1
200e86c: 40 00 29 05 call 2018c80 <__divdi3>
200e870: 96 10 00 1d mov %i5, %o3
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200e874: 80 a6 c0 09 cmp %i3, %o1
200e878: 0a 80 00 21 bcs 200e8fc <IMFS_memfile_extend+0x10c> <== NEVER TAKEN
200e87c: b0 10 00 09 mov %o1, %i0
200e880: 10 80 00 05 b 200e894 <IMFS_memfile_extend+0xa4>
200e884: ba 10 00 09 mov %o1, %i5
200e888: 80 a6 c0 1d cmp %i3, %i5
200e88c: 0a 80 00 1d bcs 200e900 <IMFS_memfile_extend+0x110>
200e890: 92 10 20 00 clr %o1
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
200e894: 92 10 00 1d mov %i5, %o1
200e898: 7f ff ff 39 call 200e57c <IMFS_memfile_addblock>
200e89c: 90 10 00 1c mov %i4, %o0
200e8a0: 80 a2 20 00 cmp %o0, 0
200e8a4: 22 bf ff f9 be,a 200e888 <IMFS_memfile_extend+0x98>
200e8a8: ba 07 60 01 inc %i5
for ( ; block>=old_blocks ; block-- ) {
200e8ac: 10 80 00 06 b 200e8c4 <IMFS_memfile_extend+0xd4>
200e8b0: 80 a6 00 1d cmp %i0, %i5
IMFS_memfile_remove_block( the_jnode, block );
200e8b4: 90 10 00 1c mov %i4, %o0
200e8b8: 7f ff ff c2 call 200e7c0 <IMFS_memfile_remove_block>
200e8bc: ba 07 7f ff add %i5, -1, %i5
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
200e8c0: 80 a6 00 1d cmp %i0, %i5
200e8c4: 08 bf ff fc bleu 200e8b4 <IMFS_memfile_extend+0xc4>
200e8c8: 92 10 00 1d mov %i5, %o1
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
200e8cc: 40 00 03 ad call 200f780 <__errno>
200e8d0: b0 10 3f ff mov -1, %i0
200e8d4: 82 10 20 1c mov 0x1c, %g1
200e8d8: c2 22 00 00 st %g1, [ %o0 ]
200e8dc: 81 c7 e0 08 ret
200e8e0: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
200e8e4: 12 80 00 04 bne 200e8f4 <IMFS_memfile_extend+0x104> <== NEVER TAKEN
200e8e8: 80 a6 80 10 cmp %i2, %l0
200e8ec: 18 bf ff d7 bgu 200e848 <IMFS_memfile_extend+0x58>
200e8f0: a3 3f 60 1f sra %i5, 0x1f, %l1
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
200e8f4: 81 c7 e0 08 ret
200e8f8: 91 e8 20 00 restore %g0, 0, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
200e8fc: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
200e900: f2 27 20 50 st %i1, [ %i4 + 0x50 ]
200e904: f4 27 20 54 st %i2, [ %i4 + 0x54 ]
IMFS_update_ctime(the_jnode);
200e908: 7f ff d3 f7 call 20038e4 <gettimeofday>
200e90c: 90 07 bf f8 add %fp, -8, %o0
200e910: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_update_mtime(the_jnode);
200e914: 90 07 bf f8 add %fp, -8, %o0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
200e918: c2 27 20 48 st %g1, [ %i4 + 0x48 ]
IMFS_update_mtime(the_jnode);
200e91c: 7f ff d3 f2 call 20038e4 <gettimeofday>
200e920: 92 10 20 00 clr %o1
200e924: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e928: c2 27 20 44 st %g1, [ %i4 + 0x44 ]
return 0;
200e92c: 81 c7 e0 08 ret
200e930: 91 e8 20 00 restore %g0, 0, %o0
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200e934: 12 80 00 04 bne 200e944 <IMFS_memfile_extend+0x154>
200e938: 80 a2 00 1a cmp %o0, %i2
200e93c: 38 bf ff bf bgu,a 200e838 <IMFS_memfile_extend+0x48>
200e940: f0 07 20 50 ld [ %i4 + 0x50 ], %i0
rtems_set_errno_and_return_minus_one( EINVAL );
200e944: 40 00 03 8f call 200f780 <__errno>
200e948: b0 10 3f ff mov -1, %i0
200e94c: 82 10 20 16 mov 0x16, %g1
200e950: c2 22 00 00 st %g1, [ %o0 ]
200e954: 81 c7 e0 08 ret
200e958: 81 e8 00 00 restore
0200e09c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
200e09c: 9d e3 bf a0 save %sp, -96, %sp
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200e0a0: 03 00 80 73 sethi %hi(0x201cc00), %g1
200e0a4: fa 00 62 c0 ld [ %g1 + 0x2c0 ], %i5 ! 201cec0 <imfs_memfile_bytes_per_block>
200e0a8: bb 37 60 02 srl %i5, 2, %i5
200e0ac: 82 07 7f ff add %i5, -1, %g1
200e0b0: 80 a6 40 01 cmp %i1, %g1
200e0b4: 18 80 00 0b bgu 200e0e0 <IMFS_memfile_get_block_pointer+0x44>
200e0b8: b8 10 00 18 mov %i0, %i4
p = info->indirect;
if ( malloc_it ) {
200e0bc: 80 a6 a0 00 cmp %i2, 0
200e0c0: 12 80 00 50 bne 200e200 <IMFS_memfile_get_block_pointer+0x164>
200e0c4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200e0c8: 80 a2 20 00 cmp %o0, 0
200e0cc: 02 80 00 64 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e0d0: b0 10 20 00 clr %i0
return 0;
return &info->indirect[ my_block ];
200e0d4: b3 2e 60 02 sll %i1, 2, %i1
200e0d8: 81 c7 e0 08 ret
200e0dc: 91 ea 00 19 restore %o0, %i1, %o0
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
200e0e0: 90 07 60 01 add %i5, 1, %o0
200e0e4: 40 00 29 55 call 2018638 <.umul>
200e0e8: 92 10 00 1d mov %i5, %o1
200e0ec: 82 02 3f ff add %o0, -1, %g1
200e0f0: 80 a6 40 01 cmp %i1, %g1
200e0f4: 08 80 00 2c bleu 200e1a4 <IMFS_memfile_get_block_pointer+0x108>
200e0f8: b6 10 00 08 mov %o0, %i3
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
200e0fc: 90 02 20 01 inc %o0
200e100: 40 00 29 4e call 2018638 <.umul>
200e104: 92 10 00 1d mov %i5, %o1
200e108: 90 02 3f ff add %o0, -1, %o0
200e10c: 80 a6 40 08 cmp %i1, %o0
200e110: 18 80 00 53 bgu 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e114: b0 10 20 00 clr %i0
my_block -= FIRST_TRIPLY_INDIRECT;
200e118: b2 26 40 1b sub %i1, %i3, %i1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200e11c: 92 10 00 1d mov %i5, %o1
200e120: 40 00 2a 2c call 20189d0 <.urem>
200e124: 90 10 00 19 mov %i1, %o0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e128: 92 10 00 1d mov %i5, %o1
* 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;
200e12c: a0 10 00 08 mov %o0, %l0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e130: 40 00 29 7c call 2018720 <.udiv>
200e134: 90 10 00 19 mov %i1, %o0
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200e138: 92 10 00 1d mov %i5, %o1
200e13c: 40 00 29 79 call 2018720 <.udiv>
200e140: b6 10 00 08 mov %o0, %i3
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200e144: 92 10 00 1d mov %i5, %o1
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200e148: b2 10 00 08 mov %o0, %i1
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200e14c: 40 00 2a 21 call 20189d0 <.urem>
200e150: 90 10 00 1b mov %i3, %o0
p = info->triply_indirect;
200e154: c2 07 20 60 ld [ %i4 + 0x60 ], %g1
if ( malloc_it ) {
200e158: 80 a6 a0 00 cmp %i2, 0
200e15c: 02 80 00 33 be 200e228 <IMFS_memfile_get_block_pointer+0x18c>
200e160: ba 10 00 08 mov %o0, %i5
if ( !p ) {
200e164: 80 a0 60 00 cmp %g1, 0
200e168: 02 80 00 66 be 200e300 <IMFS_memfile_get_block_pointer+0x264>
200e16c: 01 00 00 00 nop
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
200e170: b3 2e 60 02 sll %i1, 2, %i1
200e174: c4 00 40 19 ld [ %g1 + %i1 ], %g2
if ( !p1 ) {
200e178: 80 a0 a0 00 cmp %g2, 0
200e17c: 02 80 00 5a be 200e2e4 <IMFS_memfile_get_block_pointer+0x248>
200e180: b2 00 40 19 add %g1, %i1, %i1
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
200e184: bb 2f 60 02 sll %i5, 2, %i5
200e188: d0 00 80 1d ld [ %g2 + %i5 ], %o0
if ( !p2 ) {
200e18c: 80 a2 20 00 cmp %o0, 0
200e190: 02 80 00 47 be 200e2ac <IMFS_memfile_get_block_pointer+0x210>
200e194: ba 00 80 1d add %g2, %i5, %i5
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
200e198: b1 2c 20 02 sll %l0, 2, %i0
200e19c: 81 c7 e0 08 ret
200e1a0: 91 ea 00 18 restore %o0, %i0, %o0
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
200e1a4: b2 26 40 1d sub %i1, %i5, %i1
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200e1a8: 92 10 00 1d mov %i5, %o1
200e1ac: 40 00 2a 09 call 20189d0 <.urem>
200e1b0: 90 10 00 19 mov %i1, %o0
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e1b4: 92 10 00 1d mov %i5, %o1
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200e1b8: b6 10 00 08 mov %o0, %i3
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e1bc: 40 00 29 59 call 2018720 <.udiv>
200e1c0: 90 10 00 19 mov %i1, %o0
p = info->doubly_indirect;
200e1c4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
if ( malloc_it ) {
200e1c8: 80 a6 a0 00 cmp %i2, 0
200e1cc: 02 80 00 26 be 200e264 <IMFS_memfile_get_block_pointer+0x1c8>
200e1d0: ba 10 00 08 mov %o0, %i5
if ( !p ) {
200e1d4: 80 a0 60 00 cmp %g1, 0
200e1d8: 02 80 00 3c be 200e2c8 <IMFS_memfile_get_block_pointer+0x22c>
200e1dc: 01 00 00 00 nop
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
200e1e0: bb 2f 60 02 sll %i5, 2, %i5
200e1e4: d0 00 40 1d ld [ %g1 + %i5 ], %o0
if ( !p1 ) {
200e1e8: 80 a2 20 00 cmp %o0, 0
200e1ec: 02 80 00 29 be 200e290 <IMFS_memfile_get_block_pointer+0x1f4>
200e1f0: ba 00 40 1d add %g1, %i5, %i5
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
}
return (block_p *)&p1[ singly ];
200e1f4: b1 2e e0 02 sll %i3, 2, %i0
200e1f8: 81 c7 e0 08 ret
200e1fc: 91 ea 00 18 restore %o0, %i0, %o0
if ( my_block <= LAST_INDIRECT ) {
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
200e200: 80 a2 20 00 cmp %o0, 0
200e204: 32 bf ff b5 bne,a 200e0d8 <IMFS_memfile_get_block_pointer+0x3c>
200e208: b3 2e 60 02 sll %i1, 2, %i1
p = memfile_alloc_block();
200e20c: 7f ff ff 97 call 200e068 <memfile_alloc_block>
200e210: b0 10 20 00 clr %i0
if ( !p )
200e214: 80 a2 20 00 cmp %o0, 0
200e218: 02 80 00 11 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e21c: 01 00 00 00 nop
return 0;
info->indirect = p;
200e220: 10 bf ff ad b 200e0d4 <IMFS_memfile_get_block_pointer+0x38>
200e224: d0 27 20 58 st %o0, [ %i4 + 0x58 ]
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
200e228: 80 a0 60 00 cmp %g1, 0
200e22c: 02 80 00 0c be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e230: b3 2e 60 02 sll %i1, 2, %i1
return 0;
p1 = (block_p *) p[ triply ];
200e234: c2 00 40 19 ld [ %g1 + %i1 ], %g1
if ( !p1 )
200e238: 80 a0 60 00 cmp %g1, 0
200e23c: 02 80 00 08 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e240: bb 2a 20 02 sll %o0, 2, %i5
return 0;
p2 = (block_p *)p1[ doubly ];
200e244: c2 00 40 1d ld [ %g1 + %i5 ], %g1
if ( !p2 )
200e248: 80 a0 60 00 cmp %g1, 0
200e24c: 02 80 00 04 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e250: 01 00 00 00 nop
return 0;
return (block_p *)&p2[ singly ];
200e254: b1 2c 20 02 sll %l0, 2, %i0
200e258: b0 00 40 18 add %g1, %i0, %i0
/*
* This means the requested block number is out of range.
*/
return 0;
}
200e25c: 81 c7 e0 08 ret
200e260: 81 e8 00 00 restore
}
return (block_p *)&p1[ singly ];
}
if ( !p )
200e264: 80 a0 60 00 cmp %g1, 0
200e268: 02 bf ff fd be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e26c: b0 10 20 00 clr %i0
return 0;
p = (block_p *)p[ doubly ];
200e270: bb 2a 20 02 sll %o0, 2, %i5
200e274: c2 00 40 1d ld [ %g1 + %i5 ], %g1
if ( !p )
200e278: 80 a0 60 00 cmp %g1, 0
200e27c: 02 bf ff f8 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e280: 01 00 00 00 nop
return 0;
return (block_p *)&p[ singly ];
200e284: b1 2e e0 02 sll %i3, 2, %i0
200e288: 81 c7 e0 08 ret
200e28c: 91 e8 40 18 restore %g1, %i0, %o0
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
200e290: 7f ff ff 76 call 200e068 <memfile_alloc_block>
200e294: b0 10 20 00 clr %i0
if ( !p1 )
200e298: 80 a2 20 00 cmp %o0, 0
200e29c: 02 bf ff f0 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e2a0: 01 00 00 00 nop
return 0;
p[ doubly ] = (block_p) p1;
200e2a4: 10 bf ff d4 b 200e1f4 <IMFS_memfile_get_block_pointer+0x158>
200e2a8: d0 27 40 00 st %o0, [ %i5 ]
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
200e2ac: 7f ff ff 6f call 200e068 <memfile_alloc_block>
200e2b0: b0 10 20 00 clr %i0
if ( !p2 )
200e2b4: 80 a2 20 00 cmp %o0, 0
200e2b8: 02 bf ff e9 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e2bc: 01 00 00 00 nop
return 0;
p1[ doubly ] = (block_p) p2;
200e2c0: 10 bf ff b6 b 200e198 <IMFS_memfile_get_block_pointer+0xfc>
200e2c4: d0 27 40 00 st %o0, [ %i5 ]
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200e2c8: 7f ff ff 68 call 200e068 <memfile_alloc_block>
200e2cc: b0 10 20 00 clr %i0
if ( !p )
200e2d0: 80 a2 20 00 cmp %o0, 0
200e2d4: 02 bf ff e2 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e2d8: 82 10 00 08 mov %o0, %g1
return 0;
info->doubly_indirect = p;
200e2dc: 10 bf ff c1 b 200e1e0 <IMFS_memfile_get_block_pointer+0x144>
200e2e0: d0 27 20 5c st %o0, [ %i4 + 0x5c ]
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
200e2e4: 7f ff ff 61 call 200e068 <memfile_alloc_block>
200e2e8: b0 10 20 00 clr %i0
if ( !p1 )
200e2ec: 80 a2 20 00 cmp %o0, 0
200e2f0: 02 bf ff db be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e2f4: 84 10 00 08 mov %o0, %g2
return 0;
p[ triply ] = (block_p) p1;
200e2f8: 10 bf ff a3 b 200e184 <IMFS_memfile_get_block_pointer+0xe8>
200e2fc: d0 26 40 00 st %o0, [ %i1 ]
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200e300: 7f ff ff 5a call 200e068 <memfile_alloc_block>
200e304: 01 00 00 00 nop
if ( !p )
200e308: 82 92 20 00 orcc %o0, 0, %g1
200e30c: 02 bf ff d4 be 200e25c <IMFS_memfile_get_block_pointer+0x1c0><== NEVER TAKEN
200e310: 01 00 00 00 nop
return 0;
info->triply_indirect = p;
200e314: 10 bf ff 97 b 200e170 <IMFS_memfile_get_block_pointer+0xd4>
200e318: c2 27 20 60 st %g1, [ %i4 + 0x60 ]
0200e31c <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200e31c: 9d e3 bf 98 save %sp, -104, %sp
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
200e320: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
200e324: ba 10 00 18 mov %i0, %i5
* 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 ) {
200e328: c2 00 40 00 ld [ %g1 ], %g1
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200e32c: a0 10 00 19 mov %i1, %l0
* 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 ) {
200e330: 80 a0 60 05 cmp %g1, 5
200e334: 02 80 00 64 be 200e4c4 <IMFS_memfile_read+0x1a8>
200e338: a2 10 00 1a mov %i2, %l1
/*
* 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 )
200e33c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
/*
* 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;
200e340: 82 10 00 1a mov %i2, %g1
if ( last_byte > the_jnode->info.file.size )
200e344: 86 10 20 00 clr %g3
200e348: c8 06 20 54 ld [ %i0 + 0x54 ], %g4
200e34c: 80 a0 c0 02 cmp %g3, %g2
200e350: 04 80 00 41 ble 200e454 <IMFS_memfile_read+0x138> <== ALWAYS TAKEN
200e354: b4 07 00 1a add %i4, %i2, %i2
my_length = the_jnode->info.file.size - start;
200e358: b8 21 00 01 sub %g4, %g1, %i4 <== NOT EXECUTED
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e35c: 33 00 80 73 sethi %hi(0x201cc00), %i1 <== NOT EXECUTED
200e360: f4 06 62 c0 ld [ %i1 + 0x2c0 ], %i2 ! 201cec0 <imfs_memfile_bytes_per_block>
200e364: 90 10 00 10 mov %l0, %o0
200e368: b1 3e a0 1f sra %i2, 0x1f, %i0
200e36c: 92 10 00 11 mov %l1, %o1
200e370: 94 10 00 18 mov %i0, %o2
200e374: 40 00 2b 29 call 2019018 <__moddi3>
200e378: 96 10 00 1a mov %i2, %o3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e37c: 90 10 00 10 mov %l0, %o0
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e380: a4 10 00 09 mov %o1, %l2
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e384: 94 10 00 18 mov %i0, %o2
200e388: 92 10 00 11 mov %l1, %o1
200e38c: 40 00 2a 3d call 2018c80 <__divdi3>
200e390: 96 10 00 1a mov %i2, %o3
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
200e394: a2 10 00 1b mov %i3, %l1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e398: a0 10 00 09 mov %o1, %l0
if ( start_offset ) {
200e39c: 80 a4 a0 00 cmp %l2, 0
200e3a0: 02 80 00 14 be 200e3f0 <IMFS_memfile_read+0xd4>
200e3a4: b0 10 20 00 clr %i0
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 );
200e3a8: 90 10 00 1d mov %i5, %o0
200e3ac: 7f ff ff 3c call 200e09c <IMFS_memfile_get_block_pointer>
200e3b0: 94 10 20 00 clr %o2
if ( !block_ptr )
200e3b4: 80 a2 20 00 cmp %o0, 0
200e3b8: 02 80 00 25 be 200e44c <IMFS_memfile_read+0x130> <== NEVER TAKEN
200e3bc: b4 26 80 12 sub %i2, %l2, %i2
* 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;
200e3c0: 80 a7 00 1a cmp %i4, %i2
200e3c4: 18 80 00 53 bgu 200e510 <IMFS_memfile_read+0x1f4>
200e3c8: b0 10 00 1c mov %i4, %i0
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
200e3cc: d2 02 00 00 ld [ %o0 ], %o1
200e3d0: 94 10 00 18 mov %i0, %o2
200e3d4: 90 10 00 1b mov %i3, %o0
200e3d8: 40 00 07 46 call 20100f0 <memcpy>
200e3dc: 92 02 40 12 add %o1, %l2, %o1
dest += to_copy;
block++;
my_length -= to_copy;
200e3e0: f4 06 62 c0 ld [ %i1 + 0x2c0 ], %i2
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
200e3e4: a2 06 c0 18 add %i3, %i0, %l1
block++;
200e3e8: a0 04 20 01 inc %l0
my_length -= to_copy;
200e3ec: b8 27 00 18 sub %i4, %i0, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e3f0: 80 a7 00 1a cmp %i4, %i2
200e3f4: 1a 80 00 0e bcc 200e42c <IMFS_memfile_read+0x110>
200e3f8: 94 10 20 00 clr %o2
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200e3fc: 10 80 00 1e b 200e474 <IMFS_memfile_read+0x158>
200e400: 80 a7 20 00 cmp %i4, 0
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200e404: d2 00 40 00 ld [ %g1 ], %o1
200e408: 40 00 07 3a call 20100f0 <memcpy>
200e40c: b8 27 00 1a sub %i4, %i2, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e410: c2 06 62 c0 ld [ %i1 + 0x2c0 ], %g1
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
200e414: a2 04 40 1a add %l1, %i2, %l1
block++;
200e418: a0 04 20 01 inc %l0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e41c: 80 a0 40 1c cmp %g1, %i4
200e420: 18 80 00 14 bgu 200e470 <IMFS_memfile_read+0x154>
200e424: b0 06 00 1a add %i0, %i2, %i0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e428: 94 10 20 00 clr %o2
200e42c: 92 10 00 10 mov %l0, %o1
200e430: 7f ff ff 1b call 200e09c <IMFS_memfile_get_block_pointer>
200e434: 90 10 00 1d mov %i5, %o0
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200e438: 94 10 00 1a mov %i2, %o2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e43c: 82 10 00 08 mov %o0, %g1
if ( !block_ptr )
200e440: 80 a0 60 00 cmp %g1, 0
200e444: 12 bf ff f0 bne 200e404 <IMFS_memfile_read+0xe8> <== ALWAYS TAKEN
200e448: 90 10 00 11 mov %l1, %o0
}
IMFS_update_atime( the_jnode );
return copied;
}
200e44c: 81 c7 e0 08 ret <== NOT EXECUTED
200e450: 81 e8 00 00 restore <== NOT EXECUTED
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
200e454: 12 bf ff c3 bne 200e360 <IMFS_memfile_read+0x44> <== NEVER TAKEN
200e458: 33 00 80 73 sethi %hi(0x201cc00), %i1
200e45c: 80 a6 80 04 cmp %i2, %g4
200e460: 08 bf ff c1 bleu 200e364 <IMFS_memfile_read+0x48>
200e464: f4 06 62 c0 ld [ %i1 + 0x2c0 ], %i2
my_length = the_jnode->info.file.size - start;
200e468: 10 bf ff be b 200e360 <IMFS_memfile_read+0x44>
200e46c: b8 21 00 01 sub %g4, %g1, %i4
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200e470: 80 a7 20 00 cmp %i4, 0
200e474: 02 80 00 0e be 200e4ac <IMFS_memfile_read+0x190>
200e478: 90 07 bf f8 add %fp, -8, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200e47c: 90 10 00 1d mov %i5, %o0
200e480: 92 10 00 10 mov %l0, %o1
200e484: 7f ff ff 06 call 200e09c <IMFS_memfile_get_block_pointer>
200e488: 94 10 20 00 clr %o2
if ( !block_ptr )
200e48c: 80 a2 20 00 cmp %o0, 0
200e490: 02 bf ff ef be 200e44c <IMFS_memfile_read+0x130> <== NEVER TAKEN
200e494: 94 10 00 1c mov %i4, %o2
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
200e498: d2 02 00 00 ld [ %o0 ], %o1
200e49c: 90 10 00 11 mov %l1, %o0
200e4a0: 40 00 07 14 call 20100f0 <memcpy>
200e4a4: b0 06 00 1c add %i0, %i4, %i0
copied += my_length;
}
IMFS_update_atime( the_jnode );
200e4a8: 90 07 bf f8 add %fp, -8, %o0
200e4ac: 7f ff d5 0e call 20038e4 <gettimeofday>
200e4b0: 92 10 20 00 clr %o1
200e4b4: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e4b8: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return copied;
}
200e4bc: 81 c7 e0 08 ret
200e4c0: 81 e8 00 00 restore
if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
200e4c4: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4
200e4c8: 82 10 20 00 clr %g1
200e4cc: 86 a3 40 1a subcc %o5, %i2, %g3
200e4d0: 84 63 00 19 subx %o4, %i1, %g2
200e4d4: 80 a0 40 02 cmp %g1, %g2
200e4d8: 04 80 00 10 ble 200e518 <IMFS_memfile_read+0x1fc> <== ALWAYS TAKEN
200e4dc: d2 06 20 58 ld [ %i0 + 0x58 ], %o1
my_length = the_jnode->info.linearfile.size - start;
200e4e0: b0 23 40 11 sub %o5, %l1, %i0 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
200e4e4: 92 02 40 11 add %o1, %l1, %o1
200e4e8: 94 10 00 18 mov %i0, %o2
200e4ec: 40 00 07 01 call 20100f0 <memcpy>
200e4f0: 90 10 00 1b mov %i3, %o0
IMFS_update_atime( the_jnode );
200e4f4: 90 07 bf f8 add %fp, -8, %o0
200e4f8: 7f ff d4 fb call 20038e4 <gettimeofday>
200e4fc: 92 10 20 00 clr %o1
200e500: c2 07 bf f8 ld [ %fp + -8 ], %g1
200e504: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return my_length;
200e508: 81 c7 e0 08 ret
200e50c: 81 e8 00 00 restore
* 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;
200e510: 10 bf ff af b 200e3cc <IMFS_memfile_read+0xb0>
200e514: b0 10 00 1a mov %i2, %i0
if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
200e518: 12 80 00 04 bne 200e528 <IMFS_memfile_read+0x20c> <== NEVER TAKEN
200e51c: 80 a7 00 03 cmp %i4, %g3
200e520: 38 bf ff f1 bgu,a 200e4e4 <IMFS_memfile_read+0x1c8> <== ALWAYS TAKEN
200e524: b0 23 40 11 sub %o5, %l1, %i0
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200e528: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
200e52c: b0 10 00 1c mov %i4, %i0 <== 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);
200e530: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200e534: 40 00 06 ef call 20100f0 <memcpy> <== NOT EXECUTED
200e538: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
IMFS_update_atime( the_jnode );
200e53c: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED
200e540: 7f ff d4 e9 call 20038e4 <gettimeofday> <== NOT EXECUTED
200e544: 92 10 20 00 clr %o1 <== NOT EXECUTED
200e548: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
200e54c: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
return my_length;
200e550: 81 c7 e0 08 ret <== NOT EXECUTED
200e554: 81 e8 00 00 restore <== NOT EXECUTED
0200e648 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
200e648: 9d e3 bf a0 save %sp, -96, %sp
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
200e64c: 39 00 80 73 sethi %hi(0x201cc00), %i4
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e650: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
/*
* 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;
200e654: f4 07 22 c0 ld [ %i4 + 0x2c0 ], %i2
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e658: 80 a0 60 00 cmp %g1, 0
200e65c: 02 80 00 05 be 200e670 <IMFS_memfile_remove+0x28>
200e660: b5 36 a0 02 srl %i2, 2, %i2
memfile_free_blocks_in_table( &info->indirect, to_free );
200e664: 90 06 20 58 add %i0, 0x58, %o0
200e668: 7f ff ff e2 call 200e5f0 <memfile_free_blocks_in_table>
200e66c: 92 10 00 1a mov %i2, %o1
}
if ( info->doubly_indirect ) {
200e670: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
200e674: 80 a0 60 00 cmp %g1, 0
200e678: 02 80 00 1b be 200e6e4 <IMFS_memfile_remove+0x9c>
200e67c: c4 07 22 c0 ld [ %i4 + 0x2c0 ], %g2
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e680: 85 30 a0 02 srl %g2, 2, %g2
200e684: 80 a0 a0 00 cmp %g2, 0
200e688: 02 80 00 14 be 200e6d8 <IMFS_memfile_remove+0x90> <== NEVER TAKEN
200e68c: 90 10 20 00 clr %o0
200e690: 37 00 80 73 sethi %hi(0x201cc00), %i3
200e694: ba 10 20 00 clr %i5
200e698: 10 80 00 03 b 200e6a4 <IMFS_memfile_remove+0x5c>
200e69c: b6 16 e2 c0 or %i3, 0x2c0, %i3
200e6a0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
if ( info->doubly_indirect[i] ) {
200e6a4: 91 2a 20 02 sll %o0, 2, %o0
200e6a8: c4 00 40 08 ld [ %g1 + %o0 ], %g2
200e6ac: 80 a0 a0 00 cmp %g2, 0
200e6b0: 02 80 00 04 be 200e6c0 <IMFS_memfile_remove+0x78> <== NEVER TAKEN
200e6b4: 90 00 40 08 add %g1, %o0, %o0
memfile_free_blocks_in_table(
200e6b8: 7f ff ff ce call 200e5f0 <memfile_free_blocks_in_table>
200e6bc: 92 10 00 1a mov %i2, %o1
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++ ) {
200e6c0: c2 06 c0 00 ld [ %i3 ], %g1
200e6c4: ba 07 60 01 inc %i5
200e6c8: 83 30 60 02 srl %g1, 2, %g1
200e6cc: 80 a7 40 01 cmp %i5, %g1
200e6d0: 0a bf ff f4 bcs 200e6a0 <IMFS_memfile_remove+0x58>
200e6d4: 90 10 00 1d mov %i5, %o0
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 );
200e6d8: 90 06 20 5c add %i0, 0x5c, %o0
200e6dc: 7f ff ff c5 call 200e5f0 <memfile_free_blocks_in_table>
200e6e0: 92 10 00 1a mov %i2, %o1
}
if ( info->triply_indirect ) {
200e6e4: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
200e6e8: 80 a2 20 00 cmp %o0, 0
200e6ec: 02 80 00 33 be 200e7b8 <IMFS_memfile_remove+0x170>
200e6f0: c2 07 22 c0 ld [ %i4 + 0x2c0 ], %g1
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e6f4: 83 30 60 02 srl %g1, 2, %g1
200e6f8: 80 a0 60 00 cmp %g1, 0
200e6fc: 22 80 00 2d be,a 200e7b0 <IMFS_memfile_remove+0x168> <== NEVER TAKEN
200e700: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
200e704: f8 02 00 00 ld [ %o0 ], %i4
if ( !p ) /* ensure we have a valid pointer */
200e708: 80 a7 20 00 cmp %i4, 0
200e70c: 22 80 00 29 be,a 200e7b0 <IMFS_memfile_remove+0x168> <== NEVER TAKEN
200e710: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
200e714: 37 00 80 73 sethi %hi(0x201cc00), %i3
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200e718: a0 10 20 00 clr %l0
if ( !p ) /* ensure we have a valid pointer */
200e71c: b2 10 20 00 clr %i1
200e720: b6 16 e2 c0 or %i3, 0x2c0, %i3
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200e724: 80 a0 60 00 cmp %g1, 0
200e728: 22 80 00 13 be,a 200e774 <IMFS_memfile_remove+0x12c> <== NEVER TAKEN
200e72c: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED
200e730: 90 10 20 00 clr %o0
200e734: ba 10 20 00 clr %i5
if ( p[j] ) {
200e738: 91 2a 20 02 sll %o0, 2, %o0
200e73c: c2 07 00 08 ld [ %i4 + %o0 ], %g1
200e740: 80 a0 60 00 cmp %g1, 0
200e744: 02 80 00 04 be 200e754 <IMFS_memfile_remove+0x10c> <== NEVER TAKEN
200e748: 90 07 00 08 add %i4, %o0, %o0
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
200e74c: 7f ff ff a9 call 200e5f0 <memfile_free_blocks_in_table>
200e750: 92 10 00 1a mov %i2, %o1
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++ ) {
200e754: c2 06 c0 00 ld [ %i3 ], %g1
200e758: ba 07 60 01 inc %i5
200e75c: 83 30 60 02 srl %g1, 2, %g1
200e760: 80 a7 40 01 cmp %i5, %g1
200e764: 0a bf ff f5 bcs 200e738 <IMFS_memfile_remove+0xf0>
200e768: 90 10 00 1d mov %i5, %o0
200e76c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
200e770: 90 02 00 10 add %o0, %l0, %o0
200e774: 7f ff ff 9f call 200e5f0 <memfile_free_blocks_in_table>
200e778: 92 10 00 1a mov %i2, %o1
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e77c: c2 06 c0 00 ld [ %i3 ], %g1
200e780: b2 06 60 01 inc %i1
200e784: 83 30 60 02 srl %g1, 2, %g1
200e788: 80 a6 40 01 cmp %i1, %g1
200e78c: 1a 80 00 09 bcc 200e7b0 <IMFS_memfile_remove+0x168>
200e790: 90 06 20 60 add %i0, 0x60, %o0
p = (block_p *) info->triply_indirect[i];
200e794: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
* 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(
200e798: a1 2e 60 02 sll %i1, 2, %l0
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200e79c: f8 02 00 10 ld [ %o0 + %l0 ], %i4
if ( !p ) /* ensure we have a valid pointer */
200e7a0: 80 a7 20 00 cmp %i4, 0
200e7a4: 12 bf ff e1 bne 200e728 <IMFS_memfile_remove+0xe0> <== ALWAYS TAKEN
200e7a8: 80 a0 60 00 cmp %g1, 0
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
200e7ac: 90 06 20 60 add %i0, 0x60, %o0 <== NOT EXECUTED
200e7b0: 7f ff ff 90 call 200e5f0 <memfile_free_blocks_in_table>
200e7b4: 92 10 00 1a mov %i2, %o1
(block_p **)&info->triply_indirect, to_free );
}
return the_jnode;
}
200e7b8: 81 c7 e0 08 ret
200e7bc: 81 e8 00 00 restore
0200e95c <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200e95c: 9d e3 bf 98 save %sp, -104, %sp
* 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 ) {
200e960: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200e964: ba 10 00 18 mov %i0, %i5
* 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 ) {
200e968: 80 a0 60 00 cmp %g1, 0
200e96c: 06 80 00 5c bl 200eadc <IMFS_memfile_write+0x180> <== NEVER TAKEN
200e970: 94 07 00 1a add %i4, %i2, %o2
200e974: 80 a0 60 00 cmp %g1, 0
200e978: 22 80 00 56 be,a 200ead0 <IMFS_memfile_write+0x174> <== ALWAYS TAKEN
200e97c: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e980: 23 00 80 73 sethi %hi(0x201cc00), %l1 <== NOT EXECUTED
200e984: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0 ! 201cec0 <imfs_memfile_bytes_per_block>
200e988: 92 10 00 1a mov %i2, %o1
200e98c: b1 3c 20 1f sra %l0, 0x1f, %i0
200e990: 96 10 00 10 mov %l0, %o3
200e994: 94 10 00 18 mov %i0, %o2
200e998: 40 00 29 a0 call 2019018 <__moddi3>
200e99c: 90 10 00 19 mov %i1, %o0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e9a0: 94 10 00 18 mov %i0, %o2
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200e9a4: a4 10 00 09 mov %o1, %l2
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200e9a8: 90 10 00 19 mov %i1, %o0
200e9ac: 92 10 00 1a mov %i2, %o1
200e9b0: 40 00 28 b4 call 2018c80 <__divdi3>
200e9b4: 96 10 00 10 mov %l0, %o3
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
200e9b8: b0 10 20 00 clr %i0
/*
* 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 ) {
200e9bc: 80 a4 a0 00 cmp %l2, 0
200e9c0: 12 80 00 1a bne 200ea28 <IMFS_memfile_write+0xcc>
200e9c4: b4 10 00 09 mov %o1, %i2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e9c8: 80 a7 00 10 cmp %i4, %l0
200e9cc: 1a 80 00 0e bcc 200ea04 <IMFS_memfile_write+0xa8>
200e9d0: 92 10 00 1a mov %i2, %o1
* 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 ) {
200e9d4: 10 80 00 2a b 200ea7c <IMFS_memfile_write+0x120>
200e9d8: 80 a7 20 00 cmp %i4, 0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
200e9dc: d0 02 00 00 ld [ %o0 ], %o0
200e9e0: 40 00 05 c4 call 20100f0 <memcpy>
200e9e4: b8 27 00 10 sub %i4, %l0, %i4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e9e8: c2 04 62 c0 ld [ %l1 + 0x2c0 ], %g1
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 );
src += to_copy;
200e9ec: b6 06 c0 10 add %i3, %l0, %i3
block++;
200e9f0: b4 06 a0 01 inc %i2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200e9f4: 80 a0 40 1c cmp %g1, %i4
200e9f8: 18 80 00 20 bgu 200ea78 <IMFS_memfile_write+0x11c>
200e9fc: b0 06 00 10 add %i0, %l0, %i0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200ea00: 92 10 00 1a mov %i2, %o1
200ea04: 94 10 20 00 clr %o2
200ea08: 7f ff fd a5 call 200e09c <IMFS_memfile_get_block_pointer>
200ea0c: 90 10 00 1d mov %i5, %o0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
200ea10: 92 10 00 1b mov %i3, %o1
*/
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 )
200ea14: 80 a2 20 00 cmp %o0, 0
200ea18: 12 bf ff f1 bne 200e9dc <IMFS_memfile_write+0x80> <== ALWAYS TAKEN
200ea1c: 94 10 00 10 mov %l0, %o2
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
200ea20: 81 c7 e0 08 ret <== NOT EXECUTED
200ea24: 81 e8 00 00 restore <== NOT EXECUTED
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200ea28: 90 10 00 1d mov %i5, %o0
200ea2c: 94 10 20 00 clr %o2
200ea30: 7f ff fd 9b call 200e09c <IMFS_memfile_get_block_pointer>
200ea34: b0 10 20 00 clr %i0
if ( !block_ptr )
200ea38: 80 a2 20 00 cmp %o0, 0
200ea3c: 02 80 00 32 be 200eb04 <IMFS_memfile_write+0x1a8> <== NEVER TAKEN
200ea40: 01 00 00 00 nop
* 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;
200ea44: b0 24 00 12 sub %l0, %l2, %i0
200ea48: 80 a6 00 1c cmp %i0, %i4
200ea4c: 18 80 00 30 bgu 200eb0c <IMFS_memfile_write+0x1b0>
200ea50: d0 02 00 00 ld [ %o0 ], %o0
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200ea54: 92 10 00 1b mov %i3, %o1
200ea58: 90 02 00 12 add %o0, %l2, %o0
200ea5c: 94 10 00 18 mov %i0, %o2
200ea60: 40 00 05 a4 call 20100f0 <memcpy>
200ea64: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
200ea68: b4 06 a0 01 inc %i2
my_length -= to_copy;
200ea6c: b8 27 00 18 sub %i4, %i0, %i4
copied += to_copy;
200ea70: 10 bf ff d6 b 200e9c8 <IMFS_memfile_write+0x6c>
200ea74: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0
* 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 ) {
200ea78: 80 a7 20 00 cmp %i4, 0
200ea7c: 02 80 00 0e be 200eab4 <IMFS_memfile_write+0x158>
200ea80: 90 07 bf f8 add %fp, -8, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200ea84: 90 10 00 1d mov %i5, %o0
200ea88: 92 10 00 1a mov %i2, %o1
200ea8c: 7f ff fd 84 call 200e09c <IMFS_memfile_get_block_pointer>
200ea90: 94 10 20 00 clr %o2
if ( !block_ptr )
200ea94: 80 a2 20 00 cmp %o0, 0
200ea98: 02 bf ff e2 be 200ea20 <IMFS_memfile_write+0xc4> <== NEVER TAKEN
200ea9c: 92 10 00 1b mov %i3, %o1
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 );
200eaa0: d0 02 00 00 ld [ %o0 ], %o0
200eaa4: 94 10 00 1c mov %i4, %o2
200eaa8: 40 00 05 92 call 20100f0 <memcpy>
200eaac: b0 06 00 1c add %i0, %i4, %i0
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
200eab0: 90 07 bf f8 add %fp, -8, %o0
200eab4: 7f ff d3 8c call 20038e4 <gettimeofday>
200eab8: 92 10 20 00 clr %o1
200eabc: c2 07 bf f8 ld [ %fp + -8 ], %g1
200eac0: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
200eac4: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
return copied;
}
200eac8: 81 c7 e0 08 ret
200eacc: 81 e8 00 00 restore
* 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 ) {
200ead0: 80 a0 40 0a cmp %g1, %o2
200ead4: 1a bf ff ac bcc 200e984 <IMFS_memfile_write+0x28>
200ead8: 23 00 80 73 sethi %hi(0x201cc00), %l1
status = IMFS_memfile_extend( the_jnode, last_byte );
200eadc: 90 10 00 1d mov %i5, %o0
200eae0: 7f ff ff 44 call 200e7f0 <IMFS_memfile_extend>
200eae4: 92 10 20 00 clr %o1
if ( status )
200eae8: 80 a2 20 00 cmp %o0, 0
200eaec: 02 bf ff a6 be 200e984 <IMFS_memfile_write+0x28>
200eaf0: 23 00 80 73 sethi %hi(0x201cc00), %l1
rtems_set_errno_and_return_minus_one( ENOSPC );
200eaf4: 40 00 03 23 call 200f780 <__errno>
200eaf8: b0 10 3f ff mov -1, %i0
200eafc: 82 10 20 1c mov 0x1c, %g1
200eb00: c2 22 00 00 st %g1, [ %o0 ]
200eb04: 81 c7 e0 08 ret
200eb08: 81 e8 00 00 restore
* 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;
200eb0c: b0 10 00 1c mov %i4, %i0
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200eb10: 92 10 00 1b mov %i3, %o1
200eb14: 90 02 00 12 add %o0, %l2, %o0
200eb18: 94 10 00 18 mov %i0, %o2
200eb1c: 40 00 05 75 call 20100f0 <memcpy>
200eb20: b6 06 c0 18 add %i3, %i0, %i3
src += to_copy;
block++;
200eb24: b4 06 a0 01 inc %i2
my_length -= to_copy;
200eb28: b8 27 00 18 sub %i4, %i0, %i4
copied += to_copy;
200eb2c: 10 bf ff a7 b 200e9c8 <IMFS_memfile_write+0x6c>
200eb30: e0 04 62 c0 ld [ %l1 + 0x2c0 ], %l0
02003058 <IMFS_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2003058: 9d e3 bf 80 save %sp, -128, %sp
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
200305c: 03 00 00 3c sethi %hi(0xf000), %g1
2003060: 07 00 00 10 sethi %hi(0x4000), %g3
2003064: 82 0e c0 01 and %i3, %g1, %g1
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2003068: 98 10 00 1b mov %i3, %o4
200306c: 94 10 00 19 mov %i1, %o2
2003070: 96 10 00 1a mov %i2, %o3
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
2003074: 80 a0 40 03 cmp %g1, %g3
2003078: 02 80 00 0b be 20030a4 <IMFS_mknod+0x4c>
200307c: 84 10 20 00 clr %g2
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
2003080: 07 00 00 20 sethi %hi(0x8000), %g3
2003084: 80 a0 40 03 cmp %g1, %g3
2003088: 02 80 00 29 be 200312c <IMFS_mknod+0xd4>
200308c: 07 00 00 08 sethi %hi(0x2000), %g3
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
2003090: 80 a0 40 03 cmp %g1, %g3
2003094: 12 80 00 1d bne 2003108 <IMFS_mknod+0xb0>
2003098: 07 00 00 18 sethi %hi(0x6000), %g3
*type = IMFS_DEVICE;
rtems_filesystem_split_dev_t(
200309c: f8 3f bf e0 std %i4, [ %fp + -32 ]
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
*type = IMFS_DEVICE;
20030a0: 84 10 20 01 mov 1, %g2
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
20030a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
20030a8: 84 00 a0 02 add %g2, 2, %g2
20030ac: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
20030b0: 85 28 a0 02 sll %g2, 2, %g2
20030b4: d2 00 40 02 ld [ %g1 + %g2 ], %o1
20030b8: 90 10 00 18 mov %i0, %o0
20030bc: 40 00 23 b2 call 200bf84 <IMFS_create_node_with_control>
20030c0: 9a 07 bf e0 add %fp, -32, %o5
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 ) {
20030c4: 80 a2 20 00 cmp %o0, 0
20030c8: 02 80 00 0e be 2003100 <IMFS_mknod+0xa8>
20030cc: 82 10 3f ff mov -1, %g1
IMFS_jnode_t *parent = parentloc->node_access;
20030d0: fa 06 20 08 ld [ %i0 + 8 ], %i5
IMFS_update_ctime( parent );
20030d4: 92 10 20 00 clr %o1
20030d8: 40 00 02 03 call 20038e4 <gettimeofday>
20030dc: 90 07 bf f8 add %fp, -8, %o0
20030e0: c2 07 bf f8 ld [ %fp + -8 ], %g1
IMFS_update_mtime( parent );
20030e4: 90 07 bf f8 add %fp, -8, %o0
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 );
20030e8: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
IMFS_update_mtime( parent );
20030ec: 40 00 01 fe call 20038e4 <gettimeofday>
20030f0: 92 10 20 00 clr %o1
20030f4: c4 07 bf f8 ld [ %fp + -8 ], %g2
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
20030f8: 82 10 20 00 clr %g1
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 );
20030fc: c4 27 60 44 st %g2, [ %i5 + 0x44 ]
} else {
rv = -1;
}
return rv;
}
2003100: 81 c7 e0 08 ret
2003104: 91 e8 00 01 restore %g0, %g1, %o0
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
2003108: 80 a0 40 03 cmp %g1, %g3
200310c: 22 bf ff e5 be,a 20030a0 <IMFS_mknod+0x48>
2003110: f8 3f bf e0 std %i4, [ %fp + -32 ]
rtems_filesystem_split_dev_t(
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
2003114: 07 00 00 04 sethi %hi(0x1000), %g3
2003118: 80 a0 40 03 cmp %g1, %g3
200311c: 22 bf ff e2 be,a 20030a4 <IMFS_mknod+0x4c> <== ALWAYS TAKEN
2003120: 84 10 20 06 mov 6, %g2
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
2003124: 10 bf ff e1 b 20030a8 <IMFS_mknod+0x50> <== NOT EXECUTED
2003128: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
)
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
200312c: 10 bf ff de b 20030a4 <IMFS_mknod+0x4c>
2003130: 84 10 20 04 mov 4, %g2
02003134 <IMFS_mount>:
#endif
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
2003134: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
2003138: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200313c: c2 00 60 08 ld [ %g1 + 8 ], %g1
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
2003140: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
if ( IMFS_is_directory( node ) ) {
2003144: c4 00 80 00 ld [ %g2 ], %g2
2003148: 80 a0 a0 00 cmp %g2, 0
200314c: 12 80 00 0f bne 2003188 <IMFS_mount+0x54>
2003150: 01 00 00 00 nop
if ( node->info.directory.mt_fs == NULL ) {
2003154: c4 00 60 5c ld [ %g1 + 0x5c ], %g2
2003158: 80 a0 a0 00 cmp %g2, 0
200315c: 12 80 00 05 bne 2003170 <IMFS_mount+0x3c> <== NEVER TAKEN
2003160: 01 00 00 00 nop
node->info.directory.mt_fs = mt_entry;
2003164: f0 20 60 5c st %i0, [ %g1 + 0x5c ]
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
2003168: 81 c7 e0 08 ret
200316c: 91 e8 20 00 restore %g0, 0, %o0
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == NULL ) {
node->info.directory.mt_fs = mt_entry;
} else {
errno = EBUSY;
2003170: 40 00 31 84 call 200f780 <__errno> <== NOT EXECUTED
2003174: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003178: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED
200317c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003180: 81 c7 e0 08 ret <== NOT EXECUTED
2003184: 81 e8 00 00 restore <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
2003188: 40 00 31 7e call 200f780 <__errno>
200318c: b0 10 3f ff mov -1, %i0
2003190: 82 10 20 14 mov 0x14, %g1
2003194: c2 22 00 00 st %g1, [ %o0 ]
rv = -1;
}
return rv;
}
2003198: 81 c7 e0 08 ret
200319c: 81 e8 00 00 restore
0200c3e0 <IMFS_node_remove_directory>:
static IMFS_jnode_t *IMFS_node_remove_directory(
IMFS_jnode_t *node,
const IMFS_jnode_t *root_node
)
{
200c3e0: 9d e3 bf a0 save %sp, -96, %sp
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
200c3e4: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c3e8: 82 06 20 54 add %i0, 0x54, %g1
200c3ec: 80 a0 80 01 cmp %g2, %g1
200c3f0: 12 80 00 10 bne 200c430 <IMFS_node_remove_directory+0x50>
200c3f4: 80 a6 00 19 cmp %i0, %i1
errno = ENOTEMPTY;
node = NULL;
} else if ( node == root_node || IMFS_is_mount_point( node ) ) {
200c3f8: 02 80 00 08 be 200c418 <IMFS_node_remove_directory+0x38>
200c3fc: 01 00 00 00 nop
200c400: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
200c404: 80 a0 60 00 cmp %g1, 0
200c408: 12 80 00 04 bne 200c418 <IMFS_node_remove_directory+0x38> <== NEVER TAKEN
200c40c: 01 00 00 00 nop
errno = EBUSY;
node = NULL;
}
return node;
}
200c410: 81 c7 e0 08 ret
200c414: 81 e8 00 00 restore
{
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
errno = ENOTEMPTY;
node = NULL;
} else if ( node == root_node || IMFS_is_mount_point( node ) ) {
errno = EBUSY;
200c418: 40 00 0c da call 200f780 <__errno>
200c41c: b0 10 20 00 clr %i0
200c420: 82 10 20 10 mov 0x10, %g1
200c424: c2 22 00 00 st %g1, [ %o0 ]
node = NULL;
}
return node;
}
200c428: 81 c7 e0 08 ret
200c42c: 81 e8 00 00 restore
IMFS_jnode_t *node,
const IMFS_jnode_t *root_node
)
{
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
errno = ENOTEMPTY;
200c430: 40 00 0c d4 call 200f780 <__errno>
200c434: b0 10 20 00 clr %i0
200c438: 82 10 20 5a mov 0x5a, %g1
200c43c: c2 22 00 00 st %g1, [ %o0 ]
200c440: 81 c7 e0 08 ret
200c444: 81 e8 00 00 restore
020031e0 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
20031e0: c8 02 20 08 ld [ %o0 + 8 ], %g4
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20031e4: 80 a2 a0 00 cmp %o2, 0
20031e8: 02 80 00 13 be 2003234 <IMFS_readlink+0x54> <== NEVER TAKEN
20031ec: 90 10 20 00 clr %o0
20031f0: c2 01 20 50 ld [ %g4 + 0x50 ], %g1
20031f4: c4 48 40 00 ldsb [ %g1 ], %g2
20031f8: 80 a0 a0 00 cmp %g2, 0
20031fc: 02 80 00 0e be 2003234 <IMFS_readlink+0x54> <== NEVER TAKEN
2003200: c2 08 40 00 ldub [ %g1 ], %g1
2003204: 10 80 00 07 b 2003220 <IMFS_readlink+0x40>
2003208: 84 10 20 00 clr %g2
200320c: c2 01 20 50 ld [ %g4 + 0x50 ], %g1
2003210: c6 48 40 08 ldsb [ %g1 + %o0 ], %g3
2003214: 80 a0 e0 00 cmp %g3, 0
2003218: 02 80 00 07 be 2003234 <IMFS_readlink+0x54>
200321c: c2 08 40 08 ldub [ %g1 + %o0 ], %g1
buf[i] = node->info.sym_link.name[i];
2003220: c2 2a 40 02 stb %g1, [ %o1 + %g2 ]
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
2003224: 90 02 20 01 inc %o0
2003228: 80 a2 00 0a cmp %o0, %o2
200322c: 12 bf ff f8 bne 200320c <IMFS_readlink+0x2c>
2003230: 84 10 00 08 mov %o0, %g2
buf[i] = node->info.sym_link.name[i];
return i;
}
2003234: 81 c3 e0 08 retl
0200323c <IMFS_rename>:
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
200323c: 9d e3 bf 98 save %sp, -104, %sp
int rv = 0;
IMFS_jnode_t *node = oldloc->node_access;
2003240: fa 06 60 08 ld [ %i1 + 8 ], %i5
/*
* FIXME: Due to insufficient checks we can create inaccessible nodes with
* this operation.
*/
if ( node->Parent != NULL ) {
2003244: c2 07 60 08 ld [ %i5 + 8 ], %g1
2003248: 80 a0 60 00 cmp %g1, 0
200324c: 02 80 00 22 be 20032d4 <IMFS_rename+0x98> <== NEVER TAKEN
2003250: f4 06 a0 08 ld [ %i2 + 8 ], %i2
if ( namelen < IMFS_NAME_MAX ) {
2003254: 80 a7 20 1f cmp %i4, 0x1f
2003258: 18 80 00 19 bgu 20032bc <IMFS_rename+0x80> <== NEVER TAKEN
200325c: 94 10 00 1c mov %i4, %o2
memcpy( node->name, name, namelen );
2003260: 92 10 00 1b mov %i3, %o1
2003264: 40 00 33 a3 call 20100f0 <memcpy>
2003268: 90 07 60 0c add %i5, 0xc, %o0
node->name [namelen] = '\0';
200326c: b8 07 40 1c add %i5, %i4, %i4
2003270: c0 2f 20 0c clrb [ %i4 + 0xc ]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
2003274: c2 07 60 04 ld [ %i5 + 4 ], %g1
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2003278: c4 07 40 00 ld [ %i5 ], %g2
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
200327c: 86 06 a0 54 add %i2, 0x54, %g3
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2003280: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
2003284: c4 20 40 00 st %g2, [ %g1 ]
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
2003288: c2 06 a0 58 ld [ %i2 + 0x58 ], %g1
static inline void IMFS_add_to_directory(
IMFS_jnode_t *dir,
IMFS_jnode_t *node
)
{
node->Parent = dir;
200328c: f4 27 60 08 st %i2, [ %i5 + 8 ]
the_node->next = tail;
2003290: c6 27 40 00 st %g3, [ %i5 ]
tail->previous = the_node;
2003294: fa 26 a0 58 st %i5, [ %i2 + 0x58 ]
old_last->next = the_node;
2003298: fa 20 40 00 st %i5, [ %g1 ]
the_node->previous = old_last;
200329c: c2 27 60 04 st %g1, [ %i5 + 4 ]
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
20032a0: 90 07 bf f8 add %fp, -8, %o0
20032a4: 40 00 01 90 call 20038e4 <gettimeofday>
20032a8: 92 10 20 00 clr %o1
20032ac: c2 07 bf f8 ld [ %fp + -8 ], %g1
20032b0: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
int rv = 0;
20032b4: 81 c7 e0 08 ret
20032b8: 91 e8 20 00 restore %g0, 0, %o0
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
} else {
errno = ENAMETOOLONG;
20032bc: 40 00 31 31 call 200f780 <__errno> <== NOT EXECUTED
20032c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20032c4: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
20032c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20032cc: 81 c7 e0 08 ret <== NOT EXECUTED
20032d0: 81 e8 00 00 restore <== NOT EXECUTED
rv = -1;
}
} else {
errno = EINVAL;
20032d4: 40 00 31 2b call 200f780 <__errno> <== NOT EXECUTED
20032d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20032dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20032e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
20032e4: 81 c7 e0 08 ret <== NOT EXECUTED
20032e8: 81 e8 00 00 restore <== NOT EXECUTED
020033e8 <IMFS_unmount>:
#endif
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
20033e8: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
20033ec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
20033f0: c2 00 60 08 ld [ %g1 + 8 ], %g1
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
20033f4: c4 00 60 4c ld [ %g1 + 0x4c ], %g2
if ( IMFS_is_directory( node ) ) {
20033f8: c4 00 80 00 ld [ %g2 ], %g2
20033fc: 80 a0 a0 00 cmp %g2, 0
2003400: 12 80 00 0f bne 200343c <IMFS_unmount+0x54> <== NEVER TAKEN
2003404: 01 00 00 00 nop
if ( node->info.directory.mt_fs == mt_entry ) {
2003408: c4 00 60 5c ld [ %g1 + 0x5c ], %g2
200340c: 80 a0 80 18 cmp %g2, %i0
2003410: 12 80 00 05 bne 2003424 <IMFS_unmount+0x3c> <== NEVER TAKEN
2003414: 01 00 00 00 nop
node->info.directory.mt_fs = NULL;
2003418: c0 20 60 5c clr [ %g1 + 0x5c ]
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
200341c: 81 c7 e0 08 ret
2003420: 91 e8 20 00 restore %g0, 0, %o0
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == mt_entry ) {
node->info.directory.mt_fs = NULL;
} else {
errno = EINVAL;
2003424: 40 00 30 d7 call 200f780 <__errno> <== NOT EXECUTED
2003428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200342c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003430: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003434: 81 c7 e0 08 ret <== NOT EXECUTED
2003438: 81 e8 00 00 restore <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
200343c: 40 00 30 d1 call 200f780 <__errno> <== NOT EXECUTED
2003440: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003444: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2003448: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
200344c: 81 c7 e0 08 ret <== NOT EXECUTED
2003450: 81 e8 00 00 restore <== NOT EXECUTED
02003b08 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
2003b08: 9d e3 bf a0 save %sp, -96, %sp
bool separate_areas = !rtems_configuration_get_unified_work_area();
2003b0c: 3b 00 80 71 sethi %hi(0x201c400), %i5
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
2003b10: 03 00 80 73 sethi %hi(0x201cc00), %g1
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
bool separate_areas = !rtems_configuration_get_unified_work_area();
2003b14: ba 17 62 4c or %i5, 0x24c, %i5
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
2003b18: c2 00 62 98 ld [ %g1 + 0x298 ], %g1
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
bool separate_areas = !rtems_configuration_get_unified_work_area();
2003b1c: f6 0f 60 31 ldub [ %i5 + 0x31 ], %i3
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
2003b20: 80 a0 60 00 cmp %g1, 0
2003b24: 02 80 00 05 be 2003b38 <RTEMS_Malloc_Initialize+0x30>
2003b28: b6 1e e0 01 xor %i3, 1, %i3
(*rtems_malloc_statistics_helpers->initialize)();
2003b2c: c2 00 40 00 ld [ %g1 ], %g1
2003b30: 9f c0 40 00 call %g1
2003b34: 01 00 00 00 nop
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
2003b38: 7f ff ff da call 2003aa0 <malloc_deferred_frees_initialize>
2003b3c: 01 00 00 00 nop
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
2003b40: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003b44: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201ce94 <rtems_malloc_sbrk_helpers>
2003b48: 80 a0 60 00 cmp %g1, 0
2003b4c: 02 80 00 08 be 2003b6c <RTEMS_Malloc_Initialize+0x64>
2003b50: 90 10 00 18 mov %i0, %o0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2003b54: c2 00 40 00 ld [ %g1 ], %g1
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2003b58: b2 06 00 19 add %i0, %i1, %i1
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2003b5c: 9f c0 40 00 call %g1
2003b60: 92 10 00 1a mov %i2, %o1
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
heap_begin = new_heap_begin;
2003b64: b0 10 00 08 mov %o0, %i0
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2003b68: b2 26 40 08 sub %i1, %o0, %i1
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) {
2003b6c: 80 8e e0 ff btst 0xff, %i3
2003b70: 02 80 00 0d be 2003ba4 <RTEMS_Malloc_Initialize+0x9c>
2003b74: 39 00 80 71 sethi %hi(0x201c400), %i4
2003b78: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
2003b7c: 80 a0 60 00 cmp %g1, 0
2003b80: 12 80 00 11 bne 2003bc4 <RTEMS_Malloc_Initialize+0xbc>
2003b84: d0 07 23 38 ld [ %i4 + 0x338 ], %o0
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
2003b88: 92 10 00 18 mov %i0, %o1
2003b8c: 94 10 00 19 mov %i1, %o2
2003b90: 40 00 14 eb call 2008f3c <_Heap_Initialize>
2003b94: 96 10 20 08 mov 8, %o3
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
2003b98: 80 a2 20 00 cmp %o0, 0
2003b9c: 02 80 00 17 be 2003bf8 <RTEMS_Malloc_Initialize+0xf0>
2003ba0: 01 00 00 00 nop
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
2003ba4: 3b 00 80 74 sethi %hi(0x201d000), %i5
2003ba8: d0 07 23 38 ld [ %i4 + 0x338 ], %o0
2003bac: 40 00 17 e5 call 2009b40 <_Protected_heap_Get_size>
2003bb0: f8 07 62 50 ld [ %i5 + 0x250 ], %i4
2003bb4: b8 02 00 1c add %o0, %i4, %i4
2003bb8: f8 27 62 50 st %i4, [ %i5 + 0x250 ]
}
2003bbc: 81 c7 e0 08 ret
2003bc0: 81 e8 00 00 restore
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( separate_areas && rtems_configuration_get_do_zero_of_workspace() ) {
memset( heap_begin, 0, heap_size );
2003bc4: 92 10 20 00 clr %o1
2003bc8: 94 10 00 19 mov %i1, %o2
2003bcc: 40 00 31 85 call 20101e0 <memset>
2003bd0: 90 10 00 18 mov %i0, %o0
2003bd4: 39 00 80 71 sethi %hi(0x201c400), %i4
2003bd8: d0 07 23 38 ld [ %i4 + 0x338 ], %o0 ! 201c738 <RTEMS_Malloc_Heap>
2003bdc: 92 10 00 18 mov %i0, %o1
2003be0: 94 10 00 19 mov %i1, %o2
2003be4: 40 00 14 d6 call 2008f3c <_Heap_Initialize>
2003be8: 96 10 20 08 mov 8, %o3
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
2003bec: 80 a2 20 00 cmp %o0, 0
2003bf0: 12 bf ff ee bne 2003ba8 <RTEMS_Malloc_Initialize+0xa0> <== ALWAYS TAKEN
2003bf4: 3b 00 80 74 sethi %hi(0x201d000), %i5
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
2003bf8: 40 00 12 0f call 2008434 <rtems_fatal_error_occurred>
2003bfc: 90 10 20 1a mov 0x1a, %o0
020072ec <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
20072ec: 9d e3 bf 98 save %sp, -104, %sp
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
20072f0: 80 a6 3f ff cmp %i0, -1
20072f4: 02 80 00 5d be 2007468 <Stack_check_Dump_threads_usage+0x17c>
20072f8: b6 06 20 b0 add %i0, 0xb0, %i3
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
20072fc: e0 06 21 38 ld [ %i0 + 0x138 ], %l0
2007300: f4 06 20 b4 ld [ %i0 + 0xb4 ], %i2
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
2007304: f8 06 c0 00 ld [ %i3 ], %i4
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
2007308: 82 06 a0 20 add %i2, 0x20, %g1
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);
200730c: b8 07 3f f0 add %i4, -16, %i4
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
2007310: 86 0f 3f fc and %i4, -4, %g3
2007314: 86 00 40 03 add %g1, %g3, %g3
2007318: 80 a0 40 03 cmp %g1, %g3
200731c: 1a 80 00 12 bcc 2007364 <Stack_check_Dump_threads_usage+0x78><== NEVER TAKEN
2007320: ba 10 20 00 clr %i5
if (*base != U32_PATTERN)
2007324: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4
2007328: 05 29 69 69 sethi %hi(0xa5a5a400), %g2
200732c: 84 10 a1 a5 or %g2, 0x1a5, %g2 ! a5a5a5a5 <RAM_END+0xa365a5a5>
2007330: 80 a1 00 02 cmp %g4, %g2
2007334: 22 80 00 08 be,a 2007354 <Stack_check_Dump_threads_usage+0x68><== ALWAYS TAKEN
2007338: 82 00 60 04 add %g1, 4, %g1
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 )
200733c: 10 80 00 36 b 2007414 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
2007340: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
2007344: 80 a0 80 04 cmp %g2, %g4
2007348: 12 80 00 32 bne 2007410 <Stack_check_Dump_threads_usage+0x124>
200734c: ba 10 20 00 clr %i5
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
2007350: 82 00 60 04 add %g1, 4, %g1
2007354: 80 a0 c0 01 cmp %g3, %g1
2007358: 38 bf ff fb bgu,a 2007344 <Stack_check_Dump_threads_usage+0x58><== ALWAYS TAKEN
200735c: c4 00 40 00 ld [ %g1 ], %g2
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;
2007360: ba 10 20 00 clr %i5 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
2007364: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2007368: 02 80 00 32 be 2007430 <Stack_check_Dump_threads_usage+0x144><== NOT EXECUTED
200736c: 33 00 81 c4 sethi %hi(0x2071000), %i1 <== NOT EXECUTED
#endif
{
(*print_handler)(
2007370: e2 06 20 08 ld [ %i0 + 8 ], %l1
2007374: 35 00 81 c4 sethi %hi(0x2071000), %i2
2007378: 33 00 81 c4 sethi %hi(0x2071000), %i1
200737c: e4 06 a0 7c ld [ %i2 + 0x7c ], %l2
2007380: f0 06 60 80 ld [ %i1 + 0x80 ], %i0
2007384: 94 07 bf f8 add %fp, -8, %o2
2007388: 92 10 20 05 mov 5, %o1
200738c: 40 00 19 3b call 200d878 <rtems_object_get_name>
2007390: 90 10 00 11 mov %l1, %o0
2007394: 13 00 81 8f sethi %hi(0x2063c00), %o1
2007398: 96 10 00 08 mov %o0, %o3
200739c: 94 10 00 11 mov %l1, %o2
20073a0: 90 10 00 12 mov %l2, %o0
20073a4: 9f c6 00 00 call %i0
20073a8: 92 12 61 60 or %o1, 0x160, %o1
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
20073ac: d4 06 e0 04 ld [ %i3 + 4 ], %o2
20073b0: d6 06 c0 00 ld [ %i3 ], %o3
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
20073b4: c2 06 60 80 ld [ %i1 + 0x80 ], %g1
20073b8: d0 06 a0 7c ld [ %i2 + 0x7c ], %o0
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
20073bc: 96 02 ff ff add %o3, -1, %o3
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
20073c0: 13 00 81 8f sethi %hi(0x2063c00), %o1
20073c4: 96 02 80 0b add %o2, %o3, %o3
20073c8: 92 12 61 80 or %o1, 0x180, %o1
20073cc: 98 10 00 10 mov %l0, %o4
20073d0: 9f c0 40 00 call %g1
20073d4: 9a 10 00 1c mov %i4, %o5
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20073d8: 03 00 81 c4 sethi %hi(0x2071000), %g1
20073dc: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 2071078 <Stack_check_Initialized>
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
20073e0: 07 00 81 c4 sethi %hi(0x2071000), %g3
20073e4: 05 00 81 c4 sethi %hi(0x2071000), %g2
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20073e8: 80 a0 60 00 cmp %g1, 0
(*print_handler)( print_context, "Unavailable\n" );
20073ec: d0 00 a0 7c ld [ %g2 + 0x7c ], %o0
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
20073f0: 02 80 00 19 be 2007454 <Stack_check_Dump_threads_usage+0x168><== NEVER TAKEN
20073f4: c2 00 e0 80 ld [ %g3 + 0x80 ], %g1
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
20073f8: 94 10 00 1d mov %i5, %o2
20073fc: 13 00 81 8f sethi %hi(0x2063c00), %o1
2007400: 9f c0 40 00 call %g1
2007404: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 2063db0 <write_block_string.8456+0x5c8>
2007408: 81 c7 e0 08 ret
200740c: 81 e8 00 00 restore
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 )
2007410: 80 a0 60 00 cmp %g1, 0
2007414: 02 bf ff d4 be 2007364 <Stack_check_Dump_threads_usage+0x78><== NEVER TAKEN
2007418: 80 a6 20 00 cmp %i0, 0
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
200741c: ba 06 a0 10 add %i2, 0x10, %i5
size = Stack_check_usable_stack_size(stack);
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 );
2007420: ba 07 40 1c add %i5, %i4, %i5
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
2007424: 12 bf ff d3 bne 2007370 <Stack_check_Dump_threads_usage+0x84>
2007428: ba 27 40 01 sub %i5, %g1, %i5
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
200742c: 33 00 81 c4 sethi %hi(0x2071000), %i1
2007430: 35 00 81 c4 sethi %hi(0x2071000), %i2
2007434: c2 06 60 80 ld [ %i1 + 0x80 ], %g1
2007438: d0 06 a0 7c ld [ %i2 + 0x7c ], %o0
200743c: 94 10 3f ff mov -1, %o2
2007440: 13 00 81 8f sethi %hi(0x2063c00), %o1
2007444: 9f c0 40 00 call %g1
2007448: 92 12 61 70 or %o1, 0x170, %o1 ! 2063d70 <write_block_string.8456+0x588>
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
200744c: 10 bf ff d9 b 20073b0 <Stack_check_Dump_threads_usage+0xc4>
2007450: d4 06 e0 04 ld [ %i3 + 4 ], %o2
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
2007454: 13 00 81 8f sethi %hi(0x2063c00), %o1 <== NOT EXECUTED
2007458: 9f c0 40 00 call %g1 <== NOT EXECUTED
200745c: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 2063da0 <write_block_string.8456+0x5b8><== NOT EXECUTED
2007460: 81 c7 e0 08 ret <== NOT EXECUTED
2007464: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
2007468: 37 00 81 cf sethi %hi(0x2073c00), %i3
200746c: b6 16 e1 e4 or %i3, 0x1e4, %i3 ! 2073de4 <Stack_check_Interrupt_stack>
2007470: f4 06 e0 04 ld [ %i3 + 4 ], %i2
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
2007474: a0 10 20 00 clr %l0
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
2007478: 80 a6 a0 00 cmp %i2, 0
200747c: 12 bf ff a2 bne 2007304 <Stack_check_Dump_threads_usage+0x18><== ALWAYS TAKEN
2007480: b0 10 20 00 clr %i0
2007484: 81 c7 e0 08 ret <== NOT EXECUTED
2007488: 81 e8 00 00 restore <== NOT EXECUTED
02007584 <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)
{
2007584: 9d e3 bf 80 save %sp, -128, %sp
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
2007588: 11 00 81 8f sethi %hi(0x2063c00), %o0
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
200758c: fa 06 20 b4 ld [ %i0 + 0xb4 ], %i5
char name[32];
printk("BLOWN STACK!!!\n");
2007590: 40 00 0a 9d call 200a004 <printk>
2007594: 90 12 21 b8 or %o0, 0x1b8, %o0
printk("task control block: 0x%08" PRIxPTR "\n", running);
2007598: 92 10 00 18 mov %i0, %o1
200759c: 11 00 81 8f sethi %hi(0x2063c00), %o0
20075a0: 40 00 0a 99 call 200a004 <printk>
20075a4: 90 12 21 c8 or %o0, 0x1c8, %o0 ! 2063dc8 <write_block_string.8456+0x5e0>
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
20075a8: d2 06 20 08 ld [ %i0 + 8 ], %o1
20075ac: 11 00 81 8f sethi %hi(0x2063c00), %o0
20075b0: 40 00 0a 95 call 200a004 <printk>
20075b4: 90 12 21 e8 or %o0, 0x1e8, %o0 ! 2063de8 <write_block_string.8456+0x600>
printk(
20075b8: d2 06 20 0c ld [ %i0 + 0xc ], %o1
20075bc: 11 00 81 8f sethi %hi(0x2063c00), %o0
20075c0: 40 00 0a 91 call 200a004 <printk>
20075c4: 90 12 22 00 or %o0, 0x200, %o0 ! 2063e00 <write_block_string.8456+0x618>
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
20075c8: d0 06 20 08 ld [ %i0 + 8 ], %o0
20075cc: 94 07 bf e0 add %fp, -32, %o2
20075d0: 40 00 18 aa call 200d878 <rtems_object_get_name>
20075d4: 92 10 20 20 mov 0x20, %o1
20075d8: 92 10 00 08 mov %o0, %o1
20075dc: 11 00 81 8f sethi %hi(0x2063c00), %o0
20075e0: 40 00 0a 89 call 200a004 <printk>
20075e4: 90 12 22 18 or %o0, 0x218, %o0 ! 2063e18 <write_block_string.8456+0x630>
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
20075e8: d4 06 20 b4 ld [ %i0 + 0xb4 ], %o2
20075ec: d2 06 20 b0 ld [ %i0 + 0xb0 ], %o1
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
20075f0: 11 00 81 8f sethi %hi(0x2063c00), %o0
20075f4: 96 02 80 09 add %o2, %o1, %o3
20075f8: 40 00 0a 83 call 200a004 <printk>
20075fc: 90 12 22 30 or %o0, 0x230, %o0
"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) {
2007600: 80 a6 60 00 cmp %i1, 0
2007604: 02 80 00 04 be 2007614 <Stack_check_report_blown_task+0x90><== ALWAYS TAKEN
2007608: 92 10 20 10 mov 0x10, %o1
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
200760c: 40 00 1b 7c call 200e3fc <rtems_fatal_error_occurred>
2007610: 90 10 20 81 mov 0x81, %o0
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
2007614: 11 00 81 8f sethi %hi(0x2063c00), %o0
2007618: 94 07 60 08 add %i5, 8, %o2
200761c: 90 12 22 68 or %o0, 0x268, %o0
2007620: 40 00 0a 79 call 200a004 <printk>
2007624: 96 07 60 18 add %i5, 0x18, %o3
2007628: 30 bf ff f9 b,a 200760c <Stack_check_report_blown_task+0x88>
02008608 <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2008608: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200860c: 39 00 80 75 sethi %hi(0x201d400), %i4
2008610: fa 07 21 a4 ld [ %i4 + 0x1a4 ], %i5 ! 201d5a4 <_API_extensions_List>
2008614: b8 17 21 a4 or %i4, 0x1a4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2008618: b8 07 20 04 add %i4, 4, %i4
200861c: 80 a7 40 1c cmp %i5, %i4
2008620: 02 80 00 09 be 2008644 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
2008624: 01 00 00 00 nop
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
2008628: c2 07 60 08 ld [ %i5 + 8 ], %g1
200862c: 9f c0 40 00 call %g1
2008630: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008634: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2008638: 80 a7 40 1c cmp %i5, %i4
200863c: 32 bf ff fc bne,a 200862c <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
2008640: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
2008644: 81 c7 e0 08 ret
2008648: 81 e8 00 00 restore
0200864c <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
200864c: 9d e3 bf a0 save %sp, -96, %sp
2008650: 39 00 80 75 sethi %hi(0x201d400), %i4
2008654: fa 07 21 a4 ld [ %i4 + 0x1a4 ], %i5 ! 201d5a4 <_API_extensions_List>
2008658: b8 17 21 a4 or %i4, 0x1a4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
200865c: b8 07 20 04 add %i4, 4, %i4
2008660: 80 a7 40 1c cmp %i5, %i4
2008664: 02 80 00 0a be 200868c <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
2008668: 37 00 80 75 sethi %hi(0x201d400), %i3
200866c: b6 16 e1 e0 or %i3, 0x1e0, %i3 ! 201d5e0 <_Per_CPU_Information>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
2008670: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2008674: 9f c0 40 00 call %g1
2008678: d0 06 e0 0c ld [ %i3 + 0xc ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
200867c: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2008680: 80 a7 40 1c cmp %i5, %i4
2008684: 32 bf ff fc bne,a 2008674 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN
2008688: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
200868c: 81 c7 e0 08 ret
2008690: 81 e8 00 00 restore
02011998 <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
2011998: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
201199c: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
20119a0: f4 26 20 44 st %i2, [ %i0 + 0x44 ]
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
20119a4: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
20119a8: 80 8e e0 03 btst 3, %i3
20119ac: 02 80 00 0a be 20119d4 <_CORE_message_queue_Initialize+0x3c>
20119b0: b8 10 00 1b mov %i3, %i4
allocated_message_size += sizeof(uint32_t);
20119b4: b8 06 e0 04 add %i3, 4, %i4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
20119b8: b8 0f 3f fc and %i4, -4, %i4
}
if (allocated_message_size < maximum_message_size)
20119bc: 80 a6 c0 1c cmp %i3, %i4
20119c0: 08 80 00 05 bleu 20119d4 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN
20119c4: ba 10 20 00 clr %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
20119c8: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED
20119cc: 81 c7 e0 08 ret
20119d0: 81 e8 00 00 restore
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
20119d4: b8 07 20 10 add %i4, 0x10, %i4
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
20119d8: 90 10 20 00 clr %o0
20119dc: 92 10 00 1a mov %i2, %o1
20119e0: 94 10 20 00 clr %o2
20119e4: 96 10 00 1c mov %i4, %o3
20119e8: 40 00 41 60 call 2021f68 <__muldi3>
20119ec: ba 10 20 00 clr %i5
if ( x > SIZE_MAX )
20119f0: 80 a2 20 00 cmp %o0, 0
20119f4: 34 bf ff f6 bg,a 20119cc <_CORE_message_queue_Initialize+0x34>
20119f8: b0 0f 60 01 and %i5, 1, %i0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
20119fc: 40 00 0c a7 call 2014c98 <_Workspace_Allocate>
2011a00: 90 10 00 09 mov %o1, %o0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
2011a04: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
2011a08: 80 a2 20 00 cmp %o0, 0
2011a0c: 02 bf ff ef be 20119c8 <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN
2011a10: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
2011a14: 90 06 20 60 add %i0, 0x60, %o0
2011a18: 94 10 00 1a mov %i2, %o2
2011a1c: 7f ff ff c5 call 2011930 <_Chain_Initialize>
2011a20: 96 10 00 1c mov %i4, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2011a24: c4 06 40 00 ld [ %i1 ], %g2
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 );
2011a28: 82 06 20 50 add %i0, 0x50, %g1
2011a2c: 84 18 a0 01 xor %g2, 1, %g2
2011a30: 80 a0 00 02 cmp %g0, %g2
2011a34: 84 06 20 54 add %i0, 0x54, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2011a38: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2011a3c: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
2011a40: 90 10 00 18 mov %i0, %o0
head->previous = NULL;
2011a44: c0 26 20 54 clr [ %i0 + 0x54 ]
2011a48: 92 60 3f ff subx %g0, -1, %o1
2011a4c: 94 10 20 80 mov 0x80, %o2
2011a50: 96 10 20 06 mov 6, %o3
2011a54: 40 00 0a 3a call 201433c <_Thread_queue_Initialize>
2011a58: ba 10 20 01 mov 1, %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2011a5c: b0 0f 60 01 and %i5, 1, %i0
2011a60: 81 c7 e0 08 ret
2011a64: 81 e8 00 00 restore
02008bf0 <_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
)
{
2008bf0: 9d e3 bf a0 save %sp, -96, %sp
2008bf4: ba 10 00 18 mov %i0, %i5
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008bf8: b0 10 20 00 clr %i0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
2008bfc: 40 00 07 c9 call 200ab20 <_Thread_queue_Dequeue>
2008c00: 90 10 00 1d mov %i5, %o0
2008c04: 80 a2 20 00 cmp %o0, 0
2008c08: 02 80 00 04 be 2008c18 <_CORE_semaphore_Surrender+0x28>
2008c0c: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
2008c10: 81 c7 e0 08 ret
2008c14: 81 e8 00 00 restore
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
2008c18: 7f ff e6 a8 call 20026b8 <sparc_disable_interrupts>
2008c1c: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
2008c20: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2008c24: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
2008c28: 80 a0 40 02 cmp %g1, %g2
2008c2c: 1a 80 00 05 bcc 2008c40 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN
2008c30: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2008c34: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008c38: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
2008c3c: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
2008c40: 7f ff e6 a2 call 20026c8 <sparc_enable_interrupts>
2008c44: 01 00 00 00 nop
}
return status;
}
2008c48: 81 c7 e0 08 ret
2008c4c: 81 e8 00 00 restore
020087e0 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
20087e0: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
20087e4: c0 26 20 04 clr [ %i0 + 4 ]
size_t node_size
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
20087e8: ba 06 20 04 add %i0, 4, %i5
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
20087ec: 80 a6 a0 00 cmp %i2, 0
20087f0: 02 80 00 12 be 2008838 <_Chain_Initialize+0x58> <== NEVER TAKEN
20087f4: 90 10 00 18 mov %i0, %o0
20087f8: b4 06 bf ff add %i2, -1, %i2
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
20087fc: 82 10 00 19 mov %i1, %g1
head->previous = NULL;
while ( count-- ) {
2008800: 92 10 00 1a mov %i2, %o1
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
2008804: 10 80 00 05 b 2008818 <_Chain_Initialize+0x38>
2008808: 84 10 00 18 mov %i0, %g2
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200880c: 84 10 00 01 mov %g1, %g2
2008810: b4 06 bf ff add %i2, -1, %i2
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
2008814: 82 10 00 03 mov %g3, %g1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
2008818: c2 20 80 00 st %g1, [ %g2 ]
next->previous = current;
200881c: c4 20 60 04 st %g2, [ %g1 + 4 ]
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
2008820: 80 a6 a0 00 cmp %i2, 0
2008824: 12 bf ff fa bne 200880c <_Chain_Initialize+0x2c>
2008828: 86 00 40 1b add %g1, %i3, %g3
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
200882c: 40 00 3f 83 call 2018638 <.umul>
2008830: 90 10 00 1b mov %i3, %o0
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
2008834: 90 06 40 08 add %i1, %o0, %o0
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
2008838: fa 22 00 00 st %i5, [ %o0 ]
tail->previous = current;
200883c: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
2008840: 81 c7 e0 08 ret
2008844: 81 e8 00 00 restore
0200788c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
200788c: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2007890: fa 06 21 50 ld [ %i0 + 0x150 ], %i5
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2007894: 7f ff eb 89 call 20026b8 <sparc_disable_interrupts>
2007898: f8 06 20 30 ld [ %i0 + 0x30 ], %i4
pending_events = api->pending_events;
200789c: c4 07 40 00 ld [ %i5 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
20078a0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
20078a4: 86 88 40 02 andcc %g1, %g2, %g3
20078a8: 02 80 00 39 be 200798c <_Event_Surrender+0x100>
20078ac: 09 00 80 75 sethi %hi(0x201d400), %g4
/*
* 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() &&
20078b0: 88 11 21 e0 or %g4, 0x1e0, %g4 ! 201d5e0 <_Per_CPU_Information>
20078b4: f2 01 20 08 ld [ %g4 + 8 ], %i1
20078b8: 80 a6 60 00 cmp %i1, 0
20078bc: 32 80 00 1c bne,a 200792c <_Event_Surrender+0xa0>
20078c0: c8 01 20 0c ld [ %g4 + 0xc ], %g4
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
20078c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
20078c8: 80 89 21 00 btst 0x100, %g4
20078cc: 02 80 00 30 be 200798c <_Event_Surrender+0x100>
20078d0: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
20078d4: 02 80 00 04 be 20078e4 <_Event_Surrender+0x58>
20078d8: 80 8f 20 02 btst 2, %i4
20078dc: 02 80 00 2c be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN
20078e0: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20078e4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
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) );
20078e8: 84 28 80 03 andn %g2, %g3, %g2
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
20078ec: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
20078f0: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20078f4: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
20078f8: 7f ff eb 74 call 20026c8 <sparc_enable_interrupts>
20078fc: 01 00 00 00 nop
2007900: 7f ff eb 6e call 20026b8 <sparc_disable_interrupts>
2007904: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
2007908: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200790c: 80 a0 60 02 cmp %g1, 2
2007910: 02 80 00 21 be 2007994 <_Event_Surrender+0x108>
2007914: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
2007918: 7f ff eb 6c call 20026c8 <sparc_enable_interrupts>
200791c: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007920: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2007924: 40 00 0a af call 200a3e0 <_Thread_Clear_state>
2007928: 81 e8 00 00 restore
/*
* 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() &&
200792c: 80 a6 00 04 cmp %i0, %g4
2007930: 32 bf ff e6 bne,a 20078c8 <_Event_Surrender+0x3c>
2007934: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2007938: 09 00 80 75 sethi %hi(0x201d400), %g4
200793c: f2 01 22 40 ld [ %g4 + 0x240 ], %i1 ! 201d640 <_Event_Sync_state>
/*
* 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 ) &&
2007940: 80 a6 60 02 cmp %i1, 2
2007944: 02 80 00 07 be 2007960 <_Event_Surrender+0xd4> <== NEVER TAKEN
2007948: 80 a0 40 03 cmp %g1, %g3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
200794c: f2 01 22 40 ld [ %g4 + 0x240 ], %i1
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2007950: 80 a6 60 01 cmp %i1, 1
2007954: 32 bf ff dd bne,a 20078c8 <_Event_Surrender+0x3c>
2007958: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
200795c: 80 a0 40 03 cmp %g1, %g3
2007960: 02 80 00 04 be 2007970 <_Event_Surrender+0xe4>
2007964: 80 8f 20 02 btst 2, %i4
2007968: 02 80 00 09 be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN
200796c: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007970: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2007974: 84 28 80 03 andn %g2, %g3, %g2
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2007978: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
200797c: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007980: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2007984: 82 10 20 03 mov 3, %g1
2007988: c2 21 22 40 st %g1, [ %g4 + 0x240 ]
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
200798c: 7f ff eb 4f call 20026c8 <sparc_enable_interrupts>
2007990: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
2007994: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
2007998: 7f ff eb 4c call 20026c8 <sparc_enable_interrupts>
200799c: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
20079a0: 40 00 0f 5b call 200b70c <_Watchdog_Remove>
20079a4: 90 06 20 48 add %i0, 0x48, %o0
20079a8: b2 16 63 f8 or %i1, 0x3f8, %i1
20079ac: 40 00 0a 8d call 200a3e0 <_Thread_Clear_state>
20079b0: 81 e8 00 00 restore
020079b4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
20079b4: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
20079b8: 90 10 00 18 mov %i0, %o0
20079bc: 40 00 0b 88 call 200a7dc <_Thread_Get>
20079c0: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20079c4: c2 07 bf fc ld [ %fp + -4 ], %g1
20079c8: 80 a0 60 00 cmp %g1, 0
20079cc: 12 80 00 16 bne 2007a24 <_Event_Timeout+0x70> <== NEVER TAKEN
20079d0: ba 10 00 08 mov %o0, %i5
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
20079d4: 7f ff eb 39 call 20026b8 <sparc_disable_interrupts>
20079d8: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
20079dc: 03 00 80 75 sethi %hi(0x201d400), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
20079e0: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 201d5ec <_Per_CPU_Information+0xc>
20079e4: 80 a7 40 01 cmp %i5, %g1
20079e8: 02 80 00 11 be 2007a2c <_Event_Timeout+0x78>
20079ec: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
20079f0: 82 10 20 06 mov 6, %g1
20079f4: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
20079f8: 7f ff eb 34 call 20026c8 <sparc_enable_interrupts>
20079fc: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007a00: 90 10 00 1d mov %i5, %o0
2007a04: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2007a08: 40 00 0a 76 call 200a3e0 <_Thread_Clear_state>
2007a0c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2007a10: 03 00 80 74 sethi %hi(0x201d000), %g1
2007a14: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level>
2007a18: 84 00 bf ff add %g2, -1, %g2
2007a1c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
2007a20: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
2007a24: 81 c7 e0 08 ret
2007a28: 81 e8 00 00 restore
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
2007a2c: 03 00 80 75 sethi %hi(0x201d400), %g1
2007a30: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 201d640 <_Event_Sync_state>
2007a34: 80 a0 a0 01 cmp %g2, 1
2007a38: 32 bf ff ef bne,a 20079f4 <_Event_Timeout+0x40>
2007a3c: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2007a40: 84 10 20 02 mov 2, %g2
2007a44: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2007a48: 10 bf ff eb b 20079f4 <_Event_Timeout+0x40>
2007a4c: 82 10 20 06 mov 6, %g1
0200d768 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
200d768: 9d e3 bf 98 save %sp, -104, %sp
200d76c: ba 10 00 18 mov %i0, %i5
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
200d770: a0 06 60 04 add %i1, 4, %l0
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
200d774: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
200d778: 80 a6 40 10 cmp %i1, %l0
200d77c: 18 80 00 23 bgu 200d808 <_Heap_Allocate_aligned_with_boundary+0xa0>
200d780: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
200d784: 80 a6 e0 00 cmp %i3, 0
200d788: 12 80 00 7d bne 200d97c <_Heap_Allocate_aligned_with_boundary+0x214>
200d78c: 80 a6 40 1b cmp %i1, %i3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200d790: e2 07 60 08 ld [ %i5 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d794: 80 a7 40 11 cmp %i5, %l1
200d798: 02 80 00 18 be 200d7f8 <_Heap_Allocate_aligned_with_boundary+0x90>
200d79c: b8 10 20 00 clr %i4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d7a0: 82 05 a0 07 add %l6, 7, %g1
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200d7a4: ae 10 20 04 mov 4, %l7
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d7a8: c2 27 bf fc st %g1, [ %fp + -4 ]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200d7ac: 10 80 00 0b b 200d7d8 <_Heap_Allocate_aligned_with_boundary+0x70>
200d7b0: ae 25 c0 19 sub %l7, %i1, %l7
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
200d7b4: 12 80 00 17 bne 200d810 <_Heap_Allocate_aligned_with_boundary+0xa8>
200d7b8: b0 04 60 08 add %l1, 8, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d7bc: 80 a6 20 00 cmp %i0, 0
200d7c0: 12 80 00 5b bne 200d92c <_Heap_Allocate_aligned_with_boundary+0x1c4>
200d7c4: b8 07 20 01 inc %i4
break;
}
block = block->next;
200d7c8: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d7cc: 80 a7 40 11 cmp %i5, %l1
200d7d0: 22 80 00 0b be,a 200d7fc <_Heap_Allocate_aligned_with_boundary+0x94>
200d7d4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
200d7d8: e4 04 60 04 ld [ %l1 + 4 ], %l2
200d7dc: 80 a4 00 12 cmp %l0, %l2
200d7e0: 0a bf ff f5 bcs 200d7b4 <_Heap_Allocate_aligned_with_boundary+0x4c>
200d7e4: 80 a6 a0 00 cmp %i2, 0
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
200d7e8: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d7ec: 80 a7 40 11 cmp %i5, %l1
200d7f0: 12 bf ff fa bne 200d7d8 <_Heap_Allocate_aligned_with_boundary+0x70>
200d7f4: b8 07 20 01 inc %i4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200d7f8: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200d7fc: 80 a0 40 1c cmp %g1, %i4
200d800: 0a 80 00 5a bcs 200d968 <_Heap_Allocate_aligned_with_boundary+0x200>
200d804: b0 10 20 00 clr %i0
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
200d808: 81 c7 e0 08 ret
200d80c: 81 e8 00 00 restore
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
200d810: c4 07 bf fc ld [ %fp + -4 ], %g2
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
200d814: ea 07 60 14 ld [ %i5 + 0x14 ], %l5
- 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;
200d818: a4 0c bf fe and %l2, -2, %l2
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
200d81c: 82 20 80 15 sub %g2, %l5, %g1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
200d820: a4 04 40 12 add %l1, %l2, %l2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d824: 92 10 00 1a mov %i2, %o1
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
200d828: b0 05 c0 12 add %l7, %l2, %i0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d82c: a4 00 40 12 add %g1, %l2, %l2
200d830: 40 00 2c 68 call 20189d0 <.urem>
200d834: 90 10 00 18 mov %i0, %o0
200d838: b0 26 00 08 sub %i0, %o0, %i0
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
200d83c: 80 a4 80 18 cmp %l2, %i0
200d840: 1a 80 00 06 bcc 200d858 <_Heap_Allocate_aligned_with_boundary+0xf0>
200d844: a8 04 60 08 add %l1, 8, %l4
200d848: 90 10 00 12 mov %l2, %o0
200d84c: 40 00 2c 61 call 20189d0 <.urem>
200d850: 92 10 00 1a mov %i2, %o1
200d854: b0 24 80 08 sub %l2, %o0, %i0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
200d858: 80 a6 e0 00 cmp %i3, 0
200d85c: 02 80 00 24 be 200d8ec <_Heap_Allocate_aligned_with_boundary+0x184>
200d860: 80 a5 00 18 cmp %l4, %i0
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
200d864: a4 06 00 19 add %i0, %i1, %l2
200d868: 92 10 00 1b mov %i3, %o1
200d86c: 40 00 2c 59 call 20189d0 <.urem>
200d870: 90 10 00 12 mov %l2, %o0
200d874: 90 24 80 08 sub %l2, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200d878: 80 a6 00 08 cmp %i0, %o0
200d87c: 1a 80 00 1b bcc 200d8e8 <_Heap_Allocate_aligned_with_boundary+0x180>
200d880: 80 a2 00 12 cmp %o0, %l2
200d884: 1a 80 00 1a bcc 200d8ec <_Heap_Allocate_aligned_with_boundary+0x184>
200d888: 80 a5 00 18 cmp %l4, %i0
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
200d88c: a6 05 00 19 add %l4, %i1, %l3
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
200d890: 80 a4 c0 08 cmp %l3, %o0
200d894: 08 80 00 08 bleu 200d8b4 <_Heap_Allocate_aligned_with_boundary+0x14c>
200d898: b0 10 20 00 clr %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d89c: 10 bf ff c9 b 200d7c0 <_Heap_Allocate_aligned_with_boundary+0x58>
200d8a0: 80 a6 20 00 cmp %i0, 0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200d8a4: 1a 80 00 11 bcc 200d8e8 <_Heap_Allocate_aligned_with_boundary+0x180>
200d8a8: 80 a4 c0 08 cmp %l3, %o0
if ( boundary_line < boundary_floor ) {
200d8ac: 18 bf ff c4 bgu 200d7bc <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN
200d8b0: b0 10 20 00 clr %i0
return 0;
}
alloc_begin = boundary_line - alloc_size;
200d8b4: b0 22 00 19 sub %o0, %i1, %i0
200d8b8: 92 10 00 1a mov %i2, %o1
200d8bc: 40 00 2c 45 call 20189d0 <.urem>
200d8c0: 90 10 00 18 mov %i0, %o0
200d8c4: 92 10 00 1b mov %i3, %o1
200d8c8: b0 26 00 08 sub %i0, %o0, %i0
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
200d8cc: a4 06 00 19 add %i0, %i1, %l2
200d8d0: 40 00 2c 40 call 20189d0 <.urem>
200d8d4: 90 10 00 12 mov %l2, %o0
200d8d8: 90 24 80 08 sub %l2, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
200d8dc: 80 a2 00 12 cmp %o0, %l2
200d8e0: 0a bf ff f1 bcs 200d8a4 <_Heap_Allocate_aligned_with_boundary+0x13c>
200d8e4: 80 a6 00 08 cmp %i0, %o0
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
200d8e8: 80 a5 00 18 cmp %l4, %i0
200d8ec: 18 80 00 22 bgu 200d974 <_Heap_Allocate_aligned_with_boundary+0x20c>
200d8f0: 82 10 3f f8 mov -8, %g1
200d8f4: 90 10 00 18 mov %i0, %o0
200d8f8: a4 20 40 11 sub %g1, %l1, %l2
200d8fc: 92 10 00 16 mov %l6, %o1
200d900: 40 00 2c 34 call 20189d0 <.urem>
200d904: a4 04 80 18 add %l2, %i0, %l2
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
if ( free_size >= min_block_size || free_size == 0 ) {
200d908: 90 a4 80 08 subcc %l2, %o0, %o0
200d90c: 02 bf ff ad be 200d7c0 <_Heap_Allocate_aligned_with_boundary+0x58>
200d910: 80 a6 20 00 cmp %i0, 0
200d914: 80 a2 00 15 cmp %o0, %l5
return alloc_begin;
}
}
return 0;
200d918: 82 40 3f ff addx %g0, -1, %g1
200d91c: b0 0e 00 01 and %i0, %g1, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d920: 80 a6 20 00 cmp %i0, 0
200d924: 02 bf ff a9 be 200d7c8 <_Heap_Allocate_aligned_with_boundary+0x60>
200d928: b8 07 20 01 inc %i4
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d92c: c4 07 60 48 ld [ %i5 + 0x48 ], %g2
stats->searches += search_count;
200d930: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d934: 84 00 a0 01 inc %g2
stats->searches += search_count;
200d938: 82 00 40 1c add %g1, %i4, %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d93c: c4 27 60 48 st %g2, [ %i5 + 0x48 ]
stats->searches += search_count;
200d940: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200d944: 90 10 00 1d mov %i5, %o0
200d948: 92 10 00 11 mov %l1, %o1
200d94c: 94 10 00 18 mov %i0, %o2
200d950: 7f ff ed cf call 200908c <_Heap_Block_allocate>
200d954: 96 10 00 19 mov %i1, %o3
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200d958: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200d95c: 80 a0 40 1c cmp %g1, %i4
200d960: 1a 80 00 03 bcc 200d96c <_Heap_Allocate_aligned_with_boundary+0x204>
200d964: 01 00 00 00 nop
stats->max_search = search_count;
200d968: f8 27 60 44 st %i4, [ %i5 + 0x44 ]
}
return (void *) alloc_begin;
}
200d96c: 81 c7 e0 08 ret
200d970: 81 e8 00 00 restore
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
200d974: 10 bf ff 92 b 200d7bc <_Heap_Allocate_aligned_with_boundary+0x54>
200d978: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
200d97c: 18 bf ff a3 bgu 200d808 <_Heap_Allocate_aligned_with_boundary+0xa0>
200d980: 80 a6 a0 00 cmp %i2, 0
return NULL;
}
if ( alignment == 0 ) {
200d984: 22 bf ff 83 be,a 200d790 <_Heap_Allocate_aligned_with_boundary+0x28>
200d988: b4 10 00 16 mov %l6, %i2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200d98c: 10 bf ff 82 b 200d794 <_Heap_Allocate_aligned_with_boundary+0x2c>
200d990: e2 07 60 08 ld [ %i5 + 8 ], %l1
0200d9a8 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
200d9a8: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
200d9ac: c0 27 bf f8 clr [ %fp + -8 ]
Heap_Block *extend_last_block = NULL;
200d9b0: c0 27 bf fc clr [ %fp + -4 ]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
200d9b4: ba 06 40 1a add %i1, %i2, %i5
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
200d9b8: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
200d9bc: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
200d9c0: d6 06 20 14 ld [ %i0 + 0x14 ], %o3
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
200d9c4: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
200d9c8: 80 a6 40 1d cmp %i1, %i5
200d9cc: 08 80 00 05 bleu 200d9e0 <_Heap_Extend+0x38>
200d9d0: a2 10 20 00 clr %l1
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
200d9d4: b0 0c 60 01 and %l1, 1, %i0
200d9d8: 81 c7 e0 08 ret
200d9dc: 81 e8 00 00 restore
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
200d9e0: 90 10 00 19 mov %i1, %o0
200d9e4: 92 10 00 1a mov %i2, %o1
200d9e8: 94 10 00 10 mov %l0, %o2
200d9ec: 98 07 bf f8 add %fp, -8, %o4
200d9f0: 7f ff ed 48 call 2008f10 <_Heap_Get_first_and_last_block>
200d9f4: 9a 07 bf fc add %fp, -4, %o5
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
200d9f8: 80 8a 20 ff btst 0xff, %o0
200d9fc: 02 bf ff f6 be 200d9d4 <_Heap_Extend+0x2c>
200da00: aa 10 20 00 clr %l5
200da04: a2 10 00 1c mov %i4, %l1
200da08: ac 10 20 00 clr %l6
200da0c: a6 10 20 00 clr %l3
200da10: 10 80 00 14 b 200da60 <_Heap_Extend+0xb8>
200da14: a8 10 20 00 clr %l4
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
200da18: 2a 80 00 02 bcs,a 200da20 <_Heap_Extend+0x78>
200da1c: ac 10 00 11 mov %l1, %l6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200da20: 90 10 00 1a mov %i2, %o0
200da24: 40 00 2c b2 call 2018cec <.urem>
200da28: 92 10 00 10 mov %l0, %o1
200da2c: 82 06 bf f8 add %i2, -8, %g1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200da30: 80 a6 80 19 cmp %i2, %i1
200da34: 02 80 00 1c be 200daa4 <_Heap_Extend+0xfc>
200da38: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
200da3c: 80 a6 40 1a cmp %i1, %i2
200da40: 38 80 00 02 bgu,a 200da48 <_Heap_Extend+0xa0>
200da44: aa 10 00 01 mov %g1, %l5
- 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;
200da48: e2 00 60 04 ld [ %g1 + 4 ], %l1
200da4c: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200da50: a2 00 40 11 add %g1, %l1, %l1
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200da54: 80 a7 00 11 cmp %i4, %l1
200da58: 22 80 00 1b be,a 200dac4 <_Heap_Extend+0x11c>
200da5c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200da60: 80 a4 40 1c cmp %l1, %i4
200da64: 02 80 00 66 be 200dbfc <_Heap_Extend+0x254>
200da68: 82 10 00 11 mov %l1, %g1
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200da6c: 80 a0 40 1d cmp %g1, %i5
200da70: 0a 80 00 70 bcs 200dc30 <_Heap_Extend+0x288>
200da74: f4 04 40 00 ld [ %l1 ], %i2
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
200da78: 80 a0 40 1d cmp %g1, %i5
200da7c: 12 bf ff e7 bne 200da18 <_Heap_Extend+0x70>
200da80: 80 a7 40 1a cmp %i5, %i2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200da84: 90 10 00 1a mov %i2, %o0
200da88: 40 00 2c 99 call 2018cec <.urem>
200da8c: 92 10 00 10 mov %l0, %o1
200da90: 82 06 bf f8 add %i2, -8, %g1
200da94: a8 10 00 11 mov %l1, %l4
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200da98: 80 a6 80 19 cmp %i2, %i1
200da9c: 12 bf ff e8 bne 200da3c <_Heap_Extend+0x94> <== ALWAYS TAKEN
200daa0: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
200daa4: fa 24 40 00 st %i5, [ %l1 ]
- 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;
200daa8: e2 00 60 04 ld [ %g1 + 4 ], %l1
200daac: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200dab0: a2 00 40 11 add %g1, %l1, %l1
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200dab4: 80 a7 00 11 cmp %i4, %l1
200dab8: 12 bf ff ea bne 200da60 <_Heap_Extend+0xb8> <== NEVER TAKEN
200dabc: a6 10 00 01 mov %g1, %l3
if ( extend_area_begin < heap->area_begin ) {
200dac0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200dac4: 80 a6 40 01 cmp %i1, %g1
200dac8: 3a 80 00 55 bcc,a 200dc1c <_Heap_Extend+0x274>
200dacc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
heap->area_begin = extend_area_begin;
200dad0: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200dad4: c2 07 bf f8 ld [ %fp + -8 ], %g1
200dad8: c4 07 bf fc ld [ %fp + -4 ], %g2
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200dadc: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
200dae0: 86 20 80 01 sub %g2, %g1, %g3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
200dae4: fa 20 40 00 st %i5, [ %g1 ]
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
200dae8: b8 10 e0 01 or %g3, 1, %i4
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
200daec: f8 20 60 04 st %i4, [ %g1 + 4 ]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
200daf0: c6 20 80 00 st %g3, [ %g2 ]
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200daf4: 80 a1 00 01 cmp %g4, %g1
200daf8: 08 80 00 43 bleu 200dc04 <_Heap_Extend+0x25c>
200dafc: c0 20 a0 04 clr [ %g2 + 4 ]
heap->first_block = extend_first_block;
200db00: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200db04: 80 a5 20 00 cmp %l4, 0
200db08: 02 80 00 63 be 200dc94 <_Heap_Extend+0x2ec>
200db0c: b2 06 60 08 add %i1, 8, %i1
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
200db10: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
200db14: 92 10 00 1c mov %i4, %o1
200db18: 40 00 2c 75 call 2018cec <.urem>
200db1c: 90 10 00 19 mov %i1, %o0
if ( remainder != 0 ) {
200db20: 80 a2 20 00 cmp %o0, 0
200db24: 02 80 00 04 be 200db34 <_Heap_Extend+0x18c>
200db28: c4 05 00 00 ld [ %l4 ], %g2
return value - remainder + alignment;
200db2c: b2 06 40 1c add %i1, %i4, %i1
200db30: b2 26 40 08 sub %i1, %o0, %i1
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
200db34: 82 06 7f f8 add %i1, -8, %g1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
200db38: c4 26 7f f8 st %g2, [ %i1 + -8 ]
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
200db3c: 84 25 00 01 sub %l4, %g1, %g2
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
200db40: 84 10 a0 01 or %g2, 1, %g2
_Heap_Free_block( heap, new_first_block );
200db44: 90 10 00 18 mov %i0, %o0
200db48: 92 10 00 01 mov %g1, %o1
200db4c: 7f ff ff 8d call 200d980 <_Heap_Free_block>
200db50: c4 26 7f fc st %g2, [ %i1 + -4 ]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
200db54: 80 a4 e0 00 cmp %l3, 0
200db58: 02 80 00 3b be 200dc44 <_Heap_Extend+0x29c>
200db5c: ba 07 7f f8 add %i5, -8, %i5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200db60: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
200db64: ba 27 40 13 sub %i5, %l3, %i5
200db68: 40 00 2c 61 call 2018cec <.urem>
200db6c: 90 10 00 1d mov %i5, %o0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
200db70: c2 04 e0 04 ld [ %l3 + 4 ], %g1
200db74: ba 27 40 08 sub %i5, %o0, %i5
200db78: 82 20 40 1d sub %g1, %i5, %g1
| HEAP_PREV_BLOCK_USED;
200db7c: 82 10 60 01 or %g1, 1, %g1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200db80: 84 07 40 13 add %i5, %l3, %g2
200db84: c2 20 a0 04 st %g1, [ %g2 + 4 ]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200db88: c2 04 e0 04 ld [ %l3 + 4 ], %g1
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
200db8c: 90 10 00 18 mov %i0, %o0
200db90: 82 08 60 01 and %g1, 1, %g1
200db94: 92 10 00 13 mov %l3, %o1
block->size_and_flag = size | flag;
200db98: ba 17 40 01 or %i5, %g1, %i5
200db9c: 7f ff ff 79 call 200d980 <_Heap_Free_block>
200dba0: fa 24 e0 04 st %i5, [ %l3 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200dba4: 80 a4 e0 00 cmp %l3, 0
200dba8: 02 80 00 34 be 200dc78 <_Heap_Extend+0x2d0>
200dbac: 80 a5 20 00 cmp %l4, 0
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200dbb0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200dbb4: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200dbb8: c8 00 60 04 ld [ %g1 + 4 ], %g4
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
200dbbc: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200dbc0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200dbc4: ba 27 40 01 sub %i5, %g1, %i5
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200dbc8: 88 09 20 01 and %g4, 1, %g4
block->size_and_flag = size | flag;
200dbcc: 88 17 40 04 or %i5, %g4, %g4
200dbd0: c8 20 60 04 st %g4, [ %g1 + 4 ]
200dbd4: a4 20 c0 12 sub %g3, %l2, %l2
/* Statistics */
stats->size += extended_size;
200dbd8: 82 00 80 12 add %g2, %l2, %g1
200dbdc: c2 26 20 2c st %g1, [ %i0 + 0x2c ]
if ( extended_size_ptr != NULL )
200dbe0: 80 a6 e0 00 cmp %i3, 0
200dbe4: 02 bf ff 7c be 200d9d4 <_Heap_Extend+0x2c> <== NEVER TAKEN
200dbe8: a2 10 20 01 mov 1, %l1
*extended_size_ptr = extended_size;
200dbec: e4 26 c0 00 st %l2, [ %i3 ]
return true;
}
200dbf0: b0 0c 60 01 and %l1, 1, %i0
200dbf4: 81 c7 e0 08 ret
200dbf8: 81 e8 00 00 restore
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200dbfc: 10 bf ff 9c b 200da6c <_Heap_Extend+0xc4>
200dc00: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
200dc04: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200dc08: 80 a0 40 02 cmp %g1, %g2
200dc0c: 2a bf ff be bcs,a 200db04 <_Heap_Extend+0x15c>
200dc10: c4 26 20 24 st %g2, [ %i0 + 0x24 ]
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200dc14: 10 bf ff bd b 200db08 <_Heap_Extend+0x160>
200dc18: 80 a5 20 00 cmp %l4, 0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
200dc1c: 80 a7 40 01 cmp %i5, %g1
200dc20: 38 bf ff ad bgu,a 200dad4 <_Heap_Extend+0x12c>
200dc24: fa 26 20 1c st %i5, [ %i0 + 0x1c ]
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200dc28: 10 bf ff ac b 200dad8 <_Heap_Extend+0x130>
200dc2c: c2 07 bf f8 ld [ %fp + -8 ], %g1
(uintptr_t) start_block : heap->area_begin;
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200dc30: 80 a6 40 1a cmp %i1, %i2
200dc34: 1a bf ff 92 bcc 200da7c <_Heap_Extend+0xd4>
200dc38: 80 a0 40 1d cmp %g1, %i5
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
200dc3c: 10 bf ff 66 b 200d9d4 <_Heap_Extend+0x2c>
200dc40: a2 10 20 00 clr %l1
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
200dc44: 80 a5 60 00 cmp %l5, 0
200dc48: 02 bf ff d7 be 200dba4 <_Heap_Extend+0x1fc>
200dc4c: c4 07 bf f8 ld [ %fp + -8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200dc50: c6 05 60 04 ld [ %l5 + 4 ], %g3
_Heap_Link_above(
200dc54: c2 07 bf fc ld [ %fp + -4 ], %g1
200dc58: 86 08 e0 01 and %g3, 1, %g3
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
200dc5c: 84 20 80 15 sub %g2, %l5, %g2
block->size_and_flag = size | flag;
200dc60: 84 10 80 03 or %g2, %g3, %g2
200dc64: c4 25 60 04 st %g2, [ %l5 + 4 ]
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
200dc68: c4 00 60 04 ld [ %g1 + 4 ], %g2
200dc6c: 84 10 a0 01 or %g2, 1, %g2
200dc70: 10 bf ff cd b 200dba4 <_Heap_Extend+0x1fc>
200dc74: c4 20 60 04 st %g2, [ %g1 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200dc78: 32 bf ff cf bne,a 200dbb4 <_Heap_Extend+0x20c>
200dc7c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
_Heap_Free_block( heap, extend_first_block );
200dc80: d2 07 bf f8 ld [ %fp + -8 ], %o1
200dc84: 7f ff ff 3f call 200d980 <_Heap_Free_block>
200dc88: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200dc8c: 10 bf ff ca b 200dbb4 <_Heap_Extend+0x20c>
200dc90: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
200dc94: 80 a5 a0 00 cmp %l6, 0
200dc98: 02 bf ff b0 be 200db58 <_Heap_Extend+0x1b0>
200dc9c: 80 a4 e0 00 cmp %l3, 0
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
200dca0: ac 25 80 02 sub %l6, %g2, %l6
200dca4: ac 15 a0 01 or %l6, 1, %l6
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
200dca8: 10 bf ff ac b 200db58 <_Heap_Extend+0x1b0>
200dcac: ec 20 a0 04 st %l6, [ %g2 + 4 ]
0200d994 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200d994: 9d e3 bf a0 save %sp, -96, %sp
/*
* 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 ) {
200d998: 80 a6 60 00 cmp %i1, 0
200d99c: 02 80 00 57 be 200daf8 <_Heap_Free+0x164>
200d9a0: 84 10 20 01 mov 1, %g2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d9a4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200d9a8: 40 00 2c 0a call 20189d0 <.urem>
200d9ac: 90 10 00 19 mov %i1, %o0
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
200d9b0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d9b4: ba 06 7f f8 add %i1, -8, %i5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200d9b8: ba 27 40 08 sub %i5, %o0, %i5
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;
200d9bc: 80 a7 40 01 cmp %i5, %g1
200d9c0: 0a 80 00 4e bcs 200daf8 <_Heap_Free+0x164>
200d9c4: 84 10 20 00 clr %g2
200d9c8: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200d9cc: 80 a7 40 04 cmp %i5, %g4
200d9d0: 38 80 00 4b bgu,a 200dafc <_Heap_Free+0x168>
200d9d4: b0 08 a0 01 and %g2, 1, %i0
- 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;
200d9d8: de 07 60 04 ld [ %i5 + 4 ], %o7
200d9dc: b2 0b ff fe and %o7, -2, %i1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d9e0: 86 07 40 19 add %i5, %i1, %g3
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;
200d9e4: 80 a0 40 03 cmp %g1, %g3
200d9e8: 38 80 00 45 bgu,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN
200d9ec: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
200d9f0: 80 a1 00 03 cmp %g4, %g3
200d9f4: 2a 80 00 42 bcs,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN
200d9f8: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
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;
200d9fc: da 00 e0 04 ld [ %g3 + 4 ], %o5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
200da00: 80 8b 60 01 btst 1, %o5
200da04: 02 80 00 3d be 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN
200da08: 98 0b 7f fe and %o5, -2, %o4
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 ));
200da0c: 80 a1 00 03 cmp %g4, %g3
200da10: 02 80 00 06 be 200da28 <_Heap_Free+0x94>
200da14: 9a 10 20 00 clr %o5
200da18: 84 00 c0 0c add %g3, %o4, %g2
200da1c: da 00 a0 04 ld [ %g2 + 4 ], %o5
200da20: 9a 0b 60 01 and %o5, 1, %o5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
200da24: 9a 1b 60 01 xor %o5, 1, %o5
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
200da28: 80 8b e0 01 btst 1, %o7
200da2c: 12 80 00 1d bne 200daa0 <_Heap_Free+0x10c>
200da30: 80 8b 60 ff btst 0xff, %o5
uintptr_t const prev_size = block->prev_size;
200da34: d6 07 40 00 ld [ %i5 ], %o3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200da38: 9e 27 40 0b sub %i5, %o3, %o7
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;
200da3c: 80 a0 40 0f cmp %g1, %o7
200da40: 18 80 00 2e bgu 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN
200da44: 84 10 20 00 clr %g2
200da48: 80 a1 00 0f cmp %g4, %o7
200da4c: 2a 80 00 2c bcs,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN
200da50: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
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;
200da54: c2 03 e0 04 ld [ %o7 + 4 ], %g1
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) ) {
200da58: 80 88 60 01 btst 1, %g1
200da5c: 02 80 00 27 be 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN
200da60: 80 8b 60 ff btst 0xff, %o5
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200da64: 22 80 00 3a be,a 200db4c <_Heap_Free+0x1b8>
200da68: 96 06 40 0b add %i1, %o3, %o3
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
200da6c: c2 00 e0 08 ld [ %g3 + 8 ], %g1
Heap_Block *prev = block->prev;
200da70: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200da74: c6 06 20 38 ld [ %i0 + 0x38 ], %g3
prev->next = next;
200da78: c2 20 a0 08 st %g1, [ %g2 + 8 ]
next->prev = prev;
200da7c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200da80: 82 00 ff ff add %g3, -1, %g1
200da84: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
200da88: 98 06 40 0c add %i1, %o4, %o4
200da8c: 96 03 00 0b add %o4, %o3, %o3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200da90: 82 12 e0 01 or %o3, 1, %g1
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200da94: d6 23 c0 0b st %o3, [ %o7 + %o3 ]
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200da98: 10 80 00 0e b 200dad0 <_Heap_Free+0x13c>
200da9c: c2 23 e0 04 st %g1, [ %o7 + 4 ]
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
200daa0: 22 80 00 19 be,a 200db04 <_Heap_Free+0x170>
200daa4: c4 06 20 08 ld [ %i0 + 8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
200daa8: c4 00 e0 08 ld [ %g3 + 8 ], %g2
Heap_Block *prev = old_block->prev;
200daac: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
new_block->next = next;
200dab0: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = prev;
200dab4: c2 27 60 0c st %g1, [ %i5 + 0xc ]
uintptr_t const size = block_size + next_block_size;
200dab8: 98 03 00 19 add %o4, %i1, %o4
next->prev = new_block;
200dabc: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
prev->next = new_block;
200dac0: fa 20 60 08 st %i5, [ %g1 + 8 ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200dac4: 84 13 20 01 or %o4, 1, %g2
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200dac8: d8 27 40 0c st %o4, [ %i5 + %o4 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200dacc: c4 27 60 04 st %g2, [ %i5 + 4 ]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200dad0: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
200dad4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
200dad8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200dadc: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
200dae0: 82 00 60 01 inc %g1
stats->free_size += block_size;
200dae4: b2 00 c0 19 add %g3, %i1, %i1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200dae8: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
200daec: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
200daf0: f2 26 20 30 st %i1, [ %i0 + 0x30 ]
return( true );
200daf4: 84 10 20 01 mov 1, %g2
}
200daf8: b0 08 a0 01 and %g2, 1, %i0
200dafc: 81 c7 e0 08 ret
200db00: 81 e8 00 00 restore
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
200db04: 82 16 60 01 or %i1, 1, %g1
200db08: c2 27 60 04 st %g1, [ %i5 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200db0c: c8 00 e0 04 ld [ %g3 + 4 ], %g4
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
200db10: f0 27 60 0c st %i0, [ %i5 + 0xc ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200db14: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
200db18: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
200db1c: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
} 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;
200db20: 84 09 3f fe and %g4, -2, %g2
next_block->prev_size = block_size;
200db24: f2 27 40 19 st %i1, [ %i5 + %i1 ]
} 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;
200db28: c4 20 e0 04 st %g2, [ %g3 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
200db2c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
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;
200db30: 82 00 60 01 inc %g1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
200db34: fa 26 20 08 st %i5, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
200db38: 80 a0 40 02 cmp %g1, %g2
200db3c: 08 bf ff e5 bleu 200dad0 <_Heap_Free+0x13c>
200db40: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200db44: 10 bf ff e3 b 200dad0 <_Heap_Free+0x13c>
200db48: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
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;
200db4c: 82 12 e0 01 or %o3, 1, %g1
200db50: c2 23 e0 04 st %g1, [ %o7 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200db54: c2 00 e0 04 ld [ %g3 + 4 ], %g1
next_block->prev_size = size;
200db58: d6 27 40 19 st %o3, [ %i5 + %i1 ]
_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;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200db5c: 82 08 7f fe and %g1, -2, %g1
200db60: 10 bf ff dc b 200dad0 <_Heap_Free+0x13c>
200db64: c2 20 e0 04 st %g1, [ %g3 + 4 ]
0202e31c <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
202e31c: 9d e3 bf a0 save %sp, -96, %sp
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
202e320: c2 06 20 08 ld [ %i0 + 8 ], %g1
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
202e324: c0 26 40 00 clr [ %i1 ]
info->largest = 0;
202e328: c0 26 60 04 clr [ %i1 + 4 ]
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
202e32c: 80 a6 00 01 cmp %i0, %g1
202e330: 02 80 00 14 be 202e380 <_Heap_Get_free_information+0x64> <== NEVER TAKEN
202e334: c0 26 60 08 clr [ %i1 + 8 ]
202e338: 88 10 20 01 mov 1, %g4
202e33c: 9e 10 20 00 clr %o7
202e340: 10 80 00 03 b 202e34c <_Heap_Get_free_information+0x30>
202e344: 86 10 20 00 clr %g3
202e348: 88 10 00 0d mov %o5, %g4
- 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;
202e34c: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_block != tail;
the_block = the_block->next)
202e350: 9a 01 20 01 add %g4, 1, %o5
202e354: 84 08 bf fe and %g2, -2, %g2
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
if ( info->largest < the_size )
202e358: 80 a0 80 0f cmp %g2, %o7
202e35c: 08 80 00 03 bleu 202e368 <_Heap_Get_free_information+0x4c>
202e360: 86 00 c0 02 add %g3, %g2, %g3
info->largest = the_size;
202e364: c4 26 60 04 st %g2, [ %i1 + 4 ]
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
202e368: c2 00 60 08 ld [ %g1 + 8 ], %g1
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
202e36c: 80 a6 00 01 cmp %i0, %g1
202e370: 32 bf ff f6 bne,a 202e348 <_Heap_Get_free_information+0x2c>
202e374: de 06 60 04 ld [ %i1 + 4 ], %o7
202e378: c8 26 40 00 st %g4, [ %i1 ]
202e37c: c6 26 60 08 st %g3, [ %i1 + 8 ]
202e380: 81 c7 e0 08 ret
202e384: 81 e8 00 00 restore
0200add8 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
uintptr_t remaining_free_space
)
{
200add8: 9d e3 bf a0 save %sp, -96, %sp
void *free_space = remaining_free_space > 0 ?
_Heap_Allocate( heap, remaining_free_space )
: NULL;
200addc: b4 10 20 00 clr %i2
200ade0: 80 a6 60 00 cmp %i1, 0
200ade4: 12 80 00 1c bne 200ae54 <_Heap_Greedy_allocate+0x7c>
200ade8: b8 10 00 18 mov %i0, %i4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200adec: fa 07 20 08 ld [ %i4 + 8 ], %i5
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *current = _Heap_Free_list_first( heap );
Heap_Block *blocks = NULL;
200adf0: b0 10 20 00 clr %i0
while ( current != free_list_tail ) {
200adf4: 80 a7 00 1d cmp %i4, %i5
200adf8: 12 80 00 05 bne 200ae0c <_Heap_Greedy_allocate+0x34> <== ALWAYS TAKEN
200adfc: b6 10 20 00 clr %i3
current->next = blocks;
blocks = current;
current = _Heap_Free_list_first( heap );
}
_Heap_Free( heap, free_space );
200ae00: 10 80 00 11 b 200ae44 <_Heap_Greedy_allocate+0x6c> <== NOT EXECUTED
200ae04: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
blocks = current;
current = _Heap_Free_list_first( heap );
200ae08: ba 10 00 01 mov %g1, %i5
- 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;
200ae0c: d6 07 60 04 ld [ %i5 + 4 ], %o3
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *current = _Heap_Free_list_first( heap );
Heap_Block *blocks = NULL;
while ( current != free_list_tail ) {
_Heap_Block_allocate(
200ae10: 92 10 00 1d mov %i5, %o1
200ae14: 96 0a ff fe and %o3, -2, %o3
200ae18: 94 07 60 08 add %i5, 8, %o2
200ae1c: 90 10 00 1c mov %i4, %o0
200ae20: 40 00 00 e6 call 200b1b8 <_Heap_Block_allocate>
200ae24: 96 02 ff f8 add %o3, -8, %o3
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
200ae28: f6 27 60 08 st %i3, [ %i5 + 8 ]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200ae2c: c2 07 20 08 ld [ %i4 + 8 ], %g1
: NULL;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *current = _Heap_Free_list_first( heap );
Heap_Block *blocks = NULL;
while ( current != free_list_tail ) {
200ae30: 80 a7 00 01 cmp %i4, %g1
200ae34: 12 bf ff f5 bne 200ae08 <_Heap_Greedy_allocate+0x30>
200ae38: b6 10 00 1d mov %i5, %i3
200ae3c: b0 10 00 1d mov %i5, %i0
current->next = blocks;
blocks = current;
current = _Heap_Free_list_first( heap );
}
_Heap_Free( heap, free_space );
200ae40: 90 10 00 1c mov %i4, %o0
200ae44: 40 00 1c ec call 20121f4 <_Heap_Free>
200ae48: 92 10 00 1a mov %i2, %o1
return blocks;
}
200ae4c: 81 c7 e0 08 ret
200ae50: 81 e8 00 00 restore
* @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 );
200ae54: 90 10 00 18 mov %i0, %o0
200ae58: 92 10 00 19 mov %i1, %o1
200ae5c: 94 10 20 00 clr %o2
200ae60: 40 00 1c 5a call 2011fc8 <_Heap_Allocate_aligned_with_boundary>
200ae64: 96 10 20 00 clr %o3
200ae68: 10 bf ff e1 b 200adec <_Heap_Greedy_allocate+0x14>
200ae6c: b4 10 00 08 mov %o0, %i2
0200ae70 <_Heap_Greedy_free>:
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
200ae70: 9d e3 bf a0 save %sp, -96, %sp
while ( blocks != NULL ) {
200ae74: 80 a6 60 00 cmp %i1, 0
200ae78: 32 80 00 04 bne,a 200ae88 <_Heap_Greedy_free+0x18> <== ALWAYS TAKEN
200ae7c: fa 06 60 08 ld [ %i1 + 8 ], %i5
200ae80: 30 80 00 0a b,a 200aea8 <_Heap_Greedy_free+0x38> <== NOT EXECUTED
Heap_Block *current = blocks;
blocks = blocks->next;
200ae84: fa 06 60 08 ld [ %i1 + 8 ], %i5
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
200ae88: 92 06 60 08 add %i1, 8, %o1
200ae8c: 40 00 1c da call 20121f4 <_Heap_Free>
200ae90: 90 10 00 18 mov %i0, %o0
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
while ( blocks != NULL ) {
200ae94: 80 a7 60 00 cmp %i5, 0
200ae98: 12 bf ff fb bne 200ae84 <_Heap_Greedy_free+0x14>
200ae9c: b2 10 00 1d mov %i5, %i1
200aea0: 81 c7 e0 08 ret
200aea4: 81 e8 00 00 restore
200aea8: 81 c7 e0 08 ret <== NOT EXECUTED
200aeac: 81 e8 00 00 restore <== NOT EXECUTED
02044174 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
2044174: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *current = heap->first_block;
2044178: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *end = heap->last_block;
204417c: fa 06 20 24 ld [ %i0 + 0x24 ], %i5
bool stop = false;
while ( !stop && current != end ) {
2044180: 80 a7 00 1d cmp %i4, %i5
2044184: 32 80 00 06 bne,a 204419c <_Heap_Iterate+0x28> <== ALWAYS TAKEN
2044188: d2 07 20 04 ld [ %i4 + 4 ], %o1
204418c: 30 80 00 0e b,a 20441c4 <_Heap_Iterate+0x50> <== NOT EXECUTED
2044190: 02 80 00 0d be 20441c4 <_Heap_Iterate+0x50>
2044194: 01 00 00 00 nop
- 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;
2044198: d2 07 20 04 ld [ %i4 + 4 ], %o1
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 );
204419c: 90 10 00 1c mov %i4, %o0
20441a0: 92 0a 7f fe and %o1, -2, %o1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
20441a4: b8 07 00 09 add %i4, %o1, %i4
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;
20441a8: d4 07 20 04 ld [ %i4 + 4 ], %o2
20441ac: 96 10 00 1a mov %i2, %o3
20441b0: 9f c6 40 00 call %i1
20441b4: 94 0a a0 01 and %o2, 1, %o2
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
20441b8: 80 8a 20 ff btst 0xff, %o0
20441bc: 02 bf ff f5 be 2044190 <_Heap_Iterate+0x1c> <== ALWAYS TAKEN
20441c0: 80 a7 40 1c cmp %i5, %i4
20441c4: 81 c7 e0 08 ret
20441c8: 81 e8 00 00 restore
0200dc88 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
200dc88: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200dc8c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200dc90: 40 00 2b 50 call 20189d0 <.urem>
200dc94: 90 10 00 19 mov %i1, %o0
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
200dc98: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200dc9c: 84 06 7f f8 add %i1, -8, %g2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200dca0: 84 20 80 08 sub %g2, %o0, %g2
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;
200dca4: 80 a0 80 01 cmp %g2, %g1
200dca8: 0a 80 00 16 bcs 200dd00 <_Heap_Size_of_alloc_area+0x78>
200dcac: 86 10 20 00 clr %g3
200dcb0: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200dcb4: 80 a0 80 04 cmp %g2, %g4
200dcb8: 18 80 00 13 bgu 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dcbc: b0 08 e0 01 and %g3, 1, %i0
- 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;
200dcc0: f0 00 a0 04 ld [ %g2 + 4 ], %i0
200dcc4: b0 0e 3f fe and %i0, -2, %i0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200dcc8: 84 00 80 18 add %g2, %i0, %g2
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;
200dccc: 80 a0 40 02 cmp %g1, %g2
200dcd0: 18 80 00 0d bgu 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dcd4: b0 08 e0 01 and %g3, 1, %i0
200dcd8: 80 a1 00 02 cmp %g4, %g2
200dcdc: 0a 80 00 0a bcs 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dce0: 01 00 00 00 nop
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;
200dce4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
200dce8: 80 88 60 01 btst 1, %g1
200dcec: 02 80 00 06 be 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dcf0: 84 20 80 19 sub %g2, %i1, %g2
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
200dcf4: 86 10 20 01 mov 1, %g3
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
200dcf8: 84 00 a0 04 add %g2, 4, %g2
200dcfc: c4 26 80 00 st %g2, [ %i2 ]
return true;
}
200dd00: b0 08 e0 01 and %g3, 1, %i0
200dd04: 81 c7 e0 08 ret
200dd08: 81 e8 00 00 restore
02009e48 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
2009e48: 9d e3 bf 80 save %sp, -128, %sp
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;
2009e4c: 3b 00 80 27 sethi %hi(0x2009c00), %i5
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
2009e50: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
2009e54: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
2009e58: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *const last_block = heap->last_block;
2009e5c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
2009e60: 80 a6 a0 00 cmp %i2, 0
2009e64: 02 80 00 04 be 2009e74 <_Heap_Walk+0x2c>
2009e68: ba 17 61 dc or %i5, 0x1dc, %i5
2009e6c: 3b 00 80 27 sethi %hi(0x2009c00), %i5
2009e70: ba 17 61 e4 or %i5, 0x1e4, %i5 ! 2009de4 <_Heap_Walk_print>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
2009e74: 03 00 80 7e sethi %hi(0x201f800), %g1
2009e78: c4 00 61 e8 ld [ %g1 + 0x1e8 ], %g2 ! 201f9e8 <_System_state_Current>
2009e7c: 80 a0 a0 03 cmp %g2, 3
2009e80: 02 80 00 05 be 2009e94 <_Heap_Walk+0x4c>
2009e84: 82 10 20 01 mov 1, %g1
block = next_block;
} while ( block != first_block );
return true;
}
2009e88: b0 08 60 01 and %g1, 1, %i0
2009e8c: 81 c7 e0 08 ret
2009e90: 81 e8 00 00 restore
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)(
2009e94: da 06 20 18 ld [ %i0 + 0x18 ], %o5
2009e98: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
2009e9c: c4 06 20 08 ld [ %i0 + 8 ], %g2
2009ea0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2009ea4: 90 10 00 19 mov %i1, %o0
2009ea8: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2009eac: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
2009eb0: e2 23 a0 64 st %l1, [ %sp + 0x64 ]
2009eb4: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
2009eb8: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2009ebc: 92 10 20 00 clr %o1
2009ec0: 96 10 00 10 mov %l0, %o3
2009ec4: 15 00 80 71 sethi %hi(0x201c400), %o2
2009ec8: 98 10 00 1b mov %i3, %o4
2009ecc: 9f c7 40 00 call %i5
2009ed0: 94 12 a1 00 or %o2, 0x100, %o2
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
2009ed4: 80 a4 20 00 cmp %l0, 0
2009ed8: 02 80 00 28 be 2009f78 <_Heap_Walk+0x130>
2009edc: 80 8c 20 07 btst 7, %l0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
2009ee0: 12 80 00 2d bne 2009f94 <_Heap_Walk+0x14c>
2009ee4: 90 10 00 1b mov %i3, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2009ee8: 7f ff de f9 call 2001acc <.urem>
2009eec: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
2009ef0: 80 a2 20 00 cmp %o0, 0
2009ef4: 12 80 00 30 bne 2009fb4 <_Heap_Walk+0x16c>
2009ef8: 90 07 20 08 add %i4, 8, %o0
2009efc: 7f ff de f4 call 2001acc <.urem>
2009f00: 92 10 00 10 mov %l0, %o1
);
return false;
}
if (
2009f04: 80 a2 20 00 cmp %o0, 0
2009f08: 32 80 00 33 bne,a 2009fd4 <_Heap_Walk+0x18c>
2009f0c: 90 10 00 19 mov %i1, %o0
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;
2009f10: e8 07 20 04 ld [ %i4 + 4 ], %l4
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
2009f14: 80 8d 20 01 btst 1, %l4
2009f18: 22 80 00 36 be,a 2009ff0 <_Heap_Walk+0x1a8>
2009f1c: 90 10 00 19 mov %i1, %o0
- 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;
2009f20: c2 04 60 04 ld [ %l1 + 4 ], %g1
2009f24: 82 08 7f fe and %g1, -2, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2009f28: 82 04 40 01 add %l1, %g1, %g1
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;
2009f2c: c4 00 60 04 ld [ %g1 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
2009f30: 80 88 a0 01 btst 1, %g2
2009f34: 02 80 00 0a be 2009f5c <_Heap_Walk+0x114>
2009f38: 80 a7 00 01 cmp %i4, %g1
);
return false;
}
if (
2009f3c: 02 80 00 33 be 200a008 <_Heap_Walk+0x1c0>
2009f40: 90 10 00 19 mov %i1, %o0
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
2009f44: 92 10 20 01 mov 1, %o1
2009f48: 15 00 80 71 sethi %hi(0x201c400), %o2
2009f4c: 9f c7 40 00 call %i5
2009f50: 94 12 a2 78 or %o2, 0x278, %o2 ! 201c678 <__log2table+0x2d8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009f54: 10 bf ff cd b 2009e88 <_Heap_Walk+0x40>
2009f58: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
2009f5c: 90 10 00 19 mov %i1, %o0
2009f60: 92 10 20 01 mov 1, %o1
2009f64: 15 00 80 71 sethi %hi(0x201c400), %o2
2009f68: 9f c7 40 00 call %i5
2009f6c: 94 12 a2 60 or %o2, 0x260, %o2 ! 201c660 <__log2table+0x2c0>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009f70: 10 bf ff c6 b 2009e88 <_Heap_Walk+0x40>
2009f74: 82 10 20 00 clr %g1
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
2009f78: 90 10 00 19 mov %i1, %o0
2009f7c: 92 10 20 01 mov 1, %o1
2009f80: 15 00 80 71 sethi %hi(0x201c400), %o2
2009f84: 9f c7 40 00 call %i5
2009f88: 94 12 a1 98 or %o2, 0x198, %o2 ! 201c598 <__log2table+0x1f8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009f8c: 10 bf ff bf b 2009e88 <_Heap_Walk+0x40>
2009f90: 82 10 20 00 clr %g1
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
2009f94: 90 10 00 19 mov %i1, %o0
2009f98: 92 10 20 01 mov 1, %o1
2009f9c: 96 10 00 10 mov %l0, %o3
2009fa0: 15 00 80 71 sethi %hi(0x201c400), %o2
2009fa4: 9f c7 40 00 call %i5
2009fa8: 94 12 a1 b0 or %o2, 0x1b0, %o2 ! 201c5b0 <__log2table+0x210>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009fac: 10 bf ff b7 b 2009e88 <_Heap_Walk+0x40>
2009fb0: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
2009fb4: 90 10 00 19 mov %i1, %o0
2009fb8: 92 10 20 01 mov 1, %o1
2009fbc: 96 10 00 1b mov %i3, %o3
2009fc0: 15 00 80 71 sethi %hi(0x201c400), %o2
2009fc4: 9f c7 40 00 call %i5
2009fc8: 94 12 a1 d0 or %o2, 0x1d0, %o2 ! 201c5d0 <__log2table+0x230>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009fcc: 10 bf ff af b 2009e88 <_Heap_Walk+0x40>
2009fd0: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
2009fd4: 92 10 20 01 mov 1, %o1
2009fd8: 96 10 00 1c mov %i4, %o3
2009fdc: 15 00 80 71 sethi %hi(0x201c400), %o2
2009fe0: 9f c7 40 00 call %i5
2009fe4: 94 12 a1 f8 or %o2, 0x1f8, %o2 ! 201c5f8 <__log2table+0x258>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009fe8: 10 bf ff a8 b 2009e88 <_Heap_Walk+0x40>
2009fec: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
2009ff0: 92 10 20 01 mov 1, %o1
2009ff4: 15 00 80 71 sethi %hi(0x201c400), %o2
2009ff8: 9f c7 40 00 call %i5
2009ffc: 94 12 a2 30 or %o2, 0x230, %o2 ! 201c630 <__log2table+0x290>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a000: 10 bf ff a2 b 2009e88 <_Heap_Walk+0x40>
200a004: 82 10 20 00 clr %g1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200a008: f4 06 20 08 ld [ %i0 + 8 ], %i2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
200a00c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
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 ) {
200a010: 80 a6 00 1a cmp %i0, %i2
200a014: 02 80 00 0d be 200a048 <_Heap_Walk+0x200>
200a018: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
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;
200a01c: 80 a0 40 1a cmp %g1, %i2
200a020: 28 80 00 bc bleu,a 200a310 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN
200a024: e6 06 20 24 ld [ %i0 + 0x24 ], %l3
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
200a028: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200a02c: 92 10 20 01 mov 1, %o1
200a030: 96 10 00 1a mov %i2, %o3
200a034: 15 00 80 71 sethi %hi(0x201c400), %o2
200a038: 9f c7 40 00 call %i5
200a03c: 94 12 a2 a8 or %o2, 0x2a8, %o2 ! 201c6a8 <__log2table+0x308>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a040: 10 bf ff 92 b 2009e88 <_Heap_Walk+0x40>
200a044: 82 10 20 00 clr %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
200a048: 2d 00 80 72 sethi %hi(0x201c800), %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
200a04c: 2f 00 80 72 sethi %hi(0x201c800), %l7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200a050: a4 10 00 1c mov %i4, %l2
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
200a054: ac 15 a0 d8 or %l6, 0xd8, %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
200a058: ae 15 e0 c0 or %l7, 0xc0, %l7
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200a05c: 2b 00 80 72 sethi %hi(0x201c800), %l5
- 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;
200a060: a6 0d 3f fe and %l4, -2, %l3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200a064: b4 04 c0 12 add %l3, %l2, %i2
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;
200a068: 80 a0 40 1a cmp %g1, %i2
200a06c: 28 80 00 0b bleu,a 200a098 <_Heap_Walk+0x250> <== ALWAYS TAKEN
200a070: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
200a074: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200a078: 92 10 20 01 mov 1, %o1
200a07c: 96 10 00 12 mov %l2, %o3
200a080: 15 00 80 71 sethi %hi(0x201c400), %o2
200a084: 98 10 00 1a mov %i2, %o4
200a088: 9f c7 40 00 call %i5
200a08c: 94 12 a3 50 or %o2, 0x350, %o2
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
200a090: 10 bf ff 7e b 2009e88 <_Heap_Walk+0x40>
200a094: 82 10 20 00 clr %g1
200a098: 80 a0 40 1a cmp %g1, %i2
200a09c: 0a bf ff f7 bcs 200a078 <_Heap_Walk+0x230>
200a0a0: 90 10 00 19 mov %i1, %o0
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;
200a0a4: 82 1c 80 11 xor %l2, %l1, %g1
200a0a8: 80 a0 00 01 cmp %g0, %g1
200a0ac: 82 40 20 00 addx %g0, 0, %g1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200a0b0: 90 10 00 13 mov %l3, %o0
200a0b4: c2 27 bf fc st %g1, [ %fp + -4 ]
200a0b8: 7f ff de 85 call 2001acc <.urem>
200a0bc: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
200a0c0: 80 a2 20 00 cmp %o0, 0
200a0c4: 02 80 00 05 be 200a0d8 <_Heap_Walk+0x290>
200a0c8: c2 07 bf fc ld [ %fp + -4 ], %g1
200a0cc: 80 88 60 ff btst 0xff, %g1
200a0d0: 12 80 00 76 bne 200a2a8 <_Heap_Walk+0x460>
200a0d4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
200a0d8: 80 a6 c0 13 cmp %i3, %l3
200a0dc: 08 80 00 05 bleu 200a0f0 <_Heap_Walk+0x2a8>
200a0e0: 80 a4 80 1a cmp %l2, %i2
200a0e4: 80 88 60 ff btst 0xff, %g1
200a0e8: 12 80 00 78 bne 200a2c8 <_Heap_Walk+0x480> <== ALWAYS TAKEN
200a0ec: 80 a4 80 1a cmp %l2, %i2
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
200a0f0: 2a 80 00 06 bcs,a 200a108 <_Heap_Walk+0x2c0>
200a0f4: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200a0f8: 80 88 60 ff btst 0xff, %g1
200a0fc: 12 80 00 7d bne 200a2f0 <_Heap_Walk+0x4a8>
200a100: 90 10 00 19 mov %i1, %o0
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;
200a104: c2 06 a0 04 ld [ %i2 + 4 ], %g1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200a108: 80 88 60 01 btst 1, %g1
200a10c: 02 80 00 19 be 200a170 <_Heap_Walk+0x328>
200a110: a8 0d 20 01 and %l4, 1, %l4
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
200a114: 80 a5 20 00 cmp %l4, 0
200a118: 22 80 00 0e be,a 200a150 <_Heap_Walk+0x308>
200a11c: da 04 80 00 ld [ %l2 ], %o5
(*printer)(
200a120: 90 10 00 19 mov %i1, %o0
200a124: 92 10 20 00 clr %o1
200a128: 94 10 00 17 mov %l7, %o2
200a12c: 96 10 00 12 mov %l2, %o3
200a130: 9f c7 40 00 call %i5
200a134: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
200a138: 80 a7 00 1a cmp %i4, %i2
200a13c: 02 80 00 42 be 200a244 <_Heap_Walk+0x3fc>
200a140: a4 10 00 1a mov %i2, %l2
200a144: e8 06 a0 04 ld [ %i2 + 4 ], %l4
200a148: 10 bf ff c6 b 200a060 <_Heap_Walk+0x218>
200a14c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
200a150: 96 10 00 12 mov %l2, %o3
200a154: 90 10 00 19 mov %i1, %o0
200a158: 92 10 20 00 clr %o1
200a15c: 94 10 00 16 mov %l6, %o2
200a160: 9f c7 40 00 call %i5
200a164: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
200a168: 10 bf ff f5 b 200a13c <_Heap_Walk+0x2f4>
200a16c: 80 a7 00 1a cmp %i4, %i2
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 ?
200a170: da 04 a0 0c ld [ %l2 + 0xc ], %o5
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)(
200a174: c2 06 20 08 ld [ %i0 + 8 ], %g1
200a178: 05 00 80 71 sethi %hi(0x201c400), %g2
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;
200a17c: c8 06 20 0c ld [ %i0 + 0xc ], %g4
200a180: 80 a0 40 0d cmp %g1, %o5
200a184: 02 80 00 05 be 200a198 <_Heap_Walk+0x350>
200a188: 86 10 a0 c0 or %g2, 0xc0, %g3
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
200a18c: 80 a6 00 0d cmp %i0, %o5
200a190: 02 80 00 3c be 200a280 <_Heap_Walk+0x438>
200a194: 86 15 60 88 or %l5, 0x88, %g3
block->next,
block->next == last_free_block ?
200a198: c2 04 a0 08 ld [ %l2 + 8 ], %g1
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)(
200a19c: 1f 00 80 71 sethi %hi(0x201c400), %o7
200a1a0: 80 a1 00 01 cmp %g4, %g1
200a1a4: 02 80 00 05 be 200a1b8 <_Heap_Walk+0x370>
200a1a8: 84 13 e0 e0 or %o7, 0xe0, %g2
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200a1ac: 80 a6 00 01 cmp %i0, %g1
200a1b0: 02 80 00 31 be 200a274 <_Heap_Walk+0x42c>
200a1b4: 84 15 60 88 or %l5, 0x88, %g2
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)(
200a1b8: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
200a1bc: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
200a1c0: c4 23 a0 64 st %g2, [ %sp + 0x64 ]
200a1c4: 90 10 00 19 mov %i1, %o0
200a1c8: 92 10 20 00 clr %o1
200a1cc: 15 00 80 72 sethi %hi(0x201c800), %o2
200a1d0: 96 10 00 12 mov %l2, %o3
200a1d4: 94 12 a0 18 or %o2, 0x18, %o2
200a1d8: 9f c7 40 00 call %i5
200a1dc: 98 10 00 13 mov %l3, %o4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
200a1e0: da 06 80 00 ld [ %i2 ], %o5
200a1e4: 80 a4 c0 0d cmp %l3, %o5
200a1e8: 12 80 00 19 bne 200a24c <_Heap_Walk+0x404>
200a1ec: 80 a5 20 00 cmp %l4, 0
);
return false;
}
if ( !prev_used ) {
200a1f0: 02 80 00 27 be 200a28c <_Heap_Walk+0x444>
200a1f4: 90 10 00 19 mov %i1, %o0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200a1f8: c2 06 20 08 ld [ %i0 + 8 ], %g1
)
{
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 ) {
200a1fc: 80 a6 00 01 cmp %i0, %g1
200a200: 02 80 00 0b be 200a22c <_Heap_Walk+0x3e4> <== NEVER TAKEN
200a204: 92 10 20 01 mov 1, %o1
if ( free_block == block ) {
200a208: 80 a4 80 01 cmp %l2, %g1
200a20c: 02 bf ff cc be 200a13c <_Heap_Walk+0x2f4>
200a210: 80 a7 00 1a cmp %i4, %i2
return true;
}
free_block = free_block->next;
200a214: c2 00 60 08 ld [ %g1 + 8 ], %g1
)
{
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 ) {
200a218: 80 a6 00 01 cmp %i0, %g1
200a21c: 12 bf ff fc bne 200a20c <_Heap_Walk+0x3c4>
200a220: 80 a4 80 01 cmp %l2, %g1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
200a224: 90 10 00 19 mov %i1, %o0
200a228: 92 10 20 01 mov 1, %o1
200a22c: 96 10 00 12 mov %l2, %o3
200a230: 15 00 80 72 sethi %hi(0x201c800), %o2
200a234: 9f c7 40 00 call %i5
200a238: 94 12 a1 00 or %o2, 0x100, %o2 ! 201c900 <__log2table+0x560>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
200a23c: 10 bf ff 13 b 2009e88 <_Heap_Walk+0x40>
200a240: 82 10 20 00 clr %g1
}
block = next_block;
} while ( block != first_block );
return true;
200a244: 10 bf ff 11 b 2009e88 <_Heap_Walk+0x40>
200a248: 82 10 20 01 mov 1, %g1
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
200a24c: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
200a250: 90 10 00 19 mov %i1, %o0
200a254: 92 10 20 01 mov 1, %o1
200a258: 96 10 00 12 mov %l2, %o3
200a25c: 15 00 80 72 sethi %hi(0x201c800), %o2
200a260: 98 10 00 13 mov %l3, %o4
200a264: 9f c7 40 00 call %i5
200a268: 94 12 a0 50 or %o2, 0x50, %o2
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
200a26c: 10 bf ff 07 b 2009e88 <_Heap_Walk+0x40>
200a270: 82 10 20 00 clr %g1
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200a274: 05 00 80 71 sethi %hi(0x201c400), %g2
200a278: 10 bf ff d0 b 200a1b8 <_Heap_Walk+0x370>
200a27c: 84 10 a0 f0 or %g2, 0xf0, %g2 ! 201c4f0 <__log2table+0x150>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
200a280: 07 00 80 71 sethi %hi(0x201c400), %g3
200a284: 10 bf ff c5 b 200a198 <_Heap_Walk+0x350>
200a288: 86 10 e0 d0 or %g3, 0xd0, %g3 ! 201c4d0 <__log2table+0x130>
return false;
}
if ( !prev_used ) {
(*printer)(
200a28c: 92 10 20 01 mov 1, %o1
200a290: 96 10 00 12 mov %l2, %o3
200a294: 15 00 80 72 sethi %hi(0x201c800), %o2
200a298: 9f c7 40 00 call %i5
200a29c: 94 12 a0 90 or %o2, 0x90, %o2 ! 201c890 <__log2table+0x4f0>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
200a2a0: 10 bf fe fa b 2009e88 <_Heap_Walk+0x40>
200a2a4: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
200a2a8: 92 10 20 01 mov 1, %o1
200a2ac: 96 10 00 12 mov %l2, %o3
200a2b0: 15 00 80 71 sethi %hi(0x201c400), %o2
200a2b4: 98 10 00 13 mov %l3, %o4
200a2b8: 9f c7 40 00 call %i5
200a2bc: 94 12 a3 80 or %o2, 0x380, %o2
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
200a2c0: 10 bf fe f2 b 2009e88 <_Heap_Walk+0x40>
200a2c4: 82 10 20 00 clr %g1
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
200a2c8: 90 10 00 19 mov %i1, %o0
200a2cc: 92 10 20 01 mov 1, %o1
200a2d0: 96 10 00 12 mov %l2, %o3
200a2d4: 15 00 80 71 sethi %hi(0x201c400), %o2
200a2d8: 98 10 00 13 mov %l3, %o4
200a2dc: 94 12 a3 b0 or %o2, 0x3b0, %o2
200a2e0: 9f c7 40 00 call %i5
200a2e4: 9a 10 00 1b mov %i3, %o5
block,
block_size,
min_block_size
);
return false;
200a2e8: 10 bf fe e8 b 2009e88 <_Heap_Walk+0x40>
200a2ec: 82 10 20 00 clr %g1
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
200a2f0: 92 10 20 01 mov 1, %o1
200a2f4: 96 10 00 12 mov %l2, %o3
200a2f8: 15 00 80 71 sethi %hi(0x201c400), %o2
200a2fc: 98 10 00 1a mov %i2, %o4
200a300: 9f c7 40 00 call %i5
200a304: 94 12 a3 e0 or %o2, 0x3e0, %o2
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
200a308: 10 bf fe e0 b 2009e88 <_Heap_Walk+0x40>
200a30c: 82 10 20 00 clr %g1
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;
200a310: 80 a4 c0 1a cmp %l3, %i2
200a314: 0a bf ff 46 bcs 200a02c <_Heap_Walk+0x1e4> <== NEVER TAKEN
200a318: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200a31c: c2 27 bf fc st %g1, [ %fp + -4 ]
200a320: 90 06 a0 08 add %i2, 8, %o0
200a324: 7f ff dd ea call 2001acc <.urem>
200a328: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
200a32c: 80 a2 20 00 cmp %o0, 0
200a330: 12 80 00 36 bne 200a408 <_Heap_Walk+0x5c0> <== NEVER TAKEN
200a334: c2 07 bf fc ld [ %fp + -4 ], %g1
- 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;
200a338: c4 06 a0 04 ld [ %i2 + 4 ], %g2
200a33c: 84 08 bf fe and %g2, -2, %g2
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;
200a340: 84 06 80 02 add %i2, %g2, %g2
200a344: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200a348: 80 88 a0 01 btst 1, %g2
200a34c: 12 80 00 27 bne 200a3e8 <_Heap_Walk+0x5a0> <== NEVER TAKEN
200a350: 84 10 00 18 mov %i0, %g2
200a354: 10 80 00 19 b 200a3b8 <_Heap_Walk+0x570>
200a358: a4 10 00 1a mov %i2, %l2
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 ) {
200a35c: 80 a6 00 1a cmp %i0, %i2
200a360: 02 bf ff 3a be 200a048 <_Heap_Walk+0x200>
200a364: 80 a6 80 01 cmp %i2, %g1
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;
200a368: 0a bf ff 31 bcs 200a02c <_Heap_Walk+0x1e4>
200a36c: 90 10 00 19 mov %i1, %o0
200a370: 80 a6 80 13 cmp %i2, %l3
200a374: 18 bf ff 2f bgu 200a030 <_Heap_Walk+0x1e8> <== NEVER TAKEN
200a378: 92 10 20 01 mov 1, %o1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200a37c: c2 27 bf fc st %g1, [ %fp + -4 ]
200a380: 90 06 a0 08 add %i2, 8, %o0
200a384: 7f ff dd d2 call 2001acc <.urem>
200a388: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
200a38c: 80 a2 20 00 cmp %o0, 0
200a390: 12 80 00 1e bne 200a408 <_Heap_Walk+0x5c0>
200a394: c2 07 bf fc ld [ %fp + -4 ], %g1
- 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;
200a398: c6 06 a0 04 ld [ %i2 + 4 ], %g3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200a39c: 84 10 00 12 mov %l2, %g2
200a3a0: 86 08 ff fe and %g3, -2, %g3
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;
200a3a4: 86 00 c0 1a add %g3, %i2, %g3
200a3a8: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200a3ac: 80 88 e0 01 btst 1, %g3
200a3b0: 12 80 00 0e bne 200a3e8 <_Heap_Walk+0x5a0>
200a3b4: a4 10 00 1a mov %i2, %l2
);
return false;
}
if ( free_block->prev != prev_block ) {
200a3b8: d8 06 a0 0c ld [ %i2 + 0xc ], %o4
200a3bc: 80 a3 00 02 cmp %o4, %g2
200a3c0: 22 bf ff e7 be,a 200a35c <_Heap_Walk+0x514>
200a3c4: f4 06 a0 08 ld [ %i2 + 8 ], %i2
(*printer)(
200a3c8: 90 10 00 19 mov %i1, %o0
200a3cc: 92 10 20 01 mov 1, %o1
200a3d0: 96 10 00 1a mov %i2, %o3
200a3d4: 15 00 80 71 sethi %hi(0x201c400), %o2
200a3d8: 9f c7 40 00 call %i5
200a3dc: 94 12 a3 18 or %o2, 0x318, %o2 ! 201c718 <__log2table+0x378>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a3e0: 10 bf fe aa b 2009e88 <_Heap_Walk+0x40>
200a3e4: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
200a3e8: 90 10 00 19 mov %i1, %o0
200a3ec: 92 10 20 01 mov 1, %o1
200a3f0: 96 10 00 1a mov %i2, %o3
200a3f4: 15 00 80 71 sethi %hi(0x201c400), %o2
200a3f8: 9f c7 40 00 call %i5
200a3fc: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 201c6f8 <__log2table+0x358>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a400: 10 bf fe a2 b 2009e88 <_Heap_Walk+0x40>
200a404: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
200a408: 90 10 00 19 mov %i1, %o0
200a40c: 92 10 20 01 mov 1, %o1
200a410: 96 10 00 1a mov %i2, %o3
200a414: 15 00 80 71 sethi %hi(0x201c400), %o2
200a418: 9f c7 40 00 call %i5
200a41c: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 201c6c8 <__log2table+0x328>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a420: 10 bf fe 9a b 2009e88 <_Heap_Walk+0x40>
200a424: 82 10 20 00 clr %g1
02008524 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
2008524: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2008528: 39 00 80 75 sethi %hi(0x201d400), %i4
200852c: c2 07 22 84 ld [ %i4 + 0x284 ], %g1 ! 201d684 <_IO_Number_of_drivers>
2008530: 80 a0 60 00 cmp %g1, 0
2008534: 02 80 00 0c be 2008564 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
2008538: ba 10 20 00 clr %i5
200853c: b8 17 22 84 or %i4, 0x284, %i4
(void) rtems_io_initialize( major, 0, NULL );
2008540: 90 10 00 1d mov %i5, %o0
2008544: 92 10 20 00 clr %o1
2008548: 40 00 14 00 call 200d548 <rtems_io_initialize>
200854c: 94 10 20 00 clr %o2
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2008550: c2 07 00 00 ld [ %i4 ], %g1
2008554: ba 07 60 01 inc %i5
2008558: 80 a0 40 1d cmp %g1, %i5
200855c: 18 bf ff fa bgu 2008544 <_IO_Initialize_all_drivers+0x20>
2008560: 90 10 00 1d mov %i5, %o0
2008564: 81 c7 e0 08 ret
2008568: 81 e8 00 00 restore
02008458 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
2008458: 9d e3 bf a0 save %sp, -96, %sp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
200845c: 03 00 80 71 sethi %hi(0x201c400), %g1
2008460: 82 10 62 4c or %g1, 0x24c, %g1 ! 201c64c <Configuration>
drivers_in_table = Configuration.number_of_device_drivers;
2008464: f8 00 60 38 ld [ %g1 + 0x38 ], %i4
number_of_drivers = Configuration.maximum_drivers;
2008468: f2 00 60 34 ld [ %g1 + 0x34 ], %i1
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
200846c: 80 a7 00 19 cmp %i4, %i1
2008470: 0a 80 00 08 bcs 2008490 <_IO_Manager_initialization+0x38>
2008474: fa 00 60 3c ld [ %g1 + 0x3c ], %i5
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
2008478: 03 00 80 75 sethi %hi(0x201d400), %g1
200847c: fa 20 62 88 st %i5, [ %g1 + 0x288 ] ! 201d688 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
2008480: 03 00 80 75 sethi %hi(0x201d400), %g1
2008484: f8 20 62 84 st %i4, [ %g1 + 0x284 ] ! 201d684 <_IO_Number_of_drivers>
return;
2008488: 81 c7 e0 08 ret
200848c: 81 e8 00 00 restore
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
2008490: 83 2e 60 03 sll %i1, 3, %g1
2008494: b5 2e 60 05 sll %i1, 5, %i2
2008498: b4 26 80 01 sub %i2, %g1, %i2
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
200849c: 40 00 0d 2c call 200b94c <_Workspace_Allocate_or_fatal_error>
20084a0: 90 10 00 1a mov %i2, %o0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
20084a4: 03 00 80 75 sethi %hi(0x201d400), %g1
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
20084a8: 37 00 80 75 sethi %hi(0x201d400), %i3
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
20084ac: f2 20 62 84 st %i1, [ %g1 + 0x284 ]
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
20084b0: d0 26 e2 88 st %o0, [ %i3 + 0x288 ]
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
20084b4: 92 10 20 00 clr %o1
20084b8: 40 00 1f 4a call 20101e0 <memset>
20084bc: 94 10 00 1a mov %i2, %o2
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20084c0: 80 a7 20 00 cmp %i4, 0
20084c4: 02 bf ff f1 be 2008488 <_IO_Manager_initialization+0x30> <== NEVER TAKEN
20084c8: f6 06 e2 88 ld [ %i3 + 0x288 ], %i3
20084cc: 82 10 20 00 clr %g1
20084d0: 88 10 20 00 clr %g4
_IO_Driver_address_table[index] = driver_table[index];
20084d4: c4 07 40 01 ld [ %i5 + %g1 ], %g2
20084d8: 86 07 40 01 add %i5, %g1, %g3
20084dc: c4 26 c0 01 st %g2, [ %i3 + %g1 ]
20084e0: f4 00 e0 04 ld [ %g3 + 4 ], %i2
20084e4: 84 06 c0 01 add %i3, %g1, %g2
20084e8: f4 20 a0 04 st %i2, [ %g2 + 4 ]
20084ec: f4 00 e0 08 ld [ %g3 + 8 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20084f0: 88 01 20 01 inc %g4
_IO_Driver_address_table[index] = driver_table[index];
20084f4: f4 20 a0 08 st %i2, [ %g2 + 8 ]
20084f8: f4 00 e0 0c ld [ %g3 + 0xc ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20084fc: 82 00 60 18 add %g1, 0x18, %g1
_IO_Driver_address_table[index] = driver_table[index];
2008500: f4 20 a0 0c st %i2, [ %g2 + 0xc ]
2008504: f4 00 e0 10 ld [ %g3 + 0x10 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2008508: 80 a1 00 1c cmp %g4, %i4
_IO_Driver_address_table[index] = driver_table[index];
200850c: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
2008510: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2008514: 12 bf ff f0 bne 20084d4 <_IO_Manager_initialization+0x7c>
2008518: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
200851c: 81 c7 e0 08 ret
2008520: 81 e8 00 00 restore
0200926c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
200926c: 9d e3 bf a0 save %sp, -96, %sp
* 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 )
2009270: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2009274: ba 10 00 18 mov %i0, %i5
* 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 )
2009278: 80 a0 60 00 cmp %g1, 0
200927c: 02 80 00 19 be 20092e0 <_Objects_Allocate+0x74> <== NEVER TAKEN
2009280: b0 10 20 00 clr %i0
/*
* 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 );
2009284: b8 07 60 20 add %i5, 0x20, %i4
2009288: 7f ff fd 47 call 20087a4 <_Chain_Get>
200928c: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
2009290: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
2009294: 80 a0 60 00 cmp %g1, 0
2009298: 02 80 00 12 be 20092e0 <_Objects_Allocate+0x74>
200929c: b0 10 00 08 mov %o0, %i0
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
20092a0: 80 a2 20 00 cmp %o0, 0
20092a4: 02 80 00 11 be 20092e8 <_Objects_Allocate+0x7c>
20092a8: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
20092ac: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
20092b0: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
20092b4: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
20092b8: 40 00 3d 1a call 2018720 <.udiv>
20092bc: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
20092c0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
20092c4: 91 2a 20 02 sll %o0, 2, %o0
20092c8: c6 00 40 08 ld [ %g1 + %o0 ], %g3
information->inactive--;
20092cc: c4 17 60 2c lduh [ %i5 + 0x2c ], %g2
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20092d0: 86 00 ff ff add %g3, -1, %g3
20092d4: c6 20 40 08 st %g3, [ %g1 + %o0 ]
information->inactive--;
20092d8: 82 00 bf ff add %g2, -1, %g1
20092dc: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
20092e0: 81 c7 e0 08 ret
20092e4: 81 e8 00 00 restore
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
20092e8: 40 00 00 10 call 2009328 <_Objects_Extend_information>
20092ec: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
20092f0: 7f ff fd 2d call 20087a4 <_Chain_Get>
20092f4: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
20092f8: b0 92 20 00 orcc %o0, 0, %i0
20092fc: 32 bf ff ed bne,a 20092b0 <_Objects_Allocate+0x44>
2009300: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
);
}
#endif
return the_object;
}
2009304: 81 c7 e0 08 ret
2009308: 81 e8 00 00 restore
02009328 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
2009328: 9d e3 bf 90 save %sp, -112, %sp
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
200932c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
/*
* 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 );
2009330: f8 16 20 0a lduh [ %i0 + 0xa ], %i4
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
2009334: 80 a4 20 00 cmp %l0, 0
2009338: 02 80 00 a6 be 20095d0 <_Objects_Extend_information+0x2a8>
200933c: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2009340: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2
2009344: b3 2e 60 10 sll %i1, 0x10, %i1
2009348: 92 10 00 1a mov %i2, %o1
200934c: 40 00 3c f5 call 2018720 <.udiv>
2009350: 91 36 60 10 srl %i1, 0x10, %o0
2009354: a7 2a 20 10 sll %o0, 0x10, %l3
2009358: a7 34 e0 10 srl %l3, 0x10, %l3
for ( ; block < block_count; block++ ) {
200935c: 80 a4 e0 00 cmp %l3, 0
2009360: 02 80 00 a3 be 20095ec <_Objects_Extend_information+0x2c4><== NEVER TAKEN
2009364: 90 10 00 1a mov %i2, %o0
if ( information->object_blocks[ block ] == NULL ) {
2009368: c2 04 00 00 ld [ %l0 ], %g1
/*
* 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 );
200936c: ba 10 00 1c mov %i4, %i5
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
2009370: 80 a0 60 00 cmp %g1, 0
2009374: 12 80 00 08 bne 2009394 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN
2009378: b6 10 20 00 clr %i3
do_extend = false;
200937c: 10 80 00 a0 b 20095fc <_Objects_Extend_information+0x2d4> <== NOT EXECUTED
2009380: b4 10 20 00 clr %i2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
2009384: c2 04 00 01 ld [ %l0 + %g1 ], %g1
2009388: 80 a0 60 00 cmp %g1, 0
200938c: 22 80 00 08 be,a 20093ac <_Objects_Extend_information+0x84>
2009390: b4 10 20 00 clr %i2
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2009394: b6 06 e0 01 inc %i3
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
2009398: ba 07 40 1a add %i5, %i2, %i5
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
200939c: 80 a4 c0 1b cmp %l3, %i3
20093a0: 18 bf ff f9 bgu 2009384 <_Objects_Extend_information+0x5c>
20093a4: 83 2e e0 02 sll %i3, 2, %g1
/*
* 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;
20093a8: b4 10 20 01 mov 1, %i2
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
20093ac: b3 36 60 10 srl %i1, 0x10, %i1
/*
* 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 ) {
20093b0: 03 00 00 3f sethi %hi(0xfc00), %g1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
20093b4: b2 06 40 08 add %i1, %o0, %i1
/*
* 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 ) {
20093b8: 82 10 63 ff or %g1, 0x3ff, %g1
20093bc: 80 a6 40 01 cmp %i1, %g1
20093c0: 18 80 00 93 bgu 200960c <_Objects_Extend_information+0x2e4>
20093c4: 01 00 00 00 nop
/*
* 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;
20093c8: 40 00 3c 9c call 2018638 <.umul>
20093cc: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
20093d0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
20093d4: 80 a0 60 00 cmp %g1, 0
20093d8: 02 80 00 6a be 2009580 <_Objects_Extend_information+0x258>
20093dc: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
20093e0: 40 00 09 4d call 200b914 <_Workspace_Allocate>
20093e4: 01 00 00 00 nop
if ( !new_object_block )
20093e8: a0 92 20 00 orcc %o0, 0, %l0
20093ec: 02 80 00 88 be 200960c <_Objects_Extend_information+0x2e4>
20093f0: 01 00 00 00 nop
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
20093f4: 80 8e a0 ff btst 0xff, %i2
20093f8: 22 80 00 3f be,a 20094f4 <_Objects_Extend_information+0x1cc>
20093fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
2009400: b4 04 e0 01 add %l3, 1, %i2
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2009404: 91 2e a0 01 sll %i2, 1, %o0
2009408: 90 02 00 1a add %o0, %i2, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
200940c: 90 06 40 08 add %i1, %o0, %o0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2009410: 90 02 00 1c add %o0, %i4, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
2009414: 40 00 09 40 call 200b914 <_Workspace_Allocate>
2009418: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
200941c: a2 92 20 00 orcc %o0, 0, %l1
2009420: 02 80 00 79 be 2009604 <_Objects_Extend_information+0x2dc>
2009424: b5 2e a0 02 sll %i2, 2, %i2
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2009428: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
200942c: 80 a7 00 01 cmp %i4, %g1
2009430: a4 04 40 1a add %l1, %i2, %l2
2009434: 0a 80 00 57 bcs 2009590 <_Objects_Extend_information+0x268>
2009438: b4 04 80 1a add %l2, %i2, %i2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
200943c: 80 a7 20 00 cmp %i4, 0
2009440: 02 80 00 07 be 200945c <_Objects_Extend_information+0x134><== NEVER TAKEN
2009444: 82 10 20 00 clr %g1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
2009448: 85 28 60 02 sll %g1, 2, %g2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
200944c: 82 00 60 01 inc %g1
2009450: 80 a7 00 01 cmp %i4, %g1
2009454: 18 bf ff fd bgu 2009448 <_Objects_Extend_information+0x120><== NEVER TAKEN
2009458: c0 20 80 1a clr [ %g2 + %i2 ]
200945c: a7 2c e0 02 sll %l3, 2, %l3
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2009460: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2009464: c0 24 40 13 clr [ %l1 + %l3 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2009468: 86 07 40 03 add %i5, %g3, %g3
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
200946c: 80 a7 40 03 cmp %i5, %g3
2009470: 1a 80 00 0a bcc 2009498 <_Objects_Extend_information+0x170><== NEVER TAKEN
2009474: c0 24 80 13 clr [ %l2 + %l3 ]
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
2009478: 83 2f 60 02 sll %i5, 2, %g1
200947c: 84 10 00 1d mov %i5, %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
2009480: 82 06 80 01 add %i2, %g1, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
2009484: c0 20 40 00 clr [ %g1 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
2009488: 84 00 a0 01 inc %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
200948c: 80 a0 c0 02 cmp %g3, %g2
2009490: 18 bf ff fd bgu 2009484 <_Objects_Extend_information+0x15c>
2009494: 82 00 60 04 add %g1, 4, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
2009498: 7f ff e4 88 call 20026b8 <sparc_disable_interrupts>
200949c: 01 00 00 00 nop
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20094a0: c6 06 00 00 ld [ %i0 ], %g3
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(
20094a4: c4 16 20 04 lduh [ %i0 + 4 ], %g2
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
20094a8: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
20094ac: f2 36 20 10 sth %i1, [ %i0 + 0x10 ]
20094b0: 87 28 e0 18 sll %g3, 0x18, %g3
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
20094b4: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
20094b8: e2 26 20 34 st %l1, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
20094bc: e4 26 20 30 st %l2, [ %i0 + 0x30 ]
information->local_table = local_table;
20094c0: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
20094c4: b3 2e 60 10 sll %i1, 0x10, %i1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20094c8: 03 00 00 40 sethi %hi(0x10000), %g1
20094cc: b3 36 60 10 srl %i1, 0x10, %i1
20094d0: 82 10 c0 01 or %g3, %g1, %g1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
20094d4: 82 10 40 02 or %g1, %g2, %g1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20094d8: 82 10 40 19 or %g1, %i1, %g1
20094dc: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
20094e0: 7f ff e4 7a call 20026c8 <sparc_enable_interrupts>
20094e4: 01 00 00 00 nop
_Workspace_Free( old_tables );
20094e8: 40 00 09 13 call 200b934 <_Workspace_Free>
20094ec: 90 10 00 1c mov %i4, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
20094f0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
20094f4: b7 2e e0 02 sll %i3, 2, %i3
20094f8: e0 20 40 1b st %l0, [ %g1 + %i3 ]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
20094fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2009500: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
2009504: d2 00 40 1b ld [ %g1 + %i3 ], %o1
2009508: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
200950c: 90 07 bf f4 add %fp, -12, %o0
2009510: 7f ff fc b4 call 20087e0 <_Chain_Initialize>
2009514: 39 00 00 40 sethi %hi(0x10000), %i4
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2009518: 10 80 00 0d b 200954c <_Objects_Extend_information+0x224>
200951c: b4 06 20 20 add %i0, 0x20, %i2
the_object->id = _Objects_Build_id(
2009520: c6 16 20 04 lduh [ %i0 + 4 ], %g3
2009524: 85 28 a0 18 sll %g2, 0x18, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2009528: 87 28 e0 1b sll %g3, 0x1b, %g3
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
200952c: 84 10 80 1c or %g2, %i4, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2009530: 84 10 80 03 or %g2, %g3, %g2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2009534: 84 10 80 1d or %g2, %i5, %g2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2009538: 90 10 00 1a mov %i2, %o0
200953c: 92 10 00 01 mov %g1, %o1
index++;
2009540: ba 07 60 01 inc %i5
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2009544: 7f ff fc 8d call 2008778 <_Chain_Append>
2009548: c4 20 60 08 st %g2, [ %g1 + 8 ]
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
200954c: 7f ff fc 96 call 20087a4 <_Chain_Get>
2009550: 90 07 bf f4 add %fp, -12, %o0
2009554: 82 92 20 00 orcc %o0, 0, %g1
2009558: 32 bf ff f2 bne,a 2009520 <_Objects_Extend_information+0x1f8>
200955c: c4 06 00 00 ld [ %i0 ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2009560: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
2009564: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
2009568: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
200956c: c8 20 c0 1b st %g4, [ %g3 + %i3 ]
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
2009570: 82 00 80 04 add %g2, %g4, %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
2009574: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2009578: 81 c7 e0 08 ret
200957c: 81 e8 00 00 restore
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
2009580: 40 00 08 f3 call 200b94c <_Workspace_Allocate_or_fatal_error>
2009584: 01 00 00 00 nop
2009588: 10 bf ff 9b b 20093f4 <_Objects_Extend_information+0xcc>
200958c: a0 10 00 08 mov %o0, %l0
/*
* 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,
2009590: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
2009594: a7 2c e0 02 sll %l3, 2, %l3
/*
* 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,
2009598: 40 00 1a d6 call 20100f0 <memcpy>
200959c: 94 10 00 13 mov %l3, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
20095a0: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
20095a4: 94 10 00 13 mov %l3, %o2
20095a8: 40 00 1a d2 call 20100f0 <memcpy>
20095ac: 90 10 00 12 mov %l2, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
20095b0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
20095b4: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
20095b8: b8 07 00 01 add %i4, %g1, %i4
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
20095bc: 90 10 00 1a mov %i2, %o0
20095c0: 40 00 1a cc call 20100f0 <memcpy>
20095c4: 95 2f 20 02 sll %i4, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
20095c8: 10 bf ff a7 b 2009464 <_Objects_Extend_information+0x13c>
20095cc: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
20095d0: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
/*
* 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 );
20095d4: ba 10 00 1c mov %i4, %i5
/*
* 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;
20095d8: b4 10 20 01 mov 1, %i2
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
20095dc: b6 10 20 00 clr %i3
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
20095e0: a6 10 20 00 clr %l3
20095e4: 10 bf ff 72 b 20093ac <_Objects_Extend_information+0x84>
20095e8: b3 2e 60 10 sll %i1, 0x10, %i1
/*
* 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 );
20095ec: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
20095f0: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
20095f4: 10 bf ff 6e b 20093ac <_Objects_Extend_information+0x84> <== NOT EXECUTED
20095f8: b6 10 20 00 clr %i3 <== NOT EXECUTED
20095fc: 10 bf ff 6c b 20093ac <_Objects_Extend_information+0x84> <== NOT EXECUTED
2009600: b6 10 20 00 clr %i3 <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
2009604: 40 00 08 cc call 200b934 <_Workspace_Free>
2009608: 90 10 00 10 mov %l0, %o0
return;
200960c: 81 c7 e0 08 ret
2009610: 81 e8 00 00 restore
020096b8 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
20096b8: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
20096bc: 80 a6 60 00 cmp %i1, 0
20096c0: 02 80 00 17 be 200971c <_Objects_Get_information+0x64>
20096c4: ba 10 20 00 clr %i5
/*
* 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 );
20096c8: 40 00 11 91 call 200dd0c <_Objects_API_maximum_class>
20096cc: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
20096d0: 80 a2 20 00 cmp %o0, 0
20096d4: 02 80 00 12 be 200971c <_Objects_Get_information+0x64>
20096d8: 80 a2 00 19 cmp %o0, %i1
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
20096dc: 0a 80 00 10 bcs 200971c <_Objects_Get_information+0x64>
20096e0: 03 00 80 74 sethi %hi(0x201d000), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
20096e4: b1 2e 20 02 sll %i0, 2, %i0
20096e8: 82 10 63 18 or %g1, 0x318, %g1
20096ec: c2 00 40 18 ld [ %g1 + %i0 ], %g1
20096f0: 80 a0 60 00 cmp %g1, 0
20096f4: 02 80 00 0a be 200971c <_Objects_Get_information+0x64> <== NEVER TAKEN
20096f8: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
20096fc: fa 00 40 19 ld [ %g1 + %i1 ], %i5
if ( !info )
2009700: 80 a7 60 00 cmp %i5, 0
2009704: 02 80 00 06 be 200971c <_Objects_Get_information+0x64> <== NEVER TAKEN
2009708: 01 00 00 00 nop
* 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 )
200970c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1
return NULL;
2009710: 80 a0 00 01 cmp %g0, %g1
2009714: 82 60 20 00 subx %g0, 0, %g1
2009718: ba 0f 40 01 and %i5, %g1, %i5
#endif
return info;
}
200971c: 81 c7 e0 08 ret
2009720: 91 e8 00 1d restore %g0, %i5, %o0
02017798 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
2017798: 9d e3 bf 90 save %sp, -112, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
201779c: 80 a6 60 00 cmp %i1, 0
20177a0: 02 80 00 3c be 2017890 <_Objects_Get_name_as_string+0xf8>
20177a4: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( name == NULL )
20177a8: 02 80 00 35 be 201787c <_Objects_Get_name_as_string+0xe4>
20177ac: 80 a6 20 00 cmp %i0, 0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
20177b0: 02 80 00 35 be 2017884 <_Objects_Get_name_as_string+0xec>
20177b4: 03 00 80 c1 sethi %hi(0x2030400), %g1
information = _Objects_Get_information_id( tmpId );
20177b8: 7f ff e1 94 call 200fe08 <_Objects_Get_information_id>
20177bc: 90 10 00 18 mov %i0, %o0
if ( !information )
20177c0: 80 a2 20 00 cmp %o0, 0
20177c4: 02 80 00 33 be 2017890 <_Objects_Get_name_as_string+0xf8>
20177c8: 92 10 00 18 mov %i0, %o1
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
20177cc: 7f ff e1 cd call 200ff00 <_Objects_Get>
20177d0: 94 07 bf fc add %fp, -4, %o2
switch ( location ) {
20177d4: c2 07 bf fc ld [ %fp + -4 ], %g1
20177d8: 80 a0 60 00 cmp %g1, 0
20177dc: 32 80 00 2e bne,a 2017894 <_Objects_Get_name_as_string+0xfc>
20177e0: b4 10 20 00 clr %i2
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
20177e4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
20177e8: c0 2f bf f4 clrb [ %fp + -12 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
20177ec: 85 30 60 18 srl %g1, 0x18, %g2
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
20177f0: 87 30 60 08 srl %g1, 8, %g3
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
20177f4: 89 30 60 10 srl %g1, 0x10, %g4
lname[ 2 ] = (u32_name >> 8) & 0xff;
20177f8: c6 2f bf f2 stb %g3, [ %fp + -14 ]
lname[ 3 ] = (u32_name >> 0) & 0xff;
20177fc: c2 2f bf f3 stb %g1, [ %fp + -13 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2017800: c4 2f bf f0 stb %g2, [ %fp + -16 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
2017804: c8 2f bf f1 stb %g4, [ %fp + -15 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2017808: 86 10 00 02 mov %g2, %g3
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
201780c: b2 86 7f ff addcc %i1, -1, %i1
2017810: 02 80 00 19 be 2017874 <_Objects_Get_name_as_string+0xdc> <== NEVER TAKEN
2017814: 82 10 00 1a mov %i2, %g1
2017818: 80 a0 a0 00 cmp %g2, 0
201781c: 02 80 00 16 be 2017874 <_Objects_Get_name_as_string+0xdc>
2017820: 1f 00 80 bc sethi %hi(0x202f000), %o7
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
s = lname;
2017824: 84 07 bf f0 add %fp, -16, %g2
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
2017828: b2 06 80 19 add %i2, %i1, %i1
201782c: 10 80 00 05 b 2017840 <_Objects_Get_name_as_string+0xa8>
2017830: 9e 13 e3 58 or %o7, 0x358, %o7
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2017834: 80 a1 20 00 cmp %g4, 0
2017838: 02 80 00 0f be 2017874 <_Objects_Get_name_as_string+0xdc>
201783c: c6 08 80 00 ldub [ %g2 ], %g3
*d = (isprint((unsigned char)*s)) ? *s : '*';
2017840: f0 03 c0 00 ld [ %o7 ], %i0
2017844: 88 08 e0 ff and %g3, 0xff, %g4
2017848: 88 06 00 04 add %i0, %g4, %g4
201784c: c8 49 20 01 ldsb [ %g4 + 1 ], %g4
2017850: 80 89 20 97 btst 0x97, %g4
2017854: 12 80 00 03 bne 2017860 <_Objects_Get_name_as_string+0xc8>
2017858: 84 00 a0 01 inc %g2
201785c: 86 10 20 2a mov 0x2a, %g3
2017860: c6 28 40 00 stb %g3, [ %g1 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2017864: 82 00 60 01 inc %g1
2017868: 80 a0 40 19 cmp %g1, %i1
201786c: 32 bf ff f2 bne,a 2017834 <_Objects_Get_name_as_string+0x9c>
2017870: c8 48 80 00 ldsb [ %g2 ], %g4
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
2017874: 7f ff e5 cb call 2010fa0 <_Thread_Enable_dispatch>
2017878: c0 28 40 00 clrb [ %g1 ]
return name;
}
return NULL; /* unreachable path */
}
201787c: 81 c7 e0 08 ret
2017880: 91 e8 00 1a restore %g0, %i2, %o0
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2017884: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1
2017888: 10 bf ff cc b 20177b8 <_Objects_Get_name_as_string+0x20>
201788c: f0 00 60 08 ld [ %g1 + 8 ], %i0
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
2017890: b4 10 20 00 clr %i2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
2017894: 81 c7 e0 08 ret
2017898: 91 e8 00 1a restore %g0, %i2, %o0
02019d9c <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
2019d9c: 9d e3 bf a0 save %sp, -96, %sp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
2019da0: 90 10 20 00 clr %o0
)
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
2019da4: 80 a6 20 00 cmp %i0, 0
2019da8: 02 80 00 19 be 2019e0c <_Objects_Get_next+0x70>
2019dac: ba 10 00 18 mov %i0, %i5
return NULL;
if ( !location_p )
2019db0: 80 a6 a0 00 cmp %i2, 0
2019db4: 02 80 00 16 be 2019e0c <_Objects_Get_next+0x70>
2019db8: 80 a6 e0 00 cmp %i3, 0
return NULL;
if ( !next_id_p )
2019dbc: 02 80 00 14 be 2019e0c <_Objects_Get_next+0x70>
2019dc0: 83 2e 60 10 sll %i1, 0x10, %g1
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
2019dc4: 80 a0 60 00 cmp %g1, 0
2019dc8: 22 80 00 13 be,a 2019e14 <_Objects_Get_next+0x78>
2019dcc: f2 06 20 08 ld [ %i0 + 8 ], %i1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019dd0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2019dd4: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019dd8: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019ddc: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019de0: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019de4: 80 a0 80 01 cmp %g2, %g1
2019de8: 0a 80 00 13 bcs 2019e34 <_Objects_Get_next+0x98>
2019dec: 94 10 00 1a mov %i2, %o2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019df0: 7f ff d8 44 call 200ff00 <_Objects_Get>
2019df4: b2 06 60 01 inc %i1
next_id++;
} while (*location_p != OBJECTS_LOCAL);
2019df8: c2 06 80 00 ld [ %i2 ], %g1
2019dfc: 80 a0 60 00 cmp %g1, 0
2019e00: 32 bf ff f5 bne,a 2019dd4 <_Objects_Get_next+0x38>
2019e04: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
*next_id_p = next_id;
2019e08: f2 26 c0 00 st %i1, [ %i3 ]
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
2019e0c: 81 c7 e0 08 ret
2019e10: 91 e8 00 08 restore %g0, %o0, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019e14: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2019e18: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019e1c: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019e20: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019e24: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019e28: 80 a0 80 01 cmp %g2, %g1
2019e2c: 1a bf ff f1 bcc 2019df0 <_Objects_Get_next+0x54> <== ALWAYS TAKEN
2019e30: 94 10 00 1a mov %i2, %o2
{
*location_p = OBJECTS_ERROR;
2019e34: 82 10 20 01 mov 1, %g1
2019e38: c2 26 80 00 st %g1, [ %i2 ]
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
2019e3c: 90 10 20 00 clr %o0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
2019e40: 82 10 3f ff mov -1, %g1
2019e44: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
2019e48: 81 c7 e0 08 ret
2019e4c: 91 e8 00 08 restore %g0, %o0, %o0
0200ff78 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
200ff78: 9d e3 bf 98 save %sp, -104, %sp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
200ff7c: 80 a6 20 00 cmp %i0, 0
200ff80: 12 80 00 06 bne 200ff98 <_Objects_Id_to_name+0x20>
200ff84: 83 36 20 18 srl %i0, 0x18, %g1
200ff88: 03 00 80 c1 sethi %hi(0x2030400), %g1
200ff8c: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 20306ec <_Per_CPU_Information+0xc>
200ff90: f0 00 60 08 ld [ %g1 + 8 ], %i0
200ff94: 83 36 20 18 srl %i0, 0x18, %g1
200ff98: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
200ff9c: 84 00 7f ff add %g1, -1, %g2
200ffa0: 80 a0 a0 02 cmp %g2, 2
200ffa4: 18 80 00 17 bgu 2010000 <_Objects_Id_to_name+0x88>
200ffa8: ba 10 20 03 mov 3, %i5
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
200ffac: 83 28 60 02 sll %g1, 2, %g1
200ffb0: 05 00 80 c0 sethi %hi(0x2030000), %g2
200ffb4: 84 10 a3 d8 or %g2, 0x3d8, %g2 ! 20303d8 <_Objects_Information_table>
200ffb8: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200ffbc: 80 a0 60 00 cmp %g1, 0
200ffc0: 02 80 00 10 be 2010000 <_Objects_Id_to_name+0x88>
200ffc4: 85 36 20 1b srl %i0, 0x1b, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
200ffc8: 85 28 a0 02 sll %g2, 2, %g2
200ffcc: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
200ffd0: 80 a2 20 00 cmp %o0, 0
200ffd4: 02 80 00 0b be 2010000 <_Objects_Id_to_name+0x88> <== NEVER TAKEN
200ffd8: 92 10 00 18 mov %i0, %o1
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
200ffdc: 7f ff ff c9 call 200ff00 <_Objects_Get>
200ffe0: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
200ffe4: 80 a2 20 00 cmp %o0, 0
200ffe8: 02 80 00 06 be 2010000 <_Objects_Id_to_name+0x88>
200ffec: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
200fff0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
200fff4: ba 10 20 00 clr %i5
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
200fff8: 40 00 03 ea call 2010fa0 <_Thread_Enable_dispatch>
200fffc: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
2010000: 81 c7 e0 08 ret
2010004: 91 e8 00 1d restore %g0, %i5, %o0
020099a4 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
20099a4: 9d e3 bf a0 save %sp, -96, %sp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
20099a8: fa 16 20 0a lduh [ %i0 + 0xa ], %i5
block_count = (information->maximum - index_base) /
20099ac: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4
20099b0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
20099b4: 92 10 00 1c mov %i4, %o1
20099b8: 40 00 3b 5a call 2018720 <.udiv>
20099bc: 90 22 00 1d sub %o0, %i5, %o0
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
20099c0: 80 a2 20 00 cmp %o0, 0
20099c4: 02 80 00 34 be 2009a94 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN
20099c8: 01 00 00 00 nop
if ( information->inactive_per_block[ block ] ==
20099cc: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
20099d0: c2 01 00 00 ld [ %g4 ], %g1
20099d4: 80 a7 00 01 cmp %i4, %g1
20099d8: 02 80 00 0f be 2009a14 <_Objects_Shrink_information+0x70> <== NEVER TAKEN
20099dc: 82 10 20 00 clr %g1
20099e0: 10 80 00 07 b 20099fc <_Objects_Shrink_information+0x58>
20099e4: b6 10 20 04 mov 4, %i3
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
20099e8: 86 06 e0 04 add %i3, 4, %g3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
20099ec: 80 a7 00 02 cmp %i4, %g2
20099f0: 02 80 00 0a be 2009a18 <_Objects_Shrink_information+0x74>
20099f4: ba 07 40 1c add %i5, %i4, %i5
20099f8: b6 10 00 03 mov %g3, %i3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
20099fc: 82 00 60 01 inc %g1
2009a00: 80 a0 40 08 cmp %g1, %o0
2009a04: 32 bf ff f9 bne,a 20099e8 <_Objects_Shrink_information+0x44>
2009a08: c4 01 00 1b ld [ %g4 + %i3 ], %g2
2009a0c: 81 c7 e0 08 ret
2009a10: 81 e8 00 00 restore
if ( information->inactive_per_block[ block ] ==
2009a14: b6 10 20 00 clr %i3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2009a18: 10 80 00 06 b 2009a30 <_Objects_Shrink_information+0x8c>
2009a1c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
2009a20: 80 a7 20 00 cmp %i4, 0
2009a24: 22 80 00 12 be,a 2009a6c <_Objects_Shrink_information+0xc8>
2009a28: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
2009a2c: 90 10 00 1c mov %i4, %o0
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
2009a30: c2 12 20 0a lduh [ %o0 + 0xa ], %g1
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
2009a34: 80 a0 40 1d cmp %g1, %i5
2009a38: 0a bf ff fa bcs 2009a20 <_Objects_Shrink_information+0x7c>
2009a3c: f8 02 00 00 ld [ %o0 ], %i4
(index < (index_base + information->allocation_size))) {
2009a40: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
2009a44: 84 07 40 02 add %i5, %g2, %g2
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
2009a48: 80 a0 40 02 cmp %g1, %g2
2009a4c: 1a bf ff f6 bcc 2009a24 <_Objects_Shrink_information+0x80>
2009a50: 80 a7 20 00 cmp %i4, 0
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
2009a54: 40 00 0e d5 call 200d5a8 <_Chain_Extract>
2009a58: 01 00 00 00 nop
}
}
while ( the_object );
2009a5c: 80 a7 20 00 cmp %i4, 0
2009a60: 12 bf ff f4 bne 2009a30 <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN
2009a64: 90 10 00 1c mov %i4, %o0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2009a68: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
2009a6c: 40 00 07 b2 call 200b934 <_Workspace_Free>
2009a70: d0 00 40 1b ld [ %g1 + %i3 ], %o0
information->object_blocks[ block ] = NULL;
2009a74: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2009a78: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2009a7c: c0 20 40 1b clr [ %g1 + %i3 ]
information->inactive_per_block[ block ] = 0;
2009a80: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive -= information->allocation_size;
2009a84: c2 16 20 14 lduh [ %i0 + 0x14 ], %g1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
2009a88: c0 20 c0 1b clr [ %g3 + %i3 ]
information->inactive -= information->allocation_size;
2009a8c: 82 20 80 01 sub %g2, %g1, %g1
2009a90: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
return;
2009a94: 81 c7 e0 08 ret
2009a98: 81 e8 00 00 restore
0200a9e4 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200a9e4: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
200a9e8: 80 a6 60 00 cmp %i1, 0
200a9ec: 02 80 00 4c be 200ab1c <_RBTree_Extract_unprotected+0x138>
200a9f0: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
200a9f4: c2 06 20 08 ld [ %i0 + 8 ], %g1
200a9f8: 80 a0 40 19 cmp %g1, %i1
200a9fc: 22 80 00 59 be,a 200ab60 <_RBTree_Extract_unprotected+0x17c>
200aa00: c2 06 60 08 ld [ %i1 + 8 ], %g1
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
200aa04: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200aa08: 80 a0 40 19 cmp %g1, %i1
200aa0c: 22 80 00 46 be,a 200ab24 <_RBTree_Extract_unprotected+0x140>
200aa10: c2 06 60 04 ld [ %i1 + 4 ], %g1
* 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]) {
200aa14: fa 06 60 04 ld [ %i1 + 4 ], %i5
200aa18: 80 a7 60 00 cmp %i5, 0
200aa1c: 22 80 00 4a be,a 200ab44 <_RBTree_Extract_unprotected+0x160>
200aa20: f8 06 60 08 ld [ %i1 + 8 ], %i4
200aa24: c2 06 60 08 ld [ %i1 + 8 ], %g1
200aa28: 80 a0 60 00 cmp %g1, 0
200aa2c: 32 80 00 05 bne,a 200aa40 <_RBTree_Extract_unprotected+0x5c>
200aa30: c2 07 60 08 ld [ %i5 + 8 ], %g1
200aa34: 10 80 00 50 b 200ab74 <_RBTree_Extract_unprotected+0x190>
200aa38: b8 10 00 1d mov %i5, %i4
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
200aa3c: c2 07 60 08 ld [ %i5 + 8 ], %g1
200aa40: 80 a0 60 00 cmp %g1, 0
200aa44: 32 bf ff fe bne,a 200aa3c <_RBTree_Extract_unprotected+0x58>
200aa48: ba 10 00 01 mov %g1, %i5
* 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];
200aa4c: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
200aa50: 80 a7 20 00 cmp %i4, 0
200aa54: 02 80 00 54 be 200aba4 <_RBTree_Extract_unprotected+0x1c0>
200aa58: 01 00 00 00 nop
leaf->parent = target->parent;
200aa5c: c2 07 40 00 ld [ %i5 ], %g1
200aa60: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200aa64: c4 07 40 00 ld [ %i5 ], %g2
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200aa68: c2 06 40 00 ld [ %i1 ], %g1
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200aa6c: c8 00 a0 04 ld [ %g2 + 4 ], %g4
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;
200aa70: c6 07 60 0c ld [ %i5 + 0xc ], %g3
dir = target != target->parent->child[0];
200aa74: 88 19 00 1d xor %g4, %i5, %g4
200aa78: 80 a0 00 04 cmp %g0, %g4
200aa7c: 88 40 20 00 addx %g0, 0, %g4
target->parent->child[dir] = leaf;
200aa80: 89 29 20 02 sll %g4, 2, %g4
200aa84: 84 00 80 04 add %g2, %g4, %g2
200aa88: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200aa8c: c4 00 60 04 ld [ %g1 + 4 ], %g2
200aa90: 84 18 80 19 xor %g2, %i1, %g2
200aa94: 80 a0 00 02 cmp %g0, %g2
200aa98: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = target;
200aa9c: 85 28 a0 02 sll %g2, 2, %g2
200aaa0: 82 00 40 02 add %g1, %g2, %g1
200aaa4: fa 20 60 04 st %i5, [ %g1 + 4 ]
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
200aaa8: c2 06 60 08 ld [ %i1 + 8 ], %g1
200aaac: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
200aab0: c2 06 60 08 ld [ %i1 + 8 ], %g1
200aab4: 80 a0 60 00 cmp %g1, 0
200aab8: 32 80 00 02 bne,a 200aac0 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN
200aabc: fa 20 40 00 st %i5, [ %g1 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
200aac0: c2 06 60 04 ld [ %i1 + 4 ], %g1
200aac4: c2 27 60 04 st %g1, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
200aac8: c2 06 60 04 ld [ %i1 + 4 ], %g1
200aacc: 80 a0 60 00 cmp %g1, 0
200aad0: 32 80 00 02 bne,a 200aad8 <_RBTree_Extract_unprotected+0xf4>
200aad4: fa 20 40 00 st %i5, [ %g1 ]
/* 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;
200aad8: c4 06 40 00 ld [ %i1 ], %g2
target->color = the_node->color;
200aadc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* 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;
200aae0: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
200aae4: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/* 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 */
200aae8: 80 a0 e0 00 cmp %g3, 0
200aaec: 32 80 00 06 bne,a 200ab04 <_RBTree_Extract_unprotected+0x120>
200aaf0: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
200aaf4: 80 a7 20 00 cmp %i4, 0
200aaf8: 32 80 00 02 bne,a 200ab00 <_RBTree_Extract_unprotected+0x11c>
200aafc: c0 27 20 0c clr [ %i4 + 0xc ]
/* 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;
200ab00: c2 06 20 04 ld [ %i0 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
200ab04: c0 26 60 08 clr [ %i1 + 8 ]
200ab08: c0 26 60 04 clr [ %i1 + 4 ]
200ab0c: 80 a0 60 00 cmp %g1, 0
200ab10: 02 80 00 03 be 200ab1c <_RBTree_Extract_unprotected+0x138>
200ab14: c0 26 40 00 clr [ %i1 ]
200ab18: c0 20 60 0c clr [ %g1 + 0xc ]
200ab1c: 81 c7 e0 08 ret
200ab20: 81 e8 00 00 restore
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
200ab24: 80 a0 60 00 cmp %g1, 0
200ab28: 22 80 00 28 be,a 200abc8 <_RBTree_Extract_unprotected+0x1e4>
200ab2c: c2 06 40 00 ld [ %i1 ], %g1
* 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]) {
200ab30: fa 06 60 04 ld [ %i1 + 4 ], %i5
200ab34: 80 a7 60 00 cmp %i5, 0
200ab38: 12 bf ff bb bne 200aa24 <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN
200ab3c: c2 26 20 0c st %g1, [ %i0 + 0xc ]
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
200ab40: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
if( leaf ) {
200ab44: 80 a7 20 00 cmp %i4, 0
200ab48: 32 80 00 0c bne,a 200ab78 <_RBTree_Extract_unprotected+0x194>
200ab4c: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
200ab50: 7f ff fe d0 call 200a690 <_RBTree_Extract_validate_unprotected>
200ab54: 90 10 00 19 mov %i1, %o0
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200ab58: 10 80 00 0a b 200ab80 <_RBTree_Extract_unprotected+0x19c>
200ab5c: c2 06 40 00 ld [ %i1 ], %g1
if (!the_node) return;
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
200ab60: 80 a0 60 00 cmp %g1, 0
200ab64: 22 80 00 14 be,a 200abb4 <_RBTree_Extract_unprotected+0x1d0>
200ab68: c2 06 40 00 ld [ %i1 ], %g1
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
200ab6c: 10 bf ff a6 b 200aa04 <_RBTree_Extract_unprotected+0x20>
200ab70: c2 26 20 08 st %g1, [ %i0 + 8 ]
* 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;
200ab74: c2 06 40 00 ld [ %i1 ], %g1
200ab78: c2 27 00 00 st %g1, [ %i4 ]
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200ab7c: c2 06 40 00 ld [ %i1 ], %g1
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;
200ab80: c6 06 60 0c ld [ %i1 + 0xc ], %g3
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200ab84: c4 00 60 04 ld [ %g1 + 4 ], %g2
200ab88: 84 18 80 19 xor %g2, %i1, %g2
200ab8c: 80 a0 00 02 cmp %g0, %g2
200ab90: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = leaf;
200ab94: 85 28 a0 02 sll %g2, 2, %g2
200ab98: 82 00 40 02 add %g1, %g2, %g1
200ab9c: 10 bf ff d3 b 200aae8 <_RBTree_Extract_unprotected+0x104>
200aba0: f8 20 60 04 st %i4, [ %g1 + 4 ]
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
200aba4: 7f ff fe bb call 200a690 <_RBTree_Extract_validate_unprotected>
200aba8: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
200abac: 10 bf ff af b 200aa68 <_RBTree_Extract_unprotected+0x84>
200abb0: c4 07 40 00 ld [ %i5 ], %g2
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200abb4: 80 a6 00 01 cmp %i0, %g1
200abb8: 12 bf ff 93 bne 200aa04 <_RBTree_Extract_unprotected+0x20>
200abbc: c2 26 20 08 st %g1, [ %i0 + 8 ]
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
200abc0: 10 bf ff 91 b 200aa04 <_RBTree_Extract_unprotected+0x20>
200abc4: c0 26 20 08 clr [ %i0 + 8 ]
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200abc8: 80 a6 00 01 cmp %i0, %g1
200abcc: 12 bf ff 92 bne 200aa14 <_RBTree_Extract_unprotected+0x30>
200abd0: c2 26 20 0c st %g1, [ %i0 + 0xc ]
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
200abd4: 10 bf ff 90 b 200aa14 <_RBTree_Extract_unprotected+0x30>
200abd8: c0 26 20 0c clr [ %i0 + 0xc ]
0200a690 <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
200a690: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
200a694: c2 06 00 00 ld [ %i0 ], %g1
if(!parent->parent) return;
200a698: c4 00 40 00 ld [ %g1 ], %g2
200a69c: 80 a0 a0 00 cmp %g2, 0
200a6a0: 02 80 00 ca be 200a9c8 <_RBTree_Extract_validate_unprotected+0x338>
200a6a4: 01 00 00 00 nop
{
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])
200a6a8: c4 00 60 04 ld [ %g1 + 4 ], %g2
200a6ac: 80 a6 00 02 cmp %i0, %g2
200a6b0: 22 80 00 02 be,a 200a6b8 <_RBTree_Extract_validate_unprotected+0x28>
200a6b4: c4 00 60 08 ld [ %g1 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a6b8: c6 06 20 0c ld [ %i0 + 0xc ], %g3
200a6bc: 80 a0 e0 01 cmp %g3, 1
200a6c0: 22 80 00 5e be,a 200a838 <_RBTree_Extract_validate_unprotected+0x1a8>
200a6c4: c2 06 00 00 ld [ %i0 ], %g1
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
200a6c8: c6 00 40 00 ld [ %g1 ], %g3
200a6cc: 80 a0 e0 00 cmp %g3, 0
200a6d0: 02 80 00 59 be 200a834 <_RBTree_Extract_validate_unprotected+0x1a4>
200a6d4: 80 a0 a0 00 cmp %g2, 0
200a6d8: 22 80 00 07 be,a 200a6f4 <_RBTree_Extract_validate_unprotected+0x64><== NEVER TAKEN
200a6dc: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED
200a6e0: c8 00 a0 0c ld [ %g2 + 0xc ], %g4
200a6e4: 80 a1 20 01 cmp %g4, 1
200a6e8: 22 80 00 29 be,a 200a78c <_RBTree_Extract_validate_unprotected+0xfc>
200a6ec: de 00 60 04 ld [ %g1 + 4 ], %o7
_RBTree_Rotate(parent, dir);
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
200a6f0: c6 00 a0 08 ld [ %g2 + 8 ], %g3
200a6f4: 80 a0 e0 00 cmp %g3, 0
200a6f8: 22 80 00 07 be,a 200a714 <_RBTree_Extract_validate_unprotected+0x84>
200a6fc: c8 00 a0 04 ld [ %g2 + 4 ], %g4
200a700: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
200a704: 80 a1 20 01 cmp %g4, 1
200a708: 22 80 00 52 be,a 200a850 <_RBTree_Extract_validate_unprotected+0x1c0>
200a70c: c8 00 60 04 ld [ %g1 + 4 ], %g4
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
200a710: c8 00 a0 04 ld [ %g2 + 4 ], %g4
200a714: 80 a1 20 00 cmp %g4, 0
200a718: 22 80 00 07 be,a 200a734 <_RBTree_Extract_validate_unprotected+0xa4>
200a71c: 86 10 20 01 mov 1, %g3
200a720: c8 01 20 0c ld [ %g4 + 0xc ], %g4
200a724: 80 a1 20 01 cmp %g4, 1
200a728: 22 80 00 4a be,a 200a850 <_RBTree_Extract_validate_unprotected+0x1c0>
200a72c: c8 00 60 04 ld [ %g1 + 4 ], %g4
sibling->color = RBT_RED;
200a730: 86 10 20 01 mov 1, %g3
200a734: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
200a738: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200a73c: 80 a0 a0 01 cmp %g2, 1
200a740: 22 80 00 3d be,a 200a834 <_RBTree_Extract_validate_unprotected+0x1a4>
200a744: c0 20 60 0c clr [ %g1 + 0xc ]
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
200a748: c6 00 40 00 ld [ %g1 ], %g3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200a74c: 80 a0 e0 00 cmp %g3, 0
200a750: 02 80 00 0a be 200a778 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN
200a754: 84 10 20 00 clr %g2
if(!(the_node->parent->parent)) return NULL;
200a758: c8 00 c0 00 ld [ %g3 ], %g4
200a75c: 80 a1 20 00 cmp %g4, 0
200a760: 02 80 00 07 be 200a77c <_RBTree_Extract_validate_unprotected+0xec>
200a764: b0 10 00 01 mov %g1, %i0
if(the_node == the_node->parent->child[RBT_LEFT])
200a768: c4 00 e0 04 ld [ %g3 + 4 ], %g2
200a76c: 80 a0 40 02 cmp %g1, %g2
200a770: 22 80 00 05 be,a 200a784 <_RBTree_Extract_validate_unprotected+0xf4>
200a774: c4 00 e0 08 ld [ %g3 + 8 ], %g2
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
200a778: b0 10 00 01 mov %g1, %i0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200a77c: 10 bf ff cf b 200a6b8 <_RBTree_Extract_validate_unprotected+0x28>
200a780: 82 10 00 03 mov %g3, %g1
200a784: 10 bf ff cd b 200a6b8 <_RBTree_Extract_validate_unprotected+0x28>
200a788: 82 10 00 03 mov %g3, %g1
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
200a78c: c8 20 60 0c st %g4, [ %g1 + 0xc ]
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
200a790: 88 1b c0 18 xor %o7, %i0, %g4
200a794: 80 a0 00 04 cmp %g0, %g4
200a798: 9a 40 20 00 addx %g0, 0, %o5
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a79c: 98 1b 60 01 xor %o5, 1, %o4
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a7a0: 89 2b 20 02 sll %o4, 2, %g4
200a7a4: 96 00 40 04 add %g1, %g4, %o3
200a7a8: d6 02 e0 04 ld [ %o3 + 4 ], %o3
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
200a7ac: c0 20 a0 0c clr [ %g2 + 0xc ]
200a7b0: 80 a2 e0 00 cmp %o3, 0
200a7b4: 02 bf ff cf be 200a6f0 <_RBTree_Extract_validate_unprotected+0x60><== NEVER TAKEN
200a7b8: 84 10 20 00 clr %g2
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a7bc: 80 a3 20 00 cmp %o4, 0
200a7c0: 02 80 00 04 be 200a7d0 <_RBTree_Extract_validate_unprotected+0x140>
200a7c4: 96 10 20 00 clr %o3
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200a7c8: de 00 60 08 ld [ %g1 + 8 ], %o7
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a7cc: 96 10 20 01 mov 1, %o3
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a7d0: 9b 2b 60 02 sll %o5, 2, %o5
200a7d4: 84 03 c0 0d add %o7, %o5, %g2
200a7d8: d8 00 a0 04 ld [ %g2 + 4 ], %o4
200a7dc: 97 2a e0 02 sll %o3, 2, %o3
200a7e0: 96 00 40 0b add %g1, %o3, %o3
200a7e4: d8 22 e0 04 st %o4, [ %o3 + 4 ]
if (c->child[dir])
200a7e8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200a7ec: 80 a0 a0 00 cmp %g2, 0
200a7f0: 02 80 00 04 be 200a800 <_RBTree_Extract_validate_unprotected+0x170><== NEVER TAKEN
200a7f4: 9a 03 c0 0d add %o7, %o5, %o5
c->child[dir]->parent = the_node;
200a7f8: c2 20 80 00 st %g1, [ %g2 ]
200a7fc: c6 00 40 00 ld [ %g1 ], %g3
c->child[dir] = the_node;
200a800: c2 23 60 04 st %g1, [ %o5 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a804: c4 00 e0 04 ld [ %g3 + 4 ], %g2
c->parent = the_node->parent;
200a808: c6 23 c0 00 st %g3, [ %o7 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a80c: 84 18 40 02 xor %g1, %g2, %g2
200a810: 80 a0 00 02 cmp %g0, %g2
200a814: 84 40 20 00 addx %g0, 0, %g2
200a818: 85 28 a0 02 sll %g2, 2, %g2
200a81c: 84 00 c0 02 add %g3, %g2, %g2
c->parent = the_node->parent;
the_node->parent = c;
200a820: 88 00 40 04 add %g1, %g4, %g4
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a824: de 20 a0 04 st %o7, [ %g2 + 4 ]
c->parent = the_node->parent;
the_node->parent = c;
200a828: de 20 40 00 st %o7, [ %g1 ]
200a82c: 10 bf ff b1 b 200a6f0 <_RBTree_Extract_validate_unprotected+0x60>
200a830: c4 01 20 04 ld [ %g4 + 4 ], %g2
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200a834: c2 06 00 00 ld [ %i0 ], %g1
200a838: c2 00 40 00 ld [ %g1 ], %g1
200a83c: 80 a0 60 00 cmp %g1, 0
200a840: 22 80 00 02 be,a 200a848 <_RBTree_Extract_validate_unprotected+0x1b8>
200a844: c0 26 20 0c clr [ %i0 + 0xc ]
200a848: 81 c7 e0 08 ret
200a84c: 81 e8 00 00 restore
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
200a850: 88 19 00 18 xor %g4, %i0, %g4
200a854: 80 a0 00 04 cmp %g0, %g4
200a858: 9a 40 20 00 addx %g0, 0, %o5
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a85c: 98 1b 60 01 xor %o5, 1, %o4
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
200a860: 9f 2b 20 02 sll %o4, 2, %o7
200a864: 88 00 80 0f add %g2, %o7, %g4
200a868: c8 01 20 04 ld [ %g4 + 4 ], %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a86c: 80 a1 20 00 cmp %g4, 0
200a870: 02 80 00 06 be 200a888 <_RBTree_Extract_validate_unprotected+0x1f8>
200a874: 96 10 20 01 mov 1, %o3
200a878: d6 01 20 0c ld [ %g4 + 0xc ], %o3
200a87c: 80 a2 e0 01 cmp %o3, 1
200a880: 02 80 00 56 be 200a9d8 <_RBTree_Extract_validate_unprotected+0x348>
200a884: 96 10 20 01 mov 1, %o3
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
200a888: 89 2b 60 02 sll %o5, 2, %g4
200a88c: 88 00 80 04 add %g2, %g4, %g4
200a890: d4 01 20 04 ld [ %g4 + 4 ], %o2
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
sibling->color = RBT_RED;
200a894: d6 20 a0 0c st %o3, [ %g2 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a898: 88 1b 20 01 xor %o4, 1, %g4
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a89c: 97 29 20 02 sll %g4, 2, %o3
200a8a0: 96 00 80 0b add %g2, %o3, %o3
200a8a4: d6 02 e0 04 ld [ %o3 + 4 ], %o3
200a8a8: 80 a2 e0 00 cmp %o3, 0
200a8ac: 02 80 00 1c be 200a91c <_RBTree_Extract_validate_unprotected+0x28c><== NEVER TAKEN
200a8b0: c0 22 a0 0c clr [ %o2 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a8b4: 80 a1 20 00 cmp %g4, 0
200a8b8: 12 80 00 04 bne 200a8c8 <_RBTree_Extract_validate_unprotected+0x238>
200a8bc: 96 10 20 01 mov 1, %o3
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200a8c0: c6 00 a0 04 ld [ %g2 + 4 ], %g3
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a8c4: 96 10 20 00 clr %o3
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a8c8: 88 00 c0 0f add %g3, %o7, %g4
200a8cc: d4 01 20 04 ld [ %g4 + 4 ], %o2
200a8d0: 97 2a e0 02 sll %o3, 2, %o3
200a8d4: 96 00 80 0b add %g2, %o3, %o3
200a8d8: d4 22 e0 04 st %o2, [ %o3 + 4 ]
if (c->child[dir])
200a8dc: c8 01 20 04 ld [ %g4 + 4 ], %g4
200a8e0: 80 a1 20 00 cmp %g4, 0
200a8e4: 32 80 00 02 bne,a 200a8ec <_RBTree_Extract_validate_unprotected+0x25c>
200a8e8: c4 21 00 00 st %g2, [ %g4 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a8ec: c8 00 80 00 ld [ %g2 ], %g4
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200a8f0: 96 00 c0 0f add %g3, %o7, %o3
200a8f4: c4 22 e0 04 st %g2, [ %o3 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a8f8: d6 01 20 04 ld [ %g4 + 4 ], %o3
c->parent = the_node->parent;
200a8fc: c8 20 c0 00 st %g4, [ %g3 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a900: 96 18 80 0b xor %g2, %o3, %o3
c->parent = the_node->parent;
the_node->parent = c;
200a904: c6 20 80 00 st %g3, [ %g2 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a908: 80 a0 00 0b cmp %g0, %o3
200a90c: 84 40 20 00 addx %g0, 0, %g2
200a910: 85 28 a0 02 sll %g2, 2, %g2
200a914: 88 01 00 02 add %g4, %g2, %g4
200a918: c6 21 20 04 st %g3, [ %g4 + 4 ]
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
200a91c: 84 00 40 0f add %g1, %o7, %g2
200a920: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200a924: 9e 00 80 0f add %g2, %o7, %o7
200a928: c8 03 e0 04 ld [ %o7 + 4 ], %g4
200a92c: 9e 10 00 02 mov %g2, %o7
}
sibling->color = parent->color;
200a930: c6 00 60 0c ld [ %g1 + 0xc ], %g3
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a934: 80 a3 e0 00 cmp %o7, 0
200a938: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
parent->color = RBT_BLACK;
200a93c: c0 20 60 0c clr [ %g1 + 0xc ]
200a940: 02 bf ff bd be 200a834 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
200a944: c0 21 20 0c clr [ %g4 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a948: 80 a3 20 00 cmp %o4, 0
200a94c: 22 80 00 21 be,a 200a9d0 <_RBTree_Extract_validate_unprotected+0x340>
200a950: c4 00 60 04 ld [ %g1 + 4 ], %g2
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200a954: c4 00 60 08 ld [ %g1 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a958: 88 10 20 01 mov 1, %g4
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a95c: 9b 2b 60 02 sll %o5, 2, %o5
200a960: 86 00 80 0d add %g2, %o5, %g3
200a964: de 00 e0 04 ld [ %g3 + 4 ], %o7
200a968: 89 29 20 02 sll %g4, 2, %g4
200a96c: 88 00 40 04 add %g1, %g4, %g4
200a970: de 21 20 04 st %o7, [ %g4 + 4 ]
if (c->child[dir])
200a974: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200a978: 80 a0 e0 00 cmp %g3, 0
200a97c: 32 80 00 02 bne,a 200a984 <_RBTree_Extract_validate_unprotected+0x2f4>
200a980: c2 20 c0 00 st %g1, [ %g3 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a984: c6 00 40 00 ld [ %g1 ], %g3
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200a988: 9a 00 80 0d add %g2, %o5, %o5
200a98c: c2 23 60 04 st %g1, [ %o5 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a990: c8 00 e0 04 ld [ %g3 + 4 ], %g4
c->parent = the_node->parent;
200a994: c6 20 80 00 st %g3, [ %g2 ]
the_node->parent = c;
200a998: c4 20 40 00 st %g2, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a99c: 88 18 40 04 xor %g1, %g4, %g4
200a9a0: 80 a0 00 04 cmp %g0, %g4
200a9a4: 82 40 20 00 addx %g0, 0, %g1
200a9a8: 83 28 60 02 sll %g1, 2, %g1
200a9ac: 86 00 c0 01 add %g3, %g1, %g3
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200a9b0: c2 06 00 00 ld [ %i0 ], %g1
200a9b4: c4 20 e0 04 st %g2, [ %g3 + 4 ]
200a9b8: c2 00 40 00 ld [ %g1 ], %g1
200a9bc: 80 a0 60 00 cmp %g1, 0
200a9c0: 22 bf ff a2 be,a 200a848 <_RBTree_Extract_validate_unprotected+0x1b8><== NEVER TAKEN
200a9c4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
200a9c8: 81 c7 e0 08 ret
200a9cc: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a9d0: 10 bf ff e3 b 200a95c <_RBTree_Extract_validate_unprotected+0x2cc>
200a9d4: 88 10 20 00 clr %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a9d8: 9e 00 40 0f add %g1, %o7, %o7
200a9dc: 10 bf ff d5 b 200a930 <_RBTree_Extract_validate_unprotected+0x2a0>
200a9e0: de 03 e0 04 ld [ %o7 + 4 ], %o7
0200b69c <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
200b69c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
200b6a0: 7f ff e1 cb call 2003dcc <sparc_disable_interrupts>
200b6a4: b8 10 00 18 mov %i0, %i4
200b6a8: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
200b6ac: f6 06 20 04 ld [ %i0 + 4 ], %i3
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
200b6b0: 80 a6 e0 00 cmp %i3, 0
200b6b4: 02 80 00 15 be 200b708 <_RBTree_Find+0x6c> <== NEVER TAKEN
200b6b8: b0 10 20 00 clr %i0
compare_result = the_rbtree->compare_function(the_node, iter_node);
200b6bc: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
200b6c0: 92 10 00 1b mov %i3, %o1
200b6c4: 9f c0 40 00 call %g1
200b6c8: 90 10 00 19 mov %i1, %o0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
200b6cc: 83 3a 20 1f sra %o0, 0x1f, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
200b6d0: 80 a2 20 00 cmp %o0, 0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
200b6d4: 82 20 40 08 sub %g1, %o0, %g1
200b6d8: 83 30 60 1f srl %g1, 0x1f, %g1
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
200b6dc: 83 28 60 02 sll %g1, 2, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
200b6e0: 12 80 00 06 bne 200b6f8 <_RBTree_Find+0x5c>
200b6e4: 82 06 c0 01 add %i3, %g1, %g1
found = iter_node;
if ( the_rbtree->is_unique )
200b6e8: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2
200b6ec: 80 a0 a0 00 cmp %g2, 0
200b6f0: 12 80 00 0a bne 200b718 <_RBTree_Find+0x7c>
200b6f4: b0 10 00 1b mov %i3, %i0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
200b6f8: f6 00 60 04 ld [ %g1 + 4 ], %i3
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
200b6fc: 80 a6 e0 00 cmp %i3, 0
200b700: 32 bf ff f0 bne,a 200b6c0 <_RBTree_Find+0x24>
200b704: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
200b708: 7f ff e1 b5 call 2003ddc <sparc_enable_interrupts>
200b70c: 90 10 00 1d mov %i5, %o0
return return_node;
}
200b710: 81 c7 e0 08 ret
200b714: 81 e8 00 00 restore
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
200b718: 7f ff e1 b1 call 2003ddc <sparc_enable_interrupts>
200b71c: 90 10 00 1d mov %i5, %o0
return return_node;
}
200b720: 81 c7 e0 08 ret
200b724: 81 e8 00 00 restore
0200bb24 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
200bb24: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
200bb28: 80 a6 20 00 cmp %i0, 0
200bb2c: 02 80 00 0f be 200bb68 <_RBTree_Initialize+0x44> <== NEVER TAKEN
200bb30: 80 a6 e0 00 cmp %i3, 0
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
200bb34: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
200bb38: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
200bb3c: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
200bb40: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
200bb44: f2 26 20 10 st %i1, [ %i0 + 0x10 ]
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200bb48: 02 80 00 08 be 200bb68 <_RBTree_Initialize+0x44> <== NEVER TAKEN
200bb4c: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert(the_rbtree, next);
200bb50: 92 10 00 1a mov %i2, %o1
200bb54: 7f ff ff b5 call 200ba28 <_RBTree_Insert>
200bb58: 90 10 00 18 mov %i0, %o0
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200bb5c: b6 86 ff ff addcc %i3, -1, %i3
200bb60: 12 bf ff fc bne 200bb50 <_RBTree_Initialize+0x2c>
200bb64: b4 06 80 1c add %i2, %i4, %i2
200bb68: 81 c7 e0 08 ret
200bb6c: 81 e8 00 00 restore
0200ac04 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200ac04: 9d e3 bf a0 save %sp, -96, %sp
200ac08: b8 10 00 18 mov %i0, %i4
if(!the_node) return (RBTree_Node*)-1;
200ac0c: 80 a6 60 00 cmp %i1, 0
200ac10: 02 80 00 96 be 200ae68 <_RBTree_Insert_unprotected+0x264>
200ac14: b0 10 3f ff mov -1, %i0
RBTree_Node *iter_node = the_rbtree->root;
200ac18: fa 07 20 04 ld [ %i4 + 4 ], %i5
int compare_result;
if (!iter_node) { /* special case: first node inserted */
200ac1c: 80 a7 60 00 cmp %i5, 0
200ac20: 32 80 00 05 bne,a 200ac34 <_RBTree_Insert_unprotected+0x30>
200ac24: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
the_node->color = RBT_BLACK;
200ac28: 10 80 00 a0 b 200aea8 <_RBTree_Insert_unprotected+0x2a4>
200ac2c: c0 26 60 0c clr [ %i1 + 0xc ]
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);
200ac30: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
200ac34: 92 10 00 1d mov %i5, %o1
200ac38: 9f c0 40 00 call %g1
200ac3c: 90 10 00 19 mov %i1, %o0
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
200ac40: c2 0f 20 14 ldub [ %i4 + 0x14 ], %g1
200ac44: 80 a0 60 00 cmp %g1, 0
200ac48: 22 80 00 05 be,a 200ac5c <_RBTree_Insert_unprotected+0x58>
200ac4c: 90 38 00 08 xnor %g0, %o0, %o0
200ac50: 80 a2 20 00 cmp %o0, 0
200ac54: 02 80 00 87 be 200ae70 <_RBTree_Insert_unprotected+0x26c>
200ac58: 90 38 00 08 xnor %g0, %o0, %o0
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
200ac5c: 91 32 20 1f srl %o0, 0x1f, %o0
if (!iter_node->child[dir]) {
200ac60: 83 2a 20 02 sll %o0, 2, %g1
200ac64: 82 07 40 01 add %i5, %g1, %g1
200ac68: f0 00 60 04 ld [ %g1 + 4 ], %i0
200ac6c: 80 a6 20 00 cmp %i0, 0
200ac70: 32 bf ff f0 bne,a 200ac30 <_RBTree_Insert_unprotected+0x2c>
200ac74: ba 10 00 18 mov %i0, %i5
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200ac78: c0 26 60 08 clr [ %i1 + 8 ]
200ac7c: c0 26 60 04 clr [ %i1 + 4 ]
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
200ac80: 90 02 20 02 add %o0, 2, %o0
200ac84: 91 2a 20 02 sll %o0, 2, %o0
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
200ac88: c4 07 00 08 ld [ %i4 + %o0 ], %g2
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;
200ac8c: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_node->parent = iter_node;
200ac90: fa 26 40 00 st %i5, [ %i1 ]
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;
200ac94: 82 10 20 01 mov 1, %g1
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
200ac98: 80 a0 80 1d cmp %g2, %i5
200ac9c: 02 80 00 81 be 200aea0 <_RBTree_Insert_unprotected+0x29c>
200aca0: c2 26 60 0c st %g1, [ %i1 + 0xc ]
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
200aca4: 9a 10 20 01 mov 1, %o5
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200aca8: c2 07 40 00 ld [ %i5 ], %g1
200acac: 84 90 60 00 orcc %g1, 0, %g2
200acb0: 22 80 00 6e be,a 200ae68 <_RBTree_Insert_unprotected+0x264>
200acb4: c0 26 60 0c clr [ %i1 + 0xc ]
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200acb8: c6 07 60 0c ld [ %i5 + 0xc ], %g3
200acbc: 80 a0 e0 01 cmp %g3, 1
200acc0: 12 80 00 6d bne 200ae74 <_RBTree_Insert_unprotected+0x270>
200acc4: 01 00 00 00 nop
)
{
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;
200acc8: de 00 40 00 ld [ %g1 ], %o7
200accc: 80 a3 e0 00 cmp %o7, 0
200acd0: 02 80 00 0c be 200ad00 <_RBTree_Insert_unprotected+0xfc> <== NEVER TAKEN
200acd4: f8 00 60 04 ld [ %g1 + 4 ], %i4
{
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])
200acd8: 80 a7 00 1d cmp %i4, %i5
200acdc: 02 80 00 6f be 200ae98 <_RBTree_Insert_unprotected+0x294>
200ace0: 86 10 00 1c mov %i4, %g3
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200ace4: 80 a0 e0 00 cmp %g3, 0
200ace8: 22 80 00 07 be,a 200ad04 <_RBTree_Insert_unprotected+0x100>
200acec: c8 07 60 04 ld [ %i5 + 4 ], %g4
200acf0: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
200acf4: 80 a1 20 01 cmp %g4, 1
200acf8: 22 80 00 61 be,a 200ae7c <_RBTree_Insert_unprotected+0x278>
200acfc: c0 27 60 0c clr [ %i5 + 0xc ]
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];
200ad00: c8 07 60 04 ld [ %i5 + 4 ], %g4
RBTree_Direction pdir = the_node->parent != g->child[0];
200ad04: b8 1f 00 1d xor %i4, %i5, %i4
200ad08: 80 a0 00 1c cmp %g0, %i4
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];
200ad0c: b8 1e 40 04 xor %i1, %g4, %i4
RBTree_Direction pdir = the_node->parent != g->child[0];
200ad10: 86 40 20 00 addx %g0, 0, %g3
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];
200ad14: 80 a0 00 1c cmp %g0, %i4
200ad18: b8 40 20 00 addx %g0, 0, %i4
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200ad1c: 80 a7 00 03 cmp %i4, %g3
200ad20: 02 80 00 27 be 200adbc <_RBTree_Insert_unprotected+0x1b8>
200ad24: 9e 18 e0 01 xor %g3, 1, %o7
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200ad28: b9 2b e0 02 sll %o7, 2, %i4
200ad2c: b8 07 40 1c add %i5, %i4, %i4
200ad30: d8 07 20 04 ld [ %i4 + 4 ], %o4
200ad34: 80 a3 20 00 cmp %o4, 0
200ad38: 02 80 00 1e be 200adb0 <_RBTree_Insert_unprotected+0x1ac> <== NEVER TAKEN
200ad3c: b9 28 e0 02 sll %g3, 2, %i4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ad40: 80 a3 e0 00 cmp %o7, 0
200ad44: 02 80 00 05 be 200ad58 <_RBTree_Insert_unprotected+0x154>
200ad48: 98 10 20 00 clr %o4
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200ad4c: c8 07 60 08 ld [ %i5 + 8 ], %g4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ad50: 98 10 20 01 mov 1, %o4
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200ad54: b9 28 e0 02 sll %g3, 2, %i4
200ad58: 9e 01 00 1c add %g4, %i4, %o7
200ad5c: d6 03 e0 04 ld [ %o7 + 4 ], %o3
200ad60: 99 2b 20 02 sll %o4, 2, %o4
200ad64: 98 07 40 0c add %i5, %o4, %o4
200ad68: d6 23 20 04 st %o3, [ %o4 + 4 ]
if (c->child[dir])
200ad6c: de 03 e0 04 ld [ %o7 + 4 ], %o7
200ad70: 80 a3 e0 00 cmp %o7, 0
200ad74: 22 80 00 05 be,a 200ad88 <_RBTree_Insert_unprotected+0x184>
200ad78: 9e 01 00 1c add %g4, %i4, %o7
c->child[dir]->parent = the_node;
200ad7c: fa 23 c0 00 st %i5, [ %o7 ]
200ad80: c2 07 40 00 ld [ %i5 ], %g1
c->child[dir] = the_node;
200ad84: 9e 01 00 1c add %g4, %i4, %o7
200ad88: fa 23 e0 04 st %i5, [ %o7 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ad8c: de 00 60 04 ld [ %g1 + 4 ], %o7
c->parent = the_node->parent;
200ad90: c2 21 00 00 st %g1, [ %g4 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ad94: 9e 1b c0 1d xor %o7, %i5, %o7
c->parent = the_node->parent;
the_node->parent = c;
200ad98: c8 27 40 00 st %g4, [ %i5 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ad9c: 80 a0 00 0f cmp %g0, %o7
200ada0: ba 40 20 00 addx %g0, 0, %i5
200ada4: bb 2f 60 02 sll %i5, 2, %i5
200ada8: 82 00 40 1d add %g1, %i5, %g1
200adac: c8 20 60 04 st %g4, [ %g1 + 4 ]
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
200adb0: b2 06 40 1c add %i1, %i4, %i1
200adb4: f2 06 60 04 ld [ %i1 + 4 ], %i1
200adb8: fa 06 40 00 ld [ %i1 ], %i5
}
the_node->parent->color = RBT_BLACK;
200adbc: c0 27 60 0c clr [ %i5 + 0xc ]
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
200adc0: 86 23 40 03 sub %o5, %g3, %g3
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200adc4: 80 a0 00 03 cmp %g0, %g3
200adc8: 82 60 3f ff subx %g0, -1, %g1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200adcc: 89 28 60 02 sll %g1, 2, %g4
200add0: 88 00 80 04 add %g2, %g4, %g4
200add4: c8 01 20 04 ld [ %g4 + 4 ], %g4
200add8: 80 a1 20 00 cmp %g4, 0
200addc: 02 bf ff b3 be 200aca8 <_RBTree_Insert_unprotected+0xa4> <== NEVER TAKEN
200ade0: da 20 a0 0c st %o5, [ %g2 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ade4: 80 a0 60 00 cmp %g1, 0
200ade8: 22 80 00 2a be,a 200ae90 <_RBTree_Insert_unprotected+0x28c>
200adec: c2 00 a0 04 ld [ %g2 + 4 ], %g1
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200adf0: c2 00 a0 08 ld [ %g2 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200adf4: ba 10 20 01 mov 1, %i5
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200adf8: 87 28 e0 02 sll %g3, 2, %g3
200adfc: 88 00 40 03 add %g1, %g3, %g4
200ae00: f8 01 20 04 ld [ %g4 + 4 ], %i4
200ae04: bb 2f 60 02 sll %i5, 2, %i5
200ae08: ba 00 80 1d add %g2, %i5, %i5
200ae0c: f8 27 60 04 st %i4, [ %i5 + 4 ]
if (c->child[dir])
200ae10: c8 01 20 04 ld [ %g4 + 4 ], %g4
200ae14: 80 a1 20 00 cmp %g4, 0
200ae18: 32 80 00 02 bne,a 200ae20 <_RBTree_Insert_unprotected+0x21c>
200ae1c: c4 21 00 00 st %g2, [ %g4 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ae20: c8 00 80 00 ld [ %g2 ], %g4
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200ae24: 86 00 40 03 add %g1, %g3, %g3
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
200ae28: c8 20 40 00 st %g4, [ %g1 ]
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200ae2c: c4 20 e0 04 st %g2, [ %g3 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
200ae30: c2 20 80 00 st %g1, [ %g2 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ae34: c6 01 20 04 ld [ %g4 + 4 ], %g3
c->parent = the_node->parent;
the_node->parent = c;
200ae38: fa 06 40 00 ld [ %i1 ], %i5
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ae3c: 86 18 80 03 xor %g2, %g3, %g3
200ae40: 80 a0 00 03 cmp %g0, %g3
200ae44: 84 40 20 00 addx %g0, 0, %g2
200ae48: 85 28 a0 02 sll %g2, 2, %g2
200ae4c: 88 01 00 02 add %g4, %g2, %g4
200ae50: c2 21 20 04 st %g1, [ %g4 + 4 ]
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200ae54: c2 07 40 00 ld [ %i5 ], %g1
200ae58: 84 90 60 00 orcc %g1, 0, %g2
200ae5c: 32 bf ff 98 bne,a 200acbc <_RBTree_Insert_unprotected+0xb8><== ALWAYS TAKEN
200ae60: c6 07 60 0c ld [ %i5 + 0xc ], %g3
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200ae64: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
200ae68: 81 c7 e0 08 ret
200ae6c: 81 e8 00 00 restore
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);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
200ae70: b0 10 00 1d mov %i5, %i0
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
200ae74: 81 c7 e0 08 ret
200ae78: 81 e8 00 00 restore
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
200ae7c: c0 20 e0 0c clr [ %g3 + 0xc ]
g->color = RBT_RED;
200ae80: c8 20 60 0c st %g4, [ %g1 + 0xc ]
200ae84: ba 10 00 0f mov %o7, %i5
200ae88: 10 bf ff 88 b 200aca8 <_RBTree_Insert_unprotected+0xa4>
200ae8c: b2 10 00 01 mov %g1, %i1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ae90: 10 bf ff da b 200adf8 <_RBTree_Insert_unprotected+0x1f4>
200ae94: ba 10 20 00 clr %i5
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
200ae98: 10 bf ff 93 b 200ace4 <_RBTree_Insert_unprotected+0xe0>
200ae9c: c6 00 60 08 ld [ %g1 + 8 ], %g3
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
the_rbtree->first[dir] = the_node;
200aea0: 10 bf ff 81 b 200aca4 <_RBTree_Insert_unprotected+0xa0>
200aea4: f2 27 00 08 st %i1, [ %i4 + %o0 ]
RBTree_Node *iter_node = the_rbtree->root;
int compare_result;
if (!iter_node) { /* special case: first node inserted */
the_node->color = RBT_BLACK;
the_rbtree->root = the_node;
200aea8: f2 27 20 04 st %i1, [ %i4 + 4 ]
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
200aeac: f2 27 20 0c st %i1, [ %i4 + 0xc ]
200aeb0: f2 27 20 08 st %i1, [ %i4 + 8 ]
the_node->parent = (RBTree_Node *) the_rbtree;
200aeb4: f8 26 40 00 st %i4, [ %i1 ]
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200aeb8: c0 26 60 08 clr [ %i1 + 8 ]
200aebc: c0 26 60 04 clr [ %i1 + 4 ]
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
200aec0: 81 c7 e0 08 ret
200aec4: 91 e8 20 00 restore %g0, 0, %o0
0200aedc <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
200aedc: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200aee0: 80 a0 00 19 cmp %g0, %i1
200aee4: 82 60 3f ff subx %g0, -1, %g1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
200aee8: 82 00 60 02 add %g1, 2, %g1
200aeec: 83 28 60 02 sll %g1, 2, %g1
200aef0: fa 06 00 01 ld [ %i0 + %g1 ], %i5
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
200aef4: 80 a7 60 00 cmp %i5, 0
200aef8: 02 80 00 0d be 200af2c <_RBTree_Iterate_unprotected+0x50>
200aefc: 90 10 00 1d mov %i5, %o0
stop = (*visitor)( current, dir, visitor_arg );
200af00: 92 10 00 19 mov %i1, %o1
200af04: 9f c6 80 00 call %i2
200af08: 94 10 00 1b mov %i3, %o2
current = _RBTree_Next_unprotected( rbtree, current, dir );
200af0c: 92 10 00 1d mov %i5, %o1
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 );
200af10: b8 10 00 08 mov %o0, %i4
current = _RBTree_Next_unprotected( rbtree, current, dir );
200af14: 94 10 00 19 mov %i1, %o2
200af18: 40 00 00 07 call 200af34 <_RBTree_Next_unprotected>
200af1c: 90 10 00 18 mov %i0, %o0
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
200af20: 80 8f 20 ff btst 0xff, %i4
200af24: 02 bf ff f4 be 200aef4 <_RBTree_Iterate_unprotected+0x18> <== ALWAYS TAKEN
200af28: ba 10 00 08 mov %o0, %i5
200af2c: 81 c7 e0 08 ret
200af30: 81 e8 00 00 restore
0200af34 <_RBTree_Next_unprotected>:
const RBTree_Node *node,
RBTree_Direction dir
)
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
RBTree_Node *current = node->child [dir];
200af34: 85 2a a0 02 sll %o2, 2, %g2
200af38: 82 02 40 02 add %o1, %g2, %g1
200af3c: c2 00 60 04 ld [ %g1 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200af40: 80 a0 00 0a cmp %g0, %o2
200af44: 86 60 3f ff subx %g0, -1, %g3
RBTree_Node *next = NULL;
if ( current != NULL ) {
200af48: 80 a0 60 00 cmp %g1, 0
200af4c: 02 80 00 0a be 200af74 <_RBTree_Next_unprotected+0x40>
200af50: 94 10 00 08 mov %o0, %o2
200af54: 87 28 e0 02 sll %g3, 2, %g3
next = current;
while ( (current = current->child [opp_dir]) != NULL ) {
200af58: 84 00 40 03 add %g1, %g3, %g2
200af5c: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200af60: 80 a0 a0 00 cmp %g2, 0
200af64: 32 bf ff fd bne,a 200af58 <_RBTree_Next_unprotected+0x24>
200af68: 82 10 00 02 mov %g2, %g1
RBTree_Direction dir
)
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
RBTree_Node *current = node->child [dir];
RBTree_Node *next = NULL;
200af6c: 81 c3 e0 08 retl
200af70: 90 10 00 01 mov %g1, %o0
while ( (current = current->child [opp_dir]) != NULL ) {
next = current;
}
} else {
const RBTree_Node *null = (const RBTree_Node *) rbtree;
RBTree_Node *parent = node->parent;
200af74: c8 02 40 00 ld [ %o1 ], %g4
if ( parent != null && node == parent->child [opp_dir] ) {
200af78: 80 a2 80 04 cmp %o2, %g4
200af7c: 02 80 00 19 be 200afe0 <_RBTree_Next_unprotected+0xac>
200af80: 90 10 20 00 clr %o0
200af84: 87 28 e0 02 sll %g3, 2, %g3
200af88: 86 01 00 03 add %g4, %g3, %g3
200af8c: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200af90: 80 a0 40 09 cmp %g1, %o1
200af94: 02 80 00 13 be 200afe0 <_RBTree_Next_unprotected+0xac>
200af98: 90 10 00 04 mov %g4, %o0
next = parent;
} else {
while ( parent != null && node == parent->child [dir] ) {
200af9c: 82 01 00 02 add %g4, %g2, %g1
200afa0: c2 00 60 04 ld [ %g1 + 4 ], %g1
200afa4: 80 a2 40 01 cmp %o1, %g1
200afa8: 22 80 00 09 be,a 200afcc <_RBTree_Next_unprotected+0x98> <== ALWAYS TAKEN
200afac: c2 01 00 00 ld [ %g4 ], %g1
200afb0: 10 bf ff ef b 200af6c <_RBTree_Next_unprotected+0x38> <== NOT EXECUTED
200afb4: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED
200afb8: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200afbc: 80 a0 c0 04 cmp %g3, %g4
200afc0: 12 bf ff eb bne 200af6c <_RBTree_Next_unprotected+0x38>
200afc4: 88 10 00 01 mov %g1, %g4
node = parent;
parent = node->parent;
200afc8: c2 01 00 00 ld [ %g4 ], %g1
RBTree_Node *parent = node->parent;
if ( parent != null && node == parent->child [opp_dir] ) {
next = parent;
} else {
while ( parent != null && node == parent->child [dir] ) {
200afcc: 80 a2 80 01 cmp %o2, %g1
200afd0: 12 bf ff fa bne 200afb8 <_RBTree_Next_unprotected+0x84>
200afd4: 86 00 40 02 add %g1, %g2, %g3
}
}
}
return next;
}
200afd8: 81 c3 e0 08 retl
200afdc: 90 10 20 00 clr %o0
200afe0: 81 c3 e0 08 retl
02008104 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2008104: 9d e3 bf 98 save %sp, -104, %sp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
2008108: 03 00 80 71 sethi %hi(0x201c400), %g1
200810c: 82 10 62 9c or %g1, 0x29c, %g1 ! 201c69c <Configuration_RTEMS_API>
2008110: fa 00 60 2c ld [ %g1 + 0x2c ], %i5
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
2008114: 80 a7 60 00 cmp %i5, 0
2008118: 02 80 00 18 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74>
200811c: f6 00 60 28 ld [ %g1 + 0x28 ], %i3
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
2008120: 80 a6 e0 00 cmp %i3, 0
2008124: 02 80 00 15 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN
2008128: b8 10 20 00 clr %i4
return_value = rtems_task_create(
200812c: d4 07 60 04 ld [ %i5 + 4 ], %o2
2008130: d0 07 40 00 ld [ %i5 ], %o0
2008134: d2 07 60 08 ld [ %i5 + 8 ], %o1
2008138: d6 07 60 14 ld [ %i5 + 0x14 ], %o3
200813c: d8 07 60 0c ld [ %i5 + 0xc ], %o4
2008140: 7f ff ff 70 call 2007f00 <rtems_task_create>
2008144: 9a 07 bf fc add %fp, -4, %o5
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
2008148: 94 92 20 00 orcc %o0, 0, %o2
200814c: 12 80 00 0d bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
2008150: d0 07 bf fc ld [ %fp + -4 ], %o0
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
2008154: d4 07 60 18 ld [ %i5 + 0x18 ], %o2
2008158: 40 00 00 0e call 2008190 <rtems_task_start>
200815c: d2 07 60 10 ld [ %i5 + 0x10 ], %o1
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
2008160: 94 92 20 00 orcc %o0, 0, %o2
2008164: 12 80 00 07 bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
2008168: b8 07 20 01 inc %i4
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
200816c: 80 a7 00 1b cmp %i4, %i3
2008170: 12 bf ff ef bne 200812c <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN
2008174: ba 07 60 1c add %i5, 0x1c, %i5
2008178: 81 c7 e0 08 ret
200817c: 81 e8 00 00 restore
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
2008180: 90 10 20 01 mov 1, %o0
2008184: 40 00 04 0d call 20091b8 <_Internal_error_Occurred>
2008188: 92 10 20 01 mov 1, %o1
0200d3dc <_RTEMS_tasks_Post_switch_extension>:
*/
static void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
200d3dc: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200d3e0: fa 06 21 50 ld [ %i0 + 0x150 ], %i5
if ( !api )
200d3e4: 80 a7 60 00 cmp %i5, 0
200d3e8: 02 80 00 1e be 200d460 <_RTEMS_tasks_Post_switch_extension+0x84><== NEVER TAKEN
200d3ec: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
200d3f0: 7f ff d4 b2 call 20026b8 <sparc_disable_interrupts>
200d3f4: 01 00 00 00 nop
signal_set = asr->signals_posted;
200d3f8: f8 07 60 14 ld [ %i5 + 0x14 ], %i4
asr->signals_posted = 0;
200d3fc: c0 27 60 14 clr [ %i5 + 0x14 ]
_ISR_Enable( level );
200d400: 7f ff d4 b2 call 20026c8 <sparc_enable_interrupts>
200d404: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200d408: 80 a7 20 00 cmp %i4, 0
200d40c: 32 80 00 04 bne,a 200d41c <_RTEMS_tasks_Post_switch_extension+0x40>
200d410: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200d414: 81 c7 e0 08 ret
200d418: 81 e8 00 00 restore
return;
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d41c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200d420: 82 00 60 01 inc %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d424: 94 07 bf fc add %fp, -4, %o2
200d428: 37 00 00 3f sethi %hi(0xfc00), %i3
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200d42c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d430: 40 00 07 76 call 200f208 <rtems_task_mode>
200d434: 92 16 e3 ff or %i3, 0x3ff, %o1
(*asr->handler)( signal_set );
200d438: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200d43c: 9f c0 40 00 call %g1
200d440: 90 10 00 1c mov %i4, %o0
asr->nest_level -= 1;
200d444: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d448: d0 07 bf fc ld [ %fp + -4 ], %o0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200d44c: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d450: 92 16 e3 ff or %i3, 0x3ff, %o1
200d454: 94 07 bf fc add %fp, -4, %o2
200d458: 40 00 07 6c call 200f208 <rtems_task_mode>
200d45c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
200d460: 81 c7 e0 08 ret
200d464: 81 e8 00 00 restore
0200d270 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
200d270: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
while (tvp) {
200d274: 80 a0 60 00 cmp %g1, 0
200d278: 22 80 00 0c be,a 200d2a8 <_RTEMS_tasks_Switch_extension+0x38>
200d27c: c2 02 61 5c ld [ %o1 + 0x15c ], %g1
tvp->tval = *tvp->ptr;
200d280: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->gval;
200d284: c6 00 60 08 ld [ %g1 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
200d288: c8 00 80 00 ld [ %g2 ], %g4
200d28c: c8 20 60 0c st %g4, [ %g1 + 0xc ]
*tvp->ptr = tvp->gval;
200d290: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200d294: c2 00 40 00 ld [ %g1 ], %g1
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
200d298: 80 a0 60 00 cmp %g1, 0
200d29c: 32 bf ff fa bne,a 200d284 <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN
200d2a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
200d2a4: c2 02 61 5c ld [ %o1 + 0x15c ], %g1
while (tvp) {
200d2a8: 80 a0 60 00 cmp %g1, 0
200d2ac: 02 80 00 0b be 200d2d8 <_RTEMS_tasks_Switch_extension+0x68>
200d2b0: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
200d2b4: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->tval;
200d2b8: c6 00 60 0c ld [ %g1 + 0xc ], %g3
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
200d2bc: c8 00 80 00 ld [ %g2 ], %g4
200d2c0: c8 20 60 08 st %g4, [ %g1 + 8 ]
*tvp->ptr = tvp->tval;
200d2c4: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200d2c8: c2 00 40 00 ld [ %g1 ], %g1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
200d2cc: 80 a0 60 00 cmp %g1, 0
200d2d0: 32 bf ff fa bne,a 200d2b8 <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN
200d2d4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
200d2d8: 81 c3 e0 08 retl
020439fc <_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
)
{
20439fc: 9d e3 bf 98 save %sp, -104, %sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2043a00: fa 06 20 40 ld [ %i0 + 0x40 ], %i5
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2043a04: 7f ff a8 f3 call 202ddd0 <_TOD_Get_uptime>
2043a08: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2043a0c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4
_Timestamp_Subtract(
2043a10: c4 1f bf f8 ldd [ %fp + -8 ], %g2
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2043a14: 03 00 81 d0 sethi %hi(0x2074000), %g1
2043a18: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 20741a0 <_Per_CPU_Information>
2043a1c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
2043a20: 9a a0 c0 0d subcc %g3, %o5, %o5
2043a24: 98 60 80 0c subx %g2, %o4, %o4
2043a28: d8 3e 40 00 std %o4, [ %i1 ]
2043a2c: 80 a1 00 1d cmp %g4, %i5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
2043a30: d8 1f 60 80 ldd [ %i5 + 0x80 ], %o4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2043a34: 02 80 00 05 be 2043a48 <_Rate_monotonic_Get_status+0x4c>
2043a38: b2 10 20 01 mov 1, %i1
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
2043a3c: b0 0e 60 01 and %i1, 1, %i0
2043a40: 81 c7 e0 08 ret
2043a44: 81 e8 00 00 restore
2043a48: d4 18 60 20 ldd [ %g1 + 0x20 ], %o2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2043a4c: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0
2043a50: 86 a0 c0 0b subcc %g3, %o3, %g3
2043a54: 84 60 80 0a subx %g2, %o2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2043a58: 86 83 40 03 addcc %o5, %g3, %g3
2043a5c: 84 43 00 02 addx %o4, %g2, %g2
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2043a60: 80 a6 00 02 cmp %i0, %g2
2043a64: 34 bf ff f6 bg,a 2043a3c <_Rate_monotonic_Get_status+0x40><== NEVER TAKEN
2043a68: b2 10 20 00 clr %i1 <== NOT EXECUTED
2043a6c: 02 80 00 09 be 2043a90 <_Rate_monotonic_Get_status+0x94>
2043a70: 80 a6 40 03 cmp %i1, %g3
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2043a74: 86 a0 c0 19 subcc %g3, %i1, %g3
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
2043a78: b2 10 20 01 mov 1, %i1
2043a7c: 84 60 80 18 subx %g2, %i0, %g2
}
2043a80: b0 0e 60 01 and %i1, 1, %i0
2043a84: c4 3e 80 00 std %g2, [ %i2 ]
2043a88: 81 c7 e0 08 ret
2043a8c: 81 e8 00 00 restore
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2043a90: 28 bf ff fa bleu,a 2043a78 <_Rate_monotonic_Get_status+0x7c>
2043a94: 86 a0 c0 19 subcc %g3, %i1, %g3
return false;
2043a98: 10 bf ff e9 b 2043a3c <_Rate_monotonic_Get_status+0x40>
2043a9c: b2 10 20 00 clr %i1
02043e3c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2043e3c: 9d e3 bf 98 save %sp, -104, %sp
2043e40: 11 00 81 d1 sethi %hi(0x2074400), %o0
2043e44: 92 10 00 18 mov %i0, %o1
2043e48: 90 12 20 70 or %o0, 0x70, %o0
2043e4c: 7f ff 2f 28 call 200faec <_Objects_Get>
2043e50: 94 07 bf fc add %fp, -4, %o2
/*
* 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 ) {
2043e54: c2 07 bf fc ld [ %fp + -4 ], %g1
2043e58: 80 a0 60 00 cmp %g1, 0
2043e5c: 12 80 00 17 bne 2043eb8 <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN
2043e60: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2043e64: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2043e68: 03 00 00 10 sethi %hi(0x4000), %g1
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
2043e6c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2043e70: 80 88 80 01 btst %g2, %g1
2043e74: 22 80 00 08 be,a 2043e94 <_Rate_monotonic_Timeout+0x58>
2043e78: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2043e7c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2043e80: c2 07 60 08 ld [ %i5 + 8 ], %g1
2043e84: 80 a0 80 01 cmp %g2, %g1
2043e88: 02 80 00 1a be 2043ef0 <_Rate_monotonic_Timeout+0xb4>
2043e8c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
_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 ) {
2043e90: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2043e94: 80 a0 60 01 cmp %g1, 1
2043e98: 02 80 00 0a be 2043ec0 <_Rate_monotonic_Timeout+0x84>
2043e9c: 82 10 20 04 mov 4, %g1
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2043ea0: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2043ea4: 03 00 81 cf sethi %hi(0x2073c00), %g1
2043ea8: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2073f70 <_Thread_Dispatch_disable_level>
2043eac: 84 00 bf ff add %g2, -1, %g2
2043eb0: c4 20 63 70 st %g2, [ %g1 + 0x370 ]
return _Thread_Dispatch_disable_level;
2043eb4: c2 00 63 70 ld [ %g1 + 0x370 ], %g1
2043eb8: 81 c7 e0 08 ret
2043ebc: 81 e8 00 00 restore
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2043ec0: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
2043ec4: 90 10 00 1d mov %i5, %o0
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2043ec8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
2043ecc: 7f ff ff 44 call 2043bdc <_Rate_monotonic_Initiate_statistics>
2043ed0: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043ed4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043ed8: 11 00 81 d0 sethi %hi(0x2074000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043edc: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043ee0: 90 12 20 30 or %o0, 0x30, %o0
2043ee4: 7f ff 36 5d call 2011858 <_Watchdog_Insert>
2043ee8: 92 07 60 10 add %i5, 0x10, %o1
2043eec: 30 bf ff ee b,a 2043ea4 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2043ef0: 7f ff 31 f1 call 20106b4 <_Thread_Clear_state>
2043ef4: 92 12 63 f8 or %o1, 0x3f8, %o1
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
2043ef8: 10 bf ff f5 b 2043ecc <_Rate_monotonic_Timeout+0x90>
2043efc: 90 10 00 1d mov %i5, %o0
02043aa0 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
2043aa0: 9d e3 bf 90 save %sp, -112, %sp
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2043aa4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2043aa8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2043aac: 84 00 a0 01 inc %g2
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2043ab0: 80 a0 60 04 cmp %g1, 4
2043ab4: 02 80 00 46 be 2043bcc <_Rate_monotonic_Update_statistics+0x12c>
2043ab8: c4 26 20 58 st %g2, [ %i0 + 0x58 ]
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
2043abc: 90 10 00 18 mov %i0, %o0
2043ac0: 92 07 bf f8 add %fp, -8, %o1
2043ac4: 7f ff ff ce call 20439fc <_Rate_monotonic_Get_status>
2043ac8: 94 07 bf f0 add %fp, -16, %o2
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
2043acc: 80 8a 20 ff btst 0xff, %o0
2043ad0: 02 80 00 21 be 2043b54 <_Rate_monotonic_Update_statistics+0xb4>
2043ad4: c4 1f bf f0 ldd [ %fp + -16 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2043ad8: d8 1e 20 70 ldd [ %i0 + 0x70 ], %o4
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2043adc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2043ae0: 9a 83 40 03 addcc %o5, %g3, %o5
2043ae4: 98 43 00 02 addx %o4, %g2, %o4
2043ae8: 80 a0 40 02 cmp %g1, %g2
2043aec: 04 80 00 1c ble 2043b5c <_Rate_monotonic_Update_statistics+0xbc>
2043af0: d8 3e 20 70 std %o4, [ %i0 + 0x70 ]
stats->min_cpu_time = executed;
2043af4: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2043af8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
2043afc: 80 a0 40 02 cmp %g1, %g2
2043b00: 26 80 00 05 bl,a 2043b14 <_Rate_monotonic_Update_statistics+0x74><== NEVER TAKEN
2043b04: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED
2043b08: 80 a0 40 02 cmp %g1, %g2
2043b0c: 22 80 00 2b be,a 2043bb8 <_Rate_monotonic_Update_statistics+0x118><== ALWAYS TAKEN
2043b10: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
2043b14: c4 1f bf f8 ldd [ %fp + -8 ], %g2
2043b18: d8 1e 20 88 ldd [ %i0 + 0x88 ], %o4
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2043b1c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2043b20: 9a 83 40 03 addcc %o5, %g3, %o5
2043b24: 98 43 00 02 addx %o4, %g2, %o4
2043b28: 80 a0 40 02 cmp %g1, %g2
2043b2c: 14 80 00 1e bg 2043ba4 <_Rate_monotonic_Update_statistics+0x104>
2043b30: d8 3e 20 88 std %o4, [ %i0 + 0x88 ]
2043b34: 80 a0 40 02 cmp %g1, %g2
2043b38: 22 80 00 18 be,a 2043b98 <_Rate_monotonic_Update_statistics+0xf8><== ALWAYS TAKEN
2043b3c: c2 06 20 7c ld [ %i0 + 0x7c ], %g1
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2043b40: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2043b44: 80 a0 40 02 cmp %g1, %g2
2043b48: 16 80 00 0d bge 2043b7c <_Rate_monotonic_Update_statistics+0xdc><== ALWAYS TAKEN
2043b4c: 01 00 00 00 nop
stats->max_wall_time = since_last_period;
2043b50: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED
2043b54: 81 c7 e0 08 ret
2043b58: 81 e8 00 00 restore
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2043b5c: 32 bf ff e8 bne,a 2043afc <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN
2043b60: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
2043b64: c2 06 20 64 ld [ %i0 + 0x64 ], %g1
2043b68: 80 a0 40 03 cmp %g1, %g3
2043b6c: 28 bf ff e4 bleu,a 2043afc <_Rate_monotonic_Update_statistics+0x5c>
2043b70: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
stats->min_cpu_time = executed;
2043b74: 10 bf ff e1 b 2043af8 <_Rate_monotonic_Update_statistics+0x58>
2043b78: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2043b7c: 12 bf ff f6 bne 2043b54 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
2043b80: 01 00 00 00 nop
2043b84: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2043b88: 80 a0 40 03 cmp %g1, %g3
2043b8c: 2a bf ff f2 bcs,a 2043b54 <_Rate_monotonic_Update_statistics+0xb4>
2043b90: c4 3e 20 80 std %g2, [ %i0 + 0x80 ]
2043b94: 30 bf ff f0 b,a 2043b54 <_Rate_monotonic_Update_statistics+0xb4>
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2043b98: 80 a0 40 03 cmp %g1, %g3
2043b9c: 28 bf ff ea bleu,a 2043b44 <_Rate_monotonic_Update_statistics+0xa4>
2043ba0: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2043ba4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2043ba8: 80 a0 40 02 cmp %g1, %g2
2043bac: 06 bf ff e9 bl 2043b50 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN
2043bb0: c4 3e 20 78 std %g2, [ %i0 + 0x78 ]
2043bb4: 30 bf ff f2 b,a 2043b7c <_Rate_monotonic_Update_statistics+0xdc>
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2043bb8: 80 a0 40 03 cmp %g1, %g3
2043bbc: 3a bf ff d7 bcc,a 2043b18 <_Rate_monotonic_Update_statistics+0x78>
2043bc0: c4 1f bf f8 ldd [ %fp + -8 ], %g2
stats->max_cpu_time = executed;
2043bc4: 10 bf ff d4 b 2043b14 <_Rate_monotonic_Update_statistics+0x74>
2043bc8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ]
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
2043bcc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2043bd0: 82 00 60 01 inc %g1
2043bd4: 10 bf ff ba b 2043abc <_Rate_monotonic_Update_statistics+0x1c>
2043bd8: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
0200ba90 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
200ba90: 9d e3 bf 98 save %sp, -104, %sp
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;
200ba94: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200ba98: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200ba9c: 80 a0 40 09 cmp %g1, %o1
200baa0: 32 80 00 02 bne,a 200baa8 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
200baa4: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200baa8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200baac: 80 a0 40 09 cmp %g1, %o1
200bab0: 02 80 00 04 be 200bac0 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
200bab4: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200bab8: 40 00 01 99 call 200c11c <_Thread_Change_priority>
200babc: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200bac0: f0 06 20 88 ld [ %i0 + 0x88 ], %i0
if ( sched_info->cbs_server->cbs_budget_overrun ) {
200bac4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200bac8: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200bacc: 80 a0 a0 00 cmp %g2, 0
200bad0: 02 80 00 09 be 200baf4 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
200bad4: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
200bad8: d0 00 40 00 ld [ %g1 ], %o0
200badc: 7f ff ff d1 call 200ba20 <_Scheduler_CBS_Get_server_id>
200bae0: 92 07 bf fc add %fp, -4, %o1
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
200bae4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200bae8: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200baec: 9f c0 40 00 call %g1
200baf0: d0 07 bf fc ld [ %fp + -4 ], %o0
200baf4: 81 c7 e0 08 ret
200baf8: 81 e8 00 00 restore
0200b5f8 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
200b5f8: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b5fc: 39 00 80 7f sethi %hi(0x201fc00), %i4
200b600: c2 07 22 e8 ld [ %i4 + 0x2e8 ], %g1 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
200b604: 80 a0 60 00 cmp %g1, 0
200b608: 02 80 00 18 be 200b668 <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN
200b60c: 03 00 80 83 sethi %hi(0x2020c00), %g1
200b610: 37 00 80 83 sethi %hi(0x2020c00), %i3
200b614: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2 ! 2020e38 <_Scheduler_CBS_Server_list>
200b618: ba 10 20 00 clr %i5
200b61c: b8 17 22 e8 or %i4, 0x2e8, %i4
if ( _Scheduler_CBS_Server_list[ i ] )
200b620: 83 2f 60 02 sll %i5, 2, %g1
200b624: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200b628: 80 a0 60 00 cmp %g1, 0
200b62c: 02 80 00 05 be 200b640 <_Scheduler_CBS_Cleanup+0x48>
200b630: 90 10 00 1d mov %i5, %o0
_Scheduler_CBS_Destroy_server( i );
200b634: 40 00 00 45 call 200b748 <_Scheduler_CBS_Destroy_server>
200b638: 01 00 00 00 nop
200b63c: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b640: c2 07 00 00 ld [ %i4 ], %g1
200b644: ba 07 60 01 inc %i5
200b648: 80 a0 40 1d cmp %g1, %i5
200b64c: 18 bf ff f6 bgu 200b624 <_Scheduler_CBS_Cleanup+0x2c>
200b650: 83 2f 60 02 sll %i5, 2, %g1
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
return SCHEDULER_CBS_OK;
}
200b654: b0 10 20 00 clr %i0
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
200b658: 40 00 08 51 call 200d79c <_Workspace_Free>
200b65c: 90 10 00 02 mov %g2, %o0
return SCHEDULER_CBS_OK;
}
200b660: 81 c7 e0 08 ret
200b664: 81 e8 00 00 restore
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b668: 10 bf ff fb b 200b654 <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED
200b66c: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 <== NOT EXECUTED
0200b670 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200b670: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200b674: c2 06 20 04 ld [ %i0 + 4 ], %g1
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200b678: ba 10 00 18 mov %i0, %i5
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200b67c: 80 a0 60 00 cmp %g1, 0
200b680: 04 80 00 30 ble 200b740 <_Scheduler_CBS_Create_server+0xd0>
200b684: b0 10 3f ee mov -18, %i0
200b688: c2 07 40 00 ld [ %i5 ], %g1
200b68c: 80 a0 60 00 cmp %g1, 0
200b690: 04 80 00 2c ble 200b740 <_Scheduler_CBS_Create_server+0xd0>
200b694: 03 00 80 7f sethi %hi(0x201fc00), %g1
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++ ) {
200b698: c6 00 62 e8 ld [ %g1 + 0x2e8 ], %g3 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
200b69c: 80 a0 e0 00 cmp %g3, 0
200b6a0: 02 80 00 28 be 200b740 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200b6a4: b0 10 3f e6 mov -26, %i0
if ( !_Scheduler_CBS_Server_list[i] )
200b6a8: 37 00 80 83 sethi %hi(0x2020c00), %i3
200b6ac: f8 06 e2 38 ld [ %i3 + 0x238 ], %i4 ! 2020e38 <_Scheduler_CBS_Server_list>
200b6b0: c2 07 00 00 ld [ %i4 ], %g1
200b6b4: 80 a0 60 00 cmp %g1, 0
200b6b8: 02 80 00 0e be 200b6f0 <_Scheduler_CBS_Create_server+0x80>
200b6bc: 82 10 20 00 clr %g1
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++ ) {
200b6c0: 10 80 00 07 b 200b6dc <_Scheduler_CBS_Create_server+0x6c>
200b6c4: 82 00 60 01 inc %g1
if ( !_Scheduler_CBS_Server_list[i] )
200b6c8: c4 07 00 18 ld [ %i4 + %i0 ], %g2
200b6cc: 80 a0 a0 00 cmp %g2, 0
200b6d0: 22 80 00 0a be,a 200b6f8 <_Scheduler_CBS_Create_server+0x88>
200b6d4: c2 26 80 00 st %g1, [ %i2 ]
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++ ) {
200b6d8: 82 00 60 01 inc %g1
200b6dc: 80 a0 40 03 cmp %g1, %g3
200b6e0: 12 bf ff fa bne 200b6c8 <_Scheduler_CBS_Create_server+0x58>
200b6e4: b1 28 60 02 sll %g1, 2, %i0
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
200b6e8: 81 c7 e0 08 ret
200b6ec: 91 e8 3f e6 restore %g0, -26, %o0
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] )
200b6f0: b0 10 20 00 clr %i0
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
200b6f4: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
200b6f8: 40 00 08 21 call 200d77c <_Workspace_Allocate>
200b6fc: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
200b700: c2 06 80 00 ld [ %i2 ], %g1
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
200b704: d0 27 00 18 st %o0, [ %i4 + %i0 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
200b708: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2
200b70c: 83 28 60 02 sll %g1, 2, %g1
200b710: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
200b714: 80 a0 60 00 cmp %g1, 0
200b718: 02 80 00 0a be 200b740 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200b71c: b0 10 3f ef mov -17, %i0
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200b720: c4 07 40 00 ld [ %i5 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
200b724: b0 10 20 00 clr %i0
_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;
200b728: c4 20 60 04 st %g2, [ %g1 + 4 ]
200b72c: c4 07 60 04 ld [ %i5 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
200b730: f2 20 60 0c st %i1, [ %g1 + 0xc ]
_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;
200b734: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
200b738: 84 10 3f ff mov -1, %g2
200b73c: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
200b740: 81 c7 e0 08 ret
200b744: 81 e8 00 00 restore
0200b7b8 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
200b7b8: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
200b7bc: 92 07 bf fc add %fp, -4, %o1
200b7c0: 40 00 03 a1 call 200c644 <_Thread_Get>
200b7c4: 90 10 00 19 mov %i1, %o0
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200b7c8: ba 92 20 00 orcc %o0, 0, %i5
200b7cc: 22 80 00 05 be,a 200b7e0 <_Scheduler_CBS_Detach_thread+0x28>
200b7d0: 03 00 80 7f sethi %hi(0x201fc00), %g1
_Thread_Enable_dispatch();
200b7d4: 40 00 03 8f call 200c610 <_Thread_Enable_dispatch>
200b7d8: 01 00 00 00 nop
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
200b7dc: 03 00 80 7f sethi %hi(0x201fc00), %g1
200b7e0: c4 00 62 e8 ld [ %g1 + 0x2e8 ], %g2 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
200b7e4: 80 a0 80 18 cmp %g2, %i0
200b7e8: 08 80 00 1b bleu 200b854 <_Scheduler_CBS_Detach_thread+0x9c>
200b7ec: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
200b7f0: 80 a7 60 00 cmp %i5, 0
200b7f4: 02 80 00 18 be 200b854 <_Scheduler_CBS_Detach_thread+0x9c>
200b7f8: 01 00 00 00 nop
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
200b7fc: 03 00 80 83 sethi %hi(0x2020c00), %g1
200b800: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 2020e38 <_Scheduler_CBS_Server_list>
200b804: b1 2e 20 02 sll %i0, 2, %i0
200b808: c4 00 40 18 ld [ %g1 + %i0 ], %g2
200b80c: 80 a0 a0 00 cmp %g2, 0
200b810: 02 80 00 11 be 200b854 <_Scheduler_CBS_Detach_thread+0x9c>
200b814: 82 10 3f e7 mov -25, %g1
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
200b818: c6 00 80 00 ld [ %g2 ], %g3
200b81c: 80 a0 c0 19 cmp %g3, %i1
200b820: 12 80 00 0d bne 200b854 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
200b824: 82 10 3f ee mov -18, %g1
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;
200b828: c8 07 60 88 ld [ %i5 + 0x88 ], %g4
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
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;
200b82c: 82 10 3f ff mov -1, %g1
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200b830: c6 07 60 a0 ld [ %i5 + 0xa0 ], %g3
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
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;
200b834: c2 20 80 00 st %g1, [ %g2 ]
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
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;
200b838: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200b83c: c4 07 60 a4 ld [ %i5 + 0xa4 ], %g2
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;
200b840: c0 21 20 18 clr [ %g4 + 0x18 ]
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;
200b844: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200b848: c6 27 60 78 st %g3, [ %i5 + 0x78 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
200b84c: c4 27 60 7c st %g2, [ %i5 + 0x7c ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
200b850: 82 10 20 00 clr %g1
}
200b854: 81 c7 e0 08 ret
200b858: 91 e8 00 01 restore %g0, %g1, %o0
0200ba20 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200ba20: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ba24: 03 00 80 7f sethi %hi(0x201fc00), %g1
200ba28: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200ba2c: 84 10 00 18 mov %i0, %g2
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ba30: 80 a0 60 00 cmp %g1, 0
200ba34: 02 80 00 13 be 200ba80 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN
200ba38: b0 10 3f e7 mov -25, %i0
200ba3c: 07 00 80 83 sethi %hi(0x2020c00), %g3
200ba40: de 00 e2 38 ld [ %g3 + 0x238 ], %o7 ! 2020e38 <_Scheduler_CBS_Server_list>
200ba44: 86 10 20 00 clr %g3
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Get_server_id (
200ba48: 89 28 e0 02 sll %g3, 2, %g4
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
200ba4c: c8 03 c0 04 ld [ %o7 + %g4 ], %g4
200ba50: 80 a1 20 00 cmp %g4, 0
200ba54: 22 80 00 07 be,a 200ba70 <_Scheduler_CBS_Get_server_id+0x50>
200ba58: 86 00 e0 01 inc %g3
200ba5c: c8 01 00 00 ld [ %g4 ], %g4
200ba60: 80 a1 00 02 cmp %g4, %g2
200ba64: 22 80 00 09 be,a 200ba88 <_Scheduler_CBS_Get_server_id+0x68>
200ba68: c6 26 40 00 st %g3, [ %i1 ]
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ba6c: 86 00 e0 01 inc %g3
200ba70: 80 a0 c0 01 cmp %g3, %g1
200ba74: 12 bf ff f6 bne 200ba4c <_Scheduler_CBS_Get_server_id+0x2c>
200ba78: 89 28 e0 02 sll %g3, 2, %g4
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
200ba7c: b0 10 3f e7 mov -25, %i0
}
200ba80: 81 c7 e0 08 ret
200ba84: 81 e8 00 00 restore
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
200ba88: 81 c7 e0 08 ret
200ba8c: 91 e8 20 00 restore %g0, 0, %o0
0200bafc <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
200bafc: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
200bb00: 3b 00 80 7f sethi %hi(0x201fc00), %i5
200bb04: d0 07 62 e8 ld [ %i5 + 0x2e8 ], %o0 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
200bb08: b0 10 3f ef mov -17, %i0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
200bb0c: 40 00 07 1c call 200d77c <_Workspace_Allocate>
200bb10: 91 2a 20 02 sll %o0, 2, %o0
200bb14: 09 00 80 83 sethi %hi(0x2020c00), %g4
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
200bb18: 80 a2 20 00 cmp %o0, 0
200bb1c: 02 80 00 0f be 200bb58 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200bb20: d0 21 22 38 st %o0, [ %g4 + 0x238 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200bb24: c6 07 62 e8 ld [ %i5 + 0x2e8 ], %g3
200bb28: 80 a0 e0 00 cmp %g3, 0
200bb2c: 02 80 00 0b be 200bb58 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200bb30: b0 10 20 00 clr %i0
200bb34: 10 80 00 03 b 200bb40 <_Scheduler_CBS_Initialize+0x44>
200bb38: 82 10 20 00 clr %g1
200bb3c: d0 01 22 38 ld [ %g4 + 0x238 ], %o0
_Scheduler_CBS_Server_list[i] = NULL;
200bb40: 85 28 60 02 sll %g1, 2, %g2
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++) {
200bb44: 82 00 60 01 inc %g1
200bb48: 80 a0 40 03 cmp %g1, %g3
200bb4c: 12 bf ff fc bne 200bb3c <_Scheduler_CBS_Initialize+0x40>
200bb50: c0 22 00 02 clr [ %o0 + %g2 ]
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
200bb54: b0 10 20 00 clr %i0
}
200bb58: 81 c7 e0 08 ret
200bb5c: 81 e8 00 00 restore
0200a654 <_Scheduler_CBS_Release_job>:
{
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;
200a654: c2 02 20 88 ld [ %o0 + 0x88 ], %g1
if (deadline) {
200a658: 80 a2 60 00 cmp %o1, 0
200a65c: 02 80 00 11 be 200a6a0 <_Scheduler_CBS_Release_job+0x4c>
200a660: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
200a664: 80 a0 60 00 cmp %g1, 0
200a668: 02 80 00 13 be 200a6b4 <_Scheduler_CBS_Release_job+0x60>
200a66c: 07 00 80 7c sethi %hi(0x201f000), %g3
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
200a670: c4 00 60 04 ld [ %g1 + 4 ], %g2
200a674: d2 00 e0 d0 ld [ %g3 + 0xd0 ], %o1
200a678: 92 02 40 02 add %o1, %g2, %o1
200a67c: 05 20 00 00 sethi %hi(0x80000000), %g2
200a680: 92 2a 40 02 andn %o1, %g2, %o1
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
200a684: c2 00 60 08 ld [ %g1 + 8 ], %g1
200a688: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
the_thread->real_priority = new_priority;
200a68c: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
200a690: 94 10 20 01 mov 1, %o2
200a694: 82 13 c0 00 mov %o7, %g1
200a698: 40 00 01 45 call 200abac <_Thread_Change_priority>
200a69c: 9e 10 40 00 mov %g1, %o7
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
200a6a0: 80 a0 60 00 cmp %g1, 0
200a6a4: 12 bf ff f8 bne 200a684 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN
200a6a8: d2 02 20 ac ld [ %o0 + 0xac ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
the_thread->real_priority = new_priority;
200a6ac: 10 bf ff f9 b 200a690 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED
200a6b0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
200a6b4: 03 00 80 7c sethi %hi(0x201f000), %g1
200a6b8: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 201f0d0 <_Watchdog_Ticks_since_boot>
200a6bc: 92 02 40 01 add %o1, %g1, %o1
200a6c0: 03 20 00 00 sethi %hi(0x80000000), %g1
200a6c4: 10 bf ff f2 b 200a68c <_Scheduler_CBS_Release_job+0x38>
200a6c8: 92 2a 40 01 andn %o1, %g1, %o1
0200a6cc <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
200a6cc: 9d e3 bf a0 save %sp, -96, %sp
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
200a6d0: 40 00 00 5b call 200a83c <_Scheduler_EDF_Enqueue>
200a6d4: 90 10 00 18 mov %i0, %o0
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
200a6d8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
200a6dc: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
* 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) {
200a6e0: 80 a7 60 00 cmp %i5, 0
200a6e4: 02 80 00 19 be 200a748 <_Scheduler_CBS_Unblock+0x7c>
200a6e8: 03 00 80 7c sethi %hi(0x201f000), %g1
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a6ec: d2 07 60 04 ld [ %i5 + 4 ], %o1
*/
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 -
200a6f0: d0 00 60 d0 ld [ %g1 + 0xd0 ], %o0
200a6f4: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a6f8: 40 00 3e 3a call 2019fe0 <.umul>
200a6fc: 90 27 00 08 sub %i4, %o0, %o0
200a700: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
200a704: b6 10 00 08 mov %o0, %i3
200a708: 40 00 3e 36 call 2019fe0 <.umul>
200a70c: d0 07 60 08 ld [ %i5 + 8 ], %o0
200a710: 80 a6 c0 08 cmp %i3, %o0
200a714: 24 80 00 0e ble,a 200a74c <_Scheduler_CBS_Unblock+0x80>
200a718: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200a71c: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200a720: 80 a7 00 09 cmp %i4, %o1
200a724: 32 80 00 02 bne,a 200a72c <_Scheduler_CBS_Unblock+0x60>
200a728: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200a72c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
200a730: 80 a2 00 09 cmp %o0, %o1
200a734: 02 80 00 07 be 200a750 <_Scheduler_CBS_Unblock+0x84>
200a738: 3b 00 80 7c sethi %hi(0x201f000), %i5
_Thread_Change_priority(the_thread, new_priority, true);
200a73c: 90 10 00 18 mov %i0, %o0
200a740: 40 00 01 1b call 200abac <_Thread_Change_priority>
200a744: 94 10 20 01 mov 1, %o2
200a748: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
* 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,
200a74c: 3b 00 80 7c sethi %hi(0x201f000), %i5
200a750: ba 17 61 f0 or %i5, 0x1f0, %i5 ! 201f1f0 <_Per_CPU_Information>
200a754: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200a758: d2 00 60 14 ld [ %g1 + 0x14 ], %o1
200a75c: 03 00 80 78 sethi %hi(0x201e000), %g1
200a760: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 201e2fc <_Scheduler+0x30>
200a764: 9f c0 40 00 call %g1
200a768: 01 00 00 00 nop
200a76c: 80 a2 20 00 cmp %o0, 0
200a770: 04 80 00 0a ble 200a798 <_Scheduler_CBS_Unblock+0xcc>
200a774: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a778: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* 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;
200a77c: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200a780: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a784: 80 a0 60 00 cmp %g1, 0
200a788: 22 80 00 06 be,a 200a7a0 <_Scheduler_CBS_Unblock+0xd4>
200a78c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a790: 82 10 20 01 mov 1, %g1
200a794: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
200a798: 81 c7 e0 08 ret
200a79c: 81 e8 00 00 restore
* 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;
if ( _Thread_Executing->is_preemptible ||
200a7a0: 80 a0 60 00 cmp %g1, 0
200a7a4: 12 bf ff fd bne 200a798 <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN
200a7a8: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a7ac: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
200a7b0: 30 bf ff fa b,a 200a798 <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED
0200a7b4 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
200a7b4: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
200a7b8: 40 00 06 c4 call 200c2c8 <_Workspace_Allocate>
200a7bc: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
200a7c0: 80 a2 20 00 cmp %o0, 0
200a7c4: 02 80 00 05 be 200a7d8 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
200a7c8: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
200a7cc: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
200a7d0: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
200a7d4: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
200a7d8: 81 c7 e0 08 ret
200a7dc: 91 e8 00 08 restore %g0, %o0, %o0
0200a844 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
200a844: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
200a848: 7f ff ff a5 call 200a6dc <_Scheduler_EDF_Enqueue>
200a84c: 90 10 00 18 mov %i0, %o0
* 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(
200a850: 3b 00 80 7c sethi %hi(0x201f000), %i5
200a854: ba 17 61 50 or %i5, 0x150, %i5 ! 201f150 <_Per_CPU_Information>
200a858: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200a85c: d0 00 60 14 ld [ %g1 + 0x14 ], %o0
200a860: 03 00 80 78 sethi %hi(0x201e000), %g1
200a864: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 201e25c <_Scheduler+0x30>
200a868: 9f c0 40 00 call %g1
200a86c: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
200a870: 80 a2 20 00 cmp %o0, 0
200a874: 26 80 00 04 bl,a 200a884 <_Scheduler_EDF_Unblock+0x40>
200a878: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200a87c: 81 c7 e0 08 ret
200a880: 81 e8 00 00 restore
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
200a884: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200a888: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a88c: 80 a0 60 00 cmp %g1, 0
200a890: 22 80 00 06 be,a 200a8a8 <_Scheduler_EDF_Unblock+0x64>
200a894: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a898: 82 10 20 01 mov 1, %g1
200a89c: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
200a8a0: 81 c7 e0 08 ret
200a8a4: 81 e8 00 00 restore
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a8a8: 80 a0 60 00 cmp %g1, 0
200a8ac: 12 bf ff f4 bne 200a87c <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN
200a8b0: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a8b4: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
200a8b8: 30 bf ff fa b,a 200a8a0 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED
0200a848 <_Scheduler_simple_Ready_queue_enqueue_first>:
{
Chain_Control *ready;
Chain_Node *the_node;
Thread_Control *current;
ready = (Chain_Control *)_Scheduler.information;
200a848: 03 00 80 75 sethi %hi(0x201d400), %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200a84c: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 201d71c <_Scheduler>
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
200a850: c6 02 20 14 ld [ %o0 + 0x14 ], %g3
200a854: c2 00 40 00 ld [ %g1 ], %g1
200a858: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200a85c: 80 a0 80 03 cmp %g2, %g3
200a860: 3a 80 00 08 bcc,a 200a880 <_Scheduler_simple_Ready_queue_enqueue_first+0x38>
200a864: c2 00 60 04 ld [ %g1 + 4 ], %g1
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
200a868: c2 00 40 00 ld [ %g1 ], %g1
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
200a86c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200a870: 80 a0 80 03 cmp %g2, %g3
200a874: 2a bf ff fe bcs,a 200a86c <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN
200a878: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
current = (Thread_Control *)current->Object.Node.previous;
200a87c: c2 00 60 04 ld [ %g1 + 4 ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
200a880: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
200a884: c2 22 20 04 st %g1, [ %o0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
200a888: d0 20 40 00 st %o0, [ %g1 ]
the_node->next = before_node;
200a88c: c4 22 00 00 st %g2, [ %o0 ]
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
200a890: 81 c3 e0 08 retl
200a894: d0 20 a0 04 st %o0, [ %g2 + 4 ]
02008cc4 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
2008cc4: 9d e3 bf a0 save %sp, -96, %sp
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008cc8: 09 00 80 75 sethi %hi(0x201d400), %g4
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008ccc: 05 00 80 71 sethi %hi(0x201c400), %g2
2008cd0: d8 19 20 30 ldd [ %g4 + 0x30 ], %o4
2008cd4: c6 00 a2 5c ld [ %g2 + 0x25c ], %g3
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008cd8: 03 00 80 75 sethi %hi(0x201d400), %g1
2008cdc: f8 18 60 40 ldd [ %g1 + 0x40 ], %i4 ! 201d440 <_TOD_Now>
2008ce0: 9f 28 e0 07 sll %g3, 7, %o7
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008ce4: 37 00 80 75 sethi %hi(0x201d400), %i3
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008ce8: 85 28 e0 02 sll %g3, 2, %g2
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008cec: f4 06 e0 c0 ld [ %i3 + 0xc0 ], %i2
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008cf0: 84 23 c0 02 sub %o7, %g2, %g2
2008cf4: 84 00 80 03 add %g2, %g3, %g2
2008cf8: 85 28 a0 03 sll %g2, 3, %g2
2008cfc: 86 10 00 02 mov %g2, %g3
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008d00: 9a 80 c0 0d addcc %g3, %o5, %o5
2008d04: 84 10 20 00 clr %g2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d08: 92 10 00 1d mov %i5, %o1
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008d0c: 98 40 80 0c addx %g2, %o4, %o4
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
*_time += *_add;
2008d10: ba 80 c0 1d addcc %g3, %i5, %i5
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008d14: b4 06 a0 01 inc %i2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d18: 94 10 20 00 clr %o2
2008d1c: f4 26 e0 c0 st %i2, [ %i3 + 0xc0 ]
2008d20: 90 10 00 1c mov %i4, %o0
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008d24: d8 39 20 30 std %o4, [ %g4 + 0x30 ]
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
*_time += *_add;
2008d28: b8 40 80 1c addx %g2, %i4, %i4
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d2c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
*_time += *_add;
2008d30: f8 38 60 40 std %i4, [ %g1 + 0x40 ]
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d34: 40 00 3f d3 call 2018c80 <__divdi3>
2008d38: 96 12 e2 00 or %o3, 0x200, %o3
*_time += *_add;
if ( ((*_time) / 1000000000L) != _start ) {
2008d3c: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d40: b6 10 00 08 mov %o0, %i3
2008d44: b4 10 00 09 mov %o1, %i2
*_time += *_add;
if ( ((*_time) / 1000000000L) != _start ) {
2008d48: 90 10 00 1c mov %i4, %o0
2008d4c: 92 10 00 1d mov %i5, %o1
2008d50: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2008d54: 40 00 3f cb call 2018c80 <__divdi3>
2008d58: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
2008d5c: 80 a6 c0 08 cmp %i3, %o0
2008d60: 02 80 00 05 be 2008d74 <_TOD_Tickle_ticks+0xb0> <== ALWAYS TAKEN
2008d64: 80 a6 80 09 cmp %i2, %o1
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
2008d68: 31 00 80 75 sethi %hi(0x201d400), %i0 <== NOT EXECUTED
2008d6c: 40 00 0a 9e call 200b7e4 <_Watchdog_Tickle>
2008d70: 91 ee 20 64 restore %i0, 0x64, %o0
2008d74: 12 bf ff fe bne 2008d6c <_TOD_Tickle_ticks+0xa8>
2008d78: 31 00 80 75 sethi %hi(0x201d400), %i0
2008d7c: 81 c7 e0 08 ret
2008d80: 81 e8 00 00 restore
020089f0 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
20089f0: 9d e3 bf a0 save %sp, -96, %sp
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
20089f4: 03 00 80 7b sethi %hi(0x201ec00), %g1
(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;
20089f8: ba 10 20 00 clr %i5
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) ||
20089fc: 80 a6 20 00 cmp %i0, 0
2008a00: 02 80 00 2c be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008a04: d2 00 60 fc ld [ %g1 + 0xfc ], %o1
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
2008a08: 11 00 03 d0 sethi %hi(0xf4000), %o0
2008a0c: 40 00 47 41 call 201a710 <.udiv>
2008a10: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
2008a14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008a18: 80 a2 00 01 cmp %o0, %g1
2008a1c: 28 80 00 26 bleu,a 2008ab4 <_TOD_Validate+0xc4>
2008a20: b0 0f 60 01 and %i5, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
2008a24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2008a28: 80 a0 60 3b cmp %g1, 0x3b
2008a2c: 38 80 00 22 bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a30: b0 0f 60 01 and %i5, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
2008a34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2008a38: 80 a0 60 3b cmp %g1, 0x3b
2008a3c: 38 80 00 1e bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a40: b0 0f 60 01 and %i5, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
2008a44: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2008a48: 80 a0 60 17 cmp %g1, 0x17
2008a4c: 38 80 00 1a bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a50: b0 0f 60 01 and %i5, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
2008a54: c2 06 20 04 ld [ %i0 + 4 ], %g1
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) ||
2008a58: 80 a0 60 00 cmp %g1, 0
2008a5c: 02 80 00 15 be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008a60: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
2008a64: 38 80 00 14 bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a68: b0 0f 60 01 and %i5, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
2008a6c: c4 06 00 00 ld [ %i0 ], %g2
(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) ||
2008a70: 80 a0 a7 c3 cmp %g2, 0x7c3
2008a74: 28 80 00 10 bleu,a 2008ab4 <_TOD_Validate+0xc4>
2008a78: b0 0f 60 01 and %i5, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
2008a7c: c6 06 20 08 ld [ %i0 + 8 ], %g3
(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) ||
2008a80: 80 a0 e0 00 cmp %g3, 0
2008a84: 02 80 00 0b be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008a88: 80 88 a0 03 btst 3, %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
2008a8c: 32 80 00 0c bne,a 2008abc <_TOD_Validate+0xcc>
2008a90: 83 28 60 02 sll %g1, 2, %g1
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2008a94: 82 00 60 0d add %g1, 0xd, %g1
2008a98: 05 00 80 76 sethi %hi(0x201d800), %g2
2008a9c: 83 28 60 02 sll %g1, 2, %g1
2008aa0: 84 10 a0 f8 or %g2, 0xf8, %g2
2008aa4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
2008aa8: 80 a0 40 03 cmp %g1, %g3
2008aac: ba 60 3f ff subx %g0, -1, %i5
if ( the_tod->day > days_in_month )
return false;
return true;
}
2008ab0: b0 0f 60 01 and %i5, 1, %i0
2008ab4: 81 c7 e0 08 ret
2008ab8: 81 e8 00 00 restore
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
2008abc: 05 00 80 76 sethi %hi(0x201d800), %g2
2008ac0: 84 10 a0 f8 or %g2, 0xf8, %g2 ! 201d8f8 <_TOD_Days_per_month>
2008ac4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
2008ac8: 80 a0 40 03 cmp %g1, %g3
2008acc: 10 bf ff f9 b 2008ab0 <_TOD_Validate+0xc0>
2008ad0: ba 60 3f ff subx %g0, -1, %i5
0200a2b4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
200a2b4: 9d e3 bf a0 save %sp, -96, %sp
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
200a2b8: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
/*
* 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 );
200a2bc: 40 00 03 a3 call 200b148 <_Thread_Set_transient>
200a2c0: 90 10 00 18 mov %i0, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
200a2c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a2c8: 80 a0 40 19 cmp %g1, %i1
200a2cc: 02 80 00 05 be 200a2e0 <_Thread_Change_priority+0x2c>
200a2d0: ba 10 00 18 mov %i0, %i5
_Thread_Set_priority( the_thread, new_priority );
200a2d4: 90 10 00 18 mov %i0, %o0
200a2d8: 40 00 03 82 call 200b0e0 <_Thread_Set_priority>
200a2dc: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
200a2e0: 7f ff e0 f6 call 20026b8 <sparc_disable_interrupts>
200a2e4: 01 00 00 00 nop
200a2e8: b2 10 00 08 mov %o0, %i1
/*
* 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;
200a2ec: f6 07 60 10 ld [ %i5 + 0x10 ], %i3
if ( state != STATES_TRANSIENT ) {
200a2f0: 80 a6 e0 04 cmp %i3, 4
200a2f4: 02 80 00 18 be 200a354 <_Thread_Change_priority+0xa0>
200a2f8: 80 8f 20 04 btst 4, %i4
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
200a2fc: 02 80 00 0b be 200a328 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN
200a300: 82 0e ff fb and %i3, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
200a304: 7f ff e0 f1 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
200a308: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
200a30c: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
200a310: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
200a314: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED
200a318: 32 80 00 0d bne,a 200a34c <_Thread_Change_priority+0x98> <== NOT EXECUTED
200a31c: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED
200a320: 81 c7 e0 08 ret
200a324: 81 e8 00 00 restore
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* 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 );
200a328: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
200a32c: 7f ff e0 e7 call 20026c8 <sparc_enable_interrupts>
200a330: 90 10 00 19 mov %i1, %o0
200a334: 03 00 00 ef sethi %hi(0x3bc00), %g1
200a338: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( state ) ) {
200a33c: 80 8e c0 01 btst %i3, %g1
200a340: 02 bf ff f8 be 200a320 <_Thread_Change_priority+0x6c>
200a344: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
200a348: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
200a34c: 40 00 03 34 call 200b01c <_Thread_queue_Requeue>
200a350: 93 e8 00 1d restore %g0, %i5, %o1
200a354: 39 00 80 71 sethi %hi(0x201c400), %i4
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
200a358: 12 80 00 08 bne 200a378 <_Thread_Change_priority+0xc4> <== NEVER TAKEN
200a35c: b8 17 23 3c or %i4, 0x33c, %i4 ! 201c73c <_Scheduler>
* 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 )
200a360: 80 a6 a0 00 cmp %i2, 0
200a364: 02 80 00 1b be 200a3d0 <_Thread_Change_priority+0x11c>
200a368: c0 27 60 10 clr [ %i5 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
200a36c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1
200a370: 9f c0 40 00 call %g1
200a374: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
200a378: 7f ff e0 d4 call 20026c8 <sparc_enable_interrupts>
200a37c: 90 10 00 19 mov %i1, %o0
200a380: 7f ff e0 ce call 20026b8 <sparc_disable_interrupts>
200a384: 01 00 00 00 nop
200a388: b0 10 00 08 mov %o0, %i0
* 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();
200a38c: c2 07 20 08 ld [ %i4 + 8 ], %g1
200a390: 9f c0 40 00 call %g1
200a394: 01 00 00 00 nop
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
200a398: 03 00 80 75 sethi %hi(0x201d400), %g1
200a39c: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201d5e0 <_Per_CPU_Information>
200a3a0: c4 00 60 0c ld [ %g1 + 0xc ], %g2
* 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() &&
200a3a4: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200a3a8: 80 a0 80 03 cmp %g2, %g3
200a3ac: 02 80 00 07 be 200a3c8 <_Thread_Change_priority+0x114>
200a3b0: 01 00 00 00 nop
200a3b4: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
200a3b8: 80 a0 a0 00 cmp %g2, 0
200a3bc: 02 80 00 03 be 200a3c8 <_Thread_Change_priority+0x114>
200a3c0: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
200a3c4: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
_ISR_Enable( level );
200a3c8: 7f ff e0 c0 call 20026c8 <sparc_enable_interrupts>
200a3cc: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
200a3d0: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
200a3d4: 9f c0 40 00 call %g1
200a3d8: 90 10 00 1d mov %i5, %o0
200a3dc: 30 bf ff e7 b,a 200a378 <_Thread_Change_priority+0xc4>
0200a5f8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200a5f8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a5fc: 90 10 00 18 mov %i0, %o0
200a600: 40 00 00 77 call 200a7dc <_Thread_Get>
200a604: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a608: c2 07 bf fc ld [ %fp + -4 ], %g1
200a60c: 80 a0 60 00 cmp %g1, 0
200a610: 12 80 00 09 bne 200a634 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN
200a614: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
200a618: 7f ff ff 72 call 200a3e0 <_Thread_Clear_state>
200a61c: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_END+0xdc00018>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a620: 03 00 80 74 sethi %hi(0x201d000), %g1
200a624: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level>
200a628: 84 00 bf ff add %g2, -1, %g2
200a62c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200a630: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
200a634: 81 c7 e0 08 ret
200a638: 81 e8 00 00 restore
0200a63c <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
200a63c: 9d e3 bf 98 save %sp, -104, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200a640: 31 00 80 74 sethi %hi(0x201d000), %i0
200a644: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level>
200a648: 82 00 60 01 inc %g1
200a64c: c2 26 23 b0 st %g1, [ %i0 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200a650: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
200a654: 39 00 80 75 sethi %hi(0x201d400), %i4
200a658: b8 17 21 e0 or %i4, 0x1e0, %i4 ! 201d5e0 <_Per_CPU_Information>
_ISR_Disable( level );
200a65c: 7f ff e0 17 call 20026b8 <sparc_disable_interrupts>
200a660: fa 07 20 0c ld [ %i4 + 0xc ], %i5
while ( _Thread_Dispatch_necessary == true ) {
200a664: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
200a668: 80 a0 60 00 cmp %g1, 0
200a66c: 02 80 00 45 be 200a780 <_Thread_Dispatch+0x144>
200a670: 01 00 00 00 nop
heir = _Thread_Heir;
200a674: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
200a678: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
200a67c: 80 a7 40 1b cmp %i5, %i3
200a680: 02 80 00 40 be 200a780 <_Thread_Dispatch+0x144>
200a684: f6 27 20 0c st %i3, [ %i4 + 0xc ]
200a688: 33 00 80 75 sethi %hi(0x201d400), %i1
#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;
200a68c: 21 00 80 74 sethi %hi(0x201d000), %l0
200a690: b2 16 60 3c or %i1, 0x3c, %i1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200a694: 10 80 00 35 b 200a768 <_Thread_Dispatch+0x12c>
200a698: 35 00 80 75 sethi %hi(0x201d400), %i2
_ISR_Enable( level );
200a69c: 7f ff e0 0b call 20026c8 <sparc_enable_interrupts>
200a6a0: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
200a6a4: 40 00 0c 1f call 200d720 <_TOD_Get_uptime>
200a6a8: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200a6ac: c4 1f 20 20 ldd [ %i4 + 0x20 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200a6b0: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2
_Timestamp_Subtract(
200a6b4: d8 1f bf f8 ldd [ %fp + -8 ], %o4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
200a6b8: c2 06 40 00 ld [ %i1 ], %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200a6bc: 86 a3 40 03 subcc %o5, %g3, %g3
200a6c0: 84 63 00 02 subx %o4, %g2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200a6c4: 86 82 c0 03 addcc %o3, %g3, %g3
200a6c8: 84 42 80 02 addx %o2, %g2, %g2
200a6cc: c4 3f 60 80 std %g2, [ %i5 + 0x80 ]
200a6d0: 80 a0 60 00 cmp %g1, 0
200a6d4: 02 80 00 06 be 200a6ec <_Thread_Dispatch+0xb0> <== NEVER TAKEN
200a6d8: d8 3f 20 20 std %o4, [ %i4 + 0x20 ]
executing->libc_reent = *_Thread_libc_reent;
200a6dc: c4 00 40 00 ld [ %g1 ], %g2
200a6e0: c4 27 61 4c st %g2, [ %i5 + 0x14c ]
*_Thread_libc_reent = heir->libc_reent;
200a6e4: c4 06 e1 4c ld [ %i3 + 0x14c ], %g2
200a6e8: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
200a6ec: 90 10 00 1d mov %i5, %o0
200a6f0: 40 00 03 93 call 200b53c <_User_extensions_Thread_switch>
200a6f4: 92 10 00 1b mov %i3, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
200a6f8: 90 07 60 c0 add %i5, 0xc0, %o0
200a6fc: 40 00 04 dd call 200ba70 <_CPU_Context_switch>
200a700: 92 06 e0 c0 add %i3, 0xc0, %o1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200a704: c2 07 61 48 ld [ %i5 + 0x148 ], %g1
200a708: 80 a0 60 00 cmp %g1, 0
200a70c: 02 80 00 0c be 200a73c <_Thread_Dispatch+0x100>
200a710: d0 06 a0 38 ld [ %i2 + 0x38 ], %o0
200a714: 80 a7 40 08 cmp %i5, %o0
200a718: 02 80 00 09 be 200a73c <_Thread_Dispatch+0x100>
200a71c: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200a720: 02 80 00 04 be 200a730 <_Thread_Dispatch+0xf4>
200a724: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200a728: 40 00 04 98 call 200b988 <_CPU_Context_save_fp>
200a72c: 90 02 21 48 add %o0, 0x148, %o0
_Context_Restore_fp( &executing->fp_context );
200a730: 40 00 04 b3 call 200b9fc <_CPU_Context_restore_fp>
200a734: 90 07 61 48 add %i5, 0x148, %o0
_Thread_Allocated_fp = executing;
200a738: fa 26 a0 38 st %i5, [ %i2 + 0x38 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
200a73c: 7f ff df df call 20026b8 <sparc_disable_interrupts>
200a740: fa 07 20 0c ld [ %i4 + 0xc ], %i5
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
200a744: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
200a748: 80 a0 60 00 cmp %g1, 0
200a74c: 02 80 00 0d be 200a780 <_Thread_Dispatch+0x144>
200a750: 01 00 00 00 nop
heir = _Thread_Heir;
200a754: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
200a758: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
200a75c: 80 a6 c0 1d cmp %i3, %i5
200a760: 02 80 00 08 be 200a780 <_Thread_Dispatch+0x144> <== NEVER TAKEN
200a764: f6 27 20 0c st %i3, [ %i4 + 0xc ]
*/
#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 )
200a768: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1
200a76c: 80 a0 60 01 cmp %g1, 1
200a770: 12 bf ff cb bne 200a69c <_Thread_Dispatch+0x60>
200a774: c2 04 23 14 ld [ %l0 + 0x314 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a778: 10 bf ff c9 b 200a69c <_Thread_Dispatch+0x60>
200a77c: c2 26 e0 74 st %g1, [ %i3 + 0x74 ]
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
200a780: 7f ff df d2 call 20026c8 <sparc_enable_interrupts>
200a784: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a788: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1
200a78c: 82 00 7f ff add %g1, -1, %g1
200a790: c2 26 23 b0 st %g1, [ %i0 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200a794: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
200a798: 7f ff f7 ad call 200864c <_API_extensions_Run_postswitch>
200a79c: 01 00 00 00 nop
}
200a7a0: 81 c7 e0 08 ret
200a7a4: 81 e8 00 00 restore
0200f5ac <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200f5ac: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
200f5b0: 03 00 80 75 sethi %hi(0x201d400), %g1
200f5b4: fa 00 61 ec ld [ %g1 + 0x1ec ], %i5 ! 201d5ec <_Per_CPU_Information+0xc>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
200f5b8: 3f 00 80 3d sethi %hi(0x200f400), %i7
200f5bc: be 17 e1 ac or %i7, 0x1ac, %i7 ! 200f5ac <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200f5c0: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0
_ISR_Set_level(level);
200f5c4: 7f ff cc 41 call 20026c8 <sparc_enable_interrupts>
200f5c8: 91 2a 20 08 sll %o0, 8, %o0
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f5cc: c4 07 61 48 ld [ %i5 + 0x148 ], %g2
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f5d0: 03 00 80 73 sethi %hi(0x201cc00), %g1
doneConstructors = true;
200f5d4: 86 10 20 01 mov 1, %g3
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f5d8: f6 08 63 d8 ldub [ %g1 + 0x3d8 ], %i3
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f5dc: 80 a0 a0 00 cmp %g2, 0
200f5e0: 02 80 00 0c be 200f610 <_Thread_Handler+0x64>
200f5e4: c6 28 63 d8 stb %g3, [ %g1 + 0x3d8 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200f5e8: 39 00 80 75 sethi %hi(0x201d400), %i4
200f5ec: d0 07 20 38 ld [ %i4 + 0x38 ], %o0 ! 201d438 <_Thread_Allocated_fp>
200f5f0: 80 a7 40 08 cmp %i5, %o0
200f5f4: 02 80 00 07 be 200f610 <_Thread_Handler+0x64>
200f5f8: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200f5fc: 22 80 00 05 be,a 200f610 <_Thread_Handler+0x64>
200f600: fa 27 20 38 st %i5, [ %i4 + 0x38 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200f604: 7f ff f0 e1 call 200b988 <_CPU_Context_save_fp>
200f608: 90 02 21 48 add %o0, 0x148, %o0
_Thread_Allocated_fp = executing;
200f60c: fa 27 20 38 st %i5, [ %i4 + 0x38 ]
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
200f610: 7f ff ef 49 call 200b334 <_User_extensions_Thread_begin>
200f614: 90 10 00 1d mov %i5, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200f618: 7f ff ec 64 call 200a7a8 <_Thread_Enable_dispatch>
200f61c: 01 00 00 00 nop
/*
* _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) */ {
200f620: 80 8e e0 ff btst 0xff, %i3
200f624: 02 80 00 0c be 200f654 <_Thread_Handler+0xa8>
200f628: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f62c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
200f630: 80 a0 60 00 cmp %g1, 0
200f634: 22 80 00 0c be,a 200f664 <_Thread_Handler+0xb8> <== ALWAYS TAKEN
200f638: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
200f63c: 7f ff ef 52 call 200b384 <_User_extensions_Thread_exitted>
200f640: 90 10 00 1d mov %i5, %o0
_Internal_error_Occurred(
200f644: 90 10 20 00 clr %o0
200f648: 92 10 20 01 mov 1, %o1
200f64c: 7f ff e6 db call 20091b8 <_Internal_error_Occurred>
200f650: 94 10 20 05 mov 5, %o2
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
200f654: 40 00 33 ed call 201c608 <_init>
200f658: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f65c: 10 bf ff f5 b 200f630 <_Thread_Handler+0x84>
200f660: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
200f664: 9f c0 40 00 call %g1
200f668: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
200f66c: 10 bf ff f4 b 200f63c <_Thread_Handler+0x90>
200f670: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
0200aa6c <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
200aa6c: 9d e3 bf 98 save %sp, -104, %sp
uint32_t ticks_per_timeslice =
200aa70: 05 00 80 71 sethi %hi(0x201c400), %g2
200aa74: 84 10 a2 4c or %g2, 0x24c, %g2 ! 201c64c <Configuration>
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200aa78: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
200aa7c: fa 00 a0 14 ld [ %g2 + 0x14 ], %i5
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
200aa80: f8 00 a0 0c ld [ %g2 + 0xc ], %i4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200aa84: 80 a0 e0 00 cmp %g3, 0
200aa88: 02 80 00 21 be 200ab0c <_Thread_Handler_initialization+0xa0>
200aa8c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
200aa90: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3
200aa94: 80 a0 e0 00 cmp %g3, 0
200aa98: 02 80 00 1d be 200ab0c <_Thread_Handler_initialization+0xa0><== NEVER TAKEN
200aa9c: 80 a0 60 00 cmp %g1, 0
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
200aaa0: 22 80 00 05 be,a 200aab4 <_Thread_Handler_initialization+0x48>
200aaa4: 03 00 80 75 sethi %hi(0x201d400), %g1
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
200aaa8: 9f c0 40 00 call %g1
200aaac: d0 00 a0 08 ld [ %g2 + 8 ], %o0
_Thread_Dispatch_necessary = false;
200aab0: 03 00 80 75 sethi %hi(0x201d400), %g1
200aab4: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201d5e0 <_Per_CPU_Information>
200aab8: c0 28 60 18 clrb [ %g1 + 0x18 ]
_Thread_Executing = NULL;
200aabc: c0 20 60 0c clr [ %g1 + 0xc ]
_Thread_Heir = NULL;
200aac0: c0 20 60 10 clr [ %g1 + 0x10 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
200aac4: 03 00 80 75 sethi %hi(0x201d400), %g1
200aac8: c0 20 60 38 clr [ %g1 + 0x38 ] ! 201d438 <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
200aacc: 03 00 80 75 sethi %hi(0x201d400), %g1
200aad0: f8 20 60 48 st %i4, [ %g1 + 0x48 ] ! 201d448 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
200aad4: 03 00 80 74 sethi %hi(0x201d000), %g1
200aad8: fa 20 63 14 st %i5, [ %g1 + 0x314 ] ! 201d314 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
200aadc: 82 10 20 08 mov 8, %g1
200aae0: 11 00 80 75 sethi %hi(0x201d400), %o0
200aae4: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
200aae8: 90 12 20 c8 or %o0, 0xc8, %o0
200aaec: 92 10 20 01 mov 1, %o1
200aaf0: 94 10 20 01 mov 1, %o2
200aaf4: 96 10 20 01 mov 1, %o3
200aaf8: 98 10 21 60 mov 0x160, %o4
200aafc: 7f ff fb 45 call 2009810 <_Objects_Initialize_information>
200ab00: 9a 10 20 00 clr %o5
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
200ab04: 81 c7 e0 08 ret
200ab08: 81 e8 00 00 restore
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
200ab0c: 90 10 20 00 clr %o0
200ab10: 92 10 20 01 mov 1, %o1
200ab14: 7f ff f9 a9 call 20091b8 <_Internal_error_Occurred>
200ab18: 94 10 20 0e mov 0xe, %o2
0200a88c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
200a88c: 9d e3 bf a0 save %sp, -96, %sp
200a890: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
200a894: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2
200a898: e0 00 40 00 ld [ %g1 ], %l0
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
200a89c: c0 26 61 50 clr [ %i1 + 0x150 ]
200a8a0: c0 26 61 54 clr [ %i1 + 0x154 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
200a8a4: c0 26 61 4c clr [ %i1 + 0x14c ]
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200a8a8: 90 10 00 19 mov %i1, %o0
200a8ac: 40 00 02 36 call 200b184 <_Thread_Stack_Allocate>
200a8b0: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
200a8b4: 80 a2 00 1b cmp %o0, %i3
200a8b8: 0a 80 00 4b bcs 200a9e4 <_Thread_Initialize+0x158>
200a8bc: 80 a2 20 00 cmp %o0, 0
200a8c0: 02 80 00 49 be 200a9e4 <_Thread_Initialize+0x158> <== NEVER TAKEN
200a8c4: 80 a7 20 00 cmp %i4, 0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200a8c8: c2 06 60 bc ld [ %i1 + 0xbc ], %g1
the_stack->size = size;
200a8cc: d0 26 60 b0 st %o0, [ %i1 + 0xb0 ]
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200a8d0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
200a8d4: 12 80 00 48 bne 200a9f4 <_Thread_Initialize+0x168>
200a8d8: b6 10 20 00 clr %i3
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a8dc: 23 00 80 75 sethi %hi(0x201d400), %l1
200a8e0: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 ! 201d448 <_Thread_Maximum_extensions>
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;
200a8e4: f6 26 61 48 st %i3, [ %i1 + 0x148 ]
the_thread->Start.fp_context = fp_area;
200a8e8: f6 26 60 b8 st %i3, [ %i1 + 0xb8 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200a8ec: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
200a8f0: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
200a8f4: c0 26 60 68 clr [ %i1 + 0x68 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a8f8: 80 a0 60 00 cmp %g1, 0
200a8fc: 12 80 00 46 bne 200aa14 <_Thread_Initialize+0x188>
200a900: c0 26 60 6c clr [ %i1 + 0x6c ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200a904: c0 26 61 58 clr [ %i1 + 0x158 ]
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
200a908: b8 10 20 00 clr %i4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
200a90c: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
200a910: 03 00 80 71 sethi %hi(0x201c400), %g1
200a914: c4 26 60 a0 st %g2, [ %i1 + 0xa0 ]
the_thread->Start.budget_callout = budget_callout;
200a918: c4 07 a0 64 ld [ %fp + 0x64 ], %g2
200a91c: c2 00 63 54 ld [ %g1 + 0x354 ], %g1
200a920: c4 26 60 a4 st %g2, [ %i1 + 0xa4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a924: c4 07 a0 68 ld [ %fp + 0x68 ], %g2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
200a928: f4 2e 60 9c stb %i2, [ %i1 + 0x9c ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a92c: c4 26 60 a8 st %g2, [ %i1 + 0xa8 ]
the_thread->current_state = STATES_DORMANT;
200a930: 84 10 20 01 mov 1, %g2
the_thread->Wait.queue = NULL;
200a934: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
200a938: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
200a93c: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
200a940: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
200a944: fa 26 60 ac st %i5, [ %i1 + 0xac ]
200a948: 9f c0 40 00 call %g1
200a94c: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
200a950: b4 92 20 00 orcc %o0, 0, %i2
200a954: 22 80 00 13 be,a 200a9a0 <_Thread_Initialize+0x114>
200a958: d0 06 61 4c ld [ %i1 + 0x14c ], %o0
goto failed;
_Thread_Set_priority( the_thread, priority );
200a95c: 90 10 00 19 mov %i1, %o0
200a960: 40 00 01 e0 call 200b0e0 <_Thread_Set_priority>
200a964: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a968: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
200a96c: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
200a970: c0 26 60 80 clr [ %i1 + 0x80 ]
200a974: c0 26 60 84 clr [ %i1 + 0x84 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a978: 83 28 60 02 sll %g1, 2, %g1
200a97c: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200a980: e0 26 60 0c st %l0, [ %i1 + 0xc ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
200a984: 90 10 00 19 mov %i1, %o0
200a988: 40 00 02 a6 call 200b420 <_User_extensions_Thread_create>
200a98c: b0 10 20 01 mov 1, %i0
if ( extension_status )
200a990: 80 8a 20 ff btst 0xff, %o0
200a994: 32 80 00 12 bne,a 200a9dc <_Thread_Initialize+0x150>
200a998: b0 0e 20 01 and %i0, 1, %i0
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
200a99c: d0 06 61 4c ld [ %i1 + 0x14c ], %o0
200a9a0: 40 00 03 e5 call 200b934 <_Workspace_Free>
200a9a4: b0 10 20 00 clr %i0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
200a9a8: 40 00 03 e3 call 200b934 <_Workspace_Free>
200a9ac: d0 06 61 50 ld [ %i1 + 0x150 ], %o0
200a9b0: 40 00 03 e1 call 200b934 <_Workspace_Free>
200a9b4: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
_Workspace_Free( extensions_area );
200a9b8: 40 00 03 df call 200b934 <_Workspace_Free>
200a9bc: 90 10 00 1c mov %i4, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
200a9c0: 40 00 03 dd call 200b934 <_Workspace_Free>
200a9c4: 90 10 00 1b mov %i3, %o0
#endif
_Workspace_Free( sched );
200a9c8: 40 00 03 db call 200b934 <_Workspace_Free>
200a9cc: 90 10 00 1a mov %i2, %o0
_Thread_Stack_Free( the_thread );
200a9d0: 40 00 01 fe call 200b1c8 <_Thread_Stack_Free>
200a9d4: 90 10 00 19 mov %i1, %o0
return false;
}
200a9d8: b0 0e 20 01 and %i0, 1, %i0
200a9dc: 81 c7 e0 08 ret
200a9e0: 81 e8 00 00 restore
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
200a9e4: b0 10 20 00 clr %i0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
200a9e8: b0 0e 20 01 and %i0, 1, %i0
200a9ec: 81 c7 e0 08 ret
200a9f0: 81 e8 00 00 restore
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
200a9f4: 40 00 03 c8 call 200b914 <_Workspace_Allocate>
200a9f8: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
200a9fc: b6 92 20 00 orcc %o0, 0, %i3
200aa00: 32 bf ff b8 bne,a 200a8e0 <_Thread_Initialize+0x54>
200aa04: 23 00 80 75 sethi %hi(0x201d400), %l1
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
200aa08: b8 10 20 00 clr %i4
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;
200aa0c: 10 bf ff e4 b 200a99c <_Thread_Initialize+0x110>
200aa10: b4 10 20 00 clr %i2
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
200aa14: 82 00 60 01 inc %g1
200aa18: 40 00 03 bf call 200b914 <_Workspace_Allocate>
200aa1c: 91 28 60 02 sll %g1, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
200aa20: b8 92 20 00 orcc %o0, 0, %i4
200aa24: 02 80 00 10 be 200aa64 <_Thread_Initialize+0x1d8>
200aa28: 86 10 00 1c mov %i4, %g3
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200aa2c: f8 26 61 58 st %i4, [ %i1 + 0x158 ]
200aa30: c8 04 60 48 ld [ %l1 + 0x48 ], %g4
* 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++ )
200aa34: 84 10 20 00 clr %g2
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200aa38: 10 80 00 03 b 200aa44 <_Thread_Initialize+0x1b8>
200aa3c: 82 10 20 00 clr %g1
200aa40: c6 06 61 58 ld [ %i1 + 0x158 ], %g3
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
200aa44: 85 28 a0 02 sll %g2, 2, %g2
200aa48: c0 20 c0 02 clr [ %g3 + %g2 ]
* 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++ )
200aa4c: 82 00 60 01 inc %g1
200aa50: 80 a0 40 04 cmp %g1, %g4
200aa54: 08 bf ff fb bleu 200aa40 <_Thread_Initialize+0x1b4>
200aa58: 84 10 00 01 mov %g1, %g2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
200aa5c: 10 bf ff ad b 200a910 <_Thread_Initialize+0x84>
200aa60: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
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;
200aa64: 10 bf ff ce b 200a99c <_Thread_Initialize+0x110>
200aa68: b4 10 20 00 clr %i2
0200b01c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200b01c: 9d e3 bf 98 save %sp, -104, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
200b020: 80 a6 20 00 cmp %i0, 0
200b024: 02 80 00 13 be 200b070 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
200b028: 01 00 00 00 nop
/*
* 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 ) {
200b02c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
200b030: 80 a7 20 01 cmp %i4, 1
200b034: 02 80 00 04 be 200b044 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
200b038: 01 00 00 00 nop
200b03c: 81 c7 e0 08 ret <== NOT EXECUTED
200b040: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
200b044: 7f ff dd 9d call 20026b8 <sparc_disable_interrupts>
200b048: 01 00 00 00 nop
200b04c: ba 10 00 08 mov %o0, %i5
200b050: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200b054: 03 00 00 ef sethi %hi(0x3bc00), %g1
200b058: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200b05c: 80 88 80 01 btst %g2, %g1
200b060: 12 80 00 06 bne 200b078 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
200b064: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
200b068: 7f ff dd 98 call 20026c8 <sparc_enable_interrupts>
200b06c: 90 10 00 1d mov %i5, %o0
200b070: 81 c7 e0 08 ret
200b074: 81 e8 00 00 restore
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
200b078: 92 10 00 19 mov %i1, %o1
200b07c: 94 10 20 01 mov 1, %o2
200b080: 40 00 0b 8c call 200deb0 <_Thread_queue_Extract_priority_helper>
200b084: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
200b088: 90 10 00 18 mov %i0, %o0
200b08c: 92 10 00 19 mov %i1, %o1
200b090: 7f ff ff 35 call 200ad64 <_Thread_queue_Enqueue_priority>
200b094: 94 07 bf fc add %fp, -4, %o2
200b098: 30 bf ff f4 b,a 200b068 <_Thread_queue_Requeue+0x4c>
0200b09c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200b09c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200b0a0: 90 10 00 18 mov %i0, %o0
200b0a4: 7f ff fd ce call 200a7dc <_Thread_Get>
200b0a8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200b0ac: c2 07 bf fc ld [ %fp + -4 ], %g1
200b0b0: 80 a0 60 00 cmp %g1, 0
200b0b4: 12 80 00 09 bne 200b0d8 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN
200b0b8: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200b0bc: 40 00 0b b6 call 200df94 <_Thread_queue_Process_timeout>
200b0c0: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200b0c4: 03 00 80 74 sethi %hi(0x201d000), %g1
200b0c8: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level>
200b0cc: 84 00 bf ff add %g2, -1, %g2
200b0d0: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200b0d4: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
200b0d8: 81 c7 e0 08 ret
200b0dc: 81 e8 00 00 restore
02017c1c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
2017c1c: 9d e3 bf 88 save %sp, -120, %sp
2017c20: 21 00 80 ec sethi %hi(0x203b000), %l0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2017c24: a4 07 bf e8 add %fp, -24, %l2
2017c28: b4 07 bf ec add %fp, -20, %i2
2017c2c: b8 07 bf f4 add %fp, -12, %i4
2017c30: a2 07 bf f8 add %fp, -8, %l1
2017c34: 33 00 80 ec sethi %hi(0x203b000), %i1
2017c38: 27 00 80 ec sethi %hi(0x203b000), %l3
2017c3c: f4 27 bf e8 st %i2, [ %fp + -24 ]
head->previous = NULL;
2017c40: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
2017c44: e4 27 bf f0 st %l2, [ %fp + -16 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2017c48: e2 27 bf f4 st %l1, [ %fp + -12 ]
head->previous = NULL;
2017c4c: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
2017c50: f8 27 bf fc st %i4, [ %fp + -4 ]
2017c54: a0 14 23 50 or %l0, 0x350, %l0
2017c58: ba 06 20 30 add %i0, 0x30, %i5
2017c5c: b2 16 62 d0 or %i1, 0x2d0, %i1
2017c60: b6 06 20 68 add %i0, 0x68, %i3
2017c64: a6 14 e2 40 or %l3, 0x240, %l3
2017c68: ac 06 20 08 add %i0, 8, %l6
2017c6c: aa 06 20 40 add %i0, 0x40, %l5
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
2017c70: a8 10 20 01 mov 1, %l4
{
/*
* 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;
2017c74: e4 26 20 78 st %l2, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2017c78: c2 04 00 00 ld [ %l0 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
2017c7c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2017c80: 90 10 00 1d mov %i5, %o0
2017c84: 92 20 40 09 sub %g1, %o1, %o1
2017c88: 94 10 00 1c mov %i4, %o2
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2017c8c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2017c90: 40 00 12 a6 call 201c728 <_Watchdog_Adjust_to_chain>
2017c94: 01 00 00 00 nop
2017c98: d0 1e 40 00 ldd [ %i1 ], %o0
2017c9c: 94 10 20 00 clr %o2
2017ca0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017ca4: 40 00 4d f9 call 202b488 <__divdi3>
2017ca8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2017cac: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
/*
* 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 ) {
2017cb0: 80 a2 40 0a cmp %o1, %o2
2017cb4: 18 80 00 2b bgu 2017d60 <_Timer_server_Body+0x144>
2017cb8: ae 10 00 09 mov %o1, %l7
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
2017cbc: 80 a2 40 0a cmp %o1, %o2
2017cc0: 0a 80 00 20 bcs 2017d40 <_Timer_server_Body+0x124>
2017cc4: 90 10 00 1b mov %i3, %o0
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
2017cc8: ee 26 20 74 st %l7, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2017ccc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2017cd0: 40 00 02 fe call 20188c8 <_Chain_Get>
2017cd4: 01 00 00 00 nop
if ( timer == NULL ) {
2017cd8: 92 92 20 00 orcc %o0, 0, %o1
2017cdc: 02 80 00 10 be 2017d1c <_Timer_server_Body+0x100>
2017ce0: 01 00 00 00 nop
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2017ce4: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
2017ce8: 80 a0 60 01 cmp %g1, 1
2017cec: 02 80 00 19 be 2017d50 <_Timer_server_Body+0x134>
2017cf0: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2017cf4: 12 bf ff f6 bne 2017ccc <_Timer_server_Body+0xb0> <== NEVER TAKEN
2017cf8: 92 02 60 10 add %o1, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2017cfc: 40 00 12 bc call 201c7ec <_Watchdog_Insert>
2017d00: 90 10 00 1b mov %i3, %o0
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2017d04: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2017d08: 40 00 02 f0 call 20188c8 <_Chain_Get>
2017d0c: 01 00 00 00 nop
if ( timer == NULL ) {
2017d10: 92 92 20 00 orcc %o0, 0, %o1
2017d14: 32 bf ff f5 bne,a 2017ce8 <_Timer_server_Body+0xcc> <== NEVER TAKEN
2017d18: c2 02 60 38 ld [ %o1 + 0x38 ], %g1 <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
2017d1c: 7f ff dd a7 call 200f3b8 <sparc_disable_interrupts>
2017d20: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
2017d24: c2 07 bf e8 ld [ %fp + -24 ], %g1
2017d28: 80 a0 40 1a cmp %g1, %i2
2017d2c: 02 80 00 12 be 2017d74 <_Timer_server_Body+0x158> <== ALWAYS TAKEN
2017d30: 01 00 00 00 nop
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
2017d34: 7f ff dd a5 call 200f3c8 <sparc_enable_interrupts> <== NOT EXECUTED
2017d38: 01 00 00 00 nop <== NOT EXECUTED
2017d3c: 30 bf ff cf b,a 2017c78 <_Timer_server_Body+0x5c> <== NOT EXECUTED
/*
* 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 );
2017d40: 92 10 20 01 mov 1, %o1 ! 1 <PROM_START+0x1>
2017d44: 40 00 12 4a call 201c66c <_Watchdog_Adjust>
2017d48: 94 22 80 17 sub %o2, %l7, %o2
2017d4c: 30 bf ff df b,a 2017cc8 <_Timer_server_Body+0xac>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2017d50: 90 10 00 1d mov %i5, %o0
2017d54: 40 00 12 a6 call 201c7ec <_Watchdog_Insert>
2017d58: 92 02 60 10 add %o1, 0x10, %o1
2017d5c: 30 bf ff dc b,a 2017ccc <_Timer_server_Body+0xb0>
/*
* 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 );
2017d60: 92 22 40 0a sub %o1, %o2, %o1
2017d64: 90 10 00 1b mov %i3, %o0
2017d68: 40 00 12 70 call 201c728 <_Watchdog_Adjust_to_chain>
2017d6c: 94 10 00 1c mov %i4, %o2
2017d70: 30 bf ff d6 b,a 2017cc8 <_Timer_server_Body+0xac>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
2017d74: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2017d78: 7f ff dd 94 call 200f3c8 <sparc_enable_interrupts>
2017d7c: 01 00 00 00 nop
_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 ) ) {
2017d80: c2 07 bf f4 ld [ %fp + -12 ], %g1
2017d84: 80 a0 40 11 cmp %g1, %l1
2017d88: 12 80 00 0c bne 2017db8 <_Timer_server_Body+0x19c>
2017d8c: 01 00 00 00 nop
2017d90: 30 80 00 13 b,a 2017ddc <_Timer_server_Body+0x1c0>
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
new_first->previous = head;
2017d94: f8 20 60 04 st %i4, [ %g1 + 4 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
2017d98: c2 27 bf f4 st %g1, [ %fp + -12 ]
* 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;
2017d9c: c0 25 e0 08 clr [ %l7 + 8 ]
_ISR_Enable( level );
2017da0: 7f ff dd 8a call 200f3c8 <sparc_enable_interrupts>
2017da4: 01 00 00 00 nop
/*
* 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 );
2017da8: d0 05 e0 20 ld [ %l7 + 0x20 ], %o0
2017dac: c2 05 e0 1c ld [ %l7 + 0x1c ], %g1
2017db0: 9f c0 40 00 call %g1
2017db4: d2 05 e0 24 ld [ %l7 + 0x24 ], %o1
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
2017db8: 7f ff dd 80 call 200f3b8 <sparc_disable_interrupts>
2017dbc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017dc0: ee 07 bf f4 ld [ %fp + -12 ], %l7
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2017dc4: 80 a5 c0 11 cmp %l7, %l1
2017dc8: 32 bf ff f3 bne,a 2017d94 <_Timer_server_Body+0x178>
2017dcc: c2 05 c0 00 ld [ %l7 ], %g1
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
2017dd0: 7f ff dd 7e call 200f3c8 <sparc_enable_interrupts>
2017dd4: 01 00 00 00 nop
2017dd8: 30 bf ff a7 b,a 2017c74 <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
2017ddc: c0 2e 20 7c clrb [ %i0 + 0x7c ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2017de0: c2 04 c0 00 ld [ %l3 ], %g1
2017de4: 82 00 60 01 inc %g1
2017de8: c2 24 c0 00 st %g1, [ %l3 ]
return _Thread_Dispatch_disable_level;
2017dec: c2 04 c0 00 ld [ %l3 ], %g1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
2017df0: d0 06 00 00 ld [ %i0 ], %o0
2017df4: 40 00 10 e8 call 201c194 <_Thread_Set_state>
2017df8: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
2017dfc: 7f ff ff 60 call 2017b7c <_Timer_server_Reset_interval_system_watchdog>
2017e00: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
2017e04: 7f ff ff 72 call 2017bcc <_Timer_server_Reset_tod_system_watchdog>
2017e08: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
2017e0c: 40 00 0e 68 call 201b7ac <_Thread_Enable_dispatch>
2017e10: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2017e14: 90 10 00 16 mov %l6, %o0
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
2017e18: e8 2e 20 7c stb %l4, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2017e1c: 40 00 12 d6 call 201c974 <_Watchdog_Remove>
2017e20: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2017e24: 40 00 12 d4 call 201c974 <_Watchdog_Remove>
2017e28: 90 10 00 15 mov %l5, %o0
2017e2c: 30 bf ff 92 b,a 2017c74 <_Timer_server_Body+0x58>
02017e30 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
2017e30: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
2017e34: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2017e38: 80 a0 60 00 cmp %g1, 0
2017e3c: 02 80 00 05 be 2017e50 <_Timer_server_Schedule_operation_method+0x20>
2017e40: ba 10 00 19 mov %i1, %i5
* 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 );
2017e44: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
2017e48: 40 00 02 95 call 201889c <_Chain_Append>
2017e4c: 81 e8 00 00 restore
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2017e50: 03 00 80 ec sethi %hi(0x203b000), %g1
2017e54: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 203b240 <_Thread_Dispatch_disable_level>
2017e58: 84 00 a0 01 inc %g2
2017e5c: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
return _Thread_Dispatch_disable_level;
2017e60: c2 00 62 40 ld [ %g1 + 0x240 ], %g1
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2017e64: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
2017e68: 80 a0 60 01 cmp %g1, 1
2017e6c: 02 80 00 2d be 2017f20 <_Timer_server_Schedule_operation_method+0xf0>
2017e70: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2017e74: 02 80 00 04 be 2017e84 <_Timer_server_Schedule_operation_method+0x54>
2017e78: 01 00 00 00 nop
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2017e7c: 40 00 0e 4c call 201b7ac <_Thread_Enable_dispatch>
2017e80: 81 e8 00 00 restore
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2017e84: 7f ff dd 4d call 200f3b8 <sparc_disable_interrupts>
2017e88: 01 00 00 00 nop
2017e8c: b8 10 00 08 mov %o0, %i4
2017e90: 03 00 80 ec sethi %hi(0x203b000), %g1
2017e94: d0 18 62 d0 ldd [ %g1 + 0x2d0 ], %o0 ! 203b2d0 <_TOD_Now>
2017e98: 94 10 20 00 clr %o2
2017e9c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017ea0: 40 00 4d 7a call 202b488 <__divdi3>
2017ea4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017ea8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
2017eac: c4 06 20 74 ld [ %i0 + 0x74 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2017eb0: 86 06 20 6c add %i0, 0x6c, %g3
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2017eb4: 80 a0 40 03 cmp %g1, %g3
2017eb8: 02 80 00 0c be 2017ee8 <_Timer_server_Schedule_operation_method+0xb8>
2017ebc: 80 a2 40 02 cmp %o1, %g2
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
2017ec0: c8 00 60 10 ld [ %g1 + 0x10 ], %g4
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
2017ec4: 86 01 00 02 add %g4, %g2, %g3
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;
if ( snapshot > last_snapshot ) {
2017ec8: 08 80 00 07 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4>
2017ecc: 86 20 c0 09 sub %g3, %o1, %g3
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
2017ed0: 84 22 40 02 sub %o1, %g2, %g2
if (delta_interval > delta) {
2017ed4: 80 a1 00 02 cmp %g4, %g2
2017ed8: 08 80 00 03 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4><== NEVER TAKEN
2017edc: 86 10 20 00 clr %g3
delta_interval -= delta;
2017ee0: 86 21 00 02 sub %g4, %g2, %g3
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
2017ee4: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
2017ee8: d2 26 20 74 st %o1, [ %i0 + 0x74 ]
_ISR_Enable( level );
2017eec: 7f ff dd 37 call 200f3c8 <sparc_enable_interrupts>
2017ef0: 90 10 00 1c mov %i4, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2017ef4: 90 06 20 68 add %i0, 0x68, %o0
2017ef8: 40 00 12 3d call 201c7ec <_Watchdog_Insert>
2017efc: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2017f00: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2017f04: 80 a0 60 00 cmp %g1, 0
2017f08: 12 bf ff dd bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c>
2017f0c: 01 00 00 00 nop
_Timer_server_Reset_tod_system_watchdog( ts );
2017f10: 7f ff ff 2f call 2017bcc <_Timer_server_Reset_tod_system_watchdog>
2017f14: 90 10 00 18 mov %i0, %o0
}
}
_Thread_Enable_dispatch();
2017f18: 40 00 0e 25 call 201b7ac <_Thread_Enable_dispatch>
2017f1c: 81 e8 00 00 restore
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2017f20: 7f ff dd 26 call 200f3b8 <sparc_disable_interrupts>
2017f24: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
2017f28: 05 00 80 ec sethi %hi(0x203b000), %g2
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017f2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2017f30: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
2017f34: c8 06 20 3c ld [ %i0 + 0x3c ], %g4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2017f38: 86 06 20 34 add %i0, 0x34, %g3
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
2017f3c: 80 a0 40 03 cmp %g1, %g3
2017f40: 02 80 00 08 be 2017f60 <_Timer_server_Schedule_operation_method+0x130>
2017f44: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
2017f48: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
if (delta_interval > delta) {
2017f4c: 80 a1 00 1c cmp %g4, %i4
2017f50: 1a 80 00 03 bcc 2017f5c <_Timer_server_Schedule_operation_method+0x12c>
2017f54: 86 10 20 00 clr %g3
delta_interval -= delta;
2017f58: 86 27 00 04 sub %i4, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
2017f5c: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
2017f60: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
2017f64: 7f ff dd 19 call 200f3c8 <sparc_enable_interrupts>
2017f68: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2017f6c: 90 06 20 30 add %i0, 0x30, %o0
2017f70: 40 00 12 1f call 201c7ec <_Watchdog_Insert>
2017f74: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2017f78: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2017f7c: 80 a0 60 00 cmp %g1, 0
2017f80: 12 bf ff bf bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c>
2017f84: 01 00 00 00 nop
_Timer_server_Reset_interval_system_watchdog( ts );
2017f88: 7f ff fe fd call 2017b7c <_Timer_server_Reset_interval_system_watchdog>
2017f8c: 90 10 00 18 mov %i0, %o0
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2017f90: 40 00 0e 07 call 201b7ac <_Thread_Enable_dispatch>
2017f94: 81 e8 00 00 restore
0200abe8 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200abe8: 9d e3 bf 88 save %sp, -120, %sp
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200abec: da 06 40 00 ld [ %i1 ], %o5
right += rhs->tv_nsec;
200abf0: ea 06 60 04 ld [ %i1 + 4 ], %l5
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200abf4: 99 3b 60 1f sra %o5, 0x1f, %o4
200abf8: 83 2b 20 03 sll %o4, 3, %g1
200abfc: 87 2b 60 03 sll %o5, 3, %g3
200ac00: 89 33 60 1d srl %o5, 0x1d, %g4
200ac04: 84 11 00 01 or %g4, %g1, %g2
200ac08: 83 30 e0 1b srl %g3, 0x1b, %g1
200ac0c: 95 28 a0 05 sll %g2, 5, %o2
200ac10: 97 28 e0 05 sll %g3, 5, %o3
200ac14: 94 10 40 0a or %g1, %o2, %o2
200ac18: 96 a2 c0 03 subcc %o3, %g3, %o3
200ac1c: 83 32 e0 1a srl %o3, 0x1a, %g1
200ac20: 94 62 80 02 subx %o2, %g2, %o2
200ac24: 93 2a e0 06 sll %o3, 6, %o1
200ac28: 91 2a a0 06 sll %o2, 6, %o0
200ac2c: 96 a2 40 0b subcc %o1, %o3, %o3
200ac30: 90 10 40 08 or %g1, %o0, %o0
200ac34: 94 62 00 0a subx %o0, %o2, %o2
200ac38: 96 82 c0 0d addcc %o3, %o5, %o3
200ac3c: 83 32 e0 1e srl %o3, 0x1e, %g1
200ac40: 94 42 80 0c addx %o2, %o4, %o2
200ac44: bb 2a e0 02 sll %o3, 2, %i5
200ac48: b9 2a a0 02 sll %o2, 2, %i4
200ac4c: 96 82 c0 1d addcc %o3, %i5, %o3
200ac50: b8 10 40 1c or %g1, %i4, %i4
200ac54: 83 32 e0 1e srl %o3, 0x1e, %g1
200ac58: 94 42 80 1c addx %o2, %i4, %o2
200ac5c: a3 2a e0 02 sll %o3, 2, %l1
200ac60: a1 2a a0 02 sll %o2, 2, %l0
200ac64: 96 82 c0 11 addcc %o3, %l1, %o3
200ac68: a0 10 40 10 or %g1, %l0, %l0
200ac6c: 83 32 e0 1e srl %o3, 0x1e, %g1
200ac70: 94 42 80 10 addx %o2, %l0, %o2
200ac74: a7 2a e0 02 sll %o3, 2, %l3
200ac78: a5 2a a0 02 sll %o2, 2, %l2
200ac7c: 96 82 c0 13 addcc %o3, %l3, %o3
200ac80: a4 10 40 12 or %g1, %l2, %l2
200ac84: 83 2a e0 09 sll %o3, 9, %g1
200ac88: 94 42 80 12 addx %o2, %l2, %o2
200ac8c: 87 32 e0 17 srl %o3, 0x17, %g3
200ac90: 85 2a a0 09 sll %o2, 9, %g2
right += rhs->tv_nsec;
200ac94: 96 80 40 15 addcc %g1, %l5, %o3
200ac98: a9 3d 60 1f sra %l5, 0x1f, %l4
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200ac9c: 94 10 c0 02 or %g3, %g2, %o2
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200aca0: c8 06 00 00 ld [ %i0 ], %g4
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
200aca4: 94 42 80 14 addx %o2, %l4, %o2
if ( right == 0 ) {
200aca8: 80 92 80 0b orcc %o2, %o3, %g0
200acac: 02 80 00 64 be 200ae3c <_Timespec_Divide+0x254> <== ALWAYS TAKEN
200acb0: c2 06 20 04 ld [ %i0 + 4 ], %g1
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
200acb4: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
200acb8: 83 38 60 1f sra %g1, 0x1f, %g1 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200acbc: 9f 31 20 1d srl %g4, 0x1d, %o7 <== NOT EXECUTED
200acc0: ba 10 00 04 mov %g4, %i5 <== NOT EXECUTED
200acc4: b9 39 20 1f sra %g4, 0x1f, %i4 <== NOT EXECUTED
200acc8: 9b 2f 60 03 sll %i5, 3, %o5 <== NOT EXECUTED
200accc: 89 2f 20 03 sll %i4, 3, %g4 <== NOT EXECUTED
left += lhs->tv_nsec;
200acd0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200acd4: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED
200acd8: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED
200acdc: 83 30 e0 1a srl %g3, 0x1a, %g1 <== NOT EXECUTED
200ace0: 98 13 c0 04 or %o7, %g4, %o4 <== NOT EXECUTED
200ace4: 93 28 e0 06 sll %g3, 6, %o1 <== NOT EXECUTED
200ace8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED
200acec: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED
200acf0: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
200acf4: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED
200acf8: 86 a2 40 03 subcc %o1, %g3, %g3 <== NOT EXECUTED
200acfc: 91 28 a0 06 sll %g2, 6, %o0 <== NOT EXECUTED
200ad00: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
200ad04: 84 62 00 02 subx %o0, %g2, %g2 <== NOT EXECUTED
200ad08: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED
200ad0c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200ad10: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED
200ad14: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED
200ad18: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED
200ad1c: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED
200ad20: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED
200ad24: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200ad28: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED
200ad2c: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED
200ad30: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED
200ad34: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED
200ad38: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED
200ad3c: b3 28 e0 02 sll %g3, 2, %i1 <== NOT EXECUTED
200ad40: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED
200ad44: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200ad48: b1 28 a0 02 sll %g2, 2, %i0 <== NOT EXECUTED
200ad4c: 86 80 c0 19 addcc %g3, %i1, %g3 <== NOT EXECUTED
200ad50: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED
200ad54: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED
200ad58: 84 40 80 18 addx %g2, %i0, %g2 <== NOT EXECUTED
200ad5c: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED
200ad60: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED
left += lhs->tv_nsec;
200ad64: f8 1f bf e8 ldd [ %fp + -24 ], %i4 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200ad68: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED
left += lhs->tv_nsec;
200ad6c: 9a 80 40 1d addcc %g1, %i5, %o5 <== NOT EXECUTED
200ad70: 98 40 80 1c addx %g2, %i4, %o4 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200ad74: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED
200ad78: 83 2b 20 02 sll %o4, 2, %g1 <== NOT EXECUTED
200ad7c: af 2b 60 02 sll %o5, 2, %l7 <== NOT EXECUTED
200ad80: ac 10 80 01 or %g2, %g1, %l6 <== NOT EXECUTED
200ad84: ab 2d e0 05 sll %l7, 5, %l5 <== NOT EXECUTED
200ad88: 83 35 e0 1b srl %l7, 0x1b, %g1 <== NOT EXECUTED
200ad8c: 86 a5 40 17 subcc %l5, %l7, %g3 <== NOT EXECUTED
200ad90: a9 2d a0 05 sll %l6, 5, %l4 <== NOT EXECUTED
200ad94: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED
200ad98: 84 65 00 16 subx %l4, %l6, %g2 <== NOT EXECUTED
200ad9c: 86 80 c0 0d addcc %g3, %o5, %g3 <== NOT EXECUTED
200ada0: 84 40 80 0c addx %g2, %o4, %g2 <== NOT EXECUTED
200ada4: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED
200ada8: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED
200adac: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200adb0: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED
200adb4: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED
200adb8: c8 27 bf f8 st %g4, [ %fp + -8 ] <== NOT EXECUTED
200adbc: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED
200adc0: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED
200adc4: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED
200adc8: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED
200adcc: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED
200add0: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200add4: f8 27 bf f4 st %i4, [ %fp + -12 ] <== NOT EXECUTED
200add8: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED
200addc: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED
200ade0: f8 1f bf f0 ldd [ %fp + -16 ], %i4 <== NOT EXECUTED
200ade4: 92 80 c0 1d addcc %g3, %i5, %o1 <== NOT EXECUTED
200ade8: 90 40 80 1c addx %g2, %i4, %o0 <== NOT EXECUTED
200adec: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED
200adf0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
200adf4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED
200adf8: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
200adfc: 40 00 38 6f call 2018fb8 <__udivdi3> <== NOT EXECUTED
200ae00: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200ae04: 94 10 20 00 clr %o2 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200ae08: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200ae0c: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200ae10: 40 00 38 6a call 2018fb8 <__udivdi3> <== NOT EXECUTED
200ae14: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
*fval_percentage = answer % 1000;
200ae18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200ae1c: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED
*fval_percentage = answer % 1000;
200ae20: 94 10 20 00 clr %o2 <== NOT EXECUTED
200ae24: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
200ae28: 40 00 39 39 call 201930c <__umoddi3> <== NOT EXECUTED
200ae2c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200ae30: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
200ae34: 81 c7 e0 08 ret <== NOT EXECUTED
200ae38: 81 e8 00 00 restore <== NOT EXECUTED
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
200ae3c: c0 26 80 00 clr [ %i2 ]
*fval_percentage = 0;
200ae40: c0 26 c0 00 clr [ %i3 ]
return;
200ae44: 81 c7 e0 08 ret
200ae48: 81 e8 00 00 restore
0200ae4c <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
200ae4c: c6 02 00 00 ld [ %o0 ], %g3
200ae50: c4 02 40 00 ld [ %o1 ], %g2
200ae54: 80 a0 c0 02 cmp %g3, %g2
200ae58: 06 80 00 0a bl 200ae80 <_Timespec_Less_than+0x34> <== NEVER TAKEN
200ae5c: 82 10 20 01 mov 1, %g1
return true;
if ( lhs->tv_sec > rhs->tv_sec )
200ae60: 80 a0 c0 02 cmp %g3, %g2
200ae64: 14 80 00 07 bg 200ae80 <_Timespec_Less_than+0x34>
200ae68: 82 10 20 00 clr %g1
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
200ae6c: c6 02 20 04 ld [ %o0 + 4 ], %g3
200ae70: c4 02 60 04 ld [ %o1 + 4 ], %g2
200ae74: 80 a0 c0 02 cmp %g3, %g2
200ae78: 16 80 00 04 bge 200ae88 <_Timespec_Less_than+0x3c> <== ALWAYS TAKEN
200ae7c: 82 10 20 01 mov 1, %g1
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
200ae80: 81 c3 e0 08 retl
200ae84: 90 08 60 01 and %g1, 1, %o0
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
200ae88: 82 10 20 00 clr %g1
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
200ae8c: 81 c3 e0 08 retl
200ae90: 90 08 60 01 and %g1, 1, %o0
0200c090 <_Timespec_Subtract>:
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
200c090: c2 02 20 04 ld [ %o0 + 4 ], %g1
200c094: c4 02 60 04 ld [ %o1 + 4 ], %g2
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c098: c8 02 40 00 ld [ %o1 ], %g4
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
200c09c: 80 a0 80 01 cmp %g2, %g1
200c0a0: 06 80 00 07 bl 200c0bc <_Timespec_Subtract+0x2c> <== NEVER TAKEN
200c0a4: c6 02 00 00 ld [ %o0 ], %g3
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
result->tv_nsec = end->tv_nsec - start->tv_nsec;
200c0a8: 82 20 80 01 sub %g2, %g1, %g1
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
200c0ac: 86 21 00 03 sub %g4, %g3, %g3
result->tv_nsec = end->tv_nsec - start->tv_nsec;
200c0b0: c2 22 a0 04 st %g1, [ %o2 + 4 ]
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
200c0b4: 81 c3 e0 08 retl
200c0b8: c6 22 80 00 st %g3, [ %o2 ]
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c0bc: 86 21 00 03 sub %g4, %g3, %g3 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
200c0c0: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c0c4: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
200c0c8: 88 11 22 00 or %g4, 0x200, %g4 <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c0cc: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
200c0d0: 84 00 80 04 add %g2, %g4, %g2 <== NOT EXECUTED
200c0d4: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
200c0d8: 81 c3 e0 08 retl <== NOT EXECUTED
200c0dc: c2 22 a0 04 st %g1, [ %o2 + 4 ] <== NOT EXECUTED
0200cb54 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
200cb54: 9d e3 bf a0 save %sp, -96, %sp
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
200cb58: d4 1e 40 00 ldd [ %i1 ], %o2
200cb5c: 80 92 80 0b orcc %o2, %o3, %g0
200cb60: 22 80 00 2f be,a 200cc1c <_Timestamp64_Divide+0xc8> <== NEVER TAKEN
200cb64: c0 26 80 00 clr [ %i2 ] <== 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;
200cb68: f8 1e 00 00 ldd [ %i0 ], %i4
200cb6c: 83 2f 20 02 sll %i4, 2, %g1
200cb70: 9b 2f 60 02 sll %i5, 2, %o5
200cb74: 89 37 60 1e srl %i5, 0x1e, %g4
200cb78: 98 11 00 01 or %g4, %g1, %o4
200cb7c: 83 33 60 1b srl %o5, 0x1b, %g1
200cb80: 85 2b 20 05 sll %o4, 5, %g2
200cb84: 87 2b 60 05 sll %o5, 5, %g3
200cb88: 84 10 40 02 or %g1, %g2, %g2
200cb8c: 86 a0 c0 0d subcc %g3, %o5, %g3
200cb90: 84 60 80 0c subx %g2, %o4, %g2
200cb94: 86 80 c0 1d addcc %g3, %i5, %g3
200cb98: 83 30 e0 1e srl %g3, 0x1e, %g1
200cb9c: 84 40 80 1c addx %g2, %i4, %g2
200cba0: 93 28 e0 02 sll %g3, 2, %o1
200cba4: 91 28 a0 02 sll %g2, 2, %o0
200cba8: 86 80 c0 09 addcc %g3, %o1, %g3
200cbac: 90 10 40 08 or %g1, %o0, %o0
200cbb0: 83 30 e0 1e srl %g3, 0x1e, %g1
200cbb4: 84 40 80 08 addx %g2, %o0, %g2
200cbb8: b3 28 e0 02 sll %g3, 2, %i1
200cbbc: b1 28 a0 02 sll %g2, 2, %i0
200cbc0: 92 80 c0 19 addcc %g3, %i1, %o1
200cbc4: b0 10 40 18 or %g1, %i0, %i0
200cbc8: 87 32 60 1b srl %o1, 0x1b, %g3
200cbcc: 90 40 80 18 addx %g2, %i0, %o0
200cbd0: 83 2a 60 05 sll %o1, 5, %g1
200cbd4: 85 2a 20 05 sll %o0, 5, %g2
200cbd8: 92 10 00 01 mov %g1, %o1
200cbdc: 40 00 38 25 call 201ac70 <__divdi3>
200cbe0: 90 10 c0 02 or %g3, %g2, %o0
*_ival_percentage = answer / 1000;
200cbe4: 94 10 20 00 clr %o2
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200cbe8: b0 10 00 08 mov %o0, %i0
200cbec: b8 10 00 09 mov %o1, %i4
*_ival_percentage = answer / 1000;
200cbf0: 40 00 38 20 call 201ac70 <__divdi3>
200cbf4: 96 10 23 e8 mov 0x3e8, %o3
*_fval_percentage = answer % 1000;
200cbf8: 90 10 00 18 mov %i0, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
200cbfc: d2 26 80 00 st %o1, [ %i2 ]
*_fval_percentage = answer % 1000;
200cc00: 94 10 20 00 clr %o2
200cc04: 96 10 23 e8 mov 0x3e8, %o3
200cc08: 40 00 39 00 call 201b008 <__moddi3>
200cc0c: 92 10 00 1c mov %i4, %o1
200cc10: d2 26 c0 00 st %o1, [ %i3 ]
200cc14: 81 c7 e0 08 ret
200cc18: 81 e8 00 00 restore
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
*_fval_percentage = 0;
200cc1c: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
return;
200cc20: 81 c7 e0 08 ret <== NOT EXECUTED
200cc24: 81 e8 00 00 restore <== NOT EXECUTED
0200b3d0 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
200b3d0: 9d e3 bf a0 save %sp, -96, %sp
200b3d4: 39 00 80 75 sethi %hi(0x201d400), %i4
200b3d8: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List>
200b3dc: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b3e0: 80 a7 40 1c cmp %i5, %i4
200b3e4: 02 80 00 0d be 200b418 <_User_extensions_Fatal+0x48> <== NEVER TAKEN
200b3e8: 01 00 00 00 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
200b3ec: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200b3f0: 80 a0 60 00 cmp %g1, 0
200b3f4: 02 80 00 05 be 200b408 <_User_extensions_Fatal+0x38>
200b3f8: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
200b3fc: 92 10 00 19 mov %i1, %o1
200b400: 9f c0 40 00 call %g1
200b404: 94 10 00 1a mov %i2, %o2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200b408: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b40c: 80 a7 40 1c cmp %i5, %i4
200b410: 32 bf ff f8 bne,a 200b3f0 <_User_extensions_Fatal+0x20>
200b414: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200b418: 81 c7 e0 08 ret
200b41c: 81 e8 00 00 restore
0200b27c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
200b27c: 9d e3 bf a0 save %sp, -96, %sp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
200b280: 07 00 80 71 sethi %hi(0x201c400), %g3
200b284: 86 10 e2 4c or %g3, 0x24c, %g3 ! 201c64c <Configuration>
initial_extensions = Configuration.User_extension_table;
200b288: f6 00 e0 44 ld [ %g3 + 0x44 ], %i3
200b28c: 3b 00 80 75 sethi %hi(0x201d400), %i5
200b290: 09 00 80 74 sethi %hi(0x201d000), %g4
200b294: 84 17 61 98 or %i5, 0x198, %g2
200b298: 82 11 23 b4 or %g4, 0x3b4, %g1
200b29c: b4 00 a0 04 add %g2, 4, %i2
200b2a0: b8 00 60 04 add %g1, 4, %i4
200b2a4: f4 27 61 98 st %i2, [ %i5 + 0x198 ]
head->previous = NULL;
200b2a8: c0 20 a0 04 clr [ %g2 + 4 ]
tail->previous = head;
200b2ac: c4 20 a0 08 st %g2, [ %g2 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200b2b0: f8 21 23 b4 st %i4, [ %g4 + 0x3b4 ]
head->previous = NULL;
200b2b4: c0 20 60 04 clr [ %g1 + 4 ]
tail->previous = head;
200b2b8: c2 20 60 08 st %g1, [ %g1 + 8 ]
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
200b2bc: 80 a6 e0 00 cmp %i3, 0
200b2c0: 02 80 00 1b be 200b32c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200b2c4: f4 00 e0 40 ld [ %g3 + 0x40 ], %i2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
200b2c8: 83 2e a0 02 sll %i2, 2, %g1
200b2cc: b9 2e a0 04 sll %i2, 4, %i4
200b2d0: b8 27 00 01 sub %i4, %g1, %i4
200b2d4: b8 07 00 1a add %i4, %i2, %i4
200b2d8: b9 2f 20 02 sll %i4, 2, %i4
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200b2dc: 40 00 01 9c call 200b94c <_Workspace_Allocate_or_fatal_error>
200b2e0: 90 10 00 1c mov %i4, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200b2e4: 92 10 20 00 clr %o1
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200b2e8: ba 10 00 08 mov %o0, %i5
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200b2ec: 40 00 13 bd call 20101e0 <memset>
200b2f0: 94 10 00 1c mov %i4, %o2
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200b2f4: 80 a6 a0 00 cmp %i2, 0
200b2f8: 02 80 00 0d be 200b32c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200b2fc: b8 10 20 00 clr %i4
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
200b300: 92 10 00 1b mov %i3, %o1
200b304: 94 10 20 20 mov 0x20, %o2
200b308: 40 00 13 7a call 20100f0 <memcpy>
200b30c: 90 07 60 14 add %i5, 0x14, %o0
_User_extensions_Add_set( extension );
200b310: 40 00 0b 44 call 200e020 <_User_extensions_Add_set>
200b314: 90 10 00 1d mov %i5, %o0
200b318: b8 07 20 01 inc %i4
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
200b31c: ba 07 60 34 add %i5, 0x34, %i5
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200b320: 80 a7 00 1a cmp %i4, %i2
200b324: 12 bf ff f7 bne 200b300 <_User_extensions_Handler_initialization+0x84>
200b328: b6 06 e0 20 add %i3, 0x20, %i3
200b32c: 81 c7 e0 08 ret
200b330: 81 e8 00 00 restore
0200b334 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
200b334: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b338: 39 00 80 75 sethi %hi(0x201d400), %i4
200b33c: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List>
200b340: b8 17 21 98 or %i4, 0x198, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b344: b8 07 20 04 add %i4, 4, %i4
200b348: 80 a7 40 1c cmp %i5, %i4
200b34c: 02 80 00 0c be 200b37c <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
200b350: 01 00 00 00 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
200b354: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200b358: 80 a0 60 00 cmp %g1, 0
200b35c: 02 80 00 04 be 200b36c <_User_extensions_Thread_begin+0x38>
200b360: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
200b364: 9f c0 40 00 call %g1
200b368: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b36c: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b370: 80 a7 40 1c cmp %i5, %i4
200b374: 32 bf ff f9 bne,a 200b358 <_User_extensions_Thread_begin+0x24>
200b378: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200b37c: 81 c7 e0 08 ret
200b380: 81 e8 00 00 restore
0200b420 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
200b420: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b424: 39 00 80 75 sethi %hi(0x201d400), %i4
200b428: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List>
200b42c: b8 17 21 98 or %i4, 0x198, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200b430: b8 07 20 04 add %i4, 4, %i4
200b434: 80 a7 40 1c cmp %i5, %i4
200b438: 02 80 00 12 be 200b480 <_User_extensions_Thread_create+0x60><== NEVER TAKEN
200b43c: 82 10 20 01 mov 1, %g1
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
200b440: 37 00 80 75 sethi %hi(0x201d400), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
200b444: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200b448: 80 a0 60 00 cmp %g1, 0
200b44c: 02 80 00 08 be 200b46c <_User_extensions_Thread_create+0x4c>
200b450: 84 16 e1 e0 or %i3, 0x1e0, %g2
status = (*the_extension->Callouts.thread_create)(
200b454: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b458: 9f c0 40 00 call %g1
200b45c: 92 10 00 18 mov %i0, %o1
_Thread_Executing,
the_thread
);
if ( !status )
200b460: 80 8a 20 ff btst 0xff, %o0
200b464: 02 80 00 0a be 200b48c <_User_extensions_Thread_create+0x6c>
200b468: 82 10 20 00 clr %g1
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b46c: fa 07 40 00 ld [ %i5 ], %i5
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200b470: 80 a7 40 1c cmp %i5, %i4
200b474: 32 bf ff f5 bne,a 200b448 <_User_extensions_Thread_create+0x28>
200b478: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if ( !status )
return false;
}
}
return true;
200b47c: 82 10 20 01 mov 1, %g1
}
200b480: b0 08 60 01 and %g1, 1, %i0
200b484: 81 c7 e0 08 ret
200b488: 81 e8 00 00 restore
200b48c: b0 08 60 01 and %g1, 1, %i0
200b490: 81 c7 e0 08 ret
200b494: 81 e8 00 00 restore
0200b498 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
200b498: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200b49c: 39 00 80 75 sethi %hi(0x201d400), %i4
200b4a0: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List>
200b4a4: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b4a8: 80 a7 40 1c cmp %i5, %i4
200b4ac: 02 80 00 0d be 200b4e0 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN
200b4b0: 37 00 80 75 sethi %hi(0x201d400), %i3
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
200b4b4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200b4b8: 80 a0 60 00 cmp %g1, 0
200b4bc: 02 80 00 05 be 200b4d0 <_User_extensions_Thread_delete+0x38>
200b4c0: 84 16 e1 e0 or %i3, 0x1e0, %g2
(*the_extension->Callouts.thread_delete)(
200b4c4: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b4c8: 9f c0 40 00 call %g1
200b4cc: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200b4d0: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b4d4: 80 a7 40 1c cmp %i5, %i4
200b4d8: 32 bf ff f8 bne,a 200b4b8 <_User_extensions_Thread_delete+0x20>
200b4dc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200b4e0: 81 c7 e0 08 ret
200b4e4: 81 e8 00 00 restore
0200b384 <_User_extensions_Thread_exitted>:
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
200b384: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200b388: 39 00 80 75 sethi %hi(0x201d400), %i4
200b38c: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List>
200b390: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b394: 80 a7 40 1c cmp %i5, %i4
200b398: 02 80 00 0c be 200b3c8 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
200b39c: 01 00 00 00 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
200b3a0: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200b3a4: 80 a0 60 00 cmp %g1, 0
200b3a8: 02 80 00 04 be 200b3b8 <_User_extensions_Thread_exitted+0x34>
200b3ac: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
200b3b0: 9f c0 40 00 call %g1
200b3b4: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200b3b8: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b3bc: 80 a7 40 1c cmp %i5, %i4
200b3c0: 32 bf ff f9 bne,a 200b3a4 <_User_extensions_Thread_exitted+0x20>
200b3c4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200b3c8: 81 c7 e0 08 ret
200b3cc: 81 e8 00 00 restore
0200bd28 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
200bd28: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200bd2c: 39 00 80 78 sethi %hi(0x201e000), %i4
200bd30: fa 07 20 b8 ld [ %i4 + 0xb8 ], %i5 ! 201e0b8 <_User_extensions_List>
200bd34: b8 17 20 b8 or %i4, 0xb8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200bd38: b8 07 20 04 add %i4, 4, %i4
200bd3c: 80 a7 40 1c cmp %i5, %i4
200bd40: 02 80 00 0d be 200bd74 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
200bd44: 37 00 80 78 sethi %hi(0x201e000), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
200bd48: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200bd4c: 80 a0 60 00 cmp %g1, 0
200bd50: 02 80 00 05 be 200bd64 <_User_extensions_Thread_restart+0x3c>
200bd54: 84 16 e1 00 or %i3, 0x100, %g2
(*the_extension->Callouts.thread_restart)(
200bd58: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200bd5c: 9f c0 40 00 call %g1
200bd60: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200bd64: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200bd68: 80 a7 40 1c cmp %i5, %i4
200bd6c: 32 bf ff f8 bne,a 200bd4c <_User_extensions_Thread_restart+0x24>
200bd70: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200bd74: 81 c7 e0 08 ret
200bd78: 81 e8 00 00 restore
0200b4e8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
200b4e8: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b4ec: 39 00 80 75 sethi %hi(0x201d400), %i4
200b4f0: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List>
200b4f4: b8 17 21 98 or %i4, 0x198, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b4f8: b8 07 20 04 add %i4, 4, %i4
200b4fc: 80 a7 40 1c cmp %i5, %i4
200b500: 02 80 00 0d be 200b534 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
200b504: 37 00 80 75 sethi %hi(0x201d400), %i3
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
200b508: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b50c: 80 a0 60 00 cmp %g1, 0
200b510: 02 80 00 05 be 200b524 <_User_extensions_Thread_start+0x3c>
200b514: 84 16 e1 e0 or %i3, 0x1e0, %g2
(*the_extension->Callouts.thread_start)(
200b518: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b51c: 9f c0 40 00 call %g1
200b520: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b524: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b528: 80 a7 40 1c cmp %i5, %i4
200b52c: 32 bf ff f8 bne,a 200b50c <_User_extensions_Thread_start+0x24>
200b530: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b534: 81 c7 e0 08 ret
200b538: 81 e8 00 00 restore
0200b53c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
200b53c: 9d e3 bf a0 save %sp, -96, %sp
200b540: 39 00 80 74 sethi %hi(0x201d000), %i4
200b544: fa 07 23 b4 ld [ %i4 + 0x3b4 ], %i5 ! 201d3b4 <_User_extensions_Switches_list>
200b548: b8 17 23 b4 or %i4, 0x3b4, %i4
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200b54c: b8 07 20 04 add %i4, 4, %i4
200b550: 80 a7 40 1c cmp %i5, %i4
200b554: 02 80 00 0a be 200b57c <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
200b558: 01 00 00 00 nop
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
200b55c: c2 07 60 08 ld [ %i5 + 8 ], %g1
200b560: 90 10 00 18 mov %i0, %o0
200b564: 9f c0 40 00 call %g1
200b568: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
200b56c: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200b570: 80 a7 40 1c cmp %i5, %i4
200b574: 32 bf ff fb bne,a 200b560 <_User_extensions_Thread_switch+0x24>
200b578: c2 07 60 08 ld [ %i5 + 8 ], %g1
200b57c: 81 c7 e0 08 ret
200b580: 81 e8 00 00 restore
0200cf70 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200cf70: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200cf74: 7f ff d9 24 call 2003404 <sparc_disable_interrupts>
200cf78: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200cf7c: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200cf80: b6 06 20 04 add %i0, 4, %i3
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200cf84: 80 a0 40 1b cmp %g1, %i3
200cf88: 02 80 00 1e be 200d000 <_Watchdog_Adjust+0x90>
200cf8c: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200cf90: 12 80 00 1e bne 200d008 <_Watchdog_Adjust+0x98>
200cf94: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200cf98: 80 a6 a0 00 cmp %i2, 0
200cf9c: 02 80 00 19 be 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200cfa0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200cfa4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200cfa8: 80 a6 80 1c cmp %i2, %i4
200cfac: 1a 80 00 0a bcc 200cfd4 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN
200cfb0: b2 10 20 01 mov 1, %i1
_Watchdog_First( header )->delta_interval -= units;
200cfb4: 10 80 00 1c b 200d024 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED
200cfb8: b8 27 00 1a sub %i4, %i2, %i4 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200cfbc: 02 80 00 11 be 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200cfc0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200cfc4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200cfc8: 80 a7 00 1a cmp %i4, %i2
200cfcc: 38 80 00 16 bgu,a 200d024 <_Watchdog_Adjust+0xb4>
200cfd0: b8 27 00 1a sub %i4, %i2, %i4
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
200cfd4: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
_ISR_Enable( level );
200cfd8: 7f ff d9 0f call 2003414 <sparc_enable_interrupts>
200cfdc: 01 00 00 00 nop
_Watchdog_Tickle( header );
200cfe0: 40 00 00 ab call 200d28c <_Watchdog_Tickle>
200cfe4: 90 10 00 1d mov %i5, %o0
_ISR_Disable( level );
200cfe8: 7f ff d9 07 call 2003404 <sparc_disable_interrupts>
200cfec: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200cff0: c2 07 40 00 ld [ %i5 ], %g1
if ( _Chain_Is_empty( header ) )
200cff4: 80 a6 c0 01 cmp %i3, %g1
200cff8: 32 bf ff f1 bne,a 200cfbc <_Watchdog_Adjust+0x4c>
200cffc: b4 a6 80 1c subcc %i2, %i4, %i2
}
break;
}
}
_ISR_Enable( level );
200d000: 7f ff d9 05 call 2003414 <sparc_enable_interrupts>
200d004: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
200d008: 12 bf ff fe bne 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200d00c: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200d010: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200d014: b4 00 80 1a add %g2, %i2, %i2
200d018: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
200d01c: 7f ff d8 fe call 2003414 <sparc_enable_interrupts>
200d020: 91 e8 00 08 restore %g0, %o0, %o0
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
200d024: 10 bf ff f7 b 200d000 <_Watchdog_Adjust+0x90>
200d028: f8 20 60 10 st %i4, [ %g1 + 0x10 ]
0200b70c <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
200b70c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
200b710: 7f ff db ea call 20026b8 <sparc_disable_interrupts>
200b714: 01 00 00 00 nop
previous_state = the_watchdog->state;
200b718: fa 06 20 08 ld [ %i0 + 8 ], %i5
switch ( previous_state ) {
200b71c: 80 a7 60 01 cmp %i5, 1
200b720: 02 80 00 2a be 200b7c8 <_Watchdog_Remove+0xbc>
200b724: 03 00 80 75 sethi %hi(0x201d400), %g1
200b728: 1a 80 00 09 bcc 200b74c <_Watchdog_Remove+0x40>
200b72c: 80 a7 60 03 cmp %i5, 3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b730: 03 00 80 75 sethi %hi(0x201d400), %g1
200b734: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201d4c0 <_Watchdog_Ticks_since_boot>
200b738: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200b73c: 7f ff db e3 call 20026c8 <sparc_enable_interrupts>
200b740: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200b744: 81 c7 e0 08 ret
200b748: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
200b74c: 18 bf ff fa bgu 200b734 <_Watchdog_Remove+0x28> <== NEVER TAKEN
200b750: 03 00 80 75 sethi %hi(0x201d400), %g1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
200b754: c2 06 00 00 ld [ %i0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
200b758: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200b75c: c4 00 40 00 ld [ %g1 ], %g2
200b760: 80 a0 a0 00 cmp %g2, 0
200b764: 02 80 00 07 be 200b780 <_Watchdog_Remove+0x74>
200b768: 05 00 80 75 sethi %hi(0x201d400), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200b76c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200b770: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
200b774: 84 00 c0 02 add %g3, %g2, %g2
200b778: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200b77c: 05 00 80 75 sethi %hi(0x201d400), %g2
200b780: c4 00 a0 bc ld [ %g2 + 0xbc ], %g2 ! 201d4bc <_Watchdog_Sync_count>
200b784: 80 a0 a0 00 cmp %g2, 0
200b788: 22 80 00 07 be,a 200b7a4 <_Watchdog_Remove+0x98>
200b78c: c4 06 20 04 ld [ %i0 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
200b790: 05 00 80 75 sethi %hi(0x201d400), %g2
200b794: c6 00 a1 e8 ld [ %g2 + 0x1e8 ], %g3 ! 201d5e8 <_Per_CPU_Information+0x8>
200b798: 05 00 80 75 sethi %hi(0x201d400), %g2
200b79c: c6 20 a0 5c st %g3, [ %g2 + 0x5c ] ! 201d45c <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200b7a0: c4 06 20 04 ld [ %i0 + 4 ], %g2
next->previous = previous;
200b7a4: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
200b7a8: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b7ac: 03 00 80 75 sethi %hi(0x201d400), %g1
200b7b0: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201d4c0 <_Watchdog_Ticks_since_boot>
200b7b4: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200b7b8: 7f ff db c4 call 20026c8 <sparc_enable_interrupts>
200b7bc: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200b7c0: 81 c7 e0 08 ret
200b7c4: 81 e8 00 00 restore
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b7c8: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1
/*
* 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;
200b7cc: c0 26 20 08 clr [ %i0 + 8 ]
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b7d0: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200b7d4: 7f ff db bd call 20026c8 <sparc_enable_interrupts>
200b7d8: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200b7dc: 81 c7 e0 08 ret
200b7e0: 81 e8 00 00 restore
0200c924 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200c924: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200c928: 7f ff d9 98 call 2002f88 <sparc_disable_interrupts>
200c92c: 01 00 00 00 nop
200c930: ba 10 00 08 mov %o0, %i5
printk( "Watchdog Chain: %s %p\n", name, header );
200c934: 11 00 80 74 sethi %hi(0x201d000), %o0
200c938: 94 10 00 19 mov %i1, %o2
200c93c: 92 10 00 18 mov %i0, %o1
200c940: 7f ff e1 ac call 2004ff0 <printk>
200c944: 90 12 23 30 or %o0, 0x330, %o0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c948: f8 06 40 00 ld [ %i1 ], %i4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c94c: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200c950: 80 a7 00 19 cmp %i4, %i1
200c954: 02 80 00 0f be 200c990 <_Watchdog_Report_chain+0x6c>
200c958: 11 00 80 74 sethi %hi(0x201d000), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200c95c: 92 10 00 1c mov %i4, %o1
200c960: 40 00 00 0f call 200c99c <_Watchdog_Report>
200c964: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
200c968: f8 07 00 00 ld [ %i4 ], %i4
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
200c96c: 80 a7 00 19 cmp %i4, %i1
200c970: 12 bf ff fc bne 200c960 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
200c974: 92 10 00 1c mov %i4, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200c978: 11 00 80 74 sethi %hi(0x201d000), %o0
200c97c: 92 10 00 18 mov %i0, %o1
200c980: 7f ff e1 9c call 2004ff0 <printk>
200c984: 90 12 23 48 or %o0, 0x348, %o0
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
200c988: 7f ff d9 84 call 2002f98 <sparc_enable_interrupts>
200c98c: 91 e8 00 1d restore %g0, %i5, %o0
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200c990: 7f ff e1 98 call 2004ff0 <printk>
200c994: 90 12 23 58 or %o0, 0x358, %o0
200c998: 30 bf ff fc b,a 200c988 <_Watchdog_Report_chain+0x64>
0200b6fc <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
200b6fc: 9d e3 bf a0 save %sp, -96, %sp
char *dup = _Workspace_Allocate(len + 1);
200b700: 7f ff ff e2 call 200b688 <_Workspace_Allocate>
200b704: 90 06 60 01 add %i1, 1, %o0
if (dup != NULL) {
200b708: ba 92 20 00 orcc %o0, 0, %i5
200b70c: 02 80 00 05 be 200b720 <_Workspace_String_duplicate+0x24> <== NEVER TAKEN
200b710: 92 10 00 18 mov %i0, %o1
dup [len] = '\0';
200b714: c0 2f 40 19 clrb [ %i5 + %i1 ]
memcpy(dup, string, len);
200b718: 40 00 12 72 call 20100e0 <memcpy>
200b71c: 94 10 00 19 mov %i1, %o2
}
return dup;
}
200b720: 81 c7 e0 08 ret
200b724: 91 e8 00 1d restore %g0, %i5, %o0
02019f90 <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
2019f90: 81 c3 e0 08 retl <== NOT EXECUTED
2019f94: 90 10 20 00 clr %o0 <== NOT EXECUTED
02029078 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
2029078: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
202907c: c0 27 bf fc clr [ %fp + -4 ]
uint32_t count,
void *buff
)
{
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2029080: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
2029084: 80 a6 e0 00 cmp %i3, 0
2029088: 12 80 00 12 bne 20290d0 <_fat_block_read+0x58> <== ALWAYS TAKEN
202908c: b0 10 20 00 clr %i0
2029090: 30 80 00 1a b,a 20290f8 <_fat_block_read+0x80> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
2029094: e0 17 40 00 lduh [ %i5 ], %l0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
2029098: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
202909c: a0 24 00 1a sub %l0, %i2, %l0
20290a0: 80 a4 00 1b cmp %l0, %i3
20290a4: 08 80 00 03 bleu 20290b0 <_fat_block_read+0x38>
20290a8: b2 06 60 01 inc %i1
20290ac: a0 10 00 1b mov %i3, %l0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
20290b0: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
20290b4: 94 10 00 10 mov %l0, %o2
20290b8: 40 00 85 ce call 204a7f0 <memcpy>
20290bc: 92 02 40 1a add %o1, %i2, %o1
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
20290c0: b6 a6 c0 10 subcc %i3, %l0, %i3
20290c4: 02 80 00 0d be 20290f8 <_fat_block_read+0x80>
20290c8: b0 04 00 18 add %l0, %i0, %i0
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
cmpltd += c;
blk++;
ofs = 0;
20290cc: b4 10 20 00 clr %i2
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
20290d0: 92 10 00 19 mov %i1, %o1
20290d4: 94 10 20 01 mov 1, %o2
20290d8: 96 07 bf fc add %fp, -4, %o3
20290dc: 7f ff ff 06 call 2028cf4 <fat_buf_access>
20290e0: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
20290e4: 80 a2 20 00 cmp %o0, 0
20290e8: 02 bf ff eb be 2029094 <_fat_block_read+0x1c> <== ALWAYS TAKEN
20290ec: 90 07 00 18 add %i4, %i0, %o0
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
20290f0: 81 c7 e0 08 ret <== NOT EXECUTED
20290f4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
20290f8: 81 c7 e0 08 ret
20290fc: 81 e8 00 00 restore
020291bc <_fat_block_release>:
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
20291bc: d0 02 20 20 ld [ %o0 + 0x20 ], %o0 <== NOT EXECUTED
20291c0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20291c4: 7f ff ff 52 call 2028f0c <fat_buf_release> <== NOT EXECUTED
20291c8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02029100 <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
2029100: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
2029104: c0 27 bf fc clr [ %fp + -4 ]
uint32_t offset,
uint32_t count,
const void *buff)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2029108: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
202910c: a2 10 20 01 mov 1, %l1
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
2029110: 80 a6 e0 00 cmp %i3, 0
2029114: 12 80 00 14 bne 2029164 <_fat_block_write+0x64> <== ALWAYS TAKEN
2029118: b0 10 20 00 clr %i0
202911c: 30 80 00 26 b,a 20291b4 <_fat_block_write+0xb4> <== NOT EXECUTED
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
2029120: 96 07 bf fc add %fp, -4, %o3
2029124: 7f ff fe f4 call 2028cf4 <fat_buf_access>
2029128: 90 10 00 10 mov %l0, %o0
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
202912c: 92 07 00 18 add %i4, %i0, %o1
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
2029130: 80 a2 20 00 cmp %o0, 0
2029134: 12 80 00 1e bne 20291ac <_fat_block_write+0xac> <== NEVER TAKEN
2029138: 94 10 00 1d mov %i5, %o2
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
202913c: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
2029140: b0 07 40 18 add %i5, %i0, %i0
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
2029144: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
2029148: b2 06 60 01 inc %i1
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
202914c: 40 00 85 a9 call 204a7f0 <memcpy>
2029150: 90 02 00 1a add %o0, %i2, %o0
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
2029154: b6 a6 c0 1d subcc %i3, %i5, %i3
2029158: 02 80 00 17 be 20291b4 <_fat_block_write+0xb4>
202915c: e2 2c 20 7c stb %l1, [ %l0 + 0x7c ]
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
blk++;
ofs = 0;
2029160: b4 10 20 00 clr %i2
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
{
c = MIN(count, (fs_info->vol.bps - ofs));
2029164: c2 14 00 00 lduh [ %l0 ], %g1
2029168: ba 20 40 1a sub %g1, %i2, %i5
202916c: 80 a7 40 1b cmp %i5, %i3
2029170: 08 80 00 03 bleu 202917c <_fat_block_write+0x7c>
2029174: 92 10 00 19 mov %i1, %o1
2029178: ba 10 00 1b mov %i3, %i5
if (c == fs_info->vol.bps)
202917c: 80 a0 40 1d cmp %g1, %i5
2029180: 32 bf ff e8 bne,a 2029120 <_fat_block_write+0x20>
2029184: 94 10 20 01 mov 1, %o2
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
2029188: 92 10 00 19 mov %i1, %o1
202918c: 94 10 20 02 mov 2, %o2
2029190: 90 10 00 10 mov %l0, %o0
2029194: 7f ff fe d8 call 2028cf4 <fat_buf_access>
2029198: 96 07 bf fc add %fp, -4, %o3
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
202919c: 92 07 00 18 add %i4, %i0, %o1
if (c == fs_info->vol.bps)
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
if (rc != RC_OK)
20291a0: 80 a2 20 00 cmp %o0, 0
20291a4: 02 bf ff e6 be 202913c <_fat_block_write+0x3c> <== ALWAYS TAKEN
20291a8: 94 10 00 1d mov %i5, %o2
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
20291ac: 81 c7 e0 08 ret <== NOT EXECUTED
20291b0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
20291b4: 81 c7 e0 08 ret
20291b8: 81 e8 00 00 restore
02003990 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
2003990: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003994: 7f ff ff d4 call 20038e4 <gettimeofday> <== NOT EXECUTED
2003998: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0202bc70 <_lstat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
202bc70: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
202bc74: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
202bc78: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
202bc7c: 7f ff ff e9 call 202bc20 <lstat> <== NOT EXECUTED
202bc80: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02004900 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
2004900: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2004904: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2004908: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200490c: 7f ff ff e9 call 20048b0 <stat> <== NOT EXECUTED
2004910: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0202a9f4 <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
202a9f4: 9d e3 bf 40 save %sp, -192, %sp
/*
* 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(
202a9f8: 94 10 20 19 mov 0x19, %o2
202a9fc: 92 10 00 18 mov %i0, %o1
202aa00: 90 07 bf a4 add %fp, -92, %o0
202aa04: 17 00 81 bf sethi %hi(0x206fc00), %o3
202aa08: 96 12 e1 fc or %o3, 0x1fc, %o3 ! 206fdfc <rtems_global_user_env+0x4>
202aa0c: 7f ff 7f d0 call 200a94c <rtems_filesystem_eval_path_start_with_root_and_current>
202aa10: 98 02 ff fc add %o3, -4, %o4
202aa14: 92 07 bf bc add %fp, -68, %o1
202aa18: 7f ff 80 9f call 200ac94 <rtems_filesystem_location_copy_and_detach>
202aa1c: 90 07 bf e0 add %fp, -32, %o0
&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 );
202aa20: 7f ff 81 25 call 200aeb4 <rtems_filesystem_location_transform_to_global>
202aa24: 90 07 bf e0 add %fp, -32, %o0
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
202aa28: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
202aa2c: 3b 00 81 91 sethi %hi(0x2064400), %i5
202aa30: ba 17 62 54 or %i5, 0x254, %i5 ! 2064654 <rtems_filesystem_null_handlers>
202aa34: 80 a0 40 1d cmp %g1, %i5
202aa38: 02 80 00 15 be 202aa8c <chroot+0x98>
202aa3c: d0 27 bf fc st %o0, [ %fp + -4 ]
rtems_filesystem_global_location_t *new_root_loc =
202aa40: 7f ff 80 ea call 200ade8 <rtems_filesystem_global_location_obtain>
202aa44: 90 07 bf fc add %fp, -4, %o0
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.ops->node_type_h)( &new_root_loc->location );
202aa48: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
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 =
202aa4c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
202aa50: 9f c0 40 00 call %g1
202aa54: b8 10 00 08 mov %o0, %i4
(*new_root_loc->location.ops->node_type_h)( &new_root_loc->location );
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
202aa58: 80 a2 20 00 cmp %o0, 0
202aa5c: 02 80 00 13 be 202aaa8 <chroot+0xb4>
202aa60: 01 00 00 00 nop
static inline void rtems_filesystem_location_error(
const rtems_filesystem_location_info_t *loc,
int eno
)
{
if ( !rtems_filesystem_location_is_null( loc ) ) {
202aa64: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
202aa68: 80 a0 40 1d cmp %g1, %i5
202aa6c: 02 80 00 06 be 202aa84 <chroot+0x90> <== NEVER TAKEN
202aa70: 01 00 00 00 nop
errno = eno;
202aa74: 40 00 72 1e call 20472ec <__errno>
202aa78: 01 00 00 00 nop
202aa7c: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
202aa80: c2 22 00 00 st %g1, [ %o0 ]
rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR );
rv = -1;
}
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
202aa84: 7f ff 80 b9 call 200ad68 <rtems_filesystem_global_location_release>
202aa88: 90 10 00 1c mov %i4, %o0
}
} else {
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
202aa8c: 7f ff 7f d3 call 200a9d8 <rtems_filesystem_eval_path_cleanup>
202aa90: 90 07 bf a4 add %fp, -92, %o0
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
202aa94: d0 07 bf fc ld [ %fp + -4 ], %o0
202aa98: 7f ff 80 b4 call 200ad68 <rtems_filesystem_global_location_release>
202aa9c: b0 10 3f ff mov -1, %i0
}
return rv;
}
202aaa0: 81 c7 e0 08 ret
202aaa4: 81 e8 00 00 restore
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.ops->node_type_h)( &new_root_loc->location );
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
sc = rtems_libio_set_private_env();
202aaa8: 40 00 05 97 call 202c104 <rtems_libio_set_private_env>
202aaac: 01 00 00 00 nop
if (sc == RTEMS_SUCCESSFUL) {
202aab0: 80 a2 20 00 cmp %o0, 0
202aab4: 02 80 00 09 be 202aad8 <chroot+0xe4>
202aab8: 80 a2 20 0d cmp %o0, 0xd
rtems_filesystem_global_location_assign(
&rtems_filesystem_current,
new_current_loc
);
} else {
if (sc != RTEMS_UNSATISFIED) {
202aabc: 02 bf ff f2 be 202aa84 <chroot+0x90> <== NEVER TAKEN
202aac0: 01 00 00 00 nop
errno = ENOMEM;
202aac4: 40 00 72 0a call 20472ec <__errno>
202aac8: 01 00 00 00 nop
202aacc: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
202aad0: 10 bf ff ed b 202aa84 <chroot+0x90>
202aad4: c2 22 00 00 st %g1, [ %o0 ]
(*new_root_loc->location.ops->node_type_h)( &new_root_loc->location );
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
sc = rtems_libio_set_private_env();
if (sc == RTEMS_SUCCESSFUL) {
rtems_filesystem_global_location_assign(
202aad8: 3b 00 81 bf sethi %hi(0x206fc00), %i5
202aadc: d0 07 61 f4 ld [ %i5 + 0x1f4 ], %o0 ! 206fdf4 <rtems_current_user_env>
202aae0: 92 10 00 1c mov %i4, %o1
202aae4: 7f ff 80 b7 call 200adc0 <rtems_filesystem_global_location_assign>
202aae8: 90 02 20 04 add %o0, 4, %o0
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
202aaec: d2 07 bf fc ld [ %fp + -4 ], %o1
202aaf0: d0 07 61 f4 ld [ %i5 + 0x1f4 ], %o0
202aaf4: 7f ff 80 b3 call 200adc0 <rtems_filesystem_global_location_assign>
202aaf8: b0 10 20 00 clr %i0
}
} else {
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
202aafc: 7f ff 7f b7 call 200a9d8 <rtems_filesystem_eval_path_cleanup>
202ab00: 90 07 bf a4 add %fp, -92, %o0
202ab04: 81 c7 e0 08 ret
202ab08: 81 e8 00 00 restore
02003720 <create_disk>:
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2003720: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2003724: 39 00 80 83 sethi %hi(0x2020c00), %i4
2003728: e0 07 21 c8 ld [ %i4 + 0x1c8 ], %l0 ! 2020dc8 <disktab_size>
200372c: 03 00 80 83 sethi %hi(0x2020c00), %g1
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
2003730: ba 10 00 18 mov %i0, %i5
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
2003734: 80 a6 00 10 cmp %i0, %l0
2003738: 0a 80 00 16 bcs 2003790 <create_disk+0x70>
200373c: e2 00 61 cc ld [ %g1 + 0x1cc ], %l1
rtems_disk_device_table *table = disktab;
2003740: 27 00 80 83 sethi %hi(0x2020c00), %l3
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
2003744: a5 2c 20 01 sll %l0, 1, %l2
if (major >= new_size) {
2003748: 80 a6 00 12 cmp %i0, %l2
200374c: 0a 80 00 03 bcs 2003758 <create_disk+0x38> <== NEVER TAKEN
2003750: d0 04 e1 cc ld [ %l3 + 0x1cc ], %o0
new_size = major + 1;
2003754: a4 06 20 01 add %i0, 1, %l2
}
table = realloc(table, new_size * sizeof(*table));
2003758: 93 2c a0 03 sll %l2, 3, %o1
200375c: 40 00 09 11 call 2005ba0 <realloc>
2003760: b0 10 20 1a mov 0x1a, %i0
if (table == NULL) {
2003764: 80 a2 20 00 cmp %o0, 0
2003768: 02 80 00 1b be 20037d4 <create_disk+0xb4> <== ALWAYS TAKEN
200376c: a2 10 00 08 mov %o0, %l1
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2003770: 94 24 80 10 sub %l2, %l0, %o2 <== NOT EXECUTED
2003774: 91 2c 20 03 sll %l0, 3, %o0 <== NOT EXECUTED
2003778: 92 10 20 00 clr %o1 <== NOT EXECUTED
200377c: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED
2003780: 40 00 42 63 call 201410c <memset> <== NOT EXECUTED
2003784: 95 2a a0 03 sll %o2, 3, %o2 <== NOT EXECUTED
disktab = table;
2003788: e2 24 e1 cc st %l1, [ %l3 + 0x1cc ] <== NOT EXECUTED
disktab_size = new_size;
200378c: e4 27 21 c8 st %l2, [ %i4 + 0x1c8 ] <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
2003790: 83 2f 60 03 sll %i5, 3, %g1
2003794: e0 04 40 01 ld [ %l1 + %g1 ], %l0
2003798: a2 04 40 01 add %l1, %g1, %l1
200379c: 80 a4 20 00 cmp %l0, 0
20037a0: 02 80 00 0f be 20037dc <create_disk+0xbc>
20037a4: e4 04 60 04 ld [ %l1 + 4 ], %l2
20037a8: 80 a6 40 12 cmp %i1, %l2
20037ac: 1a 80 00 0d bcc 20037e0 <create_disk+0xc0>
20037b0: 80 a4 a0 00 cmp %l2, 0
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
disktab [major].size = new_size;
}
return disktab [major].minor + minor;
20037b4: 83 2e 60 02 sll %i1, 2, %g1
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
20037b8: b8 84 00 01 addcc %l0, %g1, %i4
20037bc: 02 80 00 06 be 20037d4 <create_disk+0xb4> <== NEVER TAKEN
20037c0: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
20037c4: c2 04 00 01 ld [ %l0 + %g1 ], %g1
20037c8: 80 a0 60 00 cmp %g1, 0
20037cc: 02 80 00 20 be 200384c <create_disk+0x12c>
20037d0: b0 10 20 0c mov 0xc, %i0
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
}
20037d4: 81 c7 e0 08 ret
20037d8: 81 e8 00 00 restore
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) {
20037dc: 80 a4 a0 00 cmp %l2, 0
20037e0: 12 80 00 15 bne 2003834 <create_disk+0x114>
20037e4: b8 10 20 08 mov 8, %i4
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
}
if (minor >= new_size) {
20037e8: 80 a6 40 1c cmp %i1, %i4
20037ec: 3a 80 00 02 bcc,a 20037f4 <create_disk+0xd4>
20037f0: b8 06 60 01 add %i1, 1, %i4
new_size = minor + 1;
}
table = realloc(table, new_size * sizeof(*table));
20037f4: 90 10 00 10 mov %l0, %o0
20037f8: 93 2f 20 02 sll %i4, 2, %o1
20037fc: 40 00 08 e9 call 2005ba0 <realloc>
2003800: b0 10 20 1a mov 0x1a, %i0
if (table == NULL) {
2003804: 80 a2 20 00 cmp %o0, 0
2003808: 02 bf ff f3 be 20037d4 <create_disk+0xb4>
200380c: a0 10 00 08 mov %o0, %l0
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2003810: 94 27 00 12 sub %i4, %l2, %o2
2003814: 91 2c a0 02 sll %l2, 2, %o0
2003818: 92 10 20 00 clr %o1
200381c: 90 04 00 08 add %l0, %o0, %o0
2003820: 40 00 42 3b call 201410c <memset>
2003824: 95 2a a0 02 sll %o2, 2, %o2
disktab [major].minor = table;
2003828: e0 24 40 00 st %l0, [ %l1 ]
disktab [major].size = new_size;
200382c: 10 bf ff e2 b 20037b4 <create_disk+0x94>
2003830: f8 24 60 04 st %i4, [ %l1 + 4 ]
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
2003834: b9 2c a0 01 sll %l2, 1, %i4
}
if (minor >= new_size) {
2003838: 80 a6 40 1c cmp %i1, %i4
200383c: 0a bf ff ef bcs 20037f8 <create_disk+0xd8> <== ALWAYS TAKEN
2003840: 90 10 00 10 mov %l0, %o0
2003844: 10 bf ff ed b 20037f8 <create_disk+0xd8> <== NOT EXECUTED
2003848: b8 06 60 01 add %i1, 1, %i4 <== NOT EXECUTED
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
200384c: 90 10 20 38 mov 0x38, %o0
2003850: 40 00 06 01 call 2005054 <malloc>
2003854: b0 10 20 1a mov 0x1a, %i0
if (dd == NULL) {
2003858: 80 a2 20 00 cmp %o0, 0
200385c: 02 bf ff de be 20037d4 <create_disk+0xb4> <== NEVER TAKEN
2003860: a0 10 00 08 mov %o0, %l0
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
2003864: 80 a6 a0 00 cmp %i2, 0
2003868: 02 80 00 0f be 20038a4 <create_disk+0x184>
200386c: a2 10 20 00 clr %l1
alloc_name = strdup(name);
2003870: 40 00 43 87 call 201468c <strdup>
2003874: 90 10 00 1a mov %i2, %o0
if (alloc_name == NULL) {
2003878: a2 92 20 00 orcc %o0, 0, %l1
200387c: 02 80 00 15 be 20038d0 <create_disk+0x1b0> <== NEVER TAKEN
2003880: b4 10 00 08 mov %o0, %i2
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
2003884: 94 10 00 1d mov %i5, %o2
2003888: 13 00 00 18 sethi %hi(0x6000), %o1
200388c: 96 10 00 19 mov %i1, %o3
2003890: 40 00 06 6b call 200523c <mknod>
2003894: 92 12 61 ff or %o1, 0x1ff, %o1
2003898: 80 a2 20 00 cmp %o0, 0
200389c: 06 80 00 0b bl 20038c8 <create_disk+0x1a8> <== NEVER TAKEN
20038a0: 90 10 00 1a mov %i2, %o0
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
20038a4: fa 24 00 00 st %i5, [ %l0 ]
20038a8: f2 24 20 04 st %i1, [ %l0 + 4 ]
dd->name = alloc_name;
20038ac: e2 24 20 10 st %l1, [ %l0 + 0x10 ]
dd->uses = 0;
20038b0: c0 24 20 14 clr [ %l0 + 0x14 ]
dd->deleted = false;
20038b4: c0 2c 20 30 clrb [ %l0 + 0x30 ]
*dd_entry = dd;
20038b8: e0 27 00 00 st %l0, [ %i4 ]
*dd_ptr = dd;
20038bc: e0 26 c0 00 st %l0, [ %i3 ]
return RTEMS_SUCCESSFUL;
}
20038c0: 81 c7 e0 08 ret
20038c4: 91 e8 20 00 restore %g0, 0, %o0
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
20038c8: 40 00 04 62 call 2004a50 <free> <== NOT EXECUTED
20038cc: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
free(dd);
20038d0: 40 00 04 60 call 2004a50 <free> <== NOT EXECUTED
20038d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
20038d8: 81 c7 e0 08 ret <== NOT EXECUTED
20038dc: 81 e8 00 00 restore <== NOT EXECUTED
02004dcc <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)
2004dcc: 9d e3 bf 98 save %sp, -104, %sp
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
2004dd0: 90 10 20 01 mov 1, %o0
if (new_part_desc == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
2004dd4: c0 26 40 00 clr [ %i1 ]
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
2004dd8: 40 00 03 55 call 2005b2c <calloc>
2004ddc: 92 10 20 28 mov 0x28, %o1
* 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)
2004de0: 82 10 00 18 mov %i0, %g1
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
2004de4: ba 10 00 08 mov %o0, %i5
2004de8: 80 a2 20 00 cmp %o0, 0
2004dec: 02 80 00 45 be 2004f00 <data_to_part_desc.part.1+0x134> <== NEVER TAKEN
2004df0: b0 10 20 1a mov 0x1a, %i0
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
/* 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));
2004df4: f0 08 60 0a ldub [ %g1 + 0xa ], %i0
2004df8: c6 08 60 0b ldub [ %g1 + 0xb ], %g3
2004dfc: d6 08 60 08 ldub [ %g1 + 8 ], %o3
2004e00: d8 08 60 09 ldub [ %g1 + 9 ], %o4
part_desc->start = LE_TO_CPU_U32(temp);
memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t));
2004e04: da 08 60 0c ldub [ %g1 + 0xc ], %o5
2004e08: de 08 60 0d ldub [ %g1 + 0xd ], %o7
2004e0c: f8 08 60 0e ldub [ %g1 + 0xe ], %i4
2004e10: c8 08 60 0f ldub [ %g1 + 0xf ], %g4
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
/* 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));
2004e14: f0 2f bf fe stb %i0, [ %fp + -2 ]
2004e18: c6 2f bf ff stb %g3, [ %fp + -1 ]
2004e1c: d6 2f bf fc stb %o3, [ %fp + -4 ]
2004e20: d8 2f bf fd stb %o4, [ %fp + -3 ]
part_desc->start = LE_TO_CPU_U32(temp);
2004e24: c4 07 bf fc ld [ %fp + -4 ], %g2
{
return RTEMS_NO_MEMORY;
}
part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET);
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
2004e28: c6 08 60 04 ldub [ %g1 + 4 ], %g3
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
{
return RTEMS_NO_MEMORY;
}
part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET);
2004e2c: f0 08 40 00 ldub [ %g1 ], %i0
/* 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));
2004e30: da 2f bf fc stb %o5, [ %fp + -4 ]
2004e34: de 2f bf fd stb %o7, [ %fp + -3 ]
2004e38: f8 2f bf fe stb %i4, [ %fp + -2 ]
2004e3c: c8 2f bf ff stb %g4, [ %fp + -1 ]
part_desc->size = LE_TO_CPU_U32(temp);
2004e40: c2 07 bf fc ld [ %fp + -4 ], %g1
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2004e44: 9f 30 a0 08 srl %g2, 8, %o7
2004e48: 9e 0b e0 ff and %o7, 0xff, %o7
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004e4c: 9f 2b e0 10 sll %o7, 0x10, %o7
2004e50: 9b 28 a0 18 sll %g2, 0x18, %o5
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004e54: 88 18 e0 85 xor %g3, 0x85, %g4
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2004e58: b9 30 a0 18 srl %g2, 0x18, %i4
2004e5c: 80 a0 00 04 cmp %g0, %g4
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004e60: b8 13 40 1c or %o5, %i4, %i4
2004e64: b8 17 00 0f or %i4, %o7, %i4
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2004e68: 9f 30 60 08 srl %g1, 8, %o7
2004e6c: 9e 0b e0 ff and %o7, 0xff, %o7
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004e70: 9f 2b e0 10 sll %o7, 0x10, %o7
2004e74: 88 60 3f ff subx %g0, -1, %g4
2004e78: 9b 28 60 18 sll %g1, 0x18, %o5
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2004e7c: 85 30 a0 10 srl %g2, 0x10, %g2
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
{
return RTEMS_NO_MEMORY;
}
part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET);
2004e80: f0 2a 00 00 stb %i0, [ %o0 ]
2004e84: 84 08 a0 ff and %g2, 0xff, %g2
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
2004e88: c6 2a 20 01 stb %g3, [ %o0 + 1 ]
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004e8c: 85 28 a0 08 sll %g2, 8, %g2
2004e90: 84 17 00 02 or %i4, %g2, %g2
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2004e94: b9 30 60 18 srl %g1, 0x18, %i4
/* 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);
2004e98: c4 22 20 04 st %g2, [ %o0 + 4 ]
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004e9c: b8 13 40 1c or %o5, %i4, %i4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2004ea0: 83 30 60 10 srl %g1, 0x10, %g1
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004ea4: b8 17 00 0f or %i4, %o7, %i4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2004ea8: 82 08 60 ff and %g1, 0xff, %g1
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004eac: 9e 18 e0 05 xor %g3, 5, %o7
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2004eb0: 83 28 60 08 sll %g1, 8, %g1
2004eb4: 80 a0 00 0f cmp %g0, %o7
2004eb8: b8 17 00 01 or %i4, %g1, %i4
/* 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);
2004ebc: f8 22 20 08 st %i4, [ %o0 + 8 ]
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004ec0: 82 60 3f ff subx %g0, -1, %g1
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
2004ec4: 80 91 00 01 orcc %g4, %g1, %g0
2004ec8: 12 80 00 10 bne 2004f08 <data_to_part_desc.part.1+0x13c>
2004ecc: 92 10 00 03 mov %g3, %o1
DOS_P32MB_PARTITION,
FAT32_PARTITION ,FAT32_LBA_PARTITION,
FAT16_LBA_PARTITION
};
return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types)));
2004ed0: 11 00 80 90 sethi %hi(0x2024000), %o0
2004ed4: 94 10 20 06 mov 6, %o2
2004ed8: 40 00 42 1f call 2015754 <memchr>
2004edc: 90 12 21 a8 or %o0, 0x1a8, %o0
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
2004ee0: 80 a2 20 00 cmp %o0, 0
2004ee4: 02 80 00 04 be 2004ef4 <data_to_part_desc.part.1+0x128>
2004ee8: 80 a7 20 00 cmp %i4, 0
((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) {
2004eec: 32 80 00 08 bne,a 2004f0c <data_to_part_desc.part.1+0x140><== ALWAYS TAKEN
2004ef0: fa 26 40 00 st %i5, [ %i1 ]
*new_part_desc = part_desc;
}
else {
/* empty partition */
free(part_desc);
2004ef4: 90 10 00 1d mov %i5, %o0
2004ef8: 40 00 03 de call 2005e70 <free>
2004efc: b0 10 20 00 clr %i0
}
return RTEMS_SUCCESSFUL;
}
2004f00: 81 c7 e0 08 ret
2004f04: 81 e8 00 00 restore
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) {
*new_part_desc = part_desc;
2004f08: fa 26 40 00 st %i5, [ %i1 ]
}
else {
/* empty partition */
free(part_desc);
}
return RTEMS_SUCCESSFUL;
2004f0c: 81 c7 e0 08 ret
2004f10: 91 e8 20 00 restore %g0, 0, %o0
02002ccc <devFS_Show>:
#endif
#include "devfs.h"
void devFS_Show(void)
{
2002ccc: 9d e3 bf a0 save %sp, -96, %sp
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
2002cd0: 03 00 80 67 sethi %hi(0x2019c00), %g1
2002cd4: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 2019f80 <rtems_current_user_env>
if (rootloc->ops == &devFS_ops) {
2002cd8: 05 00 80 61 sethi %hi(0x2018400), %g2
#include "devfs.h"
void devFS_Show(void)
{
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
2002cdc: c2 00 60 04 ld [ %g1 + 4 ], %g1
if (rootloc->ops == &devFS_ops) {
2002ce0: 84 10 a1 54 or %g2, 0x154, %g2
2002ce4: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
2002ce8: 80 a0 c0 02 cmp %g3, %g2
2002cec: 22 80 00 04 be,a 2002cfc <devFS_Show+0x30> <== ALWAYS TAKEN
2002cf0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2002cf4: 81 c7 e0 08 ret <== NOT EXECUTED
2002cf8: 81 e8 00 00 restore <== NOT EXECUTED
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return loc->mt_entry->immutable_fs_info;
2002cfc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
const devFS_data *data = devFS_get_data(rootloc);
size_t i = 0;
size_t n = data->count;
2002d00: f4 00 60 04 ld [ %g1 + 4 ], %i2
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
2002d04: 80 a6 a0 00 cmp %i2, 0
2002d08: 02 bf ff fb be 2002cf4 <devFS_Show+0x28> <== NEVER TAKEN
2002d0c: fa 00 40 00 ld [ %g1 ], %i5
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
2002d10: 31 00 80 61 sethi %hi(0x2018400), %i0
for (j = 0; j < m; ++j) {
printk("%c", current->name [j]);
}
printk(
2002d14: 33 00 80 61 sethi %hi(0x2018400), %i1
size_t j = 0;
size_t m = current->namelen;
printk("/");
for (j = 0; j < m; ++j) {
printk("%c", current->name [j]);
2002d18: 39 00 80 61 sethi %hi(0x2018400), %i4
const devFS_data *data = devFS_get_data(rootloc);
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
2002d1c: b6 10 20 00 clr %i3
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
2002d20: b0 16 21 a8 or %i0, 0x1a8, %i0
for (j = 0; j < m; ++j) {
printk("%c", current->name [j]);
}
printk(
2002d24: b2 16 61 b8 or %i1, 0x1b8, %i1
size_t j = 0;
size_t m = current->namelen;
printk("/");
for (j = 0; j < m; ++j) {
printk("%c", current->name [j]);
2002d28: b8 17 21 b0 or %i4, 0x1b0, %i4
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
devFS_node *current = nodes + i;
if (current->name != NULL) {
2002d2c: c2 07 40 00 ld [ %i5 ], %g1
2002d30: 80 a0 60 00 cmp %g1, 0
2002d34: 22 80 00 16 be,a 2002d8c <devFS_Show+0xc0>
2002d38: b6 06 e0 01 inc %i3
size_t j = 0;
size_t m = current->namelen;
2002d3c: e2 07 60 04 ld [ %i5 + 4 ], %l1
printk("/");
2002d40: 40 00 04 f0 call 2004100 <printk>
2002d44: 90 10 00 18 mov %i0, %o0
for (j = 0; j < m; ++j) {
2002d48: 80 a4 60 00 cmp %l1, 0
2002d4c: 22 80 00 0c be,a 2002d7c <devFS_Show+0xb0> <== NEVER TAKEN
2002d50: d2 07 60 08 ld [ %i5 + 8 ], %o1 <== NOT EXECUTED
2002d54: a0 10 20 00 clr %l0
printk("%c", current->name [j]);
2002d58: c2 07 40 00 ld [ %i5 ], %g1
2002d5c: 90 10 00 1c mov %i4, %o0
2002d60: d2 48 40 10 ldsb [ %g1 + %l0 ], %o1
2002d64: 40 00 04 e7 call 2004100 <printk>
2002d68: a0 04 20 01 inc %l0
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
for (j = 0; j < m; ++j) {
2002d6c: 80 a4 00 11 cmp %l0, %l1
2002d70: 32 bf ff fb bne,a 2002d5c <devFS_Show+0x90>
2002d74: c2 07 40 00 ld [ %i5 ], %g1
printk("%c", current->name [j]);
}
printk(
2002d78: d2 07 60 08 ld [ %i5 + 8 ], %o1
2002d7c: d4 07 60 0c ld [ %i5 + 0xc ], %o2
2002d80: 40 00 04 e0 call 2004100 <printk>
2002d84: 90 10 00 19 mov %i1, %o0
const devFS_data *data = devFS_get_data(rootloc);
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
2002d88: b6 06 e0 01 inc %i3
2002d8c: 80 a6 c0 1a cmp %i3, %i2
2002d90: 12 bf ff e7 bne 2002d2c <devFS_Show+0x60>
2002d94: ba 07 60 14 add %i5, 0x14, %i5
2002d98: 81 c7 e0 08 ret
2002d9c: 81 e8 00 00 restore
0200c1dc <devFS_eval_path>:
}
void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
200c1dc: 9d e3 bf a0 save %sp, -96, %sp
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return loc->mt_entry->immutable_fs_info;
200c1e0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
static inline const char *rtems_filesystem_eval_path_get_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
return ctx->path;
200c1e4: e2 06 00 00 ld [ %i0 ], %l1
200c1e8: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
static inline size_t rtems_filesystem_eval_path_get_pathlen(
rtems_filesystem_eval_path_context_t *ctx
)
{
return ctx->pathlen;
200c1ec: f2 06 20 04 ld [ %i0 + 4 ], %i1
size_t pathlen,
devFS_node **free_node_ptr
)
{
size_t i = 0;
size_t n = data->count;
200c1f0: e0 00 60 04 ld [ %g1 + 4 ], %l0
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) {
200c1f4: 80 a4 20 00 cmp %l0, 0
200c1f8: 02 80 00 2f be 200c2b4 <devFS_eval_path+0xd8>
200c1fc: fa 00 40 00 ld [ %g1 ], %i5
)
{
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
200c200: b4 10 20 00 clr %i2
devFS_node *free_node = NULL;
200c204: 82 10 20 00 clr %g1
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
200c208: 10 80 00 0a b 200c230 <devFS_eval_path+0x54>
200c20c: b8 10 20 00 clr %i4
200c210: 80 a6 a0 00 cmp %i2, 0
200c214: 12 80 00 1a bne 200c27c <devFS_eval_path+0xa0>
200c218: 80 a6 e0 00 cmp %i3, 0
200c21c: b8 07 20 01 inc %i4
200c220: 80 a7 00 10 cmp %i4, %l0
200c224: 02 80 00 18 be 200c284 <devFS_eval_path+0xa8>
200c228: ba 07 60 14 add %i5, 0x14, %i5
200c22c: 82 10 00 1b mov %i3, %g1
devFS_node *current = nodes + i;
if (current->name != NULL) {
200c230: d0 07 40 00 ld [ %i5 ], %o0
200c234: 80 a2 20 00 cmp %o0, 0
200c238: 02 bf ff f6 be 200c210 <devFS_eval_path+0x34>
200c23c: b6 10 00 1d mov %i5, %i3
if (
200c240: c4 07 60 04 ld [ %i5 + 4 ], %g2
200c244: 80 a6 40 02 cmp %i1, %g2
200c248: 12 bf ff f2 bne 200c210 <devFS_eval_path+0x34>
200c24c: b6 10 00 01 mov %g1, %i3
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
200c250: 92 10 00 11 mov %l1, %o1
200c254: 40 00 0a 2e call 200eb0c <memcmp>
200c258: 94 10 00 19 mov %i1, %o2
200c25c: 80 a2 20 00 cmp %o0, 0
200c260: 12 bf ff ed bne 200c214 <devFS_eval_path+0x38>
200c264: 80 a6 a0 00 cmp %i2, 0
200c268: b4 10 00 1d mov %i5, %i2
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) {
200c26c: 80 a6 a0 00 cmp %i2, 0
200c270: 22 bf ff ec be,a 200c220 <devFS_eval_path+0x44> <== NEVER TAKEN
200c274: b8 07 20 01 inc %i4 <== NOT EXECUTED
200c278: 80 a6 e0 00 cmp %i3, 0
200c27c: 22 bf ff e9 be,a 200c220 <devFS_eval_path+0x44>
200c280: b8 07 20 01 inc %i4
rtems_filesystem_eval_path_get_pathlen(ctx),
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
200c284: 80 a6 a0 00 cmp %i2, 0
200c288: 02 80 00 0d be 200c2bc <devFS_eval_path+0xe0>
200c28c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) {
200c290: 80 88 60 40 btst 0x40, %g1
200c294: 12 80 00 06 bne 200c2ac <devFS_eval_path+0xd0>
200c298: 01 00 00 00 nop
currentloc->node_access = node;
200c29c: f4 26 20 20 st %i2, [ %i0 + 0x20 ]
static inline void rtems_filesystem_eval_path_clear_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->pathlen = 0;
200c2a0: c0 26 20 04 clr [ %i0 + 4 ]
200c2a4: 81 c7 e0 08 ret
200c2a8: 81 e8 00 00 restore
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
200c2ac: 7f ff e3 35 call 2004f80 <rtems_filesystem_eval_path_error>
200c2b0: 93 e8 20 11 restore %g0, 0x11, %o1
static inline int rtems_filesystem_eval_path_get_flags(
const rtems_filesystem_eval_path_context_t *ctx
)
{
return ctx->flags;
200c2b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
{
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
devFS_node *free_node = NULL;
200c2b8: b6 10 20 00 clr %i3
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
}
} else {
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
200c2bc: 80 88 60 20 btst 0x20, %g1
200c2c0: 02 80 00 0b be 200c2ec <devFS_eval_path+0x110> <== NEVER TAKEN
200c2c4: 80 a6 e0 00 cmp %i3, 0
if (free_node != NULL) {
200c2c8: 02 80 00 0b be 200c2f4 <devFS_eval_path+0x118>
200c2cc: 82 10 21 ff mov 0x1ff, %g1
free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO;
200c2d0: c2 26 e0 10 st %g1, [ %i3 + 0x10 ]
currentloc->node_access = free_node;
200c2d4: f6 26 20 20 st %i3, [ %i0 + 0x20 ]
rtems_filesystem_eval_path_context_t *ctx,
const char *token,
size_t tokenlen
)
{
ctx->token = token;
200c2d8: e2 26 20 08 st %l1, [ %i0 + 8 ]
ctx->tokenlen = tokenlen;
200c2dc: f2 26 20 0c st %i1, [ %i0 + 0xc ]
static inline void rtems_filesystem_eval_path_clear_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->pathlen = 0;
200c2e0: c0 26 20 04 clr [ %i0 + 4 ]
200c2e4: 81 c7 e0 08 ret
200c2e8: 81 e8 00 00 restore
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, ENOSPC);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
200c2ec: 7f ff e3 25 call 2004f80 <rtems_filesystem_eval_path_error><== NOT EXECUTED
200c2f0: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED
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);
200c2f4: 7f ff e3 23 call 2004f80 <rtems_filesystem_eval_path_error>
200c2f8: 93 e8 20 1c restore %g0, 0x1c, %o1
02003834 <devFS_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2003834: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
2003838: 80 a6 a0 03 cmp %i2, 3
200383c: 22 80 00 18 be,a 200389c <devFS_mknod+0x68>
2003840: c2 4e 40 00 ldsb [ %i1 ], %g1
if (S_ISBLK(mode) || S_ISCHR(mode)) {
2003844: 03 00 00 3c sethi %hi(0xf000), %g1
2003848: 05 00 00 08 sethi %hi(0x2000), %g2
200384c: 82 0e c0 01 and %i3, %g1, %g1
2003850: 80 a0 40 02 cmp %g1, %g2
2003854: 12 80 00 28 bne 20038f4 <devFS_mknod+0xc0>
2003858: 05 00 00 18 sethi %hi(0x6000), %g2
char *dupname = malloc(namelen);
200385c: 40 00 02 48 call 200417c <malloc>
2003860: 90 10 00 1a mov %i2, %o0
if (dupname != NULL) {
2003864: 84 92 20 00 orcc %o0, 0, %g2
2003868: 02 80 00 2c be 2003918 <devFS_mknod+0xe4>
200386c: 92 10 00 19 mov %i1, %o1
devFS_node *node = parentloc->node_access;
2003870: c2 06 20 08 ld [ %i0 + 8 ], %g1
node->name = dupname;
2003874: c4 20 40 00 st %g2, [ %g1 ]
node->namelen = namelen;
2003878: f4 20 60 04 st %i2, [ %g1 + 4 ]
node->major = rtems_filesystem_dev_major_t(dev);
200387c: f8 20 60 08 st %i4, [ %g1 + 8 ]
node->minor = rtems_filesystem_dev_minor_t(dev);
2003880: fa 20 60 0c st %i5, [ %g1 + 0xc ]
node->mode = mode;
2003884: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
memcpy(dupname, name, namelen);
2003888: 94 10 00 1a mov %i2, %o2
200388c: 40 00 2c ce call 200ebc4 <memcpy>
2003890: b0 10 20 00 clr %i0
2003894: 81 c7 e0 08 ret
2003898: 81 e8 00 00 restore
dev_t dev
)
{
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
200389c: 80 a0 60 64 cmp %g1, 0x64
20038a0: 12 bf ff ea bne 2003848 <devFS_mknod+0x14> <== NEVER TAKEN
20038a4: 03 00 00 3c sethi %hi(0xf000), %g1
20038a8: c2 4e 60 01 ldsb [ %i1 + 1 ], %g1
20038ac: 80 a0 60 65 cmp %g1, 0x65
20038b0: 12 bf ff e6 bne 2003848 <devFS_mknod+0x14> <== NEVER TAKEN
20038b4: 03 00 00 3c sethi %hi(0xf000), %g1
20038b8: c2 4e 60 02 ldsb [ %i1 + 2 ], %g1
20038bc: 80 a0 60 76 cmp %g1, 0x76
20038c0: 12 bf ff e2 bne 2003848 <devFS_mknod+0x14> <== NEVER TAKEN
20038c4: 03 00 00 3c sethi %hi(0xf000), %g1
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
20038c8: b6 0e c0 01 and %i3, %g1, %i3
20038cc: 03 00 00 10 sethi %hi(0x4000), %g1
20038d0: 80 a6 c0 01 cmp %i3, %g1
20038d4: 02 bf ff f0 be 2003894 <devFS_mknod+0x60> <== ALWAYS TAKEN
20038d8: b0 10 20 00 clr %i0
errno = ENOTSUP;
20038dc: 40 00 2a 11 call 200e120 <__errno> <== NOT EXECUTED
20038e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20038e4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20038e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
}
return rv;
}
20038ec: 81 c7 e0 08 ret <== NOT EXECUTED
20038f0: 81 e8 00 00 restore <== NOT EXECUTED
)
{
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
if (S_ISBLK(mode) || S_ISCHR(mode)) {
20038f4: 80 a0 40 02 cmp %g1, %g2
20038f8: 02 bf ff d9 be 200385c <devFS_mknod+0x28>
20038fc: 01 00 00 00 nop
} else {
errno = ENOMEM;
rv = -1;
}
} else {
errno = ENOTSUP;
2003900: 40 00 2a 08 call 200e120 <__errno>
2003904: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2003908: 82 10 20 86 mov 0x86, %g1
200390c: c2 22 00 00 st %g1, [ %o0 ]
2003910: 81 c7 e0 08 ret
2003914: 81 e8 00 00 restore
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;
2003918: 40 00 2a 02 call 200e120 <__errno>
200391c: b0 10 3f ff mov -1, %i0
2003920: 82 10 20 0c mov 0xc, %g1
2003924: c2 22 00 00 st %g1, [ %o0 ]
2003928: 81 c7 e0 08 ret
200392c: 81 e8 00 00 restore
020036a8 <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
20036a8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20036ac: 03 00 80 83 sethi %hi(0x2020c00), %g1
20036b0: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 2020dc4 <diskdevs_mutex>
20036b4: 92 10 20 00 clr %o1
20036b8: 94 10 20 00 clr %o2
20036bc: 40 00 16 a7 call 2009158 <rtems_semaphore_obtain>
20036c0: b0 10 20 16 mov 0x16, %i0
if (sc == RTEMS_SUCCESSFUL) {
20036c4: 80 a2 20 00 cmp %o0, 0
20036c8: 12 80 00 05 bne 20036dc <disk_lock+0x34> <== NEVER TAKEN
20036cc: 84 10 20 01 mov 1, %g2
diskdevs_protected = true;
20036d0: 03 00 80 83 sethi %hi(0x2020c00), %g1
return RTEMS_SUCCESSFUL;
20036d4: b0 10 20 00 clr %i0
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc == RTEMS_SUCCESSFUL) {
diskdevs_protected = true;
20036d8: c4 28 61 c0 stb %g2, [ %g1 + 0x1c0 ]
return RTEMS_SUCCESSFUL;
} else {
return RTEMS_NOT_CONFIGURED;
}
}
20036dc: 81 c7 e0 08 ret
20036e0: 81 e8 00 00 restore
020036e4 <disk_unlock>:
static void
disk_unlock(void)
{
20036e4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
20036e8: 03 00 80 83 sethi %hi(0x2020c00), %g1
20036ec: d0 00 61 c4 ld [ %g1 + 0x1c4 ], %o0 ! 2020dc4 <diskdevs_mutex>
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
20036f0: 03 00 80 83 sethi %hi(0x2020c00), %g1
20036f4: c0 28 61 c0 clrb [ %g1 + 0x1c0 ] ! 2020dc0 <diskdevs_protected>
sc = rtems_semaphore_release(diskdevs_mutex);
20036f8: 40 00 16 e2 call 2009280 <rtems_semaphore_release>
20036fc: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2003700: 80 a2 20 00 cmp %o0, 0
2003704: 12 80 00 04 bne 2003714 <disk_unlock+0x30> <== NEVER TAKEN
2003708: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
200370c: 81 c7 e0 08 ret
2003710: 81 e8 00 00 restore
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
2003714: 40 00 18 3b call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003718: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
02005548 <drainOutput.part.0>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
2005548: 9d e3 bf a0 save %sp, -96, %sp
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
200554c: 7f ff f4 5b call 20026b8 <sparc_disable_interrupts>
2005550: ba 10 00 18 mov %i0, %i5
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2005554: c4 06 20 84 ld [ %i0 + 0x84 ], %g2
2005558: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
200555c: 80 a0 80 01 cmp %g2, %g1
2005560: 02 80 00 14 be 20055b0 <drainOutput.part.0+0x68> <== ALWAYS TAKEN
2005564: 01 00 00 00 nop
tty->rawOutBufState = rob_wait;
2005568: b8 10 20 02 mov 2, %i4 ! 2 <PROM_START+0x2> <== NOT EXECUTED
200556c: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED
rtems_interrupt_enable (level);
2005570: 7f ff f4 56 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
2005574: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain(
2005578: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
200557c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2005580: 40 00 09 eb call 2007d2c <rtems_semaphore_obtain> <== NOT EXECUTED
2005584: 94 10 20 00 clr %o2 <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2005588: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200558c: 12 80 00 0b bne 20055b8 <drainOutput.part.0+0x70> <== NOT EXECUTED
2005590: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2005594: 7f ff f4 49 call 20026b8 <sparc_disable_interrupts> <== NOT EXECUTED
2005598: 01 00 00 00 nop <== 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) {
200559c: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== NOT EXECUTED
20055a0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED
20055a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20055a8: 32 bf ff f2 bne,a 2005570 <drainOutput.part.0+0x28> <== NOT EXECUTED
20055ac: f8 27 60 94 st %i4, [ %i5 + 0x94 ] <== NOT EXECUTED
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
20055b0: 7f ff f4 46 call 20026c8 <sparc_enable_interrupts>
20055b4: 91 e8 00 08 restore %g0, %o0, %o0
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
20055b8: 40 00 0b 9f call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
02003d4c <dup2>:
int dup2(
int fildes,
int fildes2
)
{
2003d4c: 9d e3 bf 58 save %sp, -168, %sp
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2003d50: 90 10 00 18 mov %i0, %o0
int dup2(
int fildes,
int fildes2
)
{
2003d54: ba 10 00 18 mov %i0, %i5
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2003d58: 92 07 bf b8 add %fp, -72, %o1
2003d5c: 40 00 01 e8 call 20044fc <fstat>
2003d60: b0 10 3f ff mov -1, %i0
if ( status == -1 )
2003d64: 80 a2 3f ff cmp %o0, -1
2003d68: 02 80 00 0b be 2003d94 <dup2+0x48>
2003d6c: 90 10 00 19 mov %i1, %o0
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
2003d70: 40 00 01 e3 call 20044fc <fstat>
2003d74: 92 07 bf b8 add %fp, -72, %o1
if ( status == -1 )
2003d78: 80 a2 3f ff cmp %o0, -1
2003d7c: 02 80 00 06 be 2003d94 <dup2+0x48> <== NEVER TAKEN
2003d80: 90 10 00 1d mov %i5, %o0
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2003d84: 92 10 20 00 clr %o1
2003d88: 40 00 00 ae call 2004040 <fcntl>
2003d8c: 94 10 00 19 mov %i1, %o2
2003d90: b0 10 00 08 mov %o0, %i0
}
2003d94: 81 c7 e0 08 ret
2003d98: 81 e8 00 00 restore
020062e8 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
20062e8: 9d e3 bf 98 save %sp, -104, %sp
if ((tty->termios.c_lflag & ECHOCTL) &&
20062ec: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
20062f0: 80 88 62 00 btst 0x200, %g1
20062f4: 02 80 00 08 be 2006314 <echo+0x2c> <== NEVER TAKEN
20062f8: 03 00 80 72 sethi %hi(0x201c800), %g1
iscntrl(c) && (c != '\t') && (c != '\n')) {
20062fc: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 201c9a0 <__ctype_ptr__>
2006300: 82 00 40 18 add %g1, %i0, %g1
2006304: c2 08 60 01 ldub [ %g1 + 1 ], %g1
2006308: 80 88 60 20 btst 0x20, %g1
200630c: 12 80 00 07 bne 2006328 <echo+0x40>
2006310: 80 a6 20 09 cmp %i0, 9
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
2006314: 90 10 00 18 mov %i0, %o0
2006318: 7f ff ff 8d call 200614c <oproc>
200631c: 92 10 00 19 mov %i1, %o1
2006320: 81 c7 e0 08 ret
2006324: 81 e8 00 00 restore
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
2006328: 02 bf ff fc be 2006318 <echo+0x30>
200632c: 90 10 00 18 mov %i0, %o0
2006330: 80 a6 20 0a cmp %i0, 0xa
2006334: 02 bf ff f9 be 2006318 <echo+0x30>
2006338: 82 10 20 5e mov 0x5e, %g1
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
200633c: b0 1e 20 40 xor %i0, 0x40, %i0
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
2006340: c2 2f bf f8 stb %g1, [ %fp + -8 ]
echobuf[1] = c ^ 0x40;
2006344: f0 2f bf f9 stb %i0, [ %fp + -7 ]
rtems_termios_puts (echobuf, 2, tty);
2006348: 90 07 bf f8 add %fp, -8, %o0
200634c: 92 10 20 02 mov 2, %o1
2006350: 7f ff ff 2f call 200600c <rtems_termios_puts>
2006354: 94 10 00 19 mov %i1, %o2
tty->column += 2;
2006358: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
200635c: 82 00 60 02 add %g1, 2, %g1
2006360: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
2006364: 81 c7 e0 08 ret
2006368: 81 e8 00 00 restore
0202b968 <endgrent>:
void endgrent(void)
{
if (group_fp != NULL)
202b968: 03 00 81 ce sethi %hi(0x2073800), %g1
202b96c: d0 00 61 c8 ld [ %g1 + 0x1c8 ], %o0 ! 20739c8 <group_fp>
202b970: 80 a2 20 00 cmp %o0, 0
202b974: 02 80 00 05 be 202b988 <endgrent+0x20> <== NEVER TAKEN
202b978: 01 00 00 00 nop
fclose(group_fp);
202b97c: 82 13 c0 00 mov %o7, %g1
202b980: 40 00 6e ad call 2047434 <fclose>
202b984: 9e 10 40 00 mov %g1, %o7
202b988: 81 c3 e0 08 retl <== NOT EXECUTED
0202b7dc <endpwent>:
void endpwent(void)
{
if (passwd_fp != NULL)
202b7dc: 03 00 81 ce sethi %hi(0x2073800), %g1
202b7e0: d0 00 60 e8 ld [ %g1 + 0xe8 ], %o0 ! 20738e8 <passwd_fp>
202b7e4: 80 a2 20 00 cmp %o0, 0
202b7e8: 02 80 00 05 be 202b7fc <endpwent+0x20> <== NEVER TAKEN
202b7ec: 01 00 00 00 nop
fclose(passwd_fp);
202b7f0: 82 13 c0 00 mov %o7, %g1
202b7f4: 40 00 6f 10 call 2047434 <fclose>
202b7f8: 9e 10 40 00 mov %g1, %o7
202b7fc: 81 c3 e0 08 retl <== NOT EXECUTED
0200636c <erase>:
* 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)
{
200636c: 9d e3 bf a0 save %sp, -96, %sp
if (tty->ccount == 0)
2006370: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2006374: 80 a0 60 00 cmp %g1, 0
2006378: 02 80 00 37 be 2006454 <erase+0xe8>
200637c: ba 10 00 18 mov %i0, %i5
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2006380: c6 06 20 3c ld [ %i0 + 0x3c ], %g3
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
2006384: 80 a6 60 00 cmp %i1, 0
2006388: 12 80 00 35 bne 200645c <erase+0xf0>
200638c: 84 08 e0 08 and %g3, 8, %g2
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2006390: 31 00 80 6c sethi %hi(0x201b000), %i0
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
2006394: 37 00 80 6c sethi %hi(0x201b000), %i3
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2006398: 35 00 80 72 sethi %hi(0x201c800), %i2
rtems_termios_puts ("\b \b", 3, tty);
200639c: b0 16 22 a0 or %i0, 0x2a0, %i0
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
20063a0: 10 80 00 0d b 20063d4 <erase+0x68>
20063a4: b6 16 e2 98 or %i3, 0x298, %i3
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
20063a8: 12 80 00 6b bne 2006554 <erase+0x1e8> <== NOT EXECUTED
20063ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
20063b0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20063b4: 02 80 00 66 be 200654c <erase+0x1e0> <== NEVER TAKEN
20063b8: 01 00 00 00 nop
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
20063bc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
20063c0: 80 a0 60 00 cmp %g1, 0
20063c4: 02 80 00 62 be 200654c <erase+0x1e0>
20063c8: 01 00 00 00 nop
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
20063cc: c6 07 60 3c ld [ %i5 + 0x3c ], %g3
20063d0: 84 08 e0 08 and %g3, 8, %g2
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
20063d4: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
20063d8: 82 00 7f ff add %g1, -1, %g1
20063dc: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
if (tty->termios.c_lflag & ECHO) {
20063e0: 80 a0 a0 00 cmp %g2, 0
20063e4: 02 bf ff f3 be 20063b0 <erase+0x44> <== NEVER TAKEN
20063e8: f8 09 00 01 ldub [ %g4 + %g1 ], %i4
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
20063ec: 80 a6 60 00 cmp %i1, 0
20063f0: 12 80 00 05 bne 2006404 <erase+0x98>
20063f4: b8 0f 20 ff and %i4, 0xff, %i4
20063f8: 80 88 e0 10 btst 0x10, %g3
20063fc: 22 80 00 52 be,a 2006544 <erase+0x1d8> <== NEVER TAKEN
2006400: f0 0f 60 43 ldub [ %i5 + 0x43 ], %i0 <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
2006404: 80 a7 20 09 cmp %i4, 9
2006408: 02 80 00 25 be 200649c <erase+0x130>
200640c: b8 07 20 01 inc %i4
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
2006410: c2 06 a1 a0 ld [ %i2 + 0x1a0 ], %g1
2006414: c2 08 40 1c ldub [ %g1 + %i4 ], %g1
2006418: 80 88 60 20 btst 0x20, %g1
200641c: 12 bf ff e3 bne 20063a8 <erase+0x3c> <== NEVER TAKEN
2006420: 80 88 e2 00 btst 0x200, %g3
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);
2006424: 11 00 80 6c sethi %hi(0x201b000), %o0
2006428: 92 10 20 03 mov 3, %o1
200642c: 90 12 22 a0 or %o0, 0x2a0, %o0
2006430: 7f ff fe f7 call 200600c <rtems_termios_puts>
2006434: 94 10 00 1d mov %i5, %o2
if (tty->column)
2006438: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200643c: 80 a0 60 00 cmp %g1, 0
2006440: 02 bf ff dd be 20063b4 <erase+0x48> <== NEVER TAKEN
2006444: 80 a6 60 00 cmp %i1, 0
tty->column--;
2006448: 82 00 7f ff add %g1, -1, %g1
}
}
}
if (!lineFlag)
200644c: 12 bf ff dc bne 20063bc <erase+0x50>
2006450: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
2006454: 81 c7 e0 08 ret
2006458: 81 e8 00 00 restore
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
200645c: 84 88 e0 08 andcc %g3, 8, %g2
2006460: 22 bf ff fd be,a 2006454 <erase+0xe8> <== NEVER TAKEN
2006464: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
2006468: 80 88 e0 10 btst 0x10, %g3
200646c: 32 bf ff ca bne,a 2006394 <erase+0x28> <== ALWAYS TAKEN
2006470: 31 00 80 6c sethi %hi(0x201b000), %i0
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
2006474: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 ! 201b044 <IMFS_node_control_default+0x35c><== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
2006478: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
200647c: 7f ff ff 9b call 20062e8 <echo> <== NOT EXECUTED
2006480: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2006484: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
2006488: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
200648c: 02 bf ff f2 be 2006454 <erase+0xe8> <== NOT EXECUTED
2006490: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
echo ('\n', tty);
2006494: 7f ff ff 95 call 20062e8 <echo> <== NOT EXECUTED
2006498: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
200649c: 80 a0 60 00 cmp %g1, 0
20064a0: 02 80 00 17 be 20064fc <erase+0x190>
20064a4: f8 07 60 2c ld [ %i5 + 0x2c ], %i4
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
20064a8: da 06 a1 a0 ld [ %i2 + 0x1a0 ], %o5
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;
20064ac: 84 10 20 00 clr %g2
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)
20064b0: 10 80 00 07 b 20064cc <erase+0x160>
20064b4: 98 08 e2 00 and %g3, 0x200, %o4
20064b8: 32 80 00 02 bne,a 20064c0 <erase+0x154> <== NOT EXECUTED
20064bc: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
20064c0: 80 a0 40 02 cmp %g1, %g2
20064c4: 22 80 00 0f be,a 2006500 <erase+0x194> <== NEVER TAKEN
20064c8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
c = tty->cbuf[i++];
20064cc: c6 09 00 02 ldub [ %g4 + %g2 ], %g3
20064d0: 84 00 a0 01 inc %g2
if (c == '\t') {
20064d4: 80 a0 e0 09 cmp %g3, 9
20064d8: 02 80 00 18 be 2006538 <erase+0x1cc>
20064dc: 9e 03 40 03 add %o5, %g3, %o7
col = (col | 7) + 1;
} else if (iscntrl (c)) {
20064e0: de 0b e0 01 ldub [ %o7 + 1 ], %o7
20064e4: 80 8b e0 20 btst 0x20, %o7
20064e8: 12 bf ff f4 bne 20064b8 <erase+0x14c> <== NEVER TAKEN
20064ec: 80 a3 20 00 cmp %o4, 0
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
20064f0: 80 a0 40 02 cmp %g1, %g2
20064f4: 12 bf ff f6 bne 20064cc <erase+0x160>
20064f8: b8 07 20 01 inc %i4
}
/*
* Back up over the tab
*/
while (tty->column > col) {
20064fc: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2006500: 80 a7 00 01 cmp %i4, %g1
2006504: 16 bf ff ac bge 20063b4 <erase+0x48> <== NEVER TAKEN
2006508: 80 a6 60 00 cmp %i1, 0
rtems_termios_puts ("\b", 1, tty);
200650c: 90 10 00 1b mov %i3, %o0
2006510: 92 10 20 01 mov 1, %o1
2006514: 7f ff fe be call 200600c <rtems_termios_puts>
2006518: 94 10 00 1d mov %i5, %o2
tty->column--;
200651c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2006520: 82 00 7f ff add %g1, -1, %g1
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2006524: 80 a0 40 1c cmp %g1, %i4
2006528: 14 bf ff f9 bg 200650c <erase+0x1a0>
200652c: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2006530: 10 bf ff a1 b 20063b4 <erase+0x48>
2006534: 80 a6 60 00 cmp %i1, 0
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
2006538: b8 17 20 07 or %i4, 7, %i4
200653c: 10 bf ff e1 b 20064c0 <erase+0x154>
2006540: b8 07 20 01 inc %i4
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);
2006544: 7f ff ff 69 call 20062e8 <echo> <== NOT EXECUTED
2006548: 93 e8 00 1d restore %g0, %i5, %o1 <== NOT EXECUTED
200654c: 81 c7 e0 08 ret
2006550: 81 e8 00 00 restore
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2006554: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2006558: 7f ff fe ad call 200600c <rtems_termios_puts> <== NOT EXECUTED
200655c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
if (tty->column)
2006560: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
2006564: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006568: 22 80 00 05 be,a 200657c <erase+0x210> <== NOT EXECUTED
200656c: c2 06 a1 a0 ld [ %i2 + 0x1a0 ], %g1 <== NOT EXECUTED
tty->column--;
2006570: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2006574: c2 27 60 28 st %g1, [ %i5 + 0x28 ] <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
2006578: c2 06 a1 a0 ld [ %i2 + 0x1a0 ], %g1 <== NOT EXECUTED
200657c: c2 08 40 1c ldub [ %g1 + %i4 ], %g1 <== NOT EXECUTED
2006580: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2006584: 02 bf ff a9 be 2006428 <erase+0xbc> <== NOT EXECUTED
2006588: 11 00 80 6c sethi %hi(0x201b000), %o0 <== NOT EXECUTED
200658c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
2006590: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2006594: 12 bf ff a6 bne 200642c <erase+0xc0> <== NOT EXECUTED
2006598: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
200659c: 10 bf ff 86 b 20063b4 <erase+0x48> <== NOT EXECUTED
20065a0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
02028cf4 <fat_buf_access>:
#include "fat_fat_operations.h"
int
fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
rtems_bdbuf_buffer **buf)
{
2028cf4: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2028cf8: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1
2028cfc: 80 a0 60 00 cmp %g1, 0
2028d00: 22 80 00 5b be,a 2028e6c <fat_buf_access+0x178>
2028d04: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
2028d08: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2028d0c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
2028d10: 80 a0 80 01 cmp %g2, %g1
2028d14: 08 80 00 67 bleu 2028eb0 <fat_buf_access+0x1bc> <== ALWAYS TAKEN
2028d18: ba 10 20 00 clr %i5
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
2028d1c: 80 a6 40 01 cmp %i1, %g1
2028d20: 22 80 00 50 be,a 2028e60 <fat_buf_access+0x16c>
2028d24: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
{
if (fs_info->c.modified)
2028d28: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2028d2c: 80 a0 60 00 cmp %g1, 0
2028d30: 02 80 00 3a be 2028e18 <fat_buf_access+0x124>
2028d34: ba 8f 60 ff andcc %i5, 0xff, %i5
{
if (sec_of_fat && !fs_info->vol.mirror)
2028d38: 02 80 00 06 be 2028d50 <fat_buf_access+0x5c> <== ALWAYS TAKEN
2028d3c: 01 00 00 00 nop
2028d40: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
2028d44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2028d48: 22 80 00 62 be,a 2028ed0 <fat_buf_access+0x1dc> <== NOT EXECUTED
2028d4c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
2028d50: 7f ff 77 45 call 2006a64 <rtems_bdbuf_release_modified>
2028d54: d0 06 20 80 ld [ %i0 + 0x80 ], %o0
fs_info->c.state = FAT_CACHE_EMPTY;
2028d58: c0 2e 20 7d clrb [ %i0 + 0x7d ]
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
2028d5c: 80 a2 20 00 cmp %o0, 0
2028d60: 12 80 00 65 bne 2028ef4 <fat_buf_access+0x200> <== NEVER TAKEN
2028d64: c0 2e 20 7c clrb [ %i0 + 0x7c ]
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
2028d68: 80 a7 60 00 cmp %i5, 0
2028d6c: 22 80 00 31 be,a 2028e30 <fat_buf_access+0x13c> <== ALWAYS TAKEN
2028d70: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
2028d74: c2 0e 20 48 ldub [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
2028d78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2028d7c: 32 80 00 2d bne,a 2028e30 <fat_buf_access+0x13c> <== NOT EXECUTED
2028d80: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2028d84: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED
2028d88: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2028d8c: 08 80 00 28 bleu 2028e2c <fat_buf_access+0x138> <== NOT EXECUTED
2028d90: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
2028d94: 10 80 00 10 b 2028dd4 <fat_buf_access+0xe0> <== NOT EXECUTED
2028d98: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
2028d9c: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED
2028da0: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED
2028da4: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED
2028da8: 40 00 86 92 call 204a7f0 <memcpy> <== NOT EXECUTED
2028dac: ba 07 60 01 inc %i5 <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
2028db0: 7f ff 77 2d call 2006a64 <rtems_bdbuf_release_modified> <== NOT EXECUTED
2028db4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
2028db8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2028dbc: 12 80 00 11 bne 2028e00 <fat_buf_access+0x10c> <== NOT EXECUTED
2028dc0: 90 0f 60 ff and %i5, 0xff, %o0 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2028dc4: c2 0e 20 09 ldub [ %i0 + 9 ], %g1 <== NOT EXECUTED
2028dc8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2028dcc: 28 80 00 19 bleu,a 2028e30 <fat_buf_access+0x13c> <== NOT EXECUTED
2028dd0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
2028dd4: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED
2028dd8: 7f ff 68 42 call 2002ee0 <.umul> <== NOT EXECUTED
2028ddc: f8 06 20 58 ld [ %i0 + 0x58 ], %i4 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
2028de0: d2 06 20 78 ld [ %i0 + 0x78 ], %o1 <== NOT EXECUTED
2028de4: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
2028de8: 92 02 00 09 add %o0, %o1, %o1 <== NOT EXECUTED
2028dec: 7f ff 76 16 call 2006644 <rtems_bdbuf_get> <== NOT EXECUTED
2028df0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
2028df4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2028df8: 02 bf ff e9 be 2028d9c <fat_buf_access+0xa8> <== NOT EXECUTED
2028dfc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
2028e00: 40 00 79 3b call 20472ec <__errno> <== NOT EXECUTED
2028e04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028e08: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2028e0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2028e10: 81 c7 e0 08 ret <== NOT EXECUTED
2028e14: 81 e8 00 00 restore <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
2028e18: 7f ff 76 db call 2006984 <rtems_bdbuf_release>
2028e1c: d0 06 20 80 ld [ %i0 + 0x80 ], %o0
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
2028e20: 80 a2 20 00 cmp %o0, 0
2028e24: 12 80 00 34 bne 2028ef4 <fat_buf_access+0x200> <== NEVER TAKEN
2028e28: c0 2e 20 7d clrb [ %i0 + 0x7d ]
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
2028e2c: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
2028e30: 92 10 00 19 mov %i1, %o1
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
2028e34: 80 a6 a0 01 cmp %i2, 1
2028e38: 02 80 00 2b be 2028ee4 <fat_buf_access+0x1f0>
2028e3c: 94 06 20 80 add %i0, 0x80, %o2
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);
2028e40: 7f ff 76 01 call 2006644 <rtems_bdbuf_get>
2028e44: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
2028e48: 80 a2 20 00 cmp %o0, 0
2028e4c: 12 80 00 2a bne 2028ef4 <fat_buf_access+0x200> <== NEVER TAKEN
2028e50: 82 10 20 01 mov 1, %g1
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = blk;
2028e54: f2 26 20 78 st %i1, [ %i0 + 0x78 ]
fs_info->c.state = FAT_CACHE_ACTUAL;
2028e58: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ]
}
*buf = fs_info->c.buf;
2028e5c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2028e60: c2 26 c0 00 st %g1, [ %i3 ]
return RC_OK;
}
2028e64: 81 c7 e0 08 ret
2028e68: 91 e8 20 00 restore %g0, 0, %o0
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
2028e6c: 92 10 00 19 mov %i1, %o1
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
2028e70: 80 a6 a0 01 cmp %i2, 1
2028e74: 02 80 00 13 be 2028ec0 <fat_buf_access+0x1cc>
2028e78: 94 06 20 80 add %i0, 0x80, %o2
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);
2028e7c: 7f ff 75 f2 call 2006644 <rtems_bdbuf_get>
2028e80: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
2028e84: 80 a2 20 00 cmp %o0, 0
2028e88: 12 80 00 1b bne 2028ef4 <fat_buf_access+0x200> <== NEVER TAKEN
2028e8c: 82 10 20 01 mov 1, %g1
fs_info->c.blk_num = blk;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2028e90: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
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 = blk;
2028e94: f2 26 20 78 st %i1, [ %i0 + 0x78 ]
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
2028e98: c2 2e 20 7d stb %g1, [ %i0 + 0x7d ]
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 = blk;
fs_info->c.modified = 0;
2028e9c: c0 2e 20 7c clrb [ %i0 + 0x7c ]
fs_info->c.state = FAT_CACHE_ACTUAL;
2028ea0: 82 10 00 19 mov %i1, %g1
}
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2028ea4: 80 a0 80 01 cmp %g2, %g1
2028ea8: 18 bf ff 9d bgu 2028d1c <fat_buf_access+0x28> <== NEVER TAKEN
2028eac: ba 10 20 00 clr %i5
2028eb0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
2028eb4: 80 a0 40 02 cmp %g1, %g2
2028eb8: 10 bf ff 99 b 2028d1c <fat_buf_access+0x28>
2028ebc: ba 40 20 00 addx %g0, 0, %i5
if (fs_info->c.state == FAT_CACHE_EMPTY)
{
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
2028ec0: 7f ff 76 0c call 20066f0 <rtems_bdbuf_read>
2028ec4: 01 00 00 00 nop
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
2028ec8: 10 bf ff f0 b 2028e88 <fat_buf_access+0x194>
2028ecc: 80 a2 20 00 cmp %o0, 0
if (fs_info->c.blk_num != blk)
{
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
2028ed0: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED
2028ed4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
2028ed8: 40 00 86 46 call 204a7f0 <memcpy> <== NOT EXECUTED
2028edc: d4 16 00 00 lduh [ %i0 ], %o2 <== NOT EXECUTED
2028ee0: 30 bf ff 9c b,a 2028d50 <fat_buf_access+0x5c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
2028ee4: 7f ff 76 03 call 20066f0 <rtems_bdbuf_read>
2028ee8: 01 00 00 00 nop
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
2028eec: 10 bf ff d8 b 2028e4c <fat_buf_access+0x158>
2028ef0: 80 a2 20 00 cmp %o0, 0
rtems_set_errno_and_return_minus_one(EIO);
2028ef4: 40 00 78 fe call 20472ec <__errno> <== NOT EXECUTED
2028ef8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028efc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2028f00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2028f04: 81 c7 e0 08 ret <== NOT EXECUTED
2028f08: 81 e8 00 00 restore <== NOT EXECUTED
02028f0c <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
2028f0c: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2028f10: c2 0e 20 7d ldub [ %i0 + 0x7d ], %g1
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
2028f14: ba 10 00 18 mov %i0, %i5
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
2028f18: 80 a0 60 00 cmp %g1, 0
2028f1c: 02 80 00 42 be 2029024 <fat_buf_release+0x118>
2028f20: b0 10 20 00 clr %i0
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
2028f24: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
2028f28: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2
2028f2c: 80 a0 40 02 cmp %g1, %g2
2028f30: 0a 80 00 05 bcs 2028f44 <fat_buf_release+0x38> <== NEVER TAKEN
2028f34: b8 10 20 00 clr %i4
*buf = fs_info->c.buf;
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
2028f38: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
2028f3c: 80 a0 40 02 cmp %g1, %g2
2028f40: b8 40 20 00 addx %g0, 0, %i4
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
2028f44: c2 0f 60 7c ldub [ %i5 + 0x7c ], %g1
2028f48: 80 a0 60 00 cmp %g1, 0
2028f4c: 02 80 00 38 be 202902c <fat_buf_release+0x120>
2028f50: b8 8f 20 ff andcc %i4, 0xff, %i4
{
if (sec_of_fat && !fs_info->vol.mirror)
2028f54: 02 80 00 06 be 2028f6c <fat_buf_release+0x60>
2028f58: 01 00 00 00 nop
2028f5c: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1
2028f60: 80 a0 60 00 cmp %g1, 0
2028f64: 22 80 00 3a be,a 202904c <fat_buf_release+0x140> <== ALWAYS TAKEN
2028f68: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
2028f6c: 7f ff 76 be call 2006a64 <rtems_bdbuf_release_modified>
2028f70: d0 07 60 80 ld [ %i5 + 0x80 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2028f74: 80 a2 20 00 cmp %o0, 0
2028f78: 12 80 00 3a bne 2029060 <fat_buf_release+0x154> <== NEVER TAKEN
2028f7c: 80 a7 20 00 cmp %i4, 0
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
2028f80: 02 80 00 30 be 2029040 <fat_buf_release+0x134>
2028f84: c0 2f 60 7c clrb [ %i5 + 0x7c ]
2028f88: c2 0f 60 48 ldub [ %i5 + 0x48 ], %g1
2028f8c: 80 a0 60 00 cmp %g1, 0
2028f90: 32 80 00 2d bne,a 2029044 <fat_buf_release+0x138> <== NEVER TAKEN
2028f94: c0 2f 60 7d clrb [ %i5 + 0x7d ] <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2028f98: c2 0f 60 09 ldub [ %i5 + 9 ], %g1
2028f9c: 80 a0 60 01 cmp %g1, 1
2028fa0: 08 80 00 28 bleu 2029040 <fat_buf_release+0x134> <== NEVER TAKEN
2028fa4: b8 10 20 01 mov 1, %i4
2028fa8: 10 80 00 10 b 2028fe8 <fat_buf_release+0xdc>
2028fac: 90 10 20 01 mov 1, %o0
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
2028fb0: d2 07 60 84 ld [ %i5 + 0x84 ], %o1
2028fb4: d4 17 40 00 lduh [ %i5 ], %o2
2028fb8: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
2028fbc: 40 00 86 0d call 204a7f0 <memcpy>
2028fc0: b8 07 20 01 inc %i4
sc = rtems_bdbuf_release_modified(b);
2028fc4: 7f ff 76 a8 call 2006a64 <rtems_bdbuf_release_modified>
2028fc8: d0 07 bf fc ld [ %fp + -4 ], %o0
if ( sc != RTEMS_SUCCESSFUL)
2028fcc: 80 a2 20 00 cmp %o0, 0
2028fd0: 12 80 00 11 bne 2029014 <fat_buf_release+0x108> <== NEVER TAKEN
2028fd4: 90 0f 20 ff and %i4, 0xff, %o0
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2028fd8: c2 0f 60 09 ldub [ %i5 + 9 ], %g1
2028fdc: 80 a2 00 01 cmp %o0, %g1
2028fe0: 3a 80 00 19 bcc,a 2029044 <fat_buf_release+0x138> <== ALWAYS TAKEN
2028fe4: c0 2f 60 7d clrb [ %i5 + 0x7d ]
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
2028fe8: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
2028fec: 7f ff 67 bd call 2002ee0 <.umul>
2028ff0: f6 07 60 58 ld [ %i5 + 0x58 ], %i3
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dd,
2028ff4: d2 07 60 78 ld [ %i5 + 0x78 ], %o1
2028ff8: 94 07 bf fc add %fp, -4, %o2
2028ffc: 92 02 00 09 add %o0, %o1, %o1
2029000: 7f ff 75 91 call 2006644 <rtems_bdbuf_get>
2029004: 90 10 00 1b mov %i3, %o0
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
2029008: 80 a2 20 00 cmp %o0, 0
202900c: 02 bf ff e9 be 2028fb0 <fat_buf_release+0xa4> <== ALWAYS TAKEN
2029010: c2 07 bf fc ld [ %fp + -4 ], %g1
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(b);
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
2029014: 40 00 78 b6 call 20472ec <__errno> <== NOT EXECUTED
2029018: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202901c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2029020: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029024: 81 c7 e0 08 ret
2029028: 81 e8 00 00 restore
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
202902c: 7f ff 76 56 call 2006984 <rtems_bdbuf_release>
2029030: d0 07 60 80 ld [ %i5 + 0x80 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2029034: 80 a2 20 00 cmp %o0, 0
2029038: 12 80 00 0a bne 2029060 <fat_buf_release+0x154> <== NEVER TAKEN
202903c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
2029040: c0 2f 60 7d clrb [ %i5 + 0x7d ]
return RC_OK;
}
2029044: 81 c7 e0 08 ret
2029048: 91 e8 20 00 restore %g0, 0, %o0
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
{
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
202904c: d0 07 60 84 ld [ %i5 + 0x84 ], %o0
2029050: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
2029054: 40 00 85 e7 call 204a7f0 <memcpy>
2029058: d4 17 40 00 lduh [ %i5 ], %o2
202905c: 30 bf ff c4 b,a 2028f6c <fat_buf_release+0x60>
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
2029060: 40 00 78 a3 call 20472ec <__errno> <== NOT EXECUTED
2029064: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2029068: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
202906c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029070: 81 c7 e0 08 ret <== NOT EXECUTED
2029074: 81 e8 00 00 restore <== NOT EXECUTED
020291cc <fat_cluster_read>:
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
20291cc: 98 10 00 0a mov %o2, %o4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20291d0: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
20291d4: 12 80 00 06 bne 20291ec <fat_cluster_read+0x20> <== NOT EXECUTED
20291d8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED
20291dc: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
20291e0: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
20291e4: 32 80 00 0e bne,a 202921c <fat_cluster_read+0x50> <== NOT EXECUTED
20291e8: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20291ec: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
20291f0: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 <== NOT EXECUTED
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
20291f4: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
20291f8: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
20291fc: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
2029200: 94 10 20 00 clr %o2 <== NOT EXECUTED
2029204: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2029208: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
202920c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2029210: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2029214: 7f ff ff 99 call 2029078 <_fat_block_read> <== NOT EXECUTED
2029218: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
202921c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2029220: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_read(mt_entry, fsec, 0,
2029224: 94 10 20 00 clr %o2 <== NOT EXECUTED
2029228: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
202922c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2029230: 7f ff ff 92 call 2029078 <_fat_block_read> <== NOT EXECUTED
2029234: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02029238 <fat_cluster_write>:
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
2029238: 98 10 00 0a mov %o2, %o4
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
202923c: 80 a2 60 00 cmp %o1, 0
2029240: 12 80 00 06 bne 2029258 <fat_cluster_write+0x20> <== ALWAYS TAKEN
2029244: c2 02 20 20 ld [ %o0 + 0x20 ], %g1
2029248: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
202924c: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2029250: 32 80 00 0e bne,a 2029288 <fat_cluster_write+0x50> <== NOT EXECUTED
2029254: d6 08 60 04 ldub [ %g1 + 4 ], %o3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2029258: c6 08 60 05 ldub [ %g1 + 5 ], %g3
202925c: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
2029260: d6 08 60 04 ldub [ %g1 + 4 ], %o3
2029264: c2 08 60 02 ldub [ %g1 + 2 ], %g1
2029268: 92 02 7f fe add %o1, -2, %o1
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
202926c: 94 10 20 00 clr %o2
2029270: 93 2a 40 03 sll %o1, %g3, %o1
2029274: 97 2a c0 01 sll %o3, %g1, %o3
2029278: 92 02 40 02 add %o1, %g2, %o1
202927c: 82 13 c0 00 mov %o7, %g1
2029280: 7f ff ff a0 call 2029100 <_fat_block_write>
2029284: 9e 10 40 00 mov %g1, %o7
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
2029288: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
202928c: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t fsec = 0;
fsec = fat_cluster_num_to_sector_num(mt_entry, cln);
return _fat_block_write(mt_entry, fsec, 0,
2029290: 94 10 20 00 clr %o2 <== NOT EXECUTED
2029294: 97 2a c0 01 sll %o3, %g1, %o3 <== NOT EXECUTED
2029298: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
202929c: 7f ff ff 99 call 2029100 <_fat_block_write> <== NOT EXECUTED
20292a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
020294b4 <fat_fat32_update_fsinfo_sector>:
fat_fat32_update_fsinfo_sector(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t free_count,
uint32_t next_free
)
{
20294b4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
20294b8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== NOT EXECUTED
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
20294bc: 87 2e 60 18 sll %i1, 0x18, %g3 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
20294c0: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
20294c4: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
20294c8: 83 36 60 08 srl %i1, 8, %g1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
20294cc: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
20294d0: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
20294d4: 87 2e a0 18 sll %i2, 0x18, %g3 <== NOT EXECUTED
20294d8: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
20294dc: b3 36 60 10 srl %i1, 0x10, %i1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
20294e0: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
20294e4: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
20294e8: 83 36 a0 18 srl %i2, 0x18, %g1 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
20294ec: b3 2e 60 08 sll %i1, 8, %i1 <== NOT EXECUTED
20294f0: 82 10 c0 01 or %g3, %g1, %g1 <== NOT EXECUTED
20294f4: 84 10 80 19 or %g2, %i1, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
20294f8: 89 36 a0 08 srl %i2, 8, %g4 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
20294fc: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
2029500: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2029504: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2029508: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
202950c: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
2029510: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
2029514: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
2029518: 94 10 21 e8 mov 0x1e8, %o2 <== NOT EXECUTED
202951c: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
2029520: 98 07 bf f8 add %fp, -8, %o4 <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_free_count = 0;
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
2029524: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
2029528: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
ret1 = _fat_block_write(mt_entry,
202952c: 7f ff fe f5 call 2029100 <_fat_block_write> <== NOT EXECUTED
2029530: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
2029534: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
uint32_t le_next_free = 0;
le_free_count = CT_LE_L(free_count);
le_next_free = CT_LE_L(next_free);
ret1 = _fat_block_write(mt_entry,
2029538: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
4,
(char *)(&le_free_count));
ret2 = _fat_block_write(mt_entry,
202953c: 94 10 21 ec mov 0x1ec, %o2 <== NOT EXECUTED
2029540: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2029544: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
2029548: 7f ff fe ee call 2029100 <_fat_block_write> <== NOT EXECUTED
202954c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
fs_info->vol.info_sec,
FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET,
4,
(char *)(&le_next_free));
if ( (ret1 < 0) || (ret2 < 0) )
2029550: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2029554: 06 80 00 06 bl 202956c <fat_fat32_update_fsinfo_sector+0xb8><== NOT EXECUTED
2029558: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
202955c: 06 80 00 04 bl 202956c <fat_fat32_update_fsinfo_sector+0xb8><== NOT EXECUTED
2029560: b0 10 20 00 clr %i0 <== NOT EXECUTED
return -1;
return RC_OK;
}
2029564: 81 c7 e0 08 ret <== NOT EXECUTED
2029568: 81 e8 00 00 restore <== NOT EXECUTED
202956c: 81 c7 e0 08 ret <== NOT EXECUTED
2029570: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02028470 <fat_file_close>:
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2028470: 9d e3 bf a0 save %sp, -96, %sp
/*
* 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)
2028474: c2 06 60 08 ld [ %i1 + 8 ], %g1
2028478: 80 a0 60 01 cmp %g1, 1
202847c: 08 80 00 07 bleu 2028498 <fat_file_close+0x28>
2028480: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
{
fat_fd->links_num--;
2028484: 82 00 7f ff add %g1, -1, %g1
return rc;
2028488: 90 10 20 00 clr %o0
* 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)
{
fat_fd->links_num--;
202848c: c2 26 60 08 st %g1, [ %i1 + 8 ]
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
return rc;
}
2028490: 81 c7 e0 08 ret
2028494: 91 e8 00 08 restore %g0, %o0, %o0
return rc;
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
2028498: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
202849c: 80 88 60 01 btst 1, %g1
20284a0: 22 80 00 16 be,a 20284f8 <fat_file_close+0x88>
20284a4: d2 06 60 0c ld [ %i1 + 0xc ], %o1
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
20284a8: 90 10 00 18 mov %i0, %o0
20284ac: 92 10 00 19 mov %i1, %o1
20284b0: 7f ff ff ac call 2028360 <fat_file_truncate>
20284b4: 94 10 20 00 clr %o2
if ( rc != RC_OK )
20284b8: 80 a2 20 00 cmp %o0, 0
20284bc: 12 bf ff f5 bne 2028490 <fat_file_close+0x20> <== NEVER TAKEN
20284c0: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
20284c4: 7f ff 99 12 call 200e90c <_Chain_Extract>
20284c8: 90 10 00 19 mov %i1, %o0
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
20284cc: d2 06 60 0c ld [ %i1 + 0xc ], %o1
20284d0: 40 00 03 f4 call 20294a0 <fat_ino_is_unique>
20284d4: 90 10 00 18 mov %i0, %o0
20284d8: 80 8a 20 ff btst 0xff, %o0
20284dc: 32 80 00 13 bne,a 2028528 <fat_file_close+0xb8> <== NEVER TAKEN
20284e0: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
20284e4: 90 10 00 19 mov %i1, %o0
20284e8: 7f ff 82 3f call 2008de4 <free>
20284ec: b0 10 00 1d mov %i5, %i0
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
20284f0: 40 00 02 87 call 2028f0c <fat_buf_release>
20284f4: 81 e8 00 00 restore
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
20284f8: 40 00 03 ea call 20294a0 <fat_ino_is_unique>
20284fc: 90 10 00 18 mov %i0, %o0
2028500: 80 8a 20 ff btst 0xff, %o0
2028504: 02 80 00 05 be 2028518 <fat_file_close+0xa8> <== ALWAYS TAKEN
2028508: 01 00 00 00 nop
{
fat_fd->links_num = 0;
202850c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
2028510: 40 00 02 7f call 2028f0c <fat_buf_release> <== NOT EXECUTED
2028514: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
2028518: 7f ff 98 fd call 200e90c <_Chain_Extract>
202851c: 90 10 00 19 mov %i1, %o0
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
2028520: 10 bf ff f2 b 20284e8 <fat_file_close+0x78>
2028524: 90 10 00 19 mov %i1, %o0
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(mt_entry, fat_fd->ino) )
fat_free_unique_ino(mt_entry, fat_fd->ino);
2028528: 40 00 03 d0 call 2029468 <fat_free_unique_ino> <== NOT EXECUTED
202852c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
2028530: 10 bf ff ee b 20284e8 <fat_file_close+0x78> <== NOT EXECUTED
2028534: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
02028b0c <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2028b0c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2028b10: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
2028b14: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== NOT EXECUTED
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2028b18: c4 27 bf f8 st %g2, [ %fp + -8 ] <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
2028b1c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
return RC_OK;
2028b20: b4 10 20 00 clr %i2 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
2028b24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2028b28: 12 80 00 04 bne 2028b38 <fat_file_datasync+0x2c> <== NOT EXECUTED
2028b2c: f8 06 20 20 ld [ %i0 + 0x20 ], %i4 <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
2028b30: 81 c7 e0 08 ret <== NOT EXECUTED
2028b34: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED
/*
* we can use only one bdbuf :( and we also know that cache is useless
* for sync operation, so don't use it
*/
rc = fat_buf_release(fs_info);
2028b38: 40 00 00 f5 call 2028f0c <fat_buf_release> <== NOT EXECUTED
2028b3c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rc != RC_OK)
2028b40: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2028b44: 12 bf ff fb bne 2028b30 <fat_file_datasync+0x24> <== NOT EXECUTED
2028b48: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
return rc;
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2028b4c: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
2028b50: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED
2028b54: 84 0a 40 02 and %o1, %g2, %g2 <== NOT EXECUTED
2028b58: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2028b5c: 1a bf ff f5 bcc 2028b30 <fat_file_datasync+0x24> <== NOT EXECUTED
2028b60: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2028b64: 02 80 00 23 be 2028bf0 <fat_file_datasync+0xe4> <== NOT EXECUTED
2028b68: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2028b6c: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED
2028b70: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
2028b74: b6 02 7f fe add %o1, -2, %i3 <== NOT EXECUTED
2028b78: b7 2e c0 02 sll %i3, %g2, %i3 <== NOT EXECUTED
2028b7c: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
2028b80: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED
2028b84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2028b88: 02 80 00 20 be 2028c08 <fat_file_datasync+0xfc> <== NOT EXECUTED
2028b8c: ba 10 20 00 clr %i5 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block);
2028b90: 10 80 00 0c b 2028bc0 <fat_file_datasync+0xb4> <== NOT EXECUTED
2028b94: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
2028b98: 7f ff 77 d5 call 2006aec <rtems_bdbuf_sync> <== NOT EXECUTED
2028b9c: ba 07 60 01 inc %i5 <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
2028ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2028ba4: 12 80 00 0d bne 2028bd8 <fat_file_datasync+0xcc> <== NOT EXECUTED
2028ba8: 01 00 00 00 nop <== NOT EXECUTED
/* for each cluster of the file ... */
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
/* for each sector in cluster ... */
for ( i = 0; i < fs_info->vol.spc; i++ )
2028bac: c2 0f 20 04 ldub [ %i4 + 4 ], %g1 <== NOT EXECUTED
2028bb0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
2028bb4: 08 80 00 15 bleu 2028c08 <fat_file_datasync+0xfc> <== NOT EXECUTED
2028bb8: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dd, (sec + i), &block);
2028bbc: d0 07 20 58 ld [ %i4 + 0x58 ], %o0 <== NOT EXECUTED
2028bc0: 92 07 40 1b add %i5, %i3, %o1 <== NOT EXECUTED
2028bc4: 7f ff 76 cb call 20066f0 <rtems_bdbuf_read> <== NOT EXECUTED
2028bc8: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2028bcc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2028bd0: 02 bf ff f2 be 2028b98 <fat_file_datasync+0x8c> <== NOT EXECUTED
2028bd4: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
2028bd8: 40 00 79 c5 call 20472ec <__errno> <== NOT EXECUTED
2028bdc: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED
2028be0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2028be4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
2028be8: 81 c7 e0 08 ret <== NOT EXECUTED
2028bec: 91 e8 00 1a restore %g0, %i2, %o0 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2028bf0: c4 08 60 0a ldub [ %g1 + 0xa ], %g2 <== NOT EXECUTED
2028bf4: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2028bf8: 22 bf ff de be,a 2028b70 <fat_file_datasync+0x64> <== NOT EXECUTED
2028bfc: c4 08 60 05 ldub [ %g1 + 5 ], %g2 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2028c00: 10 bf ff e0 b 2028b80 <fat_file_datasync+0x74> <== NOT EXECUTED
2028c04: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2028c08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2028c0c: 40 00 67 69 call 20429b0 <fat_get_fat_cluster> <== NOT EXECUTED
2028c10: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2028c14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2028c18: 02 bf ff cd be 2028b4c <fat_file_datasync+0x40> <== NOT EXECUTED
2028c1c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
sc = rtems_bdbuf_sync(block);
if ( sc != RTEMS_SUCCESSFUL )
rtems_set_errno_and_return_minus_one( EIO );
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2028c20: 10 bf ff c4 b 2028b30 <fat_file_datasync+0x24> <== NOT EXECUTED
2028c24: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
02028614 <fat_file_extend>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
2028614: 9d e3 bf 90 save %sp, -112, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2028618: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
uint32_t old_last_cl;
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
202861c: f4 26 c0 00 st %i2, [ %i3 ]
if (new_length <= fat_fd->fat_file_size)
2028620: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
uint32_t *a_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t chain = 0;
2028624: c0 27 bf f0 clr [ %fp + -16 ]
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
2028628: c0 27 bf f8 clr [ %fp + -8 ]
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
202862c: ba 10 00 18 mov %i0, %i5
uint32_t bytes_remain = 0;
uint32_t cls_added;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
2028630: 80 a6 80 01 cmp %i2, %g1
2028634: 08 80 00 3d bleu 2028728 <fat_file_extend+0x114>
2028638: b0 10 20 00 clr %i0
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
202863c: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
2028640: 80 a0 a0 01 cmp %g2, 1
2028644: 22 80 00 3b be,a 2028730 <fat_file_extend+0x11c> <== NEVER TAKEN
2028648: c4 06 60 24 ld [ %i1 + 0x24 ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
202864c: c6 17 20 06 lduh [ %i4 + 6 ], %g3
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
2028650: a4 26 80 01 sub %i2, %g1, %l2
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))) &
2028654: 84 00 ff ff add %g3, -1, %g2
2028658: a0 08 80 01 and %g2, %g1, %l0
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 -
202865c: a0 20 c0 10 sub %g3, %l0, %l0
2028660: a0 0c 00 02 and %l0, %g2, %l0
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
if (bytes2add > bytes_remain)
2028664: 80 a4 00 12 cmp %l0, %l2
2028668: 1a 80 00 30 bcc 2028728 <fat_file_extend+0x114>
202866c: b0 10 20 00 clr %i0
/*
* 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)
2028670: a4 a4 80 10 subcc %l2, %l0, %l2
2028674: 02 80 00 2d be 2028728 <fat_file_extend+0x114> <== NEVER TAKEN
2028678: a2 04 bf ff add %l2, -1, %l1
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
202867c: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2028680: 90 10 00 1d mov %i5, %o0
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
2028684: a3 34 40 01 srl %l1, %g1, %l1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2028688: 92 07 bf f0 add %fp, -16, %o1
* file ) - return
*/
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
202868c: a2 04 60 01 inc %l1
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
2028690: 96 07 bf fc add %fp, -4, %o3
2028694: 94 10 00 11 mov %l1, %o2
2028698: 40 00 6a 49 call 2042fbc <fat_scan_fat_for_free_clusters>
202869c: 98 07 bf f8 add %fp, -8, %o4
&cls_added, &last_cl);
/* this means that low level I/O error occured */
if (rc != RC_OK)
20286a0: b0 92 20 00 orcc %o0, 0, %i0
20286a4: 12 80 00 21 bne 2028728 <fat_file_extend+0x114> <== NEVER TAKEN
20286a8: c2 07 bf fc ld [ %fp + -4 ], %g1
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
20286ac: 80 94 00 01 orcc %l0, %g1, %g0
20286b0: 02 80 00 27 be 202874c <fat_file_extend+0x138> <== NEVER TAKEN
20286b4: 80 a4 40 01 cmp %l1, %g1
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
20286b8: 02 80 00 0b be 20286e4 <fat_file_extend+0xd0> <== ALWAYS TAKEN
20286bc: 88 38 00 01 xnor %g0, %g1, %g4
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20286c0: c4 0f 20 08 ldub [ %i4 + 8 ], %g2 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
20286c4: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
20286c8: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20286cc: a2 01 00 11 add %g4, %l1, %l1 <== NOT EXECUTED
(bytes2add & (fs_info->vol.bpc - 1));
20286d0: a4 0c 80 03 and %l2, %g3, %l2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20286d4: a3 2c 40 02 sll %l1, %g2, %l1 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
20286d8: a2 26 80 11 sub %i2, %l1, %l1 <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
20286dc: a4 24 40 12 sub %l1, %l2, %l2 <== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
*a_length = new_length -
20286e0: e4 26 c0 00 st %l2, [ %i3 ] <== NOT EXECUTED
((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
20286e4: d6 06 60 18 ld [ %i1 + 0x18 ], %o3
20286e8: 80 a2 e0 00 cmp %o3, 0
20286ec: 32 80 00 1e bne,a 2028764 <fat_file_extend+0x150>
20286f0: d2 06 60 3c ld [ %i1 + 0x3c ], %o1
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
20286f4: c4 07 bf f0 ld [ %fp + -16 ], %g2
fat_fd->map.file_cln = 0;
20286f8: c0 26 60 34 clr [ %i1 + 0x34 ]
(bytes2add & (fs_info->vol.bpc - 1));
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
20286fc: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
2028700: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
}
fat_buf_release(fs_info);
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
2028704: 80 a0 60 00 cmp %g1, 0
2028708: 22 80 00 08 be,a 2028728 <fat_file_extend+0x114> <== NEVER TAKEN
202870c: f4 26 60 18 st %i2, [ %i1 + 0x18 ] <== NOT EXECUTED
{
fat_fd->map.last_cln = last_cl;
2028710: c4 07 bf f8 ld [ %fp + -8 ], %g2
if (fat_fd->fat_file_type == FAT_DIRECTORY)
2028714: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
2028718: 80 a0 60 00 cmp %g1, 0
202871c: 02 80 00 20 be 202879c <fat_file_extend+0x188>
2028720: c4 26 60 3c st %g2, [ %i1 + 0x3c ]
return rc;
}
}
}
fat_fd->fat_file_size = new_length;
2028724: f4 26 60 18 st %i2, [ %i1 + 0x18 ]
return RC_OK;
}
2028728: 81 c7 e0 08 ret
202872c: 81 e8 00 00 restore
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028730: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2028734: 32 bf ff c7 bne,a 2028650 <fat_file_extend+0x3c> <== NOT EXECUTED
2028738: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
202873c: c4 0f 20 0a ldub [ %i4 + 0xa ], %g2 <== NOT EXECUTED
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028740: 80 88 a0 03 btst 3, %g2 <== NOT EXECUTED
2028744: 22 bf ff c3 be,a 2028650 <fat_file_extend+0x3c> <== NOT EXECUTED
2028748: c6 17 20 06 lduh [ %i4 + 6 ], %g3 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
rtems_set_errno_and_return_minus_one(ENOSPC);
202874c: 40 00 7a e8 call 20472ec <__errno> <== NOT EXECUTED
2028750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028754: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
2028758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
202875c: 81 c7 e0 08 ret <== NOT EXECUTED
2028760: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln = chain;
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
2028764: 80 a2 7f ff cmp %o1, -1
2028768: 22 80 00 19 be,a 20287cc <fat_file_extend+0x1b8> <== NEVER TAKEN
202876c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
2028770: d2 27 bf f4 st %o1, [ %fp + -12 ]
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
2028774: d4 07 bf f0 ld [ %fp + -16 ], %o2
2028778: 40 00 69 16 call 2042bd0 <fat_set_fat_cluster>
202877c: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
2028780: 82 92 20 00 orcc %o0, 0, %g1
2028784: 12 80 00 0d bne 20287b8 <fat_file_extend+0x1a4> <== NEVER TAKEN
2028788: d2 07 bf f0 ld [ %fp + -16 ], %o1
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
202878c: 40 00 01 e0 call 2028f0c <fat_buf_release>
2028790: 90 10 00 1c mov %i4, %o0
2028794: 10 bf ff dc b 2028704 <fat_file_extend+0xf0>
2028798: c2 07 bf fc ld [ %fp + -4 ], %g1
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
202879c: d2 07 bf f0 ld [ %fp + -16 ], %o1
20287a0: 40 00 02 c1 call 20292a4 <fat_init_clusters_chain>
20287a4: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
20287a8: 82 92 20 00 orcc %o0, 0, %g1
20287ac: 22 bf ff df be,a 2028728 <fat_file_extend+0x114> <== ALWAYS TAKEN
20287b0: f4 26 60 18 st %i2, [ %i1 + 0x18 ]
{
fat_free_fat_clusters_chain(mt_entry, chain);
20287b4: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED
20287b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20287bc: 40 00 69 c7 call 2042ed8 <fat_free_fat_clusters_chain> <== NOT EXECUTED
20287c0: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
20287c4: 81 c7 e0 08 ret <== NOT EXECUTED
20287c8: 81 e8 00 00 restore <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
20287cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20287d0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20287d4: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED
20287d8: 7f ff ff 58 call 2028538 <fat_file_ioctl> <== NOT EXECUTED
20287dc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
20287e0: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
20287e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20287e8: 02 bf ff e3 be 2028774 <fat_file_extend+0x160> <== NOT EXECUTED
20287ec: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(mt_entry, chain);
if ( rc != RC_OK )
{
fat_free_fat_clusters_chain(mt_entry, chain);
20287f0: 10 bf ff f2 b 20287b8 <fat_file_extend+0x1a4> <== NOT EXECUTED
20287f4: d2 07 bf f0 ld [ %fp + -16 ], %o1 <== NOT EXECUTED
02028538 <fat_file_ioctl>:
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
2028538: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
202853c: 82 07 a0 50 add %fp, 0x50, %g1
2028540: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2028544: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2028548: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int cmd,
...)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
202854c: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
2028550: c2 27 bf fc st %g1, [ %fp + -4 ]
switch (cmd)
2028554: 80 a6 a0 01 cmp %i2, 1
2028558: 02 80 00 08 be 2028578 <fat_file_ioctl+0x40> <== ALWAYS TAKEN
202855c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3
*ret = cur_cln;
break;
default:
errno = EINVAL;
2028560: 40 00 7b 63 call 20472ec <__errno> <== NOT EXECUTED
2028564: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028568: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
202856c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rc = -1;
break;
}
va_end(ap);
return rc;
}
2028570: 81 c7 e0 08 ret <== NOT EXECUTED
2028574: 81 e8 00 00 restore <== NOT EXECUTED
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 ) {
2028578: c8 06 60 18 ld [ %i1 + 0x18 ], %g4
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
ret = va_arg(ap, uint32_t *);
202857c: ba 07 a0 58 add %fp, 0x58, %i5
2028580: fa 27 bf fc st %i5, [ %fp + -4 ]
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
2028584: 84 10 00 1b mov %i3, %g2
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
2028588: 80 a6 c0 04 cmp %i3, %g4
202858c: 1a 80 00 1c bcc 20285fc <fat_file_ioctl+0xc4> <== NEVER TAKEN
2028590: ba 10 00 1c mov %i4, %i5
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028594: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2028598: 80 a0 60 01 cmp %g1, 1
202859c: 22 80 00 0e be,a 20285d4 <fat_file_ioctl+0x9c>
20285a0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
20285a4: d4 08 e0 08 ldub [ %g3 + 8 ], %o2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
20285a8: 90 10 00 18 mov %i0, %o0
20285ac: 92 10 00 19 mov %i1, %o1
20285b0: 95 30 80 0a srl %g2, %o2, %o2
20285b4: 7f ff fe 0b call 2027de0 <fat_file_lseek>
20285b8: 96 07 bf f8 add %fp, -8, %o3
if ( rc != RC_OK )
20285bc: b0 92 60 00 orcc %o1, 0, %i0
20285c0: 12 bf ff ec bne 2028570 <fat_file_ioctl+0x38> <== NEVER TAKEN
20285c4: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
*ret = cur_cln;
20285c8: c2 27 40 00 st %g1, [ %i5 ]
break;
20285cc: 81 c7 e0 08 ret
20285d0: 81 e8 00 00 restore
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)) &&
20285d4: 80 a0 60 00 cmp %g1, 0
20285d8: 32 bf ff f4 bne,a 20285a8 <fat_file_ioctl+0x70> <== NEVER TAKEN
20285dc: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
20285e0: c2 08 e0 0a ldub [ %g3 + 0xa ], %g1
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)) &&
20285e4: 80 88 60 03 btst 3, %g1
20285e8: 22 bf ff f0 be,a 20285a8 <fat_file_ioctl+0x70> <== NEVER TAKEN
20285ec: d4 08 e0 08 ldub [ %g3 + 8 ], %o2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
20285f0: c0 27 00 00 clr [ %i4 ]
rc = RC_OK;
break;
20285f4: 81 c7 e0 08 ret
20285f8: 91 e8 20 00 restore %g0, 0, %o0
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
20285fc: 40 00 7b 3c call 20472ec <__errno> <== NOT EXECUTED
2028600: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028604: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2028608: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
202860c: 81 c7 e0 08 ret <== NOT EXECUTED
2028610: 81 e8 00 00 restore <== NOT EXECUTED
02027de0 <fat_file_lseek>:
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
2027de0: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
2027de4: f8 06 60 34 ld [ %i1 + 0x34 ], %i4
2027de8: 80 a7 00 1a cmp %i4, %i2
2027dec: 22 80 00 21 be,a 2027e70 <fat_file_lseek+0x90> <== ALWAYS TAKEN
2027df0: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
2027df4: 2a 80 00 16 bcs,a 2027e4c <fat_file_lseek+0x6c> <== NOT EXECUTED
2027df8: d2 06 60 38 ld [ %i1 + 0x38 ], %o1 <== NOT EXECUTED
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
2027dfc: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
2027e00: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
2027e04: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2027e08: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2027e0c: 02 80 00 13 be 2027e58 <fat_file_lseek+0x78> <== NOT EXECUTED
2027e10: ba 10 20 00 clr %i5 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2027e14: 10 80 00 06 b 2027e2c <fat_file_lseek+0x4c> <== NOT EXECUTED
2027e18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
2027e1c: 80 a7 40 1c cmp %i5, %i4 <== NOT EXECUTED
2027e20: 02 80 00 0e be 2027e58 <fat_file_lseek+0x78> <== NOT EXECUTED
2027e24: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2027e28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2027e2c: 40 00 6a e1 call 20429b0 <fat_get_fat_cluster> <== NOT EXECUTED
2027e30: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2027e34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2027e38: 22 bf ff f9 be,a 2027e1c <fat_file_lseek+0x3c> <== NOT EXECUTED
2027e3c: ba 07 60 01 inc %i5 <== NOT EXECUTED
return rc;
2027e40: b1 3a 20 1f sra %o0, 0x1f, %i0 <== NOT EXECUTED
2027e44: 81 c7 e0 08 ret <== NOT EXECUTED
2027e48: 93 e8 00 08 restore %g0, %o0, %o1 <== NOT EXECUTED
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
2027e4c: b8 26 80 1c sub %i2, %i4, %i4 <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
2027e50: 10 bf ff ee b 2027e08 <fat_file_lseek+0x28> <== NOT EXECUTED
2027e54: d2 27 bf fc st %o1, [ %fp + -4 ] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
2027e58: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
2027e5c: d2 26 60 38 st %o1, [ %i1 + 0x38 ] <== NOT EXECUTED
*disk_cln = cur_cln;
2027e60: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
}
return RC_OK;
2027e64: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
2027e68: 81 c7 e0 08 ret <== NOT EXECUTED
2027e6c: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
2027e70: b0 10 20 00 clr %i0
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
2027e74: c2 26 c0 00 st %g1, [ %i3 ]
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
*disk_cln = cur_cln;
}
return RC_OK;
2027e78: 81 c7 e0 08 ret
2027e7c: 93 e8 20 00 restore %g0, 0, %o1
02028a60 <fat_file_mark_removed>:
void
fat_file_mark_removed(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2028a60: 9d e3 bf a0 save %sp, -96, %sp
2028a64: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
fat_fs_info_t *fs_info = mt_entry->fs_info;
2028a68: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2028a6c: 80 a0 60 01 cmp %g1, 1
2028a70: 02 80 00 0c be 2028aa0 <fat_file_mark_removed+0x40> <== NEVER TAKEN
2028a74: 86 10 20 01 mov 1, %g3
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2028a78: 80 a0 60 00 cmp %g1, 0
2028a7c: 32 80 00 1f bne,a 2028af8 <fat_file_mark_removed+0x98> <== NEVER TAKEN
2028a80: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
2028a84: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2
2028a88: 80 88 a0 03 btst 3, %g2
2028a8c: 22 80 00 1b be,a 2028af8 <fat_file_mark_removed+0x98> <== NEVER TAKEN
2028a90: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2028a94: c6 07 60 1c ld [ %i5 + 0x1c ], %g3
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2028a98: c4 0f 60 03 ldub [ %i5 + 3 ], %g2
2028a9c: 87 28 c0 02 sll %g3, %g2, %g3
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2028aa0: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
2028aa4: 90 10 00 19 mov %i1, %o0
2028aa8: b9 30 a0 09 srl %g2, 9, %i4
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2028aac: 85 30 a0 05 srl %g2, 5, %g2
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2028ab0: 86 00 c0 1c add %g3, %i4, %g3
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2028ab4: 84 08 a0 0f and %g2, 0xf, %g2
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2028ab8: b9 28 e0 04 sll %g3, 4, %i4
2028abc: 7f ff 97 94 call 200e90c <_Chain_Extract>
2028ac0: b8 07 00 02 add %i4, %g2, %i4
*/
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);
2028ac4: d0 07 60 64 ld [ %i5 + 0x64 ], %o0
2028ac8: b8 0f 20 01 and %i4, 1, %i4
2028acc: 83 2f 20 02 sll %i4, 2, %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2028ad0: 92 10 00 19 mov %i1, %o1
2028ad4: b9 2f 20 04 sll %i4, 4, %i4
2028ad8: b8 27 00 01 sub %i4, %g1, %i4
2028adc: 7f ff 97 81 call 200e8e0 <_Chain_Append>
2028ae0: 90 02 00 1c add %o0, %i4, %o0
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
2028ae4: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
2028ae8: 82 10 60 01 or %g1, 1, %g1
2028aec: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ]
}
2028af0: 81 c7 e0 08 ret
2028af4: 81 e8 00 00 restore
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2028af8: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 <== NOT EXECUTED
2028afc: 82 00 7f fe add %g1, -2, %g1 <== NOT EXECUTED
2028b00: 87 28 40 03 sll %g1, %g3, %g3 <== NOT EXECUTED
2028b04: 10 bf ff e5 b 2028a98 <fat_file_mark_removed+0x38> <== NOT EXECUTED
2028b08: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED
02027e80 <fat_file_open>:
fat_file_open(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
2027e80: 9d e3 bf a0 save %sp, -96, %sp
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027e84: c2 06 40 00 ld [ %i1 ], %g1
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2027e88: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2027e8c: 80 a0 60 01 cmp %g1, 1
2027e90: 02 80 00 0c be 2027ec0 <fat_file_open+0x40>
2027e94: 84 10 20 01 mov 1, %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2027e98: 80 a0 60 00 cmp %g1, 0
2027e9c: 32 80 00 7d bne,a 2028090 <fat_file_open+0x210>
2027ea0: c4 0f 60 05 ldub [ %i5 + 5 ], %g2
2027ea4: c4 0f 60 0a ldub [ %i5 + 0xa ], %g2
2027ea8: 80 88 a0 03 btst 3, %g2
2027eac: 22 80 00 79 be,a 2028090 <fat_file_open+0x210> <== NEVER TAKEN
2027eb0: c4 0f 60 05 ldub [ %i5 + 5 ], %g2 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2027eb4: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2027eb8: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
2027ebc: 85 28 80 03 sll %g2, %g3, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2027ec0: c2 06 60 04 ld [ %i1 + 4 ], %g1
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);
2027ec4: de 07 60 60 ld [ %i5 + 0x60 ], %o7
2027ec8: b9 30 60 09 srl %g1, 9, %i4
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2027ecc: 83 30 60 05 srl %g1, 5, %g1
2027ed0: 82 08 60 0f and %g1, 0xf, %g1
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027ed4: 84 00 80 1c add %g2, %i4, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2027ed8: b9 28 a0 04 sll %g2, 4, %i4
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027edc: b8 07 00 01 add %i4, %g1, %i4
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
2027ee0: 82 0f 20 01 and %i4, 1, %g1
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
2027ee4: 85 28 60 02 sll %g1, 2, %g2
2027ee8: a1 28 60 04 sll %g1, 4, %l0
2027eec: a0 24 00 02 sub %l0, %g2, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2027ef0: c2 03 c0 10 ld [ %o7 + %l0 ], %g1
2027ef4: 9e 03 c0 10 add %o7, %l0, %o7
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 ));
2027ef8: 9e 03 e0 04 add %o7, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2027efc: 80 a0 40 0f cmp %g1, %o7
2027f00: 22 80 00 1f be,a 2027f7c <fat_file_open+0xfc>
2027f04: c4 07 60 64 ld [ %i5 + 0x64 ], %g2
2027f08: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2027f0c: 80 a0 a0 01 cmp %g2, 1
2027f10: 02 80 00 0c be 2027f40 <fat_file_open+0xc0>
2027f14: 88 10 20 01 mov 1, %g4
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2027f18: 80 a0 a0 00 cmp %g2, 0
2027f1c: 32 80 00 62 bne,a 20280a4 <fat_file_open+0x224>
2027f20: c8 0f 60 05 ldub [ %i5 + 5 ], %g4
2027f24: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3
2027f28: 80 88 e0 03 btst 3, %g3
2027f2c: 22 80 00 5e be,a 20280a4 <fat_file_open+0x224> <== NEVER TAKEN
2027f30: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2027f34: c8 07 60 1c ld [ %i5 + 0x1c ], %g4
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2027f38: c6 0f 60 03 ldub [ %i5 + 3 ], %g3
2027f3c: 89 29 00 03 sll %g4, %g3, %g4
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2027f40: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
2027f44: b7 30 e0 09 srl %g3, 9, %i3
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2027f48: 85 30 e0 05 srl %g3, 5, %g2
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027f4c: 88 01 00 1b add %g4, %i3, %g4
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2027f50: 84 08 a0 0f and %g2, 0xf, %g2
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2027f54: 87 29 20 04 sll %g4, 4, %g3
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027f58: 86 00 c0 02 add %g3, %g2, %g3
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
2027f5c: 80 a7 00 03 cmp %i4, %g3
2027f60: 22 80 00 56 be,a 20280b8 <fat_file_open+0x238>
2027f64: c4 00 60 08 ld [ %g1 + 8 ], %g2
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
2027f68: c2 00 40 00 ld [ %g1 ], %g1
)
{
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) ; )
2027f6c: 80 a0 40 0f cmp %g1, %o7
2027f70: 32 bf ff e7 bne,a 2027f0c <fat_file_open+0x8c>
2027f74: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
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);
2027f78: c4 07 60 64 ld [ %i5 + 0x64 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2027f7c: c2 00 80 10 ld [ %g2 + %l0 ], %g1
2027f80: 84 00 80 10 add %g2, %l0, %g2
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 ));
2027f84: 9e 00 a0 04 add %g2, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
2027f88: 80 a0 40 0f cmp %g1, %o7
2027f8c: 02 80 00 1f be 2028008 <fat_file_open+0x188> <== ALWAYS TAKEN
2027f90: a2 10 3f ff mov -1, %l1
2027f94: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
2027f98: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED
2027f9c: 02 80 00 0c be 2027fcc <fat_file_open+0x14c> <== NOT EXECUTED
2027fa0: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2027fa4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2027fa8: 32 80 00 49 bne,a 20280cc <fat_file_open+0x24c> <== NOT EXECUTED
2027fac: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
2027fb0: c6 0f 60 0a ldub [ %i5 + 0xa ], %g3 <== NOT EXECUTED
2027fb4: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
2027fb8: 22 80 00 45 be,a 20280cc <fat_file_open+0x24c> <== NOT EXECUTED
2027fbc: c8 0f 60 05 ldub [ %i5 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2027fc0: c8 07 60 1c ld [ %i5 + 0x1c ], %g4 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
return 1;
return (fat_cluster_num_to_sector_num(mt_entry, cln) <<
2027fc4: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED
2027fc8: 89 29 00 03 sll %g4, %g3, %g4 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2027fcc: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 <== NOT EXECUTED
2027fd0: b7 30 e0 09 srl %g3, 9, %i3 <== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2027fd4: 85 30 e0 05 srl %g3, 5, %g2 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027fd8: 88 01 00 1b add %g4, %i3, %g4 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
2027fdc: 84 08 a0 0f and %g2, 0xf, %g2 <== NOT EXECUTED
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2027fe0: 87 29 20 04 sll %g4, 4, %g3 <== NOT EXECUTED
static inline uint32_t
fat_construct_key(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_pos_t *pos)
{
return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) +
2027fe4: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
2027fe8: 80 a7 00 03 cmp %i4, %g3 <== NOT EXECUTED
2027fec: 02 80 00 3d be 20280e0 <fat_file_open+0x260> <== NOT EXECUTED
2027ff0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
2027ff4: c2 00 40 00 ld [ %g1 ], %g1 <== 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) ; )
2027ff8: 80 a0 40 0f cmp %g1, %o7 <== NOT EXECUTED
2027ffc: 32 bf ff e7 bne,a 2027f98 <fat_file_open+0x118> <== NOT EXECUTED
2028000: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 <== NOT EXECUTED
return 0;
}
}
the_node = the_node->next;
}
return -1;
2028004: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
2028008: 7f ff 85 00 call 2009408 <malloc>
202800c: 90 10 20 44 mov 0x44, %o0
2028010: d0 26 80 00 st %o0, [ %i2 ]
if ( lfat_fd == NULL )
2028014: 80 a2 20 00 cmp %o0, 0
2028018: 02 80 00 40 be 2028118 <fat_file_open+0x298> <== NEVER TAKEN
202801c: b6 10 00 08 mov %o0, %i3
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
2028020: 92 10 20 00 clr %o1
2028024: 40 00 8a 7f call 204aa20 <memset>
2028028: 94 10 20 44 mov 0x44, %o2
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
202802c: de 0e e0 30 ldub [ %i3 + 0x30 ], %o7
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
2028030: c8 06 40 00 ld [ %i1 ], %g4
2028034: c6 06 60 04 ld [ %i1 + 4 ], %g3
2028038: c4 06 60 08 ld [ %i1 + 8 ], %g2
202803c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
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;
2028040: b2 0b ff fe and %o7, -2, %i1
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
2028044: c8 26 e0 20 st %g4, [ %i3 + 0x20 ]
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
2028048: 9e 10 20 01 mov 1, %o7
lfat_fd->flags &= ~FAT_FILE_REMOVED;
202804c: f2 2e e0 30 stb %i1, [ %i3 + 0x30 ]
if ( lfat_fd == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
2028050: de 26 e0 08 st %o7, [ %i3 + 8 ]
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
2028054: b2 10 3f ff mov -1, %i1
lfat_fd->dir_pos = *dir_pos;
2028058: c6 26 e0 24 st %g3, [ %i3 + 0x24 ]
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
202805c: f2 26 e0 3c st %i1, [ %i3 + 0x3c ]
lfat_fd->dir_pos = *dir_pos;
2028060: c4 26 e0 28 st %g2, [ %i3 + 0x28 ]
if ( rc != RC_OK )
2028064: 80 a4 60 00 cmp %l1, 0
2028068: 02 80 00 25 be 20280fc <fat_file_open+0x27c> <== NEVER TAKEN
202806c: c2 26 e0 2c st %g1, [ %i3 + 0x2c ]
lfat_fd->ino = key;
2028070: f8 26 e0 0c st %i4, [ %i3 + 0xc ]
*/
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);
2028074: d0 07 60 60 ld [ %i5 + 0x60 ], %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
2028078: 92 10 00 1b mov %i3, %o1
202807c: 90 02 00 10 add %o0, %l0, %o0
2028080: 7f ff 9a 18 call 200e8e0 <_Chain_Append>
2028084: b0 10 20 00 clr %i0
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
2028088: 81 c7 e0 08 ret
202808c: 81 e8 00 00 restore
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2028090: c6 07 60 30 ld [ %i5 + 0x30 ], %g3
2028094: 82 00 7f fe add %g1, -2, %g1
2028098: 85 28 40 02 sll %g1, %g2, %g2
202809c: 10 bf ff 87 b 2027eb8 <fat_file_open+0x38>
20280a0: 84 00 80 03 add %g2, %g3, %g2
20280a4: c6 07 60 30 ld [ %i5 + 0x30 ], %g3
20280a8: 84 00 bf fe add %g2, -2, %g2
20280ac: 89 28 80 04 sll %g2, %g4, %g4
20280b0: 10 bf ff a2 b 2027f38 <fat_file_open+0xb8>
20280b4: 88 01 00 03 add %g4, %g3, %g4
/* access "valid" hash table */
rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
20280b8: c2 26 80 00 st %g1, [ %i2 ]
lfat_fd->links_num++;
20280bc: 84 00 a0 01 inc %g2
20280c0: c4 20 60 08 st %g2, [ %g1 + 8 ]
return rc;
20280c4: 81 c7 e0 08 ret
20280c8: 91 e8 20 00 restore %g0, 0, %o0
20280cc: c6 07 60 30 ld [ %i5 + 0x30 ], %g3 <== NOT EXECUTED
20280d0: 84 00 bf fe add %g2, -2, %g2 <== NOT EXECUTED
20280d4: 89 28 80 04 sll %g2, %g4, %g4 <== NOT EXECUTED
20280d8: 10 bf ff bb b 2027fc4 <fat_file_open+0x144> <== NOT EXECUTED
20280dc: 88 01 00 03 add %g4, %g3, %g4 <== NOT EXECUTED
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname);
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
20280e0: 02 bf ff ca be 2028008 <fat_file_open+0x188> <== NOT EXECUTED
20280e4: a2 10 20 00 clr %l1 <== NOT EXECUTED
20280e8: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
20280ec: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED
20280f0: 32 bf ff c2 bne,a 2027ff8 <fat_file_open+0x178> <== NOT EXECUTED
20280f4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
20280f8: 30 bf ff c4 b,a 2028008 <fat_file_open+0x188> <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
20280fc: 40 00 04 9b call 2029368 <fat_get_unique_ino> <== NOT EXECUTED
2028100: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
2028104: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2028108: 12 bf ff db bne 2028074 <fat_file_open+0x1f4> <== NOT EXECUTED
202810c: d0 26 e0 0c st %o0, [ %i3 + 0xc ] <== NOT EXECUTED
{
free((*fat_fd));
2028110: 7f ff 83 35 call 2008de4 <free> <== NOT EXECUTED
2028114: d0 06 80 00 ld [ %i2 ], %o0 <== 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 );
2028118: 40 00 7c 75 call 20472ec <__errno> <== NOT EXECUTED
202811c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028120: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2028124: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2028128: 81 c7 e0 08 ret <== NOT EXECUTED
202812c: 81 e8 00 00 restore <== NOT EXECUTED
02028148 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
2028148: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
202814c: c0 27 bf fc clr [ %fp + -4 ]
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
2028150: ba 10 00 18 mov %i0, %i5
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2028154: e2 06 20 20 ld [ %i0 + 0x20 ], %l1
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)
2028158: 80 a6 e0 00 cmp %i3, 0
202815c: 02 80 00 7f be 2028358 <fat_file_read+0x210> <== NEVER TAKEN
2028160: b0 10 20 00 clr %i0
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
2028164: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
2028168: 80 a0 40 1a cmp %g1, %i2
202816c: 08 80 00 7b bleu 2028358 <fat_file_read+0x210> <== NEVER TAKEN
2028170: 80 a6 c0 01 cmp %i3, %g1
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
2028174: 08 80 00 4c bleu 20282a4 <fat_file_read+0x15c> <== ALWAYS TAKEN
2028178: 84 20 40 1b sub %g1, %i3, %g2
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
202817c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028180: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2028184: 80 a0 60 01 cmp %g1, 1
2028188: 22 80 00 4c be,a 20282b8 <fat_file_read+0x170>
202818c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2028190: e6 0c 60 08 ldub [ %l1 + 8 ], %l3
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2028194: e0 14 60 06 lduh [ %l1 + 6 ], %l0
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2028198: a7 36 80 13 srl %i2, %l3, %l3
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
202819c: 90 10 00 1d mov %i5, %o0
20281a0: 92 10 00 19 mov %i1, %o1
20281a4: 94 10 00 13 mov %l3, %o2
20281a8: 7f ff ff 0e call 2027de0 <fat_file_lseek>
20281ac: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
20281b0: b0 92 60 00 orcc %o1, 0, %i0
20281b4: 12 80 00 69 bne 2028358 <fat_file_read+0x210> <== NEVER TAKEN
20281b8: a1 2c 20 10 sll %l0, 0x10, %l0
return rc;
while (count > 0)
20281bc: a8 10 20 00 clr %l4
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
20281c0: a1 34 20 10 srl %l0, 0x10, %l0
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20281c4: a4 10 20 00 clr %l2
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
20281c8: a0 04 3f ff add %l0, -1, %l0
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20281cc: 80 a6 e0 00 cmp %i3, 0
20281d0: 02 80 00 5b be 202833c <fat_file_read+0x1f4> <== NEVER TAKEN
20281d4: b4 0e 80 10 and %i2, %l0, %i2
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
20281d8: c4 0c 60 02 ldub [ %l1 + 2 ], %g2
20281dc: d4 14 40 00 lduh [ %l1 ], %o2
return rc;
while (count > 0)
20281e0: 10 80 00 20 b 2028260 <fat_file_read+0x118>
20281e4: 82 10 00 1a mov %i2, %g1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20281e8: f0 08 e0 0a ldub [ %g3 + 0xa ], %i0 <== NOT EXECUTED
20281ec: 80 8e 20 03 btst 3, %i0 <== NOT EXECUTED
20281f0: 22 80 00 26 be,a 2028288 <fat_file_read+0x140> <== NOT EXECUTED
20281f4: f0 08 e0 05 ldub [ %g3 + 5 ], %i0 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
20281f8: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
20281fc: 85 30 40 02 srl %g1, %g2, %g2
byte = ofs & (fs_info->vol.bps - 1);
2028200: 95 2a a0 10 sll %o2, 0x10, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
2028204: 98 07 00 12 add %i4, %l2, %o4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2028208: 95 32 a0 10 srl %o2, 0x10, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
202820c: 92 02 40 02 add %o1, %g2, %o1
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
2028210: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
2028214: 96 10 00 10 mov %l0, %o3
2028218: 94 0a 80 01 and %o2, %g1, %o2
202821c: 40 00 03 97 call 2029078 <_fat_block_read>
2028220: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2028224: 94 07 bf fc add %fp, -4, %o2
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
2028228: 80 a2 20 00 cmp %o0, 0
202822c: 06 80 00 3c bl 202831c <fat_file_read+0x1d4> <== NEVER TAKEN
2028230: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
2028234: e8 07 bf fc ld [ %fp + -4 ], %l4
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
2028238: a4 04 80 10 add %l2, %l0, %l2
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
202823c: 40 00 69 dd call 20429b0 <fat_get_fat_cluster>
2028240: 92 10 00 14 mov %l4, %o1
if ( rc != RC_OK )
2028244: 80 a2 20 00 cmp %o0, 0
2028248: 12 80 00 15 bne 202829c <fat_file_read+0x154> <== NEVER TAKEN
202824c: b6 a6 c0 10 subcc %i3, %l0, %i3
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2028250: 02 80 00 3a be 2028338 <fat_file_read+0x1f0> <== ALWAYS TAKEN
2028254: 82 10 20 00 clr %g1
2028258: c4 0c 60 02 ldub [ %l1 + 2 ], %g2 <== NOT EXECUTED
202825c: d4 14 40 00 lduh [ %l1 ], %o2 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
2028260: e0 14 60 06 lduh [ %l1 + 6 ], %l0
2028264: a0 24 00 01 sub %l0, %g1, %l0
2028268: 80 a4 00 1b cmp %l0, %i3
202826c: 08 80 00 03 bleu 2028278 <fat_file_read+0x130>
2028270: c8 07 bf fc ld [ %fp + -4 ], %g4
2028274: a0 10 00 1b mov %i3, %l0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2028278: 80 a1 20 00 cmp %g4, 0
202827c: 02 bf ff db be 20281e8 <fat_file_read+0xa0> <== NEVER TAKEN
2028280: c6 07 60 20 ld [ %i5 + 0x20 ], %g3
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2028284: f0 08 e0 05 ldub [ %g3 + 5 ], %i0
2028288: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3
202828c: 92 01 3f fe add %g4, -2, %o1
2028290: 93 2a 40 18 sll %o1, %i0, %o1
2028294: 10 bf ff da b 20281fc <fat_file_read+0xb4>
2028298: 92 02 40 03 add %o1, %g3, %o1
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;
}
202829c: 81 c7 e0 08 ret <== NOT EXECUTED
20282a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
20282a4: 80 a6 80 02 cmp %i2, %g2
20282a8: 28 bf ff b7 bleu,a 2028184 <fat_file_read+0x3c> <== ALWAYS TAKEN
20282ac: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
20282b0: 10 bf ff b4 b 2028180 <fat_file_read+0x38> <== NOT EXECUTED
20282b4: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
20282b8: 80 a0 60 00 cmp %g1, 0
20282bc: 32 bf ff b6 bne,a 2028194 <fat_file_read+0x4c> <== NEVER TAKEN
20282c0: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
20282c4: c2 0c 60 0a ldub [ %l1 + 0xa ], %g1
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)) &&
20282c8: 80 88 60 03 btst 3, %g1
20282cc: 22 bf ff b2 be,a 2028194 <fat_file_read+0x4c> <== NEVER TAKEN
20282d0: e6 0c 60 08 ldub [ %l1 + 8 ], %l3 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
20282d4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20282d8: 80 a0 60 00 cmp %g1, 0
20282dc: 32 80 00 12 bne,a 2028324 <fat_file_read+0x1dc> <== NEVER TAKEN
20282e0: c6 0c 60 05 ldub [ %l1 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
20282e4: d2 04 60 1c ld [ %l1 + 0x1c ], %o1
sec += (start >> fs_info->vol.sec_log2);
20282e8: c2 0c 60 02 ldub [ %l1 + 2 ], %g1
byte = start & (fs_info->vol.bps - 1);
20282ec: d4 14 40 00 lduh [ %l1 ], %o2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
20282f0: 83 36 80 01 srl %i2, %g1, %g1
byte = start & (fs_info->vol.bps - 1);
20282f4: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(mt_entry, sec, byte, count, buf);
20282f8: 90 10 00 1d mov %i5, %o0
20282fc: 92 02 40 01 add %o1, %g1, %o1
2028300: 94 0e 80 0a and %i2, %o2, %o2
2028304: 96 10 00 1b mov %i3, %o3
2028308: 40 00 03 5c call 2029078 <_fat_block_read>
202830c: 98 10 00 1c mov %i4, %o4
if ( ret < 0 )
2028310: b0 92 20 00 orcc %o0, 0, %i0
2028314: 16 80 00 11 bge 2028358 <fat_file_read+0x210> <== ALWAYS TAKEN
2028318: 01 00 00 00 nop
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
202831c: 81 c7 e0 08 ret <== NOT EXECUTED
2028320: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2028324: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
2028328: 92 00 7f fe add %g1, -2, %o1 <== NOT EXECUTED
202832c: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2028330: 10 bf ff ee b 20282e8 <fat_file_read+0x1a0> <== NOT EXECUTED
2028334: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
2028338: b0 10 00 12 mov %l2, %i0
}
/* 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);
202833c: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
2028340: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
2028344: e8 26 60 38 st %l4, [ %i1 + 0x38 ]
}
/* 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);
2028348: a4 06 80 12 add %i2, %l2, %l2
202834c: a5 34 80 01 srl %l2, %g1, %l2
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
2028350: a6 04 80 13 add %l2, %l3, %l3
2028354: e6 26 60 34 st %l3, [ %i1 + 0x34 ]
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
2028358: 81 c7 e0 08 ret
202835c: 81 e8 00 00 restore
02028c28 <fat_file_size>:
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2028c28: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2028c2c: fa 06 60 1c ld [ %i1 + 0x1c ], %i5
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028c30: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
2028c34: fa 27 bf fc st %i5, [ %fp + -4 ]
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2028c38: b6 10 00 18 mov %i0, %i3
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028c3c: 80 a0 60 01 cmp %g1, 1
2028c40: 02 80 00 21 be 2028cc4 <fat_file_size+0x9c> <== NEVER TAKEN
2028c44: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2028c48: c4 07 20 0c ld [ %i4 + 0xc ], %g2
2028c4c: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
2028c50: 84 0f 40 02 and %i5, %g2, %g2
2028c54: 80 a0 80 01 cmp %g2, %g1
2028c58: 0a 80 00 0e bcs 2028c90 <fat_file_size+0x68> <== ALWAYS TAKEN
2028c5c: c0 26 60 18 clr [ %i1 + 0x18 ]
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
2028c60: 10 80 00 15 b 2028cb4 <fat_file_size+0x8c> <== NOT EXECUTED
2028c64: ba 10 20 00 clr %i5 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
2028c68: de 06 60 18 ld [ %i1 + 0x18 ], %o7
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2028c6c: c6 07 20 0c ld [ %i4 + 0xc ], %g3
2028c70: c4 07 20 10 ld [ %i4 + 0x10 ], %g2
2028c74: c2 07 bf fc ld [ %fp + -4 ], %g1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
2028c78: 88 03 c0 04 add %o7, %g4, %g4
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2028c7c: 86 08 40 03 and %g1, %g3, %g3
2028c80: 80 a0 c0 02 cmp %g3, %g2
2028c84: 1a 80 00 0c bcc 2028cb4 <fat_file_size+0x8c> <== ALWAYS TAKEN
2028c88: c8 26 60 18 st %g4, [ %i1 + 0x18 ]
2028c8c: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2028c90: 92 10 00 1d mov %i5, %o1
2028c94: 90 10 00 1b mov %i3, %o0
2028c98: 40 00 67 46 call 20429b0 <fat_get_fat_cluster>
2028c9c: 94 07 bf fc add %fp, -4, %o2
if ( rc != RC_OK )
2028ca0: 80 a2 20 00 cmp %o0, 0
2028ca4: 22 bf ff f1 be,a 2028c68 <fat_file_size+0x40> <== ALWAYS TAKEN
2028ca8: c8 17 20 06 lduh [ %i4 + 6 ], %g4
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
}
2028cac: 81 c7 e0 08 ret <== NOT EXECUTED
2028cb0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
return rc;
2028cb4: 90 10 20 00 clr %o0
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
2028cb8: fa 26 60 3c st %i5, [ %i1 + 0x3c ]
return rc;
}
2028cbc: 81 c7 e0 08 ret
2028cc0: 91 e8 00 08 restore %g0, %o0, %o0
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028cc4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED
2028cc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2028ccc: 32 bf ff e0 bne,a 2028c4c <fat_file_size+0x24> <== NOT EXECUTED
2028cd0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2028cd4: c2 0f 20 0a ldub [ %i4 + 0xa ], %g1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028cd8: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
2028cdc: 22 bf ff dc be,a 2028c4c <fat_file_size+0x24> <== NOT EXECUTED
2028ce0: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
2028ce4: c2 07 20 28 ld [ %i4 + 0x28 ], %g1 <== NOT EXECUTED
return rc;
2028ce8: 90 10 20 00 clr %o0 <== NOT EXECUTED
2028cec: 10 bf ff f0 b 2028cac <fat_file_size+0x84> <== NOT EXECUTED
2028cf0: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== NOT EXECUTED
02028360 <fat_file_truncate>:
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
2028360: 9d e3 bf 98 save %sp, -104, %sp
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 )
2028364: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
2028368: 84 10 3f ff mov -1, %g2
uint32_t new_length
)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
202836c: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
2028370: c4 27 bf fc st %g2, [ %fp + -4 ]
if ( new_length >= fat_fd->fat_file_size )
2028374: 80 a0 40 1a cmp %g1, %i2
2028378: 08 80 00 21 bleu 20283fc <fat_file_truncate+0x9c>
202837c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
return rc;
assert(fat_fd->fat_file_size);
2028380: 80 a0 60 00 cmp %g1, 0
2028384: 02 80 00 33 be 2028450 <fat_file_truncate+0xf0> <== NEVER TAKEN
2028388: 11 00 81 a3 sethi %hi(0x2068c00), %o0
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
202838c: c6 08 a0 08 ldub [ %g2 + 8 ], %g3
2028390: c4 10 a0 06 lduh [ %g2 + 6 ], %g2
2028394: 84 00 bf ff add %g2, -1, %g2
2028398: b4 00 80 1a add %g2, %i2, %i2
202839c: b5 36 80 03 srl %i2, %g3, %i2
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
20283a0: 87 2e 80 03 sll %i2, %g3, %g3
20283a4: 80 a0 40 03 cmp %g1, %g3
20283a8: 08 80 00 13 bleu 20283f4 <fat_file_truncate+0x94> <== NEVER TAKEN
20283ac: 92 10 20 00 clr %o1
return RC_OK;
if (cl_start != 0)
20283b0: 80 a6 a0 00 cmp %i2, 0
20283b4: 02 80 00 09 be 20283d8 <fat_file_truncate+0x78> <== ALWAYS TAKEN
20283b8: 90 10 00 18 mov %i0, %o0
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
20283bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20283c0: 94 06 bf ff add %i2, -1, %o2 <== NOT EXECUTED
20283c4: 7f ff fe 87 call 2027de0 <fat_file_lseek> <== NOT EXECUTED
20283c8: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc != RC_OK)
20283cc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
20283d0: 12 80 00 09 bne 20283f4 <fat_file_truncate+0x94> <== NOT EXECUTED
20283d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
20283d8: 92 10 00 19 mov %i1, %o1
20283dc: 94 10 00 1a mov %i2, %o2
20283e0: 7f ff fe 80 call 2027de0 <fat_file_lseek>
20283e4: 96 07 bf f8 add %fp, -8, %o3
if (rc != RC_OK)
20283e8: 80 a2 60 00 cmp %o1, 0
20283ec: 22 80 00 07 be,a 2028408 <fat_file_truncate+0xa8> <== ALWAYS TAKEN
20283f0: d2 07 bf f8 ld [ %fp + -8 ], %o1
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
20283f4: 81 c7 e0 08 ret
20283f8: 91 e8 00 09 restore %g0, %o1, %o0
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
return rc;
20283fc: 92 10 20 00 clr %o1
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
}
return RC_OK;
}
2028400: 81 c7 e0 08 ret
2028404: 91 e8 00 09 restore %g0, %o1, %o0
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
2028408: 40 00 6a b4 call 2042ed8 <fat_free_fat_clusters_chain>
202840c: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
2028410: 92 92 20 00 orcc %o0, 0, %o1
2028414: 12 bf ff f8 bne 20283f4 <fat_file_truncate+0x94> <== NEVER TAKEN
2028418: 80 a6 a0 00 cmp %i2, 0
return rc;
if (cl_start != 0)
202841c: 02 bf ff f6 be 20283f4 <fat_file_truncate+0x94> <== ALWAYS TAKEN
2028420: 90 10 00 18 mov %i0, %o0
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
2028424: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
2028428: 40 00 69 ea call 2042bd0 <fat_set_fat_cluster> <== NOT EXECUTED
202842c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2028430: 92 92 20 00 orcc %o0, 0, %o1 <== NOT EXECUTED
2028434: 12 bf ff f0 bne 20283f4 <fat_file_truncate+0x94> <== NOT EXECUTED
2028438: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
202843c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
2028440: c2 26 60 38 st %g1, [ %i1 + 0x38 ] <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
2028444: f4 26 60 34 st %i2, [ %i1 + 0x34 ] <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
2028448: 10 bf ff eb b 20283f4 <fat_file_truncate+0x94> <== NOT EXECUTED
202844c: c2 26 60 3c st %g1, [ %i1 + 0x3c ] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
2028450: 15 00 81 a3 sethi %hi(0x2068c00), %o2 <== NOT EXECUTED
2028454: 17 00 81 a3 sethi %hi(0x2068c00), %o3 <== NOT EXECUTED
2028458: 90 12 20 40 or %o0, 0x40, %o0 <== NOT EXECUTED
202845c: 92 10 22 6d mov 0x26d, %o1 <== NOT EXECUTED
2028460: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
2028464: 40 00 08 99 call 202a6c8 <__assert_func> <== NOT EXECUTED
2028468: 96 12 e0 88 or %o3, 0x88, %o3 <== NOT EXECUTED
020287f8 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
20287f8: 9d e3 bf 98 save %sp, -104, %sp
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
20287fc: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t cl_start = 0;
uint32_t ofs = 0;
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
2028800: c0 27 bf fc clr [ %fp + -4 ]
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
2028804: ba 10 00 18 mov %i0, %i5
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2028808: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
202880c: 80 a6 e0 00 cmp %i3, 0
2028810: 02 80 00 82 be 2028a18 <fat_file_write+0x220> <== NEVER TAKEN
2028814: b0 10 20 00 clr %i0
return cmpltd;
if ( start > fat_fd->fat_file_size )
2028818: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
202881c: 80 a0 40 1a cmp %g1, %i2
2028820: 0a 80 00 7a bcs 2028a08 <fat_file_write+0x210> <== NEVER TAKEN
2028824: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
2028828: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
202882c: 80 a6 c0 01 cmp %i3, %g1
2028830: 18 80 00 76 bgu 2028a08 <fat_file_write+0x210> <== NEVER TAKEN
2028834: 82 20 40 1b sub %g1, %i3, %g1
2028838: 80 a6 80 01 cmp %i2, %g1
202883c: 18 80 00 73 bgu 2028a08 <fat_file_write+0x210> <== NEVER TAKEN
2028840: a2 06 c0 1a add %i3, %i2, %l1
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
2028844: 90 10 00 1d mov %i5, %o0
2028848: 92 10 00 19 mov %i1, %o1
202884c: 94 10 00 11 mov %l1, %o2
2028850: 7f ff ff 71 call 2028614 <fat_file_extend>
2028854: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
2028858: b0 92 20 00 orcc %o0, 0, %i0
202885c: 12 80 00 6f bne 2028a18 <fat_file_write+0x220> <== NEVER TAKEN
2028860: c2 07 bf fc ld [ %fp + -4 ], %g1
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
2028864: 80 a4 40 01 cmp %l1, %g1
2028868: 32 80 00 02 bne,a 2028870 <fat_file_write+0x78> <== NEVER TAKEN
202886c: b6 20 40 1a sub %g1, %i2, %i3 <== NOT EXECUTED
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
2028870: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2028874: 80 a0 60 01 cmp %g1, 1
2028878: 22 80 00 45 be,a 202898c <fat_file_write+0x194>
202887c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2028880: e4 0c 20 08 ldub [ %l0 + 8 ], %l2
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
2028884: e2 14 20 06 lduh [ %l0 + 6 ], %l1
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2028888: a5 36 80 12 srl %i2, %l2, %l2
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
202888c: 90 10 00 1d mov %i5, %o0
2028890: 92 10 00 19 mov %i1, %o1
2028894: 94 10 00 12 mov %l2, %o2
2028898: 7f ff fd 52 call 2027de0 <fat_file_lseek>
202889c: 96 07 bf f8 add %fp, -8, %o3
if (rc != RC_OK)
20288a0: b0 92 60 00 orcc %o1, 0, %i0
20288a4: 12 80 00 5d bne 2028a18 <fat_file_write+0x220> <== NEVER TAKEN
20288a8: 83 2c 60 10 sll %l1, 0x10, %g1
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
20288ac: 83 30 60 10 srl %g1, 0x10, %g1
20288b0: 82 00 7f ff add %g1, -1, %g1
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20288b4: a2 10 20 00 clr %l1
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
20288b8: b4 0e 80 01 and %i2, %g1, %i2
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
20288bc: a8 10 20 00 clr %l4
20288c0: 80 a6 e0 00 cmp %i3, 0
20288c4: 12 80 00 20 bne 2028944 <fat_file_write+0x14c> <== ALWAYS TAKEN
20288c8: 82 10 00 1a mov %i2, %g1
}
/* 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);
20288cc: 10 80 00 5d b 2028a40 <fat_file_write+0x248> <== NOT EXECUTED
20288d0: c2 0c 20 08 ldub [ %l0 + 8 ], %g1 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20288d4: c8 08 a0 0a ldub [ %g2 + 0xa ], %g4 <== NOT EXECUTED
20288d8: 80 89 20 03 btst 3, %g4 <== NOT EXECUTED
20288dc: 22 80 00 25 be,a 2028970 <fat_file_write+0x178> <== NOT EXECUTED
20288e0: c8 08 a0 05 ldub [ %g2 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
20288e4: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1 <== NOT EXECUTED
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
20288e8: c4 0c 20 02 ldub [ %l0 + 2 ], %g2
byte = ofs & (fs_info->vol.bps - 1);
20288ec: d4 14 00 00 lduh [ %l0 ], %o2
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
20288f0: 85 30 40 02 srl %g1, %g2, %g2
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
20288f4: 98 07 00 11 add %i4, %l1, %o4
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
20288f8: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
20288fc: 92 02 40 02 add %o1, %g2, %o1
2028900: 94 08 40 0a and %g1, %o2, %o2
2028904: 40 00 01 ff call 2029100 <_fat_block_write>
2028908: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
202890c: 94 07 bf f8 add %fp, -8, %o2
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
2028910: 80 a2 20 00 cmp %o0, 0
2028914: 06 80 00 1c bl 2028984 <fat_file_write+0x18c> <== NEVER TAKEN
2028918: 90 10 00 1d mov %i5, %o0
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
202891c: e8 07 bf f8 ld [ %fp + -8 ], %l4
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
2028920: e6 07 bf fc ld [ %fp + -4 ], %l3
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2028924: 40 00 68 23 call 20429b0 <fat_get_fat_cluster>
2028928: 92 10 00 14 mov %l4, %o1
if ( rc != RC_OK )
202892c: b0 92 20 00 orcc %o0, 0, %i0
2028930: 12 80 00 3a bne 2028a18 <fat_file_write+0x220> <== NEVER TAKEN
2028934: b6 a6 c0 13 subcc %i3, %l3, %i3
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2028938: 02 80 00 40 be 2028a38 <fat_file_write+0x240>
202893c: a2 04 40 13 add %l1, %l3, %l1
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
2028940: 82 10 20 00 clr %g1
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
2028944: d6 14 20 06 lduh [ %l0 + 6 ], %o3
2028948: 96 22 c0 01 sub %o3, %g1, %o3
202894c: 80 a2 c0 1b cmp %o3, %i3
2028950: 08 80 00 03 bleu 202895c <fat_file_write+0x164>
2028954: c6 07 bf f8 ld [ %fp + -8 ], %g3
2028958: 96 10 00 1b mov %i3, %o3
202895c: d6 27 bf fc st %o3, [ %fp + -4 ]
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2028960: 80 a0 e0 00 cmp %g3, 0
2028964: 02 bf ff dc be 20288d4 <fat_file_write+0xdc> <== NEVER TAKEN
2028968: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
202896c: c8 08 a0 05 ldub [ %g2 + 5 ], %g4
2028970: c4 00 a0 30 ld [ %g2 + 0x30 ], %g2
2028974: 92 00 ff fe add %g3, -2, %o1
2028978: 93 2a 40 04 sll %o1, %g4, %o1
202897c: 10 bf ff db b 20288e8 <fat_file_write+0xf0>
2028980: 92 02 40 02 add %o1, %g2, %o1
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;
}
2028984: 81 c7 e0 08 ret <== NOT EXECUTED
2028988: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
202898c: 80 a0 60 00 cmp %g1, 0
2028990: 32 bf ff bd bne,a 2028884 <fat_file_write+0x8c> <== NEVER TAKEN
2028994: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
2028998: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1
* file of 'start + count' bytes
*/
if (c != (start + count))
count = c - start;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
202899c: 80 88 60 03 btst 3, %g1
20289a0: 22 bf ff b9 be,a 2028884 <fat_file_write+0x8c> <== NEVER TAKEN
20289a4: e4 0c 20 08 ldub [ %l0 + 8 ], %l2 <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
20289a8: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20289ac: 80 a0 a0 00 cmp %g2, 0
20289b0: 12 80 00 1c bne 2028a20 <fat_file_write+0x228> <== NEVER TAKEN
20289b4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
20289b8: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
20289bc: 80 88 e0 03 btst 3, %g3
20289c0: 22 80 00 19 be,a 2028a24 <fat_file_write+0x22c> <== NEVER TAKEN
20289c4: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
20289c8: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
sec += (start >> fs_info->vol.sec_log2);
20289cc: c2 0c 20 02 ldub [ %l0 + 2 ], %g1
byte = start & (fs_info->vol.bps - 1);
20289d0: d4 14 00 00 lduh [ %l0 ], %o2
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
20289d4: 83 36 80 01 srl %i2, %g1, %g1
byte = start & (fs_info->vol.bps - 1);
20289d8: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte, count, buf);
20289dc: 90 10 00 1d mov %i5, %o0
20289e0: 92 02 40 01 add %o1, %g1, %o1
20289e4: 94 0e 80 0a and %i2, %o2, %o2
20289e8: 96 10 00 1b mov %i3, %o3
20289ec: 40 00 01 c5 call 2029100 <_fat_block_write>
20289f0: 98 10 00 1c mov %i4, %o4
if ( ret < 0 )
20289f4: b0 92 20 00 orcc %o0, 0, %i0
20289f8: 16 80 00 18 bge 2028a58 <fat_file_write+0x260> <== ALWAYS TAKEN
20289fc: 01 00 00 00 nop
return -1;
2028a00: 81 c7 e0 08 ret <== NOT EXECUTED
2028a04: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
if ( start > fat_fd->fat_file_size )
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
2028a08: 40 00 7a 39 call 20472ec <__errno> <== NOT EXECUTED
2028a0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2028a10: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2028a14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2028a18: 81 c7 e0 08 ret <== NOT EXECUTED
2028a1c: 81 e8 00 00 restore <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2028a20: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
2028a24: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
2028a28: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED
2028a2c: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
2028a30: 10 bf ff e7 b 20289cc <fat_file_write+0x1d4> <== NOT EXECUTED
2028a34: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
2028a38: b0 10 00 11 mov %l1, %i0
}
/* 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);
2028a3c: c2 0c 20 08 ldub [ %l0 + 8 ], %g1
2028a40: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
2028a44: e8 26 60 38 st %l4, [ %i1 + 0x38 ]
}
/* 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);
2028a48: a2 06 80 11 add %i2, %l1, %l1
2028a4c: a3 34 40 01 srl %l1, %g1, %l1
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
2028a50: a4 04 40 12 add %l1, %l2, %l2
2028a54: e4 26 60 34 st %l2, [ %i1 + 0x34 ]
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
2028a58: 81 c7 e0 08 ret
2028a5c: 81 e8 00 00 restore
02042ed8 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
2042ed8: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2042edc: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
2042ee0: c0 27 bf fc clr [ %fp + -4 ]
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2042ee4: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2042ee8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2042eec: 84 0e 40 02 and %i1, %g2, %g2
2042ef0: 80 a0 80 01 cmp %g2, %g1
2042ef4: 1a 80 00 25 bcc 2042f88 <fat_free_fat_clusters_chain+0xb0><== NEVER TAKEN
2042ef8: b8 10 00 18 mov %i0, %i4
2042efc: b6 10 00 19 mov %i1, %i3
2042f00: b4 10 20 00 clr %i2
2042f04: 10 80 00 0e b 2042f3c <fat_free_fat_clusters_chain+0x64>
2042f08: a0 10 20 00 clr %l0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
2042f0c: 7f ff ff 31 call 2042bd0 <fat_set_fat_cluster>
2042f10: 01 00 00 00 nop
if ( rc != RC_OK )
2042f14: 80 a2 20 00 cmp %o0, 0
2042f18: 02 80 00 03 be 2042f24 <fat_free_fat_clusters_chain+0x4c> <== ALWAYS TAKEN
2042f1c: f6 07 bf fc ld [ %fp + -4 ], %i3
2042f20: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
2042f24: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2042f28: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2042f2c: 84 0e c0 02 and %i3, %g2, %g2
2042f30: 80 a0 80 01 cmp %g2, %g1
2042f34: 1a 80 00 17 bcc 2042f90 <fat_free_fat_clusters_chain+0xb8><== ALWAYS TAKEN
2042f38: b4 06 a0 01 inc %i2
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
2042f3c: 92 10 00 1b mov %i3, %o1
2042f40: 94 07 bf fc add %fp, -4, %o2
2042f44: 7f ff fe 9b call 20429b0 <fat_get_fat_cluster>
2042f48: 90 10 00 1c mov %i4, %o0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
2042f4c: 92 10 00 1b mov %i3, %o1
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
2042f50: b0 10 00 08 mov %o0, %i0
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
2042f54: 94 10 20 00 clr %o2
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
if ( rc != RC_OK )
2042f58: 80 a6 20 00 cmp %i0, 0
2042f5c: 02 bf ff ec be 2042f0c <fat_free_fat_clusters_chain+0x34> <== ALWAYS TAKEN
2042f60: 90 10 00 1c mov %i4, %o0
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
2042f64: c2 07 60 40 ld [ %i5 + 0x40 ], %g1 <== NOT EXECUTED
2042f68: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
2042f6c: 02 80 00 03 be 2042f78 <fat_free_fat_clusters_chain+0xa0> <== NOT EXECUTED
2042f70: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
2042f74: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
fat_buf_release(fs_info);
2042f78: 7f ff 97 e5 call 2028f0c <fat_buf_release> <== NOT EXECUTED
2042f7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2042f80: 81 c7 e0 08 ret <== NOT EXECUTED
2042f84: 81 e8 00 00 restore <== NOT EXECUTED
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
2042f88: b4 10 20 00 clr %i2 <== NOT EXECUTED
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
2042f8c: a0 10 20 00 clr %l0 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
2042f90: c2 07 60 40 ld [ %i5 + 0x40 ], %g1
2042f94: 80 a0 7f ff cmp %g1, -1
2042f98: 02 80 00 04 be 2042fa8 <fat_free_fat_clusters_chain+0xd0> <== ALWAYS TAKEN
2042f9c: f2 27 60 44 st %i1, [ %i5 + 0x44 ]
fs_info->vol.free_cls += freed_cls_cnt;
2042fa0: 82 06 80 01 add %i2, %g1, %g1 <== NOT EXECUTED
2042fa4: c2 27 60 40 st %g1, [ %i5 + 0x40 ] <== NOT EXECUTED
fat_buf_release(fs_info);
2042fa8: b0 10 00 10 mov %l0, %i0
2042fac: 7f ff 97 d8 call 2028f0c <fat_buf_release>
2042fb0: 90 10 00 1d mov %i5, %o0
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
2042fb4: 81 c7 e0 08 ret
2042fb8: 81 e8 00 00 restore
02029468 <fat_free_unique_ino>:
void
fat_free_unique_ino(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
2029468: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
202946c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
2029470: 9e 10 20 01 mov 1, %o7 <== NOT EXECUTED
2029474: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 <== NOT EXECUTED
2029478: c2 00 60 68 ld [ %g1 + 0x68 ], %g1 <== NOT EXECUTED
202947c: 84 26 40 02 sub %i1, %g2, %g2 <== NOT EXECUTED
2029480: 87 30 a0 03 srl %g2, 3, %g3 <== NOT EXECUTED
2029484: c8 08 40 03 ldub [ %g1 + %g3 ], %g4 <== NOT EXECUTED
2029488: 84 08 a0 07 and %g2, 7, %g2 <== NOT EXECUTED
202948c: 85 2b c0 02 sll %o7, %g2, %g2 <== NOT EXECUTED
2029490: 84 29 00 02 andn %g4, %g2, %g2 <== NOT EXECUTED
2029494: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED
}
2029498: 81 c7 e0 08 ret <== NOT EXECUTED
202949c: 81 e8 00 00 restore <== NOT EXECUTED
020429b0 <fat_get_fat_cluster>:
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
20429b0: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
20429b4: c0 27 bf fc clr [ %fp + -4 ]
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
20429b8: 80 a6 60 01 cmp %i1, 1
20429bc: 08 80 00 26 bleu 2042a54 <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
20429c0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
20429c4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
20429c8: 82 00 60 01 inc %g1
20429cc: 80 a6 40 01 cmp %i1, %g1
20429d0: 18 80 00 21 bgu 2042a54 <fat_get_fat_cluster+0xa4> <== NEVER TAKEN
20429d4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
20429d8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
20429dc: 80 88 60 01 btst 1, %g1
20429e0: 12 80 00 23 bne 2042a6c <fat_get_fat_cluster+0xbc> <== ALWAYS TAKEN
20429e4: f6 0f 60 02 ldub [ %i5 + 2 ], %i3
20429e8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
20429ec: 02 80 00 30 be 2042aac <fat_get_fat_cluster+0xfc> <== NOT EXECUTED
20429f0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
20429f4: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED
20429f8: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED
20429fc: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
2042a00: e0 17 40 00 lduh [ %i5 ], %l0 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
2042a04: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042a08: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2042a0c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2042a10: 7f ff 98 b9 call 2028cf4 <fat_buf_access> <== NOT EXECUTED
2042a14: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc != RC_OK)
2042a18: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2042a1c: 12 80 00 5a bne 2042b84 <fat_get_fat_cluster+0x1d4> <== NOT EXECUTED
2042a20: 01 00 00 00 nop <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
2042a24: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== NOT EXECUTED
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
2042a28: a1 2c 20 10 sll %l0, 0x10, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
2042a2c: 80 a0 60 02 cmp %g1, 2
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);
2042a30: a1 34 20 10 srl %l0, 0x10, %l0
2042a34: a0 04 3f ff add %l0, -1, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
2042a38: 02 80 00 21 be 2042abc <fat_get_fat_cluster+0x10c> <== NEVER TAKEN
2042a3c: b8 0f 00 10 and %i4, %l0, %i4
2042a40: 80 a0 60 04 cmp %g1, 4
2042a44: 02 80 00 3e be 2042b3c <fat_get_fat_cluster+0x18c> <== NEVER TAKEN
2042a48: 80 a0 60 01 cmp %g1, 1
2042a4c: 02 80 00 29 be 2042af0 <fat_get_fat_cluster+0x140> <== ALWAYS TAKEN
2042a50: c2 07 bf fc ld [ %fp + -4 ], %g1
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
2042a54: 40 00 12 26 call 20472ec <__errno> <== NOT EXECUTED
2042a58: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2042a5c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2042a60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2042a64: 81 c7 e0 08 ret <== NOT EXECUTED
2042a68: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
2042a6c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
2042a70: b9 36 60 01 srl %i1, 1, %i4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
2042a74: e0 17 40 00 lduh [ %i5 ], %l0
/* 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) +
2042a78: b8 07 00 19 add %i4, %i1, %i4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
2042a7c: 90 10 00 1d mov %i5, %o0
/* 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) +
2042a80: b7 37 00 1b srl %i4, %i3, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
2042a84: 94 10 20 01 mov 1, %o2
/* 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) +
2042a88: b6 06 c0 01 add %i3, %g1, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
2042a8c: 96 07 bf fc add %fp, -4, %o3
2042a90: 7f ff 98 99 call 2028cf4 <fat_buf_access>
2042a94: 92 10 00 1b mov %i3, %o1
if (rc != RC_OK)
2042a98: b0 92 20 00 orcc %o0, 0, %i0
2042a9c: 22 bf ff e3 be,a 2042a28 <fat_get_fat_cluster+0x78> <== ALWAYS TAKEN
2042aa0: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
2042aa4: 81 c7 e0 08 ret <== NOT EXECUTED
2042aa8: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
2042aac: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED
2042ab0: b7 37 00 1b srl %i4, %i3, %i3 <== NOT EXECUTED
2042ab4: 10 bf ff d3 b 2042a00 <fat_get_fat_cluster+0x50> <== NOT EXECUTED
2042ab8: b6 06 c0 01 add %i3, %g1, %i3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
2042abc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
2042ac0: 07 00 00 3f sethi %hi(0xfc00), %g3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
2042ac4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
2042ac8: 86 10 e3 ff or %g3, 0x3ff, %g3 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
2042acc: c2 10 40 1c lduh [ %g1 + %i4 ], %g1 <== NOT EXECUTED
*ret_val = CF_LE_W(*ret_val);
2042ad0: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
2042ad4: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
2042ad8: 83 30 60 08 srl %g1, 8, %g1 <== NOT EXECUTED
2042adc: 82 08 40 03 and %g1, %g3, %g1 <== NOT EXECUTED
2042ae0: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
2042ae4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
break;
2042ae8: 81 c7 e0 08 ret <== NOT EXECUTED
2042aec: 81 e8 00 00 restore <== NOT EXECUTED
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
2042af0: c6 17 40 00 lduh [ %i5 ], %g3
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
2042af4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
if ( ofs == (fs_info->vol.bps - 1) )
2042af8: 86 00 ff ff add %g3, -1, %g3
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
2042afc: c2 08 80 1c ldub [ %g2 + %i4 ], %g1
if ( ofs == (fs_info->vol.bps - 1) )
2042b00: 80 a0 c0 1c cmp %g3, %i4
2042b04: 02 80 00 22 be 2042b8c <fat_get_fat_cluster+0x1dc> <== NEVER TAKEN
2042b08: c2 26 80 00 st %g1, [ %i2 ]
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
2042b0c: b8 00 80 1c add %g2, %i4, %i4
2042b10: c4 0f 20 01 ldub [ %i4 + 1 ], %g2
2042b14: 85 28 a0 08 sll %g2, 8, %g2
2042b18: 82 10 80 01 or %g2, %g1, %g1
2042b1c: c2 26 80 00 st %g1, [ %i2 ]
}
if ( FAT_CLUSTER_IS_ODD(cln) )
2042b20: 80 8e 60 01 btst 1, %i1
2042b24: 22 80 00 17 be,a 2042b80 <fat_get_fat_cluster+0x1d0>
2042b28: 82 08 6f ff and %g1, 0xfff, %g1
*ret_val = (*ret_val) >> FAT12_SHIFT;
2042b2c: 83 30 60 04 srl %g1, 4, %g1
2042b30: c2 26 80 00 st %g1, [ %i2 ]
2042b34: 81 c7 e0 08 ret
2042b38: 81 e8 00 00 restore
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
2042b3c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
2042b40: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2042b44: c2 00 40 1c ld [ %g1 + %i4 ], %g1 <== NOT EXECUTED
2042b48: 89 28 60 18 sll %g1, 0x18, %g4 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2042b4c: 85 30 60 18 srl %g1, 0x18, %g2 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2042b50: 87 30 60 08 srl %g1, 8, %g3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2042b54: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2042b58: 86 08 e0 ff and %g3, 0xff, %g3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2042b5c: 83 30 60 10 srl %g1, 0x10, %g1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2042b60: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2042b64: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2042b68: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
2042b6c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2042b70: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
*ret_val = CF_LE_L(*ret_val);
2042b74: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
break;
2042b78: 81 c7 e0 08 ret <== NOT EXECUTED
2042b7c: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
2042b80: c2 26 80 00 st %g1, [ %i2 ]
2042b84: 81 c7 e0 08 ret
2042b88: 81 e8 00 00 restore
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
2042b8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042b90: 92 06 e0 01 add %i3, 1, %o1 <== NOT EXECUTED
2042b94: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2042b98: 7f ff 98 57 call 2028cf4 <fat_buf_access> <== NOT EXECUTED
2042b9c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
2042ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2042ba4: 12 80 00 09 bne 2042bc8 <fat_get_fat_cluster+0x218> <== NOT EXECUTED
2042ba8: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
2042bac: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2042bb0: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2 <== NOT EXECUTED
2042bb4: c4 08 80 00 ldub [ %g2 ], %g2 <== NOT EXECUTED
2042bb8: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2042bbc: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
2042bc0: 10 bf ff d8 b 2042b20 <fat_get_fat_cluster+0x170> <== NOT EXECUTED
2042bc4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
2042bc8: 81 c7 e0 08 ret <== NOT EXECUTED
2042bcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02029368 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2029368: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
202936c: fa 06 20 20 ld [ %i0 + 0x20 ], %i5 <== 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))
2029370: 39 03 ff ff sethi %hi(0xffffc00), %i4 <== NOT EXECUTED
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
2029374: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== 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))
2029378: b8 17 23 ff or %i4, 0x3ff, %i4 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
202937c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2029380: 22 80 00 20 be,a 2029400 <fat_get_unique_ino+0x98> <== NOT EXECUTED
2029384: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
2029388: c6 07 60 68 ld [ %i5 + 0x68 ], %g3 <== NOT EXECUTED
202938c: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== NOT EXECUTED
2029390: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED
2029394: c8 48 c0 02 ldsb [ %g3 + %g2 ], %g4 <== NOT EXECUTED
2029398: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED
202939c: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED
20293a0: 89 39 00 0f sra %g4, %o7, %g4 <== NOT EXECUTED
20293a4: 80 89 20 01 btst 1, %g4 <== NOT EXECUTED
20293a8: 02 80 00 1d be 202941c <fat_get_unique_ino+0xb4> <== NOT EXECUTED
20293ac: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
20293b0: 10 80 00 0a b 20293d8 <fat_get_unique_ino+0x70> <== NOT EXECUTED
20293b4: 88 10 20 00 clr %g4 <== NOT EXECUTED
20293b8: 85 30 60 03 srl %g1, 3, %g2 <== NOT EXECUTED
20293bc: da 48 c0 02 ldsb [ %g3 + %g2 ], %o5 <== NOT EXECUTED
20293c0: 9e 08 60 07 and %g1, 7, %o7 <== NOT EXECUTED
20293c4: 98 00 c0 02 add %g3, %g2, %o4 <== NOT EXECUTED
20293c8: 9b 3b 40 0f sra %o5, %o7, %o5 <== NOT EXECUTED
20293cc: 80 8b 60 01 btst 1, %o5 <== NOT EXECUTED
20293d0: 02 80 00 13 be 202941c <fat_get_unique_ino+0xb4> <== NOT EXECUTED
20293d4: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
20293d8: 82 00 60 01 inc %g1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
20293dc: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
20293e0: 0a 80 00 03 bcs 20293ec <fat_get_unique_ino+0x84> <== NOT EXECUTED
20293e4: c2 27 60 6c st %g1, [ %i5 + 0x6c ] <== NOT EXECUTED
fs_info->index = 0;
20293e8: c0 27 60 6c clr [ %i5 + 0x6c ] <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
20293ec: 88 01 20 01 inc %g4 <== NOT EXECUTED
20293f0: 80 a1 00 09 cmp %g4, %o1 <== NOT EXECUTED
20293f4: 32 bf ff f1 bne,a 20293b8 <fat_get_unique_ino+0x50> <== NOT EXECUTED
20293f8: c2 07 60 6c ld [ %i5 + 0x6c ], %g1 <== 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))
20293fc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
2029400: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED
2029404: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED
2029408: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
202940c: 0a 80 00 0c bcs 202943c <fat_get_unique_ino+0xd4> <== NOT EXECUTED
2029410: b0 10 20 00 clr %i0 <== NOT EXECUTED
2029414: 81 c7 e0 08 ret <== NOT EXECUTED
2029418: 81 e8 00 00 restore <== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
202941c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2029420: 9f 28 40 0f sll %g1, %o7, %o7 <== NOT EXECUTED
2029424: 84 13 c0 02 or %o7, %g2, %g2 <== NOT EXECUTED
2029428: c4 2b 00 00 stb %g2, [ %o4 ] <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
202942c: f0 07 60 6c ld [ %i5 + 0x6c ], %i0 <== NOT EXECUTED
2029430: c2 07 60 74 ld [ %i5 + 0x74 ], %g1 <== NOT EXECUTED
2029434: 81 c7 e0 08 ret <== NOT EXECUTED
2029438: 91 ee 00 01 restore %i0, %g1, %o0 <== 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);
202943c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
2029440: 7f ff 83 3f call 200a13c <realloc> <== NOT EXECUTED
2029444: d2 27 60 70 st %o1, [ %i5 + 0x70 ] <== NOT EXECUTED
if (fs_info->uino != NULL)
2029448: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202944c: 12 80 00 04 bne 202945c <fat_get_unique_ino+0xf4> <== NOT EXECUTED
2029450: d0 27 60 68 st %o0, [ %i5 + 0x68 ] <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
2029454: 81 c7 e0 08 ret <== NOT EXECUTED
2029458: 91 e8 20 00 restore %g0, 0, %o0 <== 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);
if (fs_info->uino != NULL)
fs_info->index = fs_info->uino_pool_size;
202945c: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== NOT EXECUTED
2029460: 10 bf ff c7 b 202937c <fat_get_unique_ino+0x14> <== NOT EXECUTED
2029464: d2 27 60 6c st %o1, [ %i5 + 0x6c ] <== NOT EXECUTED
020292a4 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
20292a4: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
20292a8: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
uint32_t cur_cln = start_cln;
20292ac: f2 27 bf fc st %i1, [ %fp + -4 ]
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
20292b0: d0 17 60 06 lduh [ %i5 + 6 ], %o0
20292b4: 92 10 20 01 mov 1, %o1
20292b8: 7f ff 7d ec call 2008a68 <calloc>
20292bc: b8 10 00 18 mov %i0, %i4
if ( buf == NULL )
20292c0: b6 92 20 00 orcc %o0, 0, %i3
20292c4: 32 80 00 04 bne,a 20292d4 <fat_init_clusters_chain+0x30> <== ALWAYS TAKEN
20292c8: c4 07 60 0c ld [ %i5 + 0xc ], %g2
20292cc: 30 80 00 21 b,a 2029350 <fat_init_clusters_chain+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
20292d0: c4 07 60 0c ld [ %i5 + 0xc ], %g2
20292d4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
20292d8: 84 0e 40 02 and %i1, %g2, %g2
20292dc: 80 a0 80 01 cmp %g2, %g1
20292e0: 1a 80 00 12 bcc 2029328 <fat_init_clusters_chain+0x84>
20292e4: 94 10 00 1b mov %i3, %o2
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
20292e8: 92 10 00 19 mov %i1, %o1
20292ec: 7f ff ff d3 call 2029238 <fat_cluster_write>
20292f0: 90 10 00 1c mov %i4, %o0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
20292f4: 94 07 bf fc add %fp, -4, %o2
rtems_set_errno_and_return_minus_one( EIO );
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
20292f8: 80 a2 3f ff cmp %o0, -1
20292fc: 02 80 00 10 be 202933c <fat_init_clusters_chain+0x98> <== NEVER TAKEN
2029300: 90 10 00 1c mov %i4, %o0
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
2029304: 40 00 65 ab call 20429b0 <fat_get_fat_cluster>
2029308: d2 07 bf fc ld [ %fp + -4 ], %o1
if ( rc != RC_OK )
202930c: b0 92 20 00 orcc %o0, 0, %i0
2029310: 22 bf ff f0 be,a 20292d0 <fat_init_clusters_chain+0x2c> <== ALWAYS TAKEN
2029314: f2 07 bf fc ld [ %fp + -4 ], %i1
{
free(buf);
2029318: 7f ff 7e b3 call 2008de4 <free> <== NOT EXECUTED
202931c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
return rc;
2029320: 81 c7 e0 08 ret <== NOT EXECUTED
2029324: 81 e8 00 00 restore <== NOT EXECUTED
}
}
free(buf);
return rc;
2029328: b0 10 20 00 clr %i0
free(buf);
return rc;
}
}
free(buf);
202932c: 7f ff 7e ae call 2008de4 <free>
2029330: 90 10 00 1b mov %i3, %o0
return rc;
}
2029334: 81 c7 e0 08 ret
2029338: 81 e8 00 00 restore
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
if ( ret == -1 )
{
free(buf);
202933c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2029340: 7f ff 7e a9 call 2008de4 <free> <== NOT EXECUTED
2029344: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
2029348: 81 c7 e0 08 ret <== NOT EXECUTED
202934c: 81 e8 00 00 restore <== NOT EXECUTED
uint32_t cur_cln = start_cln;
char *buf;
buf = calloc(fs_info->vol.bpc, sizeof(char));
if ( buf == NULL )
rtems_set_errno_and_return_minus_one( EIO );
2029350: 40 00 77 e7 call 20472ec <__errno> <== NOT EXECUTED
2029354: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2029358: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
202935c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029360: 81 c7 e0 08 ret <== NOT EXECUTED
2029364: 81 e8 00 00 restore <== NOT EXECUTED
02029694 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2029694: 9d e3 bf 10 save %sp, -240, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2029698: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(mt_entry->dev, O_RDWR);
202969c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
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;
20296a0: c0 27 bf fc clr [ %fp + -4 ]
vol->fd = open(mt_entry->dev, O_RDWR);
20296a4: 7f ff 81 c9 call 2009dc8 <open>
20296a8: 92 10 20 02 mov 2, %o1
20296ac: d0 27 60 54 st %o0, [ %i5 + 0x54 ]
if (vol->fd < 0)
20296b0: 80 a2 20 00 cmp %o0, 0
20296b4: 06 80 01 dc bl 2029e24 <fat_init_volume_info+0x790> <== NEVER TAKEN
20296b8: b8 10 00 18 mov %i0, %i4
{
rtems_set_errno_and_return_minus_one(ENXIO);
}
rc = fstat(vol->fd, &stat_buf);
20296bc: 40 00 05 95 call 202ad10 <fstat>
20296c0: 92 07 bf a8 add %fp, -88, %o1
if (rc != 0)
20296c4: 80 a2 20 00 cmp %o0, 0
20296c8: 12 80 01 a0 bne 2029d48 <fat_init_volume_info+0x6b4> <== NEVER TAKEN
20296cc: c4 07 bf b4 ld [ %fp + -76 ], %g2
close(vol->fd);
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
20296d0: 03 00 00 3c sethi %hi(0xf000), %g1
20296d4: 84 08 80 01 and %g2, %g1, %g2
20296d8: 03 00 00 18 sethi %hi(0x6000), %g1
20296dc: 80 a0 80 01 cmp %g2, %g1
20296e0: 12 80 01 9b bne 2029d4c <fat_init_volume_info+0x6b8> <== NEVER TAKEN
20296e4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0
static inline int rtems_disk_fd_get_disk_device(
int fd,
const rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
20296e8: 94 07 60 58 add %i5, 0x58, %o2
20296ec: 13 10 01 10 sethi %hi(0x40044000), %o1
20296f0: 7f ff 7e 15 call 2008f44 <ioctl>
20296f4: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <RAM_END+0x3dc44209>
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) {
20296f8: b0 92 20 00 orcc %o0, 0, %i0
20296fc: 12 80 01 93 bne 2029d48 <fat_init_volume_info+0x6b4> <== NEVER TAKEN
2029700: 92 10 20 00 clr %o1
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);
2029704: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
2029708: 7f ff 73 fa call 20066f0 <rtems_bdbuf_read>
202970c: 94 07 bf fc add %fp, -4, %o2
if (sc != RTEMS_SUCCESSFUL)
2029710: 80 a2 20 00 cmp %o0, 0
2029714: 12 80 01 b0 bne 2029dd4 <fat_init_volume_info+0x740> <== NEVER TAKEN
2029718: d0 07 bf fc ld [ %fp + -4 ], %o0
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
202971c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2029720: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
2029724: c6 08 60 0c ldub [ %g1 + 0xc ], %g3
2029728: c4 2f bf a3 stb %g2, [ %fp + -93 ]
202972c: c4 08 60 11 ldub [ %g1 + 0x11 ], %g2
2029730: c6 2f bf a4 stb %g3, [ %fp + -92 ]
2029734: c6 08 60 12 ldub [ %g1 + 0x12 ], %g3
2029738: c4 2f bf a1 stb %g2, [ %fp + -95 ]
202973c: c4 08 60 23 ldub [ %g1 + 0x23 ], %g2
2029740: c6 2f bf a0 stb %g3, [ %fp + -96 ]
2029744: c6 08 60 26 ldub [ %g1 + 0x26 ], %g3
2029748: c4 2f bf 8f stb %g2, [ %fp + -113 ]
202974c: c4 08 60 27 ldub [ %g1 + 0x27 ], %g2
2029750: f2 08 60 0e ldub [ %g1 + 0xe ], %i1
2029754: c6 2f bf 9f stb %g3, [ %fp + -97 ]
2029758: c6 08 60 28 ldub [ %g1 + 0x28 ], %g3
202975c: c4 2f bf 97 stb %g2, [ %fp + -105 ]
2029760: c4 08 60 2c ldub [ %g1 + 0x2c ], %g2
2029764: f2 2f bf a2 stb %i1, [ %fp + -94 ]
2029768: c6 2f bf 87 stb %g3, [ %fp + -121 ]
202976c: c8 08 60 0f ldub [ %g1 + 0xf ], %g4
2029770: f6 08 60 0d ldub [ %g1 + 0xd ], %i3
2029774: f4 08 60 10 ldub [ %g1 + 0x10 ], %i2
2029778: f2 08 60 13 ldub [ %g1 + 0x13 ], %i1
202977c: e0 08 60 14 ldub [ %g1 + 0x14 ], %l0
2029780: e2 08 60 16 ldub [ %g1 + 0x16 ], %l1
2029784: e4 08 60 17 ldub [ %g1 + 0x17 ], %l2
2029788: ea 08 60 20 ldub [ %g1 + 0x20 ], %l5
202978c: ec 08 60 21 ldub [ %g1 + 0x21 ], %l6
2029790: ee 08 60 22 ldub [ %g1 + 0x22 ], %l7
2029794: e6 08 60 24 ldub [ %g1 + 0x24 ], %l3
2029798: e8 08 60 25 ldub [ %g1 + 0x25 ], %l4
202979c: c4 2f bf 9c stb %g2, [ %fp + -100 ]
20297a0: c6 08 60 2d ldub [ %g1 + 0x2d ], %g3
20297a4: c4 08 60 2e ldub [ %g1 + 0x2e ], %g2
20297a8: c6 2f bf 9b stb %g3, [ %fp + -101 ]
20297ac: c4 2f bf 9a stb %g2, [ %fp + -102 ]
20297b0: c6 08 60 2f ldub [ %g1 + 0x2f ], %g3
20297b4: c4 08 60 30 ldub [ %g1 + 0x30 ], %g2
20297b8: c2 08 60 31 ldub [ %g1 + 0x31 ], %g1
20297bc: c6 2f bf 7f stb %g3, [ %fp + -129 ]
sc = rtems_bdbuf_release( block);
20297c0: c8 27 bf 70 st %g4, [ %fp + -144 ]
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
20297c4: c4 2f bf 9e stb %g2, [ %fp + -98 ]
sc = rtems_bdbuf_release( block);
20297c8: 7f ff 74 6f call 2006984 <rtems_bdbuf_release>
20297cc: c2 2f bf 9d stb %g1, [ %fp + -99 ]
if (sc != RTEMS_SUCCESSFUL)
20297d0: 80 a2 20 00 cmp %o0, 0
20297d4: 12 80 01 80 bne 2029dd4 <fat_init_volume_info+0x740> <== NEVER TAKEN
20297d8: c8 07 bf 70 ld [ %fp + -144 ], %g4
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
20297dc: c2 0f bf a4 ldub [ %fp + -92 ], %g1
20297e0: c4 0f bf a3 ldub [ %fp + -93 ], %g2
20297e4: 83 28 60 08 sll %g1, 8, %g1
20297e8: 92 10 40 02 or %g1, %g2, %o1
20297ec: d2 37 40 00 sth %o1, [ %i5 ]
if ( (vol->bps != 512) &&
20297f0: 93 2a 60 10 sll %o1, 0x10, %o1
20297f4: 83 32 60 10 srl %o1, 0x10, %g1
20297f8: 80 a0 64 00 cmp %g1, 0x400
20297fc: 12 80 00 c1 bne 2029b00 <fat_init_volume_info+0x46c> <== ALWAYS TAKEN
2029800: 80 a0 62 00 cmp %g1, 0x200
{
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;
2029804: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
2029808: 80 88 60 01 btst 1, %g1
202980c: 12 80 00 0a bne 2029834 <fat_init_volume_info+0x1a0> <== ALWAYS TAKEN
2029810: c0 2f 60 03 clrb [ %i5 + 3 ]
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2029814: 10 80 00 03 b 2029820 <fat_init_volume_info+0x18c> <== NOT EXECUTED
2029818: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
202981c: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
2029820: 83 38 60 01 sra %g1, 1, %g1 <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
2029824: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2029828: 02 bf ff fd be 202981c <fat_init_volume_info+0x188> <== NOT EXECUTED
202982c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED
2029830: c4 2f 60 03 stb %g2, [ %i5 + 3 ] <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
2029834: c0 2f 60 02 clrb [ %i5 + 2 ]
2029838: 93 32 60 10 srl %o1, 0x10, %o1
202983c: 84 10 20 01 mov 1, %g2
2029840: 80 8a 60 01 btst 1, %o1
2029844: 02 80 00 05 be 2029858 <fat_init_volume_info+0x1c4> <== ALWAYS TAKEN
2029848: 82 10 00 09 mov %o1, %g1
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
202984c: 10 80 00 09 b 2029870 <fat_init_volume_info+0x1dc> <== NOT EXECUTED
2029850: f6 2f 60 04 stb %i3, [ %i5 + 4 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
2029854: 84 10 00 03 mov %g3, %g2
i >>= 1, vol->sec_log2++);
2029858: 83 38 60 01 sra %g1, 1, %g1
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;
202985c: 80 88 60 01 btst 1, %g1
2029860: 02 bf ff fd be 2029854 <fat_init_volume_info+0x1c0>
2029864: 86 00 a0 01 add %g2, 1, %g3
2029868: c4 2f 60 02 stb %g2, [ %i5 + 2 ]
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
202986c: f6 2f 60 04 stb %i3, [ %i5 + 4 ]
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
2029870: b6 8e e0 ff andcc %i3, 0xff, %i3
2029874: 02 80 01 40 be 2029d74 <fat_init_volume_info+0x6e0> <== NEVER TAKEN
2029878: 82 10 00 1b mov %i3, %g1
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
202987c: c0 2f 60 05 clrb [ %i5 + 5 ]
2029880: 80 8e e0 01 btst 1, %i3
2029884: 12 80 00 0b bne 20298b0 <fat_init_volume_info+0x21c> <== NEVER TAKEN
2029888: 84 10 20 00 clr %g2
202988c: 10 80 00 03 b 2029898 <fat_init_volume_info+0x204>
2029890: 84 10 20 01 mov 1, %g2
2029894: 84 10 00 03 mov %g3, %g2 <== NOT EXECUTED
i >>= 1, vol->spc_log2++);
2029898: 83 38 60 01 sra %g1, 1, %g1
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
202989c: 80 88 60 01 btst 1, %g1
20298a0: 02 bf ff fd be 2029894 <fat_init_volume_info+0x200> <== NEVER TAKEN
20298a4: 86 00 a0 01 add %g2, 1, %g3
20298a8: c4 2f 60 05 stb %g2, [ %i5 + 5 ]
20298ac: 84 08 a0 ff and %g2, 0xff, %g2
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)
20298b0: 85 2a 40 02 sll %o1, %g2, %g2
20298b4: c4 37 60 06 sth %g2, [ %i5 + 6 ]
20298b8: 83 28 a0 10 sll %g2, 0x10, %g1
20298bc: 05 00 00 20 sethi %hi(0x8000), %g2
20298c0: 83 30 60 10 srl %g1, 0x10, %g1
20298c4: 80 a0 40 02 cmp %g1, %g2
20298c8: 18 80 01 2b bgu 2029d74 <fat_init_volume_info+0x6e0> <== NEVER TAKEN
20298cc: 80 88 60 01 btst 1, %g1
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
20298d0: c0 2f 60 08 clrb [ %i5 + 8 ]
20298d4: 02 80 00 05 be 20298e8 <fat_init_volume_info+0x254> <== ALWAYS TAKEN
20298d8: 84 10 20 01 mov 1, %g2
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);
20298dc: 10 80 00 09 b 2029900 <fat_init_volume_info+0x26c> <== NOT EXECUTED
20298e0: c6 0f bf a2 ldub [ %fp + -94 ], %g3 <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
20298e4: 84 10 00 03 mov %g3, %g2
i >>= 1, vol->bpc_log2++);
20298e8: 83 38 60 01 sra %g1, 1, %g1
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
20298ec: 80 88 60 01 btst 1, %g1
20298f0: 02 bf ff fd be 20298e4 <fat_init_volume_info+0x250>
20298f4: 86 00 a0 01 add %g2, 1, %g3
20298f8: c4 2f 60 08 stb %g2, [ %i5 + 8 ]
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
20298fc: c6 0f bf a2 ldub [ %fp + -94 ], %g3
2029900: 88 09 20 ff and %g4, 0xff, %g4
2029904: 89 29 20 08 sll %g4, 8, %g4
2029908: 86 11 00 03 or %g4, %g3, %g3
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
202990c: c4 0f bf a0 ldub [ %fp + -96 ], %g2
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);
2029910: c6 27 bf a4 st %g3, [ %fp + -92 ]
2029914: c6 37 60 14 sth %g3, [ %i5 + 0x14 ]
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
2029918: c6 0f bf a1 ldub [ %fp + -95 ], %g3
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
202991c: 82 02 7f ff add %o1, -1, %g1
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);
2029920: 85 28 a0 08 sll %g2, 8, %g2
2029924: 84 10 80 03 or %g2, %g3, %g2
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2029928: 87 28 a0 10 sll %g2, 0x10, %g3
202992c: 87 30 e0 0b srl %g3, 0xb, %g3
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);
2029930: c4 37 60 20 sth %g2, [ %i5 + 0x20 ]
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
2029934: 90 00 c0 01 add %g3, %g1, %o0
2029938: 40 00 dc 5b call 2060aa4 <.div>
202993c: f4 2f 60 09 stb %i2, [ %i5 + 9 ]
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
2029940: c4 0f 60 02 ldub [ %i5 + 2 ], %g2
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)) /
2029944: d0 27 60 24 st %o0, [ %i5 + 0x24 ]
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
2029948: 85 2a 00 02 sll %o0, %g2, %g2
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)) /
202994c: 82 10 00 08 mov %o0, %g1
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
2029950: a4 0c a0 ff and %l2, 0xff, %l2
2029954: a2 0c 60 ff and %l1, 0xff, %l1
2029958: a5 2c a0 08 sll %l2, 8, %l2
202995c: a2 14 80 11 or %l2, %l1, %l1
2029960: 91 2c 60 10 sll %l1, 0x10, %o0
2029964: 80 a2 20 00 cmp %o0, 0
2029968: 02 80 00 71 be 2029b2c <fat_init_volume_info+0x498> <== NEVER TAKEN
202996c: c4 27 60 28 st %g2, [ %i5 + 0x28 ]
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
2029970: 91 32 20 10 srl %o0, 0x10, %o0
2029974: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
2029978: c2 27 bf 74 st %g1, [ %fp + -140 ]
202997c: 7f ff 65 59 call 2002ee0 <.umul>
2029980: 92 0e a0 ff and %i2, 0xff, %o1
2029984: c2 07 bf 74 ld [ %fp + -140 ], %g1
2029988: c6 07 bf a4 ld [ %fp + -92 ], %g3
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)
202998c: b2 0e 60 ff and %i1, 0xff, %i1
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 +
2029990: 85 28 e0 10 sll %g3, 0x10, %g2
2029994: 85 30 a0 10 srl %g2, 0x10, %g2
2029998: 84 02 00 02 add %o0, %g2, %g2
202999c: 82 00 80 01 add %g2, %g1, %g1
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
20299a0: c4 27 60 1c st %g2, [ %i5 + 0x1c ]
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
20299a4: 90 0c 20 ff and %l0, 0xff, %o0
20299a8: 91 2a 20 08 sll %o0, 8, %o0
20299ac: 90 12 00 19 or %o0, %i1, %o0
20299b0: 91 2a 20 10 sll %o0, 0x10, %o0
20299b4: 80 a2 20 00 cmp %o0, 0
20299b8: 02 80 00 d2 be 2029d00 <fat_init_volume_info+0x66c> <== NEVER TAKEN
20299bc: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
20299c0: 91 32 20 10 srl %o0, 0x10, %o0
20299c4: d0 27 60 2c st %o0, [ %i5 + 0x2c ]
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;
20299c8: 90 22 00 01 sub %o0, %g1, %o0
20299cc: 40 00 dc 34 call 2060a9c <.udiv>
20299d0: 92 10 00 1b mov %i3, %o1
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
20299d4: 80 a2 2f f4 cmp %o0, 0xff4
20299d8: 18 80 00 61 bgu 2029b5c <fat_init_volume_info+0x4c8> <== NEVER TAKEN
20299dc: d0 27 60 34 st %o0, [ %i5 + 0x34 ]
{
vol->type = FAT_FAT12;
20299e0: 82 10 20 01 mov 1, %g1
20299e4: c2 2f 60 0a stb %g1, [ %i5 + 0xa ]
vol->mask = FAT_FAT12_MASK;
20299e8: 82 10 2f ff mov 0xfff, %g1
20299ec: c2 27 60 0c st %g1, [ %i5 + 0xc ]
vol->eoc_val = FAT_FAT12_EOC;
20299f0: 82 10 2f f8 mov 0xff8, %g1
20299f4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
20299f8: 82 10 3f ff mov -1, %g1
}
}
}
else
{
vol->rdir_cl = 0;
20299fc: c0 27 60 38 clr [ %i5 + 0x38 ]
vol->mirror = 0;
2029a00: c0 2f 60 48 clrb [ %i5 + 0x48 ]
vol->afat = 0;
2029a04: c0 2f 60 50 clrb [ %i5 + 0x50 ]
vol->free_cls = 0xFFFFFFFF;
2029a08: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
vol->next_cl = 0xFFFFFFFF;
2029a0c: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2029a10: 7f ff fd 3f call 2028f0c <fat_buf_release>
2029a14: d0 07 20 20 ld [ %i4 + 0x20 ], %o0
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
2029a18: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
2029a1c: 7f ff 65 31 call 2002ee0 <.umul>
2029a20: d0 0f 60 50 ldub [ %i5 + 0x50 ], %o0
2029a24: c2 17 60 14 lduh [ %i5 + 0x14 ], %g1
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
2029a28: 92 10 20 0c mov 0xc, %o1
vol->next_cl = 0xFFFFFFFF;
}
_fat_block_release(mt_entry);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
2029a2c: 82 02 00 01 add %o0, %g1, %g1
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
2029a30: 90 10 20 02 mov 2, %o0
2029a34: 7f ff 7c 0d call 2008a68 <calloc>
2029a38: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
if ( fs_info->vhash == NULL )
2029a3c: 80 a2 20 00 cmp %o0, 0
2029a40: 02 80 01 13 be 2029e8c <fat_init_volume_info+0x7f8> <== NEVER TAKEN
2029a44: d0 27 60 60 st %o0, [ %i5 + 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 );
2029a48: 86 02 20 04 add %o0, 4, %g3
2029a4c: 82 02 20 0c add %o0, 0xc, %g1
2029a50: 84 02 20 10 add %o0, 0x10, %g2
head->next = tail;
2029a54: c6 22 00 00 st %g3, [ %o0 ]
head->previous = NULL;
2029a58: c0 22 20 04 clr [ %o0 + 4 ]
tail->previous = head;
2029a5c: d0 22 20 08 st %o0, [ %o0 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2029a60: c4 22 20 0c st %g2, [ %o0 + 0xc ]
head->previous = NULL;
2029a64: c0 22 20 10 clr [ %o0 + 0x10 ]
tail->previous = head;
2029a68: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
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));
2029a6c: 92 10 20 0c mov 0xc, %o1
2029a70: 7f ff 7b fe call 2008a68 <calloc>
2029a74: 90 10 20 02 mov 2, %o0
if ( fs_info->rhash == NULL )
2029a78: 80 a2 20 00 cmp %o0, 0
2029a7c: 02 80 01 0d be 2029eb0 <fat_init_volume_info+0x81c> <== NEVER TAKEN
2029a80: d0 27 60 64 st %o0, [ %i5 + 0x64 ]
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 );
2029a84: 82 02 20 0c add %o0, 0xc, %g1
2029a88: 84 02 20 04 add %o0, 4, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2029a8c: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
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 );
2029a90: 82 02 20 10 add %o0, 0x10, %g1
head->next = tail;
2029a94: c4 22 00 00 st %g2, [ %o0 ]
head->previous = NULL;
2029a98: c0 22 20 04 clr [ %o0 + 4 ]
tail->previous = head;
2029a9c: d0 22 20 08 st %o0, [ %o0 + 8 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
2029aa0: c0 22 20 10 clr [ %o0 + 0x10 ]
}
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;
2029aa4: c4 07 60 2c ld [ %i5 + 0x2c ], %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2029aa8: c2 22 20 0c st %g1, [ %o0 + 0xc ]
2029aac: c2 0f 60 03 ldub [ %i5 + 3 ], %g1
fs_info->index = 0;
2029ab0: c0 27 60 6c clr [ %i5 + 0x6c ]
}
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;
2029ab4: 83 28 80 01 sll %g2, %g1, %g1
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;
2029ab8: 84 10 21 00 mov 0x100, %g2
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2029abc: 83 28 60 04 sll %g1, 4, %g1
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;
2029ac0: c4 27 60 70 st %g2, [ %i5 + 0x70 ]
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2029ac4: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
2029ac8: 90 10 21 00 mov 0x100, %o0
2029acc: 7f ff 7b e7 call 2008a68 <calloc>
2029ad0: 92 10 20 01 mov 1, %o1
if ( fs_info->uino == NULL )
2029ad4: 80 a2 20 00 cmp %o0, 0
2029ad8: 02 80 00 d9 be 2029e3c <fat_init_volume_info+0x7a8> <== NEVER TAKEN
2029adc: d0 27 60 68 st %o0, [ %i5 + 0x68 ]
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));
2029ae0: d0 17 40 00 lduh [ %i5 ], %o0
2029ae4: 7f ff 7b e1 call 2008a68 <calloc>
2029ae8: 92 10 20 01 mov 1, %o1
if (fs_info->sec_buf == NULL)
2029aec: 80 a2 20 00 cmp %o0, 0
2029af0: 02 80 00 aa be 2029d98 <fat_init_volume_info+0x704> <== NEVER TAKEN
2029af4: d0 27 60 84 st %o0, [ %i5 + 0x84 ]
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
return RC_OK;
}
2029af8: 81 c7 e0 08 ret
2029afc: 81 e8 00 00 restore
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
if ( (vol->bps != 512) &&
2029b00: 22 bf ff 42 be,a 2029808 <fat_init_volume_info+0x174> <== ALWAYS TAKEN
2029b04: 83 32 60 19 srl %o1, 0x19, %g1
(vol->bps != 1024) &&
2029b08: 80 a0 68 00 cmp %g1, 0x800 <== NOT EXECUTED
2029b0c: 22 bf ff 42 be,a 2029814 <fat_init_volume_info+0x180> <== NOT EXECUTED
2029b10: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
(vol->bps != 2048) &&
2029b14: 05 00 00 04 sethi %hi(0x1000), %g2 <== NOT EXECUTED
2029b18: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2029b1c: 12 80 00 96 bne 2029d74 <fat_init_volume_info+0x6e0> <== NOT EXECUTED
2029b20: 83 32 60 19 srl %o1, 0x19, %g1 <== NOT EXECUTED
2029b24: 10 bf ff 3f b 2029820 <fat_init_volume_info+0x18c> <== NOT EXECUTED
2029b28: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
2029b2c: c4 0f bf 9f ldub [ %fp + -97 ], %g2 <== NOT EXECUTED
2029b30: c6 0f bf 97 ldub [ %fp + -105 ], %g3 <== NOT EXECUTED
2029b34: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
2029b38: 90 0d 20 ff and %l4, 0xff, %o0 <== NOT EXECUTED
2029b3c: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED
2029b40: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED
2029b44: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
2029b48: 85 28 e0 18 sll %g3, 0x18, %g2 <== NOT EXECUTED
2029b4c: 90 12 00 13 or %o0, %l3, %o0 <== NOT EXECUTED
2029b50: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
2029b54: 10 bf ff 89 b 2029978 <fat_init_volume_info+0x2e4> <== NOT EXECUTED
2029b58: d0 27 60 18 st %o0, [ %i5 + 0x18 ] <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
2029b5c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED
2029b60: 84 10 63 f4 or %g1, 0x3f4, %g2 ! fff4 <PROM_START+0xfff4> <== NOT EXECUTED
2029b64: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED
2029b68: 08 80 00 72 bleu 2029d30 <fat_init_volume_info+0x69c> <== NOT EXECUTED
2029b6c: 84 10 63 ff or %g1, 0x3ff, %g2 <== NOT EXECUTED
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
2029b70: c6 0f bf 87 ldub [ %fp + -121 ], %g3 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029b74: f6 0f bf 9b ldub [ %fp + -101 ], %i3 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
2029b78: 82 08 ff 80 and %g3, -128, %g1 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029b7c: f4 0f bf 9c ldub [ %fp + -100 ], %i2 <== NOT EXECUTED
2029b80: c6 0f bf 9a ldub [ %fp + -102 ], %g3 <== NOT EXECUTED
2029b84: f2 0f bf 7f ldub [ %fp + -129 ], %i1 <== NOT EXECUTED
2029b88: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
2029b8c: 05 03 ff ff sethi %hi(0xffffc00), %g2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029b90: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
2029b94: 88 10 a3 ff or %g2, 0x3ff, %g4 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029b98: 86 16 c0 03 or %i3, %g3, %g3 <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
vol->mask = FAT_FAT32_MASK;
vol->eoc_val = FAT_FAT32_EOC;
2029b9c: 84 10 a3 f8 or %g2, 0x3f8, %g2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029ba0: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED
2029ba4: b7 2e 60 18 sll %i1, 0x18, %i3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
2029ba8: b4 10 20 04 mov 4, %i2 <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029bac: 86 10 c0 1b or %g3, %i3, %g3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
2029bb0: f4 2f 60 0a stb %i2, [ %i5 + 0xa ] <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
2029bb4: c8 27 60 0c st %g4, [ %i5 + 0xc ] <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
2029bb8: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
2029bbc: c6 27 60 38 st %g3, [ %i5 + 0x38 ] <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
2029bc0: 80 88 60 80 btst 0x80, %g1 <== NOT EXECUTED
2029bc4: 02 80 00 6a be 2029d6c <fat_init_volume_info+0x6d8> <== NOT EXECUTED
2029bc8: c2 2f 60 48 stb %g1, [ %i5 + 0x48 ] <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
2029bcc: c4 0f bf 87 ldub [ %fp + -121 ], %g2 <== NOT EXECUTED
2029bd0: 82 08 a0 0f and %g2, 0xf, %g1 <== NOT EXECUTED
2029bd4: c2 2f 60 50 stb %g1, [ %i5 + 0x50 ] <== NOT EXECUTED
else
vol->afat = 0;
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
2029bd8: d2 0f bf 9d ldub [ %fp + -99 ], %o1 <== NOT EXECUTED
2029bdc: c2 0f bf 9e ldub [ %fp + -98 ], %g1 <== NOT EXECUTED
2029be0: 93 2a 60 08 sll %o1, 8, %o1 <== NOT EXECUTED
2029be4: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
2029be8: d2 37 60 3c sth %o1, [ %i5 + 0x3c ] <== NOT EXECUTED
if( vol->info_sec == 0 )
2029bec: 93 2a 60 10 sll %o1, 0x10, %o1 <== NOT EXECUTED
2029bf0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED
2029bf4: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2029bf8: 02 80 00 5f be 2029d74 <fat_init_volume_info+0x6e0> <== NOT EXECUTED
2029bfc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
2029c00: 94 10 20 00 clr %o2 <== NOT EXECUTED
2029c04: 96 10 20 04 mov 4, %o3 <== NOT EXECUTED
2029c08: 7f ff fd 1c call 2029078 <_fat_block_read> <== NOT EXECUTED
2029c0c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
2029c10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2029c14: 06 80 00 b2 bl 2029edc <fat_init_volume_info+0x848> <== NOT EXECUTED
2029c18: c2 0f bf f3 ldub [ %fp + -13 ], %g1 <== NOT EXECUTED
{
close(vol->fd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
2029c1c: c4 0f bf f1 ldub [ %fp + -15 ], %g2 <== NOT EXECUTED
2029c20: c8 0f bf f2 ldub [ %fp + -14 ], %g4 <== NOT EXECUTED
2029c24: c6 0f bf f0 ldub [ %fp + -16 ], %g3 <== NOT EXECUTED
2029c28: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED
2029c2c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2029c30: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
2029c34: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED
2029c38: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
2029c3c: 84 10 80 01 or %g2, %g1, %g2 <== NOT EXECUTED
2029c40: 03 10 58 54 sethi %hi(0x41615000), %g1 <== NOT EXECUTED
2029c44: 82 10 62 52 or %g1, 0x252, %g1 ! 41615252 <RAM_END+0x3f215252><== NOT EXECUTED
2029c48: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2029c4c: 12 80 00 6b bne 2029df8 <fat_init_volume_info+0x764> <== NOT EXECUTED
2029c50: 94 10 21 e4 mov 0x1e4, %o2 <== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
2029c54: d2 17 60 3c lduh [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
2029c58: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2029c5c: 96 10 20 0c mov 0xc, %o3 <== NOT EXECUTED
2029c60: 7f ff fd 06 call 2029078 <_fat_block_read> <== NOT EXECUTED
2029c64: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
2029c68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2029c6c: 06 80 00 81 bl 2029e70 <fat_init_volume_info+0x7dc> <== NOT EXECUTED
2029c70: c6 0f bf f5 ldub [ %fp + -11 ], %g3 <== NOT EXECUTED
_fat_block_release(mt_entry);
close(vol->fd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2029c74: de 0f bf f6 ldub [ %fp + -10 ], %o7 <== NOT EXECUTED
2029c78: f2 0f bf f4 ldub [ %fp + -12 ], %i1 <== NOT EXECUTED
2029c7c: f4 0f bf f7 ldub [ %fp + -9 ], %i2 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2029c80: f6 0f bf f9 ldub [ %fp + -7 ], %i3 <== NOT EXECUTED
2029c84: c2 0f bf fa ldub [ %fp + -6 ], %g1 <== NOT EXECUTED
2029c88: c8 0f bf f8 ldub [ %fp + -8 ], %g4 <== NOT EXECUTED
2029c8c: c4 0f bf fb ldub [ %fp + -5 ], %g2 <== NOT EXECUTED
_fat_block_release(mt_entry);
close(vol->fd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2029c90: 9f 2b e0 10 sll %o7, 0x10, %o7 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2029c94: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED
_fat_block_release(mt_entry);
close(vol->fd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2029c98: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
2029c9c: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED
2029ca0: 86 10 c0 0f or %g3, %o7, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2029ca4: b7 2e e0 08 sll %i3, 8, %i3 <== NOT EXECUTED
_fat_block_release(mt_entry);
close(vol->fd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2029ca8: 86 10 c0 19 or %g3, %i1, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2029cac: 83 28 60 10 sll %g1, 0x10, %g1 <== NOT EXECUTED
_fat_block_release(mt_entry);
close(vol->fd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2029cb0: 86 10 c0 1a or %g3, %i2, %g3 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2029cb4: 82 16 c0 01 or %i3, %g1, %g1 <== NOT EXECUTED
2029cb8: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
2029cbc: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
_fat_block_release(mt_entry);
close(vol->fd);
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
2029cc0: c6 27 60 40 st %g3, [ %i5 + 0x40 ] <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
2029cc4: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
2029cc8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2029ccc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2029cd0: 7f ff fd f9 call 20294b4 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
2029cd4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
2029cd8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2029cdc: 02 bf ff 4d be 2029a10 <fat_init_volume_info+0x37c> <== NOT EXECUTED
2029ce0: 01 00 00 00 nop <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2029ce4: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED
2029ce8: 7f ff fc 89 call 2028f0c <fat_buf_release> <== NOT EXECUTED
2029cec: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
0xFFFFFFFF);
if ( rc != RC_OK )
{
_fat_block_release(mt_entry);
close(vol->fd);
2029cf0: 7f ff 7b 81 call 2008af4 <close> <== NOT EXECUTED
2029cf4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
return rc;
2029cf8: 81 c7 e0 08 ret <== NOT EXECUTED
2029cfc: 81 e8 00 00 restore <== NOT EXECUTED
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
2029d00: f2 0f bf 8f ldub [ %fp + -113 ], %i1 <== NOT EXECUTED
2029d04: 90 0d a0 ff and %l6, 0xff, %o0 <== NOT EXECUTED
2029d08: ae 0d e0 ff and %l7, 0xff, %l7 <== NOT EXECUTED
2029d0c: 91 2a 20 08 sll %o0, 8, %o0 <== NOT EXECUTED
2029d10: af 2d e0 10 sll %l7, 0x10, %l7 <== NOT EXECUTED
2029d14: aa 0d 60 ff and %l5, 0xff, %l5 <== NOT EXECUTED
2029d18: 90 12 00 17 or %o0, %l7, %o0 <== NOT EXECUTED
2029d1c: 85 2e 60 18 sll %i1, 0x18, %g2 <== NOT EXECUTED
2029d20: 90 12 00 15 or %o0, %l5, %o0 <== NOT EXECUTED
2029d24: 90 12 00 02 or %o0, %g2, %o0 <== NOT EXECUTED
2029d28: 10 bf ff 28 b 20299c8 <fat_init_volume_info+0x334> <== NOT EXECUTED
2029d2c: d0 27 60 2c st %o0, [ %i5 + 0x2c ] <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
2029d30: 86 10 20 02 mov 2, %g3 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
2029d34: 82 10 63 f8 or %g1, 0x3f8, %g1 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
2029d38: c6 2f 60 0a stb %g3, [ %i5 + 0xa ] <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
2029d3c: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
2029d40: 10 bf ff 2e b 20299f8 <fat_init_volume_info+0x364> <== NOT EXECUTED
2029d44: c2 27 60 10 st %g1, [ %i5 + 0x10 ] <== NOT EXECUTED
}
/* 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) {
close(vol->fd);
2029d48: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029d4c: 7f ff 7b 6a call 2008af4 <close> <== NOT EXECUTED
2029d50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
2029d54: 40 00 75 66 call 20472ec <__errno> <== NOT EXECUTED
2029d58: 01 00 00 00 nop <== NOT EXECUTED
2029d5c: 82 10 20 06 mov 6, %g1 ! 6 <PROM_START+0x6> <== NOT EXECUTED
2029d60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029d64: 81 c7 e0 08 ret <== NOT EXECUTED
2029d68: 81 e8 00 00 restore <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
if (vol->mirror)
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
else
vol->afat = 0;
2029d6c: 10 bf ff 9b b 2029bd8 <fat_init_volume_info+0x544> <== NOT EXECUTED
2029d70: c0 2f 60 50 clrb [ %i5 + 0x50 ] <== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
if( vol->info_sec == 0 )
{
close(vol->fd);
2029d74: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029d78: 7f ff 7b 5f call 2008af4 <close> <== NOT EXECUTED
2029d7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
2029d80: 40 00 75 5b call 20472ec <__errno> <== NOT EXECUTED
2029d84: 01 00 00 00 nop <== NOT EXECUTED
2029d88: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2029d8c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029d90: 81 c7 e0 08 ret <== NOT EXECUTED
2029d94: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
if (fs_info->sec_buf == NULL)
{
close(vol->fd);
2029d98: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029d9c: 7f ff 7b 56 call 2008af4 <close> <== NOT EXECUTED
2029da0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
2029da4: 7f ff 7c 10 call 2008de4 <free> <== NOT EXECUTED
2029da8: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
2029dac: 7f ff 7c 0e call 2008de4 <free> <== NOT EXECUTED
2029db0: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
free(fs_info->uino);
2029db4: 7f ff 7c 0c call 2008de4 <free> <== NOT EXECUTED
2029db8: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2029dbc: 40 00 75 4c call 20472ec <__errno> <== NOT EXECUTED
2029dc0: 01 00 00 00 nop <== NOT EXECUTED
2029dc4: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2029dc8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return RC_OK;
}
2029dcc: 81 c7 e0 08 ret <== NOT EXECUTED
2029dd0: 81 e8 00 00 restore <== NOT EXECUTED
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
sc = rtems_bdbuf_release( block);
if (sc != RTEMS_SUCCESSFUL)
{
close(vol->fd);
2029dd4: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029dd8: 7f ff 7b 47 call 2008af4 <close> <== NOT EXECUTED
2029ddc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
2029de0: 40 00 75 43 call 20472ec <__errno> <== NOT EXECUTED
2029de4: 01 00 00 00 nop <== NOT EXECUTED
2029de8: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2029dec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029df0: 81 c7 e0 08 ret <== NOT EXECUTED
2029df4: 81 e8 00 00 restore <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2029df8: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED
2029dfc: 7f ff fc 44 call 2028f0c <fat_buf_release> <== NOT EXECUTED
2029e00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(mt_entry);
close(vol->fd);
2029e04: 7f ff 7b 3c call 2008af4 <close> <== NOT EXECUTED
2029e08: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
2029e0c: 40 00 75 38 call 20472ec <__errno> <== NOT EXECUTED
2029e10: 01 00 00 00 nop <== NOT EXECUTED
2029e14: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2029e18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029e1c: 81 c7 e0 08 ret <== NOT EXECUTED
2029e20: 81 e8 00 00 restore <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(mt_entry->dev, O_RDWR);
if (vol->fd < 0)
{
rtems_set_errno_and_return_minus_one(ENXIO);
2029e24: 40 00 75 32 call 20472ec <__errno> <== NOT EXECUTED
2029e28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2029e2c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED
2029e30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029e34: 81 c7 e0 08 ret <== NOT EXECUTED
2029e38: 81 e8 00 00 restore <== 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);
2029e3c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029e40: 7f ff 7b 2d call 2008af4 <close> <== NOT EXECUTED
2029e44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
2029e48: 7f ff 7b e7 call 2008de4 <free> <== NOT EXECUTED
2029e4c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
free(fs_info->rhash);
2029e50: 7f ff 7b e5 call 2008de4 <free> <== NOT EXECUTED
2029e54: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2029e58: 40 00 75 25 call 20472ec <__errno> <== NOT EXECUTED
2029e5c: 01 00 00 00 nop <== NOT EXECUTED
2029e60: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2029e64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029e68: 81 c7 e0 08 ret <== NOT EXECUTED
2029e6c: 81 e8 00 00 restore <== NOT EXECUTED
int
_fat_block_release(
rtems_filesystem_mount_table_entry_t *mt_entry)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
return fat_buf_release(fs_info);
2029e70: d0 07 20 20 ld [ %i4 + 0x20 ], %o0 <== NOT EXECUTED
2029e74: 7f ff fc 26 call 2028f0c <fat_buf_release> <== NOT EXECUTED
2029e78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(mt_entry);
close(vol->fd);
2029e7c: 7f ff 7b 1e call 2008af4 <close> <== NOT EXECUTED
2029e80: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
return -1;
2029e84: 81 c7 e0 08 ret <== NOT EXECUTED
2029e88: 81 e8 00 00 restore <== 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);
2029e8c: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029e90: 7f ff 7b 19 call 2008af4 <close> <== NOT EXECUTED
2029e94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2029e98: 40 00 75 15 call 20472ec <__errno> <== NOT EXECUTED
2029e9c: 01 00 00 00 nop <== NOT EXECUTED
2029ea0: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2029ea4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029ea8: 81 c7 e0 08 ret <== NOT EXECUTED
2029eac: 81 e8 00 00 restore <== 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);
2029eb0: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029eb4: 7f ff 7b 10 call 2008af4 <close> <== NOT EXECUTED
2029eb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info->vhash);
2029ebc: 7f ff 7b ca call 2008de4 <free> <== NOT EXECUTED
2029ec0: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2029ec4: 40 00 75 0a call 20472ec <__errno> <== NOT EXECUTED
2029ec8: 01 00 00 00 nop <== NOT EXECUTED
2029ecc: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2029ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2029ed4: 81 c7 e0 08 ret <== NOT EXECUTED
2029ed8: 81 e8 00 00 restore <== NOT EXECUTED
{
ret = _fat_block_read(mt_entry, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
{
close(vol->fd);
2029edc: d0 07 60 54 ld [ %i5 + 0x54 ], %o0 <== NOT EXECUTED
2029ee0: 7f ff 7b 05 call 2008af4 <close> <== NOT EXECUTED
2029ee4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
2029ee8: 81 c7 e0 08 ret <== NOT EXECUTED
2029eec: 81 e8 00 00 restore <== NOT EXECUTED
02042fbc <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
2042fbc: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2042fc0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
uint32_t cl4find = 2;
uint32_t next_cln = 0;
2042fc4: c0 27 bf fc clr [ %fp + -4 ]
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
2042fc8: e6 04 20 34 ld [ %l0 + 0x34 ], %l3
uint32_t i = 2;
*cls_added = 0;
2042fcc: c0 26 c0 00 clr [ %i3 ]
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
2042fd0: ba 10 00 18 mov %i0, %i5
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
2042fd4: 80 a6 a0 00 cmp %i2, 0
2042fd8: 02 80 00 46 be 20430f0 <fat_scan_fat_for_free_clusters+0x134><== NEVER TAKEN
2042fdc: b0 10 20 00 clr %i0
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
2042fe0: e2 04 20 44 ld [ %l0 + 0x44 ], %l1
2042fe4: 80 a4 7f ff cmp %l1, -1
2042fe8: 22 80 00 02 be,a 2042ff0 <fat_scan_fat_for_free_clusters+0x34>
2042fec: a2 10 20 02 mov 2, %l1
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
2042ff0: a6 04 e0 02 add %l3, 2, %l3
/*
* 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)
2042ff4: 80 a4 e0 02 cmp %l3, 2
2042ff8: 08 80 00 40 bleu 20430f8 <fat_scan_fat_for_free_clusters+0x13c><== NEVER TAKEN
2042ffc: a4 10 20 02 mov 2, %l2
2043000: 10 80 00 17 b 204305c <fat_scan_fat_for_free_clusters+0xa0>
2043004: a8 10 20 00 clr %l4
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
2043008: 90 10 00 1d mov %i5, %o0
204300c: 92 10 00 11 mov %l1, %o1
2043010: 7f ff fe f0 call 2042bd0 <fat_set_fat_cluster>
2043014: 94 10 3f ff mov -1, %o2
if ( rc != RC_OK )
2043018: 80 a2 20 00 cmp %o0, 0
204301c: 32 80 00 35 bne,a 20430f0 <fat_scan_fat_for_free_clusters+0x134><== NEVER TAKEN
2043020: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
2043024: c2 06 c0 00 ld [ %i3 ], %g1
2043028: 82 00 60 01 inc %g1
/* have we satisfied request ? */
if (*cls_added == count)
204302c: 80 a6 80 01 cmp %i2, %g1
2043030: 02 80 00 49 be 2043154 <fat_scan_fat_for_free_clusters+0x198><== ALWAYS TAKEN
2043034: c2 26 c0 00 st %g1, [ %i3 ]
2043038: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
}
i++;
cl4find++;
204303c: a2 04 60 01 inc %l1 <== NOT EXECUTED
if (cl4find >= data_cls_val)
2043040: 80 a4 c0 11 cmp %l3, %l1
2043044: 18 80 00 03 bgu 2043050 <fat_scan_fat_for_free_clusters+0x94><== ALWAYS TAKEN
2043048: a4 04 a0 01 inc %l2
cl4find = 2;
204304c: a2 10 20 02 mov 2, %l1 <== 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)
2043050: 80 a4 c0 12 cmp %l3, %l2
2043054: 28 80 00 2b bleu,a 2043100 <fat_scan_fat_for_free_clusters+0x144><== NEVER TAKEN
2043058: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
204305c: 90 10 00 1d mov %i5, %o0
2043060: 92 10 00 11 mov %l1, %o1
2043064: 7f ff fe 53 call 20429b0 <fat_get_fat_cluster>
2043068: 94 07 bf fc add %fp, -4, %o2
if ( rc != RC_OK )
204306c: b0 92 20 00 orcc %o0, 0, %i0
2043070: 12 80 00 30 bne 2043130 <fat_scan_fat_for_free_clusters+0x174><== NEVER TAKEN
2043074: c2 07 bf fc ld [ %fp + -4 ], %g1
if (*cls_added != 0)
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
2043078: 80 a0 60 00 cmp %g1, 0
204307c: 32 bf ff f1 bne,a 2043040 <fat_scan_fat_for_free_clusters+0x84>
2043080: a2 04 60 01 inc %l1
/*
* 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)
2043084: c2 06 c0 00 ld [ %i3 ], %g1
2043088: 80 a0 60 00 cmp %g1, 0
204308c: 22 bf ff df be,a 2043008 <fat_scan_fat_for_free_clusters+0x4c><== ALWAYS TAKEN
2043090: e2 26 40 00 st %l1, [ %i1 ]
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
2043094: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2043098: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
204309c: 7f ff fe cd call 2042bd0 <fat_set_fat_cluster> <== NOT EXECUTED
20430a0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
20430a4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
20430a8: 12 80 00 37 bne 2043184 <fat_scan_fat_for_free_clusters+0x1c8><== NOT EXECUTED
20430ac: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
20430b0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20430b4: 7f ff fe c7 call 2042bd0 <fat_set_fat_cluster> <== NOT EXECUTED
20430b8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
20430bc: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED
20430c0: 22 bf ff da be,a 2043028 <fat_scan_fat_for_free_clusters+0x6c><== NOT EXECUTED
20430c4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
20430c8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
20430cc: 7f ff ff 83 call 2042ed8 <fat_free_fat_clusters_chain> <== NOT EXECUTED
20430d0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
20430d4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20430d8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
20430dc: 7f ff fe bd call 2042bd0 <fat_set_fat_cluster> <== NOT EXECUTED
20430e0: 94 10 20 00 clr %o2 <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
20430e4: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
20430e8: 7f ff 97 89 call 2028f0c <fat_buf_release> <== NOT EXECUTED
20430ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return rc;
20430f0: 81 c7 e0 08 ret <== NOT EXECUTED
20430f4: 81 e8 00 00 restore <== 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)
20430f8: a8 10 20 00 clr %l4 <== NOT EXECUTED
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
20430fc: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 <== NOT EXECUTED
2043100: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
2043104: 02 80 00 05 be 2043118 <fat_scan_fat_for_free_clusters+0x15c><== NOT EXECUTED
2043108: e8 24 20 44 st %l4, [ %l0 + 0x44 ] <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
204310c: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
2043110: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
2043114: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
*last_cl = save_cln;
2043118: e8 27 00 00 st %l4, [ %i4 ] <== NOT EXECUTED
fat_buf_release(fs_info);
204311c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2043120: 7f ff 97 7b call 2028f0c <fat_buf_release> <== NOT EXECUTED
2043124: b0 10 20 00 clr %i0 <== NOT EXECUTED
return RC_OK;
2043128: 81 c7 e0 08 ret <== NOT EXECUTED
204312c: 81 e8 00 00 restore <== NOT EXECUTED
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
if ( rc != RC_OK )
{
if (*cls_added != 0)
2043130: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED
2043134: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2043138: 02 80 00 17 be 2043194 <fat_scan_fat_for_free_clusters+0x1d8><== NOT EXECUTED
204313c: 01 00 00 00 nop <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
2043140: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
2043144: 7f ff ff 65 call 2042ed8 <fat_free_fat_clusters_chain> <== NOT EXECUTED
2043148: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
204314c: 81 c7 e0 08 ret <== NOT EXECUTED
2043150: 81 e8 00 00 restore <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
2043154: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2043158: 80 a0 7f ff cmp %g1, -1
204315c: 02 80 00 05 be 2043170 <fat_scan_fat_for_free_clusters+0x1b4><== ALWAYS TAKEN
2043160: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
fs_info->vol.free_cls -= (*cls_added);
2043164: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
2043168: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
204316c: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED
*last_cl = save_cln;
2043170: e2 27 00 00 st %l1, [ %i4 ]
fat_buf_release(fs_info);
2043174: 7f ff 97 66 call 2028f0c <fat_buf_release>
2043178: 90 10 00 10 mov %l0, %o0
return rc;
204317c: 81 c7 e0 08 ret
2043180: 81 e8 00 00 restore
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
2043184: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
2043188: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
204318c: 7f ff ff 53 call 2042ed8 <fat_free_fat_clusters_chain> <== NOT EXECUTED
2043190: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
2043194: 81 c7 e0 08 ret <== NOT EXECUTED
2043198: 81 e8 00 00 restore <== NOT EXECUTED
02042bd0 <fat_set_fat_cluster>:
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
2042bd0: 9d e3 bf 98 save %sp, -104, %sp
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
2042bd4: c0 27 bf fc clr [ %fp + -4 ]
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
2042bd8: 80 a6 60 01 cmp %i1, 1
2042bdc: 08 80 00 90 bleu 2042e1c <fat_set_fat_cluster+0x24c> <== NEVER TAKEN
2042be0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
2042be4: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2042be8: 82 00 60 01 inc %g1
2042bec: 80 a6 40 01 cmp %i1, %g1
2042bf0: 18 80 00 8b bgu 2042e1c <fat_set_fat_cluster+0x24c> <== NEVER TAKEN
2042bf4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
2042bf8: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
2042bfc: 80 88 60 01 btst 1, %g1
2042c00: 12 80 00 22 bne 2042c88 <fat_set_fat_cluster+0xb8> <== ALWAYS TAKEN
2042c04: e0 0f 60 02 ldub [ %i5 + 2 ], %l0
2042c08: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2042c0c: 02 80 00 25 be 2042ca0 <fat_set_fat_cluster+0xd0> <== NOT EXECUTED
2042c10: c2 07 60 4c ld [ %i5 + 0x4c ], %g1 <== NOT EXECUTED
2042c14: b9 2e 60 01 sll %i1, 1, %i4 <== NOT EXECUTED
2042c18: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED
2042c1c: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
2042c20: e2 17 40 00 lduh [ %i5 ], %l1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
2042c24: 90 10 00 1d mov %i5, %o0
2042c28: 92 10 00 10 mov %l0, %o1
2042c2c: 94 10 20 01 mov 1, %o2
2042c30: 7f ff 98 31 call 2028cf4 <fat_buf_access>
2042c34: 96 07 bf fc add %fp, -4, %o3
if (rc != RC_OK)
2042c38: b0 92 20 00 orcc %o0, 0, %i0
2042c3c: 12 80 00 11 bne 2042c80 <fat_set_fat_cluster+0xb0> <== NEVER TAKEN
2042c40: a3 2c 60 10 sll %l1, 0x10, %l1
return rc;
switch ( fs_info->vol.type )
2042c44: f6 0f 60 0a ldub [ %i5 + 0xa ], %i3
2042c48: 80 a6 e0 02 cmp %i3, 2
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);
2042c4c: a3 34 60 10 srl %l1, 0x10, %l1
2042c50: a2 04 7f ff add %l1, -1, %l1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
2042c54: 02 80 00 17 be 2042cb0 <fat_set_fat_cluster+0xe0> <== NEVER TAKEN
2042c58: b8 0f 00 11 and %i4, %l1, %i4
2042c5c: 80 a6 e0 04 cmp %i3, 4
2042c60: 02 80 00 3d be 2042d54 <fat_set_fat_cluster+0x184> <== NEVER TAKEN
2042c64: 80 a6 e0 01 cmp %i3, 1
2042c68: 02 80 00 1d be 2042cdc <fat_set_fat_cluster+0x10c> <== ALWAYS TAKEN
2042c6c: 80 8e 60 01 btst 1, %i1
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
2042c70: 40 00 11 9f call 20472ec <__errno> <== NOT EXECUTED
2042c74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2042c78: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2042c7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
break;
}
return RC_OK;
}
2042c80: 81 c7 e0 08 ret <== NOT EXECUTED
2042c84: 81 e8 00 00 restore <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
2042c88: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
2042c8c: b9 36 60 01 srl %i1, 1, %i4
2042c90: b8 07 00 19 add %i4, %i1, %i4
2042c94: a1 37 00 10 srl %i4, %l0, %l0
2042c98: 10 bf ff e2 b 2042c20 <fat_set_fat_cluster+0x50>
2042c9c: a0 04 00 01 add %l0, %g1, %l0
2042ca0: b9 2e 60 02 sll %i1, 2, %i4 <== NOT EXECUTED
2042ca4: a1 37 00 10 srl %i4, %l0, %l0 <== NOT EXECUTED
2042ca8: 10 bf ff de b 2042c20 <fat_set_fat_cluster+0x50> <== NOT EXECUTED
2042cac: a0 04 00 01 add %l0, %g1, %l0 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
2042cb0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
2042cb4: b5 2e a0 10 sll %i2, 0x10, %i2 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
2042cb8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
2042cbc: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED
2042cc0: b5 36 a0 18 srl %i2, 0x18, %i2 <== NOT EXECUTED
2042cc4: b4 10 80 1a or %g2, %i2, %i2 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
2042cc8: f4 30 40 1c sth %i2, [ %g1 + %i4 ] <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
2042ccc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2042cd0: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED
2042cd4: 81 c7 e0 08 ret <== NOT EXECUTED
2042cd8: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
2042cdc: 02 80 00 35 be 2042db0 <fat_set_fat_cluster+0x1e0>
2042ce0: c2 07 bf fc ld [ %fp + -4 ], %g1
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
2042ce4: 85 2e a0 04 sll %i2, 4, %g2
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
2042ce8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
2042cec: c6 08 40 1c ldub [ %g1 + %i4 ], %g3
2042cf0: 86 08 e0 0f and %g3, 0xf, %g3
2042cf4: c6 28 40 1c stb %g3, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
2042cf8: c2 07 bf fc ld [ %fp + -4 ], %g1
2042cfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
2042d00: c6 08 40 1c ldub [ %g1 + %i4 ], %g3
2042d04: 84 10 c0 02 or %g3, %g2, %g2
2042d08: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
2042d0c: c2 17 40 00 lduh [ %i5 ], %g1
2042d10: 82 00 7f ff add %g1, -1, %g1
2042d14: 80 a0 40 1c cmp %g1, %i4
2042d18: 02 80 00 5c be 2042e88 <fat_set_fat_cluster+0x2b8> <== NEVER TAKEN
2042d1c: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ]
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
2042d20: c2 07 bf fc ld [ %fp + -4 ], %g1
2042d24: b8 07 20 01 inc %i4
2042d28: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
2042d2c: b5 2e a0 14 sll %i2, 0x14, %i2
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
2042d30: c0 28 40 1c clrb [ %g1 + %i4 ]
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
2042d34: c2 07 bf fc ld [ %fp + -4 ], %g1
(uint8_t )((fat16_clv & 0xFF00)>>8);
2042d38: b5 36 a0 18 srl %i2, 0x18, %i2
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
2042d3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
2042d40: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
2042d44: 84 10 80 1a or %g2, %i2, %g2
2042d48: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
2042d4c: 81 c7 e0 08 ret
2042d50: 81 e8 00 00 restore
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
2042d54: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
2042d58: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
2042d5c: 03 3c 00 00 sethi %hi(0xf0000000), %g1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
2042d60: c6 00 80 1c ld [ %g2 + %i4 ], %g3 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
2042d64: 82 2e 80 01 andn %i2, %g1, %g1 <== NOT EXECUTED
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2042d68: 89 30 60 18 srl %g1, 0x18, %g4 <== NOT EXECUTED
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2042d6c: b7 30 60 08 srl %g1, 8, %i3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2042d70: b5 2e a0 18 sll %i2, 0x18, %i2 <== NOT EXECUTED
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2042d74: b6 0e e0 ff and %i3, 0xff, %i3 <== NOT EXECUTED
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2042d78: b4 16 80 04 or %i2, %g4, %i2 <== NOT EXECUTED
2042d7c: b7 2e e0 10 sll %i3, 0x10, %i3 <== NOT EXECUTED
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2042d80: 89 30 60 10 srl %g1, 0x10, %g4 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
2042d84: 86 08 e0 f0 and %g3, 0xf0, %g3 <== NOT EXECUTED
2042d88: 88 09 20 ff and %g4, 0xff, %g4 <== NOT EXECUTED
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2042d8c: 82 16 80 1b or %i2, %i3, %g1 <== NOT EXECUTED
2042d90: 89 29 20 08 sll %g4, 8, %g4 <== NOT EXECUTED
2042d94: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
*((uint32_t *)(block0->buffer + ofs)) =
fat32_clv | (*((uint32_t *)(block0->buffer + ofs)));
2042d98: 82 10 40 03 or %g1, %g3, %g1 <== NOT EXECUTED
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
2042d9c: c2 20 80 1c st %g1, [ %g2 + %i4 ] <== NOT EXECUTED
2042da0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2042da4: c2 2f 60 7c stb %g1, [ %i5 + 0x7c ] <== NOT EXECUTED
2042da8: 81 c7 e0 08 ret <== NOT EXECUTED
2042dac: 81 e8 00 00 restore <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
2042db0: b4 0e af ff and %i2, 0xfff, %i2
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
2042db4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2042db8: c0 28 40 1c clrb [ %g1 + %i4 ]
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
2042dbc: c2 07 bf fc ld [ %fp + -4 ], %g1
2042dc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
2042dc4: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
2042dc8: 84 16 80 02 or %i2, %g2, %g2
2042dcc: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs))) |
(uint8_t )(fat16_clv & 0x00FF);
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
2042dd0: c2 17 40 00 lduh [ %i5 ], %g1
2042dd4: 82 00 7f ff add %g1, -1, %g1
2042dd8: 80 a0 40 1c cmp %g1, %i4
2042ddc: 02 80 00 16 be 2042e34 <fat_set_fat_cluster+0x264> <== NEVER TAKEN
2042de0: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ]
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
2042de4: c2 07 bf fc ld [ %fp + -4 ], %g1
2042de8: b8 07 20 01 inc %i4
2042dec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
2042df0: b5 36 a0 08 srl %i2, 8, %i2
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
2042df4: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
2042df8: 84 08 bf f0 and %g2, -16, %g2
2042dfc: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
2042e00: c2 07 bf fc ld [ %fp + -4 ], %g1
2042e04: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
2042e08: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
2042e0c: b4 10 80 1a or %g2, %i2, %i2
2042e10: f4 28 40 1c stb %i2, [ %g1 + %i4 ]
2042e14: 81 c7 e0 08 ret
2042e18: 81 e8 00 00 restore
uint32_t fat32_clv = 0;
rtems_bdbuf_buffer *block0 = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
2042e1c: 40 00 11 34 call 20472ec <__errno> <== NOT EXECUTED
2042e20: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2042e24: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2042e28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2042e2c: 81 c7 e0 08 ret <== NOT EXECUTED
2042e30: 81 e8 00 00 restore <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
2042e34: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042e38: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED
2042e3c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2042e40: 7f ff 97 ad call 2028cf4 <fat_buf_access> <== NOT EXECUTED
2042e44: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
2042e48: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2042e4c: 12 bf ff 8d bne 2042c80 <fat_set_fat_cluster+0xb0> <== NOT EXECUTED
2042e50: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
2042e54: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
2042e58: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) =
2042e5c: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
2042e60: 84 08 bf f0 and %g2, -16, %g2 <== NOT EXECUTED
2042e64: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
2042e68: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
2042e6c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
2042e70: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
2042e74: 84 16 80 02 or %i2, %g2, %g2 <== NOT EXECUTED
2042e78: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
2042e7c: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED
2042e80: 81 c7 e0 08 ret <== NOT EXECUTED
2042e84: 81 e8 00 00 restore <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
2042e88: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042e8c: 92 04 20 01 add %l0, 1, %o1 <== NOT EXECUTED
2042e90: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2042e94: 7f ff 97 98 call 2028cf4 <fat_buf_access> <== NOT EXECUTED
2042e98: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&block0);
if (rc != RC_OK)
2042e9c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2042ea0: 12 bf ff 78 bne 2042c80 <fat_set_fat_cluster+0xb0> <== NOT EXECUTED
2042ea4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
2042ea8: 87 2e a0 14 sll %i2, 0x14, %g3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
2042eac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
(uint8_t )((fat16_clv & 0xFF00)>>8);
2042eb0: 87 30 e0 18 srl %g3, 0x18, %g3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&block0);
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
2042eb4: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
2042eb8: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
2042ebc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
2042ec0: c4 08 40 00 ldub [ %g1 ], %g2 <== NOT EXECUTED
2042ec4: 84 10 c0 02 or %g3, %g2, %g2 <== NOT EXECUTED
2042ec8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
2042ecc: f6 2f 60 7c stb %i3, [ %i5 + 0x7c ] <== NOT EXECUTED
2042ed0: 81 c7 e0 08 ret <== NOT EXECUTED
2042ed4: 81 e8 00 00 restore <== NOT EXECUTED
02029574 <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2029574: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
2029578: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
202957c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
2029580: 80 88 60 04 btst 4, %g1
2029584: 12 80 00 3a bne 202966c <fat_shutdown_drive+0xf8> <== NEVER TAKEN
2029588: b4 10 20 00 clr %i2
fs_info->vol.next_cl);
if ( rc != RC_OK )
rc = -1;
}
fat_buf_release(fs_info);
202958c: 7f ff fe 60 call 2028f0c <fat_buf_release>
2029590: 90 10 00 1d mov %i5, %o0
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
2029594: 7f ff 75 ab call 2006c40 <rtems_bdbuf_syncdev>
2029598: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
202959c: 80 a2 20 00 cmp %o0, 0
20295a0: 32 80 00 3b bne,a 202968c <fat_shutdown_drive+0x118> <== NEVER TAKEN
20295a4: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED
rc = -1;
20295a8: b6 10 20 00 clr %i3
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
20295ac: f8 07 60 60 ld [ %i5 + 0x60 ], %i4
while ( (node = rtems_chain_get(the_chain)) != NULL )
20295b0: 10 80 00 04 b 20295c0 <fat_shutdown_drive+0x4c>
20295b4: b8 07 00 1b add %i4, %i3, %i4
free(node);
20295b8: 7f ff 7e 0b call 2008de4 <free> <== NOT EXECUTED
20295bc: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
20295c0: 7f ff 94 dc call 200e930 <_Chain_Get>
20295c4: 90 10 00 1c mov %i4, %o0
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 )
20295c8: 80 a2 20 00 cmp %o0, 0
20295cc: 12 bf ff fb bne 20295b8 <fat_shutdown_drive+0x44> <== NEVER TAKEN
20295d0: 01 00 00 00 nop
20295d4: b6 06 e0 0c add %i3, 0xc, %i3
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
20295d8: 80 a6 e0 18 cmp %i3, 0x18
20295dc: 32 bf ff f5 bne,a 20295b0 <fat_shutdown_drive+0x3c>
20295e0: f8 07 60 60 ld [ %i5 + 0x60 ], %i4
20295e4: b6 10 20 00 clr %i3
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
20295e8: f8 07 60 64 ld [ %i5 + 0x64 ], %i4
while ( (node = rtems_chain_get(the_chain)) != NULL )
20295ec: 10 80 00 04 b 20295fc <fat_shutdown_drive+0x88>
20295f0: b8 07 00 1b add %i4, %i3, %i4
free(node);
20295f4: 7f ff 7d fc call 2008de4 <free> <== NOT EXECUTED
20295f8: 01 00 00 00 nop <== NOT EXECUTED
20295fc: 7f ff 94 cd call 200e930 <_Chain_Get>
2029600: 90 10 00 1c mov %i4, %o0
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 )
2029604: 80 a2 20 00 cmp %o0, 0
2029608: 12 bf ff fb bne 20295f4 <fat_shutdown_drive+0x80> <== NEVER TAKEN
202960c: 01 00 00 00 nop
2029610: b6 06 e0 0c add %i3, 0xc, %i3
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
2029614: 80 a6 e0 18 cmp %i3, 0x18
2029618: 32 bf ff f5 bne,a 20295ec <fat_shutdown_drive+0x78>
202961c: f8 07 60 64 ld [ %i5 + 0x64 ], %i4
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
2029620: 7f ff 7d f1 call 2008de4 <free>
2029624: d0 07 60 60 ld [ %i5 + 0x60 ], %o0
free(fs_info->rhash);
2029628: 7f ff 7d ef call 2008de4 <free>
202962c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0
free(fs_info->uino);
2029630: 7f ff 7d ed call 2008de4 <free>
2029634: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
free(fs_info->sec_buf);
2029638: 7f ff 7d eb call 2008de4 <free>
202963c: d0 07 60 84 ld [ %i5 + 0x84 ], %o0
close(fs_info->vol.fd);
2029640: 7f ff 7d 2d call 2008af4 <close>
2029644: d0 07 60 54 ld [ %i5 + 0x54 ], %o0
if (rc)
2029648: 80 a6 a0 00 cmp %i2, 0
202964c: 02 80 00 06 be 2029664 <fat_shutdown_drive+0xf0> <== ALWAYS TAKEN
2029650: 01 00 00 00 nop
errno = EIO;
2029654: 40 00 77 26 call 20472ec <__errno> <== NOT EXECUTED
2029658: 01 00 00 00 nop <== NOT EXECUTED
202965c: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2029660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return rc;
}
2029664: 81 c7 e0 08 ret
2029668: 91 e8 00 1a restore %g0, %i2, %o0
fat_fs_info_t *fs_info = mt_entry->fs_info;
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
202966c: d2 07 60 40 ld [ %i5 + 0x40 ], %o1 <== NOT EXECUTED
2029670: d4 07 60 44 ld [ %i5 + 0x44 ], %o2 <== NOT EXECUTED
2029674: 7f ff ff 90 call 20294b4 <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
2029678: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
202967c: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2029680: 32 bf ff c3 bne,a 202958c <fat_shutdown_drive+0x18> <== NOT EXECUTED
2029684: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED
2029688: 30 bf ff c1 b,a 202958c <fat_shutdown_drive+0x18> <== NOT EXECUTED
}
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
rc = -1;
202968c: 10 bf ff c8 b 20295ac <fat_shutdown_drive+0x38> <== NOT EXECUTED
2029690: b6 10 20 00 clr %i3 <== NOT EXECUTED
02043384 <fchdir>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchdir( int fd )
{
2043384: 9d e3 bf 38 save %sp, -200, %sp
st.st_mode = 0;
st.st_uid = 0;
st.st_gid = 0;
rtems_libio_check_fd( fd );
2043388: 03 00 81 bf sethi %hi(0x206fc00), %g1
204338c: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 <rtems_libio_number_iops>
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
2043390: c0 27 bf a4 clr [ %fp + -92 ]
st.st_uid = 0;
2043394: c0 37 bf aa clrh [ %fp + -86 ]
st.st_gid = 0;
rtems_libio_check_fd( fd );
2043398: 80 a6 00 01 cmp %i0, %g1
204339c: 1a 80 00 3a bcc 2043484 <fchdir+0x100>
20433a0: c0 37 bf ac clrh [ %fp + -84 ]
iop = rtems_libio_iop( fd );
20433a4: 03 00 81 cf sethi %hi(0x2073c00), %g1
20433a8: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 <rtems_libio_iops>
20433ac: 83 2e 20 03 sll %i0, 3, %g1
20433b0: b1 2e 20 06 sll %i0, 6, %i0
20433b4: b0 00 40 18 add %g1, %i0, %i0
20433b8: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
20433bc: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
20433c0: 80 88 61 00 btst 0x100, %g1
20433c4: 02 80 00 30 be 2043484 <fchdir+0x100>
20433c8: 01 00 00 00 nop
static inline void rtems_filesystem_instance_lock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->lock_h)( loc->mt_entry );
20433cc: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
20433d0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
20433d4: c2 00 40 00 ld [ %g1 ], %g1
20433d8: 9f c0 40 00 call %g1
20433dc: b8 07 60 1c add %i5, 0x1c, %i4
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
20433e0: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
20433e4: 90 10 00 1c mov %i4, %o0
20433e8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
20433ec: 9f c0 40 00 call %g1
20433f0: 92 07 bf 98 add %fp, -104, %o1
if ( rv == 0 ) {
20433f4: b0 92 20 00 orcc %o0, 0, %i0
20433f8: 02 80 00 08 be 2043418 <fchdir+0x94> <== ALWAYS TAKEN
20433fc: d2 07 bf a4 ld [ %fp + -92 ], %o1
static inline void rtems_filesystem_instance_unlock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->unlock_h)( loc->mt_entry );
2043400: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
2043404: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2043408: 9f c0 40 00 call %g1 <== NOT EXECUTED
204340c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
2043410: 81 c7 e0 08 ret <== NOT EXECUTED
2043414: 81 e8 00 00 restore <== NOT EXECUTED
rtems_libio_check_is_open( iop );
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
if ( rv == 0 ) {
bool access_ok = rtems_filesystem_check_access(
2043418: d4 17 bf aa lduh [ %fp + -86 ], %o2
204341c: d6 17 bf ac lduh [ %fp + -84 ], %o3
2043420: 7f ff a4 0d call 202c454 <rtems_filesystem_check_access>
2043424: 90 10 20 01 mov 1, %o0
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
2043428: 80 8a 20 ff btst 0xff, %o0
204342c: 02 80 00 0c be 204345c <fchdir+0xd8>
2043430: 92 10 00 1c mov %i4, %o1
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
2043434: 7f ff 9d b6 call 202ab0c <rtems_filesystem_location_clone>
2043438: 90 07 bf e4 add %fp, -28, %o0
204343c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2043440: c2 00 60 04 ld [ %g1 + 4 ], %g1
2043444: 9f c0 40 00 call %g1
2043448: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
204344c: 7f ff 9d 2b call 202a8f8 <rtems_filesystem_chdir>
2043450: 90 07 bf e4 add %fp, -28, %o0
2043454: 81 c7 e0 08 ret
2043458: 91 e8 00 08 restore %g0, %o0, %o0
);
if ( access_ok ) {
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
} else {
errno = EACCES;
204345c: 40 00 0f a4 call 20472ec <__errno>
2043460: b0 10 3f ff mov -1, %i0
2043464: 82 10 20 0d mov 0xd, %g1
2043468: c2 22 00 00 st %g1, [ %o0 ]
204346c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2043470: c2 00 60 04 ld [ %g1 + 4 ], %g1
2043474: 9f c0 40 00 call %g1
2043478: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
204347c: 81 c7 e0 08 ret
2043480: 81 e8 00 00 restore
st.st_uid = 0;
st.st_gid = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
2043484: 40 00 0f 9a call 20472ec <__errno>
2043488: b0 10 3f ff mov -1, %i0
204348c: 82 10 20 09 mov 9, %g1
2043490: c2 22 00 00 st %g1, [ %o0 ]
2043494: 81 c7 e0 08 ret
2043498: 81 e8 00 00 restore
0202ab50 <fchmod>:
#include <sys/stat.h>
#include <rtems/libio_.h>
int fchmod( int fd, mode_t mode )
{
202ab50: 9d e3 bf a0 save %sp, -96, %sp
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
202ab54: 03 00 81 bf sethi %hi(0x206fc00), %g1
202ab58: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 <rtems_libio_number_iops>
202ab5c: 80 a6 00 01 cmp %i0, %g1
202ab60: 1a 80 00 26 bcc 202abf8 <fchmod+0xa8>
202ab64: 03 00 81 cf sethi %hi(0x2073c00), %g1
iop = rtems_libio_iop( fd );
202ab68: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 <rtems_libio_iops>
202ab6c: 83 2e 20 03 sll %i0, 3, %g1
202ab70: b1 2e 20 06 sll %i0, 6, %i0
202ab74: b0 00 40 18 add %g1, %i0, %i0
202ab78: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open(iop);
202ab7c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
202ab80: 80 88 61 00 btst 0x100, %g1
202ab84: 02 80 00 1d be 202abf8 <fchmod+0xa8>
202ab88: 01 00 00 00 nop
if (iop->pathinfo.mt_entry->writeable) {
202ab8c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
202ab90: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1
202ab94: 80 a0 60 00 cmp %g1, 0
202ab98: 02 80 00 12 be 202abe0 <fchmod+0x90> <== NEVER TAKEN
202ab9c: 01 00 00 00 nop
static inline void rtems_filesystem_instance_lock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->lock_h)( loc->mt_entry );
202aba0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
202aba4: c2 00 40 00 ld [ %g1 ], %g1
202aba8: 9f c0 40 00 call %g1
202abac: 01 00 00 00 nop
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.ops->fchmod_h)( &iop->pathinfo, mode );
202abb0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
202abb4: 90 07 60 1c add %i5, 0x1c, %o0
202abb8: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
202abbc: 9f c0 40 00 call %g1
202abc0: 92 10 00 19 mov %i1, %o1
static inline void rtems_filesystem_instance_unlock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->unlock_h)( loc->mt_entry );
202abc4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
202abc8: b0 10 00 08 mov %o0, %i0
202abcc: c2 00 60 04 ld [ %g1 + 4 ], %g1
202abd0: 9f c0 40 00 call %g1
202abd4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
202abd8: 81 c7 e0 08 ret
202abdc: 81 e8 00 00 restore
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
202abe0: 40 00 71 c3 call 20472ec <__errno> <== NOT EXECUTED
202abe4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202abe8: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED
202abec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
202abf0: 81 c7 e0 08 ret <== NOT EXECUTED
202abf4: 81 e8 00 00 restore <== NOT EXECUTED
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
202abf8: 40 00 71 bd call 20472ec <__errno>
202abfc: b0 10 3f ff mov -1, %i0
202ac00: 82 10 20 09 mov 9, %g1
202ac04: c2 22 00 00 st %g1, [ %o0 ]
202ac08: 81 c7 e0 08 ret
202ac0c: 81 e8 00 00 restore
0202ac10 <fchown>:
#include <unistd.h>
#include <rtems/libio_.h>
int fchown( int fd, uid_t owner, gid_t group )
{
202ac10: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
202ac14: 03 00 81 bf sethi %hi(0x206fc00), %g1
202ac18: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 <rtems_libio_number_iops>
202ac1c: 80 a6 00 01 cmp %i0, %g1
202ac20: 1a 80 00 27 bcc 202acbc <fchown+0xac>
202ac24: 03 00 81 cf sethi %hi(0x2073c00), %g1
iop = rtems_libio_iop( fd );
202ac28: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 <rtems_libio_iops>
202ac2c: 83 2e 20 03 sll %i0, 3, %g1
202ac30: b1 2e 20 06 sll %i0, 6, %i0
202ac34: b0 00 40 18 add %g1, %i0, %i0
202ac38: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open(iop);
202ac3c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
202ac40: 80 88 61 00 btst 0x100, %g1
202ac44: 02 80 00 1e be 202acbc <fchown+0xac>
202ac48: 01 00 00 00 nop
if (iop->pathinfo.mt_entry->writeable) {
202ac4c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
202ac50: c2 0a 20 1d ldub [ %o0 + 0x1d ], %g1
202ac54: 80 a0 60 00 cmp %g1, 0
202ac58: 02 80 00 13 be 202aca4 <fchown+0x94> <== NEVER TAKEN
202ac5c: 01 00 00 00 nop
static inline void rtems_filesystem_instance_lock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->lock_h)( loc->mt_entry );
202ac60: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
202ac64: c2 00 40 00 ld [ %g1 ], %g1
202ac68: 9f c0 40 00 call %g1
202ac6c: 01 00 00 00 nop
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
202ac70: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
202ac74: 90 07 60 1c add %i5, 0x1c, %o0
202ac78: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
202ac7c: 92 10 00 19 mov %i1, %o1
202ac80: 9f c0 40 00 call %g1
202ac84: 94 10 00 1a mov %i2, %o2
static inline void rtems_filesystem_instance_unlock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->unlock_h)( loc->mt_entry );
202ac88: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
202ac8c: b0 10 00 08 mov %o0, %i0
202ac90: c2 00 60 04 ld [ %g1 + 4 ], %g1
202ac94: 9f c0 40 00 call %g1
202ac98: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
202ac9c: 81 c7 e0 08 ret
202aca0: 81 e8 00 00 restore
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
202aca4: 40 00 71 92 call 20472ec <__errno> <== NOT EXECUTED
202aca8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202acac: 82 10 20 1e mov 0x1e, %g1 <== NOT EXECUTED
202acb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
202acb4: 81 c7 e0 08 ret <== NOT EXECUTED
202acb8: 81 e8 00 00 restore <== NOT EXECUTED
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
202acbc: 40 00 71 8c call 20472ec <__errno>
202acc0: b0 10 3f ff mov -1, %i0
202acc4: 82 10 20 09 mov 9, %g1
202acc8: c2 22 00 00 st %g1, [ %o0 ]
202accc: 81 c7 e0 08 ret
202acd0: 81 e8 00 00 restore
020434c4 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
20434c4: 9d e3 bf 98 save %sp, -104, %sp
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
20434c8: 03 00 81 bf sethi %hi(0x206fc00), %g1
20434cc: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 206fce0 <rtems_libio_number_iops>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
20434d0: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
20434d4: 82 07 a0 4c add %fp, 0x4c, %g1
20434d8: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
20434dc: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
20434e0: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
20434e4: 80 a6 00 02 cmp %i0, %g2
20434e8: 1a 80 00 7c bcc 20436d8 <fcntl+0x214>
20434ec: c2 27 bf fc st %g1, [ %fp + -4 ]
iop = rtems_libio_iop( fd );
20434f0: 39 00 81 cf sethi %hi(0x2073c00), %i4
20434f4: fa 07 21 f0 ld [ %i4 + 0x1f0 ], %i5 ! 2073df0 <rtems_libio_iops>
20434f8: 85 2e 20 03 sll %i0, 3, %g2
20434fc: b1 2e 20 06 sll %i0, 6, %i0
2043500: b0 00 80 18 add %g2, %i0, %i0
2043504: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open(iop);
2043508: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
204350c: 80 8a 21 00 btst 0x100, %o0
2043510: 02 80 00 72 be 20436d8 <fcntl+0x214>
2043514: 80 a6 60 09 cmp %i1, 9
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
2043518: 08 80 00 08 bleu 2043538 <fcntl+0x74>
204351c: 85 2e 60 02 sll %i1, 2, %g2
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
2043520: 40 00 0f 73 call 20472ec <__errno>
2043524: b0 10 3f ff mov -1, %i0
2043528: 82 10 20 16 mov 0x16, %g1
204352c: c2 22 00 00 st %g1, [ %o0 ]
2043530: 81 c7 e0 08 ret
2043534: 81 e8 00 00 restore
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
2043538: 07 00 81 0d sethi %hi(0x2043400), %g3
204353c: 86 10 e0 9c or %g3, 0x9c, %g3 ! 204349c <fchdir+0x118>
2043540: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
2043544: 81 c0 80 00 jmp %g2
2043548: 01 00 00 00 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
204354c: 40 00 0f 68 call 20472ec <__errno>
2043550: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2043554: 82 10 20 86 mov 0x86, %g1
2043558: c2 22 00 00 st %g1, [ %o0 ]
204355c: 81 c7 e0 08 ret
2043560: 81 e8 00 00 restore
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
2043564: d0 00 40 00 ld [ %g1 ], %o0
2043568: 7f ff 16 ce call 20090a0 <rtems_libio_fcntl_flags>
204356c: b0 10 20 00 clr %i0
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
2043570: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2043574: 90 0a 22 01 and %o0, 0x201, %o0
2043578: 82 08 7d fe and %g1, -514, %g1
204357c: 82 12 00 01 or %o0, %g1, %g1
2043580: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
2043584: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
2043588: 90 10 00 1d mov %i5, %o0
204358c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
2043590: 9f c0 40 00 call %g1
2043594: 92 10 00 19 mov %i1, %o1
if (err) {
2043598: ba 92 20 00 orcc %o0, 0, %i5
204359c: 12 80 00 04 bne 20435ac <fcntl+0xe8> <== NEVER TAKEN
20435a0: 01 00 00 00 nop
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
20435a4: 81 c7 e0 08 ret
20435a8: 81 e8 00 00 restore
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
if (err) {
errno = err;
20435ac: 40 00 0f 50 call 20472ec <__errno> <== NOT EXECUTED
20435b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20435b4: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
20435b8: 81 c7 e0 08 ret <== NOT EXECUTED
20435bc: 81 e8 00 00 restore <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
20435c0: 7f ff 16 c5 call 20090d4 <rtems_libio_to_fcntl_flags>
20435c4: 01 00 00 00 nop
20435c8: b0 10 00 08 mov %o0, %i0
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
20435cc: 80 a6 20 00 cmp %i0, 0
20435d0: 36 bf ff ee bge,a 2043588 <fcntl+0xc4> <== ALWAYS TAKEN
20435d4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
20435d8: 81 c7 e0 08 ret <== NOT EXECUTED
20435dc: 81 e8 00 00 restore <== NOT EXECUTED
* 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 ) )
20435e0: c2 00 40 00 ld [ %g1 ], %g1
20435e4: 80 a0 60 00 cmp %g1, 0
20435e8: 22 80 00 39 be,a 20436cc <fcntl+0x208>
20435ec: 90 0a 37 ff and %o0, -2049, %o0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
20435f0: 90 12 28 00 or %o0, 0x800, %o0
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
20435f4: b0 10 20 00 clr %i0
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
20435f8: 10 bf ff e3 b 2043584 <fcntl+0xc0>
20435fc: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
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);
2043600: 90 0a 28 00 and %o0, 0x800, %o0
2043604: 80 a0 00 08 cmp %g0, %o0
2043608: 10 bf ff df b 2043584 <fcntl+0xc0>
204360c: b0 40 20 00 addx %g0, 0, %i0
/*
* FIXME: We ignore the start value fd2 for the file descriptor search. This
* is not POSIX conform.
*/
rtems_libio_t *diop = rtems_libio_allocate();
2043610: 7f ff 16 c8 call 2009130 <rtems_libio_allocate>
2043614: b0 10 3f ff mov -1, %i0
if (diop != NULL) {
2043618: 80 a2 20 00 cmp %o0, 0
204361c: 02 bf ff d0 be 204355c <fcntl+0x98>
2043620: b6 10 00 08 mov %o0, %i3
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
2043624: 7f ff 16 ac call 20090d4 <rtems_libio_to_fcntl_flags>
2043628: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
204362c: f4 06 e0 18 ld [ %i3 + 0x18 ], %i2
rtems_libio_t *diop = rtems_libio_allocate();
if (diop != NULL) {
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
oflag &= ~O_CREAT;
2043630: b0 0a 3d ff and %o0, -513, %i0
diop->flags |= rtems_libio_fcntl_flags( oflag );
2043634: 7f ff 16 9b call 20090a0 <rtems_libio_fcntl_flags>
2043638: 90 10 00 18 mov %i0, %o0
static inline void rtems_filesystem_instance_lock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->lock_h)( loc->mt_entry );
204363c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2043640: b4 12 00 1a or %o0, %i2, %i2
2043644: c2 00 40 00 ld [ %g1 ], %g1
2043648: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
204364c: 9f c0 40 00 call %g1
2043650: f4 26 e0 18 st %i2, [ %i3 + 0x18 ]
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
2043654: 92 07 60 1c add %i5, 0x1c, %o1
2043658: 7f ff 9d 2d call 202ab0c <rtems_filesystem_location_clone>
204365c: 90 06 e0 1c add %i3, 0x1c, %o0
static inline void rtems_filesystem_instance_unlock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->unlock_h)( loc->mt_entry );
2043660: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2043664: c2 00 60 04 ld [ %g1 + 4 ], %g1
2043668: 9f c0 40 00 call %g1
204366c: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
/*
* 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 );
2043670: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1
2043674: 94 10 00 18 mov %i0, %o2
2043678: c2 00 40 00 ld [ %g1 ], %g1
204367c: 90 10 00 1b mov %i3, %o0
2043680: 92 10 20 00 clr %o1
2043684: 9f c0 40 00 call %g1
2043688: 96 10 20 00 clr %o3
if ( rv == 0 ) {
204368c: b0 92 20 00 orcc %o0, 0, %i0
2043690: 12 80 00 18 bne 20436f0 <fcntl+0x22c> <== NEVER TAKEN
2043694: c2 07 21 f0 ld [ %i4 + 0x1f0 ], %g1
rv = diop - rtems_libio_iops;
2043698: b6 26 c0 01 sub %i3, %g1, %i3
204369c: b7 3e e0 03 sra %i3, 3, %i3
20436a0: 85 2e e0 06 sll %i3, 6, %g2
20436a4: 83 2e e0 03 sll %i3, 3, %g1
20436a8: 82 20 80 01 sub %g2, %g1, %g1
20436ac: 85 28 60 06 sll %g1, 6, %g2
20436b0: 82 00 40 02 add %g1, %g2, %g1
20436b4: 82 00 40 1b add %g1, %i3, %g1
20436b8: b1 28 60 0f sll %g1, 0xf, %i0
20436bc: b0 26 00 01 sub %i0, %g1, %i0
20436c0: b1 2e 20 03 sll %i0, 3, %i0
20436c4: 10 bf ff c2 b 20435cc <fcntl+0x108>
20436c8: b0 06 00 1b add %i0, %i3, %i0
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
20436cc: b0 10 20 00 clr %i0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
20436d0: 10 bf ff ad b 2043584 <fcntl+0xc0>
20436d4: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
20436d8: 40 00 0f 05 call 20472ec <__errno>
20436dc: b0 10 3f ff mov -1, %i0
20436e0: 82 10 20 09 mov 9, %g1
20436e4: c2 22 00 00 st %g1, [ %o0 ]
20436e8: 81 c7 e0 08 ret
20436ec: 81 e8 00 00 restore
*/
rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 );
if ( rv == 0 ) {
rv = diop - rtems_libio_iops;
} else {
rtems_libio_free( diop );
20436f0: 7f ff 16 c2 call 20091f8 <rtems_libio_free> <== NOT EXECUTED
20436f4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
20436f8: 10 bf ff b6 b 20435d0 <fcntl+0x10c> <== NOT EXECUTED
20436fc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
0200e690 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200e690: 9d e3 bf 98 save %sp, -104, %sp
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
200e694: 3b 00 80 8b sethi %hi(0x2022c00), %i5
200e698: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 ! 2022f58 <pipe_semaphore>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200e69c: b8 10 00 18 mov %i0, %i4
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
200e6a0: 80 a2 20 00 cmp %o0, 0
200e6a4: 02 80 00 54 be 200e7f4 <fifo_open+0x164>
200e6a8: b4 17 63 58 or %i5, 0x358, %i2
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200e6ac: 92 10 20 00 clr %o1
200e6b0: 94 10 20 00 clr %o2
200e6b4: 7f ff eb cb call 20095e0 <rtems_semaphore_obtain>
200e6b8: b0 10 3f f4 mov -12, %i0
}
if (sc == RTEMS_SUCCESSFUL) {
200e6bc: 80 a2 20 00 cmp %o0, 0
200e6c0: 12 80 01 06 bne 200ead8 <fifo_open+0x448> <== NEVER TAKEN
200e6c4: 01 00 00 00 nop
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
200e6c8: f6 07 00 00 ld [ %i4 ], %i3
if (pipe == NULL) {
200e6cc: 80 a6 e0 00 cmp %i3, 0
200e6d0: 02 80 00 91 be 200e914 <fifo_open+0x284>
200e6d4: 01 00 00 00 nop
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200e6d8: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0
200e6dc: 92 10 20 00 clr %o1
200e6e0: 7f ff eb c0 call 20095e0 <rtems_semaphore_obtain>
200e6e4: 94 10 20 00 clr %o2
err = -EINTR;
if (*pipep == NULL) {
200e6e8: c2 07 00 00 ld [ %i4 ], %g1
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
200e6ec: 80 a0 00 08 cmp %g0, %o0
200e6f0: b0 60 20 00 subx %g0, 0, %i0
err = -EINTR;
if (*pipep == NULL) {
200e6f4: 80 a0 60 00 cmp %g1, 0
200e6f8: 02 80 00 c7 be 200ea14 <fifo_open+0x384>
200e6fc: b0 0e 3f fc and %i0, -4, %i0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200e700: 7f ff ec 02 call 2009708 <rtems_semaphore_release>
200e704: d0 07 63 58 ld [ %i5 + 0x358 ], %o0
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
200e708: 80 a6 20 00 cmp %i0, 0
200e70c: 12 80 00 f3 bne 200ead8 <fifo_open+0x448> <== NEVER TAKEN
200e710: 01 00 00 00 nop
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200e714: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200e718: 82 08 60 06 and %g1, 6, %g1
200e71c: 80 a0 60 04 cmp %g1, 4
200e720: 02 80 00 42 be 200e828 <fifo_open+0x198>
200e724: fa 07 00 00 ld [ %i4 ], %i5
200e728: 80 a0 60 06 cmp %g1, 6
200e72c: 02 80 00 65 be 200e8c0 <fifo_open+0x230>
200e730: 80 a0 60 02 cmp %g1, 2
200e734: 22 80 00 07 be,a 200e750 <fifo_open+0xc0> <== ALWAYS TAKEN
200e738: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
200e73c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200e740: 7f ff eb f2 call 2009708 <rtems_semaphore_release>
200e744: b0 10 20 00 clr %i0
return 0;
200e748: 81 c7 e0 08 ret
200e74c: 81 e8 00 00 restore
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200e750: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
if (pipe->Readers ++ == 0)
200e754: 86 00 60 01 add %g1, 1, %g3
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
200e758: 84 00 a0 01 inc %g2
if (pipe->Readers ++ == 0)
200e75c: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200e760: 80 a0 60 00 cmp %g1, 0
200e764: 02 80 00 c2 be 200ea6c <fifo_open+0x3dc> <== ALWAYS TAKEN
200e768: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
200e76c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
200e770: 80 a0 60 00 cmp %g1, 0
200e774: 32 bf ff f3 bne,a 200e740 <fifo_open+0xb0>
200e778: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
/* Not an error */
if (LIBIO_NODELAY(iop))
200e77c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200e780: 80 88 60 01 btst 1, %g1
200e784: 32 bf ff ef bne,a 200e740 <fifo_open+0xb0>
200e788: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
break;
prevCounter = pipe->writerCounter;
200e78c: 10 80 00 0c b 200e7bc <fifo_open+0x12c>
200e790: f6 07 60 24 ld [ %i5 + 0x24 ], %i3
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200e794: 92 10 20 00 clr %o1
200e798: 7f ff eb 92 call 20095e0 <rtems_semaphore_obtain>
200e79c: 94 10 20 00 clr %o2
200e7a0: 80 a2 20 00 cmp %o0, 0
200e7a4: 12 80 00 0f bne 200e7e0 <fifo_open+0x150> <== NEVER TAKEN
200e7a8: b0 10 3f fc mov -4, %i0
goto out_error;
} while (prevCounter == pipe->writerCounter);
200e7ac: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
200e7b0: 80 a0 40 1b cmp %g1, %i3
200e7b4: 32 bf ff e3 bne,a 200e740 <fifo_open+0xb0> <== ALWAYS TAKEN
200e7b8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
200e7bc: 7f ff eb d3 call 2009708 <rtems_semaphore_release>
200e7c0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (! PIPE_READWAIT(pipe))
200e7c4: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200e7c8: 40 00 04 aa call 200fa70 <rtems_barrier_wait>
200e7cc: 92 10 20 00 clr %o1
200e7d0: 80 a2 20 00 cmp %o0, 0
200e7d4: 22 bf ff f0 be,a 200e794 <fifo_open+0x104> <== ALWAYS TAKEN
200e7d8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
200e7dc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
200e7e0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200e7e4: 7f ff ff 68 call 200e584 <pipe_release>
200e7e8: 92 10 00 19 mov %i1, %o1
return err;
}
200e7ec: 81 c7 e0 08 ret
200e7f0: 81 e8 00 00 restore
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200e7f4: 37 00 80 8c sethi %hi(0x2023000), %i3
200e7f8: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 ! 20231c4 <rtems_libio_semaphore>
200e7fc: 92 10 20 00 clr %o1
200e800: 7f ff eb 78 call 20095e0 <rtems_semaphore_obtain>
200e804: 94 10 20 00 clr %o2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
200e808: c2 07 63 58 ld [ %i5 + 0x358 ], %g1
200e80c: 80 a0 60 00 cmp %g1, 0
200e810: 02 80 00 88 be 200ea30 <fifo_open+0x3a0> <== ALWAYS TAKEN
200e814: 98 10 00 1a mov %i2, %o4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200e818: 7f ff eb bc call 2009708 <rtems_semaphore_release> <== NOT EXECUTED
200e81c: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 <== NOT EXECUTED
200e820: 10 bf ff a3 b 200e6ac <fifo_open+0x1c> <== NOT EXECUTED
200e824: d0 07 63 58 ld [ %i5 + 0x358 ], %o0 <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200e828: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
200e82c: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
if (pipe->Writers ++ == 0)
200e830: 86 00 60 01 add %g1, 1, %g3
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
200e834: 84 00 a0 01 inc %g2
if (pipe->Writers ++ == 0)
200e838: c6 27 60 14 st %g3, [ %i5 + 0x14 ]
200e83c: 80 a0 60 00 cmp %g1, 0
200e840: 02 80 00 95 be 200ea94 <fifo_open+0x404> <== ALWAYS TAKEN
200e844: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200e848: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
200e84c: 80 a0 60 00 cmp %g1, 0
200e850: 32 bf ff bc bne,a 200e740 <fifo_open+0xb0>
200e854: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200e858: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
200e85c: 80 88 60 01 btst 1, %g1
200e860: 32 80 00 a0 bne,a 200eae0 <fifo_open+0x450>
200e864: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
200e868: 10 80 00 0c b 200e898 <fifo_open+0x208>
200e86c: f6 07 60 20 ld [ %i5 + 0x20 ], %i3
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
200e870: 92 10 20 00 clr %o1
200e874: 7f ff eb 5b call 20095e0 <rtems_semaphore_obtain>
200e878: 94 10 20 00 clr %o2
200e87c: 80 a2 20 00 cmp %o0, 0
200e880: 12 bf ff d8 bne 200e7e0 <fifo_open+0x150> <== NEVER TAKEN
200e884: b0 10 3f fc mov -4, %i0
goto out_error;
} while (prevCounter == pipe->readerCounter);
200e888: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200e88c: 80 a0 40 1b cmp %g1, %i3
200e890: 32 bf ff ac bne,a 200e740 <fifo_open+0xb0> <== ALWAYS TAKEN
200e894: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
200e898: 7f ff eb 9c call 2009708 <rtems_semaphore_release>
200e89c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (! PIPE_WRITEWAIT(pipe))
200e8a0: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200e8a4: 40 00 04 73 call 200fa70 <rtems_barrier_wait>
200e8a8: 92 10 20 00 clr %o1
200e8ac: 80 a2 20 00 cmp %o0, 0
200e8b0: 22 bf ff f0 be,a 200e870 <fifo_open+0x1e0> <== ALWAYS TAKEN
200e8b4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
200e8b8: 10 bf ff ca b 200e7e0 <fifo_open+0x150> <== NOT EXECUTED
200e8bc: b0 10 3f fc mov -4, %i0 <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
200e8c0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200e8c4: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
if (pipe->Readers ++ == 0)
200e8c8: 86 00 60 01 add %g1, 1, %g3
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
200e8cc: 84 00 a0 01 inc %g2
if (pipe->Readers ++ == 0)
200e8d0: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
200e8d4: 80 a0 60 00 cmp %g1, 0
200e8d8: 02 80 00 6a be 200ea80 <fifo_open+0x3f0> <== ALWAYS TAKEN
200e8dc: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200e8e0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200e8e4: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
if (pipe->Writers ++ == 0)
200e8e8: 86 00 60 01 add %g1, 1, %g3
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
200e8ec: 84 00 a0 01 inc %g2
if (pipe->Writers ++ == 0)
200e8f0: c6 27 60 14 st %g3, [ %i5 + 0x14 ]
200e8f4: 80 a0 60 00 cmp %g1, 0
200e8f8: 12 bf ff 91 bne 200e73c <fifo_open+0xac> <== NEVER TAKEN
200e8fc: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
PIPE_WAKEUPREADERS(pipe);
200e900: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200e904: 40 00 04 44 call 200fa14 <rtems_barrier_release>
200e908: 92 07 bf fc add %fp, -4, %o1
break;
}
PIPE_UNLOCK(pipe);
200e90c: 10 bf ff 8d b 200e740 <fifo_open+0xb0>
200e910: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
200e914: 7f ff d9 8e call 2004f4c <malloc>
200e918: 90 10 20 34 mov 0x34, %o0
if (pipe == NULL)
200e91c: b6 92 20 00 orcc %o0, 0, %i3
200e920: 02 80 00 7c be 200eb10 <fifo_open+0x480>
200e924: 82 10 22 00 mov 0x200, %g1
return err;
memset(pipe, 0, sizeof(pipe_control_t));
200e928: c0 26 c0 00 clr [ %i3 ]
200e92c: c0 26 e0 08 clr [ %i3 + 8 ]
200e930: c0 26 e0 0c clr [ %i3 + 0xc ]
200e934: c0 26 e0 10 clr [ %i3 + 0x10 ]
200e938: c0 26 e0 14 clr [ %i3 + 0x14 ]
200e93c: c0 26 e0 18 clr [ %i3 + 0x18 ]
200e940: c0 26 e0 1c clr [ %i3 + 0x1c ]
200e944: c0 26 e0 20 clr [ %i3 + 0x20 ]
200e948: c0 26 e0 24 clr [ %i3 + 0x24 ]
200e94c: c0 26 e0 28 clr [ %i3 + 0x28 ]
200e950: c0 26 e0 2c clr [ %i3 + 0x2c ]
200e954: c0 26 e0 30 clr [ %i3 + 0x30 ]
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
200e958: 90 10 22 00 mov 0x200, %o0
200e95c: 7f ff d9 7c call 2004f4c <malloc>
200e960: c2 26 e0 04 st %g1, [ %i3 + 4 ]
if (! pipe->Buffer)
200e964: 80 a2 20 00 cmp %o0, 0
200e968: 02 80 00 68 be 200eb08 <fifo_open+0x478> <== NEVER TAKEN
200e96c: d0 26 c0 00 st %o0, [ %i3 ]
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
200e970: 35 00 80 8a sethi %hi(0x2022800), %i2
200e974: d0 4e a0 94 ldsb [ %i2 + 0x94 ], %o0 ! 2022894 <c.6075>
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
200e978: 31 14 12 5c sethi %hi(0x50497000), %i0
200e97c: 82 16 22 00 or %i0, 0x200, %g1 ! 50497200 <RAM_END+0x4e097200>
200e980: 92 10 20 00 clr %o1
200e984: 94 10 20 00 clr %o2
200e988: 90 12 00 01 or %o0, %g1, %o0
200e98c: 40 00 03 c8 call 200f8ac <rtems_barrier_create>
200e990: 96 06 e0 2c add %i3, 0x2c, %o3
200e994: 80 a2 20 00 cmp %o0, 0
200e998: 12 80 00 5a bne 200eb00 <fifo_open+0x470>
200e99c: d0 4e a0 94 ldsb [ %i2 + 0x94 ], %o0
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
200e9a0: 03 14 12 5d sethi %hi(0x50497400), %g1
200e9a4: 82 10 63 00 or %g1, 0x300, %g1 ! 50497700 <RAM_END+0x4e097700>
200e9a8: 92 10 20 00 clr %o1
200e9ac: 94 10 20 00 clr %o2
200e9b0: 90 12 00 01 or %o0, %g1, %o0
200e9b4: 40 00 03 be call 200f8ac <rtems_barrier_create>
200e9b8: 96 06 e0 30 add %i3, 0x30, %o3
200e9bc: 80 a2 20 00 cmp %o0, 0
200e9c0: 12 80 00 4e bne 200eaf8 <fifo_open+0x468>
200e9c4: d0 4e a0 94 ldsb [ %i2 + 0x94 ], %o0
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
200e9c8: b0 16 23 00 or %i0, 0x300, %i0
200e9cc: 92 10 20 01 mov 1, %o1
200e9d0: 90 12 00 18 or %o0, %i0, %o0
200e9d4: 94 10 20 10 mov 0x10, %o2
200e9d8: 96 10 20 00 clr %o3
200e9dc: 7f ff ea 5a call 2009344 <rtems_semaphore_create>
200e9e0: 98 06 e0 28 add %i3, 0x28, %o4
200e9e4: 80 a2 20 00 cmp %o0, 0
200e9e8: 12 80 00 42 bne 200eaf0 <fifo_open+0x460>
200e9ec: c2 0e a0 94 ldub [ %i2 + 0x94 ], %g1
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
200e9f0: 84 00 60 01 add %g1, 1, %g2
200e9f4: 83 28 60 18 sll %g1, 0x18, %g1
200e9f8: 83 38 60 18 sra %g1, 0x18, %g1
200e9fc: 80 a0 60 7a cmp %g1, 0x7a
200ea00: 12 bf ff 36 bne 200e6d8 <fifo_open+0x48>
200ea04: c4 2e a0 94 stb %g2, [ %i2 + 0x94 ]
c = 'a';
200ea08: 82 10 20 61 mov 0x61, %g1
200ea0c: 10 bf ff 33 b 200e6d8 <fifo_open+0x48>
200ea10: c2 2e a0 94 stb %g1, [ %i2 + 0x94 ]
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
200ea14: 80 a6 20 00 cmp %i0, 0
200ea18: 12 80 00 24 bne 200eaa8 <fifo_open+0x418> <== NEVER TAKEN
200ea1c: d0 07 63 58 ld [ %i5 + 0x358 ], %o0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200ea20: 7f ff eb 3a call 2009708 <rtems_semaphore_release>
200ea24: f6 27 00 00 st %i3, [ %i4 ]
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
200ea28: 10 bf ff 3c b 200e718 <fifo_open+0x88>
200ea2c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
200ea30: 92 10 20 01 mov 1, %o1
200ea34: 94 10 20 54 mov 0x54, %o2
200ea38: 96 10 20 00 clr %o3
200ea3c: 11 14 12 54 sethi %hi(0x50495000), %o0
200ea40: 7f ff ea 41 call 2009344 <rtems_semaphore_create>
200ea44: 90 12 20 45 or %o0, 0x45, %o0 ! 50495045 <RAM_END+0x4e095045>
200ea48: b4 10 00 08 mov %o0, %i2
200ea4c: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0
200ea50: 7f ff eb 2e call 2009708 <rtems_semaphore_release>
200ea54: b0 10 3f f4 mov -12, %i0
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
200ea58: 80 a6 a0 00 cmp %i2, 0
200ea5c: 12 bf ff 3b bne 200e748 <fifo_open+0xb8>
200ea60: d0 07 63 58 ld [ %i5 + 0x358 ], %o0
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200ea64: 10 bf ff 13 b 200e6b0 <fifo_open+0x20>
200ea68: 92 10 20 00 clr %o1
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200ea6c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200ea70: 40 00 03 e9 call 200fa14 <rtems_barrier_release>
200ea74: 92 07 bf fc add %fp, -4, %o1
if (pipe->Writers == 0) {
200ea78: 10 bf ff 3e b 200e770 <fifo_open+0xe0>
200ea7c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
200ea80: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200ea84: 40 00 03 e4 call 200fa14 <rtems_barrier_release>
200ea88: 92 07 bf fc add %fp, -4, %o1
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
200ea8c: 10 bf ff 96 b 200e8e4 <fifo_open+0x254>
200ea90: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
200ea94: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200ea98: 40 00 03 df call 200fa14 <rtems_barrier_release>
200ea9c: 92 07 bf fc add %fp, -4, %o1
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
200eaa0: 10 bf ff 6b b 200e84c <fifo_open+0x1bc>
200eaa4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200eaa8: 40 00 03 b2 call 200f970 <rtems_barrier_delete> <== NOT EXECUTED
200eaac: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
200eab0: 40 00 03 b0 call 200f970 <rtems_barrier_delete> <== NOT EXECUTED
200eab4: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
200eab8: 7f ff ea 93 call 2009504 <rtems_semaphore_delete> <== NOT EXECUTED
200eabc: d0 06 e0 28 ld [ %i3 + 0x28 ], %o0 <== NOT EXECUTED
free(pipe->Buffer);
200eac0: 7f ff d7 f5 call 2004a94 <free> <== NOT EXECUTED
200eac4: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
free(pipe);
200eac8: 7f ff d7 f3 call 2004a94 <free> <== NOT EXECUTED
200eacc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200ead0: 7f ff eb 0e call 2009708 <rtems_semaphore_release>
200ead4: d0 07 63 58 ld [ %i5 + 0x358 ], %o0
200ead8: 81 c7 e0 08 ret
200eadc: 81 e8 00 00 restore
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
200eae0: 7f ff eb 0a call 2009708 <rtems_semaphore_release>
200eae4: b0 10 3f fa mov -6, %i0
err = -ENXIO;
goto out_error;
200eae8: 10 bf ff 3f b 200e7e4 <fifo_open+0x154>
200eaec: 90 10 00 1c mov %i4, %o0
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
200eaf0: 40 00 03 a0 call 200f970 <rtems_barrier_delete>
200eaf4: d0 06 e0 30 ld [ %i3 + 0x30 ], %o0
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
200eaf8: 40 00 03 9e call 200f970 <rtems_barrier_delete>
200eafc: d0 06 e0 2c ld [ %i3 + 0x2c ], %o0
err_rbar:
free(pipe->Buffer);
200eb00: 7f ff d7 e5 call 2004a94 <free>
200eb04: d0 06 c0 00 ld [ %i3 ], %o0
err_buf:
free(pipe);
200eb08: 7f ff d7 e3 call 2004a94 <free>
200eb0c: 90 10 00 1b mov %i3, %o0
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
200eb10: 10 bf ff f0 b 200ead0 <fifo_open+0x440>
200eb14: b0 10 3f f4 mov -12, %i0
02009d94 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
2009d94: 9d e3 bf a0 save %sp, -96, %sp
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
2009d98: 03 00 80 48 sethi %hi(0x2012000), %g1
2009d9c: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 20120d0 <rtems_libio_number_iops>
2009da0: 80 a6 00 01 cmp %i0, %g1
2009da4: 1a 80 00 3d bcc 2009e98 <fpathconf+0x104> <== ALWAYS TAKEN
2009da8: 03 00 80 4a sethi %hi(0x2012800), %g1
iop = rtems_libio_iop(fd);
2009dac: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 2012964 <rtems_libio_iops><== NOT EXECUTED
2009db0: 85 2e 20 03 sll %i0, 3, %g2 <== NOT EXECUTED
2009db4: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED
2009db8: b0 00 80 18 add %g2, %i0, %i0 <== NOT EXECUTED
2009dbc: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
2009dc0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
2009dc4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
2009dc8: 02 80 00 34 be 2009e98 <fpathconf+0x104> <== NOT EXECUTED
2009dcc: 80 a6 60 0b cmp %i1, 0xb <== NOT EXECUTED
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2009dd0: 08 80 00 08 bleu 2009df0 <fpathconf+0x5c> <== NOT EXECUTED
2009dd4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2009dd8: 40 00 06 53 call 200b724 <__errno> <== NOT EXECUTED
2009ddc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2009de0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2009de4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
break;
}
return return_value;
}
2009de8: 81 c7 e0 08 ret <== NOT EXECUTED
2009dec: 81 e8 00 00 restore <== NOT EXECUTED
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2009df0: b3 2e 60 02 sll %i1, 2, %i1 <== NOT EXECUTED
2009df4: 05 00 80 27 sethi %hi(0x2009c00), %g2 <== NOT EXECUTED
2009df8: 84 10 a1 64 or %g2, 0x164, %g2 ! 2009d64 <_close_r+0x10> <== NOT EXECUTED
2009dfc: c4 00 80 19 ld [ %g2 + %i1 ], %g2 <== NOT EXECUTED
2009e00: 81 c0 80 00 jmp %g2 <== NOT EXECUTED
2009e04: 01 00 00 00 nop <== NOT EXECUTED
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2009e08: f0 00 60 4c ld [ %g1 + 0x4c ], %i0 <== NOT EXECUTED
break;
2009e0c: 81 c7 e0 08 ret <== NOT EXECUTED
2009e10: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
2009e14: f0 00 60 40 ld [ %g1 + 0x40 ], %i0 <== NOT EXECUTED
break;
2009e18: 81 c7 e0 08 ret <== NOT EXECUTED
2009e1c: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2009e20: f0 00 60 54 ld [ %g1 + 0x54 ], %i0 <== NOT EXECUTED
break;
2009e24: 81 c7 e0 08 ret <== NOT EXECUTED
2009e28: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
2009e2c: f0 00 60 48 ld [ %g1 + 0x48 ], %i0 <== NOT EXECUTED
break;
2009e30: 81 c7 e0 08 ret <== NOT EXECUTED
2009e34: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
2009e38: f0 00 60 44 ld [ %g1 + 0x44 ], %i0 <== NOT EXECUTED
break;
2009e3c: 81 c7 e0 08 ret <== NOT EXECUTED
2009e40: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
2009e44: f0 00 60 3c ld [ %g1 + 0x3c ], %i0 <== NOT EXECUTED
break;
2009e48: 81 c7 e0 08 ret <== NOT EXECUTED
2009e4c: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
2009e50: f0 00 60 38 ld [ %g1 + 0x38 ], %i0 <== NOT EXECUTED
break;
2009e54: 81 c7 e0 08 ret <== NOT EXECUTED
2009e58: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
2009e5c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 <== NOT EXECUTED
break;
2009e60: 81 c7 e0 08 ret <== NOT EXECUTED
2009e64: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
2009e68: f0 00 60 30 ld [ %g1 + 0x30 ], %i0 <== NOT EXECUTED
break;
2009e6c: 81 c7 e0 08 ret <== NOT EXECUTED
2009e70: 81 e8 00 00 restore <== NOT EXECUTED
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
2009e74: f0 00 60 2c ld [ %g1 + 0x2c ], %i0 <== NOT EXECUTED
break;
2009e78: 81 c7 e0 08 ret <== NOT EXECUTED
2009e7c: 81 e8 00 00 restore <== NOT EXECUTED
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
2009e80: f0 00 60 28 ld [ %g1 + 0x28 ], %i0 <== NOT EXECUTED
break;
2009e84: 81 c7 e0 08 ret <== NOT EXECUTED
2009e88: 81 e8 00 00 restore <== NOT EXECUTED
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
2009e8c: f0 00 60 50 ld [ %g1 + 0x50 ], %i0 <== NOT EXECUTED
break;
2009e90: 81 c7 e0 08 ret <== NOT EXECUTED
2009e94: 81 e8 00 00 restore <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
2009e98: 40 00 06 23 call 200b724 <__errno>
2009e9c: b0 10 3f ff mov -1, %i0
2009ea0: 82 10 20 09 mov 9, %g1
2009ea4: c2 22 00 00 st %g1, [ %o0 ]
2009ea8: 81 c7 e0 08 ret
2009eac: 81 e8 00 00 restore
0200383c <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
200383c: 9d e3 bf a0 save %sp, -96, %sp
MSBUMP(free_calls, 1);
2003840: 03 00 80 74 sethi %hi(0x201d000), %g1
2003844: 82 10 62 50 or %g1, 0x250, %g1 ! 201d250 <rtems_malloc_statistics>
2003848: c4 00 60 0c ld [ %g1 + 0xc ], %g2
#include <stdlib.h>
void free(
void *ptr
)
{
200384c: b2 10 00 18 mov %i0, %i1
MSBUMP(free_calls, 1);
2003850: 84 00 a0 01 inc %g2
if ( !ptr )
2003854: 80 a6 20 00 cmp %i0, 0
2003858: 02 80 00 15 be 20038ac <free+0x70>
200385c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2003860: 03 00 80 75 sethi %hi(0x201d400), %g1
2003864: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current>
2003868: 80 a0 60 03 cmp %g1, 3
200386c: 02 80 00 17 be 20038c8 <free+0x8c> <== ALWAYS TAKEN
2003870: 03 00 80 73 sethi %hi(0x201cc00), %g1
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2003874: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 201ce98 <rtems_malloc_statistics_helpers>
2003878: 80 a0 60 00 cmp %g1, 0
200387c: 02 80 00 06 be 2003894 <free+0x58>
2003880: 3b 00 80 71 sethi %hi(0x201c400), %i5
(*rtems_malloc_statistics_helpers->at_free)(ptr);
2003884: c2 00 60 08 ld [ %g1 + 8 ], %g1
2003888: 9f c0 40 00 call %g1
200388c: 90 10 00 19 mov %i1, %o0
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
2003890: 3b 00 80 71 sethi %hi(0x201c400), %i5
2003894: d0 07 63 38 ld [ %i5 + 0x338 ], %o0 ! 201c738 <RTEMS_Malloc_Heap>
2003898: 40 00 18 8f call 2009ad4 <_Protected_heap_Free>
200389c: 92 10 00 19 mov %i1, %o1
20038a0: 80 8a 20 ff btst 0xff, %o0
20038a4: 22 80 00 04 be,a 20038b4 <free+0x78>
20038a8: c2 07 63 38 ld [ %i5 + 0x338 ], %g1
20038ac: 81 c7 e0 08 ret
20038b0: 81 e8 00 00 restore
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
20038b4: 31 00 80 6c sethi %hi(0x201b000), %i0
20038b8: f4 00 60 18 ld [ %g1 + 0x18 ], %i2
20038bc: f6 00 60 1c ld [ %g1 + 0x1c ], %i3
20038c0: 40 00 03 98 call 2004720 <printk>
20038c4: 91 ee 21 f0 restore %i0, 0x1f0, %o0
/*
* 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() ) {
20038c8: 40 00 00 6b call 2003a74 <malloc_is_system_state_OK>
20038cc: 01 00 00 00 nop
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
20038d0: 80 8a 20 ff btst 0xff, %o0
20038d4: 12 bf ff e8 bne 2003874 <free+0x38>
20038d8: 03 00 80 73 sethi %hi(0x201cc00), %g1
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
20038dc: 40 00 00 85 call 2003af0 <malloc_deferred_free>
20038e0: 81 e8 00 00 restore
02019eb0 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
2019eb0: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
2019eb4: 80 a6 60 00 cmp %i1, 0
2019eb8: 02 80 00 1f be 2019f34 <fstat+0x84> <== NEVER TAKEN
2019ebc: 03 00 80 71 sethi %hi(0x201c400), %g1
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
2019ec0: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201c77c <rtems_libio_number_iops>
2019ec4: 80 a6 00 01 cmp %i0, %g1
2019ec8: 1a 80 00 15 bcc 2019f1c <fstat+0x6c>
2019ecc: 03 00 80 74 sethi %hi(0x201d000), %g1
2019ed0: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 201d238 <rtems_libio_iops>
2019ed4: 85 2e 20 03 sll %i0, 3, %g2
2019ed8: b1 2e 20 06 sll %i0, 6, %i0
2019edc: b0 00 80 18 add %g2, %i0, %i0
2019ee0: b0 00 40 18 add %g1, %i0, %i0
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
2019ee4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2019ee8: 80 88 61 00 btst 0x100, %g1
2019eec: 02 80 00 0c be 2019f1c <fstat+0x6c>
2019ef0: 94 10 20 48 mov 0x48, %o2
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
2019ef4: 92 10 20 00 clr %o1
2019ef8: 7f ff d8 ba call 20101e0 <memset>
2019efc: 90 10 00 19 mov %i1, %o0
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
2019f00: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
2019f04: 90 06 20 1c add %i0, 0x1c, %o0
2019f08: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2019f0c: 9f c0 40 00 call %g1
2019f10: 92 10 00 19 mov %i1, %o1
}
2019f14: 81 c7 e0 08 ret
2019f18: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
2019f1c: 7f ff d6 19 call 200f780 <__errno>
2019f20: b0 10 3f ff mov -1, %i0
2019f24: 82 10 20 09 mov 9, %g1
2019f28: c2 22 00 00 st %g1, [ %o0 ]
2019f2c: 81 c7 e0 08 ret
2019f30: 81 e8 00 00 restore
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
2019f34: 7f ff d6 13 call 200f780 <__errno> <== NOT EXECUTED
2019f38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2019f3c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2019f40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019f44: 81 c7 e0 08 ret <== NOT EXECUTED
2019f48: 81 e8 00 00 restore <== NOT EXECUTED
020035bc <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) {
20035bc: 03 00 80 83 sethi %hi(0x2020c00), %g1
20035c0: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 2020dc8 <disktab_size>
20035c4: 80 a0 40 08 cmp %g1, %o0
20035c8: 08 80 00 1e bleu 2003640 <get_disk_entry+0x84> <== NEVER TAKEN
20035cc: 84 10 20 00 clr %g2
20035d0: 03 00 80 83 sethi %hi(0x2020c00), %g1
20035d4: c2 00 61 cc ld [ %g1 + 0x1cc ], %g1 ! 2020dcc <disktab>
20035d8: 80 a0 60 00 cmp %g1, 0
20035dc: 02 80 00 19 be 2003640 <get_disk_entry+0x84> <== NEVER TAKEN
20035e0: 01 00 00 00 nop
rtems_disk_device_table *dtab = disktab + major;
20035e4: 91 2a 20 03 sll %o0, 3, %o0
20035e8: 86 00 40 08 add %g1, %o0, %g3
if (minor < dtab->size && dtab->minor != NULL) {
20035ec: c6 00 e0 04 ld [ %g3 + 4 ], %g3
20035f0: 80 a0 c0 09 cmp %g3, %o1
20035f4: 08 80 00 13 bleu 2003640 <get_disk_entry+0x84> <== NEVER TAKEN
20035f8: 01 00 00 00 nop
20035fc: c2 00 40 08 ld [ %g1 + %o0 ], %g1
2003600: 80 a0 60 00 cmp %g1, 0
2003604: 02 80 00 0f be 2003640 <get_disk_entry+0x84> <== NEVER TAKEN
2003608: 93 2a 60 02 sll %o1, 2, %o1
rtems_disk_device *dd = dtab->minor [minor];
200360c: c4 00 40 09 ld [ %g1 + %o1 ], %g2
if (dd != NULL && !lookup_only) {
2003610: 80 a0 a0 00 cmp %g2, 0
2003614: 02 80 00 0b be 2003640 <get_disk_entry+0x84>
2003618: 80 a2 a0 00 cmp %o2, 0
200361c: 12 80 00 09 bne 2003640 <get_disk_entry+0x84>
2003620: 01 00 00 00 nop
if (!dd->deleted) {
2003624: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1
2003628: 80 a0 60 00 cmp %g1, 0
200362c: 32 80 00 07 bne,a 2003648 <get_disk_entry+0x8c>
2003630: 84 10 20 00 clr %g2
++dd->uses;
2003634: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2003638: 82 00 60 01 inc %g1
200363c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
return dd;
}
}
return NULL;
}
2003640: 81 c3 e0 08 retl
2003644: 90 10 00 02 mov %g2, %o0
2003648: 81 c3 e0 08 retl
200364c: 90 10 00 02 mov %g2, %o0
02004d30 <get_sector>:
*/
static rtems_status_code
get_sector(int fd,
uint32_t sector_num,
rtems_sector_data_t **sector)
{
2004d30: 9d e3 bf a0 save %sp, -96, %sp
2004d34: ba 10 00 18 mov %i0, %i5
rtems_sector_data_t *s;
ssize_t n;
off_t off;
off_t new_off;
if (sector == NULL)
2004d38: 80 a6 a0 00 cmp %i2, 0
2004d3c: 02 80 00 1e be 2004db4 <get_sector+0x84> <== NEVER TAKEN
2004d40: b0 10 20 19 mov 0x19, %i0
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
2004d44: b9 2e 60 09 sll %i1, 9, %i4
new_off = lseek(fd, off, SEEK_SET);
2004d48: 90 10 00 1d mov %i5, %o0
2004d4c: 92 10 20 00 clr %o1
2004d50: 94 10 00 1c mov %i4, %o2
2004d54: 40 00 05 90 call 2006394 <lseek>
2004d58: 96 10 20 00 clr %o3
if (new_off != off) {
2004d5c: 80 a2 20 00 cmp %o0, 0
2004d60: 02 80 00 04 be 2004d70 <get_sector+0x40> <== ALWAYS TAKEN
2004d64: 80 a2 40 1c cmp %o1, %i4
s->sector_num = sector_num;
*sector = s;
return RTEMS_SUCCESSFUL;
}
2004d68: 81 c7 e0 08 ret <== NOT EXECUTED
2004d6c: 91 e8 20 1b restore %g0, 0x1b, %o0 <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
2004d70: 12 80 00 11 bne 2004db4 <get_sector+0x84> <== NEVER TAKEN
2004d74: b0 10 20 1b mov 0x1b, %i0
return RTEMS_IO_ERROR;
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
2004d78: 90 10 22 04 mov 0x204, %o0
2004d7c: 40 00 06 67 call 2006718 <malloc>
2004d80: b0 10 20 1a mov 0x1a, %i0
if (s == NULL)
2004d84: 80 a2 20 00 cmp %o0, 0
2004d88: 02 80 00 0b be 2004db4 <get_sector+0x84> <== NEVER TAKEN
2004d8c: b8 10 00 08 mov %o0, %i4
{
return RTEMS_NO_MEMORY;
}
n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE);
2004d90: 90 10 00 1d mov %i5, %o0
2004d94: 92 07 20 04 add %i4, 4, %o1
2004d98: 40 00 09 33 call 2007264 <read>
2004d9c: 94 10 22 00 mov 0x200, %o2
if (n != RTEMS_IDE_SECTOR_SIZE)
2004da0: 80 a2 22 00 cmp %o0, 0x200
2004da4: 02 80 00 06 be 2004dbc <get_sector+0x8c> <== ALWAYS TAKEN
2004da8: 90 10 00 1c mov %i4, %o0
{
free(s);
2004dac: 40 00 04 31 call 2005e70 <free> <== NOT EXECUTED
2004db0: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED
2004db4: 81 c7 e0 08 ret <== NOT EXECUTED
2004db8: 81 e8 00 00 restore <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
s->sector_num = sector_num;
2004dbc: f2 27 00 00 st %i1, [ %i4 ]
*sector = s;
2004dc0: f8 26 80 00 st %i4, [ %i2 ]
return RTEMS_SUCCESSFUL;
2004dc4: 81 c7 e0 08 ret
2004dc8: 91 e8 20 00 restore %g0, 0, %o0
02062338 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
2062338: 9d e3 bf a0 save %sp, -96, %sp
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
206233c: 03 00 81 bf sethi %hi(0x206fc00), %g1
2062340: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 206fce0 <rtems_libio_number_iops>
2062344: 80 a6 00 01 cmp %i0, %g1
2062348: 1a 80 00 08 bcc 2062368 <getdents+0x30> <== NEVER TAKEN
206234c: ba 10 20 00 clr %i5
2062350: 03 00 81 cf sethi %hi(0x2073c00), %g1
2062354: fa 00 61 f0 ld [ %g1 + 0x1f0 ], %i5 ! 2073df0 <rtems_libio_iops>
2062358: 83 2e 20 03 sll %i0, 3, %g1
206235c: b1 2e 20 06 sll %i0, 6, %i0
2062360: b0 00 40 18 add %g1, %i0, %i0
2062364: ba 07 40 18 add %i5, %i0, %i5
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
2062368: 7f ff 29 51 call 202c8ac <rtems_filesystem_node_type>
206236c: 90 07 60 1c add %i5, 0x1c, %o0
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
2062370: 80 a2 20 00 cmp %o0, 0
2062374: 12 80 00 09 bne 2062398 <getdents+0x60>
2062378: 90 10 00 1d mov %i5, %o0
/*
* 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 );
206237c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
2062380: c2 00 60 08 ld [ %g1 + 8 ], %g1
2062384: 92 10 00 19 mov %i1, %o1
2062388: 9f c0 40 00 call %g1
206238c: 94 10 00 1a mov %i2, %o2
}
2062390: 81 c7 e0 08 ret
2062394: 91 e8 00 08 restore %g0, %o0, %o0
/*
* 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 );
2062398: 7f ff 93 d5 call 20472ec <__errno>
206239c: b0 10 3f ff mov -1, %i0
20623a0: 82 10 20 14 mov 0x14, %g1
20623a4: c2 22 00 00 st %g1, [ %o0 ]
20623a8: 81 c7 e0 08 ret
20623ac: 81 e8 00 00 restore
020038e4 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
20038e4: 9d e3 bf 98 save %sp, -104, %sp
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
20038e8: b6 96 20 00 orcc %i0, 0, %i3
20038ec: 02 80 00 1e be 2003964 <gettimeofday+0x80> <== NEVER TAKEN
20038f0: 01 00 00 00 nop
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
20038f4: 7f ff fb 71 call 20026b8 <sparc_disable_interrupts>
20038f8: 01 00 00 00 nop
20038fc: b4 10 00 08 mov %o0, %i2
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
2003900: 40 00 14 d4 call 2008c50 <_TOD_Get_as_timestamp>
2003904: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2003908: f8 1f bf f8 ldd [ %fp + -8 ], %i4
_TOD_Get( &now );
_ISR_Enable(level);
200390c: 7f ff fb 6f call 20026c8 <sparc_enable_interrupts>
2003910: 90 10 00 1a mov %i2, %o0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2003914: 90 10 00 1c mov %i4, %o0
2003918: 92 10 00 1d mov %i5, %o1
200391c: 94 10 20 00 clr %o2
2003920: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003924: 40 00 54 d7 call 2018c80 <__divdi3>
2003928: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
200392c: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2003930: d2 26 c0 00 st %o1, [ %i3 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2003934: 90 10 00 1c mov %i4, %o0
2003938: 92 10 00 1d mov %i5, %o1
200393c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003940: 40 00 55 b6 call 2019018 <__moddi3>
2003944: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
2003948: b0 10 20 00 clr %i0
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
200394c: 90 10 00 09 mov %o1, %o0
2003950: 40 00 53 76 call 2018728 <.div>
2003954: 92 10 23 e8 mov 0x3e8, %o1
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
2003958: d0 26 e0 04 st %o0, [ %i3 + 4 ]
}
200395c: 81 c7 e0 08 ret
2003960: 81 e8 00 00 restore
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
rtems_set_errno_and_return_minus_one( EFAULT );
2003964: 40 00 2f 87 call 200f780 <__errno> <== NOT EXECUTED
2003968: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200396c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2003970: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003974: 81 c7 e0 08 ret <== NOT EXECUTED
2003978: 81 e8 00 00 restore <== NOT EXECUTED
0200eee8 <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200eee8: 9d e3 be 88 save %sp, -376, %sp
static inline void rtems_filesystem_instance_lock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->lock_h)( loc->mt_entry );
200eeec: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200eef0: d0 06 20 34 ld [ %i0 + 0x34 ], %o0
200eef4: c2 00 40 00 ld [ %g1 ], %g1
200eef8: 9f c0 40 00 call %g1
200eefc: ba 10 00 18 mov %i0, %i5
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry
+ (count / sizeof( struct dirent )) * sizeof( struct dirent );
200ef00: 90 10 00 1a mov %i2, %o0
int last_entry;
struct dirent tmp_dirent;
rtems_filesystem_instance_lock( &iop->pathinfo );
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
200ef04: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
the_chain = &the_jnode->info.directory.Entries;
/* Move to the first of the desired directory entries */
bytes_transferred = 0;
first_entry = iop->offset;
200ef08: f8 06 20 14 ld [ %i0 + 0x14 ], %i4
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry
+ (count / sizeof( struct dirent )) * sizeof( struct dirent );
200ef0c: 40 00 26 05 call 2018720 <.udiv>
200ef10: 92 10 21 18 mov 0x118, %o1
200ef14: a1 2a 20 03 sll %o0, 3, %l0
200ef18: 91 2a 20 05 sll %o0, 5, %o0
200ef1c: 90 04 00 08 add %l0, %o0, %o0
200ef20: a1 2a 20 03 sll %o0, 3, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200ef24: f4 04 60 50 ld [ %l1 + 0x50 ], %i2
200ef28: 90 24 00 08 sub %l0, %o0, %o0
200ef2c: a0 02 00 1c add %o0, %i4, %l0
/* The directory was not empty so try to move to the desired entry in chain*/
for (
200ef30: 80 a4 20 00 cmp %l0, 0
200ef34: 04 80 00 2c ble 200efe4 <imfs_dir_read+0xfc> <== NEVER TAKEN
200ef38: b0 10 20 00 clr %i0
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 ));
200ef3c: a2 04 60 54 add %l1, 0x54, %l1
current_entry = 0,
the_node = rtems_chain_first( the_chain );
current_entry < last_entry
&& !rtems_chain_is_tail( the_chain, the_node );
200ef40: 80 a6 80 11 cmp %i2, %l1
200ef44: 22 80 00 29 be,a 200efe8 <imfs_dir_read+0x100>
200ef48: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200ef4c: b6 10 20 00 clr %i3
the_node = rtems_chain_next( the_node )
) {
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
200ef50: 10 80 00 08 b 200ef70 <imfs_dir_read+0x88>
200ef54: a4 10 21 18 mov 0x118, %l2
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry
+ (count / sizeof( struct dirent )) * sizeof( struct dirent );
/* The directory was not empty so try to move to the desired entry in chain*/
for (
200ef58: 80 a4 00 1b cmp %l0, %i3
200ef5c: 04 80 00 22 ble 200efe4 <imfs_dir_read+0xfc> <== NEVER TAKEN
200ef60: f4 06 80 00 ld [ %i2 ], %i2
current_entry = 0,
the_node = rtems_chain_first( the_chain );
current_entry < last_entry
&& !rtems_chain_is_tail( the_chain, the_node );
200ef64: 80 a6 80 11 cmp %i2, %l1
200ef68: 22 80 00 20 be,a 200efe8 <imfs_dir_read+0x100>
200ef6c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
current_entry += sizeof( struct dirent ),
the_node = rtems_chain_next( the_node )
) {
if( current_entry >= first_entry ) {
200ef70: 80 a7 00 1b cmp %i4, %i3
200ef74: 34 bf ff f9 bg,a 200ef58 <imfs_dir_read+0x70>
200ef78: b6 06 e1 18 add %i3, 0x118, %i3
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
200ef7c: c2 06 a0 38 ld [ %i2 + 0x38 ], %g1
current_entry += sizeof( struct dirent ),
the_node = rtems_chain_next( the_node )
) {
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200ef80: 85 3e e0 1f sra %i3, 0x1f, %g2
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200ef84: a6 06 a0 0c add %i2, 0xc, %l3
current_entry += sizeof( struct dirent ),
the_node = rtems_chain_next( the_node )
) {
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200ef88: c4 27 be f0 st %g2, [ %fp + -272 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
200ef8c: c2 27 be e8 st %g1, [ %fp + -280 ]
current_entry += sizeof( struct dirent ),
the_node = rtems_chain_next( the_node )
) {
if( current_entry >= first_entry ) {
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200ef90: f6 27 be f4 st %i3, [ %fp + -268 ]
tmp_dirent.d_reclen = sizeof( struct dirent );
200ef94: e4 37 be f8 sth %l2, [ %fp + -264 ]
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200ef98: 40 00 07 92 call 2010de0 <strlen>
200ef9c: 90 10 00 13 mov %l3, %o0
strcpy( tmp_dirent.d_name, the_jnode->name );
200efa0: 92 10 00 13 mov %l3, %o1
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
tmp_dirent.d_reclen = sizeof( struct dirent );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200efa4: d0 37 be fa sth %o0, [ %fp + -262 ]
strcpy( tmp_dirent.d_name, the_jnode->name );
200efa8: 40 00 05 ca call 20106d0 <strcpy>
200efac: 90 07 be fc add %fp, -260, %o0
memcpy(
200efb0: 90 06 40 18 add %i1, %i0, %o0
200efb4: 92 07 be e8 add %fp, -280, %o1
200efb8: 40 00 04 4e call 20100f0 <memcpy>
200efbc: 94 10 21 18 mov 0x118, %o2
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset += sizeof( struct dirent );
200efc0: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2
* to the end of the exisiting file, the remaining entries will be placed in
* the buffer and the returned value will be equal to -m actual- times the
* size of a directory entry.
*/
ssize_t imfs_dir_read(
200efc4: b6 06 e1 18 add %i3, 0x118, %i3
memcpy(
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset += sizeof( struct dirent );
200efc8: 86 80 e1 18 addcc %g3, 0x118, %g3
200efcc: 84 40 a0 00 addx %g2, 0, %g2
200efd0: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
bytes_transferred += sizeof( struct dirent );
200efd4: b0 06 21 18 add %i0, 0x118, %i0
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry
+ (count / sizeof( struct dirent )) * sizeof( struct dirent );
/* The directory was not empty so try to move to the desired entry in chain*/
for (
200efd8: 80 a4 00 1b cmp %l0, %i3
200efdc: 14 bf ff e2 bg 200ef64 <imfs_dir_read+0x7c> <== NEVER TAKEN
200efe0: f4 06 80 00 ld [ %i2 ], %i2
static inline void rtems_filesystem_instance_unlock(
const rtems_filesystem_location_info_t *loc
)
{
(*loc->ops->unlock_h)( loc->mt_entry );
200efe4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200efe8: c2 00 60 04 ld [ %g1 + 4 ], %g1
200efec: 9f c0 40 00 call %g1
200eff0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
return bytes_transferred;
}
200eff4: 81 c7 e0 08 ret
200eff8: 81 e8 00 00 restore
0202b3cc <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
202b3cc: 9d e3 bf a0 save %sp, -96, %sp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
202b3d0: 03 00 81 ce sethi %hi(0x2073800), %g1
202b3d4: c4 48 60 00 ldsb [ %g1 ], %g2
202b3d8: 80 a0 a0 00 cmp %g2, 0
202b3dc: 22 80 00 04 be,a 202b3ec <init_etc_passwd_group+0x20>
202b3e0: 84 10 20 01 mov 1, %g2
202b3e4: 81 c7 e0 08 ret
202b3e8: 81 e8 00 00 restore
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
202b3ec: 92 10 21 ff mov 0x1ff, %o1
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
202b3f0: c4 28 60 00 stb %g2, [ %g1 ]
mkdir("/etc", 0777);
202b3f4: 11 00 81 8b sethi %hi(0x2062c00), %o0
202b3f8: 7f ff 78 85 call 200960c <mkdir>
202b3fc: 90 12 23 78 or %o0, 0x378, %o0 ! 2062f78 <_rodata_start+0x9e8>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
202b400: 39 00 81 8c sethi %hi(0x2063000), %i4
202b404: 3b 00 81 bc sethi %hi(0x206f000), %i5
202b408: 90 17 20 00 mov %i4, %o0
202b40c: 40 00 72 6f call 2047dc8 <fopen>
202b410: 92 17 62 c0 or %i5, 0x2c0, %o1
202b414: 80 a2 20 00 cmp %o0, 0
202b418: 22 80 00 0d be,a 202b44c <init_etc_passwd_group+0x80>
202b41c: 90 17 20 00 mov %i4, %o0
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
202b420: 40 00 70 05 call 2047434 <fclose>
202b424: 01 00 00 00 nop
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
202b428: 39 00 81 8c sethi %hi(0x2063000), %i4
202b42c: 92 17 62 c0 or %i5, 0x2c0, %o1
202b430: 40 00 72 66 call 2047dc8 <fopen>
202b434: 90 17 20 b8 or %i4, 0xb8, %o0
202b438: 80 a2 20 00 cmp %o0, 0
202b43c: 22 80 00 11 be,a 202b480 <init_etc_passwd_group+0xb4>
202b440: 90 17 20 b8 or %i4, 0xb8, %o0
fclose(fp);
202b444: 40 00 6f fc call 2047434 <fclose>
202b448: 91 e8 00 08 restore %g0, %o0, %o0
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
202b44c: 13 00 81 9b sethi %hi(0x2066c00), %o1
202b450: 40 00 72 5e call 2047dc8 <fopen>
202b454: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 2066ed0 <rtems_rtc_shell_usage+0x518>
202b458: b0 92 20 00 orcc %o0, 0, %i0
202b45c: 02 bf ff f3 be 202b428 <init_etc_passwd_group+0x5c> <== NEVER TAKEN
202b460: 92 10 20 01 mov 1, %o1
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
202b464: 94 10 20 66 mov 0x66, %o2
202b468: 96 10 00 18 mov %i0, %o3
202b46c: 11 00 81 a3 sethi %hi(0x2068c00), %o0
202b470: 40 00 77 2b call 204911c <fwrite>
202b474: 90 12 22 68 or %o0, 0x268, %o0 ! 2068e68 <IMFS_memfile_handlers+0x7c>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
202b478: 10 bf ff ea b 202b420 <init_etc_passwd_group+0x54>
202b47c: 90 10 00 18 mov %i0, %o0
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
202b480: 13 00 81 9b sethi %hi(0x2066c00), %o1
202b484: 40 00 72 51 call 2047dc8 <fopen>
202b488: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 2066ed0 <rtems_rtc_shell_usage+0x518>
202b48c: b0 92 20 00 orcc %o0, 0, %i0
202b490: 02 bf ff d5 be 202b3e4 <init_etc_passwd_group+0x18> <== NEVER TAKEN
202b494: 01 00 00 00 nop
fprintf( fp, "root:x:0:root\n"
202b498: 92 10 20 01 mov 1, %o1 ! 1 <PROM_START+0x1>
202b49c: 11 00 81 a3 sethi %hi(0x2068c00), %o0
202b4a0: 94 10 20 2a mov 0x2a, %o2
202b4a4: 96 10 00 18 mov %i0, %o3
202b4a8: 40 00 77 1d call 204911c <fwrite>
202b4ac: 90 12 22 d0 or %o0, 0x2d0, %o0
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
202b4b0: 40 00 6f e1 call 2047434 <fclose>
202b4b4: 81 e8 00 00 restore
020065a4 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
20065a4: 9d e3 bf a0 save %sp, -96, %sp
if (tty->termios.c_iflag & ISTRIP)
20065a8: c2 06 60 30 ld [ %i1 + 0x30 ], %g1
20065ac: 80 88 60 20 btst 0x20, %g1
20065b0: 02 80 00 03 be 20065bc <iproc+0x18> <== ALWAYS TAKEN
20065b4: ba 10 00 18 mov %i0, %i5
c &= 0x7f;
20065b8: ba 0e 20 7f and %i0, 0x7f, %i5 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
20065bc: 80 88 62 00 btst 0x200, %g1
20065c0: 02 80 00 0d be 20065f4 <iproc+0x50>
20065c4: 80 a7 60 0d cmp %i5, 0xd
c = tolower (c);
20065c8: 05 00 80 72 sethi %hi(0x201c800), %g2
20065cc: c6 00 a1 a0 ld [ %g2 + 0x1a0 ], %g3 ! 201c9a0 <__ctype_ptr__>
20065d0: 84 10 00 1d mov %i5, %g2
20065d4: ba 00 c0 1d add %g3, %i5, %i5
20065d8: c6 0f 60 01 ldub [ %i5 + 1 ], %g3
20065dc: 86 08 e0 03 and %g3, 3, %g3
20065e0: 80 a0 e0 01 cmp %g3, 1
20065e4: 22 80 00 02 be,a 20065ec <iproc+0x48>
20065e8: 84 00 a0 20 add %g2, 0x20, %g2
20065ec: ba 08 a0 ff and %g2, 0xff, %i5
if (c == '\r') {
20065f0: 80 a7 60 0d cmp %i5, 0xd
20065f4: 02 80 00 17 be 2006650 <iproc+0xac>
20065f8: 80 a7 60 0a cmp %i5, 0xa
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
20065fc: 02 80 00 40 be 20066fc <iproc+0x158>
2006600: 80 a7 60 00 cmp %i5, 0
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2006604: 32 80 00 1a bne,a 200666c <iproc+0xc8> <== ALWAYS TAKEN
2006608: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
200660c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2006610: 05 00 80 72 sethi %hi(0x201c800), %g2
2006614: c4 00 a0 5c ld [ %g2 + 0x5c ], %g2 ! 201c85c <rtems_termios_cbufsize>
2006618: 84 00 bf ff add %g2, -1, %g2
200661c: 80 a0 40 02 cmp %g1, %g2
2006620: 1a 80 00 46 bcc 2006738 <iproc+0x194> <== NEVER TAKEN
2006624: b0 10 20 00 clr %i0
if (tty->termios.c_lflag & ECHO)
2006628: c4 06 60 3c ld [ %i1 + 0x3c ], %g2
200662c: 80 88 a0 08 btst 8, %g2
2006630: 12 80 00 38 bne 2006710 <iproc+0x16c> <== ALWAYS TAKEN
2006634: 90 10 00 1d mov %i5, %o0
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2006638: c6 06 60 1c ld [ %i1 + 0x1c ], %g3
200663c: 84 00 60 01 add %g1, 1, %g2
2006640: fa 28 c0 01 stb %i5, [ %g3 + %g1 ]
2006644: c4 26 60 20 st %g2, [ %i1 + 0x20 ]
}
return 0;
}
2006648: 81 c7 e0 08 ret
200664c: 91 e8 20 00 restore %g0, 0, %o0
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
2006650: 80 88 60 80 btst 0x80, %g1
2006654: 12 80 00 39 bne 2006738 <iproc+0x194> <== NEVER TAKEN
2006658: b0 10 20 00 clr %i0
return 0;
if (tty->termios.c_iflag & ICRNL)
200665c: 80 88 61 00 btst 0x100, %g1
2006660: 32 80 00 02 bne,a 2006668 <iproc+0xc4> <== ALWAYS TAKEN
2006664: ba 10 20 0a mov 0xa, %i5
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2006668: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
200666c: 80 88 60 02 btst 2, %g1
2006670: 22 bf ff e8 be,a 2006610 <iproc+0x6c>
2006674: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
if (c == tty->termios.c_cc[VERASE]) {
2006678: c4 0e 60 43 ldub [ %i1 + 0x43 ], %g2
200667c: 80 a0 80 1d cmp %g2, %i5
2006680: 02 80 00 3d be 2006774 <iproc+0x1d0>
2006684: 90 10 00 19 mov %i1, %o0
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
2006688: c4 0e 60 44 ldub [ %i1 + 0x44 ], %g2
200668c: 80 a0 80 1d cmp %g2, %i5
2006690: 02 80 00 28 be 2006730 <iproc+0x18c>
2006694: 92 10 20 01 mov 1, %o1
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
2006698: c4 0e 60 45 ldub [ %i1 + 0x45 ], %g2
200669c: 80 a0 80 1d cmp %g2, %i5
20066a0: 02 80 00 26 be 2006738 <iproc+0x194> <== NEVER TAKEN
20066a4: b0 10 20 01 mov 1, %i0
return 1;
} else if (c == '\n') {
20066a8: 80 a7 60 0a cmp %i5, 0xa
20066ac: 02 80 00 25 be 2006740 <iproc+0x19c>
20066b0: 80 88 60 48 btst 0x48, %g1
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
20066b4: c4 0e 60 4c ldub [ %i1 + 0x4c ], %g2
20066b8: 80 a0 80 1d cmp %g2, %i5
20066bc: 02 80 00 07 be 20066d8 <iproc+0x134> <== NEVER TAKEN
20066c0: 80 88 60 08 btst 8, %g1
20066c4: c4 0e 60 51 ldub [ %i1 + 0x51 ], %g2
20066c8: 80 a0 80 1d cmp %g2, %i5
20066cc: 32 bf ff d1 bne,a 2006610 <iproc+0x6c> <== ALWAYS TAKEN
20066d0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
20066d4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
20066d8: 32 80 00 12 bne,a 2006720 <iproc+0x17c> <== NOT EXECUTED
20066dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
20066e0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
20066e4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
20066e8: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED
20066ec: fa 28 c0 01 stb %i5, [ %g3 + %g1 ] <== NOT EXECUTED
20066f0: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
return 1;
20066f4: 81 c7 e0 08 ret <== NOT EXECUTED
20066f8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
20066fc: 80 88 60 40 btst 0x40, %g1
2006700: 32 bf ff da bne,a 2006668 <iproc+0xc4> <== NEVER TAKEN
2006704: ba 10 20 0d mov 0xd, %i5 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2006708: 10 bf ff d9 b 200666c <iproc+0xc8>
200670c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
2006710: 7f ff fe f6 call 20062e8 <echo>
2006714: 92 10 00 19 mov %i1, %o1
2006718: 10 bf ff c8 b 2006638 <iproc+0x94>
200671c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
2006720: 7f ff fe f2 call 20062e8 <echo> <== NOT EXECUTED
2006724: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2006728: 10 bf ff ef b 20066e4 <iproc+0x140> <== NOT EXECUTED
200672c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
2006730: 7f ff ff 0f call 200636c <erase>
2006734: b0 10 20 00 clr %i0
return 0;
2006738: 81 c7 e0 08 ret
200673c: 81 e8 00 00 restore
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
2006740: 22 80 00 06 be,a 2006758 <iproc+0x1b4> <== NEVER TAKEN
2006744: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2006748: 90 10 20 0a mov 0xa, %o0
200674c: 7f ff fe e7 call 20062e8 <echo>
2006750: 92 10 00 19 mov %i1, %o1
tty->cbuf[tty->ccount++] = c;
2006754: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2006758: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
200675c: 86 10 20 0a mov 0xa, %g3
2006760: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
2006764: 82 00 60 01 inc %g1
2006768: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
return 1;
200676c: 81 c7 e0 08 ret
2006770: 91 e8 20 01 restore %g0, 1, %o0
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
2006774: 92 10 20 00 clr %o1
2006778: 7f ff fe fd call 200636c <erase>
200677c: b0 10 20 00 clr %i0
return 0;
2006780: 81 c7 e0 08 ret
2006784: 81 e8 00 00 restore
02019f80 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
2019f80: 81 c3 e0 08 retl <== NOT EXECUTED
2019f84: 90 10 20 00 clr %o0 <== NOT EXECUTED
0200416c <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
200416c: 9d e3 bf a0 save %sp, -96, %sp
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
2004170: 03 00 80 75 sethi %hi(0x201d400), %g1
2004174: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current>
2004178: 80 a0 60 03 cmp %g1, 3
200417c: 02 80 00 04 be 200418c <libc_wrapup+0x20> <== ALWAYS TAKEN
2004180: 3b 00 80 72 sethi %hi(0x201c800), %i5
2004184: 81 c7 e0 08 ret <== NOT EXECUTED
2004188: 81 e8 00 00 restore <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
200418c: 05 00 80 6e sethi %hi(0x201b800), %g2
2004190: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
2004194: f8 00 a3 c8 ld [ %g2 + 0x3c8 ], %i4
2004198: 80 a0 40 1c cmp %g1, %i4
200419c: 02 80 00 05 be 20041b0 <libc_wrapup+0x44>
20041a0: 01 00 00 00 nop
_wrapup_reent(_global_impure_ptr);
20041a4: 40 00 30 b3 call 2010470 <_wrapup_reent>
20041a8: 90 10 00 1c mov %i4, %o0
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
20041ac: f8 27 61 a8 st %i4, [ %i5 + 0x1a8 ]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
20041b0: 40 00 2d c6 call 200f8c8 <fclose>
20041b4: d0 07 20 04 ld [ %i4 + 4 ], %o0
fclose (stdout);
20041b8: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
20041bc: 40 00 2d c3 call 200f8c8 <fclose>
20041c0: d0 00 60 08 ld [ %g1 + 8 ], %o0
fclose (stderr);
20041c4: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
20041c8: f0 00 60 0c ld [ %g1 + 0xc ], %i0
20041cc: 40 00 2d bf call 200f8c8 <fclose>
20041d0: 81 e8 00 00 restore
02019f98 <lseek>:
#include <unistd.h>
#include <rtems/libio_.h>
off_t lseek( int fd, off_t offset, int whence )
{
2019f98: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_t *iop;
off_t reference_offset;
off_t old_offset;
off_t new_offset;
rtems_libio_check_fd( fd );
2019f9c: 03 00 80 71 sethi %hi(0x201c400), %g1
2019fa0: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201c77c <rtems_libio_number_iops>
#include <unistd.h>
#include <rtems/libio_.h>
off_t lseek( int fd, off_t offset, int whence )
{
2019fa4: b8 10 00 19 mov %i1, %i4
2019fa8: ba 10 00 1a mov %i2, %i5
rtems_libio_t *iop;
off_t reference_offset;
off_t old_offset;
off_t new_offset;
rtems_libio_check_fd( fd );
2019fac: 80 a6 00 01 cmp %i0, %g1
2019fb0: 1a 80 00 5c bcc 201a120 <lseek+0x188>
2019fb4: a4 10 00 1b mov %i3, %l2
iop = rtems_libio_iop( fd );
2019fb8: 03 00 80 74 sethi %hi(0x201d000), %g1
2019fbc: f2 00 62 38 ld [ %g1 + 0x238 ], %i1 ! 201d238 <rtems_libio_iops>
2019fc0: 83 2e 20 03 sll %i0, 3, %g1
2019fc4: b1 2e 20 06 sll %i0, 6, %i0
2019fc8: b0 00 40 18 add %g1, %i0, %i0
2019fcc: b2 06 40 18 add %i1, %i0, %i1
rtems_libio_check_is_open(iop);
2019fd0: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
2019fd4: 80 88 61 00 btst 0x100, %g1
2019fd8: 02 80 00 52 be 201a120 <lseek+0x188>
2019fdc: 80 a6 e0 01 cmp %i3, 1
old_offset = iop->offset;
switch ( whence ) {
2019fe0: 02 80 00 4a be 201a108 <lseek+0x170>
2019fe4: e0 1e 60 10 ldd [ %i1 + 0x10 ], %l0
2019fe8: 80 a6 e0 02 cmp %i3, 2
2019fec: 02 80 00 0f be 201a028 <lseek+0x90>
2019ff0: b4 10 00 1c mov %i4, %i2
2019ff4: 80 a4 a0 00 cmp %l2, 0
2019ff8: 02 80 00 2b be 201a0a4 <lseek+0x10c>
2019ffc: b6 10 00 1d mov %i5, %i3
) {
switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) {
case RTEMS_FILESYSTEM_DIRECTORY:
case RTEMS_FILESYSTEM_MEMORY_FILE:
if ( new_offset < 0 ) {
errno = EINVAL;
201a000: 7f ff d5 e0 call 200f780 <__errno>
201a004: 01 00 00 00 nop
201a008: 05 3f ff ff sethi %hi(0xfffffc00), %g2
201a00c: 82 10 20 16 mov 0x16, %g1
201a010: 84 10 a3 ff or %g2, 0x3ff, %g2
201a014: c2 22 00 00 st %g1, [ %o0 ]
201a018: 86 10 00 02 mov %g2, %g3
rv = (off_t) -1;
}
}
return rv;
}
201a01c: b0 10 00 02 mov %g2, %i0
201a020: 81 c7 e0 08 ret
201a024: 93 e8 00 03 restore %g0, %g3, %o1
break;
case SEEK_CUR:
reference_offset = old_offset;
break;
case SEEK_END:
reference_offset = iop->size;
201a028: c4 1e 60 08 ldd [ %i1 + 8 ], %g2
default:
errno = EINVAL;
rv = (off_t) -1;
break;
}
new_offset = reference_offset + offset;
201a02c: b6 80 c0 1d addcc %g3, %i5, %i3
201a030: b4 40 80 1c addx %g2, %i4, %i2
if ( rv == 0 ) {
if (
(reference_offset >= 0 && new_offset >= offset)
201a034: 80 a7 00 1a cmp %i4, %i2
201a038: 04 80 00 46 ble 201a150 <lseek+0x1b8>
201a03c: 82 10 20 01 mov 1, %g1
201a040: 82 10 20 00 clr %g1
break;
}
new_offset = reference_offset + offset;
if ( rv == 0 ) {
if (
201a044: 80 88 60 ff btst 0xff, %g1
201a048: 12 80 00 15 bne 201a09c <lseek+0x104>
201a04c: 80 a0 a0 00 cmp %g2, 0
(reference_offset >= 0 && new_offset >= offset)
|| (reference_offset < 0 && new_offset <= offset)
201a050: 80 a6 80 1c cmp %i2, %i4
201a054: 14 80 00 3d bg 201a148 <lseek+0x1b0> <== NEVER TAKEN
201a058: 82 10 20 01 mov 1, %g1
201a05c: 80 a6 80 1c cmp %i2, %i4
201a060: 02 80 00 38 be 201a140 <lseek+0x1a8> <== NEVER TAKEN
201a064: 80 a6 c0 1d cmp %i3, %i5
201a068: 80 88 60 ff btst 0xff, %g1
201a06c: 02 80 00 04 be 201a07c <lseek+0xe4> <== NEVER TAKEN
201a070: 80 a0 a0 00 cmp %g2, 0
201a074: 06 80 00 0c bl 201a0a4 <lseek+0x10c> <== NEVER TAKEN
201a078: 01 00 00 00 nop
if ( rv == (off_t) -1 ) {
iop->offset = old_offset;
}
}
} else {
errno = EOVERFLOW;
201a07c: 7f ff d5 c1 call 200f780 <__errno>
201a080: 01 00 00 00 nop
rv = (off_t) -1;
201a084: 05 3f ff ff sethi %hi(0xfffffc00), %g2
if ( rv == (off_t) -1 ) {
iop->offset = old_offset;
}
}
} else {
errno = EOVERFLOW;
201a088: 82 10 20 8b mov 0x8b, %g1
rv = (off_t) -1;
201a08c: 84 10 a3 ff or %g2, 0x3ff, %g2
if ( rv == (off_t) -1 ) {
iop->offset = old_offset;
}
}
} else {
errno = EOVERFLOW;
201a090: c2 22 00 00 st %g1, [ %o0 ]
rv = (off_t) -1;
201a094: 10 bf ff e2 b 201a01c <lseek+0x84>
201a098: 86 10 00 02 mov %g2, %g3
break;
}
new_offset = reference_offset + offset;
if ( rv == 0 ) {
if (
201a09c: 06 bf ff ee bl 201a054 <lseek+0xbc> <== NEVER TAKEN
201a0a0: 80 a6 80 1c cmp %i2, %i4
(reference_offset >= 0 && new_offset >= offset)
|| (reference_offset < 0 && new_offset <= offset)
) {
switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) {
201a0a4: 40 00 00 79 call 201a288 <rtems_filesystem_node_type>
201a0a8: 90 06 60 1c add %i1, 0x1c, %o0
201a0ac: 80 a2 20 00 cmp %o0, 0
201a0b0: 02 80 00 19 be 201a114 <lseek+0x17c>
201a0b4: 80 a6 a0 00 cmp %i2, 0
201a0b8: 80 a2 20 04 cmp %o0, 4
201a0bc: 02 80 00 16 be 201a114 <lseek+0x17c>
201a0c0: 80 a6 a0 00 cmp %i2, 0
break;
}
if ( rv == 0 ) {
iop->offset = new_offset;
rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
201a0c4: c2 06 60 2c ld [ %i1 + 0x2c ], %g1
default:
break;
}
if ( rv == 0 ) {
iop->offset = new_offset;
201a0c8: f4 3e 60 10 std %i2, [ %i1 + 0x10 ]
rv = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
201a0cc: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
201a0d0: 90 10 00 19 mov %i1, %o0
201a0d4: 92 10 00 1c mov %i4, %o1
201a0d8: 94 10 00 1d mov %i5, %o2
201a0dc: 9f c0 40 00 call %g1
201a0e0: 96 10 00 12 mov %l2, %o3
201a0e4: 84 10 00 08 mov %o0, %g2
if ( rv == (off_t) -1 ) {
201a0e8: 80 a0 bf ff cmp %g2, -1
201a0ec: 12 bf ff cc bne 201a01c <lseek+0x84>
201a0f0: 86 10 00 09 mov %o1, %g3
201a0f4: 80 a2 7f ff cmp %o1, -1
201a0f8: 22 bf ff c9 be,a 201a01c <lseek+0x84> <== ALWAYS TAKEN
201a0fc: e0 3e 60 10 std %l0, [ %i1 + 0x10 ]
rv = (off_t) -1;
}
}
return rv;
}
201a100: 10 bf ff c8 b 201a020 <lseek+0x88> <== NOT EXECUTED
201a104: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
switch ( whence ) {
case SEEK_SET:
reference_offset = 0;
break;
case SEEK_CUR:
reference_offset = old_offset;
201a108: 84 10 00 10 mov %l0, %g2
201a10c: 10 bf ff c8 b 201a02c <lseek+0x94>
201a110: 86 10 00 11 mov %l1, %g3
|| (reference_offset < 0 && new_offset <= offset)
) {
switch ( rtems_filesystem_node_type( &iop->pathinfo ) ) {
case RTEMS_FILESYSTEM_DIRECTORY:
case RTEMS_FILESYSTEM_MEMORY_FILE:
if ( new_offset < 0 ) {
201a114: 36 bf ff ed bge,a 201a0c8 <lseek+0x130>
201a118: c2 06 60 2c ld [ %i1 + 0x2c ], %g1
201a11c: 30 bf ff b9 b,a 201a000 <lseek+0x68>
off_t old_offset;
off_t new_offset;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
201a120: 7f ff d5 98 call 200f780 <__errno>
201a124: 01 00 00 00 nop
201a128: 05 3f ff ff sethi %hi(0xfffffc00), %g2
201a12c: 82 10 20 09 mov 9, %g1
201a130: 84 10 a3 ff or %g2, 0x3ff, %g2
201a134: c2 22 00 00 st %g1, [ %o0 ]
201a138: 10 bf ff b9 b 201a01c <lseek+0x84>
201a13c: 86 10 00 02 mov %g2, %g3
new_offset = reference_offset + offset;
if ( rv == 0 ) {
if (
(reference_offset >= 0 && new_offset >= offset)
|| (reference_offset < 0 && new_offset <= offset)
201a140: 08 bf ff cb bleu 201a06c <lseek+0xd4> <== NOT EXECUTED
201a144: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
201a148: 10 bf ff c8 b 201a068 <lseek+0xd0> <== NOT EXECUTED
201a14c: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
new_offset = reference_offset + offset;
if ( rv == 0 ) {
if (
(reference_offset >= 0 && new_offset >= offset)
201a150: 12 bf ff be bne 201a048 <lseek+0xb0>
201a154: 80 88 60 ff btst 0xff, %g1
201a158: 80 a7 40 1b cmp %i5, %i3
201a15c: 08 bf ff bb bleu 201a048 <lseek+0xb0> <== ALWAYS TAKEN
201a160: 80 88 60 ff btst 0xff, %g1
201a164: 10 bf ff b8 b 201a044 <lseek+0xac> <== NOT EXECUTED
201a168: 82 10 20 00 clr %g1 <== NOT EXECUTED
02003c04 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
2003c04: 9d e3 bf a0 save %sp, -96, %sp
void *return_this;
MSBUMP(malloc_calls, 1);
2003c08: 03 00 80 74 sethi %hi(0x201d000), %g1
2003c0c: 82 10 62 50 or %g1, 0x250, %g1 ! 201d250 <rtems_malloc_statistics>
2003c10: c4 00 60 04 ld [ %g1 + 4 ], %g2
#include "malloc_p.h"
void *malloc(
size_t size
)
{
2003c14: ba 10 00 18 mov %i0, %i5
void *return_this;
MSBUMP(malloc_calls, 1);
2003c18: 84 00 a0 01 inc %g2
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2003c1c: 7f ff ff a8 call 2003abc <malloc_deferred_frees_process>
2003c20: c4 20 60 04 st %g2, [ %g1 + 4 ]
/*
* Validate the parameters
*/
if ( !size )
2003c24: 80 a7 60 00 cmp %i5, 0
2003c28: 02 80 00 1e be 2003ca0 <malloc+0x9c>
2003c2c: b0 10 20 00 clr %i0
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2003c30: 03 00 80 75 sethi %hi(0x201d400), %g1
2003c34: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current>
2003c38: 80 a0 60 03 cmp %g1, 3
2003c3c: 02 80 00 1b be 2003ca8 <malloc+0xa4>
2003c40: 03 00 80 71 sethi %hi(0x201c400), %g1
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
2003c44: d0 00 63 38 ld [ %g1 + 0x338 ], %o0 ! 201c738 <RTEMS_Malloc_Heap>
2003c48: 92 10 00 1d mov %i5, %o1
2003c4c: 94 10 20 00 clr %o2
2003c50: 40 00 17 93 call 2009a9c <_Protected_heap_Allocate_aligned_with_boundary>
2003c54: 96 10 20 00 clr %o3
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
2003c58: b0 92 20 00 orcc %o0, 0, %i0
2003c5c: 02 80 00 21 be 2003ce0 <malloc+0xdc> <== NEVER TAKEN
2003c60: 03 00 80 73 sethi %hi(0x201cc00), %g1
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
2003c64: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003c68: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 201ce90 <rtems_malloc_dirty_helper>
2003c6c: 80 a0 60 00 cmp %g1, 0
2003c70: 02 80 00 04 be 2003c80 <malloc+0x7c>
2003c74: 90 10 00 18 mov %i0, %o0
(*rtems_malloc_dirty_helper)( return_this, size );
2003c78: 9f c0 40 00 call %g1
2003c7c: 92 10 00 1d mov %i5, %o1
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
2003c80: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003c84: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 201ce98 <rtems_malloc_statistics_helpers>
2003c88: 80 a0 60 00 cmp %g1, 0
2003c8c: 02 80 00 25 be 2003d20 <malloc+0x11c>
2003c90: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
2003c94: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003c98: 9f c0 40 00 call %g1
2003c9c: 90 10 00 18 mov %i0, %o0
return return_this;
}
2003ca0: 81 c7 e0 08 ret
2003ca4: 81 e8 00 00 restore
/*
* 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() )
2003ca8: 7f ff ff 73 call 2003a74 <malloc_is_system_state_OK>
2003cac: 01 00 00 00 nop
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2003cb0: 80 8a 20 ff btst 0xff, %o0
2003cb4: 02 bf ff fb be 2003ca0 <malloc+0x9c> <== NEVER TAKEN
2003cb8: 03 00 80 71 sethi %hi(0x201c400), %g1
2003cbc: d0 00 63 38 ld [ %g1 + 0x338 ], %o0 ! 201c738 <RTEMS_Malloc_Heap>
2003cc0: 92 10 00 1d mov %i5, %o1
2003cc4: 94 10 20 00 clr %o2
2003cc8: 40 00 17 75 call 2009a9c <_Protected_heap_Allocate_aligned_with_boundary>
2003ccc: 96 10 20 00 clr %o3
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
2003cd0: b0 92 20 00 orcc %o0, 0, %i0
2003cd4: 12 bf ff e5 bne 2003c68 <malloc+0x64>
2003cd8: 03 00 80 73 sethi %hi(0x201cc00), %g1
if (rtems_malloc_sbrk_helpers)
2003cdc: 03 00 80 73 sethi %hi(0x201cc00), %g1
2003ce0: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 201ce94 <rtems_malloc_sbrk_helpers>
2003ce4: 80 a0 60 00 cmp %g1, 0
2003ce8: 02 80 00 0a be 2003d10 <malloc+0x10c>
2003cec: 01 00 00 00 nop
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
2003cf0: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003cf4: 9f c0 40 00 call %g1
2003cf8: 90 10 00 1d mov %i5, %o0
if ( !return_this ) {
2003cfc: 80 a2 20 00 cmp %o0, 0
2003d00: 02 80 00 04 be 2003d10 <malloc+0x10c>
2003d04: 01 00 00 00 nop
2003d08: 10 bf ff d7 b 2003c64 <malloc+0x60>
2003d0c: b0 10 00 08 mov %o0, %i0
errno = ENOMEM;
2003d10: 40 00 2e 9c call 200f780 <__errno>
2003d14: 01 00 00 00 nop
2003d18: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
2003d1c: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
2003d20: 81 c7 e0 08 ret
2003d24: 81 e8 00 00 restore
02003cf0 <malloc_sbrk_extend_and_allocate>:
}
static void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
2003cf0: 9d e3 bf a0 save %sp, -96, %sp
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
2003cf4: 03 00 80 75 sethi %hi(0x201d400), %g1
2003cf8: fa 00 62 58 ld [ %g1 + 0x258 ], %i5 ! 201d658 <RTEMS_Malloc_Sbrk_amount>
if ( sbrk_amount == 0 )
2003cfc: 80 a7 60 00 cmp %i5, 0
2003d00: 02 80 00 20 be 2003d80 <malloc_sbrk_extend_and_allocate+0x90><== NEVER TAKEN
2003d04: b2 10 00 18 mov %i0, %i1
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
2003d08: 92 10 00 1d mov %i5, %o1
2003d0c: 40 00 53 4c call 2018a3c <.udiv>
2003d10: 90 06 00 1d add %i0, %i5, %o0
2003d14: 40 00 53 10 call 2018954 <.umul>
2003d18: 92 10 00 1d mov %i5, %o1
starting_address = (void *) sbrk(the_size);
2003d1c: 7f ff f5 c2 call 2001424 <sbrk>
2003d20: ba 10 00 08 mov %o0, %i5
if ( starting_address == (void*) -1 )
2003d24: 80 a2 3f ff cmp %o0, -1
2003d28: 02 80 00 16 be 2003d80 <malloc_sbrk_extend_and_allocate+0x90>
2003d2c: 92 10 00 08 mov %o0, %o1
return (void *) 0;
if ( !_Protected_heap_Extend(
2003d30: 39 00 80 72 sethi %hi(0x201c800), %i4
2003d34: d0 07 21 a8 ld [ %i4 + 0x1a8 ], %o0 ! 201c9a8 <RTEMS_Malloc_Heap>
2003d38: 40 00 17 53 call 2009a84 <_Protected_heap_Extend>
2003d3c: 94 10 00 1d mov %i5, %o2
2003d40: 80 8a 20 ff btst 0xff, %o0
2003d44: 02 80 00 09 be 2003d68 <malloc_sbrk_extend_and_allocate+0x78>
2003d48: 03 00 80 75 sethi %hi(0x201d400), %g1
2003d4c: f0 07 21 a8 ld [ %i4 + 0x1a8 ], %i0
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
2003d50: c4 00 62 28 ld [ %g1 + 0x228 ], %g2
2003d54: b4 10 20 00 clr %i2
2003d58: ba 07 40 02 add %i5, %g2, %i5
2003d5c: fa 20 62 28 st %i5, [ %g1 + 0x228 ]
2003d60: 40 00 17 3b call 2009a4c <_Protected_heap_Allocate_aligned_with_boundary>
2003d64: 97 e8 20 00 restore %g0, 0, %o3
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
2003d68: 7f ff f5 af call 2001424 <sbrk>
2003d6c: 90 20 00 1d neg %i5, %o0
errno = ENOMEM;
2003d70: 40 00 2f 4b call 200fa9c <__errno>
2003d74: 01 00 00 00 nop
2003d78: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
2003d7c: c2 22 00 00 st %g1, [ %o0 ]
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
2003d80: 81 c7 e0 08 ret
2003d84: 91 e8 20 00 restore %g0, 0, %o0
02003d88 <malloc_sbrk_initialize>:
static void *malloc_sbrk_initialize(
void *starting_address,
size_t length
)
{
2003d88: 9d e3 bf a0 save %sp, -96, %sp
uintptr_t old_address;
uintptr_t uaddress;
RTEMS_Malloc_Sbrk_amount = length;
2003d8c: 03 00 80 75 sethi %hi(0x201d400), %g1
* If the starting address is 0 then we are to attempt to
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
2003d90: 80 a6 20 00 cmp %i0, 0
2003d94: 02 80 00 04 be 2003da4 <malloc_sbrk_initialize+0x1c>
2003d98: f2 20 62 58 st %i1, [ %g1 + 0x258 ]
}
starting_address = (void *)uaddress;
}
return starting_address;
}
2003d9c: 81 c7 e0 08 ret
2003da0: 81 e8 00 00 restore
* get length worth of memory using sbrk. Make sure we
* align the address that we get back.
*/
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
2003da4: 7f ff f5 a0 call 2001424 <sbrk>
2003da8: 90 10 00 19 mov %i1, %o0
if (uaddress == (uintptr_t) -1) {
2003dac: 80 a2 3f ff cmp %o0, -1
2003db0: 02 80 00 08 be 2003dd0 <malloc_sbrk_initialize+0x48> <== ALWAYS TAKEN
2003db4: 80 8a 20 07 btst 7, %o0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
if (uaddress & (CPU_HEAP_ALIGNMENT-1)) {
2003db8: 02 80 00 04 be 2003dc8 <malloc_sbrk_initialize+0x40> <== NOT EXECUTED
2003dbc: 01 00 00 00 nop <== NOT EXECUTED
old_address = uaddress;
uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
2003dc0: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED
2003dc4: 90 0a 3f f8 and %o0, -8, %o0 <== NOT EXECUTED
}
starting_address = (void *)uaddress;
}
return starting_address;
}
2003dc8: 81 c7 e0 08 ret <== NOT EXECUTED
2003dcc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (!starting_address) {
uaddress = (uintptr_t)sbrk(length);
if (uaddress == (uintptr_t) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
2003dd0: 40 00 11 b1 call 2008494 <rtems_fatal_error_occurred>
2003dd4: 90 10 20 1a mov 0x1a, %o0
0200e5f0 <memfile_free_blocks_in_table>:
*/
static void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
200e5f0: 9d e3 bf a0 save %sp, -96, %sp
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200e5f4: 80 a6 60 00 cmp %i1, 0
200e5f8: 04 80 00 0f ble 200e634 <memfile_free_blocks_in_table+0x44><== NEVER TAKEN
200e5fc: d0 06 00 00 ld [ %i0 ], %o0
200e600: ba 10 00 08 mov %o0, %i5
200e604: b8 10 20 00 clr %i4
if ( b[i] ) {
200e608: d0 07 40 00 ld [ %i5 ], %o0
200e60c: 80 a2 20 00 cmp %o0, 0
200e610: 02 80 00 05 be 200e624 <memfile_free_blocks_in_table+0x34>
200e614: b8 07 20 01 inc %i4
memfile_free_block( b[i] );
200e618: 7f ff ff ed call 200e5cc <memfile_free_block>
200e61c: 01 00 00 00 nop
b[i] = 0;
200e620: c0 27 40 00 clr [ %i5 ]
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200e624: 80 a7 00 19 cmp %i4, %i1
200e628: 12 bf ff f8 bne 200e608 <memfile_free_blocks_in_table+0x18>
200e62c: ba 07 60 04 add %i5, 4, %i5
200e630: d0 06 00 00 ld [ %i0 ], %o0
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
200e634: 7f ff ff e6 call 200e5cc <memfile_free_block>
200e638: 01 00 00 00 nop
*block_table = 0;
200e63c: c0 26 00 00 clr [ %i0 ]
}
200e640: 81 c7 e0 08 ret
200e644: 81 e8 00 00 restore
0200ec24 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
200ec24: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
200ec28: fa 06 20 24 ld [ %i0 + 0x24 ], %i5
* 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 )
200ec2c: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
200ec30: 80 a0 40 19 cmp %g1, %i1
200ec34: 06 80 00 13 bl 200ec80 <memfile_ftruncate+0x5c> <== NEVER TAKEN
200ec38: 90 10 00 1d mov %i5, %o0
200ec3c: 22 80 00 0d be,a 200ec70 <memfile_ftruncate+0x4c> <== ALWAYS TAKEN
200ec40: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
/*
* 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;
200ec44: f2 27 60 50 st %i1, [ %i5 + 0x50 ] <== NOT EXECUTED
200ec48: f4 27 60 54 st %i2, [ %i5 + 0x54 ]
iop->size = the_jnode->info.file.size;
200ec4c: f2 26 20 08 st %i1, [ %i0 + 8 ]
200ec50: f4 26 20 0c st %i2, [ %i0 + 0xc ]
IMFS_update_atime( the_jnode );
200ec54: 90 07 bf f8 add %fp, -8, %o0
200ec58: 7f ff d3 23 call 20038e4 <gettimeofday>
200ec5c: 92 10 20 00 clr %o1
200ec60: c2 07 bf f8 ld [ %fp + -8 ], %g1
200ec64: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
return 0;
}
200ec68: 81 c7 e0 08 ret
200ec6c: 91 e8 20 00 restore %g0, 0, %o0
* 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 )
200ec70: 80 a0 40 1a cmp %g1, %i2
200ec74: 3a bf ff f5 bcc,a 200ec48 <memfile_ftruncate+0x24>
200ec78: f2 27 60 50 st %i1, [ %i5 + 0x50 ]
return IMFS_memfile_extend( the_jnode, length );
200ec7c: 90 10 00 1d mov %i5, %o0
200ec80: 92 10 00 19 mov %i1, %o1
200ec84: 7f ff fe db call 200e7f0 <IMFS_memfile_extend>
200ec88: 94 10 00 1a mov %i2, %o2
200ec8c: 81 c7 e0 08 ret
200ec90: 91 e8 00 08 restore %g0, %o0, %o0
0200ec94 <memfile_lseek>:
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
200ec94: 9d e3 bf a0 save %sp, -96, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
200ec98: fa 06 20 24 ld [ %i0 + 0x24 ], %i5
200ec9c: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) {
200eca0: c2 00 40 00 ld [ %g1 ], %g1
200eca4: 80 a0 60 05 cmp %g1, 5
200eca8: 02 80 00 0f be 200ece4 <memfile_lseek+0x50>
200ecac: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
200ecb0: 90 10 00 1d mov %i5, %o0
200ecb4: 92 10 00 02 mov %g2, %o1
200ecb8: 7f ff fe ce call 200e7f0 <IMFS_memfile_extend>
200ecbc: 94 10 00 03 mov %g3, %o2
200ecc0: 80 a2 20 00 cmp %o0, 0
200ecc4: 12 80 00 19 bne 200ed28 <memfile_lseek+0x94>
200ecc8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
200eccc: d8 1f 60 50 ldd [ %i5 + 0x50 ], %o4
200ecd0: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
200ecd4: d8 3e 20 08 std %o4, [ %i0 + 8 ]
}
return iop->offset;
}
200ecd8: b0 10 00 02 mov %g2, %i0
200ecdc: 81 c7 e0 08 ret
200ece0: 93 e8 00 03 restore %g0, %g3, %o1
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
200ece4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
200ece8: 80 a0 80 01 cmp %g2, %g1
200ecec: 14 80 00 08 bg 200ed0c <memfile_lseek+0x78> <== NEVER TAKEN
200ecf0: c8 07 60 54 ld [ %i5 + 0x54 ], %g4
200ecf4: 80 a0 80 01 cmp %g2, %g1
200ecf8: 32 bf ff f9 bne,a 200ecdc <memfile_lseek+0x48> <== NEVER TAKEN
200ecfc: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
200ed00: 80 a0 c0 04 cmp %g3, %g4
200ed04: 28 bf ff f6 bleu,a 200ecdc <memfile_lseek+0x48> <== ALWAYS TAKEN
200ed08: b0 10 00 02 mov %g2, %i0
iop->offset = the_jnode->info.linearfile.size;
200ed0c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] <== NOT EXECUTED
200ed10: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
200ed14: c8 26 20 14 st %g4, [ %i0 + 0x14 ] <== NOT EXECUTED
200ed18: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
200ed1c: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
200ed20: 81 c7 e0 08 ret <== NOT EXECUTED
200ed24: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
200ed28: 40 00 02 96 call 200f780 <__errno>
200ed2c: 01 00 00 00 nop
200ed30: 05 3f ff ff sethi %hi(0xfffffc00), %g2
200ed34: 82 10 20 1c mov 0x1c, %g1
200ed38: 84 10 a3 ff or %g2, 0x3ff, %g2
200ed3c: c2 22 00 00 st %g1, [ %o0 ]
200ed40: 10 bf ff e6 b 200ecd8 <memfile_lseek+0x44>
200ed44: 86 10 00 02 mov %g2, %g3
0200eb6c <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
200eb6c: 9d e3 bf a0 save %sp, -96, %sp
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
200eb70: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
200eb74: ba 10 00 18 mov %i0, %i5
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
200eb78: 80 88 62 04 btst 0x204, %g1
200eb7c: 02 80 00 07 be 200eb98 <memfile_open+0x2c>
200eb80: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
200eb84: c4 07 20 4c ld [ %i4 + 0x4c ], %g2
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
200eb88: c4 00 80 00 ld [ %g2 ], %g2
200eb8c: 80 a0 a0 05 cmp %g2, 5
200eb90: 22 80 00 0c be,a 200ebc0 <memfile_open+0x54> <== NEVER TAKEN
200eb94: d8 07 20 54 ld [ %i4 + 0x54 ], %o4 <== 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))
200eb98: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
200eb9c: 80 88 62 00 btst 0x200, %g1
200eba0: 22 80 00 05 be,a 200ebb4 <memfile_open+0x48>
200eba4: c4 3f 60 08 std %g2, [ %i5 + 8 ]
iop->offset = the_jnode->info.file.size;
200eba8: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
200ebac: c4 1f 20 50 ldd [ %i4 + 0x50 ], %g2
iop->size = the_jnode->info.file.size;
200ebb0: c4 3f 60 08 std %g2, [ %i5 + 8 ]
return 0;
200ebb4: b0 10 20 00 clr %i0
}
200ebb8: 81 c7 e0 08 ret
200ebbc: 81 e8 00 00 restore
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
200ebc0: d6 07 20 58 ld [ %i4 + 0x58 ], %o3 <== NOT EXECUTED
the_jnode->control = &IMFS_node_control_memfile;
200ebc4: 03 00 80 6d sethi %hi(0x201b400), %g1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
200ebc8: c0 27 20 50 clr [ %i4 + 0x50 ] <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (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;
200ebcc: 82 10 62 14 or %g1, 0x214, %g1 <== NOT EXECUTED
the_jnode->info.file.size = 0;
200ebd0: c0 27 20 54 clr [ %i4 + 0x54 ] <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
200ebd4: c0 27 20 58 clr [ %i4 + 0x58 ] <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (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;
200ebd8: c2 27 20 4c st %g1, [ %i4 + 0x4c ] <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
200ebdc: c0 27 20 5c clr [ %i4 + 0x5c ] <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
200ebe0: 80 a3 20 00 cmp %o4, 0 <== NOT EXECUTED
200ebe4: 12 80 00 06 bne 200ebfc <memfile_open+0x90> <== NOT EXECUTED
200ebe8: c0 27 20 60 clr [ %i4 + 0x60 ] <== NOT EXECUTED
200ebec: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
200ebf0: 84 10 20 00 clr %g2 <== NOT EXECUTED
200ebf4: 10 bf ff ea b 200eb9c <memfile_open+0x30> <== NOT EXECUTED
200ebf8: 86 10 20 00 clr %g3 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
200ebfc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200ec00: 92 10 20 00 clr %o1 <== NOT EXECUTED
200ec04: 94 10 20 00 clr %o2 <== NOT EXECUTED
200ec08: 7f ff ff 55 call 200e95c <IMFS_memfile_write> <== NOT EXECUTED
200ec0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200ec10: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
200ec14: 02 bf ff e9 be 200ebb8 <memfile_open+0x4c> <== NOT EXECUTED
200ec18: 01 00 00 00 nop <== NOT EXECUTED
200ec1c: 10 bf ff df b 200eb98 <memfile_open+0x2c> <== NOT EXECUTED
200ec20: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED
02003e48 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2003e48: 9d e3 bf 48 save %sp, -184, %sp
int rv = 0;
if (
2003e4c: 80 a6 e0 01 cmp %i3, 1
2003e50: 18 80 00 92 bgu 2004098 <mount+0x250>
2003e54: 01 00 00 00 nop
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
2003e58: 40 00 23 16 call 200cab0 <rtems_filesystem_get_mount_handler>
2003e5c: 90 10 00 1a mov %i2, %o0
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
2003e60: a0 92 20 00 orcc %o0, 0, %l0
2003e64: 02 80 00 bc be 2004154 <mount+0x30c>
2003e68: 80 a6 60 00 cmp %i1, 0
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2003e6c: 02 80 00 87 be 2004088 <mount+0x240>
2003e70: 90 10 00 19 mov %i1, %o0
}
return rv;
}
int mount(
2003e74: 40 00 33 db call 2010de0 <strlen>
2003e78: aa 10 00 19 mov %i1, %l5
2003e7c: a6 02 20 01 add %o0, 1, %l3
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;
2003e80: 40 00 33 d8 call 2010de0 <strlen>
2003e84: 90 10 00 1a mov %i2, %o0
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2003e88: a2 10 20 00 clr %l1
2003e8c: 80 a6 20 00 cmp %i0, 0
2003e90: 02 80 00 05 be 2003ea4 <mount+0x5c>
2003e94: a8 10 00 08 mov %o0, %l4
2003e98: 40 00 33 d2 call 2010de0 <strlen>
2003e9c: 90 10 00 18 mov %i0, %o0
2003ea0: a2 02 20 01 add %o0, 1, %l1
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
2003ea4: 92 04 c0 14 add %l3, %l4, %o1
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
2003ea8: 90 10 20 01 mov 1, %o0
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
2003eac: 92 02 60 8d add %o1, 0x8d, %o1
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
2003eb0: 7f ff fd b4 call 2003580 <calloc>
2003eb4: 92 02 40 11 add %o1, %l1, %o1
if ( mt_entry != NULL ) {
2003eb8: ba 92 20 00 orcc %o0, 0, %i5
2003ebc: 02 80 00 6d be 2004070 <mount+0x228> <== NEVER TAKEN
2003ec0: a4 07 60 8c add %i5, 0x8c, %l2
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 );
memcpy( str, filesystemtype, filesystemtype_size );
2003ec4: 92 10 00 1a mov %i2, %o1
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;
2003ec8: a8 05 20 01 inc %l4
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 );
memcpy( str, filesystemtype, filesystemtype_size );
2003ecc: 90 10 00 12 mov %l2, %o0
2003ed0: 40 00 30 88 call 20100f0 <memcpy>
2003ed4: 94 10 00 14 mov %l4, %o2
mt_entry->type = str;
str += filesystemtype_size;
2003ed8: b4 04 80 14 add %l2, %l4, %i2
memcpy( str, source_or_null, source_size );
2003edc: 92 10 00 18 mov %i0, %o1
2003ee0: 94 10 00 11 mov %l1, %o2
2003ee4: 90 10 00 1a mov %i2, %o0
2003ee8: 40 00 30 82 call 20100f0 <memcpy>
2003eec: e4 27 60 5c st %l2, [ %i5 + 0x5c ]
mt_entry->dev = str;
str += source_size;
2003ef0: a2 06 80 11 add %i2, %l1, %l1
memcpy( str, target, target_size );
2003ef4: 92 10 00 15 mov %l5, %o1
2003ef8: 94 10 00 13 mov %l3, %o2
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
2003efc: f4 27 60 60 st %i2, [ %i5 + 0x60 ]
str += source_size;
memcpy( str, target, target_size );
2003f00: 40 00 30 7c call 20100f0 <memcpy>
2003f04: 90 10 00 11 mov %l1, %o0
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
2003f08: 82 10 20 01 mov 1, %g1
+ 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 =
2003f0c: b4 07 60 64 add %i5, 0x64, %i2
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
mt_entry->mt_fs_root = mt_fs_root;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2003f10: 94 10 20 30 mov 0x30, %o2
memcpy( str, target, target_size );
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
2003f14: c2 2f 60 1c stb %g1, [ %i5 + 0x1c ]
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
str += source_size;
memcpy( str, target, target_size );
mt_entry->target = str;
2003f18: e2 27 60 58 st %l1, [ %i5 + 0x58 ]
str += target_size;
mt_entry->mounted = true;
mt_entry->mt_fs_root = mt_fs_root;
2003f1c: f4 27 60 18 st %i2, [ %i5 + 0x18 ]
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
2003f20: 90 07 60 28 add %i5, 0x28, %o0
2003f24: 13 00 80 6c sethi %hi(0x201b000), %o1
2003f28: 40 00 30 72 call 20100f0 <memcpy>
2003f2c: 92 12 62 2c or %o1, 0x22c, %o1 ! 201b22c <rtems_filesystem_default_pathconf>
mt_fs_root->location.mt_entry = mt_entry;
mt_fs_root->reference_count = 1;
2003f30: 82 10 20 01 mov 1, %g1
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
_Chain_Initialize( the_chain, starting_address, number_nodes, node_size );
2003f34: 90 07 60 08 add %i5, 8, %o0
2003f38: 92 10 00 1a mov %i2, %o1
2003f3c: 94 10 20 01 mov 1, %o2
2003f40: 96 10 20 28 mov 0x28, %o3
2003f44: c2 27 60 80 st %g1, [ %i5 + 0x80 ]
2003f48: 40 00 12 26 call 20087e0 <_Chain_Initialize>
2003f4c: fa 27 60 7c st %i5, [ %i5 + 0x7c ]
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
rv = (*fsmount_me_h)( mt_entry, data );
2003f50: 90 10 00 1d mov %i5, %o0
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
2003f54: f6 2f 60 1d stb %i3, [ %i5 + 0x1d ]
rv = (*fsmount_me_h)( mt_entry, data );
2003f58: 9f c4 00 00 call %l0
2003f5c: 92 10 00 1c mov %i4, %o1
if ( rv == 0 ) {
2003f60: b0 92 20 00 orcc %o0, 0, %i0
2003f64: 12 80 00 30 bne 2004024 <mount+0x1dc>
2003f68: 80 a6 60 00 cmp %i1, 0
if ( target != NULL ) {
2003f6c: 02 80 00 51 be 20040b0 <mount+0x268>
2003f70: 92 10 00 19 mov %i1, %o1
{
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 =
2003f74: 94 10 20 1f mov 0x1f, %o2
2003f78: 40 00 03 6c call 2004d28 <rtems_filesystem_eval_path_start>
2003f7c: 90 07 bf a8 add %fp, -88, %o0
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
return (*loc->ops->are_nodes_equal_h)(
2003f80: c6 02 20 14 ld [ %o0 + 0x14 ], %g3
loc,
&loc->mt_entry->mt_fs_root->location
2003f84: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
return (*loc->ops->are_nodes_equal_h)(
2003f88: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1
2003f8c: 9f c0 40 00 call %g1
2003f90: d2 00 a0 18 ld [ %g2 + 0x18 ], %o1
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
if ( !rtems_filesystem_location_is_root( currentloc ) ) {
2003f94: 80 8a 20 ff btst 0xff, %o0
2003f98: 12 80 00 6a bne 2004140 <mount+0x2f8>
2003f9c: 92 07 bf c0 add %fp, -64, %o1
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(
2003fa0: 40 00 04 17 call 2004ffc <rtems_filesystem_location_copy_and_detach>
2003fa4: 90 07 bf e4 add %fp, -28, %o0
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 );
2003fa8: 40 00 04 9d call 200521c <rtems_filesystem_location_transform_to_global>
2003fac: 90 07 bf e4 add %fp, -28, %o0
mt_entry->mt_point_node = mt_point_node;
rv = (*mt_point_node->location.ops->mount_h)( mt_entry );
2003fb0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( !rtems_filesystem_location_is_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 );
2003fb4: b8 10 00 08 mov %o0, %i4
mt_entry->mt_point_node = mt_point_node;
rv = (*mt_point_node->location.ops->mount_h)( mt_entry );
2003fb8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
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 );
mt_entry->mt_point_node = mt_point_node;
2003fbc: d0 27 60 14 st %o0, [ %i5 + 0x14 ]
rv = (*mt_point_node->location.ops->mount_h)( mt_entry );
2003fc0: 9f c0 40 00 call %g1
2003fc4: 90 10 00 1d mov %i5, %o0
if ( rv == 0 ) {
2003fc8: b0 92 20 00 orcc %o0, 0, %i0
2003fcc: 22 80 00 1a be,a 2004034 <mount+0x1ec>
2003fd0: 39 00 80 74 sethi %hi(0x201d000), %i4
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
2003fd4: 40 00 04 3f call 20050d0 <rtems_filesystem_global_location_release>
2003fd8: 90 10 00 1c mov %i4, %o0
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
2003fdc: 40 00 03 59 call 2004d40 <rtems_filesystem_eval_path_cleanup>
2003fe0: 90 07 bf a8 add %fp, -88, %o0
rv = register_subordinate_file_system( mt_entry, target );
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
2003fe4: 80 a6 20 00 cmp %i0, 0
2003fe8: 32 80 00 0b bne,a 2004014 <mount+0x1cc>
2003fec: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
errno = EINVAL;
rv = -1;
}
return rv;
}
2003ff0: 81 c7 e0 08 ret
2003ff4: 81 e8 00 00 restore
rtems_chain_append_unprotected(
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
} else {
errno = EINVAL;
2003ff8: 40 00 2d e2 call 200f780 <__errno> <== NOT EXECUTED
2003ffc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004000: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2004004: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2004008: 40 00 0f 93 call 2007e54 <rtems_semaphore_release> <== NOT EXECUTED
200400c: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 <== NOT EXECUTED
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
(*mt_entry->mt_fs_root->location.ops->fsunmount_me_h)( mt_entry );
2004010: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 <== NOT EXECUTED
2004014: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2004018: c2 00 60 3c ld [ %g1 + 0x3c ], %g1
200401c: 9f c0 40 00 call %g1
2004020: 90 10 00 1d mov %i5, %o0
}
}
if ( rv != 0 ) {
free( mt_entry );
2004024: 7f ff fe 06 call 200383c <free>
2004028: 90 10 00 1d mov %i5, %o0
200402c: 81 c7 e0 08 ret
2004030: 81 e8 00 00 restore
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
2004034: d0 07 22 40 ld [ %i4 + 0x240 ], %o0
2004038: 92 10 20 00 clr %o1
200403c: 40 00 0f 3c call 2007d2c <rtems_semaphore_obtain>
2004040: 94 10 20 00 clr %o2
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2004044: d0 07 22 40 ld [ %i4 + 0x240 ], %o0
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
2004048: 03 00 80 72 sethi %hi(0x201c800), %g1
200404c: 82 10 60 44 or %g1, 0x44, %g1 ! 201c844 <rtems_filesystem_mount_table>
2004050: c4 00 60 08 ld [ %g1 + 8 ], %g2
the_node->next = tail;
2004054: 86 00 60 04 add %g1, 4, %g3
2004058: c6 27 40 00 st %g3, [ %i5 ]
tail->previous = the_node;
200405c: fa 20 60 08 st %i5, [ %g1 + 8 ]
old_last->next = the_node;
2004060: fa 20 80 00 st %i5, [ %g2 ]
2004064: 40 00 0f 7c call 2007e54 <rtems_semaphore_release>
2004068: c4 27 60 04 st %g2, [ %i5 + 4 ]
200406c: 30 bf ff dc b,a 2003fdc <mount+0x194>
}
} else {
errno = ENOMEM;
2004070: 40 00 2d c4 call 200f780 <__errno> <== NOT EXECUTED
2004074: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004078: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200407c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004080: 81 c7 e0 08 ret <== NOT EXECUTED
2004084: 81 e8 00 00 restore <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
2004088: 2b 00 80 6c sethi %hi(0x201b000), %l5
200408c: a6 10 20 02 mov 2, %l3
2004090: 10 bf ff 7c b 2003e80 <mount+0x38>
2004094: aa 15 62 28 or %l5, 0x228, %l5
} else {
errno = EINVAL;
rv = -1;
}
} else {
errno = EINVAL;
2004098: 40 00 2d ba call 200f780 <__errno>
200409c: b0 10 3f ff mov -1, %i0
20040a0: 82 10 20 16 mov 0x16, %g1
20040a4: c2 22 00 00 st %g1, [ %o0 ]
rv = -1;
}
return rv;
}
20040a8: 81 c7 e0 08 ret
20040ac: 81 e8 00 00 restore
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
20040b0: 39 00 80 74 sethi %hi(0x201d000), %i4
20040b4: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 ! 201d240 <rtems_libio_semaphore>
20040b8: 92 10 20 00 clr %o1
20040bc: 40 00 0f 1c call 2007d2c <rtems_semaphore_obtain>
20040c0: 94 10 20 00 clr %o2
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20040c4: 03 00 80 72 sethi %hi(0x201c800), %g1
)
{
int rv = 0;
rtems_filesystem_mt_lock();
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
20040c8: c4 00 60 44 ld [ %g1 + 0x44 ], %g2 ! 201c844 <rtems_filesystem_mount_table>
20040cc: 82 10 60 44 or %g1, 0x44, %g1
20040d0: 86 00 60 04 add %g1, 4, %g3
20040d4: 80 a0 80 03 cmp %g2, %g3
20040d8: 12 bf ff c8 bne 2003ff8 <mount+0x1b0> <== NEVER TAKEN
20040dc: 01 00 00 00 nop
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
20040e0: c6 00 60 08 ld [ %g1 + 8 ], %g3
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
20040e4: d0 07 22 40 ld [ %i4 + 0x240 ], %o0
the_node->next = tail;
20040e8: c4 27 40 00 st %g2, [ %i5 ]
tail->previous = the_node;
20040ec: fa 20 60 08 st %i5, [ %g1 + 8 ]
old_last->next = the_node;
20040f0: fa 20 c0 00 st %i5, [ %g3 ]
20040f4: 40 00 0f 58 call 2007e54 <rtems_semaphore_release>
20040f8: c6 27 60 04 st %g3, [ %i5 + 4 ]
}
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 );
20040fc: ba 07 60 18 add %i5, 0x18, %i5
rv = -1;
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
2004100: 40 00 04 14 call 2005150 <rtems_filesystem_global_location_obtain>
2004104: 90 10 00 1d mov %i5, %o0
2004108: b6 10 00 08 mov %o0, %i3
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
200410c: 40 00 04 11 call 2005150 <rtems_filesystem_global_location_obtain>
2004110: 90 10 00 1d mov %i5, %o0
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
2004114: 39 00 80 72 sethi %hi(0x201c800), %i4
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 =
2004118: ba 10 00 08 mov %o0, %i5
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
200411c: d0 07 20 64 ld [ %i4 + 0x64 ], %o0
2004120: 92 10 00 1b mov %i3, %o1
2004124: 40 00 04 01 call 2005128 <rtems_filesystem_global_location_assign>
2004128: 90 02 20 04 add %o0, 4, %o0
&rtems_filesystem_root,
new_fs_root
);
rtems_filesystem_global_location_assign(
200412c: d0 07 20 64 ld [ %i4 + 0x64 ], %o0
2004130: 40 00 03 fe call 2005128 <rtems_filesystem_global_location_assign>
2004134: 92 10 00 1d mov %i5, %o1
2004138: 81 c7 e0 08 ret
200413c: 81 e8 00 00 restore
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
2004140: 90 07 bf a8 add %fp, -88, %o0
2004144: 92 10 20 10 mov 0x10, %o1
2004148: 40 00 02 30 call 2004a08 <rtems_filesystem_eval_path_error>
200414c: b0 10 3f ff mov -1, %i0
2004150: 30 bf ff a3 b,a 2003fdc <mount+0x194>
} else {
errno = ENOMEM;
rv = -1;
}
} else {
errno = EINVAL;
2004154: 40 00 2d 8b call 200f780 <__errno>
2004158: b0 10 3f ff mov -1, %i0
200415c: 82 10 20 16 mov 0x16, %g1
2004160: c2 22 00 00 st %g1, [ %o0 ]
2004164: 81 c7 e0 08 ret
2004168: 81 e8 00 00 restore
02009438 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
2009438: 9d e3 bf a0 save %sp, -96, %sp
int rv = -1;
if (target != NULL) {
200943c: 90 96 60 00 orcc %i1, 0, %o0
2009440: 02 80 00 0b be 200946c <mount_and_make_target_path+0x34>
2009444: 01 00 00 00 nop
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
2009448: 40 00 02 fd call 200a03c <rtems_mkdir>
200944c: 92 10 21 ff mov 0x1ff, %o1 ! 1ff <PROM_START+0x1ff>
if (rv == 0) {
2009450: 82 92 20 00 orcc %o0, 0, %g1
2009454: 02 80 00 04 be 2009464 <mount_and_make_target_path+0x2c> <== ALWAYS TAKEN
2009458: 01 00 00 00 nop
} else {
errno = EINVAL;
}
return rv;
}
200945c: 81 c7 e0 08 ret
2009460: 91 e8 00 01 restore %g0, %g1, %o0
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
2009464: 40 00 00 08 call 2009484 <mount>
2009468: 81 e8 00 00 restore
options,
data
);
}
} else {
errno = EINVAL;
200946c: 40 00 63 07 call 2022088 <__errno>
2009470: 01 00 00 00 nop
2009474: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
2009478: 82 10 3f ff mov -1, %g1
options,
data
);
}
} else {
errno = EINVAL;
200947c: 10 bf ff f8 b 200945c <mount_and_make_target_path+0x24>
2009480: c4 22 00 00 st %g2, [ %o0 ]
020380b0 <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
20380b0: 9d e3 bf 00 save %sp, -256, %sp
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
20380b4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
20380b8: c0 27 bf f8 clr [ %fp + -8 ]
mode_t mode,
const fat_file_fd_t *link_fd)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
20380bc: e0 00 60 20 ld [ %g1 + 0x20 ], %l0
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;
20380c0: c0 37 bf fc clrh [ %fp + -4 ]
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
20380c4: 82 10 3f ff mov -1, %g1
uint16_t date = 0;
20380c8: c0 37 bf fe clrh [ %fp + -2 ]
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
20380cc: c0 27 bf e8 clr [ %fp + -24 ]
dir_pos->sname.ofs = 0;
20380d0: c0 27 bf ec clr [ %fp + -20 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
20380d4: c2 27 bf f0 st %g1, [ %fp + -16 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
20380d8: c2 27 bf f4 st %g1, [ %fp + -12 ]
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
20380dc: c0 27 bf a8 clr [ %fp + -88 ]
20380e0: c0 27 bf ac clr [ %fp + -84 ]
20380e4: c0 27 bf b0 clr [ %fp + -80 ]
20380e8: c0 27 bf b4 clr [ %fp + -76 ]
20380ec: c0 27 bf b8 clr [ %fp + -72 ]
20380f0: c0 27 bf bc clr [ %fp + -68 ]
20380f4: c0 27 bf c0 clr [ %fp + -64 ]
20380f8: c0 27 bf c4 clr [ %fp + -60 ]
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
20380fc: c0 27 bf 68 clr [ %fp + -152 ]
2038100: c0 27 bf 6c clr [ %fp + -148 ]
2038104: c0 27 bf 70 clr [ %fp + -144 ]
2038108: c0 27 bf 74 clr [ %fp + -140 ]
203810c: c0 27 bf 78 clr [ %fp + -136 ]
2038110: c0 27 bf 7c clr [ %fp + -132 ]
2038114: c0 27 bf 80 clr [ %fp + -128 ]
2038118: c0 27 bf 84 clr [ %fp + -124 ]
203811c: c0 27 bf 88 clr [ %fp + -120 ]
2038120: c0 27 bf 8c clr [ %fp + -116 ]
2038124: c0 27 bf 90 clr [ %fp + -112 ]
2038128: c0 27 bf 94 clr [ %fp + -108 ]
203812c: c0 27 bf 98 clr [ %fp + -104 ]
2038130: c0 27 bf 9c clr [ %fp + -100 ]
2038134: c0 27 bf a0 clr [ %fp + -96 ]
2038138: c0 27 bf a4 clr [ %fp + -92 ]
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
203813c: b8 10 00 18 mov %i0, %i4
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
2038140: 80 a6 e1 04 cmp %i3, 0x104
2038144: 14 80 00 cc bg 2038474 <msdos_creat_node+0x3c4> <== NEVER TAKEN
2038148: e2 06 20 08 ld [ %i0 + 8 ], %l1
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
name_type = msdos_long_to_short (name, name_len,
203814c: 90 10 00 1a mov %i2, %o0
2038150: 92 10 00 1b mov %i3, %o1
2038154: 94 07 bf a8 add %fp, -88, %o2
2038158: 40 00 01 2a call 2038600 <msdos_long_to_short>
203815c: 96 10 20 0b mov 0xb, %o3
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
2038160: a4 92 20 00 orcc %o0, 0, %l2
2038164: 02 80 00 ca be 203848c <msdos_creat_node+0x3dc> <== NEVER TAKEN
2038168: 90 10 20 00 clr %o0
rtems_set_errno_and_return_minus_one(EINVAL);
}
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
203816c: c0 2f bf b4 clrb [ %fp + -76 ]
/* set up last write date and time */
time_ret = time(NULL);
2038170: 40 00 6f 4a call 2053e98 <time>
2038174: b0 10 3f ff mov -1, %i0
if ( time_ret == -1 )
2038178: 80 a2 3f ff cmp %o0, -1
203817c: 02 80 00 83 be 2038388 <msdos_creat_node+0x2d8> <== NEVER TAKEN
2038180: 92 07 bf fe add %fp, -2, %o1
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
2038184: 40 00 33 a2 call 204500c <msdos_date_unix2dos>
2038188: 94 07 bf fc add %fp, -4, %o2
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
203818c: c8 17 bf fc lduh [ %fp + -4 ], %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2038190: c6 17 bf fe lduh [ %fp + -2 ], %g3
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);
2038194: 89 29 20 10 sll %g4, 0x10, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
2038198: 87 28 e0 10 sll %g3, 0x10, %g3
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);
203819c: 85 31 20 08 srl %g4, 8, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
20381a0: 83 30 e0 08 srl %g3, 8, %g1
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);
20381a4: 89 31 20 18 srl %g4, 0x18, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
20381a8: 87 30 e0 18 srl %g3, 0x18, %g3
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);
20381ac: 84 10 80 04 or %g2, %g4, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
20381b0: 82 10 40 03 or %g1, %g3, %g1
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);
20381b4: c4 37 bf b6 sth %g2, [ %fp + -74 ]
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
20381b8: c4 37 bf be sth %g2, [ %fp + -66 ]
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);
20381bc: c2 37 bf b8 sth %g1, [ %fp + -72 ]
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
20381c0: c2 37 bf c0 sth %g1, [ %fp + -64 ]
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
20381c4: c2 37 bf ba sth %g1, [ %fp + -70 ]
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
20381c8: 80 a6 60 00 cmp %i1, 0
20381cc: 02 80 00 7b be 20383b8 <msdos_creat_node+0x308>
20381d0: c0 27 bf c4 clr [ %fp + -60 ]
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
20381d4: 80 a6 60 02 cmp %i1, 2
20381d8: 02 80 00 7c be 20383c8 <msdos_creat_node+0x318> <== NEVER TAKEN
20381dc: c2 0f bf b3 ldub [ %fp + -77 ], %g1
* 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;
20381e0: 82 10 60 20 or %g1, 0x20, %g1
20381e4: c2 2f bf b3 stb %g1, [ %fp + -77 ]
/*
* 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,
20381e8: 82 07 bf a8 add %fp, -88, %g1
20381ec: 90 10 00 1c mov %i4, %o0
20381f0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20381f4: 92 10 20 01 mov 1, %o1
20381f8: 94 10 00 1a mov %i2, %o2
20381fc: 96 10 00 1b mov %i3, %o3
2038200: 98 10 00 12 mov %l2, %o4
2038204: 40 00 06 9b call 2039c70 <msdos_get_name_node>
2038208: 9a 07 bf e8 add %fp, -24, %o5
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
203820c: b0 92 20 00 orcc %o0, 0, %i0
2038210: 12 80 00 5e bne 2038388 <msdos_creat_node+0x2d8> <== NEVER TAKEN
2038214: 80 a6 60 00 cmp %i1, 0
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
2038218: 12 80 00 5c bne 2038388 <msdos_creat_node+0x2d8>
203821c: 92 07 bf e8 add %fp, -24, %o1
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
2038220: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
2038224: 7f ff bf 17 call 2027e80 <fat_file_open>
2038228: 94 07 bf f8 add %fp, -8, %o2
if (rc != RC_OK)
203822c: b0 92 20 00 orcc %o0, 0, %i0
2038230: 32 80 00 5d bne,a 20383a4 <msdos_creat_node+0x2f4> <== NEVER TAKEN
2038234: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
2038238: fa 07 bf f8 ld [ %fp + -8 ], %i5
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
203823c: 03 00 08 00 sethi %hi(0x200000), %g1
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
2038240: c0 27 60 18 clr [ %i5 + 0x18 ]
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
2038244: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
/*
* 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;
2038248: c0 27 60 10 clr [ %i5 + 0x10 ]
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
203824c: 03 00 81 ae sethi %hi(0x206b800), %g1
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
2038250: c4 1f bf a8 ldd [ %fp + -88 ], %g2
2038254: d8 1f bf b0 ldd [ %fp + -80 ], %o4
2038258: f4 1f bf b8 ldd [ %fp + -72 ], %i2
203825c: f0 1f bf c0 ldd [ %fp + -64 ], %i0
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
2038260: d2 00 61 ec ld [ %g1 + 0x1ec ], %o1
2038264: 94 10 20 0b mov 0xb, %o2
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
2038268: c4 3f bf 68 std %g2, [ %fp + -152 ]
203826c: d8 3f bf 70 std %o4, [ %fp + -144 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
2038270: c4 3f bf 88 std %g2, [ %fp + -120 ]
2038274: d8 3f bf 90 std %o4, [ %fp + -112 ]
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
2038278: f4 3f bf 78 std %i2, [ %fp + -136 ]
203827c: f0 3f bf 80 std %i0, [ %fp + -128 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
2038280: f4 3f bf 98 std %i2, [ %fp + -104 ]
2038284: f0 3f bf a0 std %i0, [ %fp + -96 ]
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
2038288: 40 00 49 5a call 204a7f0 <memcpy>
203828c: 90 07 bf 68 add %fp, -152, %o0
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
2038290: 03 00 81 ae sethi %hi(0x206b800), %g1
2038294: d2 00 61 e8 ld [ %g1 + 0x1e8 ], %o1 ! 206b9e8 <MSDOS_DOTDOT_NAME>
2038298: 90 07 bf 88 add %fp, -120, %o0
203829c: 40 00 49 55 call 204a7f0 <memcpy>
20382a0: 94 10 20 0b mov 0xb, %o2
/*
* 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)) &&
20382a4: c2 04 60 20 ld [ %l1 + 0x20 ], %g1
20382a8: 80 a0 60 01 cmp %g1, 1
20382ac: 22 80 00 7e be,a 20384a4 <msdos_creat_node+0x3f4>
20382b0: c2 04 60 24 ld [ %l1 + 0x24 ], %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
20382b4: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
20382b8: 85 28 60 10 sll %g1, 0x10, %g2
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
20382bc: 83 30 60 10 srl %g1, 0x10, %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
20382c0: 89 30 a0 08 srl %g2, 8, %g4
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
20382c4: 83 28 60 10 sll %g1, 0x10, %g1
*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)) =
20382c8: 85 30 a0 18 srl %g2, 0x18, %g2
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));
20382cc: 87 30 60 08 srl %g1, 8, %g3
*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)) =
20382d0: 84 11 00 02 or %g4, %g2, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
20382d4: 83 30 60 18 srl %g1, 0x18, %g1
*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)) =
20382d8: c4 37 bf a2 sth %g2, [ %fp + -94 ]
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
20382dc: 82 10 c0 01 or %g3, %g1, %g1
20382e0: c2 37 bf 9c sth %g1, [ %fp + -100 ]
/*
* 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(parent_loc->mt_entry, fat_fd, 0,
20382e4: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
20382e8: 92 10 00 1d mov %i5, %o1
20382ec: 94 10 20 00 clr %o2
20382f0: 96 10 20 40 mov 0x40, %o3
20382f4: 7f ff c1 41 call 20287f8 <fat_file_write>
20382f8: 98 07 bf 68 add %fp, -152, %o4
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
20382fc: 80 a2 20 00 cmp %o0, 0
2038300: 06 80 00 24 bl 2038390 <msdos_creat_node+0x2e0> <== NEVER TAKEN
2038304: d2 07 bf f8 ld [ %fp + -8 ], %o1
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
2038308: c2 14 20 06 lduh [ %l0 + 6 ], %g1
203830c: c6 02 60 18 ld [ %o1 + 0x18 ], %g3
/* 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));
2038310: c4 02 60 1c ld [ %o1 + 0x1c ], %g2
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
2038314: 82 00 c0 01 add %g3, %g1, %g1
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(parent_loc->mt_entry, fat_fd, 0,
2038318: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
/* 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)) =
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
203831c: 87 28 a0 10 sll %g2, 0x10, %g3
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
2038320: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
/* 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));
2038324: 89 30 e0 08 srl %g3, 8, %g4
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
2038328: 85 30 a0 10 srl %g2, 0x10, %g2
/* 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)) =
203832c: 87 30 e0 18 srl %g3, 0x18, %g3
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));
2038330: 85 28 a0 10 sll %g2, 0x10, %g2
/* 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)) =
2038334: 86 11 00 03 or %g4, %g3, %g3
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));
2038338: 83 30 a0 08 srl %g2, 8, %g1
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)) =
203833c: 85 30 a0 18 srl %g2, 0x18, %g2
2038340: 82 10 40 02 or %g1, %g2, %g1
/* 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)) =
2038344: c6 37 bf 82 sth %g3, [ %fp + -126 ]
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
2038348: c2 37 bf 7c sth %g1, [ %fp + -132 ]
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
203834c: 94 10 20 00 clr %o2
2038350: 96 10 20 20 mov 0x20, %o3
2038354: 7f ff c1 29 call 20287f8 <fat_file_write>
2038358: 98 07 bf 68 add %fp, -152, %o4
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
203835c: 80 a2 20 00 cmp %o0, 0
2038360: 06 80 00 0d bl 2038394 <msdos_creat_node+0x2e4> <== NEVER TAKEN
2038364: b0 10 3f ff mov -1, %i0
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);
2038368: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
203836c: 40 00 01 87 call 2038988 <msdos_set_first_cluster_num>
2038370: d2 07 bf f8 ld [ %fp + -8 ], %o1
if (rc != RC_OK)
2038374: b0 92 20 00 orcc %o0, 0, %i0
2038378: 12 80 00 08 bne 2038398 <msdos_creat_node+0x2e8> <== NEVER TAKEN
203837c: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
2038380: 7f ff c0 3c call 2028470 <fat_file_close>
2038384: d2 07 bf f8 ld [ %fp + -8 ], %o1
2038388: 81 c7 e0 08 ret
203838c: 81 e8 00 00 restore
ret = fat_file_write(parent_loc->mt_entry, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
{
rc = -1;
2038390: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
2038394: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED
2038398: 7f ff c0 36 call 2028470 <fat_file_close> <== NOT EXECUTED
203839c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== 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);
20383a0: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED
20383a4: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
20383a8: 40 00 01 da call 2038b10 <msdos_set_first_char4file_name> <== NOT EXECUTED
20383ac: 94 10 20 e5 mov 0xe5, %o2 <== NOT EXECUTED
return rc;
}
20383b0: 81 c7 e0 08 ret <== NOT EXECUTED
20383b4: 81 e8 00 00 restore <== NOT EXECUTED
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
20383b8: c2 0f bf b3 ldub [ %fp + -77 ], %g1
20383bc: 82 10 60 10 or %g1, 0x10, %g1
20383c0: 10 bf ff 8a b 20381e8 <msdos_creat_node+0x138>
20383c4: c2 2f bf b3 stb %g1, [ %fp + -77 ]
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
20383c8: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED
20383cc: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
20383d0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20383d4: 12 80 00 06 bne 20383ec <msdos_creat_node+0x33c> <== NOT EXECUTED
20383d8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 <== NOT EXECUTED
20383dc: c6 08 60 0a ldub [ %g1 + 0xa ], %g3 <== NOT EXECUTED
20383e0: 80 88 e0 03 btst 3, %g3 <== NOT EXECUTED
20383e4: 32 80 00 07 bne,a 2038400 <msdos_creat_node+0x350> <== NOT EXECUTED
20383e8: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20383ec: c6 08 60 05 ldub [ %g1 + 5 ], %g3 <== NOT EXECUTED
20383f0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 <== NOT EXECUTED
20383f4: 92 00 bf fe add %g2, -2, %o1 <== NOT EXECUTED
20383f8: 93 2a 40 03 sll %o1, %g3, %o1 <== NOT EXECUTED
20383fc: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
2038400: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 <== NOT EXECUTED
2038404: c4 0c 20 02 ldub [ %l0 + 2 ], %g2 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
2038408: d4 14 00 00 lduh [ %l0 ], %o2 <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
203840c: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
2038410: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_read(parent_loc->mt_entry,
2038414: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2038418: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
203841c: 96 10 20 20 mov 0x20, %o3 <== NOT EXECUTED
2038420: 98 07 bf c8 add %fp, -56, %o4 <== NOT EXECUTED
2038424: 7f ff c3 15 call 2029078 <_fat_block_read> <== NOT EXECUTED
2038428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
203842c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2038430: 06 bf ff d6 bl 2038388 <msdos_creat_node+0x2d8> <== NOT EXECUTED
2038434: c2 0f bf d3 ldub [ %fp + -45 ], %g1 <== 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);
2038438: de 0f bf d5 ldub [ %fp + -43 ], %o7 <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
203843c: f0 17 bf d6 lduh [ %fp + -42 ], %i0 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
2038440: fa 17 bf d8 lduh [ %fp + -40 ], %i5 <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
2038444: c8 07 bf e4 ld [ %fp + -28 ], %g4 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
2038448: c6 17 bf e2 lduh [ %fp + -30 ], %g3 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
203844c: c4 17 bf dc lduh [ %fp + -36 ], %g2 <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
2038450: 82 10 60 20 or %g1, 0x20, %g1 <== 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);
2038454: de 2f bf b5 stb %o7, [ %fp + -75 ] <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
2038458: f0 37 bf b6 sth %i0, [ %fp + -74 ] <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
203845c: fa 37 bf b8 sth %i5, [ %fp + -72 ] <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
2038460: c8 27 bf c4 st %g4, [ %fp + -60 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
2038464: c6 37 bf c2 sth %g3, [ %fp + -62 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
2038468: c4 37 bf bc sth %g2, [ %fp + -68 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
203846c: 10 bf ff 5f b 20381e8 <msdos_creat_node+0x138> <== NOT EXECUTED
2038470: c2 2f bf b3 stb %g1, [ %fp + -77 ] <== NOT EXECUTED
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
2038474: 40 00 3b 9e call 20472ec <__errno> <== NOT EXECUTED
2038478: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203847c: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED
2038480: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2038484: 81 c7 e0 08 ret <== NOT EXECUTED
2038488: 81 e8 00 00 restore <== NOT EXECUTED
name_type = msdos_long_to_short (name, name_len,
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
rtems_set_errno_and_return_minus_one(EINVAL);
203848c: 40 00 3b 98 call 20472ec <__errno> <== NOT EXECUTED
2038490: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2038494: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2038498: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
203849c: 81 c7 e0 08 ret <== NOT EXECUTED
20384a0: 81 e8 00 00 restore <== NOT EXECUTED
/*
* 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)) &&
20384a4: 80 a0 60 00 cmp %g1, 0
20384a8: 32 bf ff 84 bne,a 20382b8 <msdos_creat_node+0x208> <== NEVER TAKEN
20384ac: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
20384b0: c2 0c 20 0a ldub [ %l0 + 0xa ], %g1
/*
* 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)) &&
20384b4: 80 88 60 04 btst 4, %g1
20384b8: 22 bf ff 80 be,a 20382b8 <msdos_creat_node+0x208> <== ALWAYS TAKEN
20384bc: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
20384c0: c0 37 bf a2 clrh [ %fp + -94 ] <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
20384c4: 10 bf ff 88 b 20382e4 <msdos_creat_node+0x234> <== NOT EXECUTED
20384c8: c0 37 bf 9c clrh [ %fp + -100 ] <== NOT EXECUTED
02045188 <msdos_date_dos2unix>:
* called from the stat(), and fstat() system calls and so probably need
* not be too efficient.
*/
unsigned int
msdos_date_dos2unix(unsigned int dd, unsigned int dt)
{
2045188: 9d e3 bf a0 save %sp, -96, %sp
+ ((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) {
204518c: 03 00 81 ce sethi %hi(0x2073800), %g1
2045190: c4 10 62 02 lduh [ %g1 + 0x202 ], %g2 ! 2073a02 <lastdosdate>
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
2045194: 9e 0e 67 e0 and %i1, 0x7e0, %o7
2045198: 87 33 e0 04 srl %o7, 4, %g3
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
204519c: 89 36 60 0b srl %i1, 0xb, %g4
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
20451a0: 9e 23 c0 03 sub %o7, %g3, %o7
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
20451a4: 88 09 20 1f and %g4, 0x1f, %g4
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)
20451a8: b2 0e 60 1f and %i1, 0x1f, %i1
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
20451ac: 9b 29 20 03 sll %g4, 3, %o5
20451b0: 87 29 20 07 sll %g4, 7, %g3
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
20451b4: 80 a0 80 18 cmp %g2, %i0
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;
20451b8: 86 20 c0 0d sub %g3, %o5, %g3
20451bc: 85 28 e0 04 sll %g3, 4, %g2
20451c0: 86 20 80 03 sub %g2, %g3, %g3
20451c4: 86 00 c0 0f add %g3, %o7, %g3
20451c8: b2 00 c0 19 add %g3, %i1, %i1
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
20451cc: 02 80 00 37 be 20452a8 <msdos_date_dos2unix+0x120>
20451d0: b3 2e 60 01 sll %i1, 1, %i1
lastdosdate = dd;
20451d4: f0 30 62 02 sth %i0, [ %g1 + 0x202 ]
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
20451d8: 89 36 20 09 srl %i0, 9, %g4
for (y = 0; y < year; y++)
20451dc: 88 89 20 7f andcc %g4, 0x7f, %g4
20451e0: 02 80 00 36 be 20452b8 <msdos_date_dos2unix+0x130> <== NEVER TAKEN
20451e4: 82 10 20 00 clr %g1
20451e8: 84 10 20 00 clr %g2
20451ec: 10 80 00 06 b 2045204 <msdos_date_dos2unix+0x7c>
20451f0: 86 10 21 6e mov 0x16e, %g3
days += y & 0x03 ? 365 : 366;
20451f4: 86 08 a0 03 and %g2, 3, %g3
20451f8: 80 a0 00 03 cmp %g0, %g3
20451fc: 86 60 3f ff subx %g0, -1, %g3
2045200: 86 00 e1 6d add %g3, 0x16d, %g3
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
2045204: 84 00 a0 01 inc %g2
2045208: 80 a0 80 04 cmp %g2, %g4
204520c: 12 bf ff fa bne 20451f4 <msdos_date_dos2unix+0x6c>
2045210: 82 00 40 03 add %g1, %g3, %g1
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
2045214: 09 00 81 c1 sethi %hi(0x2070400), %g4
2045218: 80 88 a0 03 btst 3, %g2
204521c: 02 80 00 04 be 204522c <msdos_date_dos2unix+0xa4> <== ALWAYS TAKEN
2045220: 88 11 22 20 or %g4, 0x220, %g4
2045224: 09 00 81 c1 sethi %hi(0x2070400), %g4 <== NOT EXECUTED
2045228: 88 11 22 08 or %g4, 0x208, %g4 ! 2070608 <regyear> <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
204522c: 9e 0e 21 e0 and %i0, 0x1e0, %o7
2045230: 9f 33 e0 05 srl %o7, 5, %o7
if (month == 0) {
2045234: 80 a3 e0 00 cmp %o7, 0
2045238: 22 80 00 0c be,a 2045268 <msdos_date_dos2unix+0xe0> <== NEVER TAKEN
204523c: b0 0e 20 1f and %i0, 0x1f, %i0 <== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
2045240: 9e 83 ff ff addcc %o7, -1, %o7
2045244: 02 80 00 08 be 2045264 <msdos_date_dos2unix+0xdc> <== ALWAYS TAKEN
2045248: 84 10 20 00 clr %g2
* 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)
204524c: 87 28 a0 01 sll %g2, 1, %g3 <== 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];
2045250: c6 11 00 03 lduh [ %g4 + %g3 ], %g3 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
2045254: 84 00 a0 01 inc %g2 <== NOT EXECUTED
2045258: 80 a0 80 0f cmp %g2, %o7 <== NOT EXECUTED
204525c: 0a bf ff fc bcs 204524c <msdos_date_dos2unix+0xc4> <== NOT EXECUTED
2045260: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
2045264: b0 0e 20 1f and %i0, 0x1f, %i0
2045268: b0 06 3f ff add %i0, -1, %i0
204526c: 82 06 00 01 add %i0, %g1, %g1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
2045270: 85 28 60 07 sll %g1, 7, %g2
2045274: 83 28 60 09 sll %g1, 9, %g1
2045278: 82 20 40 02 sub %g1, %g2, %g1
204527c: 85 28 60 04 sll %g1, 4, %g2
2045280: 82 20 80 01 sub %g2, %g1, %g1
2045284: 85 28 60 04 sll %g1, 4, %g2
2045288: 82 20 80 01 sub %g2, %g1, %g1
204528c: 05 04 b3 a9 sethi %hi(0x12cea400), %g2
2045290: 84 10 a2 00 or %g2, 0x200, %g2 ! 12cea600 <RAM_END+0x108ea600>
2045294: 82 00 40 02 add %g1, %g2, %g1
2045298: 05 00 81 ce sethi %hi(0x2073800), %g2
204529c: c2 20 a2 04 st %g1, [ %g2 + 0x204 ] ! 2073a04 <lastseconds>
}
return seconds + lastseconds;
}
20452a0: 81 c7 e0 08 ret
20452a4: 91 e8 40 19 restore %g1, %i1, %o0
+ ((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) {
20452a8: 03 00 81 ce sethi %hi(0x2073800), %g1
20452ac: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 2073a04 <lastseconds>
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
}
return seconds + lastseconds;
}
20452b0: 81 c7 e0 08 ret
20452b4: 91 e8 40 19 restore %g1, %i1, %o0
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
20452b8: 09 00 81 c1 sethi %hi(0x2070400), %g4 <== NOT EXECUTED
20452bc: 10 bf ff dc b 204522c <msdos_date_dos2unix+0xa4> <== NOT EXECUTED
20452c0: 88 11 22 20 or %g4, 0x220, %g4 ! 2070620 <leapyear> <== NOT EXECUTED
0204500c <msdos_date_unix2dos>:
* file timestamps. The passed in unix time is assumed to be in GMT.
*/
void
msdos_date_unix2dos(unsigned int t, uint16_t *ddp,
uint16_t *dtp)
{
204500c: 9d e3 bf a0 save %sp, -96, %sp
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
2045010: 03 00 81 ce sethi %hi(0x2073800), %g1
2045014: c4 00 61 f4 ld [ %g1 + 0x1f4 ], %g2 ! 20739f4 <lasttime>
2045018: 80 a0 80 18 cmp %g2, %i0
204501c: 02 80 00 4d be 2045150 <msdos_date_unix2dos+0x144>
2045020: 92 10 20 3c mov 0x3c, %o1
lasttime = t;
2045024: f0 20 61 f4 st %i0, [ %g1 + 0x1f4 ]
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
2045028: 40 00 6e 9d call 2060a9c <.udiv>
204502c: 90 10 00 18 mov %i0, %o0
2045030: 40 00 6f 47 call 2060d4c <.urem>
2045034: 92 10 20 3c mov 0x3c, %o1
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
2045038: 92 10 2e 10 mov 0xe10, %o1
* 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)
204503c: bb 2a 20 05 sll %o0, 5, %i5
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
2045040: 40 00 6e 97 call 2060a9c <.udiv>
2045044: 90 10 00 18 mov %i0, %o0
2045048: 40 00 6f 41 call 2060d4c <.urem>
204504c: 92 10 20 18 mov 0x18, %o1
* 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)
2045050: 83 2a 20 0b sll %o0, 0xb, %g1
2045054: 92 10 20 3c mov 0x3c, %o1
2045058: ba 07 40 01 add %i5, %g1, %i5
204505c: 40 00 6f 3c call 2060d4c <.urem>
2045060: 90 10 00 18 mov %i0, %o0
2045064: 03 00 81 ce sethi %hi(0x2073800), %g1
2045068: 91 32 20 01 srl %o0, 1, %o0
/*
* 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);
204506c: 13 00 00 54 sethi %hi(0x15000), %o1
* 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)
2045070: ba 07 40 08 add %i5, %o0, %i5
/*
* 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);
2045074: 92 12 61 80 or %o1, 0x180, %o1
2045078: 90 10 00 18 mov %i0, %o0
204507c: 40 00 6e 88 call 2060a9c <.udiv>
2045080: fa 30 61 f8 sth %i5, [ %g1 + 0x1f8 ]
if (days != lastday) {
2045084: 03 00 81 ce sethi %hi(0x2073800), %g1
2045088: c4 00 61 fc ld [ %g1 + 0x1fc ], %g2 ! 20739fc <lastday>
204508c: 80 a2 00 02 cmp %o0, %g2
2045090: 02 80 00 38 be 2045170 <msdos_date_unix2dos+0x164>
2045094: b0 10 00 1d mov %i5, %i0
lastday = days;
2045098: d0 20 61 fc st %o0, [ %g1 + 0x1fc ]
for (year = 1970;; year++) {
204509c: 10 80 00 03 b 20450a8 <msdos_date_unix2dos+0x9c>
20450a0: 82 10 27 b2 mov 0x7b2, %g1
20450a4: 82 00 60 01 inc %g1
inc = year & 0x03 ? 365 : 366;
20450a8: 86 08 60 03 and %g1, 3, %g3
20450ac: 80 a0 00 03 cmp %g0, %g3
20450b0: 84 60 3f ff subx %g0, -1, %g2
20450b4: 84 00 a1 6d add %g2, 0x16d, %g2
if (days < inc)
20450b8: 80 a2 00 02 cmp %o0, %g2
20450bc: 3a bf ff fa bcc,a 20450a4 <msdos_date_unix2dos+0x98>
20450c0: 90 22 00 02 sub %o0, %g2, %o0
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
20450c4: 09 00 81 c1 sethi %hi(0x2070400), %g4
20450c8: 80 a0 e0 00 cmp %g3, 0
20450cc: 12 80 00 1c bne 204513c <msdos_date_unix2dos+0x130> <== NEVER TAKEN
20450d0: 88 11 22 20 or %g4, 0x220, %g4
for (month = 0; month < 12; month++) {
20450d4: 84 10 20 00 clr %g2
/*
* 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,
20450d8: 87 28 a0 01 sll %g2, 1, %g3
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
if (days < months[month])
20450dc: c6 11 00 03 lduh [ %g4 + %g3 ], %g3
20450e0: 80 a0 c0 08 cmp %g3, %o0
20450e4: 18 80 00 19 bgu 2045148 <msdos_date_unix2dos+0x13c> <== ALWAYS TAKEN
20450e8: 84 00 a0 01 inc %g2
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
20450ec: 80 a0 a0 0c cmp %g2, 0xc <== NOT EXECUTED
20450f0: 12 bf ff fa bne 20450d8 <msdos_date_unix2dos+0xcc> <== NOT EXECUTED
20450f4: 90 22 00 03 sub %o0, %g3, %o0 <== NOT EXECUTED
20450f8: 84 10 21 a0 mov 0x1a0, %g2 <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
20450fc: 84 00 a0 01 inc %g2
2045100: 07 00 81 ce sethi %hi(0x2073800), %g3
2045104: 90 00 80 08 add %g2, %o0, %o0
2045108: d0 30 e2 00 sth %o0, [ %g3 + 0x200 ]
* 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)
204510c: 80 a0 67 bc cmp %g1, 0x7bc
2045110: 08 80 00 07 bleu 204512c <msdos_date_unix2dos+0x120> <== NEVER TAKEN
2045114: 84 10 00 08 mov %o0, %g2
lastddate += (year - 1980) <<
2045118: 82 00 78 44 add %g1, -1980, %g1
204511c: 83 28 60 09 sll %g1, 9, %g1
2045120: 90 02 00 01 add %o0, %g1, %o0
2045124: 84 10 00 08 mov %o0, %g2
2045128: d0 30 e2 00 sth %o0, [ %g3 + 0x200 ]
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
204512c: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
2045130: c4 36 40 00 sth %g2, [ %i1 ]
}
2045134: 81 c7 e0 08 ret
2045138: 81 e8 00 00 restore
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
204513c: 09 00 81 c1 sethi %hi(0x2070400), %g4 <== NOT EXECUTED
2045140: 10 bf ff e5 b 20450d4 <msdos_date_unix2dos+0xc8> <== NOT EXECUTED
2045144: 88 11 22 08 or %g4, 0x208, %g4 ! 2070608 <regyear> <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
2045148: 10 bf ff ed b 20450fc <msdos_date_unix2dos+0xf0>
204514c: 85 28 a0 05 sll %g2, 5, %g2
/*
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
if (lasttime != t) {
2045150: 03 00 81 ce sethi %hi(0x2073800), %g1
2045154: f0 10 61 f8 lduh [ %g1 + 0x1f8 ], %i0 ! 20739f8 <lastdtime>
2045158: 03 00 81 ce sethi %hi(0x2073800), %g1
204515c: c4 10 62 00 lduh [ %g1 + 0x200 ], %g2 ! 2073a00 <lastddate>
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
2045160: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
2045164: c4 36 40 00 sth %g2, [ %i1 ]
}
2045168: 81 c7 e0 08 ret
204516c: 81 e8 00 00 restore
* 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);
if (days != lastday) {
2045170: 03 00 81 ce sethi %hi(0x2073800), %g1
2045174: c4 10 62 00 lduh [ %g1 + 0x200 ], %g2 ! 2073a00 <lastddate>
if (year > 1980)
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
2045178: f0 36 80 00 sth %i0, [ %i2 ]
*ddp = lastddate;
204517c: c4 36 40 00 sth %g2, [ %i1 ]
}
2045180: 81 c7 e0 08 ret
2045184: 81 e8 00 00 restore
02045574 <msdos_dir_close>:
* RC_OK, if directory closed successfully, or -1 if error occured (errno
* set apropriately.
*/
int
msdos_dir_close(rtems_libio_t *iop)
{
2045574: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045578: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
204557c: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
int
msdos_dir_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;
2045580: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045584: 92 10 20 00 clr %o1
2045588: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
204558c: 7f ff 21 82 call 200db94 <rtems_semaphore_obtain>
2045590: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045594: 80 a2 20 00 cmp %o0, 0
2045598: 12 80 00 11 bne 20455dc <msdos_dir_close+0x68> <== NEVER TAKEN
204559c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
20455a0: d0 06 20 34 ld [ %i0 + 0x34 ], %o0
20455a4: 7f ff 8b b3 call 2028470 <fat_file_close>
20455a8: 92 10 00 1c mov %i4, %o1
20455ac: b0 10 00 08 mov %o0, %i0
if (rc != RC_OK)
20455b0: 80 a6 20 00 cmp %i0, 0
20455b4: 12 80 00 06 bne 20455cc <msdos_dir_close+0x58> <== NEVER TAKEN
20455b8: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
20455bc: 7f ff 21 c0 call 200dcbc <rtems_semaphore_release>
20455c0: 01 00 00 00 nop
return RC_OK;
}
20455c4: 81 c7 e0 08 ret
20455c8: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
20455cc: 7f ff 21 bc call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20455d0: 01 00 00 00 nop <== NOT EXECUTED
return rc;
20455d4: 81 c7 e0 08 ret <== NOT EXECUTED
20455d8: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
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 );
20455dc: 40 00 07 44 call 20472ec <__errno> <== NOT EXECUTED
20455e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20455e4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20455e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20455ec: 81 c7 e0 08 ret <== NOT EXECUTED
20455f0: 81 e8 00 00 restore <== NOT EXECUTED
02038ccc <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
)
{
2038ccc: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
2038cd0: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
*/
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,
2038cd4: 39 00 81 ae sethi %hi(0x206b800), %i4
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;
2038cd8: ec 17 40 00 lduh [ %i5 ], %l6
2038cdc: e2 07 60 94 ld [ %i5 + 0x94 ], %l1
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) ||
(strncmp(MSDOS_DIR_NAME((entry)),
2038ce0: 21 00 81 ae sethi %hi(0x206b800), %l0
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;
2038ce4: c0 2e 80 00 clrb [ %i2 ]
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
2038ce8: b6 10 20 00 clr %i3
2038cec: ad 2d a0 10 sll %l6, 0x10, %l6
*/
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,
2038cf0: b8 17 21 a8 or %i4, 0x1a8, %i4
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
2038cf4: a0 14 21 b8 or %l0, 0x1b8, %l0
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
2038cf8: ad 35 a0 10 srl %l6, 0x10, %l6
2038cfc: 92 10 00 1b mov %i3, %o1
2038d00: 7f ff 28 78 call 2002ee0 <.umul>
2038d04: 90 10 00 16 mov %l6, %o0
2038d08: 92 10 00 19 mov %i1, %o1
2038d0c: 94 10 00 08 mov %o0, %o2
2038d10: 96 10 00 16 mov %l6, %o3
2038d14: 90 10 00 18 mov %i0, %o0
2038d18: 7f ff bd 0c call 2028148 <fat_file_read>
2038d1c: 98 10 00 11 mov %l1, %o4
2038d20: 80 a2 20 00 cmp %o0, 0
2038d24: 02 80 00 34 be 2038df4 <msdos_dir_is_empty+0x128> <== NEVER TAKEN
2038d28: 80 a2 20 1f cmp %o0, 0x1f
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
2038d2c: 24 80 00 27 ble,a 2038dc8 <msdos_dir_is_empty+0xfc> <== NEVER TAKEN
2038d30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
2038d34: ec 17 40 00 lduh [ %i5 ], %l6
2038d38: ad 2d a0 10 sll %l6, 0x10, %l6
2038d3c: ab 35 a0 10 srl %l6, 0x10, %l5
2038d40: 80 a5 40 08 cmp %l5, %o0
2038d44: 12 80 00 2e bne 2038dfc <msdos_dir_is_empty+0x130> <== NEVER TAKEN
2038d48: 80 a5 60 00 cmp %l5, 0
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
2038d4c: 02 80 00 27 be 2038de8 <msdos_dir_is_empty+0x11c> <== NEVER TAKEN
2038d50: a6 10 20 00 clr %l3
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
2038d54: e2 07 60 94 ld [ %i5 + 0x94 ], %l1
2038d58: a4 10 00 11 mov %l1, %l2
* 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)) ==
2038d5c: e8 0c 80 00 ldub [ %l2 ], %l4
2038d60: 80 a5 20 e5 cmp %l4, 0xe5
2038d64: 22 80 00 1c be,a 2038dd4 <msdos_dir_is_empty+0x108> <== NEVER TAKEN
2038d68: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
2038d6c: c2 0c a0 0b ldub [ %l2 + 0xb ], %g1
2038d70: 82 08 60 3f and %g1, 0x3f, %g1
*
* 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) ||
2038d74: 80 a0 60 0f cmp %g1, 0xf
2038d78: 02 80 00 16 be 2038dd0 <msdos_dir_is_empty+0x104> <== NEVER TAKEN
2038d7c: 90 10 00 12 mov %l2, %o0
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
2038d80: 92 10 00 1c mov %i4, %o1
2038d84: 40 00 55 c1 call 204e488 <strncmp>
2038d88: 94 10 20 0b mov 0xb, %o2
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
2038d8c: 80 a2 20 00 cmp %o0, 0
2038d90: 22 80 00 11 be,a 2038dd4 <msdos_dir_is_empty+0x108>
2038d94: a6 04 e0 20 add %l3, 0x20, %l3
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
2038d98: 90 10 00 12 mov %l2, %o0
2038d9c: 92 10 00 10 mov %l0, %o1
2038da0: 40 00 55 ba call 204e488 <strncmp>
2038da4: 94 10 20 0b mov 0xb, %o2
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) ||
2038da8: 80 a2 20 00 cmp %o0, 0
2038dac: 22 80 00 0a be,a 2038dd4 <msdos_dir_is_empty+0x108>
2038db0: a6 04 e0 20 add %l3, 0x20, %l3
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
2038db4: 80 a5 20 00 cmp %l4, 0
2038db8: 12 80 00 04 bne 2038dc8 <msdos_dir_is_empty+0xfc>
2038dbc: b0 10 20 00 clr %i0
*/
return RC_OK;
}
j++;
}
*ret_val = true;
2038dc0: 82 10 20 01 mov 1, %g1
2038dc4: c2 2e 80 00 stb %g1, [ %i2 ]
return RC_OK;
2038dc8: 81 c7 e0 08 ret
2038dcc: 81 e8 00 00 restore
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)
2038dd0: a6 04 e0 20 add %l3, 0x20, %l3 <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
2038dd4: 80 a4 c0 15 cmp %l3, %l5
2038dd8: 0a bf ff e1 bcs 2038d5c <msdos_dir_is_empty+0x90> <== ALWAYS TAKEN
2038ddc: a4 04 a0 20 add %l2, 0x20, %l2
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
2038de0: 10 bf ff c6 b 2038cf8 <msdos_dir_is_empty+0x2c> <== NOT EXECUTED
2038de4: b6 06 e0 01 inc %i3 <== NOT EXECUTED
*/
if ((*MSDOS_DIR_NAME(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
return RC_OK;
2038de8: e2 07 60 94 ld [ %i5 + 0x94 ], %l1 <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
2038dec: 10 bf ff c3 b 2038cf8 <msdos_dir_is_empty+0x2c> <== NOT EXECUTED
2038df0: b6 06 e0 01 inc %i3 <== NOT EXECUTED
}
*ret_val = true;
return RC_OK;
2038df4: 10 bf ff f3 b 2038dc0 <msdos_dir_is_empty+0xf4> <== NOT EXECUTED
2038df8: b0 10 20 00 clr %i0 <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
2038dfc: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
2038e00: 15 00 81 ae sethi %hi(0x206b800), %o2 <== NOT EXECUTED
2038e04: 17 00 81 ae sethi %hi(0x206b800), %o3 <== NOT EXECUTED
2038e08: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
2038e0c: 92 10 23 62 mov 0x362, %o1 <== NOT EXECUTED
2038e10: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED
2038e14: 7f ff c6 2d call 202a6c8 <__assert_func> <== NOT EXECUTED
2038e18: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED
02045b84 <msdos_dir_lseek>:
* RC_OK on success, or -1 if error occured (errno
* set apropriately).
*/
off_t
msdos_dir_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
2045b84: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (iop->offset >= 0 && iop->offset <= iop->size) {
2045b88: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2045b8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2045b90: 06 80 00 0e bl 2045bc8 <msdos_dir_lseek+0x44> <== NOT EXECUTED
2045b94: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 <== NOT EXECUTED
2045b98: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED
2045b9c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2045ba0: 06 80 00 0a bl 2045bc8 <msdos_dir_lseek+0x44> <== NOT EXECUTED
2045ba4: 01 00 00 00 nop <== NOT EXECUTED
2045ba8: 22 80 00 05 be,a 2045bbc <msdos_dir_lseek+0x38> <== NOT EXECUTED
2045bac: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
return 0;
2045bb0: b0 10 20 00 clr %i0 <== NOT EXECUTED
} else {
rtems_set_errno_and_return_minus_one(EINVAL);
}
}
2045bb4: 81 c7 e0 08 ret <== NOT EXECUTED
2045bb8: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED
* set apropriately).
*/
off_t
msdos_dir_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
if (iop->offset >= 0 && iop->offset <= iop->size) {
2045bbc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2045bc0: 3a bf ff fd bcc,a 2045bb4 <msdos_dir_lseek+0x30> <== NOT EXECUTED
2045bc4: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
} else {
rtems_set_errno_and_return_minus_one(EINVAL);
2045bc8: 40 00 05 c9 call 20472ec <__errno> <== NOT EXECUTED
2045bcc: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
2045bd0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2045bd4: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
2045bd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045bdc: 81 c7 e0 08 ret <== NOT EXECUTED
2045be0: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
020454f0 <msdos_dir_open>:
* set offset field of file control block to zero.
*/
int
msdos_dir_open(rtems_libio_t *iop, const char *pathname, int oflag,
mode_t mode)
{
20454f0: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20454f4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
20454f8: f6 06 20 24 ld [ %i0 + 0x24 ], %i3
msdos_dir_open(rtems_libio_t *iop, const char *pathname, int oflag,
mode_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20454fc: f8 00 60 20 ld [ %g1 + 0x20 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045500: 92 10 20 00 clr %o1
2045504: d0 07 20 90 ld [ %i4 + 0x90 ], %o0
2045508: 94 10 20 00 clr %o2
204550c: 7f ff 21 a2 call 200db94 <rtems_semaphore_obtain>
2045510: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045514: 80 a2 20 00 cmp %o0, 0
2045518: 12 80 00 11 bne 204555c <msdos_dir_open+0x6c> <== NEVER TAKEN
204551c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
2045520: 7f ff 8b 04 call 2028130 <fat_file_reopen>
2045524: 90 10 00 1b mov %i3, %o0
2045528: b0 10 00 08 mov %o0, %i0
if (rc != RC_OK)
204552c: 80 a6 20 00 cmp %i0, 0
2045530: 12 80 00 07 bne 204554c <msdos_dir_open+0x5c> <== NEVER TAKEN
2045534: d0 07 20 90 ld [ %i4 + 0x90 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
2045538: c0 27 60 10 clr [ %i5 + 0x10 ]
rtems_semaphore_release(fs_info->vol_sema);
204553c: 7f ff 21 e0 call 200dcbc <rtems_semaphore_release>
2045540: c0 27 60 14 clr [ %i5 + 0x14 ]
return RC_OK;
}
2045544: 81 c7 e0 08 ret
2045548: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
204554c: 7f ff 21 dc call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045550: 01 00 00 00 nop <== NOT EXECUTED
return rc;
2045554: 81 c7 e0 08 ret <== NOT EXECUTED
2045558: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
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 );
204555c: 40 00 07 64 call 20472ec <__errno> <== NOT EXECUTED
2045560: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045564: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045568: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
204556c: 81 c7 e0 08 ret <== NOT EXECUTED
2045570: 81 e8 00 00 restore <== NOT EXECUTED
020455f4 <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)
{
20455f4: 9d e3 be 68 save %sp, -408, %sp <== 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;
20455f8: e8 06 20 24 ld [ %i0 + 0x24 ], %l4 <== 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;
20455fc: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 <== 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 :
2045600: c2 05 20 20 ld [ %l4 + 0x20 ], %g1 <== 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;
2045604: c0 27 bf f8 clr [ %fp + -8 ] <== 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;
2045608: c0 27 bf fc clr [ %fp + -4 ] <== 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)
{
204560c: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
2045610: ac 10 00 19 mov %i1, %l6 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045614: f6 00 a0 20 ld [ %g2 + 0x20 ], %i3 <== 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 :
2045618: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
204561c: 02 80 00 f8 be 20459fc <msdos_dir_read+0x408> <== NOT EXECUTED
2045620: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
2045624: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
2045628: c4 27 be cc st %g2, [ %fp + -308 ] <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
204562c: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
2045630: 92 10 20 00 clr %o1 <== NOT EXECUTED
2045634: 7f ff 21 58 call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
2045638: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
204563c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2045640: 12 80 01 4b bne 2045b6c <msdos_dir_read+0x578> <== NOT EXECUTED
2045644: 90 10 00 1a mov %i2, %o0 <== 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);
2045648: 40 00 6d 15 call 2060a9c <.udiv> <== NOT EXECUTED
204564c: 92 10 21 18 mov 0x118, %o1 <== NOT EXECUTED
2045650: 83 2a 20 03 sll %o0, 3, %g1 <== NOT EXECUTED
2045654: 91 2a 20 05 sll %o0, 5, %o0 <== NOT EXECUTED
2045658: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED
204565c: a5 28 60 03 sll %g1, 3, %l2 <== 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)
2045660: a4 a4 80 01 subcc %l2, %g1, %l2 <== NOT EXECUTED
2045664: 02 80 01 40 be 2045b64 <msdos_dir_read+0x570> <== NOT EXECUTED
2045668: 90 10 00 18 mov %i0, %o0 <== 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);
204566c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2045670: 94 10 20 00 clr %o2 <== NOT EXECUTED
2045674: 96 10 21 18 mov 0x118, %o3 <== NOT EXECUTED
2045678: 40 00 6e c6 call 2061190 <__divdi3> <== NOT EXECUTED
204567c: a6 10 20 00 clr %l3 <== NOT EXECUTED
2045680: aa 10 20 00 clr %l5 <== NOT EXECUTED
2045684: b2 10 00 09 mov %o1, %i1 <== NOT EXECUTED
2045688: b0 10 20 00 clr %i0 <== NOT EXECUTED
204568c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
2045690: a2 10 20 00 clr %l1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
2045694: ae 10 00 16 mov %l6, %l7 <== 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(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
2045698: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
204569c: d8 06 e0 94 ld [ %i3 + 0x94 ], %o4 <== NOT EXECUTED
20456a0: d6 07 be cc ld [ %fp + -308 ], %o3 <== NOT EXECUTED
20456a4: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20456a8: 7f ff 8a a8 call 2028148 <fat_file_read> <== NOT EXECUTED
20456ac: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
20456b0: 80 a2 20 1f cmp %o0, 0x1f <== NOT EXECUTED
20456b4: 04 80 01 22 ble 2045b3c <msdos_dir_read+0x548> <== NOT EXECUTED
20456b8: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
20456bc: ec 06 e0 94 ld [ %i3 + 0x94 ], %l6 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
20456c0: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
20456c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20456c8: 02 80 00 c7 be 20459e4 <msdos_dir_read+0x3f0> <== NOT EXECUTED
20456cc: b8 10 20 00 clr %i4 <== 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)
20456d0: 10 80 00 0f b 204570c <msdos_dir_read+0x118> <== NOT EXECUTED
20456d4: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
20456d8: 80 a0 a0 0f cmp %g2, 0xf <== NOT EXECUTED
20456dc: 02 80 00 27 be 2045778 <msdos_dir_read+0x184> <== NOT EXECUTED
20456e0: 80 a4 3f ff cmp %l0, -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)
20456e4: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
20456e8: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
20456ec: 1a 80 00 19 bcc 2045750 <msdos_dir_read+0x15c> <== NOT EXECUTED
20456f0: c8 07 be cc ld [ %fp + -308 ], %g4 <== NOT EXECUTED
{
char* entry = (char*) fs_info->cl_buf + i;
20456f4: ec 06 e0 94 ld [ %i3 + 0x94 ], %l6 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
20456f8: c2 0d 80 1c ldub [ %l6 + %i4 ], %g1 <== NOT EXECUTED
20456fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2045700: 02 80 00 b9 be 20459e4 <msdos_dir_read+0x3f0> <== NOT EXECUTED
2045704: ac 05 80 1c add %l6, %i4, %l6 <== 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)
2045708: 80 a0 60 e5 cmp %g1, 0xe5 <== NOT EXECUTED
204570c: 22 bf ff f7 be,a 20456e8 <msdos_dir_read+0xf4> <== NOT EXECUTED
2045710: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
2045714: c4 0d a0 0b ldub [ %l6 + 0xb ], %g2 <== NOT EXECUTED
2045718: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
204571c: 12 bf ff ef bne 20456d8 <msdos_dir_read+0xe4> <== NOT EXECUTED
2045720: 84 08 a0 3f and %g2, 0x3f, %g2 <== 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) ==
2045724: 80 a0 a0 0f cmp %g2, 0xf <== NOT EXECUTED
2045728: 02 80 00 13 be 2045774 <msdos_dir_read+0x180> <== NOT EXECUTED
204572c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
2045730: 22 80 00 3c be,a 2045820 <msdos_dir_read+0x22c> <== NOT EXECUTED
2045734: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== 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)
2045738: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
* Skip active entries until get the entry to start from.
*/
if (start)
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
204573c: b2 06 7f ff add %i1, -1, %i1 <== 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)
2045740: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
2045744: 0a bf ff ec bcs 20456f4 <msdos_dir_read+0x100> <== NOT EXECUTED
2045748: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
204574c: c8 07 be cc ld [ %fp + -308 ], %g4 <== 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)
2045750: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2045754: 12 bf ff d1 bne 2045698 <msdos_dir_read+0xa4> <== NOT EXECUTED
2045758: a6 04 c0 04 add %l3, %g4, %l3 <== NOT EXECUTED
204575c: 82 10 00 11 mov %l1, %g1 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
2045760: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
2045764: 7f ff 21 56 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045768: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
return cmpltd;
204576c: 10 80 00 a2 b 20459f4 <msdos_dir_read+0x400> <== NOT EXECUTED
2045770: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
2045774: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
2045778: 02 80 00 8f be 20459b4 <msdos_dir_read+0x3c0> <== NOT EXECUTED
204577c: 80 88 60 40 btst 0x40, %g1 <== 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) &
2045780: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
2045784: 82 08 60 3f and %g1, 0x3f, %g1 <== NOT EXECUTED
2045788: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
204578c: 22 80 00 04 be,a 204579c <msdos_dir_read+0x1a8> <== NOT EXECUTED
2045790: da 0d a0 0d ldub [ %l6 + 0xd ], %o5 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
lfn_start = FAT_FILE_SHORT_NAME;
2045794: 10 bf ff d4 b 20456e4 <msdos_dir_read+0xf0> <== NOT EXECUTED
2045798: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
* 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) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
204579c: 82 0e 20 ff and %i0, 0xff, %g1 <== NOT EXECUTED
20457a0: 84 0b 60 ff and %o5, 0xff, %g2 <== NOT EXECUTED
20457a4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20457a8: 32 bf ff cf bne,a 20456e4 <msdos_dir_read+0xf0> <== NOT EXECUTED
20457ac: a0 10 3f ff mov -1, %l0 <== 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--;
20457b0: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
20457b4: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
20457b8: 9f 2d 60 04 sll %l5, 4, %o7 <== 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;
20457bc: ac 05 a0 01 inc %l6 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
20457c0: 9e 23 c0 01 sub %o7, %g1, %o7 <== NOT EXECUTED
20457c4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
20457c8: 9e 03 c0 15 add %o7, %l5, %o7 <== NOT EXECUTED
20457cc: 82 10 00 0f mov %o7, %g1 <== 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)
20457d0: 84 07 be d0 add %fp, -304, %g2 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
20457d4: 80 a0 60 fe cmp %g1, 0xfe <== 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)
20457d8: 88 00 80 01 add %g2, %g1, %g4 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
20457dc: 18 80 00 99 bgu 2045a40 <msdos_dir_read+0x44c> <== NOT EXECUTED
20457e0: 84 20 40 0f sub %g1, %o7, %g2 <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
20457e4: f0 0d 80 00 ldub [ %l6 ], %i0 <== NOT EXECUTED
20457e8: f0 29 20 14 stb %i0, [ %g4 + 0x14 ] <== NOT EXECUTED
if (*p == '\0')
20457ec: c8 4d 80 00 ldsb [ %l6 ], %g4 <== NOT EXECUTED
20457f0: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
20457f4: 02 80 00 93 be 2045a40 <msdos_dir_read+0x44c> <== NOT EXECUTED
20457f8: 82 00 60 01 inc %g1 <== NOT EXECUTED
break;
switch (q)
20457fc: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED
2045800: 02 80 00 8d be 2045a34 <msdos_dir_read+0x440> <== NOT EXECUTED
2045804: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED
2045808: 02 80 00 88 be 2045a28 <msdos_dir_read+0x434> <== NOT EXECUTED
204580c: 80 a0 e0 0d cmp %g3, 0xd <== 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++)
2045810: 02 80 00 8c be 2045a40 <msdos_dir_read+0x44c> <== NOT EXECUTED
2045814: 86 00 e0 01 inc %g3 <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
2045818: 10 bf ff ee b 20457d0 <msdos_dir_read+0x1dc> <== NOT EXECUTED
204581c: ac 05 a0 02 add %l6, 2, %l6 <== 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(iop->pathinfo.mt_entry, fat_fd, F_CLU_NUM,
2045820: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
2045824: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2045828: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
204582c: 7f ff 8b 43 call 2028538 <fat_file_ioctl> <== NOT EXECUTED
2045830: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
2045834: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2045838: 12 80 00 84 bne 2045a48 <msdos_dir_read+0x454> <== NOT EXECUTED
204583c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
2045840: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== 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;
2045844: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
2045848: c4 27 bf e8 st %g2, [ %fp + -24 ] <== NOT EXECUTED
204584c: c2 27 bf f0 st %g1, [ %fp + -16 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2045850: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED
dir_pos.sname.ofs = i;
2045854: f8 27 bf ec st %i4, [ %fp + -20 ] <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
2045858: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
204585c: 7f ff 89 89 call 2027e80 <fat_file_open> <== NOT EXECUTED
2045860: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if (rc != RC_OK)
2045864: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2045868: 12 80 00 78 bne 2045a48 <msdos_dir_read+0x454> <== NOT EXECUTED
204586c: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== 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);
2045870: 86 10 21 18 mov 0x118, %g3 <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
2045874: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== 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;
2045878: c0 27 be d8 clr [ %fp + -296 ] <== NOT EXECUTED
204587c: e2 27 be dc st %l1, [ %fp + -292 ] <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
2045880: c6 37 be e0 sth %g3, [ %fp + -288 ] <== 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)
2045884: 80 a4 3f ff cmp %l0, -1 <== NOT EXECUTED
2045888: 02 80 00 31 be 204594c <msdos_dir_read+0x358> <== NOT EXECUTED
204588c: c2 27 be d0 st %g1, [ %fp + -304 ] <== NOT EXECUTED
2045890: 82 10 20 00 clr %g1 <== NOT EXECUTED
2045894: 84 10 20 00 clr %g2 <== NOT EXECUTED
2045898: 10 80 00 06 b 20458b0 <msdos_dir_read+0x2bc> <== NOT EXECUTED
204589c: 86 10 20 00 clr %g3 <== 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;
20458a0: 80 a0 00 04 cmp %g0, %g4 <== NOT EXECUTED
20458a4: 84 40 3f ff addx %g0, -1, %g2 <== NOT EXECUTED
20458a8: 84 08 a0 80 and %g2, 0x80, %g2 <== NOT EXECUTED
20458ac: 84 00 bf 80 add %g2, -128, %g2 <== NOT EXECUTED
20458b0: c8 0d 80 01 ldub [ %l6 + %g1 ], %g4 <== NOT EXECUTED
20458b4: 87 30 e0 01 srl %g3, 1, %g3 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
20458b8: 82 00 60 01 inc %g1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
20458bc: 84 00 c0 02 add %g3, %g2, %g2 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
20458c0: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
20458c4: 84 00 80 04 add %g2, %g4, %g2 <== NOT EXECUTED
20458c8: 86 08 a0 ff and %g2, 0xff, %g3 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
20458cc: 12 bf ff f5 bne 20458a0 <msdos_dir_read+0x2ac> <== NOT EXECUTED
20458d0: 88 08 e0 01 and %g3, 1, %g4 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
20458d4: 84 1e 00 02 xor %i0, %g2, %g2 <== NOT EXECUTED
20458d8: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
20458dc: 12 80 00 1d bne 2045950 <msdos_dir_read+0x35c> <== NOT EXECUTED
20458e0: 84 10 20 08 mov 8, %g2 <== NOT EXECUTED
20458e4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
20458e8: 12 80 00 1b bne 2045954 <msdos_dir_read+0x360> <== NOT EXECUTED
20458ec: 82 05 80 02 add %l6, %g2, %g1 <== 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);
20458f0: 40 00 22 75 call 204e2c4 <strlen> <== NOT EXECUTED
20458f4: 90 07 be e4 add %fp, -284, %o0 <== NOT EXECUTED
20458f8: d0 37 be e2 sth %o0, [ %fp + -286 ] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
20458fc: 92 07 be d0 add %fp, -304, %o1 <== NOT EXECUTED
2045900: 94 10 21 18 mov 0x118, %o2 <== NOT EXECUTED
2045904: 40 00 13 bb call 204a7f0 <memcpy> <== NOT EXECUTED
2045908: 90 05 c0 11 add %l7, %l1, %o0 <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
204590c: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
2045910: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
2045914: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== 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);
2045918: 86 80 e1 18 addcc %g3, 0x118, %g3 <== NOT EXECUTED
204591c: 84 40 a0 00 addx %g2, 0, %g2 <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
2045920: 7f ff 8a d4 call 2028470 <fat_file_close> <== NOT EXECUTED
2045924: c4 3f 60 10 std %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
if (rc != RC_OK)
2045928: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
204592c: 12 80 00 47 bne 2045a48 <msdos_dir_read+0x454> <== NOT EXECUTED
2045930: a2 04 61 18 add %l1, 0x118, %l1 <== NOT EXECUTED
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
2045934: a4 04 be e8 add %l2, -280, %l2 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
2045938: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
204593c: 32 bf ff 6b bne,a 20456e8 <msdos_dir_read+0xf4> <== NOT EXECUTED
2045940: b8 07 20 20 add %i4, 0x20, %i4 <== 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)
2045944: 10 bf ff 87 b 2045760 <msdos_dir_read+0x16c> <== NOT EXECUTED
2045948: 82 10 00 11 mov %l1, %g1 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
204594c: 84 10 20 08 mov 8, %g2 <== 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)
2045950: 82 05 80 02 add %l6, %g2, %g1 <== 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) &&
2045954: c2 48 7f ff ldsb [ %g1 + -1 ], %g1 <== NOT EXECUTED
2045958: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
204595c: 12 80 00 42 bne 2045a64 <msdos_dir_read+0x470> <== NOT EXECUTED
2045960: 09 00 81 c1 sethi %hi(0x2070400), %g4 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
2045964: 84 80 bf ff addcc %g2, -1, %g2 <== NOT EXECUTED
2045968: 12 bf ff fb bne 2045954 <msdos_dir_read+0x360> <== NOT EXECUTED
204596c: 82 05 80 02 add %l6, %g2, %g1 <== 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(
2045970: 82 07 be e4 add %fp, -284, %g1 <== 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) &&
2045974: c6 4d a0 0a ldsb [ %l6 + 0xa ], %g3 <== NOT EXECUTED
2045978: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
204597c: 12 80 00 51 bne 2045ac0 <msdos_dir_read+0x4cc> <== NOT EXECUTED
2045980: 98 10 20 03 mov 3, %o4 <== NOT EXECUTED
2045984: c6 4d a0 09 ldsb [ %l6 + 9 ], %g3 <== NOT EXECUTED
2045988: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
204598c: 12 80 00 4d bne 2045ac0 <msdos_dir_read+0x4cc> <== NOT EXECUTED
2045990: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
2045994: c6 4d a0 08 ldsb [ %l6 + 8 ], %g3 <== NOT EXECUTED
2045998: 80 a0 e0 20 cmp %g3, 0x20 <== NOT EXECUTED
204599c: 12 80 00 49 bne 2045ac0 <msdos_dir_read+0x4cc> <== NOT EXECUTED
20459a0: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
20459a4: c0 28 40 00 clrb [ %g1 ] <== 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(
20459a8: c4 37 be e2 sth %g2, [ %fp + -286 ] <== NOT EXECUTED
20459ac: 10 bf ff d4 b 20458fc <msdos_dir_read+0x308> <== NOT EXECUTED
20459b0: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
if (lfn_start == FAT_FILE_SHORT_NAME)
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
20459b4: 22 bf ff 4d be,a 20456e8 <msdos_dir_read+0xf4> <== NOT EXECUTED
20459b8: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
/*
* Remember the start location of the long file name.
*/
lfn_start =
((j * bts2rd) + i) / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
20459bc: a0 04 c0 1c add %l3, %i4, %l0 <== 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) &
20459c0: aa 08 60 3f and %g1, 0x3f, %l5 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
20459c4: a1 34 20 05 srl %l0, 5, %l0 <== 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);
20459c8: f0 0d a0 0d ldub [ %l6 + 0xd ], %i0 <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
20459cc: 90 07 be e4 add %fp, -284, %o0 <== NOT EXECUTED
20459d0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20459d4: 40 00 14 13 call 204aa20 <memset> <== NOT EXECUTED
20459d8: 94 10 21 00 mov 0x100, %o2 <== 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) &
20459dc: 10 bf ff 6a b 2045784 <msdos_dir_read+0x190> <== NOT EXECUTED
20459e0: c2 0d 80 00 ldub [ %l6 ], %g1 <== NOT EXECUTED
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
20459e4: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
20459e8: 7f ff 20 b5 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20459ec: e2 27 be c8 st %l1, [ %fp + -312 ] <== NOT EXECUTED
return cmpltd;
20459f0: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
20459f4: 81 c7 e0 08 ret <== NOT EXECUTED
20459f8: 91 e8 00 01 restore %g0, %g1, %o0 <== 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) &&
20459fc: c2 05 20 24 ld [ %l4 + 0x24 ], %g1 <== NOT EXECUTED
2045a00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2045a04: 32 bf ff 09 bne,a 2045628 <msdos_dir_read+0x34> <== NOT EXECUTED
2045a08: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
2045a0c: c2 0e e0 0a ldub [ %i3 + 0xa ], %g1 <== 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) &&
2045a10: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
2045a14: 22 bf ff 05 be,a 2045628 <msdos_dir_read+0x34> <== NOT EXECUTED
2045a18: c4 16 e0 06 lduh [ %i3 + 6 ], %g2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
2045a1c: c2 05 20 18 ld [ %l4 + 0x18 ], %g1 <== NOT EXECUTED
2045a20: 10 bf ff 03 b 204562c <msdos_dir_read+0x38> <== NOT EXECUTED
2045a24: c2 27 be cc st %g1, [ %fp + -308 ] <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
2045a28: ac 05 a0 04 add %l6, 4, %l6 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
2045a2c: 10 bf ff 69 b 20457d0 <msdos_dir_read+0x1dc> <== NOT EXECUTED
2045a30: 86 00 e0 01 inc %g3 <== NOT EXECUTED
break;
switch (q)
{
case 4:
p += 5;
2045a34: ac 05 a0 05 add %l6, 5, %l6 <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
2045a38: 10 bf ff 66 b 20457d0 <msdos_dir_read+0x1dc> <== NOT EXECUTED
2045a3c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
2045a40: 10 bf ff be b 2045938 <msdos_dir_read+0x344> <== NOT EXECUTED
2045a44: b0 10 00 0d mov %o5, %i0 <== NOT EXECUTED
2045a48: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(iop->pathinfo.mt_entry, tmp_fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2045a4c: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
2045a50: 7f ff 20 9b call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045a54: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
return rc;
2045a58: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
2045a5c: 81 c7 e0 08 ret <== NOT EXECUTED
2045a60: 91 e8 00 01 restore %g0, %g1, %o0 <== 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)
2045a64: 82 10 20 00 clr %g1 <== 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) &&
2045a68: 10 80 00 05 b 2045a7c <msdos_dir_read+0x488> <== NOT EXECUTED
2045a6c: da 01 22 38 ld [ %g4 + 0x238 ], %o5 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
2045a70: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2045a74: 02 80 00 0f be 2045ab0 <msdos_dir_read+0x4bc> <== NOT EXECUTED
2045a78: c6 29 20 14 stb %g3, [ %g4 + 0x14 ] <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
2045a7c: c6 0d 80 01 ldub [ %l6 + %g1 ], %g3 <== 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)
2045a80: 9e 07 be d0 add %fp, -304, %o7 <== NOT EXECUTED
2045a84: 88 03 c0 01 add %o7, %g1, %g4 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
2045a88: 9e 03 40 03 add %o5, %g3, %o7 <== NOT EXECUTED
2045a8c: de 0b e0 01 ldub [ %o7 + 1 ], %o7 <== NOT EXECUTED
2045a90: 9e 0b e0 03 and %o7, 3, %o7 <== NOT EXECUTED
2045a94: 80 a3 e0 01 cmp %o7, 1 <== NOT EXECUTED
2045a98: 12 bf ff f6 bne 2045a70 <msdos_dir_read+0x47c> <== NOT EXECUTED
2045a9c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2045aa0: 86 00 e0 20 add %g3, 0x20, %g3 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
2045aa4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2045aa8: 12 bf ff f5 bne 2045a7c <msdos_dir_read+0x488> <== NOT EXECUTED
2045aac: c6 29 20 14 stb %g3, [ %g4 + 0x14 ] <== NOT EXECUTED
2045ab0: 86 07 be d0 add %fp, -304, %g3 <== NOT EXECUTED
2045ab4: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
2045ab8: 10 bf ff af b 2045974 <msdos_dir_read+0x380> <== NOT EXECUTED
2045abc: 82 00 60 14 add %g1, 0x14, %g1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
2045ac0: 96 00 60 01 add %g1, 1, %o3 <== NOT EXECUTED
2045ac4: 9e 10 20 2e mov 0x2e, %o7 <== NOT EXECUTED
2045ac8: de 28 40 00 stb %o7, [ %g1 ] <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2045acc: 03 00 81 c1 sethi %hi(0x2070400), %g1 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
2045ad0: 86 03 20 01 add %o4, 1, %g3 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2045ad4: da 00 62 38 ld [ %g1 + 0x238 ], %o5 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
2045ad8: 84 00 80 03 add %g2, %g3, %g2 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2045adc: 94 03 3f ff add %o4, -1, %o2 <== 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)
2045ae0: 9e 05 80 0c add %l6, %o4, %o7 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
2045ae4: 10 80 00 06 b 2045afc <msdos_dir_read+0x508> <== NOT EXECUTED
2045ae8: 82 10 00 0b mov %o3, %g1 <== NOT EXECUTED
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
2045aec: c6 28 40 00 stb %g3, [ %g1 ] <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2045af0: 80 a5 80 0f cmp %l6, %o7 <== NOT EXECUTED
2045af4: 02 80 00 0e be 2045b2c <msdos_dir_read+0x538> <== NOT EXECUTED
2045af8: 82 00 60 01 inc %g1 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
2045afc: c6 0d a0 08 ldub [ %l6 + 8 ], %g3 <== NOT EXECUTED
2045b00: 88 03 40 03 add %o5, %g3, %g4 <== NOT EXECUTED
2045b04: c8 09 20 01 ldub [ %g4 + 1 ], %g4 <== NOT EXECUTED
2045b08: 88 09 20 03 and %g4, 3, %g4 <== NOT EXECUTED
2045b0c: 80 a1 20 01 cmp %g4, 1 <== NOT EXECUTED
2045b10: 12 bf ff f7 bne 2045aec <msdos_dir_read+0x4f8> <== NOT EXECUTED
2045b14: ac 05 a0 01 inc %l6 <== NOT EXECUTED
2045b18: 86 00 e0 20 add %g3, 0x20, %g3 <== NOT EXECUTED
2045b1c: c6 28 40 00 stb %g3, [ %g1 ] <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2045b20: 80 a5 80 0f cmp %l6, %o7 <== NOT EXECUTED
2045b24: 12 bf ff f6 bne 2045afc <msdos_dir_read+0x508> <== NOT EXECUTED
2045b28: 82 00 60 01 inc %g1 <== 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)
2045b2c: 84 00 a0 01 inc %g2 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
2045b30: 82 02 c0 0c add %o3, %o4, %g1 <== 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)
2045b34: 10 bf ff 9c b 20459a4 <msdos_dir_read+0x3b0> <== NOT EXECUTED
2045b38: 84 00 80 0a add %g2, %o2, %g2 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
2045b3c: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
2045b40: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
*/
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
rtems_semaphore_release(fs_info->vol_sema);
2045b44: 7f ff 20 5e call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045b48: c2 27 be c8 st %g1, [ %fp + -312 ] <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
2045b4c: 40 00 05 e8 call 20472ec <__errno> <== NOT EXECUTED
2045b50: 01 00 00 00 nop <== NOT EXECUTED
2045b54: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2045b58: c2 07 be c8 ld [ %fp + -312 ], %g1 <== NOT EXECUTED
2045b5c: 10 bf ff a6 b 20459f4 <msdos_dir_read+0x400> <== NOT EXECUTED
2045b60: c4 22 00 00 st %g2, [ %o0 ] <== 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)
2045b64: 10 bf fe ff b 2045760 <msdos_dir_read+0x16c> <== NOT EXECUTED
2045b68: 82 10 20 00 clr %g1 <== NOT EXECUTED
fs_info->fat.vol.bpc;
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);
2045b6c: 40 00 05 e0 call 20472ec <__errno> <== NOT EXECUTED
2045b70: 01 00 00 00 nop <== NOT EXECUTED
2045b74: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2045b78: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
2045b7c: 10 bf ff 9e b 20459f4 <msdos_dir_read+0x400> <== NOT EXECUTED
2045b80: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED
02045be4 <msdos_dir_stat>:
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
2045be4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
2045be8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
2045bec: f8 06 20 08 ld [ %i0 + 8 ], %i4
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;
2045bf0: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045bf4: 92 10 20 00 clr %o1
2045bf8: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
2045bfc: 7f ff 1f e6 call 200db94 <rtems_semaphore_obtain>
2045c00: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045c04: 80 a2 20 00 cmp %o0, 0
2045c08: 12 80 00 1a bne 2045c70 <msdos_dir_stat+0x8c> <== NEVER TAKEN
2045c0c: 01 00 00 00 nop
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
2045c10: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
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;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
2045c14: f0 17 40 00 lduh [ %i5 ], %i0
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);
2045c18: c4 18 40 00 ldd [ %g1 ], %g2
buf->st_ino = fat_fd->ino;
2045c1c: de 07 20 0c ld [ %i4 + 0xc ], %o7
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
2045c20: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
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;
2045c24: c8 07 20 40 ld [ %i4 + 0x40 ], %g4
rtems_semaphore_release(fs_info->vol_sema);
2045c28: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
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);
2045c2c: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
2045c30: 05 00 00 10 sethi %hi(0x4000), %g2
2045c34: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 41ff <PROM_START+0x41ff>
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
2045c38: bb 30 60 09 srl %g1, 9, %i5
buf->st_blksize = fs_info->fat.vol.bps;
2045c3c: f0 26 60 40 st %i0, [ %i1 + 0x40 ]
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;
2045c40: de 26 60 08 st %o7, [ %i1 + 8 ]
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
2045c44: c0 26 60 18 clr [ %i1 + 0x18 ]
2045c48: c0 26 60 1c clr [ %i1 + 0x1c ]
buf->st_size = fat_fd->fat_file_size;
2045c4c: c0 26 60 20 clr [ %i1 + 0x20 ]
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;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
2045c50: c4 26 60 0c st %g2, [ %i1 + 0xc ]
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
2045c54: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
2045c58: fa 26 60 44 st %i5, [ %i1 + 0x44 ]
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
2045c5c: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
rtems_semaphore_release(fs_info->vol_sema);
2045c60: 7f ff 20 17 call 200dcbc <rtems_semaphore_release>
2045c64: b0 10 20 00 clr %i0
return RC_OK;
}
2045c68: 81 c7 e0 08 ret
2045c6c: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = loc->node_access;
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);
2045c70: 40 00 05 9f call 20472ec <__errno> <== NOT EXECUTED
2045c74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045c78: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045c7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045c80: 81 c7 e0 08 ret <== NOT EXECUTED
2045c84: 81 e8 00 00 restore <== NOT EXECUTED
02045c88 <msdos_dir_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set apropriately).
*/
int
msdos_dir_sync(rtems_libio_t *iop)
{
2045c88: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045c8c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
int
msdos_dir_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2045c90: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045c94: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045c98: 92 10 20 00 clr %o1 <== NOT EXECUTED
2045c9c: d0 07 60 90 ld [ %i5 + 0x90 ], %o0 <== NOT EXECUTED
2045ca0: 7f ff 1f bd call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
2045ca4: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045ca8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2045cac: 12 80 00 0a bne 2045cd4 <msdos_dir_sync+0x4c> <== NOT EXECUTED
2045cb0: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
2045cb4: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
2045cb8: 7f ff 8b 95 call 2028b0c <fat_file_datasync> <== NOT EXECUTED
2045cbc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2045cc0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
2045cc4: 7f ff 1f fe call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045cc8: d0 07 60 90 ld [ %i5 + 0x90 ], %o0 <== NOT EXECUTED
return rc;
}
2045ccc: 81 c7 e0 08 ret <== NOT EXECUTED
2045cd0: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
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);
2045cd4: 40 00 05 86 call 20472ec <__errno> <== NOT EXECUTED
2045cd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045cdc: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045ce0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045ce4: 81 c7 e0 08 ret <== NOT EXECUTED
2045ce8: 81 e8 00 00 restore <== NOT EXECUTED
020384e0 <msdos_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
20384e0: 9d e3 bf a0 save %sp, -96, %sp
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
20384e4: 80 a6 e0 01 cmp %i3, 1
20384e8: 02 80 00 17 be 2038544 <msdos_eval_token+0x64>
20384ec: ba 10 00 18 mov %i0, %i5
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
} else {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc(ctx);
int rc = msdos_find_name(currentloc, token, tokenlen);
20384f0: 90 07 60 18 add %i5, 0x18, %o0
20384f4: 92 10 00 1a mov %i2, %o1
20384f8: 40 00 06 23 call 2039d84 <msdos_find_name>
20384fc: 94 10 00 1b mov %i3, %o2
if (rc == RC_OK) {
2038500: 80 a2 20 00 cmp %o0, 0
2038504: 12 80 00 17 bne 2038560 <msdos_eval_token+0x80>
2038508: 03 00 00 1f sethi %hi(0x7c00), %g1
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)
203850c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
2038510: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
2038514: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
2038518: c0 27 60 0c clr [ %i5 + 0xc ]
203851c: 80 a0 a0 00 cmp %g2, 0
2038520: 12 80 00 1a bne 2038588 <msdos_eval_token+0xa8>
2038524: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
loc->handlers = fs_info->directory_handlers;
2038528: c2 00 60 88 ld [ %g1 + 0x88 ], %g1
203852c: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
2038530: c2 07 60 04 ld [ %i5 + 4 ], %g1
2038534: 80 a0 00 01 cmp %g0, %g1
2038538: b0 60 3f ff subx %g0, -1, %i0
203853c: 81 c7 e0 08 ret
2038540: 81 e8 00 00 restore
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
2038544: c2 4e 80 00 ldsb [ %i2 ], %g1
2038548: 80 a0 60 2e cmp %g1, 0x2e
203854c: 12 bf ff ea bne 20384f4 <msdos_eval_token+0x14>
2038550: 90 07 60 18 add %i5, 0x18, %o0
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
2038554: c0 26 20 0c clr [ %i0 + 0xc ]
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
2038558: 81 c7 e0 08 ret
203855c: 91 e8 20 00 restore %g0, 0, %o0
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) {
2038560: 82 10 61 01 or %g1, 0x101, %g1
2038564: 80 a2 00 01 cmp %o0, %g1
2038568: 02 bf ff f5 be 203853c <msdos_eval_token+0x5c> <== ALWAYS TAKEN
203856c: b0 10 20 02 mov 2, %i0
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
} else {
rtems_filesystem_eval_path_error(ctx, 0);
2038570: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2038574: 92 10 20 00 clr %o1 <== NOT EXECUTED
2038578: 7f ff 48 4a call 200a6a0 <rtems_filesystem_eval_path_error><== NOT EXECUTED
203857c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
}
}
return status;
}
2038580: 81 c7 e0 08 ret <== NOT EXECUTED
2038584: 81 e8 00 00 restore <== NOT EXECUTED
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;
2038588: c2 00 60 8c ld [ %g1 + 0x8c ], %g1
203858c: 10 bf ff e9 b 2038530 <msdos_eval_token+0x50>
2038590: c2 27 60 28 st %g1, [ %i5 + 0x28 ]
02045d88 <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)
{
2045d88: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045d8c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2045d90: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
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;
2045d94: f6 00 60 20 ld [ %g1 + 0x20 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045d98: 92 10 20 00 clr %o1
2045d9c: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
2045da0: 94 10 20 00 clr %o2
2045da4: 7f ff 1f 7c call 200db94 <rtems_semaphore_obtain>
2045da8: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045dac: 80 a2 20 00 cmp %o0, 0
2045db0: 12 80 00 24 bne 2045e40 <msdos_file_close+0xb8> <== NEVER TAKEN
2045db4: 01 00 00 00 nop
/*
* 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))
2045db8: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
2045dbc: 80 88 60 01 btst 1, %g1
2045dc0: 32 80 00 15 bne,a 2045e14 <msdos_file_close+0x8c> <== NEVER TAKEN
2045dc4: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
2045dc8: d0 06 20 34 ld [ %i0 + 0x34 ], %o0
2045dcc: 7f ff ca ef call 2038988 <msdos_set_first_cluster_num>
2045dd0: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
2045dd4: b0 92 20 00 orcc %o0, 0, %i0
2045dd8: 12 80 00 16 bne 2045e30 <msdos_file_close+0xa8> <== NEVER TAKEN
2045ddc: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
2045de0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
2045de4: 7f ff cb 21 call 2038a68 <msdos_set_file_size>
2045de8: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
2045dec: b0 92 20 00 orcc %o0, 0, %i0
2045df0: 12 80 00 10 bne 2045e30 <msdos_file_close+0xa8> <== NEVER TAKEN
2045df4: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
2045df8: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
2045dfc: 7f ff ca 9f call 2038878 <msdos_set_dir_wrt_time_and_date>
2045e00: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
2045e04: b0 92 20 00 orcc %o0, 0, %i0
2045e08: 12 80 00 0a bne 2045e30 <msdos_file_close+0xa8> <== NEVER TAKEN
2045e0c: 01 00 00 00 nop
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
2045e10: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
2045e14: 7f ff 89 97 call 2028470 <fat_file_close>
2045e18: 92 10 00 1c mov %i4, %o1
2045e1c: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release(fs_info->vol_sema);
2045e20: 7f ff 1f a7 call 200dcbc <rtems_semaphore_release>
2045e24: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
return rc;
}
2045e28: 81 c7 e0 08 ret
2045e2c: 81 e8 00 00 restore
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2045e30: 7f ff 1f a3 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045e34: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
return rc;
2045e38: 81 c7 e0 08 ret <== NOT EXECUTED
2045e3c: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
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);
2045e40: 40 00 05 2b call 20472ec <__errno> <== NOT EXECUTED
2045e44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045e48: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045e4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045e50: 81 c7 e0 08 ret <== NOT EXECUTED
2045e54: 81 e8 00 00 restore <== NOT EXECUTED
020462f0 <msdos_file_datasync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
20462f0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20462f4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
*/
int
msdos_file_datasync(rtems_libio_t *iop)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
20462f8: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
20462fc: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2046300: 92 10 20 00 clr %o1 <== NOT EXECUTED
2046304: d0 07 60 90 ld [ %i5 + 0x90 ], %o0 <== NOT EXECUTED
2046308: 7f ff 1e 23 call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
204630c: 94 10 20 00 clr %o2 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2046310: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2046314: 12 80 00 0a bne 204633c <msdos_file_datasync+0x4c> <== NOT EXECUTED
2046318: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
204631c: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
2046320: 7f ff 89 fb call 2028b0c <fat_file_datasync> <== NOT EXECUTED
2046324: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
2046328: d0 07 60 90 ld [ %i5 + 0x90 ], %o0 <== NOT EXECUTED
204632c: 7f ff 1e 64 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2046330: b0 10 20 00 clr %i0 <== NOT EXECUTED
return RC_OK;
}
2046334: 81 c7 e0 08 ret <== NOT EXECUTED
2046338: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
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);
204633c: 40 00 03 ec call 20472ec <__errno> <== NOT EXECUTED
2046340: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2046344: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2046348: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
204634c: 81 c7 e0 08 ret <== NOT EXECUTED
2046350: 81 e8 00 00 restore <== NOT EXECUTED
02046144 <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)
{
2046144: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2046148: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
204614c: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
if (length >= fat_fd->fat_file_size)
2046150: 84 10 20 00 clr %g2
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;
2046154: f6 00 60 20 ld [ %g1 + 0x20 ], %i3
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
2046158: ba 10 00 18 mov %i0, %i5
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;
if (length >= fat_fd->fat_file_size)
204615c: 80 a0 80 19 cmp %g2, %i1
2046160: 14 80 00 09 bg 2046184 <msdos_file_ftruncate+0x40> <== NEVER TAKEN
2046164: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
2046168: 80 a0 80 19 cmp %g2, %i1
204616c: 02 80 00 04 be 204617c <msdos_file_ftruncate+0x38> <== ALWAYS TAKEN
2046170: 80 a0 40 1a cmp %g1, %i2
if (length < fat_fd->fat_file_size)
iop->size = fat_fd->fat_file_size = length;
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
}
2046174: 81 c7 e0 08 ret
2046178: 91 e8 20 00 restore %g0, 0, %o0
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;
if (length >= fat_fd->fat_file_size)
204617c: 08 bf ff fe bleu 2046174 <msdos_file_ftruncate+0x30>
2046180: 01 00 00 00 nop
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2046184: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
2046188: 92 10 20 00 clr %o1
204618c: 7f ff 1e 82 call 200db94 <rtems_semaphore_obtain>
2046190: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2046194: 80 a2 20 00 cmp %o0, 0
2046198: 12 80 00 16 bne 20461f0 <msdos_file_ftruncate+0xac> <== NEVER TAKEN
204619c: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
20461a0: d0 07 60 34 ld [ %i5 + 0x34 ], %o0
20461a4: 7f ff 88 6f call 2028360 <fat_file_truncate>
20461a8: 94 10 00 1a mov %i2, %o2
if (rc != RC_OK)
20461ac: b0 92 20 00 orcc %o0, 0, %i0
20461b0: 12 80 00 0c bne 20461e0 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
20461b4: 80 a6 00 19 cmp %i0, %i1
/*
* fat_file_truncate do nothing if new length >= fat-file size, so update
* file size only if length < fat-file size
*/
if (length < fat_fd->fat_file_size)
20461b8: 14 80 00 07 bg 20461d4 <msdos_file_ftruncate+0x90> <== NEVER TAKEN
20461bc: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
20461c0: 80 a6 00 19 cmp %i0, %i1
20461c4: 12 80 00 07 bne 20461e0 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
20461c8: 80 a0 40 1a cmp %g1, %i2
20461cc: 08 80 00 05 bleu 20461e0 <msdos_file_ftruncate+0x9c> <== NEVER TAKEN
20461d0: 01 00 00 00 nop
iop->size = fat_fd->fat_file_size = length;
20461d4: f4 27 20 18 st %i2, [ %i4 + 0x18 ]
20461d8: c0 27 60 08 clr [ %i5 + 8 ]
20461dc: f4 27 60 0c st %i2, [ %i5 + 0xc ]
rtems_semaphore_release(fs_info->vol_sema);
20461e0: 7f ff 1e b7 call 200dcbc <rtems_semaphore_release>
20461e4: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
return RC_OK;
20461e8: 81 c7 e0 08 ret
20461ec: 81 e8 00 00 restore
return RC_OK;
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);
20461f0: 40 00 04 3f call 20472ec <__errno> <== NOT EXECUTED
20461f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20461f8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20461fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2046200: 81 c7 e0 08 ret <== NOT EXECUTED
2046204: 81 e8 00 00 restore <== NOT EXECUTED
02045fa4 <msdos_file_lseek>:
* new offset on success, or -1 if error occured (errno set
* appropriately).
*/
off_t
msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
2045fa4: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045fa8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
if (iop->offset < 0 || iop->offset > UINT32_MAX) {
2045fac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
{
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;
uint32_t real_size = 0;
2045fb0: c0 27 bf fc clr [ %fp + -4 ]
off_t
msdos_file_lseek(rtems_libio_t *iop, off_t offset, int whence)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045fb4: f8 00 a0 20 ld [ %g2 + 0x20 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
if (iop->offset < 0 || iop->offset > UINT32_MAX) {
2045fb8: 80 a0 60 00 cmp %g1, 0
2045fbc: 12 80 00 2b bne 2046068 <msdos_file_lseek+0xc4>
2045fc0: fa 06 20 24 ld [ %i0 + 0x24 ], %i5
rtems_set_errno_and_return_minus_one(EINVAL);
}
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045fc4: d0 07 20 90 ld [ %i4 + 0x90 ], %o0
2045fc8: 92 10 20 00 clr %o1
2045fcc: 7f ff 1e f2 call 200db94 <rtems_semaphore_obtain>
2045fd0: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045fd4: 80 a2 20 00 cmp %o0, 0
2045fd8: 12 80 00 2b bne 2046084 <msdos_file_lseek+0xe0> <== NEVER TAKEN
2045fdc: 92 10 00 1d mov %i5, %o1
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
2045fe0: d0 06 20 34 ld [ %i0 + 0x34 ], %o0
2045fe4: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2045fe8: 7f ff 89 8b call 2028614 <fat_file_extend>
2045fec: 96 07 bf fc add %fp, -4, %o3
&real_size);
if (rc != RC_OK)
2045ff0: b6 92 20 00 orcc %o0, 0, %i3
2045ff4: 12 80 00 17 bne 2046050 <msdos_file_lseek+0xac> <== NEVER TAKEN
2045ff8: c2 07 bf fc ld [ %fp + -4 ], %g1
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
2045ffc: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
2046000: 80 a0 80 01 cmp %g2, %g1
2046004: 2a 80 00 0a bcs,a 204602c <msdos_file_lseek+0x88> <== NEVER TAKEN
2046008: c2 26 20 14 st %g1, [ %i0 + 0x14 ] <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
204600c: d0 07 20 90 ld [ %i4 + 0x90 ], %o0
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
2046010: 82 10 00 02 mov %g2, %g1
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
2046014: c0 26 20 08 clr [ %i0 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
2046018: 7f ff 1f 29 call 200dcbc <rtems_semaphore_release>
204601c: c2 26 20 0c st %g1, [ %i0 + 0xc ]
return iop->offset;
2046020: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0
}
2046024: 81 c7 e0 08 ret
2046028: 81 e8 00 00 restore
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
204602c: d0 07 20 90 ld [ %i4 + 0x90 ], %o0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
2046030: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
2046034: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
2046038: c2 26 20 0c st %g1, [ %i0 + 0xc ] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
204603c: 7f ff 1f 20 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2046040: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED
return iop->offset;
2046044: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
}
2046048: 81 c7 e0 08 ret <== NOT EXECUTED
204604c: 81 e8 00 00 restore <== NOT EXECUTED
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
&real_size);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2046050: d0 07 20 90 ld [ %i4 + 0x90 ], %o0 <== NOT EXECUTED
2046054: 7f ff 1f 1a call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2046058: b2 10 00 1b mov %i3, %i1 <== NOT EXECUTED
return rc;
204605c: b1 3e e0 1f sra %i3, 0x1f, %i0 <== NOT EXECUTED
2046060: 81 c7 e0 08 ret <== NOT EXECUTED
2046064: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t real_size = 0;
if (iop->offset < 0 || iop->offset > UINT32_MAX) {
rtems_set_errno_and_return_minus_one(EINVAL);
2046068: 40 00 04 a1 call 20472ec <__errno>
204606c: 31 3f ff ff sethi %hi(0xfffffc00), %i0
2046070: 82 10 20 16 mov 0x16, %g1
2046074: b0 16 23 ff or %i0, 0x3ff, %i0
2046078: c2 22 00 00 st %g1, [ %o0 ]
204607c: 81 c7 e0 08 ret
2046080: 93 e8 00 18 restore %g0, %i0, %o1
}
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);
2046084: 40 00 04 9a call 20472ec <__errno> <== NOT EXECUTED
2046088: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
204608c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2046090: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
2046094: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2046098: 81 c7 e0 08 ret <== NOT EXECUTED
204609c: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
02045cec <msdos_file_open>:
* and errno set appropriately
*/
int
msdos_file_open(rtems_libio_t *iop, const char *pathname, int oflag,
mode_t mode)
{
2045cec: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045cf0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2045cf4: f6 06 20 24 ld [ %i0 + 0x24 ], %i3
msdos_file_open(rtems_libio_t *iop, const char *pathname, int oflag,
mode_t mode)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045cf8: f8 00 60 20 ld [ %g1 + 0x20 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045cfc: 92 10 20 00 clr %o1
2045d00: d0 07 20 90 ld [ %i4 + 0x90 ], %o0
2045d04: 94 10 20 00 clr %o2
2045d08: 7f ff 1f a3 call 200db94 <rtems_semaphore_obtain>
2045d0c: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045d10: 80 a2 20 00 cmp %o0, 0
2045d14: 12 80 00 17 bne 2045d70 <msdos_file_open+0x84> <== NEVER TAKEN
2045d18: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
2045d1c: 7f ff 89 05 call 2028130 <fat_file_reopen>
2045d20: 90 10 00 1b mov %i3, %o0
if (rc != RC_OK)
2045d24: b0 92 20 00 orcc %o0, 0, %i0
2045d28: 12 80 00 0e bne 2045d60 <msdos_file_open+0x74> <== NEVER TAKEN
2045d2c: 01 00 00 00 nop
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
2045d30: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2045d34: 80 88 62 00 btst 0x200, %g1
2045d38: 02 80 00 04 be 2045d48 <msdos_file_open+0x5c>
2045d3c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
iop->offset = fat_fd->fat_file_size;
2045d40: c0 27 60 10 clr [ %i5 + 0x10 ]
2045d44: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
2045d48: d0 07 20 90 ld [ %i4 + 0x90 ], %o0
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
iop->size = fat_fd->fat_file_size;
2045d4c: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
2045d50: 7f ff 1f db call 200dcbc <rtems_semaphore_release>
2045d54: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return RC_OK;
}
2045d58: 81 c7 e0 08 ret
2045d5c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(EIO);
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
2045d60: 7f ff 1f d7 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045d64: d0 07 20 90 ld [ %i4 + 0x90 ], %o0 <== NOT EXECUTED
return rc;
2045d68: 81 c7 e0 08 ret <== NOT EXECUTED
2045d6c: 81 e8 00 00 restore <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
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);
2045d70: 40 00 05 5f call 20472ec <__errno> <== NOT EXECUTED
2045d74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045d78: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045d7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045d80: 81 c7 e0 08 ret <== NOT EXECUTED
2045d84: 81 e8 00 00 restore <== NOT EXECUTED
02045e58 <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)
{
2045e58: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045e5c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2045e60: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
ssize_t
msdos_file_read(rtems_libio_t *iop, void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045e64: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045e68: 92 10 20 00 clr %o1
2045e6c: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
2045e70: 7f ff 1f 49 call 200db94 <rtems_semaphore_obtain>
2045e74: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045e78: 80 a2 20 00 cmp %o0, 0
2045e7c: 12 80 00 0c bne 2045eac <msdos_file_read+0x54> <== NEVER TAKEN
2045e80: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
2045e84: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2045e88: d0 06 20 34 ld [ %i0 + 0x34 ], %o0
2045e8c: 96 10 00 1a mov %i2, %o3
2045e90: 7f ff 88 ae call 2028148 <fat_file_read>
2045e94: 98 10 00 19 mov %i1, %o4
2045e98: b0 10 00 08 mov %o0, %i0
buffer);
rtems_semaphore_release(fs_info->vol_sema);
2045e9c: 7f ff 1f 88 call 200dcbc <rtems_semaphore_release>
2045ea0: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
return ret;
}
2045ea4: 81 c7 e0 08 ret
2045ea8: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
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);
2045eac: 40 00 05 10 call 20472ec <__errno> <== NOT EXECUTED
2045eb0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045eb4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045eb8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045ebc: 81 c7 e0 08 ret <== NOT EXECUTED
2045ec0: 81 e8 00 00 restore <== NOT EXECUTED
020460a0 <msdos_file_stat>:
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
20460a0: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
20460a4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
fat_file_fd_t *fat_fd = loc->node_access;
20460a8: f8 06 20 08 ld [ %i0 + 8 ], %i4
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;
20460ac: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
20460b0: 92 10 20 00 clr %o1
20460b4: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
20460b8: 7f ff 1e b7 call 200db94 <rtems_semaphore_obtain>
20460bc: 94 10 20 00 clr %o2
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20460c0: 80 a2 20 00 cmp %o0, 0
20460c4: 12 80 00 1a bne 204612c <msdos_file_stat+0x8c> <== NEVER TAKEN
20460c8: 01 00 00 00 nop
20460cc: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
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 >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
20460d0: f0 17 40 00 lduh [ %i5 ], %i0
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);
20460d4: c4 18 40 00 ldd [ %g1 ], %g2
buf->st_ino = fat_fd->ino;
20460d8: de 07 20 0c ld [ %i4 + 0xc ], %o7
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
20460dc: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
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;
20460e0: c8 07 20 40 ld [ %i4 + 0x40 ], %g4
rtems_semaphore_release(fs_info->vol_sema);
20460e4: d0 07 60 90 ld [ %i5 + 0x90 ], %o0
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);
20460e8: c4 3e 40 00 std %g2, [ %i1 ]
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
20460ec: 05 00 00 20 sethi %hi(0x8000), %g2
20460f0: 84 10 a1 ff or %g2, 0x1ff, %g2 ! 81ff <PROM_START+0x81ff>
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
20460f4: bb 30 60 09 srl %g1, 9, %i5
buf->st_blksize = fs_info->fat.vol.bps;
20460f8: f0 26 60 40 st %i0, [ %i1 + 0x40 ]
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;
20460fc: de 26 60 08 st %o7, [ %i1 + 8 ]
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
2046100: c0 26 60 18 clr [ %i1 + 0x18 ]
2046104: c0 26 60 1c clr [ %i1 + 0x1c ]
buf->st_size = fat_fd->fat_file_size;
2046108: c0 26 60 20 clr [ %i1 + 0x20 ]
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;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
204610c: c4 26 60 0c st %g2, [ %i1 + 0xc ]
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
2046110: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
2046114: fa 26 60 44 st %i5, [ %i1 + 0x44 ]
buf->st_blksize = fs_info->fat.vol.bps;
buf->st_mtime = fat_fd->mtime;
2046118: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
rtems_semaphore_release(fs_info->vol_sema);
204611c: 7f ff 1e e8 call 200dcbc <rtems_semaphore_release>
2046120: b0 10 20 00 clr %i0
return RC_OK;
}
2046124: 81 c7 e0 08 ret
2046128: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = loc->node_access;
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);
204612c: 40 00 04 70 call 20472ec <__errno> <== NOT EXECUTED
2046130: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2046134: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2046138: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
204613c: 81 c7 e0 08 ret <== NOT EXECUTED
2046140: 81 e8 00 00 restore <== NOT EXECUTED
02046208 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
2046208: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
204620c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
int
msdos_file_sync(rtems_libio_t *iop)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2046210: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2046214: f6 00 60 20 ld [ %g1 + 0x20 ], %i3 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2046218: 92 10 20 00 clr %o1 <== NOT EXECUTED
204621c: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
2046220: 94 10 20 00 clr %o2 <== NOT EXECUTED
2046224: 7f ff 1e 5c call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
2046228: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
204622c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2046230: 12 80 00 2a bne 20462d8 <msdos_file_sync+0xd0> <== NOT EXECUTED
2046234: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
2046238: d0 06 20 34 ld [ %i0 + 0x34 ], %o0 <== NOT EXECUTED
204623c: 7f ff 8a 34 call 2028b0c <fat_file_datasync> <== NOT EXECUTED
2046240: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
2046244: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2046248: 12 80 00 20 bne 20462c8 <msdos_file_sync+0xc0> <== NOT EXECUTED
204624c: 01 00 00 00 nop <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
2046250: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1 <== NOT EXECUTED
2046254: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2046258: 12 80 00 14 bne 20462a8 <msdos_file_sync+0xa0> <== NOT EXECUTED
204625c: 01 00 00 00 nop <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
2046260: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
2046264: 7f ff c9 c9 call 2038988 <msdos_set_first_cluster_num> <== NOT EXECUTED
2046268: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
204626c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2046270: 32 80 00 12 bne,a 20462b8 <msdos_file_sync+0xb0> <== NOT EXECUTED
2046274: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
2046278: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
204627c: 7f ff c9 fb call 2038a68 <msdos_set_file_size> <== NOT EXECUTED
2046280: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
2046284: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2046288: 32 80 00 0c bne,a 20462b8 <msdos_file_sync+0xb0> <== NOT EXECUTED
204628c: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
2046290: d0 07 60 34 ld [ %i5 + 0x34 ], %o0 <== NOT EXECUTED
2046294: 7f ff c9 79 call 2038878 <msdos_set_dir_wrt_time_and_date><== NOT EXECUTED
2046298: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (rc != RC_OK)
204629c: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
20462a0: 32 80 00 06 bne,a 20462b8 <msdos_file_sync+0xb0> <== NOT EXECUTED
20462a4: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rtems_semaphore_release(fs_info->vol_sema);
20462a8: 7f ff 1e 85 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20462ac: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
return RC_OK;
}
20462b0: 81 c7 e0 08 ret <== NOT EXECUTED
20462b4: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
20462b8: 7f ff 1e 81 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20462bc: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
return rc;
20462c0: 81 c7 e0 08 ret <== NOT EXECUTED
20462c4: 81 e8 00 00 restore <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
if (rc != RC_OK)
{
rtems_semaphore_release(fs_info->vol_sema);
20462c8: 7f ff 1e 7d call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20462cc: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
return rc;
20462d0: 81 c7 e0 08 ret <== NOT EXECUTED
20462d4: 81 e8 00 00 restore <== NOT EXECUTED
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
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);
20462d8: 40 00 04 05 call 20472ec <__errno> <== NOT EXECUTED
20462dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20462e0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20462e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20462e8: 81 c7 e0 08 ret <== NOT EXECUTED
20462ec: 81 e8 00 00 restore <== NOT EXECUTED
02045ec4 <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)
{
2045ec4: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045ec8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
2045ecc: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
2045ed0: f6 00 60 20 ld [ %g1 + 0x20 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
2045ed4: 92 10 20 00 clr %o1
2045ed8: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
2045edc: 94 10 20 00 clr %o2
2045ee0: 7f ff 1f 2d call 200db94 <rtems_semaphore_obtain>
2045ee4: ba 10 00 18 mov %i0, %i5
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2045ee8: 80 a2 20 00 cmp %o0, 0
2045eec: 12 80 00 23 bne 2045f78 <msdos_file_write+0xb4> <== NEVER TAKEN
2045ef0: 92 10 00 1c mov %i4, %o1
rtems_set_errno_and_return_minus_one(EIO);
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
2045ef4: d0 06 20 34 ld [ %i0 + 0x34 ], %o0
2045ef8: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2045efc: 96 10 00 1a mov %i2, %o3
2045f00: 7f ff 8a 3e call 20287f8 <fat_file_write>
2045f04: 98 10 00 19 mov %i1, %o4
buffer);
if (ret < 0)
2045f08: b0 92 20 00 orcc %o0, 0, %i0
2045f0c: 06 80 00 21 bl 2045f90 <msdos_file_write+0xcc> <== NEVER TAKEN
2045f10: 85 3e 20 1f sra %i0, 0x1f, %g2
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
2045f14: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
2045f18: 86 83 40 18 addcc %o5, %i0, %g3
2045f1c: 84 43 00 02 addx %o4, %g2, %g2
2045f20: 80 a0 a0 00 cmp %g2, 0
2045f24: 04 80 00 0a ble 2045f4c <msdos_file_write+0x88> <== ALWAYS TAKEN
2045f28: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
fat_fd->fat_file_size = iop->offset + ret;
2045f2c: 82 06 00 0d add %i0, %o5, %g1 <== NOT EXECUTED
2045f30: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
2045f34: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
2045f38: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
2045f3c: 7f ff 1f 60 call 200dcbc <rtems_semaphore_release>
2045f40: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return ret;
}
2045f44: 81 c7 e0 08 ret
2045f48: 81 e8 00 00 restore
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
2045f4c: 32 bf ff fb bne,a 2045f38 <msdos_file_write+0x74> <== NEVER TAKEN
2045f50: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
2045f54: 80 a0 c0 01 cmp %g3, %g1
2045f58: 38 bf ff f6 bgu,a 2045f30 <msdos_file_write+0x6c>
2045f5c: 82 06 00 0d add %i0, %o5, %g1
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
rtems_semaphore_release(fs_info->vol_sema);
2045f60: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0
* file was extended
*/
if (iop->offset + ret > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset + ret;
iop->size = fat_fd->fat_file_size;
2045f64: c0 27 60 08 clr [ %i5 + 8 ]
rtems_semaphore_release(fs_info->vol_sema);
2045f68: 7f ff 1f 55 call 200dcbc <rtems_semaphore_release>
2045f6c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
return ret;
}
2045f70: 81 c7 e0 08 ret
2045f74: 81 e8 00 00 restore
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
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);
2045f78: 40 00 04 dd call 20472ec <__errno> <== NOT EXECUTED
2045f7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2045f80: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2045f84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2045f88: 81 c7 e0 08 ret <== NOT EXECUTED
2045f8c: 81 e8 00 00 restore <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
buffer);
if (ret < 0)
{
rtems_semaphore_release(fs_info->vol_sema);
2045f90: d0 06 e0 90 ld [ %i3 + 0x90 ], %o0 <== NOT EXECUTED
2045f94: 7f ff 1f 4a call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2045f98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
2045f9c: 81 c7 e0 08 ret <== NOT EXECUTED
2045fa0: 81 e8 00 00 restore <== NOT EXECUTED
020452c4 <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
20452c4: 82 10 20 00 clr %g1
dn[i] = ' ';
20452c8: 84 10 20 20 mov 0x20, %g2
20452cc: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
20452d0: 82 00 60 01 inc %g1
20452d4: 80 a0 60 0b cmp %g1, 0xb
20452d8: 32 bf ff fe bne,a 20452d0 <msdos_filename_unix2dos+0xc>
20452dc: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
20452e0: c2 4a 00 00 ldsb [ %o0 ], %g1
20452e4: 82 18 60 2e xor %g1, 0x2e, %g1
20452e8: 80 a0 00 01 cmp %g0, %g1
20452ec: 82 60 3f ff subx %g0, -1, %g1
20452f0: 80 a2 60 01 cmp %o1, 1
20452f4: 02 80 00 6d be 20454a8 <msdos_filename_unix2dos+0x1e4>
20452f8: c4 0a 00 00 ldub [ %o0 ], %g2
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
20452fc: 80 a0 60 00 cmp %g1, 0
2045300: 12 80 00 72 bne 20454c8 <msdos_filename_unix2dos+0x204> <== NEVER TAKEN
2045304: 80 a2 60 02 cmp %o1, 2
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
2045308: 80 a2 60 00 cmp %o1, 0
204530c: 02 80 00 5c be 204547c <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
2045310: 80 a0 60 00 cmp %g1, 0
2045314: 32 80 00 61 bne,a 2045498 <msdos_filename_unix2dos+0x1d4><== NEVER TAKEN
2045318: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
* 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++) {
204531c: 84 88 a0 ff andcc %g2, 0xff, %g2
2045320: 02 80 00 25 be 20453b4 <msdos_filename_unix2dos+0xf0> <== NEVER TAKEN
2045324: 80 a0 a0 2e cmp %g2, 0x2e
2045328: 22 80 00 24 be,a 20453b8 <msdos_filename_unix2dos+0xf4> <== NEVER TAKEN
204532c: c2 0a 00 00 ldub [ %o0 ], %g1 <== NOT EXECUTED
if (msdos_map[c] == 0)
2045330: 07 00 81 b9 sethi %hi(0x206e400), %g3
2045334: 86 10 e1 08 or %g3, 0x108, %g3 ! 206e508 <msdos_map>
2045338: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
204533c: 80 88 a0 ff btst 0xff, %g2
2045340: 12 80 00 15 bne 2045394 <msdos_filename_unix2dos+0xd0>
2045344: 82 10 20 00 clr %g1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
2045348: 10 80 00 1c b 20453b8 <msdos_filename_unix2dos+0xf4>
204534c: c2 0a 00 00 ldub [ %o0 ], %g1
* 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++) {
2045350: 80 a0 60 07 cmp %g1, 7
2045354: 04 80 00 03 ble 2045360 <msdos_filename_unix2dos+0x9c>
2045358: 84 10 20 01 mov 1, %g2
204535c: 84 10 20 00 clr %g2
2045360: 80 88 a0 ff btst 0xff, %g2
2045364: 02 80 00 12 be 20453ac <msdos_filename_unix2dos+0xe8>
2045368: 80 a2 60 00 cmp %o1, 0
204536c: c4 0a 00 00 ldub [ %o0 ], %g2
2045370: 80 a0 a0 00 cmp %g2, 0
2045374: 02 80 00 10 be 20453b4 <msdos_filename_unix2dos+0xf0> <== NEVER TAKEN
2045378: 80 a0 a0 2e cmp %g2, 0x2e
204537c: 22 80 00 0f be,a 20453b8 <msdos_filename_unix2dos+0xf4>
2045380: c2 0a 00 00 ldub [ %o0 ], %g1
if (msdos_map[c] == 0)
2045384: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
2045388: 80 88 a0 ff btst 0xff, %g2
204538c: 22 80 00 0b be,a 20453b8 <msdos_filename_unix2dos+0xf4>
2045390: c2 0a 00 00 ldub [ %o0 ], %g1
break;
dn[i] = msdos_map[c];
2045394: c4 2a 80 01 stb %g2, [ %o2 + %g1 ]
un++;
2045398: 90 02 20 01 inc %o0
* 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++) {
204539c: 92 82 7f ff addcc %o1, -1, %o1
20453a0: 12 bf ff ec bne 2045350 <msdos_filename_unix2dos+0x8c>
20453a4: 82 00 60 01 inc %g1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
20453a8: 80 a2 60 00 cmp %o1, 0
20453ac: 02 80 00 34 be 204547c <msdos_filename_unix2dos+0x1b8>
20453b0: 01 00 00 00 nop
20453b4: c2 0a 00 00 ldub [ %o0 ], %g1
20453b8: 80 a0 60 00 cmp %g1, 0
20453bc: 02 80 00 30 be 204547c <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
20453c0: 80 a0 60 2e cmp %g1, 0x2e
un++;
20453c4: 90 02 20 01 inc %o0
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
20453c8: 02 80 00 0c be 20453f8 <msdos_filename_unix2dos+0x134>
20453cc: 92 02 7f ff add %o1, -1, %o1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
20453d0: 80 a2 60 00 cmp %o1, 0
20453d4: 02 80 00 2a be 204547c <msdos_filename_unix2dos+0x1b8>
20453d8: 01 00 00 00 nop
20453dc: c2 0a 00 00 ldub [ %o0 ], %g1
20453e0: 80 a0 60 00 cmp %g1, 0
20453e4: 02 80 00 26 be 204547c <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
20453e8: 92 02 7f ff add %o1, -1, %o1
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
20453ec: 80 a0 60 2e cmp %g1, 0x2e
20453f0: 12 bf ff f8 bne 20453d0 <msdos_filename_unix2dos+0x10c> <== ALWAYS TAKEN
20453f4: 90 02 20 01 inc %o0
/*
* 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++) {
20453f8: 80 a2 60 00 cmp %o1, 0
20453fc: 02 80 00 20 be 204547c <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
2045400: 01 00 00 00 nop
2045404: c2 0a 00 00 ldub [ %o0 ], %g1
2045408: 80 a0 60 00 cmp %g1, 0
204540c: 02 80 00 1c be 204547c <msdos_filename_unix2dos+0x1b8> <== NEVER TAKEN
2045410: 07 00 81 b9 sethi %hi(0x206e400), %g3
if (msdos_map[c] == 0)
2045414: 86 10 e1 08 or %g3, 0x108, %g3 ! 206e508 <msdos_map>
2045418: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2
204541c: 80 88 a0 ff btst 0xff, %g2
2045420: 12 80 00 13 bne 204546c <msdos_filename_unix2dos+0x1a8> <== NEVER TAKEN
2045424: 82 10 20 08 mov 8, %g1
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
2045428: 81 c3 e0 08 retl
204542c: 90 10 20 00 clr %o0
/*
* 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++) {
2045430: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED
2045434: 04 80 00 03 ble 2045440 <msdos_filename_unix2dos+0x17c> <== NOT EXECUTED
2045438: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
204543c: 84 10 20 00 clr %g2 <== NOT EXECUTED
2045440: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
2045444: 02 80 00 0e be 204547c <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
2045448: 01 00 00 00 nop <== NOT EXECUTED
204544c: c4 0a 20 01 ldub [ %o0 + 1 ], %g2 <== NOT EXECUTED
2045450: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2045454: 02 80 00 0a be 204547c <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
2045458: 90 02 20 01 inc %o0 <== NOT EXECUTED
if (msdos_map[c] == 0)
204545c: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2 <== NOT EXECUTED
2045460: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
2045464: 02 80 00 06 be 204547c <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
2045468: 01 00 00 00 nop <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
204546c: c4 2a 80 01 stb %g2, [ %o2 + %g1 ] <== NOT EXECUTED
/*
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
2045470: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
2045474: 12 bf ff ef bne 2045430 <msdos_filename_unix2dos+0x16c> <== NOT EXECUTED
2045478: 82 00 60 01 inc %g1 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
204547c: 81 c3 e0 08 retl
2045480: 90 10 20 00 clr %o0
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
2045484: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED
2045488: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED
204548c: 12 bf ff a4 bne 204531c <msdos_filename_unix2dos+0x58> <== NOT EXECUTED
2045490: c4 0a 00 00 ldub [ %o0 ], %g2 <== NOT EXECUTED
2045494: 92 82 7f ff addcc %o1, -1, %o1 <== NOT EXECUTED
2045498: 12 bf ff fb bne 2045484 <msdos_filename_unix2dos+0x1c0> <== NOT EXECUTED
204549c: 90 02 20 01 inc %o0 <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
20454a0: 81 c3 e0 08 retl <== NOT EXECUTED
20454a4: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
20454a8: 80 a0 60 00 cmp %g1, 0
20454ac: 02 bf ff 95 be 2045300 <msdos_filename_unix2dos+0x3c> <== ALWAYS TAKEN
20454b0: 01 00 00 00 nop
dn[0] = '.';
20454b4: 82 10 20 2e mov 0x2e, %g1 ! 2e <PROM_START+0x2e> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
20454b8: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
20454bc: c2 2a 80 00 stb %g1, [ %o2 ] <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
20454c0: 81 c3 e0 08 retl <== NOT EXECUTED
20454c4: 01 00 00 00 nop <== NOT EXECUTED
*/
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
20454c8: 12 bf ff 91 bne 204530c <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
20454cc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
20454d0: c6 4a 20 01 ldsb [ %o0 + 1 ], %g3 <== NOT EXECUTED
20454d4: 80 a0 e0 2e cmp %g3, 0x2e <== NOT EXECUTED
20454d8: 12 bf ff 8d bne 204530c <msdos_filename_unix2dos+0x48> <== NOT EXECUTED
20454dc: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
dn[0] = '.';
20454e0: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED
20454e4: c2 2a 80 00 stb %g1, [ %o2 ] <== NOT EXECUTED
dn[1] = '.';
return 0;
20454e8: 10 bf ff e5 b 204547c <msdos_filename_unix2dos+0x1b8> <== NOT EXECUTED
20454ec: c2 2a a0 01 stb %g1, [ %o2 + 1 ] <== NOT EXECUTED
02039d84 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
2039d84: 9d e3 bf 60 save %sp, -160, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
2039d88: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
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);
2039d8c: ba 07 bf c8 add %fp, -56, %i5
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
2039d90: f6 00 60 20 ld [ %g1 + 0x20 ], %i3
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,
2039d94: 94 10 00 1d mov %i5, %o2
2039d98: 92 10 00 1a mov %i2, %o1
2039d9c: 96 10 20 0b mov 0xb, %o3
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;
2039da0: c0 27 bf fc clr [ %fp + -4 ]
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);
2039da4: c0 27 bf c8 clr [ %fp + -56 ]
2039da8: c0 27 bf cc clr [ %fp + -52 ]
2039dac: c0 27 60 08 clr [ %i5 + 8 ]
2039db0: c0 27 60 0c clr [ %i5 + 0xc ]
2039db4: c0 27 60 10 clr [ %i5 + 0x10 ]
2039db8: c0 27 60 14 clr [ %i5 + 0x14 ]
2039dbc: c0 27 60 18 clr [ %i5 + 0x18 ]
2039dc0: c0 27 60 1c clr [ %i5 + 0x1c ]
name_type = msdos_long_to_short (name,
2039dc4: 7f ff fa 0f call 2038600 <msdos_long_to_short>
2039dc8: 90 10 00 19 mov %i1, %o0
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
2039dcc: b8 10 00 18 mov %i0, %i4
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,
2039dd0: 98 10 00 08 mov %o0, %o4
/*
* 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,
2039dd4: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
2039dd8: 90 10 00 18 mov %i0, %o0
2039ddc: 92 10 20 00 clr %o1
2039de0: 94 10 00 19 mov %i1, %o2
2039de4: 96 10 00 1a mov %i2, %o3
2039de8: 7f ff ff a2 call 2039c70 <msdos_get_name_node>
2039dec: 9a 07 bf ec add %fp, -20, %o5
&dir_pos, node_entry);
if (rc != RC_OK)
2039df0: b0 92 20 00 orcc %o0, 0, %i0
2039df4: 12 80 00 67 bne 2039f90 <msdos_find_name+0x20c>
2039df8: 01 00 00 00 nop
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
2039dfc: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
2039e00: 31 00 00 1f sethi %hi(0x7c00), %i0
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) ||
2039e04: 80 88 60 08 btst 8, %g1
2039e08: 12 80 00 1e bne 2039e80 <msdos_find_name+0xfc> <== NEVER TAKEN
2039e0c: b0 16 21 01 or %i0, 0x101, %i0
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
2039e10: 82 08 60 3f and %g1, 0x3f, %g1
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) ||
2039e14: 80 a0 60 0f cmp %g1, 0xf
2039e18: 02 80 00 1a be 2039e80 <msdos_find_name+0xfc> <== NEVER TAKEN
2039e1c: 92 07 bf ec add %fp, -20, %o1
((*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(parent_loc->mt_entry, &dir_pos, &fat_fd);
2039e20: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
2039e24: 7f ff b8 17 call 2027e80 <fat_file_open>
2039e28: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
2039e2c: b0 92 20 00 orcc %o0, 0, %i0
2039e30: 12 80 00 14 bne 2039e80 <msdos_find_name+0xfc> <== NEVER TAKEN
2039e34: f4 07 bf fc ld [ %fp + -4 ], %i2
return rc;
fat_fd->dir_pos = dir_pos;
2039e38: c4 07 bf ec ld [ %fp + -20 ], %g2
* 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)
2039e3c: c2 06 a0 08 ld [ %i2 + 8 ], %g1
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
2039e40: c4 26 a0 20 st %g2, [ %i2 + 0x20 ]
2039e44: c4 07 bf f0 ld [ %fp + -16 ], %g2
* 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)
2039e48: 80 a0 60 01 cmp %g1, 1
/* open fat-file corresponded to the found node */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->dir_pos = dir_pos;
2039e4c: c4 26 a0 24 st %g2, [ %i2 + 0x24 ]
2039e50: c4 07 bf f4 ld [ %fp + -12 ], %g2
2039e54: c4 26 a0 28 st %g2, [ %i2 + 0x28 ]
2039e58: c4 07 bf f8 ld [ %fp + -8 ], %g2
* 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)
2039e5c: 02 80 00 0b be 2039e88 <msdos_find_name+0x104>
2039e60: c4 26 a0 2c st %g2, [ %i2 + 0x2c ]
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
2039e64: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
2039e68: 7f ff b9 82 call 2028470 <fat_file_close>
2039e6c: d2 07 20 08 ld [ %i4 + 8 ], %o1
if (rc != RC_OK)
2039e70: b0 92 20 00 orcc %o0, 0, %i0
2039e74: 12 80 00 44 bne 2039f84 <msdos_find_name+0x200> <== NEVER TAKEN
2039e78: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
2039e7c: c2 27 20 08 st %g1, [ %i4 + 8 ]
return rc;
}
2039e80: 81 c7 e0 08 ret
2039e84: 81 e8 00 00 restore
*/
if (fat_fd->links_num == 1)
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
2039e88: c2 17 60 16 lduh [ %i5 + 0x16 ], %g1
* 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);
2039e8c: c6 17 60 1a lduh [ %i5 + 0x1a ], %g3
2039e90: c8 17 60 14 lduh [ %i5 + 0x14 ], %g4
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
2039e94: c4 17 60 18 lduh [ %i5 + 0x18 ], %g2
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
2039e98: 83 28 60 10 sll %g1, 0x10, %g1
* 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);
2039e9c: 89 29 20 10 sll %g4, 0x10, %g4
2039ea0: 87 28 e0 10 sll %g3, 0x10, %g3
2039ea4: 9f 31 20 18 srl %g4, 0x18, %o7
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));
2039ea8: 85 28 a0 10 sll %g2, 0x10, %g2
* 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);
2039eac: b1 30 e0 18 srl %g3, 0x18, %i0
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));
2039eb0: 91 30 a0 18 srl %g2, 0x18, %o0
2039eb4: 93 30 60 18 srl %g1, 0x18, %o1
2039eb8: b3 30 60 08 srl %g1, 8, %i1
* 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);
2039ebc: 89 31 20 08 srl %g4, 8, %g4
2039ec0: 87 30 e0 08 srl %g3, 8, %g3
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));
2039ec4: 85 30 a0 08 srl %g2, 8, %g2
* 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);
2039ec8: 03 00 00 3f sethi %hi(0xfc00), %g1
2039ecc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
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));
2039ed0: 84 08 80 01 and %g2, %g1, %g2
* 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);
2039ed4: 88 09 00 01 and %g4, %g1, %g4
2039ed8: 86 08 c0 01 and %g3, %g1, %g3
2039edc: 88 13 c0 04 or %o7, %g4, %g4
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));
2039ee0: 82 0e 40 01 and %i1, %g1, %g1
* 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);
2039ee4: 89 29 20 10 sll %g4, 0x10, %g4
2039ee8: 86 16 00 03 or %i0, %g3, %g3
2039eec: 86 11 00 03 or %g4, %g3, %g3
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));
2039ef0: 92 12 40 01 or %o1, %g1, %o1
* 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);
2039ef4: c6 26 a0 1c st %g3, [ %i2 + 0x1c ]
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));
2039ef8: 40 00 2c a4 call 2045188 <msdos_date_dos2unix>
2039efc: 90 12 00 02 or %o0, %g2, %o0
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
2039f00: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
2039f04: 80 88 60 10 btst 0x10, %g1
2039f08: 12 80 00 27 bne 2039fa4 <msdos_find_name+0x220>
2039f0c: d0 26 a0 40 st %o0, [ %i2 + 0x40 ]
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
2039f10: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
2039f14: c2 07 bf fc ld [ %fp + -4 ], %g1
2039f18: bb 28 a0 18 sll %g2, 0x18, %i5
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2039f1c: 89 30 a0 18 srl %g2, 0x18, %g4
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2039f20: 87 30 a0 08 srl %g2, 8, %g3
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2039f24: 88 17 40 04 or %i5, %g4, %g4
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2039f28: 86 08 e0 ff and %g3, 0xff, %g3
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2039f2c: 87 28 e0 10 sll %g3, 0x10, %g3
2039f30: 86 11 00 03 or %g4, %g3, %g3
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2039f34: 85 30 a0 10 srl %g2, 0x10, %g2
2039f38: 84 08 a0 ff and %g2, 0xff, %g2
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2039f3c: 85 28 a0 08 sll %g2, 8, %g2
2039f40: 84 10 c0 02 or %g3, %g2, %g2
fat_fd->fat_file_type = FAT_FILE;
2039f44: 86 10 20 04 mov 4, %g3
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
2039f48: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
fat_fd->fat_file_type = FAT_FILE;
2039f4c: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
2039f50: 86 10 3f ff mov -1, %g3
2039f54: c6 20 60 14 st %g3, [ %g1 + 0x14 ]
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
2039f58: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
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;
2039f5c: c0 20 60 34 clr [ %g1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
2039f60: 80 a0 a0 00 cmp %g2, 0
2039f64: 02 80 00 0d be 2039f98 <msdos_find_name+0x214>
2039f68: c6 20 60 38 st %g3, [ %g1 + 0x38 ]
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
2039f6c: c8 16 e0 06 lduh [ %i3 + 6 ], %g4
/* 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) &&
2039f70: 80 a1 00 02 cmp %g4, %g2
2039f74: 0a 80 00 0a bcs 2039f9c <msdos_find_name+0x218> <== NEVER TAKEN
2039f78: 84 10 3f ff mov -1, %g2
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
2039f7c: 10 bf ff ba b 2039e64 <msdos_find_name+0xe0>
2039f80: c6 20 60 3c st %g3, [ %g1 + 0x3c ]
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
if (rc != RC_OK)
{
fat_file_close(parent_loc->mt_entry, fat_fd);
2039f84: d0 07 20 18 ld [ %i4 + 0x18 ], %o0 <== NOT EXECUTED
2039f88: 7f ff b9 3a call 2028470 <fat_file_close> <== NOT EXECUTED
2039f8c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
return rc;
2039f90: 81 c7 e0 08 ret
2039f94: 81 e8 00 00 restore
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
2039f98: 84 10 3f ff mov -1, %g2
2039f9c: 10 bf ff b2 b 2039e64 <msdos_find_name+0xe0>
2039fa0: c4 20 60 3c st %g2, [ %g1 + 0x3c ]
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;
2039fa4: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
2039fa8: d0 07 20 18 ld [ %i4 + 0x18 ], %o0
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;
2039fac: 05 00 08 00 sethi %hi(0x200000), %g2
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;
2039fb0: c0 20 60 10 clr [ %g1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
2039fb4: 92 10 00 01 mov %g1, %o1
2039fb8: 7f ff bb 1c call 2028c28 <fat_file_size>
2039fbc: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
if (rc != RC_OK)
2039fc0: b0 92 20 00 orcc %o0, 0, %i0
2039fc4: 12 bf ff f0 bne 2039f84 <msdos_find_name+0x200> <== NEVER TAKEN
2039fc8: c2 07 bf fc ld [ %fp + -4 ], %g1
2039fcc: 10 bf ff e3 b 2039f58 <msdos_find_name+0x1d4>
2039fd0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
02038e20 <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
)
{
2038e20: 9d e3 bf 78 save %sp, -136, %sp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
2038e24: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
2038e28: f0 27 a0 44 st %i0, [ %fp + 0x44 ]
2038e2c: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
2038e30: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
2038e34: c2 27 bf e8 st %g1, [ %fp + -24 ]
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
2038e38: 80 a7 20 00 cmp %i4, 0
2038e3c: 04 80 02 5a ble 20397a4 <msdos_find_name_in_fat_file+0x984><== NEVER TAKEN
2038e40: ae 10 00 1d mov %i5, %l7
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
2038e44: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2038e48: 82 10 3f ff mov -1, %g1
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
2038e4c: c0 20 80 00 clr [ %g2 ]
dir_pos->sname.ofs = 0;
2038e50: c0 20 a0 04 clr [ %g2 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2038e54: c2 20 a0 08 st %g1, [ %g2 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2038e58: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
2038e5c: c2 27 bf f8 st %g1, [ %fp + -8 ]
* 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))
2038e60: 80 a6 a0 00 cmp %i2, 0
2038e64: 02 80 00 05 be 2038e78 <msdos_find_name_in_fat_file+0x58>
2038e68: c2 27 bf f4 st %g1, [ %fp + -12 ]
2038e6c: 80 a7 60 01 cmp %i5, 1
2038e70: 02 80 00 06 be 2038e88 <msdos_find_name_in_fat_file+0x68>
2038e74: c0 27 bf e4 clr [ %fp + -28 ]
lfn_entries = 0;
else
lfn_entries =
2038e78: 90 07 20 0c add %i4, 0xc, %o0
2038e7c: 40 00 9f 0a call 2060aa4 <.div>
2038e80: 92 10 20 0d mov 0xd, %o1
2038e84: d0 27 bf e4 st %o0, [ %fp + -28 ]
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
2038e88: c6 07 a0 48 ld [ %fp + 0x48 ], %g3
2038e8c: c2 00 e0 20 ld [ %g3 + 0x20 ], %g1
2038e90: 80 a0 60 01 cmp %g1, 1
2038e94: 22 80 01 6e be,a 203944c <msdos_find_name_in_fat_file+0x62c>
2038e98: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
2038e9c: c2 07 bf e8 ld [ %fp + -24 ], %g1
2038ea0: f2 10 60 06 lduh [ %g1 + 6 ], %i1
2038ea4: c4 07 bf e8 ld [ %fp + -24 ], %g2
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
2038ea8: c6 07 bf e4 ld [ %fp + -28 ], %g3
2038eac: d8 00 a0 94 ld [ %g2 + 0x94 ], %o4
2038eb0: 82 00 e0 01 add %g3, 1, %g1
2038eb4: ba 10 00 1c mov %i4, %i5
/*
* 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(mt_entry, fat_fd, (dir_offset * bts2rd),
2038eb8: c0 27 bf ec clr [ %fp + -20 ]
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;
2038ebc: a8 10 20 00 clr %l4
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;
2038ec0: b6 10 20 00 clr %i3
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;
2038ec4: a0 10 20 00 clr %l0
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;
2038ec8: a6 10 20 00 clr %l3
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;
2038ecc: aa 10 20 00 clr %l5
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;
2038ed0: ac 10 20 00 clr %l6
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;
2038ed4: b0 10 20 00 clr %i0
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
2038ed8: a4 10 20 00 clr %l2
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
2038edc: a2 10 3f ff mov -1, %l1
2038ee0: b8 10 00 01 mov %g1, %i4
/*
* 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(mt_entry, fat_fd, (dir_offset * bts2rd),
2038ee4: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
2038ee8: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
2038eec: d4 07 bf ec ld [ %fp + -20 ], %o2
2038ef0: 7f ff bc 96 call 2028148 <fat_file_read>
2038ef4: 96 10 00 19 mov %i1, %o3
2038ef8: 80 a2 20 00 cmp %o0, 0
2038efc: 02 80 00 55 be 2039050 <msdos_find_name_in_fat_file+0x230><== NEVER TAKEN
2038f00: 80 a2 20 1f cmp %o0, 0x1f
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)
2038f04: 04 80 01 89 ble 2039528 <msdos_find_name_in_fat_file+0x708><== NEVER TAKEN
2038f08: 80 a2 00 19 cmp %o0, %i1
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
2038f0c: 12 80 02 2e bne 20397c4 <msdos_find_name_in_fat_file+0x9a4><== NEVER TAKEN
2038f10: c2 07 bf e8 ld [ %fp + -24 ], %g1
2038f14: d8 00 60 94 ld [ %g1 + 0x94 ], %o4
2038f18: 82 10 20 00 clr %g1
/* 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;
2038f1c: 84 03 00 01 add %o4, %g1, %g2
* 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)
2038f20: 80 a6 e0 00 cmp %i3, 0
2038f24: 12 80 00 04 bne 2038f34 <msdos_find_name_in_fat_file+0x114>
2038f28: de 0b 00 01 ldub [ %o4 + %g1 ], %o7
2038f2c: a0 10 00 01 mov %g1, %l0
2038f30: a6 10 00 12 mov %l2, %l3
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
2038f34: 88 8b e0 ff andcc %o7, 0xff, %g4
2038f38: 02 80 00 c6 be 2039250 <msdos_find_name_in_fat_file+0x430>
2038f3c: 80 a1 20 e5 cmp %g4, 0xe5
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
2038f40: 02 80 00 4a be 2039068 <msdos_find_name_in_fat_file+0x248>
2038f44: 80 a6 a0 00 cmp %i2, 0
* 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)
2038f48: 02 80 00 07 be 2038f64 <msdos_find_name_in_fat_file+0x144>
2038f4c: c6 08 a0 0b ldub [ %g2 + 0xb ], %g3
2038f50: 80 8d 20 ff btst 0xff, %l4
2038f54: 12 80 00 04 bne 2038f64 <msdos_find_name_in_fat_file+0x144><== NEVER TAKEN
2038f58: 01 00 00 00 nop
{
empty_space_entry = 0;
empty_space_count = 0;
2038f5c: b6 10 20 00 clr %i3 ! 0 <PROM_START>
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
2038f60: a0 10 20 00 clr %l0
/*
* Check the attribute to see if the entry is for a long
* file name.
*/
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
2038f64: 86 08 e0 3f and %g3, 0x3f, %g3
2038f68: 80 a0 e0 0f cmp %g3, 0xf
2038f6c: 02 80 00 65 be 2039100 <msdos_find_name_in_fat_file+0x2e0>
2038f70: 80 8e 20 ff btst 0xff, %i0
* 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)
2038f74: 02 80 00 4c be 20390a4 <msdos_find_name_in_fat_file+0x284>
2038f78: 80 a5 e0 01 cmp %l7, 1
2038f7c: 88 10 00 02 mov %g2, %g4
* 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(
2038f80: 9a 00 a0 0a add %g2, 0xa, %o5
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;
2038f84: 86 10 20 00 clr %g3
2038f88: 10 80 00 0a b 2038fb0 <msdos_find_name_in_fat_file+0x190>
2038f8c: b0 10 20 00 clr %i0
2038f90: b0 0e 20 ff and %i0, 0xff, %i0
2038f94: 86 0e 20 01 and %i0, 1, %g3
2038f98: de 09 20 01 ldub [ %g4 + 1 ], %o7
2038f9c: 80 a0 00 03 cmp %g0, %g3
2038fa0: 88 01 20 01 inc %g4
2038fa4: 86 40 3f ff addx %g0, -1, %g3
2038fa8: 86 08 e0 80 and %g3, 0x80, %g3
2038fac: 86 00 ff 80 add %g3, -128, %g3
2038fb0: b1 36 20 01 srl %i0, 1, %i0
2038fb4: 86 03 c0 03 add %o7, %g3, %g3
{
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++)
2038fb8: 80 a1 00 0d cmp %g4, %o5
2038fbc: 12 bf ff f5 bne 2038f90 <msdos_find_name_in_fat_file+0x170>
2038fc0: b0 00 c0 18 add %g3, %i0, %i0
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
2038fc4: b0 1d 80 18 xor %l6, %i0, %i0
2038fc8: 80 8e 20 ff btst 0xff, %i0
2038fcc: 12 80 00 36 bne 20390a4 <msdos_find_name_in_fat_file+0x284><== NEVER TAKEN
2038fd0: 80 a5 e0 01 cmp %l7, 1
2038fd4: 80 a5 60 00 cmp %l5, 0
2038fd8: 12 80 00 33 bne 20390a4 <msdos_find_name_in_fat_file+0x284><== NEVER TAKEN
2038fdc: 80 a5 e0 01 cmp %l7, 1
#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(mt_entry, fat_fd, F_CLU_NUM,
2038fe0: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
2038fe4: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
2038fe8: d6 07 bf ec ld [ %fp + -20 ], %o3
2038fec: d8 07 a0 5c ld [ %fp + 0x5c ], %o4
2038ff0: b8 10 00 02 mov %g2, %i4
2038ff4: ba 10 00 01 mov %g1, %i5
2038ff8: 7f ff bd 50 call 2028538 <fat_file_ioctl>
2038ffc: 94 10 20 01 mov 1, %o2
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
2039000: b0 92 20 00 orcc %o0, 0, %i0
2039004: 12 80 00 17 bne 2039060 <msdos_find_name_in_fat_file+0x240><== NEVER TAKEN
2039008: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
203900c: d2 07 bf f4 ld [ %fp + -12 ], %o1
2039010: 80 a2 7f ff cmp %o1, -1
2039014: 02 80 01 18 be 2039474 <msdos_find_name_in_fat_file+0x654>
2039018: fa 20 e0 04 st %i5, [ %g3 + 4 ]
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
203901c: 7f ff 27 b1 call 2002ee0 <.umul>
2039020: 90 10 00 19 mov %i1, %o0
2039024: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
2039028: 96 10 00 08 mov %o0, %o3
203902c: d0 07 a0 44 ld [ %fp + 0x44 ], %o0
2039030: 94 10 20 01 mov 1, %o2
2039034: 7f ff bd 41 call 2028538 <fat_file_ioctl>
2039038: 98 07 bf f4 add %fp, -12, %o4
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
203903c: 80 a2 20 00 cmp %o0, 0
2039040: 02 80 01 0e be 2039478 <msdos_find_name_in_fat_file+0x658><== ALWAYS TAKEN
2039044: c2 07 bf f4 ld [ %fp + -12 ], %g1
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
2039048: 81 c7 e0 08 ret <== NOT EXECUTED
203904c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
2039050: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
2039054: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2039058: 12 80 00 8a bne 2039280 <msdos_find_name_in_fat_file+0x460><== NOT EXECUTED
203905c: b0 16 21 01 or %i0, 0x101, %i0 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
2039060: 81 c7 e0 08 ret
2039064: 81 e8 00 00 restore
}
break;
}
else if (entry_empty)
{
if (create_node)
2039068: 22 80 00 07 be,a 2039084 <msdos_find_name_in_fat_file+0x264>
203906c: 82 00 60 20 add %g1, 0x20, %g1
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
2039070: b6 06 e0 01 inc %i3
if (empty_space_count == (lfn_entries + 1))
2039074: 80 a7 00 1b cmp %i4, %i3
2039078: 22 80 00 02 be,a 2039080 <msdos_find_name_in_fat_file+0x260>
203907c: a8 10 20 01 mov 1, %l4
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)
2039080: 82 00 60 20 add %g1, 0x20, %g1
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;
2039084: 80 a6 40 01 cmp %i1, %g1
2039088: 18 bf ff a6 bgu 2038f20 <msdos_find_name_in_fat_file+0x100><== ALWAYS TAKEN
203908c: 84 03 00 01 add %o4, %g1, %g2
2039090: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
2039094: a4 04 a0 01 inc %l2 <== NOT EXECUTED
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;
2039098: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED
203909c: 10 bf ff 92 b 2038ee4 <msdos_find_name_in_fat_file+0xc4> <== NOT EXECUTED
20390a0: c2 27 bf ec st %g1, [ %fp + -20 ] <== 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 ||
20390a4: 02 80 00 05 be 20390b8 <msdos_find_name_in_fat_file+0x298>
20390a8: c6 07 bf f4 ld [ %fp + -12 ], %g3
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
20390ac: e2 27 bf f4 st %l1, [ %fp + -12 ]
lfn_matched = false;
20390b0: 10 bf ff f4 b 2039080 <msdos_find_name_in_fat_file+0x260>
20390b4: b0 10 20 00 clr %i0
* 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) &&
20390b8: 80 a0 ff ff cmp %g3, -1
20390bc: 32 bf ff fd bne,a 20390b0 <msdos_find_name_in_fat_file+0x290><== NEVER TAKEN
20390c0: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
20390c4: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
20390c8: 90 10 00 02 mov %g2, %o0
20390cc: c2 27 bf e0 st %g1, [ %fp + -32 ]
20390d0: c4 27 bf dc st %g2, [ %fp + -36 ]
20390d4: d8 27 bf d8 st %o4, [ %fp + -40 ]
20390d8: 40 00 45 98 call 204a738 <memcmp>
20390dc: 94 10 20 0b mov 0xb, %o2
* 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) &&
20390e0: c2 07 bf e0 ld [ %fp + -32 ], %g1
20390e4: 80 a2 20 00 cmp %o0, 0
20390e8: c4 07 bf dc ld [ %fp + -36 ], %g2
20390ec: 02 bf ff bd be 2038fe0 <msdos_find_name_in_fat_file+0x1c0>
20390f0: d8 07 bf d8 ld [ %fp + -40 ], %o4
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
20390f4: e2 27 bf f4 st %l1, [ %fp + -12 ]
lfn_matched = false;
20390f8: 10 bf ff e2 b 2039080 <msdos_find_name_in_fat_file+0x260>
20390fc: b0 10 20 00 clr %i0
#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)
2039100: c6 07 bf f4 ld [ %fp + -12 ], %g3
2039104: 80 a0 ff ff cmp %g3, -1
2039108: 02 80 00 3d be 20391fc <msdos_find_name_in_fat_file+0x3dc>
203910c: 80 89 20 40 btst 0x40, %g4
* 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) &
2039110: 88 09 20 3f and %g4, 0x3f, %g4
2039114: 80 a1 00 15 cmp %g4, %l5
2039118: 22 80 00 04 be,a 2039128 <msdos_find_name_in_fat_file+0x308><== ALWAYS TAKEN
203911c: de 08 a0 0d ldub [ %g2 + 0xd ], %o7
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
2039120: 10 bf ff d8 b 2039080 <msdos_find_name_in_fat_file+0x260> <== NOT EXECUTED
2039124: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
* 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) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
2039128: 86 0d a0 ff and %l6, 0xff, %g3
203912c: 80 a3 c0 03 cmp %o7, %g3
2039130: 32 bf ff d4 bne,a 2039080 <msdos_find_name_in_fat_file+0x260><== NEVER TAKEN
2039134: e2 27 bf f4 st %l1, [ %fp + -12 ] <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
2039138: aa 05 7f ff add %l5, -1, %l5
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
203913c: 9f 2d 60 04 sll %l5, 4, %o7
p = entry + 1;
2039140: 84 00 a0 01 inc %g2
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
2039144: 87 2d 60 02 sll %l5, 2, %g3
2039148: 86 23 c0 03 sub %o7, %g3, %g3
{
#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')
203914c: de 48 80 00 ldsb [ %g2 ], %o7
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
2039150: b0 10 20 01 mov 1, %i0
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
2039154: 94 00 c0 15 add %g3, %l5, %o2
2039158: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
p = entry + 1;
203915c: 86 10 00 0a mov %o2, %g3
{
#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')
2039160: 80 a3 e0 00 cmp %o7, 0
2039164: 02 80 00 15 be 20391b8 <msdos_find_name_in_fat_file+0x398><== NEVER TAKEN
2039168: 9a 06 3f ff add %i0, -1, %o5
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
203916c: 80 a7 40 03 cmp %i5, %g3
2039170: 24 80 00 1b ble,a 20391dc <msdos_find_name_in_fat_file+0x3bc>
2039174: e2 27 bf f4 st %l1, [ %fp + -12 ]
2039178: d6 4a 40 03 ldsb [ %o1 + %g3 ], %o3
203917c: 80 a3 c0 0b cmp %o7, %o3
2039180: 12 80 00 16 bne 20391d8 <msdos_find_name_in_fat_file+0x3b8>
2039184: 80 a3 60 04 cmp %o5, 4
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
2039188: 02 80 00 2a be 2039230 <msdos_find_name_in_fat_file+0x410>
203918c: 80 a3 60 0a cmp %o5, 0xa
2039190: 02 80 00 2c be 2039240 <msdos_find_name_in_fat_file+0x420>
2039194: 80 a6 20 0d cmp %i0, 0xd
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++)
2039198: 02 80 00 11 be 20391dc <msdos_find_name_in_fat_file+0x3bc>
203919c: 84 00 a0 02 add %g2, 2, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
20391a0: b0 06 20 01 inc %i0
20391a4: 86 00 e0 01 inc %g3
{
#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')
20391a8: de 48 80 00 ldsb [ %g2 ], %o7
20391ac: 80 a3 e0 00 cmp %o7, 0
20391b0: 12 bf ff ef bne 203916c <msdos_find_name_in_fat_file+0x34c>
20391b4: 9a 06 3f ff add %i0, -1, %o5
/*
* 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) &&
20391b8: c4 07 bf e4 ld [ %fp + -28 ], %g2
20391bc: 80 a0 80 04 cmp %g2, %g4
20391c0: 12 80 00 08 bne 20391e0 <msdos_find_name_in_fat_file+0x3c0><== NEVER TAKEN
20391c4: 80 a5 60 00 cmp %l5, 0
((o + i) != name_len))
20391c8: 9a 02 80 0d add %o2, %o5, %o5
/*
* 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) &&
20391cc: 80 a3 40 1d cmp %o5, %i5
20391d0: 02 80 00 04 be 20391e0 <msdos_find_name_in_fat_file+0x3c0><== ALWAYS TAKEN
20391d4: 80 a5 60 00 cmp %l5, 0
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
20391d8: e2 27 bf f4 st %l1, [ %fp + -12 ]
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
20391dc: 80 a5 60 00 cmp %l5, 0
20391e0: 12 bf ff a8 bne 2039080 <msdos_find_name_in_fat_file+0x260>
20391e4: b0 10 20 00 clr %i0
* 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(
20391e8: c4 07 bf f4 ld [ %fp + -12 ], %g2
20391ec: 84 38 00 02 xnor %g0, %g2, %g2
20391f0: 80 a0 00 02 cmp %g0, %g2
20391f4: 10 bf ff a3 b 2039080 <msdos_find_name_in_fat_file+0x260>
20391f8: b0 40 20 00 addx %g0, 0, %i0
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
20391fc: 02 bf ff a1 be 2039080 <msdos_find_name_in_fat_file+0x260>
2039200: b0 10 20 00 clr %i0
* 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) &
2039204: c6 07 bf e4 ld [ %fp + -28 ], %g3
2039208: 88 09 20 3f and %g4, 0x3f, %g4
203920c: 80 a1 00 03 cmp %g4, %g3
2039210: 32 bf ff 9d bne,a 2039084 <msdos_find_name_in_fat_file+0x264>
2039214: 82 00 60 20 add %g1, 0x20, %g1
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
2039218: e4 27 bf f4 st %l2, [ %fp + -12 ]
lfn_start.ofs = dir_entry;
203921c: c2 27 bf f8 st %g1, [ %fp + -8 ]
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
2039220: ec 08 a0 0d ldub [ %g2 + 0xd ], %l6
2039224: c8 08 80 00 ldub [ %g2 ], %g4
2039228: 10 bf ff ba b 2039110 <msdos_find_name_in_fat_file+0x2f0>
203922c: aa 10 00 03 mov %g3, %l5
}
switch (i)
{
case 4:
p += 5;
2039230: 84 00 a0 05 add %g2, 5, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
2039234: b0 06 20 01 inc %i0
2039238: 10 bf ff dc b 20391a8 <msdos_find_name_in_fat_file+0x388>
203923c: 86 00 e0 01 inc %g3
{
case 4:
p += 5;
break;
case 10:
p += 4;
2039240: 84 00 a0 04 add %g2, 4, %g2
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
2039244: b0 06 20 01 inc %i0
2039248: 10 bf ff d8 b 20391a8 <msdos_find_name_in_fat_file+0x388>
203924c: 86 00 e0 01 inc %g3
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
return MSDOS_NAME_NOT_FOUND_ERR;
2039250: 31 00 00 1f sethi %hi(0x7c00), %i0
2039254: ba 10 00 01 mov %g1, %i5
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
2039258: 80 a6 a0 00 cmp %i2, 0
203925c: 02 bf ff 81 be 2039060 <msdos_find_name_in_fat_file+0x240>
2039260: b0 16 21 01 or %i0, 0x101, %i0
* 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)
2039264: 80 8d 20 ff btst 0xff, %l4
2039268: 12 80 00 07 bne 2039284 <msdos_find_name_in_fat_file+0x464>
203926c: 80 a5 e0 02 cmp %l7, 2
(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;
2039270: 83 36 60 05 srl %i1, 5, %g1
* 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);
2039274: bb 37 60 05 srl %i5, 5, %i5
2039278: b6 06 c0 01 add %i3, %g1, %i3
* 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 +=
203927c: b6 26 c0 1d sub %i3, %i5, %i3
* 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)
2039280: 80 a5 e0 02 cmp %l7, 2
2039284: 02 80 00 b2 be 203954c <msdos_find_name_in_fat_file+0x72c>
2039288: 90 10 00 13 mov %l3, %o0
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)
203928c: c6 07 bf e4 ld [ %fp + -28 ], %g3
2039290: 80 a0 e0 00 cmp %g3, 0
2039294: 02 80 00 14 be 20392e4 <msdos_find_name_in_fat_file+0x4c4>
2039298: b4 10 20 00 clr %i2
203929c: 84 10 20 00 clr %g2
20392a0: 82 10 20 00 clr %g1
20392a4: 10 80 00 08 b 20392c4 <msdos_find_name_in_fat_file+0x4a4>
20392a8: 86 10 20 00 clr %g3
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
((lfn_checksum & 1) ? 0x80 : 0) + (lfn_checksum >> 1) + *p;
20392ac: 86 0e a0 ff and %i2, 0xff, %g3
20392b0: 82 08 e0 01 and %g3, 1, %g1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
20392b4: 80 a0 00 01 cmp %g0, %g1
20392b8: 82 40 3f ff addx %g0, -1, %g1
20392bc: 82 08 60 80 and %g1, 0x80, %g1
20392c0: 82 00 7f 80 add %g1, -128, %g1
20392c4: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
20392c8: 87 30 e0 01 srl %g3, 1, %g3
20392cc: c8 0f 40 02 ldub [ %i5 + %g2 ], %g4
20392d0: 82 00 c0 01 add %g3, %g1, %g1
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
20392d4: 84 00 a0 01 inc %g2
20392d8: 80 a0 a0 0b cmp %g2, 0xb
20392dc: 12 bf ff f4 bne 20392ac <msdos_find_name_in_fat_file+0x48c>
20392e0: b4 00 40 04 add %g1, %g4, %i2
* 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)
20392e4: 80 a6 e0 00 cmp %i3, 0
20392e8: 22 80 00 96 be,a 2039540 <msdos_find_name_in_fat_file+0x720><== NEVER TAKEN
20392ec: a6 10 00 12 mov %l2, %l3 <== NOT EXECUTED
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;
20392f0: a4 1c c0 12 xor %l3, %l2, %l2
20392f4: 80 a0 00 12 cmp %g0, %l2
20392f8: ba 40 20 00 addx %g0, 0, %i5
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
20392fc: 82 10 3f ff mov -1, %g1
2039300: c2 27 bf f8 st %g1, [ %fp + -8 ]
2039304: c2 27 bf f4 st %g1, [ %fp + -12 ]
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
2039308: c2 07 bf e4 ld [ %fp + -28 ], %g1
203930c: 80 a0 60 00 cmp %g1, 0
2039310: 06 bf ff 54 bl 2039060 <msdos_find_name_in_fat_file+0x240><== NEVER TAKEN
2039314: b0 10 20 00 clr %i0
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
2039318: a4 00 60 01 add %g1, 1, %l2
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
203931c: 90 10 00 13 mov %l3, %o0
2039320: 7f ff 26 f0 call 2002ee0 <.umul>
2039324: 92 10 00 19 mov %i1, %o1
2039328: e2 07 bf e8 ld [ %fp + -24 ], %l1
203932c: ee 07 a0 44 ld [ %fp + 0x44 ], %l7
2039330: ec 07 a0 48 ld [ %fp + 0x48 ], %l6
2039334: aa 10 00 08 mov %o0, %l5
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
2039338: b6 10 20 00 clr %i3
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
203933c: a8 10 00 12 mov %l2, %l4
*/
while (lfn_entry < (lfn_entries + 1))
{
int length = 0;
if (read_cluster)
2039340: 80 8f 60 ff btst 0xff, %i5
2039344: 32 80 00 57 bne,a 20394a0 <msdos_find_name_in_fat_file+0x680><== NEVER TAKEN
2039348: d8 04 60 94 ld [ %l1 + 0x94 ], %o4 <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
203934c: 80 a6 40 10 cmp %i1, %l0
2039350: 08 80 01 10 bleu 2039790 <msdos_find_name_in_fat_file+0x970><== NEVER TAKEN
2039354: b8 06 e0 01 add %i3, 1, %i4
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
2039358: fa 04 60 94 ld [ %l1 + 0x94 ], %i5
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
203935c: 80 a4 80 1c cmp %l2, %i4
2039360: 02 80 01 09 be 2039784 <msdos_find_name_in_fat_file+0x964>
2039364: ba 07 40 10 add %i5, %l0, %i5
* 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(
2039368: c4 07 bf e4 ld [ %fp + -28 ], %g2
203936c: 82 38 00 1b xnor %g0, %i3, %g1
2039370: 82 00 40 02 add %g1, %g2, %g1
2039374: 87 28 60 04 sll %g1, 4, %g3
2039378: 85 28 60 02 sll %g1, 2, %g2
203937c: 84 20 c0 02 sub %g3, %g2, %g2
2039380: c6 07 a0 50 ld [ %fp + 0x50 ], %g3
2039384: b6 10 00 10 mov %l0, %i3
2039388: 82 00 80 01 add %g2, %g1, %g1
203938c: ec 27 bf ec st %l6, [ %fp + -20 ]
2039390: 82 00 c0 01 add %g3, %g1, %g1
2039394: ac 10 00 15 mov %l5, %l6
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
2039398: b0 10 20 20 mov 0x20, %i0
* 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(
203939c: aa 10 00 10 mov %l0, %l5
20393a0: a0 10 00 1a mov %i2, %l0
20393a4: b4 10 00 01 mov %g1, %i2
* 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)
20393a8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20393ac: 80 a0 7f ff cmp %g1, -1
20393b0: 22 80 00 e2 be,a 2039738 <msdos_find_name_in_fat_file+0x918>
20393b4: e6 27 bf f4 st %l3, [ %fp + -12 ]
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
20393b8: 90 10 00 1d mov %i5, %o0
20393bc: 92 10 20 00 clr %o1
20393c0: 40 00 45 98 call 204aa20 <memset>
20393c4: 94 10 20 20 mov 0x20, %o2
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
20393c8: 86 10 00 1a mov %i2, %g3
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
20393cc: e0 2f 60 0d stb %l0, [ %i5 + 0xd ]
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
20393d0: de 48 c0 00 ldsb [ %g3 ], %o7
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
20393d4: 84 10 20 01 mov 1, %g2
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
20393d8: 82 07 60 01 add %i5, 1, %g1
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
20393dc: 9a 10 20 00 clr %o5
* 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(
20393e0: 88 00 bf ff add %g2, -1, %g4
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
20393e4: 80 a3 e0 00 cmp %o7, 0
20393e8: 02 80 00 11 be 203942c <msdos_find_name_in_fat_file+0x60c><== NEVER TAKEN
20393ec: d8 08 c0 00 ldub [ %g3 ], %o4
{
*p = *n;
20393f0: d8 28 40 00 stb %o4, [ %g1 ]
p [0] = fill;
p [1] = fill;
fill = 0xff;
}
switch (i)
20393f4: 80 a1 20 04 cmp %g4, 4
20393f8: 02 80 00 12 be 2039440 <msdos_find_name_in_fat_file+0x620>
20393fc: 86 00 e0 01 inc %g3
2039400: 80 a1 20 0a cmp %g4, 0xa
2039404: 02 80 00 81 be 2039608 <msdos_find_name_in_fat_file+0x7e8>
2039408: 80 a0 a0 0d cmp %g2, 0xd
*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++)
203940c: 02 80 00 82 be 2039614 <msdos_find_name_in_fat_file+0x7f4>
2039410: 82 00 60 02 add %g1, 2, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
2039414: 84 00 a0 01 inc %g2
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
2039418: de 48 c0 00 ldsb [ %g3 ], %o7
* 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(
203941c: 88 00 bf ff add %g2, -1, %g4
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
2039420: 80 a3 e0 00 cmp %o7, 0
2039424: 12 bf ff f3 bne 20393f0 <msdos_find_name_in_fat_file+0x5d0>
2039428: d8 08 c0 00 ldub [ %g3 ], %o4
*p = *n;
n++;
}
else
{
p [0] = fill;
203942c: da 28 40 00 stb %o5, [ %g1 ]
p [1] = fill;
2039430: da 28 60 01 stb %o5, [ %g1 + 1 ]
fill = 0xff;
}
switch (i)
2039434: 80 a1 20 04 cmp %g4, 4
2039438: 12 bf ff f2 bne 2039400 <msdos_find_name_in_fat_file+0x5e0>
203943c: 9a 10 3f ff mov -1, %o5
{
case 4:
p += 5;
2039440: 82 00 60 05 add %g1, 5, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
2039444: 10 bf ff f5 b 2039418 <msdos_find_name_in_fat_file+0x5f8>
2039448: 84 00 a0 01 inc %g2
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) &&
203944c: 80 a0 60 00 cmp %g1, 0
2039450: 12 bf fe 94 bne 2038ea0 <msdos_find_name_in_fat_file+0x80><== NEVER TAKEN
2039454: c2 07 bf e8 ld [ %fp + -24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
2039458: fa 07 bf e8 ld [ %fp + -24 ], %i5
203945c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
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) &&
2039460: 80 88 60 03 btst 3, %g1
2039464: 02 bf fe 8f be 2038ea0 <msdos_find_name_in_fat_file+0x80> <== NEVER TAKEN
2039468: c2 07 bf e8 ld [ %fp + -24 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
203946c: 10 bf fe 8e b 2038ea4 <msdos_find_name_in_fat_file+0x84>
2039470: f2 00 e0 18 ld [ %g3 + 0x18 ], %i1
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
2039474: 82 10 3f ff mov -1, %g1
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
2039478: fa 07 a0 5c ld [ %fp + 0x5c ], %i5
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
203947c: d0 07 a0 60 ld [ %fp + 0x60 ], %o0
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
2039480: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = lfn_start.ofs;
2039484: c2 07 bf f8 ld [ %fp + -8 ], %g1
memcpy(name_dir_entry, entry,
2039488: 92 10 00 1c mov %i4, %o1
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
203948c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
memcpy(name_dir_entry, entry,
2039490: 40 00 44 d8 call 204a7f0 <memcpy>
2039494: 94 10 20 20 mov 0x20, %o2
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
2039498: 81 c7 e0 08 ret
203949c: 81 e8 00 00 restore
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(mt_entry, fat_fd,
20394a0: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
20394a4: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
20394a8: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
20394ac: 7f ff bb 27 call 2028148 <fat_file_read> <== NOT EXECUTED
20394b0: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
20394b4: 80 a2 00 19 cmp %o0, %i1 <== NOT EXECUTED
20394b8: 02 bf ff a5 be 203934c <msdos_find_name_in_fat_file+0x52c><== NOT EXECUTED
20394bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
{
if (ret != FAT_EOF)
20394c0: 12 80 00 1a bne 2039528 <msdos_find_name_in_fat_file+0x708><== NOT EXECUTED
20394c4: 90 10 00 17 mov %l7, %o0 <== 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 (mt_entry, fat_fd, empty_space_offset * bts2rd,
20394c8: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
20394cc: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
20394d0: 7f ff bc 51 call 2028614 <fat_file_extend> <== NOT EXECUTED
20394d4: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
20394d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20394dc: 12 bf fe db bne 2039048 <msdos_find_name_in_fat_file+0x228><== NOT EXECUTED
20394e0: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return ret;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.3] extended: %d <-> %d\n", new_length, empty_space_offset * bts2rd);
#endif
if (new_length != (empty_space_offset * bts2rd))
20394e4: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
20394e8: 12 80 00 10 bne 2039528 <msdos_find_name_in_fat_file+0x708><== NOT EXECUTED
20394ec: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
20394f0: d0 04 60 94 ld [ %l1 + 0x94 ], %o0 <== NOT EXECUTED
20394f4: 40 00 45 4b call 204aa20 <memset> <== NOT EXECUTED
20394f8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
20394fc: d8 04 60 94 ld [ %l1 + 0x94 ], %o4 <== NOT EXECUTED
2039500: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
2039504: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
2039508: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
203950c: 7f ff bc bb call 20287f8 <fat_file_write> <== NOT EXECUTED
2039510: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
2039514: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2039518: 02 80 00 b5 be 20397ec <msdos_find_name_in_fat_file+0x9cc><== NOT EXECUTED
203951c: 80 a2 00 19 cmp %o0, %i1 <== NOT EXECUTED
return ret;
else if (ret != bts2rd)
2039520: 02 bf ff 8c be 2039350 <msdos_find_name_in_fat_file+0x530><== NOT EXECUTED
2039524: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
2039528: 40 00 37 71 call 20472ec <__errno> <== NOT EXECUTED
203952c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2039530: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2039534: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2039538: 81 c7 e0 08 ret <== NOT EXECUTED
203953c: 81 e8 00 00 restore <== NOT EXECUTED
* be at the next cluster so we can just make empty_space_offset
* that value.
*/
if (empty_space_count == 0)
{
read_cluster = true;
2039540: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
empty_space_offset = dir_offset;
empty_space_entry = 0;
2039544: 10 bf ff 6e b 20392fc <msdos_find_name_in_fat_file+0x4dc> <== NOT EXECUTED
2039548: a0 10 20 00 clr %l0 <== NOT EXECUTED
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
203954c: 7f ff 26 65 call 2002ee0 <.umul>
2039550: 92 10 00 19 mov %i1, %o1
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
2039554: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
2039558: c6 07 bf e4 ld [ %fp + -28 ], %g3
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
203955c: c2 48 80 00 ldsb [ %g2 ], %g1
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
2039560: 84 00 e0 01 add %g3, 1, %g2
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
2039564: 80 a0 60 2e cmp %g1, 0x2e
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
2039568: 86 02 00 10 add %o0, %l0, %g3
203956c: 87 30 e0 05 srl %g3, 5, %g3
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
2039570: 02 80 00 05 be 2039584 <msdos_find_name_in_fat_file+0x764><== NEVER TAKEN
2039574: 84 00 80 03 add %g2, %g3, %g2
2039578: 80 a0 60 20 cmp %g1, 0x20
203957c: 12 80 00 06 bne 2039594 <msdos_find_name_in_fat_file+0x774>
2039580: c6 07 a0 60 ld [ %fp + 0x60 ], %g3
*c = '_';
2039584: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
2039588: 82 10 20 5f mov 0x5f, %g1
203958c: c2 2f 40 00 stb %g1, [ %i5 ]
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
2039590: c6 07 a0 60 ld [ %fp + 0x60 ], %g3
2039594: c2 48 e0 01 ldsb [ %g3 + 1 ], %g1
2039598: 80 a0 60 2e cmp %g1, 0x2e
203959c: 02 80 00 06 be 20395b4 <msdos_find_name_in_fat_file+0x794><== NEVER TAKEN
20395a0: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
20395a4: 80 a0 60 20 cmp %g1, 0x20
20395a8: 12 80 00 06 bne 20395c0 <msdos_find_name_in_fat_file+0x7a0>
20395ac: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
*c = '_';
20395b0: fa 07 a0 60 ld [ %fp + 0x60 ], %i5
20395b4: 82 10 20 5f mov 0x5f, %g1
20395b8: c2 2f 60 01 stb %g1, [ %i5 + 1 ]
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++)
20395bc: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
20395c0: 09 00 81 91 sethi %hi(0x2064400), %g4
20395c4: 86 00 60 02 add %g1, 2, %g3
20395c8: 88 11 22 d8 or %g4, 0x2d8, %g4
20395cc: 82 10 20 0c mov 0xc, %g1
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
20395d0: bb 38 80 01 sra %g2, %g1, %i5
20395d4: ba 0f 60 0f and %i5, 0xf, %i5
20395d8: fa 09 00 1d ldub [ %g4 + %i5 ], %i5
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++)
20395dc: 82 00 7f fc add %g1, -4, %g1
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
20395e0: fa 28 c0 00 stb %i5, [ %g3 ]
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++)
20395e4: 80 a0 7f fc cmp %g1, -4
20395e8: 12 bf ff fa bne 20395d0 <msdos_find_name_in_fat_file+0x7b0>
20395ec: 86 00 e0 01 inc %g3
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
20395f0: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
20395f4: 82 10 20 7e mov 0x7e, %g1
20395f8: c2 28 a0 06 stb %g1, [ %g2 + 6 ]
*c++ = '1';
20395fc: 82 10 20 31 mov 0x31, %g1
2039600: 10 bf ff 23 b 203928c <msdos_find_name_in_fat_file+0x46c>
2039604: c2 28 a0 07 stb %g1, [ %g2 + 7 ]
{
case 4:
p += 5;
break;
case 10:
p += 4;
2039608: 82 00 60 04 add %g1, 4, %g1
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
n = name + (lfn_entries - lfn_entry) * MSDOS_LFN_LEN_PER_ENTRY;
203960c: 10 bf ff 83 b 2039418 <msdos_find_name_in_fat_file+0x5f8>
2039610: 84 00 a0 01 inc %g2
* 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(
2039614: 82 25 00 1c sub %l4, %i4, %g1
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
2039618: 80 a7 20 01 cmp %i4, 1
203961c: 02 80 00 49 be 2039740 <msdos_find_name_in_fat_file+0x920>
2039620: c2 2f 40 00 stb %g1, [ %i5 ]
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
2039624: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
2039628: b6 06 e0 20 add %i3, 0x20, %i3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
203962c: 82 10 60 0f or %g1, 0xf, %g1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
2039630: 80 a6 40 1b cmp %i1, %i3
2039634: 08 80 00 4b bleu 2039760 <msdos_find_name_in_fat_file+0x940><== NEVER TAKEN
2039638: c2 2f 60 0b stb %g1, [ %i5 + 0xb ]
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
203963c: fa 04 60 94 ld [ %l1 + 0x94 ], %i5
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
2039640: b8 07 20 01 inc %i4
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;
2039644: ba 07 40 1b add %i5, %i3, %i5
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
2039648: b0 06 20 20 add %i0, 0x20, %i0
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
203964c: 80 a4 80 1c cmp %l2, %i4
2039650: 12 bf ff 56 bne 20393a8 <msdos_find_name_in_fat_file+0x588>
2039654: b4 06 bf f3 add %i2, -13, %i2
2039658: b4 10 00 10 mov %l0, %i2
203965c: a0 10 00 15 mov %l5, %l0
2039660: aa 10 00 16 mov %l6, %l5
2039664: ec 07 bf ec ld [ %fp + -20 ], %l6
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
2039668: d8 07 a0 5c ld [ %fp + 0x5c ], %o4
203966c: 90 10 00 17 mov %l7, %o0
2039670: 92 10 00 16 mov %l6, %o1
2039674: 94 10 20 01 mov 1, %o2
2039678: 7f ff bb b0 call 2028538 <fat_file_ioctl>
203967c: 96 10 00 15 mov %l5, %o3
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
2039680: 80 a2 20 00 cmp %o0, 0
2039684: 12 bf fe 71 bne 2039048 <msdos_find_name_in_fat_file+0x228><== NEVER TAKEN
2039688: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
203968c: d2 07 bf f4 ld [ %fp + -12 ], %o1
2039690: 80 a2 7f ff cmp %o1, -1
2039694: 02 80 00 3a be 203977c <msdos_find_name_in_fat_file+0x95c>
2039698: f6 20 a0 04 st %i3, [ %g2 + 4 ]
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
203969c: 7f ff 26 11 call 2002ee0 <.umul>
20396a0: 90 10 00 19 mov %i1, %o0
20396a4: 92 10 00 16 mov %l6, %o1
20396a8: 96 10 00 08 mov %o0, %o3
20396ac: 94 10 20 01 mov 1, %o2
20396b0: 90 10 00 17 mov %l7, %o0
20396b4: 7f ff bb a1 call 2028538 <fat_file_ioctl>
20396b8: 98 07 bf f4 add %fp, -12, %o4
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
20396bc: 80 a2 20 00 cmp %o0, 0
20396c0: 12 bf fe 62 bne 2039048 <msdos_find_name_in_fat_file+0x228><== NEVER TAKEN
20396c4: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
20396c8: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
20396cc: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
20396d0: c2 20 e0 08 st %g1, [ %g3 + 8 ]
dir_pos->lname.ofs = lfn_start.ofs;
20396d4: c2 07 bf f8 ld [ %fp + -8 ], %g1
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
20396d8: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
20396dc: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
20396e0: 40 00 44 44 call 204a7f0 <memcpy>
20396e4: 94 10 20 20 mov 0x20, %o2
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
20396e8: b6 10 00 1c mov %i4, %i3
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
20396ec: 96 10 00 18 mov %i0, %o3
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(mt_entry, fat_fd,
20396f0: d8 04 60 94 ld [ %l1 + 0x94 ], %o4
20396f4: 90 10 00 17 mov %l7, %o0
20396f8: 92 10 00 16 mov %l6, %o1
20396fc: 94 05 40 10 add %l5, %l0, %o2
2039700: 7f ff bc 3e call 20287f8 <fat_file_write>
2039704: 98 03 00 10 add %o4, %l0, %o4
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
2039708: 80 a2 3f ff cmp %o0, -1
203970c: 02 80 00 36 be 20397e4 <msdos_find_name_in_fat_file+0x9c4><== NEVER TAKEN
2039710: 80 a2 00 18 cmp %o0, %i0
return ret;
else if (ret != length)
2039714: 12 bf ff 85 bne 2039528 <msdos_find_name_in_fat_file+0x708><== NEVER TAKEN
2039718: fa 07 bf e4 ld [ %fp + -28 ], %i5
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
203971c: a6 04 e0 01 inc %l3
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
2039720: 80 a7 40 1b cmp %i5, %i3
2039724: 06 80 00 1e bl 203979c <msdos_find_name_in_fat_file+0x97c><== ALWAYS TAKEN
2039728: aa 05 40 19 add %l5, %i1, %l5
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
203972c: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
2039730: 10 bf ff 04 b 2039340 <msdos_find_name_in_fat_file+0x520> <== NOT EXECUTED
2039734: a0 10 20 00 clr %l0 <== NOT EXECUTED
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
lfn_start.ofs = dir_entry;
2039738: 10 bf ff 20 b 20393b8 <msdos_find_name_in_fat_file+0x598>
203973c: f6 27 bf f8 st %i3, [ %fp + -8 ]
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
2039740: 82 10 60 40 or %g1, 0x40, %g1
2039744: c2 2f 40 00 stb %g1, [ %i5 ]
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
2039748: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
dir_entry < bts2rd;
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
203974c: b6 06 e0 20 add %i3, 0x20, %i3
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
2039750: 82 10 60 0f or %g1, 0xf, %g1
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
2039754: 80 a6 40 1b cmp %i1, %i3
2039758: 18 bf ff b9 bgu 203963c <msdos_find_name_in_fat_file+0x81c><== ALWAYS TAKEN
203975c: c2 2f 60 0b stb %g1, [ %i5 + 0xb ]
2039760: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED
2039764: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2039768: a0 10 00 15 mov %l5, %l0 <== NOT EXECUTED
203976c: b6 10 00 1c mov %i4, %i3 <== NOT EXECUTED
2039770: aa 10 00 16 mov %l6, %l5 <== NOT EXECUTED
2039774: 10 bf ff df b 20396f0 <msdos_find_name_in_fat_file+0x8d0> <== NOT EXECUTED
2039778: ec 07 bf ec ld [ %fp + -20 ], %l6 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
203977c: 10 bf ff d3 b 20396c8 <msdos_find_name_in_fat_file+0x8a8>
2039780: 82 10 3f ff mov -1, %g1
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
2039784: b6 10 00 10 mov %l0, %i3
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
2039788: 10 bf ff b8 b 2039668 <msdos_find_name_in_fat_file+0x848>
203978c: b0 10 20 20 mov 0x20, %i0
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
2039790: 96 10 20 00 clr %o3 <== NOT EXECUTED
2039794: 10 bf ff d7 b 20396f0 <msdos_find_name_in_fat_file+0x8d0> <== NOT EXECUTED
2039798: b0 10 20 00 clr %i0 <== NOT EXECUTED
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
203979c: 81 c7 e0 08 ret
20397a0: 91 e8 20 00 restore %g0, 0, %o0
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
20397a4: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
20397a8: 15 00 81 ae sethi %hi(0x206b800), %o2 <== NOT EXECUTED
20397ac: 17 00 81 ae sethi %hi(0x206b800), %o3 <== NOT EXECUTED
20397b0: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
20397b4: 92 10 23 c6 mov 0x3c6, %o1 <== NOT EXECUTED
20397b8: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
20397bc: 7f ff c3 c3 call 202a6c8 <__assert_func> <== NOT EXECUTED
20397c0: 96 12 e1 c8 or %o3, 0x1c8, %o3 <== NOT EXECUTED
#endif
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
20397c4: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
20397c8: 15 00 81 ae sethi %hi(0x206b800), %o2 <== NOT EXECUTED
20397cc: 17 00 81 ae sethi %hi(0x206b800), %o3 <== NOT EXECUTED
20397d0: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
20397d4: 92 10 23 f6 mov 0x3f6, %o1 <== NOT EXECUTED
20397d8: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
20397dc: 7f ff c3 bb call 202a6c8 <__assert_func> <== NOT EXECUTED
20397e0: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
20397e4: 81 c7 e0 08 ret <== NOT EXECUTED
20397e8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
20397ec: 81 c7 e0 08 ret <== NOT EXECUTED
20397f0: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
020397f4 <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
)
{
20397f4: 9d e3 bf a0 save %sp, -96, %sp
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) &&
20397f8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
20397fc: 80 a0 60 01 cmp %g1, 1
2039800: 02 80 00 36 be 20398d8 <msdos_find_node_by_cluster_num_in_fat_file+0xe4><== NEVER TAKEN
2039804: e6 06 20 20 ld [ %i0 + 0x20 ], %l3
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
2039808: e4 14 e0 06 lduh [ %l3 + 6 ], %l2
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
203980c: d8 04 e0 94 ld [ %l3 + 0x94 ], %o4
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
2039810: 23 00 00 3f sethi %hi(0xfc00), %l1
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
2039814: a8 10 20 00 clr %l4
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
2039818: a2 14 63 ff or %l1, 0x3ff, %l1
(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(mt_entry, fat_fd, j * bts2rd, bts2rd,
203981c: 90 10 00 18 mov %i0, %o0
2039820: 92 10 00 19 mov %i1, %o1
2039824: 94 10 00 14 mov %l4, %o2
2039828: 7f ff ba 48 call 2028148 <fat_file_read>
203982c: 96 10 00 12 mov %l2, %o3
2039830: 80 a2 20 00 cmp %o0, 0
2039834: 02 80 00 44 be 2039944 <msdos_find_node_by_cluster_num_in_fat_file+0x150><== NEVER TAKEN
2039838: 80 a2 20 1f cmp %o0, 0x1f
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
203983c: 04 80 00 46 ble 2039954 <msdos_find_node_by_cluster_num_in_fat_file+0x160><== NEVER TAKEN
2039840: 80 a2 00 12 cmp %o0, %l2
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
2039844: 12 80 00 4a bne 203996c <msdos_find_node_by_cluster_num_in_fat_file+0x178><== NEVER TAKEN
2039848: a0 10 20 00 clr %l0
203984c: d8 04 e0 94 ld [ %l3 + 0x94 ], %o4
2039850: ba 10 00 0c mov %o4, %i5
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
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)) ==
2039854: c2 0f 40 00 ldub [ %i5 ], %g1
2039858: 80 a0 60 00 cmp %g1, 0
203985c: 02 80 00 1b be 20398c8 <msdos_find_node_by_cluster_num_in_fat_file+0xd4><== NEVER TAKEN
2039860: 80 a0 60 e5 cmp %g1, 0xe5
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)) ==
2039864: 22 80 00 14 be,a 20398b4 <msdos_find_node_by_cluster_num_in_fat_file+0xc0><== NEVER TAKEN
2039868: a0 04 20 20 add %l0, 0x20, %l0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
203986c: c2 17 60 1a lduh [ %i5 + 0x1a ], %g1
2039870: c4 17 60 14 lduh [ %i5 + 0x14 ], %g2
2039874: 83 28 60 10 sll %g1, 0x10, %g1
2039878: 85 28 a0 10 sll %g2, 0x10, %g2
203987c: 89 30 60 18 srl %g1, 0x18, %g4
2039880: 9f 30 a0 18 srl %g2, 0x18, %o7
2039884: 87 30 60 08 srl %g1, 8, %g3
2039888: 85 30 a0 08 srl %g2, 8, %g2
203988c: 86 08 c0 11 and %g3, %l1, %g3
2039890: 84 08 80 11 and %g2, %l1, %g2
2039894: 86 11 00 03 or %g4, %g3, %g3
2039898: 82 13 c0 02 or %o7, %g2, %g1
203989c: 83 28 60 10 sll %g1, 0x10, %g1
20398a0: 82 10 40 03 or %g1, %g3, %g1
20398a4: 80 a0 40 1a cmp %g1, %i2
20398a8: 22 80 00 16 be,a 2039900 <msdos_find_node_by_cluster_num_in_fat_file+0x10c>
20398ac: 90 10 00 18 mov %i0, %o0
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)
20398b0: a0 04 20 20 add %l0, 0x20, %l0
20398b4: 80 a4 00 12 cmp %l0, %l2
20398b8: 0a bf ff e7 bcs 2039854 <msdos_find_node_by_cluster_num_in_fat_file+0x60><== ALWAYS TAKEN
20398bc: ba 07 60 20 add %i5, 0x20, %i5
20398c0: 10 bf ff d7 b 203981c <msdos_find_node_by_cluster_num_in_fat_file+0x28><== NOT EXECUTED
20398c4: a8 05 00 12 add %l4, %l2, %l4 <== NOT EXECUTED
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;
20398c8: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
20398cc: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
20398d0: 81 c7 e0 08 ret <== NOT EXECUTED
20398d4: 81 e8 00 00 restore <== 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) &&
20398d8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 <== NOT EXECUTED
20398dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20398e0: 32 bf ff cb bne,a 203980c <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
20398e4: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
20398e8: c2 0c e0 0a ldub [ %l3 + 0xa ], %g1 <== 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) &&
20398ec: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
20398f0: 22 bf ff c7 be,a 203980c <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
20398f4: e4 14 e0 06 lduh [ %l3 + 6 ], %l2 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
20398f8: 10 bf ff c5 b 203980c <msdos_find_node_by_cluster_num_in_fat_file+0x18><== NOT EXECUTED
20398fc: e4 06 60 18 ld [ %i1 + 0x18 ], %l2 <== NOT EXECUTED
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
2039900: 92 10 00 19 mov %i1, %o1
2039904: 94 10 20 01 mov 1, %o2
2039908: 96 10 00 14 mov %l4, %o3
203990c: 7f ff bb 0b call 2028538 <fat_file_ioctl>
2039910: 98 10 00 1b mov %i3, %o4
&dir_pos->sname.cln);
if (rc != RC_OK)
2039914: b0 92 20 00 orcc %o0, 0, %i0
2039918: 12 bf ff ee bne 20398d0 <msdos_find_node_by_cluster_num_in_fat_file+0xdc><== NEVER TAKEN
203991c: 82 10 3f ff mov -1, %g1
return rc;
dir_pos->sname.ofs = i;
2039920: e0 26 e0 04 st %l0, [ %i3 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2039924: c2 26 e0 08 st %g1, [ %i3 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2039928: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
memcpy(dir_entry, entry,
203992c: 90 10 00 1c mov %i4, %o0
2039930: 92 10 00 1d mov %i5, %o1
2039934: 40 00 43 af call 204a7f0 <memcpy>
2039938: 94 10 20 20 mov 0x20, %o2
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
203993c: 81 c7 e0 08 ret
2039940: 81 e8 00 00 restore
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
2039944: 31 00 00 1f sethi %hi(0x7c00), %i0 <== NOT EXECUTED
2039948: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <PROM_START+0x7d01> <== NOT EXECUTED
203994c: 81 c7 e0 08 ret <== NOT EXECUTED
2039950: 81 e8 00 00 restore <== NOT EXECUTED
while ((ret = fat_file_read(mt_entry, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
2039954: 40 00 36 66 call 20472ec <__errno> <== NOT EXECUTED
2039958: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203995c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2039960: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2039964: 81 c7 e0 08 ret <== NOT EXECUTED
2039968: 81 e8 00 00 restore <== NOT EXECUTED
assert(ret == bts2rd);
203996c: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
2039970: 15 00 81 ae sethi %hi(0x206b800), %o2 <== NOT EXECUTED
2039974: 17 00 81 ae sethi %hi(0x206b800), %o3 <== NOT EXECUTED
2039978: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
203997c: 92 10 26 4b mov 0x64b, %o1 <== NOT EXECUTED
2039980: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED
2039984: 7f ff c3 51 call 202a6c8 <__assert_func> <== NOT EXECUTED
2039988: 96 12 e1 d8 or %o3, 0x1d8, %o3 <== NOT EXECUTED
02021ef0 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
2021ef0: 9d e3 bc e0 save %sp, -800, %sp
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
2021ef4: 92 10 20 02 mov 2, %o1
2021ef8: 90 10 00 19 mov %i1, %o0
2021efc: 15 00 81 9d sethi %hi(0x2067400), %o2
2021f00: 7f ff ff 63 call 2021c8c <msdos_format_printf>
2021f04: 94 12 a2 58 or %o2, 0x258, %o2 ! 2067658 <rtems_rtc_shell_usage+0xca0>
fd = open(devname, O_RDWR);
2021f08: 90 10 00 18 mov %i0, %o0
2021f0c: 7f ff 9f af call 2009dc8 <open>
2021f10: 92 10 20 02 mov 2, %o1
if (fd == -1) {
2021f14: 80 a2 3f ff cmp %o0, -1
2021f18: 02 80 00 5f be 2022094 <msdos_format+0x1a4> <== NEVER TAKEN
2021f1c: ba 10 00 08 mov %o0, %i5
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2021f20: 96 10 00 18 mov %i0, %o3
2021f24: 92 10 20 02 mov 2, %o1
2021f28: 90 10 00 19 mov %i1, %o0
2021f2c: 15 00 81 9d sethi %hi(0x2067400), %o2
2021f30: 7f ff ff 57 call 2021c8c <msdos_format_printf>
2021f34: 94 12 a2 68 or %o2, 0x268, %o2 ! 2067668 <rtems_rtc_shell_usage+0xcb0>
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
2021f38: 92 07 bf a8 add %fp, -88, %o1
2021f3c: 40 00 23 75 call 202ad10 <fstat>
2021f40: 90 10 00 1d mov %i5, %o0
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
2021f44: 92 10 20 01 mov 1, %o1
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
2021f48: b8 10 00 08 mov %o0, %i4
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
2021f4c: 96 10 00 18 mov %i0, %o3
2021f50: 90 10 00 19 mov %i1, %o0
2021f54: 15 00 81 9d sethi %hi(0x2067400), %o2
2021f58: 7f ff ff 4d call 2021c8c <msdos_format_printf>
2021f5c: 94 12 a2 78 or %o2, 0x278, %o2 ! 2067678 <rtems_rtc_shell_usage+0xcc0>
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
2021f60: 80 a7 20 00 cmp %i4, 0
2021f64: 12 80 03 7e bne 2022d5c <msdos_format+0xe6c> <== NEVER TAKEN
2021f68: c4 07 bf b4 ld [ %fp + -76 ], %g2
2021f6c: 03 00 00 3c sethi %hi(0xf000), %g1
2021f70: 84 08 80 01 and %g2, %g1, %g2
2021f74: 03 00 00 18 sethi %hi(0x6000), %g1
2021f78: 80 a0 80 01 cmp %g2, %g1
2021f7c: 22 80 00 0d be,a 2021fb0 <msdos_format+0xc0> <== ALWAYS TAKEN
2021f80: c0 27 bf 58 clr [ %fp + -168 ]
errno = ENOTTY;
2021f84: 40 00 94 da call 20472ec <__errno> <== NOT EXECUTED
2021f88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2021f8c: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED
2021f90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
2021f94: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
2021f98: 02 80 00 4c be 20220c8 <msdos_format+0x1d8> <== NEVER TAKEN
2021f9c: 01 00 00 00 nop
close(fd);
2021fa0: 7f ff 9a d5 call 2008af4 <close>
2021fa4: 90 10 00 1d mov %i5, %o0
}
return ret_val;
}
2021fa8: 81 c7 e0 08 ret
2021fac: 81 e8 00 00 restore
uint32_t fatdata_sect_cnt;
uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
memset(fmt_params,0,sizeof(*fmt_params));
2021fb0: c0 27 bf 5c clr [ %fp + -164 ]
2021fb4: c0 27 bf 60 clr [ %fp + -160 ]
2021fb8: c0 27 bf 64 clr [ %fp + -156 ]
2021fbc: c0 27 bf 68 clr [ %fp + -152 ]
2021fc0: c0 27 bf 6c clr [ %fp + -148 ]
2021fc4: c0 27 bf 70 clr [ %fp + -144 ]
2021fc8: c0 27 bf 74 clr [ %fp + -140 ]
2021fcc: c0 27 bf 78 clr [ %fp + -136 ]
2021fd0: c0 27 bf 7c clr [ %fp + -132 ]
2021fd4: c0 27 bf 80 clr [ %fp + -128 ]
2021fd8: c0 27 bf 84 clr [ %fp + -124 ]
2021fdc: c0 27 bf 88 clr [ %fp + -120 ]
2021fe0: c0 27 bf 8c clr [ %fp + -116 ]
2021fe4: c0 27 bf 90 clr [ %fp + -112 ]
2021fe8: c0 27 bf 94 clr [ %fp + -108 ]
2021fec: c0 27 bf 98 clr [ %fp + -104 ]
2021ff0: c0 27 bf 9c clr [ %fp + -100 ]
2021ff4: c0 27 bf a0 clr [ %fp + -96 ]
2021ff8: c0 27 bf a4 clr [ %fp + -92 ]
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
}
static inline int rtems_disk_fd_get_block_size(int fd, uint32_t *block_size)
{
return ioctl(fd, RTEMS_BLKIO_GETBLKSIZE, block_size);
2021ffc: 90 10 00 1d mov %i5, %o0
2022000: 37 10 01 10 sethi %hi(0x40044000), %i3
2022004: 94 07 bf 58 add %fp, -168, %o2
2022008: 7f ff 9b cf call 2008f44 <ioctl>
202200c: 92 16 e2 03 or %i3, 0x203, %o1
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
2022010: b8 92 20 00 orcc %o0, 0, %i4
2022014: 02 80 01 50 be 2022554 <msdos_format+0x664> <== ALWAYS TAKEN
2022018: 90 10 00 1d mov %i5, %o0
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
202201c: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
2022020: e0 07 bf 60 ld [ %fp + -160 ], %l0 <== NOT EXECUTED
2022024: f0 07 bf 68 ld [ %fp + -152 ], %i0 <== NOT EXECUTED
2022028: f4 0f bf 88 ldub [ %fp + -120 ], %i2 <== NOT EXECUTED
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
202202c: 90 10 00 1a mov %i2, %o0
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
2022030: 80 a6 e0 00 cmp %i3, 0
2022034: 12 80 00 45 bne 2022148 <msdos_format+0x258> <== ALWAYS TAKEN
2022038: 92 10 00 18 mov %i0, %o1
/*
* 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);
202203c: 7f ff 83 a9 call 2002ee0 <.umul> <== NOT EXECUTED
2022040: 01 00 00 00 nop <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
2022044: c2 07 bf 64 ld [ %fp + -156 ], %g1 <== NOT EXECUTED
/*
* 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);
2022048: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
202204c: c2 27 bf 7c st %g1, [ %fp + -132 ] <== NOT EXECUTED
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
2022050: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2022054: 12 80 00 44 bne 2022164 <msdos_format+0x274> <== NOT EXECUTED
2022058: d0 27 bf 78 st %o0, [ %fp + -136 ] <== NOT EXECUTED
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
202205c: 03 00 81 98 sethi %hi(0x2066000), %g1
if ((rqdata != NULL) &&
2022060: 80 a6 60 00 cmp %i1, 0
2022064: 02 80 00 06 be 202207c <msdos_format+0x18c> <== NEVER TAKEN
2022068: 88 10 62 88 or %g1, 0x288, %g4
(rqdata->OEMName != NULL)) {
202206c: c8 06 40 00 ld [ %i1 ], %g4
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) &&
2022070: 80 a1 20 00 cmp %g4, 0
2022074: 22 80 00 02 be,a 202207c <msdos_format+0x18c> <== NEVER TAKEN
2022078: 88 10 62 88 or %g1, 0x288, %g4 <== NOT EXECUTED
202207c: 03 00 81 c1 sethi %hi(0x2070400), %g1
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
2022080: 84 10 20 08 mov 8, %g2
if ((rqdata != NULL) &&
2022084: f6 00 62 38 ld [ %g1 + 0x238 ], %i3
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
2022088: b4 10 20 20 mov 0x20, %i2
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
202208c: 10 80 00 16 b 20220e4 <msdos_format+0x1f4>
2022090: 82 07 bf 8b add %fp, -117, %g1
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022094: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2022098: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
202209c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
20220a0: 15 00 81 9d sethi %hi(0x2067400), %o2 <== NOT EXECUTED
20220a4: 7f ff fe fa call 2021c8c <msdos_format_printf> <== NOT EXECUTED
20220a8: 94 12 a2 68 or %o2, 0x268, %o2 ! 2067668 <rtems_rtc_shell_usage+0xcb0><== NOT EXECUTED
if (ret_val == 0) {
rc = fstat(fd, &stat_buf);
ret_val = rc;
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
20220ac: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
20220b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20220b4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20220b8: 15 00 81 9d sethi %hi(0x2067400), %o2 <== NOT EXECUTED
20220bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20220c0: 7f ff fe f3 call 2021c8c <msdos_format_printf> <== NOT EXECUTED
20220c4: 94 12 a2 78 or %o2, 0x278, %o2 <== NOT EXECUTED
20220c8: 81 c7 e0 08 ret <== NOT EXECUTED
20220cc: 81 e8 00 00 restore <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
20220d0: 82 00 60 01 inc %g1
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
20220d4: c0 28 40 00 clrb [ %g1 ]
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
20220d8: 84 80 bf ff addcc %g2, -1, %g2
20220dc: 02 80 00 0e be 2022114 <msdos_format+0x224> <== NEVER TAKEN
20220e0: 88 01 20 01 inc %g4
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
20220e4: c6 09 00 00 ldub [ %g4 ], %g3
20220e8: b8 08 e0 ff and %g3, 0xff, %i4
20220ec: b8 06 c0 1c add %i3, %i4, %i4
20220f0: f8 4f 20 01 ldsb [ %i4 + 1 ], %i4
20220f4: 80 8f 20 97 btst 0x97, %i4
20220f8: 32 bf ff f6 bne,a 20220d0 <msdos_format+0x1e0>
20220fc: c6 28 40 00 stb %g3, [ %g1 ]
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
2022100: f4 28 40 00 stb %i2, [ %g1 ]
2022104: 82 00 60 01 inc %g1
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
2022108: 84 80 bf ff addcc %g2, -1, %g2
202210c: 12 bf ff f6 bne 20220e4 <msdos_format+0x1f4>
2022110: c0 28 40 00 clrb [ %g1 ]
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) &&
2022114: 80 a6 60 00 cmp %i1, 0
2022118: 02 80 02 7c be 2022b08 <msdos_format+0xc18> <== NEVER TAKEN
202211c: 09 00 81 95 sethi %hi(0x2065400), %g4
(rqdata->VolLabel != NULL)) {
2022120: c8 06 60 04 ld [ %i1 + 4 ], %g4
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) &&
2022124: 80 a1 20 00 cmp %g4, 0
2022128: 22 80 02 78 be,a 2022b08 <msdos_format+0xc18> <== NEVER TAKEN
202212c: 09 00 81 95 sethi %hi(0x2065400), %g4 <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
2022130: 82 10 20 01 mov 1, %g1
2022134: c2 2f bf a0 stb %g1, [ %fp + -96 ]
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
2022138: 84 10 20 0b mov 0xb, %g2
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
202213c: 82 07 bf 94 add %fp, -108, %g1
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
2022140: 10 80 01 d0 b 2022880 <msdos_format+0x990>
2022144: b4 10 20 20 mov 0x20, %i2
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
2022148: 7f ff 83 66 call 2002ee0 <.umul>
202214c: 01 00 00 00 nop
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
2022150: f6 27 bf 7c st %i3, [ %fp + -132 ]
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
2022154: 90 02 00 10 add %o0, %l0, %o0
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
2022158: 80 a7 20 00 cmp %i4, 0
202215c: 02 bf ff c0 be 202205c <msdos_format+0x16c> <== ALWAYS TAKEN
2022160: d0 27 bf 78 st %o0, [ %fp + -136 ]
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
2022164: 40 00 94 62 call 20472ec <__errno> <== NOT EXECUTED
2022168: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202216c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2022170: 82 10 20 00 clr %g1 <== NOT EXECUTED
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
2022174: 80 88 60 ff btst 0xff, %g1
2022178: 02 80 01 b7 be 2022854 <msdos_format+0x964> <== NEVER TAKEN
202217c: 80 a6 20 00 cmp %i0, 0
(rqdata != NULL) &&
2022180: c2 0e 60 16 ldub [ %i1 + 0x16 ], %g1
2022184: 80 a0 60 00 cmp %g1, 0
2022188: 02 80 01 ab be 2022834 <msdos_format+0x944> <== ALWAYS TAKEN
202218c: 90 10 00 19 mov %i1, %o0
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022190: 92 10 20 02 mov 2, %o1
2022194: 15 00 81 9d sethi %hi(0x2067400), %o2
2022198: 7f ff fe bd call 2021c8c <msdos_format_printf>
202219c: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 20676f8 <rtems_rtc_shell_usage+0xd40>
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
20221a0: 90 10 00 1d mov %i5, %o0
/*
* 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,
20221a4: f8 07 bf 58 ld [ %fp + -168 ], %i4
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
20221a8: 92 10 20 00 clr %o1
20221ac: 94 10 20 00 clr %o2
20221b0: 40 00 26 1f call 202ba2c <lseek>
20221b4: 96 10 20 00 clr %o3
20221b8: 80 a2 20 00 cmp %o0, 0
20221bc: 06 80 01 aa bl 2022864 <msdos_format+0x974> <== NEVER TAKEN
20221c0: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
20221c4: 92 07 bd 58 add %fp, -680, %o1
20221c8: 7f ff 9f a7 call 200a064 <read>
20221cc: 94 10 00 1c mov %i4, %o2
20221d0: 80 a2 20 00 cmp %o0, 0
20221d4: 06 80 01 a4 bl 2022864 <msdos_format+0x974> <== NEVER TAKEN
20221d8: 90 10 00 19 mov %i1, %o0
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,
20221dc: 92 10 20 02 mov 2, %o1
20221e0: 15 00 81 9d sethi %hi(0x2067400), %o2
20221e4: 7f ff fe aa call 2021c8c <msdos_format_printf>
20221e8: 94 12 a3 48 or %o2, 0x348, %o2 ! 2067748 <rtems_rtc_shell_usage+0xd90>
{
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) {
20221ec: e0 07 bf 5c ld [ %fp + -164 ], %l0
20221f0: 35 00 00 3f sethi %hi(0xfc00), %i2
20221f4: b4 16 a3 ff or %i2, 0x3ff, %i2 ! ffff <PROM_START+0xffff>
20221f8: 80 a4 00 1a cmp %l0, %i2
20221fc: 08 80 01 ce bleu 2022934 <msdos_format+0xa44> <== ALWAYS TAKEN
2022200: a4 10 00 10 mov %l0, %l2
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)) {
2022204: b4 0c 00 1a and %l0, %i2, %i2 <== NOT EXECUTED
2022208: b6 10 00 10 mov %l0, %i3 <== NOT EXECUTED
202220c: b1 34 20 10 srl %l0, 0x10, %i0 <== NOT EXECUTED
2022210: b5 36 a0 08 srl %i2, 8, %i2 <== NOT EXECUTED
2022214: a1 34 20 18 srl %l0, 0x18, %l0 <== NOT EXECUTED
{
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) {
2022218: a2 10 20 00 clr %l1 <== NOT EXECUTED
202221c: a4 10 20 00 clr %l2 <== NOT EXECUTED
* 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);
2022220: 92 10 20 00 clr %o1
2022224: 94 10 21 be mov 0x1be, %o2
2022228: 40 00 a1 fe call 204aa20 <memset>
202222c: 90 07 bd 58 add %fp, -680, %o0
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
2022230: 90 07 bd 5b add %fp, -677, %o0
* 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);
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
2022234: c0 37 bf 56 clrh [ %fp + -170 ]
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
2022238: 92 07 bf 8b add %fp, -117, %o1
202223c: 40 00 a1 6d call 204a7f0 <memcpy>
2022240: 94 10 20 08 mov 8, %o2
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 */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
2022244: c2 07 bf 70 ld [ %fp + -144 ], %g1
* 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);
2022248: c6 07 bf 58 ld [ %fp + -168 ], %g3
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 */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
202224c: 9b 30 60 08 srl %g1, 8, %o5
2022250: c2 2f bd 69 stb %g1, [ %fp + -663 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
2022254: c2 0f bf 89 ldub [ %fp + -119 ], %g1
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);
2022258: c4 07 bf 60 ld [ %fp + -160 ], %g2
* 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);
202225c: 97 30 e0 08 srl %g3, 8, %o3
2022260: c6 2f bd 63 stb %g3, [ %fp + -669 ]
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
2022264: c6 07 bf 64 ld [ %fp + -156 ], %g3
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) {
2022268: f8 0f bf 8a ldub [ %fp + -118 ], %i4
/* 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);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
202226c: c2 2f bd 6d stb %g1, [ %fp + -659 ]
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
2022270: 82 10 3f ff mov -1, %g1
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);
2022274: 99 30 a0 08 srl %g2, 8, %o4
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
2022278: 9e 10 20 02 mov 2, %o7
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... */
202227c: 88 10 20 01 mov 1, %g4
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);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
2022280: c2 2f bd 70 stb %g1, [ %fp + -656 ]
* 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);
2022284: d6 2f bd 64 stb %o3, [ %fp + -668 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
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... */
2022288: 82 10 20 06 mov 6, %g1
*/
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);
202228c: c6 2f bd 65 stb %g3, [ %fp + -667 ]
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
2022290: c4 2f bd 66 stb %g2, [ %fp + -666 ]
2022294: d8 2f bd 67 stb %o4, [ %fp + -665 ]
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
2022298: de 2f bd 68 stb %o7, [ %fp + -664 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
202229c: da 2f bd 6a stb %o5, [ %fp + -662 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
20222a0: e4 2f bd 6b stb %l2, [ %fp + -661 ]
20222a4: e2 2f bd 6c stb %l1, [ %fp + -660 ]
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... */
20222a8: c2 2f bd 72 stb %g1, [ %fp + -654 ]
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
20222ac: c8 2f bd 74 stb %g4, [ %fp + -652 ]
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
20222b0: f6 2f bd 78 stb %i3, [ %fp + -648 ]
20222b4: f4 2f bd 79 stb %i2, [ %fp + -647 ]
20222b8: f0 2f bd 7a stb %i0, [ %fp + -646 ]
if (fmt_params->fattype != FAT_FAT32) {
20222bc: 80 a7 20 04 cmp %i4, 4
20222c0: 02 80 02 50 be 2022c00 <msdos_format+0xd10> <== NEVER TAKEN
20222c4: e0 2f bd 7b stb %l0, [ %fp + -645 ]
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 */
20222c8: c2 07 bf a4 ld [ %fp + -92 ], %g1
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);
20222cc: c4 07 bf 68 ld [ %fp + -152 ], %g2
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 */
20222d0: 89 30 60 10 srl %g1, 0x10, %g4
20222d4: 87 30 60 18 srl %g1, 0x18, %g3
20222d8: b7 30 60 08 srl %g1, 8, %i3
20222dc: c2 2f bd 7f stb %g1, [ %fp + -641 ]
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);
20222e0: 82 10 20 29 mov 0x29, %g1
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);
20222e4: b5 30 a0 08 srl %g2, 8, %i2
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);
20222e8: c2 2f bd 7e stb %g1, [ %fp + -642 ]
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);
20222ec: c4 2f bd 6e stb %g2, [ %fp + -658 ]
20222f0: f4 2f bd 6f stb %i2, [ %fp + -657 ]
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 */
20222f4: f6 2f bd 80 stb %i3, [ %fp + -640 ]
20222f8: c8 2f bd 81 stb %g4, [ %fp + -639 ]
20222fc: c6 2f bd 82 stb %g3, [ %fp + -638 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
2022300: 90 07 bd 83 add %fp, -637, %o0
2022304: 92 07 bf 94 add %fp, -108, %o1
2022308: 40 00 a1 3a call 204a7f0 <memcpy>
202230c: 94 10 20 0b mov 0xb, %o2
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
2022310: 03 00 81 9d sethi %hi(0x2067400), %g1
2022314: 80 a7 20 01 cmp %i4, 1
2022318: 02 80 02 6e be 2022cd0 <msdos_format+0xde0> <== ALWAYS TAKEN
202231c: 82 10 62 48 or %g1, 0x248, %g1
2022320: c4 10 40 00 lduh [ %g1 ], %g2
2022324: c4 37 bd 8e sth %g2, [ %fp + -626 ]
2022328: c4 10 60 02 lduh [ %g1 + 2 ], %g2
202232c: c4 37 bd 90 sth %g2, [ %fp + -624 ]
2022330: c4 10 60 04 lduh [ %g1 + 4 ], %g2
2022334: c4 37 bd 92 sth %g2, [ %fp + -622 ]
2022338: c2 10 60 06 lduh [ %g1 + 6 ], %g1
202233c: c2 37 bd 94 sth %g1, [ %fp + -620 ]
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
2022340: 82 10 20 55 mov 0x55, %g1
2022344: c2 2f bf 56 stb %g1, [ %fp + -170 ]
2022348: 82 10 3f aa mov -86, %g1
202234c: c2 2f bf 57 stb %g1, [ %fp + -169 ]
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
2022350: 82 10 3f eb mov -21, %g1
2022354: c2 2f bd 58 stb %g1, [ %fp + -680 ]
FAT_SET_VAL8(mbr,1,0x3c);
2022358: 82 10 20 3c mov 0x3c, %g1
202235c: c2 2f bd 59 stb %g1, [ %fp + -679 ]
FAT_SET_VAL8(mbr,2,0x90);
2022360: 82 10 3f 90 mov -112, %g1
/*
* 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,
2022364: 92 10 20 02 mov 2, %o1
2022368: 90 10 00 19 mov %i1, %o0
/*
* 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);
202236c: c2 2f bd 5a stb %g1, [ %fp + -678 ]
/*
* 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,
2022370: 15 00 81 9d sethi %hi(0x2067400), %o2
2022374: 7f ff fe 46 call 2021c8c <msdos_format_printf>
2022378: 94 12 a3 10 or %o2, 0x310, %o2 ! 2067710 <rtems_rtc_shell_usage+0xd58>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
202237c: d4 07 bf 58 ld [ %fp + -168 ], %o2
2022380: 90 10 00 1d mov %i5, %o0
2022384: 92 10 20 00 clr %o1
2022388: 7f ff fe 56 call 2021ce0 <msdos_format_write_sec>
202238c: 96 07 bd 58 add %fp, -680, %o3
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
2022390: b0 92 20 00 orcc %o0, 0, %i0
2022394: 12 bf ff 00 bne 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
2022398: c2 07 bf 80 ld [ %fp + -128 ], %g1
202239c: 80 a0 60 00 cmp %g1, 0
20223a0: 12 80 01 cc bne 2022ad0 <msdos_format+0xbe0> <== NEVER TAKEN
20223a4: 92 10 20 02 mov 2, %o1
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
20223a8: f8 07 bf 84 ld [ %fp + -124 ], %i4
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
20223ac: 80 a7 20 00 cmp %i4, 0
20223b0: 12 80 01 9e bne 2022a28 <msdos_format+0xb38> <== NEVER TAKEN
20223b4: d2 07 bf 68 ld [ %fp + -152 ], %o1
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
(rqdata,
20223b8: d0 0f bf 88 ldub [ %fp + -120 ], %o0
20223bc: 7f ff 82 c9 call 2002ee0 <.umul>
20223c0: f8 07 bf 60 ld [ %fp + -160 ], %i4
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
20223c4: d8 07 bf 58 ld [ %fp + -168 ], %o4
(rqdata,
20223c8: 96 10 00 08 mov %o0, %o3
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
20223cc: 92 10 00 1d mov %i5, %o1
20223d0: 90 10 00 19 mov %i1, %o0
20223d4: 94 10 00 1c mov %i4, %o2
20223d8: 7f ff fe 5a call 2021d40 <msdos_format_fill_sectors>
20223dc: 9a 10 20 00 clr %o5
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
20223e0: b0 92 20 00 orcc %o0, 0, %i0
20223e4: 12 bf fe ec bne 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
20223e8: d4 1f bf 78 ldd [ %fp + -136 ], %o2
ret_val = msdos_format_fill_sectors
20223ec: d8 07 bf 58 ld [ %fp + -168 ], %o4
20223f0: 90 10 00 19 mov %i1, %o0
20223f4: 92 10 00 1d mov %i5, %o1
20223f8: 7f ff fe 52 call 2021d40 <msdos_format_fill_sectors>
20223fc: 9a 10 20 00 clr %o5
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
2022400: b0 92 20 00 orcc %o0, 0, %i0
2022404: 12 bf fe e4 bne 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
2022408: c2 0f bf a0 ldub [ %fp + -96 ], %g1
202240c: 80 a0 60 00 cmp %g1, 0
2022410: 02 bf fe e2 be 2021f98 <msdos_format+0xa8> <== NEVER TAKEN
2022414: 80 a7 7f ff cmp %i5, -1
memset(tmp_sec,0,sizeof(tmp_sec));
2022418: 92 10 20 00 clr %o1
202241c: 94 10 22 00 mov 0x200, %o2
2022420: 40 00 a1 80 call 204aa20 <memset>
2022424: 90 07 bd 58 add %fp, -680, %o0
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
2022428: c2 0f bf 9e ldub [ %fp + -98 ], %g1
202242c: c6 07 bf 98 ld [ %fp + -104 ], %g3
2022430: c4 17 bf 9c lduh [ %fp + -100 ], %g2
2022434: c8 07 bf 94 ld [ %fp + -108 ], %g4
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
2022438: d2 07 bf 78 ld [ %fp + -136 ], %o1
202243c: d4 07 bf 58 ld [ %fp + -168 ], %o2
/*
* 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);
2022440: c2 2f bd 62 stb %g1, [ %fp + -670 ]
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
2022444: 82 10 20 08 mov 8, %g1
/*
* 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);
2022448: c8 27 bd 58 st %g4, [ %fp + -680 ]
202244c: c6 27 bd 5c st %g3, [ %fp + -676 ]
2022450: c4 37 bd 60 sth %g2, [ %fp + -672 ]
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
2022454: 90 10 00 1d mov %i5, %o0
* 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;
2022458: c2 2f bd 63 stb %g1, [ %fp + -669 ]
ret_val = msdos_format_write_sec
202245c: 7f ff fe 21 call 2021ce0 <msdos_format_write_sec>
2022460: 96 07 bd 58 add %fp, -680, %o3
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if ((ret_val == 0) && fmt_params.VolLabel_present){
2022464: b0 92 20 00 orcc %o0, 0, %i0
2022468: 12 bf fe cb bne 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
202246c: c2 0f bf a0 ldub [ %fp + -96 ], %g1
2022470: 80 a0 60 00 cmp %g1, 0
2022474: 02 bf fe c8 be 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
2022478: 90 07 bd 58 add %fp, -680, %o0
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
202247c: 92 10 20 00 clr %o1
2022480: 40 00 a1 68 call 204aa20 <memset>
2022484: 94 10 22 00 mov 0x200, %o2
switch(fmt_params.fattype) {
2022488: c2 0f bf 8a ldub [ %fp + -118 ], %g1
202248c: 80 a0 60 02 cmp %g1, 2
2022490: 02 80 01 a0 be 2022b10 <msdos_format+0xc20> <== NEVER TAKEN
2022494: 80 a0 60 04 cmp %g1, 4
2022498: 02 80 01 b2 be 2022b60 <msdos_format+0xc70> <== NEVER TAKEN
202249c: 80 a0 60 01 cmp %g1, 1
20224a0: 02 80 01 a7 be 2022b3c <msdos_format+0xc4c> <== ALWAYS TAKEN
20224a4: c4 0f bf 89 ldub [ %fp + -119 ], %g2
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
errno = EINVAL;
20224a8: 40 00 93 91 call 20472ec <__errno> <== NOT EXECUTED
20224ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20224b0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20224b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
20224b8: c2 0f bf 8a ldub [ %fp + -118 ], %g1 <== NOT EXECUTED
20224bc: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED
20224c0: 12 bf fe b6 bne 2021f98 <msdos_format+0xa8> <== NOT EXECUTED
20224c4: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
20224c8: 82 10 20 00 clr %g1 <== NOT EXECUTED
/*
* 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);
20224cc: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
20224d0: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
20224d4: c4 2f bd 61 stb %g2, [ %fp + -671 ] <== NOT EXECUTED
20224d8: c4 2f bd 62 stb %g2, [ %fp + -670 ] <== NOT EXECUTED
20224dc: c6 2f bd 60 stb %g3, [ %fp + -672 ] <== NOT EXECUTED
20224e0: 84 10 20 0f mov 0xf, %g2 <== NOT EXECUTED
20224e4: c4 2f bd 63 stb %g2, [ %fp + -669 ] <== NOT EXECUTED
}
for (i = 0;
20224e8: 80 88 60 ff btst 0xff, %g1
20224ec: 02 bf fe aa be 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
20224f0: d2 07 bf 68 ld [ %fp + -152 ], %o1
20224f4: 10 80 00 04 b 2022504 <msdos_format+0x614>
20224f8: b8 10 20 00 clr %i4
20224fc: 12 bf fe a6 bne 2021f94 <msdos_format+0xa4> <== NEVER TAKEN
2022500: d2 07 bf 68 ld [ %fp + -152 ], %o1
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
(fd,
fmt_params.rsvd_sector_cnt
+ (i * fmt_params.sectors_per_fat),
2022504: 7f ff 82 77 call 2002ee0 <.umul>
2022508: 90 10 00 1c mov %i4, %o0
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
(fd,
202250c: d2 07 bf 60 ld [ %fp + -160 ], %o1
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
2022510: d4 07 bf 58 ld [ %fp + -168 ], %o2
(fd,
2022514: 92 02 00 09 add %o0, %o1, %o1
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
2022518: 96 07 bd 58 add %fp, -680, %o3
202251c: 7f ff fd f1 call 2021ce0 <msdos_format_write_sec>
2022520: 90 10 00 1d mov %i5, %o0
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
2022524: c4 0f bf 88 ldub [ %fp + -120 ], %g2
i++) {
2022528: b8 07 20 01 inc %i4
ret_val = msdos_format_write_sec
202252c: b0 10 00 08 mov %o0, %i0
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
2022530: 80 a0 80 1c cmp %g2, %i4
2022534: 14 80 00 03 bg 2022540 <msdos_format+0x650>
2022538: 82 10 20 01 mov 1, %g1
202253c: 82 10 20 00 clr %g1
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
2022540: 80 88 60 ff btst 0xff, %g1
2022544: 32 bf ff ee bne,a 20224fc <msdos_format+0x60c>
2022548: 80 a6 20 00 cmp %i0, 0
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
202254c: 10 bf fe 93 b 2021f98 <msdos_format+0xa8>
2022550: 80 a7 7f ff cmp %i5, -1
static inline int rtems_disk_fd_get_block_count(
int fd,
rtems_blkdev_bnum *block_count
)
{
return ioctl(fd, RTEMS_BLKIO_GETSIZE, block_count);
2022554: 92 16 e2 05 or %i3, 0x205, %o1
2022558: 7f ff 9a 7b call 2008f44 <ioctl>
202255c: 94 07 bf 5c add %fp, -164, %o2
ret_val = rtems_disk_fd_get_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_count(fd, &fmt_params->totl_sector_cnt);
}
if (ret_val == 0) {
2022560: b8 92 20 00 orcc %o0, 0, %i4
2022564: 12 bf fe ae bne 202201c <msdos_format+0x12c> <== NEVER TAKEN
2022568: e0 07 bf 58 ld [ %fp + -168 ], %l0
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
202256c: f0 07 bf 5c ld [ %fp + -164 ], %i0
2022570: 92 10 00 10 mov %l0, %o1
2022574: 7f ff 82 5b call 2002ee0 <.umul>
2022578: 90 10 00 18 mov %i0, %o0
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
202257c: 9a 10 20 00 clr %o5
}
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;
2022580: b6 10 00 08 mov %o0, %i3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022584: d0 23 a0 5c st %o0, [ %sp + 0x5c ]
}
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;
2022588: b4 10 20 00 clr %i2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
202258c: 92 10 20 02 mov 2, %o1
2022590: f4 3f bd 50 std %i2, [ %fp + -688 ]
2022594: 90 10 00 19 mov %i1, %o0
2022598: 96 10 00 10 mov %l0, %o3
202259c: 15 00 81 9d sethi %hi(0x2067400), %o2
20225a0: 98 10 00 18 mov %i0, %o4
20225a4: 7f ff fd ba call 2021c8c <msdos_format_printf>
20225a8: 94 12 a2 88 or %o2, 0x288, %o2
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
20225ac: 80 a6 60 00 cmp %i1, 0
20225b0: 02 80 01 bf be 2022cac <msdos_format+0xdbc> <== NEVER TAKEN
20225b4: 82 10 20 02 mov 2, %g1
(rqdata->fat_num == 0)) {
20225b8: d6 06 60 0c ld [ %i1 + 0xc ], %o3
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
20225bc: 80 a2 e0 00 cmp %o3, 0
20225c0: 12 80 00 d6 bne 2022918 <msdos_format+0xa28> <== NEVER TAKEN
20225c4: 80 a2 e0 06 cmp %o3, 6
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
20225c8: 82 10 20 02 mov 2, %g1
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
20225cc: 90 10 00 19 mov %i1, %o0
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
20225d0: c2 2f bf 88 stb %g1, [ %fp + -120 ]
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
20225d4: 92 10 20 02 mov 2, %o1
20225d8: 96 10 20 02 mov 2, %o3
20225dc: 15 00 81 9d sethi %hi(0x2067400), %o2
20225e0: 7f ff fd ab call 2021c8c <msdos_format_printf>
20225e4: 94 12 a2 c0 or %o2, 0x2c0, %o2 ! 20676c0 <rtems_rtc_shell_usage+0xd08>
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
20225e8: 82 10 20 01 mov 1, %g1
20225ec: c2 27 bf 64 st %g1, [ %fp + -156 ]
if ((rqdata != NULL) &&
20225f0: c2 0e 60 14 ldub [ %i1 + 0x14 ], %g1
20225f4: 80 a0 60 01 cmp %g1, 1
20225f8: 02 80 00 bb be 20228e4 <msdos_format+0x9f4> <== NEVER TAKEN
20225fc: 80 a0 60 02 cmp %g1, 2
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
2022600: 02 80 00 b9 be 20228e4 <msdos_format+0x9f4> <== NEVER TAKEN
2022604: 80 a0 60 03 cmp %g1, 3
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
2022608: 02 80 00 b6 be 20228e0 <msdos_format+0x9f0> <== NEVER TAKEN
202260c: 80 a0 60 00 cmp %g1, 0
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
2022610: 12 80 00 ff bne 2022a0c <msdos_format+0xb1c> <== NEVER TAKEN
2022614: c2 07 bf 5c ld [ %fp + -164 ], %g1
/*
* 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
*/
if (fmt_params->totl_sector_cnt
2022618: 05 00 00 1f sethi %hi(0x7c00), %g2
202261c: 84 10 a3 a7 or %g2, 0x3a7, %g2 ! 7fa7 <PROM_START+0x7fa7>
2022620: 80 a0 40 02 cmp %g1, %g2
2022624: 18 80 01 63 bgu 2022bb0 <msdos_format+0xcc0> <== NEVER TAKEN
2022628: 05 00 07 ff sethi %hi(0x1ffc00), %g2
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
202262c: 82 10 20 01 mov 1, %g1
2022630: c2 2f bf 8a stb %g1, [ %fp + -118 ]
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
2022634: 82 10 20 02 mov 2, %g1
2022638: c2 27 bf 64 st %g1, [ %fp + -156 ]
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
202263c: 80 a6 60 00 cmp %i1, 0
2022640: 32 80 00 ab bne,a 20228ec <msdos_format+0x9fc> <== ALWAYS TAKEN
2022644: c2 06 60 08 ld [ %i1 + 8 ], %g1
2022648: c4 07 bf 64 ld [ %fp + -156 ], %g2 <== NOT EXECUTED
202264c: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
*/
for (onebit = 128;onebit >= 1;onebit = onebit>>1) {
if (fmt_params->sectors_per_cluster >= onebit) {
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
2022650: f0 07 bf 58 ld [ %fp + -168 ], %i0 <== NOT EXECUTED
2022654: b4 10 20 08 mov 8, %i2
2022658: b6 10 20 80 mov 0x80, %i3
* 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) {
202265c: 80 a6 c0 01 cmp %i3, %g1
2022660: 38 80 00 aa bgu,a 2022908 <msdos_format+0xa18>
2022664: b4 86 bf ff addcc %i2, -1, %i2
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
<= 32768L/fmt_params->bytes_per_sector) {
2022668: 11 00 00 20 sethi %hi(0x8000), %o0
202266c: 40 00 f9 0c call 2060a9c <.udiv>
2022670: 92 10 00 18 mov %i0, %o1
* 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
2022674: 80 a2 00 1b cmp %o0, %i3
2022678: 0a 80 00 a3 bcs 2022904 <msdos_format+0xa14> <== NEVER TAKEN
202267c: 84 10 00 1b mov %i3, %g2
2022680: f6 27 bf 64 st %i3, [ %fp + -156 ]
}
}
}
}
if (ret_val == 0) {
2022684: 80 a7 20 00 cmp %i4, 0
2022688: 12 bf fe 65 bne 202201c <msdos_format+0x12c> <== NEVER TAKEN
202268c: d6 07 bf 64 ld [ %fp + -156 ], %o3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022690: 90 10 00 19 mov %i1, %o0
2022694: 92 10 20 02 mov 2, %o1
2022698: 15 00 81 9d sethi %hi(0x2067400), %o2
202269c: 7f ff fd 7c call 2021c8c <msdos_format_printf>
20226a0: 94 12 a2 d8 or %o2, 0x2d8, %o2 ! 20676d8 <rtems_rtc_shell_usage+0xd20>
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
20226a4: e6 0f bf 8a ldub [ %fp + -118 ], %l3
20226a8: 80 a4 e0 04 cmp %l3, 4
20226ac: 02 80 01 4a be 2022bd4 <msdos_format+0xce4> <== NEVER TAKEN
20226b0: 82 10 20 01 mov 1, %g1
/* 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) &&
20226b4: 80 a6 60 00 cmp %i1, 0
20226b8: 02 80 00 06 be 20226d0 <msdos_format+0x7e0> <== NEVER TAKEN
20226bc: c2 27 bf 60 st %g1, [ %fp + -160 ]
(rqdata->files_per_root_dir > 0)) {
20226c0: f6 06 60 10 ld [ %i1 + 0x10 ], %i3
/* 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) &&
20226c4: 80 a6 e0 00 cmp %i3, 0
20226c8: 12 80 00 07 bne 20226e4 <msdos_format+0x7f4> <== NEVER TAKEN
20226cc: b6 06 ff ff add %i3, -1, %i3
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
}
else {
if (fmt_params->fattype == FAT_FAT16) {
20226d0: 82 1c e0 02 xor %l3, 2, %g1
20226d4: 80 a0 00 01 cmp %g0, %g1
20226d8: b6 40 3f ff addx %g0, -1, %i3
20226dc: b6 0e e1 c0 and %i3, 0x1c0, %i3
20226e0: b6 06 e0 3f add %i3, 0x3f, %i3
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
20226e4: e8 07 bf 58 ld [ %fp + -168 ], %l4
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
20226e8: a0 10 20 01 mov 1, %l0
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
20226ec: 93 2d 20 01 sll %l4, 1, %o1
20226f0: 93 32 60 05 srl %o1, 5, %o1
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
20226f4: b6 06 c0 09 add %i3, %o1, %i3
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
20226f8: 40 00 f9 95 call 2060d4c <.urem>
20226fc: 90 10 00 1b mov %i3, %o0
2022700: 90 26 c0 08 sub %i3, %o0, %o0
2022704: d0 27 bf 70 st %o0, [ %fp + -144 ]
2022708: 91 2a 20 05 sll %o0, 5, %o0
/FAT_DIRENTRY_SIZE));
}
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);
202270c: 92 10 00 14 mov %l4, %o1
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
2022710: ae 05 3f ff add %l4, -1, %l7
/ fmt_params->bytes_per_sector);
2022714: 40 00 f8 e2 call 2060a9c <.udiv>
2022718: 90 05 c0 08 add %l7, %o0, %o0
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
202271c: c2 07 bf 5c ld [ %fp + -164 ], %g1
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
(fmt_params->fattype,
2022720: e2 07 bf 64 ld [ %fp + -156 ], %l1
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
2022724: 82 20 40 10 sub %g1, %l0, %g1
2022728: 82 20 40 08 sub %g1, %o0, %g1
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
202272c: d0 27 bf 74 st %o0, [ %fp + -140 ]
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
/ fmt_params->bytes_per_sector);
2022730: b6 10 00 08 mov %o0, %i3
}
if (ret_val == 0) {
fatdata_sect_cnt = (fmt_params->totl_sector_cnt -
2022734: c2 27 bd 4c st %g1, [ %fp + -692 ]
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
2022738: 11 00 00 20 sethi %hi(0x8000), %o0
202273c: 40 00 f8 d8 call 2060a9c <.udiv>
2022740: 92 10 00 14 mov %l4, %o1
2022744: 80 a4 40 08 cmp %l1, %o0
2022748: 08 80 00 06 bleu 2022760 <msdos_format+0x870> <== ALWAYS TAKEN
202274c: f4 0f bf 88 ldub [ %fp + -120 ], %i2
sectors_per_cluster /= 2;
2022750: a3 34 60 01 srl %l1, 1, %l1 <== NOT EXECUTED
uint32_t sectors_per_fat;
uint32_t data_cluster_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
2022754: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED
2022758: 38 bf ff ff bgu,a 2022754 <msdos_format+0x864> <== NOT EXECUTED
202275c: a3 34 60 01 srl %l1, 1, %l1 <== NOT EXECUTED
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
2022760: 82 1c e0 02 xor %l3, 2, %g1
2022764: 2d 00 00 3f sethi %hi(0xfc00), %l6
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
2022768: 80 a0 00 01 cmp %g0, %g1
202276c: b4 0e a0 ff and %i2, 0xff, %i2
2022770: 82 60 3f ff subx %g0, -1, %g1
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
2022774: ac 15 a3 f5 or %l6, 0x3f5, %l6
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
2022778: 2b 00 00 20 sethi %hi(0x8000), %l5
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
202277c: c2 27 bd 48 st %g1, [ %fp + -696 ]
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
2022780: d0 07 bd 4c ld [ %fp + -692 ], %o0
2022784: 40 00 f8 c6 call 2060a9c <.udiv>
2022788: 92 10 00 11 mov %l1, %o1
if (fattype == FAT_FAT12) {
202278c: 80 a4 e0 01 cmp %l3, 1
2022790: 02 80 00 6f be 202294c <msdos_format+0xa5c> <== ALWAYS TAKEN
2022794: a4 10 00 08 mov %o0, %l2
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
2022798: 80 a4 e0 02 cmp %l3, 2 <== NOT EXECUTED
202279c: 02 80 00 a1 be 2022a20 <msdos_format+0xb30> <== NOT EXECUTED
20227a0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
20227a4: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20227a8: 40 00 f8 bd call 2060a9c <.udiv> <== NOT EXECUTED
20227ac: 90 02 00 17 add %o0, %l7, %o0 <== NOT EXECUTED
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
20227b0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
20227b4: 7f ff 81 cb call 2002ee0 <.umul> <== NOT EXECUTED
20227b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
20227bc: 82 04 7f ff add %l1, -1, %g1 <== NOT EXECUTED
/ sectors_per_cluster));
20227c0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
20227c4: 40 00 f8 b6 call 2060a9c <.udiv> <== NOT EXECUTED
20227c8: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
20227cc: 90 24 80 08 sub %l2, %o0, %o0 <== NOT EXECUTED
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
20227d0: 80 a5 80 08 cmp %l6, %o0 <== NOT EXECUTED
20227d4: 1a 80 00 70 bcc 2022994 <msdos_format+0xaa4> <== NOT EXECUTED
20227d8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20227dc: c2 07 bd 48 ld [ %fp + -696 ], %g1 <== NOT EXECUTED
20227e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20227e4: 02 80 00 6d be 2022998 <msdos_format+0xaa8> <== NOT EXECUTED
20227e8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
20227ec: a3 2c 60 01 sll %l1, 1, %l1 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
20227f0: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20227f4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20227f8: 7f ff 81 ba call 2002ee0 <.umul> <== NOT EXECUTED
20227fc: a4 10 20 00 clr %l2 <== NOT EXECUTED
2022800: 80 a2 00 15 cmp %o0, %l5 <== NOT EXECUTED
2022804: 08 80 00 6a bleu 20229ac <msdos_format+0xabc> <== NOT EXECUTED
2022808: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
202280c: 40 00 92 b8 call 20472ec <__errno> <== NOT EXECUTED
2022810: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
2022814: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2022818: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fatdata_sect_cnt,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
§ors_per_cluster_adj,
&(fmt_params->sectors_per_fat));
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
202281c: c0 27 bf 64 clr [ %fp + -156 ] <== NOT EXECUTED
2022820: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
2022824: e0 07 bf 60 ld [ %fp + -160 ], %l0 <== NOT EXECUTED
2022828: f0 07 bf 68 ld [ %fp + -152 ], %i0 <== NOT EXECUTED
202282c: 10 bf fe 00 b 202202c <msdos_format+0x13c> <== NOT EXECUTED
2022830: f4 0f bf 88 ldub [ %fp + -120 ], %i2 <== NOT EXECUTED
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
2022834: d6 07 bf 5c ld [ %fp + -164 ], %o3
2022838: d8 07 bf 58 ld [ %fp + -168 ], %o4
202283c: 92 10 00 1d mov %i5, %o1
2022840: 94 10 20 00 clr %o2
2022844: 7f ff fd 3f call 2021d40 <msdos_format_fill_sectors>
2022848: 9a 10 3f e5 mov -27, %o5
202284c: b0 10 00 08 mov %o0, %i0
}
/*
* create master boot record
*/
if (ret_val == 0) {
2022850: 80 a6 20 00 cmp %i0, 0
2022854: 12 bf fd d1 bne 2021f98 <msdos_format+0xa8> <== NEVER TAKEN
2022858: 80 a7 7f ff cmp %i5, -1
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
202285c: 10 bf fe 4d b 2022190 <msdos_format+0x2a0>
2022860: 90 10 00 19 mov %i1, %o0
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
2022864: 10 bf fd cc b 2021f94 <msdos_format+0xa4> <== NOT EXECUTED
2022868: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
202286c: 82 00 60 01 inc %g1
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
}
*to = '\0';
2022870: c0 28 40 00 clrb [ %g1 ]
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
2022874: 84 80 bf ff addcc %g2, -1, %g2
2022878: 02 80 00 0e be 20228b0 <msdos_format+0x9c0> <== NEVER TAKEN
202287c: 88 01 20 01 inc %g4
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
2022880: c6 09 00 00 ldub [ %g4 ], %g3
2022884: b8 08 e0 ff and %g3, 0xff, %i4
2022888: b8 06 c0 1c add %i3, %i4, %i4
202288c: f8 4f 20 01 ldsb [ %i4 + 1 ], %i4
2022890: 80 8f 20 97 btst 0x97, %i4
2022894: 32 bf ff f6 bne,a 202286c <msdos_format+0x97c>
2022898: c6 28 40 00 stb %g3, [ %g1 ]
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
202289c: f4 28 40 00 stb %i2, [ %g1 ]
20228a0: 82 00 60 01 inc %g1
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
20228a4: 84 80 bf ff addcc %g2, -1, %g2
20228a8: 12 bf ff f6 bne 2022880 <msdos_format+0x990>
20228ac: c0 28 40 00 clrb [ %g1 ]
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
20228b0: 40 00 29 74 call 202ce80 <rtems_clock_get_tod_timeval>
20228b4: 90 07 bf f0 add %fp, -16, %o0
if (rc == RTEMS_SUCCESSFUL) {
20228b8: 80 a2 20 00 cmp %o0, 0
20228bc: 12 80 00 b9 bne 2022ba0 <msdos_format+0xcb0> <== ALWAYS TAKEN
20228c0: 01 00 00 00 nop
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
20228c4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
20228c8: 83 28 60 01 sll %g1, 1, %g1 <== NOT EXECUTED
20228cc: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
20228d0: 80 a0 00 19 cmp %g0, %i1
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
return 0;
20228d4: b0 10 20 00 clr %i0
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
20228d8: 10 bf fe 27 b 2022174 <msdos_format+0x284>
20228dc: 82 40 20 00 addx %g0, 0, %g1
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
20228e0: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
20228e4: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
(rqdata->sectors_per_cluster > 0)) {
20228e8: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
20228ec: 84 90 60 00 orcc %g1, 0, %g2
20228f0: 12 bf ff 59 bne 2022654 <msdos_format+0x764> <== NEVER TAKEN
20228f4: f0 07 bf 58 ld [ %fp + -168 ], %i0
20228f8: c4 07 bf 64 ld [ %fp + -156 ], %g2
20228fc: 10 bf ff 56 b 2022654 <msdos_format+0x764>
2022900: 82 10 00 02 mov %g2, %g1
* 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) {
2022904: b4 86 bf ff addcc %i2, -1, %i2 <== NOT EXECUTED
2022908: 02 80 01 13 be 2022d54 <msdos_format+0xe64> <== NEVER TAKEN
202290c: b7 36 e0 01 srl %i3, 1, %i3
2022910: 10 bf ff 53 b 202265c <msdos_format+0x76c>
2022914: 82 10 00 02 mov %g2, %g1
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
}
else if (rqdata->fat_num <= 6) {
2022918: 38 bf fd c1 bgu,a 202201c <msdos_format+0x12c> <== NOT EXECUTED
202291c: b8 10 20 16 mov 0x16, %i4 <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
2022920: d6 2f bf 88 stb %o3, [ %fp + -120 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022924: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2022928: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
202292c: 10 bf ff 2c b 20225dc <msdos_format+0x6ec> <== NOT EXECUTED
2022930: 96 0a e0 ff and %o3, 0xff, %o3 <== NOT EXECUTED
{
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) {
2022934: a3 34 20 08 srl %l0, 8, %l1
2022938: b0 10 20 00 clr %i0
202293c: a0 10 20 00 clr %l0
2022940: b4 10 20 00 clr %i2
2022944: 10 bf fe 37 b 2022220 <msdos_format+0x330>
2022948: b6 10 20 00 clr %i3
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
202294c: 92 10 00 14 mov %l4, %o1
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
2022950: 91 2a 20 01 sll %o0, 1, %o0
2022954: 90 02 00 12 add %o0, %l2, %o0
2022958: 91 32 20 01 srl %o0, 1, %o0
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
202295c: 40 00 f8 50 call 2060a9c <.udiv>
2022960: 90 02 00 17 add %o0, %l7, %o0
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
(((sectors_per_fat * fat_num)
2022964: 92 10 00 1a mov %i2, %o1
2022968: 7f ff 81 5e call 2002ee0 <.umul>
202296c: b0 10 00 08 mov %o0, %i0
+ (sectors_per_cluster - 1))
2022970: 82 04 7f ff add %l1, -1, %g1
/ sectors_per_cluster));
2022974: 92 10 00 11 mov %l1, %o1
2022978: 40 00 f8 49 call 2060a9c <.udiv>
202297c: 90 00 40 08 add %g1, %o0, %o0
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
2022980: 90 24 80 08 sub %l2, %o0, %o0
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? then make sectors bigger
*/
if (((fattype == FAT_FAT12) && (data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
2022984: 80 a2 2f f5 cmp %o0, 0xff5
2022988: 38 bf ff 9a bgu,a 20227f0 <msdos_format+0x900> <== NEVER TAKEN
202298c: a3 2c 60 01 sll %l1, 1, %l1 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
2022990: 90 10 00 11 mov %l1, %o0
2022994: 92 10 00 14 mov %l4, %o1
2022998: 7f ff 81 52 call 2002ee0 <.umul>
202299c: a4 10 20 01 mov 1, %l2
20229a0: 80 a2 00 15 cmp %o0, %l5
20229a4: 18 bf ff 9a bgu 202280c <msdos_format+0x91c> <== NEVER TAKEN
20229a8: 80 8c a0 ff btst 0xff, %l2
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
20229ac: 02 bf ff 76 be 2022784 <msdos_format+0x894> <== NEVER TAKEN
20229b0: d0 07 bd 4c ld [ %fp + -692 ], %o0
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
}
else {
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = sectors_per_fat;
20229b4: f0 27 bf 68 st %i0, [ %fp + -152 ]
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
20229b8: 80 a6 60 00 cmp %i1, 0
20229bc: 02 80 00 42 be 2022ac4 <msdos_format+0xbd4> <== NEVER TAKEN
20229c0: e2 27 bf 64 st %l1, [ %fp + -156 ]
(rqdata->media != 0)) {
20229c4: e2 0e 60 15 ldub [ %i1 + 0x15 ], %l1
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
20229c8: a4 8c 60 ff andcc %l1, 0xff, %l2
20229cc: 02 80 00 3f be 2022ac8 <msdos_format+0xbd8> <== ALWAYS TAKEN
20229d0: 82 10 3f f8 mov -8, %g1
(rqdata->media != 0)) {
const char valid_media_codes[] =
20229d4: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
20229d8: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
20229dc: 13 00 81 9d sethi %hi(0x2067400), %o1 <== NOT EXECUTED
20229e0: 40 00 9f 84 call 204a7f0 <memcpy> <== NOT EXECUTED
20229e4: 92 12 63 60 or %o1, 0x360, %o1 ! 2067760 <rtems_rtc_shell_usage+0xda8><== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
20229e8: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
20229ec: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
20229f0: 40 00 9f 0d call 204a624 <memchr> <== NOT EXECUTED
20229f4: 94 10 20 09 mov 9, %o2 <== NOT EXECUTED
20229f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20229fc: 02 80 00 cd be 2022d30 <msdos_format+0xe40> <== NOT EXECUTED
2022a00: 01 00 00 00 nop <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
2022a04: 10 bf fd 8a b 202202c <msdos_format+0x13c> <== NOT EXECUTED
2022a08: e2 2f bf 89 stb %l1, [ %fp + -119 ] <== NOT EXECUTED
fmt_params->fattype = FAT_FAT32;
}
else if ((rqdata != NULL) &&
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
2022a0c: 40 00 92 38 call 20472ec <__errno> <== NOT EXECUTED
2022a10: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
2022a14: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2022a18: 10 bf ff b4 b 20228e8 <msdos_format+0x9f8> <== NOT EXECUTED
2022a1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
fatdata_cluster_cnt = fatdata_sec_cnt/sectors_per_cluster;
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
fat_capacity = fatdata_cluster_cnt * 2;
2022a20: 10 bf ff 61 b 20227a4 <msdos_format+0x8b4> <== NOT EXECUTED
2022a24: 91 2c a0 01 sll %l2, 1, %o0 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
2022a28: 92 10 20 00 clr %o1 <== NOT EXECUTED
2022a2c: 94 10 22 00 mov 0x200, %o2 <== NOT EXECUTED
2022a30: 40 00 9f fc call 204aa20 <memset> <== NOT EXECUTED
2022a34: 90 07 bd 58 add %fp, -680, %o0 <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
2022a38: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
2022a3c: d4 07 bf 58 ld [ %fp + -168 ], %o2 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
2022a40: c4 2f bd 5a stb %g2, [ %fp + -678 ] <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
2022a44: c4 2f bf 3f stb %g2, [ %fp + -193 ] <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
2022a48: 84 10 20 55 mov 0x55, %g2 <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
2022a4c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
2022a50: 86 10 20 41 mov 0x41, %g3 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
2022a54: 88 10 20 72 mov 0x72, %g4 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
2022a58: c4 2f bf 56 stb %g2, [ %fp + -170 ] <== NOT EXECUTED
2022a5c: 84 10 3f aa mov -86, %g2 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
2022a60: b6 10 20 52 mov 0x52, %i3 <== NOT EXECUTED
2022a64: c6 2f bd 5b stb %g3, [ %fp + -677 ] <== NOT EXECUTED
2022a68: f6 2f bd 58 stb %i3, [ %fp + -680 ] <== NOT EXECUTED
2022a6c: f6 2f bd 59 stb %i3, [ %fp + -679 ] <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
2022a70: c8 2f bf 3c stb %g4, [ %fp + -196 ] <== NOT EXECUTED
2022a74: c8 2f bf 3d stb %g4, [ %fp + -195 ] <== NOT EXECUTED
2022a78: c6 2f bf 3e stb %g3, [ %fp + -194 ] <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
2022a7c: c4 2f bf 57 stb %g2, [ %fp + -169 ] <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
2022a80: c2 2f bf 40 stb %g1, [ %fp + -192 ] <== NOT EXECUTED
2022a84: c2 2f bf 41 stb %g1, [ %fp + -191 ] <== NOT EXECUTED
2022a88: c2 2f bf 42 stb %g1, [ %fp + -190 ] <== NOT EXECUTED
2022a8c: c2 2f bf 43 stb %g1, [ %fp + -189 ] <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
2022a90: c2 2f bf 44 stb %g1, [ %fp + -188 ] <== NOT EXECUTED
2022a94: c2 2f bf 45 stb %g1, [ %fp + -187 ] <== NOT EXECUTED
2022a98: c2 2f bf 46 stb %g1, [ %fp + -186 ] <== NOT EXECUTED
2022a9c: c2 2f bf 47 stb %g1, [ %fp + -185 ] <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
2022aa0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022aa4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2022aa8: 7f ff fc 8e call 2021ce0 <msdos_format_write_sec> <== NOT EXECUTED
2022aac: 96 07 bd 58 add %fp, -680, %o3 <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
2022ab0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2022ab4: 12 bf fd 39 bne 2021f98 <msdos_format+0xa8> <== NOT EXECUTED
2022ab8: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
(rqdata,
2022abc: 10 bf fe 3f b 20223b8 <msdos_format+0x4c8> <== NOT EXECUTED
2022ac0: d2 07 bf 68 ld [ %fp + -152 ], %o1 <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
2022ac4: 82 10 3f f8 mov -8, %g1 <== NOT EXECUTED
2022ac8: 10 bf fd 59 b 202202c <msdos_format+0x13c>
2022acc: c2 2f bf 89 stb %g1, [ %fp + -119 ]
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022ad0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2022ad4: 15 00 81 9d sethi %hi(0x2067400), %o2 <== NOT EXECUTED
2022ad8: 7f ff fc 6d call 2021c8c <msdos_format_printf> <== NOT EXECUTED
2022adc: 94 12 a3 28 or %o2, 0x328, %o2 ! 2067728 <rtems_rtc_shell_usage+0xd70><== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
2022ae0: d2 07 bf 80 ld [ %fp + -128 ], %o1 <== NOT EXECUTED
2022ae4: d4 07 bf 58 ld [ %fp + -168 ], %o2 <== NOT EXECUTED
2022ae8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2022aec: 7f ff fc 7d call 2021ce0 <msdos_format_write_sec> <== NOT EXECUTED
2022af0: 96 07 bd 58 add %fp, -680, %o3 <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
2022af4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2022af8: 22 bf fe 2d be,a 20223ac <msdos_format+0x4bc> <== NOT EXECUTED
2022afc: f8 07 bf 84 ld [ %fp + -124 ], %i4 <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
2022b00: 10 bf fd 26 b 2021f98 <msdos_format+0xa8> <== NOT EXECUTED
2022b04: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
2022b08: 10 bf fd 8c b 2022138 <msdos_format+0x248> <== NOT EXECUTED
2022b0c: 88 11 22 b8 or %g4, 0x2b8, %g4 <== NOT EXECUTED
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);
2022b10: c6 0f bf 89 ldub [ %fp + -119 ], %g3 <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
2022b14: c2 0f bf 88 ldub [ %fp + -120 ], %g1 <== NOT EXECUTED
break;
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL8(tmp_sec,0,fmt_params.media_code);
FAT_SET_VAL8(tmp_sec,1,0xff);
2022b18: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
2022b1c: 82 20 00 01 neg %g1 <== NOT EXECUTED
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);
2022b20: c6 2f bd 58 stb %g3, [ %fp + -680 ] <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
2022b24: c4 2f bd 59 stb %g2, [ %fp + -679 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
2022b28: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
2022b2c: c4 2f bd 5b stb %g2, [ %fp + -677 ] <== NOT EXECUTED
2022b30: c6 2f bd 5a stb %g3, [ %fp + -678 ] <== NOT EXECUTED
break;
2022b34: 10 bf fe 6d b 20224e8 <msdos_format+0x5f8> <== NOT EXECUTED
2022b38: 83 30 60 1f srl %g1, 0x1f, %g1 <== NOT EXECUTED
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* 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)));
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
2022b3c: c2 0f bf 88 ldub [ %fp + -120 ], %g1
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));
2022b40: c4 2f bd 58 stb %g2, [ %fp + -680 ]
/* 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)));
2022b44: 84 10 3f 8f mov -113, %g2
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
2022b48: 82 20 00 01 neg %g1
switch(fmt_params.fattype) {
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
/* 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)));
2022b4c: c4 2f bd 59 stb %g2, [ %fp + -679 ]
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
2022b50: 83 30 60 1f srl %g1, 0x1f, %g1
2022b54: 84 10 3f ff mov -1, %g2
break;
2022b58: 10 bf fe 64 b 20224e8 <msdos_format+0x5f8>
2022b5c: c4 2f bd 5a stb %g2, [ %fp + -678 ]
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);
2022b60: c6 0f bf 89 ldub [ %fp + -119 ], %g3 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
2022b64: c2 0f bf 88 ldub [ %fp + -120 ], %g1 <== NOT EXECUTED
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);
2022b68: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
2022b6c: 82 20 00 01 neg %g1 <== NOT EXECUTED
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);
2022b70: c6 2f bd 58 stb %g3, [ %fp + -680 ] <== NOT EXECUTED
2022b74: c4 2f bd 59 stb %g2, [ %fp + -679 ] <== NOT EXECUTED
2022b78: c4 2f bd 5a stb %g2, [ %fp + -678 ] <== NOT EXECUTED
2022b7c: c4 2f bd 5b stb %g2, [ %fp + -677 ] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
2022b80: 86 10 3f f8 mov -8, %g3 <== NOT EXECUTED
2022b84: c4 2f bd 5d stb %g2, [ %fp + -675 ] <== NOT EXECUTED
2022b88: c4 2f bd 5e stb %g2, [ %fp + -674 ] <== NOT EXECUTED
2022b8c: c6 2f bd 5c stb %g3, [ %fp + -676 ] <== NOT EXECUTED
2022b90: 84 10 20 0f mov 0xf, %g2 <== NOT EXECUTED
2022b94: 83 30 60 1f srl %g1, 0x1f, %g1 <== NOT EXECUTED
2022b98: 10 bf fe 4d b 20224cc <msdos_format+0x5dc> <== NOT EXECUTED
2022b9c: c4 2f bd 5f stb %g2, [ %fp + -673 ] <== NOT EXECUTED
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
2022ba0: 40 00 a6 fc call 204c790 <rand>
2022ba4: 01 00 00 00 nop
2022ba8: 10 bf ff 4a b 20228d0 <msdos_format+0x9e0>
2022bac: d0 27 bf a4 st %o0, [ %fp + -92 ]
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt
2022bb0: 84 10 a2 9f or %g2, 0x29f, %g2 <== NOT EXECUTED
2022bb4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2022bb8: 18 80 00 49 bgu 2022cdc <msdos_format+0xdec> <== NOT EXECUTED
2022bbc: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
2022bc0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
2022bc4: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
2022bc8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
2022bcc: 10 bf fe 9c b 202263c <msdos_format+0x74c> <== NOT EXECUTED
2022bd0: c2 27 bf 64 st %g1, [ %fp + -156 ] <== NOT EXECUTED
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;
2022bd4: 82 10 20 20 mov 0x20, %g1 <== NOT EXECUTED
2022bd8: c2 27 bf 60 st %g1, [ %fp + -160 ] <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
2022bdc: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED
if (fmt_params->fattype == FAT_FAT32) {
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
2022be0: c0 27 bf 70 clr [ %fp + -144 ] <== NOT EXECUTED
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
2022be4: c2 27 bf 80 st %g1, [ %fp + -128 ] <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
2022be8: e8 07 bf 58 ld [ %fp + -168 ], %l4 <== NOT EXECUTED
2022bec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2022bf0: a0 10 20 20 mov 0x20, %l0 <== NOT EXECUTED
2022bf4: c2 27 bf 84 st %g1, [ %fp + -124 ] <== NOT EXECUTED
2022bf8: 10 bf fe c5 b 202270c <msdos_format+0x81c> <== NOT EXECUTED
2022bfc: 90 10 20 00 clr %o0 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2022c00: c2 07 bf 68 ld [ %fp + -152 ], %g1 <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
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 */
2022c04: c4 07 bf 80 ld [ %fp + -128 ], %g2 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2022c08: b5 30 60 08 srl %g1, 8, %i2 <== NOT EXECUTED
2022c0c: b7 30 60 10 srl %g1, 0x10, %i3 <== NOT EXECUTED
2022c10: b9 30 60 18 srl %g1, 0x18, %i4 <== NOT EXECUTED
2022c14: c2 2f bd 7c stb %g1, [ %fp + -644 ] <== NOT EXECUTED
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);
2022c18: 82 10 20 29 mov 0x29, %g1 <== NOT EXECUTED
2022c1c: c2 2f bd 9a stb %g1, [ %fp + -614 ] <== NOT EXECUTED
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),
2022c20: 03 00 00 11 sethi %hi(0x4400), %g1 <== NOT EXECUTED
2022c24: 82 10 62 41 or %g1, 0x241, %g1 ! 4641 <PROM_START+0x4641> <== NOT EXECUTED
2022c28: c2 37 bd aa sth %g1, [ %fp + -598 ] <== NOT EXECUTED
2022c2c: 03 00 00 15 sethi %hi(0x5400), %g1 <== NOT EXECUTED
2022c30: 82 10 60 33 or %g1, 0x33, %g1 ! 5433 <PROM_START+0x5433> <== NOT EXECUTED
2022c34: c2 37 bd ac sth %g1, [ %fp + -596 ] <== NOT EXECUTED
2022c38: 03 00 00 0c sethi %hi(0x3000), %g1 <== NOT EXECUTED
2022c3c: 82 10 62 20 or %g1, 0x220, %g1 ! 3220 <PROM_START+0x3220> <== NOT EXECUTED
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 */
2022c40: 87 30 a0 08 srl %g2, 8, %g3 <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
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),
2022c44: c2 37 bd ae sth %g1, [ %fp + -594 ] <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2022c48: f4 2f bd 7d stb %i2, [ %fp + -643 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
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),
2022c4c: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2022c50: f6 2f bd 7e stb %i3, [ %fp + -642 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
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),
2022c54: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
2022c58: f8 2f bd 7f stb %i4, [ %fp + -641 ] <== NOT EXECUTED
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
2022c5c: de 2f bd 84 stb %o7, [ %fp + -636 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
2022c60: c8 2f bd 88 stb %g4, [ %fp + -632 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
2022c64: c4 2f bd 8a stb %g2, [ %fp + -630 ] <== NOT EXECUTED
2022c68: c6 2f bd 8b stb %g3, [ %fp + -629 ] <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
2022c6c: c0 27 bd 8c clr [ %fp + -628 ] <== NOT EXECUTED
2022c70: c0 27 bd 90 clr [ %fp + -624 ] <== NOT EXECUTED
2022c74: c0 27 bd 94 clr [ %fp + -620 ] <== NOT EXECUTED
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
2022c78: c0 2f bd 9f clrb [ %fp + -609 ] <== NOT EXECUTED
2022c7c: c0 2f bd a0 clrb [ %fp + -608 ] <== NOT EXECUTED
2022c80: c0 2f bd a1 clrb [ %fp + -607 ] <== NOT EXECUTED
2022c84: c0 2f bd a2 clrb [ %fp + -606 ] <== NOT EXECUTED
2022c88: c0 2f bd a3 clrb [ %fp + -605 ] <== NOT EXECUTED
2022c8c: c0 2f bd a4 clrb [ %fp + -604 ] <== NOT EXECUTED
2022c90: c0 2f bd a5 clrb [ %fp + -603 ] <== NOT EXECUTED
2022c94: c0 2f bd a6 clrb [ %fp + -602 ] <== NOT EXECUTED
2022c98: c0 2f bd a7 clrb [ %fp + -601 ] <== NOT EXECUTED
2022c9c: c0 2f bd a8 clrb [ %fp + -600 ] <== NOT EXECUTED
2022ca0: c0 2f bd a9 clrb [ %fp + -599 ] <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
2022ca4: 10 bf fd a7 b 2022340 <msdos_format+0x450> <== NOT EXECUTED
2022ca8: c2 37 bd b0 sth %g1, [ %fp + -592 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022cac: 90 10 20 00 clr %o0 <== NOT EXECUTED
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
2022cb0: c2 2f bf 88 stb %g1, [ %fp + -120 ] <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2022cb4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2022cb8: 15 00 81 9d sethi %hi(0x2067400), %o2 <== NOT EXECUTED
2022cbc: 96 10 20 02 mov 2, %o3 <== NOT EXECUTED
2022cc0: 7f ff fb f3 call 2021c8c <msdos_format_printf> <== NOT EXECUTED
2022cc4: 94 12 a2 c0 or %o2, 0x2c0, %o2 <== NOT EXECUTED
/*
* 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
*/
if (fmt_params->totl_sector_cnt
2022cc8: 10 bf fe 54 b 2022618 <msdos_format+0x728> <== NOT EXECUTED
2022ccc: c2 07 bf 5c ld [ %fp + -164 ], %g1 <== NOT EXECUTED
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),
2022cd0: 03 00 81 9d sethi %hi(0x2067400), %g1
2022cd4: 10 bf fd 93 b 2022320 <msdos_format+0x430>
2022cd8: 82 10 62 38 or %g1, 0x238, %g1 ! 2067638 <rtems_rtc_shell_usage+0xc80>
/* 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;
2022cdc: 84 10 20 00 clr %g2 <== NOT EXECUTED
2022ce0: 07 10 00 00 sethi %hi(0x40000000), %g3 <== NOT EXECUTED
2022ce4: 86 86 c0 03 addcc %i3, %g3, %g3 <== NOT EXECUTED
2022ce8: 84 46 80 02 addx %i2, %g2, %g2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
2022cec: c2 2f bf 8a stb %g1, [ %fp + -118 ] <== NOT EXECUTED
/* 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;
2022cf0: 89 28 a0 02 sll %g2, 2, %g4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
2022cf4: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED
/* 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;
2022cf8: 85 30 e0 1e srl %g3, 0x1e, %g2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
2022cfc: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
/* 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;
2022d00: 10 80 00 04 b 2022d10 <msdos_format+0xe20> <== NOT EXECUTED
2022d04: 88 11 00 02 or %g4, %g2, %g4 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
2022d08: 02 80 00 08 be 2022d28 <msdos_format+0xe38> <== NOT EXECUTED
2022d0c: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
2022d10: 85 28 c0 01 sll %g3, %g1, %g2 <== NOT EXECUTED
2022d14: 80 88 80 04 btst %g2, %g4 <== NOT EXECUTED
2022d18: 02 bf ff fc be 2022d08 <msdos_format+0xe18> <== NOT EXECUTED
2022d1c: 82 80 7f ff addcc %g1, -1, %g1 <== NOT EXECUTED
break;
fmt_params->sectors_per_cluster = 1 << b;
2022d20: 10 bf fe 47 b 202263c <msdos_format+0x74c> <== NOT EXECUTED
2022d24: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
2022d28: 10 bf fe 45 b 202263c <msdos_format+0x74c> <== NOT EXECUTED
2022d2c: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
2022d30: 40 00 91 6f call 20472ec <__errno> <== NOT EXECUTED
2022d34: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
2022d38: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2022d3c: f6 07 bf 74 ld [ %fp + -140 ], %i3 <== NOT EXECUTED
2022d40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2022d44: e0 07 bf 60 ld [ %fp + -160 ], %l0 <== NOT EXECUTED
2022d48: f0 07 bf 68 ld [ %fp + -152 ], %i0 <== NOT EXECUTED
2022d4c: 10 bf fc b8 b 202202c <msdos_format+0x13c> <== NOT EXECUTED
2022d50: f4 0f bf 88 ldub [ %fp + -120 ], %i2 <== NOT EXECUTED
* 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) {
2022d54: 10 bf fe 4c b 2022684 <msdos_format+0x794> <== NOT EXECUTED
2022d58: c4 27 bf 64 st %g2, [ %fp + -156 ] <== NOT EXECUTED
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
2022d5c: 10 bf fe bd b 2022850 <msdos_format+0x960> <== NOT EXECUTED
2022d60: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
02021d40 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
2021d40: 9d e3 bf a0 save %sp, -96, %sp
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
2021d44: 7f ff 9d b1 call 2009408 <malloc>
2021d48: 90 10 00 1c mov %i4, %o0
if (fill_buffer == NULL) {
2021d4c: a0 92 20 00 orcc %o0, 0, %l0
2021d50: 02 80 00 47 be 2021e6c <msdos_format_fill_sectors+0x12c> <== NEVER TAKEN
2021d54: 92 10 00 1d mov %i5, %o1
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
2021d58: 40 00 a3 32 call 204aa20 <memset>
2021d5c: 94 10 00 1c mov %i4, %o2
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2021d60: 90 10 00 18 mov %i0, %o0
2021d64: 92 10 20 02 mov 2, %o1
2021d68: 15 00 81 9d sethi %hi(0x2067400), %o2
2021d6c: 7f ff ff c8 call 2021c8c <msdos_format_printf>
2021d70: 94 12 a2 08 or %o2, 0x208, %o2 ! 2067608 <rtems_rtc_shell_usage+0xc50>
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
2021d74: 80 a6 e0 00 cmp %i3, 0
2021d78: 02 80 00 56 be 2021ed0 <msdos_format_fill_sectors+0x190> <== NEVER TAKEN
2021d7c: 83 2e e0 04 sll %i3, 4, %g1
2021d80: bb 2e e0 02 sll %i3, 2, %i5
(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, ".");
2021d84: 29 00 81 95 sethi %hi(0x2065400), %l4
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
2021d88: ba 07 40 01 add %i5, %g1, %i5
2021d8c: a2 10 00 1b mov %i3, %l1
2021d90: 83 2f 60 02 sll %i5, 2, %g1
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
2021d94: a4 10 3f ff mov -1, %l2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
2021d98: ba 07 40 01 add %i5, %g1, %i5
(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, ".");
2021d9c: 10 80 00 10 b 2021ddc <msdos_format_fill_sectors+0x9c>
2021da0: a8 15 23 b8 or %l4, 0x3b8, %l4
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
2021da4: 92 10 00 1a mov %i2, %o1
2021da8: 90 10 00 19 mov %i1, %o0
2021dac: 94 10 00 1c mov %i4, %o2
2021db0: 96 10 00 10 mov %l0, %o3
2021db4: 7f ff ff cb call 2021ce0 <msdos_format_write_sec>
2021db8: a2 04 7f ff add %l1, -1, %l1
start_sector++;
2021dbc: b4 06 a0 01 inc %i2
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);
2021dc0: a6 10 00 08 mov %o0, %l3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
2021dc4: 80 a2 20 00 cmp %o0, 0
2021dc8: 12 80 00 1c bne 2021e38 <msdos_format_fill_sectors+0xf8> <== NEVER TAKEN
2021dcc: ba 07 7f 9c add %i5, -100, %i5
2021dd0: 80 a4 60 00 cmp %l1, 0
2021dd4: 02 80 00 1a be 2021e3c <msdos_format_fill_sectors+0xfc>
2021dd8: 90 10 00 18 mov %i0, %o0
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
2021ddc: 92 10 00 1b mov %i3, %o1
2021de0: 40 00 fb 2f call 2060a9c <.udiv>
2021de4: 90 10 00 1d mov %i5, %o0
if (percent != last_percent) {
2021de8: 80 a2 00 12 cmp %o0, %l2
2021dec: 02 bf ff ee be 2021da4 <msdos_format_fill_sectors+0x64>
2021df0: 80 8a 20 01 btst 1, %o0
if ((percent & 1) == 0)
2021df4: 12 bf ff ec bne 2021da4 <msdos_format_fill_sectors+0x64>
2021df8: a4 10 00 08 mov %o0, %l2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
2021dfc: 90 10 00 18 mov %i0, %o0
2021e00: 92 10 20 02 mov 2, %o1
2021e04: 7f ff ff a2 call 2021c8c <msdos_format_printf>
2021e08: 94 10 00 14 mov %l4, %o2
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
2021e0c: 92 10 00 1a mov %i2, %o1
2021e10: 90 10 00 19 mov %i1, %o0
2021e14: 94 10 00 1c mov %i4, %o2
2021e18: 96 10 00 10 mov %l0, %o3
2021e1c: 7f ff ff b1 call 2021ce0 <msdos_format_write_sec>
2021e20: a2 04 7f ff add %l1, -1, %l1
start_sector++;
2021e24: b4 06 a0 01 inc %i2
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);
2021e28: a6 10 00 08 mov %o0, %l3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
2021e2c: 80 a2 20 00 cmp %o0, 0
2021e30: 02 bf ff e8 be 2021dd0 <msdos_format_fill_sectors+0x90> <== ALWAYS TAKEN
2021e34: ba 07 7f 9c add %i5, -100, %i5
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");
2021e38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021e3c: 92 10 20 02 mov 2, %o1
2021e40: 15 00 81 a9 sethi %hi(0x206a400), %o2
2021e44: 7f ff ff 92 call 2021c8c <msdos_format_printf>
2021e48: 94 12 a2 48 or %o2, 0x248, %o2 ! 206a648 <e2a_32V+0x810>
if (ret_val)
2021e4c: 80 a4 e0 00 cmp %l3, 0
2021e50: 12 80 00 16 bne 2021ea8 <msdos_format_fill_sectors+0x168> <== NEVER TAKEN
2021e54: 90 10 00 18 mov %i0, %o0
/*
* cleanup
*/
if (fill_buffer != NULL) {
free(fill_buffer);
2021e58: 90 10 00 10 mov %l0, %o0
2021e5c: 7f ff 9b e2 call 2008de4 <free>
2021e60: b0 10 00 13 mov %l3, %i0
fill_buffer = NULL;
}
return ret_val;
}
2021e64: 81 c7 e0 08 ret
2021e68: 81 e8 00 00 restore
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
2021e6c: 40 00 95 20 call 20472ec <__errno> <== NOT EXECUTED
2021e70: a6 10 3f ff mov -1, %l3 <== NOT EXECUTED
2021e74: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2021e78: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
2021e7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
2021e80: 15 00 81 9d sethi %hi(0x2067400), %o2 <== NOT EXECUTED
2021e84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021e88: 7f ff ff 81 call 2021c8c <msdos_format_printf> <== NOT EXECUTED
2021e8c: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
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");
2021e90: 15 00 81 a9 sethi %hi(0x206a400), %o2 <== NOT EXECUTED
2021e94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021e98: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2021e9c: 7f ff ff 7c call 2021c8c <msdos_format_printf> <== NOT EXECUTED
2021ea0: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED
if (ret_val)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
2021ea4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021ea8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2021eac: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
2021eb0: 15 00 81 9d sethi %hi(0x2067400), %o2 <== NOT EXECUTED
2021eb4: 7f ff ff 76 call 2021c8c <msdos_format_printf> <== NOT EXECUTED
2021eb8: 94 12 a2 18 or %o2, 0x218, %o2 ! 2067618 <rtems_rtc_shell_usage+0xc60><== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
2021ebc: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2021ec0: 12 bf ff e7 bne 2021e5c <msdos_format_fill_sectors+0x11c> <== NOT EXECUTED
2021ec4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
free(fill_buffer);
fill_buffer = NULL;
}
return ret_val;
}
2021ec8: 81 c7 e0 08 ret <== NOT EXECUTED
2021ecc: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
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");
2021ed0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2021ed4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
2021ed8: a6 10 20 00 clr %l3 <== NOT EXECUTED
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");
2021edc: 15 00 81 a9 sethi %hi(0x206a400), %o2 <== NOT EXECUTED
2021ee0: 7f ff ff 6b call 2021c8c <msdos_format_printf> <== NOT EXECUTED
2021ee4: 94 12 a2 48 or %o2, 0x248, %o2 ! 206a648 <e2a_32V+0x810> <== NOT EXECUTED
/*
* cleanup
*/
if (fill_buffer != NULL) {
free(fill_buffer);
2021ee8: 10 bf ff dd b 2021e5c <msdos_format_fill_sectors+0x11c> <== NOT EXECUTED
2021eec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
02021c8c <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
2021c8c: 9d e3 bf 98 save %sp, -104, %sp
va_list args;
va_start (args, format);
2021c90: 94 07 a0 50 add %fp, 0x50, %o2
2021c94: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2021c98: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2021c9c: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
if (rqdata != NULL && rqdata->info_level >= info_level)
2021ca0: 80 a6 20 00 cmp %i0, 0
2021ca4: 02 80 00 0d be 2021cd8 <msdos_format_printf+0x4c> <== NEVER TAKEN
2021ca8: d4 27 bf fc st %o2, [ %fp + -4 ]
2021cac: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
2021cb0: 80 a0 40 19 cmp %g1, %i1
2021cb4: 06 80 00 09 bl 2021cd8 <msdos_format_printf+0x4c> <== ALWAYS TAKEN
2021cb8: 3b 00 81 c1 sethi %hi(0x2070400), %i5
{
vfprintf (stdout, format, args);
2021cbc: c2 07 62 48 ld [ %i5 + 0x248 ], %g1 ! 2070648 <_impure_ptr><== NOT EXECUTED
2021cc0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2021cc4: 40 00 da 13 call 2058510 <vfprintf> <== NOT EXECUTED
2021cc8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
fflush (stdout);
2021ccc: c2 07 62 48 ld [ %i5 + 0x248 ], %g1 <== NOT EXECUTED
2021cd0: 40 00 96 97 call 204772c <fflush> <== NOT EXECUTED
2021cd4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2021cd8: 81 c7 e0 08 ret
2021cdc: 81 e8 00 00 restore
02021ce0 <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
2021ce0: 9d e3 bf a0 save %sp, -96, %sp
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
2021ce4: 94 10 20 00 clr %o2
2021ce8: 96 10 00 1a mov %i2, %o3
2021cec: 90 10 20 00 clr %o0
2021cf0: 40 00 fc c3 call 2060ffc <__muldi3>
2021cf4: 92 10 00 19 mov %i1, %o1
2021cf8: 84 10 00 08 mov %o0, %g2
2021cfc: 86 10 00 09 mov %o1, %g3
2021d00: 90 10 00 18 mov %i0, %o0
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
2021d04: ba 10 00 18 mov %i0, %i5
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
2021d08: 92 10 00 02 mov %g2, %o1
2021d0c: 94 10 00 03 mov %g3, %o2
2021d10: 96 10 20 00 clr %o3
2021d14: 40 00 27 46 call 202ba2c <lseek>
2021d18: b0 10 3f ff mov -1, %i0
2021d1c: 80 a2 20 00 cmp %o0, 0
2021d20: 06 80 00 06 bl 2021d38 <msdos_format_write_sec+0x58> <== NEVER TAKEN
2021d24: 90 10 00 1d mov %i5, %o0
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
2021d28: 92 10 00 1b mov %i3, %o1
2021d2c: 7f ff ad 7d call 200d320 <write>
2021d30: 94 10 00 1a mov %i2, %o2
2021d34: b1 3a 20 1f sra %o0, 0x1f, %i0
ret_val = -1;
}
}
return ret_val;
}
2021d38: 81 c7 e0 08 ret
2021d3c: 81 e8 00 00 restore
02039990 <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
)
{
2039990: 9d e3 bf 50 save %sp, -176, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
2039994: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
2039998: 90 10 00 18 mov %i0, %o0
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
203999c: ba 10 00 18 mov %i0, %i5
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
20399a0: c0 27 bf fc clr [ %fp + -4 ]
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
20399a4: 92 10 00 1a mov %i2, %o1
20399a8: 7f ff b9 36 call 2027e80 <fat_file_open>
20399ac: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
20399b0: b0 92 20 00 orcc %o0, 0, %i0
20399b4: 12 80 00 a3 bne 2039c40 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b0><== NEVER TAKEN
20399b8: d2 07 bf fc ld [ %fp + -4 ], %o1
return rc;
fat_fd->cln = cln;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
20399bc: 03 00 08 00 sethi %hi(0x200000), %g1
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
20399c0: f2 22 60 1c st %i1, [ %o1 + 0x1c ]
fat_fd->fat_file_type = FAT_DIRECTORY;
20399c4: c0 22 60 10 clr [ %o1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
20399c8: c2 22 60 14 st %g1, [ %o1 + 0x14 ]
fat_fd->map.file_cln = 0;
20399cc: c0 22 60 34 clr [ %o1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
20399d0: f2 22 60 38 st %i1, [ %o1 + 0x38 ]
rc = fat_file_size(mt_entry, fat_fd);
20399d4: 7f ff bc 95 call 2028c28 <fat_file_size>
20399d8: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
20399dc: b0 92 20 00 orcc %o0, 0, %i0
20399e0: 12 80 00 95 bne 2039c34 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2a4><== NEVER TAKEN
20399e4: b2 07 bf b8 add %fp, -72, %i1
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);
20399e8: 31 00 81 95 sethi %hi(0x2065400), %i0
20399ec: 92 10 20 01 mov 1, %o1
20399f0: 94 10 00 19 mov %i1, %o2
20399f4: 96 10 20 0b mov 0xb, %o3
20399f8: 90 16 23 b8 or %i0, 0x3b8, %o0
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
20399fc: c0 27 bf b8 clr [ %fp + -72 ]
2039a00: c0 27 bf bc clr [ %fp + -68 ]
2039a04: c0 26 60 08 clr [ %i1 + 8 ]
2039a08: c0 26 60 0c clr [ %i1 + 0xc ]
2039a0c: c0 26 60 10 clr [ %i1 + 0x10 ]
2039a10: c0 26 60 14 clr [ %i1 + 0x14 ]
2039a14: c0 26 60 18 clr [ %i1 + 0x18 ]
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
2039a18: 7f ff fa fa call 2038600 <msdos_long_to_short>
2039a1c: c0 26 60 1c clr [ %i1 + 0x1c ]
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
2039a20: d2 07 bf fc ld [ %fp + -4 ], %o1
2039a24: 96 16 23 b8 or %i0, 0x3b8, %o3
2039a28: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
2039a2c: f2 23 a0 60 st %i1, [ %sp + 0x60 ]
2039a30: 90 10 00 1d mov %i5, %o0
2039a34: 94 10 20 00 clr %o2
2039a38: 98 10 20 01 mov 1, %o4
2039a3c: 7f ff fc f9 call 2038e20 <msdos_find_name_in_fat_file>
2039a40: 9a 10 20 01 mov 1, %o5
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
2039a44: b0 92 20 00 orcc %o0, 0, %i0
2039a48: 12 80 00 7b bne 2039c34 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2a4><== NEVER TAKEN
2039a4c: a0 07 bf d8 add %fp, -40, %l0
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);
2039a50: 31 00 81 94 sethi %hi(0x2065000), %i0
2039a54: 92 10 20 02 mov 2, %o1
2039a58: 94 10 00 10 mov %l0, %o2
2039a5c: 96 10 20 0b mov 0xb, %o3
2039a60: 90 16 20 d8 or %i0, 0xd8, %o0
fat_file_close(mt_entry, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
2039a64: c0 27 bf d8 clr [ %fp + -40 ]
2039a68: c0 27 bf dc clr [ %fp + -36 ]
2039a6c: c0 24 20 08 clr [ %l0 + 8 ]
2039a70: c0 24 20 0c clr [ %l0 + 0xc ]
2039a74: c0 24 20 10 clr [ %l0 + 0x10 ]
2039a78: c0 24 20 14 clr [ %l0 + 0x14 ]
2039a7c: c0 24 20 18 clr [ %l0 + 0x18 ]
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
2039a80: 7f ff fa e0 call 2038600 <msdos_long_to_short>
2039a84: c0 24 20 1c clr [ %l0 + 0x1c ]
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
2039a88: d2 07 bf fc ld [ %fp + -4 ], %o1
2039a8c: 96 16 20 d8 or %i0, 0xd8, %o3
2039a90: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
2039a94: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
2039a98: 90 10 00 1d mov %i5, %o0
2039a9c: 94 10 20 00 clr %o2
2039aa0: 98 10 20 02 mov 2, %o4
2039aa4: 7f ff fc df call 2038e20 <msdos_find_name_in_fat_file>
2039aa8: 9a 10 20 01 mov 1, %o5
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
2039aac: d2 07 bf fc ld [ %fp + -4 ], %o1
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
2039ab0: 80 a2 20 00 cmp %o0, 0
2039ab4: 12 80 00 65 bne 2039c48 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b8><== NEVER TAKEN
2039ab8: b0 10 00 08 mov %o0, %i0
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
2039abc: e2 16 60 1a lduh [ %i1 + 0x1a ], %l1
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
2039ac0: 90 10 00 1d mov %i5, %o0
2039ac4: 7f ff ba 6b call 2028470 <fat_file_close>
2039ac8: f2 16 60 14 lduh [ %i1 + 0x14 ], %i1
if ( rc != RC_OK )
2039acc: b0 92 20 00 orcc %o0, 0, %i0
2039ad0: 12 80 00 5c bne 2039c40 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b0><== NEVER TAKEN
2039ad4: 03 00 00 3f sethi %hi(0xfc00), %g1
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
2039ad8: c4 14 20 1a lduh [ %l0 + 0x1a ], %g2
2039adc: c6 14 20 14 lduh [ %l0 + 0x14 ], %g3
2039ae0: 85 28 a0 10 sll %g2, 0x10, %g2
2039ae4: 87 28 e0 10 sll %g3, 0x10, %g3
2039ae8: 89 30 a0 18 srl %g2, 0x18, %g4
2039aec: b1 30 e0 18 srl %g3, 0x18, %i0
2039af0: 87 30 e0 08 srl %g3, 8, %g3
2039af4: 82 10 63 ff or %g1, 0x3ff, %g1
2039af8: 85 30 a0 08 srl %g2, 8, %g2
2039afc: 86 08 c0 01 and %g3, %g1, %g3
2039b00: 82 08 80 01 and %g2, %g1, %g1
2039b04: 86 16 00 03 or %i0, %g3, %g3
2039b08: 82 11 00 01 or %g4, %g1, %g1
2039b0c: 87 28 e0 10 sll %g3, 0x10, %g3
2039b10: 80 90 c0 01 orcc %g3, %g1, %g0
2039b14: 12 80 00 08 bne 2039b34 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1a4><== ALWAYS TAKEN
2039b18: 90 10 00 1d mov %i5, %o0
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2039b1c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
2039b20: c0 26 a0 04 clr [ %i2 + 4 ] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2039b24: c2 26 a0 08 st %g1, [ %i2 + 8 ] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2039b28: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== 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;
2039b2c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2039b30: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
2039b34: 92 10 00 1a mov %i2, %o1
2039b38: 7f ff b8 d2 call 2027e80 <fat_file_open>
2039b3c: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
2039b40: b0 92 20 00 orcc %o0, 0, %i0
2039b44: 12 80 00 3f bne 2039c40 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b0><== NEVER TAKEN
2039b48: 07 00 00 3f sethi %hi(0xfc00), %g3
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
2039b4c: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1
2039b50: c8 14 20 1a lduh [ %l0 + 0x1a ], %g4
2039b54: 83 28 60 10 sll %g1, 0x10, %g1
2039b58: 85 30 60 18 srl %g1, 0x18, %g2
2039b5c: 86 10 e3 ff or %g3, 0x3ff, %g3
2039b60: 83 30 60 08 srl %g1, 8, %g1
2039b64: 82 08 40 03 and %g1, %g3, %g1
2039b68: 89 29 20 10 sll %g4, 0x10, %g4
2039b6c: 84 10 80 01 or %g2, %g1, %g2
2039b70: b1 31 20 18 srl %g4, 0x18, %i0
2039b74: 85 28 a0 10 sll %g2, 0x10, %g2
2039b78: 89 31 20 08 srl %g4, 8, %g4
2039b7c: 86 09 00 03 and %g4, %g3, %g3
2039b80: 82 16 00 03 or %i0, %g3, %g1
2039b84: 82 90 80 01 orcc %g2, %g1, %g1
2039b88: 12 80 00 34 bne 2039c58 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c8><== ALWAYS TAKEN
2039b8c: d2 07 bf fc ld [ %fp + -4 ], %o1
fat_fd->cln = fs_info->fat.vol.rdir_cl;
2039b90: c2 07 20 38 ld [ %i4 + 0x38 ], %g1 <== NOT EXECUTED
2039b94: c2 22 60 1c st %g1, [ %o1 + 0x1c ] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
2039b98: c2 02 60 1c ld [ %o1 + 0x1c ], %g1
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;
2039b9c: 05 00 08 00 sethi %hi(0x200000), %g2
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
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;
2039ba0: c0 22 60 10 clr [ %o1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
2039ba4: c0 22 60 34 clr [ %o1 + 0x34 ]
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;
2039ba8: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
2039bac: c2 22 60 38 st %g1, [ %o1 + 0x38 ]
rc = fat_file_size(mt_entry, fat_fd);
2039bb0: 7f ff bc 1e call 2028c28 <fat_file_size>
2039bb4: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
2039bb8: d2 07 bf fc ld [ %fp + -4 ], %o1
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
2039bbc: 80 a2 20 00 cmp %o0, 0
2039bc0: 12 80 00 22 bne 2039c48 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b8><== NEVER TAKEN
2039bc4: b0 10 00 08 mov %o0, %i0
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
2039bc8: 87 2e 60 10 sll %i1, 0x10, %g3
2039bcc: a3 2c 60 10 sll %l1, 0x10, %l1
2039bd0: 95 30 e0 18 srl %g3, 0x18, %o2
2039bd4: 83 34 60 18 srl %l1, 0x18, %g1
2039bd8: 87 30 e0 08 srl %g3, 8, %g3
2039bdc: a3 34 60 08 srl %l1, 8, %l1
2039be0: 05 00 00 3f sethi %hi(0xfc00), %g2
2039be4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
2039be8: 86 08 c0 02 and %g3, %g2, %g3
2039bec: 84 0c 40 02 and %l1, %g2, %g2
2039bf0: 82 10 40 02 or %g1, %g2, %g1
2039bf4: 94 12 80 03 or %o2, %g3, %o2
fat_file_close(mt_entry, 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,
2039bf8: 90 10 00 1d mov %i5, %o0
2039bfc: 96 10 00 1a mov %i2, %o3
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
2039c00: 95 2a a0 10 sll %o2, 0x10, %o2
fat_file_close(mt_entry, 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,
2039c04: 98 10 00 1b mov %i3, %o4
2039c08: 7f ff fe fb call 20397f4 <msdos_find_node_by_cluster_num_in_fat_file>
2039c0c: 94 12 80 01 or %o2, %g1, %o2
dir_pos, dir_entry);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
2039c10: d2 07 bf fc ld [ %fp + -4 ], %o1
fat_file_close(mt_entry, 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,
2039c14: b0 10 00 08 mov %o0, %i0
dir_pos, dir_entry);
if (rc != RC_OK)
2039c18: 80 a6 20 00 cmp %i0, 0
2039c1c: 12 80 00 11 bne 2039c60 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2d0><== NEVER TAKEN
2039c20: 90 10 00 1d mov %i5, %o0
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
rc = fat_file_close(mt_entry, fat_fd);
2039c24: 7f ff ba 13 call 2028470 <fat_file_close>
2039c28: 01 00 00 00 nop
return rc;
}
2039c2c: 81 c7 e0 08 ret
2039c30: 91 e8 00 08 restore %g0, %o0, %o0
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
2039c34: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
2039c38: 7f ff ba 0e call 2028470 <fat_file_close> <== NOT EXECUTED
2039c3c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2039c40: 81 c7 e0 08 ret <== NOT EXECUTED
2039c44: 81 e8 00 00 restore <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(mt_entry, fat_fd);
if (rc != RC_OK)
{
fat_file_close(mt_entry, fat_fd);
2039c48: 7f ff ba 0a call 2028470 <fat_file_close> <== NOT EXECUTED
2039c4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2039c50: 81 c7 e0 08 ret <== NOT EXECUTED
2039c54: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
2039c58: 10 bf ff d0 b 2039b98 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x208>
2039c5c: c2 22 60 1c st %g1, [ %o1 + 0x1c ]
/* 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)
{
fat_file_close(mt_entry, fat_fd);
2039c60: 7f ff ba 04 call 2028470 <fat_file_close> <== NOT EXECUTED
2039c64: 01 00 00 00 nop <== NOT EXECUTED
return rc;
2039c68: 81 c7 e0 08 ret <== NOT EXECUTED
2039c6c: 81 e8 00 00 restore <== NOT EXECUTED
02039c70 <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
2039c70: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
2039c74: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
2039c78: d2 06 20 08 ld [ %i0 + 8 ], %o1
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
2039c7c: e0 07 a0 5c ld [ %fp + 0x5c ], %l0
int rc = RC_OK;
fat_file_fd_t *fat_fd = parent_loc->node_access;
uint32_t dotdot_cln = 0;
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
2039c80: 9a 10 00 1c mov %i4, %o5
2039c84: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
2039c88: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
2039c8c: 94 10 00 19 mov %i1, %o2
2039c90: 96 10 00 1a mov %i2, %o3
2039c94: 7f ff fc 63 call 2038e20 <msdos_find_name_in_fat_file>
2039c98: 98 10 00 1b mov %i3, %o4
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
2039c9c: 03 00 00 1f sethi %hi(0x7c00), %g1
2039ca0: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
2039ca4: 80 a2 00 01 cmp %o0, %g1
2039ca8: 12 80 00 2e bne 2039d60 <msdos_get_name_node+0xf0>
2039cac: b8 10 00 08 mov %o0, %i4
return rc;
if (!create_node)
2039cb0: 80 a6 60 00 cmp %i1, 0
2039cb4: 12 80 00 29 bne 2039d58 <msdos_get_name_node+0xe8>
2039cb8: 01 00 00 00 nop
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
2039cbc: 03 00 00 1f sethi %hi(0x7c00), %g1
2039cc0: 82 10 61 01 or %g1, 0x101, %g1 ! 7d01 <PROM_START+0x7d01>
2039cc4: 80 a7 00 01 cmp %i4, %g1
2039cc8: 02 80 00 24 be 2039d58 <msdos_get_name_node+0xe8>
2039ccc: 01 00 00 00 nop
* if we have deal with ".." - it is a special case :(((
*
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
2039cd0: 80 a7 20 00 cmp %i4, 0
2039cd4: 12 80 00 21 bne 2039d58 <msdos_get_name_node+0xe8> <== NEVER TAKEN
2039cd8: 01 00 00 00 nop
{
if (strncmp(name, "..", 2) == 0)
2039cdc: 90 10 00 1a mov %i2, %o0
2039ce0: 94 10 20 02 mov 2, %o2
2039ce4: 13 00 81 94 sethi %hi(0x2065000), %o1
2039ce8: 40 00 51 e8 call 204e488 <strncmp>
2039cec: 92 12 60 d8 or %o1, 0xd8, %o1 ! 20650d8 <rtems_bdpart_shell_usage+0x610>
2039cf0: 80 a2 20 00 cmp %o0, 0
2039cf4: 12 80 00 19 bne 2039d58 <msdos_get_name_node+0xe8>
2039cf8: 01 00 00 00 nop
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
2039cfc: c2 14 20 14 lduh [ %l0 + 0x14 ], %g1
2039d00: c6 14 20 1a lduh [ %l0 + 0x1a ], %g3
2039d04: 83 28 60 10 sll %g1, 0x10, %g1
2039d08: 05 00 00 3f sethi %hi(0xfc00), %g2
2039d0c: b3 30 60 18 srl %g1, 0x18, %i1
2039d10: 84 10 a3 ff or %g2, 0x3ff, %g2
2039d14: 83 30 60 08 srl %g1, 8, %g1
2039d18: 82 08 40 02 and %g1, %g2, %g1
2039d1c: 87 28 e0 10 sll %g3, 0x10, %g3
2039d20: b2 16 40 01 or %i1, %g1, %i1
2039d24: 89 30 e0 18 srl %g3, 0x18, %g4
2039d28: b3 2e 60 10 sll %i1, 0x10, %i1
2039d2c: 87 30 e0 08 srl %g3, 8, %g3
2039d30: 84 08 c0 02 and %g3, %g2, %g2
2039d34: 82 11 00 02 or %g4, %g2, %g1
/* are we right under root dir ? */
if (dotdot_cln == 0)
2039d38: b2 96 40 01 orcc %i1, %g1, %i1
2039d3c: 12 80 00 0e bne 2039d74 <msdos_get_name_node+0x104>
2039d40: 82 10 3f ff mov -1, %g1
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
2039d44: c0 27 60 04 clr [ %i5 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2039d48: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2039d4c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/*
* we can relax about first_char field - it never should be
* used for root dir
*/
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
2039d50: 82 10 20 01 mov 1, %g1
2039d54: c2 27 40 00 st %g1, [ %i5 ]
}
}
}
}
return rc;
}
2039d58: 81 c7 e0 08 ret
2039d5c: 91 e8 00 1c restore %g0, %i4, %o0
/* find name in fat-file which corresponds to the directory */
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
2039d60: 80 a2 20 00 cmp %o0, 0
2039d64: 22 bf ff d4 be,a 2039cb4 <msdos_get_name_node+0x44> <== ALWAYS TAKEN
2039d68: 80 a6 60 00 cmp %i1, 0
}
}
}
}
return rc;
}
2039d6c: 81 c7 e0 08 ret <== NOT EXECUTED
2039d70: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
2039d74: f0 06 20 18 ld [ %i0 + 0x18 ], %i0
2039d78: b4 10 00 1d mov %i5, %i2
2039d7c: 7f ff ff 05 call 2039990 <msdos_get_dotdot_dir_info_cluster_num_and_offset>
2039d80: 97 e8 00 10 restore %g0, %l0, %o3
02022e00 <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
)
{
2022e00: 9d e3 bf 88 save %sp, -120, %sp
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));
2022e04: 90 10 20 01 mov 1, %o0
)
{
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
2022e08: c0 27 bf fc clr [ %fp + -4 ]
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
2022e0c: 92 10 20 98 mov 0x98, %o1
2022e10: 7f ff 97 16 call 2008a68 <calloc>
2022e14: b8 10 00 18 mov %i0, %i4
if (!fs_info)
2022e18: 80 a2 20 00 cmp %o0, 0
2022e1c: 02 80 00 57 be 2022f78 <msdos_initialize_support+0x178> <== NEVER TAKEN
2022e20: ba 10 00 08 mov %o0, %i5
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
2022e24: d0 27 20 20 st %o0, [ %i4 + 0x20 ]
rc = fat_init_volume_info(temp_mt_entry);
2022e28: 40 00 1a 1b call 2029694 <fat_init_volume_info>
2022e2c: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
2022e30: b0 92 20 00 orcc %o0, 0, %i0
2022e34: 12 80 00 37 bne 2022f10 <msdos_initialize_support+0x110> <== NEVER TAKEN
2022e38: 82 10 3f ff mov -1, %g1
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
2022e3c: c2 27 bf f4 st %g1, [ %fp + -12 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
2022e40: c2 27 bf f8 st %g1, [ %fp + -8 ]
/*
* 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;
2022e44: 82 10 20 01 mov 1, %g1
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
2022e48: f4 27 60 8c st %i2, [ %i5 + 0x8c ]
fs_info->directory_handlers = directory_handlers;
2022e4c: f6 27 60 88 st %i3, [ %i5 + 0x88 ]
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
2022e50: c0 27 bf f0 clr [ %fp + -16 ]
* 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(temp_mt_entry, &root_pos, &fat_fd);
2022e54: 90 10 00 1c mov %i4, %o0
/*
* 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;
2022e58: c2 27 bf ec st %g1, [ %fp + -20 ]
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
2022e5c: 92 07 bf ec add %fp, -20, %o1
2022e60: 40 00 14 08 call 2027e80 <fat_file_open>
2022e64: 94 07 bf fc add %fp, -4, %o2
if (rc != RC_OK)
2022e68: b0 92 20 00 orcc %o0, 0, %i0
2022e6c: 12 80 00 2f bne 2022f28 <msdos_initialize_support+0x128> <== NEVER TAKEN
2022e70: d2 07 bf fc ld [ %fp + -4 ], %o1
}
/* 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;
2022e74: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
2022e78: 05 00 08 00 sethi %hi(0x200000), %g2
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
2022e7c: c0 22 60 10 clr [ %o1 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
2022e80: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
fat_fd->cln = fs_info->fat.vol.rdir_cl;
2022e84: c2 22 60 1c st %g1, [ %o1 + 0x1c ]
fat_fd->map.file_cln = 0;
2022e88: c0 22 60 34 clr [ %o1 + 0x34 ]
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
2022e8c: 80 a0 60 00 cmp %g1, 0
2022e90: 12 80 00 2c bne 2022f40 <msdos_initialize_support+0x140> <== NEVER TAKEN
2022e94: c2 22 60 38 st %g1, [ %o1 + 0x38 ]
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
2022e98: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
2022e9c: d0 17 60 06 lduh [ %i5 + 6 ], %o0
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
2022ea0: 80 a2 00 01 cmp %o0, %g1
2022ea4: 0a 80 00 1f bcs 2022f20 <msdos_initialize_support+0x120> <== ALWAYS TAKEN
2022ea8: c2 22 60 18 st %g1, [ %o1 + 0x18 ]
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
2022eac: 7f ff 96 ef call 2008a68 <calloc>
2022eb0: 92 10 20 01 mov 1, %o1
if (fs_info->cl_buf == NULL)
2022eb4: 80 a2 20 00 cmp %o0, 0
2022eb8: 02 80 00 29 be 2022f5c <msdos_initialize_support+0x15c> <== NEVER TAKEN
2022ebc: d0 27 60 94 st %o0, [ %i5 + 0x94 ]
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
sc = rtems_semaphore_create(3,
2022ec0: 90 10 20 03 mov 3, %o0
2022ec4: 92 10 20 01 mov 1, %o1
2022ec8: 94 10 20 10 mov 0x10, %o2
2022ecc: 96 10 20 00 clr %o3
2022ed0: 7f ff aa 6d call 200d884 <rtems_semaphore_create>
2022ed4: 98 07 60 90 add %i5, 0x90, %o4
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
2022ed8: 80 a2 20 00 cmp %o0, 0
2022edc: 12 80 00 2d bne 2022f90 <msdos_initialize_support+0x190> <== NEVER TAKEN
2022ee0: c4 07 bf fc ld [ %fp + -4 ], %g2
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
2022ee4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
2022ee8: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
free(fs_info->cl_buf);
free(fs_info);
rtems_set_errno_and_return_minus_one( EIO );
}
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
2022eec: c4 20 60 08 st %g2, [ %g1 + 8 ]
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
temp_mt_entry->mt_fs_root->location.ops = op_table;
2022ef0: f2 20 60 14 st %i1, [ %g1 + 0x14 ]
return rc;
}
2022ef4: 81 c7 e0 08 ret
2022ef8: 81 e8 00 00 restore
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(temp_mt_entry, fat_fd);
2022efc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2022f00: 40 00 15 5c call 2028470 <fat_file_close> <== NOT EXECUTED
2022f04: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
2022f08: 40 00 19 9b call 2029574 <fat_shutdown_drive> <== NOT EXECUTED
2022f0c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
2022f10: 7f ff 97 b5 call 2008de4 <free> <== NOT EXECUTED
2022f14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2022f18: 81 c7 e0 08 ret <== NOT EXECUTED
2022f1c: 81 e8 00 00 restore <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
2022f20: 10 bf ff e3 b 2022eac <msdos_initialize_support+0xac>
2022f24: 90 10 00 01 mov %g1, %o0
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(temp_mt_entry, &root_pos, &fat_fd);
if (rc != RC_OK)
{
fat_shutdown_drive(temp_mt_entry);
2022f28: 40 00 19 93 call 2029574 <fat_shutdown_drive> <== NOT EXECUTED
2022f2c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
2022f30: 7f ff 97 ad call 2008de4 <free> <== NOT EXECUTED
2022f34: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
2022f38: 81 c7 e0 08 ret <== NOT EXECUTED
2022f3c: 81 e8 00 00 restore <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
2022f40: 40 00 17 3a call 2028c28 <fat_file_size> <== NOT EXECUTED
2022f44: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if ( rc != RC_OK )
2022f48: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED
2022f4c: 12 bf ff ec bne 2022efc <msdos_initialize_support+0xfc> <== NOT EXECUTED
2022f50: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
fat_file_close(temp_mt_entry, fat_fd);
fat_shutdown_drive(temp_mt_entry);
free(fs_info);
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
2022f54: 10 bf ff d6 b 2022eac <msdos_initialize_support+0xac> <== NOT EXECUTED
2022f58: d0 17 60 06 lduh [ %i5 + 6 ], %o0 <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
if (fs_info->cl_buf == NULL)
{
fat_file_close(temp_mt_entry, fat_fd);
2022f5c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
2022f60: 40 00 15 44 call 2028470 <fat_file_close> <== NOT EXECUTED
2022f64: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
2022f68: 40 00 19 83 call 2029574 <fat_shutdown_drive> <== NOT EXECUTED
2022f6c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info);
2022f70: 7f ff 97 9d call 2008de4 <free> <== NOT EXECUTED
2022f74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
2022f78: 40 00 90 dd call 20472ec <__errno> <== NOT EXECUTED
2022f7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2022f80: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2022f84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2022f88: 81 c7 e0 08 ret <== NOT EXECUTED
2022f8c: 81 e8 00 00 restore <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(temp_mt_entry, fat_fd);
2022f90: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
2022f94: 40 00 15 37 call 2028470 <fat_file_close> <== NOT EXECUTED
2022f98: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
2022f9c: 40 00 19 76 call 2029574 <fat_shutdown_drive> <== NOT EXECUTED
2022fa0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free(fs_info->cl_buf);
2022fa4: d0 07 60 94 ld [ %i5 + 0x94 ], %o0 <== NOT EXECUTED
2022fa8: 7f ff 97 8f call 2008de4 <free> <== NOT EXECUTED
2022fac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
free(fs_info);
2022fb0: 7f ff 97 8d call 2008de4 <free> <== NOT EXECUTED
2022fb4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
2022fb8: 40 00 90 cd call 20472ec <__errno> <== NOT EXECUTED
2022fbc: 01 00 00 00 nop <== NOT EXECUTED
2022fc0: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2022fc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2022fc8: 81 c7 e0 08 ret <== NOT EXECUTED
2022fcc: 81 e8 00 00 restore <== NOT EXECUTED
02022dc8 <msdos_lock>:
.rename_h = msdos_rename,
.statvfs_h = rtems_filesystem_default_statvfs
};
void msdos_lock(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2022dc8: 9d e3 bf a0 save %sp, -96, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
fs_info->vol_sema,
2022dcc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
};
void msdos_lock(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(
2022dd0: 92 10 20 00 clr %o1
2022dd4: d0 00 60 90 ld [ %g1 + 0x90 ], %o0
2022dd8: 7f ff ab 6f call 200db94 <rtems_semaphore_obtain>
2022ddc: 94 10 20 00 clr %o2
fs_info->vol_sema,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if (sc != RTEMS_SUCCESSFUL) {
2022de0: 80 a2 20 00 cmp %o0, 0
2022de4: 12 80 00 04 bne 2022df4 <msdos_lock+0x2c> <== NEVER TAKEN
2022de8: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
2022dec: 81 c7 e0 08 ret
2022df0: 81 e8 00 00 restore
rtems_fatal_error_occurred(0xdeadbeef);
2022df4: 7f ff ad 82 call 200e3fc <rtems_fatal_error_occurred> <== NOT EXECUTED
2022df8: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
02038600 <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)
{
2038600: 9d e3 bf a0 save %sp, -96, %sp
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
2038604: 92 10 20 20 mov 0x20, %o1
2038608: 90 10 00 1a mov %i2, %o0
203860c: 40 00 49 05 call 204aa20 <memset>
2038610: 94 10 00 1b mov %i3, %o2
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
2038614: f8 0e 00 00 ldub [ %i0 ], %i4
2038618: a1 2f 20 18 sll %i4, 0x18, %l0
203861c: 83 3c 20 18 sra %l0, 0x18, %g1
2038620: 82 18 60 2e xor %g1, 0x2e, %g1
2038624: 80 a0 00 01 cmp %g0, %g1
2038628: 82 60 3f ff subx %g0, -1, %g1
203862c: 80 a6 60 01 cmp %i1, 1
2038630: 02 80 00 16 be 2038688 <msdos_long_to_short+0x88>
2038634: ba 10 00 18 mov %i0, %i5
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))
2038638: 80 a0 60 00 cmp %g1, 0
203863c: 12 80 00 79 bne 2038820 <msdos_long_to_short+0x220>
2038640: 80 a6 60 02 cmp %i1, 2
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
2038644: 80 a6 60 00 cmp %i1, 0
2038648: 04 80 00 85 ble 203885c <msdos_long_to_short+0x25c> <== NEVER TAKEN
203864c: 83 3c 20 18 sra %l0, 0x18, %g1
if ((lfn[i] != ' ') && (lfn[i] != '.'))
2038650: 80 a0 60 20 cmp %g1, 0x20
2038654: 12 80 00 7e bne 203884c <msdos_long_to_short+0x24c>
2038658: 80 a0 60 2e cmp %g1, 0x2e
203865c: 10 80 00 05 b 2038670 <msdos_long_to_short+0x70>
2038660: 82 10 20 00 clr %g1
2038664: 80 a0 a0 2e cmp %g2, 0x2e
2038668: 12 80 00 0e bne 20386a0 <msdos_long_to_short+0xa0> <== ALWAYS TAKEN
203866c: 80 a0 a0 20 cmp %g2, 0x20
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
2038670: 82 00 60 01 inc %g1
2038674: 80 a0 40 19 cmp %g1, %i1
2038678: 32 bf ff fb bne,a 2038664 <msdos_long_to_short+0x64> <== ALWAYS TAKEN
203867c: c4 4f 40 01 ldsb [ %i5 + %g1 ], %g2
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;
2038680: 81 c7 e0 08 ret <== NOT EXECUTED
2038684: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
2038688: 80 a0 60 00 cmp %g1, 0
203868c: 02 bf ff ec be 203863c <msdos_long_to_short+0x3c>
2038690: 82 10 20 2e mov 0x2e, %g1
{
sfn[0] = '.';
2038694: c2 2e 80 00 stb %g1, [ %i2 ]
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
2038698: 81 c7 e0 08 ret
203869c: 91 e8 20 01 restore %g0, 1, %o0
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
20386a0: 22 bf ff f5 be,a 2038674 <msdos_long_to_short+0x74> <== NEVER TAKEN
20386a4: 82 00 60 01 inc %g1 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
20386a8: 80 a4 20 00 cmp %l0, 0
20386ac: 02 80 00 71 be 2038870 <msdos_long_to_short+0x270> <== NEVER TAKEN
20386b0: 80 a6 60 00 cmp %i1, 0
20386b4: 04 80 00 14 ble 2038704 <msdos_long_to_short+0x104> <== NEVER TAKEN
20386b8: b0 10 20 01 mov 1, %i0
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
20386bc: 27 00 81 ae sethi %hi(0x206b800), %l3
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
20386c0: 2f 00 81 ae sethi %hi(0x206b800), %l7
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
20386c4: b6 10 00 1d mov %i5, %i3
20386c8: a8 10 20 00 clr %l4
20386cc: aa 10 20 00 clr %l5
20386d0: b0 10 20 00 clr %i0
20386d4: a4 10 3f ff mov -1, %l2
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
20386d8: a6 14 e1 18 or %l3, 0x118, %l3
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
20386dc: 2d 00 81 c1 sethi %hi(0x2070400), %l6
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
20386e0: ae 15 e1 20 or %l7, 0x120, %l7
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
20386e4: a1 3c 20 18 sra %l0, 0x18, %l0
20386e8: 90 10 00 13 mov %l3, %o0
20386ec: 40 00 54 73 call 204d8b8 <strchr>
20386f0: 92 10 00 10 mov %l0, %o1
20386f4: 80 a2 20 00 cmp %o0, 0
20386f8: 02 80 00 09 be 203871c <msdos_long_to_short+0x11c>
20386fc: 82 1c 20 2e xor %l0, 0x2e, %g1
return MSDOS_NAME_LONG;
2038700: b0 10 20 02 mov 2, %i0
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
2038704: 90 10 00 1d mov %i5, %o0
2038708: 92 10 00 19 mov %i1, %o1
203870c: 40 00 32 ee call 20452c4 <msdos_filename_unix2dos>
2038710: 94 10 00 1a mov %i2, %o2
2038714: 81 c7 e0 08 ret
2038718: 81 e8 00 00 restore
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
203871c: 80 a0 00 01 cmp %g0, %g1
2038720: a2 60 3f ff subx %g0, -1, %l1
2038724: 80 a4 60 00 cmp %l1, 0
2038728: 12 80 00 0e bne 2038760 <msdos_long_to_short+0x160>
203872c: c4 05 a2 38 ld [ %l6 + 0x238 ], %g2
2038730: 82 0f 20 ff and %i4, 0xff, %g1
2038734: 82 00 80 01 add %g2, %g1, %g1
2038738: c2 08 60 01 ldub [ %g1 + 1 ], %g1
203873c: 80 88 60 07 btst 7, %g1
2038740: 12 80 00 09 bne 2038764 <msdos_long_to_short+0x164>
2038744: 80 a4 bf ff cmp %l2, -1
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
2038748: 90 10 00 17 mov %l7, %o0
203874c: 40 00 54 5b call 204d8b8 <strchr>
2038750: 92 10 00 10 mov %l0, %o1
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
2038754: 80 a2 20 00 cmp %o0, 0
2038758: 02 bf ff ca be 2038680 <msdos_long_to_short+0x80> <== NEVER TAKEN
203875c: 01 00 00 00 nop
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
2038760: 80 a4 bf ff cmp %l2, -1
2038764: 02 80 00 24 be 20387f4 <msdos_long_to_short+0x1f4>
2038768: 80 a4 60 00 cmp %l1, 0
{
if (is_dot || ((count - dot_at) > 3))
203876c: 12 bf ff e5 bne 2038700 <msdos_long_to_short+0x100> <== ALWAYS TAKEN
2038770: 82 26 00 12 sub %i0, %l2, %g1
2038774: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
2038778: 34 bf ff e3 bg,a 2038704 <msdos_long_to_short+0x104> <== NOT EXECUTED
203877c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
}
}
if (is_dot)
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
2038780: 82 07 3f bf add %i4, -65, %g1 <== NOT EXECUTED
2038784: 82 08 60 ff and %g1, 0xff, %g1
2038788: 80 a0 60 19 cmp %g1, 0x19
203878c: 28 80 00 07 bleu,a 20387a8 <msdos_long_to_short+0x1a8>
2038790: a8 10 20 01 mov 1, %l4
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
2038794: b8 07 3f 9f add %i4, -97, %i4
2038798: b8 0f 20 ff and %i4, 0xff, %i4
203879c: 80 a7 20 19 cmp %i4, 0x19
20387a0: 28 80 00 02 bleu,a 20387a8 <msdos_long_to_short+0x1a8>
20387a4: aa 10 20 01 mov 1, %l5
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
20387a8: f8 0e e0 01 ldub [ %i3 + 1 ], %i4
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
count++;
20387ac: b0 06 20 01 inc %i0
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
20387b0: a1 2f 20 18 sll %i4, 0x18, %l0
20387b4: 80 a4 20 00 cmp %l0, 0
20387b8: 02 80 00 09 be 20387dc <msdos_long_to_short+0x1dc>
20387bc: b6 06 e0 01 inc %i3
20387c0: 80 a6 40 18 cmp %i1, %i0
20387c4: 14 80 00 03 bg 20387d0 <msdos_long_to_short+0x1d0>
20387c8: 82 10 20 01 mov 1, %g1
20387cc: 82 10 20 00 clr %g1
20387d0: 80 88 60 ff btst 0xff, %g1
20387d4: 32 bf ff c5 bne,a 20386e8 <msdos_long_to_short+0xe8>
20387d8: a1 3c 20 18 sra %l0, 0x18, %l0
count++;
name++;
}
if (lowercase && uppercase)
20387dc: 80 8d 60 ff btst 0xff, %l5
20387e0: 02 bf ff c9 be 2038704 <msdos_long_to_short+0x104>
20387e4: b0 10 20 01 mov 1, %i0
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
20387e8: b0 0d 20 01 and %l4, 1, %i0
20387ec: 10 bf ff c6 b 2038704 <msdos_long_to_short+0x104>
20387f0: b0 06 20 01 inc %i0
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
20387f4: 80 a6 20 08 cmp %i0, 8
20387f8: 02 80 00 06 be 2038810 <msdos_long_to_short+0x210>
20387fc: 80 a4 60 00 cmp %l1, 0
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
2038800: 02 bf ff e1 be 2038784 <msdos_long_to_short+0x184>
2038804: 82 07 3f bf add %i4, -65, %g1
2038808: 10 bf ff e8 b 20387a8 <msdos_long_to_short+0x1a8>
203880c: a4 10 00 18 mov %i0, %l2
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
2038810: 22 bf ff bd be,a 2038704 <msdos_long_to_short+0x104> <== ALWAYS TAKEN
2038814: b0 10 20 02 mov 2, %i0
2038818: 10 bf ff e4 b 20387a8 <msdos_long_to_short+0x1a8> <== NOT EXECUTED
203881c: a4 10 20 08 mov 8, %l2 <== NOT EXECUTED
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))
2038820: 12 bf ff 8a bne 2038648 <msdos_long_to_short+0x48> <== NEVER TAKEN
2038824: 80 a6 60 00 cmp %i1, 0
2038828: c2 4f 60 01 ldsb [ %i5 + 1 ], %g1
203882c: 80 a0 60 2e cmp %g1, 0x2e
2038830: 32 bf ff 86 bne,a 2038648 <msdos_long_to_short+0x48> <== NEVER TAKEN
2038834: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
2038838: 82 10 20 2e mov 0x2e, %g1
203883c: c2 2e a0 01 stb %g1, [ %i2 + 1 ]
2038840: c2 2e 80 00 stb %g1, [ %i2 ]
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
2038844: 81 c7 e0 08 ret
2038848: 91 e8 20 01 restore %g0, 1, %o0
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
203884c: 22 bf ff 89 be,a 2038670 <msdos_long_to_short+0x70> <== NEVER TAKEN
2038850: 82 10 20 00 clr %g1 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
2038854: 10 bf ff 96 b 20386ac <msdos_long_to_short+0xac>
2038858: 80 a4 20 00 cmp %l0, 0
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
203885c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2038860: 12 bf ff 92 bne 20386a8 <msdos_long_to_short+0xa8> <== NOT EXECUTED
2038864: b0 10 20 00 clr %i0 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
2038868: 81 c7 e0 08 ret <== NOT EXECUTED
203886c: 81 e8 00 00 restore <== NOT EXECUTED
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
2038870: 10 bf ff a5 b 2038704 <msdos_long_to_short+0x104> <== NOT EXECUTED
2038874: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
02022fd0 <msdos_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2022fd0: 9d e3 bf a0 save %sp, -96, %sp
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
2022fd4: 03 00 00 3c sethi %hi(0xf000), %g1
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2022fd8: b8 10 00 1b mov %i3, %i4
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
2022fdc: 82 0e c0 01 and %i3, %g1, %g1
2022fe0: 07 00 00 10 sethi %hi(0x4000), %g3
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2022fe4: 84 10 00 19 mov %i1, %g2
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
2022fe8: 80 a0 40 03 cmp %g1, %g3
2022fec: 02 80 00 09 be 2023010 <msdos_mknod+0x40>
2022ff0: b6 10 00 1a mov %i2, %i3
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
2022ff4: 07 00 00 20 sethi %hi(0x8000), %g3
2022ff8: 80 a0 40 03 cmp %g1, %g3
2022ffc: 12 80 00 09 bne 2023020 <msdos_mknod+0x50> <== NEVER TAKEN
2023000: b2 10 20 04 mov 4, %i1
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
2023004: b4 10 00 02 mov %g2, %i2
2023008: 40 00 54 2a call 20380b0 <msdos_creat_node>
202300c: 9b e8 20 00 restore %g0, 0, %o5
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
2023010: b2 10 20 00 clr %i1
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
2023014: b4 10 00 02 mov %g2, %i2
2023018: 40 00 54 26 call 20380b0 <msdos_creat_node>
202301c: 9b e8 20 00 restore %g0, 0, %o5
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
2023020: 40 00 90 b3 call 20472ec <__errno> <== NOT EXECUTED
2023024: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2023028: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
202302c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
2023030: 81 c7 e0 08 ret <== NOT EXECUTED
2023034: 81 e8 00 00 restore <== NOT EXECUTED
02023044 <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
)
{
2023044: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
2023048: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
202304c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2023050: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2023054: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
2023058: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
202305c: 19 00 00 20 sethi %hi(0x8000), %o4 <== NOT EXECUTED
2023060: 40 00 54 14 call 20380b0 <msdos_creat_node> <== NOT EXECUTED
2023064: 9a 10 00 1d mov %i5, %o5 <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
2023068: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202306c: 02 80 00 04 be 202307c <msdos_rename+0x38> <== NOT EXECUTED
2023070: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
2023074: 81 c7 e0 08 ret <== NOT EXECUTED
2023078: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
202307c: f0 06 60 18 ld [ %i1 + 0x18 ], %i0 <== NOT EXECUTED
2023080: b4 10 20 e5 mov 0xe5, %i2 <== NOT EXECUTED
2023084: 40 00 56 a3 call 2038b10 <msdos_set_first_char4file_name> <== NOT EXECUTED
2023088: 93 ef 60 20 restore %i5, 0x20, %o1 <== NOT EXECUTED
0202308c <msdos_rmnod>:
#include "msdos.h"
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
202308c: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
fat_file_fd_t *fat_fd = pathloc->node_access;
2023090: fa 06 60 08 ld [ %i1 + 8 ], %i5
if (fat_fd->fat_file_type == MSDOS_DIRECTORY)
2023094: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2023098: 80 a0 60 00 cmp %g1, 0
202309c: 12 80 00 1a bne 2023104 <msdos_rmnod+0x78>
20230a0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
{
bool is_empty = false;
20230a4: c0 2f bf ff clrb [ %fp + -1 ]
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
20230a8: 92 10 00 1d mov %i5, %o1
20230ac: 40 00 57 08 call 2038ccc <msdos_dir_is_empty>
20230b0: 94 07 bf ff add %fp, -1, %o2
if (rc != RC_OK)
20230b4: b0 92 20 00 orcc %o0, 0, %i0
20230b8: 12 80 00 19 bne 202311c <msdos_rmnod+0x90> <== NEVER TAKEN
20230bc: c2 0f bf ff ldub [ %fp + -1 ], %g1
{
return rc;
}
if (!is_empty)
20230c0: 80 a0 60 00 cmp %g1, 0
20230c4: 02 80 00 22 be 202314c <msdos_rmnod+0xc0>
20230c8: 01 00 00 00 nop
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
20230cc: c2 07 60 08 ld [ %i5 + 8 ], %g1
20230d0: 80 a0 60 01 cmp %g1, 1
20230d4: 18 80 00 18 bgu 2023134 <msdos_rmnod+0xa8> <== NEVER TAKEN
20230d8: 01 00 00 00 nop
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
return (*loc->ops->are_nodes_equal_h)(
20230dc: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
loc,
&loc->mt_entry->mt_fs_root->location
20230e0: c4 06 60 18 ld [ %i1 + 0x18 ], %g2
static inline bool rtems_filesystem_location_is_root(
const rtems_filesystem_location_info_t *loc
)
{
return (*loc->ops->are_nodes_equal_h)(
20230e4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
20230e8: d2 00 a0 18 ld [ %g2 + 0x18 ], %o1
20230ec: 9f c0 40 00 call %g1
20230f0: 90 10 00 19 mov %i1, %o0
}
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_location_is_root(pathloc))
20230f4: 80 8a 20 ff btst 0xff, %o0
20230f8: 12 80 00 0f bne 2023134 <msdos_rmnod+0xa8> <== NEVER TAKEN
20230fc: 01 00 00 00 nop
* not used - mount() not implemenetd yet.
*/
}
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
2023100: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
2023104: 92 07 60 20 add %i5, 0x20, %o1
2023108: 40 00 56 82 call 2038b10 <msdos_set_first_char4file_name>
202310c: 94 10 20 e5 mov 0xe5, %o2
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
2023110: b0 92 20 00 orcc %o0, 0, %i0
2023114: 22 80 00 04 be,a 2023124 <msdos_rmnod+0x98> <== ALWAYS TAKEN
2023118: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
return rc;
}
202311c: 81 c7 e0 08 ret <== NOT EXECUTED
2023120: 81 e8 00 00 restore <== NOT EXECUTED
if (rc != RC_OK)
{
return rc;
}
fat_file_mark_removed(pathloc->mt_entry, fat_fd);
2023124: 40 00 16 4f call 2028a60 <fat_file_mark_removed>
2023128: 92 10 00 1d mov %i5, %o1
return rc;
}
202312c: 81 c7 e0 08 ret
2023130: 81 e8 00 00 restore
/*
* You cannot remove the file system root node.
*/
if (rtems_filesystem_location_is_root(pathloc))
{
rtems_set_errno_and_return_minus_one(EBUSY);
2023134: 40 00 90 6e call 20472ec <__errno> <== NOT EXECUTED
2023138: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202313c: 82 10 20 10 mov 0x10, %g1 <== NOT EXECUTED
2023140: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2023144: 81 c7 e0 08 ret <== NOT EXECUTED
2023148: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
}
if (!is_empty)
{
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
202314c: 40 00 90 68 call 20472ec <__errno>
2023150: b0 10 3f ff mov -1, %i0
2023154: 82 10 20 5a mov 0x5a, %g1
2023158: c2 22 00 00 st %g1, [ %o0 ]
202315c: 81 c7 e0 08 ret
2023160: 81 e8 00 00 restore
02038878 <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
)
{
2038878: 9d e3 bf 98 save %sp, -104, %sp
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
203887c: d0 06 60 40 ld [ %i1 + 0x40 ], %o0
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
2038880: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
2038884: 92 07 bf fe add %fp, -2, %o1
2038888: 40 00 31 e1 call 204500c <msdos_date_unix2dos>
203888c: 94 07 bf fc add %fp, -4, %o2
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
2038890: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2038894: 80 a0 a0 00 cmp %g2, 0
2038898: 12 80 00 06 bne 20388b0 <msdos_set_dir_wrt_time_and_date+0x38>
203889c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
20388a0: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
20388a4: 80 88 e0 03 btst 3, %g3
20388a8: 32 80 00 07 bne,a 20388c4 <msdos_set_dir_wrt_time_and_date+0x4c><== ALWAYS TAKEN
20388ac: f8 00 60 1c ld [ %g1 + 0x1c ], %i4
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20388b0: c6 08 60 05 ldub [ %g1 + 5 ], %g3
20388b4: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
20388b8: b8 00 bf fe add %g2, -2, %i4
20388bc: b9 2f 00 03 sll %i4, %g3, %i4
20388c0: b8 07 00 01 add %i4, %g1, %i4
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20388c4: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
20388c8: fa 16 c0 00 lduh [ %i3 ], %i5
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20388cc: c6 0e e0 02 ldub [ %i3 + 2 ], %g3
/* 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);
20388d0: c2 17 bf fc lduh [ %fp + -4 ], %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20388d4: 87 30 80 03 srl %g2, %g3, %g3
/* 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);
20388d8: 83 28 60 10 sll %g1, 0x10, %g1
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, 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);
20388dc: ba 07 7f ff add %i5, -1, %i5
20388e0: ba 0f 40 02 and %i5, %g2, %i5
time_val = CT_LE_W(time_val);
20388e4: 85 30 60 08 srl %g1, 8, %g2
20388e8: 83 30 60 18 srl %g1, 0x18, %g1
20388ec: 82 10 80 01 or %g2, %g1, %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20388f0: b8 07 00 03 add %i4, %g3, %i4
/* 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_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
20388f4: 94 07 60 16 add %i5, 0x16, %o2
20388f8: 92 10 00 1c mov %i4, %o1
20388fc: 96 10 20 02 mov 2, %o3
2038900: 98 07 bf fc add %fp, -4, %o4
sec = fat_cluster_num_to_sector_num(mt_entry, 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);
2038904: c2 37 bf fc sth %g1, [ %fp + -4 ]
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2038908: 7f ff c1 fe call 2029100 <_fat_block_write>
203890c: 90 10 00 18 mov %i0, %o0
2, (char *)(&time_val));
date = CT_LE_W(date);
2038910: c2 17 bf fe lduh [ %fp + -2 ], %g1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2038914: 94 07 60 18 add %i5, 0x18, %o2
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
2038918: 83 28 60 10 sll %g1, 0x10, %g1
203891c: 85 30 60 08 srl %g1, 8, %g2
2038920: 83 30 60 18 srl %g1, 0x18, %g1
2038924: 82 10 80 01 or %g2, %g1, %g1
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2038928: 96 10 20 02 mov 2, %o3
203892c: 98 07 bf fe add %fp, -2, %o4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
2038930: c2 37 bf fe sth %g1, [ %fp + -2 ]
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2038934: 92 10 00 1c mov %i4, %o1
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_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2038938: b4 10 00 08 mov %o0, %i2
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
203893c: 7f ff c1 f1 call 2029100 <_fat_block_write>
2038940: 90 10 00 18 mov %i0, %o0
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
2038944: 92 10 00 1c mov %i4, %o1
time_val = CT_LE_W(time_val);
ret1 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2038948: b6 10 00 08 mov %o0, %i3
2, (char *)(&date));
ret3 = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_ADATE_OFFSET,
203894c: 94 07 60 12 add %i5, 0x12, %o2
2038950: 90 10 00 18 mov %i0, %o0
2038954: 96 10 20 02 mov 2, %o3
2038958: 7f ff c1 ea call 2029100 <_fat_block_write>
203895c: 98 07 bf fe add %fp, -2, %o4
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
2038960: 80 a6 e0 00 cmp %i3, 0
2038964: 06 80 00 07 bl 2038980 <msdos_set_dir_wrt_time_and_date+0x108><== NEVER TAKEN
2038968: 80 a6 a0 00 cmp %i2, 0
203896c: 06 80 00 05 bl 2038980 <msdos_set_dir_wrt_time_and_date+0x108><== NEVER TAKEN
2038970: 01 00 00 00 nop
return -1;
2038974: b1 3a 20 1f sra %o0, 0x1f, %i0
2038978: 81 c7 e0 08 ret
203897c: 81 e8 00 00 restore
return RC_OK;
}
2038980: 81 c7 e0 08 ret <== NOT EXECUTED
2038984: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02038a68 <msdos_set_file_size>:
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2038a68: 9d e3 bf 98 save %sp, -104, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
2038a6c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
int
msdos_set_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
2038a70: 90 10 00 18 mov %i0, %o0
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2038a74: 80 a0 60 00 cmp %g1, 0
2038a78: 12 80 00 06 bne 2038a90 <msdos_set_file_size+0x28>
2038a7c: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
2038a80: c4 09 20 0a ldub [ %g4 + 0xa ], %g2
2038a84: 80 88 a0 03 btst 3, %g2
2038a88: 32 80 00 07 bne,a 2038aa4 <msdos_set_file_size+0x3c> <== ALWAYS TAKEN
2038a8c: d2 01 20 1c ld [ %g4 + 0x1c ], %o1
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2038a90: c6 09 20 05 ldub [ %g4 + 5 ], %g3
2038a94: c4 01 20 30 ld [ %g4 + 0x30 ], %g2
2038a98: 92 00 7f fe add %g1, -2, %o1
2038a9c: 93 2a 40 03 sll %o1, %g3, %o1
2038aa0: 92 02 40 02 add %o1, %g2, %o1
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
2038aa4: c6 06 60 18 ld [ %i1 + 0x18 ], %g3
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
2038aa8: c4 09 20 02 ldub [ %g4 + 2 ], %g2
2038aac: f2 06 60 24 ld [ %i1 + 0x24 ], %i1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
2038ab0: d4 11 00 00 lduh [ %g4 ], %o2
2038ab4: 9f 28 e0 18 sll %g3, 0x18, %o7
uint32_t le_new_length = 0;
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
2038ab8: 85 36 40 02 srl %i1, %g2, %g2
uint32_t value
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
2038abc: 83 30 e0 18 srl %g3, 0x18, %g1
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2038ac0: 89 30 e0 08 srl %g3, 8, %g4
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2038ac4: 82 13 c0 01 or %o7, %g1, %g1
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
byte2 = (value >> 8) & 0xff;
2038ac8: 88 09 20 ff and %g4, 0xff, %g4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2038acc: 87 30 e0 10 srl %g3, 0x10, %g3
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2038ad0: 89 29 20 10 sll %g4, 0x10, %g4
)
{
uint32_t byte1, byte2, byte3, byte4, swapped;
byte4 = (value >> 24) & 0xff;
byte3 = (value >> 16) & 0xff;
2038ad4: 86 08 e0 ff and %g3, 0xff, %g3
byte2 = (value >> 8) & 0xff;
byte1 = value & 0xff;
swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4;
2038ad8: 82 10 40 04 or %g1, %g4, %g1
2038adc: 87 28 e0 08 sll %g3, 8, %g3
2038ae0: 82 10 40 03 or %g1, %g3, %g1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
2038ae4: 92 02 40 02 add %o1, %g2, %o1
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
le_new_length = CT_LE_L((fat_fd->fat_file_size));
2038ae8: c2 27 bf fc st %g1, [ %fp + -4 ]
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
2038aec: 96 10 20 04 mov 4, %o3
2038af0: 98 07 bf fc add %fp, -4, %o4
uint32_t sec = 0;
uint32_t byte = 0;
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
2038af4: 94 02 bf ff add %o2, -1, %o2
2038af8: 94 0a 80 19 and %o2, %i1, %o2
le_new_length = CT_LE_L((fat_fd->fat_file_size));
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
2038afc: 7f ff c1 81 call 2029100 <_fat_block_write>
2038b00: 94 02 a0 1c add %o2, 0x1c, %o2
(char *)(&le_new_length));
if ( ret < 0 )
return -1;
return RC_OK;
}
2038b04: b1 3a 20 1f sra %o0, 0x1f, %i0
2038b08: 81 c7 e0 08 ret
2038b0c: 81 e8 00 00 restore
02038b10 <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
)
{
2038b10: 9d e3 bf 98 save %sp, -104, %sp
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
2038b14: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
2038b18: c6 06 60 08 ld [ %i1 + 8 ], %g3
2038b1c: c4 06 60 0c ld [ %i1 + 0xc ], %g2
fat_pos_t end = dir_pos->sname;
2038b20: f6 06 40 00 ld [ %i1 ], %i3
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
2038b24: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
2038b28: f4 2f a0 4c stb %i2, [ %fp + 0x4c ]
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;
2038b2c: c6 27 bf f8 st %g3, [ %fp + -8 ]
2038b30: c4 27 bf fc st %g2, [ %fp + -4 ]
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
2038b34: b8 10 00 18 mov %i0, %i4
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) &&
2038b38: 80 a0 40 1b cmp %g1, %i3
2038b3c: 02 80 00 58 be 2038c9c <msdos_set_first_char4file_name+0x18c><== ALWAYS TAKEN
2038b40: e0 06 60 04 ld [ %i1 + 4 ], %l0
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
2038b44: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
2038b48: 80 a0 7f ff cmp %g1, -1 <== NOT EXECUTED
2038b4c: 02 80 00 5b be 2038cb8 <msdos_set_first_char4file_name+0x1a8><== NOT EXECUTED
2038b50: f4 17 60 06 lduh [ %i5 + 6 ], %i2 <== NOT EXECUTED
start = dir_pos->sname;
2038b54: c2 07 bf fc ld [ %fp + -4 ], %g1
2038b58: c4 0f 60 02 ldub [ %i5 + 2 ], %g2
2038b5c: d4 17 40 00 lduh [ %i5 ], %o2
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
2038b60: 86 10 00 1d mov %i5, %g3
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
start = dir_pos->sname;
2038b64: 10 80 00 1e b 2038bdc <msdos_set_first_char4file_name+0xcc>
2038b68: d2 07 bf f8 ld [ %fp + -8 ], %o1
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2038b6c: 80 89 20 03 btst 3, %g4
2038b70: 22 80 00 1f be,a 2038bec <msdos_set_first_char4file_name+0xdc><== NEVER TAKEN
2038b74: c8 08 e0 05 ldub [ %g3 + 5 ], %g4 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2038b78: d2 00 e0 1c ld [ %g3 + 0x1c ], %o1
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
2038b7c: 85 30 40 02 srl %g1, %g2, %g2
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
2038b80: 95 2a a0 10 sll %o2, 0x10, %o2
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
2038b84: 90 10 00 1c mov %i4, %o0
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
2038b88: 95 32 a0 10 srl %o2, 0x10, %o2
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
2038b8c: 92 02 40 02 add %o1, %g2, %o1
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
2038b90: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
2038b94: 96 10 20 01 mov 1, %o3
2038b98: 94 0a 80 01 and %o2, %g1, %o2
2038b9c: 7f ff c1 59 call 2029100 <_fat_block_write>
2038ba0: 98 07 a0 4c add %fp, 0x4c, %o4
&fchar);
if (ret < 0)
2038ba4: 80 a2 20 00 cmp %o0, 0
2038ba8: 06 80 00 23 bl 2038c34 <msdos_set_first_char4file_name+0x124><== NEVER TAKEN
2038bac: 90 10 3f ff mov -1, %o0
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
2038bb0: d2 07 bf f8 ld [ %fp + -8 ], %o1
2038bb4: 80 a2 40 1b cmp %o1, %i3
2038bb8: 02 80 00 21 be 2038c3c <msdos_set_first_char4file_name+0x12c><== ALWAYS TAKEN
2038bbc: c2 07 bf fc ld [ %fp + -4 ], %g1
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
2038bc0: 82 00 60 20 add %g1, 0x20, %g1 <== NOT EXECUTED
if (start.ofs >= dir_block_size)
2038bc4: 80 a6 80 01 cmp %i2, %g1
2038bc8: 08 80 00 23 bleu 2038c54 <msdos_set_first_char4file_name+0x144><== NEVER TAKEN
2038bcc: c2 27 bf fc st %g1, [ %fp + -4 ]
2038bd0: c6 07 20 20 ld [ %i4 + 0x20 ], %g3
2038bd4: c4 0f 60 02 ldub [ %i5 + 2 ], %g2
2038bd8: d4 17 40 00 lduh [ %i5 ], %o2
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2038bdc: 80 a2 60 00 cmp %o1, 0
2038be0: 22 bf ff e3 be,a 2038b6c <msdos_set_first_char4file_name+0x5c><== ALWAYS TAKEN
2038be4: c8 08 e0 0a ldub [ %g3 + 0xa ], %g4
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2038be8: c8 08 e0 05 ldub [ %g3 + 5 ], %g4 <== NOT EXECUTED
2038bec: c6 00 e0 30 ld [ %g3 + 0x30 ], %g3 <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
2038bf0: 85 30 40 02 srl %g1, %g2, %g2 <== NOT EXECUTED
2038bf4: 92 02 7f fe add %o1, -2, %o1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
2038bf8: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
2038bfc: 93 2a 40 04 sll %o1, %g4, %o1 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
2038c00: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2038c04: 92 02 40 03 add %o1, %g3, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
2038c08: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
2038c0c: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
2038c10: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
2038c14: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
2038c18: 94 0a 80 01 and %o2, %g1, %o2 <== NOT EXECUTED
2038c1c: 7f ff c1 39 call 2029100 <_fat_block_write> <== NOT EXECUTED
2038c20: 98 07 a0 4c add %fp, 0x4c, %o4 <== NOT EXECUTED
&fchar);
if (ret < 0)
2038c24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2038c28: 16 bf ff e3 bge 2038bb4 <msdos_set_first_char4file_name+0xa4><== NOT EXECUTED
2038c2c: d2 07 bf f8 ld [ %fp + -8 ], %o1 <== NOT EXECUTED
return -1;
2038c30: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
2038c34: 81 c7 e0 08 ret <== NOT EXECUTED
2038c38: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
&fchar);
if (ret < 0)
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
2038c3c: 80 a0 40 10 cmp %g1, %l0
2038c40: 32 bf ff e1 bne,a 2038bc4 <msdos_set_first_char4file_name+0xb4>
2038c44: 82 00 60 20 add %g1, 0x20, %g1
return rc;
start.ofs = 0;
}
}
return RC_OK;
2038c48: 90 10 20 00 clr %o0
}
2038c4c: 81 c7 e0 08 ret
2038c50: 91 e8 00 08 restore %g0, %o0, %o0
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
if (start.ofs >= dir_block_size)
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
2038c54: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
2038c58: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED
2038c5c: 12 80 00 06 bne 2038c74 <msdos_set_first_char4file_name+0x164><== NOT EXECUTED
2038c60: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
2038c64: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1 <== 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) &&
2038c68: 80 88 60 03 btst 3, %g1 <== NOT EXECUTED
2038c6c: 32 bf ff f8 bne,a 2038c4c <msdos_set_first_char4file_name+0x13c><== NOT EXECUTED
2038c70: 90 10 20 00 clr %o0 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
2038c74: 40 00 27 4f call 20429b0 <fat_get_fat_cluster> <== NOT EXECUTED
2038c78: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
if ( rc != RC_OK )
2038c7c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2038c80: 12 bf ff ed bne 2038c34 <msdos_set_first_char4file_name+0x124><== NOT EXECUTED
2038c84: 82 10 20 00 clr %g1 <== NOT EXECUTED
return rc;
start.ofs = 0;
2038c88: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2038c8c: c6 07 20 20 ld [ %i4 + 0x20 ], %g3 <== NOT EXECUTED
2038c90: c4 0f 60 02 ldub [ %i5 + 2 ], %g2 <== NOT EXECUTED
2038c94: 10 bf ff b4 b 2038b64 <msdos_set_first_char4file_name+0x54><== NOT EXECUTED
2038c98: d4 17 40 00 lduh [ %i5 ], %o2 <== NOT EXECUTED
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) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
2038c9c: c2 0f 60 0a ldub [ %i5 + 0xa ], %g1
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) &&
2038ca0: 80 88 60 03 btst 3, %g1
2038ca4: 02 bf ff a9 be 2038b48 <msdos_set_first_char4file_name+0x38><== NEVER TAKEN
2038ca8: c2 06 60 08 ld [ %i1 + 8 ], %g1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
2038cac: 80 a0 7f ff cmp %g1, -1
2038cb0: 12 bf ff a9 bne 2038b54 <msdos_set_first_char4file_name+0x44>
2038cb4: f4 07 60 28 ld [ %i5 + 0x28 ], %i2
start = dir_pos->sname;
2038cb8: c4 06 40 00 ld [ %i1 ], %g2
2038cbc: c2 06 60 04 ld [ %i1 + 4 ], %g1
2038cc0: c4 27 bf f8 st %g2, [ %fp + -8 ]
2038cc4: 10 bf ff a4 b 2038b54 <msdos_set_first_char4file_name+0x44>
2038cc8: c2 27 bf fc st %g1, [ %fp + -4 ]
02038988 <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
)
{
2038988: 9d e3 bf 98 save %sp, -104, %sp
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
203898c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
{
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;
uint16_t le_cl_hi = 0;
2038990: c0 37 bf fe clrh [ %fp + -2 ]
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t new_cln = fat_fd->cln;
2038994: f6 06 60 1c ld [ %i1 + 0x1c ], %i3
uint32_t cln
)
{
register fat_fs_info_t *fs_info = mt_entry->fs_info;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
2038998: 80 a0 60 00 cmp %g1, 0
203899c: 12 80 00 06 bne 20389b4 <msdos_set_first_cluster_num+0x2c>
20389a0: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
20389a4: c6 08 a0 0a ldub [ %g2 + 0xa ], %g3
20389a8: 80 88 e0 03 btst 3, %g3
20389ac: 32 80 00 07 bne,a 20389c8 <msdos_set_first_cluster_num+0x40><== ALWAYS TAKEN
20389b0: f8 00 a0 1c ld [ %g2 + 0x1c ], %i4
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
20389b4: c8 08 a0 05 ldub [ %g2 + 5 ], %g4
20389b8: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3
20389bc: b8 00 7f fe add %g1, -2, %i4
20389c0: b9 2f 00 04 sll %i4, %g4, %i4
20389c4: b8 07 00 03 add %i4, %g3, %i4
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20389c8: c6 06 60 24 ld [ %i1 + 0x24 ], %g3
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
20389cc: fa 10 80 00 lduh [ %g2 ], %i5
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20389d0: c4 08 a0 02 ldub [ %g2 + 2 ], %g2
/* 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));
20389d4: 83 2e e0 10 sll %i3, 0x10, %g1
/*
* calculate input for _fat_block_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
20389d8: 85 30 c0 02 srl %g3, %g2, %g2
20389dc: b8 07 00 02 add %i4, %g2, %i4
/* 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));
20389e0: 85 30 60 08 srl %g1, 8, %g2
20389e4: 83 30 60 18 srl %g1, 0x18, %g1
20389e8: 82 10 80 01 or %g2, %g1, %g1
ret1 = _fat_block_write(mt_entry, sec,
20389ec: 92 10 00 1c mov %i4, %o1
20389f0: 96 10 20 02 mov 2, %o3
20389f4: 98 07 bf fc add %fp, -4, %o4
sec = fat_cluster_num_to_sector_num(mt_entry, 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);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
20389f8: c2 37 bf fc sth %g1, [ %fp + -4 ]
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, 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);
20389fc: ba 07 7f ff add %i5, -1, %i5
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
2038a00: 90 10 00 18 mov %i0, %o0
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(mt_entry, 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);
2038a04: ba 0f 40 03 and %i5, %g3, %i5
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
2038a08: 7f ff c1 be call 2029100 <_fat_block_write>
2038a0c: 94 07 60 1a add %i5, 0x1a, %o2
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
2038a10: b7 36 e0 10 srl %i3, 0x10, %i3
2038a14: b7 2e e0 10 sll %i3, 0x10, %i3
2038a18: 83 36 e0 08 srl %i3, 8, %g1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
2038a1c: b4 10 00 08 mov %o0, %i2
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = _fat_block_write(mt_entry, sec,
2038a20: 92 10 00 1c mov %i4, %o1
2038a24: 90 10 00 18 mov %i0, %o0
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
2038a28: b7 36 e0 18 srl %i3, 0x18, %i3
ret2 = _fat_block_write(mt_entry, sec,
2038a2c: 94 07 60 14 add %i5, 0x14, %o2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
2038a30: b6 10 40 1b or %g1, %i3, %i3
ret2 = _fat_block_write(mt_entry, sec,
2038a34: 96 10 20 02 mov 2, %o3
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = _fat_block_write(mt_entry, sec,
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
2038a38: f6 37 bf fe sth %i3, [ %fp + -2 ]
ret2 = _fat_block_write(mt_entry, sec,
2038a3c: 7f ff c1 b1 call 2029100 <_fat_block_write>
2038a40: 98 07 bf fe add %fp, -2, %o4
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
2038a44: 80 a2 20 00 cmp %o0, 0
2038a48: 06 80 00 06 bl 2038a60 <msdos_set_first_cluster_num+0xd8> <== NEVER TAKEN
2038a4c: 80 a6 a0 00 cmp %i2, 0
2038a50: 06 80 00 04 bl 2038a60 <msdos_set_first_cluster_num+0xd8> <== NEVER TAKEN
2038a54: b0 10 20 00 clr %i0
return -1;
return RC_OK;
}
2038a58: 81 c7 e0 08 ret
2038a5c: 81 e8 00 00 restore
2038a60: 81 c7 e0 08 ret <== NOT EXECUTED
2038a64: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02022d98 <msdos_unlock>:
rtems_fatal_error_occurred(0xdeadbeef);
}
}
void msdos_unlock(rtems_filesystem_mount_table_entry_t *mt_entry)
{
2022d98: 9d e3 bf a0 save %sp, -96, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_release(fs_info->vol_sema);
2022d9c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2022da0: 7f ff ab c7 call 200dcbc <rtems_semaphore_release>
2022da4: d0 00 60 90 ld [ %g1 + 0x90 ], %o0
if (sc != RTEMS_SUCCESSFUL) {
2022da8: 80 a2 20 00 cmp %o0, 0
2022dac: 12 80 00 04 bne 2022dbc <msdos_unlock+0x24> <== NEVER TAKEN
2022db0: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
2022db4: 81 c7 e0 08 ret
2022db8: 81 e8 00 00 restore
rtems_fatal_error_occurred(0xdeadbeef);
2022dbc: 7f ff ad 90 call 200e3fc <rtems_fatal_error_occurred> <== NOT EXECUTED
2022dc0: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
0200440c <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
200440c: 9d e3 bf a0 save %sp, -96, %sp
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
2004410: 03 00 80 72 sethi %hi(0x201c800), %g1
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
2004414: 80 a6 00 19 cmp %i0, %i1
2004418: 02 80 00 03 be 2004424 <newlib_delete_hook+0x18>
200441c: fa 00 61 a8 ld [ %g1 + 0x1a8 ], %i5
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
2004420: fa 06 61 4c ld [ %i1 + 0x14c ], %i5
}
if (ptr && ptr != _global_impure_ptr) {
2004424: 80 a7 60 00 cmp %i5, 0
2004428: 02 80 00 0b be 2004454 <newlib_delete_hook+0x48> <== NEVER TAKEN
200442c: 03 00 80 6e sethi %hi(0x201b800), %g1
2004430: c2 00 63 c8 ld [ %g1 + 0x3c8 ], %g1 ! 201bbc8 <_global_impure_ptr>
2004434: 80 a7 40 01 cmp %i5, %g1
2004438: 02 80 00 07 be 2004454 <newlib_delete_hook+0x48>
200443c: 13 00 80 10 sethi %hi(0x2004000), %o1
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
2004440: 90 10 00 1d mov %i5, %o0
2004444: 40 00 2e e6 call 200ffdc <_fwalk>
2004448: 92 12 61 fc or %o1, 0x1fc, %o1
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
200444c: 40 00 1d 3a call 200b934 <_Workspace_Free>
2004450: 90 10 00 1d mov %i5, %o0
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
2004454: 80 a6 00 19 cmp %i0, %i1
2004458: 12 80 00 04 bne 2004468 <newlib_delete_hook+0x5c>
200445c: c0 26 61 4c clr [ %i1 + 0x14c ]
_REENT = 0;
2004460: 03 00 80 72 sethi %hi(0x201c800), %g1
2004464: c0 20 61 a8 clr [ %g1 + 0x1a8 ] ! 201c9a8 <_impure_ptr>
2004468: 81 c7 e0 08 ret
200446c: 81 e8 00 00 restore
020041fc <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
20041fc: 9d e3 bf a0 save %sp, -96, %sp
switch ( fileno(fp) ) {
2004200: 40 00 2e 7f call 200fbfc <fileno>
2004204: 90 10 00 18 mov %i0, %o0
2004208: 80 a2 20 02 cmp %o0, 2
200420c: 28 80 00 06 bleu,a 2004224 <newlib_free_buffers+0x28> <== ALWAYS TAKEN
2004210: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
2004214: 40 00 2d ad call 200f8c8 <fclose> <== NOT EXECUTED
2004218: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
return 0;
}
200421c: 81 c7 e0 08 ret
2004220: 91 e8 20 00 restore %g0, 0, %o0
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
2004224: 80 88 60 80 btst 0x80, %g1
2004228: 02 bf ff fd be 200421c <newlib_free_buffers+0x20> <== ALWAYS TAKEN
200422c: 01 00 00 00 nop
free( fp->_bf._base );
2004230: 7f ff fd 83 call 200383c <free> <== NOT EXECUTED
2004234: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2004238: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
200423c: c0 26 00 00 clr [ %i0 ] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2004240: 82 08 7f 7f and %g1, -129, %g1 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2004244: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2004248: c2 36 20 0c sth %g1, [ %i0 + 0xc ] <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
200424c: 81 c7 e0 08 ret <== NOT EXECUTED
2004250: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02007148 <null_op_fsmount_me>:
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
return -1;
}
2007148: 81 c3 e0 08 retl <== NOT EXECUTED
200714c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02007158 <null_op_fsunmount_me>:
static void null_op_fsunmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
/* Do nothing */
}
2007158: 81 c3 e0 08 retl <== NOT EXECUTED
02007120 <null_op_link>:
const char *name,
size_t namelen
)
{
return -1;
}
2007120: 81 c3 e0 08 retl <== NOT EXECUTED
2007124: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02007140 <null_op_mount>:
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
return -1;
}
2007140: 81 c3 e0 08 retl <== NOT EXECUTED
2007144: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02007170 <null_op_readlink>:
char *buf,
size_t bufsize
)
{
return -1;
}
2007170: 81 c3 e0 08 retl <== NOT EXECUTED
2007174: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02007178 <null_op_rename>:
const char *name,
size_t namelen
)
{
return -1;
}
2007178: 81 c3 e0 08 retl <== NOT EXECUTED
200717c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
0200614c <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
200614c: 9d e3 bf a0 save %sp, -96, %sp
int i;
if (tty->termios.c_oflag & OPOST) {
2006150: c2 06 60 34 ld [ %i1 + 0x34 ], %g1
2006154: 80 88 60 01 btst 1, %g1
2006158: 02 80 00 21 be 20061dc <oproc+0x90> <== NEVER TAKEN
200615c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ]
switch (c) {
2006160: 80 a6 20 09 cmp %i0, 9
2006164: 22 80 00 3d be,a 2006258 <oproc+0x10c>
2006168: c6 06 60 28 ld [ %i1 + 0x28 ], %g3
200616c: 08 80 00 22 bleu 20061f4 <oproc+0xa8> <== NEVER TAKEN
2006170: 80 a6 20 08 cmp %i0, 8
2006174: 80 a6 20 0a cmp %i0, 0xa
2006178: 02 80 00 2b be 2006224 <oproc+0xd8>
200617c: 80 a6 20 0d cmp %i0, 0xd
2006180: 02 80 00 44 be 2006290 <oproc+0x144> <== NEVER TAKEN
2006184: 80 88 60 10 btst 0x10, %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2006188: 80 88 60 02 btst 2, %g1
c = toupper(c);
200618c: 03 00 80 72 sethi %hi(0x201c800), %g1
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
2006190: 02 80 00 0b be 20061bc <oproc+0x70> <== ALWAYS TAKEN
2006194: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 201c9a0 <__ctype_ptr__>
c = toupper(c);
2006198: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED
200619c: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
20061a0: c6 0e 20 01 ldub [ %i0 + 1 ], %g3 <== NOT EXECUTED
20061a4: 86 08 e0 03 and %g3, 3, %g3 <== NOT EXECUTED
20061a8: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED
20061ac: 22 80 00 02 be,a 20061b4 <oproc+0x68> <== NOT EXECUTED
20061b0: 84 00 bf e0 add %g2, -32, %g2 <== NOT EXECUTED
20061b4: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
20061b8: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED
if (!iscntrl(c))
20061bc: b0 00 40 18 add %g1, %i0, %i0
20061c0: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
20061c4: 80 88 60 20 btst 0x20, %g1
20061c8: 12 80 00 06 bne 20061e0 <oproc+0x94> <== NEVER TAKEN
20061cc: 90 07 a0 44 add %fp, 0x44, %o0
tty->column++;
20061d0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
20061d4: 82 00 60 01 inc %g1
20061d8: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
break;
}
}
rtems_termios_puts (&c, 1, tty);
20061dc: 90 07 a0 44 add %fp, 0x44, %o0
20061e0: 92 10 20 01 mov 1, %o1
20061e4: 7f ff ff 8a call 200600c <rtems_termios_puts>
20061e8: 94 10 00 19 mov %i1, %o2
20061ec: 81 c7 e0 08 ret
20061f0: 81 e8 00 00 restore
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
20061f4: 12 bf ff e6 bne 200618c <oproc+0x40> <== NOT EXECUTED
20061f8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
20061fc: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2006200: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006204: 04 bf ff f6 ble 20061dc <oproc+0x90> <== NOT EXECUTED
2006208: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
200620c: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
tty->column += i;
break;
case '\b':
if (tty->column > 0)
tty->column--;
2006210: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2006214: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2006218: 7f ff ff 7d call 200600c <rtems_termios_puts> <== NOT EXECUTED
200621c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2006220: 30 80 00 30 b,a 20062e0 <oproc+0x194> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
2006224: 80 88 60 20 btst 0x20, %g1
2006228: 32 80 00 02 bne,a 2006230 <oproc+0xe4> <== NEVER TAKEN
200622c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
tty->column = 0;
if (tty->termios.c_oflag & ONLCR) {
2006230: 80 88 60 04 btst 4, %g1
2006234: 22 bf ff eb be,a 20061e0 <oproc+0x94> <== NEVER TAKEN
2006238: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
rtems_termios_puts ("\r", 1, tty);
200623c: 92 10 20 01 mov 1, %o1
2006240: 11 00 80 6c sethi %hi(0x201b000), %o0
2006244: 94 10 00 19 mov %i1, %o2
2006248: 7f ff ff 71 call 200600c <rtems_termios_puts>
200624c: 90 12 22 80 or %o0, 0x280, %o0
tty->column = 0;
2006250: 10 bf ff e3 b 20061dc <oproc+0x90>
2006254: c0 26 60 28 clr [ %i1 + 0x28 ]
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2006258: 05 00 00 06 sethi %hi(0x1800), %g2
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
200625c: 88 08 e0 07 and %g3, 7, %g4
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2006260: 82 08 40 02 and %g1, %g2, %g1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
2006264: 92 10 20 08 mov 8, %o1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2006268: 80 a0 40 02 cmp %g1, %g2
200626c: 02 80 00 17 be 20062c8 <oproc+0x17c> <== ALWAYS TAKEN
2006270: 92 22 40 04 sub %o1, %g4, %o1
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
2006274: 92 00 c0 09 add %g3, %o1, %o1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2006278: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
200627c: d2 26 60 28 st %o1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2006280: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2006284: 7f ff ff 62 call 200600c <rtems_termios_puts> <== NOT EXECUTED
2006288: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
200628c: 30 80 00 15 b,a 20062e0 <oproc+0x194> <== NOT EXECUTED
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2006290: 02 80 00 06 be 20062a8 <oproc+0x15c> <== NOT EXECUTED
2006294: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2006298: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED
200629c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20062a0: 02 bf ff d3 be 20061ec <oproc+0xa0> <== NOT EXECUTED
20062a4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
20062a8: 22 bf ff cd be,a 20061dc <oproc+0x90> <== NOT EXECUTED
20062ac: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
c = '\n';
20062b0: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
20062b4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20062b8: 02 bf ff c9 be 20061dc <oproc+0x90> <== NOT EXECUTED
20062bc: c4 2f a0 44 stb %g2, [ %fp + 0x44 ] <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
break;
20062c0: 10 bf ff c7 b 20061dc <oproc+0x90> <== NOT EXECUTED
20062c4: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
20062c8: 86 00 c0 09 add %g3, %o1, %g3
rtems_termios_puts ( " ", i, tty);
20062cc: 11 00 80 6c sethi %hi(0x201b000), %o0
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
20062d0: c6 26 60 28 st %g3, [ %i1 + 0x28 ]
rtems_termios_puts ( " ", i, tty);
20062d4: 90 12 22 88 or %o0, 0x288, %o0
20062d8: 7f ff ff 4d call 200600c <rtems_termios_puts>
20062dc: 94 10 00 19 mov %i1, %o2
return;
20062e0: 81 c7 e0 08 ret
20062e4: 81 e8 00 00 restore
02004cc8 <partition_free>:
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
{
2004cc8: 9d e3 bf a0 save %sp, -96, %sp
int part_num;
if (part_desc == NULL)
2004ccc: 80 a6 20 00 cmp %i0, 0
2004cd0: 02 80 00 16 be 2004d28 <partition_free+0x60>
2004cd4: 01 00 00 00 nop
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004cd8: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2004cdc: 84 18 60 85 xor %g1, 0x85, %g2
2004ce0: 80 a0 00 02 cmp %g0, %g2
2004ce4: 82 18 60 05 xor %g1, 5, %g1
2004ce8: 84 60 3f ff subx %g0, -1, %g2
2004cec: 80 a0 00 01 cmp %g0, %g1
2004cf0: 82 60 3f ff subx %g0, -1, %g1
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
2004cf4: 80 90 80 01 orcc %g2, %g1, %g0
2004cf8: 02 80 00 0a be 2004d20 <partition_free+0x58> <== ALWAYS TAKEN
2004cfc: 01 00 00 00 nop
2004d00: ba 10 20 00 clr %i5 ! 0 <PROM_START> <== NOT EXECUTED
*
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
2004d04: 82 06 00 1d add %i0, %i5, %g1 <== 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]);
2004d08: d0 00 60 18 ld [ %g1 + 0x18 ], %o0 <== NOT EXECUTED
2004d0c: 7f ff ff ef call 2004cc8 <partition_free> <== NOT EXECUTED
2004d10: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
{
for (part_num = 0;
2004d14: 80 a7 60 10 cmp %i5, 0x10 <== NOT EXECUTED
2004d18: 32 bf ff fc bne,a 2004d08 <partition_free+0x40> <== NOT EXECUTED
2004d1c: 82 06 00 1d add %i0, %i5, %g1 <== NOT EXECUTED
{
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
2004d20: 40 00 04 54 call 2005e70 <free>
2004d24: 81 e8 00 00 restore
2004d28: 81 c7 e0 08 ret
2004d2c: 81 e8 00 00 restore
02005088 <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)
{
2005088: 9d e3 bf 50 save %sp, -176, %sp
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
200508c: 92 10 20 00 clr %o1
2005090: 90 10 00 18 mov %i0, %o0
2005094: 40 00 07 d9 call 2006ff8 <open>
2005098: b8 10 20 19 mov 0x19, %i4
if (fd < 0)
200509c: 80 a2 20 00 cmp %o0, 0
20050a0: 16 80 00 04 bge 20050b0 <partition_table_get+0x28> <== ALWAYS TAKEN
20050a4: ba 10 00 08 mov %o0, %i5
rc = read_mbr(fd, disk_desc);
close(fd);
return rc;
}
20050a8: 81 c7 e0 08 ret <== NOT EXECUTED
20050ac: 91 e8 00 1c restore %g0, %i4, %o0 <== NOT EXECUTED
if (fd < 0)
{
return RTEMS_INTERNAL_ERROR;
}
rc = fstat(fd, &dev_stat);
20050b0: 40 00 03 9a call 2005f18 <fstat>
20050b4: 92 07 bf b0 add %fp, -80, %o1
if (rc != RTEMS_SUCCESSFUL)
20050b8: 80 a2 20 00 cmp %o0, 0
20050bc: 02 80 00 07 be 20050d8 <partition_table_get+0x50> <== ALWAYS TAKEN
20050c0: 90 06 60 08 add %i1, 8, %o0
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
20050c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20050c8: 40 00 02 ae call 2005b80 <close>
20050cc: b0 10 00 1c mov %i4, %i0
return rc;
}
20050d0: 81 c7 e0 08 ret
20050d4: 81 e8 00 00 restore
{
close(fd);
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
20050d8: 92 10 00 18 mov %i0, %o1
20050dc: 40 00 46 ba call 2016bc4 <strncpy>
20050e0: 94 10 20 0f mov 0xf, %o2
disk_desc->dev = dev_stat.st_rdev;
20050e4: c4 1f bf c8 ldd [ %fp + -56 ], %g2
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
20050e8: c8 07 bf f0 ld [ %fp + -16 ], %g4
close(fd);
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
disk_desc->dev = dev_stat.st_rdev;
20050ec: c4 3e 40 00 std %g2, [ %i1 ]
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
20050f0: 80 a1 20 00 cmp %g4, 0
20050f4: 02 80 00 03 be 2005100 <partition_table_get+0x78> <== ALWAYS TAKEN
20050f8: 82 10 22 00 mov 0x200, %g1
20050fc: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED
2005100: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
*/
static rtems_status_code
read_mbr(int fd, rtems_disk_desc_t *disk_desc)
{
int part_num;
rtems_sector_data_t *sector = NULL;
2005104: c0 27 bf f8 clr [ %fp + -8 ]
rtems_part_desc_t *part_desc;
uint8_t *data;
rtems_status_code rc;
/* get MBR sector */
rc = get_sector(fd, 0, §or);
2005108: 90 10 00 1d mov %i5, %o0
200510c: 92 10 20 00 clr %o1
2005110: 7f ff ff 08 call 2004d30 <get_sector>
2005114: 94 07 bf f8 add %fp, -8, %o2
2005118: b8 10 00 08 mov %o0, %i4
if (rc != RTEMS_SUCCESSFUL)
200511c: 80 a7 20 00 cmp %i4, 0
2005120: 02 80 00 09 be 2005144 <partition_table_get+0xbc> <== ALWAYS TAKEN
2005124: d0 07 bf f8 ld [ %fp + -8 ], %o0
{
if (sector)
2005128: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200512c: 22 bf ff e7 be,a 20050c8 <partition_table_get+0x40> <== NOT EXECUTED
2005130: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
part_num++)
{
rc = data_to_part_desc(data, &part_desc);
if (rc != RTEMS_SUCCESSFUL)
{
free(sector);
2005134: 40 00 03 4f call 2005e70 <free> <== NOT EXECUTED
2005138: 01 00 00 00 nop <== NOT EXECUTED
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
200513c: 10 bf ff e3 b 20050c8 <partition_table_get+0x40> <== NOT EXECUTED
2005140: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
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) &&
2005144: c2 0a 22 02 ldub [ %o0 + 0x202 ], %g1
2005148: 80 a0 60 55 cmp %g1, 0x55
200514c: 22 80 00 06 be,a 2005164 <partition_table_get+0xdc> <== ALWAYS TAKEN
2005150: c2 0a 22 03 ldub [ %o0 + 0x203 ], %g1
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
{
free(sector);
2005154: 40 00 03 47 call 2005e70 <free> <== NOT EXECUTED
2005158: b8 10 20 19 mov 0x19, %i4 <== NOT EXECUTED
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
200515c: 10 bf ff db b 20050c8 <partition_table_get+0x40> <== NOT EXECUTED
2005160: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
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) &&
2005164: 80 a0 60 aa cmp %g1, 0xaa
2005168: 12 bf ff fb bne 2005154 <partition_table_get+0xcc> <== NEVER TAKEN
200516c: b4 02 21 c2 add %o0, 0x1c2, %i2
return RTEMS_INTERNAL_ERROR;
}
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
2005170: b0 10 00 19 mov %i1, %i0
2005174: a0 10 00 19 mov %i1, %l0
2005178: b6 10 20 01 mov 1, %i3
200517c: 90 10 00 1a mov %i2, %o0
2005180: 7f ff ff 13 call 2004dcc <data_to_part_desc.part.1>
2005184: 92 07 bf fc add %fp, -4, %o1
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)
2005188: b8 92 20 00 orcc %o0, 0, %i4
200518c: 12 80 00 32 bne 2005254 <partition_table_get+0x1cc> <== NEVER TAKEN
2005190: c2 07 bf fc ld [ %fp + -4 ], %g1
{
free(sector);
return rc;
}
if (part_desc != NULL)
2005194: 80 a0 60 00 cmp %g1, 0
2005198: 22 80 00 0a be,a 20051c0 <partition_table_get+0x138> <== NEVER TAKEN
200519c: c0 24 20 28 clr [ %l0 + 0x28 ] <== NOT EXECUTED
{
part_desc->log_id = part_num + 1;
part_desc->disk_desc = disk_desc;
part_desc->end = part_desc->start + part_desc->size - 1;
20051a0: c6 00 60 04 ld [ %g1 + 4 ], %g3
20051a4: c4 00 60 08 ld [ %g1 + 8 ], %g2
return rc;
}
if (part_desc != NULL)
{
part_desc->log_id = part_num + 1;
20051a8: f6 28 60 02 stb %i3, [ %g1 + 2 ]
part_desc->disk_desc = disk_desc;
20051ac: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
part_desc->end = part_desc->start + part_desc->size - 1;
20051b0: 84 00 c0 02 add %g3, %g2, %g2
20051b4: 84 00 bf ff add %g2, -1, %g2
20051b8: c4 20 60 0c st %g2, [ %g1 + 0xc ]
disk_desc->partitions[part_num] = part_desc;
20051bc: c2 24 20 28 st %g1, [ %l0 + 0x28 ]
else
{
disk_desc->partitions[part_num] = NULL;
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
20051c0: b6 06 e0 01 inc %i3
20051c4: b4 06 a0 10 add %i2, 0x10, %i2
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
for (part_num = 0;
20051c8: 82 0e e0 ff and %i3, 0xff, %g1
20051cc: 80 a0 60 05 cmp %g1, 5
20051d0: 12 bf ff eb bne 200517c <partition_table_get+0xf4>
20051d4: a0 04 20 04 add %l0, 4, %l0
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
20051d8: d0 07 bf f8 ld [ %fp + -8 ], %o0
20051dc: 40 00 03 25 call 2005e70 <free>
20051e0: b6 10 20 00 clr %i3
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
20051e4: 82 10 20 04 mov 4, %g1
20051e8: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
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];
20051ec: d4 06 20 28 ld [ %i0 + 0x28 ], %o2
/* There cannot be more than one extended partition,
but we are to process each primary partition */
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
20051f0: b6 06 e0 01 inc %i3
{
part_desc = disk_desc->partitions[part_num];
if (part_desc != NULL && is_extended(part_desc->sys_type))
20051f4: 80 a2 a0 00 cmp %o2, 0
20051f8: 02 80 00 0c be 2005228 <partition_table_get+0x1a0> <== NEVER TAKEN
20051fc: d4 27 bf fc st %o2, [ %fp + -4 ]
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2005200: c2 0a a0 01 ldub [ %o2 + 1 ], %g1
2005204: 84 18 60 85 xor %g1, 0x85, %g2
2005208: 80 a0 00 02 cmp %g0, %g2
200520c: 82 18 60 05 xor %g1, 5, %g1
2005210: 84 60 3f ff subx %g0, -1, %g2
2005214: 80 a0 00 01 cmp %g0, %g1
2005218: 82 60 3f ff subx %g0, -1, %g1
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))
200521c: 80 90 80 01 orcc %g2, %g1, %g0
2005220: 32 80 00 07 bne,a 200523c <partition_table_get+0x1b4>
2005224: d2 02 a0 04 ld [ %o2 + 4 ], %o1
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;
2005228: 80 a6 e0 04 cmp %i3, 4
200522c: 12 bf ff f0 bne 20051ec <partition_table_get+0x164>
2005230: b0 06 20 04 add %i0, 4, %i0
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
2005234: 10 bf ff a5 b 20050c8 <partition_table_get+0x40>
2005238: 90 10 00 1d mov %i5, %o0
part_num++)
{
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);
200523c: 7f ff ff 36 call 2004f14 <read_extended_partition>
2005240: 90 10 00 1d mov %i5, %o0
free(part_desc);
2005244: 40 00 03 0b call 2005e70 <free>
2005248: d0 07 bf fc ld [ %fp + -4 ], %o0
disk_desc->partitions[part_num] = NULL;
200524c: 10 bf ff f7 b 2005228 <partition_table_get+0x1a0>
2005250: c0 26 20 28 clr [ %i0 + 0x28 ]
part_num++)
{
rc = data_to_part_desc(data, &part_desc);
if (rc != RTEMS_SUCCESSFUL)
{
free(sector);
2005254: 40 00 03 07 call 2005e70 <free> <== NOT EXECUTED
2005258: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
200525c: 10 bf ff 9b b 20050c8 <partition_table_get+0x40> <== NOT EXECUTED
2005260: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
02004894 <pathconf>:
long pathconf(
const char *path,
int name
)
{
2004894: 9d e3 bf a0 save %sp, -96, %sp
int status;
int fd;
fd = open( path, O_RDONLY );
2004898: 92 10 20 00 clr %o1
200489c: 90 10 00 18 mov %i0, %o0
20048a0: 7f ff ff 6e call 2004658 <open>
20048a4: b0 10 3f ff mov -1, %i0
if ( fd == -1 )
20048a8: 80 a2 3f ff cmp %o0, -1
20048ac: 02 80 00 07 be 20048c8 <pathconf+0x34> <== ALWAYS TAKEN
20048b0: ba 10 00 08 mov %o0, %i5
return -1;
status = fpathconf( fd, name );
20048b4: 40 00 15 38 call 2009d94 <fpathconf> <== NOT EXECUTED
20048b8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20048bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
(void) close( fd );
20048c0: 40 00 15 07 call 2009cdc <close> <== NOT EXECUTED
20048c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return status;
}
20048c8: 81 c7 e0 08 ret
20048cc: 81 e8 00 00 restore
0200da00 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
200da00: 9d e3 bf 90 save %sp, -112, %sp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
200da04: 92 10 21 ff mov 0x1ff, %o1
200da08: 11 00 80 81 sethi %hi(0x2020400), %o0
return -1;
200da0c: ba 10 3f ff mov -1, %i5
)
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
200da10: 40 00 05 ae call 200f0c8 <rtems_mkdir>
200da14: 90 12 22 a0 or %o0, 0x2a0, %o0
200da18: 80 a2 20 00 cmp %o0, 0
200da1c: 12 80 00 33 bne 200dae8 <pipe_create+0xe8> <== NEVER TAKEN
200da20: 03 00 80 88 sethi %hi(0x2022000), %g1
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200da24: d4 10 60 28 lduh [ %g1 + 0x28 ], %o2 ! 2022028 <rtems_pipe_no>
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200da28: 05 0b dd 1b sethi %hi(0x2f746c00), %g2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200da2c: 88 02 a0 01 add %o2, 1, %g4
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200da30: 84 10 a1 70 or %g2, 0x170, %g2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200da34: c8 30 60 28 sth %g4, [ %g1 + 0x28 ]
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
200da38: 07 0b cb 99 sethi %hi(0x2f2e6400), %g3
200da3c: 03 00 00 19 sethi %hi(0x6400), %g1
200da40: 86 10 e2 69 or %g3, 0x269, %g3
200da44: 82 10 62 6f or %g1, 0x26f, %g1
200da48: c4 3f bf f0 std %g2, [ %fp + -16 ]
200da4c: c2 37 bf f8 sth %g1, [ %fp + -8 ]
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
200da50: 95 2a a0 10 sll %o2, 0x10, %o2
200da54: 90 07 bf fa add %fp, -6, %o0
200da58: 95 32 a0 10 srl %o2, 0x10, %o2
200da5c: 13 00 80 81 sethi %hi(0x2020400), %o1
200da60: 40 00 0f dd call 20119d4 <sprintf>
200da64: 92 12 62 a8 or %o1, 0x2a8, %o1 ! 20206a8 <_CPU_Trap_slot_template+0x18>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
200da68: 90 07 bf f0 add %fp, -16, %o0
200da6c: 40 00 04 dd call 200ede0 <mkfifo>
200da70: 92 10 21 80 mov 0x180, %o1
200da74: 80 a2 20 00 cmp %o0, 0
200da78: 12 80 00 33 bne 200db44 <pipe_create+0x144>
200da7c: 90 07 bf f0 add %fp, -16, %o0
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);
200da80: 7f ff dd a6 call 2005118 <open>
200da84: 13 00 00 10 sethi %hi(0x4000), %o1
if (filsdes[0] < 0) {
200da88: 80 a2 20 00 cmp %o0, 0
200da8c: 06 80 00 21 bl 200db10 <pipe_create+0x110>
200da90: d0 26 00 00 st %o0, [ %i0 ]
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
200da94: 03 00 80 85 sethi %hi(0x2021400), %g1
200da98: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 20217bc <rtems_libio_number_iops>
200da9c: 80 a2 00 02 cmp %o0, %g2
200daa0: 0a 80 00 15 bcs 200daf4 <pipe_create+0xf4> <== ALWAYS TAKEN
200daa4: 82 10 20 00 clr %g1
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200daa8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
filsdes[1] = open(fifopath, O_WRONLY);
200daac: 90 07 bf f0 add %fp, -16, %o0
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
200dab0: 84 08 bf fe and %g2, -2, %g2
filsdes[1] = open(fifopath, O_WRONLY);
200dab4: 92 10 20 01 mov 1, %o1
200dab8: 7f ff dd 98 call 2005118 <open>
200dabc: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
200dac0: d0 26 20 04 st %o0, [ %i0 + 4 ]
if (filsdes[1] < 0) {
200dac4: 80 a2 20 00 cmp %o0, 0
200dac8: 06 80 00 19 bl 200db2c <pipe_create+0x12c>
200dacc: b8 10 20 00 clr %i4
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
200dad0: 7f ff e9 a1 call 2008154 <unlink>
200dad4: 90 07 bf f0 add %fp, -16, %o0
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
200dad8: ba 10 20 00 clr %i5
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
200dadc: 80 a7 20 00 cmp %i4, 0
200dae0: 12 80 00 1c bne 200db50 <pipe_create+0x150>
200dae4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(err);
return 0;
}
200dae8: b0 10 00 1d mov %i5, %i0
200daec: 81 c7 e0 08 ret
200daf0: 81 e8 00 00 restore
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
200daf4: 03 00 80 88 sethi %hi(0x2022000), %g1
200daf8: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 2022290 <rtems_libio_iops>
200dafc: 85 2a 20 03 sll %o0, 3, %g2
200db00: 91 2a 20 06 sll %o0, 6, %o0
200db04: 90 00 80 08 add %g2, %o0, %o0
200db08: 10 bf ff e8 b 200daa8 <pipe_create+0xa8>
200db0c: 82 00 40 08 add %g1, %o0, %g1
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
200db10: 40 00 0c 3a call 2010bf8 <__errno>
200db14: ba 10 20 00 clr %i5
200db18: f8 02 00 00 ld [ %o0 ], %i4
/* 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);
200db1c: 7f ff e9 8e call 2008154 <unlink>
200db20: 90 07 bf f0 add %fp, -16, %o0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
200db24: 10 bf ff ef b 200dae0 <pipe_create+0xe0>
200db28: 80 a7 20 00 cmp %i4, 0
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
200db2c: 40 00 0c 33 call 2010bf8 <__errno>
200db30: 01 00 00 00 nop
200db34: f8 02 00 00 ld [ %o0 ], %i4
close(filsdes[0]);
200db38: 7f ff d9 1c call 2003fa8 <close>
200db3c: d0 06 00 00 ld [ %i0 ], %o0
200db40: 30 bf ff e4 b,a 200dad0 <pipe_create+0xd0>
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
200db44: 40 00 0c 2d call 2010bf8 <__errno>
200db48: b0 10 00 1d mov %i5, %i0
200db4c: 30 bf ff e8 b,a 200daec <pipe_create+0xec>
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
200db50: 40 00 0c 2a call 2010bf8 <__errno>
200db54: ba 10 3f ff mov -1, %i5
200db58: 10 bf ff e4 b 200dae8 <pipe_create+0xe8>
200db5c: f8 22 00 00 st %i4, [ %o0 ]
0200eeb4 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
200eeb4: 9d e3 bf a0 save %sp, -96, %sp
if (cmd == FIONREAD) {
200eeb8: 03 10 01 19 sethi %hi(0x40046400), %g1
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
200eebc: ba 10 00 18 mov %i0, %i5
if (cmd == FIONREAD) {
200eec0: 82 10 62 7f or %g1, 0x27f, %g1
200eec4: 80 a6 40 01 cmp %i1, %g1
200eec8: 12 80 00 12 bne 200ef10 <pipe_ioctl+0x5c>
200eecc: b0 10 3f ea mov -22, %i0
if (buffer == NULL)
200eed0: 80 a6 a0 00 cmp %i2, 0
200eed4: 02 80 00 0f be 200ef10 <pipe_ioctl+0x5c>
200eed8: b0 10 3f f2 mov -14, %i0
return -EFAULT;
if (! PIPE_LOCK(pipe))
200eedc: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200eee0: 92 10 20 00 clr %o1
200eee4: 94 10 20 00 clr %o2
200eee8: 7f ff e9 be call 20095e0 <rtems_semaphore_obtain>
200eeec: b0 10 3f fc mov -4, %i0
200eef0: 80 a2 20 00 cmp %o0, 0
200eef4: 12 80 00 07 bne 200ef10 <pipe_ioctl+0x5c> <== NEVER TAKEN
200eef8: 01 00 00 00 nop
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
200eefc: c2 07 60 0c ld [ %i5 + 0xc ], %g1
PIPE_UNLOCK(pipe);
200ef00: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
return 0;
200ef04: b0 10 20 00 clr %i0
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
200ef08: 7f ff ea 00 call 2009708 <rtems_semaphore_release>
200ef0c: c2 26 80 00 st %g1, [ %i2 ]
return 0;
}
return -EINVAL;
}
200ef10: 81 c7 e0 08 ret
200ef14: 81 e8 00 00 restore
0200eb18 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200eb18: 9d e3 bf 98 save %sp, -104, %sp
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200eb1c: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200eb20: ba 10 00 18 mov %i0, %i5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
200eb24: 92 10 20 00 clr %o1
200eb28: 94 10 20 00 clr %o2
200eb2c: 7f ff ea ad call 20095e0 <rtems_semaphore_obtain>
200eb30: b0 10 3f fc mov -4, %i0
200eb34: 80 a2 20 00 cmp %o0, 0
200eb38: 12 80 00 2c bne 200ebe8 <pipe_read+0xd0> <== NEVER TAKEN
200eb3c: a0 10 20 00 clr %l0
return -EINTR;
while (read < count) {
200eb40: 80 a6 a0 00 cmp %i2, 0
200eb44: 02 80 00 52 be 200ec8c <pipe_read+0x174> <== NEVER TAKEN
200eb48: b0 10 20 00 clr %i0
while (PIPE_EMPTY(pipe)) {
200eb4c: f8 07 60 0c ld [ %i5 + 0xc ], %i4
200eb50: 80 a7 20 00 cmp %i4, 0
200eb54: 12 80 00 29 bne 200ebf8 <pipe_read+0xe0>
200eb58: 82 26 80 10 sub %i2, %l0, %g1
/* Not an error */
if (pipe->Writers == 0)
200eb5c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200eb60: 80 a0 60 00 cmp %g1, 0
200eb64: 22 80 00 1c be,a 200ebd4 <pipe_read+0xbc>
200eb68: b8 10 20 00 clr %i4
goto out_locked;
if (LIBIO_NODELAY(iop)) {
200eb6c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
200eb70: 80 88 60 01 btst 1, %g1
200eb74: 32 80 00 18 bne,a 200ebd4 <pipe_read+0xbc>
200eb78: b8 10 3f f5 mov -11, %i4
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200eb7c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
PIPE_UNLOCK(pipe);
200eb80: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
200eb84: 82 00 60 01 inc %g1
PIPE_UNLOCK(pipe);
200eb88: 7f ff ea e0 call 2009708 <rtems_semaphore_release>
200eb8c: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
if (! PIPE_READWAIT(pipe))
200eb90: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200eb94: 40 00 03 b7 call 200fa70 <rtems_barrier_wait>
200eb98: 92 10 20 00 clr %o1
200eb9c: 80 a0 00 08 cmp %g0, %o0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200eba0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
200eba4: b8 60 20 00 subx %g0, 0, %i4
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200eba8: 92 10 20 00 clr %o1
200ebac: 94 10 20 00 clr %o2
200ebb0: 7f ff ea 8c call 20095e0 <rtems_semaphore_obtain>
200ebb4: b8 0f 3f fc and %i4, -4, %i4
200ebb8: 80 a2 20 00 cmp %o0, 0
200ebbc: 12 80 00 36 bne 200ec94 <pipe_read+0x17c> <== NEVER TAKEN
200ebc0: 80 a7 20 00 cmp %i4, 0
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
200ebc4: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200ebc8: 82 00 7f ff add %g1, -1, %g1
if (ret != 0)
200ebcc: 02 bf ff e0 be 200eb4c <pipe_read+0x34> <== ALWAYS TAKEN
200ebd0: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
200ebd4: 7f ff ea cd call 2009708 <rtems_semaphore_release>
200ebd8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
out_nolock:
if (read > 0)
200ebdc: 80 a6 20 00 cmp %i0, 0
200ebe0: 04 80 00 04 ble 200ebf0 <pipe_read+0xd8>
200ebe4: 01 00 00 00 nop
return read;
return ret;
}
200ebe8: 81 c7 e0 08 ret
200ebec: 81 e8 00 00 restore
200ebf0: 81 c7 e0 08 ret
200ebf4: 91 e8 00 1c restore %g0, %i4, %o0
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
200ebf8: 80 a7 00 01 cmp %i4, %g1
200ebfc: 38 80 00 02 bgu,a 200ec04 <pipe_read+0xec>
200ec00: b8 10 00 01 mov %g1, %i4
chunk1 = pipe->Size - pipe->Start;
200ec04: c2 07 60 08 ld [ %i5 + 8 ], %g1
200ec08: e2 07 60 04 ld [ %i5 + 4 ], %l1
200ec0c: a2 24 40 01 sub %l1, %g1, %l1
if (chunk > chunk1) {
200ec10: 80 a7 00 11 cmp %i4, %l1
200ec14: 04 80 00 22 ble 200ec9c <pipe_read+0x184>
200ec18: d2 07 40 00 ld [ %i5 ], %o1
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
200ec1c: 94 10 00 11 mov %l1, %o2
200ec20: 92 02 40 01 add %o1, %g1, %o1
200ec24: 40 00 0d e2 call 20123ac <memcpy>
200ec28: 90 06 40 10 add %i1, %l0, %o0
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
200ec2c: d2 07 40 00 ld [ %i5 ], %o1
200ec30: 90 04 00 11 add %l0, %l1, %o0
200ec34: 94 27 00 11 sub %i4, %l1, %o2
200ec38: 40 00 0d dd call 20123ac <memcpy>
200ec3c: 90 06 40 08 add %i1, %o0, %o0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
200ec40: d0 07 60 08 ld [ %i5 + 8 ], %o0
pipe->Start %= pipe->Size;
200ec44: d2 07 60 04 ld [ %i5 + 4 ], %o1
200ec48: 40 00 3e 11 call 201e48c <.urem>
200ec4c: 90 07 00 08 add %i4, %o0, %o0
pipe->Length -= chunk;
200ec50: c2 07 60 0c ld [ %i5 + 0xc ], %g1
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
200ec54: d0 27 60 08 st %o0, [ %i5 + 8 ]
pipe->Length -= chunk;
200ec58: 82 20 40 1c sub %g1, %i4, %g1
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
200ec5c: 80 a0 60 00 cmp %g1, 0
200ec60: 12 80 00 03 bne 200ec6c <pipe_read+0x154>
200ec64: c2 27 60 0c st %g1, [ %i5 + 0xc ]
pipe->Start = 0;
200ec68: c0 27 60 08 clr [ %i5 + 8 ]
if (pipe->waitingWriters > 0)
200ec6c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200ec70: 80 a0 60 00 cmp %g1, 0
200ec74: 32 80 00 10 bne,a 200ecb4 <pipe_read+0x19c>
200ec78: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
200ec7c: b0 06 00 1c add %i0, %i4, %i0
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
200ec80: 80 a6 00 1a cmp %i0, %i2
200ec84: 0a bf ff b2 bcs 200eb4c <pipe_read+0x34> <== NEVER TAKEN
200ec88: a0 10 00 18 mov %i0, %l0
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
200ec8c: 10 bf ff d2 b 200ebd4 <pipe_read+0xbc>
200ec90: b8 10 20 00 clr %i4
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
200ec94: 10 bf ff d2 b 200ebdc <pipe_read+0xc4> <== NOT EXECUTED
200ec98: b8 10 3f fc mov -4, %i4 <== NOT EXECUTED
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);
200ec9c: 90 06 40 10 add %i1, %l0, %o0
200eca0: 92 02 40 01 add %o1, %g1, %o1
200eca4: 40 00 0d c2 call 20123ac <memcpy>
200eca8: 94 10 00 1c mov %i4, %o2
pipe->Start += chunk;
200ecac: 10 bf ff e6 b 200ec44 <pipe_read+0x12c>
200ecb0: d0 07 60 08 ld [ %i5 + 8 ], %o0
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
200ecb4: 40 00 03 58 call 200fa14 <rtems_barrier_release>
200ecb8: 92 07 bf fc add %fp, -4, %o1
read += chunk;
200ecbc: 10 bf ff f1 b 200ec80 <pipe_read+0x168>
200ecc0: b0 06 00 1c add %i0, %i4, %i0
0200e584 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
200e584: 9d e3 bf 98 save %sp, -104, %sp
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
200e588: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
200e58c: fa 06 00 00 ld [ %i0 ], %i5
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
200e590: 80 88 60 02 btst 2, %g1
200e594: 02 80 00 05 be 200e5a8 <pipe_release+0x24>
200e598: b8 08 60 06 and %g1, 6, %i4
pipe->Readers --;
200e59c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200e5a0: 82 00 7f ff add %g1, -1, %g1
200e5a4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
if (mode & LIBIO_FLAGS_WRITE)
200e5a8: 80 8f 20 04 btst 4, %i4
200e5ac: 02 80 00 05 be 200e5c0 <pipe_release+0x3c>
200e5b0: 01 00 00 00 nop
pipe->Writers --;
200e5b4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200e5b8: 82 00 7f ff add %g1, -1, %g1
200e5bc: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
PIPE_UNLOCK(pipe);
200e5c0: 7f ff ec 52 call 2009708 <rtems_semaphore_release>
200e5c4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
if (pipe->Readers == 0 && pipe->Writers == 0) {
200e5c8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200e5cc: 80 a0 60 00 cmp %g1, 0
200e5d0: 12 80 00 0c bne 200e600 <pipe_release+0x7c>
200e5d4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200e5d8: 80 a0 60 00 cmp %g1, 0
200e5dc: 02 80 00 1d be 200e650 <pipe_release+0xcc>
200e5e0: 80 a7 20 04 cmp %i4, 4
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
200e5e4: 32 80 00 14 bne,a 200e634 <pipe_release+0xb0> <== ALWAYS TAKEN
200e5e8: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200e5ec: 03 00 80 8b sethi %hi(0x2022c00), %g1 <== NOT EXECUTED
200e5f0: 7f ff ec 46 call 2009708 <rtems_semaphore_release> <== NOT EXECUTED
200e5f4: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 2022f58 <pipe_semaphore><== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200e5f8: 81 c7 e0 08 ret <== NOT EXECUTED
200e5fc: 81 e8 00 00 restore <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
200e600: 80 a0 60 00 cmp %g1, 0
200e604: 12 bf ff fa bne 200e5ec <pipe_release+0x68> <== NEVER TAKEN
200e608: 80 a7 20 02 cmp %i4, 2
200e60c: 02 bf ff f9 be 200e5f0 <pipe_release+0x6c> <== NEVER TAKEN
200e610: 03 00 80 8b sethi %hi(0x2022c00), %g1
PIPE_WAKEUPREADERS(pipe);
200e614: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200e618: 40 00 04 ff call 200fa14 <rtems_barrier_release>
200e61c: 92 07 bf fc add %fp, -4, %o1
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200e620: 03 00 80 8b sethi %hi(0x2022c00), %g1
200e624: 7f ff ec 39 call 2009708 <rtems_semaphore_release>
200e628: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 2022f58 <pipe_semaphore>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200e62c: 81 c7 e0 08 ret
200e630: 81 e8 00 00 restore
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
200e634: 40 00 04 f8 call 200fa14 <rtems_barrier_release>
200e638: 92 07 bf fc add %fp, -4, %o1
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200e63c: 03 00 80 8b sethi %hi(0x2022c00), %g1
200e640: 7f ff ec 32 call 2009708 <rtems_semaphore_release>
200e644: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 2022f58 <pipe_semaphore>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200e648: 81 c7 e0 08 ret
200e64c: 81 e8 00 00 restore
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
200e650: 40 00 04 c8 call 200f970 <rtems_barrier_delete>
200e654: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
rtems_barrier_delete(pipe->writeBarrier);
200e658: 40 00 04 c6 call 200f970 <rtems_barrier_delete>
200e65c: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
rtems_semaphore_delete(pipe->Semaphore);
200e660: 7f ff eb a9 call 2009504 <rtems_semaphore_delete>
200e664: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
free(pipe->Buffer);
200e668: 7f ff d9 0b call 2004a94 <free>
200e66c: d0 07 40 00 ld [ %i5 ], %o0
free(pipe);
200e670: 7f ff d9 09 call 2004a94 <free>
200e674: 90 10 00 1d mov %i5, %o0
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
200e678: 03 00 80 8b sethi %hi(0x2022c00), %g1
200e67c: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 2022f58 <pipe_semaphore>
200e680: 7f ff ec 22 call 2009708 <rtems_semaphore_release>
200e684: c0 26 00 00 clr [ %i0 ]
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
200e688: 81 c7 e0 08 ret
200e68c: 81 e8 00 00 restore
0200ecc4 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
200ecc4: 9d e3 bf 98 save %sp, -104, %sp
200ecc8: ba 10 00 18 mov %i0, %i5
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
200eccc: 80 a6 a0 00 cmp %i2, 0
200ecd0: 12 80 00 04 bne 200ece0 <pipe_write+0x1c> <== ALWAYS TAKEN
200ecd4: b0 10 20 00 clr %i0
#endif
if (written > 0)
return written;
return ret;
}
200ecd8: 81 c7 e0 08 ret
200ecdc: 81 e8 00 00 restore
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
200ece0: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
200ece4: 92 10 20 00 clr %o1
200ece8: 94 10 20 00 clr %o2
200ecec: 7f ff ea 3d call 20095e0 <rtems_semaphore_obtain>
200ecf0: b0 10 3f fc mov -4, %i0
200ecf4: 80 a2 20 00 cmp %o0, 0
200ecf8: 12 bf ff f8 bne 200ecd8 <pipe_write+0x14> <== NEVER TAKEN
200ecfc: 01 00 00 00 nop
return -EINTR;
if (pipe->Readers == 0) {
200ed00: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200ed04: 80 a0 60 00 cmp %g1, 0
200ed08: 02 80 00 5d be 200ee7c <pipe_write+0x1b8>
200ed0c: b8 10 3f e0 mov -32, %i4
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
200ed10: e4 07 60 04 ld [ %i5 + 4 ], %l2
200ed14: 80 a6 80 12 cmp %i2, %l2
200ed18: 08 80 00 57 bleu 200ee74 <pipe_write+0x1b0> <== ALWAYS TAKEN
200ed1c: a0 10 20 01 mov 1, %l0
200ed20: a2 10 20 00 clr %l1
200ed24: b0 10 20 00 clr %i0
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
200ed28: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200ed2c: b8 24 80 01 sub %l2, %g1, %i4
200ed30: 80 a7 00 10 cmp %i4, %l0
200ed34: 1a 80 00 27 bcc 200edd0 <pipe_write+0x10c>
200ed38: 84 26 80 11 sub %i2, %l1, %g2
if (LIBIO_NODELAY(iop)) {
200ed3c: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
200ed40: 80 88 60 01 btst 1, %g1
200ed44: 32 80 00 45 bne,a 200ee58 <pipe_write+0x194>
200ed48: b8 10 3f f5 mov -11, %i4
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
200ed4c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
PIPE_UNLOCK(pipe);
200ed50: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
200ed54: 82 00 60 01 inc %g1
PIPE_UNLOCK(pipe);
200ed58: 7f ff ea 6c call 2009708 <rtems_semaphore_release>
200ed5c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
if (! PIPE_WRITEWAIT(pipe))
200ed60: d0 07 60 30 ld [ %i5 + 0x30 ], %o0
200ed64: 40 00 03 43 call 200fa70 <rtems_barrier_wait>
200ed68: 92 10 20 00 clr %o1
200ed6c: 80 a0 00 08 cmp %g0, %o0
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200ed70: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
200ed74: b8 60 20 00 subx %g0, 0, %i4
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
200ed78: 92 10 20 00 clr %o1
200ed7c: 94 10 20 00 clr %o2
200ed80: 7f ff ea 18 call 20095e0 <rtems_semaphore_obtain>
200ed84: b8 0f 3f fc and %i4, -4, %i4
200ed88: 80 a2 20 00 cmp %o0, 0
200ed8c: 12 80 00 3e bne 200ee84 <pipe_write+0x1c0> <== NEVER TAKEN
200ed90: 80 a7 20 00 cmp %i4, 0
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
200ed94: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200ed98: 82 00 7f ff add %g1, -1, %g1
if (ret != 0)
200ed9c: 12 80 00 2f bne 200ee58 <pipe_write+0x194> <== NEVER TAKEN
200eda0: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
goto out_locked;
if (pipe->Readers == 0) {
200eda4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200eda8: 80 a0 60 00 cmp %g1, 0
200edac: 02 80 00 2b be 200ee58 <pipe_write+0x194> <== NEVER TAKEN
200edb0: b8 10 3f e0 mov -32, %i4
200edb4: e4 07 60 04 ld [ %i5 + 4 ], %l2
/* 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) {
200edb8: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200edbc: b8 24 80 01 sub %l2, %g1, %i4
200edc0: 80 a7 00 10 cmp %i4, %l0
200edc4: 2a bf ff df bcs,a 200ed40 <pipe_write+0x7c> <== NEVER TAKEN
200edc8: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
200edcc: 84 26 80 11 sub %i2, %l1, %g2
200edd0: 80 a7 00 02 cmp %i4, %g2
200edd4: 38 80 00 02 bgu,a 200eddc <pipe_write+0x118>
200edd8: b8 10 00 02 mov %g2, %i4
chunk1 = pipe->Size - PIPE_WSTART(pipe);
200eddc: d0 07 60 08 ld [ %i5 + 8 ], %o0
200ede0: 92 10 00 12 mov %l2, %o1
200ede4: 40 00 3d aa call 201e48c <.urem>
200ede8: 90 00 40 08 add %g1, %o0, %o0
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
200edec: c2 07 40 00 ld [ %i5 ], %g1
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
200edf0: a0 24 80 08 sub %l2, %o0, %l0
if (chunk > chunk1) {
200edf4: 80 a7 00 10 cmp %i4, %l0
200edf8: 04 80 00 25 ble 200ee8c <pipe_write+0x1c8>
200edfc: 92 06 40 11 add %i1, %l1, %o1
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
200ee00: 94 10 00 10 mov %l0, %o2
200ee04: 40 00 0d 6a call 20123ac <memcpy>
200ee08: 90 00 40 08 add %g1, %o0, %o0
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
200ee0c: d0 07 40 00 ld [ %i5 ], %o0
200ee10: 92 04 00 11 add %l0, %l1, %o1
200ee14: 94 27 00 10 sub %i4, %l0, %o2
200ee18: 40 00 0d 65 call 20123ac <memcpy>
200ee1c: 92 06 40 09 add %i1, %o1, %o1
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
200ee20: c4 07 60 0c ld [ %i5 + 0xc ], %g2
if (pipe->waitingReaders > 0)
200ee24: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
200ee28: 84 00 80 1c add %g2, %i4, %g2
if (pipe->waitingReaders > 0)
200ee2c: 80 a0 60 00 cmp %g1, 0
200ee30: 12 80 00 1c bne 200eea0 <pipe_write+0x1dc>
200ee34: c4 27 60 0c st %g2, [ %i5 + 0xc ]
PIPE_WAKEUPREADERS(pipe);
written += chunk;
200ee38: b0 06 00 1c add %i0, %i4, %i0
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
200ee3c: 80 a6 80 18 cmp %i2, %i0
200ee40: 08 80 00 05 bleu 200ee54 <pipe_write+0x190> <== ALWAYS TAKEN
200ee44: a2 10 00 18 mov %i0, %l1
200ee48: e4 07 60 04 ld [ %i5 + 4 ], %l2 <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
200ee4c: 10 bf ff b7 b 200ed28 <pipe_write+0x64> <== NOT EXECUTED
200ee50: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
200ee54: b8 10 20 00 clr %i4
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
200ee58: 7f ff ea 2c call 2009708 <rtems_semaphore_release>
200ee5c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
200ee60: 80 a6 20 00 cmp %i0, 0
200ee64: 14 bf ff 9d bg 200ecd8 <pipe_write+0x14>
200ee68: 01 00 00 00 nop
return written;
return ret;
}
200ee6c: 81 c7 e0 08 ret
200ee70: 91 e8 00 1c restore %g0, %i4, %o0
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
200ee74: 10 bf ff ab b 200ed20 <pipe_write+0x5c>
200ee78: a0 10 00 1a mov %i2, %l0
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
200ee7c: 10 bf ff f7 b 200ee58 <pipe_write+0x194>
200ee80: b0 10 20 00 clr %i0
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
200ee84: 10 bf ff f7 b 200ee60 <pipe_write+0x19c> <== NOT EXECUTED
200ee88: b8 10 3f fc mov -4, %i4 <== NOT EXECUTED
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);
200ee8c: 90 00 40 08 add %g1, %o0, %o0
200ee90: 40 00 0d 47 call 20123ac <memcpy>
200ee94: 94 10 00 1c mov %i4, %o2
pipe->Length += chunk;
200ee98: 10 bf ff e3 b 200ee24 <pipe_write+0x160>
200ee9c: c4 07 60 0c ld [ %i5 + 0xc ], %g2
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
200eea0: d0 07 60 2c ld [ %i5 + 0x2c ], %o0
200eea4: 40 00 02 dc call 200fa14 <rtems_barrier_release>
200eea8: 92 07 bf fc add %fp, -4, %o1
written += chunk;
200eeac: 10 bf ff e4 b 200ee3c <pipe_write+0x178>
200eeb0: b0 06 00 1c add %i0, %i4, %i0
02007d70 <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
2007d70: 05 00 80 8f sethi %hi(0x2023c00), %g2
2007d74: 84 10 a3 a0 or %g2, 0x3a0, %g2 ! 2023fa0 <rtems_malloc_statistics>
2007d78: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2007d7c: 86 00 e0 01 inc %g3
2007d80: c6 20 a0 08 st %g3, [ %g2 + 8 ]
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2007d84: 84 02 7f ff add %o1, -1, %g2
2007d88: 80 88 80 09 btst %g2, %o1
2007d8c: 22 80 00 04 be,a 2007d9c <posix_memalign+0x2c> <== ALWAYS TAKEN
2007d90: 80 a2 60 03 cmp %o1, 3
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
2007d94: 81 c3 e0 08 retl
2007d98: 90 10 20 16 mov 0x16, %o0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2007d9c: 08 bf ff fe bleu 2007d94 <posix_memalign+0x24>
2007da0: 01 00 00 00 nop
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
2007da4: 82 13 c0 00 mov %o7, %g1
2007da8: 40 00 00 8c call 2007fd8 <rtems_memalign>
2007dac: 9e 10 40 00 mov %g1, %o7
0200d0c8 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
200d0c8: 9d e3 bf a0 save %sp, -96, %sp
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
200d0cc: 7f ff df e2 call 2005054 <malloc>
200d0d0: 90 10 20 10 mov 0x10, %o0
if (rd == NULL) {
200d0d4: ba 92 20 00 orcc %o0, 0, %i5
200d0d8: 02 80 00 0b be 200d104 <ramdisk_allocate+0x3c> <== NEVER TAKEN
200d0dc: 80 a6 20 00 cmp %i0, 0
return NULL;
}
if (area_begin == NULL) {
200d0e0: 02 80 00 0b be 200d10c <ramdisk_allocate+0x44>
200d0e4: 90 10 00 1a mov %i2, %o0
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
200d0e8: c0 2f 60 0d clrb [ %i5 + 0xd ]
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
200d0ec: 82 10 20 01 mov 1, %g1
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
200d0f0: f2 27 40 00 st %i1, [ %i5 ]
rd->block_num = block_count;
200d0f4: f4 27 60 04 st %i2, [ %i5 + 4 ]
rd->area = area_begin;
200d0f8: f0 27 60 08 st %i0, [ %i5 + 8 ]
rd->trace = trace;
200d0fc: f6 2f 60 0e stb %i3, [ %i5 + 0xe ]
rd->initialized = true;
200d100: c2 2f 60 0c stb %g1, [ %i5 + 0xc ]
return rd;
}
200d104: 81 c7 e0 08 ret
200d108: 91 e8 00 1d restore %g0, %i5, %o0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
200d10c: 7f ff dd 80 call 200470c <calloc>
200d110: 92 10 00 19 mov %i1, %o1
if (area_begin == NULL) {
200d114: b0 92 20 00 orcc %o0, 0, %i0
200d118: 02 80 00 04 be 200d128 <ramdisk_allocate+0x60> <== NEVER TAKEN
200d11c: 82 10 20 01 mov 1, %g1
free(rd);
return NULL;
}
rd->malloced = true;
200d120: 10 bf ff f4 b 200d0f0 <ramdisk_allocate+0x28>
200d124: c2 2f 60 0d stb %g1, [ %i5 + 0xd ]
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
free(rd);
200d128: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200d12c: 7f ff de 49 call 2004a50 <free> <== NOT EXECUTED
200d130: ba 10 20 00 clr %i5 <== NOT EXECUTED
return NULL;
200d134: 30 bf ff f4 b,a 200d104 <ramdisk_allocate+0x3c> <== NOT EXECUTED
0200d138 <ramdisk_free>:
return rd;
}
void ramdisk_free(ramdisk *rd)
{
200d138: 9d e3 bf a0 save %sp, -96, %sp
if (rd != NULL) {
200d13c: 80 a6 20 00 cmp %i0, 0
200d140: 02 80 00 0c be 200d170 <ramdisk_free+0x38> <== NEVER TAKEN
200d144: 01 00 00 00 nop
if (rd->malloced) {
200d148: c2 0e 20 0d ldub [ %i0 + 0xd ], %g1
200d14c: 80 a0 60 00 cmp %g1, 0
200d150: 12 80 00 04 bne 200d160 <ramdisk_free+0x28>
200d154: 01 00 00 00 nop
free(rd->area);
}
free(rd);
200d158: 7f ff de 3e call 2004a50 <free>
200d15c: 81 e8 00 00 restore
void ramdisk_free(ramdisk *rd)
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
200d160: 7f ff de 3c call 2004a50 <free>
200d164: d0 06 20 08 ld [ %i0 + 8 ], %o0
}
free(rd);
200d168: 7f ff de 3a call 2004a50 <free>
200d16c: 81 e8 00 00 restore
200d170: 81 c7 e0 08 ret <== NOT EXECUTED
200d174: 81 e8 00 00 restore <== NOT EXECUTED
02023b90 <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
2023b90: 9d e3 bf 80 save %sp, -128, %sp
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
struct ramdisk *r;
rtems_status_code rc;
rc = rtems_disk_io_initialize();
2023b94: 7f ff 91 22 call 200801c <rtems_disk_io_initialize>
2023b98: b4 10 00 18 mov %i0, %i2
if (rc != RTEMS_SUCCESSFUL)
2023b9c: b0 92 20 00 orcc %o0, 0, %i0
2023ba0: 02 80 00 04 be 2023bb0 <ramdisk_initialize+0x20> <== ALWAYS TAKEN
2023ba4: 33 00 81 be sethi %hi(0x206f800), %i1
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
}
2023ba8: 81 c7 e0 08 ret <== NOT EXECUTED
2023bac: 81 e8 00 00 restore <== NOT EXECUTED
* 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));
2023bb0: f6 06 63 78 ld [ %i1 + 0x378 ], %i3
2023bb4: 92 10 20 10 mov 0x10, %o1
2023bb8: 7f ff 93 ac call 2008a68 <calloc>
2023bbc: 90 10 00 1b mov %i3, %o0
r->trace = false;
2023bc0: c0 2a 20 0e clrb [ %o0 + 0xe ]
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
2023bc4: 80 a6 e0 00 cmp %i3, 0
2023bc8: 02 bf ff f8 be 2023ba8 <ramdisk_initialize+0x18> <== NEVER TAKEN
2023bcc: ba 10 00 08 mov %o0, %i5
2023bd0: 39 00 81 be sethi %hi(0x206f800), %i4
2023bd4: b0 16 63 78 or %i1, 0x378, %i0
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
2023bd8: 25 0b d9 19 sethi %hi(0x2f646400), %l2
2023bdc: 27 0b dc 99 sethi %hi(0x2f726400), %l3
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
2023be0: 21 00 80 8f sethi %hi(0x2023c00), %l0
* 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++)
2023be4: b8 17 23 7c or %i4, 0x37c, %i4
2023be8: b6 10 20 00 clr %i3
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
2023bec: a4 14 a1 76 or %l2, 0x176, %l2
2023bf0: a6 14 e0 61 or %l3, 0x61, %l3
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
ramdisk_ioctl, r, name);
2023bf4: a2 07 bf f0 add %fp, -16, %l1
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
2023bf8: a0 14 20 cc or %l0, 0xcc, %l0
}
}
else
{
r->malloced = false;
r->initialized = true;
2023bfc: b2 10 20 01 mov 1, %i1
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;
2023c00: d4 07 00 00 ld [ %i4 ], %o2
r->block_num = c->block_num;
2023c04: d6 07 20 04 ld [ %i4 + 4 ], %o3
if (c->location == NULL)
2023c08: c2 07 20 08 ld [ %i4 + 8 ], %g1
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;
2023c0c: f6 2f bf f8 stb %i3, [ %fp + -8 ]
r->block_size = c->block_size;
2023c10: d4 27 40 00 st %o2, [ %i5 ]
r->block_num = c->block_num;
2023c14: d6 27 60 04 st %o3, [ %i5 + 4 ]
if (c->location == NULL)
2023c18: 80 a0 60 00 cmp %g1, 0
2023c1c: 02 80 00 1f be 2023c98 <ramdisk_initialize+0x108> <== ALWAYS TAKEN
2023c20: e4 3f bf f0 std %l2, [ %fp + -16 ]
r->initialized = true;
}
}
else
{
r->malloced = false;
2023c24: c0 2f 60 0d clrb [ %i5 + 0xd ] <== NOT EXECUTED
r->initialized = true;
2023c28: f2 2f 60 0c stb %i1, [ %i5 + 0xc ] <== NOT EXECUTED
r->area = c->location;
2023c2c: c2 27 60 08 st %g1, [ %i5 + 8 ] <== NOT EXECUTED
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
2023c30: 92 10 00 1b mov %i3, %o1
2023c34: 9a 10 00 1d mov %i5, %o5
2023c38: 98 10 00 10 mov %l0, %o4
2023c3c: e2 23 a0 5c st %l1, [ %sp + 0x5c ]
2023c40: 7f ff 8f a0 call 2007ac0 <rtems_disk_create_phys>
2023c44: 90 10 00 1a mov %i2, %o0
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
2023c48: 80 a2 20 00 cmp %o0, 0
2023c4c: 22 80 00 08 be,a 2023c6c <ramdisk_initialize+0xdc> <== ALWAYS TAKEN
2023c50: c2 06 00 00 ld [ %i0 ], %g1
{
if (r->malloced)
2023c54: c2 0f 60 0d ldub [ %i5 + 0xd ], %g1 <== NOT EXECUTED
2023c58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2023c5c: 12 80 00 0b bne 2023c88 <ramdisk_initialize+0xf8> <== NOT EXECUTED
2023c60: 01 00 00 00 nop <== NOT EXECUTED
{
free(r->area);
}
r->initialized = false;
2023c64: c0 2f 60 0c clrb [ %i5 + 0xc ] <== 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++)
2023c68: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
2023c6c: b6 06 e0 01 inc %i3
2023c70: b8 07 20 0c add %i4, 0xc, %i4
2023c74: 80 a0 40 1b cmp %g1, %i3
2023c78: 18 bf ff e2 bgu 2023c00 <ramdisk_initialize+0x70> <== NEVER TAKEN
2023c7c: ba 07 60 10 add %i5, 0x10, %i5
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
}
2023c80: 81 c7 e0 08 ret
2023c84: 91 e8 20 00 restore %g0, 0, %o0
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
{
if (r->malloced)
{
free(r->area);
2023c88: 7f ff 94 57 call 2008de4 <free> <== NOT EXECUTED
2023c8c: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
}
r->initialized = false;
2023c90: 10 bf ff f6 b 2023c68 <ramdisk_initialize+0xd8> <== NOT EXECUTED
2023c94: c0 2f 60 0c clrb [ %i5 + 0xc ] <== NOT EXECUTED
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);
2023c98: 92 10 00 0a mov %o2, %o1
2023c9c: 90 10 00 0b mov %o3, %o0
2023ca0: d4 3f bf e8 std %o2, [ %fp + -24 ]
2023ca4: 7f ff 7c 8f call 2002ee0 <.umul>
2023ca8: f2 2f 60 0d stb %i1, [ %i5 + 0xd ]
2023cac: 7f ff 95 d7 call 2009408 <malloc>
2023cb0: 01 00 00 00 nop
2023cb4: d0 27 60 08 st %o0, [ %i5 + 8 ]
if (r->area == NULL) /* No enough memory for this disk */
2023cb8: 80 a2 20 00 cmp %o0, 0
2023cbc: 02 bf ff ea be 2023c64 <ramdisk_initialize+0xd4> <== NEVER TAKEN
2023cc0: d4 1f bf e8 ldd [ %fp + -24 ], %o2
r->initialized = false;
continue;
}
else
{
r->initialized = true;
2023cc4: 10 bf ff db b 2023c30 <ramdisk_initialize+0xa0>
2023cc8: f2 2f 60 0c stb %i1, [ %i5 + 0xc ]
0200cf60 <ramdisk_ioctl>:
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200cf60: 9d e3 bf a0 save %sp, -96, %sp
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
200cf64: 05 08 00 10 sethi %hi(0x20004000), %g2
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200cf68: ba 10 00 1a mov %i2, %i5
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (req)
200cf6c: 84 10 a2 07 or %g2, 0x207, %g2
200cf70: 80 a6 40 02 cmp %i1, %g2
200cf74: 02 80 00 09 be 200cf98 <ramdisk_ioctl+0x38>
200cf78: f8 06 20 2c ld [ %i0 + 0x2c ], %i4
200cf7c: 05 30 06 10 sethi %hi(0xc0184000), %g2
200cf80: 84 10 a2 01 or %g2, 0x201, %g2 ! c0184201 <RAM_END+0xbdd84201>
200cf84: 80 a6 40 02 cmp %i1, %g2
200cf88: 22 80 00 0e be,a 200cfc0 <ramdisk_ioctl+0x60>
200cf8c: c2 06 80 00 ld [ %i2 ], %g1
ramdisk_free(rd);
}
break;
default:
return rtems_blkdev_ioctl (dd, req, argp);
200cf90: 40 00 0a 0f call 200f7cc <rtems_blkdev_ioctl>
200cf94: 81 e8 00 00 restore
}
break;
}
case RTEMS_BLKIO_DELETED:
if (rd->free_at_delete_request) {
200cf98: c2 0f 20 0f ldub [ %i4 + 0xf ], %g1
200cf9c: 80 a0 60 00 cmp %g1, 0
200cfa0: 12 80 00 47 bne 200d0bc <ramdisk_ioctl+0x15c>
200cfa4: 01 00 00 00 nop
default:
return rtems_blkdev_ioctl (dd, req, argp);
break;
}
errno = EINVAL;
200cfa8: 40 00 19 c1 call 20136ac <__errno>
200cfac: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200cfb0: 82 10 20 16 mov 0x16, %g1
200cfb4: c2 22 00 00 st %g1, [ %o0 ]
return -1;
}
200cfb8: 81 c7 e0 08 ret
200cfbc: 81 e8 00 00 restore
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
switch (r->req)
200cfc0: 80 a0 60 00 cmp %g1, 0
200cfc4: 12 80 00 1d bne 200d038 <ramdisk_ioctl+0xd8>
200cfc8: 80 a0 60 01 cmp %g1, 1
#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++)
200cfcc: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
200cfd0: 80 a0 60 00 cmp %g1, 0
200cfd4: 02 80 00 11 be 200d018 <ramdisk_ioctl+0xb8> <== NEVER TAKEN
200cfd8: f0 07 20 08 ld [ %i4 + 8 ], %i0
200cfdc: b6 06 a0 18 add %i2, 0x18, %i3
200cfe0: b4 10 20 00 clr %i2
#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);
200cfe4: d0 06 c0 00 ld [ %i3 ], %o0
200cfe8: d2 07 00 00 ld [ %i4 ], %o1
200cfec: 40 00 3d 22 call 201c474 <.umul>
200cff0: f2 06 e0 08 ld [ %i3 + 8 ], %i1
200cff4: d4 06 e0 04 ld [ %i3 + 4 ], %o2
200cff8: 92 06 00 08 add %i0, %o0, %o1
200cffc: 40 00 1c 08 call 201401c <memcpy>
200d000: 90 10 00 19 mov %i1, %o0
#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++)
200d004: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200d008: b4 06 a0 01 inc %i2
200d00c: 80 a6 80 01 cmp %i2, %g1
200d010: 0a bf ff f5 bcs 200cfe4 <ramdisk_ioctl+0x84> <== NEVER TAKEN
200d014: b6 06 e0 10 add %i3, 0x10, %i3
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200d018: c2 07 60 04 ld [ %i5 + 4 ], %g1
200d01c: d0 07 60 08 ld [ %i5 + 8 ], %o0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
200d020: c0 27 60 0c clr [ %i5 + 0xc ]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200d024: 92 10 20 00 clr %o1
200d028: 9f c0 40 00 call %g1
200d02c: b0 10 20 00 clr %i0
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
200d030: 81 c7 e0 08 ret
200d034: 81 e8 00 00 restore
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
switch (r->req)
200d038: 22 80 00 08 be,a 200d058 <ramdisk_ioctl+0xf8> <== ALWAYS TAKEN
200d03c: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
default:
errno = EINVAL;
200d040: 40 00 19 9b call 20136ac <__errno> <== NOT EXECUTED
200d044: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200d048: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200d04c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
200d050: 81 c7 e0 08 ret <== NOT EXECUTED
200d054: 81 e8 00 00 restore <== NOT EXECUTED
#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++)
200d058: 80 a0 60 00 cmp %g1, 0
200d05c: 02 bf ff ef be 200d018 <ramdisk_ioctl+0xb8> <== NEVER TAKEN
200d060: f2 07 20 08 ld [ %i4 + 8 ], %i1
200d064: b6 06 a0 18 add %i2, 0x18, %i3
200d068: b4 10 20 00 clr %i2
#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);
200d06c: d0 06 c0 00 ld [ %i3 ], %o0
200d070: d2 07 00 00 ld [ %i4 ], %o1
200d074: 40 00 3d 00 call 201c474 <.umul>
200d078: b4 06 a0 01 inc %i2
200d07c: d2 06 e0 08 ld [ %i3 + 8 ], %o1
200d080: d4 06 e0 04 ld [ %i3 + 4 ], %o2
200d084: 40 00 1b e6 call 201401c <memcpy>
200d088: 90 06 40 08 add %i1, %o0, %o0
#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++)
200d08c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200d090: 80 a6 80 01 cmp %i2, %g1
200d094: 0a bf ff f6 bcs 200d06c <ramdisk_ioctl+0x10c>
200d098: b6 06 e0 10 add %i3, 0x10, %i3
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200d09c: c2 07 60 04 ld [ %i5 + 4 ], %g1
200d0a0: d0 07 60 08 ld [ %i5 + 8 ], %o0
i, sg->block, sg->length, sg->block * rd->block_size,
to + (sg->block * rd->block_size));
#endif
memcpy(to + (sg->block * rd->block_size), sg->buffer, sg->length);
}
req->status = RTEMS_SUCCESSFUL;
200d0a4: c0 27 60 0c clr [ %i5 + 0xc ]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
200d0a8: 92 10 20 00 clr %o1
200d0ac: 9f c0 40 00 call %g1
200d0b0: b0 10 20 00 clr %i0
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
200d0b4: 81 c7 e0 08 ret
200d0b8: 81 e8 00 00 restore
break;
}
case RTEMS_BLKIO_DELETED:
if (rd->free_at_delete_request) {
ramdisk_free(rd);
200d0bc: 40 00 00 1f call 200d138 <ramdisk_free>
200d0c0: 90 10 00 1c mov %i4, %o0
200d0c4: 30 bf ff b9 b,a 200cfa8 <ramdisk_ioctl+0x48>
0200d178 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
200d178: 9d e3 bf 90 save %sp, -112, %sp
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);
200d17c: 90 10 20 00 clr %o0
const char *disk,
dev_t *dev_ptr
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
200d180: c0 27 bf fc clr [ %fp + -4 ]
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
200d184: 94 07 bf fc add %fp, -4, %o2
200d188: 13 00 80 7d sethi %hi(0x201f400), %o1
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
200d18c: ba 10 00 18 mov %i0, %i5
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);
200d190: 92 12 60 80 or %o1, 0x80, %o1
200d194: 7f ff f1 e9 call 2009938 <rtems_io_register_driver>
200d198: b0 10 20 0d mov 0xd, %i0
if (sc != RTEMS_SUCCESSFUL) {
200d19c: 80 a2 20 00 cmp %o0, 0
200d1a0: 12 80 00 1c bne 200d210 <ramdisk_register+0x98> <== NEVER TAKEN
200d1a4: 96 10 00 1a mov %i2, %o3
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
200d1a8: 92 10 00 1d mov %i5, %o1
200d1ac: 7f ff ff c7 call 200d0c8 <ramdisk_allocate>
200d1b0: 94 10 00 19 mov %i1, %o2
if (rd == NULL) {
200d1b4: b4 92 20 00 orcc %o0, 0, %i2
200d1b8: 02 80 00 14 be 200d208 <ramdisk_register+0x90> <== NEVER TAKEN
200d1bc: e0 07 bf fc ld [ %fp + -4 ], %l0
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
200d1c0: f6 23 a0 5c st %i3, [ %sp + 0x5c ]
200d1c4: 90 10 00 10 mov %l0, %o0
200d1c8: 92 10 20 00 clr %o1
200d1cc: 94 10 00 1d mov %i5, %o2
200d1d0: 96 10 00 19 mov %i1, %o3
200d1d4: 9a 10 00 1a mov %i2, %o5
200d1d8: 19 00 80 33 sethi %hi(0x200cc00), %o4
200d1dc: 7f ff d9 c1 call 20038e0 <rtems_disk_create_phys>
200d1e0: 98 13 23 60 or %o4, 0x360, %o4 ! 200cf60 <ramdisk_ioctl>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
200d1e4: 80 a2 20 00 cmp %o0, 0
200d1e8: 12 80 00 06 bne 200d200 <ramdisk_register+0x88> <== NEVER TAKEN
200d1ec: 01 00 00 00 nop
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
200d1f0: e0 27 00 00 st %l0, [ %i4 ]
200d1f4: c0 27 20 04 clr [ %i4 + 4 ]
return RTEMS_SUCCESSFUL;
}
200d1f8: 81 c7 e0 08 ret
200d1fc: 91 e8 20 00 restore %g0, 0, %o0
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
ramdisk_free(rd);
200d200: 7f ff ff ce call 200d138 <ramdisk_free> <== NOT EXECUTED
200d204: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_io_unregister_driver(major);
200d208: 7f ff f2 34 call 2009ad8 <rtems_io_unregister_driver> <== NOT EXECUTED
200d20c: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
200d210: 81 c7 e0 08 ret <== NOT EXECUTED
200d214: 81 e8 00 00 restore <== NOT EXECUTED
0201a19c <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
201a19c: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201a1a0: 03 00 80 71 sethi %hi(0x201c400), %g1
201a1a4: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201c77c <rtems_libio_number_iops>
201a1a8: 80 a6 00 01 cmp %i0, %g1
201a1ac: 1a 80 00 20 bcc 201a22c <read+0x90>
201a1b0: 03 00 80 74 sethi %hi(0x201d000), %g1
iop = rtems_libio_iop( fd );
201a1b4: fa 00 62 38 ld [ %g1 + 0x238 ], %i5 ! 201d238 <rtems_libio_iops>
201a1b8: 83 2e 20 03 sll %i0, 3, %g1
201a1bc: b1 2e 20 06 sll %i0, 6, %i0
201a1c0: b0 00 40 18 add %g1, %i0, %i0
201a1c4: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
201a1c8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201a1cc: 80 88 61 00 btst 0x100, %g1
201a1d0: 02 80 00 17 be 201a22c <read+0x90>
201a1d4: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201a1d8: 02 80 00 1b be 201a244 <read+0xa8> <== NEVER TAKEN
201a1dc: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201a1e0: 02 80 00 11 be 201a224 <read+0x88>
201a1e4: b0 10 20 00 clr %i0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
201a1e8: 80 88 60 02 btst 2, %g1
201a1ec: 02 80 00 10 be 201a22c <read+0x90>
201a1f0: 90 10 00 1d mov %i5, %o0
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
201a1f4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
201a1f8: c2 00 60 08 ld [ %g1 + 8 ], %g1
201a1fc: 92 10 00 19 mov %i1, %o1
201a200: 9f c0 40 00 call %g1
201a204: 94 10 00 1a mov %i2, %o2
if ( rc > 0 )
201a208: b0 92 20 00 orcc %o0, 0, %i0
201a20c: 04 80 00 06 ble 201a224 <read+0x88>
201a210: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
201a214: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201a218: 86 83 40 18 addcc %o5, %i0, %g3
201a21c: 84 43 00 02 addx %o4, %g2, %g2
201a220: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
return rc;
}
201a224: 81 c7 e0 08 ret
201a228: 81 e8 00 00 restore
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 );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
201a22c: 7f ff d5 55 call 200f780 <__errno>
201a230: b0 10 3f ff mov -1, %i0
201a234: 82 10 20 09 mov 9, %g1
201a238: c2 22 00 00 st %g1, [ %o0 ]
201a23c: 81 c7 e0 08 ret
201a240: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
201a244: 7f ff d5 4f call 200f780 <__errno> <== NOT EXECUTED
201a248: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201a24c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201a250: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201a254: 81 c7 e0 08 ret <== NOT EXECUTED
201a258: 81 e8 00 00 restore <== NOT EXECUTED
02004f14 <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)
{
2004f14: 9d e3 bf 98 save %sp, -104, %sp
int i;
rtems_sector_data_t *sector = NULL;
2004f18: c0 27 bf f8 clr [ %fp + -8 ]
* 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)
{
2004f1c: ba 10 00 18 mov %i0, %i5
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))
2004f20: 80 a6 a0 00 cmp %i2, 0
2004f24: 02 80 00 13 be 2004f70 <read_extended_partition+0x5c> <== NEVER TAKEN
2004f28: b0 10 20 19 mov 0x19, %i0
2004f2c: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
2004f30: 80 a0 60 00 cmp %g1, 0
2004f34: 02 80 00 0f be 2004f70 <read_extended_partition+0x5c> <== NEVER TAKEN
2004f38: 90 10 00 1d mov %i5, %o0
{
return RTEMS_INTERNAL_ERROR;
}
/* get start sector of current extended partition */
here = ext_part->start;
2004f3c: e0 06 a0 04 ld [ %i2 + 4 ], %l0
/* get first extended partition sector */
rc = get_sector(fd, here, §or);
2004f40: 92 10 00 10 mov %l0, %o1
2004f44: 7f ff ff 7b call 2004d30 <get_sector>
2004f48: 94 07 bf f8 add %fp, -8, %o2
2004f4c: b0 10 00 08 mov %o0, %i0
if (rc != RTEMS_SUCCESSFUL)
2004f50: 80 a6 20 00 cmp %i0, 0
2004f54: 02 80 00 3a be 200503c <read_extended_partition+0x128> <== ALWAYS TAKEN
2004f58: d0 07 bf f8 ld [ %fp + -8 ], %o0
{
if (sector)
2004f5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004f60: 02 80 00 3d be 2005054 <read_extended_partition+0x140> <== NOT EXECUTED
2004f64: 01 00 00 00 nop <== NOT EXECUTED
* and parse the next one
*/
rc = data_to_part_desc(data, &new_part_desc);
if (rc != RTEMS_SUCCESSFUL)
{
free(sector);
2004f68: 40 00 03 c2 call 2005e70 <free> <== NOT EXECUTED
2004f6c: 01 00 00 00 nop <== NOT EXECUTED
return rc;
2004f70: 81 c7 e0 08 ret <== NOT EXECUTED
2004f74: 81 e8 00 00 restore <== NOT EXECUTED
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) &&
2004f78: 80 a0 60 aa cmp %g1, 0xaa
2004f7c: 12 80 00 34 bne 200504c <read_extended_partition+0x138> <== NEVER TAKEN
2004f80: b6 02 21 d2 add %o0, 0x1d2, %i3
2004f84: b8 10 00 1a mov %i2, %i4
* 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)
2004f88: a2 06 a0 10 add %i2, 0x10, %l1
2004f8c: 90 06 ff f0 add %i3, -16, %o0
2004f90: 7f ff ff 8f call 2004dcc <data_to_part_desc.part.1>
2004f94: 92 07 bf fc add %fp, -4, %o1
{
/* 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)
2004f98: b0 92 20 00 orcc %o0, 0, %i0
2004f9c: 12 80 00 39 bne 2005080 <read_extended_partition+0x16c> <== NEVER TAKEN
2004fa0: d4 07 bf fc ld [ %fp + -4 ], %o2
{
free(sector);
return rc;
}
if (new_part_desc == NULL)
2004fa4: 80 a2 a0 00 cmp %o2, 0
2004fa8: 22 80 00 1e be,a 2005020 <read_extended_partition+0x10c>
2004fac: b8 07 20 04 add %i4, 4, %i4
{
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
2004fb0: d4 27 20 18 st %o2, [ %i4 + 0x18 ]
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004fb4: c4 0a a0 01 ldub [ %o2 + 1 ], %g2
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;
2004fb8: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004fbc: 86 18 a0 85 xor %g2, 0x85, %g3
2004fc0: 80 a0 00 03 cmp %g0, %g3
2004fc4: 84 18 a0 05 xor %g2, 5, %g2
2004fc8: 86 60 3f ff subx %g0, -1, %g3
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
new_part_desc->ext_part = ext_part;
2004fcc: f4 22 a0 14 st %i2, [ %o2 + 0x14 ]
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
2004fd0: 80 a0 00 02 cmp %g0, %g2
2004fd4: 84 60 3f ff subx %g0, -1, %g2
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))
2004fd8: 80 90 c0 02 orcc %g3, %g2, %g0
2004fdc: 12 80 00 20 bne 200505c <read_extended_partition+0x148>
2004fe0: c2 22 a0 10 st %g1, [ %o2 + 0x10 ]
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;
2004fe4: c6 00 60 24 ld [ %g1 + 0x24 ], %g3
new_part_desc->log_id = ++disk_desc->last_log_id;
new_part_desc->start += here;
2004fe8: de 02 a0 04 ld [ %o2 + 4 ], %o7
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
2004fec: c8 02 a0 08 ld [ %o2 + 8 ], %g4
}
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;
2004ff0: 84 00 e0 01 add %g3, 1, %g2
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;
2004ff4: 86 00 e0 0a add %g3, 0xa, %g3
new_part_desc->log_id = ++disk_desc->last_log_id;
2004ff8: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
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;
2004ffc: 87 28 e0 02 sll %g3, 2, %g3
2005000: d4 20 40 03 st %o2, [ %g1 + %g3 ]
new_part_desc->log_id = ++disk_desc->last_log_id;
2005004: c4 2a a0 02 stb %g2, [ %o2 + 2 ]
new_part_desc->start += here;
2005008: 82 04 00 0f add %l0, %o7, %g1
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
200500c: 84 01 3f ff add %g4, -1, %g2
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;
2005010: c2 22 a0 04 st %g1, [ %o2 + 4 ]
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
2005014: 82 00 80 01 add %g2, %g1, %g1
2005018: c2 22 a0 0c st %g1, [ %o2 + 0xc ]
200501c: b8 07 20 04 add %i4, 4, %i4
/* 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++)
2005020: 80 a7 00 11 cmp %i4, %l1
2005024: 12 bf ff da bne 2004f8c <read_extended_partition+0x78>
2005028: b6 06 e0 10 add %i3, 0x10, %i3
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
200502c: 40 00 03 91 call 2005e70 <free>
2005030: d0 07 bf f8 ld [ %fp + -8 ], %o0
return RTEMS_SUCCESSFUL;
}
2005034: 81 c7 e0 08 ret
2005038: 81 e8 00 00 restore
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) &&
200503c: c2 0a 22 02 ldub [ %o0 + 0x202 ], %g1
2005040: 80 a0 60 55 cmp %g1, 0x55
2005044: 22 bf ff cd be,a 2004f78 <read_extended_partition+0x64> <== ALWAYS TAKEN
2005048: c2 0a 22 03 ldub [ %o0 + 0x203 ], %g1
return rc;
}
if (!msdos_signature_check(sector))
{
free(sector);
200504c: 40 00 03 89 call 2005e70 <free> <== NOT EXECUTED
2005050: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
2005054: 81 c7 e0 08 ret <== NOT EXECUTED
2005058: 81 e8 00 00 restore <== NOT EXECUTED
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;
200505c: c2 02 a0 04 ld [ %o2 + 4 ], %g1
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;
2005060: c0 2a a0 02 clrb [ %o2 + 2 ]
new_part_desc->start += start;
2005064: 82 00 40 19 add %g1, %i1, %g1
read_extended_partition(fd, start, new_part_desc);
2005068: 90 10 00 1d mov %i5, %o0
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;
200506c: c2 22 a0 04 st %g1, [ %o2 + 4 ]
read_extended_partition(fd, start, new_part_desc);
2005070: 7f ff ff a9 call 2004f14 <read_extended_partition>
2005074: 92 10 00 19 mov %i1, %o1
{
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;
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
2005078: 10 bf ff ea b 2005020 <read_extended_partition+0x10c>
200507c: b8 07 20 04 add %i4, 4, %i4
* and parse the next one
*/
rc = data_to_part_desc(data, &new_part_desc);
if (rc != RTEMS_SUCCESSFUL)
{
free(sector);
2005080: 10 bf ff ba b 2004f68 <read_extended_partition+0x54> <== NOT EXECUTED
2005084: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
02005638 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
2005638: 9d e3 bf a0 save %sp, -96, %sp
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
200563c: 03 00 80 74 sethi %hi(0x201d000), %g1
2005640: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 201d2ac <rtems_libio_number_iops>
2005644: 80 a6 00 01 cmp %i0, %g1
2005648: 1a 80 00 4a bcc 2005770 <readv+0x138>
200564c: 03 00 80 77 sethi %hi(0x201dc00), %g1
iop = rtems_libio_iop( fd );
2005650: f8 00 61 68 ld [ %g1 + 0x168 ], %i4 ! 201dd68 <rtems_libio_iops>
2005654: 83 2e 20 03 sll %i0, 3, %g1
2005658: b1 2e 20 06 sll %i0, 6, %i0
200565c: b0 00 40 18 add %g1, %i0, %i0
2005660: b8 07 00 18 add %i4, %i0, %i4
rtems_libio_check_is_open( iop );
2005664: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
2005668: 80 88 61 00 btst 0x100, %g1
200566c: 02 80 00 41 be 2005770 <readv+0x138>
2005670: 80 88 60 02 btst 2, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
2005674: 02 80 00 3f be 2005770 <readv+0x138> <== NEVER TAKEN
2005678: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
200567c: 02 80 00 37 be 2005758 <readv+0x120>
2005680: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
2005684: 04 80 00 35 ble 2005758 <readv+0x120>
2005688: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
200568c: 14 80 00 33 bg 2005758 <readv+0x120> <== NEVER TAKEN
2005690: b5 2e a0 03 sll %i2, 3, %i2
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
2005694: 82 10 20 00 clr %g1
2005698: ba 10 20 01 mov 1, %i5
200569c: 10 80 00 03 b 20056a8 <readv+0x70>
20056a0: 84 10 20 00 clr %g2
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
20056a4: 84 10 00 04 mov %g4, %g2
/*
* 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 )
20056a8: c6 06 40 01 ld [ %i1 + %g1 ], %g3
20056ac: 80 a0 e0 00 cmp %g3, 0
20056b0: 02 80 00 2a be 2005758 <readv+0x120>
20056b4: 88 06 40 01 add %i1, %g1, %g4
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
20056b8: c6 01 20 04 ld [ %g4 + 4 ], %g3
20056bc: 88 00 c0 02 add %g3, %g2, %g4
if ( total < old )
20056c0: 80 a1 00 02 cmp %g4, %g2
20056c4: 06 80 00 25 bl 2005758 <readv+0x120>
20056c8: 82 00 60 08 add %g1, 8, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
20056cc: 80 a0 00 03 cmp %g0, %g3
20056d0: 84 40 3f ff addx %g0, -1, %g2
* 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++ ) {
20056d4: 80 a0 40 1a cmp %g1, %i2
20056d8: 12 bf ff f3 bne 20056a4 <readv+0x6c>
20056dc: ba 0f 40 02 and %i5, %g2, %i5
/*
* 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 ) {
20056e0: 80 8f 60 ff btst 0xff, %i5
20056e4: 12 80 00 1b bne 2005750 <readv+0x118>
20056e8: b0 10 20 00 clr %i0
20056ec: ba 10 20 00 clr %i5
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
20056f0: c2 07 20 2c ld [ %i4 + 0x2c ], %g1
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
20056f4: b6 06 40 1d add %i1, %i5, %i3
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
20056f8: d2 06 40 1d ld [ %i1 + %i5 ], %o1
20056fc: c2 00 60 08 ld [ %g1 + 8 ], %g1
2005700: d4 06 e0 04 ld [ %i3 + 4 ], %o2
2005704: 9f c0 40 00 call %g1
2005708: 90 10 00 1c mov %i4, %o0
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
200570c: 80 a2 20 00 cmp %o0, 0
2005710: 26 80 00 10 bl,a 2005750 <readv+0x118> <== NEVER TAKEN
2005714: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
2005718: 02 80 00 07 be 2005734 <readv+0xfc> <== NEVER TAKEN
200571c: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
2005720: c4 1f 20 10 ldd [ %i4 + 0x10 ], %g2
2005724: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2005728: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
200572c: 84 40 80 10 addx %g2, %l0, %g2
2005730: c4 3f 20 10 std %g2, [ %i4 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
2005734: c2 06 e0 04 ld [ %i3 + 4 ], %g1
2005738: 80 a2 00 01 cmp %o0, %g1
200573c: 12 80 00 05 bne 2005750 <readv+0x118> <== NEVER TAKEN
2005740: ba 07 60 08 add %i5, 8, %i5
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2005744: 80 a7 40 1a cmp %i5, %i2
2005748: 32 bf ff eb bne,a 20056f4 <readv+0xbc>
200574c: c2 07 20 2c ld [ %i4 + 0x2c ], %g1
2005750: 81 c7 e0 08 ret
2005754: 81 e8 00 00 restore
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
2005758: 40 00 2b da call 20106c0 <__errno>
200575c: b0 10 3f ff mov -1, %i0
2005760: 82 10 20 16 mov 0x16, %g1
2005764: c2 22 00 00 st %g1, [ %o0 ]
2005768: 81 c7 e0 08 ret
200576c: 81 e8 00 00 restore
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
2005770: 40 00 2b d4 call 20106c0 <__errno>
2005774: b0 10 3f ff mov -1, %i0
2005778: 82 10 20 09 mov 9, %g1
200577c: c2 22 00 00 st %g1, [ %o0 ]
2005780: 81 c7 e0 08 ret
2005784: 81 e8 00 00 restore
02004750 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
2004750: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
2004754: 3b 00 80 74 sethi %hi(0x201d000), %i5
2004758: ba 17 62 50 or %i5, 0x250, %i5 ! 201d250 <rtems_malloc_statistics>
200475c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
2004760: 03 00 80 75 sethi %hi(0x201d400), %g1
2004764: c2 00 61 08 ld [ %g1 + 0x108 ], %g1 ! 201d508 <_System_state_Current>
)
{
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
2004768: 84 00 a0 01 inc %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
200476c: 80 a0 60 03 cmp %g1, 3
2004770: 02 80 00 2c be 2004820 <realloc+0xd0>
2004774: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
}
/*
* Continue with realloc().
*/
if ( !ptr )
2004778: 80 a6 20 00 cmp %i0, 0
200477c: 02 80 00 49 be 20048a0 <realloc+0x150>
2004780: 01 00 00 00 nop
return malloc( size );
if ( !size ) {
2004784: 80 a6 60 00 cmp %i1, 0
2004788: 02 80 00 3b be 2004874 <realloc+0x124> <== NEVER TAKEN
200478c: 39 00 80 71 sethi %hi(0x201c400), %i4
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
2004790: d0 07 23 38 ld [ %i4 + 0x338 ], %o0 ! 201c738 <RTEMS_Malloc_Heap>
2004794: 92 10 00 18 mov %i0, %o1
2004798: 40 00 14 dc call 2009b08 <_Protected_heap_Get_block_size>
200479c: 94 07 bf fc add %fp, -4, %o2
20047a0: 80 8a 20 ff btst 0xff, %o0
20047a4: 02 80 00 39 be 2004888 <realloc+0x138>
20047a8: 01 00 00 00 nop
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
20047ac: d0 07 23 38 ld [ %i4 + 0x338 ], %o0
20047b0: 92 10 00 18 mov %i0, %o1
20047b4: 40 00 14 e5 call 2009b48 <_Protected_heap_Resize_block>
20047b8: 94 10 00 19 mov %i1, %o2
20047bc: 80 8a 20 ff btst 0xff, %o0
20047c0: 02 80 00 04 be 20047d0 <realloc+0x80>
20047c4: 01 00 00 00 nop
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
20047c8: 81 c7 e0 08 ret
20047cc: 81 e8 00 00 restore
* 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 );
20047d0: 7f ff fd 0d call 2003c04 <malloc>
20047d4: 90 10 00 19 mov %i1, %o0
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
20047d8: c2 07 60 04 ld [ %i5 + 4 ], %g1
* 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 );
20047dc: b8 10 00 08 mov %o0, %i4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
20047e0: 82 00 7f ff add %g1, -1, %g1
if ( !new_area ) {
20047e4: 80 a2 20 00 cmp %o0, 0
20047e8: 02 80 00 30 be 20048a8 <realloc+0x158>
20047ec: c2 27 60 04 st %g1, [ %i5 + 4 ]
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
20047f0: c2 07 bf fc ld [ %fp + -4 ], %g1
20047f4: 80 a6 40 01 cmp %i1, %g1
20047f8: 18 80 00 16 bgu 2004850 <realloc+0x100> <== ALWAYS TAKEN
20047fc: 94 10 00 19 mov %i1, %o2
2004800: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2004804: 40 00 2e 3b call 20100f0 <memcpy> <== NOT EXECUTED
2004808: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
free( ptr );
200480c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2004810: 7f ff fc 0b call 200383c <free> <== NOT EXECUTED
2004814: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
return new_area;
2004818: 81 c7 e0 08 ret <== NOT EXECUTED
200481c: 81 e8 00 00 restore <== NOT EXECUTED
* 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 )
2004820: 03 00 80 74 sethi %hi(0x201d000), %g1
2004824: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level>
2004828: 80 a0 60 00 cmp %g1, 0
200482c: 12 80 00 07 bne 2004848 <realloc+0xf8> <== NEVER TAKEN
2004830: 01 00 00 00 nop
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
2004834: 03 00 80 75 sethi %hi(0x201d400), %g1
2004838: c2 00 61 e8 ld [ %g1 + 0x1e8 ], %g1 ! 201d5e8 <_Per_CPU_Information+0x8>
200483c: 80 a0 60 00 cmp %g1, 0
2004840: 22 bf ff cf be,a 200477c <realloc+0x2c> <== ALWAYS TAKEN
2004844: 80 a6 20 00 cmp %i0, 0
return (void *) 0;
2004848: 81 c7 e0 08 ret <== NOT EXECUTED
200484c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
2004850: 92 10 00 18 mov %i0, %o1
2004854: 94 10 00 01 mov %g1, %o2
2004858: 40 00 2e 26 call 20100f0 <memcpy>
200485c: 90 10 00 1c mov %i4, %o0
free( ptr );
2004860: 90 10 00 18 mov %i0, %o0
2004864: 7f ff fb f6 call 200383c <free>
2004868: b0 10 00 1c mov %i4, %i0
return new_area;
200486c: 81 c7 e0 08 ret
2004870: 81 e8 00 00 restore
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
2004874: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2004878: 7f ff fb f1 call 200383c <free> <== NOT EXECUTED
200487c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return (void *) 0;
2004880: 81 c7 e0 08 ret <== NOT EXECUTED
2004884: 81 e8 00 00 restore <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
2004888: 40 00 2b be call 200f780 <__errno>
200488c: b0 10 20 00 clr %i0
2004890: 82 10 20 16 mov 0x16, %g1
2004894: c2 22 00 00 st %g1, [ %o0 ]
return (void *) 0;
2004898: 81 c7 e0 08 ret
200489c: 81 e8 00 00 restore
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
20048a0: 7f ff fc d9 call 2003c04 <malloc>
20048a4: 91 e8 00 19 restore %g0, %i1, %o0
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
20048a8: 81 c7 e0 08 ret
20048ac: 91 e8 20 00 restore %g0, 0, %o0
0200f09c <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200f09c: 9d e3 bf a0 save %sp, -96, %sp
200f0a0: b6 10 20 20 mov 0x20, %i3
200f0a4: ba 10 00 18 mov %i0, %i5
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200f0a8: b8 10 20 01 mov 1, %i4
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
uint32_t b;
uint32_t local_value = 0;
200f0ac: 10 80 00 04 b 200f0bc <rtems_assoc_local_by_remote_bitfield+0x20>
200f0b0: b0 10 20 00 clr %i0
for (b = 1; b; b <<= 1) {
200f0b4: 02 80 00 0c be 200f0e4 <rtems_assoc_local_by_remote_bitfield+0x48>
200f0b8: b9 2f 20 01 sll %i4, 1, %i4
if (b & remote_value)
200f0bc: 80 8f 00 19 btst %i4, %i1
200f0c0: 22 bf ff fd be,a 200f0b4 <rtems_assoc_local_by_remote_bitfield+0x18>
200f0c4: b6 86 ff ff addcc %i3, -1, %i3
local_value |= rtems_assoc_local_by_remote(ap, b);
200f0c8: 92 10 00 1c mov %i4, %o1
200f0cc: 40 00 00 08 call 200f0ec <rtems_assoc_local_by_remote>
200f0d0: 90 10 00 1d mov %i5, %o0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200f0d4: b9 2f 20 01 sll %i4, 1, %i4
200f0d8: b6 86 ff ff addcc %i3, -1, %i3
200f0dc: 12 bf ff f8 bne 200f0bc <rtems_assoc_local_by_remote_bitfield+0x20><== ALWAYS TAKEN
200f0e0: b0 16 00 08 or %i0, %o0, %i0
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
200f0e4: 81 c7 e0 08 ret
200f0e8: 81 e8 00 00 restore
0200c624 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200c624: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200c628: d0 06 00 00 ld [ %i0 ], %o0
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200c62c: ba 10 00 18 mov %i0, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200c630: 80 a2 20 00 cmp %o0, 0
200c634: 02 80 00 1b be 200c6a0 <rtems_assoc_ptr_by_local+0x7c>
200c638: b0 10 20 00 clr %i0
200c63c: 13 00 80 6d sethi %hi(0x201b400), %o1
200c640: 40 00 0f f7 call 201061c <strcmp>
200c644: 92 12 62 58 or %o1, 0x258, %o1 ! 201b658 <IMFS_memfile_handlers+0x30>
200c648: 80 a2 20 00 cmp %o0, 0
200c64c: 02 80 00 17 be 200c6a8 <rtems_assoc_ptr_by_local+0x84>
200c650: 82 10 20 00 clr %g1
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
200c654: c4 07 60 04 ld [ %i5 + 4 ], %g2
200c658: 80 a0 80 19 cmp %g2, %i1
200c65c: 02 80 00 11 be 200c6a0 <rtems_assoc_ptr_by_local+0x7c>
200c660: b0 10 00 1d mov %i5, %i0
200c664: 86 07 60 0c add %i5, 0xc, %g3
200c668: 10 80 00 06 b 200c680 <rtems_assoc_ptr_by_local+0x5c>
200c66c: 84 20 00 1d neg %i5, %g2
200c670: c8 07 7f f8 ld [ %i5 + -8 ], %g4
200c674: 80 a1 00 19 cmp %g4, %i1
200c678: 02 80 00 0a be 200c6a0 <rtems_assoc_ptr_by_local+0x7c>
200c67c: 01 00 00 00 nop
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
200c680: 88 06 00 02 add %i0, %g2, %g4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200c684: c8 00 c0 04 ld [ %g3 + %g4 ], %g4
200c688: b0 06 20 0c add %i0, 0xc, %i0
200c68c: 80 a1 20 00 cmp %g4, 0
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
200c690: ba 06 00 02 add %i0, %g2, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200c694: 12 bf ff f7 bne 200c670 <rtems_assoc_ptr_by_local+0x4c>
200c698: ba 00 c0 1d add %g3, %i5, %i5
200c69c: b0 10 00 01 mov %g1, %i0
if (ap->local_value == local_value)
return ap;
return default_ap;
}
200c6a0: 81 c7 e0 08 ret
200c6a4: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200c6a8: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200c6ac: 80 a0 60 00 cmp %g1, 0
200c6b0: 02 bf ff fc be 200c6a0 <rtems_assoc_ptr_by_local+0x7c> <== NEVER TAKEN
200c6b4: b0 10 00 1d mov %i5, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
200c6b8: 82 10 00 1d mov %i5, %g1
200c6bc: 10 bf ff e6 b 200c654 <rtems_assoc_ptr_by_local+0x30>
200c6c0: ba 07 60 0c add %i5, 0xc, %i5
020040a0 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
20040a0: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
20040a4: fa 06 00 00 ld [ %i0 ], %i5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
20040a8: b8 10 00 18 mov %i0, %i4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
20040ac: 80 a7 60 00 cmp %i5, 0
20040b0: 02 80 00 1a be 2004118 <rtems_assoc_ptr_by_name+0x78>
20040b4: b0 10 20 00 clr %i0
20040b8: 90 10 00 1d mov %i5, %o0
20040bc: 13 00 80 6d sethi %hi(0x201b400), %o1
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
20040c0: b4 10 20 00 clr %i2
if (rtems_assoc_is_default(ap))
20040c4: 40 00 34 10 call 2011104 <strcmp>
20040c8: 92 12 63 60 or %o1, 0x360, %o1
20040cc: 80 a2 20 00 cmp %o0, 0
20040d0: 22 80 00 14 be,a 2004120 <rtems_assoc_ptr_by_name+0x80>
20040d4: fa 07 20 0c ld [ %i4 + 0xc ], %i5
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
20040d8: 82 10 00 1c mov %i4, %g1
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
20040dc: 10 80 00 06 b 20040f4 <rtems_assoc_ptr_by_name+0x54>
20040e0: b6 07 20 0c add %i4, 0xc, %i3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
20040e4: fa 00 bf f4 ld [ %g2 + -12 ], %i5
20040e8: 80 a7 60 00 cmp %i5, 0
20040ec: 02 80 00 14 be 200413c <rtems_assoc_ptr_by_name+0x9c>
20040f0: 01 00 00 00 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
20040f4: b0 10 00 01 mov %g1, %i0
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
20040f8: 90 10 00 1d mov %i5, %o0
20040fc: 40 00 34 02 call 2011104 <strcmp>
2004100: 92 10 00 19 mov %i1, %o1
2004104: 82 06 20 0c add %i0, 0xc, %g1
2004108: 80 a2 20 00 cmp %o0, 0
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
200410c: 84 20 40 1c sub %g1, %i4, %g2
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
2004110: 12 bf ff f5 bne 20040e4 <rtems_assoc_ptr_by_name+0x44>
2004114: 84 00 80 1b add %g2, %i3, %g2
return ap;
return default_ap;
}
2004118: 81 c7 e0 08 ret
200411c: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
2004120: b0 10 00 1c mov %i4, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
2004124: b4 10 00 1c mov %i4, %i2
for ( ; ap->name; ap++)
2004128: 80 a7 60 00 cmp %i5, 0
200412c: 12 bf ff eb bne 20040d8 <rtems_assoc_ptr_by_name+0x38> <== ALWAYS TAKEN
2004130: b8 07 20 0c add %i4, 0xc, %i4
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
2004134: 81 c7 e0 08 ret <== NOT EXECUTED
2004138: 81 e8 00 00 restore <== NOT EXECUTED
200413c: 81 c7 e0 08 ret
2004140: 91 e8 00 1a restore %g0, %i2, %o0
0200f120 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200f120: 9d e3 bf a0 save %sp, -96, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200f124: d0 06 00 00 ld [ %i0 ], %o0
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200f128: ba 10 00 18 mov %i0, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200f12c: 80 a2 20 00 cmp %o0, 0
200f130: 02 80 00 1b be 200f19c <rtems_assoc_ptr_by_remote+0x7c>
200f134: b0 10 20 00 clr %i0
200f138: 13 00 80 6d sethi %hi(0x201b400), %o1
200f13c: 40 00 05 38 call 201061c <strcmp>
200f140: 92 12 62 58 or %o1, 0x258, %o1 ! 201b658 <IMFS_memfile_handlers+0x30>
200f144: 80 a2 20 00 cmp %o0, 0
200f148: 02 80 00 17 be 200f1a4 <rtems_assoc_ptr_by_remote+0x84>
200f14c: 82 10 20 00 clr %g1
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
200f150: c4 07 60 08 ld [ %i5 + 8 ], %g2
200f154: 80 a0 80 19 cmp %g2, %i1
200f158: 02 80 00 11 be 200f19c <rtems_assoc_ptr_by_remote+0x7c>
200f15c: b0 10 00 1d mov %i5, %i0
200f160: 86 07 60 0c add %i5, 0xc, %g3
200f164: 10 80 00 06 b 200f17c <rtems_assoc_ptr_by_remote+0x5c>
200f168: 84 20 00 1d neg %i5, %g2
200f16c: c8 07 7f fc ld [ %i5 + -4 ], %g4
200f170: 80 a1 00 19 cmp %g4, %i1
200f174: 02 80 00 0a be 200f19c <rtems_assoc_ptr_by_remote+0x7c>
200f178: 01 00 00 00 nop
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
200f17c: 88 06 00 02 add %i0, %g2, %g4
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200f180: c8 00 c0 04 ld [ %g3 + %g4 ], %g4
200f184: b0 06 20 0c add %i0, 0xc, %i0
200f188: 80 a1 20 00 cmp %g4, 0
#include <rtems.h>
#include <rtems/assoc.h>
#include <string.h> /* strcat, strcmp */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
200f18c: ba 06 00 02 add %i0, %g2, %i5
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200f190: 12 bf ff f7 bne 200f16c <rtems_assoc_ptr_by_remote+0x4c>
200f194: ba 00 c0 1d add %g3, %i5, %i5
200f198: b0 10 00 01 mov %g1, %i0
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
200f19c: 81 c7 e0 08 ret
200f1a0: 81 e8 00 00 restore
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200f1a4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200f1a8: 80 a0 60 00 cmp %g1, 0
200f1ac: 02 bf ff fc be 200f19c <rtems_assoc_ptr_by_remote+0x7c> <== NEVER TAKEN
200f1b0: b0 10 00 1d mov %i5, %i0
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
200f1b4: 82 10 00 1d mov %i5, %g1
200f1b8: 10 bf ff e6 b 200f150 <rtems_assoc_ptr_by_remote+0x30>
200f1bc: ba 07 60 0c add %i5, 0xc, %i5
020041e4 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
20041e4: 9d e3 bf a0 save %sp, -96, %sp
20041e8: b6 10 20 20 mov 0x20, %i3
20041ec: ba 10 00 18 mov %i0, %i5
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
20041f0: b8 10 20 01 mov 1, %i4
const rtems_assoc_t *ap,
uint32_t local_value
)
{
uint32_t b;
uint32_t remote_value = 0;
20041f4: 10 80 00 04 b 2004204 <rtems_assoc_remote_by_local_bitfield+0x20>
20041f8: b0 10 20 00 clr %i0
for (b = 1; b; b <<= 1)
20041fc: 02 80 00 0c be 200422c <rtems_assoc_remote_by_local_bitfield+0x48>
2004200: b9 2f 20 01 sll %i4, 1, %i4
if (b & local_value)
2004204: 80 8f 00 19 btst %i4, %i1
2004208: 22 bf ff fd be,a 20041fc <rtems_assoc_remote_by_local_bitfield+0x18>
200420c: b6 86 ff ff addcc %i3, -1, %i3
remote_value |= rtems_assoc_remote_by_local(ap, b);
2004210: 92 10 00 1c mov %i4, %o1
2004214: 40 00 00 08 call 2004234 <rtems_assoc_remote_by_local>
2004218: 90 10 00 1d mov %i5, %o0
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
200421c: b9 2f 20 01 sll %i4, 1, %i4
2004220: b6 86 ff ff addcc %i3, -1, %i3
2004224: 12 bf ff f8 bne 2004204 <rtems_assoc_remote_by_local_bitfield+0x20><== ALWAYS TAKEN
2004228: b0 16 00 08 or %i0, %o0, %i0
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
200422c: 81 c7 e0 08 ret
2004230: 81 e8 00 00 restore
0200d868 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
200d868: 9d e3 bf a0 save %sp, -96, %sp
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
200d86c: 3b 00 80 83 sethi %hi(0x2020c00), %i5
200d870: ba 17 62 e4 or %i5, 0x2e4, %i5 ! 2020ee4 <bdbuf_cache>
200d874: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
200d878: 80 a0 60 00 cmp %g1, 0
200d87c: 22 80 00 08 be,a 200d89c <rtems_bdbuf_add_to_modified_list_after_access+0x34><== ALWAYS TAKEN
200d880: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
200d884: c4 07 60 38 ld [ %i5 + 0x38 ], %g2 <== NOT EXECUTED
200d888: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
200d88c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200d890: 02 80 00 2a be 200d938 <rtems_bdbuf_add_to_modified_list_after_access+0xd0><== NOT EXECUTED
200d894: 01 00 00 00 nop <== 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
200d898: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
200d89c: 80 a0 60 05 cmp %g1, 5
200d8a0: 22 80 00 15 be,a 200d8f4 <rtems_bdbuf_add_to_modified_list_after_access+0x8c>
200d8a4: 03 00 80 79 sethi %hi(0x201e400), %g1
200d8a8: 80 a0 60 03 cmp %g1, 3
200d8ac: 02 80 00 12 be 200d8f4 <rtems_bdbuf_add_to_modified_list_after_access+0x8c>
200d8b0: 03 00 80 79 sethi %hi(0x201e400), %g1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d8b4: 82 10 20 07 mov 7, %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200d8b8: 11 00 80 83 sethi %hi(0x2020c00), %o0
200d8bc: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
200d8c0: 90 12 23 30 or %o0, 0x330, %o0
200d8c4: 7f ff f1 27 call 2009d60 <_Chain_Append>
200d8c8: 92 10 00 18 mov %i0, %o1
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
200d8cc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d8d0: 80 a0 60 00 cmp %g1, 0
200d8d4: 12 80 00 15 bne 200d928 <rtems_bdbuf_add_to_modified_list_after_access+0xc0>
200d8d8: 31 00 80 83 sethi %hi(0x2020c00), %i0
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
200d8dc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1
200d8e0: 80 a0 60 00 cmp %g1, 0
200d8e4: 12 80 00 13 bne 200d930 <rtems_bdbuf_add_to_modified_list_after_access+0xc8>
200d8e8: 01 00 00 00 nop
200d8ec: 81 c7 e0 08 ret
200d8f0: 81 e8 00 00 restore
* 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
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
200d8f4: c2 00 62 00 ld [ %g1 + 0x200 ], %g1
200d8f8: 11 00 80 83 sethi %hi(0x2020c00), %o0
200d8fc: c2 26 20 2c st %g1, [ %i0 + 0x2c ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d900: 82 10 20 07 mov 7, %g1
200d904: 90 12 23 30 or %o0, 0x330, %o0
200d908: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
200d90c: 7f ff f1 15 call 2009d60 <_Chain_Append>
200d910: 92 10 00 18 mov %i0, %o1
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
200d914: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d918: 80 a0 60 00 cmp %g1, 0
200d91c: 22 bf ff f1 be,a 200d8e0 <rtems_bdbuf_add_to_modified_list_after_access+0x78>
200d920: c2 07 60 74 ld [ %i5 + 0x74 ], %g1
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200d924: 31 00 80 83 sethi %hi(0x2020c00), %i0
200d928: 7f ff ff c1 call 200d82c <rtems_bdbuf_wake>
200d92c: 91 ee 23 48 restore %i0, 0x348, %o0
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
200d930: 7f ff fe f8 call 200d510 <rtems_bdbuf_wake_swapper>
200d934: 81 e8 00 00 restore
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
{
rtems_bdbuf_unlock_cache ();
200d938: 7f ff fe de call 200d4b0 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200d93c: 01 00 00 00 nop <== NOT EXECUTED
/*
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
200d940: 7f ff fe 65 call 200d2d4 <rtems_bdbuf_lock_sync> <== NOT EXECUTED
200d944: 01 00 00 00 nop <== NOT EXECUTED
rtems_bdbuf_unlock_sync ();
200d948: 7f ff fe e6 call 200d4e0 <rtems_bdbuf_unlock_sync> <== NOT EXECUTED
200d94c: 01 00 00 00 nop <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
200d950: 7f ff fe 53 call 200d29c <rtems_bdbuf_lock_cache> <== NOT EXECUTED
200d954: 01 00 00 00 nop <== 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
200d958: 10 bf ff d1 b 200d89c <rtems_bdbuf_add_to_modified_list_after_access+0x34><== NOT EXECUTED
200d95c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
0200d624 <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)
{
200d624: 9d e3 bf a0 save %sp, -96, %sp
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
200d628: c2 06 00 00 ld [ %i0 ], %g1
200d62c: 82 00 60 01 inc %g1
* 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 ();
200d630: 7f ff ff df call 200d5ac <rtems_bdbuf_disable_preemption>
200d634: c2 26 00 00 st %g1, [ %i0 ]
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
200d638: 7f ff ff 9e call 200d4b0 <rtems_bdbuf_unlock_cache>
200d63c: ba 10 00 08 mov %o0, %i5
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
200d640: d0 06 20 04 ld [ %i0 + 4 ], %o0
200d644: 92 10 20 00 clr %o1
200d648: 7f ff ee c4 call 2009158 <rtems_semaphore_obtain>
200d64c: 94 10 20 00 clr %o2
if (sc == RTEMS_TIMEOUT)
200d650: 80 a2 20 06 cmp %o0, 6
200d654: 02 80 00 0d be 200d688 <rtems_bdbuf_anonymous_wait+0x64> <== NEVER TAKEN
200d658: 80 a2 20 0d cmp %o0, 0xd
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
200d65c: 12 80 00 0e bne 200d694 <rtems_bdbuf_anonymous_wait+0x70> <== NEVER TAKEN
200d660: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
rtems_bdbuf_lock_cache ();
200d664: 7f ff ff 0e call 200d29c <rtems_bdbuf_lock_cache>
200d668: 01 00 00 00 nop
rtems_bdbuf_restore_preemption (prev_mode);
200d66c: 7f ff ff df call 200d5e8 <rtems_bdbuf_restore_preemption>
200d670: 90 10 00 1d mov %i5, %o0
--waiters->count;
200d674: c2 06 00 00 ld [ %i0 ], %g1
200d678: 82 00 7f ff add %g1, -1, %g1
200d67c: c2 26 00 00 st %g1, [ %i0 ]
}
200d680: 81 c7 e0 08 ret
200d684: 81 e8 00 00 restore
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
200d688: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d68c: 7f ff f0 5d call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d690: 90 12 20 12 or %o0, 0x12, %o0 ! 42000012 <RAM_END+0x3fc00012><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
200d694: 7f ff f0 5b call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d698: 90 12 20 10 or %o0, 0x10, %o0 <== NOT EXECUTED
0200d5ac <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
200d5ac: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200d5b0: 90 10 21 00 mov 0x100, %o0
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
200d5b4: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
200d5b8: 92 10 21 00 mov 0x100, %o1
200d5bc: 40 00 0e c7 call 20110d8 <rtems_task_mode>
200d5c0: 94 07 bf fc add %fp, -4, %o2
if (sc != RTEMS_SUCCESSFUL)
200d5c4: 80 a2 20 00 cmp %o0, 0
200d5c8: 12 80 00 04 bne 200d5d8 <rtems_bdbuf_disable_preemption+0x2c><== NEVER TAKEN
200d5cc: f0 07 bf fc ld [ %fp + -4 ], %i0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
return prev_mode;
}
200d5d0: 81 c7 e0 08 ret
200d5d4: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_DIS);
200d5d8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d5dc: 7f ff f0 89 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d5e0: 90 12 20 0f or %o0, 0xf, %o0 ! 4200000f <RAM_END+0x3fc0000f><== NOT EXECUTED
0200dd80 <rtems_bdbuf_discard_buffer_after_access>:
return bdbuf_cache.max_bds_per_group / bds_per_size;
}
static void
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
200dd80: 9d e3 bf a0 save %sp, -96, %sp
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200dd84: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200dd88: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200dd8c: c6 00 60 0c ld [ %g1 + 0xc ], %g3
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200dd90: 80 a0 a0 00 cmp %g2, 0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200dd94: 86 00 ff ff add %g3, -1, %g3
200dd98: c6 20 60 0c st %g3, [ %g1 + 0xc ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200dd9c: 82 10 20 01 mov 1, %g1
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200dda0: 02 80 00 05 be 200ddb4 <rtems_bdbuf_discard_buffer_after_access+0x34>
200dda4: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200dda8: 31 00 80 83 sethi %hi(0x2020c00), %i0
200ddac: 7f ff fe a0 call 200d82c <rtems_bdbuf_wake>
200ddb0: 91 ee 23 48 restore %i0, 0x348, %o0
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
200ddb4: 7f ff fe eb call 200d960 <rtems_bdbuf_remove_from_tree>
200ddb8: 90 10 00 18 mov %i0, %o0
200ddbc: 92 10 00 18 mov %i0, %o1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ddc0: c0 26 20 20 clr [ %i0 + 0x20 ]
200ddc4: 11 00 80 83 sethi %hi(0x2020c00), %o0
200ddc8: 40 00 0e 0e call 2011600 <_Chain_Insert>
200ddcc: 90 12 23 24 or %o0, 0x324, %o0 ! 2020f24 <bdbuf_cache+0x40>
rtems_bdbuf_discard_buffer_after_access (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_group_release (bd);
rtems_bdbuf_discard_buffer (bd);
if (bd->waiters)
200ddd0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200ddd4: 80 a0 60 00 cmp %g1, 0
200ddd8: 32 bf ff f5 bne,a 200ddac <rtems_bdbuf_discard_buffer_after_access+0x2c><== NEVER TAKEN
200dddc: 31 00 80 83 sethi %hi(0x2020c00), %i0 <== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200dde0: 31 00 80 83 sethi %hi(0x2020c00), %i0
200dde4: 7f ff fe 92 call 200d82c <rtems_bdbuf_wake>
200dde8: 91 ee 23 58 restore %i0, 0x358, %o0
0200ddec <rtems_bdbuf_execute_transfer_request>:
static rtems_status_code
rtems_bdbuf_execute_transfer_request (const rtems_disk_device *dd,
rtems_blkdev_request *req,
bool cache_locked)
{
200ddec: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
200ddf0: 80 a6 a0 00 cmp %i2, 0
200ddf4: 12 80 00 68 bne 200df94 <rtems_bdbuf_execute_transfer_request+0x1a8>
200ddf8: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200ddfc: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
200de00: d0 06 20 08 ld [ %i0 + 8 ], %o0
200de04: 94 10 00 19 mov %i1, %o2
200de08: 13 30 06 10 sethi %hi(0xc0184000), %o1
if (result == 0)
200de0c: ba 10 20 00 clr %i5
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200de10: 92 12 62 01 or %o1, 0x201, %o1
200de14: 9f c0 40 00 call %g1
200de18: b0 10 20 1b mov 0x1b, %i0
if (result == 0)
200de1c: 80 a2 20 00 cmp %o0, 0
200de20: 02 80 00 53 be 200df6c <rtems_bdbuf_execute_transfer_request+0x180>
200de24: 01 00 00 00 nop
sc = req->status;
}
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
200de28: 7f ff fd 1d call 200d29c <rtems_bdbuf_lock_cache>
200de2c: 01 00 00 00 nop
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200de30: c8 06 60 10 ld [ %i1 + 0x10 ], %g4
200de34: 80 a1 20 00 cmp %g4, 0
200de38: 02 80 00 33 be 200df04 <rtems_bdbuf_execute_transfer_request+0x118><== NEVER TAKEN
200de3c: a2 10 20 00 clr %l1
200de40: 27 00 80 83 sethi %hi(0x2020c00), %l3
200de44: b6 10 00 19 mov %i1, %i3
bool cache_locked)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int result = 0;
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
200de48: a4 10 20 00 clr %l2
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200de4c: b8 10 20 00 clr %i4
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200de50: a0 10 20 01 mov 1, %l0
200de54: a6 14 e3 24 or %l3, 0x324, %l3
200de58: 10 80 00 13 b 200dea4 <rtems_bdbuf_execute_transfer_request+0xb8>
200de5c: a8 10 20 02 mov 2, %l4
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200de60: c2 05 60 28 ld [ %l5 + 0x28 ], %g1
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
200de64: 80 a6 20 00 cmp %i0, 0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200de68: c6 00 60 0c ld [ %g1 + 0xc ], %g3
200de6c: 86 00 ff ff add %g3, -1, %g3
else
wake_buffer_waiters = true;
rtems_bdbuf_group_release (bd);
if (sc == RTEMS_SUCCESSFUL && bd->state == RTEMS_BDBUF_STATE_TRANSFER)
200de70: 12 80 00 06 bne 200de88 <rtems_bdbuf_execute_transfer_request+0x9c>
200de74: c6 20 60 0c st %g3, [ %g1 + 0xc ]
200de78: c2 05 60 20 ld [ %l5 + 0x20 ], %g1
200de7c: 80 a0 60 09 cmp %g1, 9
200de80: 22 80 00 29 be,a 200df24 <rtems_bdbuf_execute_transfer_request+0x138>
200de84: e8 25 60 20 st %l4, [ %l5 + 0x20 ]
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
200de88: 80 a0 a0 00 cmp %g2, 0
200de8c: 02 80 00 0d be 200dec0 <rtems_bdbuf_execute_transfer_request+0xd4>
200de90: e0 25 60 20 st %l0, [ %l5 + 0x20 ]
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200de94: b8 07 20 01 inc %i4
200de98: 80 a1 00 1c cmp %g4, %i4
200de9c: 08 80 00 14 bleu 200deec <rtems_bdbuf_execute_transfer_request+0x100>
200dea0: b6 06 e0 10 add %i3, 0x10, %i3
{
rtems_bdbuf_buffer *bd = req->bufs [transfer_index].user;
200dea4: ea 06 e0 24 ld [ %i3 + 0x24 ], %l5
bool waiters = bd->waiters;
200dea8: c4 05 60 24 ld [ %l5 + 0x24 ], %g2
if (waiters)
200deac: 80 a0 a0 00 cmp %g2, 0
200deb0: 32 bf ff ec bne,a 200de60 <rtems_bdbuf_execute_transfer_request+0x74>
200deb4: a4 10 20 01 mov 1, %l2
wake_transfer_waiters = true;
else
wake_buffer_waiters = true;
200deb8: 10 bf ff ea b 200de60 <rtems_bdbuf_execute_transfer_request+0x74>
200debc: a2 10 20 01 mov 1, %l1
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
200dec0: 7f ff fe a8 call 200d960 <rtems_bdbuf_remove_from_tree>
200dec4: 90 10 00 15 mov %l5, %o0
200dec8: 90 10 00 13 mov %l3, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200decc: c0 25 60 20 clr [ %l5 + 0x20 ]
200ded0: 40 00 0d cc call 2011600 <_Chain_Insert>
200ded4: 92 10 00 15 mov %l5, %o1
200ded8: c8 06 60 10 ld [ %i1 + 0x10 ], %g4
else
sc = RTEMS_IO_ERROR;
rtems_bdbuf_lock_cache ();
for (transfer_index = 0; transfer_index < req->bufnum; ++transfer_index)
200dedc: b8 07 20 01 inc %i4
200dee0: 80 a1 00 1c cmp %g4, %i4
200dee4: 18 bf ff f0 bgu 200dea4 <rtems_bdbuf_execute_transfer_request+0xb8><== NEVER TAKEN
200dee8: b6 06 e0 10 add %i3, 0x10, %i3
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
200deec: 80 8c a0 ff btst 0xff, %l2
200def0: 12 80 00 1b bne 200df5c <rtems_bdbuf_execute_transfer_request+0x170>
200def4: 11 00 80 83 sethi %hi(0x2020c00), %o0
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
200def8: 80 8c 60 ff btst 0xff, %l1
200defc: 12 80 00 0f bne 200df38 <rtems_bdbuf_execute_transfer_request+0x14c>
200df00: 11 00 80 83 sethi %hi(0x2020c00), %o0
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
if (!cache_locked)
200df04: 80 a6 a0 00 cmp %i2, 0
200df08: 02 80 00 11 be 200df4c <rtems_bdbuf_execute_transfer_request+0x160>
200df0c: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
200df10: 80 8f 60 ff btst 0xff, %i5
200df14: 22 80 00 02 be,a 200df1c <rtems_bdbuf_execute_transfer_request+0x130>
200df18: b0 10 20 1b mov 0x1b, %i0
return sc;
else
return RTEMS_IO_ERROR;
}
200df1c: 81 c7 e0 08 ret
200df20: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200df24: 90 10 00 13 mov %l3, %o0
200df28: 7f ff ef 8e call 2009d60 <_Chain_Append>
200df2c: 92 10 00 15 mov %l5, %o1
200df30: 10 bf ff d9 b 200de94 <rtems_bdbuf_execute_transfer_request+0xa8>
200df34: c8 06 60 10 ld [ %i1 + 0x10 ], %g4
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200df38: 7f ff fe 3d call 200d82c <rtems_bdbuf_wake>
200df3c: 90 12 23 58 or %o0, 0x358, %o0
if (!cache_locked)
200df40: 80 a6 a0 00 cmp %i2, 0
200df44: 32 bf ff f4 bne,a 200df14 <rtems_bdbuf_execute_transfer_request+0x128>
200df48: 80 8f 60 ff btst 0xff, %i5
rtems_bdbuf_unlock_cache ();
200df4c: 7f ff fd 59 call 200d4b0 <rtems_bdbuf_unlock_cache>
200df50: 01 00 00 00 nop
if (sc == RTEMS_SUCCESSFUL || sc == RTEMS_UNSATISFIED)
200df54: 10 bf ff f0 b 200df14 <rtems_bdbuf_execute_transfer_request+0x128>
200df58: 80 8f 60 ff btst 0xff, %i5
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("transfer", bd);
}
if (wake_transfer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.transfer_waiters);
200df5c: 7f ff fe 34 call 200d82c <rtems_bdbuf_wake>
200df60: 90 12 23 50 or %o0, 0x350, %o0
if (wake_buffer_waiters)
200df64: 10 bf ff e6 b 200defc <rtems_bdbuf_execute_transfer_request+0x110>
200df68: 80 8c 60 ff btst 0xff, %l1
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
if (result == 0)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
200df6c: 7f ff fd 7d call 200d560 <rtems_bdbuf_wait_for_event>
200df70: 90 10 20 02 mov 2, %o0
sc = req->status;
200df74: f0 06 60 0c ld [ %i1 + 0xc ], %i0
200df78: 80 a0 00 18 cmp %g0, %i0
200df7c: 82 1e 20 0d xor %i0, 0xd, %g1
200df80: ba 60 3f ff subx %g0, -1, %i5
200df84: 80 a0 00 01 cmp %g0, %g1
200df88: 82 60 3f ff subx %g0, -1, %g1
200df8c: 10 bf ff a7 b 200de28 <rtems_bdbuf_execute_transfer_request+0x3c>
200df90: ba 17 40 01 or %i5, %g1, %i5
uint32_t transfer_index = 0;
bool wake_transfer_waiters = false;
bool wake_buffer_waiters = false;
if (cache_locked)
rtems_bdbuf_unlock_cache ();
200df94: 7f ff fd 47 call 200d4b0 <rtems_bdbuf_unlock_cache>
200df98: 01 00 00 00 nop
result = dd->ioctl (dd->phys_dev, RTEMS_BLKIO_REQUEST, req);
200df9c: 10 bf ff 99 b 200de00 <rtems_bdbuf_execute_transfer_request+0x14>
200dfa0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
0200d30c <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_bdbuf_buf_state state, uint32_t error)
{
200d30c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_fatal_error_occurred ((((uint32_t) state) << 16) | error);
200d310: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED
200d314: 7f ff f1 3b call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d318: 90 16 40 08 or %i1, %o0, %o0 <== NOT EXECUTED
0200ef74 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (const rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200ef74: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
200ef78: c0 27 bf f8 clr [ %fp + -8 ]
size_t bds_per_group = 0;
200ef7c: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_bdbuf_obtain_disk (dd, block, &media_block, &bds_per_group);
200ef80: 90 10 00 18 mov %i0, %o0
200ef84: 92 10 00 19 mov %i1, %o1
200ef88: 94 07 bf f8 add %fp, -8, %o2
200ef8c: 7f ff f9 ef call 200d748 <rtems_bdbuf_obtain_disk>
200ef90: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL)
200ef94: ba 92 20 00 orcc %o0, 0, %i5
200ef98: 02 80 00 04 be 200efa8 <rtems_bdbuf_get+0x34> <== ALWAYS TAKEN
200ef9c: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
return RTEMS_SUCCESSFUL;
}
200efa0: 81 c7 e0 08 ret <== NOT EXECUTED
200efa4: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
sc = rtems_bdbuf_obtain_disk (dd, block, &media_block, &bds_per_group);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_bdbuf_lock_cache ();
200efa8: 7f ff f8 bd call 200d29c <rtems_bdbuf_lock_cache>
200efac: 01 00 00 00 nop
*/
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, bds_per_group);
200efb0: d2 07 bf f8 ld [ %fp + -8 ], %o1
200efb4: d4 07 bf fc ld [ %fp + -4 ], %o2
200efb8: 7f ff fe 6a call 200e960 <rtems_bdbuf_get_buffer_for_access>
200efbc: 90 10 00 18 mov %i0, %o0
200efc0: b0 10 00 08 mov %o0, %i0
switch (bd->state)
200efc4: d0 02 20 20 ld [ %o0 + 0x20 ], %o0
200efc8: 80 a2 20 02 cmp %o0, 2
200efcc: 02 80 00 0f be 200f008 <rtems_bdbuf_get+0x94>
200efd0: 80 a2 20 07 cmp %o0, 7
200efd4: 02 80 00 06 be 200efec <rtems_bdbuf_get+0x78>
200efd8: 80 a2 20 01 cmp %o0, 1
200efdc: 02 80 00 0e be 200f014 <rtems_bdbuf_get+0xa0> <== ALWAYS TAKEN
200efe0: 13 10 80 00 sethi %hi(0x42000000), %o1
* so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_2);
200efe4: 7f ff f8 ca call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200efe8: 92 12 60 1e or %o1, 0x1e, %o1 ! 4200001e <RAM_END+0x3fc0001e><== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200efec: 82 10 20 04 mov 4, %g1
200eff0: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
200eff4: 7f ff f9 2f call 200d4b0 <rtems_bdbuf_unlock_cache>
200eff8: 01 00 00 00 nop
*bd_ptr = bd;
200effc: f0 26 80 00 st %i0, [ %i2 ]
return RTEMS_SUCCESSFUL;
}
200f000: 81 c7 e0 08 ret
200f004: 91 e8 00 1d restore %g0, %i5, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f008: 82 10 20 03 mov 3, %g1
200f00c: 10 bf ff fa b 200eff4 <rtems_bdbuf_get+0x80>
200f010: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
200f014: 82 10 20 05 mov 5, %g1
200f018: 10 bf ff f7 b 200eff4 <rtems_bdbuf_get+0x80>
200f01c: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
0200e960 <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (const rtems_disk_device *dd,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
200e960: 9d e3 bf a0 save %sp, -96, %sp
200e964: 3b 00 80 83 sethi %hi(0x2020c00), %i5
200e968: ba 17 62 e4 or %i5, 0x2e4, %i5 ! 2020ee4 <bdbuf_cache>
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);
200e96c: a2 07 60 6c add %i5, 0x6c, %l1
}
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);
200e970: a0 07 60 64 add %i5, 0x64, %l0
200e974: b6 07 60 58 add %i5, 0x58, %i3
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200e978: b8 07 60 40 add %i5, 0x40, %i4
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
200e97c: a4 07 60 50 add %i5, 0x50, %l2
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
200e980: e6 07 60 3c ld [ %i5 + 0x3c ], %l3
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
200e984: 80 a4 e0 00 cmp %l3, 0
200e988: 02 80 00 11 be 200e9cc <rtems_bdbuf_get_buffer_for_access+0x6c>
200e98c: 90 10 00 18 mov %i0, %o0
200e990: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1
200e994: 80 a6 00 01 cmp %i0, %g1
200e998: 22 80 00 23 be,a 200ea24 <rtems_bdbuf_get_buffer_for_access+0xc4>
200e99c: c4 04 e0 18 ld [ %l3 + 0x18 ], %g2
{
if (((uintptr_t) p->dd < (uintptr_t) dd)
200e9a0: 80 a0 40 18 cmp %g1, %i0
200e9a4: 2a 80 00 06 bcs,a 200e9bc <rtems_bdbuf_get_buffer_for_access+0x5c>
200e9a8: e6 04 e0 0c ld [ %l3 + 0xc ], %l3
|| ((p->dd == dd) && (p->block < block)))
200e9ac: 80 a6 00 01 cmp %i0, %g1
200e9b0: 22 80 00 18 be,a 200ea10 <rtems_bdbuf_get_buffer_for_access+0xb0>
200e9b4: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200e9b8: e6 04 e0 08 ld [ %l3 + 8 ], %l3
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
200e9bc: 80 a4 e0 00 cmp %l3, 0
200e9c0: 32 bf ff f5 bne,a 200e994 <rtems_bdbuf_get_buffer_for_access+0x34>
200e9c4: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block, bds_per_group);
200e9c8: 90 10 00 18 mov %i0, %o0
200e9cc: 92 10 00 19 mov %i1, %o1
200e9d0: 7f ff fe e0 call 200e550 <rtems_bdbuf_get_buffer_from_lru_list>
200e9d4: 94 10 00 1a mov %i2, %o2
if (bd == NULL)
200e9d8: a6 92 20 00 orcc %o0, 0, %l3
200e9dc: 22 80 00 58 be,a 200eb3c <rtems_bdbuf_get_buffer_for_access+0x1dc>
200e9e0: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
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);
200e9e4: 3b 00 80 83 sethi %hi(0x2020c00), %i5
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200e9e8: 39 00 80 34 sethi %hi(0x200d000), %i4
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);
200e9ec: ba 17 63 50 or %i5, 0x350, %i5
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);
200e9f0: b6 07 7f f8 add %i5, -8, %i3
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200e9f4: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0
200e9f8: 80 a2 20 0a cmp %o0, 0xa
200e9fc: 08 80 00 40 bleu 200eafc <rtems_bdbuf_get_buffer_for_access+0x19c><== ALWAYS TAKEN
200ea00: 84 17 22 18 or %i4, 0x218, %g2
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
200ea04: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ea08: 7f ff fa 41 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200ea0c: 92 12 60 05 or %o1, 5, %o1 ! 42000005 <RAM_END+0x3fc00005><== NOT EXECUTED
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
{
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
200ea10: 80 a6 40 01 cmp %i1, %g1
200ea14: 28 bf ff ea bleu,a 200e9bc <rtems_bdbuf_get_buffer_for_access+0x5c>
200ea18: e6 04 e0 08 ld [ %l3 + 8 ], %l3
{
p = p->avl.right;
200ea1c: 10 bf ff e8 b 200e9bc <rtems_bdbuf_get_buffer_for_access+0x5c>
200ea20: e6 04 e0 0c ld [ %l3 + 0xc ], %l3
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
200ea24: 80 a6 40 02 cmp %i1, %g2
200ea28: 12 bf ff df bne 200e9a4 <rtems_bdbuf_get_buffer_for_access+0x44>
200ea2c: 80 a0 40 18 cmp %g1, %i0
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
200ea30: c2 04 e0 28 ld [ %l3 + 0x28 ], %g1
200ea34: c2 00 60 08 ld [ %g1 + 8 ], %g1
200ea38: 80 a0 40 1a cmp %g1, %i2
200ea3c: 02 bf ff ea be 200e9e4 <rtems_bdbuf_get_buffer_for_access+0x84>
200ea40: 29 00 80 34 sethi %hi(0x200d000), %l4
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200ea44: aa 10 20 08 mov 8, %l5
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200ea48: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0
200ea4c: 80 a2 20 0a cmp %o0, 0xa
200ea50: 08 80 00 05 bleu 200ea64 <rtems_bdbuf_get_buffer_for_access+0x104><== ALWAYS TAKEN
200ea54: 82 15 22 44 or %l4, 0x244, %g1
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
200ea58: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200ea5c: 7f ff fa 2c call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200ea60: 92 12 60 06 or %o1, 6, %o1 ! 42000006 <RAM_END+0x3fc00006><== NOT EXECUTED
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200ea64: 91 2a 20 02 sll %o0, 2, %o0
200ea68: c2 00 40 08 ld [ %g1 + %o0 ], %g1
200ea6c: 81 c0 40 00 jmp %g1
200ea70: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200ea74: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
200ea78: 40 00 0a d9 call 20115dc <_Chain_Extract> <== NOT EXECUTED
200ea7c: ea 24 e0 20 st %l5, [ %l3 + 0x20 ] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200ea80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200ea84: 7f ff ec b7 call 2009d60 <_Chain_Append> <== NOT EXECUTED
200ea88: 92 10 00 13 mov %l3, %o1 <== 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 (&bd->link);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
200ea8c: 7f ff fa a1 call 200d510 <rtems_bdbuf_wake_swapper> <== NOT EXECUTED
200ea90: 01 00 00 00 nop <== NOT EXECUTED
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200ea94: 10 bf ff ee b 200ea4c <rtems_bdbuf_get_buffer_for_access+0xec><== NOT EXECUTED
200ea98: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0 <== NOT EXECUTED
}
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);
200ea9c: 90 10 00 13 mov %l3, %o0
200eaa0: 7f ff fb 00 call 200d6a0 <rtems_bdbuf_wait>
200eaa4: 92 10 00 10 mov %l0, %o1
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200eaa8: 10 bf ff e9 b 200ea4c <rtems_bdbuf_get_buffer_for_access+0xec>
200eaac: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0
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)
200eab0: c2 04 e0 24 ld [ %l3 + 0x24 ], %g1
200eab4: 80 a0 60 00 cmp %g1, 0
200eab8: 32 80 00 27 bne,a 200eb54 <rtems_bdbuf_get_buffer_for_access+0x1f4><== ALWAYS TAKEN
200eabc: 11 00 80 83 sethi %hi(0x2020c00), %o0
{
if (bd->group->bds_per_group != bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
200eac0: 7f ff fc a3 call 200dd4c <rtems_bdbuf_remove_from_tree_and_lru_list><== NOT EXECUTED
200eac4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
200eac8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200eacc: c0 24 e0 20 clr [ %l3 + 0x20 ] <== NOT EXECUTED
200ead0: 40 00 0a cc call 2011600 <_Chain_Insert> <== NOT EXECUTED
200ead4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
{
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);
200ead8: 7f ff fb 55 call 200d82c <rtems_bdbuf_wake> <== NOT EXECUTED
200eadc: 90 07 20 34 add %i4, 0x34, %o0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
200eae0: 10 bf ff a9 b 200e984 <rtems_bdbuf_get_buffer_for_access+0x24><== NOT EXECUTED
200eae4: e6 07 60 3c ld [ %i5 + 0x3c ], %l3 <== NOT EXECUTED
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);
200eae8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
200eaec: 7f ff fa ed call 200d6a0 <rtems_bdbuf_wait> <== NOT EXECUTED
200eaf0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200eaf4: 10 bf ff d6 b 200ea4c <rtems_bdbuf_get_buffer_for_access+0xec><== NOT EXECUTED
200eaf8: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0 <== NOT EXECUTED
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200eafc: 83 2a 20 02 sll %o0, 2, %g1
200eb00: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200eb04: 81 c0 40 00 jmp %g1
200eb08: 01 00 00 00 nop
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200eb0c: c2 04 e0 28 ld [ %l3 + 0x28 ], %g1
200eb10: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200eb14: 84 00 bf ff add %g2, -1, %g2
200eb18: c4 20 60 0c st %g2, [ %g1 + 0xc ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200eb1c: 40 00 0a b0 call 20115dc <_Chain_Extract>
200eb20: 90 10 00 13 mov %l3, %o0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200eb24: c2 04 e0 28 ld [ %l3 + 0x28 ], %g1
200eb28: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200eb2c: 84 00 a0 01 inc %g2
200eb30: c4 20 60 0c st %g2, [ %g1 + 0xc ]
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
200eb34: 81 c7 e0 08 ret
200eb38: 91 e8 00 13 restore %g0, %l3, %o0
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
200eb3c: 80 a0 40 12 cmp %g1, %l2
200eb40: 22 80 00 05 be,a 200eb54 <rtems_bdbuf_get_buffer_for_access+0x1f4>
200eb44: 11 00 80 83 sethi %hi(0x2020c00), %o0
rtems_bdbuf_wake_swapper ();
200eb48: 7f ff fa 72 call 200d510 <rtems_bdbuf_wake_swapper>
200eb4c: 01 00 00 00 nop
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
200eb50: 11 00 80 83 sethi %hi(0x2020c00), %o0
200eb54: 7f ff fa b4 call 200d624 <rtems_bdbuf_anonymous_wait>
200eb58: 90 12 23 58 or %o0, 0x358, %o0 ! 2020f58 <bdbuf_cache+0x74>
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
200eb5c: 10 bf ff 8a b 200e984 <rtems_bdbuf_get_buffer_for_access+0x24>
200eb60: e6 07 60 3c ld [ %i5 + 0x3c ], %l3
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);
200eb64: 90 10 00 13 mov %l3, %o0
200eb68: 7f ff fa ce call 200d6a0 <rtems_bdbuf_wait>
200eb6c: 92 10 00 1d mov %i5, %o1
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200eb70: 10 bf ff a2 b 200e9f8 <rtems_bdbuf_get_buffer_for_access+0x98>
200eb74: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0
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);
200eb78: 90 10 00 13 mov %l3, %o0
200eb7c: 7f ff fa c9 call 200d6a0 <rtems_bdbuf_wait>
200eb80: 92 10 00 1b mov %i3, %o1
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200eb84: 10 bf ff 9d b 200e9f8 <rtems_bdbuf_get_buffer_for_access+0x98>
200eb88: d0 04 e0 20 ld [ %l3 + 0x20 ], %o0
0200e550 <rtems_bdbuf_get_buffer_from_lru_list>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (const rtems_disk_device *dd,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
200e550: 9d e3 bf 20 save %sp, -224, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200e554: 37 00 80 83 sethi %hi(0x2020c00), %i3
200e558: b6 16 e2 e4 or %i3, 0x2e4, %i3 ! 2020ee4 <bdbuf_cache>
200e55c: fa 06 e0 40 ld [ %i3 + 0x40 ], %i5
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
200e560: b8 06 e0 44 add %i3, 0x44, %i4
200e564: 80 a7 40 1c cmp %i5, %i4
200e568: 02 80 00 44 be 200e678 <rtems_bdbuf_get_buffer_from_lru_list+0x128>
200e56c: a0 10 20 00 clr %l0
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200e570: a8 06 e0 40 add %i3, 0x40, %l4
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);
200e574: aa 06 e0 74 add %i3, 0x74, %l5
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
200e578: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
200e57c: 80 a0 60 00 cmp %g1, 0
200e580: 32 80 00 3a bne,a 200e668 <rtems_bdbuf_get_buffer_from_lru_list+0x118>
200e584: fa 07 40 00 ld [ %i5 ], %i5
{
if (bd->group->bds_per_group == bds_per_group)
200e588: e4 07 60 28 ld [ %i5 + 0x28 ], %l2
200e58c: d2 04 a0 08 ld [ %l2 + 8 ], %o1
200e590: 80 a2 40 1a cmp %o1, %i2
200e594: 02 80 00 3b be 200e680 <rtems_bdbuf_get_buffer_from_lru_list+0x130>
200e598: 01 00 00 00 nop
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
empty_bd = bd;
}
else if (bd->group->users == 0)
200e59c: c2 04 a0 0c ld [ %l2 + 0xc ], %g1
200e5a0: 80 a0 60 00 cmp %g1, 0
200e5a4: 32 80 00 31 bne,a 200e668 <rtems_bdbuf_get_buffer_from_lru_list+0x118>
200e5a8: fa 07 40 00 ld [ %i5 ], %i5
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;
200e5ac: d0 06 e0 20 ld [ %i3 + 0x20 ], %o0
for (b = 0, bd = group->bdbuf;
200e5b0: 80 a2 60 00 cmp %o1, 0
200e5b4: 02 80 00 10 be 200e5f4 <rtems_bdbuf_get_buffer_from_lru_list+0xa4><== NEVER TAKEN
200e5b8: e0 04 a0 10 ld [ %l2 + 0x10 ], %l0
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;
200e5bc: 40 00 37 e8 call 201c55c <.udiv>
200e5c0: a2 10 20 00 clr %l1
for (b = 0, bd = group->bdbuf;
200e5c4: 83 2a 20 03 sll %o0, 3, %g1
200e5c8: a7 2a 20 06 sll %o0, 6, %l3
200e5cc: a6 24 c0 01 sub %l3, %g1, %l3
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
200e5d0: 7f ff fd df call 200dd4c <rtems_bdbuf_remove_from_tree_and_lru_list>
200e5d4: 90 10 00 10 mov %l0, %o0
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;
200e5d8: c2 04 a0 08 ld [ %l2 + 8 ], %g1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200e5dc: a2 04 60 01 inc %l1
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;
200e5e0: 80 a4 40 01 cmp %l1, %g1
200e5e4: 0a bf ff fb bcs 200e5d0 <rtems_bdbuf_get_buffer_from_lru_list+0x80>
200e5e8: a0 04 00 13 add %l0, %l3, %l0
200e5ec: d0 06 e0 20 ld [ %i3 + 0x20 ], %o0
200e5f0: e0 04 a0 10 ld [ %l2 + 0x10 ], %l0
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;
200e5f4: 80 a6 a0 01 cmp %i2, 1
200e5f8: 08 80 00 18 bleu 200e658 <rtems_bdbuf_get_buffer_from_lru_list+0x108>
200e5fc: f4 24 a0 08 st %i2, [ %l2 + 8 ]
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;
200e600: 92 10 00 1a mov %i2, %o1
200e604: 40 00 37 d6 call 201c55c <.udiv>
200e608: a2 10 20 01 mov 1, %l1
for (b = 1, bd = group->bdbuf + bufs_per_bd;
200e60c: 83 2a 20 03 sll %o0, 3, %g1
200e610: a7 2a 20 06 sll %o0, 6, %l3
200e614: a6 24 c0 01 sub %l3, %g1, %l3
200e618: a0 04 00 13 add %l0, %l3, %l0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200e61c: c0 24 20 20 clr [ %l0 + 0x20 ]
200e620: 92 10 00 10 mov %l0, %o1
200e624: 40 00 0b f7 call 2011600 <_Chain_Insert>
200e628: 90 10 00 14 mov %l4, %o0
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;
200e62c: c2 04 a0 08 ld [ %l2 + 8 ], %g1
b < group->bds_per_group;
b++, bd += bufs_per_bd)
200e630: a2 04 60 01 inc %l1
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;
200e634: 80 a4 40 01 cmp %l1, %g1
200e638: 0a bf ff f9 bcs 200e61c <rtems_bdbuf_get_buffer_from_lru_list+0xcc><== NEVER TAKEN
200e63c: a0 04 00 13 add %l0, %l3, %l0
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
200e640: 80 a4 60 01 cmp %l1, 1
200e644: 28 80 00 05 bleu,a 200e658 <rtems_bdbuf_get_buffer_from_lru_list+0x108><== NEVER TAKEN
200e648: e0 04 a0 10 ld [ %l2 + 0x10 ], %l0 <== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200e64c: 7f ff fc 78 call 200d82c <rtems_bdbuf_wake>
200e650: 90 10 00 15 mov %l5, %o0
200e654: e0 04 a0 10 ld [ %l2 + 0x10 ], %l0
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
200e658: 80 a4 20 00 cmp %l0, 0
200e65c: 32 80 00 10 bne,a 200e69c <rtems_bdbuf_get_buffer_from_lru_list+0x14c><== ALWAYS TAKEN
200e660: f0 24 20 14 st %i0, [ %l0 + 0x14 ]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200e664: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
200e668: 80 a7 40 1c cmp %i5, %i4
200e66c: 32 bf ff c4 bne,a 200e57c <rtems_bdbuf_get_buffer_from_lru_list+0x2c>
200e670: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
}
node = rtems_chain_next (node);
}
return NULL;
200e674: a0 10 20 00 clr %l0
}
200e678: 81 c7 e0 08 ret
200e67c: 91 e8 00 10 restore %g0, %l0, %o0
*/
if (bd->waiters == 0)
{
if (bd->group->bds_per_group == bds_per_group)
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
200e680: 7f ff fd b3 call 200dd4c <rtems_bdbuf_remove_from_tree_and_lru_list>
200e684: 90 10 00 1d mov %i5, %o0
200e688: a0 10 00 1d mov %i5, %l0
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
200e68c: 80 a4 20 00 cmp %l0, 0
200e690: 22 bf ff f6 be,a 200e668 <rtems_bdbuf_get_buffer_from_lru_list+0x118><== NEVER TAKEN
200e694: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
200e698: f0 24 20 14 st %i0, [ %l0 + 0x14 ]
bd->block = block;
bd->avl.left = NULL;
200e69c: c0 24 20 08 clr [ %l0 + 8 ]
bd->avl.right = NULL;
200e6a0: c0 24 20 0c clr [ %l0 + 0xc ]
rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
200e6a4: c2 06 e0 3c ld [ %i3 + 0x3c ], %g1
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
200e6a8: f2 24 20 18 st %i1, [ %l0 + 0x18 ]
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
200e6ac: 80 a0 60 00 cmp %g1, 0
200e6b0: 02 80 00 a5 be 200e944 <rtems_bdbuf_get_buffer_from_lru_list+0x3f4>
200e6b4: c0 24 20 24 clr [ %l0 + 0x24 ]
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
200e6b8: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
rtems_bdbuf_buffer* p = *root;
rtems_bdbuf_buffer* q;
rtems_bdbuf_buffer* p1;
rtems_bdbuf_buffer* p2;
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
200e6bc: b4 07 bf 80 add %fp, -128, %i2
200e6c0: 84 10 00 1a mov %i2, %g2
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
200e6c4: c2 20 80 00 st %g1, [ %g2 ]
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
200e6c8: ba 10 20 01 mov 1, %i5
break;
}
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
200e6cc: b8 10 3f ff mov -1, %i4
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
200e6d0: 80 a0 c0 18 cmp %g3, %i0
200e6d4: 1a 80 00 0d bcc 200e708 <rtems_bdbuf_get_buffer_from_lru_list+0x1b8><== ALWAYS TAKEN
200e6d8: 88 00 a0 04 add %g2, 4, %g4
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
q = p->avl.right;
200e6dc: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
if (q == NULL)
200e6e0: 80 a0 e0 00 cmp %g3, 0
200e6e4: 02 80 00 1c be 200e754 <rtems_bdbuf_get_buffer_from_lru_list+0x204>
200e6e8: fa 28 60 10 stb %i5, [ %g1 + 0x10 ]
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
200e6ec: 82 10 00 03 mov %g3, %g1
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
200e6f0: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
p->avl.cache = -1;
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
200e6f4: 84 10 00 04 mov %g4, %g2
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
200e6f8: c2 20 80 00 st %g1, [ %g2 ]
if (((uintptr_t) p->dd < (uintptr_t) dd)
200e6fc: 80 a0 c0 18 cmp %g3, %i0
200e700: 0a bf ff f7 bcs 200e6dc <rtems_bdbuf_get_buffer_from_lru_list+0x18c><== NEVER TAKEN
200e704: 88 00 a0 04 add %g2, 4, %g4
|| ((p->dd == dd) && (p->block < block)))
200e708: 80 a6 00 03 cmp %i0, %g3
200e70c: 22 80 00 09 be,a 200e730 <rtems_bdbuf_get_buffer_from_lru_list+0x1e0><== ALWAYS TAKEN
200e710: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
}
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
q = p->avl.left;
200e714: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED
if (q == NULL)
200e718: 80 a0 e0 00 cmp %g3, 0
200e71c: 12 bf ff f4 bne 200e6ec <rtems_bdbuf_get_buffer_from_lru_list+0x19c>
200e720: f8 28 60 10 stb %i4, [ %g1 + 0x10 ]
{
q = node;
p->avl.left = q;
200e724: e0 20 60 08 st %l0, [ %g1 + 8 ]
200e728: 10 80 00 0d b 200e75c <rtems_bdbuf_get_buffer_from_lru_list+0x20c>
200e72c: 88 10 3f ff mov -1, %g4
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
200e730: 80 a6 40 03 cmp %i1, %g3
200e734: 38 bf ff eb bgu,a 200e6e0 <rtems_bdbuf_get_buffer_from_lru_list+0x190>
200e738: c6 00 60 0c ld [ %g1 + 0xc ], %g3
q = node;
p->avl.right = q = node;
break;
}
}
else if ((p->dd != dd) || (p->block != block))
200e73c: 80 a6 40 03 cmp %i1, %g3
200e740: 32 bf ff f6 bne,a 200e718 <rtems_bdbuf_get_buffer_from_lru_list+0x1c8><== ALWAYS TAKEN
200e744: c6 00 60 08 ld [ %g1 + 8 ], %g3
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RECYCLE);
200e748: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e74c: 7f ff ec 2d call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e750: 90 12 20 1b or %o0, 0x1b, %o0 ! 4200001b <RAM_END+0x3fc0001b><== NOT EXECUTED
p->avl.cache = 1;
q = p->avl.right;
if (q == NULL)
{
q = node;
p->avl.right = q = node;
200e754: e0 20 60 0c st %l0, [ %g1 + 0xc ]
200e758: 88 10 20 01 mov 1, %g4
}
p = q;
}
q->avl.left = q->avl.right = NULL;
200e75c: c0 24 20 0c clr [ %l0 + 0xc ]
200e760: c0 24 20 08 clr [ %l0 + 8 ]
q->avl.bal = 0;
200e764: c0 2c 20 11 clrb [ %l0 + 0x11 ]
200e768: 89 29 20 18 sll %g4, 0x18, %g4
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
200e76c: 10 80 00 12 b 200e7b4 <rtems_bdbuf_get_buffer_from_lru_list+0x264>
200e770: b2 10 20 01 mov 1, %i1
200e774: 86 10 00 01 mov %g1, %g3
200e778: ba 10 20 01 mov 1, %i5
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
200e77c: 80 a0 80 1a cmp %g2, %i2
200e780: 28 80 00 1f bleu,a 200e7fc <rtems_bdbuf_get_buffer_from_lru_list+0x2ac>
200e784: c6 26 e0 3c st %g3, [ %i3 + 0x3c ]
{
p = *--buf_prev;
200e788: c2 00 bf fc ld [ %g2 + -4 ], %g1
if (p->avl.cache == -1)
200e78c: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
200e790: 89 29 20 18 sll %g4, 0x18, %g4
200e794: b9 39 20 18 sra %g4, 0x18, %i4
200e798: 80 a7 3f ff cmp %i4, -1
200e79c: 22 80 00 03 be,a 200e7a8 <rtems_bdbuf_get_buffer_from_lru_list+0x258>
200e7a0: c6 20 60 08 st %g3, [ %g1 + 8 ]
{
p->avl.left = q;
}
else
{
p->avl.right = q;
200e7a4: c6 20 60 0c st %g3, [ %g1 + 0xc ]
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
200e7a8: 80 8f 60 ff btst 0xff, %i5
200e7ac: 02 80 00 14 be 200e7fc <rtems_bdbuf_get_buffer_from_lru_list+0x2ac>
200e7b0: 84 00 bf fc add %g2, -4, %g2
{
if (p->avl.cache == -1)
200e7b4: 89 39 20 18 sra %g4, 0x18, %g4
200e7b8: 80 a1 3f ff cmp %g4, -1
200e7bc: 22 80 00 17 be,a 200e818 <rtems_bdbuf_get_buffer_from_lru_list+0x2c8>
200e7c0: fa 48 60 11 ldsb [ %g1 + 0x11 ], %i5
break;
}
}
else
{
switch (p->avl.bal)
200e7c4: c6 48 60 11 ldsb [ %g1 + 0x11 ], %g3
200e7c8: 80 a0 e0 00 cmp %g3, 0
200e7cc: 22 bf ff ea be,a 200e774 <rtems_bdbuf_get_buffer_from_lru_list+0x224>
200e7d0: f2 28 60 11 stb %i1, [ %g1 + 0x11 ]
200e7d4: 80 a0 e0 01 cmp %g3, 1
200e7d8: 02 80 00 17 be 200e834 <rtems_bdbuf_get_buffer_from_lru_list+0x2e4>
200e7dc: 80 a0 ff ff cmp %g3, -1
200e7e0: 22 80 00 0b be,a 200e80c <rtems_bdbuf_get_buffer_from_lru_list+0x2bc><== ALWAYS TAKEN
200e7e4: c0 28 60 11 clrb [ %g1 + 0x11 ]
200e7e8: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
200e7ec: 80 a0 80 1a cmp %g2, %i2 <== NOT EXECUTED
200e7f0: 18 bf ff e6 bgu 200e788 <rtems_bdbuf_get_buffer_from_lru_list+0x238><== NOT EXECUTED
200e7f4: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
p->avl.right = q;
}
}
else
{
*root = p;
200e7f8: c6 26 e0 3c st %g3, [ %i3 + 0x3c ] <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200e7fc: 82 10 20 01 mov 1, %g1
if (empty_bd != NULL)
{
rtems_bdbuf_setup_empty_buffer (empty_bd, dd, block);
return empty_bd;
200e800: 10 bf ff 9e b 200e678 <rtems_bdbuf_get_buffer_from_lru_list+0x128>
200e804: c2 24 20 20 st %g1, [ %l0 + 0x20 ]
else
{
switch (p->avl.bal)
{
case -1:
p->avl.bal = 0;
200e808: c0 28 60 11 clrb [ %g1 + 0x11 ]
200e80c: 86 10 00 01 mov %g1, %g3
modified = false;
200e810: 10 bf ff db b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e814: ba 10 20 00 clr %i5
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
200e818: 80 a7 60 00 cmp %i5, 0
200e81c: 12 80 00 21 bne 200e8a0 <rtems_bdbuf_get_buffer_from_lru_list+0x350>
200e820: 80 a7 60 01 cmp %i5, 1
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
200e824: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
200e828: 86 10 00 01 mov %g1, %g3
200e82c: 10 bf ff d4 b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e830: ba 10 20 01 mov 1, %i5
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
200e834: c8 00 60 0c ld [ %g1 + 0xc ], %g4
if (p1->avl.bal == 1) /* simple RR-turn */
200e838: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200e83c: 80 a0 e0 01 cmp %g3, 1
200e840: 02 80 00 33 be 200e90c <rtems_bdbuf_get_buffer_from_lru_list+0x3bc>
200e844: c6 01 20 08 ld [ %g4 + 8 ], %g3
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200e848: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200e84c: f8 00 e0 0c ld [ %g3 + 0xc ], %i4
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200e850: ba 1f 60 01 xor %i5, 1, %i5
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200e854: f8 21 20 08 st %i4, [ %g4 + 8 ]
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200e858: 80 a0 00 1d cmp %g0, %i5
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200e85c: f8 00 e0 08 ld [ %g3 + 8 ], %i4
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200e860: ba 40 3f ff addx %g0, -1, %i5
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
200e864: c8 20 e0 0c st %g4, [ %g3 + 0xc ]
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200e868: fa 28 60 11 stb %i5, [ %g1 + 0x11 ]
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
200e86c: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200e870: f8 20 60 0c st %i4, [ %g1 + 0xc ]
p2->avl.left = 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;
200e874: 80 a7 7f ff cmp %i5, -1
200e878: 02 80 00 06 be 200e890 <rtems_bdbuf_get_buffer_from_lru_list+0x340>
200e87c: c2 20 e0 08 st %g1, [ %g3 + 8 ]
200e880: c0 29 20 11 clrb [ %g4 + 0x11 ]
p = p2;
}
p->avl.bal = 0;
200e884: c0 28 e0 11 clrb [ %g3 + 0x11 ]
modified = false;
200e888: 10 bf ff bd b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e88c: ba 10 20 00 clr %i5
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = 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;
200e890: f2 29 20 11 stb %i1, [ %g4 + 0x11 ]
p = p2;
}
p->avl.bal = 0;
200e894: c0 28 e0 11 clrb [ %g3 + 0x11 ]
modified = false;
200e898: 10 bf ff b9 b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e89c: ba 10 20 00 clr %i5
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
200e8a0: 02 bf ff da be 200e808 <rtems_bdbuf_get_buffer_from_lru_list+0x2b8>
200e8a4: 80 a7 7f ff cmp %i5, -1
200e8a8: 32 bf ff d1 bne,a 200e7ec <rtems_bdbuf_get_buffer_from_lru_list+0x29c><== NEVER TAKEN
200e8ac: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
200e8b0: c8 00 60 08 ld [ %g1 + 8 ], %g4
if (p1->avl.bal == -1) /* simple LL-turn */
200e8b4: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200e8b8: 80 a0 ff ff cmp %g3, -1
200e8bc: 02 80 00 1b be 200e928 <rtems_bdbuf_get_buffer_from_lru_list+0x3d8>
200e8c0: c6 01 20 0c ld [ %g4 + 0xc ], %g3
p2 = p1->avl.right;
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;
200e8c4: f8 48 e0 11 ldsb [ %g3 + 0x11 ], %i4
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200e8c8: f0 00 e0 08 ld [ %g3 + 8 ], %i0
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;
200e8cc: b8 38 00 1c xnor %g0, %i4, %i4
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200e8d0: f0 21 20 0c st %i0, [ %g4 + 0xc ]
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;
200e8d4: 80 a0 00 1c cmp %g0, %i4
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200e8d8: f0 00 e0 0c ld [ %g3 + 0xc ], %i0
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200e8dc: b8 60 3f ff subx %g0, -1, %i4
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
200e8e0: c8 20 e0 08 st %g4, [ %g3 + 8 ]
p->avl.left = p2->avl.right;
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
200e8e4: f8 28 60 11 stb %i4, [ %g1 + 0x11 ]
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200e8e8: f8 48 e0 11 ldsb [ %g3 + 0x11 ], %i4
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200e8ec: f0 20 60 08 st %i0, [ %g1 + 8 ]
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;
200e8f0: 80 a7 20 01 cmp %i4, 1
200e8f4: 12 bf ff e3 bne 200e880 <rtems_bdbuf_get_buffer_from_lru_list+0x330>
200e8f8: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
200e8fc: fa 29 20 11 stb %i5, [ %g4 + 0x11 ]
p2->avl.left = 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;
p = p2;
}
p->avl.bal = 0;
200e900: c0 28 e0 11 clrb [ %g3 + 0x11 ]
modified = false;
200e904: 10 bf ff 9e b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e908: ba 10 20 00 clr %i5
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
200e90c: c6 20 60 0c st %g3, [ %g1 + 0xc ]
p1->avl.left = p;
p->avl.bal = 0;
200e910: c0 28 60 11 clrb [ %g1 + 0x11 ]
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
200e914: c2 21 20 08 st %g1, [ %g4 + 8 ]
p->avl.bal = 0;
200e918: 86 10 00 04 mov %g4, %g3
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;
}
p->avl.bal = 0;
modified = false;
200e91c: ba 10 20 00 clr %i5
p2->avl.left = 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;
p = p2;
}
p->avl.bal = 0;
200e920: 10 bf ff 97 b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e924: c0 28 e0 11 clrb [ %g3 + 0x11 ]
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
200e928: c6 20 60 08 st %g3, [ %g1 + 8 ]
p1->avl.right = p;
p->avl.bal = 0;
200e92c: c0 28 60 11 clrb [ %g1 + 0x11 ]
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
200e930: c2 21 20 0c st %g1, [ %g4 + 0xc ]
p->avl.bal = 0;
200e934: 86 10 00 04 mov %g4, %g3
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;
}
p->avl.bal = 0;
modified = false;
200e938: ba 10 20 00 clr %i5
p2->avl.left = 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;
p = p2;
}
p->avl.bal = 0;
200e93c: 10 bf ff 90 b 200e77c <rtems_bdbuf_get_buffer_from_lru_list+0x22c>
200e940: c0 28 e0 11 clrb [ %g3 + 0x11 ]
bool modified = false;
if (p == NULL)
{
*root = node;
200e944: e0 26 e0 3c st %l0, [ %i3 + 0x3c ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200e948: 82 10 20 01 mov 1, %g1
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
200e94c: c0 24 20 08 clr [ %l0 + 8 ]
node->avl.right = NULL;
200e950: c0 24 20 0c clr [ %l0 + 0xc ]
node->avl.bal = 0;
200e954: c0 2c 20 11 clrb [ %l0 + 0x11 ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200e958: 10 bf ff 48 b 200e678 <rtems_bdbuf_get_buffer_from_lru_list+0x128>
200e95c: c2 24 20 20 st %g1, [ %l0 + 0x20 ]
0200eb8c <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
200eb8c: 9d e3 bf a0 save %sp, -96, %sp
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
200eb90: 03 00 80 85 sethi %hi(0x2021400), %g1
200eb94: c2 00 61 88 ld [ %g1 + 0x188 ], %g1 ! 2021588 <_Per_CPU_Information+0x8>
200eb98: 80 a0 60 00 cmp %g1, 0
200eb9c: 12 80 00 16 bne 200ebf4 <rtems_bdbuf_init+0x68> <== NEVER TAKEN
200eba0: b0 10 20 12 mov 0x12, %i0
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
200eba4: 37 00 80 79 sethi %hi(0x201e400), %i3
200eba8: b6 16 e1 f0 or %i3, 0x1f0, %i3 ! 201e5f0 <rtems_bdbuf_configuration>
200ebac: f2 06 e0 24 ld [ %i3 + 0x24 ], %i1
200ebb0: f4 06 e0 20 ld [ %i3 + 0x20 ], %i2
200ebb4: 90 10 00 19 mov %i1, %o0
200ebb8: 92 10 00 1a mov %i2, %o1
200ebbc: 40 00 37 14 call 201c80c <.urem>
200ebc0: b0 10 20 0a mov 0xa, %i0
200ebc4: 80 a2 20 00 cmp %o0, 0
200ebc8: 12 80 00 e9 bne 200ef6c <rtems_bdbuf_init+0x3e0> <== NEVER TAKEN
200ebcc: 01 00 00 00 nop
/*
* 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 ();
200ebd0: 7f ff fa 77 call 200d5ac <rtems_bdbuf_disable_preemption>
200ebd4: 39 00 80 83 sethi %hi(0x2020c00), %i4
if (bdbuf_cache.initialised)
200ebd8: ba 17 22 e4 or %i4, 0x2e4, %i5 ! 2020ee4 <bdbuf_cache>
200ebdc: c2 0f 60 84 ldub [ %i5 + 0x84 ], %g1
200ebe0: 80 a0 60 00 cmp %g1, 0
200ebe4: 02 80 00 06 be 200ebfc <rtems_bdbuf_init+0x70> <== ALWAYS TAKEN
200ebe8: b0 10 00 08 mov %o0, %i0
{
rtems_bdbuf_restore_preemption (prev_mode);
200ebec: 7f ff fa 7f call 200d5e8 <rtems_bdbuf_restore_preemption> <== NOT EXECUTED
200ebf0: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
200ebf4: 81 c7 e0 08 ret <== NOT EXECUTED
200ebf8: 81 e8 00 00 restore <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
200ebfc: 92 10 20 00 clr %o1
200ec00: 94 10 20 88 mov 0x88, %o2
200ec04: 40 00 15 42 call 201410c <memset>
200ec08: 90 10 00 1d mov %i5, %o0
bdbuf_cache.initialised = true;
200ec0c: 82 10 20 01 mov 1, %g1
rtems_bdbuf_restore_preemption (prev_mode);
200ec10: 90 10 00 18 mov %i0, %o0
200ec14: 7f ff fa 75 call 200d5e8 <rtems_bdbuf_restore_preemption>
200ec18: c2 2f 60 84 stb %g1, [ %i5 + 0x84 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ec1c: 82 07 60 0c add %i5, 0xc, %g1
200ec20: c2 27 60 08 st %g1, [ %i5 + 8 ]
200ec24: 82 07 60 44 add %i5, 0x44, %g1
head->previous = NULL;
tail->previous = head;
200ec28: 84 07 60 08 add %i5, 8, %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ec2c: c2 27 60 40 st %g1, [ %i5 + 0x40 ]
200ec30: 82 07 60 50 add %i5, 0x50, %g1
head->previous = NULL;
tail->previous = head;
200ec34: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ec38: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
head->previous = NULL;
tail->previous = head;
200ec3c: 84 07 60 40 add %i5, 0x40, %g2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ec40: 82 07 60 5c add %i5, 0x5c, %g1
head->previous = NULL;
tail->previous = head;
200ec44: c4 27 60 48 st %g2, [ %i5 + 0x48 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ec48: c2 27 60 58 st %g1, [ %i5 + 0x58 ]
head->previous = NULL;
tail->previous = head;
200ec4c: 84 07 60 4c add %i5, 0x4c, %g2
200ec50: 82 07 60 58 add %i5, 0x58, %g1
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
200ec54: 31 10 91 10 sethi %hi(0x42444000), %i0
*/
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;
200ec58: c0 27 60 38 clr [ %i5 + 0x38 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200ec5c: c0 27 60 0c clr [ %i5 + 0xc ]
200ec60: c0 27 60 44 clr [ %i5 + 0x44 ]
200ec64: c0 27 60 50 clr [ %i5 + 0x50 ]
tail->previous = head;
200ec68: c4 27 60 54 st %g2, [ %i5 + 0x54 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
200ec6c: c0 27 60 5c clr [ %i5 + 0x5c ]
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
200ec70: 90 16 23 6c or %i0, 0x36c, %o0
tail->previous = head;
200ec74: c2 27 60 60 st %g1, [ %i5 + 0x60 ]
200ec78: 92 10 20 01 mov 1, %o1
200ec7c: 94 10 20 54 mov 0x54, %o2
200ec80: 96 10 20 00 clr %o3
200ec84: 7f ff e8 8e call 2008ebc <rtems_semaphore_create>
200ec88: 98 07 60 28 add %i5, 0x28, %o4
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
200ec8c: 80 a2 20 00 cmp %o0, 0
200ec90: 02 80 00 25 be 200ed24 <rtems_bdbuf_init+0x198> <== ALWAYS TAKEN
200ec94: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
200ec98: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0 <== NOT EXECUTED
200ec9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200eca0: 12 80 00 1e bne 200ed18 <rtems_bdbuf_init+0x18c> <== NOT EXECUTED
200eca4: 01 00 00 00 nop <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
free (bdbuf_cache.buffers);
200eca8: 7f ff d7 6a call 2004a50 <free> <== NOT EXECUTED
200ecac: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
free (bdbuf_cache.groups);
200ecb0: 7f ff d7 68 call 2004a50 <free> <== NOT EXECUTED
200ecb4: d0 07 60 80 ld [ %i5 + 0x80 ], %o0 <== NOT EXECUTED
free (bdbuf_cache.bds);
200ecb8: 7f ff d7 66 call 2004a50 <free> <== NOT EXECUTED
200ecbc: d0 07 60 14 ld [ %i5 + 0x14 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
200ecc0: 7f ff e8 ef call 200907c <rtems_semaphore_delete> <== NOT EXECUTED
200ecc4: d0 07 60 78 ld [ %i5 + 0x78 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
200ecc8: 7f ff e8 ed call 200907c <rtems_semaphore_delete> <== NOT EXECUTED
200eccc: d0 07 60 68 ld [ %i5 + 0x68 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
200ecd0: 7f ff e8 eb call 200907c <rtems_semaphore_delete> <== NOT EXECUTED
200ecd4: d0 07 60 70 ld [ %i5 + 0x70 ], %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
200ecd8: 7f ff e8 e9 call 200907c <rtems_semaphore_delete> <== NOT EXECUTED
200ecdc: d0 07 60 2c ld [ %i5 + 0x2c ], %o0 <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
200ece0: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
200ece4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ece8: 12 80 00 05 bne 200ecfc <rtems_bdbuf_init+0x170> <== NOT EXECUTED
200ecec: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
200ecf0: c0 2f 60 84 clrb [ %i5 + 0x84 ] <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
200ecf4: 81 c7 e0 08 ret <== NOT EXECUTED
200ecf8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
rtems_semaphore_delete (bdbuf_cache.sync_lock);
if (bdbuf_cache.lock != 0)
{
rtems_bdbuf_unlock_cache ();
200ecfc: 7f ff f9 ed call 200d4b0 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200ed00: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
200ed04: 7f ff e8 de call 200907c <rtems_semaphore_delete> <== NOT EXECUTED
200ed08: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
200ed0c: c0 2f 60 84 clrb [ %i5 + 0x84 ] <== NOT EXECUTED
200ed10: 81 c7 e0 08 ret <== NOT EXECUTED
200ed14: 81 e8 00 00 restore <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.swapout != 0)
rtems_task_delete (bdbuf_cache.swapout);
200ed18: 7f ff e9 cf call 2009454 <rtems_task_delete> <== NOT EXECUTED
200ed1c: 01 00 00 00 nop <== NOT EXECUTED
200ed20: 30 bf ff e2 b,a 200eca8 <rtems_bdbuf_init+0x11c> <== NOT EXECUTED
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
goto error;
rtems_bdbuf_lock_cache ();
200ed24: 7f ff f9 5e call 200d29c <rtems_bdbuf_lock_cache>
200ed28: 01 00 00 00 nop
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
200ed2c: 90 16 23 73 or %i0, 0x373, %o0
200ed30: 92 10 20 01 mov 1, %o1
200ed34: 94 10 20 54 mov 0x54, %o2
200ed38: 96 10 20 00 clr %o3
200ed3c: 7f ff e8 60 call 2008ebc <rtems_semaphore_create>
200ed40: 98 07 60 2c add %i5, 0x2c, %o4
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
200ed44: 80 a2 20 00 cmp %o0, 0
200ed48: 12 bf ff d5 bne 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200ed4c: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
200ed50: 90 16 23 61 or %i0, 0x361, %o0
200ed54: 92 10 20 00 clr %o1
200ed58: 94 10 20 24 mov 0x24, %o2
200ed5c: 96 10 20 00 clr %o3
200ed60: 7f ff e8 57 call 2008ebc <rtems_semaphore_create>
200ed64: 98 07 60 68 add %i5, 0x68, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200ed68: 80 a2 20 00 cmp %o0, 0
200ed6c: 12 bf ff cc bne 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200ed70: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
200ed74: 90 16 23 74 or %i0, 0x374, %o0
200ed78: 92 10 20 00 clr %o1
200ed7c: 94 10 20 24 mov 0x24, %o2
200ed80: 96 10 20 00 clr %o3
200ed84: 7f ff e8 4e call 2008ebc <rtems_semaphore_create>
200ed88: 98 07 60 70 add %i5, 0x70, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200ed8c: 80 a2 20 00 cmp %o0, 0
200ed90: 12 bf ff c3 bne 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200ed94: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
200ed98: 90 16 23 62 or %i0, 0x362, %o0
200ed9c: 92 10 20 00 clr %o1
200eda0: 94 10 20 24 mov 0x24, %o2
200eda4: 96 10 20 00 clr %o3
200eda8: 7f ff e8 45 call 2008ebc <rtems_semaphore_create>
200edac: 98 07 60 78 add %i5, 0x78, %o4
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
200edb0: 80 a2 20 00 cmp %o0, 0
200edb4: 32 bf ff ba bne,a 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200edb8: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0 <== NOT EXECUTED
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
200edbc: d0 06 e0 1c ld [ %i3 + 0x1c ], %o0
200edc0: 40 00 35 e7 call 201c55c <.udiv>
200edc4: 92 10 00 1a mov %i2, %o1
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
200edc8: 92 10 00 1a mov %i2, %o1
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
200edcc: b0 10 00 08 mov %o0, %i0
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
200edd0: d0 27 60 1c st %o0, [ %i5 + 0x1c ]
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
200edd4: 40 00 35 e2 call 201c55c <.udiv>
200edd8: 90 10 00 19 mov %i1, %o0
200eddc: 82 10 00 08 mov %o0, %g1
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
200ede0: 90 10 00 18 mov %i0, %o0
200ede4: 92 10 00 01 mov %g1, %o1
200ede8: 40 00 35 dd call 201c55c <.udiv>
200edec: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
200edf0: 92 10 00 18 mov %i0, %o1
*/
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 =
200edf4: d0 27 60 7c st %o0, [ %i5 + 0x7c ]
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
200edf8: b2 10 00 08 mov %o0, %i1
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
200edfc: 7f ff d6 44 call 200470c <calloc>
200ee00: 90 10 20 38 mov 0x38, %o0
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
200ee04: 80 a2 20 00 cmp %o0, 0
200ee08: 02 bf ff a4 be 200ec98 <rtems_bdbuf_init+0x10c> <== NEVER TAKEN
200ee0c: d0 27 60 14 st %o0, [ %i5 + 0x14 ]
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
200ee10: 90 10 20 14 mov 0x14, %o0
200ee14: 7f ff d6 3e call 200470c <calloc>
200ee18: 92 10 00 19 mov %i1, %o1
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
200ee1c: 80 a2 20 00 cmp %o0, 0
200ee20: 02 bf ff 9e be 200ec98 <rtems_bdbuf_init+0x10c> <== NEVER TAKEN
200ee24: d0 27 60 80 st %o0, [ %i5 + 0x80 ]
*
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
cache_aligment,
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
200ee28: 92 10 00 1a mov %i2, %o1
200ee2c: 40 00 35 92 call 201c474 <.umul>
200ee30: 90 10 00 18 mov %i0, %o0
* 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,
200ee34: 92 10 20 20 mov 0x20, %o1
cache_aligment,
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
200ee38: 94 10 00 08 mov %o0, %o2
* 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,
200ee3c: 11 00 80 83 sethi %hi(0x2020c00), %o0
200ee40: 40 00 06 e6 call 20109d8 <rtems_memalign>
200ee44: 90 12 22 fc or %o0, 0x2fc, %o0 ! 2020efc <bdbuf_cache+0x18>
200ee48: 80 a2 20 00 cmp %o0, 0
200ee4c: 12 bf ff 94 bne 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200ee50: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0
/*
* 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,
200ee54: e4 07 60 80 ld [ %i5 + 0x80 ], %l2
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
200ee58: f2 07 60 14 ld [ %i5 + 0x14 ], %i1
200ee5c: e2 07 60 18 ld [ %i5 + 0x18 ], %l1
/*
* 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,
200ee60: a0 10 20 00 clr %l0
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
b < bdbuf_cache.buffer_min_count;
200ee64: b0 10 00 1d mov %i5, %i0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200ee68: a8 07 60 40 add %i5, 0x40, %l4
/*
* 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,
200ee6c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200ee70: 92 10 00 19 mov %i1, %o1
200ee74: 80 a4 00 01 cmp %l0, %g1
200ee78: 1a 80 00 12 bcc 200eec0 <rtems_bdbuf_init+0x334>
200ee7c: 90 10 00 14 mov %l4, %o0
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;
bd->group = group;
200ee80: e4 26 60 28 st %l2, [ %i1 + 0x28 ]
bd->buffer = buffer;
200ee84: e2 26 60 1c st %l1, [ %i1 + 0x1c ]
200ee88: 7f ff eb b6 call 2009d60 <_Chain_Append>
200ee8c: c0 26 60 14 clr [ %i1 + 0x14 ]
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
200ee90: e6 06 20 20 ld [ %i0 + 0x20 ], %l3
200ee94: 90 10 00 10 mov %l0, %o0
200ee98: 92 10 00 13 mov %l3, %o1
200ee9c: 40 00 36 5c call 201c80c <.urem>
200eea0: a6 04 ff ff add %l3, -1, %l3
200eea4: 80 a2 00 13 cmp %o0, %l3
200eea8: 22 80 00 02 be,a 200eeb0 <rtems_bdbuf_init+0x324>
200eeac: a4 04 a0 14 add %l2, 0x14, %l2
* 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)
200eeb0: a0 04 20 01 inc %l0
200eeb4: b2 06 60 38 add %i1, 0x38, %i1
200eeb8: 10 bf ff ed b 200ee6c <rtems_bdbuf_init+0x2e0>
200eebc: a2 04 40 1a add %l1, %i2, %l1
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
200eec0: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
200eec4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
bd = bdbuf_cache.bds;
200eec8: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
b < bdbuf_cache.group_count;
200eecc: f2 06 20 7c ld [ %i0 + 0x7c ], %i1
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
200eed0: 85 29 20 03 sll %g4, 3, %g2
200eed4: b5 29 20 06 sll %g4, 6, %i2
200eed8: b4 26 80 02 sub %i2, %g2, %i2
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
200eedc: 84 10 20 00 clr %g2
200eee0: 80 a0 80 19 cmp %g2, %i1
200eee4: 02 80 00 07 be 200ef00 <rtems_bdbuf_init+0x374>
200eee8: 84 00 a0 01 inc %g2
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
200eeec: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
200eef0: c8 20 60 08 st %g4, [ %g1 + 8 ]
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
200eef4: 82 00 60 14 add %g1, 0x14, %g1
bd += bdbuf_cache.max_bds_per_group)
200eef8: 10 bf ff fa b 200eee0 <rtems_bdbuf_init+0x354>
200eefc: 86 00 c0 1a add %g3, %i2, %g3
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
200ef00: d2 06 e0 08 ld [ %i3 + 8 ], %o1
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
200ef04: 82 10 20 01 mov 1, %g1
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
200ef08: 80 a2 60 00 cmp %o1, 0
200ef0c: 12 80 00 03 bne 200ef18 <rtems_bdbuf_init+0x38c> <== ALWAYS TAKEN
200ef10: c2 2f 60 04 stb %g1, [ %i5 + 4 ]
200ef14: 92 10 20 0f mov 0xf, %o1 <== NOT EXECUTED
200ef18: 11 10 94 d5 sethi %hi(0x42535400), %o0
200ef1c: 15 00 00 08 sethi %hi(0x2000), %o2
200ef20: 90 12 23 50 or %o0, 0x350, %o0
200ef24: 96 10 24 00 mov 0x400, %o3
200ef28: 98 10 20 00 clr %o4
200ef2c: 7f ff e9 00 call 200932c <rtems_task_create>
200ef30: 9a 17 22 e4 or %i4, 0x2e4, %o5
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
200ef34: 80 a2 20 00 cmp %o0, 0
200ef38: 12 bf ff 59 bne 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200ef3c: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
200ef40: 03 00 80 83 sethi %hi(0x2020c00), %g1
200ef44: d0 00 62 e4 ld [ %g1 + 0x2e4 ], %o0 ! 2020ee4 <bdbuf_cache>
200ef48: 94 10 00 1d mov %i5, %o2
200ef4c: 13 00 80 38 sethi %hi(0x200e000), %o1
200ef50: 7f ff e9 83 call 200955c <rtems_task_start>
200ef54: 92 12 61 28 or %o1, 0x128, %o1 ! 200e128 <rtems_bdbuf_swapout_task>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
200ef58: 80 a2 20 00 cmp %o0, 0
200ef5c: 12 bf ff 50 bne 200ec9c <rtems_bdbuf_init+0x110> <== NEVER TAKEN
200ef60: d0 07 22 e4 ld [ %i4 + 0x2e4 ], %o0
goto error;
rtems_bdbuf_unlock_cache ();
200ef64: 7f ff f9 53 call 200d4b0 <rtems_bdbuf_unlock_cache>
200ef68: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
200ef6c: 81 c7 e0 08 ret
200ef70: 81 e8 00 00 restore
0200d29c <rtems_bdbuf_lock_cache>:
/**
* Lock the cache. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_cache (void)
{
200d29c: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_lock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_LOCK);
200d2a0: 03 00 80 83 sethi %hi(0x2020c00), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200d2a4: d0 00 63 0c ld [ %g1 + 0x30c ], %o0 ! 2020f0c <bdbuf_cache+0x28>
200d2a8: 92 10 20 00 clr %o1
200d2ac: 7f ff ef ab call 2009158 <rtems_semaphore_obtain>
200d2b0: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200d2b4: 80 a2 20 00 cmp %o0, 0
200d2b8: 12 80 00 04 bne 200d2c8 <rtems_bdbuf_lock_cache+0x2c> <== NEVER TAKEN
200d2bc: 11 10 80 00 sethi %hi(0x42000000), %o0
200d2c0: 81 c7 e0 08 ret
200d2c4: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200d2c8: 7f ff f1 4e call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d2cc: 90 12 20 0d or %o0, 0xd, %o0 <== NOT EXECUTED
0200d2d4 <rtems_bdbuf_lock_sync>:
/**
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
200d2d4: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BLKDEV_FATAL_BDBUF_SYNC_LOCK);
200d2d8: 03 00 80 83 sethi %hi(0x2020c00), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_obtain (lock,
200d2dc: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 2020f10 <bdbuf_cache+0x2c>
200d2e0: 92 10 20 00 clr %o1
200d2e4: 7f ff ef 9d call 2009158 <rtems_semaphore_obtain>
200d2e8: 94 10 20 00 clr %o2
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
200d2ec: 80 a2 20 00 cmp %o0, 0
200d2f0: 12 80 00 04 bne 200d300 <rtems_bdbuf_lock_sync+0x2c> <== NEVER TAKEN
200d2f4: 11 10 80 00 sethi %hi(0x42000000), %o0
200d2f8: 81 c7 e0 08 ret
200d2fc: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200d300: 7f ff f1 40 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d304: 90 12 20 0b or %o0, 0xb, %o0 <== NOT EXECUTED
0200d748 <rtems_bdbuf_obtain_disk>:
static rtems_status_code
rtems_bdbuf_obtain_disk (const rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
200d748: 9d e3 bf a0 save %sp, -96, %sp
if (!bdbuf_cache.initialised)
200d74c: 3b 00 80 83 sethi %hi(0x2020c00), %i5
200d750: ba 17 62 e4 or %i5, 0x2e4, %i5 ! 2020ee4 <bdbuf_cache>
200d754: c2 0f 60 84 ldub [ %i5 + 0x84 ], %g1
static rtems_status_code
rtems_bdbuf_obtain_disk (const rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
200d758: b8 10 00 18 mov %i0, %i4
if (!bdbuf_cache.initialised)
200d75c: 80 a0 60 00 cmp %g1, 0
200d760: 12 80 00 04 bne 200d770 <rtems_bdbuf_obtain_disk+0x28> <== ALWAYS TAKEN
200d764: b0 10 20 16 mov 0x16, %i0
*bds_per_group_ptr = bds_per_group;
}
return RTEMS_SUCCESSFUL;
}
200d768: 81 c7 e0 08 ret
200d76c: 81 e8 00 00 restore
size_t *bds_per_group_ptr)
{
if (!bdbuf_cache.initialised)
return RTEMS_NOT_CONFIGURED;
if (media_block_ptr != NULL)
200d770: 80 a6 a0 00 cmp %i2, 0
200d774: 02 80 00 10 be 200d7b4 <rtems_bdbuf_obtain_disk+0x6c>
200d778: 90 10 20 00 clr %o0
rtems_bdbuf_media_block (rtems_blkdev_bnum block,
size_t block_size,
size_t media_block_size)
{
return (rtems_blkdev_bnum)
((((uint64_t) block) * block_size) / media_block_size);
200d77c: d6 07 20 20 ld [ %i4 + 0x20 ], %o3
200d780: 94 10 20 00 clr %o2
200d784: 40 00 3c ce call 201cabc <__muldi3>
200d788: 92 10 00 19 mov %i1, %o1
200d78c: d6 07 20 24 ld [ %i4 + 0x24 ], %o3
200d790: 40 00 3e d7 call 201d2ec <__udivdi3>
200d794: 94 10 20 00 clr %o2
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
200d798: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
200d79c: 80 a0 40 09 cmp %g1, %o1
200d7a0: 08 bf ff f2 bleu 200d768 <rtems_bdbuf_obtain_disk+0x20> <== NEVER TAKEN
200d7a4: b0 10 20 0a mov 0xa, %i0
{
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
200d7a8: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
200d7ac: 92 02 40 01 add %o1, %g1, %o1
200d7b0: d2 26 80 00 st %o1, [ %i2 ]
}
if (bds_per_group_ptr != NULL)
200d7b4: 80 a6 e0 00 cmp %i3, 0
200d7b8: 02 bf ff ec be 200d768 <rtems_bdbuf_obtain_disk+0x20>
200d7bc: b0 10 20 00 clr %i0
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
200d7c0: d0 07 20 20 ld [ %i4 + 0x20 ], %o0
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
200d7c4: 03 00 80 79 sethi %hi(0x201e400), %g1
200d7c8: 82 10 61 f0 or %g1, 0x1f0, %g1 ! 201e5f0 <rtems_bdbuf_configuration>
200d7cc: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200d7d0: 80 a2 00 02 cmp %o0, %g2
200d7d4: 18 bf ff e5 bgu 200d768 <rtems_bdbuf_obtain_disk+0x20> <== NEVER TAKEN
200d7d8: b0 10 20 0a mov 0xa, %i0
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
200d7dc: d2 00 60 20 ld [ %g1 + 0x20 ], %o1
200d7e0: 40 00 3b 5f call 201c55c <.udiv>
200d7e4: 90 02 3f ff add %o0, -1, %o0
200d7e8: 90 02 20 01 inc %o0
for (bds_per_size = 1;
200d7ec: 80 a2 20 01 cmp %o0, 1
200d7f0: 08 80 00 06 bleu 200d808 <rtems_bdbuf_obtain_disk+0xc0>
200d7f4: 92 10 20 01 mov 1, %o1
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
200d7f8: 93 2a 60 01 sll %o1, 1, %o1
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
200d7fc: 80 a2 00 09 cmp %o0, %o1
200d800: 38 bf ff ff bgu,a 200d7fc <rtems_bdbuf_obtain_disk+0xb4> <== NEVER TAKEN
200d804: 93 2a 60 01 sll %o1, 1, %o1 <== NOT EXECUTED
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
200d808: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
200d80c: 40 00 3b 54 call 201c55c <.udiv>
200d810: b0 10 20 0a mov 0xa, %i0
if (bds_per_group_ptr != NULL)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (dd->block_size);
if (bds_per_group == 0)
200d814: 80 a2 20 00 cmp %o0, 0
200d818: 02 bf ff d4 be 200d768 <rtems_bdbuf_obtain_disk+0x20> <== NEVER TAKEN
200d81c: 01 00 00 00 nop
{
return RTEMS_INVALID_NUMBER;
}
*bds_per_group_ptr = bds_per_group;
200d820: d0 26 c0 00 st %o0, [ %i3 ]
}
return RTEMS_SUCCESSFUL;
}
200d824: 81 c7 e0 08 ret
200d828: 91 e8 20 00 restore %g0, 0, %o0
0200f5e8 <rtems_bdbuf_purge_dev>:
}
}
void
rtems_bdbuf_purge_dev (const rtems_disk_device *dd)
{
200f5e8: 9d e3 bf 10 save %sp, -240, %sp
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200f5ec: 82 07 bf f8 add %fp, -8, %g1
200f5f0: b8 07 bf f4 add %fp, -12, %i4
head->previous = NULL;
200f5f4: c0 27 bf f8 clr [ %fp + -8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200f5f8: c2 27 bf f4 st %g1, [ %fp + -12 ]
head->previous = NULL;
tail->previous = head;
200f5fc: f8 27 bf fc st %i4, [ %fp + -4 ]
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
200f600: 7f ff f7 27 call 200d29c <rtems_bdbuf_lock_cache>
200f604: 33 00 80 83 sethi %hi(0x2020c00), %i1
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;
200f608: b2 16 62 e4 or %i1, 0x2e4, %i1 ! 2020ee4 <bdbuf_cache>
200f60c: fa 06 60 3c ld [ %i1 + 0x3c ], %i5
*prev = NULL;
200f610: c0 27 bf 74 clr [ %fp + -140 ]
while (cur != NULL)
200f614: 80 a7 60 00 cmp %i5, 0
200f618: 02 80 00 2f be 200f6d4 <rtems_bdbuf_purge_dev+0xec>
200f61c: b6 07 bf 74 add %fp, -140, %i3
{
if (cur->dd == dd)
{
switch (cur->state)
200f620: 35 00 80 34 sethi %hi(0x200d000), %i2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f624: a2 10 20 06 mov 6, %l1
while (cur != NULL)
{
if (cur->dd == dd)
{
switch (cur->state)
200f628: b4 16 a2 70 or %i2, 0x270, %i2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f62c: a0 10 20 0a mov 0xa, %l0
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);
200f630: 10 80 00 09 b 200f654 <rtems_bdbuf_purge_dev+0x6c>
200f634: b2 06 60 6c add %i1, 0x6c, %i1
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200f638: c2 07 60 08 ld [ %i5 + 8 ], %g1
200f63c: 80 a0 60 00 cmp %g1, 0
200f640: 22 80 00 10 be,a 200f680 <rtems_bdbuf_purge_dev+0x98>
200f644: c2 07 60 0c ld [ %i5 + 0xc ], %g1
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
*prev = cur;
200f648: fa 26 e0 04 st %i5, [ %i3 + 4 ]
200f64c: ba 10 00 01 mov %g1, %i5
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
200f650: b6 06 e0 04 add %i3, 4, %i3
*prev = NULL;
while (cur != NULL)
{
if (cur->dd == dd)
200f654: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200f658: 80 a6 00 01 cmp %i0, %g1
200f65c: 32 bf ff f8 bne,a 200f63c <rtems_bdbuf_purge_dev+0x54> <== NEVER TAKEN
200f660: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
{
switch (cur->state)
200f664: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200f668: 80 a0 60 0a cmp %g1, 0xa
200f66c: 28 80 00 39 bleu,a 200f750 <rtems_bdbuf_purge_dev+0x168> <== ALWAYS TAKEN
200f670: 83 28 60 02 sll %g1, 2, %g1
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
200f674: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200f678: 7f ff e8 62 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200f67c: 90 12 20 01 or %o0, 1, %o0 ! 42000001 <RAM_END+0x3fc00001><== NOT EXECUTED
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
200f680: 80 a0 60 00 cmp %g1, 0
200f684: 32 bf ff f2 bne,a 200f64c <rtems_bdbuf_purge_dev+0x64>
200f688: fa 26 e0 04 st %i5, [ %i3 + 4 ]
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
200f68c: c4 06 c0 00 ld [ %i3 ], %g2
200f690: 80 a0 a0 00 cmp %g2, 0
200f694: 22 80 00 11 be,a 200f6d8 <rtems_bdbuf_purge_dev+0xf0>
200f698: 31 00 80 83 sethi %hi(0x2020c00), %i0
200f69c: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
200f6a0: 80 a7 40 03 cmp %i5, %g3
200f6a4: 22 80 00 09 be,a 200f6c8 <rtems_bdbuf_purge_dev+0xe0>
200f6a8: c2 06 ff fc ld [ %i3 + -4 ], %g1
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200f6ac: 10 80 00 44 b 200f7bc <rtems_bdbuf_purge_dev+0x1d4>
200f6b0: 80 a0 e0 00 cmp %g3, 0
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
200f6b4: 80 a0 c0 02 cmp %g3, %g2
200f6b8: 12 80 00 40 bne 200f7b8 <rtems_bdbuf_purge_dev+0x1d0>
200f6bc: b6 06 ff fc add %i3, -4, %i3
200f6c0: 84 10 00 01 mov %g1, %g2
200f6c4: c2 06 ff fc ld [ %i3 + -4 ], %g1
200f6c8: 80 a0 60 00 cmp %g1, 0
200f6cc: 32 bf ff fa bne,a 200f6b4 <rtems_bdbuf_purge_dev+0xcc>
200f6d0: c6 00 60 0c ld [ %g1 + 0xc ], %g3
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200f6d4: 31 00 80 83 sethi %hi(0x2020c00), %i0
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
wake_buffer_waiters = true;
200f6d8: b6 10 20 00 clr %i3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f6dc: ba 10 20 01 mov 1, %i5
200f6e0: b0 16 23 24 or %i0, 0x324, %i0
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200f6e4: 7f ff e9 aa call 2009d8c <_Chain_Get>
200f6e8: 90 10 00 1c mov %i4, %o0
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
200f6ec: b4 92 20 00 orcc %o0, 0, %i2
200f6f0: 02 80 00 12 be 200f738 <rtems_bdbuf_purge_dev+0x150>
200f6f4: 80 8e e0 ff btst 0xff, %i3
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
200f6f8: c2 06 a0 24 ld [ %i2 + 0x24 ], %g1
200f6fc: 80 a0 60 00 cmp %g1, 0
200f700: 12 bf ff f9 bne 200f6e4 <rtems_bdbuf_purge_dev+0xfc>
200f704: fa 26 a0 20 st %i5, [ %i2 + 0x20 ]
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
200f708: 7f ff f8 96 call 200d960 <rtems_bdbuf_remove_from_tree>
200f70c: b6 10 20 01 mov 1, %i3
200f710: 92 10 00 1a mov %i2, %o1
200f714: 90 10 00 18 mov %i0, %o0
200f718: 40 00 07 ba call 2011600 <_Chain_Insert>
200f71c: c0 26 a0 20 clr [ %i2 + 0x20 ]
200f720: 7f ff e9 9b call 2009d8c <_Chain_Get>
200f724: 90 10 00 1c mov %i4, %o0
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get (purge_list)) != NULL)
200f728: b4 92 20 00 orcc %o0, 0, %i2
200f72c: 32 bf ff f4 bne,a 200f6fc <rtems_bdbuf_purge_dev+0x114>
200f730: c2 06 a0 24 ld [ %i2 + 0x24 ], %g1
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
200f734: 80 8e e0 ff btst 0xff, %i3
200f738: 12 80 00 16 bne 200f790 <rtems_bdbuf_purge_dev+0x1a8>
200f73c: 11 00 80 83 sethi %hi(0x2020c00), %o0
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, dd);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
200f740: 7f ff f7 5c call 200d4b0 <rtems_bdbuf_unlock_cache>
200f744: 01 00 00 00 nop
}
200f748: 81 c7 e0 08 ret
200f74c: 81 e8 00 00 restore
while (cur != NULL)
{
if (cur->dd == dd)
{
switch (cur->state)
200f750: c2 06 80 01 ld [ %i2 + %g1 ], %g1
200f754: 81 c0 40 00 jmp %g1
200f758: 01 00 00 00 nop
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);
200f75c: 7f ff f8 34 call 200d82c <rtems_bdbuf_wake>
200f760: 90 10 00 19 mov %i1, %o0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200f764: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200f768: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200f76c: 84 00 bf ff add %g2, -1, %g2
200f770: c4 20 60 0c st %g2, [ %g1 + 0xc ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200f774: 40 00 07 9a call 20115dc <_Chain_Extract>
200f778: 90 10 00 1d mov %i5, %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200f77c: 90 10 00 1c mov %i4, %o0
200f780: 7f ff e9 78 call 2009d60 <_Chain_Append>
200f784: 92 10 00 1d mov %i5, %o1
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
200f788: 10 bf ff ad b 200f63c <rtems_bdbuf_purge_dev+0x54>
200f78c: c2 07 60 08 ld [ %i5 + 8 ], %g1
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200f790: 7f ff f8 27 call 200d82c <rtems_bdbuf_wake>
200f794: 90 12 23 58 or %o0, 0x358, %o0
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_gather_for_purge (&purge_list, dd);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
200f798: 7f ff f7 46 call 200d4b0 <rtems_bdbuf_unlock_cache>
200f79c: 01 00 00 00 nop
}
200f7a0: 81 c7 e0 08 ret
200f7a4: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f7a8: 10 bf ff a4 b 200f638 <rtems_bdbuf_purge_dev+0x50>
200f7ac: e2 27 60 20 st %l1, [ %i5 + 0x20 ]
200f7b0: 10 bf ff a2 b 200f638 <rtems_bdbuf_purge_dev+0x50>
200f7b4: e0 27 60 20 st %l0, [ %i5 + 0x20 ]
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
200f7b8: 80 a0 e0 00 cmp %g3, 0
200f7bc: 22 bf ff c7 be,a 200f6d8 <rtems_bdbuf_purge_dev+0xf0> <== NEVER TAKEN
200f7c0: 31 00 80 83 sethi %hi(0x2020c00), %i0 <== NOT EXECUTED
200f7c4: 10 bf ff a4 b 200f654 <rtems_bdbuf_purge_dev+0x6c>
200f7c8: ba 10 00 03 mov %g3, %i5
0200f020 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (const rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
200f020: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
200f024: c0 27 bf f8 clr [ %fp + -8 ]
size_t bds_per_group = 0;
200f028: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_bdbuf_obtain_disk (dd, block, &media_block, &bds_per_group);
200f02c: 90 10 00 18 mov %i0, %o0
200f030: 92 10 00 19 mov %i1, %o1
200f034: 94 07 bf f8 add %fp, -8, %o2
200f038: 7f ff f9 c4 call 200d748 <rtems_bdbuf_obtain_disk>
200f03c: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL)
200f040: ba 92 20 00 orcc %o0, 0, %i5
200f044: 02 80 00 04 be 200f054 <rtems_bdbuf_read+0x34> <== ALWAYS TAKEN
200f048: 03 00 80 79 sethi %hi(0x201e400), %g1
*bd_ptr = NULL;
rtems_bdbuf_unlock_cache ();
return sc;
}
200f04c: 81 c7 e0 08 ret <== NOT EXECUTED
200f050: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
/*
* 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) +
200f054: e2 00 61 f0 ld [ %g1 + 0x1f0 ], %l1
200f058: a2 04 60 01 inc %l1
200f05c: 83 2c 60 04 sll %l1, 4, %g1
200f060: 82 00 60 20 add %g1, 0x20, %g1
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dd->dev);
rtems_bdbuf_lock_cache ();
200f064: 7f ff f8 8e call 200d29c <rtems_bdbuf_lock_cache>
200f068: 9c 23 80 01 sub %sp, %g1, %sp
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200f06c: d2 06 20 24 ld [ %i0 + 0x24 ], %o1
200f070: e4 06 20 20 ld [ %i0 + 0x20 ], %l2
/*
* 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) +
200f074: b6 03 a0 60 add %sp, 0x60, %i3
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200f078: 40 00 35 39 call 201c55c <.udiv>
200f07c: 90 10 00 12 mov %l2, %o0
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
200f080: 03 00 80 35 sethi %hi(0x200d400), %g1
200f084: 82 10 61 44 or %g1, 0x144, %g1 ! 200d544 <rtems_bdbuf_transfer_done>
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
200f088: e8 1e 20 18 ldd [ %i0 + 0x18 ], %l4
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dd->dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
200f08c: f8 07 bf f8 ld [ %fp + -8 ], %i4
200f090: e6 07 bf fc ld [ %fp + -4 ], %l3
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
200f094: c2 26 e0 04 st %g1, [ %i3 + 4 ]
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
200f098: a0 10 00 08 mov %o0, %l0
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
200f09c: c0 26 c0 00 clr [ %i3 ]
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
200f0a0: 40 00 08 7a call 2011288 <rtems_task_self>
200f0a4: f6 26 e0 08 st %i3, [ %i3 + 8 ]
req->status = RTEMS_RESOURCE_IN_USE;
200f0a8: 82 10 20 0c mov 0xc, %g1
transfer_count = media_block_end - media_block;
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
200f0ac: d0 26 e0 14 st %o0, [ %i3 + 0x14 ]
req->status = RTEMS_RESOURCE_IN_USE;
200f0b0: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block, bds_per_group);
200f0b4: 92 10 00 1c mov %i4, %o1
req->req = RTEMS_BLKDEV_REQ_READ;
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
200f0b8: c0 26 e0 10 clr [ %i3 + 0x10 ]
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block, bds_per_group);
200f0bc: 90 10 00 18 mov %i0, %o0
200f0c0: 7f ff fe 28 call 200e960 <rtems_bdbuf_get_buffer_for_access>
200f0c4: 94 10 00 13 mov %l3, %o2
*bd_ptr = bd;
req->bufs [0].user = bd;
200f0c8: d0 26 e0 24 st %o0, [ %i3 + 0x24 ]
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
200f0cc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
req->done_arg = req;
req->io_task = rtems_task_self ();
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block, bds_per_group);
200f0d0: b2 10 00 08 mov %o0, %i1
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200f0d4: d0 02 20 20 ld [ %o0 + 0x20 ], %o0
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
200f0d8: f8 26 e0 18 st %i4, [ %i3 + 0x18 ]
req->bufs [0].length = block_size;
200f0dc: e4 26 e0 1c st %l2, [ %i3 + 0x1c ]
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200f0e0: 80 a2 20 02 cmp %o0, 2
200f0e4: 02 80 00 09 be 200f108 <rtems_bdbuf_read+0xe8>
200f0e8: c2 26 e0 20 st %g1, [ %i3 + 0x20 ]
200f0ec: 80 a2 20 07 cmp %o0, 7
200f0f0: 02 80 00 06 be 200f108 <rtems_bdbuf_read+0xe8>
200f0f4: 80 a2 20 01 cmp %o0, 1
200f0f8: 02 80 00 10 be 200f138 <rtems_bdbuf_read+0x118> <== ALWAYS TAKEN
200f0fc: 13 10 80 00 sethi %hi(0x42000000), %o1
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
200f100: 7f ff f8 83 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200f104: 92 12 60 1d or %o1, 0x1d, %o1 ! 4200001d <RAM_END+0x3fc0001d><== NOT EXECUTED
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200f108: e8 06 e0 10 ld [ %i3 + 0x10 ], %l4
media_block + dd->start, block, (unsigned) dd->dev);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
200f10c: 80 a5 20 00 cmp %l4, 0
200f110: 12 80 00 4c bne 200f240 <rtems_bdbuf_read+0x220>
200f114: 90 10 00 18 mov %i0, %o0
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
200f118: d0 06 60 20 ld [ %i1 + 0x20 ], %o0
200f11c: 80 a2 20 02 cmp %o0, 2
200f120: 02 80 00 5a be 200f288 <rtems_bdbuf_read+0x268>
200f124: 80 a2 20 07 cmp %o0, 7
200f128: 02 80 00 52 be 200f270 <rtems_bdbuf_read+0x250> <== ALWAYS TAKEN
200f12c: 13 10 80 00 sethi %hi(0x42000000), %o1
break;
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4);
200f130: 7f ff f8 77 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200f134: 92 12 60 02 or %o1, 2, %o1 ! 42000002 <RAM_END+0x3fc00002><== NOT EXECUTED
size_t bds_per_group,
rtems_blkdev_request *req,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
200f138: a8 05 40 14 add %l5, %l4, %l4
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
uint32_t transfer_count = bdbuf_config.max_read_ahead_blocks + 1;
if (media_block_end - media_block < transfer_count)
200f13c: ac 25 00 1c sub %l4, %i4, %l6
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
200f140: 80 a5 80 11 cmp %l6, %l1
200f144: 38 80 00 02 bgu,a 200f14c <rtems_bdbuf_read+0x12c>
200f148: ac 10 00 11 mov %l1, %l6
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f14c: 82 10 20 09 mov 9, %g1
200f150: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200f154: 80 a5 a0 01 cmp %l6, 1
200f158: 08 80 00 2e bleu 200f210 <rtems_bdbuf_read+0x1f0>
200f15c: a8 10 20 01 mov 1, %l4
200f160: 23 00 80 83 sethi %hi(0x2020c00), %l1
return;
case RTEMS_BDBUF_STATE_EMPTY:
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
200f164: aa 10 00 1b mov %i3, %l5
{
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block_end = dd->start + dd->size;
rtems_blkdev_bnum media_block_count = dd->block_size / dd->media_block_size;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
200f168: a8 10 20 01 mov 1, %l4
200f16c: a2 14 62 e4 or %l1, 0x2e4, %l1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f170: ae 10 20 09 mov 9, %l7
rtems_blkdev_bnum block,
size_t bds_per_group)
{
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
200f174: c2 04 60 3c ld [ %l1 + 0x3c ], %g1
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
200f178: 80 a0 60 00 cmp %g1, 0
200f17c: 02 80 00 10 be 200f1bc <rtems_bdbuf_read+0x19c> <== NEVER TAKEN
200f180: b8 07 00 10 add %i4, %l0, %i4
200f184: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200f188: 80 a6 00 02 cmp %i0, %g2
200f18c: 22 80 00 28 be,a 200f22c <rtems_bdbuf_read+0x20c> <== ALWAYS TAKEN
200f190: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
{
if (((uintptr_t) p->dd < (uintptr_t) dd)
200f194: 80 a0 80 18 cmp %g2, %i0 <== NOT EXECUTED
200f198: 2a 80 00 06 bcs,a 200f1b0 <rtems_bdbuf_read+0x190> <== NEVER TAKEN
200f19c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 <== NOT EXECUTED
|| ((p->dd == dd) && (p->block < block)))
200f1a0: 80 a6 00 02 cmp %i0, %g2
200f1a4: 22 80 00 1d be,a 200f218 <rtems_bdbuf_read+0x1f8> <== ALWAYS TAKEN
200f1a8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
{
p = p->avl.right;
}
else
{
p = p->avl.left;
200f1ac: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
200f1b0: 80 a0 60 00 cmp %g1, 0
200f1b4: 32 bf ff f5 bne,a 200f188 <rtems_bdbuf_read+0x168> <== NEVER TAKEN
200f1b8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 <== NOT EXECUTED
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
if (bd == NULL)
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block, bds_per_group);
200f1bc: 90 10 00 18 mov %i0, %o0
200f1c0: 92 10 00 1c mov %i4, %o1
200f1c4: 7f ff fc e3 call 200e550 <rtems_bdbuf_get_buffer_from_lru_list>
200f1c8: 94 10 00 13 mov %l3, %o2
if (bd != NULL)
200f1cc: 80 a2 20 00 cmp %o0, 0
200f1d0: 22 bf ff cf be,a 200f10c <rtems_bdbuf_read+0xec> <== ALWAYS TAKEN
200f1d4: e8 26 e0 10 st %l4, [ %i3 + 0x10 ]
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f1d8: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
200f1dc: a8 05 20 01 inc %l4 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f1e0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200f1e4: 80 a5 00 16 cmp %l4, %l6 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f1e8: 84 00 a0 01 inc %g2 <== NOT EXECUTED
200f1ec: c4 20 60 0c st %g2, [ %g1 + 0xc ] <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f1f0: ee 22 20 20 st %l7, [ %o0 + 0x20 ] <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
200f1f4: d0 25 60 34 st %o0, [ %l5 + 0x34 ] <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
200f1f8: f8 25 60 28 st %i4, [ %l5 + 0x28 ] <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
200f1fc: e4 25 60 2c st %l2, [ %l5 + 0x2c ] <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
200f200: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED
200f204: c2 25 60 30 st %g1, [ %l5 + 0x30 ] <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
200f208: 12 bf ff db bne 200f174 <rtems_bdbuf_read+0x154> <== NOT EXECUTED
200f20c: aa 05 60 10 add %l5, 0x10, %l5 <== NOT EXECUTED
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
200f210: 10 bf ff bf b 200f10c <rtems_bdbuf_read+0xec>
200f214: e8 26 e0 10 st %l4, [ %i3 + 0x10 ]
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
{
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
200f218: 80 a7 00 02 cmp %i4, %g2
200f21c: 28 bf ff e5 bleu,a 200f1b0 <rtems_bdbuf_read+0x190> <== NEVER TAKEN
200f220: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
{
p = p->avl.right;
200f224: 10 bf ff e3 b 200f1b0 <rtems_bdbuf_read+0x190>
200f228: c2 00 60 0c ld [ %g1 + 0xc ], %g1
const rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dd != dd) || (p->block != block)))
200f22c: 80 a7 00 03 cmp %i4, %g3
200f230: 12 bf ff da bne 200f198 <rtems_bdbuf_read+0x178> <== ALWAYS TAKEN
200f234: 80 a0 80 18 cmp %g2, %i0
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
200f238: 10 bf ff b5 b 200f10c <rtems_bdbuf_read+0xec> <== NOT EXECUTED
200f23c: e8 26 e0 10 st %l4, [ %i3 + 0x10 ] <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
if (req->bufnum > 0)
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
200f240: 92 10 00 1b mov %i3, %o1
200f244: 7f ff fa ea call 200ddec <rtems_bdbuf_execute_transfer_request>
200f248: 94 10 20 01 mov 1, %o2
if (sc == RTEMS_SUCCESSFUL)
200f24c: 80 a2 20 00 cmp %o0, 0
200f250: 02 80 00 12 be 200f298 <rtems_bdbuf_read+0x278>
200f254: 01 00 00 00 nop
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
200f258: c0 26 80 00 clr [ %i2 ]
rtems_bdbuf_unlock_cache ();
200f25c: 7f ff f8 95 call 200d4b0 <rtems_bdbuf_unlock_cache>
200f260: ba 10 00 08 mov %o0, %i5
return sc;
}
200f264: b0 10 00 1d mov %i5, %i0
200f268: 81 c7 e0 08 ret
200f26c: 81 e8 00 00 restore
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f270: 82 10 20 04 mov 4, %g1
200f274: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
200f278: f2 26 80 00 st %i1, [ %i2 ]
}
else
*bd_ptr = NULL;
rtems_bdbuf_unlock_cache ();
200f27c: 7f ff f8 8d call 200d4b0 <rtems_bdbuf_unlock_cache>
200f280: b0 10 00 1d mov %i5, %i0
200f284: 30 bf ff f9 b,a 200f268 <rtems_bdbuf_read+0x248>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f288: 82 10 20 03 mov 3, %g1
200f28c: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
200f290: 10 bf ff fb b 200f27c <rtems_bdbuf_read+0x25c>
200f294: f2 26 80 00 st %i1, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200f298: 40 00 08 d1 call 20115dc <_Chain_Extract>
200f29c: 90 10 00 19 mov %i1, %o0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
200f2a0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
200f2a4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200f2a8: 84 00 a0 01 inc %g2
200f2ac: 10 bf ff 9b b 200f118 <rtems_bdbuf_read+0xf8>
200f2b0: c4 20 60 0c st %g2, [ %g1 + 0xc ]
0200f2b4 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
200f2b4: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200f2b8: 3b 00 80 83 sethi %hi(0x2020c00), %i5
200f2bc: ba 17 62 e4 or %i5, 0x2e4, %i5 ! 2020ee4 <bdbuf_cache>
200f2c0: c2 0f 60 84 ldub [ %i5 + 0x84 ], %g1
200f2c4: 80 a0 60 00 cmp %g1, 0
200f2c8: 02 80 00 15 be 200f31c <rtems_bdbuf_release+0x68> <== NEVER TAKEN
200f2cc: 84 10 20 16 mov 0x16, %g2
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200f2d0: 80 a6 20 00 cmp %i0, 0
200f2d4: 02 80 00 14 be 200f324 <rtems_bdbuf_release+0x70> <== NEVER TAKEN
200f2d8: 84 10 20 09 mov 9, %g2
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
200f2dc: 7f ff f7 f0 call 200d29c <rtems_bdbuf_lock_cache>
200f2e0: 01 00 00 00 nop
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200f2e4: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200f2e8: 80 a2 20 04 cmp %o0, 4
200f2ec: 02 80 00 14 be 200f33c <rtems_bdbuf_release+0x88>
200f2f0: 01 00 00 00 nop
200f2f4: 08 80 00 0e bleu 200f32c <rtems_bdbuf_release+0x78>
200f2f8: 80 a2 20 03 cmp %o0, 3
200f2fc: 80 a2 20 06 cmp %o0, 6
200f300: 18 80 00 0d bgu 200f334 <rtems_bdbuf_release+0x80> <== NEVER TAKEN
200f304: 13 10 80 00 sethi %hi(0x42000000), %o1
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);
200f308: 7f ff fa 9e call 200dd80 <rtems_bdbuf_discard_buffer_after_access>
200f30c: 90 10 00 18 mov %i0, %o0
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
200f310: 7f ff f8 68 call 200d4b0 <rtems_bdbuf_unlock_cache>
200f314: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
200f318: 84 10 20 00 clr %g2 ! 0 <PROM_START>
}
200f31c: 81 c7 e0 08 ret
200f320: 91 e8 00 02 restore %g0, %g2, %o0
200f324: 81 c7 e0 08 ret <== NOT EXECUTED
200f328: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200f32c: 02 80 00 07 be 200f348 <rtems_bdbuf_release+0x94> <== ALWAYS TAKEN
200f330: 13 10 80 00 sethi %hi(0x42000000), %o1
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
200f334: 7f ff f7 f6 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200f338: 92 12 60 1c or %o1, 0x1c, %o1 ! 4200001c <RAM_END+0x3fc0001c><== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
200f33c: 7f ff f9 4b call 200d868 <rtems_bdbuf_add_to_modified_list_after_access>
200f340: 90 10 00 18 mov %i0, %o0
break;
200f344: 30 bf ff f3 b,a 200f310 <rtems_bdbuf_release+0x5c>
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
200f348: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200f34c: 90 07 60 40 add %i5, 0x40, %o0
200f350: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200f354: 92 10 00 18 mov %i0, %o1
200f358: 84 00 bf ff add %g2, -1, %g2
200f35c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f360: 82 10 20 02 mov 2, %g1
200f364: 7f ff ea 7f call 2009d60 <_Chain_Append>
200f368: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
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)
200f36c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200f370: 80 a0 60 00 cmp %g1, 0
200f374: 02 80 00 05 be 200f388 <rtems_bdbuf_release+0xd4>
200f378: 01 00 00 00 nop
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200f37c: 7f ff f9 2c call 200d82c <rtems_bdbuf_wake>
200f380: 90 07 60 64 add %i5, 0x64, %o0
200f384: 30 bf ff e3 b,a 200f310 <rtems_bdbuf_release+0x5c>
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200f388: 7f ff f9 29 call 200d82c <rtems_bdbuf_wake>
200f38c: 90 07 60 74 add %i5, 0x74, %o0
200f390: 30 bf ff e0 b,a 200f310 <rtems_bdbuf_release+0x5c>
0200f394 <rtems_bdbuf_release_modified>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
200f394: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200f398: 03 00 80 83 sethi %hi(0x2020c00), %g1
200f39c: c2 08 63 68 ldub [ %g1 + 0x368 ], %g1 ! 2020f68 <bdbuf_cache+0x84>
200f3a0: 80 a0 60 00 cmp %g1, 0
200f3a4: 02 80 00 17 be 200f400 <rtems_bdbuf_release_modified+0x6c><== NEVER TAKEN
200f3a8: 84 10 20 16 mov 0x16, %g2
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200f3ac: 80 a6 20 00 cmp %i0, 0
200f3b0: 02 80 00 16 be 200f408 <rtems_bdbuf_release_modified+0x74><== NEVER TAKEN
200f3b4: 84 10 20 09 mov 9, %g2
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
200f3b8: 7f ff f7 b9 call 200d29c <rtems_bdbuf_lock_cache>
200f3bc: 01 00 00 00 nop
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200f3c0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200f3c4: 80 a2 20 03 cmp %o0, 3
200f3c8: 0a 80 00 07 bcs 200f3e4 <rtems_bdbuf_release_modified+0x50><== NEVER TAKEN
200f3cc: 13 10 80 00 sethi %hi(0x42000000), %o1
200f3d0: 80 a2 20 05 cmp %o0, 5
200f3d4: 08 80 00 0f bleu 200f410 <rtems_bdbuf_release_modified+0x7c>
200f3d8: 80 a2 20 06 cmp %o0, 6
200f3dc: 02 80 00 04 be 200f3ec <rtems_bdbuf_release_modified+0x58><== ALWAYS TAKEN
200f3e0: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
200f3e4: 7f ff f7 ca call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200f3e8: 92 12 60 04 or %o1, 4, %o1 <== NOT EXECUTED
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
200f3ec: 7f ff fa 65 call 200dd80 <rtems_bdbuf_discard_buffer_after_access>
200f3f0: 90 10 00 18 mov %i0, %o0
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
200f3f4: 7f ff f8 2f call 200d4b0 <rtems_bdbuf_unlock_cache>
200f3f8: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
200f3fc: 84 10 20 00 clr %g2 ! 0 <PROM_START>
}
200f400: 81 c7 e0 08 ret
200f404: 91 e8 00 02 restore %g0, %g2, %o0
200f408: 81 c7 e0 08 ret <== NOT EXECUTED
200f40c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
switch (bd->state)
{
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);
200f410: 7f ff f9 16 call 200d868 <rtems_bdbuf_add_to_modified_list_after_access>
200f414: 90 10 00 18 mov %i0, %o0
break;
200f418: 30 bf ff f7 b,a 200f3f4 <rtems_bdbuf_release_modified+0x60>
0200d960 <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
200d960: 9d e3 bf 20 save %sp, -224, %sp
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
200d964: 39 00 80 83 sethi %hi(0x2020c00), %i4
200d968: b8 17 22 e4 or %i4, 0x2e4, %i4 ! 2020ee4 <bdbuf_cache>
200d96c: fa 07 20 3c ld [ %i4 + 0x3c ], %i5
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));
200d970: b4 07 bf 80 add %fp, -128, %i2
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
200d974: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
rtems_blkdev_bnum block = node->block;
200d978: f2 06 20 18 ld [ %i0 + 0x18 ], %i1
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));
200d97c: 90 10 00 1a mov %i2, %o0
200d980: 92 10 20 00 clr %o1
200d984: 40 00 19 e2 call 201410c <memset>
200d988: 94 10 20 80 mov 0x80, %o2
while (p != NULL)
200d98c: 80 a7 60 00 cmp %i5, 0
200d990: 02 80 00 1c be 200da00 <rtems_bdbuf_remove_from_tree+0xa0><== NEVER TAKEN
200d994: 82 10 00 1a mov %i2, %g1
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
200d998: c6 07 60 14 ld [ %i5 + 0x14 ], %g3
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200d99c: fa 20 40 00 st %i5, [ %g1 ]
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
200d9a0: 88 10 20 01 mov 1, %g4
p = p->avl.right;
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
200d9a4: 9e 10 3f ff mov -1, %o7
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
200d9a8: 80 a0 c0 1b cmp %g3, %i3
200d9ac: 0a 80 00 10 bcs 200d9ec <rtems_bdbuf_remove_from_tree+0x8c><== NEVER TAKEN
200d9b0: 84 00 60 04 add %g1, 4, %g2
|| ((p->dd == dd) && (p->block < block)))
200d9b4: 80 a6 c0 03 cmp %i3, %g3
200d9b8: 22 80 00 16 be,a 200da10 <rtems_bdbuf_remove_from_tree+0xb0><== ALWAYS TAKEN
200d9bc: c6 07 60 18 ld [ %i5 + 0x18 ], %g3
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
200d9c0: de 2f 60 10 stb %o7, [ %i5 + 0x10 ] <== NOT EXECUTED
p = p->avl.left;
200d9c4: fa 07 60 08 ld [ %i5 + 8 ], %i5
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
200d9c8: 80 a7 60 00 cmp %i5, 0
200d9cc: 22 80 00 0e be,a 200da04 <rtems_bdbuf_remove_from_tree+0xa4><== NEVER TAKEN
200d9d0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
200d9d4: c6 07 60 14 ld [ %i5 + 0x14 ], %g3
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200d9d8: 82 10 00 02 mov %g2, %g1
200d9dc: fa 20 40 00 st %i5, [ %g1 ]
if (((uintptr_t) p->dd < (uintptr_t) dd)
200d9e0: 80 a0 c0 1b cmp %g3, %i3
200d9e4: 1a bf ff f4 bcc 200d9b4 <rtems_bdbuf_remove_from_tree+0x54><== ALWAYS TAKEN
200d9e8: 84 00 60 04 add %g1, 4, %g2
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
200d9ec: c8 2f 60 10 stb %g4, [ %i5 + 0x10 ] <== NOT EXECUTED
p = p->avl.right;
200d9f0: fa 07 60 0c ld [ %i5 + 0xc ], %i5
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
200d9f4: 80 a7 60 00 cmp %i5, 0
200d9f8: 32 bf ff f8 bne,a 200d9d8 <rtems_bdbuf_remove_from_tree+0x78><== ALWAYS TAKEN
200d9fc: c6 07 60 14 ld [ %i5 + 0x14 ], %g3
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
200da00: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 <== NOT EXECUTED
200da04: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200da08: 7f ff fe 41 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200da0c: 92 12 60 09 or %o1, 9, %o1 ! 42000009 <RAM_END+0x3fc00009><== NOT EXECUTED
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
200da10: 80 a6 40 03 cmp %i1, %g3
200da14: 38 bf ff f7 bgu,a 200d9f0 <rtems_bdbuf_remove_from_tree+0x90>
200da18: c8 2f 60 10 stb %g4, [ %i5 + 0x10 ]
{
p->avl.cache = 1;
p = p->avl.right;
}
else if ((p->dd != dd) || (p->block != block))
200da1c: 80 a6 40 03 cmp %i1, %g3
200da20: 32 bf ff e9 bne,a 200d9c4 <rtems_bdbuf_remove_from_tree+0x64>
200da24: de 2f 60 10 stb %o7, [ %i5 + 0x10 ]
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
200da28: 9a 10 00 02 mov %g2, %o5
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
200da2c: 80 a0 40 1a cmp %g1, %i2
200da30: 18 80 00 6b bgu 200dbdc <rtems_bdbuf_remove_from_tree+0x27c>
200da34: b0 10 20 00 clr %i0
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
200da38: f2 07 60 0c ld [ %i5 + 0xc ], %i1
200da3c: 80 a6 60 00 cmp %i1, 0
200da40: 22 80 00 6c be,a 200dbf0 <rtems_bdbuf_remove_from_tree+0x290>
200da44: c6 07 60 08 ld [ %i5 + 8 ], %g3
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
200da48: c6 06 60 08 ld [ %i1 + 8 ], %g3
200da4c: 82 10 00 19 mov %i1, %g1
200da50: 80 a0 e0 00 cmp %g3, 0
200da54: 12 80 00 06 bne 200da6c <rtems_bdbuf_remove_from_tree+0x10c>
200da58: b6 10 3f ff mov -1, %i3
{
r->avl.left = q->avl.left;
200da5c: 10 80 00 b4 b 200dd2c <rtems_bdbuf_remove_from_tree+0x3cc>
200da60: c6 07 60 08 ld [ %i5 + 8 ], %g3
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
200da64: 82 10 00 03 mov %g3, %g1
200da68: 86 10 00 04 mov %g4, %g3
200da6c: c8 00 e0 08 ld [ %g3 + 8 ], %g4
{
*buf_prev++ = r = s;
200da70: c2 20 80 00 st %g1, [ %g2 ]
s = r->avl.left;
r->avl.cache = -1;
200da74: f6 28 60 10 stb %i3, [ %g1 + 0x10 ]
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
200da78: 80 a1 20 00 cmp %g4, 0
200da7c: 12 bf ff fa bne 200da64 <rtems_bdbuf_remove_from_tree+0x104>
200da80: 84 00 a0 04 add %g2, 4, %g2
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
200da84: de 07 60 08 ld [ %i5 + 8 ], %o7
r->avl.left = s->avl.right;
200da88: f6 00 e0 0c ld [ %g3 + 0xc ], %i3
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
200da8c: c8 0f 60 11 ldub [ %i5 + 0x11 ], %g4
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
200da90: de 20 e0 08 st %o7, [ %g3 + 8 ]
r->avl.left = s->avl.right;
200da94: f6 20 60 08 st %i3, [ %g1 + 8 ]
s->avl.right = q->avl.right;
200da98: f2 20 e0 0c st %i1, [ %g3 + 0xc ]
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
200da9c: 82 10 20 01 mov 1, %g1
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
200daa0: c8 28 e0 11 stb %g4, [ %g3 + 0x11 ]
s->avl.cache = 1;
200daa4: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
*t = q = s;
200daa8: c6 23 7f fc st %g3, [ %o5 + -4 ]
}
}
if (p != NULL)
200daac: 80 a6 20 00 cmp %i0, 0
200dab0: 22 80 00 07 be,a 200dacc <rtems_bdbuf_remove_from_tree+0x16c>
200dab4: c6 27 20 3c st %g3, [ %i4 + 0x3c ]
{
if (p->avl.cache == -1)
200dab8: c2 4e 20 10 ldsb [ %i0 + 0x10 ], %g1
200dabc: 80 a0 7f ff cmp %g1, -1
200dac0: 22 80 00 03 be,a 200dacc <rtems_bdbuf_remove_from_tree+0x16c>
200dac4: c6 26 20 08 st %g3, [ %i0 + 8 ]
{
p->avl.left = q;
}
else
{
p->avl.right = q;
200dac8: c6 26 20 0c st %g3, [ %i0 + 0xc ]
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
200dacc: 80 a0 80 1a cmp %g2, %i2
200dad0: 08 80 00 2a bleu 200db78 <rtems_bdbuf_remove_from_tree+0x218>
200dad4: b4 38 00 1a xnor %g0, %i2, %i2
p->avl.right = q;
}
}
else
{
*root = q;
200dad8: c2 00 bf fc ld [ %g2 + -4 ], %g1
200dadc: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
200dae0: b4 06 80 02 add %i2, %g2, %i2
200dae4: 89 29 20 18 sll %g4, 0x18, %g4
200dae8: b4 0e bf fc and %i2, -4, %i2
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
200daec: b2 10 3f ff mov -1, %i1
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
200daf0: 10 80 00 11 b 200db34 <rtems_bdbuf_remove_from_tree+0x1d4>
200daf4: b4 20 80 1a sub %g2, %i2, %i2
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
200daf8: 86 10 00 01 mov %g1, %g3
modified = false;
200dafc: ba 10 20 00 clr %i5
default:
break;
}
}
if (buf_prev > buf_stack)
200db00: 80 a0 80 1a cmp %g2, %i2
200db04: 22 80 00 1d be,a 200db78 <rtems_bdbuf_remove_from_tree+0x218>
200db08: c6 27 20 3c st %g3, [ %i4 + 0x3c ]
{
q = *(buf_prev - 1);
200db0c: c2 00 bf f8 ld [ %g2 + -8 ], %g1
if (q->avl.cache == -1)
200db10: c8 08 60 10 ldub [ %g1 + 0x10 ], %g4
200db14: 89 29 20 18 sll %g4, 0x18, %g4
200db18: b7 39 20 18 sra %g4, 0x18, %i3
200db1c: 80 a6 ff ff cmp %i3, -1
200db20: 02 80 00 44 be 200dc30 <rtems_bdbuf_remove_from_tree+0x2d0>
200db24: 80 8f 60 ff btst 0xff, %i5
{
q->avl.left = p;
}
else
{
q->avl.right = p;
200db28: c6 20 60 0c st %g3, [ %g1 + 0xc ]
*root = q;
}
modified = true;
while (modified)
200db2c: 02 80 00 13 be 200db78 <rtems_bdbuf_remove_from_tree+0x218>
200db30: 84 00 bf fc add %g2, -4, %g2
else
{
break;
}
if (p->avl.cache == -1)
200db34: 89 39 20 18 sra %g4, 0x18, %g4
200db38: 80 a1 3f ff cmp %g4, -1
200db3c: 02 80 00 35 be 200dc10 <rtems_bdbuf_remove_from_tree+0x2b0>
200db40: c6 48 60 11 ldsb [ %g1 + 0x11 ], %g3
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
200db44: 80 a0 e0 00 cmp %g3, 0
200db48: 22 bf ff ec be,a 200daf8 <rtems_bdbuf_remove_from_tree+0x198>
200db4c: f2 28 60 11 stb %i1, [ %g1 + 0x11 ]
200db50: 80 a0 e0 01 cmp %g3, 1
200db54: 02 80 00 40 be 200dc54 <rtems_bdbuf_remove_from_tree+0x2f4>
200db58: 80 a0 ff ff cmp %g3, -1
200db5c: 22 80 00 09 be,a 200db80 <rtems_bdbuf_remove_from_tree+0x220><== ALWAYS TAKEN
200db60: c8 00 60 08 ld [ %g1 + 8 ], %g4
200db64: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
default:
break;
}
}
if (buf_prev > buf_stack)
200db68: 80 a0 80 1a cmp %g2, %i2 <== NOT EXECUTED
200db6c: 12 bf ff e8 bne 200db0c <rtems_bdbuf_remove_from_tree+0x1ac><== NOT EXECUTED
200db70: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
q->avl.right = p;
}
}
else
{
*root = p;
200db74: c6 27 20 3c st %g3, [ %i4 + 0x3c ] <== NOT EXECUTED
200db78: 81 c7 e0 08 ret
200db7c: 81 e8 00 00 restore
break;
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
200db80: c6 49 20 11 ldsb [ %g4 + 0x11 ], %g3
200db84: 80 a0 e0 00 cmp %g3, 0
200db88: 04 80 00 42 ble 200dc90 <rtems_bdbuf_remove_from_tree+0x330>
200db8c: ba 10 20 01 mov 1, %i5
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
200db90: c6 01 20 0c ld [ %g4 + 0xc ], %g3
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;
200db94: f0 48 e0 11 ldsb [ %g3 + 0x11 ], %i0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200db98: f6 00 e0 08 ld [ %g3 + 8 ], %i3
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;
200db9c: b0 38 00 18 xnor %g0, %i0, %i0
200dba0: 80 a0 00 18 cmp %g0, %i0
200dba4: b0 60 3f ff subx %g0, -1, %i0
200dba8: f0 28 60 11 stb %i0, [ %g1 + 0x11 ]
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
200dbac: f0 48 e0 11 ldsb [ %g3 + 0x11 ], %i0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
200dbb0: f6 21 20 0c st %i3, [ %g4 + 0xc ]
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;
200dbb4: b0 1e 20 01 xor %i0, 1, %i0
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200dbb8: f6 00 e0 0c ld [ %g3 + 0xc ], %i3
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
200dbbc: c8 20 e0 08 st %g4, [ %g3 + 8 ]
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;
200dbc0: 80 a0 00 18 cmp %g0, %i0
200dbc4: b0 40 3f ff addx %g0, -1, %i0
200dbc8: f0 29 20 11 stb %i0, [ %g4 + 0x11 ]
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
200dbcc: f6 20 60 08 st %i3, [ %g1 + 8 ]
p2->avl.right = p;
200dbd0: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
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;
200dbd4: 10 bf ff cb b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dbd8: c0 28 e0 11 clrb [ %g3 + 0x11 ]
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
200dbdc: f2 07 60 0c ld [ %i5 + 0xc ], %i1
200dbe0: 80 a6 60 00 cmp %i1, 0
200dbe4: 12 bf ff 99 bne 200da48 <rtems_bdbuf_remove_from_tree+0xe8>
200dbe8: f0 00 bf f8 ld [ %g2 + -8 ], %i0
{
r = q->avl.left;
200dbec: c6 07 60 08 ld [ %i5 + 8 ], %g3
if (r != NULL)
200dbf0: 80 a0 e0 00 cmp %g3, 0
200dbf4: 02 bf ff ae be 200daac <rtems_bdbuf_remove_from_tree+0x14c>
200dbf8: 84 10 00 01 mov %g1, %g2
*t = q = s;
}
}
if (p != NULL)
200dbfc: 80 a6 20 00 cmp %i0, 0
200dc00: 12 bf ff ae bne 200dab8 <rtems_bdbuf_remove_from_tree+0x158>
200dc04: c0 28 e0 11 clrb [ %g3 + 0x11 ]
p->avl.right = q;
}
}
else
{
*root = q;
200dc08: 10 bf ff b1 b 200dacc <rtems_bdbuf_remove_from_tree+0x16c>
200dc0c: c6 27 20 3c st %g3, [ %i4 + 0x3c ]
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
200dc10: 80 a0 e0 00 cmp %g3, 0
200dc14: 12 80 00 0c bne 200dc44 <rtems_bdbuf_remove_from_tree+0x2e4>
200dc18: 80 a0 e0 01 cmp %g3, 1
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
200dc1c: 88 10 20 01 mov 1, %g4
200dc20: 86 10 00 01 mov %g1, %g3
200dc24: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
modified = false;
200dc28: 10 bf ff b6 b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dc2c: ba 10 20 00 clr %i5
{
q = *(buf_prev - 1);
if (q->avl.cache == -1)
{
q->avl.left = p;
200dc30: c6 20 60 08 st %g3, [ %g1 + 8 ]
*root = q;
}
modified = true;
while (modified)
200dc34: 12 bf ff c0 bne 200db34 <rtems_bdbuf_remove_from_tree+0x1d4>
200dc38: 84 00 bf fc add %g2, -4, %g2
200dc3c: 81 c7 e0 08 ret
200dc40: 81 e8 00 00 restore
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
200dc44: 02 80 00 08 be 200dc64 <rtems_bdbuf_remove_from_tree+0x304>
200dc48: 80 a0 ff ff cmp %g3, -1
200dc4c: 32 bf ff c7 bne,a 200db68 <rtems_bdbuf_remove_from_tree+0x208><== NEVER TAKEN
200dc50: 86 10 00 01 mov %g1, %g3 <== NOT EXECUTED
{
/* rebalance right branch */
switch (p->avl.bal)
{
case +1:
p->avl.bal = 0;
200dc54: c0 28 60 11 clrb [ %g1 + 0x11 ]
200dc58: 86 10 00 01 mov %g1, %g3
200dc5c: 10 bf ff a9 b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dc60: ba 10 20 01 mov 1, %i5
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
200dc64: c6 00 60 0c ld [ %g1 + 0xc ], %g3
if (p1->avl.bal >= 0) /* simple RR-turn */
200dc68: fa 48 e0 11 ldsb [ %g3 + 0x11 ], %i5
200dc6c: 80 a7 60 00 cmp %i5, 0
200dc70: 26 80 00 1b bl,a 200dcdc <rtems_bdbuf_remove_from_tree+0x37c>
200dc74: c8 00 e0 08 ld [ %g3 + 8 ], %g4
{
p->avl.right = p1->avl.left;
200dc78: f6 00 e0 08 ld [ %g3 + 8 ], %i3
p1->avl.left = p;
200dc7c: c2 20 e0 08 st %g1, [ %g3 + 8 ]
if (p1->avl.bal == 0)
200dc80: 12 80 00 0e bne 200dcb8 <rtems_bdbuf_remove_from_tree+0x358>
200dc84: f6 20 60 0c st %i3, [ %g1 + 0xc ]
{
p1->avl.bal = -1;
200dc88: 10 bf ff 9e b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dc8c: c8 28 e0 11 stb %g4, [ %g3 + 0x11 ]
case -1:
p1 = p->avl.left;
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
200dc90: fa 01 20 0c ld [ %g4 + 0xc ], %i5
p1->avl.right = p;
200dc94: c2 21 20 0c st %g1, [ %g4 + 0xc ]
if (p1->avl.bal == 0)
200dc98: 80 a0 e0 00 cmp %g3, 0
200dc9c: 12 80 00 0b bne 200dcc8 <rtems_bdbuf_remove_from_tree+0x368><== NEVER TAKEN
200dca0: fa 20 60 08 st %i5, [ %g1 + 8 ]
{
p1->avl.bal = 1;
200dca4: 82 10 20 01 mov 1, %g1
200dca8: 86 10 00 04 mov %g4, %g3
200dcac: c2 29 20 11 stb %g1, [ %g4 + 0x11 ]
modified = false;
200dcb0: 10 bf ff 94 b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dcb4: ba 10 20 00 clr %i5
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
200dcb8: c0 28 60 11 clrb [ %g1 + 0x11 ]
p1->avl.bal = 0;
200dcbc: c0 28 e0 11 clrb [ %g3 + 0x11 ]
200dcc0: 10 bf ff 90 b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dcc4: ba 10 20 01 mov 1, %i5
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
200dcc8: c0 28 60 11 clrb [ %g1 + 0x11 ] <== NOT EXECUTED
p1->avl.bal = 0;
200dccc: c0 29 20 11 clrb [ %g4 + 0x11 ] <== NOT EXECUTED
200dcd0: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
200dcd4: 10 bf ff 8b b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0><== NOT EXECUTED
200dcd8: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
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;
200dcdc: ba 10 20 01 mov 1, %i5
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200dce0: f0 49 20 11 ldsb [ %g4 + 0x11 ], %i0
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200dce4: f6 01 20 0c ld [ %g4 + 0xc ], %i3
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
200dce8: b0 1e 20 01 xor %i0, 1, %i0
200dcec: 80 a0 00 18 cmp %g0, %i0
200dcf0: b0 40 3f ff addx %g0, -1, %i0
200dcf4: f0 28 60 11 stb %i0, [ %g1 + 0x11 ]
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
200dcf8: f0 49 20 11 ldsb [ %g4 + 0x11 ], %i0
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
200dcfc: f6 20 e0 08 st %i3, [ %g3 + 8 ]
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = 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;
200dd00: b0 38 00 18 xnor %g0, %i0, %i0
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200dd04: f6 01 20 08 ld [ %g4 + 8 ], %i3
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
200dd08: c6 21 20 0c st %g3, [ %g4 + 0xc ]
p->avl.right = p2->avl.left;
p2->avl.left = 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;
200dd0c: 80 a0 00 18 cmp %g0, %i0
200dd10: b0 60 3f ff subx %g0, -1, %i0
200dd14: f0 28 e0 11 stb %i0, [ %g3 + 0x11 ]
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
200dd18: f6 20 60 0c st %i3, [ %g1 + 0xc ]
p2->avl.left = p;
200dd1c: c2 21 20 08 st %g1, [ %g4 + 8 ]
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;
200dd20: c0 29 20 11 clrb [ %g4 + 0x11 ]
200dd24: 10 bf ff 77 b 200db00 <rtems_bdbuf_remove_from_tree+0x1a0>
200dd28: 86 10 00 04 mov %g4, %g3
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
200dd2c: c2 0f 60 11 ldub [ %i5 + 0x11 ], %g1
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
200dd30: c6 26 60 08 st %g3, [ %i1 + 8 ]
r->avl.bal = q->avl.bal;
200dd34: c2 2e 60 11 stb %g1, [ %i1 + 0x11 ]
r->avl.cache = 1;
*buf_prev++ = q = r;
200dd38: f2 20 bf fc st %i1, [ %g2 + -4 ]
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
200dd3c: 82 10 20 01 mov 1, %g1
*buf_prev++ = q = r;
200dd40: 86 10 00 19 mov %i1, %g3
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
200dd44: 10 bf ff 5a b 200daac <rtems_bdbuf_remove_from_tree+0x14c>
200dd48: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
0200dd4c <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
200dd4c: 9d e3 bf a0 save %sp, -96, %sp
switch (bd->state)
200dd50: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200dd54: 80 a2 20 00 cmp %o0, 0
200dd58: 02 80 00 08 be 200dd78 <rtems_bdbuf_remove_from_tree_and_lru_list+0x2c>
200dd5c: 80 a2 20 02 cmp %o0, 2
200dd60: 02 80 00 04 be 200dd70 <rtems_bdbuf_remove_from_tree_and_lru_list+0x24><== ALWAYS TAKEN
200dd64: 13 10 80 00 sethi %hi(0x42000000), %o1
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
200dd68: 7f ff fd 69 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200dd6c: 92 12 60 08 or %o1, 8, %o1 ! 42000008 <RAM_END+0x3fc00008><== NOT EXECUTED
switch (bd->state)
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
200dd70: 7f ff fe fc call 200d960 <rtems_bdbuf_remove_from_tree>
200dd74: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200dd78: 40 00 0e 19 call 20115dc <_Chain_Extract>
200dd7c: 81 e8 00 00 restore
0200d5e8 <rtems_bdbuf_restore_preemption>:
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
200d5e8: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200d5ec: 13 00 00 3f sethi %hi(0xfc00), %o1
return prev_mode;
}
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
200d5f0: f0 27 a0 44 st %i0, [ %fp + 0x44 ]
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
200d5f4: 90 10 00 18 mov %i0, %o0
200d5f8: 94 07 a0 44 add %fp, 0x44, %o2
200d5fc: 40 00 0e b7 call 20110d8 <rtems_task_mode>
200d600: 92 12 63 ff or %o1, 0x3ff, %o1
if (sc != RTEMS_SUCCESSFUL)
200d604: 80 a2 20 00 cmp %o0, 0
200d608: 12 80 00 04 bne 200d618 <rtems_bdbuf_restore_preemption+0x30><== NEVER TAKEN
200d60c: 11 10 80 00 sethi %hi(0x42000000), %o0
200d610: 81 c7 e0 08 ret
200d614: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_PREEMPT_RST);
200d618: 7f ff f0 7a call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d61c: 90 12 20 11 or %o0, 0x11, %o0 <== NOT EXECUTED
0200d320 <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
200d320: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200d324: e0 06 40 00 ld [ %i1 ], %l0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200d328: b2 06 60 04 add %i1, 4, %i1
if (!rtems_chain_is_empty (chain))
200d32c: 80 a4 00 19 cmp %l0, %i1
200d330: 02 80 00 2f be 200d3ec <rtems_bdbuf_swapout_modified_processing+0xcc>
200d334: 80 a6 e0 00 cmp %i3, 0
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
200d338: 12 80 00 54 bne 200d488 <rtems_bdbuf_swapout_modified_processing+0x168>
200d33c: a2 10 20 00 clr %l1
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200d340: 25 00 80 83 sethi %hi(0x2020c00), %l2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200d344: a8 10 20 09 mov 9, %l4
* 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))
200d348: 80 a4 60 00 cmp %l1, 0
200d34c: 32 80 00 2a bne,a 200d3f4 <rtems_bdbuf_swapout_modified_processing+0xd4>
200d350: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
200d354: 80 a6 e0 00 cmp %i3, 0
200d358: 02 80 00 08 be 200d378 <rtems_bdbuf_swapout_modified_processing+0x58>
200d35c: 82 14 a2 e4 or %l2, 0x2e4, %g1
200d360: c2 06 00 00 ld [ %i0 ], %g1
200d364: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
200d368: 80 a0 40 02 cmp %g1, %g2
200d36c: 02 80 00 4f be 200d4a8 <rtems_bdbuf_swapout_modified_processing+0x188>
200d370: 84 10 00 01 mov %g1, %g2
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
200d374: 82 14 a2 e4 or %l2, 0x2e4, %g1
*
* @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 ())
200d378: c2 00 60 74 ld [ %g1 + 0x74 ], %g1
200d37c: 80 a0 60 00 cmp %g1, 0
200d380: 32 80 00 1d bne,a 200d3f4 <rtems_bdbuf_swapout_modified_processing+0xd4>
200d384: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
bd->hold_timer = 0;
if (bd->hold_timer)
200d388: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
200d38c: 80 a0 60 00 cmp %g1, 0
200d390: 02 80 00 0b be 200d3bc <rtems_bdbuf_swapout_modified_processing+0x9c><== NEVER TAKEN
200d394: 80 a7 20 00 cmp %i4, 0
{
if (update_timers)
200d398: 22 80 00 12 be,a 200d3e0 <rtems_bdbuf_swapout_modified_processing+0xc0>
200d39c: e0 04 00 00 ld [ %l0 ], %l0
{
if (bd->hold_timer > timer_delta)
200d3a0: 80 a0 40 1d cmp %g1, %i5
200d3a4: 28 80 00 36 bleu,a 200d47c <rtems_bdbuf_swapout_modified_processing+0x15c>
200d3a8: c0 24 20 2c clr [ %l0 + 0x2c ]
bd->hold_timer -= timer_delta;
200d3ac: 82 20 40 1d sub %g1, %i5, %g1
else
bd->hold_timer = 0;
}
if (bd->hold_timer)
200d3b0: 80 a0 60 00 cmp %g1, 0
200d3b4: 12 80 00 0a bne 200d3dc <rtems_bdbuf_swapout_modified_processing+0xbc><== ALWAYS TAKEN
200d3b8: c2 24 20 2c st %g1, [ %l0 + 0x2c ]
{
node = node->next;
continue;
200d3bc: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
200d3c0: c4 04 20 14 ld [ %l0 + 0x14 ], %g2 <== NOT EXECUTED
/*
* 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)
200d3c4: 80 a0 60 00 cmp %g1, 0
200d3c8: 22 80 00 11 be,a 200d40c <rtems_bdbuf_swapout_modified_processing+0xec>
200d3cc: 82 10 00 02 mov %g2, %g1
*dd_ptr = bd->dd;
if (bd->dd == *dd_ptr)
200d3d0: 80 a0 40 02 cmp %g1, %g2
200d3d4: 02 80 00 14 be 200d424 <rtems_bdbuf_swapout_modified_processing+0x104><== ALWAYS TAKEN
200d3d8: 90 10 00 10 mov %l0, %o0
node = next_node;
}
else
{
node = node->next;
200d3dc: e0 04 00 00 ld [ %l0 ], %l0
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200d3e0: 80 a6 40 10 cmp %i1, %l0
200d3e4: 12 bf ff da bne 200d34c <rtems_bdbuf_swapout_modified_processing+0x2c>
200d3e8: 80 a4 60 00 cmp %l1, 0
200d3ec: 81 c7 e0 08 ret
200d3f0: 81 e8 00 00 restore
*
* @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 ())
200d3f4: c2 06 00 00 ld [ %i0 ], %g1
bd->hold_timer = 0;
200d3f8: c0 24 20 2c clr [ %l0 + 0x2c ]
/*
* 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)
200d3fc: 80 a0 60 00 cmp %g1, 0
200d400: 12 bf ff f5 bne 200d3d4 <rtems_bdbuf_swapout_modified_processing+0xb4>
200d404: 80 a0 40 02 cmp %g1, %g2
*dd_ptr = bd->dd;
200d408: 82 10 00 02 mov %g2, %g1
200d40c: c4 26 00 00 st %g2, [ %i0 ]
200d410: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
if (bd->dd == *dd_ptr)
200d414: 80 a0 40 02 cmp %g1, %g2
200d418: 32 bf ff f2 bne,a 200d3e0 <rtems_bdbuf_swapout_modified_processing+0xc0><== NEVER TAKEN
200d41c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200d420: 90 10 00 10 mov %l0, %o0
{
rtems_chain_node* next_node = node->next;
200d424: e6 04 00 00 ld [ %l0 ], %l3
200d428: 40 00 10 6d call 20115dc <_Chain_Extract>
200d42c: e8 24 20 20 st %l4, [ %l0 + 0x20 ]
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract (node);
tnode = tnode->previous;
200d430: d0 06 a0 08 ld [ %i2 + 8 ], %o0
while (node && !rtems_chain_is_head (transfer, tnode))
200d434: 80 a6 80 08 cmp %i2, %o0
200d438: 02 80 00 0c be 200d468 <rtems_bdbuf_swapout_modified_processing+0x148>
200d43c: 92 10 00 10 mov %l0, %o1
200d440: c4 04 20 18 ld [ %l0 + 0x18 ], %g2
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
200d444: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
200d448: 80 a0 80 01 cmp %g2, %g1
200d44c: 18 80 00 13 bgu 200d498 <rtems_bdbuf_swapout_modified_processing+0x178>
200d450: 92 10 00 10 mov %l0, %o1
{
rtems_chain_insert (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
200d454: d0 02 20 04 ld [ %o0 + 4 ], %o0
rtems_chain_extract (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
200d458: 80 a6 80 08 cmp %i2, %o0
200d45c: 32 bf ff fb bne,a 200d448 <rtems_bdbuf_swapout_modified_processing+0x128>
200d460: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200d464: 92 10 00 10 mov %l0, %o1
200d468: 90 10 00 1a mov %i2, %o0
200d46c: 40 00 10 65 call 2011600 <_Chain_Insert>
200d470: a0 10 00 13 mov %l3, %l0
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200d474: 10 bf ff dc b 200d3e4 <rtems_bdbuf_swapout_modified_processing+0xc4>
200d478: 80 a6 40 10 cmp %i1, %l0
if (update_timers)
{
if (bd->hold_timer > timer_delta)
bd->hold_timer -= timer_delta;
else
bd->hold_timer = 0;
200d47c: c2 06 00 00 ld [ %i0 ], %g1
200d480: 10 bf ff d1 b 200d3c4 <rtems_bdbuf_swapout_modified_processing+0xa4>
200d484: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
* @param update_timers If true update the timers.
* @param timer_delta It update_timers is true update the timers by this
* amount.
*/
static void
rtems_bdbuf_swapout_modified_processing (const rtems_disk_device **dd_ptr,
200d488: c2 06 00 00 ld [ %i0 ], %g1
200d48c: 80 a0 00 01 cmp %g0, %g1
200d490: 10 bf ff ac b 200d340 <rtems_bdbuf_swapout_modified_processing+0x20>
200d494: a2 60 3f ff subx %g0, -1, %l1
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
200d498: 40 00 10 5a call 2011600 <_Chain_Insert>
200d49c: a0 10 00 13 mov %l3, %l0
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
200d4a0: 10 bf ff d1 b 200d3e4 <rtems_bdbuf_swapout_modified_processing+0xc4>
200d4a4: 80 a6 40 10 cmp %i1, %l0
* @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;
200d4a8: 10 bf ff d5 b 200d3fc <rtems_bdbuf_swapout_modified_processing+0xdc>
200d4ac: c0 24 20 2c clr [ %l0 + 0x2c ]
0200e128 <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
200e128: 9d e3 bf 80 save %sp, -128, %sp
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
200e12c: 37 00 80 79 sethi %hi(0x201e400), %i3
200e130: b6 16 e1 f0 or %i3, 0x1f0, %i3 ! 201e5f0 <rtems_bdbuf_configuration>
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200e134: 7f ff fd 6e call 200d6ec <rtems_bdbuf_swapout_writereq_alloc>
200e138: f0 06 e0 0c ld [ %i3 + 0xc ], %i0
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200e13c: 03 00 80 81 sethi %hi(0x2020400), %g1
200e140: d2 00 61 6c ld [ %g1 + 0x16c ], %o1 ! 202056c <Configuration+0x10>
200e144: 83 2e 20 02 sll %i0, 2, %g1
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200e148: d0 27 bf f4 st %o0, [ %fp + -12 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e14c: a2 07 bf e0 add %fp, -32, %l1
200e150: aa 07 bf e4 add %fp, -28, %l5
head->previous = NULL;
200e154: c0 27 bf e4 clr [ %fp + -28 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e158: ea 27 bf e0 st %l5, [ %fp + -32 ]
head->previous = NULL;
tail->previous = head;
200e15c: e2 27 bf e8 st %l1, [ %fp + -24 ]
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
200e160: c0 27 bf ec clr [ %fp + -20 ]
transfer.syncing = false;
200e164: c0 2f bf f0 clrb [ %fp + -16 ]
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
200e168: 91 2e 20 07 sll %i0, 7, %o0
200e16c: 90 22 00 01 sub %o0, %g1, %o0
200e170: 90 02 00 18 add %o0, %i0, %o0
200e174: 40 00 38 fa call 201c55c <.udiv>
200e178: 91 2a 20 03 sll %o0, 3, %o0
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
200e17c: 7f ff fc 48 call 200d29c <rtems_bdbuf_lock_cache>
200e180: ae 10 00 08 mov %o0, %l7
for (w = 0; w < bdbuf_config.swapout_workers; w++)
200e184: e6 06 e0 14 ld [ %i3 + 0x14 ], %l3
200e188: 80 a4 e0 00 cmp %l3, 0
200e18c: 02 80 00 30 be 200e24c <rtems_bdbuf_swapout_task+0x124> <== ALWAYS TAKEN
200e190: 25 00 80 39 sethi %hi(0x200e400), %l2
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200e194: 21 00 80 83 sethi %hi(0x2020c00), %l0 <== 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_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200e198: 35 10 91 1b sethi %hi(0x42446c00), %i2 <== 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)
200e19c: a6 04 e0 61 add %l3, 0x61, %l3 <== NOT EXECUTED
200e1a0: b8 10 20 61 mov 0x61, %i4 <== NOT EXECUTED
200e1a4: a0 14 22 ec or %l0, 0x2ec, %l0 <== NOT EXECUTED
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
200e1a8: b2 10 20 01 mov 1, %i1 <== 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_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200e1ac: b4 16 a3 00 or %i2, 0x300, %i2 <== NOT EXECUTED
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200e1b0: a4 14 a0 c4 or %l2, 0xc4, %l2 <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
200e1b4: 7f ff db a8 call 2005054 <malloc> <== NOT EXECUTED
200e1b8: 90 10 20 2c mov 0x2c, %o0 <== NOT EXECUTED
if (!worker)
200e1bc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
200e1c0: 02 80 00 ba be 200e4a8 <rtems_bdbuf_swapout_task+0x380> <== NOT EXECUTED
200e1c4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200e1c8: 7f ff ee e6 call 2009d60 <_Chain_Append> <== NOT EXECUTED
200e1cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200e1d0: 7f ff fd 47 call 200d6ec <rtems_bdbuf_swapout_writereq_alloc><== NOT EXECUTED
200e1d4: f2 2f 60 0c stb %i1, [ %i5 + 0xc ] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
(bdbuf_config.swapout_priority ?
200e1d8: d2 06 e0 08 ld [ %i3 + 8 ], %o1 <== 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 );
200e1dc: 82 07 60 10 add %i5, 0x10, %g1 <== NOT EXECUTED
200e1e0: 84 07 60 14 add %i5, 0x14, %g2 <== NOT EXECUTED
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
200e1e4: d0 27 60 24 st %o0, [ %i5 + 0x24 ] <== NOT EXECUTED
head->next = tail;
200e1e8: c4 27 60 10 st %g2, [ %i5 + 0x10 ] <== NOT EXECUTED
head->previous = NULL;
200e1ec: c0 27 60 14 clr [ %i5 + 0x14 ] <== NOT EXECUTED
tail->previous = head;
200e1f0: c2 27 60 18 st %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
200e1f4: c0 27 60 1c clr [ %i5 + 0x1c ] <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
200e1f8: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
200e1fc: 12 80 00 03 bne 200e208 <rtems_bdbuf_swapout_task+0xe0> <== NOT EXECUTED
200e200: 90 17 00 1a or %i4, %i2, %o0 <== NOT EXECUTED
200e204: 92 10 20 0f mov 0xf, %o1 <== NOT EXECUTED
200e208: 15 00 00 08 sethi %hi(0x2000), %o2 <== NOT EXECUTED
200e20c: 96 10 24 00 mov 0x400, %o3 <== NOT EXECUTED
200e210: 98 10 20 00 clr %o4 <== NOT EXECUTED
200e214: 7f ff ec 46 call 200932c <rtems_task_create> <== NOT EXECUTED
200e218: 9a 07 60 08 add %i5, 8, %o5 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT),
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
200e21c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e220: 12 80 00 9f bne 200e49c <rtems_bdbuf_swapout_task+0x374> <== NOT EXECUTED
200e224: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
sc = rtems_task_start (worker->id,
200e228: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
200e22c: 7f ff ec cc call 200955c <rtems_task_start> <== NOT EXECUTED
200e230: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
200e234: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e238: 12 80 00 9f bne 200e4b4 <rtems_bdbuf_swapout_task+0x38c> <== NOT EXECUTED
200e23c: b8 07 20 01 inc %i4 <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
200e240: 80 a7 00 13 cmp %i4, %l3 <== NOT EXECUTED
200e244: 12 bf ff dc bne 200e1b4 <rtems_bdbuf_swapout_task+0x8c> <== NOT EXECUTED
200e248: 01 00 00 00 nop <== NOT EXECUTED
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
200e24c: 7f ff fc 99 call 200d4b0 <rtems_bdbuf_unlock_cache>
200e250: 39 00 80 83 sethi %hi(0x2020c00), %i4
200e254: b8 17 22 e4 or %i4, 0x2e4, %i4 ! 2020ee4 <bdbuf_cache>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200e258: a4 10 00 1c mov %i4, %l2
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200e25c: ac 07 20 08 add %i4, 8, %l6
/*
* 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,
200e260: a8 07 20 58 add %i4, 0x58, %l4
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
200e264: a6 07 20 4c add %i4, 0x4c, %l3
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
200e268: c2 0f 20 04 ldub [ %i4 + 4 ], %g1
200e26c: 80 a0 60 00 cmp %g1, 0
200e270: 02 80 00 71 be 200e434 <rtems_bdbuf_swapout_task+0x30c> <== NEVER TAKEN
200e274: 01 00 00 00 nop
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
200e278: 7f ff fc 09 call 200d29c <rtems_bdbuf_lock_cache>
200e27c: a0 10 20 01 mov 1, %l0 ! 1 <PROM_START+0x1>
* 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)
200e280: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
200e284: 80 88 60 ff btst 0xff, %g1
200e288: 02 80 00 35 be 200e35c <rtems_bdbuf_swapout_task+0x234>
200e28c: 01 00 00 00 nop
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e290: ea 27 bf e0 st %l5, [ %fp + -32 ]
head->previous = NULL;
200e294: c0 27 bf e4 clr [ %fp + -28 ]
tail->previous = head;
200e298: e2 27 bf e8 st %l1, [ %fp + -24 ]
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
200e29c: c0 27 bf ec clr [ %fp + -20 ]
transfer->syncing = bdbuf_cache.sync_active;
200e2a0: c2 2f bf f0 stb %g1, [ %fp + -16 ]
* 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;
200e2a4: b6 10 20 00 clr %i3
/*
* 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,
200e2a8: ba 10 00 11 mov %l1, %i5
200e2ac: b2 07 bf e4 add %fp, -28, %i1
* 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)
transfer->dd = bdbuf_cache.sync_device;
200e2b0: c2 07 20 38 ld [ %i4 + 0x38 ], %g1
200e2b4: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/*
* 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,
200e2b8: b4 07 60 0c add %i5, 0xc, %i2
200e2bc: 96 10 20 01 mov 1, %o3
200e2c0: 98 10 20 00 clr %o4
200e2c4: 9a 10 00 18 mov %i0, %o5
200e2c8: 90 10 00 1a mov %i2, %o0
200e2cc: 92 10 00 14 mov %l4, %o1
200e2d0: 7f ff fc 14 call 200d320 <rtems_bdbuf_swapout_modified_processing>
200e2d4: 94 10 00 1d mov %i5, %o2
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
200e2d8: d6 0f 20 30 ldub [ %i4 + 0x30 ], %o3
200e2dc: 90 10 00 1a mov %i2, %o0
200e2e0: 92 10 00 13 mov %l3, %o1
200e2e4: 94 10 00 1d mov %i5, %o2
200e2e8: 98 0c 20 01 and %l0, 1, %o4
200e2ec: 7f ff fc 0d call 200d320 <rtems_bdbuf_swapout_modified_processing>
200e2f0: 9a 10 00 18 mov %i0, %o5
/*
* 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 ();
200e2f4: 7f ff fc 6f call 200d4b0 <rtems_bdbuf_unlock_cache>
200e2f8: 01 00 00 00 nop
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
200e2fc: c2 07 40 00 ld [ %i5 ], %g1
200e300: 80 a0 40 19 cmp %g1, %i1
200e304: 02 80 00 46 be 200e41c <rtems_bdbuf_swapout_task+0x2f4>
200e308: 80 a6 e0 00 cmp %i3, 0
{
if (worker)
200e30c: 02 80 00 46 be 200e424 <rtems_bdbuf_swapout_task+0x2fc> <== ALWAYS TAKEN
200e310: 01 00 00 00 nop
{
rtems_status_code sc = rtems_event_send (worker->id,
200e314: d0 06 e0 08 ld [ %i3 + 8 ], %o0 <== NOT EXECUTED
200e318: 7f ff ea 51 call 2008c5c <rtems_event_send> <== NOT EXECUTED
200e31c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200e320: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e324: 12 80 00 5b bne 200e490 <rtems_bdbuf_swapout_task+0x368> <== NOT EXECUTED
200e328: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
}
transfered_buffers = true;
}
if (bdbuf_cache.sync_active && !transfered_buffers)
200e32c: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
200e330: 80 a0 60 00 cmp %g1, 0
200e334: 02 80 00 36 be 200e40c <rtems_bdbuf_swapout_task+0x2e4>
200e338: 80 88 a0 ff btst 0xff, %g2
200e33c: 02 80 00 1a be 200e3a4 <rtems_bdbuf_swapout_task+0x27c>
200e340: a0 10 20 00 clr %l0
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
200e344: 7f ff fb d6 call 200d29c <rtems_bdbuf_lock_cache>
200e348: 01 00 00 00 nop
* 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)
200e34c: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
200e350: 80 88 60 ff btst 0xff, %g1
200e354: 32 bf ff d0 bne,a 200e294 <rtems_bdbuf_swapout_task+0x16c>
200e358: ea 27 bf e0 st %l5, [ %fp + -32 ]
200e35c: 7f ff ee 8c call 2009d8c <_Chain_Get>
200e360: 90 10 00 16 mov %l6, %o0
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
transfer = &worker->transfer;
200e364: c2 0c a0 30 ldub [ %l2 + 0x30 ], %g1
200e368: b6 10 00 08 mov %o0, %i3
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
200e36c: 80 a2 20 00 cmp %o0, 0
200e370: 02 80 00 03 be 200e37c <rtems_bdbuf_swapout_task+0x254> <== ALWAYS TAKEN
200e374: ba 10 00 11 mov %l1, %i5
transfer = &worker->transfer;
200e378: ba 02 20 10 add %o0, 0x10, %i5 <== 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 );
200e37c: b2 07 60 04 add %i5, 4, %i1
head->next = tail;
head->previous = NULL;
200e380: c0 27 60 04 clr [ %i5 + 4 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e384: f2 27 40 00 st %i1, [ %i5 ]
head->previous = NULL;
tail->previous = head;
200e388: fa 27 60 08 st %i5, [ %i5 + 8 ]
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
200e38c: c0 27 60 0c clr [ %i5 + 0xc ]
/*
* 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)
200e390: 80 88 60 ff btst 0xff, %g1
200e394: 02 bf ff c9 be 200e2b8 <rtems_bdbuf_swapout_task+0x190> <== ALWAYS TAKEN
200e398: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
transfer->dd = bdbuf_cache.sync_device;
200e39c: 10 bf ff c6 b 200e2b4 <rtems_bdbuf_swapout_task+0x18c> <== NOT EXECUTED
200e3a0: c2 07 20 38 ld [ %i4 + 0x38 ], %g1 <== NOT EXECUTED
}
if (bdbuf_cache.sync_active && !transfered_buffers)
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
200e3a4: 7f ff fb be call 200d29c <rtems_bdbuf_lock_cache>
200e3a8: 01 00 00 00 nop
sync_requester = bdbuf_cache.sync_requester;
200e3ac: fa 04 a0 34 ld [ %l2 + 0x34 ], %i5
bdbuf_cache.sync_active = false;
200e3b0: c0 2c a0 30 clrb [ %l2 + 0x30 ]
bdbuf_cache.sync_requester = 0;
rtems_bdbuf_unlock_cache ();
200e3b4: 7f ff fc 3f call 200d4b0 <rtems_bdbuf_unlock_cache>
200e3b8: c0 24 a0 34 clr [ %l2 + 0x34 ]
if (sync_requester)
200e3bc: 80 a7 60 00 cmp %i5, 0
200e3c0: 02 80 00 06 be 200e3d8 <rtems_bdbuf_swapout_task+0x2b0> <== NEVER TAKEN
200e3c4: 90 10 20 04 mov 4, %o0
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
200e3c8: 90 10 00 1d mov %i5, %o0
200e3cc: 7f ff ea 24 call 2008c5c <rtems_event_send>
200e3d0: 92 10 20 02 mov 2, %o1
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
200e3d4: 90 10 20 04 mov 4, %o0
200e3d8: 92 10 20 00 clr %o1
200e3dc: 94 10 00 17 mov %l7, %o2
200e3e0: 7f ff e9 bc call 2008ad0 <rtems_event_receive>
200e3e4: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
200e3e8: 80 a2 20 06 cmp %o0, 6
200e3ec: 22 bf ff a0 be,a 200e26c <rtems_bdbuf_swapout_task+0x144>
200e3f0: c2 0f 20 04 ldub [ %i4 + 4 ], %g1
200e3f4: 80 a2 20 00 cmp %o0, 0
200e3f8: 22 bf ff 9d be,a 200e26c <rtems_bdbuf_swapout_task+0x144><== ALWAYS TAKEN
200e3fc: c2 0f 20 04 ldub [ %i4 + 4 ], %g1
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
200e400: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e404: 7f ff ec ff call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e408: 90 12 20 18 or %o0, 0x18, %o0 ! 42000018 <RAM_END+0x3fc00018><== NOT EXECUTED
/*
* 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,
200e40c: 02 bf ff f3 be 200e3d8 <rtems_bdbuf_swapout_task+0x2b0>
200e410: 90 10 20 04 mov 4, %o0
200e414: 10 bf ff cc b 200e344 <rtems_bdbuf_swapout_task+0x21c>
200e418: a0 10 20 00 clr %l0
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;
200e41c: 10 bf ff c4 b 200e32c <rtems_bdbuf_swapout_task+0x204>
200e420: 84 10 20 00 clr %g2
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
}
else
{
rtems_bdbuf_swapout_write (transfer);
200e424: 7f ff fe e0 call 200dfa4 <rtems_bdbuf_swapout_write>
200e428: 90 10 00 1d mov %i5, %o0
}
transfered_buffers = true;
200e42c: 10 bf ff c0 b 200e32c <rtems_bdbuf_swapout_task+0x204>
200e430: 84 10 20 01 mov 1, %g2
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
200e434: 7f ff fb 9a call 200d29c <rtems_bdbuf_lock_cache> <== NOT EXECUTED
200e438: 01 00 00 00 nop <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200e43c: fa 04 a0 08 ld [ %l2 + 8 ], %i5 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
200e440: a4 04 a0 0c add %l2, 0xc, %l2 <== NOT EXECUTED
200e444: 80 a7 40 12 cmp %i5, %l2 <== NOT EXECUTED
200e448: 02 80 00 0a be 200e470 <rtems_bdbuf_swapout_task+0x348> <== NOT EXECUTED
200e44c: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
200e450: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== 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;
200e454: c0 2f 60 0c clrb [ %i5 + 0xc ] <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
200e458: 7f ff ea 01 call 2008c5c <rtems_event_send> <== NOT EXECUTED
200e45c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200e460: fa 07 40 00 ld [ %i5 ], %i5 <== 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))
200e464: 80 a7 40 12 cmp %i5, %l2 <== NOT EXECUTED
200e468: 32 bf ff fb bne,a 200e454 <rtems_bdbuf_swapout_task+0x32c><== NOT EXECUTED
200e46c: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
200e470: 7f ff fc 10 call 200d4b0 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200e474: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
200e478: 7f ff d9 76 call 2004a50 <free> <== NOT EXECUTED
200e47c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
200e480: 7f ff eb f5 call 2009454 <rtems_task_delete> <== NOT EXECUTED
200e484: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
200e488: 81 c7 e0 08 ret <== NOT EXECUTED
200e48c: 81 e8 00 00 restore <== NOT EXECUTED
if (worker)
{
rtems_status_code sc = rtems_event_send (worker->id,
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200e490: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e494: 7f ff ec db call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e498: 90 12 20 14 or %o0, 0x14, %o0 ! 42000014 <RAM_END+0x3fc00014><== NOT EXECUTED
SWAPOUT_TASK_STACK_SIZE,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
200e49c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e4a0: 7f ff ec d8 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e4a4: 90 12 20 16 or %o0, 0x16, %o0 ! 42000016 <RAM_END+0x3fc00016><== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
if (!worker)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
200e4a8: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e4ac: 7f ff ec d5 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e4b0: 90 12 20 15 or %o0, 0x15, %o0 ! 42000015 <RAM_END+0x3fc00015><== NOT EXECUTED
sc = rtems_task_start (worker->id,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
200e4b4: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200e4b8: 7f ff ec d2 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200e4bc: 90 12 20 17 or %o0, 0x17, %o0 ! 42000017 <RAM_END+0x3fc00017><== NOT EXECUTED
0200e4c4 <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)
{
200e4c4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
200e4c8: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1 <== NOT EXECUTED
200e4cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e4d0: 02 80 00 19 be 200e534 <rtems_bdbuf_swapout_worker_task+0x70><== NOT EXECUTED
200e4d4: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200e4d8: 37 00 80 83 sethi %hi(0x2020c00), %i3 <== NOT EXECUTED
200e4dc: b8 06 20 10 add %i0, 0x10, %i4 <== NOT EXECUTED
200e4e0: b4 06 20 14 add %i0, 0x14, %i2 <== NOT EXECUTED
200e4e4: b6 16 e2 ec or %i3, 0x2ec, %i3 <== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
200e4e8: 7f ff fc 1e call 200d560 <rtems_bdbuf_wait_for_event> <== NOT EXECUTED
200e4ec: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
200e4f0: 7f ff fe ad call 200dfa4 <rtems_bdbuf_swapout_write> <== NOT EXECUTED
200e4f4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
200e4f8: 7f ff fb 69 call 200d29c <rtems_bdbuf_lock_cache> <== NOT EXECUTED
200e4fc: 01 00 00 00 nop <== NOT EXECUTED
200e500: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200e504: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200e508: f4 27 60 10 st %i2, [ %i5 + 0x10 ] <== NOT EXECUTED
head->previous = NULL;
200e50c: c0 27 60 14 clr [ %i5 + 0x14 ] <== NOT EXECUTED
tail->previous = head;
200e510: f8 27 60 18 st %i4, [ %i5 + 0x18 ] <== NOT EXECUTED
200e514: 7f ff ee 13 call 2009d60 <_Chain_Append> <== NOT EXECUTED
200e518: c0 27 60 1c clr [ %i5 + 0x1c ] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
200e51c: 7f ff fb e5 call 200d4b0 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
200e520: 01 00 00 00 nop <== 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)
200e524: c2 0f 60 0c ldub [ %i5 + 0xc ], %g1 <== NOT EXECUTED
200e528: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e52c: 12 bf ff ef bne 200e4e8 <rtems_bdbuf_swapout_worker_task+0x24><== NOT EXECUTED
200e530: 01 00 00 00 nop <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
200e534: d0 07 60 24 ld [ %i5 + 0x24 ], %o0 <== NOT EXECUTED
200e538: 7f ff d9 46 call 2004a50 <free> <== NOT EXECUTED
200e53c: b0 10 20 00 clr %i0 <== NOT EXECUTED
free (worker);
200e540: 7f ff d9 44 call 2004a50 <free> <== NOT EXECUTED
200e544: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
200e548: 7f ff eb c3 call 2009454 <rtems_task_delete> <== NOT EXECUTED
200e54c: 81 e8 00 00 restore <== NOT EXECUTED
0200dfa4 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
200dfa4: 9d e3 bf a0 save %sp, -96, %sp
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))
200dfa8: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200dfac: b6 06 20 04 add %i0, 4, %i3
200dfb0: 80 a0 40 1b cmp %g1, %i3
200dfb4: 02 80 00 46 be 200e0cc <rtems_bdbuf_swapout_write+0x128> <== NEVER TAKEN
200dfb8: 35 00 80 79 sethi %hi(0x201e400), %i2
* Number of buffers per bd. This is used to detect the next
* block.
*/
uint32_t bufs_per_bd = 0;
const rtems_disk_device *dd = transfer->dd;
200dfbc: fa 06 20 0c ld [ %i0 + 0xc ], %i5
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
200dfc0: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
200dfc4: b4 16 a1 f0 or %i2, 0x1f0, %i2
200dfc8: d2 06 a0 20 ld [ %i2 + 0x20 ], %o1
200dfcc: 40 00 39 64 call 201c55c <.udiv>
200dfd0: b8 10 20 00 clr %i4
* 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;
200dfd4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200dfd8: 84 10 20 0c mov 0xc, %g2
*/
uint32_t bufs_per_bd = 0;
const rtems_disk_device *dd = transfer->dd;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
200dfdc: a0 10 00 08 mov %o0, %l0
* 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;
transfer->write_req->bufnum = 0;
200dfe0: c0 20 60 10 clr [ %g1 + 0x10 ]
* 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;
200dfe4: c4 20 60 0c st %g2, [ %g1 + 0xc ]
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200dfe8: b2 10 20 0c mov 0xc, %i1
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200dfec: 7f ff ef 68 call 2009d8c <_Chain_Get>
200dff0: 90 10 00 18 mov %i0, %o0
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
200dff4: 82 92 20 00 orcc %o0, 0, %g1
200dff8: 22 80 00 2d be,a 200e0ac <rtems_bdbuf_swapout_write+0x108><== NEVER TAKEN
200dffc: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
200e000: c4 07 60 08 ld [ %i5 + 8 ], %g2
200e004: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
200e008: 80 88 a0 01 btst 1, %g2
200e00c: 02 80 00 32 be 200e0d4 <rtems_bdbuf_swapout_write+0x130> <== ALWAYS TAKEN
200e010: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
transfer->write_req->bufnum &&
200e014: c4 02 60 10 ld [ %o1 + 0x10 ], %g2 <== NOT EXECUTED
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
200e018: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200e01c: 32 80 00 34 bne,a 200e0ec <rtems_bdbuf_swapout_write+0x148><== NOT EXECUTED
200e020: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 <== NOT EXECUTED
200e024: f8 00 60 18 ld [ %g1 + 0x18 ], %i4 <== NOT EXECUTED
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
200e028: de 07 60 20 ld [ %i5 + 0x20 ], %o7
buf->buffer = bd->buffer;
200e02c: c8 00 60 1c ld [ %g1 + 0x1c ], %g4
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
200e030: 86 00 a0 01 add %g2, 1, %g3
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
200e034: 85 28 a0 04 sll %g2, 4, %g2
transfer->write_req->bufnum++;
200e038: c6 22 60 10 st %g3, [ %o1 + 0x10 ]
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
200e03c: 9a 10 20 00 clr %o5
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
200e040: 86 00 a0 18 add %g2, 0x18, %g3
200e044: 84 02 40 03 add %o1, %g3, %g2
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
200e048: f8 22 40 03 st %i4, [ %o1 + %g3 ]
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
200e04c: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
buf->block = bd->block;
buf->length = dd->block_size;
200e050: de 20 a0 04 st %o7, [ %g2 + 4 ]
buf->buffer = bd->buffer;
200e054: c8 20 a0 08 st %g4, [ %g2 + 8 ]
/*
* 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) ||
200e058: c2 06 00 00 ld [ %i0 ], %g1
200e05c: 80 a6 c0 01 cmp %i3, %g1
200e060: 02 80 00 08 be 200e080 <rtems_bdbuf_swapout_write+0xdc>
200e064: 94 10 20 00 clr %o2
200e068: c4 02 60 10 ld [ %o1 + 0x10 ], %g2
200e06c: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200e070: 80 a0 80 01 cmp %g2, %g1
200e074: 0a 80 00 1b bcs 200e0e0 <rtems_bdbuf_swapout_write+0x13c>
200e078: 80 8b 60 ff btst 0xff, %o5
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
200e07c: 94 10 20 00 clr %o2
200e080: 7f ff ff 5b call 200ddec <rtems_bdbuf_execute_transfer_request>
200e084: 90 10 00 1d mov %i5, %o0
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
200e088: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200e08c: 90 10 00 18 mov %i0, %o0
200e090: f2 20 60 0c st %i1, [ %g1 + 0xc ]
200e094: 7f ff ef 3e call 2009d8c <_Chain_Get>
200e098: c0 20 60 10 clr [ %g1 + 0x10 ]
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
200e09c: 82 92 20 00 orcc %o0, 0, %g1
200e0a0: 32 bf ff d9 bne,a 200e004 <rtems_bdbuf_swapout_write+0x60>
200e0a4: c4 07 60 08 ld [ %i5 + 8 ], %g2
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
200e0a8: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1
200e0ac: 80 a0 60 00 cmp %g1, 0
200e0b0: 02 80 00 1c be 200e120 <rtems_bdbuf_swapout_write+0x17c>
200e0b4: 01 00 00 00 nop
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
200e0b8: d0 07 60 08 ld [ %i5 + 8 ], %o0
200e0bc: c2 02 20 0c ld [ %o0 + 0xc ], %g1
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
200e0c0: 80 88 60 02 btst 2, %g1
200e0c4: 32 80 00 14 bne,a 200e114 <rtems_bdbuf_swapout_write+0x170><== NEVER TAKEN
200e0c8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1 <== NOT EXECUTED
200e0cc: 81 c7 e0 08 ret
200e0d0: 81 e8 00 00 restore
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
200e0d4: f8 00 60 18 ld [ %g1 + 0x18 ], %i4
200e0d8: 10 bf ff d4 b 200e028 <rtems_bdbuf_swapout_write+0x84>
200e0dc: c4 02 60 10 ld [ %o1 + 0x10 ], %g2
if (rtems_chain_is_empty (&transfer->bds) ||
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
200e0e0: 02 bf ff c3 be 200dfec <rtems_bdbuf_swapout_write+0x48> <== ALWAYS TAKEN
200e0e4: 94 10 20 00 clr %o2
200e0e8: 30 bf ff e6 b,a 200e080 <rtems_bdbuf_swapout_write+0xdc> <== NOT EXECUTED
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
(bd->block != (last_block + bufs_per_bd)))
200e0ec: 88 07 00 10 add %i4, %l0, %g4 <== NOT EXECUTED
bd->block, transfer->write_req->bufnum,
dd->phys_dev->capabilities &
RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
transfer->write_req->bufnum &&
200e0f0: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED
200e0f4: 22 bf ff cd be,a 200e028 <rtems_bdbuf_swapout_write+0x84><== NOT EXECUTED
200e0f8: b8 10 00 03 mov %g3, %i4 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200e0fc: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
200e100: 40 00 0d 40 call 2011600 <_Chain_Insert> <== NOT EXECUTED
200e104: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200e108: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 <== NOT EXECUTED
(bd->block != (last_block + bufs_per_bd)))
{
rtems_chain_prepend (&transfer->bds, &bd->link);
write = true;
200e10c: 10 bf ff d3 b 200e058 <rtems_bdbuf_swapout_write+0xb4> <== NOT EXECUTED
200e110: 9a 10 20 01 mov 1, %o5 <== 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);
200e114: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200e118: 9f c0 40 00 call %g1 <== NOT EXECUTED
200e11c: 94 10 20 00 clr %o2 <== NOT EXECUTED
200e120: 81 c7 e0 08 ret
200e124: 81 e8 00 00 restore
0200d6ec <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
200d6ec: 9d e3 bf a0 save %sp, -96, %sp
* 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)));
200d6f0: 03 00 80 79 sethi %hi(0x201e400), %g1
200d6f4: d0 00 61 f4 ld [ %g1 + 0x1f4 ], %o0 ! 201e5f4 <rtems_bdbuf_configuration+0x4>
200d6f8: 91 2a 20 04 sll %o0, 4, %o0
* @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 =
200d6fc: 7f ff de 56 call 2005054 <malloc>
200d700: 90 02 20 18 add %o0, 0x18, %o0
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
200d704: ba 92 20 00 orcc %o0, 0, %i5
200d708: 02 80 00 0c be 200d738 <rtems_bdbuf_swapout_writereq_alloc+0x4c><== NEVER TAKEN
200d70c: 82 10 20 01 mov 1, %g1
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
200d710: c2 27 40 00 st %g1, [ %i5 ]
write_req->req_done = rtems_bdbuf_transfer_done;
200d714: 03 00 80 35 sethi %hi(0x200d400), %g1
200d718: 82 10 61 44 or %g1, 0x144, %g1 ! 200d544 <rtems_bdbuf_transfer_done>
write_req->done_arg = write_req;
200d71c: fa 27 60 08 st %i5, [ %i5 + 8 ]
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
write_req->req_done = rtems_bdbuf_transfer_done;
200d720: c2 27 60 04 st %g1, [ %i5 + 4 ]
write_req->done_arg = write_req;
write_req->io_task = rtems_task_self ();
200d724: 40 00 0e d9 call 2011288 <rtems_task_self>
200d728: b0 10 00 1d mov %i5, %i0
200d72c: d0 27 60 14 st %o0, [ %i5 + 0x14 ]
return write_req;
}
200d730: 81 c7 e0 08 ret
200d734: 81 e8 00 00 restore
rtems_blkdev_request* write_req =
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
200d738: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d73c: 7f ff f0 31 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d740: 90 12 20 15 or %o0, 0x15, %o0 ! 42000015 <RAM_END+0x3fc00015><== NOT EXECUTED
0200f41c <rtems_bdbuf_sync>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
200f41c: 9d e3 bf a0 save %sp, -96, %sp
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (!bdbuf_cache.initialised)
200f420: 3b 00 80 83 sethi %hi(0x2020c00), %i5
200f424: ba 17 62 e4 or %i5, 0x2e4, %i5 ! 2020ee4 <bdbuf_cache>
200f428: c2 0f 60 84 ldub [ %i5 + 0x84 ], %g1
200f42c: 80 a0 60 00 cmp %g1, 0
200f430: 02 80 00 18 be 200f490 <rtems_bdbuf_sync+0x74> <== NEVER TAKEN
200f434: 84 10 20 16 mov 0x16, %g2
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
200f438: 80 a6 20 00 cmp %i0, 0
200f43c: 02 80 00 17 be 200f498 <rtems_bdbuf_sync+0x7c> <== NEVER TAKEN
200f440: 84 10 20 09 mov 9, %g2
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
200f444: 7f ff f7 96 call 200d29c <rtems_bdbuf_lock_cache>
200f448: 01 00 00 00 nop
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
200f44c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200f450: 80 a2 20 03 cmp %o0, 3
200f454: 0a 80 00 08 bcs 200f474 <rtems_bdbuf_sync+0x58> <== NEVER TAKEN
200f458: 13 10 80 00 sethi %hi(0x42000000), %o1
200f45c: 80 a2 20 05 cmp %o0, 5
200f460: 08 80 00 10 bleu 200f4a0 <rtems_bdbuf_sync+0x84>
200f464: 82 10 20 08 mov 8, %g1
200f468: 80 a2 20 06 cmp %o0, 6
200f46c: 02 80 00 04 be 200f47c <rtems_bdbuf_sync+0x60> <== ALWAYS TAKEN
200f470: 01 00 00 00 nop
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
200f474: 7f ff f7 a6 call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200f478: 92 12 60 03 or %o1, 3, %o1 <== NOT EXECUTED
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);
200f47c: 7f ff fa 41 call 200dd80 <rtems_bdbuf_discard_buffer_after_access>
200f480: 90 10 00 18 mov %i0, %o0
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
200f484: 7f ff f8 0b call 200d4b0 <rtems_bdbuf_unlock_cache>
200f488: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
200f48c: 84 10 20 00 clr %g2 ! 0 <PROM_START>
}
200f490: 81 c7 e0 08 ret
200f494: 91 e8 00 02 restore %g0, %g2, %o0
200f498: 81 c7 e0 08 ret <== NOT EXECUTED
200f49c: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED
200f4a0: 90 07 60 58 add %i5, 0x58, %o0
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f4a4: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
200f4a8: 7f ff ea 2e call 2009d60 <_Chain_Append>
200f4ac: 92 10 00 18 mov %i0, %o1
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
200f4b0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200f4b4: 80 a0 60 00 cmp %g1, 0
200f4b8: 12 80 00 22 bne 200f540 <rtems_bdbuf_sync+0x124>
200f4bc: 01 00 00 00 nop
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
rtems_bdbuf_wake_swapper ();
200f4c0: 7f ff f8 14 call 200d510 <rtems_bdbuf_wake_swapper>
200f4c4: 3b 00 80 83 sethi %hi(0x2020c00), %i5
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);
200f4c8: ba 17 63 50 or %i5, 0x350, %i5 ! 2020f50 <bdbuf_cache+0x6c>
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200f4cc: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200f4d0: 80 a2 20 01 cmp %o0, 1
200f4d4: 1a 80 00 05 bcc 200f4e8 <rtems_bdbuf_sync+0xcc> <== ALWAYS TAKEN
200f4d8: 80 a2 20 07 cmp %o0, 7
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
200f4dc: 13 10 80 00 sethi %hi(0x42000000), %o1 <== NOT EXECUTED
200f4e0: 7f ff f7 8b call 200d30c <rtems_bdbuf_fatal> <== NOT EXECUTED
200f4e4: 92 12 60 07 or %o1, 7, %o1 ! 42000007 <RAM_END+0x3fc00007><== NOT EXECUTED
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200f4e8: 28 80 00 0a bleu,a 200f510 <rtems_bdbuf_sync+0xf4>
200f4ec: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200f4f0: 80 a2 20 0a cmp %o0, 0xa
200f4f4: 18 bf ff fb bgu 200f4e0 <rtems_bdbuf_sync+0xc4> <== NEVER TAKEN
200f4f8: 13 10 80 00 sethi %hi(0x42000000), %o1
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);
200f4fc: 90 10 00 18 mov %i0, %o0
200f500: 7f ff f8 68 call 200d6a0 <rtems_bdbuf_wait>
200f504: 92 10 00 1d mov %i5, %o1
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
200f508: 10 bf ff f2 b 200f4d0 <rtems_bdbuf_sync+0xb4>
200f50c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
200f510: 80 a0 60 00 cmp %g1, 0
200f514: 12 bf ff dc bne 200f484 <rtems_bdbuf_sync+0x68>
200f518: 82 02 3f ff add %o0, -1, %g1
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
200f51c: 80 a0 60 01 cmp %g1, 1
200f520: 18 bf ff d9 bgu 200f484 <rtems_bdbuf_sync+0x68> <== NEVER TAKEN
200f524: 80 a2 20 01 cmp %o0, 1
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
200f528: 02 80 00 09 be 200f54c <rtems_bdbuf_sync+0x130>
200f52c: 01 00 00 00 nop
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200f530: 11 00 80 83 sethi %hi(0x2020c00), %o0
200f534: 7f ff f8 be call 200d82c <rtems_bdbuf_wake>
200f538: 90 12 23 58 or %o0, 0x358, %o0 ! 2020f58 <bdbuf_cache+0x74>
200f53c: 30 bf ff d2 b,a 200f484 <rtems_bdbuf_sync+0x68>
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
200f540: 7f ff f8 bb call 200d82c <rtems_bdbuf_wake>
200f544: 90 07 60 64 add %i5, 0x64, %o0
200f548: 30 bf ff de b,a 200f4c0 <rtems_bdbuf_sync+0xa4>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
200f54c: 7f ff f9 05 call 200d960 <rtems_bdbuf_remove_from_tree>
200f550: 90 10 00 18 mov %i0, %o0
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
200f554: 92 10 00 18 mov %i0, %o1
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
200f558: c0 26 20 20 clr [ %i0 + 0x20 ]
200f55c: 11 00 80 83 sethi %hi(0x2020c00), %o0
200f560: 40 00 08 28 call 2011600 <_Chain_Insert>
200f564: 90 12 23 24 or %o0, 0x324, %o0 ! 2020f24 <bdbuf_cache+0x40>
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
200f568: 10 bf ff f3 b 200f534 <rtems_bdbuf_sync+0x118>
200f56c: 11 00 80 83 sethi %hi(0x2020c00), %o0
0200f570 <rtems_bdbuf_syncdev>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (const rtems_disk_device *dd)
{
200f570: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dd->dev);
sc = rtems_bdbuf_obtain_disk (dd, 0, NULL, NULL);
200f574: 92 10 20 00 clr %o1
200f578: 90 10 00 18 mov %i0, %o0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_syncdev (const rtems_disk_device *dd)
{
200f57c: ba 10 00 18 mov %i0, %i5
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (rtems_bdbuf_tracer)
printf ("bdbuf:syncdev: %08x\n", (unsigned) dd->dev);
sc = rtems_bdbuf_obtain_disk (dd, 0, NULL, NULL);
200f580: 94 10 20 00 clr %o2
200f584: 7f ff f8 71 call 200d748 <rtems_bdbuf_obtain_disk>
200f588: 96 10 20 00 clr %o3
if (sc != RTEMS_SUCCESSFUL)
200f58c: b0 92 20 00 orcc %o0, 0, %i0
200f590: 02 80 00 04 be 200f5a0 <rtems_bdbuf_syncdev+0x30> <== ALWAYS TAKEN
200f594: 01 00 00 00 nop
rtems_bdbuf_unlock_cache ();
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
rtems_bdbuf_unlock_sync ();
return RTEMS_SUCCESSFUL;
}
200f598: 81 c7 e0 08 ret <== NOT EXECUTED
200f59c: 81 e8 00 00 restore <== NOT EXECUTED
* Take the sync lock before locking the cache. Once we have the sync lock we
* can lock the cache. If another thread has the sync lock it will cause this
* thread to block until it owns the sync lock then it can own the cache. The
* sync lock can only be obtained with the cache unlocked.
*/
rtems_bdbuf_lock_sync ();
200f5a0: 7f ff f7 4d call 200d2d4 <rtems_bdbuf_lock_sync>
200f5a4: 39 00 80 83 sethi %hi(0x2020c00), %i4
rtems_bdbuf_lock_cache ();
200f5a8: 7f ff f7 3d call 200d29c <rtems_bdbuf_lock_cache>
200f5ac: b8 17 22 e4 or %i4, 0x2e4, %i4 ! 2020ee4 <bdbuf_cache>
* out task know the id of the requester to wake when done.
*
* The swap out task will negate the sync active flag when no more buffers
* for the device are held on the "modified for sync" queues.
*/
bdbuf_cache.sync_active = true;
200f5b0: 82 10 20 01 mov 1, %g1
bdbuf_cache.sync_requester = rtems_task_self ();
200f5b4: 40 00 07 35 call 2011288 <rtems_task_self>
200f5b8: c2 2f 20 30 stb %g1, [ %i4 + 0x30 ]
bdbuf_cache.sync_device = dd;
200f5bc: fa 27 20 38 st %i5, [ %i4 + 0x38 ]
rtems_bdbuf_wake_swapper ();
200f5c0: 7f ff f7 d4 call 200d510 <rtems_bdbuf_wake_swapper>
200f5c4: d0 27 20 34 st %o0, [ %i4 + 0x34 ]
rtems_bdbuf_unlock_cache ();
200f5c8: 7f ff f7 ba call 200d4b0 <rtems_bdbuf_unlock_cache>
200f5cc: 01 00 00 00 nop
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_TRANSFER_SYNC);
200f5d0: 7f ff f7 e4 call 200d560 <rtems_bdbuf_wait_for_event>
200f5d4: 90 10 20 02 mov 2, %o0 ! 2 <PROM_START+0x2>
rtems_bdbuf_unlock_sync ();
200f5d8: 7f ff f7 c2 call 200d4e0 <rtems_bdbuf_unlock_sync>
200f5dc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
200f5e0: 81 c7 e0 08 ret
200f5e4: 81 e8 00 00 restore
0200d4b0 <rtems_bdbuf_unlock_cache>:
/**
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
200d4b0: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_unlock (bdbuf_cache.lock, RTEMS_BLKDEV_FATAL_BDBUF_CACHE_UNLOCK);
200d4b4: 03 00 80 83 sethi %hi(0x2020c00), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200d4b8: 7f ff ef 72 call 2009280 <rtems_semaphore_release>
200d4bc: d0 00 63 0c ld [ %g1 + 0x30c ], %o0 ! 2020f0c <bdbuf_cache+0x28>
if (sc != RTEMS_SUCCESSFUL)
200d4c0: 80 a2 20 00 cmp %o0, 0
200d4c4: 12 80 00 04 bne 200d4d4 <rtems_bdbuf_unlock_cache+0x24> <== NEVER TAKEN
200d4c8: 11 10 80 00 sethi %hi(0x42000000), %o0
200d4cc: 81 c7 e0 08 ret
200d4d0: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200d4d4: 7f ff f0 cb call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d4d8: 90 12 20 0e or %o0, 0xe, %o0 <== NOT EXECUTED
0200d4e0 <rtems_bdbuf_unlock_sync>:
/**
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
200d4e0: 9d e3 bf a0 save %sp, -96, %sp
rtems_bdbuf_unlock (bdbuf_cache.sync_lock,
200d4e4: 03 00 80 83 sethi %hi(0x2020c00), %g1
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
rtems_status_code sc = rtems_semaphore_release (lock);
200d4e8: 7f ff ef 66 call 2009280 <rtems_semaphore_release>
200d4ec: d0 00 63 10 ld [ %g1 + 0x310 ], %o0 ! 2020f10 <bdbuf_cache+0x2c>
if (sc != RTEMS_SUCCESSFUL)
200d4f0: 80 a2 20 00 cmp %o0, 0
200d4f4: 12 80 00 04 bne 200d504 <rtems_bdbuf_unlock_sync+0x24> <== NEVER TAKEN
200d4f8: 11 10 80 00 sethi %hi(0x42000000), %o0
200d4fc: 81 c7 e0 08 ret
200d500: 81 e8 00 00 restore
rtems_fatal_error_occurred (fatal_error_code);
200d504: 7f ff f0 bf call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d508: 90 12 20 0c or %o0, 0xc, %o0 <== NOT EXECUTED
0200d560 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
200d560: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
200d564: 92 10 20 00 clr %o1
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
200d568: c0 27 bf fc clr [ %fp + -4 ]
sc = rtems_event_receive (event,
200d56c: 90 10 00 18 mov %i0, %o0
200d570: 94 10 20 00 clr %o2
200d574: 7f ff ed 57 call 2008ad0 <rtems_event_receive>
200d578: 96 07 bf fc add %fp, -4, %o3
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
200d57c: 80 a2 20 00 cmp %o0, 0
200d580: 12 80 00 07 bne 200d59c <rtems_bdbuf_wait_for_event+0x3c> <== NEVER TAKEN
200d584: c2 07 bf fc ld [ %fp + -4 ], %g1
200d588: 80 a0 40 18 cmp %g1, %i0
200d58c: 12 80 00 05 bne 200d5a0 <rtems_bdbuf_wait_for_event+0x40> <== NEVER TAKEN
200d590: 11 10 80 00 sethi %hi(0x42000000), %o0
200d594: 81 c7 e0 08 ret
200d598: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
200d59c: 11 10 80 00 sethi %hi(0x42000000), %o0 <== NOT EXECUTED
200d5a0: 7f ff f0 98 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d5a4: 90 12 20 1a or %o0, 0x1a, %o0 ! 4200001a <RAM_END+0x3fc0001a><== NOT EXECUTED
0200d82c <rtems_bdbuf_wake>:
* 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)
{
200d82c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
200d830: c2 06 00 00 ld [ %i0 ], %g1
200d834: 80 a0 60 00 cmp %g1, 0
200d838: 12 80 00 04 bne 200d848 <rtems_bdbuf_wake+0x1c>
200d83c: 01 00 00 00 nop
200d840: 81 c7 e0 08 ret
200d844: 81 e8 00 00 restore
{
sc = rtems_semaphore_flush (waiters->sema);
200d848: 40 00 0d f7 call 2011024 <rtems_semaphore_flush>
200d84c: d0 06 20 04 ld [ %i0 + 4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
200d850: 80 a2 20 00 cmp %o0, 0
200d854: 02 bf ff fb be 200d840 <rtems_bdbuf_wake+0x14> <== ALWAYS TAKEN
200d858: 11 10 80 00 sethi %hi(0x42000000), %o0
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
200d85c: 7f ff ef e9 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d860: 90 12 20 13 or %o0, 0x13, %o0 ! 42000013 <RAM_END+0x3fc00013><== NOT EXECUTED
0200d510 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
200d510: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
200d514: 03 00 80 83 sethi %hi(0x2020c00), %g1
200d518: d0 00 62 e4 ld [ %g1 + 0x2e4 ], %o0 ! 2020ee4 <bdbuf_cache>
200d51c: 7f ff ed d0 call 2008c5c <rtems_event_send>
200d520: 92 10 20 04 mov 4, %o1
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
200d524: 80 a2 20 00 cmp %o0, 0
200d528: 12 80 00 04 bne 200d538 <rtems_bdbuf_wake_swapper+0x28> <== NEVER TAKEN
200d52c: 11 10 80 00 sethi %hi(0x42000000), %o0
200d530: 81 c7 e0 08 ret
200d534: 81 e8 00 00 restore
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
200d538: 7f ff f0 b2 call 2009800 <rtems_fatal_error_occurred> <== NOT EXECUTED
200d53c: 90 12 20 14 or %o0, 0x14, %o0 <== NOT EXECUTED
0202676c <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
202676c: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
2026770: 80 a6 60 00 cmp %i1, 0
2026774: 02 80 00 06 be 202678c <rtems_bdpart_create+0x20> <== NEVER TAKEN
2026778: 90 10 00 18 mov %i0, %o0
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
202677c: c2 06 40 00 ld [ %i1 ], %g1
2026780: 80 a0 60 00 cmp %g1, 0
2026784: 22 80 00 0f be,a 20267c0 <rtems_bdpart_create+0x54> <== ALWAYS TAKEN
2026788: c2 0e 60 08 ldub [ %i1 + 8 ], %g1
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
202678c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
const unsigned *dist,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
2026790: a0 10 20 00 clr %l0 <== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
2026794: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
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) {
2026798: 80 a7 20 00 cmp %i4, 0
202679c: 02 80 00 05 be 20267b0 <rtems_bdpart_create+0x44> <== NEVER TAKEN
20267a0: b0 10 20 00 clr %i0
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
20267a4: 80 a6 a0 00 cmp %i2, 0
20267a8: 12 80 00 0c bne 20267d8 <rtems_bdpart_create+0x6c> <== ALWAYS TAKEN
20267ac: b0 10 20 09 mov 9, %i0
20267b0: 81 c7 e0 08 ret <== NOT EXECUTED
20267b4: 81 e8 00 00 restore <== NOT EXECUTED
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
}
20267b8: 81 c7 e0 08 ret <== NOT EXECUTED
20267bc: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
20267c0: 80 a0 60 00 cmp %g1, 0
20267c4: 02 bf ff f3 be 2026790 <rtems_bdpart_create+0x24> <== NEVER TAKEN
20267c8: c0 27 bf fc clr [ %fp + -4 ]
const unsigned *dist,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
20267cc: a0 10 20 01 mov 1, %l0
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
20267d0: 10 bf ff f2 b 2026798 <rtems_bdpart_create+0x2c>
20267d4: ba 10 20 3f mov 0x3f, %i5
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
20267d8: 80 a6 60 00 cmp %i1, 0
20267dc: 02 bf ff f5 be 20267b0 <rtems_bdpart_create+0x44> <== NEVER TAKEN
20267e0: 80 a6 e0 00 cmp %i3, 0
20267e4: 02 bf ff f3 be 20267b0 <rtems_bdpart_create+0x44> <== NEVER TAKEN
20267e8: 92 10 20 00 clr %o1
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);
20267ec: 94 10 20 00 clr %o2
20267f0: 40 00 01 ec call 2026fa0 <rtems_bdpart_get_disk_data>
20267f4: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
20267f8: b0 92 20 00 orcc %o0, 0, %i0
20267fc: 12 bf ff ed bne 20267b0 <rtems_bdpart_create+0x44> <== NEVER TAKEN
2026800: 82 10 20 00 clr %g1
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
2026804: e4 06 c0 00 ld [ %i3 ], %l2
if (dist_sum < prev_sum) {
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
2026808: 80 a4 a0 00 cmp %l2, 0
202680c: 12 80 00 0b bne 2026838 <rtems_bdpart_create+0xcc> <== ALWAYS TAKEN
2026810: a2 10 00 12 mov %l2, %l1
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
if (s < free_space || s < dist [i]) {
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
2026814: 81 c7 e0 08 ret <== NOT EXECUTED
2026818: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
202681c: c4 06 c0 02 ld [ %i3 + %g2 ], %g2
2026820: 86 00 80 11 add %g2, %l1, %g3
if (dist_sum < prev_sum) {
2026824: 80 a0 c0 11 cmp %g3, %l1
2026828: 0a 80 00 0e bcs 2026860 <rtems_bdpart_create+0xf4> <== NEVER TAKEN
202682c: 80 a0 a0 00 cmp %g2, 0
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
2026830: 02 80 00 0c be 2026860 <rtems_bdpart_create+0xf4> <== NEVER TAKEN
2026834: a2 10 00 03 mov %g3, %l1
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
2026838: 82 00 60 01 inc %g1
202683c: 80 a0 40 1c cmp %g1, %i4
2026840: 12 bf ff f7 bne 202681c <rtems_bdpart_create+0xb0>
2026844: 85 28 60 02 sll %g1, 2, %g2
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
2026848: c2 06 40 00 ld [ %i1 ], %g1
202684c: 80 a0 60 00 cmp %g1, 0
2026850: 02 80 00 06 be 2026868 <rtems_bdpart_create+0xfc> <== ALWAYS TAKEN
2026854: a0 8c 20 ff andcc %l0, 0xff, %l0
return RTEMS_NOT_IMPLEMENTED;
2026858: 81 c7 e0 08 ret <== NOT EXECUTED
202685c: 91 e8 20 18 restore %g0, 0x18, %o0 <== NOT EXECUTED
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
if (s < free_space || s < dist [i]) {
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
2026860: 81 c7 e0 08 ret <== NOT EXECUTED
2026864: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
2026868: 02 80 00 06 be 2026880 <rtems_bdpart_create+0x114> <== NEVER TAKEN
202686c: ec 07 bf fc ld [ %fp + -4 ], %l6
disk_end -= (disk_end % record_space);
2026870: 90 10 00 16 mov %l6, %o0
2026874: 40 00 e9 36 call 2060d4c <.urem>
2026878: 92 10 00 1d mov %i5, %o1
202687c: ac 25 80 08 sub %l6, %o0, %l6
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
2026880: 80 a7 20 04 cmp %i4, 4
2026884: 08 80 00 06 bleu 202689c <rtems_bdpart_create+0x130> <== NEVER TAKEN
2026888: aa 10 00 1d mov %i5, %l5
overhead += (count - 3) * record_space;
202688c: 90 10 00 1d mov %i5, %o0
2026890: 7f ff 71 94 call 2002ee0 <.umul>
2026894: 92 07 3f fd add %i4, -3, %o1
2026898: aa 02 00 1d add %o0, %i5, %l5
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
202689c: 80 a4 20 00 cmp %l0, 0
20268a0: 02 80 00 07 be 20268bc <rtems_bdpart_create+0x150> <== NEVER TAKEN
20268a4: 82 05 40 1c add %l5, %i4, %g1
overhead += (count - 1) * record_space;
20268a8: 90 10 00 1d mov %i5, %o0
20268ac: 7f ff 71 8d call 2002ee0 <.umul>
20268b0: 92 07 3f ff add %i4, -1, %o1
20268b4: aa 05 40 08 add %l5, %o0, %l5
}
/* Check disk space */
if ((overhead + count) > disk_end) {
20268b8: 82 05 40 1c add %l5, %i4, %g1
20268bc: 80 a0 40 16 cmp %g1, %l6
20268c0: 08 80 00 04 bleu 20268d0 <rtems_bdpart_create+0x164> <== ALWAYS TAKEN
20268c4: aa 25 80 15 sub %l6, %l5, %l5
return RTEMS_IO_ERROR;
20268c8: 81 c7 e0 08 ret <== NOT EXECUTED
20268cc: 91 e8 20 1b restore %g0, 0x1b, %o0 <== NOT EXECUTED
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
20268d0: 92 10 00 12 mov %l2, %o1
20268d4: 7f ff 71 83 call 2002ee0 <.umul>
20268d8: 90 10 00 15 mov %l5, %o0
if (s < free_space || s < dist [i]) {
20268dc: 80 a5 40 08 cmp %l5, %o0
20268e0: 18 bf ff e0 bgu 2026860 <rtems_bdpart_create+0xf4> <== NEVER TAKEN
20268e4: 80 a4 80 08 cmp %l2, %o0
20268e8: 18 bf ff de bgu 2026860 <rtems_bdpart_create+0xf4> <== NEVER TAKEN
20268ec: 80 a7 20 04 cmp %i4, 4
20268f0: 18 80 00 03 bgu 20268fc <rtems_bdpart_create+0x190> <== ALWAYS TAKEN
20268f4: ae 10 20 01 mov 1, %l7
20268f8: ae 10 20 00 clr %l7 <== NOT EXECUTED
#endif
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_create(
20268fc: a8 06 a0 30 add %i2, 0x30, %l4
2026900: a6 10 00 1a mov %i2, %l3
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
}
/* Begin of first primary partition */
pos = record_space;
2026904: a0 10 00 1d mov %i5, %l0
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
2026908: b2 10 20 00 clr %i1
/* Align partition upwards */
s += record_space - (s % record_space);
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
202690c: 10 80 00 0c b 202693c <rtems_bdpart_create+0x1d0>
2026910: ae 0d e0 ff and %l7, 0xff, %l7
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
2026914: e4 06 c0 01 ld [ %i3 + %g1 ], %l2
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
2026918: a6 10 00 14 mov %l4, %l3
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
202691c: 7f ff 71 71 call 2002ee0 <.umul>
2026920: 90 10 00 12 mov %l2, %o0
if (s < free_space || s < dist [i]) {
2026924: 80 a5 40 08 cmp %l5, %o0
2026928: 18 bf ff ce bgu 2026860 <rtems_bdpart_create+0xf4> <== NEVER TAKEN
202692c: 82 10 00 08 mov %o0, %g1
2026930: 80 a4 80 01 cmp %l2, %g1
2026934: 18 bf ff a1 bgu 20267b8 <rtems_bdpart_create+0x4c> <== NEVER TAKEN
2026938: a8 05 20 30 add %l4, 0x30, %l4
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
202693c: 40 00 e8 58 call 2060a9c <.udiv>
2026940: 92 10 00 11 mov %l1, %o1
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
2026944: 92 10 00 1d mov %i5, %o1
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
/* Ensure that the partition is not empty */
if (s == 0) {
2026948: 80 a2 20 00 cmp %o0, 0
202694c: 12 80 00 03 bne 2026958 <rtems_bdpart_create+0x1ec> <== ALWAYS TAKEN
2026950: a4 10 00 08 mov %o0, %l2
s = 1;
2026954: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
}
/* Align partition upwards */
s += record_space - (s % record_space);
2026958: 40 00 e8 fd call 2060d4c <.urem>
202695c: 90 10 00 12 mov %l2, %o0
2026960: a4 04 80 1d add %l2, %i5, %l2
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
2026964: 92 10 00 15 mov %l5, %o1
/* Align partition upwards */
s += record_space - (s % record_space);
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
2026968: 82 10 20 01 mov 1, %g1
202696c: 80 a6 60 02 cmp %i1, 2
2026970: 18 80 00 03 bgu 202697c <rtems_bdpart_create+0x210>
2026974: a4 24 80 08 sub %l2, %o0, %l2
2026978: 82 10 20 00 clr %g1
202697c: 80 88 60 ff btst 0xff, %g1
2026980: 22 80 00 06 be,a 2026998 <rtems_bdpart_create+0x22c>
2026984: e0 24 c0 00 st %l0, [ %l3 ]
2026988: 80 a5 e0 00 cmp %l7, 0
202698c: 32 80 00 02 bne,a 2026994 <rtems_bdpart_create+0x228> <== ALWAYS TAKEN
2026990: a0 04 00 1d add %l0, %i5, %l0
pos += record_space;
}
/* Partition begin and end */
p->begin = pos;
2026994: e0 24 c0 00 st %l0, [ %l3 ]
pos += s;
2026998: a0 04 00 12 add %l0, %l2, %l0
p->end = pos;
202699c: e0 24 e0 04 st %l0, [ %l3 + 4 ]
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
20269a0: b2 06 60 01 inc %i1
20269a4: 80 a7 00 19 cmp %i4, %i1
20269a8: 18 bf ff db bgu 2026914 <rtems_bdpart_create+0x1a8>
20269ac: 83 2e 60 02 sll %i1, 2, %g1
pos += s;
p->end = pos;
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
20269b0: b8 07 3f ff add %i4, -1, %i4
20269b4: 83 2f 20 04 sll %i4, 4, %g1
20269b8: b9 2f 20 06 sll %i4, 6, %i4
20269bc: 82 27 00 01 sub %i4, %g1, %g1
20269c0: b4 06 80 01 add %i2, %g1, %i2
20269c4: ec 26 a0 04 st %l6, [ %i2 + 4 ]
return RTEMS_SUCCESSFUL;
20269c8: 81 c7 e0 08 ret
20269cc: 81 e8 00 00 restore
020269d0 <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
20269d0: 9d e3 bf 68 save %sp, -152, %sp
size_t i = 0;
printf(
20269d4: 11 00 81 a2 sethi %hi(0x2068800), %o0
20269d8: 40 00 95 19 call 204be3c <puts>
20269dc: 90 12 20 08 or %o0, 8, %o0 ! 2068808 <rtems_rfs_rtems_eval_config+0xe60>
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
20269e0: 80 a6 60 00 cmp %i1, 0
20269e4: 02 80 00 3d be 2026ad8 <rtems_bdpart_dump+0x108> <== NEVER TAKEN
20269e8: 11 00 81 a2 sethi %hi(0x2068800), %o0
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
20269ec: 27 00 81 a2 sethi %hi(0x2068800), %l3
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
20269f0: 39 00 81 a2 sethi %hi(0x2068800), %i4
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
20269f4: ba 10 20 00 clr %i5
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
20269f8: 37 00 81 a1 sethi %hi(0x2068400), %i3
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
20269fc: a6 14 e1 48 or %l3, 0x148, %l3
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
2026a00: 21 00 81 a1 sethi %hi(0x2068400), %l0
break;
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
2026a04: 23 00 81 a1 sethi %hi(0x2068400), %l1
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
2026a08: 25 00 81 a1 sethi %hi(0x2068400), %l2
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";
2026a0c: 35 00 81 a1 sethi %hi(0x2068400), %i2
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
2026a10: 10 80 00 1d b 2026a84 <rtems_bdpart_dump+0xb4>
2026a14: b8 17 21 50 or %i4, 0x150, %i4
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
2026a18: 80 a0 60 0b cmp %g1, 0xb
2026a1c: 02 80 00 12 be 2026a64 <rtems_bdpart_dump+0x94> <== ALWAYS TAKEN
2026a20: 96 16 e3 f0 or %i3, 0x3f0, %o3
2026a24: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
2026a28: 18 80 00 30 bgu 2026ae8 <rtems_bdpart_dump+0x118> <== NOT EXECUTED
2026a2c: 80 a0 60 0e cmp %g1, 0xe <== NOT EXECUTED
2026a30: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2026a34: 02 80 00 0c be 2026a64 <rtems_bdpart_dump+0x94> <== NOT EXECUTED
2026a38: 96 16 a3 d0 or %i2, 0x3d0, %o3 <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
2026a3c: 17 00 81 a1 sethi %hi(0x2068400), %o3 <== NOT EXECUTED
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
2026a40: 80 a0 60 04 cmp %g1, 4 <== NOT EXECUTED
2026a44: 02 80 00 08 be 2026a64 <rtems_bdpart_dump+0x94> <== NOT EXECUTED
2026a48: 96 12 e3 c8 or %o3, 0x3c8, %o3 <== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
2026a4c: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED
2026a50: 90 07 bf c8 add %fp, -56, %o0 <== NOT EXECUTED
2026a54: 92 10 20 34 mov 0x34, %o1 <== NOT EXECUTED
2026a58: 40 00 9a 87 call 204d474 <snprintf> <== NOT EXECUTED
2026a5c: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
type = type_buffer;
2026a60: 96 07 bf c8 add %fp, -56, %o3 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
2026a64: d2 06 00 00 ld [ %i0 ], %o1
2026a68: d4 06 20 04 ld [ %i0 + 4 ], %o2
2026a6c: 40 00 94 59 call 204bbd0 <printf>
2026a70: 90 10 00 1c mov %i4, %o0
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
2026a74: ba 07 60 01 inc %i5
2026a78: 80 a7 40 19 cmp %i5, %i1
2026a7c: 02 80 00 16 be 2026ad4 <rtems_bdpart_dump+0x104>
2026a80: b0 06 20 30 add %i0, 0x30, %i0
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
2026a84: c0 2f bf ff clrb [ %fp + -1 ]
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
2026a88: a8 06 20 08 add %i0, 8, %l4
2026a8c: 92 07 bf ff add %fp, -1, %o1
2026a90: 40 00 01 38 call 2026f70 <rtems_bdpart_to_mbr_partition_type>
2026a94: 90 10 00 14 mov %l4, %o0
2026a98: 80 8a 20 ff btst 0xff, %o0
2026a9c: 12 bf ff df bne 2026a18 <rtems_bdpart_dump+0x48> <== ALWAYS TAKEN
2026aa0: c2 0f bf ff ldub [ %fp + -1 ], %g1
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
2026aa4: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
2026aa8: 40 00 6f 39 call 204278c <uuid_unparse_lower> <== NOT EXECUTED
2026aac: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
2026ab0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
2026ab4: d4 06 20 04 ld [ %i0 + 4 ], %o2 <== NOT EXECUTED
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
2026ab8: 96 07 bf c8 add %fp, -56, %o3 <== NOT EXECUTED
}
printf(
2026abc: 40 00 94 45 call 204bbd0 <printf> <== NOT EXECUTED
2026ac0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
2026ac4: ba 07 60 01 inc %i5 <== NOT EXECUTED
2026ac8: 80 a7 40 19 cmp %i5, %i1 <== NOT EXECUTED
2026acc: 12 bf ff ee bne 2026a84 <rtems_bdpart_dump+0xb4> <== NOT EXECUTED
2026ad0: b0 06 20 30 add %i0, 0x30, %i0 <== NOT EXECUTED
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
2026ad4: 11 00 81 a2 sethi %hi(0x2068800), %o0
2026ad8: 40 00 94 d9 call 204be3c <puts>
2026adc: 90 12 20 f8 or %o0, 0xf8, %o0 ! 20688f8 <rtems_rfs_rtems_eval_config+0xf50>
}
2026ae0: 81 c7 e0 08 ret
2026ae4: 81 e8 00 00 restore
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
switch (type_mbr) {
2026ae8: 02 bf ff df be 2026a64 <rtems_bdpart_dump+0x94> <== NOT EXECUTED
2026aec: 96 14 23 f8 or %l0, 0x3f8, %o3 <== NOT EXECUTED
2026af0: 80 a0 60 da cmp %g1, 0xda <== NOT EXECUTED
2026af4: 02 bf ff dc be 2026a64 <rtems_bdpart_dump+0x94> <== NOT EXECUTED
2026af8: 96 14 63 d8 or %l1, 0x3d8, %o3 <== NOT EXECUTED
2026afc: 80 a0 60 0c cmp %g1, 0xc <== NOT EXECUTED
2026b00: 12 bf ff d3 bne 2026a4c <rtems_bdpart_dump+0x7c> <== NOT EXECUTED
2026b04: 96 14 a3 e0 or %l2, 0x3e0, %o3 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
2026b08: 10 bf ff d8 b 2026a68 <rtems_bdpart_dump+0x98> <== NOT EXECUTED
2026b0c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
02026fa0 <rtems_bdpart_get_disk_data>:
const char *disk_name,
int *fd_ptr,
const rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
2026fa0: 9d e3 bf 98 save %sp, -104, %sp
const 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);
2026fa4: 92 10 20 02 mov 2, %o1
2026fa8: 90 10 00 18 mov %i0, %o0
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rv = 0;
int fd = -1;
const rtems_disk_device *dd = NULL;
2026fac: c0 27 bf fc clr [ %fp + -4 ]
rtems_blkdev_bnum disk_begin = 0;
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
2026fb0: 7f ff 8b 86 call 2009dc8 <open>
2026fb4: b0 10 20 03 mov 3, %i0
if (fd < 0) {
2026fb8: 80 a2 20 00 cmp %o0, 0
2026fbc: 16 80 00 06 bge 2026fd4 <rtems_bdpart_get_disk_data+0x34> <== ALWAYS TAKEN
2026fc0: ba 10 00 08 mov %o0, %i5
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
*fd_ptr = fd;
*dd_ptr = dd;
} else {
close( fd);
2026fc4: 7f ff 86 cc call 2008af4 <close> <== NOT EXECUTED
2026fc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
return sc;
}
2026fcc: 81 c7 e0 08 ret <== NOT EXECUTED
2026fd0: 81 e8 00 00 restore <== NOT EXECUTED
static inline int rtems_disk_fd_get_disk_device(
int fd,
const rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
2026fd4: 94 07 bf fc add %fp, -4, %o2
2026fd8: 13 10 01 10 sethi %hi(0x40044000), %o1
2026fdc: 7f ff 87 da call 2008f44 <ioctl>
2026fe0: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <RAM_END+0x3dc44209>
goto error;
}
/* Get disk handle */
rv = rtems_disk_fd_get_disk_device( fd, &dd);
if (rv != 0) {
2026fe4: 80 a2 20 00 cmp %o0, 0
2026fe8: 12 bf ff f7 bne 2026fc4 <rtems_bdpart_get_disk_data+0x24> <== NEVER TAKEN
2026fec: c2 07 bf fc ld [ %fp + -4 ], %g1
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
*disk_end = dd->size;
2026ff0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
sc = RTEMS_INVALID_NAME;
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
2026ff4: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
*disk_end = dd->size;
2026ff8: c4 26 c0 00 st %g2, [ %i3 ]
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
2026ffc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2
2027000: 80 a0 a1 ff cmp %g2, 0x1ff
2027004: 08 bf ff f0 bleu 2026fc4 <rtems_bdpart_get_disk_data+0x24><== NEVER TAKEN
2027008: b0 10 20 1b mov 0x1b, %i0
sc = RTEMS_IO_ERROR;
goto error;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
202700c: 80 a0 e0 00 cmp %g3, 0
2027010: 12 bf ff ed bne 2026fc4 <rtems_bdpart_get_disk_data+0x24> <== NEVER TAKEN
2027014: 80 a6 60 00 cmp %i1, 0
goto error;
}
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
2027018: 02 80 00 08 be 2027038 <rtems_bdpart_get_disk_data+0x98>
202701c: 80 a6 a0 00 cmp %i2, 0
2027020: 02 80 00 07 be 202703c <rtems_bdpart_get_disk_data+0x9c> <== NEVER TAKEN
2027024: b0 10 20 00 clr %i0
*fd_ptr = fd;
2027028: fa 26 40 00 st %i5, [ %i1 ]
*dd_ptr = dd;
202702c: c2 26 80 00 st %g1, [ %i2 ]
2027030: 81 c7 e0 08 ret
2027034: 81 e8 00 00 restore
int *fd_ptr,
const rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
2027038: b0 10 20 00 clr %i0
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
*fd_ptr = fd;
*dd_ptr = dd;
} else {
close( fd);
202703c: 7f ff 86 ae call 2008af4 <close>
2027040: 90 10 00 1d mov %i5, %o0
}
return sc;
}
2027044: 81 c7 e0 08 ret
2027048: 81 e8 00 00 restore
02026b10 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
2026b10: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
2026b14: 92 10 20 2f mov 0x2f, %o1 <== NOT EXECUTED
2026b18: 40 00 a2 26 call 204f3b0 <strrchr> <== NOT EXECUTED
2026b1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2026b20: b2 10 00 08 mov %o0, %i1 <== 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);
2026b24: 40 00 9d e8 call 204e2c4 <strlen> <== NOT EXECUTED
2026b28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2026b2c: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
2026b30: 40 00 9d e5 call 204e2c4 <strlen> <== NOT EXECUTED
2026b34: 90 10 00 1b mov %i3, %o0 <== 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;
2026b38: a8 10 20 1a mov 0x1a, %l4 <== NOT EXECUTED
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);
size_t mount_base_size = strlen( mount_base);
2026b3c: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
2026b40: 7f ff 8a 32 call 2009408 <malloc> <== NOT EXECUTED
2026b44: 90 07 20 04 add %i4, 4, %o0 <== NOT EXECUTED
if (logical_disk_name == NULL) {
2026b48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026b4c: 02 80 00 51 be 2026c90 <rtems_bdpart_mount+0x180> <== NOT EXECUTED
2026b50: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
2026b54: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2026b58: 40 00 9e a1 call 204e5dc <strncpy> <== NOT EXECUTED
2026b5c: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
if (disk_file_name != NULL) {
disk_file_name += 1;
disk_file_name_size = strlen( disk_file_name);
} else {
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
2026b60: a0 10 00 1c mov %i4, %l0 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
/* Get disk file name */
if (disk_file_name != NULL) {
2026b64: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2026b68: 02 80 00 06 be 2026b80 <rtems_bdpart_mount+0x70> <== NOT EXECUTED
2026b6c: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED
disk_file_name += 1;
2026b70: a4 06 60 01 add %i1, 1, %l2 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
2026b74: 40 00 9d d4 call 204e2c4 <strlen> <== NOT EXECUTED
2026b78: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2026b7c: a0 10 00 08 mov %o0, %l0 <== 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);
2026b80: a6 04 00 11 add %l0, %l1, %l3 <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
2026b84: a8 10 20 1a mov 0x1a, %l4 <== 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);
2026b88: 7f ff 8a 20 call 2009408 <malloc> <== NOT EXECUTED
2026b8c: 90 04 e0 05 add %l3, 5, %o0 <== NOT EXECUTED
if (mount_point == NULL) {
2026b90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026b94: 02 80 00 3b be 2026c80 <rtems_bdpart_mount+0x170> <== NOT EXECUTED
2026b98: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
2026b9c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2026ba0: 40 00 9e 8f call 204e5dc <strncpy> <== NOT EXECUTED
2026ba4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
mount_point [mount_base_size] = '/';
2026ba8: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
2026bac: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
2026bb0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
2026bb4: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
2026bb8: c2 2e 40 11 stb %g1, [ %i1 + %l1 ] <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
2026bbc: 40 00 9e 88 call 204e5dc <strncpy> <== NOT EXECUTED
2026bc0: 90 06 40 08 add %i1, %o0, %o0 <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
2026bc4: a0 04 e0 01 add %l3, 1, %l0 <== 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;
2026bc8: b6 07 40 1c add %i5, %i4, %i3 <== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
2026bcc: a8 10 20 00 clr %l4 <== 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) {
2026bd0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2026bd4: 02 80 00 2b be 2026c80 <rtems_bdpart_mount+0x170> <== NOT EXECUTED
2026bd8: a0 06 40 10 add %i1, %l0, %l0 <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
2026bdc: 31 00 81 a8 sethi %hi(0x206a000), %i0 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
2026be0: 23 00 81 a2 sethi %hi(0x2068800), %l1 <== 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) {
2026be4: b8 10 20 00 clr %i4 <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
2026be8: b0 16 21 50 or %i0, 0x150, %i0 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
2026bec: 10 80 00 04 b 2026bfc <rtems_bdpart_mount+0xec> <== NOT EXECUTED
2026bf0: a2 14 61 68 or %l1, 0x168, %l1 <== 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) {
2026bf4: 02 80 00 23 be 2026c80 <rtems_bdpart_mount+0x170> <== NOT EXECUTED
2026bf8: a8 10 20 00 clr %l4 <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
2026bfc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2026c00: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
2026c04: b8 07 20 01 inc %i4 <== NOT EXECUTED
2026c08: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2026c0c: 40 00 9a 1a call 204d474 <snprintf> <== NOT EXECUTED
2026c10: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
2026c14: 94 10 20 04 mov 4, %o2 <== 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) {
2026c18: 80 a2 20 03 cmp %o0, 3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
2026c1c: 92 10 00 1b mov %i3, %o1 <== 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) {
2026c20: 14 80 00 1e bg 2026c98 <rtems_bdpart_mount+0x188> <== NOT EXECUTED
2026c24: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
2026c28: 40 00 9e 6d call 204e5dc <strncpy> <== NOT EXECUTED
2026c2c: 01 00 00 00 nop <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
2026c30: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2026c34: 7f ff 8d c1 call 200a338 <rtems_mkdir> <== NOT EXECUTED
2026c38: 92 10 21 ff mov 0x1ff, %o1 <== NOT EXECUTED
if (rv != 0) {
2026c3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026c40: 12 80 00 18 bne 2026ca0 <rtems_bdpart_mount+0x190> <== NOT EXECUTED
2026c44: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
2026c48: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2026c4c: 96 10 20 00 clr %o3 <== NOT EXECUTED
2026c50: 98 10 20 00 clr %o4 <== NOT EXECUTED
2026c54: 7f ff 8a b6 call 200972c <mount> <== NOT EXECUTED
2026c58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
2026c5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026c60: 02 bf ff e5 be 2026bf4 <rtems_bdpart_mount+0xe4> <== NOT EXECUTED
2026c64: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
rmdir( mount_point);
2026c68: 40 00 15 c4 call 202c378 <rmdir> <== NOT EXECUTED
2026c6c: 90 10 00 19 mov %i1, %o0 <== 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) {
2026c70: 80 a7 00 1a cmp %i4, %i2 <== NOT EXECUTED
2026c74: 12 bf ff e3 bne 2026c00 <rtems_bdpart_mount+0xf0> <== NOT EXECUTED
2026c78: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
2026c7c: a8 10 20 00 clr %l4 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
2026c80: 7f ff 88 59 call 2008de4 <free> <== NOT EXECUTED
2026c84: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
free( mount_point);
2026c88: 7f ff 88 57 call 2008de4 <free> <== NOT EXECUTED
2026c8c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return esc;
}
2026c90: 81 c7 e0 08 ret <== NOT EXECUTED
2026c94: 91 e8 00 14 restore %g0, %l4, %o0 <== 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;
2026c98: 10 bf ff fa b 2026c80 <rtems_bdpart_mount+0x170> <== NOT EXECUTED
2026c9c: a8 10 20 03 mov 3, %l4 <== 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;
2026ca0: 10 bf ff f8 b 2026c80 <rtems_bdpart_mount+0x170> <== NOT EXECUTED
2026ca4: a8 10 20 1b mov 0x1b, %l4 <== NOT EXECUTED
020272f4 <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
const rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
20272f4: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
20272f8: d0 06 80 00 ld [ %i2 ], %o0
20272fc: 80 a2 20 00 cmp %o0, 0
2027300: 22 80 00 07 be,a 202731c <rtems_bdpart_new_record+0x28>
2027304: 90 10 00 18 mov %i0, %o0
sc = rtems_bdbuf_sync( *block);
2027308: 7f ff 7d f9 call 2006aec <rtems_bdbuf_sync>
202730c: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2027310: ba 92 20 00 orcc %o0, 0, %i5
2027314: 12 80 00 17 bne 2027370 <rtems_bdpart_new_record+0x7c> <== NEVER TAKEN
2027318: 90 10 00 18 mov %i0, %o0
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( dd, index, block);
202731c: 92 10 00 19 mov %i1, %o1
2027320: 7f ff 7c f4 call 20066f0 <rtems_bdbuf_read>
2027324: 94 10 00 1a mov %i2, %o2
if (sc != RTEMS_SUCCESSFUL) {
2027328: ba 92 20 00 orcc %o0, 0, %i5
202732c: 12 80 00 11 bne 2027370 <rtems_bdpart_new_record+0x7c> <== NEVER TAKEN
2027330: 01 00 00 00 nop
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
2027334: c2 06 80 00 ld [ %i2 ], %g1
2027338: 80 a0 60 00 cmp %g1, 0
202733c: 02 80 00 0f be 2027378 <rtems_bdpart_new_record+0x84> <== NEVER TAKEN
2027340: 92 10 20 00 clr %o1
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
2027344: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
2027348: 40 00 8d b6 call 204aa20 <memset>
202734c: 94 10 22 00 mov 0x200, %o2
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
2027350: c2 06 80 00 ld [ %i2 ], %g1
2027354: 84 10 20 55 mov 0x55, %g2
2027358: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
202735c: c4 28 61 fe stb %g2, [ %g1 + 0x1fe ]
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
2027360: c2 06 80 00 ld [ %i2 ], %g1
2027364: 84 10 3f aa mov -86, %g2
2027368: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
202736c: c4 28 61 ff stb %g2, [ %g1 + 0x1ff ]
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
2027370: 81 c7 e0 08 ret
2027374: 91 e8 00 1d restore %g0, %i5, %o0
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
2027378: ba 10 20 09 mov 9, %i5 <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
202737c: 81 c7 e0 08 ret <== NOT EXECUTED
2027380: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
0202704c <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
202704c: 9d e3 bf 88 save %sp, -120, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
2027050: 82 06 bf d0 add %i2, -48, %g1
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
2027054: c0 27 bf e8 clr [ %fp + -24 ]
rtems_bdpart_partition *p = pt - 1;
2027058: c2 27 bf ec st %g1, [ %fp + -20 ]
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
202705c: 80 a6 e0 00 cmp %i3, 0
2027060: 02 80 00 06 be 2027078 <rtems_bdpart_read+0x2c> <== NEVER TAKEN
2027064: ba 10 20 00 clr %i5
2027068: c2 06 c0 00 ld [ %i3 ], %g1
202706c: 85 28 60 04 sll %g1, 4, %g2
2027070: bb 28 60 06 sll %g1, 6, %i5
2027074: ba 27 40 02 sub %i5, %g2, %i5
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;
size_t i = 0;
const uint8_t *data = NULL;
int fd = -1;
2027078: 82 10 3f ff mov -1, %g1
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 */
202707c: c0 27 bf f0 clr [ %fp + -16 ]
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
2027080: c0 27 bf f4 clr [ %fp + -12 ]
size_t i = 0;
const uint8_t *data = NULL;
int fd = -1;
2027084: c2 27 bf f8 st %g1, [ %fp + -8 ]
const rtems_disk_device *dd = NULL;
2027088: c0 27 bf fc clr [ %fp + -4 ]
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
202708c: 80 a6 a0 00 cmp %i2, 0
2027090: 12 80 00 05 bne 20270a4 <rtems_bdpart_read+0x58> <== ALWAYS TAKEN
2027094: b8 10 20 09 mov 9, %i4
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
}
2027098: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
202709c: 81 c7 e0 08 ret
20270a0: 81 e8 00 00 restore
const uint8_t *data = NULL;
int fd = -1;
const rtems_disk_device *dd = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
20270a4: 80 a6 60 00 cmp %i1, 0
20270a8: 22 bf ff fd be,a 202709c <rtems_bdpart_read+0x50> <== NEVER TAKEN
20270ac: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
20270b0: 80 a6 e0 00 cmp %i3, 0
20270b4: 02 bf ff f9 be 2027098 <rtems_bdpart_read+0x4c> <== NEVER TAKEN
20270b8: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
20270bc: c0 26 c0 00 clr [ %i3 ]
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
20270c0: 92 07 bf f8 add %fp, -8, %o1
20270c4: 94 07 bf fc add %fp, -4, %o2
20270c8: 7f ff ff b6 call 2026fa0 <rtems_bdpart_get_disk_data>
20270cc: 96 07 bf f4 add %fp, -12, %o3
if (sc != RTEMS_SUCCESSFUL) {
20270d0: b8 92 20 00 orcc %o0, 0, %i4
20270d4: 12 bf ff f2 bne 202709c <rtems_bdpart_read+0x50> <== NEVER TAKEN
20270d8: b0 10 00 1c mov %i4, %i0
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( dd, 0, &block);
20270dc: d0 07 bf fc ld [ %fp + -4 ], %o0
20270e0: 92 10 20 00 clr %o1
20270e4: 7f ff ff 3f call 2026de0 <rtems_bdpart_read_record>
20270e8: 94 07 bf e8 add %fp, -24, %o2
if (sc != RTEMS_SUCCESSFUL) {
20270ec: b0 92 20 00 orcc %o0, 0, %i0
20270f0: 02 80 00 0f be 202712c <rtems_bdpart_read+0xe0> <== ALWAYS TAKEN
20270f4: c2 07 bf e8 ld [ %fp + -24 ], %g1
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (fd >= 0) {
20270f8: d0 07 bf f8 ld [ %fp + -8 ], %o0
20270fc: 80 a2 20 00 cmp %o0, 0
2027100: 26 80 00 05 bl,a 2027114 <rtems_bdpart_read+0xc8> <== NEVER TAKEN
2027104: d0 07 bf e8 ld [ %fp + -24 ], %o0 <== NOT EXECUTED
close( fd);
2027108: 7f ff 86 7b call 2008af4 <close>
202710c: 01 00 00 00 nop
}
if (block != NULL) {
2027110: d0 07 bf e8 ld [ %fp + -24 ], %o0
2027114: 80 a2 20 00 cmp %o0, 0
2027118: 02 bf ff e0 be 2027098 <rtems_bdpart_read+0x4c> <== NEVER TAKEN
202711c: b8 10 00 18 mov %i0, %i4
rtems_bdbuf_release( block);
2027120: 7f ff 7e 19 call 2006984 <rtems_bdbuf_release>
2027124: b0 10 00 1c mov %i4, %i0
2027128: 30 bf ff dd b,a 202709c <rtems_bdpart_read+0x50>
{
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);
202712c: ba 06 80 1d add %i2, %i5, %i5
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
2027130: e0 00 60 1c ld [ %g1 + 0x1c ], %l0
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
2027134: 92 07 bf ec add %fp, -20, %o1
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
2027138: b8 04 21 be add %l0, 0x1be, %i4
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
202713c: 94 10 00 1d mov %i5, %o2
2027140: 90 10 00 1c mov %i4, %o0
2027144: 7f ff ff 53 call 2026e90 <rtems_bdpart_read_mbr_partition>
2027148: 96 07 bf f0 add %fp, -16, %o3
if (sc != RTEMS_SUCCESSFUL) {
202714c: b0 92 20 00 orcc %o0, 0, %i0
2027150: 32 bf ff eb bne,a 20270fc <rtems_bdpart_read+0xb0> <== NEVER TAKEN
2027154: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
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) {
2027158: c2 07 bf ec ld [ %fp + -20 ], %g1
202715c: c2 08 60 08 ldub [ %g1 + 8 ], %g1
2027160: 80 a0 60 ee cmp %g1, 0xee
2027164: 02 bf ff e5 be 20270f8 <rtems_bdpart_read+0xac> <== NEVER TAKEN
2027168: b0 10 20 18 mov 0x18, %i0
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
202716c: c2 07 bf e8 ld [ %fp + -24 ], %g1
2027170: c0 26 40 00 clr [ %i1 ]
2027174: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
return value;
}
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
2027178: 84 10 20 00 clr %g2
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
202717c: 88 00 7f fc add %g1, -4, %g4
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
value = (value << 8) + data [i];
2027180: c6 08 61 bb ldub [ %g1 + 0x1bb ], %g3
2027184: 85 28 a0 08 sll %g2, 8, %g2
2027188: 82 00 7f ff add %g1, -1, %g1
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
202718c: 80 a0 40 04 cmp %g1, %g4
2027190: 12 bf ff fc bne 2027180 <rtems_bdpart_read+0x134>
2027194: 84 00 c0 02 add %g3, %g2, %g2
/* 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
);
format->mbr.dos_compatibility = true;
2027198: 82 10 20 01 mov 1, %g1
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
202719c: c4 26 60 04 st %g2, [ %i1 + 4 ]
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
20271a0: c2 2e 60 08 stb %g1, [ %i1 + 8 ]
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
20271a4: a0 04 21 ee add %l0, 0x1ee, %l0
);
format->mbr.dos_compatibility = true;
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
20271a8: b8 07 20 10 add %i4, 0x10, %i4
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
20271ac: 92 07 bf ec add %fp, -20, %o1
20271b0: 90 10 00 1c mov %i4, %o0
20271b4: 94 10 00 1d mov %i5, %o2
20271b8: 7f ff ff 36 call 2026e90 <rtems_bdpart_read_mbr_partition>
20271bc: 96 07 bf f0 add %fp, -16, %o3
if (sc != RTEMS_SUCCESSFUL) {
20271c0: 80 a2 20 00 cmp %o0, 0
20271c4: 12 80 00 4a bne 20272ec <rtems_bdpart_read+0x2a0> <== NEVER TAKEN
20271c8: 80 a7 00 10 cmp %i4, %l0
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) {
20271cc: 32 bf ff f8 bne,a 20271ac <rtems_bdpart_read+0x160>
20271d0: b8 07 20 10 add %i4, 0x10, %i4
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
20271d4: f2 07 bf f0 ld [ %fp + -16 ], %i1
while (ebr != 0) {
20271d8: 80 a6 60 00 cmp %i1, 0
20271dc: 02 80 00 2c be 202728c <rtems_bdpart_read+0x240> <== NEVER TAKEN
20271e0: c8 07 bf ec ld [ %fp + -20 ], %g4
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( dd, ebr, &block);
20271e4: d0 07 bf fc ld [ %fp + -4 ], %o0
20271e8: 92 10 00 19 mov %i1, %o1
20271ec: 7f ff fe fd call 2026de0 <rtems_bdpart_read_record>
20271f0: 94 07 bf e8 add %fp, -24, %o2
if (sc != RTEMS_SUCCESSFUL) {
20271f4: 80 a2 20 00 cmp %o0, 0
20271f8: 12 80 00 3d bne 20272ec <rtems_bdpart_read+0x2a0> <== NEVER TAKEN
20271fc: c2 07 bf e8 ld [ %fp + -24 ], %g1
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
2027200: 92 07 bf ec add %fp, -20, %o1
2027204: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
2027208: 94 10 00 1d mov %i5, %o2
202720c: 90 02 21 be add %o0, 0x1be, %o0
2027210: 7f ff ff 20 call 2026e90 <rtems_bdpart_read_mbr_partition>
2027214: 96 10 20 00 clr %o3
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
2027218: 80 a2 20 00 cmp %o0, 0
202721c: 12 80 00 34 bne 20272ec <rtems_bdpart_read+0x2a0> <== NEVER TAKEN
2027220: c8 07 bf ec ld [ %fp + -20 ], %g4
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
2027224: c2 01 00 00 ld [ %g4 ], %g1
2027228: 84 06 40 01 add %i1, %g1, %g2
if (tmp > p->begin) {
202722c: 80 a0 40 02 cmp %g1, %g2
2027230: 3a bf ff b2 bcc,a 20270f8 <rtems_bdpart_read+0xac> <== NEVER TAKEN
2027234: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
2027238: c2 01 20 04 ld [ %g4 + 4 ], %g1
202723c: b2 06 40 01 add %i1, %g1, %i1
if (tmp > p->end) {
2027240: 80 a0 40 19 cmp %g1, %i1
2027244: 1a 80 00 28 bcc 20272e4 <rtems_bdpart_read+0x298> <== NEVER TAKEN
2027248: c4 21 00 00 st %g2, [ %g4 ]
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
202724c: c2 07 bf e8 ld [ %fp + -24 ], %g1
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
p->end = tmp;
2027250: f2 21 20 04 st %i1, [ %g4 + 4 ]
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
2027254: f2 00 60 1c ld [ %g1 + 0x1c ], %i1
return value;
}
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
2027258: 84 10 20 00 clr %g2
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
202725c: 82 10 20 03 mov 3, %g1
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
2027260: b8 06 61 d6 add %i1, 0x1d6, %i4
value = (value << 8) + data [i];
2027264: c6 0f 00 01 ldub [ %i4 + %g1 ], %g3
2027268: 85 28 a0 08 sll %g2, 8, %g2
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
202726c: 82 00 7f ff add %g1, -1, %g1
2027270: 80 a0 7f ff cmp %g1, -1
2027274: 12 bf ff fc bne 2027264 <rtems_bdpart_read+0x218>
2027278: 84 00 c0 02 add %g3, %g2, %g2
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
202727c: c2 0e 61 d2 ldub [ %i1 + 0x1d2 ], %g1
2027280: 80 a0 60 05 cmp %g1, 5
2027284: 02 80 00 11 be 20272c8 <rtems_bdpart_read+0x27c>
2027288: 80 a0 a0 00 cmp %g2, 0
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
202728c: 82 21 00 1a sub %g4, %i2, %g1
2027290: 83 38 60 04 sra %g1, 4, %g1
2027294: 85 28 60 02 sll %g1, 2, %g2
2027298: 82 00 80 01 add %g2, %g1, %g1
202729c: 85 28 60 04 sll %g1, 4, %g2
20272a0: 82 00 40 02 add %g1, %g2, %g1
20272a4: 85 28 60 08 sll %g1, 8, %g2
rtems_bdpart_partition *pt,
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
20272a8: b0 10 20 00 clr %i0
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
20272ac: 82 00 40 02 add %g1, %g2, %g1
20272b0: 85 28 60 10 sll %g1, 0x10, %g2
20272b4: 82 00 40 02 add %g1, %g2, %g1
20272b8: 82 20 00 01 neg %g1
20272bc: 82 00 60 01 inc %g1
20272c0: 10 bf ff 8e b 20270f8 <rtems_bdpart_read+0xac>
20272c4: c2 26 c0 00 st %g1, [ %i3 ]
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
);
if (ebr != 0) {
20272c8: 02 bf ff f2 be 2027290 <rtems_bdpart_read+0x244> <== NEVER TAKEN
20272cc: 82 21 00 1a sub %g4, %i2, %g1
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
20272d0: f2 07 bf f0 ld [ %fp + -16 ], %i1
20272d4: b2 00 80 19 add %g2, %i1, %i1
if (tmp > ebr) {
20272d8: 80 a6 40 02 cmp %i1, %g2
20272dc: 18 bf ff c3 bgu 20271e8 <rtems_bdpart_read+0x19c> <== ALWAYS TAKEN
20272e0: d0 07 bf fc ld [ %fp + -4 ], %o0
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
p->end = tmp;
} else {
esc = RTEMS_IO_ERROR;
20272e4: 10 bf ff 85 b 20270f8 <rtems_bdpart_read+0xac> <== NOT EXECUTED
20272e8: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
20272ec: 10 bf ff 83 b 20270f8 <rtems_bdpart_read+0xac> <== NOT EXECUTED
20272f0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
02026e90 <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
2026e90: 9d e3 bf a0 save %sp, -96, %sp
return value;
}
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
2026e94: b8 10 20 00 clr %i4
2026e98: ba 10 00 18 mov %i0, %i5
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
2026e9c: 82 10 00 18 mov %i0, %g1
} else {
return 0;
}
}
static rtems_status_code rtems_bdpart_read_mbr_partition(
2026ea0: 86 06 3f fc add %i0, -4, %g3
2026ea4: 84 10 00 18 mov %i0, %g2
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
value = (value << 8) + data [i];
2026ea8: c8 08 a0 0b ldub [ %g2 + 0xb ], %g4
2026eac: b9 2f 20 08 sll %i4, 8, %i4
2026eb0: 84 00 bf ff add %g2, -1, %g2
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
2026eb4: 80 a0 80 03 cmp %g2, %g3
2026eb8: 12 bf ff fc bne 2026ea8 <rtems_bdpart_read_mbr_partition+0x18>
2026ebc: b8 01 00 1c add %g4, %i4, %i4
return value;
}
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
2026ec0: 84 10 20 00 clr %g2
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
value = (value << 8) + data [i];
2026ec4: c8 08 60 0f ldub [ %g1 + 0xf ], %g4
2026ec8: 85 28 a0 08 sll %g2, 8, %g2
2026ecc: 82 00 7f ff add %g1, -1, %g1
static inline uint32_t rtems_uint32_from_little_endian( const uint8_t *data)
{
uint32_t value = 0;
ssize_t i = 0;
for (i = 3; i >= 0; --i) {
2026ed0: 80 a0 c0 01 cmp %g3, %g1
2026ed4: 12 bf ff fc bne 2026ec4 <rtems_bdpart_read_mbr_partition+0x34>
2026ed8: 84 01 00 02 add %g4, %g2, %g2
rtems_blkdev_bnum size =
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) {
2026edc: e0 0f 60 04 ldub [ %i5 + 4 ], %l0
2026ee0: 80 a4 20 00 cmp %l0, 0
2026ee4: 02 80 00 11 be 2026f28 <rtems_bdpart_read_mbr_partition+0x98><== NEVER TAKEN
2026ee8: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
2026eec: d0 06 40 00 ld [ %i1 ], %o0
2026ef0: 80 a2 00 1a cmp %o0, %i2
2026ef4: 02 80 00 0d be 2026f28 <rtems_bdpart_read_mbr_partition+0x98><== NEVER TAKEN
2026ef8: b0 10 20 05 mov 5, %i0
{
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;
2026efc: b4 00 80 1c add %g2, %i4, %i2
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
2026f00: 80 a6 80 1c cmp %i2, %i4
2026f04: 08 80 00 09 bleu 2026f28 <rtems_bdpart_read_mbr_partition+0x98><== NEVER TAKEN
2026f08: b0 10 20 1b mov 0x1b, %i0
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
2026f0c: 80 a4 20 05 cmp %l0, 5
2026f10: 12 80 00 08 bne 2026f30 <rtems_bdpart_read_mbr_partition+0xa0>
2026f14: 94 10 20 30 mov 0x30, %o2
if (ep_begin != NULL) {
2026f18: 80 a6 e0 00 cmp %i3, 0
2026f1c: 02 80 00 03 be 2026f28 <rtems_bdpart_read_mbr_partition+0x98><== NEVER TAKEN
2026f20: b0 10 20 00 clr %i0
*ep_begin = begin;
2026f24: f8 26 c0 00 st %i4, [ %i3 ]
2026f28: 81 c7 e0 08 ret
2026f2c: 81 e8 00 00 restore
}
} else {
/* Increment partition index */
++(*p);
2026f30: 90 02 20 30 add %o0, 0x30, %o0
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
2026f34: 92 10 20 00 clr %o1
2026f38: 40 00 8e ba call 204aa20 <memset>
2026f3c: d0 26 40 00 st %o0, [ %i1 ]
/* Set values */
(*p)->begin = begin;
2026f40: d2 06 40 00 ld [ %i1 ], %o1
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
2026f44: 90 10 00 10 mov %l0, %o0
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
/* Set values */
(*p)->begin = begin;
2026f48: f8 22 40 00 st %i4, [ %o1 ]
(*p)->end = end;
2026f4c: f4 22 60 04 st %i2, [ %o1 + 4 ]
rtems_bdpart_to_partition_type( type, (*p)->type);
2026f50: 7f ff ff c7 call 2026e6c <rtems_bdpart_to_partition_type>
2026f54: 92 02 60 08 add %o1, 8, %o1
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
2026f58: c2 06 40 00 ld [ %i1 ], %g1
2026f5c: c4 0f 40 00 ldub [ %i5 ], %g2
2026f60: c0 20 60 28 clr [ %g1 + 0x28 ]
2026f64: c4 20 60 2c st %g2, [ %g1 + 0x2c ]
}
return RTEMS_SUCCESSFUL;
}
2026f68: 81 c7 e0 08 ret
2026f6c: 91 e8 20 00 restore %g0, 0, %o0
02026de0 <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
const rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
2026de0: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
2026de4: d0 06 80 00 ld [ %i2 ], %o0
2026de8: 80 a2 20 00 cmp %o0, 0
2026dec: 02 80 00 07 be 2026e08 <rtems_bdpart_read_record+0x28>
2026df0: ba 10 00 18 mov %i0, %i5
sc = rtems_bdbuf_release( *block);
2026df4: 7f ff 7e e4 call 2006984 <rtems_bdbuf_release>
2026df8: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2026dfc: 80 a2 20 00 cmp %o0, 0
2026e00: 12 80 00 13 bne 2026e4c <rtems_bdpart_read_record+0x6c> <== NEVER TAKEN
2026e04: 01 00 00 00 nop
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( dd, index, block);
2026e08: 90 10 00 1d mov %i5, %o0
2026e0c: 92 10 00 19 mov %i1, %o1
2026e10: 7f ff 7e 38 call 20066f0 <rtems_bdbuf_read>
2026e14: 94 10 00 1a mov %i2, %o2
if (sc != RTEMS_SUCCESSFUL) {
2026e18: 80 a2 20 00 cmp %o0, 0
2026e1c: 12 80 00 0c bne 2026e4c <rtems_bdpart_read_record+0x6c> <== NEVER TAKEN
2026e20: 01 00 00 00 nop
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
2026e24: c2 06 80 00 ld [ %i2 ], %g1
2026e28: 80 a0 60 00 cmp %g1, 0
2026e2c: 22 80 00 0e be,a 2026e64 <rtems_bdpart_read_record+0x84> <== NEVER TAKEN
2026e30: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
2026e34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
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]
2026e38: c4 08 61 fe ldub [ %g1 + 0x1fe ], %g2
2026e3c: 80 a0 a0 55 cmp %g2, 0x55
2026e40: 22 80 00 05 be,a 2026e54 <rtems_bdpart_read_record+0x74> <== ALWAYS TAKEN
2026e44: c2 08 61 ff ldub [ %g1 + 0x1ff ], %g1
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
2026e48: 90 10 20 1b mov 0x1b, %o0 <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
2026e4c: 81 c7 e0 08 ret
2026e50: 91 e8 00 08 restore %g0, %o0, %o0
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]
2026e54: 80 a0 60 aa cmp %g1, 0xaa
2026e58: 32 bf ff fd bne,a 2026e4c <rtems_bdpart_read_record+0x6c><== NEVER TAKEN
2026e5c: 90 10 20 1b mov 0x1b, %o0 <== NOT EXECUTED
2026e60: 30 bf ff fb b,a 2026e4c <rtems_bdpart_read_record+0x6c>
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
2026e64: 81 c7 e0 08 ret <== NOT EXECUTED
2026e68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02006e9c <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
2006e9c: 9d e3 bf 88 save %sp, -120, %sp
rtems_blkdev_bnum disk_end = 0;
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);
2006ea0: 90 10 00 18 mov %i0, %o0
2006ea4: 40 01 1d 08 call 204e2c4 <strlen>
2006ea8: c0 27 bf f4 clr [ %fp + -12 ]
size_t i = 0;
int fd = -1;
2006eac: 82 10 3f ff mov -1, %g1
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
2006eb0: ba 10 00 18 mov %i0, %i5
rtems_blkdev_bnum disk_end = 0;
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);
2006eb4: a4 10 00 08 mov %o0, %l2
size_t i = 0;
int fd = -1;
const rtems_disk_device *dd = NULL;
2006eb8: c0 27 bf fc clr [ %fp + -4 ]
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
2006ebc: 90 10 00 18 mov %i0, %o0
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;
2006ec0: c2 27 bf f8 st %g1, [ %fp + -8 ]
const rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
2006ec4: 92 07 bf f8 add %fp, -8, %o1
2006ec8: 94 07 bf fc add %fp, -4, %o2
2006ecc: 40 00 80 35 call 2026fa0 <rtems_bdpart_get_disk_data>
2006ed0: 96 07 bf f4 add %fp, -12, %o3
if (sc != RTEMS_SUCCESSFUL) {
2006ed4: b0 92 20 00 orcc %o0, 0, %i0
2006ed8: 12 80 00 32 bne 2006fa0 <rtems_bdpart_register+0x104> <== NEVER TAKEN
2006edc: c2 07 bf fc ld [ %fp + -4 ], %g1
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
2006ee0: d0 07 bf f8 ld [ %fp + -8 ], %o0
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
2006ee4: e2 00 60 04 ld [ %g1 + 4 ], %l1
2006ee8: 40 00 07 03 call 2008af4 <close>
2006eec: f6 00 40 00 ld [ %g1 ], %i3
/* 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);
2006ef0: 90 04 a0 04 add %l2, 4, %o0
2006ef4: 40 00 09 45 call 2009408 <malloc>
2006ef8: b8 10 00 11 mov %l1, %i4
if (logical_disk_name == NULL) {
return RTEMS_NO_MEMORY;
2006efc: b0 10 20 1a mov 0x1a, %i0
/* 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) {
2006f00: 80 a2 20 00 cmp %o0, 0
2006f04: 02 80 00 27 be 2006fa0 <rtems_bdpart_register+0x104> <== NEVER TAKEN
2006f08: a0 10 00 08 mov %o0, %l0
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
2006f0c: 94 10 00 12 mov %l2, %o2
2006f10: 40 01 1d b3 call 204e5dc <strncpy>
2006f14: 92 10 00 1d mov %i5, %o1
logical_disk_marker = logical_disk_name + disk_name_size;
2006f18: a4 04 00 12 add %l0, %l2, %l2
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
2006f1c: 80 a6 a0 00 cmp %i2, 0
2006f20: 02 80 00 1e be 2006f98 <rtems_bdpart_register+0xfc> <== NEVER TAKEN
2006f24: b0 10 20 00 clr %i0
/* 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);
2006f28: 27 00 81 a8 sethi %hi(0x206a000), %l3
}
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) {
2006f2c: ba 10 20 00 clr %i5
/* 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);
2006f30: 10 80 00 0c b 2006f60 <rtems_bdpart_register+0xc4>
2006f34: a6 14 e1 50 or %l3, 0x150, %l3
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
2006f38: da 06 60 04 ld [ %i1 + 4 ], %o5
logical_disk,
disk,
p->begin,
p->end - p->begin,
2006f3c: d8 06 40 00 ld [ %i1 ], %o4
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
2006f40: e0 23 a0 5c st %l0, [ %sp + 0x5c ]
2006f44: 40 00 03 0d call 2007b78 <rtems_disk_create_log>
2006f48: 9a 23 40 0c sub %o5, %o4, %o5
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
2006f4c: 80 a2 20 00 cmp %o0, 0
2006f50: 12 80 00 16 bne 2006fa8 <rtems_bdpart_register+0x10c> <== NEVER TAKEN
2006f54: 80 a7 40 1a cmp %i5, %i2
}
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) {
2006f58: 02 80 00 16 be 2006fb0 <rtems_bdpart_register+0x114>
2006f5c: b2 06 60 30 add %i1, 0x30, %i1
/* 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);
2006f60: 92 10 20 04 mov 4, %o1
2006f64: 94 10 00 13 mov %l3, %o2
2006f68: ba 07 60 01 inc %i5
2006f6c: 90 10 00 12 mov %l2, %o0
2006f70: 40 01 19 41 call 204d474 <snprintf>
2006f74: 96 10 00 1d mov %i5, %o3
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
int rv = 0;
/* New minor number */
++minor;
2006f78: b8 07 20 01 inc %i4
/* 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);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
2006f7c: 80 a2 20 03 cmp %o0, 3
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
2006f80: 92 10 00 1c mov %i4, %o1
2006f84: 94 10 00 1b mov %i3, %o2
2006f88: 96 10 00 11 mov %l1, %o3
/* 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);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
2006f8c: 04 bf ff eb ble 2006f38 <rtems_bdpart_register+0x9c> <== ALWAYS TAKEN
2006f90: 90 10 00 1b mov %i3, %o0
esc = RTEMS_INVALID_NAME;
2006f94: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
2006f98: 40 00 07 93 call 2008de4 <free>
2006f9c: 90 10 00 10 mov %l0, %o0
return esc;
}
2006fa0: 81 c7 e0 08 ret
2006fa4: 81 e8 00 00 restore
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
2006fa8: 10 bf ff fc b 2006f98 <rtems_bdpart_register+0xfc> <== NOT EXECUTED
2006fac: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
2006fb0: 10 bf ff fa b 2006f98 <rtems_bdpart_register+0xfc>
2006fb4: b0 10 20 00 clr %i0
02006fb8 <rtems_bdpart_register_from_disk>:
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
2006fb8: 9d e3 bc 88 save %sp, -888, %sp
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;
2006fbc: 82 10 20 10 mov 0x10, %g1
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
2006fc0: 90 10 00 18 mov %i0, %o0
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
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;
2006fc4: c2 27 bf fc st %g1, [ %fp + -4 ]
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
2006fc8: 92 07 bf e8 add %fp, -24, %o1
2006fcc: 94 07 bc e8 add %fp, -792, %o2
2006fd0: 40 00 80 1f call 202704c <rtems_bdpart_read>
2006fd4: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2006fd8: 80 a2 20 00 cmp %o0, 0
2006fdc: 12 80 00 05 bne 2006ff0 <rtems_bdpart_register_from_disk+0x38><== NEVER TAKEN
2006fe0: d4 07 bf fc ld [ %fp + -4 ], %o2
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
2006fe4: 90 10 00 18 mov %i0, %o0
2006fe8: 7f ff ff ad call 2006e9c <rtems_bdpart_register>
2006fec: 92 07 bc e8 add %fp, -792, %o1
}
2006ff0: 81 c7 e0 08 ret
2006ff4: 91 e8 00 08 restore %g0, %o0, %o0
02026ca8 <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
2026ca8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
2026cac: 92 10 20 2f mov 0x2f, %o1 <== NOT EXECUTED
2026cb0: 40 00 a1 c0 call 204f3b0 <strrchr> <== NOT EXECUTED
2026cb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2026cb8: b8 10 00 08 mov %o0, %i4 <== 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);
2026cbc: 40 00 9d 82 call 204e2c4 <strlen> <== NOT EXECUTED
2026cc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2026cc4: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
2026cc8: 40 00 9d 7f call 204e2c4 <strlen> <== NOT EXECUTED
2026ccc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
disk_file_name += 1;
disk_file_name_size = strlen( disk_file_name);
} else {
disk_file_name = disk_name;
2026cd0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
size_t disk_name_size = strlen( disk_name);
size_t mount_base_size = strlen( mount_base);
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
2026cd4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2026cd8: 02 80 00 06 be 2026cf0 <rtems_bdpart_unmount+0x48> <== NOT EXECUTED
2026cdc: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
disk_file_name += 1;
2026ce0: a0 07 20 01 add %i4, 1, %l0 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
2026ce4: 40 00 9d 78 call 204e2c4 <strlen> <== NOT EXECUTED
2026ce8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2026cec: b2 10 00 08 mov %o0, %i1 <== 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);
2026cf0: a2 06 40 1d add %i1, %i5, %l1 <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
2026cf4: b0 10 20 1a mov 0x1a, %i0 <== 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);
2026cf8: 7f ff 89 c4 call 2009408 <malloc> <== NOT EXECUTED
2026cfc: 90 04 60 05 add %l1, 5, %o0 <== NOT EXECUTED
if (mount_point == NULL) {
2026d00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026d04: 02 80 00 2b be 2026db0 <rtems_bdpart_unmount+0x108> <== NOT EXECUTED
2026d08: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
2026d0c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2026d10: 40 00 9e 33 call 204e5dc <strncpy> <== NOT EXECUTED
2026d14: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
mount_point [mount_base_size] = '/';
2026d18: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
2026d1c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2026d20: 90 07 60 01 add %i5, 1, %o0 <== NOT EXECUTED
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
2026d24: c2 2f 00 1d stb %g1, [ %i4 + %i5 ] <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
2026d28: 90 07 00 08 add %i4, %o0, %o0 <== NOT EXECUTED
2026d2c: 40 00 9e 2c call 204e5dc <strncpy> <== NOT EXECUTED
2026d30: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
2026d34: b6 04 60 01 add %l1, 1, %i3 <== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
2026d38: b0 10 20 00 clr %i0 <== 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) {
2026d3c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2026d40: 02 80 00 1c be 2026db0 <rtems_bdpart_unmount+0x108> <== NOT EXECUTED
2026d44: b6 07 00 1b add %i4, %i3, %i3 <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
2026d48: 33 00 81 a8 sethi %hi(0x206a000), %i1 <== 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) {
2026d4c: ba 10 20 00 clr %i5 <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
2026d50: 10 80 00 04 b 2026d60 <rtems_bdpart_unmount+0xb8> <== NOT EXECUTED
2026d54: b2 16 61 50 or %i1, 0x150, %i1 <== 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) {
2026d58: 02 80 00 1e be 2026dd0 <rtems_bdpart_unmount+0x128> <== NOT EXECUTED
2026d5c: b0 10 20 00 clr %i0 <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
2026d60: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2026d64: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2026d68: ba 07 60 01 inc %i5 <== NOT EXECUTED
2026d6c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2026d70: 40 00 99 c1 call 204d474 <snprintf> <== NOT EXECUTED
2026d74: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
2026d78: 80 a2 20 03 cmp %o0, 3 <== NOT EXECUTED
2026d7c: 14 80 00 11 bg 2026dc0 <rtems_bdpart_unmount+0x118> <== NOT EXECUTED
2026d80: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
2026d84: 40 00 17 0f call 202c9c0 <unmount> <== NOT EXECUTED
2026d88: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rv == 0) {
2026d8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026d90: 12 bf ff f2 bne 2026d58 <rtems_bdpart_unmount+0xb0> <== NOT EXECUTED
2026d94: 80 a7 40 1a cmp %i5, %i2 <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
2026d98: 40 00 15 78 call 202c378 <rmdir> <== NOT EXECUTED
2026d9c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (rv != 0) {
2026da0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026da4: 02 bf ff ed be 2026d58 <rtems_bdpart_unmount+0xb0> <== NOT EXECUTED
2026da8: 80 a7 40 1a cmp %i5, %i2 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
2026dac: b0 10 20 1b mov 0x1b, %i0 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
2026db0: 7f ff 88 0d call 2008de4 <free> <== NOT EXECUTED
2026db4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
return esc;
}
2026db8: 81 c7 e0 08 ret <== NOT EXECUTED
2026dbc: 81 e8 00 00 restore <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
2026dc0: 7f ff 88 09 call 2008de4 <free> <== NOT EXECUTED
2026dc4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
return esc;
}
2026dc8: 81 c7 e0 08 ret <== NOT EXECUTED
2026dcc: 81 e8 00 00 restore <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
2026dd0: 7f ff 88 05 call 2008de4 <free> <== NOT EXECUTED
2026dd4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
return esc;
}
2026dd8: 81 c7 e0 08 ret <== NOT EXECUTED
2026ddc: 81 e8 00 00 restore <== NOT EXECUTED
02006ff8 <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
2006ff8: 9d e3 bf 90 save %sp, -112, %sp
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;
2006ffc: 82 10 3f ff mov -1, %g1
const rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
2007000: 90 10 00 18 mov %i0, %o0
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
2007004: c0 27 bf f4 clr [ %fp + -12 ]
dev_t disk = 0;
dev_t logical_disk = 0;
size_t i = 0;
int fd = -1;
const rtems_disk_device *dd = NULL;
2007008: c0 27 bf fc clr [ %fp + -4 ]
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;
200700c: c2 27 bf f8 st %g1, [ %fp + -8 ]
const rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
2007010: 92 07 bf f8 add %fp, -8, %o1
2007014: 94 07 bf fc add %fp, -4, %o2
2007018: 40 00 7f e2 call 2026fa0 <rtems_bdpart_get_disk_data>
200701c: 96 07 bf f4 add %fp, -12, %o3
if (sc != RTEMS_SUCCESSFUL) {
2007020: b0 92 20 00 orcc %o0, 0, %i0
2007024: 12 80 00 12 bne 200706c <rtems_bdpart_unregister+0x74> <== NEVER TAKEN
2007028: c2 07 bf fc ld [ %fp + -4 ], %g1
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
200702c: d0 07 bf f8 ld [ %fp + -8 ], %o0
2007030: 40 00 06 b1 call 2008af4 <close>
2007034: f8 18 40 00 ldd [ %g1 ], %i4
/* 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) {
2007038: 80 a6 a0 00 cmp %i2, 0
200703c: 02 80 00 0c be 200706c <rtems_bdpart_unregister+0x74> <== NEVER TAKEN
2007040: b4 06 80 1d add %i2, %i5, %i2
/* New minor number */
++minor;
2007044: 10 80 00 04 b 2007054 <rtems_bdpart_unregister+0x5c>
2007048: ba 07 60 01 inc %i5
/* 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) {
200704c: 02 80 00 08 be 200706c <rtems_bdpart_unregister+0x74>
2007050: ba 07 60 01 inc %i5
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
2007054: 90 10 00 1c mov %i4, %o0
2007058: 40 00 03 02 call 2007c60 <rtems_disk_delete>
200705c: 92 10 00 1d mov %i5, %o1
if (sc != RTEMS_SUCCESSFUL) {
2007060: b0 92 20 00 orcc %o0, 0, %i0
2007064: 02 bf ff fa be 200704c <rtems_bdpart_unregister+0x54> <== ALWAYS TAKEN
2007068: 80 a7 40 1a cmp %i5, %i2
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
200706c: 81 c7 e0 08 ret
2007070: 81 e8 00 00 restore
02027384 <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
2027384: 9d e3 bf 88 save %sp, -120, %sp
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;
2027388: 80 a6 60 00 cmp %i1, 0
202738c: 02 80 00 06 be 20273a4 <rtems_bdpart_write+0x20> <== NEVER TAKEN
2027390: 90 10 00 18 mov %i0, %o0
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
2027394: c2 06 40 00 ld [ %i1 ], %g1
2027398: 80 a0 60 00 cmp %g1, 0
202739c: 22 80 00 11 be,a 20273e0 <rtems_bdpart_write+0x5c> <== ALWAYS TAKEN
20273a0: c2 0e 60 08 ldub [ %i1 + 8 ], %g1
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
20273a4: c0 27 bf ec clr [ %fp + -20 ] <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
20273a8: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
20273ac: ba 10 20 00 clr %i5 <== NOT EXECUTED
&& 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 =
20273b0: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
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;
20273b4: 82 10 3f ff mov -1, %g1
const rtems_disk_device *dd = NULL;
20273b8: c0 27 bf f8 clr [ %fp + -8 ]
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;
20273bc: c2 27 bf f4 st %g1, [ %fp + -12 ]
const rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
20273c0: 80 a6 e0 00 cmp %i3, 0
20273c4: 02 80 00 4f be 2027500 <rtems_bdpart_write+0x17c> <== NEVER TAKEN
20273c8: b0 10 20 00 clr %i0
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
20273cc: 80 a6 a0 00 cmp %i2, 0
20273d0: 12 80 00 0b bne 20273fc <rtems_bdpart_write+0x78> <== ALWAYS TAKEN
20273d4: 80 a6 60 00 cmp %i1, 0
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
}
20273d8: 81 c7 e0 08 ret <== NOT EXECUTED
20273dc: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED
{
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;
20273e0: 80 a0 60 00 cmp %g1, 0
20273e4: 02 bf ff f1 be 20273a8 <rtems_bdpart_write+0x24> <== NEVER TAKEN
20273e8: c0 27 bf ec clr [ %fp + -20 ]
rtems_bdbuf_buffer *block = NULL;
rtems_blkdev_bnum disk_end = 0;
20273ec: c0 27 bf f0 clr [ %fp + -16 ]
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
20273f0: ba 10 20 01 mov 1, %i5
&& 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 =
20273f4: 10 bf ff f0 b 20273b4 <rtems_bdpart_write+0x30>
20273f8: b8 10 20 3f mov 0x3f, %i4
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
20273fc: 02 80 00 41 be 2027500 <rtems_bdpart_write+0x17c> <== NEVER TAKEN
2027400: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
2027404: 92 07 bf f4 add %fp, -12, %o1
2027408: 94 07 bf f8 add %fp, -8, %o2
202740c: 7f ff fe e5 call 2026fa0 <rtems_bdpart_get_disk_data>
2027410: 96 07 bf f0 add %fp, -16, %o3
if (sc != RTEMS_SUCCESSFUL) {
2027414: b0 92 20 00 orcc %o0, 0, %i0
2027418: 12 80 00 3a bne 2027500 <rtems_bdpart_write+0x17c> <== NEVER TAKEN
202741c: ba 8f 60 ff andcc %i5, 0xff, %i5
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
2027420: 12 80 00 25 bne 20274b4 <rtems_bdpart_write+0x130> <== ALWAYS TAKEN
2027424: e0 07 bf f0 ld [ %fp + -16 ], %l0
2027428: d0 07 bf f0 ld [ %fp + -16 ], %o0 <== NOT EXECUTED
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
/* Check that begin and end are proper within the disk */
if (p->begin >= disk_end || p->end > disk_end) {
202742c: de 06 80 00 ld [ %i2 ], %o7
2027430: 80 a3 c0 08 cmp %o7, %o0
2027434: 1a 80 00 27 bcc 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027438: b0 10 20 0a mov 0xa, %i0
202743c: c2 06 a0 04 ld [ %i2 + 4 ], %g1
2027440: 80 a2 00 01 cmp %o0, %g1
2027444: 0a 80 00 23 bcs 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027448: 80 a3 c0 01 cmp %o7, %g1
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
202744c: 1a 80 00 21 bcc 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027450: a0 10 00 1a mov %i2, %l0
2027454: 82 10 00 1a mov %i2, %g1
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
2027458: 84 10 20 00 clr %g2
202745c: 84 00 a0 01 inc %g2
2027460: 80 a0 80 1b cmp %g2, %i3
2027464: 22 80 00 29 be,a 2027508 <rtems_bdpart_write+0x184>
2027468: c2 06 40 00 ld [ %i1 ], %g1
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) {
202746c: c6 00 60 30 ld [ %g1 + 0x30 ], %g3
2027470: 80 a0 c0 08 cmp %g3, %o0
2027474: 3a 80 00 17 bcc,a 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027478: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
202747c: c8 00 60 34 ld [ %g1 + 0x34 ], %g4
2027480: 80 a1 00 08 cmp %g4, %o0
2027484: 18 80 00 12 bgu 20274cc <rtems_bdpart_write+0x148> <== NEVER TAKEN
2027488: 80 a0 c0 04 cmp %g3, %g4
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
202748c: 1a 80 00 10 bcc 20274cc <rtems_bdpart_write+0x148> <== NEVER TAKEN
2027490: 80 a0 a0 00 cmp %g2, 0
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
2027494: 22 bf ff f2 be,a 202745c <rtems_bdpart_write+0xd8> <== NEVER TAKEN
2027498: 82 00 60 30 add %g1, 0x30, %g1 <== NOT EXECUTED
202749c: c8 00 60 04 ld [ %g1 + 4 ], %g4
20274a0: 80 a0 c0 04 cmp %g3, %g4
20274a4: 0a 80 00 0a bcs 20274cc <rtems_bdpart_write+0x148> <== NEVER TAKEN
20274a8: 82 00 60 30 add %g1, 0x30, %g1
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
20274ac: 10 bf ff ed b 2027460 <rtems_bdpart_write+0xdc>
20274b0: 84 00 a0 01 inc %g2
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
20274b4: 92 10 00 1c mov %i4, %o1
20274b8: 40 00 e6 25 call 2060d4c <.urem>
20274bc: 90 10 00 10 mov %l0, %o0
20274c0: 90 24 00 08 sub %l0, %o0, %o0
20274c4: 10 bf ff da b 202742c <rtems_bdpart_write+0xa8>
20274c8: d0 27 bf f0 st %o0, [ %fp + -16 ]
* 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;
20274cc: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
}
}
cleanup:
if (fd >= 0) {
20274d0: d0 07 bf f4 ld [ %fp + -12 ], %o0
20274d4: 80 a2 20 00 cmp %o0, 0
20274d8: 26 80 00 05 bl,a 20274ec <rtems_bdpart_write+0x168> <== NEVER TAKEN
20274dc: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED
close( fd);
20274e0: 7f ff 85 85 call 2008af4 <close>
20274e4: 01 00 00 00 nop
}
if (block != NULL) {
20274e8: d0 07 bf ec ld [ %fp + -20 ], %o0
20274ec: 80 a2 20 00 cmp %o0, 0
20274f0: 02 80 00 04 be 2027500 <rtems_bdpart_write+0x17c> <== NEVER TAKEN
20274f4: 01 00 00 00 nop
rtems_bdbuf_sync( block);
20274f8: 7f ff 7d 7d call 2006aec <rtems_bdbuf_sync>
20274fc: 01 00 00 00 nop
2027500: 81 c7 e0 08 ret
2027504: 81 e8 00 00 restore
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
2027508: 80 a0 60 00 cmp %g1, 0
202750c: 12 bf ff f1 bne 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027510: b0 10 20 18 mov 0x18, %i0
* 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;
2027514: 80 a6 e0 04 cmp %i3, 4
2027518: 08 80 00 03 bleu 2027524 <rtems_bdpart_write+0x1a0> <== NEVER TAKEN
202751c: a2 10 00 1b mov %i3, %l1
2027520: a2 10 20 03 mov 3, %l1
/*
* 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) {
2027524: 80 a7 60 00 cmp %i5, 0
2027528: 02 80 00 06 be 2027540 <rtems_bdpart_write+0x1bc> <== NEVER TAKEN
202752c: 80 a4 40 1b cmp %l1, %i3
2027530: 80 a3 e0 3f cmp %o7, 0x3f
2027534: 12 bf ff e7 bne 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027538: b0 10 20 0a mov 0xa, %i0
* 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) {
202753c: 80 a4 40 1b cmp %l1, %i3
2027540: 1a 80 00 20 bcc 20275c0 <rtems_bdpart_write+0x23c> <== NEVER TAKEN
2027544: 82 04 7f ff add %l1, -1, %g1
if ((pt [i].begin - pt [i - 1].end) < record_space) {
2027548: 85 2c 60 04 sll %l1, 4, %g2
202754c: 87 28 60 04 sll %g1, 4, %g3
2027550: 89 2c 60 06 sll %l1, 6, %g4
2027554: 83 28 60 06 sll %g1, 6, %g1
2027558: 84 21 00 02 sub %g4, %g2, %g2
202755c: 82 20 40 03 sub %g1, %g3, %g1
2027560: c4 06 80 02 ld [ %i2 + %g2 ], %g2
2027564: 82 06 80 01 add %i2, %g1, %g1
2027568: c2 00 60 04 ld [ %g1 + 4 ], %g1
202756c: 82 20 80 01 sub %g2, %g1, %g1
2027570: 80 a7 00 01 cmp %i4, %g1
2027574: 18 bf ff d7 bgu 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
2027578: b0 10 20 0a mov 0xa, %i0
202757c: 84 04 60 01 add %l1, 1, %g2
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
2027580: 82 10 00 11 mov %l1, %g1
* 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) {
2027584: 87 28 a0 04 sll %g2, 4, %g3
2027588: 85 28 a0 06 sll %g2, 6, %g2
202758c: 84 20 80 03 sub %g2, %g3, %g2
2027590: 10 80 00 08 b 20275b0 <rtems_bdpart_write+0x22c>
2027594: 84 06 80 02 add %i2, %g2, %g2
2027598: c8 00 c0 00 ld [ %g3 ], %g4
202759c: c6 00 ff d4 ld [ %g3 + -44 ], %g3
20275a0: 86 21 00 03 sub %g4, %g3, %g3
20275a4: 80 a7 00 03 cmp %i4, %g3
20275a8: 18 bf ff c9 bgu 20274cc <rtems_bdpart_write+0x148> <== NEVER TAKEN
20275ac: 84 00 a0 30 add %g2, 0x30, %g2
* 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) {
20275b0: 82 00 60 01 inc %g1
20275b4: 80 a6 c0 01 cmp %i3, %g1
20275b8: 18 bf ff f8 bgu 2027598 <rtems_bdpart_write+0x214>
20275bc: 86 10 00 02 mov %g2, %g3
20275c0: ba 10 00 1a mov %i2, %i5
20275c4: a4 10 20 00 clr %l2
20275c8: 10 80 00 0c b 20275f8 <rtems_bdpart_write+0x274>
20275cc: b0 07 bf ff add %fp, -1, %i0
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
20275d0: 80 a0 60 00 cmp %g1, 0
20275d4: 12 80 00 10 bne 2027614 <rtems_bdpart_write+0x290> <== NEVER TAKEN
20275d8: a4 04 a0 01 inc %l2
20275dc: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
20275e0: 80 a0 60 ff cmp %g1, 0xff
20275e4: 18 80 00 0c bgu 2027614 <rtems_bdpart_write+0x290> <== NEVER TAKEN
20275e8: ba 07 60 30 add %i5, 0x30, %i5
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
20275ec: 80 a4 80 1b cmp %l2, %i3
20275f0: 02 80 00 0b be 202761c <rtems_bdpart_write+0x298>
20275f4: d0 07 bf f8 ld [ %fp + -8 ], %o0
uint8_t type = 0;
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
20275f8: 90 07 60 08 add %i5, 8, %o0
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
20275fc: c0 2f bf ff clrb [ %fp + -1 ]
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
2027600: 7f ff fe 5c call 2026f70 <rtems_bdpart_to_mbr_partition_type>
2027604: 92 10 00 18 mov %i0, %o1
2027608: 80 8a 20 ff btst 0xff, %o0
202760c: 32 bf ff f1 bne,a 20275d0 <rtems_bdpart_write+0x24c> <== ALWAYS TAKEN
2027610: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
esc = RTEMS_INVALID_ID;
2027614: 10 bf ff af b 20274d0 <rtems_bdpart_write+0x14c> <== NOT EXECUTED
2027618: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( dd, 0, &block);
202761c: 92 10 20 00 clr %o1
2027620: 7f ff ff 35 call 20272f4 <rtems_bdpart_new_record>
2027624: 94 07 bf ec add %fp, -20, %o2
if (sc != RTEMS_SUCCESSFUL) {
2027628: b0 92 20 00 orcc %o0, 0, %i0
202762c: 12 bf ff aa bne 20274d4 <rtems_bdpart_write+0x150> <== NEVER TAKEN
2027630: d0 07 bf f4 ld [ %fp + -12 ], %o0
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
2027634: c2 07 bf ec ld [ %fp + -20 ], %g1
2027638: c4 06 60 04 ld [ %i1 + 4 ], %g2
202763c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
2027640: 86 00 60 04 add %g1, 4, %g3
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
2027644: c4 28 61 b8 stb %g2, [ %g1 + 0x1b8 ]
value >>= 8;
2027648: 82 00 60 01 inc %g1
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
202764c: 80 a0 40 03 cmp %g1, %g3
2027650: 12 bf ff fd bne 2027644 <rtems_bdpart_write+0x2c0>
2027654: 85 30 a0 08 srl %g2, 8, %g2
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;
2027658: c2 07 bf ec ld [ %fp + -20 ], %g1
for (i = 0; i < ppc; ++i) {
202765c: b0 10 20 00 clr %i0
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;
2027660: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
2027664: 98 07 61 be add %i5, 0x1be, %o4
2027668: ba 07 61 c2 add %i5, 0x1c2, %i5
202766c: b2 10 00 0c mov %o4, %i1
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
data,
p->begin,
p->end - p->begin,
2027670: c6 04 00 00 ld [ %l0 ], %g3
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(
2027674: c8 04 20 04 ld [ %l0 + 4 ], %g4
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
}
2027678: da 0c 20 08 ldub [ %l0 + 8 ], %o5
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(
202767c: de 0c 20 2f ldub [ %l0 + 0x2f ], %o7
2027680: 88 21 00 03 sub %g4, %g3, %g4
2027684: 84 10 00 19 mov %i1, %g2
2027688: 82 10 00 19 mov %i1, %g1
data [i] = (uint8_t) value;
202768c: c6 28 60 08 stb %g3, [ %g1 + 8 ]
value >>= 8;
2027690: 82 00 60 01 inc %g1
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
2027694: 80 a0 40 1d cmp %g1, %i5
2027698: 12 bf ff fd bne 202768c <rtems_bdpart_write+0x308>
202769c: 87 30 e0 08 srl %g3, 8, %g3
data [i] = (uint8_t) value;
20276a0: c8 28 a0 0c stb %g4, [ %g2 + 0xc ]
value >>= 8;
20276a4: 84 00 a0 01 inc %g2
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
20276a8: 80 a7 40 02 cmp %i5, %g2
20276ac: 12 bf ff fd bne 20276a0 <rtems_bdpart_write+0x31c>
20276b0: 89 31 20 08 srl %g4, 8, %g4
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
20276b4: da 2e 60 04 stb %o5, [ %i1 + 4 ]
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
20276b8: de 2e 40 00 stb %o7, [ %i1 ]
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) {
20276bc: b0 06 20 01 inc %i0
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
);
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
20276c0: b2 06 60 10 add %i1, 0x10, %i1
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) {
20276c4: a0 04 20 30 add %l0, 0x30, %l0
20276c8: 80 a6 00 11 cmp %i0, %l1
20276cc: 12 bf ff e9 bne 2027670 <rtems_bdpart_write+0x2ec>
20276d0: ba 07 60 10 add %i5, 0x10, %i5
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
20276d4: 89 2c 60 04 sll %l1, 4, %g4
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
20276d8: b0 10 20 00 clr %i0
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
20276dc: 80 a4 40 1b cmp %l1, %i3
20276e0: 02 bf ff 7c be 20274d0 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
20276e4: 82 03 00 04 add %o4, %g4, %g1
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
20276e8: bb 2c 60 06 sll %l1, 6, %i5
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
20276ec: f0 07 bf f0 ld [ %fp + -16 ], %i0
/* 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;
20276f0: ba 27 40 04 sub %i5, %g4, %i5
20276f4: e0 06 80 1d ld [ %i2 + %i5 ], %l0
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
20276f8: 86 10 00 01 mov %g1, %g3
/* 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;
20276fc: a0 24 00 1c sub %l0, %i4, %l0
2027700: ba 06 80 1d add %i2, %i5, %i5
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
2027704: b0 26 00 10 sub %i0, %l0, %i0
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
2027708: 9e 00 60 04 add %g1, 4, %o7
202770c: 84 10 00 01 mov %g1, %g2
2027710: b2 10 00 10 mov %l0, %i1
data [i] = (uint8_t) value;
2027714: f2 28 a0 08 stb %i1, [ %g2 + 8 ]
value >>= 8;
2027718: 84 00 a0 01 inc %g2
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
202771c: 80 a0 80 0f cmp %g2, %o7
2027720: 12 bf ff fd bne 2027714 <rtems_bdpart_write+0x390>
2027724: b3 36 60 08 srl %i1, 8, %i1
data [i] = (uint8_t) value;
2027728: f0 28 e0 0c stb %i0, [ %g3 + 0xc ]
value >>= 8;
202772c: 86 00 e0 01 inc %g3
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
2027730: 80 a0 c0 0f cmp %g3, %o7
2027734: 12 bf ff fd bne 2027728 <rtems_bdpart_write+0x3a4>
2027738: b1 36 20 08 srl %i0, 8, %i0
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
202773c: 84 10 20 05 mov 5, %g2
2027740: c4 28 60 04 stb %g2, [ %g1 + 4 ]
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
2027744: 80 a4 40 1b cmp %l1, %i3
2027748: 1a 80 00 45 bcc 202785c <rtems_bdpart_write+0x4d8> <== NEVER TAKEN
202774c: c0 2b 00 04 clrb [ %o4 + %g4 ]
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
2027750: 82 04 60 01 add %l1, 1, %g1
2027754: b2 10 00 11 mov %l1, %i1
2027758: 85 28 60 04 sll %g1, 4, %g2
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
202775c: a4 10 20 05 mov 5, %l2
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
2027760: 83 28 60 06 sll %g1, 6, %g1
2027764: 82 20 40 02 sub %g1, %g2, %g1
2027768: b4 06 80 01 add %i2, %g1, %i2
0
);
}
/* New EBR */
ebr = p->begin - record_space;
202776c: d2 07 40 00 ld [ %i5 ], %o1
sc = rtems_bdpart_new_record( dd, ebr, &block);
2027770: d0 07 bf f8 ld [ %fp + -8 ], %o0
2027774: 92 22 40 1c sub %o1, %i4, %o1
2027778: 7f ff fe df call 20272f4 <rtems_bdpart_new_record>
202777c: 94 07 bf ec add %fp, -20, %o2
if (sc != RTEMS_SUCCESSFUL) {
2027780: 80 a2 20 00 cmp %o0, 0
2027784: 12 80 00 34 bne 2027854 <rtems_bdpart_write+0x4d0> <== NEVER TAKEN
2027788: c2 07 bf ec ld [ %fp + -20 ], %g1
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
202778c: c4 07 60 04 ld [ %i5 + 4 ], %g2
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
2027790: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
2027794: c2 07 40 00 ld [ %i5 ], %g1
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
}
2027798: f0 0f 60 08 ldub [ %i5 + 8 ], %i0
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
202779c: 84 20 80 01 sub %g2, %g1, %g2
20277a0: fa 0f 60 2f ldub [ %i5 + 0x2f ], %i5
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
20277a4: 88 00 e1 ca add %g3, 0x1ca, %g4
data [i] = (uint8_t) value;
20277a8: f8 28 e1 c6 stb %i4, [ %g3 + 0x1c6 ]
20277ac: c0 28 e1 c7 clrb [ %g3 + 0x1c7 ]
20277b0: c0 28 e1 c8 clrb [ %g3 + 0x1c8 ]
20277b4: c0 28 e1 c9 clrb [ %g3 + 0x1c9 ]
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
20277b8: 82 10 20 00 clr %g1
data [i] = (uint8_t) value;
20277bc: c4 29 00 01 stb %g2, [ %g4 + %g1 ]
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
20277c0: 82 00 60 01 inc %g1
20277c4: 80 a0 60 04 cmp %g1, 4
20277c8: 12 bf ff fd bne 20277bc <rtems_bdpart_write+0x438>
20277cc: 85 30 a0 08 srl %g2, 8, %g2
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
20277d0: f0 28 e1 c2 stb %i0, [ %g3 + 0x1c2 ]
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
20277d4: b2 06 60 01 inc %i1
20277d8: 80 a6 c0 19 cmp %i3, %i1
20277dc: 08 80 00 20 bleu 202785c <rtems_bdpart_write+0x4d8>
20277e0: fa 28 e1 be stb %i5, [ %g3 + 0x1be ]
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
20277e4: 80 a4 40 19 cmp %l1, %i1
20277e8: 1a 80 00 19 bcc 202784c <rtems_bdpart_write+0x4c8> <== NEVER TAKEN
20277ec: ba 10 00 1a mov %i2, %i5
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,
20277f0: c4 07 bf ec ld [ %fp + -20 ], %g2
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;
20277f4: c2 06 80 00 ld [ %i2 ], %g1
rtems_bdpart_write_mbr_partition(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1,
20277f8: f0 00 a0 1c ld [ %g2 + 0x1c ], %i0
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
20277fc: c4 07 bf f0 ld [ %fp + -16 ], %g2
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;
2027800: 82 20 40 1c sub %g1, %i4, %g1
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
2027804: 88 06 21 d6 add %i0, 0x1d6, %g4
/* Write second partition entry */
if (i > ppc) {
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
2027808: 86 20 40 10 sub %g1, %l0, %g3
202780c: 84 20 80 01 sub %g2, %g1, %g2
2027810: 82 10 20 00 clr %g1
data [i] = (uint8_t) value;
2027814: c6 29 00 01 stb %g3, [ %g4 + %g1 ]
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
2027818: 82 00 60 01 inc %g1
202781c: 80 a0 60 04 cmp %g1, 4
2027820: 12 bf ff fd bne 2027814 <rtems_bdpart_write+0x490>
2027824: 87 30 e0 08 srl %g3, 8, %g3
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_uint32_to_little_endian( size, data + RTEMS_BDPART_MBR_OFFSET_SIZE);
2027828: 86 06 21 da add %i0, 0x1da, %g3
202782c: 82 10 20 00 clr %g1
data [i] = (uint8_t) value;
2027830: c4 28 c0 01 stb %g2, [ %g3 + %g1 ]
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
2027834: 82 00 60 01 inc %g1
2027838: 80 a0 60 04 cmp %g1, 4
202783c: 12 bf ff fd bne 2027830 <rtems_bdpart_write+0x4ac>
2027840: 85 30 a0 08 srl %g2, 8, %g2
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
2027844: e4 2e 21 d2 stb %l2, [ %i0 + 0x1d2 ]
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
2027848: c0 2e 21 ce clrb [ %i0 + 0x1ce ]
202784c: 10 bf ff c8 b 202776c <rtems_bdpart_write+0x3e8>
2027850: b4 06 a0 30 add %i2, 0x30, %i2
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
2027854: 10 bf ff 1f b 20274d0 <rtems_bdpart_write+0x14c> <== NOT EXECUTED
2027858: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
202785c: 10 bf ff 1d b 20274d0 <rtems_bdpart_write+0x14c>
2027860: b0 10 20 00 clr %i0
02003a0c <rtems_blkdev_create>:
uint32_t block_size,
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data
)
{
2003a0c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block_size > 0 && block_count > 0) {
2003a10: 80 a6 a0 00 cmp %i2, 0
2003a14: 12 80 00 04 bne 2003a24 <rtems_blkdev_create+0x18>
2003a18: ba 10 00 18 mov %i0, %i5
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
2003a1c: 81 c7 e0 08 ret
2003a20: 91 e8 20 0a restore %g0, 0xa, %o0
void *driver_data
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block_size > 0 && block_count > 0) {
2003a24: 80 a6 60 00 cmp %i1, 0
2003a28: 02 80 00 25 be 2003abc <rtems_blkdev_create+0xb0>
2003a2c: b0 10 20 0a mov 0xa, %i0
rtems_blkdev_imfs_context *ctx = calloc(1, sizeof(*ctx));
2003a30: 90 10 20 01 mov 1, %o0
2003a34: 92 10 20 40 mov 0x40, %o1
2003a38: 40 00 05 4f call 2004f74 <calloc>
2003a3c: b0 10 20 1a mov 0x1a, %i0
if (ctx != NULL) {
2003a40: 80 a2 20 00 cmp %o0, 0
2003a44: 02 80 00 1e be 2003abc <rtems_blkdev_create+0xb0>
2003a48: a0 10 00 08 mov %o0, %l0
rtems_disk_device *dd = &ctx->dd;
int rv;
ctx->fd = -1;
dd->phys_dev = dd;
2003a4c: d0 24 20 08 st %o0, [ %l0 + 8 ]
if (ctx != NULL) {
rtems_disk_device *dd = &ctx->dd;
int rv;
ctx->fd = -1;
2003a50: 82 10 3f ff mov -1, %g1
dd->phys_dev = dd;
dd->size = block_count;
2003a54: f4 22 20 1c st %i2, [ %o0 + 0x1c ]
if (ctx != NULL) {
rtems_disk_device *dd = &ctx->dd;
int rv;
ctx->fd = -1;
2003a58: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
dd->phys_dev = dd;
dd->size = block_count;
dd->media_block_size = block_size;
2003a5c: f2 22 20 24 st %i1, [ %o0 + 0x24 ]
dd->block_size = block_size;
2003a60: f2 22 20 20 st %i1, [ %o0 + 0x20 ]
dd->ioctl = handler;
2003a64: f6 22 20 28 st %i3, [ %o0 + 0x28 ]
dd->driver_data = driver_data;
2003a68: f8 22 20 2c st %i4, [ %o0 + 0x2c ]
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) != 0) {
2003a6c: 94 02 20 0c add %o0, 0xc, %o2
2003a70: 13 08 00 10 sethi %hi(0x20004000), %o1
2003a74: 9f c6 c0 00 call %i3
2003a78: 92 12 62 08 or %o1, 0x208, %o1 ! 20004208 <RAM_END+0x1dc04208>
2003a7c: 80 a2 20 00 cmp %o0, 0
2003a80: 32 80 00 02 bne,a 2003a88 <rtems_blkdev_create+0x7c> <== ALWAYS TAKEN
2003a84: c0 24 20 0c clr [ %l0 + 0xc ]
dd->capabilities = 0;
}
rv = IMFS_make_generic_node(
2003a88: 90 10 00 1d mov %i5, %o0
2003a8c: 13 00 00 18 sethi %hi(0x6000), %o1
2003a90: 15 00 80 7c sethi %hi(0x201f000), %o2
2003a94: 92 12 61 ff or %o1, 0x1ff, %o1
2003a98: 94 12 a2 10 or %o2, 0x210, %o2
2003a9c: 96 10 00 10 mov %l0, %o3
2003aa0: 40 00 03 7f call 200489c <IMFS_make_generic_node>
2003aa4: b0 10 20 00 clr %i0
S_IFBLK | S_IRWXU | S_IRWXG | S_IRWXO,
&rtems_blkdev_imfs_control,
ctx
);
if (rv != 0) {
2003aa8: 80 a2 20 00 cmp %o0, 0
2003aac: 02 80 00 04 be 2003abc <rtems_blkdev_create+0xb0>
2003ab0: 90 10 00 10 mov %l0, %o0
free(ctx);
2003ab4: 40 00 06 01 call 20052b8 <free>
2003ab8: b0 10 20 0d mov 0xd, %i0
2003abc: 81 c7 e0 08 ret
2003ac0: 81 e8 00 00 restore
02003ac4 <rtems_blkdev_create_partition>:
const char *partition,
const char *device,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
2003ac4: 9d e3 bf 48 save %sp, -184, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(device, O_RDWR);
2003ac8: 92 10 20 02 mov 2, %o1
2003acc: 90 10 00 19 mov %i1, %o0
2003ad0: 40 00 0a 5c call 2006440 <open>
2003ad4: b8 10 00 18 mov %i0, %i4
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
}
} else {
sc = RTEMS_INVALID_ID;
2003ad8: b0 10 20 04 mov 4, %i0
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
int fd = open(device, O_RDWR);
if (fd >= 0) {
2003adc: 80 a2 20 00 cmp %o0, 0
2003ae0: 06 80 00 10 bl 2003b20 <rtems_blkdev_create_partition+0x5c>
2003ae4: ba 10 00 08 mov %o0, %i5
int rv;
struct stat st;
rv = fstat(fd, &st);
2003ae8: 92 07 bf b0 add %fp, -80, %o1
2003aec: 40 00 06 1d call 2005360 <fstat>
2003af0: b0 10 20 15 mov 0x15, %i0
if (rv == 0 && S_ISBLK(st.st_mode)) {
2003af4: 80 a2 20 00 cmp %o0, 0
2003af8: 12 80 00 08 bne 2003b18 <rtems_blkdev_create_partition+0x54><== NEVER TAKEN
2003afc: 03 00 00 3c sethi %hi(0xf000), %g1
2003b00: e0 07 bf bc ld [ %fp + -68 ], %l0
2003b04: a0 0c 00 01 and %l0, %g1, %l0
2003b08: 03 00 00 18 sethi %hi(0x6000), %g1
2003b0c: 80 a4 00 01 cmp %l0, %g1
2003b10: 02 80 00 06 be 2003b28 <rtems_blkdev_create_partition+0x64>
2003b14: 90 10 00 1d mov %i5, %o0
} else {
sc = RTEMS_INVALID_NODE;
}
if (sc != RTEMS_SUCCESSFUL) {
close(fd);
2003b18: 40 00 05 2c call 2004fc8 <close>
2003b1c: 90 10 00 1d mov %i5, %o0
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
2003b20: 81 c7 e0 08 ret
2003b24: 81 e8 00 00 restore
rv = fstat(fd, &st);
if (rv == 0 && S_ISBLK(st.st_mode)) {
rtems_disk_device *dd;
rv = ioctl(fd, RTEMS_BLKIO_GETDISKDEV, &dd);
2003b28: 94 07 bf fc add %fp, -4, %o2
2003b2c: 13 10 01 10 sethi %hi(0x40044000), %o1
}
} else {
sc = RTEMS_INVALID_NUMBER;
}
} else {
sc = RTEMS_NOT_IMPLEMENTED;
2003b30: b0 10 20 18 mov 0x18, %i0
rv = fstat(fd, &st);
if (rv == 0 && S_ISBLK(st.st_mode)) {
rtems_disk_device *dd;
rv = ioctl(fd, RTEMS_BLKIO_GETDISKDEV, &dd);
2003b34: 40 00 06 65 call 20054c8 <ioctl>
2003b38: 92 12 62 09 or %o1, 0x209, %o1
if (rv == 0) {
2003b3c: 80 a2 20 00 cmp %o0, 0
2003b40: 12 bf ff f6 bne 2003b18 <rtems_blkdev_create_partition+0x54>
2003b44: d2 07 bf fc ld [ %fp + -4 ], %o1
rtems_blkdev_bnum device_block_count = rtems_disk_get_block_count(dd);
if (
2003b48: 80 a6 e0 00 cmp %i3, 0
2003b4c: 02 80 00 20 be 2003bcc <rtems_blkdev_create_partition+0x108>
2003b50: c2 02 60 1c ld [ %o1 + 0x1c ], %g1
2003b54: 80 a6 80 01 cmp %i2, %g1
2003b58: 1a bf ff f0 bcc 2003b18 <rtems_blkdev_create_partition+0x54>
2003b5c: b0 10 20 0a mov 0xa, %i0
block_begin < device_block_count
&& block_count > 0
&& block_count <= device_block_count - block_begin
2003b60: 82 20 40 1a sub %g1, %i2, %g1
2003b64: 80 a6 c0 01 cmp %i3, %g1
2003b68: 18 bf ff ec bgu 2003b18 <rtems_blkdev_create_partition+0x54>
2003b6c: 01 00 00 00 nop
) {
rtems_blkdev_imfs_context *ctx = malloc(sizeof(*ctx));
2003b70: d2 27 bf ac st %o1, [ %fp + -84 ]
2003b74: 40 00 07 fb call 2005b60 <malloc>
2003b78: 90 10 20 40 mov 0x40, %o0
if (ctx != NULL) {
2003b7c: b2 92 20 00 orcc %o0, 0, %i1
2003b80: 02 80 00 15 be 2003bd4 <rtems_blkdev_create_partition+0x110>
2003b84: d2 07 bf ac ld [ %fp + -84 ], %o1
memcpy(&ctx->dd, dd, sizeof(ctx->dd));
2003b88: 40 00 43 66 call 2014920 <memcpy>
2003b8c: 94 10 20 38 mov 0x38, %o2
ctx->dd.start = block_begin;
ctx->dd.size = block_count;
ctx->fd = fd;
rv = IMFS_make_generic_node(
2003b90: 90 10 00 1c mov %i4, %o0
if (ctx != NULL) {
memcpy(&ctx->dd, dd, sizeof(ctx->dd));
ctx->dd.start = block_begin;
ctx->dd.size = block_count;
2003b94: f4 3e 60 18 std %i2, [ %i1 + 0x18 ]
ctx->fd = fd;
2003b98: fa 26 60 38 st %i5, [ %i1 + 0x38 ]
rv = IMFS_make_generic_node(
2003b9c: 92 14 21 ff or %l0, 0x1ff, %o1
2003ba0: 96 10 00 19 mov %i1, %o3
2003ba4: 15 00 80 7c sethi %hi(0x201f000), %o2
S_IFBLK | S_IRWXU | S_IRWXG | S_IRWXO,
&rtems_blkdev_imfs_control,
ctx
);
if (rv != 0) {
2003ba8: b0 10 20 00 clr %i0
ctx->dd.start = block_begin;
ctx->dd.size = block_count;
ctx->fd = fd;
rv = IMFS_make_generic_node(
2003bac: 40 00 03 3c call 200489c <IMFS_make_generic_node>
2003bb0: 94 12 a2 10 or %o2, 0x210, %o2
S_IFBLK | S_IRWXU | S_IRWXG | S_IRWXO,
&rtems_blkdev_imfs_control,
ctx
);
if (rv != 0) {
2003bb4: 80 a2 20 00 cmp %o0, 0
2003bb8: 02 bf ff da be 2003b20 <rtems_blkdev_create_partition+0x5c>
2003bbc: 90 10 00 19 mov %i1, %o0
free(ctx);
2003bc0: 40 00 05 be call 20052b8 <free>
2003bc4: b0 10 20 0d mov 0xd, %i0
2003bc8: 30 bf ff d4 b,a 2003b18 <rtems_blkdev_create_partition+0x54>
}
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_NUMBER;
2003bcc: 10 bf ff d3 b 2003b18 <rtems_blkdev_create_partition+0x54>
2003bd0: b0 10 20 0a mov 0xa, %i0
if (rv != 0) {
free(ctx);
sc = RTEMS_UNSATISFIED;
}
} else {
sc = RTEMS_NO_MEMORY;
2003bd4: 10 bf ff d1 b 2003b18 <rtems_blkdev_create_partition+0x54>
2003bd8: b0 10 20 1a mov 0x1a, %i0
0200fafc <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)
{
200fafc: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
200fb00: c2 06 80 00 ld [ %i2 ], %g1
if (args->command != RTEMS_BLKIO_REQUEST)
200fb04: d2 06 a0 04 ld [ %i2 + 4 ], %o1
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;
200fb08: d0 00 60 40 ld [ %g1 + 0x40 ], %o0
if (args->command != RTEMS_BLKIO_REQUEST)
200fb0c: 03 30 06 10 sethi %hi(0xc0184000), %g1
200fb10: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201>
200fb14: 80 a2 40 01 cmp %o1, %g1
200fb18: 12 80 00 05 bne 200fb2c <rtems_blkdev_generic_ioctl+0x30> <== ALWAYS TAKEN
200fb1c: 82 10 3f ff mov -1, %g1
{
/*
* It is not allowed to directly access the driver circumventing the
* cache.
*/
args->ioctl_return = -1;
200fb20: c2 26 a0 0c st %g1, [ %i2 + 0xc ] <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
200fb24: 81 c7 e0 08 ret <== NOT EXECUTED
200fb28: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
if (args->command != RTEMS_BLKIO_REQUEST)
{
args->ioctl_return = dd->ioctl(dd,
200fb2c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
200fb30: d4 06 a0 08 ld [ %i2 + 8 ], %o2
200fb34: 9f c0 40 00 call %g1
200fb38: b0 10 20 00 clr %i0
200fb3c: d0 26 a0 0c st %o0, [ %i2 + 0xc ]
*/
args->ioctl_return = -1;
}
return RTEMS_SUCCESSFUL;
}
200fb40: 81 c7 e0 08 ret
200fb44: 81 e8 00 00 restore
0200f8d0 <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)
{
200f8d0: 9d e3 bf 98 save %sp, -104, %sp
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;
200f8d4: c2 06 80 00 ld [ %i2 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
200f8d8: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3
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;
200f8dc: e4 00 60 40 ld [ %g1 + 0x40 ], %l2
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
200f8e0: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
{
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;
200f8e4: e2 04 a0 20 ld [ %l2 + 0x20 ], %l1
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);
args->bytes_moved = 0;
200f8e8: c0 26 a0 1c clr [ %i2 + 0x1c ]
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);
200f8ec: f8 1e a0 08 ldd [ %i2 + 8 ], %i4
uint32_t blkofs = (uint32_t) (args->offset % block_size);
args->bytes_moved = 0;
while (count > 0)
200f8f0: 80 a6 e0 00 cmp %i3, 0
200f8f4: 02 80 00 2d be 200f9a8 <rtems_blkdev_generic_read+0xd8> <== NEVER TAKEN
200f8f8: b0 10 20 00 clr %i0
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);
200f8fc: 94 10 20 00 clr %o2
200f900: 96 10 00 11 mov %l1, %o3
200f904: 92 10 00 1d mov %i5, %o1
200f908: 40 00 34 9f call 201cb84 <__divdi3>
200f90c: 90 10 00 1c mov %i4, %o0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f910: 90 10 00 1c mov %i4, %o0
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);
200f914: a0 10 00 09 mov %o1, %l0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f918: 94 10 20 00 clr %o2
200f91c: 92 10 00 1d mov %i5, %o1
200f920: 40 00 35 7f call 201cf1c <__moddi3>
200f924: 96 10 00 11 mov %l1, %o3
200f928: 10 80 00 18 b 200f988 <rtems_blkdev_generic_read+0xb8>
200f92c: ba 10 00 09 mov %o1, %i5
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
200f930: b8 24 40 1d sub %l1, %i5, %i4
200f934: 80 a7 00 1b cmp %i4, %i3
200f938: 08 80 00 03 bleu 200f944 <rtems_blkdev_generic_read+0x74> <== ALWAYS TAKEN
200f93c: c2 07 bf fc ld [ %fp + -4 ], %g1
200f940: b8 10 00 1b mov %i3, %i4 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
200f944: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
200f948: 94 10 00 1c mov %i4, %o2
200f94c: 40 00 11 b4 call 201401c <memcpy>
200f950: 92 02 40 1d add %o1, %i5, %o1
rc = rtems_bdbuf_release(diskbuf);
200f954: d0 07 bf fc ld [ %fp + -4 ], %o0
200f958: 7f ff fe 57 call 200f2b4 <rtems_bdbuf_release>
200f95c: b2 06 40 1c add %i1, %i4, %i1
args->bytes_moved += copy;
200f960: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
200f964: b0 10 00 08 mov %o0, %i0
args->bytes_moved += copy;
200f968: 82 00 40 1c add %g1, %i4, %g1
if (rc != RTEMS_SUCCESSFUL)
200f96c: 80 a2 20 00 cmp %o0, 0
200f970: 12 80 00 0e bne 200f9a8 <rtems_blkdev_generic_read+0xd8> <== NEVER TAKEN
200f974: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
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)
200f978: b6 a6 c0 1c subcc %i3, %i4, %i3
200f97c: 02 80 00 0b be 200f9a8 <rtems_blkdev_generic_read+0xd8> <== ALWAYS TAKEN
200f980: a0 04 20 01 inc %l0
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
200f984: ba 10 20 00 clr %i5 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
200f988: 92 10 00 10 mov %l0, %o1
200f98c: 94 07 bf fc add %fp, -4, %o2
200f990: 7f ff fd a4 call 200f020 <rtems_bdbuf_read>
200f994: 90 10 00 12 mov %l2, %o0
200f998: b0 10 00 08 mov %o0, %i0
if (rc != RTEMS_SUCCESSFUL)
200f99c: 80 a6 20 00 cmp %i0, 0
200f9a0: 02 bf ff e4 be 200f930 <rtems_blkdev_generic_read+0x60> <== ALWAYS TAKEN
200f9a4: 90 10 00 19 mov %i1, %o0
blkofs = 0;
block++;
}
return rc;
}
200f9a8: 81 c7 e0 08 ret
200f9ac: 81 e8 00 00 restore
0200f9b0 <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)
{
200f9b0: 9d e3 bf 98 save %sp, -104, %sp
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;
200f9b4: c2 06 80 00 ld [ %i2 ], %g1
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
200f9b8: f6 06 a0 14 ld [ %i2 + 0x14 ], %i3
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;
200f9bc: e4 00 60 40 ld [ %g1 + 0x40 ], %l2
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
200f9c0: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
{
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;
200f9c4: e2 04 a0 20 ld [ %l2 + 0x20 ], %l1
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);
args->bytes_moved = 0;
200f9c8: c0 26 a0 1c clr [ %i2 + 0x1c ]
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);
200f9cc: f8 1e a0 08 ldd [ %i2 + 8 ], %i4
uint32_t blkofs = (uint32_t) (args->offset % block_size);
args->bytes_moved = 0;
while (count > 0)
200f9d0: 80 a6 e0 00 cmp %i3, 0
200f9d4: 02 80 00 36 be 200faac <rtems_blkdev_generic_write+0xfc> <== NEVER TAKEN
200f9d8: 90 10 20 00 clr %o0
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);
200f9dc: 94 10 20 00 clr %o2
200f9e0: 96 10 00 11 mov %l1, %o3
200f9e4: 92 10 00 1d mov %i5, %o1
200f9e8: 40 00 34 67 call 201cb84 <__divdi3>
200f9ec: 90 10 00 1c mov %i4, %o0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f9f0: 90 10 00 1c mov %i4, %o0
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);
200f9f4: a0 10 00 09 mov %o1, %l0
uint32_t blkofs = (uint32_t) (args->offset % block_size);
200f9f8: 94 10 20 00 clr %o2
200f9fc: 92 10 00 1d mov %i5, %o1
200fa00: 40 00 35 47 call 201cf1c <__moddi3>
200fa04: 96 10 00 11 mov %l1, %o3
200fa08: 10 80 00 1f b 200fa84 <rtems_blkdev_generic_write+0xd4>
200fa0c: ba 10 00 09 mov %o1, %i5
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
200fa10: 12 80 00 21 bne 200fa94 <rtems_blkdev_generic_write+0xe4> <== NEVER TAKEN
200fa14: 92 10 00 10 mov %l0, %o1
rc = rtems_bdbuf_get(dd, block, &diskbuf);
200fa18: 90 10 00 12 mov %l2, %o0
200fa1c: 7f ff fd 56 call 200ef74 <rtems_bdbuf_get>
200fa20: 94 07 bf fc add %fp, -4, %o2
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
200fa24: 80 a2 20 00 cmp %o0, 0
200fa28: 12 80 00 21 bne 200faac <rtems_blkdev_generic_write+0xfc> <== NEVER TAKEN
200fa2c: 92 10 00 19 mov %i1, %o1
break;
copy = block_size - blkofs;
200fa30: b8 24 40 1d sub %l1, %i5, %i4
200fa34: 80 a7 00 1b cmp %i4, %i3
200fa38: 08 80 00 03 bleu 200fa44 <rtems_blkdev_generic_write+0x94><== ALWAYS TAKEN
200fa3c: c2 07 bf fc ld [ %fp + -4 ], %g1
200fa40: b8 10 00 1b mov %i3, %i4 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
200fa44: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
200fa48: 94 10 00 1c mov %i4, %o2
200fa4c: 40 00 11 74 call 201401c <memcpy>
200fa50: 90 02 00 1d add %o0, %i5, %o0
args->bytes_moved += copy;
200fa54: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
rc = rtems_bdbuf_release_modified(diskbuf);
200fa58: d0 07 bf fc ld [ %fp + -4 ], %o0
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
200fa5c: 82 00 40 1c add %g1, %i4, %g1
rc = rtems_bdbuf_release_modified(diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
200fa60: b2 06 40 1c add %i1, %i4, %i1
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
args->bytes_moved += copy;
rc = rtems_bdbuf_release_modified(diskbuf);
200fa64: 7f ff fe 4c call 200f394 <rtems_bdbuf_release_modified>
200fa68: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
if (rc != RTEMS_SUCCESSFUL)
200fa6c: 80 a2 20 00 cmp %o0, 0
200fa70: 12 80 00 0f bne 200faac <rtems_blkdev_generic_write+0xfc> <== NEVER TAKEN
200fa74: b6 a6 c0 1c subcc %i3, %i4, %i3
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)
200fa78: 02 80 00 0d be 200faac <rtems_blkdev_generic_write+0xfc> <== ALWAYS TAKEN
200fa7c: a0 04 20 01 inc %l0
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
buf += copy;
blkofs = 0;
200fa80: ba 10 20 00 clr %i5 <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
200fa84: 80 a6 c0 11 cmp %i3, %l1
200fa88: 1a bf ff e2 bcc 200fa10 <rtems_blkdev_generic_write+0x60> <== ALWAYS TAKEN
200fa8c: 80 a7 60 00 cmp %i5, 0
rc = rtems_bdbuf_get(dd, block, &diskbuf);
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
200fa90: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
200fa94: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
200fa98: 7f ff fd 62 call 200f020 <rtems_bdbuf_read> <== NOT EXECUTED
200fa9c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
200faa0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200faa4: 02 bf ff e3 be 200fa30 <rtems_blkdev_generic_write+0x80> <== NOT EXECUTED
200faa8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
200faac: 81 c7 e0 08 ret
200fab0: 91 e8 00 08 restore %g0, %o0, %o0
02003980 <rtems_blkdev_imfs_fsync_or_fdatasync>:
}
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
2003980: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
2003984: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED
int rv = 0;
2003988: b0 10 20 00 clr %i0 <== NOT EXECUTED
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const rtems_disk_device *dd = &ctx->dd;
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
200398c: 40 00 31 d2 call 20100d4 <rtems_bdbuf_syncdev> <== NOT EXECUTED
2003990: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2003994: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003998: 12 80 00 04 bne 20039a8 <rtems_blkdev_imfs_fsync_or_fdatasync+0x28><== NOT EXECUTED
200399c: 01 00 00 00 nop <== NOT EXECUTED
errno = EIO;
rv = -1;
}
return rv;
}
20039a0: 81 c7 e0 08 ret <== NOT EXECUTED
20039a4: 81 e8 00 00 restore <== NOT EXECUTED
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const rtems_disk_device *dd = &ctx->dd;
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
if (sc != RTEMS_SUCCESSFUL) {
errno = EIO;
20039a8: 40 00 41 54 call 2013ef8 <__errno> <== NOT EXECUTED
20039ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20039b0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20039b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
20039b8: 81 c7 e0 08 ret <== NOT EXECUTED
20039bc: 81 e8 00 00 restore <== NOT EXECUTED
020039c0 <rtems_blkdev_imfs_ioctl>:
static int rtems_blkdev_imfs_ioctl(
rtems_libio_t *iop,
uint32_t request,
void *buffer
)
{
20039c0: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
if (request != RTEMS_BLKIO_REQUEST) {
20039c4: 03 30 06 10 sethi %hi(0xc0184000), %g1
20039c8: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201>
20039cc: 80 a6 40 01 cmp %i1, %g1
20039d0: 02 80 00 09 be 20039f4 <rtems_blkdev_imfs_ioctl+0x34> <== NEVER TAKEN
20039d4: 92 10 00 19 mov %i1, %o1
20039d8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
20039dc: d0 00 60 50 ld [ %g1 + 0x50 ], %o0
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rv = (*dd->ioctl)(dd, request, buffer);
20039e0: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
20039e4: 9f c0 40 00 call %g1
20039e8: 94 10 00 1a mov %i2, %o2
20039ec: 81 c7 e0 08 ret
20039f0: 91 e8 00 08 restore %g0, %o0, %o0
} else {
/*
* It is not allowed to directly access the driver circumventing the cache.
*/
errno = EINVAL;
20039f4: 40 00 41 41 call 2013ef8 <__errno> <== NOT EXECUTED
20039f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20039fc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2003a00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
2003a04: 81 c7 e0 08 ret <== NOT EXECUTED
2003a08: 81 e8 00 00 restore <== NOT EXECUTED
02003804 <rtems_blkdev_imfs_read>:
static ssize_t rtems_blkdev_imfs_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
2003804: 9d e3 bf 98 save %sp, -104, %sp
2003808: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
int rv;
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
200380c: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
2003810: f6 00 60 50 ld [ %g1 + 0x50 ], %i3
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
2003814: 90 10 00 1c mov %i4, %o0
int rv;
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const 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);
2003818: e0 06 e0 20 ld [ %i3 + 0x20 ], %l0
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
200381c: 92 10 00 1d mov %i5, %o1
2003820: a5 3c 20 1f sra %l0, 0x1f, %l2
2003824: 96 10 00 10 mov %l0, %o3
2003828: 40 00 67 4f call 201d564 <__divdi3>
200382c: 94 10 00 12 mov %l2, %o2
ssize_t block_offset = (ssize_t) (offset % block_size);
2003830: 90 10 00 1c mov %i4, %o0
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const 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);
2003834: a2 10 00 09 mov %o1, %l1
ssize_t block_offset = (ssize_t) (offset % block_size);
2003838: 94 10 00 12 mov %l2, %o2
200383c: 92 10 00 1d mov %i5, %o1
2003840: 40 00 68 2f call 201d8fc <__moddi3>
2003844: 96 10 00 10 mov %l0, %o3
)
{
int rv;
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
2003848: b8 10 00 1a mov %i2, %i4
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) {
200384c: 80 a7 20 00 cmp %i4, 0
2003850: 04 80 00 22 ble 20038d8 <rtems_blkdev_imfs_read+0xd4> <== NEVER TAKEN
2003854: ba 10 00 09 mov %o1, %i5
rtems_bdbuf_buffer *bd;
rtems_status_code sc = rtems_bdbuf_read(dd, block, &bd);
2003858: 92 10 00 11 mov %l1, %o1
200385c: 94 07 bf fc add %fp, -4, %o2
2003860: 40 00 30 c9 call 200fb84 <rtems_bdbuf_read>
2003864: 90 10 00 1b mov %i3, %o0
if (sc == RTEMS_SUCCESSFUL) {
2003868: 80 a2 20 00 cmp %o0, 0
200386c: 02 80 00 08 be 200388c <rtems_blkdev_imfs_read+0x88> <== ALWAYS TAKEN
2003870: a4 24 00 1d sub %l0, %i5, %l2
}
if (remaining >= 0) {
rv = (ssize_t) count;
} else {
errno = EIO;
2003874: 40 00 41 a1 call 2013ef8 <__errno> <== NOT EXECUTED
2003878: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200387c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2003880: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
2003884: 81 c7 e0 08 ret <== NOT EXECUTED
2003888: 81 e8 00 00 restore <== NOT EXECUTED
if (copy > remaining) {
copy = remaining;
}
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
200388c: c2 07 bf fc ld [ %fp + -4 ], %g1
while (remaining > 0) {
rtems_bdbuf_buffer *bd;
rtems_status_code sc = rtems_bdbuf_read(dd, block, &bd);
if (sc == RTEMS_SUCCESSFUL) {
ssize_t copy = block_size - block_offset;
2003890: 80 a4 80 1c cmp %l2, %i4
2003894: 04 80 00 03 ble 20038a0 <rtems_blkdev_imfs_read+0x9c>
2003898: 90 10 00 19 mov %i1, %o0
200389c: a4 10 00 1c mov %i4, %l2
if (copy > remaining) {
copy = remaining;
}
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
20038a0: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
20038a4: 94 10 00 12 mov %l2, %o2
20038a8: 40 00 44 1e call 2014920 <memcpy>
20038ac: 92 02 40 1d add %o1, %i5, %o1
sc = rtems_bdbuf_release(bd);
20038b0: d0 07 bf fc ld [ %fp + -4 ], %o0
20038b4: 40 00 31 59 call 200fe18 <rtems_bdbuf_release>
20038b8: b8 27 00 12 sub %i4, %l2, %i4
if (sc == RTEMS_SUCCESSFUL) {
20038bc: 80 a2 20 00 cmp %o0, 0
20038c0: 12 bf ff ed bne 2003874 <rtems_blkdev_imfs_read+0x70> <== NEVER TAKEN
20038c4: 80 a7 20 00 cmp %i4, 0
block_offset = 0;
remaining -= copy;
dst += copy;
20038c8: b2 06 40 12 add %i1, %l2, %i1
++block;
20038cc: a2 04 60 01 inc %l1
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) {
20038d0: 14 bf ff e2 bg 2003858 <rtems_blkdev_imfs_read+0x54>
20038d4: ba 10 20 00 clr %i5
} else {
remaining = -1;
}
}
if (remaining >= 0) {
20038d8: 80 a7 20 00 cmp %i4, 0
20038dc: 12 bf ff e6 bne 2003874 <rtems_blkdev_imfs_read+0x70> <== NEVER TAKEN
20038e0: b0 10 00 1a mov %i2, %i0
errno = EIO;
rv = -1;
}
return rv;
}
20038e4: 81 c7 e0 08 ret
20038e8: 81 e8 00 00 restore
020036d8 <rtems_blkdev_imfs_write>:
static ssize_t rtems_blkdev_imfs_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
20036d8: 9d e3 bf 98 save %sp, -104, %sp
20036dc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
int rv;
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
20036e0: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
20036e4: f6 00 60 50 ld [ %g1 + 0x50 ], %i3
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
20036e8: 90 10 00 1c mov %i4, %o0
int rv;
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const 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);
20036ec: e0 06 e0 20 ld [ %i3 + 0x20 ], %l0
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
20036f0: 92 10 00 1d mov %i5, %o1
20036f4: a5 3c 20 1f sra %l0, 0x1f, %l2
20036f8: 96 10 00 10 mov %l0, %o3
20036fc: 40 00 67 9a call 201d564 <__divdi3>
2003700: 94 10 00 12 mov %l2, %o2
ssize_t block_offset = (ssize_t) (offset % block_size);
2003704: 90 10 00 1c mov %i4, %o0
2003708: 94 10 00 12 mov %l2, %o2
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const 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);
200370c: a2 10 00 09 mov %o1, %l1
ssize_t block_offset = (ssize_t) (offset % block_size);
2003710: 96 10 00 10 mov %l0, %o3
2003714: 40 00 68 7a call 201d8fc <__moddi3>
2003718: 92 10 00 1d mov %i5, %o1
)
{
int rv;
const rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
const rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
200371c: b8 10 00 1a mov %i2, %i4
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) {
2003720: 80 a7 20 00 cmp %i4, 0
2003724: 04 80 00 33 ble 20037f0 <rtems_blkdev_imfs_write+0x118> <== NEVER TAKEN
2003728: a4 10 00 09 mov %o1, %l2
rtems_status_code sc;
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
200372c: 80 a7 00 10 cmp %i4, %l0
2003730: 16 80 00 03 bge 200373c <rtems_blkdev_imfs_write+0x64>
2003734: 82 10 20 01 mov 1, %g1
2003738: 82 10 20 00 clr %g1
sc = rtems_bdbuf_get(dd, block, &bd);
200373c: 90 10 00 1b mov %i3, %o0
2003740: 92 10 00 11 mov %l1, %o1
while (remaining > 0) {
rtems_status_code sc;
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
2003744: 80 88 60 ff btst 0xff, %g1
2003748: 02 80 00 10 be 2003788 <rtems_blkdev_imfs_write+0xb0>
200374c: 94 07 bf fc add %fp, -4, %o2
2003750: 80 a4 a0 00 cmp %l2, 0
2003754: 12 80 00 0d bne 2003788 <rtems_blkdev_imfs_write+0xb0>
2003758: 01 00 00 00 nop
sc = rtems_bdbuf_get(dd, block, &bd);
200375c: 40 00 30 df call 200fad8 <rtems_bdbuf_get>
2003760: 01 00 00 00 nop
} else {
sc = rtems_bdbuf_read(dd, block, &bd);
}
if (sc == RTEMS_SUCCESSFUL) {
2003764: 80 a2 20 00 cmp %o0, 0
2003768: 22 80 00 0e be,a 20037a0 <rtems_blkdev_imfs_write+0xc8> <== ALWAYS TAKEN
200376c: ba 24 00 12 sub %l0, %l2, %i5
}
if (remaining >= 0) {
rv = (ssize_t) count;
} else {
errno = EIO;
2003770: 40 00 41 e2 call 2013ef8 <__errno> <== NOT EXECUTED
2003774: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003778: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
200377c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
rv = -1;
}
return rv;
}
2003780: 81 c7 e0 08 ret <== NOT EXECUTED
2003784: 81 e8 00 00 restore <== NOT EXECUTED
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
sc = rtems_bdbuf_get(dd, block, &bd);
} else {
sc = rtems_bdbuf_read(dd, block, &bd);
2003788: 40 00 30 ff call 200fb84 <rtems_bdbuf_read>
200378c: 01 00 00 00 nop
}
if (sc == RTEMS_SUCCESSFUL) {
2003790: 80 a2 20 00 cmp %o0, 0
2003794: 12 bf ff f7 bne 2003770 <rtems_blkdev_imfs_write+0x98> <== NEVER TAKEN
2003798: 01 00 00 00 nop
ssize_t copy = block_size - block_offset;
200379c: ba 24 00 12 sub %l0, %l2, %i5
20037a0: 80 a7 40 1c cmp %i5, %i4
20037a4: 34 80 00 02 bg,a 20037ac <rtems_blkdev_imfs_write+0xd4>
20037a8: ba 10 00 1c mov %i4, %i5
if (copy > remaining) {
copy = remaining;
}
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
20037ac: c2 07 bf fc ld [ %fp + -4 ], %g1
20037b0: 92 10 00 19 mov %i1, %o1
20037b4: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
20037b8: 94 10 00 1d mov %i5, %o2
20037bc: 40 00 44 59 call 2014920 <memcpy>
20037c0: 90 02 00 12 add %o0, %l2, %o0
sc = rtems_bdbuf_release_modified(bd);
20037c4: 40 00 31 cd call 200fef8 <rtems_bdbuf_release_modified>
20037c8: d0 07 bf fc ld [ %fp + -4 ], %o0
if (sc == RTEMS_SUCCESSFUL) {
20037cc: 80 a2 20 00 cmp %o0, 0
20037d0: 12 bf ff e8 bne 2003770 <rtems_blkdev_imfs_write+0x98> <== NEVER TAKEN
20037d4: 01 00 00 00 nop
block_offset = 0;
remaining -= copy;
20037d8: b8 27 00 1d sub %i4, %i5, %i4
src += copy;
20037dc: b2 06 40 1d add %i1, %i5, %i1
++block;
20037e0: a2 04 60 01 inc %l1
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) {
20037e4: 80 a7 20 00 cmp %i4, 0
20037e8: 14 bf ff d1 bg 200372c <rtems_blkdev_imfs_write+0x54>
20037ec: a4 10 20 00 clr %l2
} else {
remaining = -1;
}
}
if (remaining >= 0) {
20037f0: 80 a7 20 00 cmp %i4, 0
20037f4: 12 bf ff df bne 2003770 <rtems_blkdev_imfs_write+0x98> <== NEVER TAKEN
20037f8: b0 10 00 1a mov %i2, %i0
errno = EIO;
rv = -1;
}
return rv;
}
20037fc: 81 c7 e0 08 ret
2003800: 81 e8 00 00 restore
0200f7cc <rtems_blkdev_ioctl>:
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
200f7cc: 9d e3 bf a0 save %sp, -96, %sp
size_t *arg_size = argp;
int rc = 0;
switch (req)
200f7d0: 03 10 01 10 sethi %hi(0x40044000), %g1
200f7d4: 84 10 62 03 or %g1, 0x203, %g2 ! 40044203 <RAM_END+0x3dc44203>
200f7d8: 80 a6 40 02 cmp %i1, %g2
200f7dc: 22 80 00 39 be,a 200f8c0 <rtems_blkdev_ioctl+0xf4>
200f7e0: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
200f7e4: 08 80 00 14 bleu 200f834 <rtems_blkdev_ioctl+0x68>
200f7e8: 05 08 00 10 sethi %hi(0x20004000), %g2
200f7ec: 84 10 62 09 or %g1, 0x209, %g2
200f7f0: 80 a6 40 02 cmp %i1, %g2
200f7f4: 02 80 00 20 be 200f874 <rtems_blkdev_ioctl+0xa8>
200f7f8: 05 20 01 10 sethi %hi(0x80044000), %g2
200f7fc: 84 10 a2 04 or %g2, 0x204, %g2 ! 80044204 <RAM_END+0x7dc44204>
200f800: 80 a6 40 02 cmp %i1, %g2
200f804: 02 80 00 17 be 200f860 <rtems_blkdev_ioctl+0x94>
200f808: 82 10 62 05 or %g1, 0x205, %g1
200f80c: 80 a6 40 01 cmp %i1, %g1
200f810: 22 80 00 1d be,a 200f884 <rtems_blkdev_ioctl+0xb8> <== ALWAYS TAKEN
200f814: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
*dd_ptr = dd;
break;
}
default:
errno = EINVAL;
200f818: 40 00 0f a5 call 20136ac <__errno>
200f81c: 01 00 00 00 nop
200f820: 84 10 20 16 mov 0x16, %g2 ! 16 <PROM_START+0x16>
rc = -1;
200f824: 82 10 3f ff mov -1, %g1
*dd_ptr = dd;
break;
}
default:
errno = EINVAL;
200f828: c4 22 00 00 st %g2, [ %o0 ]
rc = -1;
break;
}
return rc;
}
200f82c: 81 c7 e0 08 ret
200f830: 91 e8 00 01 restore %g0, %g1, %o0
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
switch (req)
200f834: 84 10 a2 06 or %g2, 0x206, %g2
200f838: 80 a6 40 02 cmp %i1, %g2
200f83c: 02 80 00 16 be 200f894 <rtems_blkdev_ioctl+0xc8>
200f840: 82 10 62 02 or %g1, 0x202, %g1
200f844: 80 a6 40 01 cmp %i1, %g1
200f848: 12 bf ff f4 bne 200f818 <rtems_blkdev_ioctl+0x4c>
200f84c: 82 10 20 00 clr %g1
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
200f850: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
200f854: c4 26 80 00 st %g2, [ %i2 ]
rc = -1;
break;
}
return rc;
}
200f858: 81 c7 e0 08 ret
200f85c: 91 e8 00 01 restore %g0, %g1, %o0
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
200f860: c4 06 80 00 ld [ %i2 ], %g2
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f864: 82 10 20 00 clr %g1
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
200f868: c4 26 20 20 st %g2, [ %i0 + 0x20 ]
rc = -1;
break;
}
return rc;
}
200f86c: 81 c7 e0 08 ret
200f870: 91 e8 00 01 restore %g0, %g1, %o0
}
case RTEMS_BLKIO_GETDISKDEV:
{
rtems_disk_device **dd_ptr = argp;
*dd_ptr = dd;
200f874: f0 26 80 00 st %i0, [ %i2 ]
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f878: 82 10 20 00 clr %g1
rc = -1;
break;
}
return rc;
}
200f87c: 81 c7 e0 08 ret
200f880: 91 e8 00 01 restore %g0, %g1, %o0
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f884: 82 10 20 00 clr %g1
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
200f888: c4 26 80 00 st %g2, [ %i2 ]
rc = -1;
break;
}
return rc;
}
200f88c: 81 c7 e0 08 ret
200f890: 91 e8 00 01 restore %g0, %g1, %o0
*arg_size = dd->size;
break;
case RTEMS_BLKIO_SYNCDEV:
{
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
200f894: 7f ff ff 37 call 200f570 <rtems_bdbuf_syncdev>
200f898: 90 10 00 18 mov %i0, %o0
if (sc != RTEMS_SUCCESSFUL) {
200f89c: 80 a2 20 00 cmp %o0, 0
200f8a0: 02 bf ff e3 be 200f82c <rtems_blkdev_ioctl+0x60> <== ALWAYS TAKEN
200f8a4: 82 10 20 00 clr %g1
errno = EIO;
200f8a8: 40 00 0f 81 call 20136ac <__errno> <== NOT EXECUTED
200f8ac: 01 00 00 00 nop <== NOT EXECUTED
200f8b0: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5> <== NOT EXECUTED
rc = -1;
200f8b4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
case RTEMS_BLKIO_SYNCDEV:
{
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
if (sc != RTEMS_SUCCESSFUL) {
errno = EIO;
200f8b8: 10 bf ff dd b 200f82c <rtems_blkdev_ioctl+0x60> <== NOT EXECUTED
200f8bc: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
size_t *arg_size = argp;
int rc = 0;
200f8c0: 82 10 20 00 clr %g1
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
200f8c4: c4 26 80 00 st %g2, [ %i2 ]
rc = -1;
break;
}
return rc;
}
200f8c8: 81 c7 e0 08 ret
200f8cc: 91 e8 00 01 restore %g0, %g1, %o0
02002fe8 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
2002fe8: 9d e3 bf a0 save %sp, -96, %sp
const char *p;
if ( !name )
2002fec: 80 a6 20 00 cmp %i0, 0
2002ff0: 02 80 00 35 be 20030c4 <rtems_bsp_cmdline_get_param+0xdc>
2002ff4: 80 a6 60 00 cmp %i1, 0
return NULL;
if ( !value )
2002ff8: 02 80 00 31 be 20030bc <rtems_bsp_cmdline_get_param+0xd4>
2002ffc: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( !length )
2003000: 22 80 00 32 be,a 20030c8 <rtems_bsp_cmdline_get_param+0xe0>
2003004: b2 10 20 00 clr %i1
return NULL;
value[0] = '\0';
2003008: c0 2e 40 00 clrb [ %i1 ]
p = rtems_bsp_cmdline_get_param_raw( name );
200300c: 40 00 00 31 call 20030d0 <rtems_bsp_cmdline_get_param_raw>
2003010: 90 10 00 18 mov %i0, %o0
if ( !p )
2003014: 80 a2 20 00 cmp %o0, 0
2003018: 22 80 00 2c be,a 20030c8 <rtems_bsp_cmdline_get_param+0xe0>
200301c: b2 10 20 00 clr %i1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2003020: c6 0a 00 00 ldub [ %o0 ], %g3
2003024: 85 28 e0 18 sll %g3, 0x18, %g2
2003028: 80 a0 a0 00 cmp %g2, 0
200302c: 02 80 00 24 be 20030bc <rtems_bsp_cmdline_get_param+0xd4> <== NEVER TAKEN
2003030: b4 86 bf ff addcc %i2, -1, %i2
2003034: 02 80 00 22 be 20030bc <rtems_bsp_cmdline_get_param+0xd4> <== NEVER TAKEN
2003038: 88 10 20 00 clr %g4
200303c: 82 10 20 00 clr %g1
2003040: 10 80 00 12 b 2003088 <rtems_bsp_cmdline_get_param+0xa0>
2003044: b0 10 20 00 clr %i0
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
2003048: 32 80 00 06 bne,a 2003060 <rtems_bsp_cmdline_get_param+0x78>
200304c: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
2003050: 80 a0 a0 20 cmp %g2, 0x20
2003054: 02 80 00 1a be 20030bc <rtems_bsp_cmdline_get_param+0xd4>
2003058: 01 00 00 00 nop
break;
value[i++] = *p++;
200305c: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
2003060: 82 00 60 01 inc %g1
value[i] = '\0';
2003064: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
2003068: c6 0a 20 01 ldub [ %o0 + 1 ], %g3
200306c: 85 28 e0 18 sll %g3, 0x18, %g2
2003070: 80 a0 a0 00 cmp %g2, 0
2003074: 02 80 00 12 be 20030bc <rtems_bsp_cmdline_get_param+0xd4>
2003078: 88 10 00 01 mov %g1, %g4
200307c: 80 a6 80 01 cmp %i2, %g1
2003080: 08 80 00 0f bleu 20030bc <rtems_bsp_cmdline_get_param+0xd4>
2003084: 90 02 20 01 inc %o0
if ( *p == '\"' ) {
2003088: 85 38 a0 18 sra %g2, 0x18, %g2
200308c: 80 a0 a0 22 cmp %g2, 0x22
2003090: 12 bf ff ee bne 2003048 <rtems_bsp_cmdline_get_param+0x60>
2003094: 80 8e 20 01 btst 1, %i0
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
2003098: c6 2e 40 04 stb %g3, [ %i1 + %g4 ]
200309c: 82 00 60 01 inc %g1
value[i] = '\0';
20030a0: c0 2e 40 01 clrb [ %i1 + %g1 ]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20030a4: c6 0a 20 01 ldub [ %o0 + 1 ], %g3
if ( *p == '\"' ) {
quotes++;
20030a8: b0 06 20 01 inc %i0
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
20030ac: 85 28 e0 18 sll %g3, 0x18, %g2
20030b0: 80 a0 a0 00 cmp %g2, 0
20030b4: 12 bf ff f2 bne 200307c <rtems_bsp_cmdline_get_param+0x94><== ALWAYS TAKEN
20030b8: 88 10 00 01 mov %g1, %g4
return NULL;
copy_string( p, value, length );
return value;
}
20030bc: 81 c7 e0 08 ret
20030c0: 91 e8 00 19 restore %g0, %i1, %o0
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
20030c4: b2 10 20 00 clr %i1
copy_string( p, value, length );
return value;
}
20030c8: 81 c7 e0 08 ret
20030cc: 91 e8 00 19 restore %g0, %i1, %o0
02008934 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
2008934: 9d e3 bf 98 save %sp, -104, %sp
2008938: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200893c: 40 00 01 8d call 2008f70 <_Chain_Get>
2008940: 90 10 00 1d mov %i5, %o0
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
2008944: 92 10 20 00 clr %o1
2008948: b8 10 00 08 mov %o0, %i4
200894c: 94 10 00 1a mov %i2, %o2
2008950: 90 10 00 19 mov %i1, %o0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2008954: 80 a7 20 00 cmp %i4, 0
2008958: 12 80 00 0a bne 2008980 <rtems_chain_get_with_wait+0x4c>
200895c: 96 07 bf fc add %fp, -4, %o3
) {
rtems_event_set out;
sc = rtems_event_receive(
2008960: 7f ff fc f4 call 2007d30 <rtems_event_receive>
2008964: 01 00 00 00 nop
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
2008968: 80 a2 20 00 cmp %o0, 0
200896c: 02 bf ff f4 be 200893c <rtems_chain_get_with_wait+0x8> <== NEVER TAKEN
2008970: b0 10 00 08 mov %o0, %i0
timeout,
&out
);
}
*node_ptr = node;
2008974: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
2008978: 81 c7 e0 08 ret
200897c: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2008980: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
2008984: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
2008988: 81 c7 e0 08 ret
200898c: 91 e8 00 08 restore %g0, %o0, %o0
02003b64 <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2003b64: 9d e3 bf 70 save %sp, -144, %sp
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2003b68: 80 a6 60 00 cmp %i1, 0
2003b6c: 02 80 00 84 be 2003d7c <rtems_cpu_usage_report_with_plugin+0x218><== NEVER TAKEN
2003b70: 03 00 80 80 sethi %hi(0x2020000), %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
2003b74: c0 27 bf e8 clr [ %fp + -24 ]
2003b78: c0 27 bf ec clr [ %fp + -20 ]
}
}
}
#endif
(*print)(
2003b7c: 90 10 00 18 mov %i0, %o0
* 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;
2003b80: e8 18 60 f0 ldd [ %g1 + 0xf0 ], %l4
}
}
}
#endif
(*print)(
2003b84: 13 00 80 73 sethi %hi(0x201cc00), %o1
2003b88: 25 00 80 7f sethi %hi(0x201fc00), %l2
2003b8c: 92 12 63 68 or %o1, 0x368, %o1
2003b90: a4 14 a1 8c or %l2, 0x18c, %l2
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2003b94: 21 00 80 74 sethi %hi(0x201d000), %l0
}
}
}
#endif
(*print)(
2003b98: 9f c6 40 00 call %i1
2003b9c: 23 00 80 74 sethi %hi(0x201d000), %l1
#endif
/*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
2003ba0: ac 04 a0 0c add %l2, 0xc, %l6
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2003ba4: a0 14 20 e0 or %l0, 0xe0, %l0
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
2003ba8: a2 14 60 f8 or %l1, 0xf8, %l1
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
2003bac: c2 04 80 00 ld [ %l2 ], %g1
2003bb0: 80 a0 60 00 cmp %g1, 0
2003bb4: 22 80 00 58 be,a 2003d14 <rtems_cpu_usage_report_with_plugin+0x1b0>
2003bb8: a4 04 a0 04 add %l2, 4, %l2
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
2003bbc: f4 00 60 04 ld [ %g1 + 4 ], %i2
if ( information ) {
2003bc0: 80 a6 a0 00 cmp %i2, 0
2003bc4: 22 80 00 54 be,a 2003d14 <rtems_cpu_usage_report_with_plugin+0x1b0><== NEVER TAKEN
2003bc8: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
2003bcc: c2 16 a0 10 lduh [ %i2 + 0x10 ], %g1
2003bd0: 86 90 60 00 orcc %g1, 0, %g3
2003bd4: 02 80 00 4f be 2003d10 <rtems_cpu_usage_report_with_plugin+0x1ac><== NEVER TAKEN
2003bd8: b6 10 20 01 mov 1, %i3
the_thread = (Thread_Control *)information->local_table[ i ];
2003bdc: 10 80 00 2c b 2003c8c <rtems_cpu_usage_report_with_plugin+0x128>
2003be0: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
2003be4: 40 00 19 e8 call 200a384 <_TOD_Get_uptime>
2003be8: 01 00 00 00 nop
2003bec: d4 1f bf e0 ldd [ %fp + -32 ], %o2
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2003bf0: 86 a2 c0 15 subcc %o3, %l5, %g3
2003bf4: 84 62 80 14 subx %o2, %l4, %g2
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
2003bf8: 90 07 bf f0 add %fp, -16, %o0
2003bfc: c4 3f bf e8 std %g2, [ %fp + -24 ]
2003c00: 92 07 bf e8 add %fp, -24, %o1
2003c04: 94 07 bf f8 add %fp, -8, %o2
2003c08: 40 00 23 d3 call 200cb54 <_Timestamp64_Divide>
2003c0c: 96 07 bf fc add %fp, -4, %o3
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
2003c10: f8 1f bf f0 ldd [ %fp + -16 ], %i4
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
2003c14: 94 10 20 00 clr %o2
2003c18: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003c1c: 90 10 00 1c mov %i4, %o0
2003c20: 96 12 e2 00 or %o3, 0x200, %o3
2003c24: 40 00 5c 13 call 201ac70 <__divdi3>
2003c28: 92 10 00 1d mov %i5, %o1
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
2003c2c: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
2003c30: a6 10 00 09 mov %o1, %l3
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
2003c34: 90 10 00 1c mov %i4, %o0
2003c38: 92 10 00 1d mov %i5, %o1
2003c3c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003c40: 40 00 5c f2 call 201b008 <__moddi3>
2003c44: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
2003c48: 90 10 00 09 mov %o1, %o0
2003c4c: 40 00 5a b1 call 201a710 <.udiv>
2003c50: 92 10 23 e8 mov 0x3e8, %o1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
2003c54: d8 1f bf f8 ldd [ %fp + -8 ], %o4
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
2003c58: 96 10 00 08 mov %o0, %o3
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
2003c5c: 92 10 00 11 mov %l1, %o1
2003c60: 90 10 00 18 mov %i0, %o0
2003c64: 9f c6 40 00 call %i1
2003c68: 94 10 00 13 mov %l3, %o2
2003c6c: c6 16 a0 10 lduh [ %i2 + 0x10 ], %g3
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2003c70: b6 06 e0 01 inc %i3
2003c74: 83 28 e0 10 sll %g3, 0x10, %g1
2003c78: 83 30 60 10 srl %g1, 0x10, %g1
2003c7c: 80 a0 40 1b cmp %g1, %i3
2003c80: 2a 80 00 25 bcs,a 2003d14 <rtems_cpu_usage_report_with_plugin+0x1b0>
2003c84: a4 04 a0 04 add %l2, 4, %l2
the_thread = (Thread_Control *)information->local_table[ i ];
2003c88: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2
2003c8c: 83 2e e0 02 sll %i3, 2, %g1
2003c90: f8 00 80 01 ld [ %g2 + %g1 ], %i4
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2003c94: 94 07 bf d0 add %fp, -48, %o2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
2003c98: 80 a7 20 00 cmp %i4, 0
2003c9c: 02 bf ff f5 be 2003c70 <rtems_cpu_usage_report_with_plugin+0x10c><== NEVER TAKEN
2003ca0: 92 10 20 0d mov 0xd, %o1
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2003ca4: 40 00 14 87 call 2008ec0 <rtems_object_get_name>
2003ca8: d0 07 20 08 ld [ %i4 + 8 ], %o0
(*print)(
2003cac: d4 07 20 08 ld [ %i4 + 8 ], %o2
2003cb0: 90 10 00 18 mov %i0, %o0
2003cb4: 92 10 00 10 mov %l0, %o1
2003cb8: 9f c6 40 00 call %i1
2003cbc: 96 07 bf d0 add %fp, -48, %o3
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003cc0: 03 00 80 80 sethi %hi(0x2020000), %g1
2003cc4: 82 10 60 90 or %g1, 0x90, %g1 ! 2020090 <_Per_CPU_Information>
2003cc8: c8 00 60 0c ld [ %g1 + 0xc ], %g4
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2003ccc: c4 1f 20 80 ldd [ %i4 + 0x80 ], %g2
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003cd0: de 01 20 08 ld [ %g4 + 8 ], %o7
2003cd4: c8 07 20 08 ld [ %i4 + 8 ], %g4
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2003cd8: c4 3f bf f0 std %g2, [ %fp + -16 ]
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2003cdc: 80 a3 c0 04 cmp %o7, %g4
2003ce0: 12 bf ff c1 bne 2003be4 <rtems_cpu_usage_report_with_plugin+0x80>
2003ce4: 90 07 bf e0 add %fp, -32, %o0
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( is_executing_on_a_core( the_thread, &last ) ) {
Timestamp_Control used;
_TOD_Get_uptime( &uptime );
2003ce8: 40 00 19 a7 call 200a384 <_TOD_Get_uptime>
2003cec: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2003cf0: d8 1f bf f0 ldd [ %fp + -16 ], %o4
_Timestamp_Subtract( &last, &uptime, &used );
2003cf4: d4 1f bf e0 ldd [ %fp + -32 ], %o2
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2003cf8: 86 a2 c0 1d subcc %o3, %i5, %g3
2003cfc: 84 62 80 1c subx %o2, %i4, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2003d00: 86 83 40 03 addcc %o5, %g3, %g3
2003d04: 84 43 00 02 addx %o4, %g2, %g2
2003d08: 10 bf ff ba b 2003bf0 <rtems_cpu_usage_report_with_plugin+0x8c>
2003d0c: c4 3f bf f0 std %g2, [ %fp + -16 ]
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2003d10: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
2003d14: 80 a4 80 16 cmp %l2, %l6
2003d18: 32 bf ff a6 bne,a 2003bb0 <rtems_cpu_usage_report_with_plugin+0x4c>
2003d1c: c2 04 80 00 ld [ %l2 ], %g1
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
2003d20: f8 1f bf e8 ldd [ %fp + -24 ], %i4
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
2003d24: 94 10 20 00 clr %o2
2003d28: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003d2c: 90 10 00 1c mov %i4, %o0
2003d30: 96 12 e2 00 or %o3, 0x200, %o3
2003d34: 40 00 5b cf call 201ac70 <__divdi3>
2003d38: 92 10 00 1d mov %i5, %o1
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
2003d3c: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
2003d40: b6 10 00 09 mov %o1, %i3
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
2003d44: 90 10 00 1c mov %i4, %o0
2003d48: 92 10 00 1d mov %i5, %o1
2003d4c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2003d50: 40 00 5c ae call 201b008 <__moddi3>
2003d54: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
2003d58: 90 10 00 09 mov %o1, %o0
2003d5c: 40 00 5a 6d call 201a710 <.udiv>
2003d60: 92 10 23 e8 mov 0x3e8, %o1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
2003d64: 13 00 80 74 sethi %hi(0x201d000), %o1
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
2003d68: 96 10 00 08 mov %o0, %o3
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
2003d6c: 94 10 00 1b mov %i3, %o2
2003d70: 90 10 00 18 mov %i0, %o0
2003d74: 9f c6 40 00 call %i1
2003d78: 92 12 61 10 or %o1, 0x110, %o1
2003d7c: 81 c7 e0 08 ret
2003d80: 81 e8 00 00 restore
0200f704 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
200f704: 9d e3 bf a0 save %sp, -96, %sp
if (sc == RTEMS_SUCCESSFUL) {
200f708: 80 a6 20 00 cmp %i0, 0
200f70c: 12 80 00 04 bne 200f71c <rtems_deviceio_errno+0x18>
200f710: 82 10 20 00 clr %g1
errno = eno;
return -1;
}
}
200f714: 81 c7 e0 08 ret
200f718: 91 e8 00 01 restore %g0, %g1, %o0
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
200f71c: 80 a6 20 1c cmp %i0, 0x1c
200f720: 18 80 00 06 bgu 200f738 <rtems_deviceio_errno+0x34> <== NEVER TAKEN
200f724: ba 10 20 16 mov 0x16, %i5
eno = status_code_to_errno [sc];
200f728: b1 2e 20 02 sll %i0, 2, %i0
200f72c: 03 00 80 6e sethi %hi(0x201b800), %g1
200f730: 82 10 60 cc or %g1, 0xcc, %g1 ! 201b8cc <status_code_to_errno>
200f734: fa 00 40 18 ld [ %g1 + %i0 ], %i5
}
errno = eno;
200f738: 40 00 00 12 call 200f780 <__errno>
200f73c: 01 00 00 00 nop
return -1;
200f740: 82 10 3f ff mov -1, %g1 ! ffffffff <RAM_END+0xfdbfffff>
200f744: 10 bf ff f4 b 200f714 <rtems_deviceio_errno+0x10>
200f748: fa 22 00 00 st %i5, [ %o0 ]
02003998 <rtems_disk_create_log>:
dev_t phys,
rtems_blkdev_bnum begin_block,
rtems_blkdev_bnum block_count,
const char *name
)
{
2003998: 9d e3 bf 90 save %sp, -112, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *physical_disk = NULL;
rtems_disk_device *dd = NULL;
rtems_blkdev_bnum end_block = begin_block + block_count;
sc = disk_lock();
200399c: 7f ff ff 43 call 20036a8 <disk_lock>
20039a0: c0 27 bf fc clr [ %fp + -4 ]
if (sc != RTEMS_SUCCESSFUL) {
20039a4: 80 a2 20 00 cmp %o0, 0
20039a8: 22 80 00 04 be,a 20039b8 <rtems_disk_create_log+0x20> <== ALWAYS TAKEN
20039ac: 90 10 00 1a mov %i2, %o0
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
20039b0: 81 c7 e0 08 ret
20039b4: 91 e8 00 08 restore %g0, %o0, %o0
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
physical_disk = get_disk_entry(phys, true);
20039b8: 92 10 00 1b mov %i3, %o1
20039bc: 7f ff ff 00 call 20035bc <get_disk_entry>
20039c0: 94 10 20 01 mov 1, %o2
if (physical_disk == NULL || !is_physical_disk(physical_disk)) {
20039c4: b4 92 20 00 orcc %o0, 0, %i2
20039c8: 02 80 00 06 be 20039e0 <rtems_disk_create_log+0x48>
20039cc: 01 00 00 00 nop
20039d0: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20039d4: 80 a6 80 01 cmp %i2, %g1
20039d8: 02 80 00 07 be 20039f4 <rtems_disk_create_log+0x5c>
20039dc: 82 07 40 1c add %i5, %i4, %g1
disk_unlock();
20039e0: 7f ff ff 41 call 20036e4 <disk_unlock>
20039e4: 01 00 00 00 nop
return RTEMS_INVALID_ID;
20039e8: 90 10 20 04 mov 4, %o0 ! 4 <PROM_START+0x4>
++physical_disk->uses;
disk_unlock();
return RTEMS_SUCCESSFUL;
}
20039ec: 81 c7 e0 08 ret
20039f0: 91 e8 00 08 restore %g0, %o0, %o0
disk_unlock();
return RTEMS_INVALID_ID;
}
if (
20039f4: 80 a7 00 01 cmp %i4, %g1
20039f8: 1a 80 00 07 bcc 2003a14 <rtems_disk_create_log+0x7c>
20039fc: c4 06 a0 1c ld [ %i2 + 0x1c ], %g2
2003a00: 80 a7 00 02 cmp %i4, %g2
2003a04: 1a 80 00 04 bcc 2003a14 <rtems_disk_create_log+0x7c> <== NEVER TAKEN
2003a08: 80 a0 40 02 cmp %g1, %g2
begin_block >= physical_disk->size
|| end_block <= begin_block
|| end_block > physical_disk->size
2003a0c: 08 80 00 06 bleu 2003a24 <rtems_disk_create_log+0x8c>
2003a10: d4 07 a0 5c ld [ %fp + 0x5c ], %o2
) {
disk_unlock();
2003a14: 7f ff ff 34 call 20036e4 <disk_unlock>
2003a18: 01 00 00 00 nop
return RTEMS_INVALID_NUMBER;
2003a1c: 10 bf ff e5 b 20039b0 <rtems_disk_create_log+0x18>
2003a20: 90 10 20 0a mov 0xa, %o0 ! a <PROM_START+0xa>
}
sc = create_disk(dev, name, &dd);
2003a24: 90 10 00 18 mov %i0, %o0
2003a28: 92 10 00 19 mov %i1, %o1
2003a2c: 7f ff ff 3d call 2003720 <create_disk>
2003a30: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2003a34: 80 a2 20 00 cmp %o0, 0
2003a38: 12 80 00 0e bne 2003a70 <rtems_disk_create_log+0xd8>
2003a3c: c2 07 bf fc ld [ %fp + -4 ], %g1
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
2003a40: c4 06 a0 20 ld [ %i2 + 0x20 ], %g2
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
2003a44: c6 06 a0 14 ld [ %i2 + 0x14 ], %g3
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
dd->ioctl = physical_disk->ioctl;
2003a48: de 06 a0 28 ld [ %i2 + 0x28 ], %o7
dd->driver_data = physical_disk->driver_data;
2003a4c: c8 06 a0 2c ld [ %i2 + 0x2c ], %g4
return sc;
}
dd->phys_dev = physical_disk;
dd->start = begin_block;
dd->size = block_count;
2003a50: f8 38 60 18 std %i4, [ %g1 + 0x18 ]
dd->block_size = dd->media_block_size = physical_disk->block_size;
dd->ioctl = physical_disk->ioctl;
dd->driver_data = physical_disk->driver_data;
++physical_disk->uses;
2003a54: 86 00 e0 01 inc %g3
disk_unlock();
return sc;
}
dd->phys_dev = physical_disk;
2003a58: f4 20 60 08 st %i2, [ %g1 + 8 ]
dd->start = begin_block;
dd->size = block_count;
dd->block_size = dd->media_block_size = physical_disk->block_size;
2003a5c: c4 20 60 24 st %g2, [ %g1 + 0x24 ]
2003a60: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
dd->ioctl = physical_disk->ioctl;
2003a64: de 20 60 28 st %o7, [ %g1 + 0x28 ]
dd->driver_data = physical_disk->driver_data;
2003a68: c8 20 60 2c st %g4, [ %g1 + 0x2c ]
++physical_disk->uses;
2003a6c: c6 26 a0 14 st %g3, [ %i2 + 0x14 ]
disk_unlock();
2003a70: 7f ff ff 1d call 20036e4 <disk_unlock>
2003a74: d0 27 bf f4 st %o0, [ %fp + -12 ]
return RTEMS_SUCCESSFUL;
2003a78: 10 bf ff ce b 20039b0 <rtems_disk_create_log+0x18>
2003a7c: d0 07 bf f4 ld [ %fp + -12 ], %o0
020038e0 <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
20038e0: 9d e3 bf 98 save %sp, -104, %sp
rtems_disk_device *dd = NULL;
20038e4: c0 27 bf fc clr [ %fp + -4 ]
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
20038e8: a0 10 00 18 mov %i0, %l0
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (handler == NULL) {
20038ec: 80 a7 20 00 cmp %i4, 0
20038f0: 02 80 00 21 be 2003974 <rtems_disk_create_phys+0x94>
20038f4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
}
if (block_size == 0) {
20038f8: 80 a6 a0 00 cmp %i2, 0
20038fc: 02 80 00 1e be 2003974 <rtems_disk_create_phys+0x94>
2003900: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
}
sc = disk_lock();
2003904: 7f ff ff 69 call 20036a8 <disk_lock>
2003908: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
200390c: b0 92 20 00 orcc %o0, 0, %i0
2003910: 12 80 00 19 bne 2003974 <rtems_disk_create_phys+0x94> <== NEVER TAKEN
2003914: d4 07 a0 5c ld [ %fp + 0x5c ], %o2
return sc;
}
sc = create_disk(dev, name, &dd);
2003918: 90 10 00 10 mov %l0, %o0
200391c: 92 10 00 19 mov %i1, %o1
2003920: 7f ff ff 80 call 2003720 <create_disk>
2003924: 96 07 bf fc add %fp, -4, %o3
if (sc != RTEMS_SUCCESSFUL) {
2003928: b0 92 20 00 orcc %o0, 0, %i0
200392c: 12 80 00 17 bne 2003988 <rtems_disk_create_phys+0xa8>
2003930: c2 07 bf fc ld [ %fp + -4 ], %g1
dd->size = block_count;
dd->block_size = dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
2003934: 13 08 00 10 sethi %hi(0x20004000), %o1
2003938: 90 10 00 01 mov %g1, %o0
disk_unlock();
return sc;
}
dd->phys_dev = dd;
200393c: c2 20 60 08 st %g1, [ %g1 + 8 ]
dd->start = 0;
2003940: c0 20 60 18 clr [ %g1 + 0x18 ]
dd->size = block_count;
2003944: f6 20 60 1c st %i3, [ %g1 + 0x1c ]
dd->block_size = dd->media_block_size = block_size;
2003948: f4 20 60 24 st %i2, [ %g1 + 0x24 ]
200394c: f4 20 60 20 st %i2, [ %g1 + 0x20 ]
dd->ioctl = handler;
dd->driver_data = driver_data;
2003950: f8 38 60 28 std %i4, [ %g1 + 0x28 ]
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
2003954: 92 12 62 08 or %o1, 0x208, %o1
2003958: 9f c7 00 00 call %i4
200395c: 94 00 60 0c add %g1, 0xc, %o2
2003960: 80 a2 20 00 cmp %o0, 0
2003964: 06 80 00 06 bl 200397c <rtems_disk_create_phys+0x9c> <== ALWAYS TAKEN
2003968: c2 07 bf fc ld [ %fp + -4 ], %g1
dd->capabilities = 0;
}
disk_unlock();
200396c: 7f ff ff 5e call 20036e4 <disk_unlock> <== NOT EXECUTED
2003970: 01 00 00 00 nop <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
2003974: 81 c7 e0 08 ret
2003978: 81 e8 00 00 restore
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) < 0) {
dd->capabilities = 0;
}
disk_unlock();
200397c: 7f ff ff 5a call 20036e4 <disk_unlock>
2003980: c0 20 60 0c clr [ %g1 + 0xc ]
2003984: 30 80 00 03 b,a 2003990 <rtems_disk_create_phys+0xb0>
return sc;
}
sc = create_disk(dev, name, &dd);
if (sc != RTEMS_SUCCESSFUL) {
disk_unlock();
2003988: 7f ff ff 57 call 20036e4 <disk_unlock>
200398c: 01 00 00 00 nop
return sc;
2003990: 81 c7 e0 08 ret
2003994: 81 e8 00 00 restore
02003a80 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
2003a80: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
2003a84: 7f ff ff 09 call 20036a8 <disk_lock>
2003a88: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2003a8c: b6 92 20 00 orcc %o0, 0, %i3
2003a90: 02 80 00 04 be 2003aa0 <rtems_disk_delete+0x20> <== ALWAYS TAKEN
2003a94: 90 10 00 18 mov %i0, %o0
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2003a98: 81 c7 e0 08 ret <== NOT EXECUTED
2003a9c: 91 e8 00 1b restore %g0, %i3, %o0 <== NOT EXECUTED
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
2003aa0: 92 10 00 19 mov %i1, %o1
2003aa4: 7f ff fe c6 call 20035bc <get_disk_entry>
2003aa8: 94 10 20 01 mov 1, %o2
if (dd == NULL) {
2003aac: 82 92 20 00 orcc %o0, 0, %g1
2003ab0: 02 80 00 5a be 2003c18 <rtems_disk_delete+0x198> <== NEVER TAKEN
2003ab4: 84 10 20 01 mov 1, %g2
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
2003ab8: f2 00 60 08 ld [ %g1 + 8 ], %i1
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
2003abc: c4 28 60 30 stb %g2, [ %g1 + 0x30 ]
{
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) {
2003ac0: c4 0e 60 30 ldub [ %i1 + 0x30 ], %g2
2003ac4: 80 a0 a0 00 cmp %g2, 0
2003ac8: 22 80 00 43 be,a 2003bd4 <rtems_disk_delete+0x154>
2003acc: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2003ad0: 27 00 80 83 sethi %hi(0x2020c00), %l3
2003ad4: c2 04 e1 c8 ld [ %l3 + 0x1c8 ], %g1 ! 2020dc8 <disktab_size>
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;
2003ad8: f8 1e 40 00 ldd [ %i1 ], %i4
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2003adc: 80 a0 60 00 cmp %g1, 0
2003ae0: 02 80 00 34 be 2003bb0 <rtems_disk_delete+0x130> <== NEVER TAKEN
2003ae4: a4 10 20 00 clr %l2
2003ae8: 29 00 80 83 sethi %hi(0x2020c00), %l4
2003aec: a4 10 00 1b mov %i3, %l2
2003af0: a0 10 20 00 clr %l0
2003af4: a8 15 21 cc or %l4, 0x1cc, %l4
2003af8: a6 14 e1 c8 or %l3, 0x1c8, %l3
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
2003afc: a2 10 20 01 mov 1, %l1
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;
2003b00: f4 05 00 00 ld [ %l4 ], %i2
2003b04: 83 2c 20 03 sll %l0, 3, %g1
2003b08: b4 06 80 01 add %i2, %g1, %i2
for (minor = 0; minor < dtab->size; ++minor) {
2003b0c: de 06 a0 04 ld [ %i2 + 4 ], %o7
2003b10: 80 a3 e0 00 cmp %o7, 0
2003b14: 22 80 00 23 be,a 2003ba0 <rtems_disk_delete+0x120>
2003b18: c2 04 c0 00 ld [ %l3 ], %g1
2003b1c: 10 80 00 06 b 2003b34 <rtems_disk_delete+0xb4>
2003b20: b0 10 20 00 clr %i0
2003b24: b0 06 20 01 inc %i0
2003b28: 80 a6 00 0f cmp %i0, %o7
2003b2c: 3a 80 00 1d bcc,a 2003ba0 <rtems_disk_delete+0x120>
2003b30: c2 04 c0 00 ld [ %l3 ], %g1
rtems_disk_device *dd = dtab->minor [minor];
2003b34: c8 06 80 00 ld [ %i2 ], %g4
2003b38: 83 2e 20 02 sll %i0, 2, %g1
2003b3c: d0 01 00 01 ld [ %g4 + %g1 ], %o0
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
2003b40: 80 a2 20 00 cmp %o0, 0
2003b44: 02 bf ff f8 be 2003b24 <rtems_disk_delete+0xa4>
2003b48: 80 a6 40 08 cmp %i1, %o0
2003b4c: 22 bf ff f7 be,a 2003b28 <rtems_disk_delete+0xa8>
2003b50: b0 06 20 01 inc %i0
2003b54: c4 02 20 08 ld [ %o0 + 8 ], %g2
2003b58: c4 18 80 00 ldd [ %g2 ], %g2
2003b5c: 84 1f 00 02 xor %i4, %g2, %g2
2003b60: 86 1f 40 03 xor %i5, %g3, %g3
2003b64: 80 90 80 03 orcc %g2, %g3, %g0
2003b68: 32 bf ff f0 bne,a 2003b28 <rtems_disk_delete+0xa8> <== NEVER TAKEN
2003b6c: b0 06 20 01 inc %i0 <== NOT EXECUTED
if (dd->uses == 0) {
2003b70: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
2003b74: 80 a0 a0 00 cmp %g2, 0
2003b78: 32 bf ff eb bne,a 2003b24 <rtems_disk_delete+0xa4>
2003b7c: e2 2a 20 30 stb %l1, [ %o0 + 0x30 ]
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
2003b80: 7f ff fe b4 call 2003650 <free_disk_device>
2003b84: c0 21 00 01 clr [ %g4 + %g1 ]
2003b88: de 06 a0 04 ld [ %i2 + 4 ], %o7
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) {
2003b8c: b0 06 20 01 inc %i0
2003b90: 80 a6 00 0f cmp %i0, %o7
2003b94: 0a bf ff e8 bcs 2003b34 <rtems_disk_delete+0xb4> <== ALWAYS TAKEN
2003b98: a4 04 a0 01 inc %l2
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
2003b9c: c2 04 c0 00 ld [ %l3 ], %g1 <== NOT EXECUTED
2003ba0: a0 04 20 01 inc %l0
2003ba4: 80 a4 00 01 cmp %l0, %g1
2003ba8: 2a bf ff d7 bcs,a 2003b04 <rtems_disk_delete+0x84>
2003bac: f4 05 00 00 ld [ %l4 ], %i2
}
}
}
}
physical_disk->uses -= deleted_count;
2003bb0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
2003bb4: a4 20 40 12 sub %g1, %l2, %l2
if (physical_disk->uses == 0) {
2003bb8: 80 a4 a0 00 cmp %l2, 0
2003bbc: 02 80 00 1b be 2003c28 <rtems_disk_delete+0x1a8>
2003bc0: e4 26 60 14 st %l2, [ %i1 + 0x14 ]
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2003bc4: 7f ff fe c8 call 20036e4 <disk_unlock>
2003bc8: b0 10 00 1b mov %i3, %i0
return RTEMS_SUCCESSFUL;
}
2003bcc: 81 c7 e0 08 ret
2003bd0: 81 e8 00 00 restore
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
2003bd4: 80 a0 a0 00 cmp %g2, 0
2003bd8: 12 bf ff fb bne 2003bc4 <rtems_disk_delete+0x144> <== NEVER TAKEN
2003bdc: 07 00 80 83 sethi %hi(0x2020c00), %g3
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
2003be0: c4 00 40 00 ld [ %g1 ], %g2
disktab [major].minor [minor] = NULL;
2003be4: c8 00 e1 cc ld [ %g3 + 0x1cc ], %g4
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
2003be8: c2 00 60 04 ld [ %g1 + 4 ], %g1
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2003bec: c6 06 60 14 ld [ %i1 + 0x14 ], %g3
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2003bf0: 85 28 a0 03 sll %g2, 3, %g2
2003bf4: c4 01 00 02 ld [ %g4 + %g2 ], %g2
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2003bf8: 86 00 ff ff add %g3, -1, %g3
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2003bfc: 83 28 60 02 sll %g1, 2, %g1
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
2003c00: c6 26 60 14 st %g3, [ %i1 + 0x14 ]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
free_disk_device(disk_to_remove);
2003c04: 7f ff fe 93 call 2003650 <free_disk_device>
2003c08: c0 20 80 01 clr [ %g2 + %g1 ]
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2003c0c: 7f ff fe b6 call 20036e4 <disk_unlock>
2003c10: b0 10 00 1b mov %i3, %i0
2003c14: 30 bf ff ee b,a 2003bcc <rtems_disk_delete+0x14c>
return sc;
}
dd = get_disk_entry(dev, true);
if (dd == NULL) {
disk_unlock();
2003c18: 7f ff fe b3 call 20036e4 <disk_unlock> <== NOT EXECUTED
2003c1c: b6 10 20 04 mov 4, %i3 <== NOT EXECUTED
rtems_disk_cleanup(dd);
disk_unlock();
return RTEMS_SUCCESSFUL;
}
2003c20: 81 c7 e0 08 ret <== NOT EXECUTED
2003c24: 91 e8 00 1b restore %g0, %i3, %o0 <== NOT EXECUTED
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2003c28: c4 06 40 00 ld [ %i1 ], %g2
disktab [major].minor [minor] = NULL;
2003c2c: 03 00 80 83 sethi %hi(0x2020c00), %g1
2003c30: c6 00 61 cc ld [ %g1 + 0x1cc ], %g3 ! 2020dcc <disktab>
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2003c34: c2 06 60 04 ld [ %i1 + 4 ], %g1
disktab [major].minor [minor] = NULL;
2003c38: 85 28 a0 03 sll %g2, 3, %g2
2003c3c: c4 00 c0 02 ld [ %g3 + %g2 ], %g2
2003c40: 83 28 60 02 sll %g1, 2, %g1
free_disk_device(physical_disk);
2003c44: 90 10 00 19 mov %i1, %o0
2003c48: 7f ff fe 82 call 2003650 <free_disk_device>
2003c4c: c0 20 80 01 clr [ %g2 + %g1 ]
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
2003c50: 7f ff fe a5 call 20036e4 <disk_unlock>
2003c54: b0 10 00 1b mov %i3, %i0
2003c58: 30 bf ff dd b,a 2003bcc <rtems_disk_delete+0x14c>
02003ee8 <rtems_disk_io_done>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
{
2003ee8: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
2003eec: 39 00 80 83 sethi %hi(0x2020c00), %i4
2003ef0: c2 07 21 c8 ld [ %i4 + 0x1c8 ], %g1 ! 2020dc8 <disktab_size>
2003ef4: 3b 00 80 83 sethi %hi(0x2020c00), %i5
2003ef8: 80 a0 60 00 cmp %g1, 0
2003efc: 02 80 00 1f be 2003f78 <rtems_disk_io_done+0x90> <== NEVER TAKEN
2003f00: f6 07 61 cc ld [ %i5 + 0x1cc ], %i3
2003f04: b2 10 20 00 clr %i1
2003f08: b0 17 21 c8 or %i4, 0x1c8, %i0
rtems_disk_device_table *dtab = disktab + major;
2003f0c: 83 2e 60 03 sll %i1, 3, %g1
2003f10: b4 06 c0 01 add %i3, %g1, %i2
for (minor = 0; minor < dtab->size; ++minor) {
2003f14: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2003f18: 80 a0 a0 00 cmp %g2, 0
2003f1c: 02 80 00 10 be 2003f5c <rtems_disk_io_done+0x74>
2003f20: c6 06 c0 01 ld [ %i3 + %g1 ], %g3
2003f24: b6 10 20 00 clr %i3
rtems_disk_device *dd = dtab->minor [minor];
2003f28: 83 2e e0 02 sll %i3, 2, %g1
2003f2c: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if (dd != NULL) {
2003f30: 90 90 60 00 orcc %g1, 0, %o0
2003f34: 02 80 00 06 be 2003f4c <rtems_disk_io_done+0x64>
2003f38: b6 06 e0 01 inc %i3
free_disk_device(dd);
2003f3c: 7f ff fd c5 call 2003650 <free_disk_device>
2003f40: 01 00 00 00 nop
2003f44: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2003f48: c6 06 80 00 ld [ %i2 ], %g3
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
2003f4c: 80 a0 80 1b cmp %g2, %i3
2003f50: 18 bf ff f7 bgu 2003f2c <rtems_disk_io_done+0x44>
2003f54: 83 2e e0 02 sll %i3, 2, %g1
2003f58: f6 07 61 cc ld [ %i5 + 0x1cc ], %i3
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
2003f5c: 40 00 02 bd call 2004a50 <free>
2003f60: 90 10 00 03 mov %g3, %o0
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
2003f64: c2 06 00 00 ld [ %i0 ], %g1
2003f68: b2 06 60 01 inc %i1
2003f6c: 80 a0 40 19 cmp %g1, %i1
2003f70: 18 bf ff e8 bgu 2003f10 <rtems_disk_io_done+0x28>
2003f74: 83 2e 60 03 sll %i1, 3, %g1
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
2003f78: 40 00 02 b6 call 2004a50 <free>
2003f7c: 90 10 00 1b mov %i3, %o0
rtems_semaphore_delete(diskdevs_mutex);
2003f80: 37 00 80 83 sethi %hi(0x2020c00), %i3
2003f84: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 ! 2020dc4 <diskdevs_mutex>
2003f88: 40 00 14 3d call 200907c <rtems_semaphore_delete>
2003f8c: b0 10 20 00 clr %i0
diskdevs_mutex = RTEMS_ID_NONE;
2003f90: c0 26 e1 c4 clr [ %i3 + 0x1c4 ]
disktab = NULL;
2003f94: c0 27 61 cc clr [ %i5 + 0x1cc ]
disktab_size = 0;
2003f98: c0 27 21 c8 clr [ %i4 + 0x1c8 ]
return RTEMS_SUCCESSFUL;
}
2003f9c: 81 c7 e0 08 ret
2003fa0: 81 e8 00 00 restore
02003e3c <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
2003e3c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
2003e40: 3b 00 80 83 sethi %hi(0x2020c00), %i5
2003e44: c2 07 61 c8 ld [ %i5 + 0x1c8 ], %g1 ! 2020dc8 <disktab_size>
2003e48: 80 a0 60 00 cmp %g1, 0
2003e4c: 12 80 00 19 bne 2003eb0 <rtems_disk_io_initialize+0x74> <== NEVER TAKEN
2003e50: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
2003e54: 90 10 20 08 mov 8, %o0
2003e58: 92 10 20 08 mov 8, %o1
2003e5c: 40 00 02 2c call 200470c <calloc>
2003e60: 39 00 80 83 sethi %hi(0x2020c00), %i4
2003e64: d0 27 21 cc st %o0, [ %i4 + 0x1cc ] ! 2020dcc <disktab>
if (disktab == NULL) {
2003e68: 80 a2 20 00 cmp %o0, 0
2003e6c: 02 80 00 11 be 2003eb0 <rtems_disk_io_initialize+0x74> <== NEVER TAKEN
2003e70: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
2003e74: 03 00 80 83 sethi %hi(0x2020c00), %g1
sc = rtems_semaphore_create(
2003e78: 11 11 11 11 sethi %hi(0x44444400), %o0
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
2003e7c: c0 28 61 c0 clrb [ %g1 + 0x1c0 ]
sc = rtems_semaphore_create(
2003e80: 90 12 21 56 or %o0, 0x156, %o0
2003e84: 92 10 20 01 mov 1, %o1
2003e88: 94 10 20 10 mov 0x10, %o2
2003e8c: 96 10 20 00 clr %o3
2003e90: 37 00 80 83 sethi %hi(0x2020c00), %i3
2003e94: 40 00 14 0a call 2008ebc <rtems_semaphore_create>
2003e98: 98 16 e1 c4 or %i3, 0x1c4, %o4 ! 2020dc4 <diskdevs_mutex>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
2003e9c: 80 a2 20 00 cmp %o0, 0
2003ea0: 02 80 00 06 be 2003eb8 <rtems_disk_io_initialize+0x7c> <== ALWAYS TAKEN
2003ea4: 01 00 00 00 nop
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
free(disktab);
2003ea8: 40 00 02 ea call 2004a50 <free> <== NOT EXECUTED
2003eac: d0 07 21 cc ld [ %i4 + 0x1cc ], %o0 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
2003eb0: 81 c7 e0 08 ret <== NOT EXECUTED
2003eb4: 81 e8 00 00 restore <== NOT EXECUTED
free(disktab);
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
2003eb8: 40 00 2b 35 call 200eb8c <rtems_bdbuf_init>
2003ebc: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL) {
2003ec0: 80 a2 20 00 cmp %o0, 0
2003ec4: 12 80 00 05 bne 2003ed8 <rtems_disk_io_initialize+0x9c> <== NEVER TAKEN
2003ec8: 82 10 20 08 mov 8, %g1
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
2003ecc: c2 27 61 c8 st %g1, [ %i5 + 0x1c8 ]
return RTEMS_SUCCESSFUL;
}
2003ed0: 81 c7 e0 08 ret
2003ed4: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
rtems_semaphore_delete(diskdevs_mutex);
2003ed8: d0 06 e1 c4 ld [ %i3 + 0x1c4 ], %o0 <== NOT EXECUTED
2003edc: 40 00 14 68 call 200907c <rtems_semaphore_delete> <== NOT EXECUTED
2003ee0: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
2003ee4: 30 bf ff f1 b,a 2003ea8 <rtems_disk_io_initialize+0x6c> <== NOT EXECUTED
02003d2c <rtems_disk_next>:
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
2003d2c: 9d e3 bf a0 save %sp, -96, %sp
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) {
2003d30: 80 a6 3f ff cmp %i0, -1
2003d34: 02 80 00 39 be 2003e18 <rtems_disk_next+0xec>
2003d38: 80 a6 7f ff cmp %i1, -1
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
2003d3c: ba 06 60 01 add %i1, 1, %i5
2003d40: 80 a7 40 19 cmp %i5, %i1
2003d44: 0a 80 00 2a bcs 2003dec <rtems_disk_next+0xc0> <== NEVER TAKEN
2003d48: b8 10 00 18 mov %i0, %i4
} else {
++minor;
}
}
sc = disk_lock();
2003d4c: 7f ff fe 57 call 20036a8 <disk_lock>
2003d50: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL) {
2003d54: 80 a2 20 00 cmp %o0, 0
2003d58: 12 80 00 1b bne 2003dc4 <rtems_disk_next+0x98> <== NEVER TAKEN
2003d5c: 03 00 80 83 sethi %hi(0x2020c00), %g1
return NULL;
}
if (major >= disktab_size) {
2003d60: c8 00 61 c8 ld [ %g1 + 0x1c8 ], %g4 ! 2020dc8 <disktab_size>
2003d64: 80 a7 00 04 cmp %i4, %g4
2003d68: 1a 80 00 31 bcc 2003e2c <rtems_disk_next+0x100> <== NEVER TAKEN
2003d6c: 03 00 80 83 sethi %hi(0x2020c00), %g1
disk_unlock();
return NULL;
}
dtab = disktab + major;
2003d70: c6 00 61 cc ld [ %g1 + 0x1cc ], %g3 ! 2020dcc <disktab>
2003d74: b1 2f 20 03 sll %i4, 3, %i0
2003d78: c2 00 c0 18 ld [ %g3 + %i0 ], %g1
2003d7c: b0 00 c0 18 add %g3, %i0, %i0
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
2003d80: 80 a0 60 00 cmp %g1, 0
2003d84: 02 80 00 12 be 2003dcc <rtems_disk_next+0xa0>
2003d88: b7 2f 60 02 sll %i5, 2, %i3
2003d8c: c4 06 20 04 ld [ %i0 + 4 ], %g2
2003d90: 80 a7 40 02 cmp %i5, %g2
2003d94: 3a 80 00 0f bcc,a 2003dd0 <rtems_disk_next+0xa4>
2003d98: b8 07 20 01 inc %i4
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
2003d9c: c4 00 40 1b ld [ %g1 + %i3 ], %g2
2003da0: 80 a0 a0 00 cmp %g2, 0
2003da4: 02 bf ff f7 be 2003d80 <rtems_disk_next+0x54>
2003da8: ba 07 60 01 inc %i5
++minor;
} else {
++dtab->minor [minor]->uses;
2003dac: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2003db0: 82 00 60 01 inc %g1
disk_unlock();
2003db4: 7f ff fe 4c call 20036e4 <disk_unlock>
2003db8: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
return dtab->minor [minor];
2003dbc: c2 06 00 00 ld [ %i0 ], %g1
2003dc0: f0 00 40 1b ld [ %g1 + %i3 ], %i0
}
}
}
2003dc4: 81 c7 e0 08 ret
2003dc8: 81 e8 00 00 restore
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
++major;
2003dcc: b8 07 20 01 inc %i4
if (major >= disktab_size) {
2003dd0: 80 a1 00 1c cmp %g4, %i4
2003dd4: 08 80 00 0d bleu 2003e08 <rtems_disk_next+0xdc>
2003dd8: 83 2f 20 03 sll %i4, 3, %g1
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
2003ddc: ba 10 20 00 clr %i5
if (major >= disktab_size) {
disk_unlock();
return NULL;
}
dtab = disktab + major;
2003de0: b0 00 c0 01 add %g3, %g1, %i0
2003de4: 10 bf ff e7 b 2003d80 <rtems_disk_next+0x54>
2003de8: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
2003dec: 82 06 20 01 add %i0, 1, %g1 <== NOT EXECUTED
2003df0: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
2003df4: 0a bf ff f4 bcs 2003dc4 <rtems_disk_next+0x98> <== NOT EXECUTED
2003df8: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003dfc: b8 10 00 01 mov %g1, %i4 <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
2003e00: 10 bf ff d3 b 2003d4c <rtems_disk_next+0x20> <== NOT EXECUTED
2003e04: ba 10 20 00 clr %i5 <== NOT EXECUTED
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
++major;
if (major >= disktab_size) {
disk_unlock();
2003e08: 7f ff fe 37 call 20036e4 <disk_unlock>
2003e0c: b0 10 20 00 clr %i0
return NULL;
2003e10: 81 c7 e0 08 ret
2003e14: 81 e8 00 00 restore
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) {
2003e18: 32 bf ff ca bne,a 2003d40 <rtems_disk_next+0x14> <== NEVER TAKEN
2003e1c: ba 06 60 01 add %i1, 1, %i5 <== 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;
2003e20: ba 10 20 00 clr %i5
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;
2003e24: 10 bf ff ca b 2003d4c <rtems_disk_next+0x20>
2003e28: b8 10 20 00 clr %i4
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
disk_unlock();
2003e2c: 7f ff fe 2e call 20036e4 <disk_unlock> <== NOT EXECUTED
2003e30: 01 00 00 00 nop <== NOT EXECUTED
return NULL;
2003e34: 81 c7 e0 08 ret <== NOT EXECUTED
2003e38: 81 e8 00 00 restore <== NOT EXECUTED
02003c5c <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
2003c5c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
2003c60: 7f ff fc 5d call 2002dd4 <sparc_disable_interrupts>
2003c64: b8 10 00 18 mov %i0, %i4
2003c68: b6 10 00 08 mov %o0, %i3
if (!diskdevs_protected) {
2003c6c: 03 00 80 83 sethi %hi(0x2020c00), %g1
2003c70: c2 08 61 c0 ldub [ %g1 + 0x1c0 ], %g1 ! 2020dc0 <diskdevs_protected>
2003c74: 80 a0 60 00 cmp %g1, 0
2003c78: 22 80 00 10 be,a 2003cb8 <rtems_disk_obtain+0x5c> <== ALWAYS TAKEN
2003c7c: 90 10 00 18 mov %i0, %o0
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
2003c80: 7f ff fc 59 call 2002de4 <sparc_enable_interrupts> <== NOT EXECUTED
2003c84: b0 10 20 00 clr %i0 <== NOT EXECUTED
sc = disk_lock();
2003c88: 7f ff fe 88 call 20036a8 <disk_lock> <== NOT EXECUTED
2003c8c: 01 00 00 00 nop <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
2003c90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003c94: 12 80 00 07 bne 2003cb0 <rtems_disk_obtain+0x54> <== NOT EXECUTED
2003c98: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
dd = get_disk_entry(dev, false);
2003c9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2003ca0: 7f ff fe 47 call 20035bc <get_disk_entry> <== NOT EXECUTED
2003ca4: 94 10 20 00 clr %o2 <== NOT EXECUTED
disk_unlock();
2003ca8: 7f ff fe 8f call 20036e4 <disk_unlock> <== NOT EXECUTED
2003cac: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
}
return dd;
}
2003cb0: 81 c7 e0 08 ret <== NOT EXECUTED
2003cb4: 81 e8 00 00 restore <== NOT EXECUTED
rtems_interrupt_level level;
rtems_interrupt_disable(level);
if (!diskdevs_protected) {
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
2003cb8: 92 10 00 19 mov %i1, %o1
2003cbc: 7f ff fe 40 call 20035bc <get_disk_entry>
2003cc0: 94 10 20 00 clr %o2
2003cc4: b0 10 00 08 mov %o0, %i0
rtems_interrupt_enable(level);
2003cc8: 7f ff fc 47 call 2002de4 <sparc_enable_interrupts>
2003ccc: 90 10 00 1b mov %i3, %o0
2003cd0: 81 c7 e0 08 ret
2003cd4: 81 e8 00 00 restore
02007d2c <rtems_fdisk_abort>:
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
*/
static void
rtems_fdisk_abort (const char *format, ...)
{
2007d2c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:abort:");
2007d30: 21 00 80 db sethi %hi(0x2036c00), %l0 <== NOT EXECUTED
2007d34: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 ! 2036f50 <_impure_ptr><== NOT EXECUTED
*/
static void
rtems_fdisk_abort (const char *format, ...)
{
va_list args;
va_start (args, format);
2007d38: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED
2007d3c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2007d40: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
2007d44: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
2007d48: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
fprintf (stderr, "fdisk:abort:");
2007d4c: d6 00 60 0c ld [ %g1 + 0xc ], %o3 <== NOT EXECUTED
*/
static void
rtems_fdisk_abort (const char *format, ...)
{
va_list args;
va_start (args, format);
2007d50: 82 07 a0 48 add %fp, 0x48, %g1 <== NOT EXECUTED
fprintf (stderr, "fdisk:abort:");
2007d54: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2007d58: 94 10 20 0c mov 0xc, %o2 <== NOT EXECUTED
*/
static void
rtems_fdisk_abort (const char *format, ...)
{
va_list args;
va_start (args, format);
2007d5c: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
fprintf (stderr, "fdisk:abort:");
2007d60: 11 00 80 c7 sethi %hi(0x2031c00), %o0 <== NOT EXECUTED
2007d64: 40 00 6b 71 call 2022b28 <fwrite> <== NOT EXECUTED
2007d68: 90 12 23 18 or %o0, 0x318, %o0 ! 2031f18 <__FUNCTION__.6882+0x638><== NOT EXECUTED
vfprintf (stderr, format, args);
2007d6c: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 <== NOT EXECUTED
2007d70: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
2007d74: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2007d78: 40 00 8c 0a call 202ada0 <vfprintf> <== NOT EXECUTED
2007d7c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
fprintf (stderr, "\n");
2007d80: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 <== NOT EXECUTED
2007d84: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
2007d88: 40 00 6a e5 call 202291c <fputc> <== NOT EXECUTED
2007d8c: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED
fflush (stderr);
2007d90: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 <== NOT EXECUTED
2007d94: 40 00 69 cd call 20224c8 <fflush> <== NOT EXECUTED
2007d98: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
va_end (args);
exit (1);
2007d9c: 40 00 68 be call 2022094 <exit> <== NOT EXECUTED
2007da0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
02005da8 <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)
{
2005da8: 9d e3 bf 98 save %sp, -104, %sp
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->unavail_blocks;
if (starvation)
2005dac: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
2005db0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2005db4: 80 a0 80 01 cmp %g2, %g1
2005db8: 1a 80 00 1b bcc 2005e24 <rtems_fdisk_compact+0x7c>
2005dbc: ba 10 00 18 mov %i0, %i5
fd->starvations++;
2005dc0: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
2005dc4: f8 06 20 3c ld [ %i0 + 0x3c ], %i4
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->unavail_blocks;
if (starvation)
fd->starvations++;
2005dc8: 82 00 60 01 inc %g1
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
2005dcc: 80 a7 20 00 cmp %i4, 0
2005dd0: 02 80 00 7c be 2005fc0 <rtems_fdisk_compact+0x218> <== NEVER TAKEN
2005dd4: c2 26 20 6c st %g1, [ %i0 + 0x6c ]
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
2005dd8: c2 07 00 00 ld [ %i4 ], %g1
if (!queue->head)
2005ddc: 80 a0 60 00 cmp %g1, 0
2005de0: 02 80 00 8c be 2006010 <rtems_fdisk_compact+0x268> <== NEVER TAKEN
2005de4: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
queue->tail = 0;
queue->count--;
2005de8: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
2005dec: 82 00 7f ff add %g1, -1, %g1
2005df0: c2 27 60 44 st %g1, [ %i5 + 0x44 ]
sc->next = 0;
2005df4: c0 27 00 00 clr [ %i4 ]
if (!ssc)
ssc = rtems_fdisk_segment_queue_pop_head (&fd->available);
if (ssc)
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
2005df8: 7f ff fc 81 call 2004ffc <rtems_fdisk_seg_most_available>
2005dfc: 90 07 60 30 add %i5, 0x30, %o0
if (dsc)
2005e00: 94 92 20 00 orcc %o0, 0, %o2
2005e04: 02 80 00 7e be 2005ffc <rtems_fdisk_compact+0x254> <== NEVER TAKEN
2005e08: 92 10 00 1c mov %i4, %o1
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
2005e0c: 90 10 00 1d mov %i5, %o0
2005e10: 7f ff fe e7 call 20059ac <rtems_fdisk_recycle_segment>
2005e14: 96 07 bf fc add %fp, -4, %o3
if (ret)
2005e18: 80 a2 20 00 cmp %o0, 0
2005e1c: 12 80 00 3f bne 2005f18 <rtems_fdisk_compact+0x170> <== NEVER TAKEN
2005e20: 01 00 00 00 nop
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
2005e24: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
2005e28: 33 00 80 c8 sethi %hi(0x2032000), %i1
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",
2005e2c: 21 00 80 c8 sethi %hi(0x2032000), %l0
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
break;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
2005e30: 23 00 80 c8 sethi %hi(0x2032000), %l1
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
2005e34: b6 10 20 00 clr %i3
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
2005e38: b2 16 61 20 or %i1, 0x120, %i1
#endif
dsc = rtems_fdisk_seg_most_available (&fd->available);
2005e3c: b4 07 60 30 add %i5, 0x30, %i2
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",
2005e40: a0 14 21 68 or %l0, 0x168, %l0
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
break;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
2005e44: a2 14 61 88 or %l1, 0x188, %l1
rtems_fdisk_error ("compacting: nothing to recycle");
return EIO;
}
}
while (fd->used.head)
2005e48: 80 a2 60 00 cmp %o1, 0
2005e4c: 02 80 00 32 be 2005f14 <rtems_fdisk_compact+0x16c>
2005e50: 92 10 00 19 mov %i1, %o1
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
2005e54: 7f ff fc a9 call 20050f8 <rtems_fdisk_printf>
2005e58: 90 10 00 1d mov %i5, %o0
#endif
dsc = rtems_fdisk_seg_most_available (&fd->available);
2005e5c: 7f ff fc 68 call 2004ffc <rtems_fdisk_seg_most_available>
2005e60: 90 10 00 1a mov %i2, %o0
if (dsc == 0)
2005e64: b8 92 20 00 orcc %o0, 0, %i4
2005e68: 02 80 00 6c be 2006018 <rtems_fdisk_compact+0x270> <== NEVER TAKEN
2005e6c: 11 00 80 c8 sethi %hi(0x2032000), %o0
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",
2005e70: d4 07 20 08 ld [ %i4 + 8 ], %o2
2005e74: d6 07 20 0c ld [ %i4 + 0xc ], %o3
{
rtems_fdisk_error ("compacting: no available segments to compact too");
return EIO;
}
ssc = fd->used.head;
2005e78: f0 07 60 3c ld [ %i5 + 0x3c ], %i0
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005e7c: e6 07 20 14 ld [ %i4 + 0x14 ], %l3
2005e80: ea 07 20 1c ld [ %i4 + 0x1c ], %l5
2005e84: e8 07 20 20 ld [ %i4 + 0x20 ], %l4
2005e88: e4 07 20 24 ld [ %i4 + 0x24 ], %l2
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
pages = 0;
2005e8c: c0 27 bf fc clr [ %fp + -4 ]
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
2005e90: 90 10 00 1d mov %i5, %o0
2005e94: 7f ff fc 99 call 20050f8 <rtems_fdisk_printf>
2005e98: 92 10 00 10 mov %l0, %o1
* 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 &&
2005e9c: 80 a6 20 00 cmp %i0, 0
2005ea0: 02 80 00 1d be 2005f14 <rtems_fdisk_compact+0x16c> <== NEVER TAKEN
2005ea4: c2 07 bf fc ld [ %fp + -4 ], %g1
((pages + ssc->pages_active) < dst_pages) &&
2005ea8: d8 06 20 1c ld [ %i0 + 0x1c ], %o4
* 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)
2005eac: a8 05 40 14 add %l5, %l4, %l4
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
2005eb0: 98 00 40 0c add %g1, %o4, %o4
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005eb4: a6 24 c0 14 sub %l3, %l4, %l3
2005eb8: a4 24 c0 12 sub %l3, %l2, %l2
* 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 &&
2005ebc: 80 a3 00 12 cmp %o4, %l2
2005ec0: 3a 80 00 4d bcc,a 2005ff4 <rtems_fdisk_compact+0x24c>
2005ec4: 98 10 00 01 mov %g1, %o4
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
2005ec8: c6 07 60 0c ld [ %i5 + 0xc ], %g3
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
2005ecc: 80 a6 c0 03 cmp %i3, %g3
2005ed0: 0a 80 00 0d bcs 2005f04 <rtems_fdisk_compact+0x15c> <== ALWAYS TAKEN
2005ed4: 9a 10 20 00 clr %o5
2005ed8: 10 80 00 13 b 2005f24 <rtems_fdisk_compact+0x17c> <== NOT EXECUTED
2005edc: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
2005ee0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
2005ee4: 82 03 00 01 add %o4, %g1, %g1
* 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 &&
2005ee8: 80 a0 40 12 cmp %g1, %l2
2005eec: 1a 80 00 0d bcc 2005f20 <rtems_fdisk_compact+0x178> <== ALWAYS TAKEN
2005ef0: 84 03 40 1b add %o5, %i3, %g2
((pages + ssc->pages_active) < dst_pages) &&
2005ef4: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
2005ef8: 3a 80 00 0b bcc,a 2005f24 <rtems_fdisk_compact+0x17c> <== NOT EXECUTED
2005efc: d8 27 bf fc st %o4, [ %fp + -4 ] <== NOT EXECUTED
2005f00: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
segments++;
ssc = ssc->next;
2005f04: f0 06 00 00 ld [ %i0 ], %i0
* 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 &&
2005f08: 80 a6 20 00 cmp %i0, 0
2005f0c: 12 bf ff f5 bne 2005ee0 <rtems_fdisk_compact+0x138>
2005f10: 9a 03 60 01 inc %o5
}
compacted_segs += segments;
}
return 0;
2005f14: 90 10 20 00 clr %o0
}
2005f18: 81 c7 e0 08 ret
2005f1c: 91 e8 00 08 restore %g0, %o0, %o0
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
2005f20: d8 27 bf fc st %o4, [ %fp + -4 ]
* 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))
2005f24: 80 a3 20 00 cmp %o4, 0
2005f28: 02 bf ff fc be 2005f18 <rtems_fdisk_compact+0x170>
2005f2c: 90 10 20 00 clr %o0
2005f30: b6 06 c0 0d add %i3, %o5, %i3
2005f34: 80 a6 e0 01 cmp %i3, 1
2005f38: 02 bf ff f8 be 2005f18 <rtems_fdisk_compact+0x170> <== ALWAYS TAKEN
2005f3c: 92 10 00 11 mov %l1, %o1
break;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
2005f40: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED
2005f44: d6 06 20 0c ld [ %i0 + 0xc ], %o3 <== NOT EXECUTED
2005f48: 7f ff fc 6c call 20050f8 <rtems_fdisk_printf> <== NOT EXECUTED
2005f4c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
2005f50: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2005f54: 7f ff fb c0 call 2004e54 <rtems_fdisk_segment_queue_remove><== NOT EXECUTED
2005f58: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
/*
* We now copy the pages to the new segment.
*/
while (pages)
2005f5c: 10 80 00 0d b 2005f90 <rtems_fdisk_compact+0x1e8> <== NOT EXECUTED
2005f60: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
queue->head = sc->next;
if (!queue->head)
queue->tail = 0;
queue->count--;
2005f64: c2 07 60 44 ld [ %i5 + 0x44 ], %g1 <== NOT EXECUTED
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
if (ssc)
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
2005f68: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
queue->head = sc->next;
if (!queue->head)
queue->tail = 0;
queue->count--;
2005f6c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2005f70: c2 27 60 44 st %g1, [ %i5 + 0x44 ] <== NOT EXECUTED
sc->next = 0;
2005f74: c0 22 40 00 clr [ %o1 ] <== NOT EXECUTED
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
if (ssc)
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
2005f78: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2005f7c: 7f ff fe 8c call 20059ac <rtems_fdisk_recycle_segment> <== NOT EXECUTED
2005f80: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (ret)
2005f84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2005f88: 12 bf ff e4 bne 2005f18 <rtems_fdisk_compact+0x170> <== NOT EXECUTED
2005f8c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
/*
* We now copy the pages to the new segment.
*/
while (pages)
2005f90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005f94: 02 bf ff ad be 2005e48 <rtems_fdisk_compact+0xa0> <== NOT EXECUTED
2005f98: d2 07 60 3c ld [ %i5 + 0x3c ], %o1 <== NOT EXECUTED
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
2005f9c: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2005fa0: 02 80 00 00 be 2005fa0 <rtems_fdisk_compact+0x1f8> <== NOT EXECUTED
2005fa4: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
2005fa8: c2 02 40 00 ld [ %o1 ], %g1 <== NOT EXECUTED
if (!queue->head)
2005fac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005fb0: 12 bf ff ed bne 2005f64 <rtems_fdisk_compact+0x1bc> <== NOT EXECUTED
2005fb4: c2 27 60 3c st %g1, [ %i5 + 0x3c ] <== NOT EXECUTED
queue->tail = 0;
2005fb8: 10 bf ff eb b 2005f64 <rtems_fdisk_compact+0x1bc> <== NOT EXECUTED
2005fbc: c0 27 60 40 clr [ %i5 + 0x40 ] <== NOT EXECUTED
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
2005fc0: f8 06 20 30 ld [ %i0 + 0x30 ], %i4 <== NOT EXECUTED
2005fc4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2005fc8: 02 80 00 1a be 2006030 <rtems_fdisk_compact+0x288> <== NOT EXECUTED
2005fcc: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
2005fd0: c2 07 00 00 ld [ %i4 ], %g1 <== NOT EXECUTED
if (!queue->head)
2005fd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005fd8: 02 80 00 14 be 2006028 <rtems_fdisk_compact+0x280> <== NOT EXECUTED
2005fdc: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED
queue->tail = 0;
queue->count--;
2005fe0: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
2005fe4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2005fe8: c2 27 60 38 st %g1, [ %i5 + 0x38 ] <== NOT EXECUTED
sc->next = 0;
2005fec: 10 bf ff 83 b 2005df8 <rtems_fdisk_compact+0x50> <== NOT EXECUTED
2005ff0: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
2005ff4: 10 bf ff cc b 2005f24 <rtems_fdisk_compact+0x17c>
2005ff8: 9a 10 20 00 clr %o5
if (ret)
return ret;
}
else
{
rtems_fdisk_error ("compacting: starvation");
2005ffc: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
2006000: 7f ff fd 18 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2006004: 90 12 21 08 or %o0, 0x108, %o0 ! 2032108 <__FUNCTION__.6882+0x828><== NOT EXECUTED
return EIO;
2006008: 10 bf ff c4 b 2005f18 <rtems_fdisk_compact+0x170> <== NOT EXECUTED
200600c: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
if (!queue->head)
queue->tail = 0;
2006010: 10 bf ff 76 b 2005de8 <rtems_fdisk_compact+0x40> <== NOT EXECUTED
2006014: c0 26 20 40 clr [ %i0 + 0x40 ] <== NOT EXECUTED
dsc = rtems_fdisk_seg_most_available (&fd->available);
if (dsc == 0)
{
rtems_fdisk_error ("compacting: no available segments to compact too");
2006018: 7f ff fd 12 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
200601c: 90 12 21 30 or %o0, 0x130, %o0 <== NOT EXECUTED
return EIO;
2006020: 10 bf ff be b 2005f18 <rtems_fdisk_compact+0x170> <== NOT EXECUTED
2006024: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
if (!queue->head)
queue->tail = 0;
2006028: 10 bf ff ee b 2005fe0 <rtems_fdisk_compact+0x238> <== NOT EXECUTED
200602c: c0 26 20 34 clr [ %i0 + 0x34 ] <== NOT EXECUTED
return EIO;
}
}
else
{
rtems_fdisk_error ("compacting: nothing to recycle");
2006030: 7f ff fd 0c call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2006034: 90 12 21 b0 or %o0, 0x1b0, %o0 <== NOT EXECUTED
return EIO;
2006038: 10 bf ff b8 b 2005f18 <rtems_fdisk_compact+0x170> <== NOT EXECUTED
200603c: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
020054dc <rtems_fdisk_erase_segment>:
/**
* Erase the segment.
*/
static int
rtems_fdisk_erase_segment (rtems_flashdisk* fd, rtems_fdisk_segment_ctl* sc)
{
20054dc: 9d e3 bf a0 save %sp, -96, %sp
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
20054e0: d2 06 60 08 ld [ %i1 + 8 ], %o1
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;
20054e4: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
20054e8: 87 2a 60 04 sll %o1, 4, %g3
20054ec: 83 2a 60 02 sll %o1, 2, %g1
20054f0: 82 20 c0 01 sub %g3, %g1, %g1
20054f4: 86 00 80 01 add %g2, %g1, %g3
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;
20054f8: c6 00 e0 08 ld [ %g3 + 8 ], %g3
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
20054fc: d4 06 60 0c ld [ %i1 + 0xc ], %o2
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
ret = ops->erase (sd, device, segment);
2005500: f8 00 e0 08 ld [ %g3 + 8 ], %i4
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;
2005504: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2005508: 89 2a a0 06 sll %o2, 6, %g4
200550c: 85 2a a0 04 sll %o2, 4, %g2
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);
2005510: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
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;
2005514: 84 21 00 02 sub %g4, %g2, %g2
2005518: 84 00 c0 02 add %g3, %g2, %g2
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);
200551c: d0 00 a0 04 ld [ %g2 + 4 ], %o0
2005520: 9f c0 40 00 call %g1
2005524: ba 10 00 18 mov %i0, %i5
if (ret)
2005528: b0 92 20 00 orcc %o0, 0, %i0
200552c: 22 80 00 24 be,a 20055bc <rtems_fdisk_erase_segment+0xe0><== ALWAYS TAKEN
2005530: c6 07 60 24 ld [ %i5 + 0x24 ], %g3
{
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
2005534: f6 06 60 08 ld [ %i1 + 8 ], %i3 <== NOT EXECUTED
2005538: 40 00 7b 60 call 20242b8 <strerror> <== NOT EXECUTED
200553c: f8 06 60 0c ld [ %i1 + 0xc ], %i4 <== NOT EXECUTED
2005540: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2005544: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2005548: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
200554c: 11 00 80 c7 sethi %hi(0x2031c00), %o0 <== NOT EXECUTED
2005550: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED
2005554: 7f ff ff c3 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2005558: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
*/
static bool
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
200555c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 <== NOT EXECUTED
if (ret)
{
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
"segment erase failed: %s (%d)",
sc->device, sc->segment, strerror (ret), ret);
sc->failed = true;
2005560: 84 10 20 01 mov 1, %g2 <== 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)
2005564: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005568: 02 80 00 36 be 2005640 <rtems_fdisk_erase_segment+0x164> <== NOT EXECUTED
200556c: c4 26 60 28 st %g2, [ %i1 + 0x28 ] <== NOT EXECUTED
{
if (it == sc)
2005570: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2005574: 32 80 00 06 bne,a 200558c <rtems_fdisk_erase_segment+0xb0><== NOT EXECUTED
2005578: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
200557c: 30 80 00 35 b,a 2005650 <rtems_fdisk_erase_segment+0x174><== NOT EXECUTED
2005580: 02 80 00 34 be 2005650 <rtems_fdisk_erase_segment+0x174> <== NOT EXECUTED
2005584: 01 00 00 00 nop <== NOT EXECUTED
return true;
it = it->next;
2005588: c2 00 40 00 ld [ %g1 ], %g1 <== 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)
200558c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005590: 12 bf ff fc bne 2005580 <rtems_fdisk_erase_segment+0xa4> <== NOT EXECUTED
2005594: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
{
sc->next = 0;
if (queue->head)
{
queue->tail->next = sc;
2005598: c2 07 60 58 ld [ %i5 + 0x58 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = 0;
200559c: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
if (queue->head)
{
queue->tail->next = sc;
20055a0: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED
queue->tail = sc;
20055a4: f2 27 60 58 st %i1, [ %i5 + 0x58 ] <== NOT EXECUTED
else
{
queue->head = queue->tail = sc;
}
queue->count++;
20055a8: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
20055ac: 82 00 60 01 inc %g1 <== NOT EXECUTED
20055b0: c2 27 60 5c st %g1, [ %i5 + 0x5c ] <== NOT EXECUTED
20055b4: 81 c7 e0 08 ret <== NOT EXECUTED
20055b8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
return ret;
}
fd->erased_blocks += sc->pages;
sc->erased++;
20055bc: c2 06 60 2c ld [ %i1 + 0x2c ], %g1
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;
20055c0: c4 06 60 14 ld [ %i1 + 0x14 ], %g2
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
20055c4: d2 06 60 18 ld [ %i1 + 0x18 ], %o1
20055c8: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
return ret;
}
fd->erased_blocks += sc->pages;
sc->erased++;
20055cc: 82 00 60 01 inc %g1
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
20055d0: f8 06 60 10 ld [ %i1 + 0x10 ], %i4
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;
20055d4: 84 00 c0 02 add %g3, %g2, %g2
20055d8: c4 27 60 24 st %g2, [ %i5 + 0x24 ]
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
20055dc: 7f ff f3 d8 call 200253c <.umul>
20055e0: c2 26 60 2c st %g1, [ %i1 + 0x2c ]
20055e4: 92 10 20 ff mov 0xff, %o1
20055e8: 94 10 00 08 mov %o0, %o2
20055ec: 40 00 76 23 call 2022e78 <memset>
20055f0: 90 10 00 1c mov %i4, %o0
{
if (sc)
{
sc->next = 0;
if (queue->head)
20055f4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
fd->erased_blocks += sc->pages;
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
sc->pages_active = 0;
20055f8: c0 26 60 1c clr [ %i1 + 0x1c ]
sc->pages_used = 0;
20055fc: c0 26 60 20 clr [ %i1 + 0x20 ]
sc->pages_bad = 0;
2005600: c0 26 60 24 clr [ %i1 + 0x24 ]
sc->failed = false;
2005604: c0 26 60 28 clr [ %i1 + 0x28 ]
{
if (sc)
{
sc->next = 0;
if (queue->head)
2005608: 80 a0 60 00 cmp %g1, 0
200560c: 02 80 00 0a be 2005634 <rtems_fdisk_erase_segment+0x158> <== NEVER TAKEN
2005610: c0 26 40 00 clr [ %i1 ]
{
queue->tail->next = sc;
2005614: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2005618: f2 20 40 00 st %i1, [ %g1 ]
queue->tail = sc;
200561c: f2 27 60 34 st %i1, [ %i5 + 0x34 ]
else
{
queue->head = queue->tail = sc;
}
queue->count++;
2005620: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2005624: 82 00 60 01 inc %g1
2005628: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
* segment will now get a go.
*/
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
return 0;
}
200562c: 81 c7 e0 08 ret
2005630: 81 e8 00 00 restore
queue->tail->next = sc;
queue->tail = sc;
}
else
{
queue->head = queue->tail = sc;
2005634: f2 27 60 34 st %i1, [ %i5 + 0x34 ] <== NOT EXECUTED
2005638: 10 bf ff fa b 2005620 <rtems_fdisk_erase_segment+0x144> <== NOT EXECUTED
200563c: f2 27 60 30 st %i1, [ %i5 + 0x30 ] <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = 0;
2005640: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
queue->tail->next = sc;
queue->tail = sc;
}
else
{
queue->head = queue->tail = sc;
2005644: f2 27 60 58 st %i1, [ %i5 + 0x58 ] <== NOT EXECUTED
2005648: 10 bf ff d8 b 20055a8 <rtems_fdisk_erase_segment+0xcc> <== NOT EXECUTED
200564c: f2 27 60 54 st %i1, [ %i5 + 0x54 ] <== NOT EXECUTED
2005650: 81 c7 e0 08 ret <== NOT EXECUTED
2005654: 81 e8 00 00 restore <== NOT EXECUTED
02005460 <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, ...)
{
2005460: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:error:");
2005464: 21 00 80 db sethi %hi(0x2036c00), %l0 <== NOT EXECUTED
2005468: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 ! 2036f50 <_impure_ptr><== NOT EXECUTED
static int
rtems_fdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
200546c: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED
2005470: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2005474: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
2005478: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
200547c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
2005480: d6 00 60 0c ld [ %g1 + 0xc ], %o3 <== NOT EXECUTED
static int
rtems_fdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
2005484: 82 07 a0 48 add %fp, 0x48, %g1 <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
2005488: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
static int
rtems_fdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
200548c: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
fprintf (stderr, "fdisk:error:");
2005490: 94 10 20 0c mov 0xc, %o2 <== NOT EXECUTED
2005494: 11 00 80 c7 sethi %hi(0x2031c00), %o0 <== NOT EXECUTED
2005498: 40 00 75 a4 call 2022b28 <fwrite> <== NOT EXECUTED
200549c: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 2031ed0 <__FUNCTION__.6882+0x5f0><== NOT EXECUTED
ret = vfprintf (stderr, format, args);
20054a0: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 <== NOT EXECUTED
20054a4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
20054a8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
20054ac: 40 00 96 3d call 202ada0 <vfprintf> <== NOT EXECUTED
20054b0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
fprintf (stderr, "\n");
20054b4: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:error:");
ret = vfprintf (stderr, format, args);
20054b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
fprintf (stderr, "\n");
20054bc: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED
20054c0: 40 00 75 17 call 202291c <fputc> <== NOT EXECUTED
20054c4: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
fflush (stderr);
20054c8: c2 04 23 50 ld [ %l0 + 0x350 ], %g1 <== NOT EXECUTED
20054cc: 40 00 73 ff call 20224c8 <fflush> <== NOT EXECUTED
20054d0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
va_end (args);
return ret;
}
20054d4: 81 c7 e0 08 ret <== NOT EXECUTED
20054d8: 81 e8 00 00 restore <== NOT EXECUTED
02005070 <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, ...)
{
2005070: 9d e3 bf 98 save %sp, -104, %sp
int ret = 0;
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
2005074: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2005078: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200507c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2005080: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
*/
static int
rtems_fdisk_info (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
if (fd->info_level >= 2)
2005084: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
2005088: 80 a0 60 01 cmp %g1, 1
200508c: 08 80 00 19 bleu 20050f0 <rtems_fdisk_info+0x80> <== ALWAYS TAKEN
2005090: b0 10 20 00 clr %i0
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
2005094: 3b 00 80 db sethi %hi(0x2036c00), %i5 <== NOT EXECUTED
2005098: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 ! 2036f50 <_impure_ptr><== NOT EXECUTED
200509c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
20050a0: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
20050a4: 82 07 a0 4c add %fp, 0x4c, %g1 <== NOT EXECUTED
fprintf (stdout, "fdisk:");
20050a8: 94 10 20 06 mov 6, %o2 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
20050ac: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
fprintf (stdout, "fdisk:");
20050b0: 11 00 80 c7 sethi %hi(0x2031c00), %o0 <== NOT EXECUTED
20050b4: 40 00 76 9d call 2022b28 <fwrite> <== NOT EXECUTED
20050b8: 90 12 22 40 or %o0, 0x240, %o0 ! 2031e40 <__FUNCTION__.6882+0x560><== NOT EXECUTED
ret = vfprintf (stdout, format, args);
20050bc: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 <== NOT EXECUTED
20050c0: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
20050c4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
20050c8: 40 00 97 36 call 202ada0 <vfprintf> <== NOT EXECUTED
20050cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
fprintf (stdout, "\n");
20050d0: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 <== NOT EXECUTED
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
ret = vfprintf (stdout, format, args);
20050d4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
fprintf (stdout, "\n");
20050d8: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED
20050dc: 40 00 76 10 call 202291c <fputc> <== NOT EXECUTED
20050e0: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
fflush (stdout);
20050e4: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 <== NOT EXECUTED
20050e8: 40 00 74 f8 call 20224c8 <fflush> <== NOT EXECUTED
20050ec: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
va_end (args);
}
return ret;
}
20050f0: 81 c7 e0 08 ret
20050f4: 81 e8 00 00 restore
0200780c <rtems_fdisk_initialize>:
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
200780c: 9d e3 bf 78 save %sp, -136, %sp
const rtems_flashdisk_config* c = rtems_flashdisk_configuration;
rtems_flashdisk* fd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
2007810: 7f ff f5 37 call 2004cec <rtems_disk_io_initialize>
2007814: b4 10 00 18 mov %i0, %i2
if (sc != RTEMS_SUCCESSFUL)
2007818: b0 92 20 00 orcc %o0, 0, %i0
200781c: 02 80 00 04 be 200782c <rtems_fdisk_initialize+0x20> <== ALWAYS TAKEN
2007820: 01 00 00 00 nop
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
2007824: 81 c7 e0 08 ret <== NOT EXECUTED
2007828: 81 e8 00 00 restore <== NOT EXECUTED
static rtems_status_code
rtems_fdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
200782c: 40 00 06 72 call 20091f4 <malloc>
2007830: 90 10 22 00 mov 0x200, %o0
2007834: 03 00 81 1d sethi %hi(0x2047400), %g1
2007838: d0 20 60 98 st %o0, [ %g1 + 0x98 ] ! 2047498 <rtems_fdisk_crc16_factor>
200783c: b8 10 00 08 mov %o0, %i4
if (!rtems_fdisk_crc16_factor)
2007840: 80 a2 20 00 cmp %o0, 0
2007844: 02 bf ff f8 be 2007824 <rtems_fdisk_initialize+0x18> <== NEVER TAKEN
2007848: b0 10 20 1a mov 0x1a, %i0
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;
200784c: 3b 3f ff e1 sethi %hi(0xffff8400), %i5
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)
2007850: 88 10 20 00 clr %g4
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;
2007854: ba 17 60 08 or %i5, 8, %i5
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
2007858: 82 10 00 04 mov %g4, %g1
200785c: 84 10 20 08 mov 8, %g2
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
2007860: 87 28 60 10 sll %g1, 0x10, %g3
2007864: 82 08 60 01 and %g1, 1, %g1
2007868: 87 30 e0 11 srl %g3, 0x11, %g3
200786c: 80 a0 60 00 cmp %g1, 0
2007870: 02 80 00 03 be 200787c <rtems_fdisk_initialize+0x70>
2007874: 82 10 00 03 mov %g3, %g1
2007878: 82 18 c0 1d xor %g3, %i5, %g1
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
200787c: 84 80 bf ff addcc %g2, -1, %g2
2007880: 12 bf ff f9 bne 2007864 <rtems_fdisk_initialize+0x58>
2007884: 87 28 60 10 sll %g1, 0x10, %g3
* @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,
2007888: 85 29 20 01 sll %g4, 1, %g2
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
200788c: 88 01 20 01 inc %g4
2007890: 80 a1 21 00 cmp %g4, 0x100
2007894: 12 bf ff f1 bne 2007858 <rtems_fdisk_initialize+0x4c>
2007898: c2 37 00 02 sth %g1, [ %i4 + %g2 ]
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
200789c: 21 00 80 db sethi %hi(0x2036c00), %l0
20078a0: fa 04 21 34 ld [ %l0 + 0x134 ], %i5 ! 2036d34 <rtems_flashdisk_configuration_size>
20078a4: 92 10 20 70 mov 0x70, %o1
20078a8: 90 10 00 1d mov %i5, %o0
20078ac: 40 00 03 2b call 2008558 <calloc>
20078b0: 23 00 81 1d sethi %hi(0x2047400), %l1
20078b4: d0 24 60 9c st %o0, [ %l1 + 0x9c ] ! 204749c <rtems_flashdisks>
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
20078b8: 80 a2 20 00 cmp %o0, 0
20078bc: 02 bf ff da be 2007824 <rtems_fdisk_initialize+0x18> <== NEVER TAKEN
20078c0: b0 10 20 1a mov 0x1a, %i0
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
20078c4: 80 a7 60 00 cmp %i5, 0
20078c8: 02 80 00 d0 be 2007c08 <rtems_fdisk_initialize+0x3fc> <== NEVER TAKEN
20078cc: 39 00 80 c5 sethi %hi(0x2031400), %i4
20078d0: b2 10 20 00 clr %i1
20078d4: b8 17 20 bc or %i4, 0xbc, %i4
20078d8: b6 10 20 00 clr %i3
{
char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
20078dc: 03 00 00 18 sethi %hi(0x6000), %g1
20078e0: 82 10 61 00 or %g1, 0x100, %g1 ! 6100 <PROM_START+0x6100>
20078e4: c2 37 bf f8 sth %g1, [ %fp + -8 ]
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
20078e8: f6 2f bf f9 stb %i3, [ %fp + -7 ]
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";
20078ec: 05 0b d9 19 sethi %hi(0x2f646400), %g2
20078f0: 07 0b d9 99 sethi %hi(0x2f666400), %g3
20078f4: 84 10 a1 76 or %g2, 0x176, %g2
20078f8: 86 10 e0 64 or %g3, 0x64, %g3
20078fc: c4 3f bf f0 std %g2, [ %fp + -16 ]
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++)
2007900: fa 07 20 04 ld [ %i4 + 4 ], %i5
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
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;
2007904: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
2007908: f0 07 20 0c ld [ %i4 + 0xc ], %i0
fd->compact_segs = c->compact_segs;
200790c: c8 07 20 14 ld [ %i4 + 0x14 ], %g4
fd->avail_compact_segs = c->avail_compact_segs;
2007910: c6 07 20 18 ld [ %i4 + 0x18 ], %g3
fd->block_size = c->block_size;
2007914: ea 07 00 00 ld [ %i4 ], %l5
fd->unavail_blocks = c->unavail_blocks;
2007918: c4 07 20 10 ld [ %i4 + 0x10 ], %g2
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
200791c: fa 27 bf ec st %i5, [ %fp + -20 ]
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
2007920: ba 02 00 19 add %o0, %i1, %i5
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
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;
2007924: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
for (device = 0; device < c->device_count; device++)
2007928: c2 07 bf ec ld [ %fp + -20 ], %g1
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
200792c: f0 27 60 08 st %i0, [ %i5 + 8 ]
fd = &rtems_flashdisks[minor];
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
2007930: f4 22 00 19 st %i2, [ %o0 + %i1 ]
fd->minor = minor;
2007934: f6 27 60 04 st %i3, [ %i5 + 4 ]
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
2007938: c8 27 60 0c st %g4, [ %i5 + 0xc ]
fd->avail_compact_segs = c->avail_compact_segs;
200793c: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
fd->block_size = c->block_size;
2007940: ea 27 60 14 st %l5, [ %i5 + 0x14 ]
fd->unavail_blocks = c->unavail_blocks;
2007944: c4 27 60 20 st %g2, [ %i5 + 0x20 ]
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
2007948: 80 a0 60 00 cmp %g1, 0
200794c: 02 80 00 2a be 20079f4 <rtems_fdisk_initialize+0x1e8> <== NEVER TAKEN
2007950: b0 10 20 00 clr %i0
2007954: c4 07 20 08 ld [ %i4 + 8 ], %g2
2007958: f6 27 bf e8 st %i3, [ %fp + -24 ]
200795c: f6 07 bf ec ld [ %fp + -20 ], %i3
2007960: 82 10 20 00 clr %g1
2007964: f8 27 bf e4 st %i4, [ %fp + -28 ]
2007968: f4 27 bf e0 st %i2, [ %fp + -32 ]
200796c: b8 10 00 01 mov %g1, %i4
2007970: b4 10 00 1d mov %i5, %i2
2007974: ba 10 00 02 mov %g2, %i5
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++)
2007978: ee 07 40 00 ld [ %i5 ], %l7
200797c: 80 a5 e0 00 cmp %l7, 0
2007980: 02 80 00 14 be 20079d0 <rtems_fdisk_initialize+0x1c4> <== NEVER TAKEN
2007984: a8 10 20 00 clr %l4
2007988: e4 07 60 04 ld [ %i5 + 4 ], %l2
200798c: a6 10 20 00 clr %l3
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
2007990: d0 04 a0 08 ld [ %l2 + 8 ], %o0
2007994: 7f ff eb 24 call 2002624 <.udiv>
2007998: 92 10 00 15 mov %l5, %o1
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;
200799c: 92 10 00 15 mov %l5, %o1
20079a0: ac 02 3f ff add %o0, -1, %l6
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);
20079a4: 91 2a 20 03 sll %o0, 3, %o0
return ((bytes - 1) / page_size) + 1;
20079a8: 7f ff eb 1f call 2002624 <.udiv>
20079ac: 90 02 3f ff add %o0, -1, %o0
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) -
rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;
20079b0: d2 14 80 00 lduh [ %l2 ], %o1
20079b4: 7f ff ea e2 call 200253c <.umul>
20079b8: 90 25 80 08 sub %l6, %o0, %o0
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++)
20079bc: a6 04 e0 01 inc %l3
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
count +=
20079c0: a8 05 00 08 add %l4, %o0, %l4
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++)
20079c4: 80 a4 c0 17 cmp %l3, %l7
20079c8: 12 bf ff f2 bne 2007990 <rtems_fdisk_initialize+0x184> <== NEVER TAKEN
20079cc: a4 04 a0 0c add %l2, 0xc, %l2
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++)
20079d0: b8 07 20 01 inc %i4
blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
20079d4: b0 06 00 14 add %i0, %l4, %i0
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++)
20079d8: 80 a7 00 1b cmp %i4, %i3
20079dc: 12 bf ff e7 bne 2007978 <rtems_fdisk_initialize+0x16c> <== NEVER TAKEN
20079e0: ba 07 60 0c add %i5, 0xc, %i5
20079e4: ba 10 00 1a mov %i2, %i5
20079e8: f6 07 bf e8 ld [ %fp + -24 ], %i3
20079ec: f8 07 bf e4 ld [ %fp + -28 ], %i4
20079f0: f4 07 bf e0 ld [ %fp + -32 ], %i2
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
20079f4: 40 00 06 00 call 20091f4 <malloc>
20079f8: 90 10 00 15 mov %l5, %o0
if (!fd->copy_buffer)
20079fc: 80 a2 20 00 cmp %o0, 0
2007a00: 02 80 00 80 be 2007c00 <rtems_fdisk_initialize+0x3f4> <== NEVER TAKEN
2007a04: d0 27 60 64 st %o0, [ %i5 + 0x64 ]
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
2007a08: 90 10 00 18 mov %i0, %o0
2007a0c: 40 00 02 d3 call 2008558 <calloc>
2007a10: 92 10 20 08 mov 8, %o1
if (!fd->blocks)
2007a14: 80 a2 20 00 cmp %o0, 0
2007a18: 02 80 00 7a be 2007c00 <rtems_fdisk_initialize+0x3f4> <== NEVER TAKEN
2007a1c: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
2007a20: d0 07 bf ec ld [ %fp + -20 ], %o0
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
if (!fd->blocks)
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
2007a24: f0 27 60 1c st %i0, [ %i5 + 0x1c ]
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
2007a28: 40 00 02 cc call 2008558 <calloc>
2007a2c: 92 10 20 0c mov 0xc, %o1
if (!fd->devices)
2007a30: 80 a2 20 00 cmp %o0, 0
2007a34: 02 80 00 bc be 2007d24 <rtems_fdisk_initialize+0x518> <== NEVER TAKEN
2007a38: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
2007a3c: 05 00 80 ca sethi %hi(0x2032800), %g2
2007a40: d0 00 a1 a0 ld [ %g2 + 0x1a0 ], %o0 ! 20329a0 <__FUNCTION__.6882+0x10c0>
2007a44: 92 10 20 01 mov 1, %o1
2007a48: 94 10 20 54 mov 0x54, %o2
2007a4c: 96 10 20 00 clr %o3
2007a50: 40 00 16 fe call 200d648 <rtems_semaphore_create>
2007a54: 98 07 60 60 add %i5, 0x60, %o4
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &fd->lock);
if (sc != RTEMS_SUCCESSFUL)
2007a58: 80 a2 20 00 cmp %o0, 0
2007a5c: 12 80 00 a5 bne 2007cf0 <rtems_fdisk_initialize+0x4e4> <== NEVER TAKEN
2007a60: 86 07 bf f0 add %fp, -16, %g3
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
2007a64: d6 07 60 20 ld [ %i5 + 0x20 ], %o3
2007a68: d4 07 00 00 ld [ %i4 ], %o2
2007a6c: 96 26 00 0b sub %i0, %o3, %o3
2007a70: 90 10 00 1a mov %i2, %o0
2007a74: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2007a78: 92 10 00 1b mov %i3, %o1
2007a7c: 19 00 80 19 sethi %hi(0x2006400), %o4
2007a80: 9a 10 20 00 clr %o5
2007a84: 7f ff f3 43 call 2004790 <rtems_disk_create_phys>
2007a88: 98 13 20 08 or %o4, 8, %o4
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
2007a8c: b0 92 20 00 orcc %o0, 0, %i0
2007a90: 12 80 00 88 bne 2007cb0 <rtems_fdisk_initialize+0x4a4> <== NEVER TAKEN
2007a94: 01 00 00 00 nop
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
2007a98: ec 07 20 04 ld [ %i4 + 4 ], %l6
2007a9c: 80 a5 a0 00 cmp %l6, 0
2007aa0: 02 80 00 37 be 2007b7c <rtems_fdisk_initialize+0x370> <== NEVER TAKEN
2007aa4: b0 10 20 00 clr %i0
rtems_disk_delete (dev);
free (fd->copy_buffer);
free (fd->blocks);
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
2007aa8: e8 07 20 08 ld [ %i4 + 8 ], %l4
2007aac: ea 07 60 28 ld [ %i5 + 0x28 ], %l5
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++)
2007ab0: e6 05 00 00 ld [ %l4 ], %l3
2007ab4: 80 a4 e0 00 cmp %l3, 0
2007ab8: 02 80 00 0a be 2007ae0 <rtems_fdisk_initialize+0x2d4> <== NEVER TAKEN
2007abc: a4 10 20 00 clr %l2
2007ac0: c4 05 20 04 ld [ %l4 + 4 ], %g2
2007ac4: 82 10 20 00 clr %g1
count += dd->segments[segment].count;
2007ac8: c6 10 80 00 lduh [ %g2 ], %g3
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++)
2007acc: 82 00 60 01 inc %g1
count += dd->segments[segment].count;
2007ad0: a4 04 80 03 add %l2, %g3, %l2
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++)
2007ad4: 80 a0 40 13 cmp %g1, %l3
2007ad8: 12 bf ff fc bne 2007ac8 <rtems_fdisk_initialize+0x2bc> <== NEVER TAKEN
2007adc: 84 00 a0 0c add %g2, 0xc, %g2
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
2007ae0: 90 10 00 12 mov %l2, %o0
2007ae4: 40 00 02 9d call 2008558 <calloc>
2007ae8: 92 10 20 30 mov 0x30, %o1
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
2007aec: 80 a2 20 00 cmp %o0, 0
2007af0: 02 80 00 36 be 2007bc8 <rtems_fdisk_initialize+0x3bc> <== NEVER TAKEN
2007af4: d0 25 40 00 st %o0, [ %l5 ]
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
2007af8: 80 a4 e0 00 cmp %l3, 0
2007afc: 22 80 00 1a be,a 2007b64 <rtems_fdisk_initialize+0x358> <== NEVER TAKEN
2007b00: e8 25 60 08 st %l4, [ %l5 + 8 ] <== NOT EXECUTED
rtems_disk_delete (dev);
rtems_semaphore_delete (fd->lock);
free (fd->copy_buffer);
free (fd->blocks);
free (fd->devices);
return RTEMS_NO_MEMORY;
2007b04: c8 05 20 04 ld [ %l4 + 4 ], %g4
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
2007b08: 9e 10 20 00 clr %o7
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++)
2007b0c: c6 11 00 00 lduh [ %g4 ], %g3
2007b10: 80 a0 e0 00 cmp %g3, 0
2007b14: 02 80 00 0f be 2007b50 <rtems_fdisk_initialize+0x344> <== NEVER TAKEN
2007b18: 82 10 00 08 mov %o0, %g1
2007b1c: 84 10 20 00 clr %g2
{
sc->descriptor = sd;
sc->device = device;
sc->segment = seg_segment;
2007b20: c4 20 60 0c st %g2, [ %g1 + 0xc ]
sd = &c->devices[device].segments[segment];
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
{
sc->descriptor = sd;
2007b24: c8 20 60 04 st %g4, [ %g1 + 4 ]
sc->device = device;
2007b28: f0 20 60 08 st %i0, [ %g1 + 8 ]
sc->segment = seg_segment;
sc->erased = 0;
2007b2c: c0 20 60 2c clr [ %g1 + 0x2c ]
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++)
2007b30: 84 00 a0 01 inc %g2
2007b34: 80 a0 80 03 cmp %g2, %g3
2007b38: 0a bf ff fa bcs 2007b20 <rtems_fdisk_initialize+0x314>
2007b3c: 82 00 60 30 add %g1, 0x30, %g1
* @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,
2007b40: 83 28 e0 04 sll %g3, 4, %g1
2007b44: 87 28 e0 06 sll %g3, 6, %g3
2007b48: 86 20 c0 01 sub %g3, %g1, %g3
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++)
2007b4c: 90 02 00 03 add %o0, %g3, %o0
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
2007b50: 9e 03 e0 01 inc %o7
2007b54: 80 a3 c0 13 cmp %o7, %l3
2007b58: 12 bf ff ed bne 2007b0c <rtems_fdisk_initialize+0x300> <== NEVER TAKEN
2007b5c: 88 01 20 0c add %g4, 0xc, %g4
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
2007b60: e8 25 60 08 st %l4, [ %l5 + 8 ]
sc->segment = seg_segment;
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
2007b64: e4 25 60 04 st %l2, [ %l5 + 4 ]
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
2007b68: b0 06 20 01 inc %i0
2007b6c: a8 05 20 0c add %l4, 0xc, %l4
2007b70: 80 a6 00 16 cmp %i0, %l6
2007b74: 12 bf ff cf bne 2007ab0 <rtems_fdisk_initialize+0x2a4> <== NEVER TAKEN
2007b78: aa 05 60 0c add %l5, 0xc, %l5
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
}
fd->device_count = c->device_count;
2007b7c: ec 27 60 2c st %l6, [ %i5 + 0x2c ]
ret = rtems_fdisk_recover_block_mappings (fd);
2007b80: 7f ff f9 30 call 2006040 <rtems_fdisk_recover_block_mappings>
2007b84: 90 10 00 1d mov %i5, %o0
if (ret)
2007b88: b0 92 20 00 orcc %o0, 0, %i0
2007b8c: 12 80 00 36 bne 2007c64 <rtems_fdisk_initialize+0x458> <== NEVER TAKEN
2007b90: 92 10 00 1b mov %i3, %o1
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
strerror (ret), ret);
return ret;
}
ret = rtems_fdisk_compact (fd);
2007b94: 7f ff f8 85 call 2005da8 <rtems_fdisk_compact>
2007b98: 90 10 00 1d mov %i5, %o0
if (ret)
2007b9c: b0 92 20 00 orcc %o0, 0, %i0
2007ba0: 12 80 00 1e bne 2007c18 <rtems_fdisk_initialize+0x40c> <== NEVER TAKEN
2007ba4: 92 10 00 1b mov %i3, %o1
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
2007ba8: fa 04 21 34 ld [ %l0 + 0x134 ], %i5
2007bac: b6 06 e0 01 inc %i3
2007bb0: 80 a7 40 1b cmp %i5, %i3
2007bb4: 08 80 00 15 bleu 2007c08 <rtems_fdisk_initialize+0x3fc> <== ALWAYS TAKEN
2007bb8: b2 06 60 70 add %i1, 0x70, %i1
2007bbc: b8 07 20 20 add %i4, 0x20, %i4 <== NOT EXECUTED
2007bc0: 10 bf ff 47 b 20078dc <rtems_fdisk_initialize+0xd0> <== NOT EXECUTED
2007bc4: d0 04 60 9c ld [ %l1 + 0x9c ], %o0 <== NOT EXECUTED
fd->devices[device].segments = calloc (segment_count,
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
{
rtems_disk_delete (dev);
2007bc8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2007bcc: 7f ff f3 59 call 2004930 <rtems_disk_delete> <== NOT EXECUTED
2007bd0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
2007bd4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
2007bd8: 40 00 17 0c call 200d808 <rtems_semaphore_delete> <== NOT EXECUTED
2007bdc: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED
free (fd->copy_buffer);
2007be0: 40 00 03 5b call 200894c <free> <== NOT EXECUTED
2007be4: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
free (fd->blocks);
2007be8: 40 00 03 59 call 200894c <free> <== NOT EXECUTED
2007bec: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
free (fd->devices);
2007bf0: 40 00 03 57 call 200894c <free> <== NOT EXECUTED
2007bf4: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
2007bf8: 81 c7 e0 08 ret <== NOT EXECUTED
2007bfc: 81 e8 00 00 restore <== NOT EXECUTED
if (!fd->copy_buffer)
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
if (!fd->blocks)
return RTEMS_NO_MEMORY;
2007c00: 81 c7 e0 08 ret <== NOT EXECUTED
2007c04: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED
strerror (ret), ret);
return ret;
}
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
2007c08: 03 00 81 1d sethi %hi(0x2047400), %g1
2007c0c: fa 20 60 a0 st %i5, [ %g1 + 0xa0 ] ! 20474a0 <rtems_flashdisk_count>
return RTEMS_SUCCESSFUL;
2007c10: 81 c7 e0 08 ret
2007c14: 91 e8 20 00 restore %g0, 0, %o0
}
ret = rtems_fdisk_compact (fd);
if (ret)
{
rtems_disk_delete (dev);
2007c18: 7f ff f3 46 call 2004930 <rtems_disk_delete> <== NOT EXECUTED
2007c1c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
2007c20: 40 00 16 fa call 200d808 <rtems_semaphore_delete> <== NOT EXECUTED
2007c24: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
free (fd->copy_buffer);
2007c28: 40 00 03 49 call 200894c <free> <== NOT EXECUTED
2007c2c: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
free (fd->blocks);
2007c30: 40 00 03 47 call 200894c <free> <== NOT EXECUTED
2007c34: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
free (fd->devices);
2007c38: 40 00 03 45 call 200894c <free> <== NOT EXECUTED
2007c3c: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
rtems_fdisk_error ("compacting of disk failed: %s (%d)",
2007c40: 40 00 71 9e call 20242b8 <strerror> <== NOT EXECUTED
2007c44: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2007c48: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
2007c4c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2007c50: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
2007c54: 7f ff f6 03 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007c58: 90 12 21 78 or %o0, 0x178, %o0 ! 2032978 <__FUNCTION__.6882+0x1098><== NOT EXECUTED
strerror (ret), ret);
return ret;
2007c5c: 81 c7 e0 08 ret <== NOT EXECUTED
2007c60: 81 e8 00 00 restore <== NOT EXECUTED
fd->device_count = c->device_count;
ret = rtems_fdisk_recover_block_mappings (fd);
if (ret)
{
rtems_disk_delete (dev);
2007c64: 7f ff f3 33 call 2004930 <rtems_disk_delete> <== NOT EXECUTED
2007c68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
2007c6c: 40 00 16 e7 call 200d808 <rtems_semaphore_delete> <== NOT EXECUTED
2007c70: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
free (fd->copy_buffer);
2007c74: 40 00 03 36 call 200894c <free> <== NOT EXECUTED
2007c78: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
free (fd->blocks);
2007c7c: 40 00 03 34 call 200894c <free> <== NOT EXECUTED
2007c80: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
free (fd->devices);
2007c84: 40 00 03 32 call 200894c <free> <== NOT EXECUTED
2007c88: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
2007c8c: 40 00 71 8b call 20242b8 <strerror> <== NOT EXECUTED
2007c90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2007c94: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
2007c98: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2007c9c: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
2007ca0: 7f ff f5 f0 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007ca4: 90 12 21 50 or %o0, 0x150, %o0 ! 2032950 <__FUNCTION__.6882+0x1070><== NOT EXECUTED
strerror (ret), ret);
return ret;
2007ca8: 81 c7 e0 08 ret <== NOT EXECUTED
2007cac: 81 e8 00 00 restore <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size,
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_semaphore_delete (fd->lock);
2007cb0: 40 00 16 d6 call 200d808 <rtems_semaphore_delete> <== NOT EXECUTED
2007cb4: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
rtems_disk_delete (dev);
2007cb8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2007cbc: 7f ff f3 1d call 2004930 <rtems_disk_delete> <== NOT EXECUTED
2007cc0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
free (fd->copy_buffer);
2007cc4: 40 00 03 22 call 200894c <free> <== NOT EXECUTED
2007cc8: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
free (fd->blocks);
2007ccc: 40 00 03 20 call 200894c <free> <== NOT EXECUTED
2007cd0: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
free (fd->devices);
2007cd4: 40 00 03 1e call 200894c <free> <== NOT EXECUTED
2007cd8: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
rtems_fdisk_error ("disk create phy failed");
2007cdc: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
2007ce0: 7f ff f5 e0 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007ce4: 90 12 21 38 or %o0, 0x138, %o0 ! 2032938 <__FUNCTION__.6882+0x1058><== NOT EXECUTED
return sc;
2007ce8: 81 c7 e0 08 ret <== NOT EXECUTED
2007cec: 81 e8 00 00 restore <== NOT EXECUTED
2007cf0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &fd->lock);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_fdisk_error ("disk lock create failed");
2007cf4: 11 00 80 ca sethi %hi(0x2032800), %o0 <== NOT EXECUTED
2007cf8: 7f ff f5 da call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007cfc: 90 12 21 20 or %o0, 0x120, %o0 ! 2032920 <__FUNCTION__.6882+0x1040><== NOT EXECUTED
free (fd->copy_buffer);
2007d00: d0 07 60 64 ld [ %i5 + 0x64 ], %o0 <== NOT EXECUTED
2007d04: 40 00 03 12 call 200894c <free> <== NOT EXECUTED
2007d08: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED
free (fd->blocks);
2007d0c: 40 00 03 10 call 200894c <free> <== NOT EXECUTED
2007d10: d0 07 60 18 ld [ %i5 + 0x18 ], %o0 <== NOT EXECUTED
free (fd->devices);
2007d14: 40 00 03 0e call 200894c <free> <== NOT EXECUTED
2007d18: d0 07 60 28 ld [ %i5 + 0x28 ], %o0 <== NOT EXECUTED
return sc;
2007d1c: 81 c7 e0 08 ret <== NOT EXECUTED
2007d20: 81 e8 00 00 restore <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
2007d24: 81 c7 e0 08 ret <== NOT EXECUTED
2007d28: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED
02006408 <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)
{
2006408: 9d e3 bf 48 save %sp, -184, %sp
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;
200640c: 40 00 6f 1f call 2022088 <__errno>
2006410: f6 06 20 04 ld [ %i0 + 4 ], %i3
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
2006414: 39 00 81 1d sethi %hi(0x2047400), %i4
2006418: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 ! 204749c <rtems_flashdisks>
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;
200641c: c0 22 00 00 clr [ %o0 ]
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
2006420: 85 2e e0 04 sll %i3, 4, %g2
2006424: bb 2e e0 07 sll %i3, 7, %i5
2006428: ba 27 40 02 sub %i5, %g2, %i5
200642c: 82 00 40 1d add %g1, %i5, %g1
2006430: d0 00 60 60 ld [ %g1 + 0x60 ], %o0
2006434: 92 10 20 00 clr %o1
2006438: 40 00 1d 2b call 200d8e4 <rtems_semaphore_obtain>
200643c: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2006440: 80 a2 20 00 cmp %o0, 0
2006444: 12 80 00 36 bne 200651c <rtems_fdisk_ioctl+0x114> <== NEVER TAKEN
2006448: 01 00 00 00 nop
errno = EIO;
else
{
errno = 0;
200644c: 40 00 6f 0f call 2022088 <__errno>
2006450: 01 00 00 00 nop
switch (req)
2006454: 03 08 00 10 sethi %hi(0x20004000), %g1
2006458: 84 10 62 83 or %g1, 0x283, %g2 ! 20004283 <RAM_END+0x1dc04283>
200645c: 80 a6 40 02 cmp %i1, %g2
2006460: 02 80 00 5b be 20065cc <rtems_fdisk_ioctl+0x1c4> <== NEVER TAKEN
2006464: c0 22 00 00 clr [ %o0 ]
2006468: 80 a6 40 02 cmp %i1, %g2
200646c: 38 80 00 37 bgu,a 2006548 <rtems_fdisk_ioctl+0x140>
2006470: 82 10 62 85 or %g1, 0x285, %g1
2006474: 84 10 62 81 or %g1, 0x281, %g2
2006478: 80 a6 40 02 cmp %i1, %g2
200647c: 02 80 00 da be 20067e4 <rtems_fdisk_ioctl+0x3dc> <== NEVER TAKEN
2006480: 01 00 00 00 nop
2006484: 08 80 00 cb bleu 20067b0 <rtems_fdisk_ioctl+0x3a8> <== ALWAYS TAKEN
2006488: 82 10 62 80 or %g1, 0x280, %g1
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]);
200648c: 40 00 6e ff call 2022088 <__errno> <== NOT EXECUTED
2006490: b4 10 20 00 clr %i2 <== NOT EXECUTED
2006494: f6 07 20 9c ld [ %i4 + 0x9c ], %i3 <== NOT EXECUTED
2006498: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
200649c: b6 06 c0 1d add %i3, %i5, %i3 <== NOT EXECUTED
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
20064a0: c2 06 e0 48 ld [ %i3 + 0x48 ], %g1 <== NOT EXECUTED
20064a4: 92 90 60 00 orcc %g1, 0, %o1 <== NOT EXECUTED
20064a8: 02 80 00 15 be 20064fc <rtems_fdisk_ioctl+0xf4> <== NOT EXECUTED
20064ac: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
20064b0: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED
if (!queue->head)
20064b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20064b8: 02 80 01 06 be 20068d0 <rtems_fdisk_ioctl+0x4c8> <== NOT EXECUTED
20064bc: c4 26 e0 48 st %g2, [ %i3 + 0x48 ] <== NOT EXECUTED
queue->tail = 0;
queue->count--;
20064c0: c4 06 e0 50 ld [ %i3 + 0x50 ], %g2 <== NOT EXECUTED
20064c4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
20064c8: c4 26 e0 50 st %g2, [ %i3 + 0x50 ] <== NOT EXECUTED
{
/*
* The segment will either end up on the available queue or
* the failed queue.
*/
int ret = rtems_fdisk_erase_segment (fd, sc);
20064cc: 7f ff fc 04 call 20054dc <rtems_fdisk_erase_segment> <== NOT EXECUTED
20064d0: c0 20 40 00 clr [ %g1 ] <== NOT EXECUTED
if (ret && !latched_ret)
20064d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20064d8: 02 bf ff f3 be 20064a4 <rtems_fdisk_ioctl+0x9c> <== NOT EXECUTED
20064dc: c2 06 e0 48 ld [ %i3 + 0x48 ], %g1 <== NOT EXECUTED
20064e0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
20064e4: 12 bf ff f0 bne 20064a4 <rtems_fdisk_ioctl+0x9c> <== NOT EXECUTED
20064e8: 01 00 00 00 nop <== NOT EXECUTED
20064ec: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
20064f0: 92 90 60 00 orcc %g1, 0, %o1 <== NOT EXECUTED
20064f4: 12 bf ff ef bne 20064b0 <rtems_fdisk_ioctl+0xa8> <== NOT EXECUTED
20064f8: 90 10 00 1b mov %i3, %o0 <== 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]);
20064fc: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
2006500: f4 26 40 00 st %i2, [ %i1 ] <== NOT EXECUTED
2006504: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
default:
rtems_blkdev_ioctl (dd, req, argp);
break;
}
sc = rtems_semaphore_release (rtems_flashdisks[minor].lock);
2006508: 40 00 1d 41 call 200da0c <rtems_semaphore_release> <== NOT EXECUTED
200650c: d0 07 60 60 ld [ %i5 + 0x60 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2006510: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2006514: 02 80 00 06 be 200652c <rtems_fdisk_ioctl+0x124> <== NOT EXECUTED
2006518: 01 00 00 00 nop <== NOT EXECUTED
errno = EIO;
200651c: 40 00 6e db call 2022088 <__errno> <== NOT EXECUTED
2006520: 01 00 00 00 nop <== NOT EXECUTED
2006524: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
2006528: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
200652c: 40 00 6e d7 call 2022088 <__errno> <== NOT EXECUTED
2006530: 01 00 00 00 nop <== NOT EXECUTED
2006534: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
}
2006538: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
200653c: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED
2006540: 81 c7 e0 08 ret <== NOT EXECUTED
2006544: 81 e8 00 00 restore <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
switch (req)
2006548: 80 a6 40 01 cmp %i1, %g1
200654c: 02 80 00 e3 be 20068d8 <rtems_fdisk_ioctl+0x4d0>
2006550: 01 00 00 00 nop
2006554: 0a 80 00 a1 bcs 20067d8 <rtems_fdisk_ioctl+0x3d0> <== NEVER TAKEN
2006558: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
200655c: 03 30 06 10 sethi %hi(0xc0184000), %g1
2006560: 82 10 62 01 or %g1, 0x201, %g1 ! c0184201 <RAM_END+0xbdd84201>
2006564: 80 a6 40 01 cmp %i1, %g1
2006568: 12 80 00 96 bne 20067c0 <rtems_fdisk_ioctl+0x3b8>
200656c: 90 10 00 18 mov %i0, %o0
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
2006570: 03 00 81 1d sethi %hi(0x2047400), %g1
2006574: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 20474a0 <rtems_flashdisk_count>
2006578: 80 a0 40 1b cmp %g1, %i3
200657c: 08 80 02 04 bleu 2006d8c <rtems_fdisk_ioctl+0x984> <== NEVER TAKEN
2006580: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
(rtems_flashdisks[minor].device_count == 0))
2006584: 82 00 40 1d add %g1, %i5, %g1
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
2006588: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
200658c: 80 a0 60 00 cmp %g1, 0
2006590: 02 80 01 ff be 2006d8c <rtems_fdisk_ioctl+0x984> <== NEVER TAKEN
2006594: 01 00 00 00 nop
{
errno = ENODEV;
}
else
{
switch (r->req)
2006598: c2 06 80 00 ld [ %i2 ], %g1
200659c: 80 a0 60 00 cmp %g1, 0
20065a0: 02 80 02 05 be 2006db4 <rtems_fdisk_ioctl+0x9ac>
20065a4: 80 a0 60 01 cmp %g1, 1
20065a8: 02 80 02 e5 be 200713c <rtems_fdisk_ioctl+0xd34> <== ALWAYS TAKEN
20065ac: 01 00 00 00 nop
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
break;
default:
errno = EINVAL;
20065b0: 40 00 6e b6 call 2022088 <__errno> <== NOT EXECUTED
20065b4: 01 00 00 00 nop <== NOT EXECUTED
20065b8: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
20065bc: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
20065c0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
break;
20065c4: 10 80 00 6f b 2006780 <rtems_fdisk_ioctl+0x378> <== NOT EXECUTED
20065c8: c2 22 00 00 st %g1, [ %o0 ] <== 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],
20065cc: 40 00 6e af call 2022088 <__errno> <== NOT EXECUTED
20065d0: 01 00 00 00 nop <== NOT EXECUTED
20065d4: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
20065d8: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
data->block_count = fd->block_count;
20065dc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 <== NOT EXECUTED
rtems_fdisk_monitor_data* data)
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
20065e0: c6 07 60 14 ld [ %i5 + 0x14 ], %g3 <== NOT EXECUTED
data->block_count = fd->block_count;
data->unavail_blocks = fd->unavail_blocks;
20065e4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1 <== NOT EXECUTED
data->device_count = fd->device_count;
20065e8: e6 07 60 2c ld [ %i5 + 0x2c ], %l3 <== NOT EXECUTED
rtems_fdisk_monitor_data* data)
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
20065ec: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED
data->block_count = fd->block_count;
20065f0: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED
data->unavail_blocks = fd->unavail_blocks;
20065f4: c2 26 a0 08 st %g1, [ %i2 + 8 ] <== NOT EXECUTED
data->device_count = fd->device_count;
20065f8: e6 26 a0 0c st %l3, [ %i2 + 0xc ] <== NOT EXECUTED
data->blocks_used = 0;
for (i = 0; i < fd->block_count; i++)
20065fc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2006600: 02 80 00 0f be 200663c <rtems_fdisk_ioctl+0x234> <== NOT EXECUTED
2006604: c0 26 a0 18 clr [ %i2 + 0x18 ] <== NOT EXECUTED
2006608: c6 07 60 18 ld [ %i5 + 0x18 ], %g3 <== NOT EXECUTED
200660c: 82 10 20 00 clr %g1 <== 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)
2006610: 89 28 60 03 sll %g1, 3, %g4 <== 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++)
if (fd->blocks[i].segment)
2006614: c8 00 c0 04 ld [ %g3 + %g4 ], %g4 <== NOT EXECUTED
2006618: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
200661c: 02 80 00 05 be 2006630 <rtems_fdisk_ioctl+0x228> <== NOT EXECUTED
2006620: 82 00 60 01 inc %g1 <== NOT EXECUTED
data->blocks_used++;
2006624: c8 06 a0 18 ld [ %i2 + 0x18 ], %g4 <== NOT EXECUTED
2006628: 88 01 20 01 inc %g4 <== NOT EXECUTED
200662c: c8 26 a0 18 st %g4, [ %i2 + 0x18 ] <== 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++)
2006630: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2006634: 12 bf ff f8 bne 2006614 <rtems_fdisk_ioctl+0x20c> <== NOT EXECUTED
2006638: 89 28 60 03 sll %g1, 3, %g4 <== NOT EXECUTED
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
200663c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
uint32_t count = 0;
while (sc)
2006640: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006644: 02 80 00 06 be 200665c <rtems_fdisk_ioctl+0x254> <== NOT EXECUTED
2006648: 84 10 20 00 clr %g2 <== NOT EXECUTED
{
count++;
sc = sc->next;
200664c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006650: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006654: 12 bf ff fe bne 200664c <rtems_fdisk_ioctl+0x244> <== NOT EXECUTED
2006658: 84 00 a0 01 inc %g2 <== NOT EXECUTED
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
200665c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
data->blocks_used = 0;
for (i = 0; i < fd->block_count; i++)
if (fd->blocks[i].segment)
data->blocks_used++;
data->segs_available = rtems_fdisk_segment_count_queue (&fd->available);
2006660: c4 26 a0 1c st %g2, [ %i2 + 0x1c ] <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006668: 02 80 00 06 be 2006680 <rtems_fdisk_ioctl+0x278> <== NOT EXECUTED
200666c: 84 10 20 00 clr %g2 <== NOT EXECUTED
{
count++;
sc = sc->next;
2006670: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006674: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006678: 12 bf ff fe bne 2006670 <rtems_fdisk_ioctl+0x268> <== NOT EXECUTED
200667c: 84 00 a0 01 inc %g2 <== NOT EXECUTED
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
2006680: c2 07 60 54 ld [ %i5 + 0x54 ], %g1 <== NOT EXECUTED
for (i = 0; i < fd->block_count; i++)
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);
2006684: c4 26 a0 20 st %g2, [ %i2 + 0x20 ] <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006688: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200668c: 02 80 00 06 be 20066a4 <rtems_fdisk_ioctl+0x29c> <== NOT EXECUTED
2006690: 84 10 20 00 clr %g2 <== NOT EXECUTED
{
count++;
sc = sc->next;
2006694: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006698: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200669c: 12 bf ff fe bne 2006694 <rtems_fdisk_ioctl+0x28c> <== NOT EXECUTED
20066a0: 84 00 a0 01 inc %g2 <== 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);
20066a4: c4 26 a0 24 st %g2, [ %i2 + 0x24 ] <== NOT EXECUTED
data->segment_count = 0;
20066a8: c0 26 a0 10 clr [ %i2 + 0x10 ] <== NOT EXECUTED
data->page_count = 0;
20066ac: c0 26 a0 14 clr [ %i2 + 0x14 ] <== NOT EXECUTED
data->pages_desc = 0;
20066b0: c0 26 a0 2c clr [ %i2 + 0x2c ] <== NOT EXECUTED
data->pages_active = 0;
20066b4: c0 26 a0 30 clr [ %i2 + 0x30 ] <== NOT EXECUTED
data->pages_used = 0;
20066b8: c0 26 a0 34 clr [ %i2 + 0x34 ] <== NOT EXECUTED
data->pages_bad = 0;
20066bc: c0 26 a0 38 clr [ %i2 + 0x38 ] <== NOT EXECUTED
data->seg_erases = 0;
for (i = 0; i < fd->device_count; i++)
20066c0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
20066c4: 02 80 00 2c be 2006774 <rtems_fdisk_ioctl+0x36c> <== NOT EXECUTED
20066c8: c0 26 a0 28 clr [ %i2 + 0x28 ] <== NOT EXECUTED
20066cc: e2 07 60 28 ld [ %i5 + 0x28 ], %l1 <== NOT EXECUTED
20066d0: a4 10 20 00 clr %l2 <== NOT EXECUTED
20066d4: a8 10 20 00 clr %l4 <== NOT EXECUTED
{
data->segment_count += fd->devices[i].segment_count;
20066d8: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
20066dc: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
20066e0: 02 80 00 20 be 2006760 <rtems_fdisk_ioctl+0x358> <== NOT EXECUTED
20066e4: a4 04 80 10 add %l2, %l0, %l2 <== NOT EXECUTED
20066e8: f0 06 a0 14 ld [ %i2 + 0x14 ], %i0 <== NOT EXECUTED
20066ec: f2 06 a0 2c ld [ %i2 + 0x2c ], %i1 <== NOT EXECUTED
20066f0: f6 06 a0 30 ld [ %i2 + 0x30 ], %i3 <== NOT EXECUTED
20066f4: f8 06 a0 34 ld [ %i2 + 0x34 ], %i4 <== NOT EXECUTED
20066f8: c8 06 a0 38 ld [ %i2 + 0x38 ], %g4 <== NOT EXECUTED
20066fc: c6 06 a0 28 ld [ %i2 + 0x28 ], %g3 <== NOT EXECUTED
2006700: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
2006704: 84 10 20 00 clr %g2 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
2006708: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 <== NOT EXECUTED
data->pages_desc += sc->pages_desc;
200670c: d4 00 60 18 ld [ %g1 + 0x18 ], %o2 <== NOT EXECUTED
data->pages_active += sc->pages_active;
2006710: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 <== NOT EXECUTED
data->pages_used += sc->pages_used;
2006714: d8 00 60 20 ld [ %g1 + 0x20 ], %o4 <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
2006718: da 00 60 24 ld [ %g1 + 0x24 ], %o5 <== NOT EXECUTED
data->seg_erases += sc->erased;
200671c: de 00 60 2c ld [ %g1 + 0x2c ], %o7 <== 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++)
2006720: 84 00 a0 01 inc %g2 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
2006724: b0 06 00 09 add %i0, %o1, %i0 <== NOT EXECUTED
data->pages_desc += sc->pages_desc;
2006728: b2 06 40 0a add %i1, %o2, %i1 <== NOT EXECUTED
data->pages_active += sc->pages_active;
200672c: b6 06 c0 0b add %i3, %o3, %i3 <== NOT EXECUTED
data->pages_used += sc->pages_used;
2006730: b8 07 00 0c add %i4, %o4, %i4 <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
2006734: 88 01 00 0d add %g4, %o5, %g4 <== NOT EXECUTED
data->seg_erases += sc->erased;
2006738: 86 00 c0 0f add %g3, %o7, %g3 <== 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++)
200673c: 80 a0 80 10 cmp %g2, %l0 <== NOT EXECUTED
2006740: 12 bf ff f2 bne 2006708 <rtems_fdisk_ioctl+0x300> <== NOT EXECUTED
2006744: 82 00 60 30 add %g1, 0x30, %g1 <== NOT EXECUTED
2006748: f0 26 a0 14 st %i0, [ %i2 + 0x14 ] <== NOT EXECUTED
200674c: f2 26 a0 2c st %i1, [ %i2 + 0x2c ] <== NOT EXECUTED
2006750: f6 26 a0 30 st %i3, [ %i2 + 0x30 ] <== NOT EXECUTED
2006754: f8 26 a0 34 st %i4, [ %i2 + 0x34 ] <== NOT EXECUTED
2006758: c8 26 a0 38 st %g4, [ %i2 + 0x38 ] <== NOT EXECUTED
200675c: c6 26 a0 28 st %g3, [ %i2 + 0x28 ] <== 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++)
2006760: a8 05 20 01 inc %l4 <== NOT EXECUTED
2006764: 80 a5 00 13 cmp %l4, %l3 <== NOT EXECUTED
2006768: 12 bf ff dc bne 20066d8 <rtems_fdisk_ioctl+0x2d0> <== NOT EXECUTED
200676c: a2 04 60 0c add %l1, 0xc, %l1 <== NOT EXECUTED
2006770: e4 26 a0 10 st %l2, [ %i2 + 0x10 ] <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
data->seg_erases += sc->erased;
}
}
data->info_level = fd->info_level;
2006774: c2 07 60 68 ld [ %i5 + 0x68 ], %g1 <== NOT EXECUTED
2006778: c2 26 a0 3c st %g1, [ %i2 + 0x3c ] <== 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],
200677c: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED
default:
rtems_blkdev_ioctl (dd, req, argp);
break;
}
sc = rtems_semaphore_release (rtems_flashdisks[minor].lock);
2006780: 40 00 1c a3 call 200da0c <rtems_semaphore_release>
2006784: d0 07 60 60 ld [ %i5 + 0x60 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2006788: 80 a2 20 00 cmp %o0, 0
200678c: 12 bf ff 64 bne 200651c <rtems_fdisk_ioctl+0x114> <== NEVER TAKEN
2006790: 01 00 00 00 nop
errno = EIO;
}
return errno == 0 ? 0 : -1;
2006794: 40 00 6e 3d call 2022088 <__errno>
2006798: 01 00 00 00 nop
200679c: c2 02 00 00 ld [ %o0 ], %g1
}
20067a0: 80 a0 00 01 cmp %g0, %g1
20067a4: b0 60 20 00 subx %g0, 0, %i0
20067a8: 81 c7 e0 08 ret
20067ac: 81 e8 00 00 restore
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
switch (req)
20067b0: 80 a6 40 01 cmp %i1, %g1
20067b4: 02 80 00 16 be 200680c <rtems_fdisk_ioctl+0x404> <== NEVER TAKEN
20067b8: 01 00 00 00 nop
case RTEMS_FDISK_IOCTL_PRINT_STATUS:
errno = rtems_fdisk_print_status (&rtems_flashdisks[minor]);
break;
default:
rtems_blkdev_ioctl (dd, req, argp);
20067bc: 90 10 00 18 mov %i0, %o0
20067c0: 92 10 00 19 mov %i1, %o1
20067c4: 40 00 42 dc call 2017334 <rtems_blkdev_ioctl>
20067c8: 94 10 00 1a mov %i2, %o2
20067cc: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
break;
20067d0: 10 bf ff ec b 2006780 <rtems_fdisk_ioctl+0x378>
20067d4: ba 00 40 1d add %g1, %i5, %i5
errno = rtems_fdisk_monitoring_data (&rtems_flashdisks[minor],
(rtems_fdisk_monitor_data*) argp);
break;
case RTEMS_FDISK_IOCTL_INFO_LEVEL:
rtems_flashdisks[minor].info_level = (uintptr_t) argp;
20067d8: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
break;
20067dc: 10 bf ff e9 b 2006780 <rtems_fdisk_ioctl+0x378> <== NOT EXECUTED
20067e0: f4 27 60 68 st %i2, [ %i5 + 0x68 ] <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
break;
case RTEMS_FDISK_IOCTL_COMPACT:
errno = rtems_fdisk_compact (&rtems_flashdisks[minor]);
20067e4: 40 00 6e 29 call 2022088 <__errno> <== NOT EXECUTED
20067e8: 01 00 00 00 nop <== NOT EXECUTED
20067ec: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
20067f0: d0 07 20 9c ld [ %i4 + 0x9c ], %o0 <== NOT EXECUTED
20067f4: 7f ff fd 6d call 2005da8 <rtems_fdisk_compact> <== NOT EXECUTED
20067f8: 90 02 00 1d add %o0, %i5, %o0 <== NOT EXECUTED
20067fc: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
2006800: d0 26 c0 00 st %o0, [ %i3 ] <== NOT EXECUTED
break;
2006804: 10 bf ff df b 2006780 <rtems_fdisk_ioctl+0x378> <== NOT EXECUTED
2006808: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
200680c: 40 00 6e 1f call 2022088 <__errno> <== NOT EXECUTED
2006810: 01 00 00 00 nop <== NOT EXECUTED
2006814: f6 07 20 9c ld [ %i4 + 0x9c ], %i3 <== NOT EXECUTED
2006818: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200681c: b6 06 c0 1d add %i3, %i5, %i3 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
2006820: 13 00 80 c9 sethi %hi(0x2032400), %o1 <== NOT EXECUTED
2006824: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2006828: 7f ff fa 12 call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
200682c: 92 12 63 28 or %o1, 0x328, %o1 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
2006830: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1 <== NOT EXECUTED
2006834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006838: 02 80 00 22 be 20068c0 <rtems_fdisk_ioctl+0x4b8> <== NOT EXECUTED
200683c: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
2006840: 23 00 80 c9 sethi %hi(0x2032400), %l1 <== 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);
2006844: 21 00 80 c9 sethi %hi(0x2032400), %l0 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
2006848: b2 10 20 00 clr %i1 <== NOT EXECUTED
200684c: b4 10 20 00 clr %i2 <== NOT EXECUTED
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
2006850: a2 14 63 38 or %l1, 0x338, %l1 <== 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);
2006854: 10 80 00 06 b 200686c <rtems_fdisk_ioctl+0x464> <== NOT EXECUTED
2006858: a0 14 23 50 or %l0, 0x350, %l0 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
200685c: b4 06 a0 01 inc %i2 <== NOT EXECUTED
2006860: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
2006864: 1a 80 02 1a bcc 20070cc <rtems_fdisk_ioctl+0xcc4> <== NOT EXECUTED
2006868: b2 06 60 0c add %i1, 0xc, %i1 <== NOT EXECUTED
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
200686c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2006870: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
2006874: 7f ff f9 ff call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
2006878: 90 10 00 1b mov %i3, %o0 <== 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;
200687c: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1 <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
2006880: 94 10 00 1a mov %i2, %o2 <== 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;
2006884: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED
2006888: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
200688c: 92 10 00 10 mov %l0, %o1 <== 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;
2006890: e4 00 60 08 ld [ %g1 + 8 ], %l2 <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
2006894: 7f ff fa 19 call 20050f8 <rtems_fdisk_printf> <== NOT EXECUTED
2006898: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
#endif
return ops->erase_device (fd->devices[device].descriptor, device);
200689c: c4 06 e0 28 ld [ %i3 + 0x28 ], %g2 <== NOT EXECUTED
20068a0: c2 04 a0 14 ld [ %l2 + 0x14 ], %g1 <== NOT EXECUTED
20068a4: 84 00 80 19 add %g2, %i1, %g2 <== NOT EXECUTED
20068a8: d0 00 a0 08 ld [ %g2 + 8 ], %o0 <== NOT EXECUTED
20068ac: 9f c0 40 00 call %g1 <== NOT EXECUTED
20068b0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
rtems_fdisk_info (fd, " erase-flash:%02d", device);
#endif
ret = rtems_fdisk_device_erase (fd, device);
if (ret != 0)
20068b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20068b8: 22 bf ff e9 be,a 200685c <rtems_fdisk_ioctl+0x454> <== NOT EXECUTED
20068bc: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
20068c0: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
20068c4: d0 26 00 00 st %o0, [ %i0 ] <== NOT EXECUTED
break;
20068c8: 10 bf ff ae b 2006780 <rtems_fdisk_ioctl+0x378> <== NOT EXECUTED
20068cc: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
if (!queue->head)
queue->tail = 0;
20068d0: 10 bf fe fc b 20064c0 <rtems_fdisk_ioctl+0xb8> <== NOT EXECUTED
20068d4: c0 26 e0 4c clr [ %i3 + 0x4c ] <== NOT EXECUTED
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]);
20068d8: 40 00 6d ec call 2022088 <__errno>
20068dc: b4 10 20 00 clr %i2
20068e0: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
20068e4: d0 27 bf ec st %o0, [ %fp + -20 ]
20068e8: b6 00 40 1d add %g1, %i5, %i3
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
20068ec: d4 00 40 1d ld [ %g1 + %i5 ], %o2
*/
static int
rtems_fdisk_print_status (rtems_flashdisk* fd)
{
#if RTEMS_FDISK_TRACE
uint32_t current_info_level = fd->info_level;
20068f0: c6 06 e0 68 ld [ %i3 + 0x68 ], %g3
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
20068f4: d6 06 e0 04 ld [ %i3 + 4 ], %o3
uint32_t current_info_level = fd->info_level;
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
20068f8: 82 10 20 03 mov 3, %g1
*/
static int
rtems_fdisk_print_status (rtems_flashdisk* fd)
{
#if RTEMS_FDISK_TRACE
uint32_t current_info_level = fd->info_level;
20068fc: c6 27 bf e8 st %g3, [ %fp + -24 ]
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
2006900: c2 26 e0 68 st %g1, [ %i3 + 0x68 ]
rtems_fdisk_printf (fd,
2006904: 90 10 00 1b mov %i3, %o0
2006908: 13 00 80 c9 sethi %hi(0x2032400), %o1
200690c: 7f ff f9 fb call 20050f8 <rtems_fdisk_printf>
2006910: 92 12 63 68 or %o1, 0x368, %o1 ! 2032768 <__FUNCTION__.6882+0xe88>
"Flash Disk Driver Status : %d.%d", fd->major, fd->minor);
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
2006914: d4 06 e0 1c ld [ %i3 + 0x1c ], %o2
2006918: 90 10 00 1b mov %i3, %o0
200691c: 13 00 80 c9 sethi %hi(0x2032400), %o1
2006920: 7f ff f9 f6 call 20050f8 <rtems_fdisk_printf>
2006924: 92 12 63 90 or %o1, 0x390, %o1 ! 2032790 <__FUNCTION__.6882+0xeb0>
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
2006928: d4 06 e0 20 ld [ %i3 + 0x20 ], %o2
200692c: 90 10 00 1b mov %i3, %o0
2006930: 13 00 80 c9 sethi %hi(0x2032400), %o1
2006934: 7f ff f9 f1 call 20050f8 <rtems_fdisk_printf>
2006938: 92 12 63 a0 or %o1, 0x3a0, %o1 ! 20327a0 <__FUNCTION__.6882+0xec0>
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
200693c: d4 06 e0 6c ld [ %i3 + 0x6c ], %o2
2006940: 90 10 00 1b mov %i3, %o0
2006944: 13 00 80 c9 sethi %hi(0x2032400), %o1
2006948: 7f ff f9 ec call 20050f8 <rtems_fdisk_printf>
200694c: 92 12 63 b8 or %o1, 0x3b8, %o1 ! 20327b8 <__FUNCTION__.6882+0xed8>
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
2006950: c2 06 e0 30 ld [ %i3 + 0x30 ], %g1
uint32_t count = 0;
while (sc)
2006954: 80 a0 60 00 cmp %g1, 0
2006958: 22 80 00 07 be,a 2006974 <rtems_fdisk_ioctl+0x56c> <== NEVER TAKEN
200695c: d6 06 e0 38 ld [ %i3 + 0x38 ], %o3 <== NOT EXECUTED
{
count++;
sc = sc->next;
2006960: c2 00 40 00 ld [ %g1 ], %g1
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006964: 80 a0 60 00 cmp %g1, 0
2006968: 12 bf ff fe bne 2006960 <rtems_fdisk_ioctl+0x558>
200696c: b4 06 a0 01 inc %i2
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, "Starvations\t%d", fd->starvations);
count = rtems_fdisk_segment_count_queue (&fd->available);
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
2006970: d6 06 e0 38 ld [ %i3 + 0x38 ], %o3
2006974: 94 10 00 1a mov %i2, %o2
2006978: 90 10 00 1b mov %i3, %o0
200697c: 13 00 80 c9 sethi %hi(0x2032400), %o1
2006980: 7f ff f9 de call 20050f8 <rtems_fdisk_printf>
2006984: 92 12 63 c8 or %o1, 0x3c8, %o1 ! 20327c8 <__FUNCTION__.6882+0xee8>
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
2006988: c2 06 e0 3c ld [ %i3 + 0x3c ], %g1
uint32_t count = 0;
while (sc)
200698c: 80 a0 60 00 cmp %g1, 0
2006990: 02 80 00 06 be 20069a8 <rtems_fdisk_ioctl+0x5a0> <== NEVER TAKEN
2006994: 94 10 20 00 clr %o2
{
count++;
sc = sc->next;
2006998: c2 00 40 00 ld [ %g1 ], %g1
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
200699c: 80 a0 60 00 cmp %g1, 0
20069a0: 12 bf ff fe bne 2006998 <rtems_fdisk_ioctl+0x590>
20069a4: 94 02 a0 01 inc %o2
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;
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
20069a8: d6 06 e0 44 ld [ %i3 + 0x44 ], %o3
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;
20069ac: b4 02 80 1a add %o2, %i2, %i2
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
20069b0: 90 10 00 1b mov %i3, %o0
20069b4: 13 00 80 c9 sethi %hi(0x2032400), %o1
20069b8: 7f ff f9 d0 call 20050f8 <rtems_fdisk_printf>
20069bc: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 20327e8 <__FUNCTION__.6882+0xf08>
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
20069c0: c2 06 e0 48 ld [ %i3 + 0x48 ], %g1
uint32_t count = 0;
while (sc)
20069c4: 80 a0 60 00 cmp %g1, 0
20069c8: 02 80 00 06 be 20069e0 <rtems_fdisk_ioctl+0x5d8> <== ALWAYS TAKEN
20069cc: 94 10 20 00 clr %o2
{
count++;
sc = sc->next;
20069d0: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
20069d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20069d8: 12 bf ff fe bne 20069d0 <rtems_fdisk_ioctl+0x5c8> <== NOT EXECUTED
20069dc: 94 02 a0 01 inc %o2 <== NOT EXECUTED
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;
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
20069e0: d6 06 e0 50 ld [ %i3 + 0x50 ], %o3
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;
20069e4: b4 06 80 0a add %i2, %o2, %i2
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
20069e8: 90 10 00 1b mov %i3, %o0
20069ec: 13 00 80 ca sethi %hi(0x2032800), %o1
20069f0: 7f ff f9 c2 call 20050f8 <rtems_fdisk_printf>
20069f4: 92 12 60 00 mov %o1, %o1 ! 2032800 <__FUNCTION__.6882+0xf20>
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
20069f8: c2 06 e0 54 ld [ %i3 + 0x54 ], %g1
uint32_t count = 0;
while (sc)
20069fc: 80 a0 60 00 cmp %g1, 0
2006a00: 02 80 00 06 be 2006a18 <rtems_fdisk_ioctl+0x610> <== ALWAYS TAKEN
2006a04: 94 10 20 00 clr %o2
{
count++;
sc = sc->next;
2006a08: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
2006a0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006a10: 12 bf ff fe bne 2006a08 <rtems_fdisk_ioctl+0x600> <== NOT EXECUTED
2006a14: 94 02 a0 01 inc %o2 <== NOT EXECUTED
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);
total += count;
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
2006a18: d6 06 e0 5c ld [ %i3 + 0x5c ], %o3
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);
total += count;
2006a1c: b4 06 80 0a add %i2, %o2, %i2
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
2006a20: 90 10 00 1b mov %i3, %o0
2006a24: 13 00 80 ca sethi %hi(0x2032800), %o1
2006a28: 7f ff f9 b4 call 20050f8 <rtems_fdisk_printf>
2006a2c: 92 12 60 18 or %o1, 0x18, %o1 ! 2032818 <__FUNCTION__.6882+0xf38>
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
for (device = 0; device < fd->device_count; device++)
2006a30: c6 06 e0 2c ld [ %i3 + 0x2c ], %g3
2006a34: 80 a0 e0 00 cmp %g3, 0
2006a38: 02 80 00 0a be 2006a60 <rtems_fdisk_ioctl+0x658> <== NEVER TAKEN
2006a3c: 96 10 20 00 clr %o3
2006a40: c4 06 e0 28 ld [ %i3 + 0x28 ], %g2
2006a44: 82 10 20 00 clr %g1
count += fd->devices[device].segment_count;
2006a48: c8 00 a0 04 ld [ %g2 + 4 ], %g4
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++)
2006a4c: 82 00 60 01 inc %g1
count += fd->devices[device].segment_count;
2006a50: 96 02 c0 04 add %o3, %g4, %o3
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++)
2006a54: 80 a0 40 03 cmp %g1, %g3
2006a58: 12 bf ff fc bne 2006a48 <rtems_fdisk_ioctl+0x640> <== NEVER TAKEN
2006a5c: 84 00 a0 0c add %g2, 0xc, %g2
count += fd->devices[device].segment_count;
rtems_fdisk_printf (fd, "Queue total\t%ld of %ld, %s", total, count,
2006a60: 19 00 80 c8 sethi %hi(0x2032000), %o4
2006a64: 80 a6 80 0b cmp %i2, %o3
2006a68: 02 80 00 d0 be 2006da8 <rtems_fdisk_ioctl+0x9a0> <== ALWAYS TAKEN
2006a6c: 98 13 23 10 or %o4, 0x310, %o4
2006a70: 94 10 00 1a mov %i2, %o2
2006a74: 90 10 00 1b mov %i3, %o0
2006a78: 13 00 80 ca sethi %hi(0x2032800), %o1
2006a7c: 7f ff f9 9f call 20050f8 <rtems_fdisk_printf>
2006a80: 92 12 60 30 or %o1, 0x30, %o1 ! 2032830 <__FUNCTION__.6882+0xf50>
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
2006a84: d4 06 e0 2c ld [ %i3 + 0x2c ], %o2
2006a88: 90 10 00 1b mov %i3, %o0
2006a8c: 13 00 80 ca sethi %hi(0x2032800), %o1
2006a90: 7f ff f9 9a call 20050f8 <rtems_fdisk_printf>
2006a94: 92 12 60 50 or %o1, 0x50, %o1 ! 2032850 <__FUNCTION__.6882+0xf70>
for (device = 0; device < fd->device_count; device++)
2006a98: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1
2006a9c: 80 a0 60 00 cmp %g1, 0
2006aa0: 22 80 00 94 be,a 2006cf0 <rtems_fdisk_ioctl+0x8e8> <== NEVER TAKEN
2006aa4: f4 06 e0 3c ld [ %i3 + 0x3c ], %i2 <== NOT EXECUTED
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,
2006aa8: 21 00 80 ca sethi %hi(0x2032800), %l0
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++)
2006aac: b0 10 20 00 clr %i0
2006ab0: c0 27 bf f0 clr [ %fp + -16 ]
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,
2006ab4: a0 14 20 88 or %l0, 0x88, %l0
for (device = 0; device < fd->device_count; device++)
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
2006ab8: d4 07 bf f0 ld [ %fp + -16 ], %o2
2006abc: 13 00 80 ca sethi %hi(0x2032800), %o1
2006ac0: 90 10 00 1b mov %i3, %o0
2006ac4: 7f ff f9 8d call 20050f8 <rtems_fdisk_printf>
2006ac8: 92 12 60 60 or %o1, 0x60, %o1
rtems_fdisk_printf (fd, " Segment count\t%ld",
2006acc: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1
2006ad0: 90 10 00 1b mov %i3, %o0
2006ad4: 82 00 40 18 add %g1, %i0, %g1
2006ad8: d4 00 60 04 ld [ %g1 + 4 ], %o2
2006adc: 13 00 80 ca sethi %hi(0x2032800), %o1
2006ae0: 7f ff f9 86 call 20050f8 <rtems_fdisk_printf>
2006ae4: 92 12 60 70 or %o1, 0x70, %o1 ! 2032870 <__FUNCTION__.6882+0xf90>
fd->devices[device].segment_count);
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
2006ae8: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1
2006aec: 82 00 40 18 add %g1, %i0, %g1
2006af0: c4 00 60 04 ld [ %g1 + 4 ], %g2
2006af4: 80 a0 a0 00 cmp %g2, 0
2006af8: 02 80 00 77 be 2006cd4 <rtems_fdisk_ioctl+0x8cc> <== NEVER TAKEN
2006afc: c4 07 bf f0 ld [ %fp + -16 ], %g2
2006b00: b2 10 20 00 clr %i1
2006b04: b4 10 20 00 clr %i2
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[seg];
2006b08: e4 00 40 00 ld [ %g1 ], %l2
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
2006b0c: 90 10 00 1b mov %i3, %o0
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];
2006b10: a4 04 80 19 add %l2, %i1, %l2
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
2006b14: 94 07 bf f8 add %fp, -8, %o2
2006b18: 7f ff f8 f0 call 2004ed8 <rtems_fdisk_queue_status>
2006b1c: 92 10 00 12 mov %l2, %o1
for (page = 0; page < sc->pages; page++)
2006b20: d8 04 a0 14 ld [ %l2 + 0x14 ], %o4
2006b24: 80 a3 20 00 cmp %o4, 0
2006b28: 22 80 00 95 be,a 2006d7c <rtems_fdisk_ioctl+0x974> <== NEVER TAKEN
2006b2c: c6 06 e0 1c ld [ %i3 + 0x1c ], %g3 <== NOT EXECUTED
2006b30: c8 06 e0 1c ld [ %i3 + 0x1c ], %g4
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;
2006b34: 82 10 20 00 clr %g1
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
2006b38: f4 27 bf f4 st %i2, [ %fp + -12 ]
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;
2006b3c: aa 10 20 00 clr %l5
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
2006b40: b4 10 00 1d mov %i5, %i2
2006b44: 86 10 00 04 mov %g4, %g3
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;
2006b48: ae 10 20 00 clr %l7
uint32_t used = 0;
2006b4c: ac 10 20 00 clr %l6
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
2006b50: a6 10 20 00 clr %l3
2006b54: ba 10 00 01 mov %g1, %i5
{
if (rtems_fdisk_page_desc_erased (&sc->page_descriptors[page]))
2006b58: c4 04 a0 10 ld [ %l2 + 0x10 ], %g2
2006b5c: 83 2c e0 03 sll %l3, 3, %g1
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2006b60: de 00 80 01 ld [ %g2 + %g1 ], %o7
2006b64: 80 a3 ff ff cmp %o7, -1
2006b68: 02 80 00 7d be 2006d5c <rtems_fdisk_ioctl+0x954>
2006b6c: 82 00 80 01 add %g2, %g1, %g1
* only set a flag by changing it from 1 to 0.
*/
static bool
rtems_fdisk_page_desc_flags_set (rtems_fdisk_page_desc* pd, uint16_t flags)
{
return (pd->flags & flags) == 0 ? true : false;
2006b70: c2 10 60 02 lduh [ %g1 + 2 ], %g1
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],
2006b74: 80 88 60 01 btst 1, %g1
2006b78: 12 80 00 07 bne 2006b94 <rtems_fdisk_ioctl+0x78c> <== NEVER TAKEN
2006b7c: 80 a1 20 00 cmp %g4, 0
RTEMS_FDISK_PAGE_ACTIVE))
{
if (rtems_fdisk_page_desc_flags_set (&sc->page_descriptors[page],
2006b80: 80 88 60 02 btst 2, %g1
2006b84: 32 80 00 7c bne,a 2006d74 <rtems_fdisk_ioctl+0x96c> <== ALWAYS TAKEN
2006b88: ae 05 e0 01 inc %l7
RTEMS_FDISK_PAGE_USED))
used++;
2006b8c: ac 05 a0 01 inc %l6 <== NOT EXECUTED
active++;
is_active = true;
}
}
for (block = 0; block < fd->block_count; block++)
2006b90: 80 a1 20 00 cmp %g4, 0
2006b94: 22 80 00 22 be,a 2006c1c <rtems_fdisk_ioctl+0x814> <== NEVER TAKEN
2006b98: a6 04 e0 01 inc %l3 <== NOT EXECUTED
2006b9c: a2 10 20 00 clr %l1
{
if ((fd->blocks[block].segment == sc) &&
(fd->blocks[block].page == page) && !is_active)
2006ba0: 10 80 00 06 b 2006bb8 <rtems_fdisk_ioctl+0x7b0>
2006ba4: a8 0d 60 ff and %l5, 0xff, %l4
active++;
is_active = true;
}
}
for (block = 0; block < fd->block_count; block++)
2006ba8: a2 04 60 01 inc %l1
2006bac: 80 a4 40 04 cmp %l1, %g4
2006bb0: 1a 80 00 19 bcc 2006c14 <rtems_fdisk_ioctl+0x80c>
2006bb4: 86 10 00 04 mov %g4, %g3
{
if ((fd->blocks[block].segment == sc) &&
2006bb8: c4 06 e0 18 ld [ %i3 + 0x18 ], %g2
2006bbc: 83 2c 60 03 sll %l1, 3, %g1
2006bc0: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2006bc4: 80 a4 80 03 cmp %l2, %g3
2006bc8: 12 bf ff f8 bne 2006ba8 <rtems_fdisk_ioctl+0x7a0>
2006bcc: 82 00 80 01 add %g2, %g1, %g1
2006bd0: c2 00 60 04 ld [ %g1 + 4 ], %g1
2006bd4: 80 a4 c0 01 cmp %l3, %g1
2006bd8: 32 bf ff f5 bne,a 2006bac <rtems_fdisk_ioctl+0x7a4>
2006bdc: a2 04 60 01 inc %l1
(fd->blocks[block].page == page) && !is_active)
2006be0: 80 a5 20 00 cmp %l4, 0
2006be4: 32 bf ff f2 bne,a 2006bac <rtems_fdisk_ioctl+0x7a4> <== ALWAYS TAKEN
2006be8: a2 04 60 01 inc %l1
rtems_fdisk_printf (fd,
2006bec: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
2006bf0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2006bf4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2006bf8: 7f ff f9 40 call 20050f8 <rtems_fdisk_printf> <== NOT EXECUTED
2006bfc: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
2006c00: c8 06 e0 1c ld [ %i3 + 0x1c ], %g4 <== NOT EXECUTED
active++;
is_active = true;
}
}
for (block = 0; block < fd->block_count; block++)
2006c04: a2 04 60 01 inc %l1 <== NOT EXECUTED
2006c08: 80 a4 40 04 cmp %l1, %g4 <== NOT EXECUTED
2006c0c: 0a bf ff eb bcs 2006bb8 <rtems_fdisk_ioctl+0x7b0> <== NOT EXECUTED
2006c10: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED
2006c14: d8 04 a0 14 ld [ %l2 + 0x14 ], %o4
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
2006c18: a6 04 e0 01 inc %l3
2006c1c: 80 a4 c0 0c cmp %l3, %o4
2006c20: 2a bf ff cf bcs,a 2006b5c <rtems_fdisk_ioctl+0x754>
2006c24: c4 04 a0 10 ld [ %l2 + 0x10 ], %g2
2006c28: 82 10 00 1d mov %i5, %g1
2006c2c: ba 10 00 1a mov %i2, %i5
2006c30: f4 07 bf f4 ld [ %fp + -12 ], %i2
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
2006c34: 80 a0 e0 00 cmp %g3, 0
2006c38: 02 80 00 0d be 2006c6c <rtems_fdisk_ioctl+0x864> <== NEVER TAKEN
2006c3c: 84 10 20 00 clr %g2
2006c40: da 06 e0 18 ld [ %i3 + 0x18 ], %o5
2006c44: 88 10 20 00 clr %g4
* @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)
2006c48: 9f 29 20 03 sll %g4, 3, %o7
}
count = 0;
for (block = 0; block < fd->block_count; block++)
{
if (fd->blocks[block].segment == sc)
2006c4c: de 03 40 0f ld [ %o5 + %o7 ], %o7
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
2006c50: 88 01 20 01 inc %g4
{
if (fd->blocks[block].segment == sc)
count++;
2006c54: 9e 1c 80 0f xor %l2, %o7, %o7
2006c58: 80 a0 00 0f cmp %g0, %o7
2006c5c: 84 60 bf ff subx %g2, -1, %g2
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
2006c60: 80 a1 00 03 cmp %g4, %g3
2006c64: 12 bf ff fa bne 2006c4c <rtems_fdisk_ioctl+0x844>
2006c68: 9f 29 20 03 sll %g4, 3, %o7
" 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),
2006c6c: c6 04 a0 20 ld [ %l2 + 0x20 ], %g3
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 +
2006c70: da 04 a0 1c ld [ %l2 + 0x1c ], %o5
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
2006c74: ee 23 a0 5c st %l7, [ %sp + 0x5c ]
2006c78: c6 23 a0 60 st %g3, [ %sp + 0x60 ]
2006c7c: ec 23 a0 64 st %l6, [ %sp + 0x64 ]
2006c80: c2 23 a0 68 st %g1, [ %sp + 0x68 ]
* @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)
2006c84: c2 04 a0 24 ld [ %l2 + 0x24 ], %g1
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
2006c88: 94 10 00 1a mov %i2, %o2
* @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)
2006c8c: 82 03 40 01 add %o5, %g1, %g1
2006c90: 82 00 40 03 add %g1, %g3, %g1
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
2006c94: 82 23 00 01 sub %o4, %g1, %g1
2006c98: c4 23 a0 70 st %g2, [ %sp + 0x70 ]
2006c9c: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2006ca0: 90 10 00 1b mov %i3, %o0
2006ca4: 13 00 80 ca sethi %hi(0x2032800), %o1
2006ca8: 96 07 bf f8 add %fp, -8, %o3
2006cac: 7f ff f9 13 call 20050f8 <rtems_fdisk_printf>
2006cb0: 92 12 60 b8 or %o1, 0xb8, %o1
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++)
2006cb4: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1
2006cb8: b4 06 a0 01 inc %i2
2006cbc: 82 00 40 18 add %g1, %i0, %g1
2006cc0: c4 00 60 04 ld [ %g1 + 4 ], %g2
2006cc4: 80 a6 80 02 cmp %i2, %g2
2006cc8: 0a bf ff 90 bcs 2006b08 <rtems_fdisk_ioctl+0x700>
2006ccc: b2 06 60 30 add %i1, 0x30, %i1
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++)
2006cd0: c4 07 bf f0 ld [ %fp + -16 ], %g2
2006cd4: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1
2006cd8: 84 00 a0 01 inc %g2
2006cdc: c4 27 bf f0 st %g2, [ %fp + -16 ]
2006ce0: 80 a0 80 01 cmp %g2, %g1
2006ce4: 0a bf ff 75 bcs 2006ab8 <rtems_fdisk_ioctl+0x6b0> <== NEVER TAKEN
2006ce8: b0 06 20 0c add %i0, 0xc, %i0
count);
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
2006cec: f4 06 e0 3c ld [ %i3 + 0x3c ], %i2
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
2006cf0: 90 10 00 1b mov %i3, %o0
2006cf4: 13 00 80 ca sethi %hi(0x2032800), %o1
2006cf8: 7f ff f9 00 call 20050f8 <rtems_fdisk_printf>
2006cfc: 92 12 60 f8 or %o1, 0xf8, %o1 ! 20328f8 <__FUNCTION__.6882+0x1018>
while (sc)
2006d00: 80 a6 a0 00 cmp %i2, 0
2006d04: 02 80 00 0f be 2006d40 <rtems_fdisk_ioctl+0x938> <== NEVER TAKEN
2006d08: 31 00 80 ca sethi %hi(0x2032800), %i0
2006d0c: b2 10 20 00 clr %i1
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
2006d10: b0 16 21 08 or %i0, 0x108, %i0
2006d14: d6 06 a0 08 ld [ %i2 + 8 ], %o3
2006d18: d8 06 a0 0c ld [ %i2 + 0xc ], %o4
2006d1c: da 06 a0 20 ld [ %i2 + 0x20 ], %o5
2006d20: 94 10 00 19 mov %i1, %o2
2006d24: 90 10 00 1b mov %i3, %o0
2006d28: 7f ff f8 f4 call 20050f8 <rtems_fdisk_printf>
2006d2c: 92 10 00 18 mov %i0, %o1
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
2006d30: f4 06 80 00 ld [ %i2 ], %i2
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
while (sc)
2006d34: 80 a6 a0 00 cmp %i2, 0
2006d38: 12 bf ff f7 bne 2006d14 <rtems_fdisk_ioctl+0x90c>
2006d3c: b2 06 60 01 inc %i1
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
}
}
fd->info_level = current_info_level;
2006d40: c6 07 bf e8 ld [ %fp + -24 ], %g3
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]);
2006d44: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
2006d48: c4 07 bf ec ld [ %fp + -20 ], %g2
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
}
}
fd->info_level = current_info_level;
2006d4c: c6 26 e0 68 st %g3, [ %i3 + 0x68 ]
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]);
2006d50: c0 20 80 00 clr [ %g2 ]
break;
2006d54: 10 bf fe 8b b 2006780 <rtems_fdisk_ioctl+0x378>
2006d58: ba 00 40 1d add %g1, %i5, %i5
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2006d5c: c4 00 60 04 ld [ %g1 + 4 ], %g2
2006d60: 80 a0 bf ff cmp %g2, -1
2006d64: 32 bf ff 84 bne,a 2006b74 <rtems_fdisk_ioctl+0x76c> <== NEVER TAKEN
2006d68: c2 10 60 02 lduh [ %g1 + 2 ], %g1 <== NOT EXECUTED
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
{
if (rtems_fdisk_page_desc_erased (&sc->page_descriptors[page]))
erased++;
2006d6c: 10 bf ff 89 b 2006b90 <rtems_fdisk_ioctl+0x788>
2006d70: ba 07 60 01 inc %i5
RTEMS_FDISK_PAGE_USED))
used++;
else
{
active++;
is_active = true;
2006d74: 10 bf ff 87 b 2006b90 <rtems_fdisk_ioctl+0x788>
2006d78: aa 10 20 01 mov 1, %l5
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;
2006d7c: ae 10 20 00 clr %l7 <== NOT EXECUTED
uint32_t used = 0;
2006d80: ac 10 20 00 clr %l6 <== NOT EXECUTED
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;
2006d84: 10 bf ff ac b 2006c34 <rtems_fdisk_ioctl+0x82c> <== NOT EXECUTED
2006d88: 82 10 20 00 clr %g1 <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
(rtems_flashdisks[minor].device_count == 0))
{
errno = ENODEV;
2006d8c: 40 00 6c bf call 2022088 <__errno> <== NOT EXECUTED
2006d90: 01 00 00 00 nop <== NOT EXECUTED
2006d94: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
2006d98: ba 00 40 1d add %g1, %i5, %i5 <== NOT EXECUTED
2006d9c: 82 10 20 13 mov 0x13, %g1 <== NOT EXECUTED
2006da0: 10 bf fe 78 b 2006780 <rtems_fdisk_ioctl+0x378> <== NOT EXECUTED
2006da4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
count = 0;
for (device = 0; device < fd->device_count; device++)
count += fd->devices[device].segment_count;
rtems_fdisk_printf (fd, "Queue total\t%ld of %ld, %s", total, count,
2006da8: 19 00 80 c8 sethi %hi(0x2032000), %o4
2006dac: 10 bf ff 31 b 2006a70 <rtems_fdisk_ioctl+0x668>
2006db0: 98 13 23 08 or %o4, 0x308, %o4 ! 2032308 <__FUNCTION__.6882+0xa28>
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
2006db4: 40 00 6c b5 call 2022088 <__errno>
2006db8: a2 06 a0 18 add %i2, 0x18, %l1
2006dbc: f2 07 20 9c ld [ %i4 + 0x9c ], %i1
* @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;
2006dc0: f6 06 a0 10 ld [ %i2 + 0x10 ], %i3
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
2006dc4: d0 27 bf f0 st %o0, [ %fp + -16 ]
2006dc8: b2 06 40 1d add %i1, %i5, %i1
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
2006dcc: ae 10 20 00 clr %l7
2006dd0: a8 10 00 1d mov %i5, %l4
2006dd4: 80 a5 c0 1b cmp %l7, %i3
2006dd8: 1a 80 00 bb bcc 20070c4 <rtems_fdisk_ioctl+0xcbc>
2006ddc: ba 10 00 14 mov %l4, %i5
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
2006de0: d0 04 60 04 ld [ %l1 + 4 ], %o0
2006de4: 7f ff ee 10 call 2002624 <.udiv>
2006de8: d2 06 60 14 ld [ %i1 + 0x14 ], %o1
2006dec: d0 27 bf f4 st %o0, [ %fp + -12 ]
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
2006df0: 80 a2 20 00 cmp %o0, 0
2006df4: 02 80 00 a0 be 2007074 <rtems_fdisk_ioctl+0xc6c> <== NEVER TAKEN
2006df8: fa 04 60 08 ld [ %l1 + 8 ], %i5
2006dfc: a4 10 20 00 clr %l2
2006e00: ac 10 00 14 mov %l4, %l6
2006e04: aa 10 00 1a mov %i2, %l5
{
ret = rtems_fdisk_read_block (fd, sg->block + b, data);
2006e08: f0 04 40 00 ld [ %l1 ], %i0
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);
2006e0c: 90 10 00 19 mov %i1, %o0
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);
2006e10: b0 04 80 18 add %l2, %i0, %i0
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);
2006e14: 13 00 80 c8 sethi %hi(0x2032000), %o1
2006e18: 94 10 00 18 mov %i0, %o2
2006e1c: 7f ff f8 95 call 2005070 <rtems_fdisk_info>
2006e20: 92 12 63 18 or %o1, 0x318, %o1
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
2006e24: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
2006e28: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
2006e2c: 82 20 80 01 sub %g2, %g1, %g1
2006e30: 80 a6 00 01 cmp %i0, %g1
2006e34: 1a 80 00 76 bcc 200700c <rtems_fdisk_ioctl+0xc04> <== NEVER TAKEN
2006e38: 83 2e 20 03 sll %i0, 3, %g1
{
rtems_fdisk_error ("read-block: block out of range: %d", block);
return EIO;
}
bc = &fd->blocks[block];
2006e3c: e0 06 60 18 ld [ %i1 + 0x18 ], %l0
if (!bc->segment)
2006e40: f6 04 00 01 ld [ %l0 + %g1 ], %i3
2006e44: 80 a6 e0 00 cmp %i3, 0
2006e48: 02 80 00 79 be 200702c <rtems_fdisk_ioctl+0xc24>
2006e4c: a0 04 00 01 add %l0, %g1, %l0
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
2006e50: da 04 20 04 ld [ %l0 + 4 ], %o5
2006e54: e6 06 e0 10 ld [ %i3 + 0x10 ], %l3
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
2006e58: d4 06 c0 00 ld [ %i3 ], %o2
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
2006e5c: b5 2b 60 03 sll %o5, 3, %i2
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
2006e60: 13 00 80 c7 sethi %hi(0x2031c00), %o1
2006e64: d6 06 e0 08 ld [ %i3 + 8 ], %o3
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
2006e68: a8 04 c0 1a add %l3, %i2, %l4
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
2006e6c: d8 06 e0 0c ld [ %i3 + 0xc ], %o4
2006e70: de 06 e0 14 ld [ %i3 + 0x14 ], %o7
2006e74: c8 06 e0 1c ld [ %i3 + 0x1c ], %g4
2006e78: c6 06 e0 20 ld [ %i3 + 0x20 ], %g3
2006e7c: c4 06 e0 24 ld [ %i3 + 0x24 ], %g2
2006e80: 80 a2 a0 00 cmp %o2, 0
2006e84: 02 80 00 04 be 2006e94 <rtems_fdisk_ioctl+0xa8c> <== NEVER TAKEN
2006e88: 82 12 63 40 or %o1, 0x340, %g1
2006e8c: 15 00 80 c7 sethi %hi(0x2031c00), %o2
2006e90: 82 12 a3 38 or %o2, 0x338, %g1 ! 2031f38 <__FUNCTION__.6882+0x658>
2006e94: de 23 a0 5c st %o7, [ %sp + 0x5c ]
2006e98: c8 23 a0 60 st %g4, [ %sp + 0x60 ]
2006e9c: c6 23 a0 64 st %g3, [ %sp + 0x64 ]
2006ea0: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
2006ea4: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2006ea8: c2 15 20 02 lduh [ %l4 + 2 ], %g1
2006eac: 90 10 00 19 mov %i1, %o0
2006eb0: c2 23 a0 70 st %g1, [ %sp + 0x70 ]
2006eb4: c2 14 c0 1a lduh [ %l3 + %i2 ], %g1
2006eb8: 13 00 80 c8 sethi %hi(0x2032000), %o1
2006ebc: c2 23 a0 74 st %g1, [ %sp + 0x74 ]
2006ec0: c2 05 20 04 ld [ %l4 + 4 ], %g1
2006ec4: 92 12 63 78 or %o1, 0x378, %o1
2006ec8: c2 23 a0 78 st %g1, [ %sp + 0x78 ]
2006ecc: 7f ff f8 69 call 2005070 <rtems_fdisk_info>
2006ed0: 94 10 00 18 mov %i0, %o2
* only set a flag by changing it from 1 to 0.
*/
static bool
rtems_fdisk_page_desc_flags_set (rtems_fdisk_page_desc* pd, uint16_t flags)
{
return (pd->flags & flags) == 0 ? true : false;
2006ed4: c2 15 20 02 lduh [ %l4 + 2 ], %g1
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))
2006ed8: 80 88 60 01 btst 1, %g1
2006edc: 12 80 00 16 bne 2006f34 <rtems_fdisk_ioctl+0xb2c> <== NEVER TAKEN
2006ee0: 80 88 60 02 btst 2, %g1
{
if (rtems_fdisk_page_desc_flags_clear (pd, RTEMS_FDISK_PAGE_USED))
2006ee4: 12 80 00 1f bne 2006f60 <rtems_fdisk_ioctl+0xb58> <== ALWAYS TAKEN
2006ee8: 92 10 00 18 mov %i0, %o1
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",
2006eec: d4 06 e0 08 ld [ %i3 + 8 ], %o2 <== NOT EXECUTED
2006ef0: d6 06 e0 0c ld [ %i3 + 0xc ], %o3 <== NOT EXECUTED
2006ef4: d8 04 20 04 ld [ %l0 + 4 ], %o4 <== NOT EXECUTED
2006ef8: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
2006efc: ba 10 00 16 mov %l6, %i5 <== NOT EXECUTED
2006f00: b4 10 00 15 mov %l5, %i2 <== NOT EXECUTED
2006f04: 7f ff f9 57 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2006f08: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2006f0c: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
2006f10: c2 06 a0 04 ld [ %i2 + 4 ], %g1
2006f14: d0 06 a0 08 ld [ %i2 + 8 ], %o0
2006f18: 9f c0 40 00 call %g1
2006f1c: d2 26 a0 0c st %o1, [ %i2 + 0xc ]
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
2006f20: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
2006f24: c4 07 bf f0 ld [ %fp + -16 ], %g2
2006f28: ba 00 40 1d add %g1, %i5, %i5
break;
2006f2c: 10 bf fe 15 b 2006780 <rtems_fdisk_ioctl+0x378>
2006f30: c0 20 80 00 clr [ %g2 ]
block, sc->device, sc->segment, bc->page);
}
}
else
{
rtems_fdisk_error ("read-block: block page not active: %d: %d-%d-%d",
2006f34: d4 06 e0 08 ld [ %i3 + 8 ], %o2 <== NOT EXECUTED
2006f38: d6 06 e0 0c ld [ %i3 + 0xc ], %o3 <== NOT EXECUTED
2006f3c: d8 04 20 04 ld [ %l0 + 4 ], %o4 <== NOT EXECUTED
2006f40: ba 10 00 16 mov %l6, %i5 <== NOT EXECUTED
2006f44: b4 10 00 15 mov %l5, %i2 <== NOT EXECUTED
2006f48: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2006f4c: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
2006f50: 7f ff f9 44 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2006f54: 90 12 20 68 or %o0, 0x68, %o0 ! 2032468 <__FUNCTION__.6882+0xb88><== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2006f58: 10 bf ff ee b 2006f10 <rtems_fdisk_ioctl+0xb08> <== NOT EXECUTED
2006f5c: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
/*
* 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,
2006f60: c2 04 20 04 ld [ %l0 + 4 ], %g1
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);
2006f64: e8 06 60 14 ld [ %i1 + 0x14 ], %l4
/*
* 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,
2006f68: d0 06 e0 18 ld [ %i3 + 0x18 ], %o0
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,
2006f6c: 92 10 00 14 mov %l4, %o1
2006f70: 7f ff ed 73 call 200253c <.umul>
2006f74: 90 02 00 01 add %o0, %g1, %o0
2006f78: 92 10 00 1b mov %i3, %o1
2006f7c: 94 10 00 08 mov %o0, %o2
2006f80: 96 10 00 1d mov %i5, %o3
2006f84: 90 10 00 19 mov %i1, %o0
2006f88: 7f ff f8 7e call 2005180 <rtems_fdisk_seg_read>
2006f8c: 98 10 00 14 mov %l4, %o4
* driver. This skips the page descriptors.
*/
int ret = rtems_fdisk_seg_read_page (fd, sc,
bc->page + sc->pages_desc, buffer);
if (ret)
2006f90: 82 92 20 00 orcc %o0, 0, %g1
2006f94: 32 80 00 3b bne,a 2007080 <rtems_fdisk_ioctl+0xc78> <== NEVER TAKEN
2006f98: e2 06 e0 08 ld [ %i3 + 8 ], %l1 <== NOT EXECUTED
strerror (ret), ret);
#endif
return ret;
}
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
2006f9c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
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++)
2006fa0: 80 a0 60 00 cmp %g1, 0
2006fa4: 02 80 00 0d be 2006fd8 <rtems_fdisk_ioctl+0xbd0> <== NEVER TAKEN
2006fa8: 86 10 3f ff mov -1, %g3
2006fac: 1f 00 81 1d sethi %hi(0x2047400), %o7
2006fb0: c8 03 e0 98 ld [ %o7 + 0x98 ], %g4 ! 2047498 <rtems_fdisk_crc16_factor>
2006fb4: 84 10 20 00 clr %g2
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
2006fb8: f6 0f 40 02 ldub [ %i5 + %g2 ], %i3
2006fbc: 86 08 e0 ff and %g3, 0xff, %g3
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++)
2006fc0: 84 00 a0 01 inc %g2
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
2006fc4: 86 18 c0 1b xor %g3, %i3, %g3
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++)
2006fc8: 80 a0 80 01 cmp %g2, %g1
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
2006fcc: 87 28 e0 01 sll %g3, 1, %g3
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++)
2006fd0: 12 bf ff fa bne 2006fb8 <rtems_fdisk_ioctl+0xbb0>
2006fd4: c6 11 00 03 lduh [ %g4 + %g3 ], %g3
return ret;
}
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
if (cs == pd->crc)
2006fd8: d6 14 c0 1a lduh [ %l3 + %i2 ], %o3
2006fdc: 87 28 e0 10 sll %g3, 0x10, %g3
2006fe0: 95 30 e0 10 srl %g3, 0x10, %o2
2006fe4: 80 a2 80 0b cmp %o2, %o3
2006fe8: 02 80 00 1b be 2007054 <rtems_fdisk_ioctl+0xc4c> <== ALWAYS TAKEN
2006fec: b4 10 00 15 mov %l5, %i2
2006ff0: ba 10 00 16 mov %l6, %i5 <== NOT EXECUTED
return 0;
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
2006ff4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2006ff8: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
2006ffc: 7f ff f9 19 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007000: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 20323f8 <__FUNCTION__.6882+0xb18><== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2007004: 10 bf ff c3 b 2006f10 <rtems_fdisk_ioctl+0xb08> <== NOT EXECUTED
2007008: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
200700c: ba 10 00 16 mov %l6, %i5 <== NOT EXECUTED
2007010: b4 10 00 15 mov %l5, %i2 <== NOT EXECUTED
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
{
rtems_fdisk_error ("read-block: block out of range: %d", block);
2007014: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2007018: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
200701c: 7f ff f9 11 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007020: 90 12 23 28 or %o0, 0x328, %o0 ! 2032328 <__FUNCTION__.6882+0xa48><== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2007024: 10 bf ff bb b 2006f10 <rtems_fdisk_ioctl+0xb08> <== NOT EXECUTED
2007028: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
bc = &fd->blocks[block];
if (!bc->segment)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "read-block: no segment mapping: %d", block);
200702c: 94 10 00 18 mov %i0, %o2
2007030: 13 00 80 c8 sethi %hi(0x2032000), %o1
2007034: 90 10 00 19 mov %i1, %o0
2007038: 7f ff f8 0e call 2005070 <rtems_fdisk_info>
200703c: 92 12 63 50 or %o1, 0x350, %o1
#endif
memset (buffer, 0xff, fd->block_size);
2007040: d4 06 60 14 ld [ %i1 + 0x14 ], %o2
2007044: 90 10 00 1d mov %i5, %o0
2007048: 40 00 6f 8c call 2022e78 <memset>
200704c: 92 10 20 ff mov 0xff, %o1
2007050: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
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)
2007054: c6 07 bf f4 ld [ %fp + -12 ], %g3
2007058: a4 04 a0 01 inc %l2
200705c: 80 a4 80 03 cmp %l2, %g3
2007060: 12 bf ff 6a bne 2006e08 <rtems_fdisk_ioctl+0xa00> <== NEVER TAKEN
2007064: ba 07 40 01 add %i5, %g1, %i5
2007068: f6 05 60 10 ld [ %l5 + 0x10 ], %i3
200706c: a8 10 00 16 mov %l6, %l4
2007070: b4 10 00 15 mov %l5, %i2
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
2007074: ae 05 e0 01 inc %l7
2007078: 10 bf ff 57 b 2006dd4 <rtems_fdisk_ioctl+0x9cc>
200707c: a2 04 60 10 add %l1, 0x10, %l1
bc->page + sc->pages_desc, buffer);
if (ret)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
2007080: f0 06 e0 0c ld [ %i3 + 0xc ], %i0 <== NOT EXECUTED
2007084: f6 04 20 04 ld [ %l0 + 4 ], %i3 <== NOT EXECUTED
2007088: 40 00 74 8c call 20242b8 <strerror> <== NOT EXECUTED
200708c: a8 10 00 01 mov %g1, %l4 <== NOT EXECUTED
2007090: ba 10 00 16 mov %l6, %i5 <== NOT EXECUTED
2007094: 9a 10 00 08 mov %o0, %o5 <== NOT EXECUTED
2007098: b4 10 00 15 mov %l5, %i2 <== NOT EXECUTED
200709c: e8 23 a0 5c st %l4, [ %sp + 0x5c ] <== NOT EXECUTED
20070a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20070a4: 13 00 80 c8 sethi %hi(0x2032000), %o1 <== NOT EXECUTED
20070a8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
20070ac: 92 12 63 c0 or %o1, 0x3c0, %o1 <== NOT EXECUTED
20070b0: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
20070b4: 7f ff f7 ef call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
20070b8: 98 10 00 1b mov %i3, %o4 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
20070bc: 10 bf ff 95 b 2006f10 <rtems_fdisk_ioctl+0xb08> <== NOT EXECUTED
20070c0: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
20070c4: 10 bf ff 93 b 2006f10 <rtems_fdisk_ioctl+0xb08>
20070c8: 92 10 20 00 clr %o1
ret = rtems_fdisk_erase_flash (fd);
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
20070cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20070d0: 02 bf fd fd be 20068c4 <rtems_fdisk_ioctl+0x4bc> <== NOT EXECUTED
20070d4: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
{
if (!fd->devices[device].segments)
20070d8: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1 <== NOT EXECUTED
return ENOMEM;
20070dc: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
{
if (!fd->devices[device].segments)
20070e0: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
20070e4: b2 10 20 0c mov 0xc, %i1 <== NOT EXECUTED
20070e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20070ec: 12 80 00 0d bne 2007120 <rtems_fdisk_ioctl+0xd18> <== NOT EXECUTED
20070f0: b4 10 20 00 clr %i2 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
20070f4: 10 bf fd f4 b 20068c4 <rtems_fdisk_ioctl+0x4bc> <== NOT EXECUTED
20070f8: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
ret = rtems_fdisk_erase_flash (fd);
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
20070fc: b4 06 a0 01 inc %i2 <== NOT EXECUTED
2007100: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
2007104: 1a bf fd f0 bcc 20068c4 <rtems_fdisk_ioctl+0x4bc> <== NOT EXECUTED
2007108: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
{
if (!fd->devices[device].segments)
200710c: c2 06 e0 28 ld [ %i3 + 0x28 ], %g1 <== NOT EXECUTED
2007110: c2 00 40 19 ld [ %g1 + %i1 ], %g1 <== NOT EXECUTED
2007114: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007118: 02 80 01 bb be 2007804 <rtems_fdisk_ioctl+0x13fc> <== NOT EXECUTED
200711c: b2 06 60 0c add %i1, 0xc, %i1 <== NOT EXECUTED
return ENOMEM;
ret = rtems_fdisk_recover_block_mappings (fd);
2007120: 7f ff fb c8 call 2006040 <rtems_fdisk_recover_block_mappings><== NOT EXECUTED
2007124: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
if (ret)
2007128: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200712c: 22 bf ff f4 be,a 20070fc <rtems_fdisk_ioctl+0xcf4> <== NOT EXECUTED
2007130: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
2007134: 10 bf fd e4 b 20068c4 <rtems_fdisk_ioctl+0x4bc> <== NOT EXECUTED
2007138: c2 07 20 9c ld [ %i4 + 0x9c ], %g1 <== NOT EXECUTED
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);
200713c: 40 00 6b d3 call 2022088 <__errno>
2007140: a4 06 a0 28 add %i2, 0x28, %l2
2007144: f6 07 20 9c ld [ %i4 + 0x9c ], %i3
2007148: f2 06 a0 10 ld [ %i2 + 0x10 ], %i1
* @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)
200714c: 86 10 20 01 mov 1, %g3
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);
2007150: d0 27 bf e8 st %o0, [ %fp + -24 ]
2007154: b6 06 c0 1d add %i3, %i5, %i3
* @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)
2007158: c6 27 bf f0 st %g3, [ %fp + -16 ]
200715c: fa 27 bf f4 st %i5, [ %fp + -12 ]
2007160: a8 10 00 1a mov %i2, %l4
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
2007164: c6 07 bf f0 ld [ %fp + -16 ], %g3
2007168: 82 00 ff ff add %g3, -1, %g1
200716c: 80 a0 40 19 cmp %g1, %i1
2007170: 1a 80 01 a2 bcc 20077f8 <rtems_fdisk_ioctl+0x13f0>
2007174: fa 07 bf f4 ld [ %fp + -12 ], %i5
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
2007178: d0 04 bf f4 ld [ %l2 + -12 ], %o0
200717c: 7f ff ed 2a call 2002624 <.udiv>
2007180: d2 06 e0 14 ld [ %i3 + 0x14 ], %o1
2007184: d0 27 bf ec st %o0, [ %fp + -20 ]
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
2007188: 80 a2 20 00 cmp %o0, 0
200718c: 02 80 01 0f be 20075c8 <rtems_fdisk_ioctl+0x11c0> <== NEVER TAKEN
2007190: e0 04 bf f8 ld [ %l2 + -8 ], %l0
2007194: a2 10 20 00 clr %l1
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++)
2007198: ae 10 00 14 mov %l4, %l7
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);
200719c: f0 04 bf f0 ld [ %l2 + -16 ], %i0
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d", block);
20071a0: 90 10 00 1b mov %i3, %o0
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);
20071a4: b0 04 40 18 add %l1, %i0, %i0
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d", block);
20071a8: 13 00 80 c9 sethi %hi(0x2032400), %o1
20071ac: 94 10 00 18 mov %i0, %o2
20071b0: 7f ff f7 b0 call 2005070 <rtems_fdisk_info>
20071b4: 92 12 60 98 or %o1, 0x98, %o1
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
20071b8: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2
20071bc: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1
20071c0: 82 20 80 01 sub %g2, %g1, %g1
20071c4: 80 a6 00 01 cmp %i0, %g1
20071c8: 1a 80 01 05 bcc 20075dc <rtems_fdisk_ioctl+0x11d4> <== NEVER TAKEN
20071cc: ad 2e 20 03 sll %i0, 3, %l6
{
rtems_fdisk_error ("write-block: block out of range: %d", block);
return EIO;
}
bc = &fd->blocks[block];
20071d0: ea 06 e0 18 ld [ %i3 + 0x18 ], %l5
/*
* Does the page exist in flash ?
*/
if (bc->segment)
20071d4: fa 05 40 16 ld [ %l5 + %l6 ], %i5
20071d8: 80 a7 60 00 cmp %i5, 0
20071dc: 02 80 00 6e be 2007394 <rtems_fdisk_ioctl+0xf8c>
20071e0: b4 05 40 16 add %l5, %l6, %i2
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
20071e4: c8 06 a0 04 ld [ %i2 + 4 ], %g4
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
20071e8: d4 07 60 08 ld [ %i5 + 8 ], %o2
20071ec: d6 07 60 0c ld [ %i5 + 0xc ], %o3
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
20071f0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
20071f4: 98 10 00 04 mov %g4, %o4
20071f8: c8 27 bf cc st %g4, [ %fp + -52 ]
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
20071fc: c2 27 bf e4 st %g1, [ %fp + -28 ]
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
2007200: 90 10 00 1b mov %i3, %o0
2007204: 13 00 80 c9 sethi %hi(0x2032400), %o1
2007208: 7f ff f7 9a call 2005070 <rtems_fdisk_info>
200720c: 92 12 60 d0 or %o1, 0xd0, %o1 ! 20324d0 <__FUNCTION__.6882+0xbf0>
#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,
2007210: c2 06 a0 04 ld [ %i2 + 4 ], %g1
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);
2007214: e8 06 e0 14 ld [ %i3 + 0x14 ], %l4
#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,
2007218: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
200721c: e6 07 60 08 ld [ %i5 + 8 ], %l3
uint32_t device,
uint32_t segment,
uint32_t page,
const void* buffer)
{
return rtems_fdisk_seg_verify (fd, device, segment,
2007220: 92 10 00 14 mov %l4, %o1
2007224: 7f ff ec c6 call 200253c <.umul>
2007228: 90 02 00 01 add %o0, %g1, %o0
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;
200722c: c4 06 e0 28 ld [ %i3 + 0x28 ], %g2
2007230: b3 2c e0 04 sll %l3, 4, %i1
2007234: 83 2c e0 02 sll %l3, 2, %g1
2007238: 82 26 40 01 sub %i1, %g1, %g1
200723c: b2 00 80 01 add %g2, %g1, %i1
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;
2007240: da 06 60 08 ld [ %i1 + 8 ], %o5
#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,
2007244: f2 07 60 0c ld [ %i5 + 0xc ], %i1
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;
2007248: de 00 80 01 ld [ %g2 + %g1 ], %o7
200724c: 85 2e 60 06 sll %i1, 6, %g2
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;
2007250: da 03 60 08 ld [ %o5 + 8 ], %o5
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;
2007254: 83 2e 60 04 sll %i1, 4, %g1
2007258: 82 20 80 01 sub %g2, %g1, %g1
200725c: 82 03 c0 01 add %o7, %g1, %g1
2007260: c4 00 60 04 ld [ %g1 + 4 ], %g2
uint32_t device,
uint32_t segment,
uint32_t page,
const void* buffer)
{
return rtems_fdisk_seg_verify (fd, device, segment,
2007264: 86 10 00 08 mov %o0, %g3
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",
2007268: 98 10 00 08 mov %o0, %o4
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;
200726c: da 27 bf e0 st %o5, [ %fp + -32 ]
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
2007270: 94 10 00 13 mov %l3, %o2
2007274: 96 10 00 19 mov %i1, %o3
2007278: 9a 10 00 14 mov %l4, %o5
200727c: c4 3f bf d0 std %g2, [ %fp + -48 ]
2007280: 90 10 00 1b mov %i3, %o0
2007284: 13 00 80 c9 sethi %hi(0x2032400), %o1
2007288: 7f ff f7 9c call 20050f8 <rtems_fdisk_printf>
200728c: 92 12 60 f8 or %o1, 0xf8, %o1 ! 20324f8 <__FUNCTION__.6882+0xc18>
device, segment, offset, size);
#endif
return ops->verify (sd, device, segment, offset, buffer, size);
2007290: d2 07 bf e0 ld [ %fp + -32 ], %o1
2007294: c4 1f bf d0 ldd [ %fp + -48 ], %g2
2007298: c2 02 60 0c ld [ %o1 + 0xc ], %g1
200729c: 90 10 00 02 mov %g2, %o0
20072a0: 92 10 00 13 mov %l3, %o1
20072a4: 94 10 00 19 mov %i1, %o2
20072a8: 96 10 00 03 mov %g3, %o3
20072ac: 98 10 00 10 mov %l0, %o4
20072b0: 9f c0 40 00 call %g1
20072b4: 9a 10 00 14 mov %l4, %o5
#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,
20072b8: 80 a2 20 00 cmp %o0, 0
20072bc: 02 80 00 e6 be 2007654 <rtems_fdisk_ioctl+0x124c>
20072c0: c8 07 bf cc ld [ %fp + -52 ], %g4
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
20072c4: c2 07 bf e4 ld [ %fp + -28 ], %g1
20072c8: 89 29 20 03 sll %g4, 3, %g4
20072cc: b2 00 40 04 add %g1, %g4, %i1
* 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;
20072d0: c4 16 60 02 lduh [ %i1 + 2 ], %g2
* 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);
20072d4: e6 06 a0 04 ld [ %i2 + 4 ], %l3
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))
20072d8: c2 06 e0 08 ld [ %i3 + 8 ], %g1
* 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;
20072dc: 84 08 bf fd and %g2, -3, %g2
20072e0: c4 36 60 02 sth %g2, [ %i1 + 2 ]
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)) +
20072e4: a9 2c e0 03 sll %l3, 3, %l4
((uint8_t*) &page_desc->flags) - ((uint8_t*) page_desc));
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
20072e8: 80 88 60 08 btst 8, %g1
20072ec: 02 80 00 12 be 2007334 <rtems_fdisk_ioctl+0xf2c> <== NEVER TAKEN
20072f0: a8 05 20 02 add %l4, 2, %l4
{
uint16_t flash_flags;
int ret;
ret = rtems_fdisk_seg_read (fd, sc, offset,
20072f4: 90 10 00 1b mov %i3, %o0
20072f8: 92 10 00 1d mov %i5, %o1
20072fc: 94 10 00 14 mov %l4, %o2
2007300: 96 07 bf fe add %fp, -2, %o3
2007304: 7f ff f7 9f call 2005180 <rtems_fdisk_seg_read>
2007308: 98 10 20 02 mov 2, %o4
&flash_flags, sizeof (flash_flags));
if (ret)
200730c: 82 92 20 00 orcc %o0, 0, %g1
2007310: 12 80 00 eb bne 20076bc <rtems_fdisk_ioctl+0x12b4> <== NEVER TAKEN
2007314: d8 17 bf fe lduh [ %fp + -2 ], %o4
return ret;
if ((flash_flags & page_desc->flags) != page_desc->flags)
2007318: c4 16 60 02 lduh [ %i1 + 2 ], %g2
200731c: 83 28 a0 10 sll %g2, 0x10, %g1
2007320: 84 0b 00 02 and %o4, %g2, %g2
2007324: 85 28 a0 10 sll %g2, 0x10, %g2
2007328: 80 a0 80 01 cmp %g2, %g1
200732c: 12 80 01 11 bne 2007770 <rtems_fdisk_ioctl+0x1368> <== NEVER TAKEN
2007330: 9b 30 60 10 srl %g1, 0x10, %o5
sc->device, sc->segment, page,
flash_flags, page_desc->flags);
return ret;
}
}
return rtems_fdisk_seg_write (fd, sc, offset,
2007334: 90 10 00 1b mov %i3, %o0
2007338: 92 10 00 1d mov %i5, %o1
200733c: 94 10 00 14 mov %l4, %o2
2007340: 96 06 60 02 add %i1, 2, %o3
2007344: 7f ff f7 d2 call 200528c <rtems_fdisk_seg_write>
2007348: 98 10 20 02 mov 2, %o4
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)
200734c: 82 92 20 00 orcc %o0, 0, %g1
2007350: 32 80 00 dc bne,a 20076c0 <rtems_fdisk_ioctl+0x12b8> <== NEVER TAKEN
2007354: e8 07 60 08 ld [ %i5 + 8 ], %l4 <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
2007358: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
sc->pages_used++;
200735c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
2007360: 84 00 bf ff add %g2, -1, %g2
sc->pages_used++;
2007364: 82 00 60 01 inc %g1
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
2007368: c4 27 60 1c st %g2, [ %i5 + 0x1c ]
sc->pages_used++;
200736c: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
/*
* 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);
2007370: 90 10 00 1b mov %i3, %o0
2007374: 7f ff f8 e2 call 20056fc <rtems_fdisk_queue_segment>
2007378: 92 10 00 1d mov %i5, %o1
/*
* 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)
200737c: c2 06 e0 08 ld [ %i3 + 8 ], %g1
2007380: 80 88 60 02 btst 2, %g1
2007384: 32 80 00 05 bne,a 2007398 <rtems_fdisk_ioctl+0xf90> <== NEVER TAKEN
2007388: f2 06 e0 30 ld [ %i3 + 0x30 ], %i1 <== NOT EXECUTED
rtems_fdisk_compact (fd);
200738c: 7f ff fa 87 call 2005da8 <rtems_fdisk_compact>
2007390: 90 10 00 1b mov %i3, %o0
* Count the number of elements on the list.
*/
static uint32_t
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
2007394: f2 06 e0 30 ld [ %i3 + 0x30 ], %i1
uint32_t count = 0;
while (sc)
2007398: 80 a6 60 00 cmp %i1, 0
200739c: 02 80 00 b8 be 200767c <rtems_fdisk_ioctl+0x1274> <== NEVER TAKEN
20073a0: 82 10 00 19 mov %i1, %g1
20073a4: 84 10 20 00 clr %g2
{
count++;
sc = sc->next;
20073a8: c2 00 40 00 ld [ %g1 ], %g1
rtems_fdisk_segment_count_queue (rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
uint32_t count = 0;
while (sc)
20073ac: 80 a0 60 00 cmp %g1, 0
20073b0: 12 bf ff fe bne 20073a8 <rtems_fdisk_ioctl+0xfa0>
20073b4: 84 00 a0 01 inc %g2
/*
* Is it time to compact the disk ?
*
* We override the background compaction configruation.
*/
if (rtems_fdisk_segment_count_queue (&fd->available) <=
20073b8: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
20073bc: 80 a0 40 02 cmp %g1, %g2
20073c0: 1a 80 00 af bcc 200767c <rtems_fdisk_ioctl+0x1274> <== NEVER TAKEN
20073c4: 01 00 00 00 nop
{
if (queue->head)
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
20073c8: c2 06 40 00 ld [ %i1 ], %g1
if (!queue->head)
20073cc: 80 a0 60 00 cmp %g1, 0
20073d0: 02 80 00 db be 200773c <rtems_fdisk_ioctl+0x1334> <== NEVER TAKEN
20073d4: c2 26 e0 30 st %g1, [ %i3 + 0x30 ]
queue->tail = 0;
queue->count--;
20073d8: c2 06 e0 38 ld [ %i3 + 0x38 ], %g1
20073dc: 82 00 7f ff add %g1, -1, %g1
20073e0: c2 26 e0 38 st %g1, [ %i3 + 0x38 ]
return ENOSPC;
}
}
#if RTEMS_FDISK_TRACE
if (fd->info_level >= 3)
20073e4: c2 06 e0 68 ld [ %i3 + 0x68 ], %g1
20073e8: 80 a0 60 02 cmp %g1, 2
20073ec: 18 80 00 c6 bgu 2007704 <rtems_fdisk_ioctl+0x12fc> <== NEVER TAKEN
20073f0: c0 26 40 00 clr [ %i1 ]
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
20073f4: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
20073f8: 80 a0 60 00 cmp %g1, 0
20073fc: 02 80 00 88 be 200761c <rtems_fdisk_ioctl+0x1214> <== NEVER TAKEN
2007400: fa 06 60 10 ld [ %i1 + 0x10 ], %i5
2007404: 10 80 00 05 b 2007418 <rtems_fdisk_ioctl+0x1010>
2007408: a6 10 20 00 clr %l3
200740c: 80 a4 c0 01 cmp %l3, %g1
2007410: 02 80 00 83 be 200761c <rtems_fdisk_ioctl+0x1214> <== NEVER TAKEN
2007414: ba 07 60 08 add %i5, 8, %i5
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2007418: c4 07 40 00 ld [ %i5 ], %g2
200741c: 80 a0 bf ff cmp %g2, -1
2007420: 32 bf ff fb bne,a 200740c <rtems_fdisk_ioctl+0x1004>
2007424: a6 04 e0 01 inc %l3
2007428: c4 07 60 04 ld [ %i5 + 4 ], %g2
200742c: 80 a0 bf ff cmp %g2, -1
2007430: 32 bf ff f7 bne,a 200740c <rtems_fdisk_ioctl+0x1004> <== NEVER TAKEN
2007434: a6 04 e0 01 inc %l3 <== NOT EXECUTED
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);
2007438: c8 06 e0 14 ld [ %i3 + 0x14 ], %g4
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++)
200743c: 07 00 80 ca sethi %hi(0x2032800), %g3
2007440: 80 a1 20 00 cmp %g4, 0
2007444: c4 00 e1 9c ld [ %g3 + 0x19c ], %g2
2007448: 02 80 00 0f be 2007484 <rtems_fdisk_ioctl+0x107c> <== NEVER TAKEN
200744c: 86 10 3f ff mov -1, %g3
2007450: 05 00 81 1d sethi %hi(0x2047400), %g2
2007454: da 00 a0 98 ld [ %g2 + 0x98 ], %o5 ! 2047498 <rtems_fdisk_crc16_factor>
2007458: 84 10 20 00 clr %g2
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
200745c: de 0c 00 02 ldub [ %l0 + %g2 ], %o7
2007460: 86 08 e0 ff and %g3, 0xff, %g3
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++)
2007464: 84 00 a0 01 inc %g2
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
2007468: 86 18 c0 0f xor %g3, %o7, %g3
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++)
200746c: 80 a0 80 04 cmp %g2, %g4
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
2007470: 87 28 e0 01 sll %g3, 1, %g3
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++)
2007474: 12 bf ff fa bne 200745c <rtems_fdisk_ioctl+0x1054>
2007478: c6 13 40 03 lduh [ %o5 + %g3 ], %g3
200747c: 85 28 e0 10 sll %g3, 0x10, %g2
2007480: 85 30 a0 10 srl %g2, 0x10, %g2
* 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;
2007484: c8 17 60 02 lduh [ %i5 + 2 ], %g4
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);
2007488: c6 37 40 00 sth %g3, [ %i5 ]
pd->block = block;
200748c: f0 27 60 04 st %i0, [ %i5 + 4 ]
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: " \
2007490: da 06 40 00 ld [ %i1 ], %o5
if (rtems_fdisk_page_desc_erased (pd))
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
pd->block = block;
bc->segment = sc;
2007494: f2 25 40 16 st %i1, [ %l5 + %l6 ]
bc->page = page;
2007498: e6 26 a0 04 st %l3, [ %i2 + 4 ]
* 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;
200749c: 88 09 3f fe and %g4, -2, %g4
20074a0: c8 37 60 02 sth %g4, [ %i5 + 2 ]
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: " \
20074a4: 07 00 80 c7 sethi %hi(0x2031c00), %g3
20074a8: d6 06 60 08 ld [ %i1 + 8 ], %o3
20074ac: d8 06 60 0c ld [ %i1 + 0xc ], %o4
20074b0: de 06 60 1c ld [ %i1 + 0x1c ], %o7
20074b4: d0 06 60 20 ld [ %i1 + 0x20 ], %o0
20074b8: e8 06 60 24 ld [ %i1 + 0x24 ], %l4
20074bc: 80 a3 60 00 cmp %o5, 0
20074c0: 02 80 00 04 be 20074d0 <rtems_fdisk_ioctl+0x10c8> <== ALWAYS TAKEN
20074c4: 86 10 e3 40 or %g3, 0x340, %g3
20074c8: 07 00 80 c7 sethi %hi(0x2031c00), %g3 <== NOT EXECUTED
20074cc: 86 10 e3 38 or %g3, 0x338, %g3 ! 2031f38 <__FUNCTION__.6882+0x658><== NOT EXECUTED
20074d0: 89 29 20 10 sll %g4, 0x10, %g4
20074d4: 89 31 20 10 srl %g4, 0x10, %g4
20074d8: 94 10 00 18 mov %i0, %o2
20074dc: 9a 10 00 13 mov %l3, %o5
20074e0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20074e4: de 23 a0 60 st %o7, [ %sp + 0x60 ]
20074e8: d0 23 a0 64 st %o0, [ %sp + 0x64 ]
20074ec: c6 23 a0 6c st %g3, [ %sp + 0x6c ]
20074f0: c8 23 a0 70 st %g4, [ %sp + 0x70 ]
20074f4: c4 23 a0 74 st %g2, [ %sp + 0x74 ]
20074f8: f0 23 a0 78 st %i0, [ %sp + 0x78 ]
20074fc: 13 00 80 c9 sethi %hi(0x2032400), %o1
2007500: e8 23 a0 68 st %l4, [ %sp + 0x68 ]
2007504: 92 12 62 28 or %o1, 0x228, %o1
2007508: 7f ff f6 da call 2005070 <rtems_fdisk_info>
200750c: 90 10 00 1b mov %i3, %o0
/*
* 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);
2007510: d4 06 60 18 ld [ %i1 + 0x18 ], %o2
2007514: 90 10 00 1b mov %i3, %o0
2007518: 92 10 00 19 mov %i1, %o1
200751c: 94 04 c0 0a add %l3, %o2, %o2
2007520: 7f ff f7 92 call 2005368 <rtems_fdisk_seg_write_page>
2007524: 96 10 00 10 mov %l0, %o3
if (ret)
2007528: b0 92 20 00 orcc %o0, 0, %i0
200752c: 22 80 00 86 be,a 2007744 <rtems_fdisk_ioctl+0x133c> <== ALWAYS TAKEN
2007530: 90 10 00 1b mov %i3, %o0
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: write page failed: " \
2007534: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED
2007538: 40 00 73 60 call 20242b8 <strerror> <== NOT EXECUTED
200753c: fa 06 60 0c ld [ %i1 + 0xc ], %i5 <== NOT EXECUTED
2007540: 13 00 80 c9 sethi %hi(0x2032400), %o1 <== NOT EXECUTED
2007544: 9a 10 00 08 mov %o0, %o5 <== NOT EXECUTED
2007548: f0 23 a0 5c st %i0, [ %sp + 0x5c ] <== NOT EXECUTED
200754c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2007550: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED
2007554: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2007558: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
200755c: 7f ff f6 c5 call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
2007560: 98 10 00 13 mov %l3, %o4 <== NOT EXECUTED
{
sc->pages_active++;
}
}
rtems_fdisk_queue_segment (fd, sc);
2007564: 90 10 00 1b mov %i3, %o0
2007568: 7f ff f8 65 call 20056fc <rtems_fdisk_queue_segment>
200756c: 92 10 00 19 mov %i1, %o1
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->unavail_blocks;
if (starvation)
2007570: c4 06 e0 24 ld [ %i3 + 0x24 ], %g2
2007574: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1
2007578: 80 a0 80 01 cmp %g2, %g1
200757c: 1a 80 00 08 bcc 200759c <rtems_fdisk_ioctl+0x1194>
2007580: 80 a6 20 00 cmp %i0, 0
fd->starvations++;
2007584: c2 06 e0 6c ld [ %i3 + 0x6c ], %g1
}
rtems_fdisk_queue_segment (fd, sc);
if (rtems_fdisk_is_erased_blocks_starvation (fd))
rtems_fdisk_compact (fd);
2007588: 90 10 00 1b mov %i3, %o0
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->unavail_blocks;
if (starvation)
fd->starvations++;
200758c: 82 00 60 01 inc %g1
}
rtems_fdisk_queue_segment (fd, sc);
if (rtems_fdisk_is_erased_blocks_starvation (fd))
rtems_fdisk_compact (fd);
2007590: 7f ff fa 06 call 2005da8 <rtems_fdisk_compact>
2007594: c2 26 e0 6c st %g1, [ %i3 + 0x6c ]
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)
2007598: 80 a6 20 00 cmp %i0, 0
200759c: 12 80 00 95 bne 20077f0 <rtems_fdisk_ioctl+0x13e8> <== NEVER TAKEN
20075a0: fa 07 bf f4 ld [ %fp + -12 ], %i5
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)
20075a4: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1
20075a8: a2 04 60 01 inc %l1
20075ac: a0 04 00 01 add %l0, %g1, %l0
20075b0: c2 07 bf ec ld [ %fp + -20 ], %g1
20075b4: 80 a4 40 01 cmp %l1, %g1
20075b8: 32 bf fe fa bne,a 20071a0 <rtems_fdisk_ioctl+0xd98> <== NEVER TAKEN
20075bc: f0 04 bf f0 ld [ %l2 + -16 ], %i0 <== NOT EXECUTED
20075c0: f2 05 e0 10 ld [ %l7 + 0x10 ], %i1
20075c4: a8 10 00 17 mov %l7, %l4
20075c8: c4 07 bf f0 ld [ %fp + -16 ], %g2
20075cc: a4 04 a0 10 add %l2, 0x10, %l2
20075d0: 84 00 a0 01 inc %g2
20075d4: 10 bf fe e4 b 2007164 <rtems_fdisk_ioctl+0xd5c>
20075d8: c4 27 bf f0 st %g2, [ %fp + -16 ]
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
{
rtems_fdisk_error ("write-block: block out of range: %d", block);
20075dc: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
20075e0: fa 07 bf f4 ld [ %fp + -12 ], %i5 <== NOT EXECUTED
20075e4: b4 10 00 17 mov %l7, %i2 <== NOT EXECUTED
20075e8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
20075ec: 7f ff f7 9d call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
20075f0: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
20075f4: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
20075f8: c2 06 a0 04 ld [ %i2 + 4 ], %g1
20075fc: d0 06 a0 08 ld [ %i2 + 8 ], %o0
2007600: 9f c0 40 00 call %g1
2007604: d2 26 a0 0c st %o1, [ %i2 + 0xc ]
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);
2007608: c2 07 20 9c ld [ %i4 + 0x9c ], %g1
200760c: c4 07 bf e8 ld [ %fp + -24 ], %g2
2007610: ba 00 40 1d add %g1, %i5, %i5
break;
2007614: 10 bf fc 5b b 2006780 <rtems_fdisk_ioctl+0x378>
2007618: c0 20 80 00 clr [ %g2 ]
return ret;
}
}
rtems_fdisk_error ("write-block: no erased page descs in segment: %d-%d",
200761c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2007620: d4 06 60 0c ld [ %i1 + 0xc ], %o2 <== NOT EXECUTED
2007624: fa 07 bf f4 ld [ %fp + -12 ], %i5 <== NOT EXECUTED
2007628: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
200762c: 7f ff f7 8d call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2007630: 90 12 22 f0 or %o0, 0x2f0, %o0 ! 20326f0 <__FUNCTION__.6882+0xe10><== NOT EXECUTED
sc->device, sc->segment);
sc->failed = true;
2007634: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2007638: b4 10 00 17 mov %l7, %i2 <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, sc);
200763c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2007640: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2007644: 7f ff f8 2e call 20056fc <rtems_fdisk_queue_segment> <== NOT EXECUTED
2007648: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
200764c: 10 bf ff eb b 20075f8 <rtems_fdisk_ioctl+0x11f0> <== NOT EXECUTED
2007650: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
*/
if (rtems_fdisk_seg_verify_page (fd, sc->device, sc->segment,
bc->page + sc->pages_desc, buffer) == 0)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d=>%02d-%03d-%03d: page verified",
2007654: d6 07 60 08 ld [ %i5 + 8 ], %o3
2007658: d8 07 60 0c ld [ %i5 + 0xc ], %o4
200765c: da 06 a0 04 ld [ %i2 + 4 ], %o5
2007660: 90 10 00 1b mov %i3, %o0
2007664: 13 00 80 c9 sethi %hi(0x2032400), %o1
2007668: 94 10 00 18 mov %i0, %o2
200766c: 7f ff f6 81 call 2005070 <rtems_fdisk_info>
2007670: 92 12 61 20 or %o1, 0x120, %o1
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)
2007674: 10 bf ff cd b 20075a8 <rtems_fdisk_ioctl+0x11a0>
2007678: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1
*
* We override the background compaction configruation.
*/
if (rtems_fdisk_segment_count_queue (&fd->available) <=
fd->avail_compact_segs)
rtems_fdisk_compact (fd);
200767c: 7f ff f9 cb call 2005da8 <rtems_fdisk_compact> <== NOT EXECUTED
2007680: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2007684: f2 06 e0 30 ld [ %i3 + 0x30 ], %i1 <== NOT EXECUTED
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
2007688: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
200768c: 32 bf ff 50 bne,a 20073cc <rtems_fdisk_ioctl+0xfc4> <== NOT EXECUTED
2007690: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
{
/*
* 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))
2007694: c2 06 e0 08 ld [ %i3 + 8 ], %g1 <== NOT EXECUTED
2007698: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
200769c: 12 80 00 3f bne 2007798 <rtems_fdisk_ioctl+0x1390> <== NOT EXECUTED
20076a0: fa 07 bf f4 ld [ %fp + -12 ], %i5 <== NOT EXECUTED
20076a4: b4 10 00 17 mov %l7, %i2 <== NOT EXECUTED
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
if (!sc)
{
rtems_fdisk_error ("write-block: no available pages");
20076a8: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
20076ac: 7f ff f7 6d call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
20076b0: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 20325e0 <__FUNCTION__.6882+0xd00><== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
20076b4: 10 bf ff d1 b 20075f8 <rtems_fdisk_ioctl+0x11f0> <== NOT EXECUTED
20076b8: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
ret = rtems_fdisk_seg_write_page_desc_flags (fd, sc, bc->page, pd);
if (ret)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: " \
20076bc: e8 07 60 08 ld [ %i5 + 8 ], %l4 <== NOT EXECUTED
20076c0: e6 07 60 0c ld [ %i5 + 0xc ], %l3 <== NOT EXECUTED
20076c4: f2 06 a0 04 ld [ %i2 + 4 ], %i1 <== NOT EXECUTED
20076c8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
20076cc: 40 00 72 fb call 20242b8 <strerror> <== NOT EXECUTED
20076d0: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED
20076d4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
20076d8: 9a 10 00 08 mov %o0, %o5 <== NOT EXECUTED
20076dc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED
20076e0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20076e4: 13 00 80 c9 sethi %hi(0x2032400), %o1 <== NOT EXECUTED
20076e8: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
20076ec: 92 12 61 a0 or %o1, 0x1a0, %o1 <== NOT EXECUTED
20076f0: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
20076f4: 7f ff f6 5f call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
20076f8: 98 10 00 19 mov %i1, %o4 <== NOT EXECUTED
/*
* 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);
20076fc: 10 bf ff 1e b 2007374 <rtems_fdisk_ioctl+0xf6c> <== NOT EXECUTED
2007700: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
if (fd->info_level >= 3)
{
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
2007704: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2007708: 94 07 bf f8 add %fp, -8, %o2 <== NOT EXECUTED
200770c: 7f ff f5 f3 call 2004ed8 <rtems_fdisk_queue_status> <== NOT EXECUTED
2007710: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
rtems_fdisk_info (fd, " write:%d=>%02d-%03d: queue check: %s",
2007714: d6 06 60 08 ld [ %i1 + 8 ], %o3 <== NOT EXECUTED
2007718: d8 06 60 0c ld [ %i1 + 0xc ], %o4 <== NOT EXECUTED
200771c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2007720: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
2007724: 13 00 80 c9 sethi %hi(0x2032400), %o1 <== NOT EXECUTED
2007728: 9a 07 bf f8 add %fp, -8, %o5 <== NOT EXECUTED
200772c: 7f ff f6 51 call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
2007730: 92 12 62 00 or %o1, 0x200, %o1 <== NOT EXECUTED
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
2007734: 10 bf ff 31 b 20073f8 <rtems_fdisk_ioctl+0xff0> <== NOT EXECUTED
2007738: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
if (!queue->head)
queue->tail = 0;
200773c: 10 bf ff 27 b 20073d8 <rtems_fdisk_ioctl+0xfd0> <== NOT EXECUTED
2007740: c0 26 e0 34 clr [ %i3 + 0x34 ] <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
ret = rtems_fdisk_seg_write_page_desc (fd, sc, page, pd);
2007744: 92 10 00 19 mov %i1, %o1
2007748: 94 10 00 13 mov %l3, %o2
200774c: 7f ff f6 f6 call 2005324 <rtems_fdisk_seg_write_page_desc>
2007750: 96 10 00 1d mov %i5, %o3
if (ret)
2007754: b0 92 20 00 orcc %o0, 0, %i0
2007758: 32 80 00 18 bne,a 20077b8 <rtems_fdisk_ioctl+0x13b0> <== NEVER TAKEN
200775c: e8 06 60 08 ld [ %i1 + 8 ], %l4 <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active++;
2007760: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
2007764: 82 00 60 01 inc %g1
2007768: 10 bf ff 7f b 2007564 <rtems_fdisk_ioctl+0x115c>
200776c: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
&flash_flags, sizeof (flash_flags));
if (ret)
return ret;
if ((flash_flags & page_desc->flags) != page_desc->flags)
{
rtems_fdisk_error (" seg-write-page-flags: %02d-%03d-%03d: "
2007770: d2 07 60 08 ld [ %i5 + 8 ], %o1 <== NOT EXECUTED
2007774: d4 07 60 0c ld [ %i5 + 0xc ], %o2 <== NOT EXECUTED
2007778: 99 2b 20 10 sll %o4, 0x10, %o4 <== NOT EXECUTED
200777c: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
2007780: 11 00 80 c9 sethi %hi(0x2032400), %o0 <== NOT EXECUTED
2007784: 99 33 20 10 srl %o4, 0x10, %o4 <== NOT EXECUTED
2007788: 7f ff f7 36 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
200778c: 90 12 21 50 or %o0, 0x150, %o0 <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
2007790: 10 bf fe f3 b 200735c <rtems_fdisk_ioctl+0xf54> <== NOT EXECUTED
2007794: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 <== NOT EXECUTED
/*
* 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))
rtems_fdisk_compact (fd);
2007798: 7f ff f9 84 call 2005da8 <rtems_fdisk_compact> <== NOT EXECUTED
200779c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20077a0: f2 06 e0 30 ld [ %i3 + 0x30 ], %i1 <== NOT EXECUTED
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
if (queue->head)
20077a4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20077a8: 32 bf ff 09 bne,a 20073cc <rtems_fdisk_ioctl+0xfc4> <== NOT EXECUTED
20077ac: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
20077b0: 10 bf ff bd b 20076a4 <rtems_fdisk_ioctl+0x129c> <== NOT EXECUTED
20077b4: fa 07 bf f4 ld [ %fp + -12 ], %i5 <== NOT EXECUTED
{
ret = rtems_fdisk_seg_write_page_desc (fd, sc, page, pd);
if (ret)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: " \
20077b8: e6 06 60 0c ld [ %i1 + 0xc ], %l3 <== NOT EXECUTED
20077bc: 40 00 72 bf call 20242b8 <strerror> <== NOT EXECUTED
20077c0: fa 06 a0 04 ld [ %i2 + 4 ], %i5 <== NOT EXECUTED
20077c4: 13 00 80 c9 sethi %hi(0x2032400), %o1 <== NOT EXECUTED
20077c8: 9a 10 00 08 mov %o0, %o5 <== NOT EXECUTED
20077cc: f0 23 a0 5c st %i0, [ %sp + 0x5c ] <== NOT EXECUTED
20077d0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20077d4: 92 12 62 b0 or %o1, 0x2b0, %o1 <== NOT EXECUTED
20077d8: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
20077dc: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
20077e0: 7f ff f6 24 call 2005070 <rtems_fdisk_info> <== NOT EXECUTED
20077e4: 98 10 00 1d mov %i5, %o4 <== NOT EXECUTED
{
sc->pages_active++;
}
}
rtems_fdisk_queue_segment (fd, sc);
20077e8: 10 bf ff 60 b 2007568 <rtems_fdisk_ioctl+0x1160> <== NOT EXECUTED
20077ec: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20077f0: 10 bf ff 81 b 20075f4 <rtems_fdisk_ioctl+0x11ec> <== NOT EXECUTED
20077f4: b4 10 00 17 mov %l7, %i2 <== NOT EXECUTED
20077f8: b4 10 00 14 mov %l4, %i2
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
20077fc: 10 bf ff 7f b 20075f8 <rtems_fdisk_ioctl+0x11f0>
2007800: 92 10 20 00 clr %o1
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
{
if (!fd->devices[device].segments)
return ENOMEM;
2007804: 10 bf fc 2f b 20068c0 <rtems_fdisk_ioctl+0x4b8> <== NOT EXECUTED
2007808: 90 10 20 0c mov 0xc, %o0 <== NOT EXECUTED
020056fc <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)
{
20056fc: 9d e3 bf 90 save %sp, -112, %sp
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " queue-seg:%02d-%03d: p=%d a=%d u=%d b=%d f=%s n=%s",
2005700: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2005704: 05 00 80 c7 sethi %hi(0x2031c00), %g2
* @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)
{
2005708: b4 10 00 19 mov %i1, %i2
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " queue-seg:%02d-%03d: p=%d a=%d u=%d b=%d f=%s n=%s",
200570c: d4 06 60 08 ld [ %i1 + 8 ], %o2
2005710: d6 06 60 0c ld [ %i1 + 0xc ], %o3
2005714: d8 06 60 14 ld [ %i1 + 0x14 ], %o4
2005718: da 06 60 1c ld [ %i1 + 0x1c ], %o5
200571c: c8 06 60 20 ld [ %i1 + 0x20 ], %g4
2005720: c6 06 60 24 ld [ %i1 + 0x24 ], %g3
2005724: 80 a0 60 00 cmp %g1, 0
2005728: 02 80 00 04 be 2005738 <rtems_fdisk_queue_segment+0x3c> <== ALWAYS TAKEN
200572c: 84 10 a3 30 or %g2, 0x330, %g2
2005730: 05 00 80 c7 sethi %hi(0x2031c00), %g2 <== NOT EXECUTED
2005734: 84 10 a3 28 or %g2, 0x328, %g2 ! 2031f28 <__FUNCTION__.6882+0x648><== NOT EXECUTED
2005738: c2 06 80 00 ld [ %i2 ], %g1
200573c: 80 a0 60 00 cmp %g1, 0
2005740: 03 00 80 c7 sethi %hi(0x2031c00), %g1
2005744: 02 80 00 04 be 2005754 <rtems_fdisk_queue_segment+0x58>
2005748: 82 10 63 40 or %g1, 0x340, %g1 ! 2031f40 <__FUNCTION__.6882+0x660>
200574c: 03 00 80 c7 sethi %hi(0x2031c00), %g1
2005750: 82 10 63 38 or %g1, 0x338, %g1 ! 2031f38 <__FUNCTION__.6882+0x658>
2005754: c2 23 a0 68 st %g1, [ %sp + 0x68 ]
2005758: c8 23 a0 5c st %g4, [ %sp + 0x5c ]
200575c: c6 23 a0 60 st %g3, [ %sp + 0x60 ]
2005760: c4 23 a0 64 st %g2, [ %sp + 0x64 ]
2005764: 90 10 00 18 mov %i0, %o0
2005768: 13 00 80 c7 sethi %hi(0x2031c00), %o1
200576c: 7f ff fe 41 call 2005070 <rtems_fdisk_info>
2005770: 92 12 63 48 or %o1, 0x348, %o1 ! 2031f48 <__FUNCTION__.6882+0x668>
/*
* If the segment has failed then check the failed queue and append
* if not failed.
*/
if (sc->failed)
2005774: c2 06 a0 28 ld [ %i2 + 0x28 ], %g1
2005778: 80 a0 60 00 cmp %g1, 0
200577c: 22 80 00 19 be,a 20057e0 <rtems_fdisk_queue_segment+0xe4><== ALWAYS TAKEN
2005780: 92 10 00 1a mov %i2, %o1
*/
static bool
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
2005784: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED
while (it)
2005788: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200578c: 22 80 00 76 be,a 2005964 <rtems_fdisk_queue_segment+0x268><== NOT EXECUTED
2005790: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
{
if (it == sc)
2005794: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
2005798: 32 80 00 06 bne,a 20057b0 <rtems_fdisk_queue_segment+0xb4><== NOT EXECUTED
200579c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
20057a0: 30 80 00 74 b,a 2005970 <rtems_fdisk_queue_segment+0x274><== NOT EXECUTED
20057a4: 02 80 00 73 be 2005970 <rtems_fdisk_queue_segment+0x274> <== NOT EXECUTED
20057a8: 01 00 00 00 nop <== NOT EXECUTED
return true;
it = it->next;
20057ac: c2 00 40 00 ld [ %g1 ], %g1 <== 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)
20057b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20057b4: 32 bf ff fc bne,a 20057a4 <rtems_fdisk_queue_segment+0xa8><== NOT EXECUTED
20057b8: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
{
sc->next = 0;
if (queue->head)
{
queue->tail->next = sc;
20057bc: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = 0;
20057c0: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
if (queue->head)
{
queue->tail->next = sc;
20057c4: f4 20 40 00 st %i2, [ %g1 ] <== NOT EXECUTED
queue->tail = sc;
20057c8: f4 26 20 58 st %i2, [ %i0 + 0x58 ] <== NOT EXECUTED
else
{
queue->head = queue->tail = sc;
}
queue->count++;
20057cc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
20057d0: 82 00 60 01 inc %g1 <== NOT EXECUTED
20057d4: c2 26 20 5c st %g1, [ %i0 + 0x5c ] <== NOT EXECUTED
20057d8: 81 c7 e0 08 ret <== NOT EXECUTED
20057dc: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* Remove the queue from the available or used queue.
*/
rtems_fdisk_segment_queue_remove (&fd->available, sc);
20057e0: ba 06 20 30 add %i0, 0x30, %i5
20057e4: 7f ff fd 9c call 2004e54 <rtems_fdisk_segment_queue_remove>
20057e8: 90 10 00 1d mov %i5, %o0
rtems_fdisk_segment_queue_remove (&fd->used, sc);
20057ec: b8 06 20 3c add %i0, 0x3c, %i4
20057f0: 92 10 00 1a mov %i2, %o1
20057f4: 7f ff fd 98 call 2004e54 <rtems_fdisk_segment_queue_remove>
20057f8: 90 10 00 1c mov %i4, %o0
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
20057fc: c6 06 a0 14 ld [ %i2 + 0x14 ], %g3
2005800: c8 06 a0 1c ld [ %i2 + 0x1c ], %g4
2005804: c2 06 a0 20 ld [ %i2 + 0x20 ], %g1
2005808: c4 06 a0 24 ld [ %i2 + 0x24 ], %g2
200580c: b2 00 40 04 add %g1, %g4, %i1
2005810: 84 06 40 02 add %i1, %g2, %g2
* 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)
2005814: 80 a0 c0 02 cmp %g3, %g2
2005818: 02 80 00 29 be 20058bc <rtems_fdisk_queue_segment+0x1c0>
200581c: 80 a1 20 00 cmp %g4, 0
* 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;
2005820: f2 06 20 30 ld [ %i0 + 0x30 ], %i1
while (seg)
2005824: 80 a6 60 00 cmp %i1, 0
2005828: 22 80 00 56 be,a 2005980 <rtems_fdisk_queue_segment+0x284>
200582c: c0 26 80 00 clr [ %i2 ]
*
* @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)
2005830: da 06 60 1c ld [ %i1 + 0x1c ], %o5
2005834: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005838: de 06 60 14 ld [ %i1 + 0x14 ], %o7
200583c: c8 06 60 20 ld [ %i1 + 0x20 ], %g4
2005840: b8 20 c0 02 sub %g3, %g2, %i4
*
* @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)
2005844: 82 03 40 01 add %o5, %g1, %g1
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005848: 82 23 c0 01 sub %o7, %g1, %g1
200584c: 82 20 40 04 sub %g1, %g4, %g1
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
while (seg)
{
if (rtems_fdisk_seg_pages_available (sc) <
2005850: 80 a7 00 01 cmp %i4, %g1
2005854: 3a 80 00 0e bcc,a 200588c <rtems_fdisk_queue_segment+0x190>
2005858: f2 06 40 00 ld [ %i1 ], %i1
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
200585c: 7f ff ff 7f call 2005658 <rtems_fdisk_segment_queue_insert_before>
2005860: 91 e8 00 1d restore %g0, %i5, %o0
*
* @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)
2005864: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005868: c6 06 60 14 ld [ %i1 + 0x14 ], %g3
200586c: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
*
* @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)
2005870: 82 01 00 01 add %g4, %g1, %g1
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005874: 82 20 c0 01 sub %g3, %g1, %g1
2005878: 82 20 40 02 sub %g1, %g2, %g1
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
while (seg)
{
if (rtems_fdisk_seg_pages_available (sc) <
200587c: 80 a7 00 01 cmp %i4, %g1
2005880: 0a bf ff f7 bcs 200585c <rtems_fdisk_queue_segment+0x160> <== NEVER TAKEN
2005884: 01 00 00 00 nop
rtems_fdisk_seg_pages_available (seg))
break;
seg = seg->next;
2005888: f2 06 40 00 ld [ %i1 ], %i1
* 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)
200588c: 80 a6 60 00 cmp %i1, 0
2005890: 32 bf ff f5 bne,a 2005864 <rtems_fdisk_queue_segment+0x168>
2005894: c8 06 60 1c ld [ %i1 + 0x1c ], %g4
{
sc->next = 0;
if (queue->head)
{
queue->tail->next = sc;
2005898: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = 0;
200589c: c0 26 80 00 clr [ %i2 ]
if (queue->head)
{
queue->tail->next = sc;
20058a0: f4 20 40 00 st %i2, [ %g1 ]
queue->tail = sc;
20058a4: f4 26 20 34 st %i2, [ %i0 + 0x34 ]
else
{
queue->head = queue->tail = sc;
}
queue->count++;
20058a8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
20058ac: 82 00 60 01 inc %g1
20058b0: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
20058b4: 81 c7 e0 08 ret
20058b8: 81 e8 00 00 restore
* to background erase perform the erase now.
*
*/
if (rtems_fdisk_seg_pages_available (sc) == 0)
{
if (sc->pages_active)
20058bc: 22 80 00 1b be,a 2005928 <rtems_fdisk_queue_segment+0x22c><== NEVER TAKEN
20058c0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
/*
* 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;
20058c4: f2 06 20 3c ld [ %i0 + 0x3c ], %i1
while (seg)
20058c8: 80 a6 60 00 cmp %i1, 0
20058cc: 22 80 00 35 be,a 20059a0 <rtems_fdisk_queue_segment+0x2a4>
20058d0: c0 26 80 00 clr [ %i2 ]
{
if (sc->pages_used > seg->pages_used)
20058d4: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
20058d8: 80 a0 40 02 cmp %g1, %g2
20058dc: 28 80 00 07 bleu,a 20058f8 <rtems_fdisk_queue_segment+0x1fc>
20058e0: f2 06 40 00 ld [ %i1 ], %i1
20058e4: 30 80 00 25 b,a 2005978 <rtems_fdisk_queue_segment+0x27c>
20058e8: 80 a0 80 01 cmp %g2, %g1
20058ec: 0a 80 00 23 bcs 2005978 <rtems_fdisk_queue_segment+0x27c> <== NEVER TAKEN
20058f0: 01 00 00 00 nop
break;
seg = seg->next;
20058f4: f2 06 40 00 ld [ %i1 ], %i1
* 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)
20058f8: 80 a6 60 00 cmp %i1, 0
20058fc: 32 bf ff fb bne,a 20058e8 <rtems_fdisk_queue_segment+0x1ec>
2005900: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
{
sc->next = 0;
if (queue->head)
{
queue->tail->next = sc;
2005904: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = 0;
2005908: c0 26 80 00 clr [ %i2 ]
if (queue->head)
{
queue->tail->next = sc;
200590c: f4 20 40 00 st %i2, [ %g1 ]
queue->tail = sc;
2005910: f4 26 20 40 st %i2, [ %i0 + 0x40 ]
else
{
queue->head = queue->tail = sc;
}
queue->count++;
2005914: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
2005918: 82 00 60 01 inc %g1
200591c: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
2005920: 81 c7 e0 08 ret
2005924: 81 e8 00 00 restore
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
2005928: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200592c: 02 80 00 18 be 200598c <rtems_fdisk_queue_segment+0x290> <== NOT EXECUTED
2005930: 01 00 00 00 nop <== NOT EXECUTED
{
if (sc)
{
sc->next = 0;
if (queue->head)
2005934: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
2005938: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200593c: 02 80 00 16 be 2005994 <rtems_fdisk_queue_segment+0x298> <== NOT EXECUTED
2005940: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
{
queue->tail->next = sc;
2005944: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 <== NOT EXECUTED
2005948: f4 20 40 00 st %i2, [ %g1 ] <== NOT EXECUTED
queue->tail = sc;
200594c: f4 26 20 4c st %i2, [ %i0 + 0x4c ] <== NOT EXECUTED
else
{
queue->head = queue->tail = sc;
}
queue->count++;
2005950: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 <== NOT EXECUTED
2005954: 82 00 60 01 inc %g1 <== NOT EXECUTED
2005958: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED
200595c: 81 c7 e0 08 ret <== NOT EXECUTED
2005960: 81 e8 00 00 restore <== NOT EXECUTED
queue->tail->next = sc;
queue->tail = sc;
}
else
{
queue->head = queue->tail = sc;
2005964: f4 26 20 58 st %i2, [ %i0 + 0x58 ] <== NOT EXECUTED
2005968: 10 bf ff 99 b 20057cc <rtems_fdisk_queue_segment+0xd0> <== NOT EXECUTED
200596c: f4 26 20 54 st %i2, [ %i0 + 0x54 ] <== NOT EXECUTED
2005970: 81 c7 e0 08 ret <== NOT EXECUTED
2005974: 81 e8 00 00 restore <== NOT EXECUTED
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
2005978: 7f ff ff 38 call 2005658 <rtems_fdisk_segment_queue_insert_before>
200597c: 91 e8 00 1c restore %g0, %i4, %o0
queue->tail->next = sc;
queue->tail = sc;
}
else
{
queue->head = queue->tail = sc;
2005980: f4 26 20 34 st %i2, [ %i0 + 0x34 ]
2005984: 10 bf ff c9 b 20058a8 <rtems_fdisk_queue_segment+0x1ac>
2005988: f4 26 20 30 st %i2, [ %i0 + 0x30 ]
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
else
rtems_fdisk_erase_segment (fd, sc);
200598c: 7f ff fe d4 call 20054dc <rtems_fdisk_erase_segment> <== NOT EXECUTED
2005990: 93 e8 00 1a restore %g0, %i2, %o1 <== NOT EXECUTED
queue->tail->next = sc;
queue->tail = sc;
}
else
{
queue->head = queue->tail = sc;
2005994: f4 26 20 4c st %i2, [ %i0 + 0x4c ] <== NOT EXECUTED
2005998: 10 bf ff ee b 2005950 <rtems_fdisk_queue_segment+0x254> <== NOT EXECUTED
200599c: f4 26 20 48 st %i2, [ %i0 + 0x48 ] <== NOT EXECUTED
20059a0: f4 26 20 40 st %i2, [ %i0 + 0x40 ]
20059a4: 10 bf ff dc b 2005914 <rtems_fdisk_queue_segment+0x218>
20059a8: f4 26 20 3c st %i2, [ %i0 + 0x3c ]
02004ed8 <rtems_fdisk_queue_status>:
*/
static bool
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
2004ed8: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
while (it)
2004edc: 80 a0 60 00 cmp %g1, 0
2004ee0: 02 80 00 0e be 2004f18 <rtems_fdisk_queue_status+0x40> <== NEVER TAKEN
2004ee4: 84 10 20 2d mov 0x2d, %g2
{
if (it == sc)
2004ee8: 80 a2 40 01 cmp %o1, %g1
2004eec: 12 80 00 06 bne 2004f04 <rtems_fdisk_queue_status+0x2c>
2004ef0: 84 10 20 41 mov 0x41, %g2
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' : '-';
2004ef4: 10 80 00 0a b 2004f1c <rtems_fdisk_queue_status+0x44>
2004ef8: c4 2a 80 00 stb %g2, [ %o2 ]
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
2004efc: 02 80 00 07 be 2004f18 <rtems_fdisk_queue_status+0x40>
2004f00: 84 10 20 41 mov 0x41, %g2
return true;
it = it->next;
2004f04: c2 00 40 00 ld [ %g1 ], %g1
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)
2004f08: 80 a0 60 00 cmp %g1, 0
2004f0c: 12 bf ff fc bne 2004efc <rtems_fdisk_queue_status+0x24>
2004f10: 80 a2 40 01 cmp %o1, %g1
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' : '-';
2004f14: 84 10 20 2d mov 0x2d, %g2
2004f18: c4 2a 80 00 stb %g2, [ %o2 ]
*/
static bool
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
2004f1c: c2 02 20 3c ld [ %o0 + 0x3c ], %g1
while (it)
2004f20: 80 a0 60 00 cmp %g1, 0
2004f24: 02 80 00 0e be 2004f5c <rtems_fdisk_queue_status+0x84> <== NEVER TAKEN
2004f28: 84 10 20 2d mov 0x2d, %g2
{
if (it == sc)
2004f2c: 80 a2 40 01 cmp %o1, %g1
2004f30: 12 80 00 06 bne 2004f48 <rtems_fdisk_queue_status+0x70>
2004f34: 84 10 20 55 mov 0x55, %g2
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' : '-';
2004f38: 10 80 00 0a b 2004f60 <rtems_fdisk_queue_status+0x88>
2004f3c: c4 2a a0 01 stb %g2, [ %o2 + 1 ]
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
2004f40: 02 80 00 07 be 2004f5c <rtems_fdisk_queue_status+0x84>
2004f44: 84 10 20 55 mov 0x55, %g2
return true;
it = it->next;
2004f48: c2 00 40 00 ld [ %g1 ], %g1
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)
2004f4c: 80 a0 60 00 cmp %g1, 0
2004f50: 12 bf ff fc bne 2004f40 <rtems_fdisk_queue_status+0x68>
2004f54: 80 a2 40 01 cmp %o1, %g1
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' : '-';
2004f58: 84 10 20 2d mov 0x2d, %g2
2004f5c: c4 2a a0 01 stb %g2, [ %o2 + 1 ]
*/
static bool
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
2004f60: c2 02 20 48 ld [ %o0 + 0x48 ], %g1
while (it)
2004f64: 80 a0 60 00 cmp %g1, 0
2004f68: 02 80 00 0e be 2004fa0 <rtems_fdisk_queue_status+0xc8> <== ALWAYS TAKEN
2004f6c: 84 10 20 2d mov 0x2d, %g2
{
if (it == sc)
2004f70: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
2004f74: 12 80 00 06 bne 2004f8c <rtems_fdisk_queue_status+0xb4> <== NOT EXECUTED
2004f78: 84 10 20 45 mov 0x45, %g2 <== NOT EXECUTED
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' : '-';
2004f7c: 10 80 00 0a b 2004fa4 <rtems_fdisk_queue_status+0xcc> <== NOT EXECUTED
2004f80: c4 2a a0 02 stb %g2, [ %o2 + 2 ] <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
2004f84: 02 80 00 07 be 2004fa0 <rtems_fdisk_queue_status+0xc8> <== NOT EXECUTED
2004f88: 84 10 20 45 mov 0x45, %g2 <== NOT EXECUTED
return true;
it = it->next;
2004f8c: c2 00 40 00 ld [ %g1 ], %g1 <== 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)
2004f90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004f94: 12 bf ff fc bne 2004f84 <rtems_fdisk_queue_status+0xac> <== NOT EXECUTED
2004f98: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
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' : '-';
2004f9c: 84 10 20 2d mov 0x2d, %g2 <== NOT EXECUTED
2004fa0: c4 2a a0 02 stb %g2, [ %o2 + 2 ]
*/
static bool
rtems_fdisk_segment_queue_present (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* it = queue->head;
2004fa4: c2 02 20 54 ld [ %o0 + 0x54 ], %g1
while (it)
2004fa8: 80 a0 60 00 cmp %g1, 0
2004fac: 02 80 00 0e be 2004fe4 <rtems_fdisk_queue_status+0x10c> <== ALWAYS TAKEN
2004fb0: 84 10 20 2d mov 0x2d, %g2
{
if (it == sc)
2004fb4: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
2004fb8: 12 80 00 06 bne 2004fd0 <rtems_fdisk_queue_status+0xf8> <== NOT EXECUTED
2004fbc: 84 10 20 46 mov 0x46, %g2 <== NOT EXECUTED
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' : '-';
2004fc0: 10 80 00 0a b 2004fe8 <rtems_fdisk_queue_status+0x110> <== NOT EXECUTED
2004fc4: c4 2a a0 03 stb %g2, [ %o2 + 3 ] <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
2004fc8: 02 80 00 0a be 2004ff0 <rtems_fdisk_queue_status+0x118> <== NOT EXECUTED
2004fcc: 84 10 20 46 mov 0x46, %g2 <== NOT EXECUTED
return true;
it = it->next;
2004fd0: c2 00 40 00 ld [ %g1 ], %g1 <== 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)
2004fd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004fd8: 12 bf ff fc bne 2004fc8 <rtems_fdisk_queue_status+0xf0> <== NOT EXECUTED
2004fdc: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
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' : '-';
2004fe0: 84 10 20 2d mov 0x2d, %g2 <== NOT EXECUTED
2004fe4: c4 2a a0 03 stb %g2, [ %o2 + 3 ]
queues[4] = '\0';
}
2004fe8: 81 c3 e0 08 retl
2004fec: c0 2a a0 04 clrb [ %o2 + 4 ]
{
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' : '-';
queues[4] = '\0';
2004ff0: c0 2a a0 04 clrb [ %o2 + 4 ] <== NOT EXECUTED
}
2004ff4: 81 c3 e0 08 retl <== NOT EXECUTED
2004ff8: c4 2a a0 03 stb %g2, [ %o2 + 3 ] <== NOT EXECUTED
02006040 <rtems_fdisk_recover_block_mappings>:
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
{
2006040: 9d e3 bf 90 save %sp, -112, %sp
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
2006044: d4 06 20 1c ld [ %i0 + 0x1c ], %o2
2006048: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
200604c: c0 26 20 34 clr [ %i0 + 0x34 ]
2006050: c0 26 20 30 clr [ %i0 + 0x30 ]
queue->count = 0;
2006054: c0 26 20 38 clr [ %i0 + 0x38 ]
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
2006058: c0 26 20 40 clr [ %i0 + 0x40 ]
200605c: c0 26 20 3c clr [ %i0 + 0x3c ]
queue->count = 0;
2006060: c0 26 20 44 clr [ %i0 + 0x44 ]
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
2006064: c0 26 20 4c clr [ %i0 + 0x4c ]
2006068: c0 26 20 48 clr [ %i0 + 0x48 ]
queue->count = 0;
200606c: c0 26 20 50 clr [ %i0 + 0x50 ]
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
2006070: c0 26 20 58 clr [ %i0 + 0x58 ]
2006074: c0 26 20 54 clr [ %i0 + 0x54 ]
queue->count = 0;
2006078: c0 26 20 5c clr [ %i0 + 0x5c ]
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
200607c: 92 10 20 00 clr %o1
2006080: 40 00 73 7e call 2022e78 <memset>
2006084: 95 2a a0 03 sll %o2, 3, %o2
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
for (device = 0; device < fd->device_count; device++)
2006088: c6 06 20 2c ld [ %i0 + 0x2c ], %g3
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
200608c: c0 26 20 24 clr [ %i0 + 0x24 ]
for (device = 0; device < fd->device_count; device++)
2006090: 80 a0 e0 00 cmp %g3, 0
2006094: 02 80 00 db be 2006400 <rtems_fdisk_recover_block_mappings+0x3c0><== NEVER TAKEN
2006098: b4 10 00 18 mov %i0, %i2
200609c: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
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);
20060a0: 27 00 80 c8 sethi %hi(0x2032000), %l3
++fd->erased_blocks;
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
20060a4: 2b 00 80 c8 sethi %hi(0x2032000), %l5
ret = rtems_fdisk_seg_write_page_desc (fd, sc,
page, pd);
if (ret)
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
20060a8: 2f 00 80 c8 sethi %hi(0x2032000), %l7
* 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: " \
20060ac: 29 00 80 c8 sethi %hi(0x2032000), %l4
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,
20060b0: 2d 00 80 c8 sethi %hi(0x2032000), %l6
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
for (device = 0; device < fd->device_count; device++)
20060b4: a4 10 20 00 clr %l2
20060b8: a0 10 20 00 clr %l0
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);
20060bc: a6 14 e1 d0 or %l3, 0x1d0, %l3
++fd->erased_blocks;
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
20060c0: aa 15 62 60 or %l5, 0x260, %l5
ret = rtems_fdisk_seg_write_page_desc (fd, sc,
page, pd);
if (ret)
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
20060c4: ae 15 e2 80 or %l7, 0x280, %l7
* 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: " \
20060c8: a8 15 22 d8 or %l4, 0x2d8, %l4
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,
20060cc: ac 15 a2 a8 or %l6, 0x2a8, %l6
*/
fd->erased_blocks = 0;
for (device = 0; device < fd->device_count; device++)
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
20060d0: 82 00 80 12 add %g2, %l2, %g1
20060d4: c8 00 60 04 ld [ %g1 + 4 ], %g4
20060d8: a2 10 20 00 clr %l1
20060dc: 80 a1 20 00 cmp %g4, 0
20060e0: 02 80 00 67 be 200627c <rtems_fdisk_recover_block_mappings+0x23c><== NEVER TAKEN
20060e4: b2 10 20 00 clr %i1
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[segment];
20060e8: f6 00 40 00 ld [ %g1 ], %i3
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);
20060ec: 94 10 00 10 mov %l0, %o2
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];
20060f0: b6 06 c0 11 add %i3, %l1, %i3
const rtems_fdisk_segment_desc* sd = sc->descriptor;
20060f4: fa 06 e0 04 ld [ %i3 + 4 ], %i5
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);
20060f8: 96 10 00 19 mov %i1, %o3
20060fc: 92 10 00 13 mov %l3, %o1
2006100: 7f ff fb dc call 2005070 <rtems_fdisk_info>
2006104: 90 10 00 1a mov %i2, %o0
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
2006108: d0 07 60 08 ld [ %i5 + 8 ], %o0
#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);
200610c: f8 06 a0 14 ld [ %i2 + 0x14 ], %i4
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
2006110: 7f ff f1 45 call 2002624 <.udiv>
2006114: 92 10 00 1c mov %i4, %o1
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;
2006118: 92 10 00 1c mov %i4, %o1
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
200611c: b0 10 00 08 mov %o0, %i0
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);
2006120: 91 2a 20 03 sll %o0, 3, %o0
return ((bytes - 1) / page_size) + 1;
2006124: 7f ff f1 40 call 2002624 <.udiv>
2006128: 90 02 3f ff add %o0, -1, %o0
sc->pages_used = 0;
sc->pages_bad = 0;
sc->failed = false;
if (!sc->page_descriptors)
200612c: fa 06 e0 10 ld [ %i3 + 0x10 ], %i5
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;
2006130: 90 02 20 01 inc %o0
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;
sc->pages_active = 0;
2006134: c0 26 e0 1c clr [ %i3 + 0x1c ]
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;
2006138: b0 26 00 08 sub %i0, %o0, %i0
#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);
200613c: d0 26 e0 18 st %o0, [ %i3 + 0x18 ]
sc->pages =
2006140: f0 26 e0 14 st %i0, [ %i3 + 0x14 ]
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
sc->pages_active = 0;
sc->pages_used = 0;
2006144: c0 26 e0 20 clr [ %i3 + 0x20 ]
sc->pages_bad = 0;
2006148: c0 26 e0 24 clr [ %i3 + 0x24 ]
sc->failed = false;
200614c: c0 26 e0 28 clr [ %i3 + 0x28 ]
if (!sc->page_descriptors)
2006150: 80 a7 60 00 cmp %i5, 0
2006154: 02 80 00 94 be 20063a4 <rtems_fdisk_recover_block_mappings+0x364><== ALWAYS TAKEN
2006158: 92 10 00 1c mov %i4, %o1
sc->pages_used++;
}
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
200615c: 7f ff f0 f8 call 200253c <.umul> <== NOT EXECUTED
2006160: 01 00 00 00 nop <== NOT EXECUTED
2006164: 98 10 00 08 mov %o0, %o4 <== 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,
2006168: 90 10 00 1a mov %i2, %o0
200616c: 92 10 00 1b mov %i3, %o1
2006170: 94 10 20 00 clr %o2
2006174: 7f ff fc 03 call 2005180 <rtems_fdisk_seg_read>
2006178: 96 10 00 1d mov %i5, %o3
sc->pages_desc * fd->block_size);
if (ret)
200617c: b0 92 20 00 orcc %o0, 0, %i0
2006180: 12 80 00 95 bne 20063d4 <rtems_fdisk_recover_block_mappings+0x394><== NEVER TAKEN
2006184: 01 00 00 00 nop
* 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++)
2006188: c4 06 e0 14 ld [ %i3 + 0x14 ], %g2
200618c: 80 a0 a0 00 cmp %g2, 0
2006190: 12 80 00 0a bne 20061b8 <rtems_fdisk_recover_block_mappings+0x178><== ALWAYS TAKEN
2006194: b8 10 20 00 clr %i4
}
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, sc);
2006198: 10 80 00 2f b 2006254 <rtems_fdisk_recover_block_mappings+0x214><== NOT EXECUTED
200619c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
{
sc->pages_used++;
20061a0: 82 00 60 01 inc %g1 <== NOT EXECUTED
20061a4: c2 26 e0 20 st %g1, [ %i3 + 0x20 ] <== 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++)
20061a8: b8 07 20 01 inc %i4
20061ac: 80 a0 80 1c cmp %g2, %i4
20061b0: 08 80 00 28 bleu 2006250 <rtems_fdisk_recover_block_mappings+0x210>
20061b4: ba 07 60 08 add %i5, 8, %i5
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
20061b8: c2 07 40 00 ld [ %i5 ], %g1
20061bc: 80 a0 7f ff cmp %g1, -1
20061c0: 22 80 00 35 be,a 2006294 <rtems_fdisk_recover_block_mappings+0x254><== ALWAYS TAKEN
20061c4: c2 07 60 04 ld [ %i5 + 4 ], %g1
* only set a flag by changing it from 1 to 0.
*/
static bool
rtems_fdisk_page_desc_flags_set (rtems_fdisk_page_desc* pd, uint16_t flags)
{
return (pd->flags & flags) == 0 ? true : false;
20061c8: c2 17 60 02 lduh [ %i5 + 2 ], %g1 <== NOT EXECUTED
sc->pages_used++;
}
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
20061cc: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
20061d0: 22 bf ff f4 be,a 20061a0 <rtems_fdisk_recover_block_mappings+0x160><== NOT EXECUTED
20061d4: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 <== NOT EXECUTED
{
sc->pages_used++;
}
else if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
20061d8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
20061dc: 32 80 00 43 bne,a 20062e8 <rtems_fdisk_recover_block_mappings+0x2a8><== NOT EXECUTED
20061e0: c2 06 e0 24 ld [ %i3 + 0x24 ], %g1 <== NOT EXECUTED
{
if (pd->block >= fd->block_count)
20061e4: da 07 60 04 ld [ %i5 + 4 ], %o5 <== NOT EXECUTED
20061e8: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1 <== NOT EXECUTED
20061ec: 80 a3 40 01 cmp %o5, %g1 <== NOT EXECUTED
20061f0: 1a 80 00 57 bcc 200634c <rtems_fdisk_recover_block_mappings+0x30c><== NOT EXECUTED
20061f4: 90 10 00 1a mov %i2, %o0 <== 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)
20061f8: c6 06 a0 18 ld [ %i2 + 0x18 ], %g3 <== NOT EXECUTED
20061fc: 9b 2b 60 03 sll %o5, 3, %o5 <== NOT EXECUTED
2006200: c2 00 c0 0d ld [ %g3 + %o5 ], %g1 <== NOT EXECUTED
2006204: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006208: 02 80 00 5b be 2006374 <rtems_fdisk_recover_block_mappings+0x334><== NOT EXECUTED
200620c: 88 00 c0 0d add %g3, %o5, %g4 <== 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: " \
2006210: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED
2006214: d4 00 60 0c ld [ %g1 + 0xc ], %o2 <== NOT EXECUTED
2006218: d6 01 20 04 ld [ %g4 + 4 ], %o3 <== NOT EXECUTED
200621c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
2006220: f8 23 a0 5c st %i4, [ %sp + 0x5c ] <== NOT EXECUTED
2006224: 98 10 00 10 mov %l0, %o4 <== NOT EXECUTED
2006228: 7f ff fc 8e call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
200622c: 9a 10 00 19 mov %i1, %o5 <== NOT EXECUTED
"duplicate: %d-%d-%d",
bsc->device, bsc->segment,
fd->blocks[pd->block].page,
device, segment, page);
sc->pages_bad++;
2006230: c2 06 e0 24 ld [ %i3 + 0x24 ], %g1 <== NOT EXECUTED
2006234: c4 06 e0 14 ld [ %i3 + 0x14 ], %g2 <== NOT EXECUTED
2006238: 82 00 60 01 inc %g1 <== NOT EXECUTED
200623c: c2 26 e0 24 st %g1, [ %i3 + 0x24 ] <== 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++)
2006240: b8 07 20 01 inc %i4 <== NOT EXECUTED
2006244: 80 a0 80 1c cmp %g2, %i4 <== NOT EXECUTED
2006248: 18 bf ff dc bgu 20061b8 <rtems_fdisk_recover_block_mappings+0x178><== NOT EXECUTED
200624c: ba 07 60 08 add %i5, 8, %i5 <== NOT EXECUTED
}
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, sc);
2006250: 90 10 00 1a mov %i2, %o0
2006254: 7f ff fd 2a call 20056fc <rtems_fdisk_queue_segment>
2006258: 92 10 00 1b mov %i3, %o1
*/
fd->erased_blocks = 0;
for (device = 0; device < fd->device_count; device++)
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
200625c: c4 06 a0 28 ld [ %i2 + 0x28 ], %g2
2006260: b2 06 60 01 inc %i1
2006264: 82 00 80 12 add %g2, %l2, %g1
2006268: c6 00 60 04 ld [ %g1 + 4 ], %g3
200626c: 80 a0 c0 19 cmp %g3, %i1
2006270: 18 bf ff 9e bgu 20060e8 <rtems_fdisk_recover_block_mappings+0xa8>
2006274: a2 04 60 30 add %l1, 0x30, %l1
2006278: c6 06 a0 2c ld [ %i2 + 0x2c ], %g3
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
for (device = 0; device < fd->device_count; device++)
200627c: a0 04 20 01 inc %l0
2006280: 80 a0 c0 10 cmp %g3, %l0
2006284: 18 bf ff 93 bgu 20060d0 <rtems_fdisk_recover_block_mappings+0x90><== NEVER TAKEN
2006288: a4 04 a0 0c add %l2, 0xc, %l2
rtems_fdisk_queue_segment (fd, sc);
}
}
return 0;
}
200628c: 81 c7 e0 08 ret
2006290: 91 e8 20 00 restore %g0, 0, %o0
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2006294: 80 a0 7f ff cmp %g1, -1
2006298: 32 bf ff cd bne,a 20061cc <rtems_fdisk_recover_block_mappings+0x18c><== NEVER TAKEN
200629c: c2 17 60 02 lduh [ %i5 + 2 ], %g1 <== NOT EXECUTED
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);
20062a0: f0 06 a0 14 ld [ %i2 + 0x14 ], %i0
if (rtems_fdisk_page_desc_erased (pd))
{
/*
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
20062a4: d0 06 e0 18 ld [ %i3 + 0x18 ], %o0
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,
20062a8: 92 10 00 18 mov %i0, %o1
20062ac: 7f ff f0 a4 call 200253c <.umul>
20062b0: 90 07 00 08 add %i4, %o0, %o0
20062b4: 92 10 00 1b mov %i3, %o1
20062b8: 94 10 00 08 mov %o0, %o2
20062bc: 96 10 00 18 mov %i0, %o3
20062c0: 7f ff fb d2 call 2005208 <rtems_fdisk_seg_blank_check>
20062c4: 90 10 00 1a mov %i2, %o0
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
page + sc->pages_desc);
if (ret == 0)
20062c8: 80 a2 20 00 cmp %o0, 0
20062cc: 32 80 00 0a bne,a 20062f4 <rtems_fdisk_recover_block_mappings+0x2b4><== NEVER TAKEN
20062d0: da 07 60 04 ld [ %i5 + 4 ], %o5 <== NOT EXECUTED
{
++fd->erased_blocks;
20062d4: c2 06 a0 24 ld [ %i2 + 0x24 ], %g1
20062d8: c4 06 e0 14 ld [ %i3 + 0x14 ], %g2
20062dc: 82 00 60 01 inc %g1
20062e0: 10 bf ff b2 b 20061a8 <rtems_fdisk_recover_block_mappings+0x168>
20062e4: c2 26 a0 24 st %g1, [ %i2 + 0x24 ]
*/
sc->pages_active++;
}
}
else
sc->pages_bad++;
20062e8: 82 00 60 01 inc %g1 <== NOT EXECUTED
20062ec: 10 bf ff af b 20061a8 <rtems_fdisk_recover_block_mappings+0x168><== NOT EXECUTED
20062f0: c2 26 e0 24 st %g1, [ %i3 + 0x24 ] <== NOT EXECUTED
++fd->erased_blocks;
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
20062f4: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
20062f8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
20062fc: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
2006300: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED
2006304: 7f ff fc 35 call 20053d8 <rtems_fdisk_warning> <== NOT EXECUTED
2006308: 90 10 00 1a mov %i2, %o0 <== 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;
200630c: c2 17 60 02 lduh [ %i5 + 2 ], %g1 <== 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,
2006310: 90 10 00 1a mov %i2, %o0 <== 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;
2006314: 82 08 7f fd and %g1, -3, %g1 <== 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,
2006318: 92 10 00 1b mov %i3, %o1 <== 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;
200631c: c2 37 60 02 sth %g1, [ %i5 + 2 ] <== 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,
2006320: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2006324: 7f ff fc 00 call 2005324 <rtems_fdisk_seg_write_page_desc><== NOT EXECUTED
2006328: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
page, pd);
if (ret)
200632c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2006330: 12 80 00 17 bne 200638c <rtems_fdisk_recover_block_mappings+0x34c><== NOT EXECUTED
2006334: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
device, segment, page);
}
sc->pages_used++;
2006338: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 <== NOT EXECUTED
200633c: c4 06 e0 14 ld [ %i3 + 0x14 ], %g2 <== NOT EXECUTED
2006340: 82 00 60 01 inc %g1 <== NOT EXECUTED
2006344: 10 bf ff 99 b 20061a8 <rtems_fdisk_recover_block_mappings+0x168><== NOT EXECUTED
2006348: c2 26 e0 20 st %g1, [ %i3 + 0x20 ] <== NOT EXECUTED
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,
200634c: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
2006350: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
2006354: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED
2006358: 7f ff fc 20 call 20053d8 <rtems_fdisk_warning> <== NOT EXECUTED
200635c: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED
"invalid block number: %d-%d-%d: block: %d",
device, segment, page, pd->block);
#endif
sc->pages_bad++;
2006360: c2 06 e0 24 ld [ %i3 + 0x24 ], %g1 <== NOT EXECUTED
2006364: c4 06 e0 14 ld [ %i3 + 0x14 ], %g2 <== NOT EXECUTED
2006368: 82 00 60 01 inc %g1 <== NOT EXECUTED
200636c: 10 bf ff 8f b 20061a8 <rtems_fdisk_recover_block_mappings+0x168><== NOT EXECUTED
2006370: c2 26 e0 24 st %g1, [ %i3 + 0x24 ] <== NOT EXECUTED
fd->blocks[pd->block].page = page;
/*
* The page is active.
*/
sc->pages_active++;
2006374: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
{
/**
* @todo
* Add start up crc checks here.
*/
fd->blocks[pd->block].segment = sc;
2006378: f6 20 c0 0d st %i3, [ %g3 + %o5 ] <== NOT EXECUTED
fd->blocks[pd->block].page = page;
200637c: f8 21 20 04 st %i4, [ %g4 + 4 ] <== NOT EXECUTED
/*
* The page is active.
*/
sc->pages_active++;
2006380: 82 00 60 01 inc %g1 <== NOT EXECUTED
2006384: 10 bf ff 89 b 20061a8 <rtems_fdisk_recover_block_mappings+0x168><== NOT EXECUTED
2006388: c2 26 e0 1c st %g1, [ %i3 + 0x1c ] <== NOT EXECUTED
ret = rtems_fdisk_seg_write_page_desc (fd, sc,
page, pd);
if (ret)
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
200638c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2006390: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2006394: 7f ff fc 33 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2006398: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
device, segment, page);
}
sc->pages_used++;
200639c: 10 bf ff e8 b 200633c <rtems_fdisk_recover_block_mappings+0x2fc><== NOT EXECUTED
20063a0: c2 06 e0 20 ld [ %i3 + 0x20 ], %g1 <== NOT EXECUTED
sc->pages_bad = 0;
sc->failed = false;
if (!sc->page_descriptors)
sc->page_descriptors = malloc (sc->pages_desc * fd->block_size);
20063a4: 7f ff f0 66 call 200253c <.umul>
20063a8: 01 00 00 00 nop
20063ac: 40 00 0b 92 call 20091f4 <malloc>
20063b0: d0 27 bf fc st %o0, [ %fp + -4 ]
20063b4: d0 26 e0 10 st %o0, [ %i3 + 0x10 ]
20063b8: ba 10 00 08 mov %o0, %i5
if (!sc->page_descriptors)
20063bc: 80 a2 20 00 cmp %o0, 0
20063c0: 12 bf ff 6a bne 2006168 <rtems_fdisk_recover_block_mappings+0x128><== ALWAYS TAKEN
20063c4: d8 07 bf fc ld [ %fp + -4 ], %o4
rtems_fdisk_abort ("no memory for page descriptors");
20063c8: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
20063cc: 40 00 06 58 call 2007d2c <rtems_fdisk_abort> <== NOT EXECUTED
20063d0: 90 12 21 f8 or %o0, 0x1f8, %o0 ! 20321f8 <__FUNCTION__.6882+0x918><== NOT EXECUTED
ret = rtems_fdisk_seg_read (fd, sc, 0, (void*) pd,
sc->pages_desc * fd->block_size);
if (ret)
{
rtems_fdisk_error ("recover-block-mappings:%02d-%03d: " \
20063d4: 40 00 77 b9 call 20242b8 <strerror> <== NOT EXECUTED
20063d8: 01 00 00 00 nop <== NOT EXECUTED
20063dc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20063e0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20063e4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
20063e8: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
20063ec: 98 10 00 18 mov %i0, %o4 <== NOT EXECUTED
20063f0: 7f ff fc 1c call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
20063f4: 90 12 22 18 or %o0, 0x218, %o0 <== NOT EXECUTED
"read page desc failed: %s (%d)",
device, segment, strerror (ret), ret);
return ret;
20063f8: 81 c7 e0 08 ret <== NOT EXECUTED
20063fc: 81 e8 00 00 restore <== NOT EXECUTED
*/
rtems_fdisk_queue_segment (fd, sc);
}
}
return 0;
2006400: 81 c7 e0 08 ret <== NOT EXECUTED
2006404: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
020059ac <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)
{
20059ac: 9d e3 bf 88 save %sp, -120, %sp
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
20059b0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* ssc,
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
20059b4: aa 10 00 1b mov %i3, %l5
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
20059b8: ae 10 20 00 clr %l7
20059bc: 80 a0 60 00 cmp %g1, 0
20059c0: 02 80 00 73 be 2005b8c <rtems_fdisk_recycle_segment+0x1e0><== NEVER TAKEN
20059c4: a4 10 20 00 clr %l2
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
if (dst_pages == 0)
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
20059c8: 84 06 20 30 add %i0, 0x30, %g2
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
20059cc: b8 10 20 00 clr %i4
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
if (dst_pages == 0)
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
20059d0: c4 27 bf fc st %g2, [ %fp + -4 ]
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
{
uint32_t dst_pages;
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
20059d4: e0 06 60 10 ld [ %i1 + 0x10 ], %l0
20059d8: b7 2f 20 03 sll %i4, 3, %i3
20059dc: a2 04 00 1b add %l0, %i3, %l1
* only set a flag by changing it from 1 to 0.
*/
static bool
rtems_fdisk_page_desc_flags_set (rtems_fdisk_page_desc* pd, uint16_t flags)
{
return (pd->flags & flags) == 0 ? true : false;
20059e0: c4 14 60 02 lduh [ %l1 + 2 ], %g2
for (spage = 0; spage < ssc->pages; spage++)
{
uint32_t dst_pages;
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
20059e4: 80 88 a0 01 btst 1, %g2
20059e8: 32 80 00 61 bne,a 2005b6c <rtems_fdisk_recycle_segment+0x1c0><== NEVER TAKEN
20059ec: c4 04 00 1b ld [ %l0 + %i3 ], %g2 <== NOT EXECUTED
20059f0: 80 88 a0 02 btst 2, %g2
20059f4: 22 80 00 5e be,a 2005b6c <rtems_fdisk_recycle_segment+0x1c0>
20059f8: c4 04 00 1b ld [ %l0 + %i3 ], %g2
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++)
20059fc: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1
2005a00: 80 a0 60 00 cmp %g1, 0
2005a04: 02 80 00 ba be 2005cec <rtems_fdisk_recycle_segment+0x340><== NEVER TAKEN
2005a08: e8 06 a0 10 ld [ %i2 + 0x10 ], %l4
2005a0c: 84 10 00 14 mov %l4, %g2
2005a10: 10 80 00 05 b 2005a24 <rtems_fdisk_recycle_segment+0x78>
2005a14: ba 10 20 00 clr %i5
2005a18: 80 a7 40 01 cmp %i5, %g1
2005a1c: 02 80 00 b4 be 2005cec <rtems_fdisk_recycle_segment+0x340><== NEVER TAKEN
2005a20: 84 00 a0 08 add %g2, 8, %g2
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2005a24: c6 00 80 00 ld [ %g2 ], %g3
2005a28: 80 a0 ff ff cmp %g3, -1
2005a2c: 32 bf ff fb bne,a 2005a18 <rtems_fdisk_recycle_segment+0x6c>
2005a30: ba 07 60 01 inc %i5
2005a34: c6 00 a0 04 ld [ %g2 + 4 ], %g3
2005a38: 80 a0 ff ff cmp %g3, -1
2005a3c: 32 bf ff f7 bne,a 2005a18 <rtems_fdisk_recycle_segment+0x6c><== NEVER TAKEN
2005a40: ba 07 60 01 inc %i5 <== NOT EXECUTED
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
active++;
if (dpage >= dsc->pages)
2005a44: 80 a7 40 01 cmp %i5, %g1
2005a48: 1a 80 00 a9 bcc 2005cec <rtems_fdisk_recycle_segment+0x340><== NEVER TAKEN
2005a4c: 98 10 00 1c mov %i4, %o4
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",
2005a50: da 06 a0 08 ld [ %i2 + 8 ], %o5
2005a54: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
2005a58: d4 06 60 08 ld [ %i1 + 8 ], %o2
2005a5c: d6 06 60 0c ld [ %i1 + 0xc ], %o3
2005a60: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2005a64: 13 00 80 c7 sethi %hi(0x2031c00), %o1
2005a68: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
2005a6c: 92 12 63 b0 or %o1, 0x3b0, %o1
2005a70: 7f ff fd 80 call 2005070 <rtems_fdisk_info>
2005a74: 90 10 00 18 mov %i0, %o0
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",
2005a78: da 06 a0 08 ld [ %i2 + 8 ], %o5
2005a7c: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
#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,
2005a80: ec 06 a0 18 ld [ %i2 + 0x18 ], %l6
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",
2005a84: d4 06 60 08 ld [ %i1 + 8 ], %o2
2005a88: d6 06 60 0c ld [ %i1 + 0xc ], %o3
#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,
2005a8c: e6 06 60 18 ld [ %i1 + 0x18 ], %l3
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",
2005a90: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
#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,
2005a94: a6 07 00 13 add %i4, %l3, %l3
2005a98: ac 07 40 16 add %i5, %l6, %l6
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",
2005a9c: 98 10 00 13 mov %l3, %o4
2005aa0: 13 00 80 c7 sethi %hi(0x2031c00), %o1
2005aa4: ec 23 a0 60 st %l6, [ %sp + 0x60 ]
2005aa8: 92 12 63 d8 or %o1, 0x3d8, %o1
2005aac: 7f ff fd 93 call 20050f8 <rtems_fdisk_printf>
2005ab0: 90 10 00 18 mov %i0, %o0
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);
2005ab4: d8 06 20 14 ld [ %i0 + 0x14 ], %o4
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,
2005ab8: 90 10 00 13 mov %l3, %o0
2005abc: 92 10 00 0c mov %o4, %o1
2005ac0: 7f ff f2 9f call 200253c <.umul>
2005ac4: d8 27 bf f8 st %o4, [ %fp + -8 ]
2005ac8: d6 06 20 64 ld [ %i0 + 0x64 ], %o3
2005acc: d8 07 bf f8 ld [ %fp + -8 ], %o4
2005ad0: 94 10 00 08 mov %o0, %o2
2005ad4: 92 10 00 19 mov %i1, %o1
2005ad8: 7f ff fd aa call 2005180 <rtems_fdisk_seg_read>
2005adc: 90 10 00 18 mov %i0, %o0
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)
2005ae0: a6 92 20 00 orcc %o0, 0, %l3
2005ae4: 22 80 00 40 be,a 2005be4 <rtems_fdisk_recycle_segment+0x238><== ALWAYS TAKEN
2005ae8: d6 06 20 64 ld [ %i0 + 0x64 ], %o3
spage + ssc->pages_desc,
dsc,
dpage + dsc->pages_desc);
if (ret)
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
2005aec: e4 06 60 0c ld [ %i1 + 0xc ], %l2 <== NOT EXECUTED
2005af0: e2 06 a0 08 ld [ %i2 + 8 ], %l1 <== NOT EXECUTED
2005af4: e0 06 a0 0c ld [ %i2 + 0xc ], %l0 <== NOT EXECUTED
2005af8: f6 06 60 08 ld [ %i1 + 8 ], %i3 <== NOT EXECUTED
2005afc: 40 00 79 ef call 20242b8 <strerror> <== NOT EXECUTED
2005b00: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2005b04: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
2005b08: d0 23 a0 60 st %o0, [ %sp + 0x60 ] <== NOT EXECUTED
2005b0c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
2005b10: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
2005b14: 98 10 00 11 mov %l1, %o4 <== NOT EXECUTED
2005b18: 9a 10 00 10 mov %l0, %o5 <== NOT EXECUTED
2005b1c: fa 23 a0 5c st %i5, [ %sp + 0x5c ] <== NOT EXECUTED
2005b20: e6 23 a0 64 st %l3, [ %sp + 0x64 ] <== NOT EXECUTED
2005b24: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2005b28: 90 12 20 08 or %o0, 8, %o0 <== NOT EXECUTED
dsc,
dpage, dpd);
if (ret)
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
2005b2c: 7f ff fe 4d call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2005b30: 01 00 00 00 nop <== 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);
2005b34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2005b38: 7f ff fe f1 call 20056fc <rtems_fdisk_queue_segment> <== NOT EXECUTED
2005b3c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = queue->head;
2005b40: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED
queue->head = sc;
if (queue->tail == 0)
2005b44: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = queue->head;
2005b48: c4 26 40 00 st %g2, [ %i1 ] <== NOT EXECUTED
queue->head = sc;
if (queue->tail == 0)
2005b4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005b50: 02 80 00 92 be 2005d98 <rtems_fdisk_recycle_segment+0x3ec><== NOT EXECUTED
2005b54: f2 26 20 3c st %i1, [ %i0 + 0x3c ] <== NOT EXECUTED
queue->tail = sc;
queue->count++;
2005b58: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 <== NOT EXECUTED
2005b5c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2005b60: c2 26 20 44 st %g1, [ %i0 + 0x44 ] <== NOT EXECUTED
}
ret = rtems_fdisk_erase_segment (fd, ssc);
return ret;
}
2005b64: 81 c7 e0 08 ret <== NOT EXECUTED
2005b68: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2005b6c: 80 a0 bf ff cmp %g2, -1
2005b70: 22 80 00 16 be,a 2005bc8 <rtems_fdisk_recycle_segment+0x21c><== NEVER TAKEN
2005b74: c4 04 60 04 ld [ %l1 + 4 ], %g2 <== NOT EXECUTED
{
--fd->erased_blocks;
}
else
{
used++;
2005b78: a4 04 a0 01 inc %l2
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
2005b7c: b8 07 20 01 inc %i4
2005b80: 80 a0 40 1c cmp %g1, %i4
2005b84: 38 bf ff 95 bgu,a 20059d8 <rtems_fdisk_recycle_segment+0x2c>
2005b88: e0 06 60 10 ld [ %i1 + 0x10 ], %l0
used++;
}
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, "ssc end: %d-%d: p=%ld, a=%ld, u=%ld",
2005b8c: d4 06 60 08 ld [ %i1 + 8 ], %o2
2005b90: d6 06 60 0c ld [ %i1 + 0xc ], %o3
2005b94: e4 23 a0 5c st %l2, [ %sp + 0x5c ]
2005b98: 90 10 00 18 mov %i0, %o0
2005b9c: 13 00 80 c8 sethi %hi(0x2032000), %o1
2005ba0: 98 10 00 15 mov %l5, %o4
2005ba4: 92 12 60 c0 or %o1, 0xc0, %o1
2005ba8: 7f ff fd 54 call 20050f8 <rtems_fdisk_printf>
2005bac: 9a 10 00 17 mov %l7, %o5
ssc->device, ssc->segment,
pages, active, used);
#endif
if (ssc->pages_active != 0)
2005bb0: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
2005bb4: 80 a2 60 00 cmp %o1, 0
2005bb8: 12 80 00 49 bne 2005cdc <rtems_fdisk_recycle_segment+0x330><== NEVER TAKEN
2005bbc: 11 00 80 c8 sethi %hi(0x2032000), %o0
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
2005bc0: 7f ff fe 47 call 20054dc <rtems_fdisk_erase_segment>
2005bc4: 81 e8 00 00 restore
static bool
rtems_fdisk_page_desc_erased (const rtems_fdisk_page_desc* pd)
{
return ((pd->crc == 0xffff) &&
(pd->flags == 0xffff) &&
(pd->block == 0xffffffff)) ? true : false;
2005bc8: 80 a0 bf ff cmp %g2, -1 <== NOT EXECUTED
2005bcc: 32 bf ff ec bne,a 2005b7c <rtems_fdisk_recycle_segment+0x1d0><== NOT EXECUTED
2005bd0: a4 04 a0 01 inc %l2 <== NOT EXECUTED
(*pages)--;
}
else if (rtems_fdisk_page_desc_erased (spd))
{
--fd->erased_blocks;
2005bd4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED
2005bd8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
2005bdc: 10 bf ff e8 b 2005b7c <rtems_fdisk_recycle_segment+0x1d0> <== NOT EXECUTED
2005be0: c4 26 20 24 st %g2, [ %i0 + 0x24 ] <== NOT EXECUTED
#endif
ret = rtems_fdisk_seg_read_page (fd, src_sc, src_page,
fd->copy_buffer);
if (ret)
return ret;
return rtems_fdisk_seg_write_page (fd, dst_sc, dst_page,
2005be4: 90 10 00 18 mov %i0, %o0
2005be8: 92 10 00 1a mov %i2, %o1
2005bec: 7f ff fd df call 2005368 <rtems_fdisk_seg_write_page>
2005bf0: 94 10 00 16 mov %l6, %o2
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
spage + ssc->pages_desc,
dsc,
dpage + dsc->pages_desc);
if (ret)
2005bf4: a6 92 20 00 orcc %o0, 0, %l3
2005bf8: 12 bf ff bd bne 2005aec <rtems_fdisk_recycle_segment+0x140><== NEVER TAKEN
2005bfc: 97 2f 60 03 sll %i5, 3, %o3
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
2005c00: c2 04 00 1b ld [ %l0 + %i3 ], %g1
2005c04: c2 25 00 0b st %g1, [ %l4 + %o3 ]
2005c08: c2 04 60 04 ld [ %l1 + 4 ], %g1
{
rtems_fdisk_page_desc* dpd;
uint32_t dpage;
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
2005c0c: 96 05 00 0b add %l4, %o3, %o3
return ret;
}
*dpd = *spd;
ret = rtems_fdisk_seg_write_page_desc (fd,
2005c10: 90 10 00 18 mov %i0, %o0
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
2005c14: c2 22 e0 04 st %g1, [ %o3 + 4 ]
ret = rtems_fdisk_seg_write_page_desc (fd,
2005c18: 92 10 00 1a mov %i2, %o1
2005c1c: 7f ff fd c2 call 2005324 <rtems_fdisk_seg_write_page_desc>
2005c20: 94 10 00 1d mov %i5, %o2
dsc,
dpage, dpd);
if (ret)
2005c24: a6 92 20 00 orcc %o0, 0, %l3
2005c28: 32 80 00 4d bne,a 2005d5c <rtems_fdisk_recycle_segment+0x3b0><== NEVER TAKEN
2005c2c: e4 06 60 0c ld [ %i1 + 0xc ], %l2 <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
dsc->pages_active++;
2005c30: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
* We do the stats to make sure everything is as it should
* be.
*/
ssc->pages_active--;
ssc->pages_used++;
2005c34: c6 06 60 20 ld [ %i1 + 0x20 ], %g3
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
dsc->pages_active++;
2005c38: 82 00 60 01 inc %g1
*/
ssc->pages_active--;
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
2005c3c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
dsc->pages_active++;
2005c40: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
*/
ssc->pages_active--;
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
2005c44: c2 04 60 04 ld [ %l1 + 4 ], %g1
* 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--;
2005c48: c8 06 60 1c ld [ %i1 + 0x1c ], %g4
ssc->pages_used++;
2005c4c: 86 00 e0 01 inc %g3
fd->blocks[spd->block].segment = dsc;
2005c50: 83 28 60 03 sll %g1, 3, %g1
* We do the stats to make sure everything is as it should
* be.
*/
ssc->pages_active--;
ssc->pages_used++;
2005c54: c6 26 60 20 st %g3, [ %i1 + 0x20 ]
* 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--;
2005c58: 88 01 3f ff add %g4, -1, %g4
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
2005c5c: 86 00 80 01 add %g2, %g1, %g3
* 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--;
2005c60: c8 26 60 1c st %g4, [ %i1 + 0x1c ]
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
2005c64: f4 20 80 01 st %i2, [ %g2 + %g1 ]
fd->blocks[spd->block].page = dpage;
2005c68: fa 20 e0 04 st %i5, [ %g3 + 4 ]
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, dsc);
2005c6c: 90 10 00 18 mov %i0, %o0
2005c70: 7f ff fe a3 call 20056fc <rtems_fdisk_queue_segment>
2005c74: 92 10 00 1a mov %i2, %o1
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005c78: c8 06 a0 20 ld [ %i2 + 0x20 ], %g4
2005c7c: c2 06 a0 1c ld [ %i2 + 0x1c ], %g1
2005c80: c6 06 a0 24 ld [ %i2 + 0x24 ], %g3
/*
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
if (dst_pages == 0)
2005c84: c4 06 a0 14 ld [ %i2 + 0x14 ], %g2
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
2005c88: 82 01 00 01 add %g4, %g1, %g1
2005c8c: 82 00 40 03 add %g1, %g3, %g1
/*
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
if (dst_pages == 0)
2005c90: 80 a0 80 01 cmp %g2, %g1
2005c94: 02 80 00 08 be 2005cb4 <rtems_fdisk_recycle_segment+0x308><== NEVER TAKEN
2005c98: 01 00 00 00 nop
rtems_fdisk_error ("recycle: no available dst segment");
return EIO;
}
}
(*pages)--;
2005c9c: c2 05 40 00 ld [ %l5 ], %g1
uint32_t dpage;
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
active++;
2005ca0: ae 05 e0 01 inc %l7
rtems_fdisk_error ("recycle: no available dst segment");
return EIO;
}
}
(*pages)--;
2005ca4: 82 00 7f ff add %g1, -1, %g1
2005ca8: c2 25 40 00 st %g1, [ %l5 ]
uint32_t dst_pages;
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
!rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_USED))
{
2005cac: 10 bf ff b4 b 2005b7c <rtems_fdisk_recycle_segment+0x1d0>
2005cb0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
if (dst_pages == 0)
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
2005cb4: 7f ff fc d2 call 2004ffc <rtems_fdisk_seg_most_available> <== NOT EXECUTED
2005cb8: d0 07 bf fc ld [ %fp + -4 ], %o0 <== NOT EXECUTED
if (!dsc)
2005cbc: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2005cc0: 32 bf ff f8 bne,a 2005ca0 <rtems_fdisk_recycle_segment+0x2f4><== NOT EXECUTED
2005cc4: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
{
rtems_fdisk_error ("recycle: no available dst segment");
return EIO;
2005cc8: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
if (dst_pages == 0)
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
if (!dsc)
{
rtems_fdisk_error ("recycle: no available dst segment");
2005ccc: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
2005cd0: 7f ff fd e4 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2005cd4: 90 12 20 98 or %o0, 0x98, %o0 ! 2032098 <__FUNCTION__.6882+0x7b8><== NOT EXECUTED
return EIO;
2005cd8: 30 bf ff a3 b,a 2005b64 <rtems_fdisk_recycle_segment+0x1b8><== NOT EXECUTED
ssc->device, ssc->segment,
pages, active, used);
#endif
if (ssc->pages_active != 0)
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
2005cdc: 7f ff fd e1 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2005ce0: 90 12 20 e8 or %o0, 0xe8, %o0 <== NOT EXECUTED
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
2005ce4: 7f ff fd fe call 20054dc <rtems_fdisk_erase_segment> <== NOT EXECUTED
2005ce8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
2005cec: c4 06 a0 20 ld [ %i2 + 0x20 ], %g2 <== NOT EXECUTED
2005cf0: c6 06 a0 1c ld [ %i2 + 0x1c ], %g3 <== NOT EXECUTED
2005cf4: d6 06 a0 24 ld [ %i2 + 0x24 ], %o3 <== NOT EXECUTED
active++;
if (dpage >= dsc->pages)
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
2005cf8: d2 06 a0 08 ld [ %i2 + 8 ], %o1 <== NOT EXECUTED
2005cfc: d4 06 a0 0c ld [ %i2 + 0xc ], %o2 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
2005d00: 96 02 c0 03 add %o3, %g3, %o3 <== NOT EXECUTED
active++;
if (dpage >= dsc->pages)
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
2005d04: 11 00 80 c7 sethi %hi(0x2031c00), %o0 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
2005d08: 96 02 c0 02 add %o3, %g2, %o3 <== NOT EXECUTED
active++;
if (dpage >= dsc->pages)
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
2005d0c: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED
2005d10: 7f ff fd d4 call 2005460 <rtems_fdisk_error> <== NOT EXECUTED
2005d14: 96 20 40 0b sub %g1, %o3, %o3 <== NOT EXECUTED
"no page desc available: %d",
dsc->device, dsc->segment,
rtems_fdisk_seg_pages_available (dsc));
dsc->failed = true;
2005d18: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
2005d1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
"no page desc available: %d",
dsc->device, dsc->segment,
rtems_fdisk_seg_pages_available (dsc));
dsc->failed = true;
2005d20: c2 26 a0 28 st %g1, [ %i2 + 0x28 ] <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
2005d24: 7f ff fe 76 call 20056fc <rtems_fdisk_queue_segment> <== NOT EXECUTED
2005d28: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = queue->head;
2005d2c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 <== NOT EXECUTED
queue->head = sc;
if (queue->tail == 0)
2005d30: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
{
sc->next = queue->head;
2005d34: c4 26 40 00 st %g2, [ %i1 ] <== NOT EXECUTED
queue->head = sc;
if (queue->tail == 0)
2005d38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005d3c: 02 80 00 19 be 2005da0 <rtems_fdisk_recycle_segment+0x3f4><== NOT EXECUTED
2005d40: f2 26 20 3c st %i1, [ %i0 + 0x3c ] <== NOT EXECUTED
queue->tail = sc;
queue->count++;
2005d44: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 <== NOT EXECUTED
dsc->device, dsc->segment,
rtems_fdisk_seg_pages_available (dsc));
dsc->failed = true;
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return EIO;
2005d48: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
sc->next = queue->head;
queue->head = sc;
if (queue->tail == 0)
queue->tail = sc;
queue->count++;
2005d4c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2005d50: c2 26 20 44 st %g1, [ %i0 + 0x44 ] <== NOT EXECUTED
}
ret = rtems_fdisk_erase_segment (fd, ssc);
return ret;
}
2005d54: 81 c7 e0 08 ret <== NOT EXECUTED
2005d58: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
dsc,
dpage, dpd);
if (ret)
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
2005d5c: e2 06 a0 08 ld [ %i2 + 8 ], %l1 <== NOT EXECUTED
2005d60: e0 06 a0 0c ld [ %i2 + 0xc ], %l0 <== NOT EXECUTED
2005d64: 40 00 79 55 call 20242b8 <strerror> <== NOT EXECUTED
2005d68: f6 06 60 08 ld [ %i1 + 8 ], %i3 <== NOT EXECUTED
2005d6c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
2005d70: d0 23 a0 60 st %o0, [ %sp + 0x60 ] <== NOT EXECUTED
2005d74: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED
2005d78: 11 00 80 c8 sethi %hi(0x2032000), %o0 <== NOT EXECUTED
2005d7c: 98 10 00 11 mov %l1, %o4 <== NOT EXECUTED
2005d80: 9a 10 00 10 mov %l0, %o5 <== NOT EXECUTED
2005d84: fa 23 a0 5c st %i5, [ %sp + 0x5c ] <== NOT EXECUTED
2005d88: e6 23 a0 64 st %l3, [ %sp + 0x64 ] <== NOT EXECUTED
2005d8c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2005d90: 10 bf ff 67 b 2005b2c <rtems_fdisk_recycle_segment+0x180> <== NOT EXECUTED
2005d94: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED
{
sc->next = queue->head;
queue->head = sc;
if (queue->tail == 0)
queue->tail = sc;
2005d98: 10 bf ff 70 b 2005b58 <rtems_fdisk_recycle_segment+0x1ac> <== NOT EXECUTED
2005d9c: f2 26 20 40 st %i1, [ %i0 + 0x40 ] <== NOT EXECUTED
2005da0: 10 bf ff e9 b 2005d44 <rtems_fdisk_recycle_segment+0x398> <== NOT EXECUTED
2005da4: f2 26 20 40 st %i1, [ %i0 + 0x40 ] <== NOT EXECUTED
02004ffc <rtems_fdisk_seg_most_available>:
/**
* Find the segment on the queue that has the most free pages.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_seg_most_available (const rtems_fdisk_segment_ctl_queue* queue)
{
2004ffc: 9d e3 bf a0 save %sp, -96, %sp
rtems_fdisk_segment_ctl* sc = queue->head;
2005000: c2 06 00 00 ld [ %i0 ], %g1
rtems_fdisk_segment_ctl* biggest = queue->head;
while (sc)
2005004: 80 a0 60 00 cmp %g1, 0
2005008: 02 80 00 18 be 2005068 <rtems_fdisk_seg_most_available+0x6c><== NEVER TAKEN
200500c: b0 10 20 00 clr %i0
2005010: b0 10 00 01 mov %g1, %i0
/**
* Find the segment on the queue that has the most free pages.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_seg_most_available (const rtems_fdisk_segment_ctl_queue* queue)
2005014: d4 00 60 20 ld [ %g1 + 0x20 ], %o2
2005018: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
200501c: d8 00 60 14 ld [ %g1 + 0x14 ], %o4
2005020: de 00 60 24 ld [ %g1 + 0x24 ], %o7
/**
* Find the segment on the queue that has the most free pages.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_seg_most_available (const rtems_fdisk_segment_ctl_queue* queue)
2005024: d6 06 20 1c ld [ %i0 + 0x1c ], %o3
2005028: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
200502c: da 06 20 14 ld [ %i0 + 0x14 ], %o5
2005030: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
/**
* Find the segment on the queue that has the most free pages.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_seg_most_available (const rtems_fdisk_segment_ctl_queue* queue)
2005034: 86 02 80 03 add %o2, %g3, %g3
2005038: 84 02 c0 02 add %o3, %g2, %g2
* active, used and bad pages.
*/
static uint32_t
rtems_fdisk_seg_pages_available (const rtems_fdisk_segment_ctl* sc)
{
return sc->pages - (sc->pages_active + sc->pages_used + sc->pages_bad);
200503c: 86 23 00 03 sub %o4, %g3, %g3
2005040: 84 23 40 02 sub %o5, %g2, %g2
2005044: 86 20 c0 0f sub %g3, %o7, %g3
2005048: 84 20 80 04 sub %g2, %g4, %g2
rtems_fdisk_segment_ctl* sc = queue->head;
rtems_fdisk_segment_ctl* biggest = queue->head;
while (sc)
{
if (rtems_fdisk_seg_pages_available (sc) >
200504c: 80 a0 c0 02 cmp %g3, %g2
2005050: 38 80 00 02 bgu,a 2005058 <rtems_fdisk_seg_most_available+0x5c>
2005054: b0 10 00 01 mov %g1, %i0
rtems_fdisk_seg_pages_available (biggest))
biggest = sc;
sc = sc->next;
2005058: c2 00 40 00 ld [ %g1 ], %g1
rtems_fdisk_seg_most_available (const rtems_fdisk_segment_ctl_queue* queue)
{
rtems_fdisk_segment_ctl* sc = queue->head;
rtems_fdisk_segment_ctl* biggest = queue->head;
while (sc)
200505c: 80 a0 60 00 cmp %g1, 0
2005060: 32 bf ff ee bne,a 2005018 <rtems_fdisk_seg_most_available+0x1c>
2005064: d4 00 60 20 ld [ %g1 + 0x20 ], %o2
biggest = sc;
sc = sc->next;
}
return biggest;
}
2005068: 81 c7 e0 08 ret
200506c: 81 e8 00 00 restore
0200528c <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)
{
200528c: 9d e3 bf a0 save %sp, -96, %sp
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
2005290: e0 06 60 08 ld [ %i1 + 8 ], %l0
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;
2005294: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
2005298: 87 2c 20 04 sll %l0, 4, %g3
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
200529c: fa 06 60 0c ld [ %i1 + 0xc ], %i5
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;
20052a0: 83 2c 20 02 sll %l0, 2, %g1
20052a4: 82 20 c0 01 sub %g3, %g1, %g1
20052a8: 86 00 80 01 add %g2, %g1, %g3
20052ac: c2 00 80 01 ld [ %g2 + %g1 ], %g1
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;
20052b0: c6 00 e0 08 ld [ %g3 + 8 ], %g3
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;
20052b4: 85 2f 60 04 sll %i5, 4, %g2
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;
20052b8: e2 00 e0 08 ld [ %g3 + 8 ], %l1
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;
20052bc: 87 2f 60 06 sll %i5, 6, %g3
20052c0: 84 20 c0 02 sub %g3, %g2, %g2
20052c4: 82 00 40 02 add %g1, %g2, %g1
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
20052c8: 90 10 00 18 mov %i0, %o0
device = sc->device;
segment = sc->segment;
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",
20052cc: 94 10 00 10 mov %l0, %o2
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;
20052d0: f0 00 60 04 ld [ %g1 + 4 ], %i0
device = sc->device;
segment = sc->segment;
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",
20052d4: 96 10 00 1d mov %i5, %o3
20052d8: 98 10 00 1a mov %i2, %o4
20052dc: 9a 10 00 1c mov %i4, %o5
20052e0: 13 00 80 c7 sethi %hi(0x2031c00), %o1
20052e4: 7f ff ff 85 call 20050f8 <rtems_fdisk_printf>
20052e8: 92 12 62 98 or %o1, 0x298, %o1 ! 2031e98 <__FUNCTION__.6882+0x5b8>
device, segment, offset, size);
#endif
ret = ops->write (sd, device, segment, offset, buffer, size);
20052ec: c2 04 60 04 ld [ %l1 + 4 ], %g1
20052f0: 90 10 00 18 mov %i0, %o0
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
20052f4: 98 10 00 1b mov %i3, %o4
ops = fd->devices[device].descriptor->flash_ops;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-write: %02d-%03d: o=%08x s=%d",
device, segment, offset, size);
#endif
ret = ops->write (sd, device, segment, offset, buffer, size);
20052f8: 92 10 00 10 mov %l0, %o1
20052fc: 94 10 00 1d mov %i5, %o2
2005300: 96 10 00 1a mov %i2, %o3
2005304: 9f c0 40 00 call %g1
2005308: 9a 10 00 1c mov %i4, %o5
if (ret)
200530c: b0 92 20 00 orcc %o0, 0, %i0
2005310: 02 80 00 03 be 200531c <rtems_fdisk_seg_write+0x90> <== ALWAYS TAKEN
2005314: 82 10 20 01 mov 1, %g1
sc->failed = true;
2005318: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
return ret;
}
200531c: 81 c7 e0 08 ret
2005320: 81 e8 00 00 restore
02005368 <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)
{
2005368: 9d e3 bf a0 save %sp, -96, %sp
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
200536c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2005370: 80 88 60 08 btst 8, %g1
2005374: 22 80 00 0f be,a 20053b0 <rtems_fdisk_seg_write_page+0x48><== NEVER TAKEN
2005378: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED
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);
200537c: f8 06 20 14 ld [ %i0 + 0x14 ], %i4
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,
2005380: 90 10 00 1a mov %i2, %o0
2005384: 7f ff f4 6e call 200253c <.umul>
2005388: 92 10 00 1c mov %i4, %o1
200538c: 92 10 00 19 mov %i1, %o1
2005390: 94 10 00 08 mov %o0, %o2
2005394: 96 10 00 1c mov %i4, %o3
2005398: 7f ff ff 9c call 2005208 <rtems_fdisk_seg_blank_check>
200539c: 90 10 00 18 mov %i0, %o0
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)
20053a0: 80 a2 20 00 cmp %o0, 0
20053a4: 12 80 00 0b bne 20053d0 <rtems_fdisk_seg_write_page+0x68> <== NEVER TAKEN
20053a8: 01 00 00 00 nop
return ret;
}
--fd->erased_blocks;
20053ac: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
20053b0: f8 06 20 14 ld [ %i0 + 0x14 ], %i4
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
20053b4: 82 00 7f ff add %g1, -1, %g1
return rtems_fdisk_seg_write (fd, sc,
20053b8: 90 10 00 1a mov %i2, %o0
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
20053bc: c2 26 20 24 st %g1, [ %i0 + 0x24 ]
return rtems_fdisk_seg_write (fd, sc,
20053c0: 7f ff f4 5f call 200253c <.umul>
20053c4: 92 10 00 1c mov %i4, %o1
20053c8: 7f ff ff b1 call 200528c <rtems_fdisk_seg_write>
20053cc: 95 e8 00 08 restore %g0, %o0, %o2
page * fd->block_size, buffer, fd->block_size);
}
20053d0: 81 c7 e0 08 ret <== NOT EXECUTED
20053d4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02005324 <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)
{
2005324: 9d e3 bf a0 save %sp, -96, %sp
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
2005328: c2 06 20 08 ld [ %i0 + 8 ], %g1
200532c: 80 88 60 08 btst 8, %g1
2005330: 02 80 00 0a be 2005358 <rtems_fdisk_seg_write_page_desc+0x34><== NEVER TAKEN
2005334: b5 2e a0 03 sll %i2, 3, %i2
{
int ret = rtems_fdisk_seg_blank_check (fd, sc,
2005338: 90 10 00 18 mov %i0, %o0
200533c: 92 10 00 19 mov %i1, %o1
2005340: 94 10 00 1a mov %i2, %o2
2005344: 7f ff ff b1 call 2005208 <rtems_fdisk_seg_blank_check>
2005348: 96 10 20 08 mov 8, %o3
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
200534c: 80 a2 20 00 cmp %o0, 0
2005350: 12 80 00 04 bne 2005360 <rtems_fdisk_seg_write_page_desc+0x3c><== NEVER TAKEN
2005354: 01 00 00 00 nop
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
2005358: 7f ff ff cd call 200528c <rtems_fdisk_seg_write>
200535c: 99 e8 20 08 restore %g0, 8, %o4
page_desc, sizeof (rtems_fdisk_page_desc));
}
2005360: 81 c7 e0 08 ret <== NOT EXECUTED
2005364: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02005658 <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)
2005658: 80 a2 60 00 cmp %o1, 0
200565c: 02 80 00 12 be 20056a4 <rtems_fdisk_segment_queue_insert_before+0x4c><== NEVER TAKEN
2005660: 80 a2 a0 00 cmp %o2, 0
{
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
2005664: c2 02 00 00 ld [ %o0 ], %g1
while (it)
2005668: 80 a0 60 00 cmp %g1, 0
200566c: 02 80 00 0d be 20056a0 <rtems_fdisk_segment_queue_insert_before+0x48><== NEVER TAKEN
2005670: 80 a2 40 01 cmp %o1, %g1
{
if (item == it)
2005674: 12 80 00 06 bne 200568c <rtems_fdisk_segment_queue_insert_before+0x34><== NEVER TAKEN
2005678: 84 10 00 08 mov %o0, %g2
{
sc->next = item;
*prev = sc;
queue->count++;
200567c: 10 80 00 18 b 20056dc <rtems_fdisk_segment_queue_insert_before+0x84>
2005680: c2 02 20 08 ld [ %o0 + 8 ], %g1
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (item == it)
2005684: 22 80 00 16 be,a 20056dc <rtems_fdisk_segment_queue_insert_before+0x84><== NOT EXECUTED
2005688: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED
*prev = sc;
queue->count++;
return;
}
prev = &it->next;
200568c: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
it = it->next;
2005690: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
if (item)
{
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
2005694: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005698: 12 bf ff fb bne 2005684 <rtems_fdisk_segment_queue_insert_before+0x2c><== NOT EXECUTED
200569c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
*/
static void
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
if (sc)
20056a0: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED
20056a4: 02 80 00 0c be 20056d4 <rtems_fdisk_segment_queue_insert_before+0x7c><== NOT EXECUTED
20056a8: 01 00 00 00 nop <== NOT EXECUTED
{
sc->next = 0;
if (queue->head)
20056ac: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
20056b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20056b4: 02 80 00 0f be 20056f0 <rtems_fdisk_segment_queue_insert_before+0x98><== NOT EXECUTED
20056b8: c0 22 80 00 clr [ %o2 ] <== NOT EXECUTED
{
queue->tail->next = sc;
20056bc: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED
20056c0: d4 20 40 00 st %o2, [ %g1 ] <== NOT EXECUTED
queue->tail = sc;
20056c4: d4 22 20 04 st %o2, [ %o0 + 4 ] <== NOT EXECUTED
else
{
queue->head = queue->tail = sc;
}
queue->count++;
20056c8: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED
20056cc: 82 00 60 01 inc %g1 <== NOT EXECUTED
20056d0: c2 22 20 08 st %g1, [ %o0 + 8 ] <== NOT EXECUTED
20056d4: 81 c3 e0 08 retl <== NOT EXECUTED
20056d8: 01 00 00 00 nop <== NOT EXECUTED
while (it)
{
if (item == it)
{
sc->next = item;
20056dc: d2 22 80 00 st %o1, [ %o2 ]
*prev = sc;
20056e0: d4 20 80 00 st %o2, [ %g2 ]
queue->count++;
20056e4: 82 00 60 01 inc %g1
return;
20056e8: 81 c3 e0 08 retl
20056ec: c2 22 20 08 st %g1, [ %o0 + 8 ]
queue->tail->next = sc;
queue->tail = sc;
}
else
{
queue->head = queue->tail = sc;
20056f0: d4 22 20 04 st %o2, [ %o0 + 4 ] <== NOT EXECUTED
20056f4: 10 bf ff f5 b 20056c8 <rtems_fdisk_segment_queue_insert_before+0x70><== NOT EXECUTED
20056f8: d4 22 00 00 st %o2, [ %o0 ] <== NOT EXECUTED
02004e54 <rtems_fdisk_segment_queue_remove>:
static void
rtems_fdisk_segment_queue_remove (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* prev = 0;
rtems_fdisk_segment_ctl* it = queue->head;
2004e54: c2 02 00 00 ld [ %o0 ], %g1
/*
* Do not change sc->next as sc could be on another queue.
*/
while (it)
2004e58: 80 a0 60 00 cmp %g1, 0
2004e5c: 02 80 00 0d be 2004e90 <rtems_fdisk_segment_queue_remove+0x3c>
2004e60: 80 a0 40 09 cmp %g1, %o1
{
if (sc == it)
2004e64: 32 80 00 08 bne,a 2004e84 <rtems_fdisk_segment_queue_remove+0x30>
2004e68: c4 00 40 00 ld [ %g1 ], %g2
{
if (prev == 0)
{
queue->head = sc->next;
2004e6c: 10 80 00 16 b 2004ec4 <rtems_fdisk_segment_queue_remove+0x70>
2004e70: c2 02 40 00 ld [ %o1 ], %g1
* Do not change sc->next as sc could be on another queue.
*/
while (it)
{
if (sc == it)
2004e74: 22 80 00 09 be,a 2004e98 <rtems_fdisk_segment_queue_remove+0x44>
2004e78: c6 02 40 00 ld [ %o1 ], %g3
2004e7c: 82 10 00 02 mov %g2, %g1
queue->count--;
break;
}
prev = it;
it = it->next;
2004e80: c4 00 40 00 ld [ %g1 ], %g2
/*
* Do not change sc->next as sc could be on another queue.
*/
while (it)
2004e84: 80 a0 a0 00 cmp %g2, 0
2004e88: 12 bf ff fb bne 2004e74 <rtems_fdisk_segment_queue_remove+0x20>
2004e8c: 80 a2 40 02 cmp %o1, %g2
2004e90: 81 c3 e0 08 retl
2004e94: 01 00 00 00 nop
queue->tail = 0;
}
else
{
prev->next = sc->next;
if (queue->tail == sc)
2004e98: c4 02 20 04 ld [ %o0 + 4 ], %g2
2004e9c: 80 a0 80 09 cmp %g2, %o1
2004ea0: 02 80 00 07 be 2004ebc <rtems_fdisk_segment_queue_remove+0x68><== ALWAYS TAKEN
2004ea4: c6 20 40 00 st %g3, [ %g1 ]
queue->tail = prev;
}
sc->next = 0;
queue->count--;
2004ea8: c2 02 20 08 ld [ %o0 + 8 ], %g1
{
prev->next = sc->next;
if (queue->tail == sc)
queue->tail = prev;
}
sc->next = 0;
2004eac: c0 22 40 00 clr [ %o1 ]
queue->count--;
2004eb0: 82 00 7f ff add %g1, -1, %g1
break;
2004eb4: 81 c3 e0 08 retl
2004eb8: c2 22 20 08 st %g1, [ %o0 + 8 ]
}
else
{
prev->next = sc->next;
if (queue->tail == sc)
queue->tail = prev;
2004ebc: 10 bf ff fb b 2004ea8 <rtems_fdisk_segment_queue_remove+0x54>
2004ec0: c2 22 20 04 st %g1, [ %o0 + 4 ]
if (sc == it)
{
if (prev == 0)
{
queue->head = sc->next;
if (queue->head == 0)
2004ec4: 80 a0 60 00 cmp %g1, 0
2004ec8: 12 bf ff f8 bne 2004ea8 <rtems_fdisk_segment_queue_remove+0x54>
2004ecc: c2 22 00 00 st %g1, [ %o0 ]
queue->tail = 0;
2004ed0: 10 bf ff f6 b 2004ea8 <rtems_fdisk_segment_queue_remove+0x54>
2004ed4: c0 22 20 04 clr [ %o0 + 4 ]
020053d8 <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, ...)
{
20053d8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int ret = 0;
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
20053dc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
20053e0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
20053e4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
20053e8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
*/
static int
rtems_fdisk_warning (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
if (fd->info_level >= 1)
20053ec: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
20053f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20053f4: 02 80 00 19 be 2005458 <rtems_fdisk_warning+0x80> <== NOT EXECUTED
20053f8: b0 10 20 00 clr %i0 <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:warning:");
20053fc: 3b 00 80 db sethi %hi(0x2036c00), %i5 <== NOT EXECUTED
2005400: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 ! 2036f50 <_impure_ptr><== NOT EXECUTED
2005404: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2005408: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
200540c: 82 07 a0 4c add %fp, 0x4c, %g1 <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
2005410: 94 10 20 0e mov 0xe, %o2 <== NOT EXECUTED
{
int ret = 0;
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
2005414: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
fprintf (stdout, "fdisk:warning:");
2005418: 11 00 80 c7 sethi %hi(0x2031c00), %o0 <== NOT EXECUTED
200541c: 40 00 75 c3 call 2022b28 <fwrite> <== NOT EXECUTED
2005420: 90 12 22 c0 or %o0, 0x2c0, %o0 ! 2031ec0 <__FUNCTION__.6882+0x5e0><== NOT EXECUTED
ret = vfprintf (stdout, format, args);
2005424: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 <== NOT EXECUTED
2005428: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
200542c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2005430: 40 00 96 5c call 202ada0 <vfprintf> <== NOT EXECUTED
2005434: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
fprintf (stdout, "\n");
2005438: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 <== NOT EXECUTED
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:warning:");
ret = vfprintf (stdout, format, args);
200543c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
fprintf (stdout, "\n");
2005440: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED
2005444: 40 00 75 36 call 202291c <fputc> <== NOT EXECUTED
2005448: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
fflush (stdout);
200544c: c2 07 63 50 ld [ %i5 + 0x350 ], %g1 <== NOT EXECUTED
2005450: 40 00 74 1e call 20224c8 <fflush> <== NOT EXECUTED
2005454: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
va_end (args);
}
return ret;
}
2005458: 81 c7 e0 08 ret <== NOT EXECUTED
200545c: 81 e8 00 00 restore <== NOT EXECUTED
0200cc74 <rtems_filesystem_check_access>:
int eval_flags,
mode_t node_mode,
uid_t node_uid,
gid_t node_gid
)
{
200cc74: 9d e3 bf a0 save %sp, -96, %sp
mode_t perm_flags = eval_flags & RTEMS_FS_PERMS_RWX;
uid_t task_uid = geteuid();
200cc78: 40 00 09 60 call 200f1f8 <geteuid>
200cc7c: b0 0e 20 07 and %i0, 7, %i0
if (task_uid == 0 || task_uid == node_uid) {
200cc80: 91 2a 20 10 sll %o0, 0x10, %o0
200cc84: 91 32 20 10 srl %o0, 0x10, %o0
200cc88: 80 a2 00 1a cmp %o0, %i2
200cc8c: 12 80 00 08 bne 200ccac <rtems_filesystem_check_access+0x38>
200cc90: 80 a2 20 00 cmp %o0, 0
perm_flags <<= RTEMS_FS_USR_SHIFT;
200cc94: b1 2e 20 06 sll %i0, 6, %i0
} else {
perm_flags <<= RTEMS_FS_OTH_SHIFT;
}
}
return (perm_flags & node_mode) == perm_flags;
200cc98: b2 2e 00 19 andn %i0, %i1, %i1
}
200cc9c: 80 a0 00 19 cmp %g0, %i1
200cca0: b0 60 3f ff subx %g0, -1, %i0
200cca4: 81 c7 e0 08 ret
200cca8: 81 e8 00 00 restore
)
{
mode_t perm_flags = eval_flags & RTEMS_FS_PERMS_RWX;
uid_t task_uid = geteuid();
if (task_uid == 0 || task_uid == node_uid) {
200ccac: 22 bf ff fb be,a 200cc98 <rtems_filesystem_check_access+0x24>
200ccb0: b1 2e 20 06 sll %i0, 6, %i0
perm_flags <<= RTEMS_FS_USR_SHIFT;
} else {
gid_t task_gid = getegid();
200ccb4: 40 00 09 4d call 200f1e8 <getegid>
200ccb8: 01 00 00 00 nop
if (task_gid == 0 || task_gid == node_gid) {
200ccbc: 91 2a 20 10 sll %o0, 0x10, %o0
200ccc0: 91 32 20 10 srl %o0, 0x10, %o0
200ccc4: 80 a2 00 1b cmp %o0, %i3
200ccc8: 12 80 00 08 bne 200cce8 <rtems_filesystem_check_access+0x74>
200cccc: 80 a2 20 00 cmp %o0, 0
perm_flags <<= RTEMS_FS_GRP_SHIFT;
200ccd0: b1 2e 20 03 sll %i0, 3, %i0
} else {
perm_flags <<= RTEMS_FS_OTH_SHIFT;
}
}
return (perm_flags & node_mode) == perm_flags;
200ccd4: b2 2e 00 19 andn %i0, %i1, %i1
}
200ccd8: 80 a0 00 19 cmp %g0, %i1
200ccdc: b0 60 3f ff subx %g0, -1, %i0
200cce0: 81 c7 e0 08 ret
200cce4: 81 e8 00 00 restore
if (task_uid == 0 || task_uid == node_uid) {
perm_flags <<= RTEMS_FS_USR_SHIFT;
} else {
gid_t task_gid = getegid();
if (task_gid == 0 || task_gid == node_gid) {
200cce8: 32 bf ff ed bne,a 200cc9c <rtems_filesystem_check_access+0x28><== ALWAYS TAKEN
200ccec: b2 2e 00 19 andn %i0, %i1, %i1
perm_flags <<= RTEMS_FS_GRP_SHIFT;
200ccf0: 10 bf ff f9 b 200ccd4 <rtems_filesystem_check_access+0x60><== NOT EXECUTED
200ccf4: b1 2e 20 03 sll %i0, 3, %i0 <== NOT EXECUTED
0200cd30 <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
)
{
200cd30: 9d e3 bf a0 save %sp, -96, %sp
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
200cd34: 37 00 80 6d sethi %hi(0x201b400), %i3
¤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);
200cd38: 39 00 80 6c sethi %hi(0x201b000), %i4
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 =
200cd3c: ba 06 20 18 add %i0, 0x18, %i5
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
200cd40: b6 16 e3 08 or %i3, 0x308, %i3
¤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);
200cd44: b8 17 22 78 or %i4, 0x278, %i4
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
200cd48: 40 00 00 91 call 200cf8c <rtems_filesystem_eval_path_next_token>
200cd4c: 90 10 00 18 mov %i0, %o0
*token = ctx->token;
*tokenlen = ctx->tokenlen;
200cd50: e0 06 20 0c ld [ %i0 + 0xc ], %l0
const char *token;
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
200cd54: 80 a4 20 00 cmp %l0, 0
200cd58: 02 80 00 18 be 200cdb8 <rtems_filesystem_eval_path_generic+0x88>
200cd5c: e2 06 20 08 ld [ %i0 + 8 ], %l1
if ((*config->is_directory)(ctx, arg)) {
200cd60: c2 06 80 00 ld [ %i2 ], %g1
200cd64: 90 10 00 18 mov %i0, %o0
200cd68: 9f c0 40 00 call %g1
200cd6c: 92 10 00 19 mov %i1, %o1
200cd70: 80 8a 20 ff btst 0xff, %o0
200cd74: 02 80 00 13 be 200cdc0 <rtems_filesystem_eval_path_generic+0x90>
200cd78: 80 a4 20 01 cmp %l0, 1
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
200cd7c: 02 80 00 23 be 200ce08 <rtems_filesystem_eval_path_generic+0xd8>
200cd80: 80 a4 20 02 cmp %l0, 2
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
200cd84: 22 80 00 2f be,a 200ce40 <rtems_filesystem_eval_path_generic+0x110>
200cd88: c2 4c 40 00 ldsb [ %l1 ], %g1
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
200cd8c: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200cd90: 90 10 00 18 mov %i0, %o0
200cd94: 92 10 00 19 mov %i1, %o1
200cd98: 94 10 00 11 mov %l1, %o2
200cd9c: 9f c0 40 00 call %g1
200cda0: 96 10 00 10 mov %l0, %o3
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
200cda4: 80 a2 20 02 cmp %o0, 2
200cda8: 02 80 00 08 be 200cdc8 <rtems_filesystem_eval_path_generic+0x98>
200cdac: 80 a2 20 00 cmp %o0, 0
)
{
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
200cdb0: 02 bf ff e6 be 200cd48 <rtems_filesystem_eval_path_generic+0x18>
200cdb4: 01 00 00 00 nop
200cdb8: 81 c7 e0 08 ret
200cdbc: 81 e8 00 00 restore
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
200cdc0: 7f ff df 12 call 2004a08 <rtems_filesystem_eval_path_error>
200cdc4: 93 e8 20 14 restore %g0, 0x14, %o1
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
if (rtems_filesystem_eval_path_has_path(ctx)) {
200cdc8: c2 06 20 04 ld [ %i0 + 4 ], %g1
200cdcc: 80 a0 60 00 cmp %g1, 0
200cdd0: 02 bf ff fa be 200cdb8 <rtems_filesystem_eval_path_generic+0x88>
200cdd4: 01 00 00 00 nop
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
200cdd8: 40 00 00 54 call 200cf28 <rtems_filesystem_eval_path_eat_delimiter>
200cddc: 90 10 00 18 mov %i0, %o0
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
200cde0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
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 (
200cde4: 80 88 60 80 btst 0x80, %g1
200cde8: 02 80 00 06 be 200ce00 <rtems_filesystem_eval_path_generic+0xd0>
200cdec: 01 00 00 00 nop
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
200cdf0: c2 06 20 04 ld [ %i0 + 4 ], %g1
200cdf4: 80 a0 60 00 cmp %g1, 0
200cdf8: 02 bf ff f0 be 200cdb8 <rtems_filesystem_eval_path_generic+0x88>
200cdfc: 01 00 00 00 nop
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
200ce00: 7f ff df 02 call 2004a08 <rtems_filesystem_eval_path_error>
200ce04: 93 e8 20 02 restore %g0, 2, %o1
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
200ce08: c2 4c 40 00 ldsb [ %l1 ], %g1
200ce0c: 80 a0 60 2e cmp %g1, 0x2e
200ce10: 32 bf ff e0 bne,a 200cd90 <rtems_filesystem_eval_path_generic+0x60>
200ce14: c2 06 a0 04 ld [ %i2 + 4 ], %g1
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
if ((*config->is_directory)(ctx, arg)) {
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
if (rtems_filesystem_eval_path_has_path(ctx)) {
200ce18: c2 06 20 04 ld [ %i0 + 4 ], %g1
200ce1c: 80 a0 60 00 cmp %g1, 0
200ce20: 32 80 00 2c bne,a 200ced0 <rtems_filesystem_eval_path_generic+0x1a0>
200ce24: c2 06 a0 04 ld [ %i2 + 4 ], %g1
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) {
200ce28: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200ce2c: 80 88 61 00 btst 0x100, %g1
200ce30: 22 80 00 28 be,a 200ced0 <rtems_filesystem_eval_path_generic+0x1a0>
200ce34: c2 06 a0 04 ld [ %i2 + 4 ], %g1
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
200ce38: 7f ff de f4 call 2004a08 <rtems_filesystem_eval_path_error>
200ce3c: 93 e8 20 16 restore %g0, 0x16, %o1
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
200ce40: 80 a0 60 2e cmp %g1, 0x2e
200ce44: 32 bf ff d3 bne,a 200cd90 <rtems_filesystem_eval_path_generic+0x60>
200ce48: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200ce4c: c2 4c 60 01 ldsb [ %l1 + 1 ], %g1
200ce50: 80 a0 60 2e cmp %g1, 0x2e
200ce54: 32 bf ff cf bne,a 200cd90 <rtems_filesystem_eval_path_generic+0x60><== NEVER TAKEN
200ce58: c2 06 a0 04 ld [ %i2 + 4 ], %g1 <== NOT EXECUTED
static bool is_eval_path_root(
const rtems_filesystem_eval_path_context_t *ctx,
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
200ce5c: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
return loc->mt_entry == rootloc->mt_entry
200ce60: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
&& (*loc->ops->are_nodes_equal_h)( loc, rootloc );
200ce64: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
200ce68: 80 a0 80 01 cmp %g2, %g1
200ce6c: 22 80 00 27 be,a 200cf08 <rtems_filesystem_eval_path_generic+0x1d8>
200ce70: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
static bool is_fs_root( const rtems_filesystem_location_info_t *loc )
{
const rtems_filesystem_location_info_t *mt_fs_root =
&loc->mt_entry->mt_fs_root->location;
return (*loc->ops->are_nodes_equal_h)( loc, mt_fs_root );
200ce74: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200ce78: d2 00 a0 18 ld [ %g2 + 0x18 ], %o1
200ce7c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200ce80: 9f c0 40 00 call %g1
200ce84: 90 10 00 1d mov %i5, %o0
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)) {
200ce88: 80 8a 20 ff btst 0xff, %o0
200ce8c: 22 80 00 18 be,a 200ceec <rtems_filesystem_eval_path_generic+0x1bc>
200ce90: c2 06 a0 04 ld [ %i2 + 4 ], %g1
if (currentloc->mt_entry->mt_point_node != NULL) {
200ce94: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200ce98: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200ce9c: 80 a0 a0 00 cmp %g2, 0
200cea0: 22 80 00 0c be,a 200ced0 <rtems_filesystem_eval_path_generic+0x1a0><== NEVER TAKEN
200cea4: c2 06 a0 04 ld [ %i2 + 4 ], %g1 <== NOT EXECUTED
static inline void rtems_filesystem_eval_path_put_back_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
200cea8: c4 06 20 0c ld [ %i0 + 0xc ], %g2
ctx->path -= tokenlen;
200ceac: c6 06 00 00 ld [ %i0 ], %g3
ctx->pathlen += tokenlen;
200ceb0: c8 06 20 04 ld [ %i0 + 4 ], %g4
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
ctx->path -= tokenlen;
200ceb4: 86 20 c0 02 sub %g3, %g2, %g3
ctx->pathlen += tokenlen;
200ceb8: 84 01 00 02 add %g4, %g2, %g2
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
ctx->path -= tokenlen;
200cebc: c6 26 00 00 st %g3, [ %i0 ]
ctx->pathlen += tokenlen;
200cec0: c4 26 20 04 st %g2, [ %i0 + 4 ]
ctx->tokenlen = 0;
200cec4: c0 26 20 0c clr [ %i0 + 0xc ]
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
200cec8: 7f ff df b0 call 2004d88 <rtems_filesystem_eval_path_restart>
200cecc: 93 e8 60 14 restore %g1, 0x14, %o1
¤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);
200ced0: 90 10 00 18 mov %i0, %o0
200ced4: 92 10 00 19 mov %i1, %o1
200ced8: 94 10 00 1c mov %i4, %o2
200cedc: 9f c0 40 00 call %g1
200cee0: 96 10 20 01 mov 1, %o3
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
200cee4: 10 bf ff b1 b 200cda8 <rtems_filesystem_eval_path_generic+0x78>
200cee8: 80 a2 20 02 cmp %o0, 2
} else {
/* This is the root file system */
status = (*config->eval_token)(ctx, arg, ".", 1);
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
200ceec: 90 10 00 18 mov %i0, %o0
200cef0: 92 10 00 19 mov %i1, %o1
200cef4: 94 10 00 1b mov %i3, %o2
200cef8: 9f c0 40 00 call %g1
200cefc: 96 10 20 02 mov 2, %o3
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
200cf00: 10 bf ff aa b 200cda8 <rtems_filesystem_eval_path_generic+0x78>
200cf04: 80 a2 20 02 cmp %o0, 2
)
{
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
return loc->mt_entry == rootloc->mt_entry
&& (*loc->ops->are_nodes_equal_h)( loc, rootloc );
200cf08: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200cf0c: 9f c0 40 00 call %g1
200cf10: 90 10 00 1d mov %i5, %o0
200cf14: 80 8a 20 ff btst 0xff, %o0
200cf18: 32 bf ff ee bne,a 200ced0 <rtems_filesystem_eval_path_generic+0x1a0>
200cf1c: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200cf20: 10 bf ff d5 b 200ce74 <rtems_filesystem_eval_path_generic+0x144>
200cf24: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
0200cf8c <rtems_filesystem_eval_path_next_token>:
}
void rtems_filesystem_eval_path_next_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
200cf8c: 9d e3 bf a0 save %sp, -96, %sp
rtems_filesystem_eval_path_eat_delimiter(ctx);
200cf90: 7f ff ff e6 call 200cf28 <rtems_filesystem_eval_path_eat_delimiter>
200cf94: 90 10 00 18 mov %i0, %o0
ctx->pathlen = (size_t) (end - current);
}
static void next_token(rtems_filesystem_eval_path_context_t *ctx)
{
const char *begin = ctx->path;
200cf98: de 06 00 00 ld [ %i0 ], %o7
const char *end = begin + ctx->pathlen;
200cf9c: c8 06 20 04 ld [ %i0 + 4 ], %g4
200cfa0: 88 03 c0 04 add %o7, %g4, %g4
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
200cfa4: 80 a3 c0 04 cmp %o7, %g4
200cfa8: 02 80 00 2c be 200d058 <rtems_filesystem_eval_path_next_token+0xcc>
200cfac: 86 10 00 0f mov %o7, %g3
200cfb0: c4 4b c0 00 ldsb [ %o7 ], %g2
200cfb4: 86 18 a0 5c xor %g2, 0x5c, %g3
200cfb8: 80 a0 00 03 cmp %g0, %g3
200cfbc: 84 18 a0 2f xor %g2, 0x2f, %g2
200cfc0: 86 60 3f ff subx %g0, -1, %g3
200cfc4: 80 a0 00 02 cmp %g0, %g2
200cfc8: 84 60 3f ff subx %g0, -1, %g2
200cfcc: 80 90 c0 02 orcc %g3, %g2, %g0
200cfd0: 02 80 00 0d be 200d004 <rtems_filesystem_eval_path_next_token+0x78><== ALWAYS TAKEN
200cfd4: 82 10 00 0f mov %o7, %g1
200cfd8: 10 80 00 23 b 200d064 <rtems_filesystem_eval_path_next_token+0xd8><== NOT EXECUTED
200cfdc: 86 10 00 0f mov %o7, %g3 <== NOT EXECUTED
200cfe0: 86 18 a0 5c xor %g2, 0x5c, %g3
200cfe4: 80 a0 00 03 cmp %g0, %g3
200cfe8: 84 18 a0 2f xor %g2, 0x2f, %g2
200cfec: 86 60 3f ff subx %g0, -1, %g3
200cff0: 80 a0 00 02 cmp %g0, %g2
200cff4: 84 60 3f ff subx %g0, -1, %g2
200cff8: 80 90 c0 02 orcc %g3, %g2, %g0
200cffc: 12 80 00 0f bne 200d038 <rtems_filesystem_eval_path_next_token+0xac>
200d000: 86 10 00 01 mov %g1, %g3
++current;
200d004: 82 00 60 01 inc %g1
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
200d008: 80 a1 00 01 cmp %g4, %g1
200d00c: 32 bf ff f5 bne,a 200cfe0 <rtems_filesystem_eval_path_next_token+0x54>
200d010: c4 48 40 00 ldsb [ %g1 ], %g2
200d014: 86 10 00 04 mov %g4, %g3
200d018: 84 21 00 0f sub %g4, %o7, %g2
++current;
}
ctx->path = current;
ctx->pathlen = (size_t) (end - current);
200d01c: 88 21 00 03 sub %g4, %g3, %g4
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
++current;
}
ctx->path = current;
200d020: c2 26 00 00 st %g1, [ %i0 ]
ctx->pathlen = (size_t) (end - current);
200d024: c8 26 20 04 st %g4, [ %i0 + 4 ]
ctx->token = begin;
200d028: de 26 20 08 st %o7, [ %i0 + 8 ]
ctx->tokenlen = (size_t) (current - begin);
200d02c: c4 26 20 0c st %g2, [ %i0 + 0xc ]
rtems_filesystem_eval_path_context_t *ctx
)
{
rtems_filesystem_eval_path_eat_delimiter(ctx);
next_token(ctx);
}
200d030: 81 c7 e0 08 ret
200d034: 81 e8 00 00 restore
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
200d038: 84 20 40 0f sub %g1, %o7, %g2
++current;
}
ctx->path = current;
ctx->pathlen = (size_t) (end - current);
200d03c: 88 21 00 03 sub %g4, %g3, %g4
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
++current;
}
ctx->path = current;
200d040: c2 26 00 00 st %g1, [ %i0 ]
ctx->pathlen = (size_t) (end - current);
200d044: c8 26 20 04 st %g4, [ %i0 + 4 ]
ctx->token = begin;
200d048: de 26 20 08 st %o7, [ %i0 + 8 ]
ctx->tokenlen = (size_t) (current - begin);
200d04c: c4 26 20 0c st %g2, [ %i0 + 0xc ]
rtems_filesystem_eval_path_context_t *ctx
)
{
rtems_filesystem_eval_path_eat_delimiter(ctx);
next_token(ctx);
}
200d050: 81 c7 e0 08 ret
200d054: 81 e8 00 00 restore
{
const char *begin = ctx->path;
const char *end = begin + ctx->pathlen;
const char *current = begin;
while (current != end && !rtems_filesystem_is_delimiter(*current)) {
200d058: 82 10 00 0f mov %o7, %g1
200d05c: 10 bf ff f0 b 200d01c <rtems_filesystem_eval_path_next_token+0x90>
200d060: 84 10 20 00 clr %g2
200d064: 10 bf ff ee b 200d01c <rtems_filesystem_eval_path_next_token+0x90><== NOT EXECUTED
200d068: 84 10 20 00 clr %g2 <== NOT EXECUTED
02004de8 <rtems_filesystem_eval_path_recursive>:
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
2004de8: 9d e3 bf a0 save %sp, -96, %sp
if (pathlen > 0) {
2004dec: 80 a6 a0 00 cmp %i2, 0
2004df0: 02 80 00 24 be 2004e80 <rtems_filesystem_eval_path_recursive+0x98><== NEVER TAKEN
2004df4: ba 10 00 18 mov %i0, %i5
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
2004df8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2004dfc: 80 a0 60 1f cmp %g1, 0x1f
2004e00: 14 80 00 27 bg 2004e9c <rtems_filesystem_eval_path_recursive+0xb4>
2004e04: 01 00 00 00 nop
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
2004e08: c4 4e 40 00 ldsb [ %i1 ], %g2
const char *saved_path = ctx->path;
2004e0c: f6 06 00 00 ld [ %i0 ], %i3
2004e10: 86 18 a0 5c xor %g2, 0x5c, %g3
2004e14: 80 a0 00 03 cmp %g0, %g3
2004e18: 84 18 a0 2f xor %g2, 0x2f, %g2
2004e1c: 86 60 3f ff subx %g0, -1, %g3
2004e20: 80 a0 00 02 cmp %g0, %g2
2004e24: 84 60 3f ff subx %g0, -1, %g2
size_t saved_pathlen = ctx->pathlen;
if (rtems_filesystem_is_delimiter(path [0])) {
2004e28: 80 90 c0 02 orcc %g3, %g2, %g0
2004e2c: 12 80 00 17 bne 2004e88 <rtems_filesystem_eval_path_recursive+0xa0>
2004e30: f8 06 20 04 ld [ %i0 + 4 ], %i4
}
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
2004e34: 82 00 60 01 inc %g1
if (rtems_filesystem_is_delimiter(path [0])) {
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
}
ctx->path = path;
2004e38: f2 27 40 00 st %i1, [ %i5 ]
ctx->pathlen = pathlen;
2004e3c: f4 27 60 04 st %i2, [ %i5 + 4 ]
++ctx->recursionlevel;
2004e40: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
while (ctx->pathlen > 0) {
(*ctx->currentloc.ops->eval_path_h)(ctx);
2004e44: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
2004e48: c2 00 60 08 ld [ %g1 + 8 ], %g1
2004e4c: 9f c0 40 00 call %g1
2004e50: 90 10 00 1d mov %i5, %o0
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
2004e54: c2 07 60 04 ld [ %i5 + 4 ], %g1
2004e58: 80 a0 60 00 cmp %g1, 0
2004e5c: 32 bf ff fb bne,a 2004e48 <rtems_filesystem_eval_path_recursive+0x60>
2004e60: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
(*ctx->currentloc.ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
2004e64: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
ctx->path = saved_path;
2004e68: f6 27 40 00 st %i3, [ %i5 ]
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
(*ctx->currentloc.ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
2004e6c: 82 00 7f ff add %g1, -1, %g1
ctx->path = saved_path;
ctx->pathlen = saved_pathlen;
2004e70: f8 27 60 04 st %i4, [ %i5 + 4 ]
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
(*ctx->currentloc.ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
2004e74: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
2004e78: 81 c7 e0 08 ret
2004e7c: 81 e8 00 00 restore
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
2004e80: 7f ff fe e2 call 2004a08 <rtems_filesystem_eval_path_error><== NOT EXECUTED
2004e84: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
const char *saved_path = ctx->path;
size_t saved_pathlen = ctx->pathlen;
if (rtems_filesystem_is_delimiter(path [0])) {
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
2004e88: 90 10 00 18 mov %i0, %o0
2004e8c: 7f ff ff bf call 2004d88 <rtems_filesystem_eval_path_restart>
2004e90: 92 06 20 34 add %i0, 0x34, %o1
2004e94: 10 bf ff e8 b 2004e34 <rtems_filesystem_eval_path_recursive+0x4c>
2004e98: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
--ctx->recursionlevel;
ctx->path = saved_path;
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
2004e9c: 7f ff fe db call 2004a08 <rtems_filesystem_eval_path_error>
2004ea0: 93 e8 20 5c restore %g0, 0x5c, %o1
0200cab0 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
200cab0: 9d e3 bf 98 save %sp, -104, %sp
find_arg fa = {
200cab4: f0 27 bf f8 st %i0, [ %fp + -8 ]
200cab8: c0 27 bf fc clr [ %fp + -4 ]
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
200cabc: 82 10 00 18 mov %i0, %g1
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
200cac0: 80 a0 60 00 cmp %g1, 0
200cac4: 02 80 00 07 be 200cae0 <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
200cac8: b0 10 20 00 clr %i0
rtems_filesystem_iterate( find_handler, &fa );
200cacc: 92 07 bf f8 add %fp, -8, %o1
200cad0: 11 00 80 32 sethi %hi(0x200c800), %o0
200cad4: 7f ff ff c2 call 200c9dc <rtems_filesystem_iterate>
200cad8: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 200c9a8 <find_handler>
200cadc: f0 07 bf fc ld [ %fp + -4 ], %i0
}
return fa.mount_h;
}
200cae0: 81 c7 e0 08 ret
200cae4: 81 e8 00 00 restore
02003518 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
2003518: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
200351c: 05 00 80 69 sethi %hi(0x201a400), %g2
2003520: 82 10 a2 28 or %g2, 0x228, %g1 ! 201a628 <rtems_filesystem_root_configuration>
2003524: d0 00 a2 28 ld [ %g2 + 0x228 ], %o0
2003528: d2 00 60 04 ld [ %g1 + 4 ], %o1
200352c: d4 00 60 08 ld [ %g1 + 8 ], %o2
2003530: d6 00 60 0c ld [ %g1 + 0xc ], %o3
2003534: 40 00 02 45 call 2003e48 <mount>
2003538: d8 00 60 10 ld [ %g1 + 0x10 ], %o4
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
200353c: 80 a2 20 00 cmp %o0, 0
2003540: 12 80 00 0a bne 2003568 <rtems_filesystem_initialize+0x50><== NEVER TAKEN
2003544: 92 10 21 ff mov 0x1ff, %o1
*
* 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);
2003548: 11 00 80 6b sethi %hi(0x201ac00), %o0
200354c: 40 00 01 f7 call 2003d28 <mkdir>
2003550: 90 12 21 00 or %o0, 0x100, %o0 ! 201ad00 <IMFS_node_control_default+0x18>
if ( rv != 0 )
2003554: 80 a2 20 00 cmp %o0, 0
2003558: 12 80 00 07 bne 2003574 <rtems_filesystem_initialize+0x5c><== NEVER TAKEN
200355c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
2003560: 81 c7 e0 08 ret
2003564: 81 e8 00 00 restore
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
rtems_fatal_error_occurred( 0xABCD0002 );
2003568: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
200356c: 40 00 13 b2 call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003570: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <RAM_END+0xa98d0002><== NOT EXECUTED
* created that way by the IMFS.
*/
rv = mkdir( "/dev", 0777);
if ( rv != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
2003574: 40 00 13 b0 call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003578: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED
0200c9dc <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
200c9dc: 9d e3 bf a0 save %sp, -96, %sp
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200c9e0: 37 00 80 69 sethi %hi(0x201a400), %i3
200c9e4: c2 06 e2 3c ld [ %i3 + 0x23c ], %g1 ! 201a63c <rtems_filesystem_table>
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
200c9e8: ba 10 00 18 mov %i0, %i5
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200c9ec: 80 a0 60 00 cmp %g1, 0
200c9f0: 02 80 00 13 be 200ca3c <rtems_filesystem_iterate+0x60> <== NEVER TAKEN
200c9f4: b6 16 e2 3c or %i3, 0x23c, %i3
200c9f8: b8 10 00 1b mov %i3, %i4
200c9fc: 10 80 00 05 b 200ca10 <rtems_filesystem_iterate+0x34>
200ca00: b4 06 e0 08 add %i3, 8, %i2
200ca04: b0 8a 20 ff andcc %o0, 0xff, %i0
200ca08: 12 80 00 28 bne 200caa8 <rtems_filesystem_iterate+0xcc>
200ca0c: 01 00 00 00 nop
stop = (*routine)( table_entry, routine_arg );
200ca10: 90 10 00 1c mov %i4, %o0
200ca14: 9f c7 40 00 call %i5
200ca18: 92 10 00 19 mov %i1, %o1
rtems_filesystem_table_t entry;
} filesystem_node;
static RTEMS_CHAIN_DEFINE_EMPTY(filesystem_chain);
bool rtems_filesystem_iterate(
200ca1c: 82 27 00 1b sub %i4, %i3, %g1
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
200ca20: c2 06 80 01 ld [ %i2 + %g1 ], %g1
200ca24: 80 a0 60 00 cmp %g1, 0
200ca28: 12 bf ff f7 bne 200ca04 <rtems_filesystem_iterate+0x28>
200ca2c: b8 07 20 08 add %i4, 8, %i4
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
200ca30: b0 8a 20 ff andcc %o0, 0xff, %i0
200ca34: 12 80 00 1d bne 200caa8 <rtems_filesystem_iterate+0xcc>
200ca38: 01 00 00 00 nop
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200ca3c: 39 00 80 74 sethi %hi(0x201d000), %i4
200ca40: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 ! 201d240 <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200ca44: 35 00 80 72 sethi %hi(0x201c800), %i2
200ca48: 92 10 20 00 clr %o1
200ca4c: 7f ff ec b8 call 2007d2c <rtems_semaphore_obtain>
200ca50: 94 10 20 00 clr %o2
200ca54: f6 06 a1 24 ld [ %i2 + 0x124 ], %i3
200ca58: b4 16 a1 24 or %i2, 0x124, %i2
rtems_libio_lock();
for (
200ca5c: b4 06 a0 04 add %i2, 4, %i2
200ca60: 80 a6 c0 1a cmp %i3, %i2
200ca64: 12 80 00 05 bne 200ca78 <rtems_filesystem_iterate+0x9c>
200ca68: b0 10 20 00 clr %i0
200ca6c: 30 80 00 0b b,a 200ca98 <rtems_filesystem_iterate+0xbc>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
200ca70: 12 80 00 0a bne 200ca98 <rtems_filesystem_iterate+0xbc> <== NEVER TAKEN
200ca74: 01 00 00 00 nop
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
200ca78: 90 06 e0 08 add %i3, 8, %o0
200ca7c: 9f c7 40 00 call %i5
200ca80: 92 10 00 19 mov %i1, %o1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
200ca84: f6 06 c0 00 ld [ %i3 ], %i3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
200ca88: 80 a6 c0 1a cmp %i3, %i2
200ca8c: 32 bf ff f9 bne,a 200ca70 <rtems_filesystem_iterate+0x94>
200ca90: b0 8a 20 ff andcc %o0, 0xff, %i0
200ca94: b0 0a 20 ff and %o0, 0xff, %i0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200ca98: 7f ff ec ef call 2007e54 <rtems_semaphore_release>
200ca9c: d0 07 22 40 ld [ %i4 + 0x240 ], %o0
}
rtems_libio_unlock();
}
return stop;
}
200caa0: 81 c7 e0 08 ret
200caa4: 81 e8 00 00 restore
200caa8: 81 c7 e0 08 ret
200caac: 81 e8 00 00 restore
0200521c <rtems_filesystem_location_transform_to_global>:
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
200521c: 9d e3 bf 98 save %sp, -104, %sp
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
2005220: 7f ff fa 79 call 2003c04 <malloc>
2005224: 90 10 20 28 mov 0x28, %o0
if (global_loc != NULL) {
2005228: ba 92 20 00 orcc %o0, 0, %i5
200522c: 02 80 00 0c be 200525c <rtems_filesystem_location_transform_to_global+0x40><== NEVER TAKEN
2005230: 82 10 20 01 mov 1, %g1
global_loc->reference_count = 1;
global_loc->deferred_released_next = NULL;
global_loc->deferred_released_count = 0;
rtems_filesystem_location_copy(&global_loc->location, loc);
2005234: 92 10 00 18 mov %i0, %o1
)
{
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
if (global_loc != NULL) {
global_loc->reference_count = 1;
2005238: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
global_loc->deferred_released_next = NULL;
200523c: c0 27 60 20 clr [ %i5 + 0x20 ]
global_loc->deferred_released_count = 0;
rtems_filesystem_location_copy(&global_loc->location, loc);
2005240: 7f ff ff 19 call 2004ea4 <rtems_filesystem_location_copy>
2005244: c0 27 60 24 clr [ %i5 + 0x24 ]
rtems_filesystem_location_remove_from_mt_entry(loc);
2005248: 90 10 00 18 mov %i0, %o0
200524c: 7f ff ff 48 call 2004f6c <rtems_filesystem_location_remove_from_mt_entry>
2005250: b0 10 00 1d mov %i5, %i0
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
}
return global_loc;
}
2005254: 81 c7 e0 08 ret
2005258: 81 e8 00 00 restore
global_loc->deferred_released_next = NULL;
global_loc->deferred_released_count = 0;
rtems_filesystem_location_copy(&global_loc->location, loc);
rtems_filesystem_location_remove_from_mt_entry(loc);
} else {
rtems_filesystem_location_free(loc);
200525c: 40 00 1d 2b call 200c708 <rtems_filesystem_location_free> <== NOT EXECUTED
2005260: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
return rtems_filesystem_global_location_obtain( &global_loc );
2005264: 90 07 bf fc add %fp, -4, %o0 <== NOT EXECUTED
2005268: 7f ff ff ba call 2005150 <rtems_filesystem_global_location_obtain><== NOT EXECUTED
200526c: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
2005270: 40 00 29 44 call 200f780 <__errno> <== NOT EXECUTED
2005274: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
2005278: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200527c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return global_loc;
}
2005280: 81 c7 e0 08 ret <== NOT EXECUTED
2005284: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
02003d44 <rtems_filesystem_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2003d44: 9d e3 bf a0 save %sp, -96, %sp
int rv = 0;
mode &= ~rtems_filesystem_umask;
2003d48: 03 00 80 72 sethi %hi(0x201c800), %g1
2003d4c: c2 00 60 64 ld [ %g1 + 0x64 ], %g1 ! 201c864 <rtems_current_user_env>
switch (mode & S_IFMT) {
2003d50: 05 00 00 3c sethi %hi(0xf000), %g2
dev_t dev
)
{
int rv = 0;
mode &= ~rtems_filesystem_umask;
2003d54: d6 00 60 08 ld [ %g1 + 8 ], %o3
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
2003d58: 98 10 00 1c mov %i4, %o4
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
2003d5c: 03 00 00 10 sethi %hi(0x4000), %g1
dev_t dev
)
{
int rv = 0;
mode &= ~rtems_filesystem_umask;
2003d60: 96 2e c0 0b andn %i3, %o3, %o3
switch (mode & S_IFMT) {
2003d64: 84 0a c0 02 and %o3, %g2, %g2
2003d68: 80 a0 80 01 cmp %g2, %g1
2003d6c: 02 80 00 18 be 2003dcc <rtems_filesystem_mknod+0x88>
2003d70: 9a 10 00 1d mov %i5, %o5
2003d74: 80 a0 80 01 cmp %g2, %g1
2003d78: 08 80 00 0f bleu 2003db4 <rtems_filesystem_mknod+0x70>
2003d7c: 03 00 00 04 sethi %hi(0x1000), %g1
2003d80: 03 00 00 18 sethi %hi(0x6000), %g1
2003d84: 80 a0 80 01 cmp %g2, %g1
2003d88: 02 80 00 11 be 2003dcc <rtems_filesystem_mknod+0x88>
2003d8c: 03 00 00 20 sethi %hi(0x8000), %g1
2003d90: 80 a0 80 01 cmp %g2, %g1
2003d94: 22 80 00 0f be,a 2003dd0 <rtems_filesystem_mknod+0x8c> <== ALWAYS TAKEN
2003d98: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
case S_IFDIR:
case S_IFIFO:
case S_IFREG:
break;
default:
errno = EINVAL;
2003d9c: 40 00 2e 79 call 200f780 <__errno>
2003da0: b0 10 3f ff mov -1, %i0
2003da4: 82 10 20 16 mov 0x16, %g1
2003da8: c2 22 00 00 st %g1, [ %o0 ]
2003dac: 81 c7 e0 08 ret
2003db0: 81 e8 00 00 restore
{
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
2003db4: 80 a0 80 01 cmp %g2, %g1
2003db8: 02 80 00 05 be 2003dcc <rtems_filesystem_mknod+0x88>
2003dbc: 03 00 00 08 sethi %hi(0x2000), %g1
2003dc0: 80 a0 80 01 cmp %g2, %g1
2003dc4: 12 bf ff f6 bne 2003d9c <rtems_filesystem_mknod+0x58>
2003dc8: 01 00 00 00 nop
rv = -1;
break;
}
if ( rv == 0 ) {
rv = (*parentloc->ops->mknod_h)( parentloc, name, namelen, mode, dev );
2003dcc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2003dd0: 90 10 00 18 mov %i0, %o0
2003dd4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2003dd8: 92 10 00 19 mov %i1, %o1
2003ddc: 9f c0 40 00 call %g1
2003de0: 94 10 00 1a mov %i2, %o2
}
return rv;
}
2003de4: 81 c7 e0 08 ret
2003de8: 91 e8 00 08 restore %g0, %o0, %o0
0200cbb0 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
200cbb0: 9d e3 bf a0 save %sp, -96, %sp
rtems_chain_node *node = NULL;
if ( type == NULL ) {
200cbb4: 80 a6 20 00 cmp %i0, 0
200cbb8: 02 80 00 29 be 200cc5c <rtems_filesystem_unregister+0xac>
200cbbc: 3b 00 80 74 sethi %hi(0x201d000), %i5
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200cbc0: d0 07 62 40 ld [ %i5 + 0x240 ], %o0 ! 201d240 <rtems_libio_semaphore>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200cbc4: 37 00 80 72 sethi %hi(0x201c800), %i3
200cbc8: 92 10 20 00 clr %o1
200cbcc: 7f ff ec 58 call 2007d2c <rtems_semaphore_obtain>
200cbd0: 94 10 20 00 clr %o2
200cbd4: f8 06 e1 24 ld [ %i3 + 0x124 ], %i4
200cbd8: b6 16 e1 24 or %i3, 0x124, %i3
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
200cbdc: b6 06 e0 04 add %i3, 4, %i3
200cbe0: 80 a7 00 1b cmp %i4, %i3
200cbe4: 32 80 00 08 bne,a 200cc04 <rtems_filesystem_unregister+0x54>
200cbe8: d0 07 20 08 ld [ %i4 + 8 ], %o0
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200cbec: 10 80 00 14 b 200cc3c <rtems_filesystem_unregister+0x8c>
200cbf0: d0 07 62 40 ld [ %i5 + 0x240 ], %o0
200cbf4: 80 a7 00 1b cmp %i4, %i3
200cbf8: 02 80 00 11 be 200cc3c <rtems_filesystem_unregister+0x8c> <== ALWAYS TAKEN
200cbfc: d0 07 62 40 ld [ %i5 + 0x240 ], %o0
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
200cc00: d0 07 20 08 ld [ %i4 + 8 ], %o0 <== NOT EXECUTED
200cc04: 40 00 0e 86 call 201061c <strcmp>
200cc08: 92 10 00 18 mov %i0, %o1
200cc0c: 80 a2 20 00 cmp %o0, 0
200cc10: 32 bf ff f9 bne,a 200cbf4 <rtems_filesystem_unregister+0x44>
200cc14: f8 07 00 00 ld [ %i4 ], %i4
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200cc18: 40 00 02 64 call 200d5a8 <_Chain_Extract>
200cc1c: 90 10 00 1c mov %i4, %o0
rtems_chain_extract( node );
free( fsn );
200cc20: 7f ff db 07 call 200383c <free>
200cc24: 90 10 00 1c mov %i4, %o0
200cc28: d0 07 62 40 ld [ %i5 + 0x240 ], %o0
200cc2c: 7f ff ec 8a call 2007e54 <rtems_semaphore_release>
200cc30: b0 10 20 00 clr %i0
200cc34: 81 c7 e0 08 ret
200cc38: 81 e8 00 00 restore
200cc3c: 7f ff ec 86 call 2007e54 <rtems_semaphore_release>
200cc40: b0 10 3f ff mov -1, %i0
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
200cc44: 40 00 0a cf call 200f780 <__errno>
200cc48: 01 00 00 00 nop
200cc4c: 82 10 20 02 mov 2, %g1 ! 2 <PROM_START+0x2>
200cc50: c2 22 00 00 st %g1, [ %o0 ]
}
200cc54: 81 c7 e0 08 ret
200cc58: 81 e8 00 00 restore
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
200cc5c: 40 00 0a c9 call 200f780 <__errno>
200cc60: b0 10 3f ff mov -1, %i0
200cc64: 82 10 20 16 mov 0x16, %g1
200cc68: c2 22 00 00 st %g1, [ %o0 ]
200cc6c: 81 c7 e0 08 ret
200cc70: 81 e8 00 00 restore
02008184 <rtems_fsmount>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
2008184: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc = 0;
int tmp_rc;
size_t fstab_idx = 0;
2008188: b8 10 20 00 clr %i4 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
200818c: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
2008190: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2008194: 02 80 00 17 be 20081f0 <rtems_fsmount+0x6c> <== NOT EXECUTED
2008198: b0 10 20 00 clr %i0 <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
200819c: 25 00 81 8f sethi %hi(0x2063c00), %l2 <== NOT EXECUTED
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
20081a0: 23 00 81 8f sethi %hi(0x2063c00), %l1 <== NOT EXECUTED
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
20081a4: 21 00 81 8f sethi %hi(0x2063c00), %l0 <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
20081a8: 37 00 81 c1 sethi %hi(0x2070400), %i3 <== NOT EXECUTED
20081ac: a4 14 a3 70 or %l2, 0x370, %l2 <== NOT EXECUTED
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
20081b0: a2 14 63 40 or %l1, 0x340, %l1 <== NOT EXECUTED
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
20081b4: a0 14 23 08 or %l0, 0x308, %l0 <== NOT EXECUTED
tmp_rc = 0;
/*
* create mount point
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
20081b8: d0 07 60 04 ld [ %i5 + 4 ], %o0 <== NOT EXECUTED
20081bc: 40 00 08 5f call 200a338 <rtems_mkdir> <== NOT EXECUTED
20081c0: 92 10 21 ff mov 0x1ff, %o1 <== NOT EXECUTED
if (tmp_rc != 0) {
20081c4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20081c8: 22 80 00 0f be,a 2008204 <rtems_fsmount+0x80> <== NOT EXECUTED
20081cc: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
20081d0: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
20081d4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
20081d8: 12 80 00 20 bne 2008258 <rtems_fsmount+0xd4> <== NOT EXECUTED
20081dc: c2 06 e2 48 ld [ %i3 + 0x248 ], %g1 <== NOT EXECUTED
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
20081e0: c2 17 60 12 lduh [ %i5 + 0x12 ], %g1 <== NOT EXECUTED
20081e4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
20081e8: 22 80 00 17 be,a 2008244 <rtems_fsmount+0xc0> <== NOT EXECUTED
20081ec: b8 07 20 01 inc %i4 <== NOT EXECUTED
if (!terminate) {
fstab_ptr++;
fstab_idx++;
}
}
if (fail_idx != NULL) {
20081f0: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
20081f4: 32 80 00 02 bne,a 20081fc <rtems_fsmount+0x78> <== NOT EXECUTED
20081f8: f8 26 80 00 st %i4, [ %i2 ] <== NOT EXECUTED
*fail_idx = fstab_idx;
}
return rc;
}
20081fc: 81 c7 e0 08 ret <== NOT EXECUTED
2008200: 81 e8 00 00 restore <== NOT EXECUTED
}
/*
* mount device to given mount point
*/
if (tmp_rc == 0) {
tmp_rc = mount(fstab_ptr->source,
2008204: d2 07 60 04 ld [ %i5 + 4 ], %o1 <== NOT EXECUTED
2008208: d4 07 60 08 ld [ %i5 + 8 ], %o2 <== NOT EXECUTED
200820c: d6 07 60 0c ld [ %i5 + 0xc ], %o3 <== NOT EXECUTED
2008210: 40 00 05 47 call 200972c <mount> <== NOT EXECUTED
2008214: 98 10 20 00 clr %o4 <== NOT EXECUTED
fstab_ptr->target,
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
2008218: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200821c: 02 80 00 1b be 2008288 <rtems_fsmount+0x104> <== NOT EXECUTED
2008220: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
2008224: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2008228: 12 80 00 21 bne 20082ac <rtems_fsmount+0x128> <== NOT EXECUTED
200822c: c2 06 e2 48 ld [ %i3 + 0x248 ], %g1 <== NOT EXECUTED
" \"%s\" failed: %s\n",
fstab_ptr->source,
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
2008230: c2 17 60 12 lduh [ %i5 + 0x12 ], %g1 <== NOT EXECUTED
2008234: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2008238: 12 bf ff ef bne 20081f4 <rtems_fsmount+0x70> <== NOT EXECUTED
200823c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
/*
* proceed to next entry
*/
if (!terminate) {
fstab_ptr++;
fstab_idx++;
2008240: b8 07 20 01 inc %i4 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
2008244: 80 a7 00 19 cmp %i4, %i1 <== NOT EXECUTED
2008248: 12 bf ff dc bne 20081b8 <rtems_fsmount+0x34> <== NOT EXECUTED
200824c: ba 07 60 14 add %i5, 0x14, %i5 <== NOT EXECUTED
2008250: 10 bf ff e8 b 20081f0 <rtems_fsmount+0x6c> <== NOT EXECUTED
2008254: b0 10 20 00 clr %i0 <== NOT EXECUTED
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
2008258: e6 07 60 04 ld [ %i5 + 4 ], %l3 <== NOT EXECUTED
fstab_ptr->target,
strerror(errno));
200825c: 40 00 fc 24 call 20472ec <__errno> <== NOT EXECUTED
2008260: e8 00 60 08 ld [ %g1 + 8 ], %l4 <== NOT EXECUTED
*/
if (tmp_rc == 0) {
tmp_rc = rtems_mkdir(fstab_ptr->target, S_IRWXU | S_IRWXG | S_IRWXO);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
2008264: 40 01 17 f1 call 204e228 <strerror> <== NOT EXECUTED
2008268: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
200826c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2008270: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2008274: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
2008278: 40 00 fe e7 call 2047e14 <fprintf> <== NOT EXECUTED
200827c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
2008280: 10 bf ff d9 b 20081e4 <rtems_fsmount+0x60> <== NOT EXECUTED
2008284: c2 17 60 12 lduh [ %i5 + 0x12 ], %g1 <== NOT EXECUTED
terminate = true;
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
2008288: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200828c: 12 80 00 16 bne 20082e4 <rtems_fsmount+0x160> <== NOT EXECUTED
2008290: c2 06 e2 48 ld [ %i3 + 0x248 ], %g1 <== NOT EXECUTED
fprintf(stdout,"fsmount: mounting of \"%s\" to"
" \"%s\" succeeded\n",
fstab_ptr->source,
fstab_ptr->target);
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
2008294: c2 17 60 12 lduh [ %i5 + 0x12 ], %g1 <== NOT EXECUTED
2008298: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
200829c: 22 bf ff ea be,a 2008244 <rtems_fsmount+0xc0> <== NOT EXECUTED
20082a0: b8 07 20 01 inc %i4 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
20082a4: 10 bf ff d3 b 20081f0 <rtems_fsmount+0x6c> <== NOT EXECUTED
20082a8: b0 10 20 00 clr %i0 <== NOT EXECUTED
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
20082ac: e8 07 40 00 ld [ %i5 ], %l4 <== NOT EXECUTED
20082b0: ea 00 60 08 ld [ %g1 + 8 ], %l5 <== NOT EXECUTED
" \"%s\" failed: %s\n",
fstab_ptr->source,
fstab_ptr->target,
strerror(errno));
20082b4: 40 00 fc 0e call 20472ec <__errno> <== NOT EXECUTED
20082b8: e6 07 60 04 ld [ %i5 + 4 ], %l3 <== NOT EXECUTED
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
20082bc: 40 01 17 db call 204e228 <strerror> <== NOT EXECUTED
20082c0: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
20082c4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
20082c8: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
20082cc: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
20082d0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
20082d4: 40 00 fe d0 call 2047e14 <fprintf> <== NOT EXECUTED
20082d8: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
" \"%s\" failed: %s\n",
fstab_ptr->source,
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
20082dc: 10 bf ff d6 b 2008234 <rtems_fsmount+0xb0> <== NOT EXECUTED
20082e0: c2 17 60 12 lduh [ %i5 + 0x12 ], %g1 <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
20082e4: d4 07 40 00 ld [ %i5 ], %o2 <== NOT EXECUTED
20082e8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
20082ec: d6 07 60 04 ld [ %i5 + 4 ], %o3 <== NOT EXECUTED
20082f0: 40 00 fe c9 call 2047e14 <fprintf> <== NOT EXECUTED
20082f4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
" \"%s\" succeeded\n",
fstab_ptr->source,
fstab_ptr->target);
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
20082f8: 10 bf ff e8 b 2008298 <rtems_fsmount+0x114> <== NOT EXECUTED
20082fc: c2 17 60 12 lduh [ %i5 + 0x12 ], %g1 <== NOT EXECUTED
0200407c <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
200407c: 9d e3 bf a0 save %sp, -96, %sp
* 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 ) );
2004080: 40 00 01 21 call 2004504 <malloc>
2004084: 90 10 20 08 mov 8, %o0
*key = new_key;
new_key->val = NULL;
2004088: c0 22 00 00 clr [ %o0 ]
* 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;
200408c: d0 26 00 00 st %o0, [ %i0 ]
* 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 ) );
2004090: ba 10 00 08 mov %o0, %i5
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
2004094: 94 10 00 19 mov %i1, %o2
*/
/* 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;
2004098: f2 27 60 04 st %i1, [ %i5 + 4 ]
"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 );
200409c: 90 10 20 00 clr %o0
20040a0: 92 10 00 1d mov %i5, %o1
20040a4: 40 00 12 ea call 2008c4c <rtems_task_variable_add>
20040a8: b0 10 20 00 clr %i0
if ( status == RTEMS_SUCCESSFUL )
20040ac: 80 a2 20 00 cmp %o0, 0
20040b0: 02 80 00 04 be 20040c0 <rtems_gxx_key_create+0x44> <== ALWAYS TAKEN
20040b4: 90 10 00 1d mov %i5, %o0
return 0;
free( new_key );
20040b8: 7f ff ff 7d call 2003eac <free> <== NOT EXECUTED
20040bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
20040c0: 81 c7 e0 08 ret
20040c4: 81 e8 00 00 restore
020040d4 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
20040d4: 9d e3 bf a0 save %sp, -96, %sp
#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 );
20040d8: 90 10 20 00 clr %o0
20040dc: 40 00 13 0d call 2008d10 <rtems_task_variable_delete>
20040e0: 92 10 00 18 mov %i0, %o1
if ( status == RTEMS_SUCCESSFUL ) {
20040e4: 80 a2 20 00 cmp %o0, 0
20040e8: 12 80 00 06 bne 2004100 <rtems_gxx_key_delete+0x2c> <== NEVER TAKEN
20040ec: 80 a6 20 00 cmp %i0, 0
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
20040f0: 02 80 00 04 be 2004100 <rtems_gxx_key_delete+0x2c> <== NEVER TAKEN
20040f4: 01 00 00 00 nop
20040f8: 7f ff ff 6d call 2003eac <free>
20040fc: d0 06 00 00 ld [ %i0 ], %o0
return 0;
}
key = NULL;
return 0;
}
2004100: 81 c7 e0 08 ret
2004104: 91 e8 20 00 restore %g0, 0, %o0
0200400c <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))
{
200400c: 9d e3 bf 98 save %sp, -104, %sp
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
2004010: c2 06 00 00 ld [ %i0 ], %g1
2004014: 80 a0 60 00 cmp %g1, 0
2004018: 02 80 00 04 be 2004028 <rtems_gxx_once+0x1c>
200401c: 92 10 21 00 mov 0x100, %o1
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
2004020: 81 c7 e0 08 ret
2004024: 91 e8 20 00 restore %g0, 0, %o0
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2004028: 94 07 bf fc add %fp, -4, %o2
200402c: 40 00 12 81 call 2008a30 <rtems_task_mode>
2004030: 90 10 21 00 mov 0x100, %o0
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
2004034: c2 06 00 00 ld [ %i0 ], %g1
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2004038: d0 07 bf fc ld [ %fp + -4 ], %o0
200403c: 92 10 21 00 mov 0x100, %o1
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
2004040: 80 a0 60 00 cmp %g1, 0
2004044: 12 80 00 0a bne 200406c <rtems_gxx_once+0x60> <== NEVER TAKEN
2004048: 94 07 bf fc add %fp, -4, %o2
*(volatile __gthread_once_t *)once = 1;
200404c: 82 10 20 01 mov 1, %g1
2004050: c2 26 00 00 st %g1, [ %i0 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2004054: 40 00 12 77 call 2008a30 <rtems_task_mode>
2004058: b0 10 20 00 clr %i0
if ( o == 0 )
(*func)();
200405c: 9f c6 40 00 call %i1
2004060: 01 00 00 00 nop
}
return 0;
}
2004064: 81 c7 e0 08 ret
2004068: 81 e8 00 00 restore
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
200406c: 40 00 12 71 call 2008a30 <rtems_task_mode> <== NOT EXECUTED
2004070: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
2004074: 81 c7 e0 08 ret <== NOT EXECUTED
2004078: 81 e8 00 00 restore <== NOT EXECUTED
02004170 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
2004170: 9d e3 bf a0 save %sp, -96, %sp
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 );
2004174: d4 06 20 04 ld [ %i0 + 4 ], %o2
2004178: 92 10 00 18 mov %i0, %o1
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
200417c: ba 10 00 18 mov %i0, %i5
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 );
2004180: 90 10 20 00 clr %o0
2004184: 40 00 12 b2 call 2008c4c <rtems_task_variable_add>
2004188: b0 10 3f ff mov -1, %i0
if ( status == RTEMS_SUCCESSFUL ) {
200418c: 80 a2 20 00 cmp %o0, 0
2004190: 12 80 00 04 bne 20041a0 <rtems_gxx_setspecific+0x30> <== NEVER TAKEN
2004194: 01 00 00 00 nop
/* now let's set the proper value */
key->val = (void *)ptr;
2004198: f2 27 40 00 st %i1, [ %i5 ]
return 0;
200419c: b0 10 20 00 clr %i0
}
return -1;
}
20041a0: 81 c7 e0 08 ret
20041a4: 81 e8 00 00 restore
02007f84 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
2007f84: 9d e3 bf a0 save %sp, -96, %sp
if (
2007f88: 03 00 80 90 sethi %hi(0x2024000), %g1
2007f8c: c2 00 62 58 ld [ %g1 + 0x258 ], %g1 ! 2024258 <_System_state_Current>
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
2007f90: b8 10 00 18 mov %i0, %i4
2007f94: ba 10 00 19 mov %i1, %i5
if (
2007f98: 80 a0 60 03 cmp %g1, 3
2007f9c: 02 80 00 08 be 2007fbc <rtems_heap_allocate_aligned_with_boundary+0x38><== ALWAYS TAKEN
2007fa0: b6 10 00 1a mov %i2, %i3
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
2007fa4: 7f ff fb c3 call 2006eb0 <malloc_deferred_frees_process>
2007fa8: b2 10 00 1c mov %i4, %i1
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
2007fac: 03 00 80 8a sethi %hi(0x2022800), %g1
2007fb0: f0 00 63 9c ld [ %g1 + 0x39c ], %i0 ! 2022b9c <RTEMS_Malloc_Heap>
2007fb4: 40 00 18 b1 call 200e278 <_Protected_heap_Allocate_aligned_with_boundary>
2007fb8: 95 e8 00 1d restore %g0, %i5, %o2
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
2007fbc: 7f ff fb ab call 2006e68 <malloc_is_system_state_OK>
2007fc0: 01 00 00 00 nop
2007fc4: 80 8a 20 ff btst 0xff, %o0
2007fc8: 12 bf ff f7 bne 2007fa4 <rtems_heap_allocate_aligned_with_boundary+0x20>
2007fcc: b0 10 20 00 clr %i0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
2007fd0: 81 c7 e0 08 ret
2007fd4: 81 e8 00 00 restore
02005264 <rtems_ide_part_table_free>:
* RETURNS:
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
{
2005264: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
2005268: ba 10 20 00 clr %i5 <== NOT EXECUTED
*
* RETURNS:
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
200526c: 82 06 00 1d add %i0, %i5, %g1 <== NOT EXECUTED
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
partition_free(disk_desc->partitions[part_num]);
2005270: d0 00 60 28 ld [ %g1 + 0x28 ], %o0 <== NOT EXECUTED
2005274: 7f ff fe 95 call 2004cc8 <partition_free> <== NOT EXECUTED
2005278: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED
static void
partition_table_free(rtems_disk_desc_t *disk_desc)
{
int part_num;
for (part_num = 0;
200527c: 80 a7 60 10 cmp %i5, 0x10 <== NOT EXECUTED
2005280: 12 bf ff fc bne 2005270 <rtems_ide_part_table_free+0xc> <== NOT EXECUTED
2005284: 82 06 00 1d add %i0, %i5, %g1 <== NOT EXECUTED
part_num++)
{
partition_free(disk_desc->partitions[part_num]);
}
free(disk_desc);
2005288: 40 00 02 fa call 2005e70 <free> <== NOT EXECUTED
200528c: 81 e8 00 00 restore <== NOT EXECUTED
02005290 <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 );
2005290: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2005294: 7f ff ff 7d call 2005088 <partition_table_get> <== NOT EXECUTED
2005298: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200529c <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)
{
200529c: 9d e3 bf 88 save %sp, -120, %sp
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));
20052a0: 90 10 20 01 mov 1, %o0
20052a4: 92 10 21 28 mov 0x128, %o1
20052a8: 40 00 02 21 call 2005b2c <calloc>
20052ac: a8 10 20 1a mov 0x1a, %l4
if (disk_desc == NULL)
20052b0: 80 a2 20 00 cmp %o0, 0
20052b4: 02 80 00 3b be 20053a0 <rtems_ide_part_table_initialize+0x104><== NEVER TAKEN
20052b8: ba 10 00 08 mov %o0, %i5
{
return RTEMS_NO_MEMORY;
}
/* get partition table */
rc = partition_table_get(dev_name, disk_desc);
20052bc: 90 10 00 18 mov %i0, %o0
20052c0: 7f ff ff 72 call 2005088 <partition_table_get>
20052c4: 92 10 00 1d mov %i5, %o1
if (rc != RTEMS_SUCCESSFUL)
20052c8: a8 92 20 00 orcc %o0, 0, %l4
20052cc: 12 80 00 33 bne 2005398 <rtems_ide_part_table_initialize+0xfc><== NEVER TAKEN
20052d0: 94 10 00 18 mov %i0, %o2
*/
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++)
20052d4: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
20052d8: b8 10 20 00 clr %i4
{
sprintf(name, "%s%d", dev_name, part_num + 1);
20052dc: b4 07 bf f0 add %fp, -16, %i2
20052e0: 33 00 80 90 sethi %hi(0x2024000), %i1
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);
20052e4: 27 00 80 90 sethi %hi(0x2024000), %l3
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);
20052e8: b2 16 61 78 or %i1, 0x178, %i1
*/
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++)
20052ec: 80 a7 00 01 cmp %i4, %g1
/* 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);
20052f0: e2 07 40 00 ld [ %i5 ], %l1
/* 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);
20052f4: b8 07 20 01 inc %i4
/* 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);
20052f8: e0 07 60 04 ld [ %i5 + 4 ], %l0
* 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)
20052fc: b6 07 60 28 add %i5, 0x28, %i3
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);
2005300: 25 00 80 97 sethi %hi(0x2025c00), %l2
2005304: a6 14 e1 80 or %l3, 0x180, %l3
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);
2005308: 92 10 00 19 mov %i1, %o1
200530c: 90 10 00 1a mov %i2, %o0
*/
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++)
2005310: 16 80 00 1a bge 2005378 <rtems_ide_part_table_initialize+0xdc><== NEVER TAKEN
2005314: 96 10 00 1c mov %i4, %o3
{
sprintf(name, "%s%d", dev_name, part_num + 1);
2005318: 40 00 43 52 call 2016060 <sprintf>
200531c: 01 00 00 00 nop
dev = rtems_filesystem_make_dev_t(major, ++minor);
part_desc = disk_desc->partitions[part_num];
2005320: c2 06 c0 00 ld [ %i3 ], %g1
if (part_desc == NULL)
{
continue;
}
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
2005324: 90 10 00 11 mov %l1, %o0
{
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)
2005328: 80 a0 60 00 cmp %g1, 0
200532c: 02 80 00 0a be 2005354 <rtems_ide_part_table_initialize+0xb8>
2005330: 92 07 00 10 add %i4, %l0, %o1
{
continue;
}
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
2005334: d8 00 60 04 ld [ %g1 + 4 ], %o4
2005338: da 00 60 08 ld [ %g1 + 8 ], %o5
200533c: d4 1f 40 00 ldd [ %i5 ], %o2
2005340: 7f ff fc df call 20046bc <rtems_disk_create_log>
2005344: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
2005348: 96 92 20 00 orcc %o0, 0, %o3
200534c: 12 80 00 17 bne 20053a8 <rtems_ide_part_table_initialize+0x10c><== NEVER TAKEN
2005350: c2 04 a3 90 ld [ %l2 + 0x390 ], %g1
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
continue;
2005354: b6 06 e0 04 add %i3, 4, %i3
*/
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++)
2005358: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
{
sprintf(name, "%s%d", dev_name, part_num + 1);
200535c: 92 10 00 19 mov %i1, %o1
*/
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++)
2005360: 80 a7 00 01 cmp %i4, %g1
{
sprintf(name, "%s%d", dev_name, part_num + 1);
2005364: 94 10 00 18 mov %i0, %o2
2005368: b8 07 20 01 inc %i4
200536c: 90 10 00 1a mov %i2, %o0
*/
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++)
2005370: 06 bf ff ea bl 2005318 <rtems_ide_part_table_initialize+0x7c>
2005374: 96 10 00 1c mov %i4, %o3
2005378: b8 10 20 00 clr %i4
* 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)
200537c: 82 07 40 1c add %i5, %i4, %g1
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
partition_free(disk_desc->partitions[part_num]);
2005380: d0 00 60 28 ld [ %g1 + 0x28 ], %o0
2005384: 7f ff fe 51 call 2004cc8 <partition_free>
2005388: b8 07 20 04 add %i4, 4, %i4
static void
partition_table_free(rtems_disk_desc_t *disk_desc)
{
int part_num;
for (part_num = 0;
200538c: 80 a7 20 10 cmp %i4, 0x10
2005390: 12 bf ff fc bne 2005380 <rtems_ide_part_table_initialize+0xe4>
2005394: 82 07 40 1c add %i5, %i4, %g1
part_num++)
{
partition_free(disk_desc->partitions[part_num]);
}
free(disk_desc);
2005398: 40 00 02 b6 call 2005e70 <free>
200539c: 90 10 00 1d mov %i5, %o0
}
partition_table_free(disk_desc);
return RTEMS_SUCCESSFUL;
}
20053a0: 81 c7 e0 08 ret
20053a4: 91 e8 00 14 restore %g0, %l4, %o0
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);
20053a8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
20053ac: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
20053b0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
20053b4: 40 00 40 95 call 2015608 <fprintf> <== NOT EXECUTED
20053b8: b6 06 e0 04 add %i3, 4, %i3 <== 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++)
20053bc: 10 bf ff e8 b 200535c <rtems_ide_part_table_initialize+0xc0><== NOT EXECUTED
20053c0: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 <== NOT EXECUTED
02009938 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2009938: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
200993c: 03 00 80 85 sethi %hi(0x2021400), %g1
2009940: c4 00 61 88 ld [ %g1 + 0x188 ], %g2 ! 2021588 <_Per_CPU_Information+0x8>
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2009944: 86 10 00 19 mov %i1, %g3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
2009948: 03 00 80 85 sethi %hi(0x2021400), %g1
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
200994c: 88 10 20 12 mov 0x12, %g4
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2009950: 80 a0 a0 00 cmp %g2, 0
2009954: 02 80 00 04 be 2009964 <rtems_io_register_driver+0x2c>
2009958: de 00 62 24 ld [ %g1 + 0x224 ], %o7
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
200995c: 81 c7 e0 08 ret
2009960: 91 e8 00 04 restore %g0, %g4, %o0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
2009964: 80 a6 a0 00 cmp %i2, 0
2009968: 02 80 00 40 be 2009a68 <rtems_io_register_driver+0x130>
200996c: 80 a6 60 00 cmp %i1, 0
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
2009970: 02 80 00 3e be 2009a68 <rtems_io_register_driver+0x130>
2009974: de 26 80 00 st %o7, [ %i2 ]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009978: c4 06 40 00 ld [ %i1 ], %g2
200997c: 80 a0 a0 00 cmp %g2, 0
2009980: 22 80 00 37 be,a 2009a5c <rtems_io_register_driver+0x124>
2009984: c4 06 60 04 ld [ %i1 + 4 ], %g2
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
2009988: 80 a3 c0 18 cmp %o7, %i0
200998c: 08 bf ff f4 bleu 200995c <rtems_io_register_driver+0x24>
2009990: 88 10 20 0a mov 0xa, %g4
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2009994: 05 00 80 84 sethi %hi(0x2021000), %g2
2009998: c8 00 a3 50 ld [ %g2 + 0x350 ], %g4 ! 2021350 <_Thread_Dispatch_disable_level>
200999c: 88 01 20 01 inc %g4
20099a0: c8 20 a3 50 st %g4, [ %g2 + 0x350 ]
return _Thread_Dispatch_disable_level;
20099a4: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
20099a8: 80 a6 20 00 cmp %i0, 0
20099ac: 12 80 00 32 bne 2009a74 <rtems_io_register_driver+0x13c>
20099b0: 1f 00 80 85 sethi %hi(0x2021400), %o7
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
20099b4: c8 00 62 24 ld [ %g1 + 0x224 ], %g4
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
20099b8: 80 a1 20 00 cmp %g4, 0
20099bc: 02 80 00 45 be 2009ad0 <rtems_io_register_driver+0x198> <== NEVER TAKEN
20099c0: c2 03 e2 28 ld [ %o7 + 0x228 ], %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
20099c4: 10 80 00 06 b 20099dc <rtems_io_register_driver+0xa4>
20099c8: c4 00 40 00 ld [ %g1 ], %g2
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
20099cc: 80 a6 00 04 cmp %i0, %g4
20099d0: 02 80 00 35 be 2009aa4 <rtems_io_register_driver+0x16c>
20099d4: 82 00 60 18 add %g1, 0x18, %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
20099d8: c4 00 40 00 ld [ %g1 ], %g2
20099dc: 80 a0 a0 00 cmp %g2, 0
20099e0: 32 bf ff fb bne,a 20099cc <rtems_io_register_driver+0x94>
20099e4: b0 06 20 01 inc %i0
20099e8: c4 00 60 04 ld [ %g1 + 4 ], %g2
20099ec: 80 a0 a0 00 cmp %g2, 0
20099f0: 32 bf ff f7 bne,a 20099cc <rtems_io_register_driver+0x94>
20099f4: b0 06 20 01 inc %i0
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
20099f8: f0 26 80 00 st %i0, [ %i2 ]
20099fc: 83 2e 20 03 sll %i0, 3, %g1
if ( m != n )
2009a00: 80 a1 00 18 cmp %g4, %i0
2009a04: 02 80 00 29 be 2009aa8 <rtems_io_register_driver+0x170> <== NEVER TAKEN
2009a08: 9b 2e 20 05 sll %i0, 5, %o5
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2009a0c: c8 00 c0 00 ld [ %g3 ], %g4
2009a10: c4 03 e2 28 ld [ %o7 + 0x228 ], %g2
2009a14: 82 23 40 01 sub %o5, %g1, %g1
2009a18: c8 20 80 01 st %g4, [ %g2 + %g1 ]
2009a1c: c8 00 e0 04 ld [ %g3 + 4 ], %g4
2009a20: 82 00 80 01 add %g2, %g1, %g1
2009a24: c8 20 60 04 st %g4, [ %g1 + 4 ]
2009a28: c4 00 e0 08 ld [ %g3 + 8 ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2009a2c: b2 10 20 00 clr %i1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2009a30: c4 20 60 08 st %g2, [ %g1 + 8 ]
2009a34: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2009a38: b4 10 20 00 clr %i2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2009a3c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2009a40: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2009a44: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
2009a48: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
_Thread_Enable_dispatch();
2009a4c: 40 00 08 1a call 200bab4 <_Thread_Enable_dispatch>
2009a50: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
return rtems_io_initialize( major, 0, NULL );
2009a54: 40 00 1e ca call 201157c <rtems_io_initialize>
2009a58: 81 e8 00 00 restore
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009a5c: 80 a0 a0 00 cmp %g2, 0
2009a60: 12 bf ff cb bne 200998c <rtems_io_register_driver+0x54>
2009a64: 80 a3 c0 18 cmp %o7, %i0
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
2009a68: 88 10 20 09 mov 9, %g4
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2009a6c: 81 c7 e0 08 ret
2009a70: 91 e8 00 04 restore %g0, %g4, %o0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
2009a74: c8 03 e2 28 ld [ %o7 + 0x228 ], %g4
2009a78: 83 2e 20 03 sll %i0, 3, %g1
2009a7c: 9b 2e 20 05 sll %i0, 5, %o5
2009a80: 84 23 40 01 sub %o5, %g1, %g2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009a84: d8 01 00 02 ld [ %g4 + %g2 ], %o4
2009a88: 80 a3 20 00 cmp %o4, 0
2009a8c: 02 80 00 0b be 2009ab8 <rtems_io_register_driver+0x180>
2009a90: 84 01 00 02 add %g4, %g2, %g2
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
2009a94: 40 00 08 08 call 200bab4 <_Thread_Enable_dispatch>
2009a98: 01 00 00 00 nop
return RTEMS_RESOURCE_IN_USE;
2009a9c: 10 bf ff b0 b 200995c <rtems_io_register_driver+0x24>
2009aa0: 88 10 20 0c mov 0xc, %g4 ! c <PROM_START+0xc>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2009aa4: f0 26 80 00 st %i0, [ %i2 ]
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
2009aa8: 40 00 08 03 call 200bab4 <_Thread_Enable_dispatch>
2009aac: 01 00 00 00 nop
return sc;
2009ab0: 10 bf ff ab b 200995c <rtems_io_register_driver+0x24>
2009ab4: 88 10 20 05 mov 5, %g4 ! 5 <PROM_START+0x5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009ab8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
2009abc: 80 a0 a0 00 cmp %g2, 0
2009ac0: 12 bf ff f5 bne 2009a94 <rtems_io_register_driver+0x15c>
2009ac4: 01 00 00 00 nop
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
2009ac8: 10 bf ff d1 b 2009a0c <rtems_io_register_driver+0xd4>
2009acc: f0 26 80 00 st %i0, [ %i2 ]
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2009ad0: 10 bf ff f6 b 2009aa8 <rtems_io_register_driver+0x170> <== NOT EXECUTED
2009ad4: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
0200aa54 <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)
{
200aa54: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
200aa58: 80 a6 20 00 cmp %i0, 0
200aa5c: 02 80 00 23 be 200aae8 <rtems_iterate_over_all_threads+0x94><== NEVER TAKEN
200aa60: 37 00 80 7f sethi %hi(0x201fc00), %i3
200aa64: b6 16 e1 8c or %i3, 0x18c, %i3 ! 201fd8c <_Objects_Information_table+0x4>
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
200aa68: b4 06 e0 0c add %i3, 0xc, %i2
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
200aa6c: c2 06 c0 00 ld [ %i3 ], %g1
200aa70: 80 a0 60 00 cmp %g1, 0
200aa74: 22 80 00 1a be,a 200aadc <rtems_iterate_over_all_threads+0x88>
200aa78: b6 06 e0 04 add %i3, 4, %i3
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
200aa7c: f8 00 60 04 ld [ %g1 + 4 ], %i4
if ( !information )
200aa80: 80 a7 20 00 cmp %i4, 0
200aa84: 22 80 00 16 be,a 200aadc <rtems_iterate_over_all_threads+0x88>
200aa88: b6 06 e0 04 add %i3, 4, %i3
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200aa8c: c2 17 20 10 lduh [ %i4 + 0x10 ], %g1
200aa90: 84 90 60 00 orcc %g1, 0, %g2
200aa94: 22 80 00 12 be,a 200aadc <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
200aa98: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED
200aa9c: ba 10 20 01 mov 1, %i5
the_thread = (Thread_Control *)information->local_table[ i ];
200aaa0: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
200aaa4: 83 2f 60 02 sll %i5, 2, %g1
200aaa8: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if ( !the_thread )
200aaac: 90 90 60 00 orcc %g1, 0, %o0
200aab0: 02 80 00 05 be 200aac4 <rtems_iterate_over_all_threads+0x70>
200aab4: ba 07 60 01 inc %i5
continue;
(*routine)(the_thread);
200aab8: 9f c6 00 00 call %i0
200aabc: 01 00 00 00 nop
200aac0: c4 17 20 10 lduh [ %i4 + 0x10 ], %g2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200aac4: 83 28 a0 10 sll %g2, 0x10, %g1
200aac8: 83 30 60 10 srl %g1, 0x10, %g1
200aacc: 80 a0 40 1d cmp %g1, %i5
200aad0: 3a bf ff f5 bcc,a 200aaa4 <rtems_iterate_over_all_threads+0x50>
200aad4: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
200aad8: b6 06 e0 04 add %i3, 4, %i3
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
200aadc: 80 a6 c0 1a cmp %i3, %i2
200aae0: 32 bf ff e4 bne,a 200aa70 <rtems_iterate_over_all_threads+0x1c>
200aae4: c2 06 c0 00 ld [ %i3 ], %g1
200aae8: 81 c7 e0 08 ret
200aaec: 81 e8 00 00 restore
0200c948 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
200c948: 9d e3 bf a0 save %sp, -96, %sp
rtems_filesystem_location_free( &iop->pathinfo );
200c94c: 7f ff ff 6f call 200c708 <rtems_filesystem_location_free>
200c950: 90 06 20 1c add %i0, 0x1c, %o0
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200c954: 39 00 80 74 sethi %hi(0x201d000), %i4
200c958: d0 07 22 40 ld [ %i4 + 0x240 ], %o0 ! 201d240 <rtems_libio_semaphore>
200c95c: 92 10 20 00 clr %o1
200c960: 7f ff ec f3 call 2007d2c <rtems_semaphore_obtain>
200c964: 94 10 20 00 clr %o2
rtems_libio_lock();
if (iop->sem)
200c968: d0 06 20 38 ld [ %i0 + 0x38 ], %o0
200c96c: 80 a2 20 00 cmp %o0, 0
200c970: 02 80 00 04 be 200c980 <rtems_libio_free+0x38> <== NEVER TAKEN
200c974: ba 10 00 18 mov %i0, %i5
rtems_semaphore_delete(iop->sem);
200c978: 7f ff ec b6 call 2007c50 <rtems_semaphore_delete>
200c97c: 01 00 00 00 nop
iop->flags &= ~LIBIO_FLAGS_OPEN;
200c980: c4 07 60 18 ld [ %i5 + 0x18 ], %g2
iop->data1 = rtems_libio_iop_freelist;
200c984: 03 00 80 74 sethi %hi(0x201d000), %g1
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
200c988: f0 07 22 40 ld [ %i4 + 0x240 ], %i0
200c98c: c6 00 62 3c ld [ %g1 + 0x23c ], %g3
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200c990: 84 08 be ff and %g2, -257, %g2
iop->data1 = rtems_libio_iop_freelist;
200c994: c6 27 60 40 st %g3, [ %i5 + 0x40 ]
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200c998: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
200c99c: fa 20 62 3c st %i5, [ %g1 + 0x23c ]
200c9a0: 7f ff ed 2d call 2007e54 <rtems_semaphore_release>
200c9a4: 81 e8 00 00 restore
0200399c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
200399c: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
20039a0: 03 00 80 71 sethi %hi(0x201c400), %g1
20039a4: fa 00 63 7c ld [ %g1 + 0x37c ], %i5 ! 201c77c <rtems_libio_number_iops>
20039a8: 80 a7 60 00 cmp %i5, 0
20039ac: 02 80 00 1b be 2003a18 <rtems_libio_init+0x7c> <== NEVER TAKEN
20039b0: 92 10 20 01 mov 1, %o1
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
20039b4: 90 10 00 1d mov %i5, %o0
20039b8: 7f ff fe f2 call 2003580 <calloc>
20039bc: 92 10 20 48 mov 0x48, %o1
20039c0: 03 00 80 74 sethi %hi(0x201d000), %g1
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
20039c4: 80 a2 20 00 cmp %o0, 0
20039c8: 02 80 00 28 be 2003a68 <rtems_libio_init+0xcc>
20039cc: d0 20 62 38 st %o0, [ %g1 + 0x238 ]
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
20039d0: 03 00 80 74 sethi %hi(0x201d000), %g1
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
20039d4: 80 a7 60 01 cmp %i5, 1
20039d8: 08 80 00 0e bleu 2003a10 <rtems_libio_init+0x74> <== NEVER TAKEN
20039dc: d0 20 62 3c st %o0, [ %g1 + 0x23c ]
20039e0: 82 10 00 08 mov %o0, %g1
20039e4: 84 10 20 01 mov 1, %g2
iop->data1 = iop + 1;
20039e8: 82 00 60 48 add %g1, 0x48, %g1
20039ec: 84 00 a0 01 inc %g2
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++)
20039f0: 80 a0 80 1d cmp %g2, %i5
20039f4: 12 bf ff fd bne 20039e8 <rtems_libio_init+0x4c>
20039f8: c2 20 7f f8 st %g1, [ %g1 + -8 ]
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
20039fc: 84 00 bf ff add %g2, -1, %g2
2003a00: 83 28 a0 03 sll %g2, 3, %g1
2003a04: 85 28 a0 06 sll %g2, 6, %g2
2003a08: 84 00 40 02 add %g1, %g2, %g2
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++)
2003a0c: 90 02 00 02 add %o0, %g2, %o0
iop->data1 = iop + 1;
iop->data1 = NULL;
2003a10: c0 22 20 40 clr [ %o0 + 0x40 ]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
2003a14: 92 10 20 01 mov 1, %o1
2003a18: 11 13 10 92 sethi %hi(0x4c424800), %o0
2003a1c: 94 10 20 54 mov 0x54, %o2
2003a20: 90 12 21 4f or %o0, 0x14f, %o0
2003a24: 96 10 20 00 clr %o3
2003a28: 19 00 80 74 sethi %hi(0x201d000), %o4
2003a2c: 40 00 10 19 call 2007a90 <rtems_semaphore_create>
2003a30: 98 13 22 40 or %o4, 0x240, %o4 ! 201d240 <rtems_libio_semaphore>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
2003a34: 80 a2 20 00 cmp %o0, 0
2003a38: 12 80 00 0a bne 2003a60 <rtems_libio_init+0xc4> <== NEVER TAKEN
2003a3c: 03 00 80 71 sethi %hi(0x201c400), %g1
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
2003a40: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 201c780 <rtems_fs_init_helper>
2003a44: 80 a0 60 00 cmp %g1, 0
2003a48: 02 80 00 04 be 2003a58 <rtems_libio_init+0xbc>
2003a4c: 01 00 00 00 nop
(* rtems_fs_init_helper)();
2003a50: 9f c0 40 00 call %g1
2003a54: 01 00 00 00 nop
2003a58: 81 c7 e0 08 ret
2003a5c: 81 e8 00 00 restore
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
2003a60: 40 00 12 75 call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
2003a64: 01 00 00 00 nop <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
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);
2003a68: 40 00 12 73 call 2008434 <rtems_fatal_error_occurred>
2003a6c: 90 10 20 1a mov 0x1a, %o0 ! 1a <PROM_START+0x1a>
0202c104 <rtems_libio_set_private_env>:
}
rtems_status_code rtems_libio_set_private_env(void)
{
202c104: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
202c108: 7f ff 88 10 call 200e148 <rtems_task_self>
202c10c: 35 00 81 bf sethi %hi(0x206fc00), %i2
rtems_user_env_t *old_env = rtems_current_user_env;
202c110: fa 06 a1 f4 ld [ %i2 + 0x1f4 ], %i5 ! 206fdf4 <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) {
202c114: 03 00 81 bf sethi %hi(0x206fc00), %g1
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
202c118: b6 10 00 08 mov %o0, %i3
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) {
202c11c: 82 10 61 f8 or %g1, 0x1f8, %g1
202c120: 80 a7 40 01 cmp %i5, %g1
202c124: 02 80 00 05 be 202c138 <rtems_libio_set_private_env+0x34>
202c128: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
202c12c: 80 a2 00 02 cmp %o0, %g2
202c130: 02 80 00 2a be 202c1d8 <rtems_libio_set_private_env+0xd4>
202c134: b0 10 20 00 clr %i0
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
202c138: 90 10 20 01 mov 1, %o0
202c13c: 92 10 20 2c mov 0x2c, %o1
202c140: 7f ff 72 4a call 2008a68 <calloc>
202c144: b0 10 20 1a mov 0x1a, %i0
if (new_env != NULL) {
202c148: 80 a2 20 00 cmp %o0, 0
202c14c: 02 80 00 23 be 202c1d8 <rtems_libio_set_private_env+0xd4>
202c150: b8 10 00 08 mov %o0, %i4
*new_env = *old_env;
202c154: 92 10 00 1d mov %i5, %o1
202c158: 40 00 79 a6 call 204a7f0 <memcpy>
202c15c: 94 10 20 2c mov 0x2c, %o2
new_env->reference_count = 1;
202c160: 82 10 20 01 mov 1, %g1
new_env->task_id = self_task_id;
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
202c164: 90 07 60 04 add %i5, 4, %o0
if (uses_global_env || uses_shared_env) {
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
if (new_env != NULL) {
*new_env = *old_env;
new_env->reference_count = 1;
202c168: c2 27 20 28 st %g1, [ %i4 + 0x28 ]
new_env->task_id = self_task_id;
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
202c16c: 7f ff 7b 1f call 200ade8 <rtems_filesystem_global_location_obtain>
202c170: f6 27 20 24 st %i3, [ %i4 + 0x24 ]
if (new_env != NULL) {
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
new_env->root_directory =
202c174: d0 27 20 04 st %o0, [ %i4 + 4 ]
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
202c178: 7f ff 7b 1c call 200ade8 <rtems_filesystem_global_location_obtain>
202c17c: 90 10 00 1d mov %i5, %o0
static inline bool rtems_filesystem_location_is_null(
const rtems_filesystem_location_info_t *loc
)
{
return loc->handlers == &rtems_filesystem_null_handlers;
202c180: c2 07 20 04 ld [ %i4 + 4 ], %g1
*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 =
202c184: d0 27 00 00 st %o0, [ %i4 ]
rtems_filesystem_global_location_obtain(&old_env->current_directory);
if (
202c188: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
202c18c: 03 00 81 91 sethi %hi(0x2064400), %g1
202c190: 82 10 62 54 or %g1, 0x254, %g1 ! 2064654 <rtems_filesystem_null_handlers>
202c194: 80 a0 80 01 cmp %g2, %g1
202c198: 02 80 00 0e be 202c1d0 <rtems_libio_set_private_env+0xcc>
202c19c: b0 10 20 0d mov 0xd, %i0
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
202c1a0: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
202c1a4: 80 a0 80 01 cmp %g2, %g1
202c1a8: 02 80 00 14 be 202c1f8 <rtems_libio_set_private_env+0xf4> <== NEVER TAKEN
202c1ac: 90 10 20 00 clr %o0
) {
sc = rtems_task_variable_add(
202c1b0: 92 16 a1 f4 or %i2, 0x1f4, %o1
202c1b4: 15 00 80 b0 sethi %hi(0x202c000), %o2
202c1b8: 40 00 05 f0 call 202d978 <rtems_task_variable_add>
202c1bc: 94 12 a0 8c or %o2, 0x8c, %o2 ! 202c08c <free_user_env>
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
202c1c0: b0 92 20 00 orcc %o0, 0, %i0
202c1c4: 02 80 00 07 be 202c1e0 <rtems_libio_set_private_env+0xdc>
202c1c8: 01 00 00 00 nop
free_user_env_protected(old_env);
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
202c1cc: b0 10 20 05 mov 5, %i0 ! 5 <PROM_START+0x5>
} else {
sc = RTEMS_UNSATISFIED;
}
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
202c1d0: 7f ff ff af call 202c08c <free_user_env>
202c1d4: 90 10 00 1c mov %i4, %o0
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
202c1d8: 81 c7 e0 08 ret
202c1dc: 81 e8 00 00 restore
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(old_env);
202c1e0: 7f ff ff be call 202c0d8 <free_user_env_protected>
202c1e4: 90 10 00 1d mov %i5, %o0
rtems_current_user_env = new_env;
202c1e8: 03 00 81 bf sethi %hi(0x206fc00), %g1
202c1ec: f8 20 61 f4 st %i4, [ %g1 + 0x1f4 ] ! 206fdf4 <rtems_current_user_env>
202c1f0: 81 c7 e0 08 ret
202c1f4: 81 e8 00 00 restore
} else {
sc = RTEMS_TOO_MANY;
}
} else {
sc = RTEMS_UNSATISFIED;
202c1f8: 10 bf ff f6 b 202c1d0 <rtems_libio_set_private_env+0xcc> <== NOT EXECUTED
202c1fc: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
0202c200 <rtems_libio_share_private_env>:
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
202c200: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
202c204: 7f ff 87 d1 call 200e148 <rtems_task_self>
202c208: 01 00 00 00 nop
if (task_id != RTEMS_SELF && self_task_id != task_id) {
202c20c: 80 a2 00 18 cmp %o0, %i0
202c210: 12 80 00 04 bne 202c220 <rtems_libio_share_private_env+0x20>
202c214: 80 a6 20 00 cmp %i0, 0
}
}
}
return sc;
}
202c218: 81 c7 e0 08 ret
202c21c: 91 e8 20 00 restore %g0, 0, %o0
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
if (task_id != RTEMS_SELF && self_task_id != task_id) {
202c220: 02 bf ff fe be 202c218 <rtems_libio_share_private_env+0x18>
202c224: 03 00 81 cf sethi %hi(0x2073c00), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
202c228: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2073f70 <_Thread_Dispatch_disable_level>
202c22c: 84 00 a0 01 inc %g2
202c230: c4 20 63 70 st %g2, [ %g1 + 0x370 ]
return _Thread_Dispatch_disable_level;
202c234: c2 00 63 70 ld [ %g1 + 0x370 ], %g1
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
202c238: 3b 00 81 bf sethi %hi(0x206fc00), %i5
202c23c: 90 10 00 18 mov %i0, %o0
202c240: 92 17 61 f4 or %i5, 0x1f4, %o1
202c244: 40 00 06 2c call 202daf4 <rtems_task_variable_get>
202c248: 94 07 bf fc add %fp, -4, %o2
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
202c24c: 80 a2 20 00 cmp %o0, 0
202c250: 12 80 00 12 bne 202c298 <rtems_libio_share_private_env+0x98>
202c254: c2 07 bf fc ld [ %fp + -4 ], %g1
++env->reference_count;
202c258: c4 00 60 28 ld [ %g1 + 0x28 ], %g2
202c25c: 84 00 a0 01 inc %g2
} else {
sc = RTEMS_UNSATISFIED;
}
_Thread_Enable_dispatch();
202c260: 7f ff 92 07 call 2010a7c <_Thread_Enable_dispatch>
202c264: c4 20 60 28 st %g2, [ %g1 + 0x28 ]
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_task_variable_add(
202c268: 90 10 20 00 clr %o0
202c26c: 92 17 61 f4 or %i5, 0x1f4, %o1
202c270: 15 00 80 b0 sethi %hi(0x202c000), %o2
202c274: 40 00 05 c1 call 202d978 <rtems_task_variable_add>
202c278: 94 12 a0 8c or %o2, 0x8c, %o2 ! 202c08c <free_user_env>
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
202c27c: b0 92 20 00 orcc %o0, 0, %i0
202c280: 02 80 00 0a be 202c2a8 <rtems_libio_share_private_env+0xa8><== ALWAYS TAKEN
202c284: d0 07 bf fc ld [ %fp + -4 ], %o0
free_user_env_protected(rtems_current_user_env);
rtems_current_user_env = env;
} else {
free_user_env_protected(env);
202c288: 7f ff ff 94 call 202c0d8 <free_user_env_protected> <== NOT EXECUTED
202c28c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
202c290: 81 c7 e0 08 ret <== NOT EXECUTED
202c294: 81 e8 00 00 restore <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
++env->reference_count;
} else {
sc = RTEMS_UNSATISFIED;
}
_Thread_Enable_dispatch();
202c298: 7f ff 91 f9 call 2010a7c <_Thread_Enable_dispatch>
202c29c: b0 10 20 0d mov 0xd, %i0
202c2a0: 81 c7 e0 08 ret
202c2a4: 81 e8 00 00 restore
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(rtems_current_user_env);
202c2a8: 7f ff ff 8c call 202c0d8 <free_user_env_protected>
202c2ac: d0 07 61 f4 ld [ %i5 + 0x1f4 ], %o0
rtems_current_user_env = env;
202c2b0: c2 07 bf fc ld [ %fp + -4 ], %g1
202c2b4: c2 27 61 f4 st %g1, [ %i5 + 0x1f4 ]
202c2b8: 81 c7 e0 08 ret
202c2bc: 81 e8 00 00 restore
0200c824 <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 ) {
200c824: 84 0a 20 06 and %o0, 6, %g2
200c828: 80 a0 a0 06 cmp %g2, 6
200c82c: 02 80 00 05 be 200c840 <rtems_libio_to_fcntl_flags+0x1c> <== NEVER TAKEN
200c830: 82 10 20 02 mov 2, %g1
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
200c834: 80 8a 20 02 btst 2, %o0
200c838: 02 80 00 0e be 200c870 <rtems_libio_to_fcntl_flags+0x4c> <== NEVER TAKEN
200c83c: 82 10 20 00 clr %g1
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 ) {
200c840: 80 8a 20 01 btst 1, %o0
200c844: 02 80 00 04 be 200c854 <rtems_libio_to_fcntl_flags+0x30>
200c848: 80 8a 22 00 btst 0x200, %o0
fcntl_flags |= O_NONBLOCK;
200c84c: 05 00 00 10 sethi %hi(0x4000), %g2
200c850: 82 10 40 02 or %g1, %g2, %g1
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
200c854: 32 80 00 02 bne,a 200c85c <rtems_libio_to_fcntl_flags+0x38>
200c858: 82 10 60 08 or %g1, 8, %g1
fcntl_flags |= O_APPEND;
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
200c85c: 80 8a 24 00 btst 0x400, %o0
200c860: 32 80 00 02 bne,a 200c868 <rtems_libio_to_fcntl_flags+0x44>
200c864: 82 10 62 00 or %g1, 0x200, %g1
fcntl_flags |= O_CREAT;
}
return fcntl_flags;
}
200c868: 81 c3 e0 08 retl
200c86c: 90 10 00 01 mov %g1, %o0
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
200c870: 82 0a 20 04 and %o0, 4, %g1 <== NOT EXECUTED
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
200c874: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
200c878: 10 bf ff f2 b 200c840 <rtems_libio_to_fcntl_flags+0x1c> <== NOT EXECUTED
200c87c: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED
0202c2c0 <rtems_libio_use_global_env>:
return sc;
}
void rtems_libio_use_global_env(void)
{
202c2c0: 9d e3 bf a0 save %sp, -96, %sp
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) {
202c2c4: 3b 00 81 bf sethi %hi(0x206fc00), %i5
202c2c8: c2 07 61 f4 ld [ %i5 + 0x1f4 ], %g1 ! 206fdf4 <rtems_current_user_env>
202c2cc: 39 00 81 bf sethi %hi(0x206fc00), %i4
202c2d0: b8 17 21 f8 or %i4, 0x1f8, %i4 ! 206fdf8 <rtems_global_user_env>
202c2d4: 80 a0 40 1c cmp %g1, %i4
202c2d8: 02 80 00 08 be 202c2f8 <rtems_libio_use_global_env+0x38>
202c2dc: 92 17 61 f4 or %i5, 0x1f4, %o1
sc = rtems_task_variable_delete(
202c2e0: 40 00 05 d7 call 202da3c <rtems_task_variable_delete>
202c2e4: 90 10 20 00 clr %o0
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
202c2e8: 80 a2 20 00 cmp %o0, 0
202c2ec: 12 80 00 05 bne 202c300 <rtems_libio_use_global_env+0x40> <== NEVER TAKEN
202c2f0: 11 37 ab 6f sethi %hi(0xdeadbc00), %o0
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
202c2f4: f8 27 61 f4 st %i4, [ %i5 + 0x1f4 ]
202c2f8: 81 c7 e0 08 ret
202c2fc: 81 e8 00 00 restore
sc = rtems_task_variable_delete(
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
202c300: 7f ff 88 3f call 200e3fc <rtems_fatal_error_occurred> <== NOT EXECUTED
202c304: 90 12 22 ef or %o0, 0x2ef, %o0 <== NOT EXECUTED
0200952c <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
200952c: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
2009530: 03 00 81 bf sethi %hi(0x206fc00), %g1
2009534: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 206fc9c <RTEMS_Malloc_Heap>
2009538: 92 10 00 18 mov %i0, %o1
200953c: 40 00 1a 1c call 200fdac <_Protected_heap_Get_block_size>
2009540: 94 07 bf fc add %fp, -4, %o2
2009544: 80 8a 20 ff btst 0xff, %o0
2009548: 02 80 00 08 be 2009568 <rtems_malloc_statistics_at_free+0x3c><== NEVER TAKEN
200954c: c4 07 bf fc ld [ %fp + -4 ], %g2
MSBUMP(lifetime_freed, size);
2009550: 03 00 81 cf sethi %hi(0x2073c00), %g1
2009554: 82 10 62 08 or %g1, 0x208, %g1 ! 2073e08 <rtems_malloc_statistics>
2009558: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4
200955c: 86 83 40 02 addcc %o5, %g2, %g3
2009560: 84 43 20 00 addx %o4, 0, %g2
2009564: c4 38 60 28 std %g2, [ %g1 + 0x28 ]
2009568: 81 c7 e0 08 ret
200956c: 81 e8 00 00 restore
02009570 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
2009570: 9d e3 bf 98 save %sp, -104, %sp
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
2009574: 80 a6 20 00 cmp %i0, 0
2009578: 02 80 00 14 be 20095c8 <rtems_malloc_statistics_at_malloc+0x58><== NEVER TAKEN
200957c: c0 27 bf fc clr [ %fp + -4 ]
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
2009580: 03 00 81 bf sethi %hi(0x206fc00), %g1
2009584: d0 00 60 9c ld [ %g1 + 0x9c ], %o0 ! 206fc9c <RTEMS_Malloc_Heap>
2009588: 92 10 00 18 mov %i0, %o1
200958c: 40 00 1a 08 call 200fdac <_Protected_heap_Get_block_size>
2009590: 94 07 bf fc add %fp, -4, %o2
MSBUMP(lifetime_allocated, actual_size);
2009594: c4 07 bf fc ld [ %fp + -4 ], %g2
2009598: 03 00 81 cf sethi %hi(0x2073c00), %g1
200959c: 82 10 62 08 or %g1, 0x208, %g1 ! 2073e08 <rtems_malloc_statistics>
20095a0: d8 18 60 20 ldd [ %g1 + 0x20 ], %o4
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
20095a4: f0 00 60 2c ld [ %g1 + 0x2c ], %i0
if (current_depth > s->max_depth)
20095a8: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
20095ac: 86 83 40 02 addcc %o5, %g2, %g3
20095b0: 84 43 20 00 addx %o4, 0, %g2
20095b4: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
20095b8: 84 20 c0 18 sub %g3, %i0, %g2
if (current_depth > s->max_depth)
20095bc: 80 a0 80 04 cmp %g2, %g4
20095c0: 38 80 00 02 bgu,a 20095c8 <rtems_malloc_statistics_at_malloc+0x58>
20095c4: c4 20 60 18 st %g2, [ %g1 + 0x18 ]
20095c8: 81 c7 e0 08 ret
20095cc: 81 e8 00 00 restore
020109d8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
20109d8: 9d e3 bf a0 save %sp, -96, %sp
20109dc: ba 10 00 18 mov %i0, %i5
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
20109e0: 80 a7 60 00 cmp %i5, 0
20109e4: 02 80 00 22 be 2010a6c <rtems_memalign+0x94>
20109e8: b0 10 20 16 mov 0x16, %i0
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
20109ec: 03 00 80 85 sethi %hi(0x2021400), %g1
20109f0: c2 00 60 a8 ld [ %g1 + 0xa8 ], %g1 ! 20214a8 <_System_state_Current>
20109f4: 80 a0 60 03 cmp %g1, 3
20109f8: 02 80 00 18 be 2010a58 <rtems_memalign+0x80>
20109fc: c0 27 40 00 clr [ %i5 ]
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2010a00: 7f ff d1 43 call 2004f0c <malloc_deferred_frees_process>
2010a04: b0 10 20 0c mov 0xc, %i0
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
2010a08: 03 00 80 81 sethi %hi(0x2020400), %g1
2010a0c: d0 00 62 30 ld [ %g1 + 0x230 ], %o0 ! 2020630 <RTEMS_Malloc_Heap>
2010a10: 94 10 00 19 mov %i1, %o2
2010a14: 92 10 00 1a mov %i2, %o1
2010a18: 7f ff e9 3f call 200af14 <_Protected_heap_Allocate_aligned_with_boundary>
2010a1c: 96 10 20 00 clr %o3
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
2010a20: 80 a2 20 00 cmp %o0, 0
2010a24: 02 80 00 12 be 2010a6c <rtems_memalign+0x94>
2010a28: b2 10 00 08 mov %o0, %i1
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
2010a2c: 03 00 80 83 sethi %hi(0x2020c00), %g1
2010a30: c2 00 61 98 ld [ %g1 + 0x198 ], %g1 ! 2020d98 <rtems_malloc_statistics_helpers>
2010a34: 80 a0 60 00 cmp %g1, 0
2010a38: 22 80 00 06 be,a 2010a50 <rtems_memalign+0x78>
2010a3c: f2 27 40 00 st %i1, [ %i5 ]
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
2010a40: c2 00 60 04 ld [ %g1 + 4 ], %g1
2010a44: 9f c0 40 00 call %g1
2010a48: 90 10 00 1d mov %i5, %o0
*pointer = return_this;
2010a4c: f2 27 40 00 st %i1, [ %i5 ]
return 0;
}
2010a50: 81 c7 e0 08 ret
2010a54: 91 e8 20 00 restore %g0, 0, %o0
/*
* 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() )
2010a58: 7f ff d1 1b call 2004ec4 <malloc_is_system_state_OK>
2010a5c: 01 00 00 00 nop
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2010a60: 80 8a 20 ff btst 0xff, %o0
2010a64: 12 bf ff e7 bne 2010a00 <rtems_memalign+0x28> <== ALWAYS TAKEN
2010a68: 01 00 00 00 nop
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
2010a6c: 81 c7 e0 08 ret
2010a70: 81 e8 00 00 restore
0200a338 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
200a338: 9d e3 bf 58 save %sp, -168, %sp
int success = 0;
char *dup_path = strdup(path);
200a33c: 90 10 00 18 mov %i0, %o0
200a340: 40 01 0e 22 call 204dbc8 <strdup>
200a344: b0 10 3f ff mov -1, %i0
if (dup_path != NULL) {
200a348: 80 a2 20 00 cmp %o0, 0
200a34c: 02 80 00 2e be 200a404 <rtems_mkdir+0xcc> <== NEVER TAKEN
200a350: ba 10 00 08 mov %o0, %i5
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
200a354: c2 0a 00 00 ldub [ %o0 ], %g1
200a358: 83 28 60 18 sll %g1, 0x18, %g1
200a35c: 85 38 60 18 sra %g1, 0x18, %g2
200a360: 80 a0 a0 2f cmp %g2, 0x2f
200a364: 02 80 00 58 be 200a4c4 <rtems_mkdir+0x18c>
200a368: b8 10 00 08 mov %o0, %i4
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
200a36c: 83 38 60 18 sra %g1, 0x18, %g1
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
200a370: b4 10 20 00 clr %i2
200a374: 84 10 20 01 mov 1, %g2
retval = 0;
break;
}
}
if (!last)
*p = '/';
200a378: b0 10 20 2f mov 0x2f, %i0
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
200a37c: 23 00 00 3c sethi %hi(0xf000), %l1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
200a380: 80 a0 60 00 cmp %g1, 0
200a384: 02 80 00 0b be 200a3b0 <rtems_mkdir+0x78> <== NEVER TAKEN
200a388: 21 00 00 10 sethi %hi(0x4000), %l0
last = 1;
else if (p[0] != '/')
200a38c: 80 a0 60 2f cmp %g1, 0x2f
200a390: 22 80 00 49 be,a 200a4b4 <rtems_mkdir+0x17c>
200a394: c2 4f 20 01 ldsb [ %i4 + 1 ], %g1
retval = 0;
break;
}
}
if (!last)
*p = '/';
200a398: c2 0f 20 01 ldub [ %i4 + 1 ], %g1
200a39c: 83 28 60 18 sll %g1, 0x18, %g1
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
200a3a0: 83 38 60 18 sra %g1, 0x18, %g1
200a3a4: 80 a0 60 00 cmp %g1, 0
200a3a8: 12 bf ff f9 bne 200a38c <rtems_mkdir+0x54>
200a3ac: b8 07 20 01 inc %i4
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
200a3b0: c0 2f 00 00 clrb [ %i4 ]
200a3b4: b6 10 20 01 mov 1, %i3
if (!last && p[1] == '\0')
last = 1;
if (first) {
200a3b8: 80 a0 a0 00 cmp %g2, 0
200a3bc: 12 80 00 37 bne 200a498 <rtems_mkdir+0x160>
200a3c0: 01 00 00 00 nop
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
200a3c4: 80 a6 e0 00 cmp %i3, 0
200a3c8: 12 80 00 13 bne 200a414 <rtems_mkdir+0xdc>
200a3cc: 92 10 21 ff mov 0x1ff, %o1
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
200a3d0: 7f ff fc 8f call 200960c <mkdir>
200a3d4: 90 10 00 1d mov %i5, %o0
200a3d8: 80 a2 20 00 cmp %o0, 0
200a3dc: 06 80 00 16 bl 200a434 <rtems_mkdir+0xfc>
200a3e0: 80 a6 e0 00 cmp %i3, 0
} else {
retval = 0;
break;
}
}
if (!last)
200a3e4: 22 80 00 0a be,a 200a40c <rtems_mkdir+0xd4>
200a3e8: f0 2f 00 00 stb %i0, [ %i4 ]
200a3ec: b8 10 20 01 mov 1, %i4
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
200a3f0: 7f ff fa 7d call 2008de4 <free>
200a3f4: 90 10 00 1d mov %i5, %o0
}
return success != 0 ? 0 : -1;
200a3f8: 80 a7 20 00 cmp %i4, 0
200a3fc: 02 80 00 48 be 200a51c <rtems_mkdir+0x1e4> <== NEVER TAKEN
200a400: b0 10 20 00 clr %i0
}
200a404: 81 c7 e0 08 ret
200a408: 81 e8 00 00 restore
retval = 0;
break;
}
}
if (!last)
*p = '/';
200a40c: 10 bf ff e3 b 200a398 <rtems_mkdir+0x60>
200a410: 84 10 20 00 clr %g2
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
200a414: 40 00 0a 5f call 200cd90 <umask>
200a418: 90 10 00 1a mov %i2, %o0
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
200a41c: 92 10 00 19 mov %i1, %o1
200a420: 7f ff fc 7b call 200960c <mkdir>
200a424: 90 10 00 1d mov %i5, %o0
200a428: 80 a2 20 00 cmp %o0, 0
200a42c: 16 bf ff ee bge 200a3e4 <rtems_mkdir+0xac>
200a430: 80 a6 e0 00 cmp %i3, 0
if (errno == EEXIST || errno == EISDIR) {
200a434: 40 00 f3 ae call 20472ec <__errno>
200a438: 01 00 00 00 nop
200a43c: c2 02 00 00 ld [ %o0 ], %g1
200a440: 80 a0 60 11 cmp %g1, 0x11
200a444: 02 80 00 08 be 200a464 <rtems_mkdir+0x12c>
200a448: 90 10 00 1d mov %i5, %o0
200a44c: 40 00 f3 a8 call 20472ec <__errno>
200a450: 01 00 00 00 nop
200a454: c2 02 00 00 ld [ %o0 ], %g1
200a458: 80 a0 60 15 cmp %g1, 0x15
200a45c: 12 80 00 32 bne 200a524 <rtems_mkdir+0x1ec> <== ALWAYS TAKEN
200a460: 90 10 00 1d mov %i5, %o0
if (stat(path, &sb) < 0) {
200a464: 40 00 00 39 call 200a548 <stat>
200a468: 92 07 bf b8 add %fp, -72, %o1
200a46c: 80 a2 20 00 cmp %o0, 0
200a470: 06 80 00 2d bl 200a524 <rtems_mkdir+0x1ec> <== NEVER TAKEN
200a474: c2 07 bf c4 ld [ %fp + -60 ], %g1
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
200a478: 82 08 40 11 and %g1, %l1, %g1
200a47c: 80 a0 40 10 cmp %g1, %l0
200a480: 12 80 00 15 bne 200a4d4 <rtems_mkdir+0x19c>
200a484: 80 a6 e0 00 cmp %i3, 0
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
200a488: 22 bf ff e1 be,a 200a40c <rtems_mkdir+0xd4>
200a48c: f0 2f 00 00 stb %i0, [ %i4 ]
retval = 2;
200a490: 10 bf ff d8 b 200a3f0 <rtems_mkdir+0xb8>
200a494: b8 10 20 02 mov 2, %i4
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
200a498: 40 00 0a 3e call 200cd90 <umask>
200a49c: 90 10 20 00 clr %o0
200a4a0: b4 10 00 08 mov %o0, %i2
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
200a4a4: 40 00 0a 3b call 200cd90 <umask>
200a4a8: 90 0a 3f 3f and %o0, -193, %o0
first = 0;
}
if (last)
200a4ac: 10 bf ff c7 b 200a3c8 <rtems_mkdir+0x90>
200a4b0: 80 a6 e0 00 cmp %i3, 0
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
200a4b4: c0 2f 00 00 clrb [ %i4 ]
if (!last && p[1] == '\0')
200a4b8: 80 a0 00 01 cmp %g0, %g1
200a4bc: 10 bf ff bf b 200a3b8 <rtems_mkdir+0x80>
200a4c0: b6 60 3f ff subx %g0, -1, %i3
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
200a4c4: c2 0a 20 01 ldub [ %o0 + 1 ], %g1
200a4c8: b8 02 20 01 add %o0, 1, %i4
200a4cc: 10 bf ff a8 b 200a36c <rtems_mkdir+0x34>
200a4d0: 83 28 60 18 sll %g1, 0x18, %g1
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
200a4d4: 02 80 00 0a be 200a4fc <rtems_mkdir+0x1c4>
200a4d8: 01 00 00 00 nop
errno = EEXIST;
200a4dc: 40 00 f3 84 call 20472ec <__errno>
200a4e0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
200a4e4: 82 10 20 11 mov 0x11, %g1
200a4e8: c2 22 00 00 st %g1, [ %o0 ]
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
200a4ec: 7f ff fa 3e call 2008de4 <free>
200a4f0: 90 10 00 1d mov %i5, %o0
200a4f4: 81 c7 e0 08 ret
200a4f8: 81 e8 00 00 restore
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
200a4fc: 40 00 f3 7c call 20472ec <__errno>
200a500: 01 00 00 00 nop
200a504: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200a508: c2 22 00 00 st %g1, [ %o0 ]
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
200a50c: 40 00 0a 21 call 200cd90 <umask>
200a510: 90 10 00 1a mov %i2, %o0
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
200a514: 7f ff fa 34 call 2008de4 <free>
200a518: 90 10 00 1d mov %i5, %o0
}
return success != 0 ? 0 : -1;
}
200a51c: 81 c7 e0 08 ret
200a520: 91 e8 3f ff restore %g0, -1, %o0
}
}
if (!last)
*p = '/';
}
if (!first && !last)
200a524: 80 a6 e0 00 cmp %i3, 0
200a528: 02 bf ff f9 be 200a50c <rtems_mkdir+0x1d4> <== NEVER TAKEN
200a52c: 01 00 00 00 nop
200a530: 30 bf ff f9 b,a 200a514 <rtems_mkdir+0x1dc>
02023164 <rtems_nvdisk_error>:
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_nvdisk_error (const char *format, ...)
{
2023164: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
2023168: 21 00 81 c1 sethi %hi(0x2070400), %l0 <== NOT EXECUTED
202316c: c2 04 22 48 ld [ %l0 + 0x248 ], %g1 ! 2070648 <_impure_ptr><== NOT EXECUTED
static int
rtems_nvdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
2023170: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED
2023174: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2023178: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
202317c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
2023180: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
fprintf (stderr, "nvdisk:error:");
2023184: d6 00 60 0c ld [ %g1 + 0xc ], %o3 <== NOT EXECUTED
static int
rtems_nvdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
2023188: 82 07 a0 48 add %fp, 0x48, %g1 <== NOT EXECUTED
fprintf (stderr, "nvdisk:error:");
202318c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
static int
rtems_nvdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
2023190: c2 27 bf fc st %g1, [ %fp + -4 ] <== NOT EXECUTED
fprintf (stderr, "nvdisk:error:");
2023194: 94 10 20 0d mov 0xd, %o2 <== NOT EXECUTED
2023198: 11 00 81 9d sethi %hi(0x2067400), %o0 <== NOT EXECUTED
202319c: 40 00 97 e0 call 204911c <fwrite> <== NOT EXECUTED
20231a0: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 20677c8 <msdos_ops+0x58> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
20231a4: c2 04 22 48 ld [ %l0 + 0x248 ], %g1 <== NOT EXECUTED
20231a8: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
20231ac: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
20231b0: 40 00 d4 d8 call 2058510 <vfprintf> <== NOT EXECUTED
20231b4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
fprintf (stderr, "\n");
20231b8: c2 04 22 48 ld [ %l0 + 0x248 ], %g1 <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
ret = vfprintf (stderr, format, args);
20231bc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
fprintf (stderr, "\n");
20231c0: d2 00 60 0c ld [ %g1 + 0xc ], %o1 <== NOT EXECUTED
20231c4: 40 00 93 30 call 2047e84 <fputc> <== NOT EXECUTED
20231c8: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
fflush (stderr);
20231cc: c2 04 22 48 ld [ %l0 + 0x248 ], %g1 <== NOT EXECUTED
20231d0: 40 00 91 57 call 204772c <fflush> <== NOT EXECUTED
20231d4: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
va_end (args);
return ret;
}
20231d8: 81 c7 e0 08 ret <== NOT EXECUTED
20231dc: 81 e8 00 00 restore <== NOT EXECUTED
020231e0 <rtems_nvdisk_get_device>:
/**
* Map a block to a device.
*/
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
20231e0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
20231e4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
20231e8: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED
20231ec: 08 80 00 1d bleu 2023260 <rtems_nvdisk_get_device+0x80> <== NOT EXECUTED
20231f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
20231f4: c8 06 20 18 ld [ %i0 + 0x18 ], %g4 <== NOT EXECUTED
20231f8: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
20231fc: 02 80 00 13 be 2023248 <rtems_nvdisk_get_device+0x68> <== NOT EXECUTED
2023200: 84 10 20 00 clr %g2 <== NOT EXECUTED
{
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
2023204: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
}
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
if ((block >= dc->block_base) &&
2023208: c6 00 60 0c ld [ %g1 + 0xc ], %g3 <== NOT EXECUTED
202320c: 80 a6 40 03 cmp %i1, %g3 <== NOT EXECUTED
2023210: 0a 80 00 09 bcs 2023234 <rtems_nvdisk_get_device+0x54> <== NOT EXECUTED
2023214: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
(block < (dc->block_base + dc->pages - dc->pages_desc)))
2023218: da 00 60 04 ld [ %g1 + 4 ], %o5 <== NOT EXECUTED
202321c: de 00 60 08 ld [ %g1 + 8 ], %o7 <== NOT EXECUTED
2023220: 86 00 c0 0d add %g3, %o5, %g3 <== NOT EXECUTED
2023224: 86 20 c0 0f sub %g3, %o7, %g3 <== NOT EXECUTED
}
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
if ((block >= dc->block_base) &&
2023228: 80 a6 40 03 cmp %i1, %g3 <== NOT EXECUTED
202322c: 0a 80 00 11 bcs 2023270 <rtems_nvdisk_get_device+0x90> <== NOT EXECUTED
2023230: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
2023234: 84 00 a0 01 inc %g2 <== NOT EXECUTED
2023238: 80 a0 80 04 cmp %g2, %g4 <== NOT EXECUTED
202323c: 12 bf ff f3 bne 2023208 <rtems_nvdisk_get_device+0x28> <== NOT EXECUTED
2023240: 82 00 60 14 add %g1, 0x14, %g1 <== NOT EXECUTED
if ((block >= dc->block_base) &&
(block < (dc->block_base + dc->pages - dc->pages_desc)))
return dc;
}
rtems_nvdisk_error ("map-block:%d: no device/page map found", block);
2023244: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2023248: 11 00 81 9d sethi %hi(0x2067400), %o0 <== NOT EXECUTED
return NULL;
202324c: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ((block >= dc->block_base) &&
(block < (dc->block_base + dc->pages - dc->pages_desc)))
return dc;
}
rtems_nvdisk_error ("map-block:%d: no device/page map found", block);
2023250: 7f ff ff c5 call 2023164 <rtems_nvdisk_error> <== NOT EXECUTED
2023254: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED
return NULL;
}
2023258: 81 c7 e0 08 ret <== NOT EXECUTED
202325c: 81 e8 00 00 restore <== NOT EXECUTED
{
uint32_t device;
if (block >= nvd->block_count)
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
2023260: 11 00 81 9d sethi %hi(0x2067400), %o0 <== NOT EXECUTED
2023264: b0 10 20 00 clr %i0 <== NOT EXECUTED
2023268: 7f ff ff bf call 2023164 <rtems_nvdisk_error> <== NOT EXECUTED
202326c: 90 12 23 d8 or %o0, 0x3d8, %o0 <== NOT EXECUTED
2023270: 81 c7 e0 08 ret <== NOT EXECUTED
2023274: 81 e8 00 00 restore <== NOT EXECUTED
020238a0 <rtems_nvdisk_initialize>:
*/
rtems_device_driver
rtems_nvdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
20238a0: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
const rtems_nvdisk_config* c = rtems_nvdisk_configuration;
rtems_nvdisk* nvd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
20238a4: 7f ff 91 de call 200801c <rtems_disk_io_initialize> <== NOT EXECUTED
20238a8: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20238ac: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20238b0: 02 80 00 04 be 20238c0 <rtems_nvdisk_initialize+0x20> <== NOT EXECUTED
20238b4: 01 00 00 00 nop <== NOT EXECUTED
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
20238b8: 81 c7 e0 08 ret <== NOT EXECUTED
20238bc: 81 e8 00 00 restore <== NOT EXECUTED
static rtems_status_code
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
20238c0: 7f ff 96 d2 call 2009408 <malloc> <== NOT EXECUTED
20238c4: 90 10 22 00 mov 0x200, %o0 <== NOT EXECUTED
20238c8: 03 00 81 cd sethi %hi(0x2073400), %g1 <== NOT EXECUTED
20238cc: d0 20 63 ec st %o0, [ %g1 + 0x3ec ] ! 20737ec <rtems_nvdisk_crc16_factor><== NOT EXECUTED
20238d0: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
if (!rtems_nvdisk_crc16_factor)
20238d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20238d8: 02 bf ff f8 be 20238b8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
20238dc: b0 10 20 1a mov 0x1a, %i0 <== 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;
20238e0: 3b 3f ff e1 sethi %hi(0xffff8400), %i5 <== NOT EXECUTED
rtems_nvdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
20238e4: 88 10 20 00 clr %g4 <== 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;
20238e8: ba 17 60 08 or %i5, 8, %i5 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
20238ec: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED
20238f0: 84 10 20 08 mov 8, %g2 <== NOT EXECUTED
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
20238f4: 87 28 60 10 sll %g1, 0x10, %g3 <== NOT EXECUTED
20238f8: 82 08 60 01 and %g1, 1, %g1 <== NOT EXECUTED
20238fc: 87 30 e0 11 srl %g3, 0x11, %g3 <== NOT EXECUTED
2023900: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2023904: 02 80 00 03 be 2023910 <rtems_nvdisk_initialize+0x70> <== NOT EXECUTED
2023908: 82 10 00 03 mov %g3, %g1 <== NOT EXECUTED
202390c: 82 18 c0 1d xor %g3, %i5, %g1 <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
2023910: 84 80 bf ff addcc %g2, -1, %g2 <== NOT EXECUTED
2023914: 12 bf ff f9 bne 20238f8 <rtems_nvdisk_initialize+0x58> <== NOT EXECUTED
2023918: 87 28 60 10 sll %g1, 0x10, %g3 <== NOT EXECUTED
* @param major NV disk major device number.
* @param minor Minor device number, not applicable.
* @param arg Initialization argument, not applicable.
*/
rtems_device_driver
rtems_nvdisk_initialize (rtems_device_major_number major,
202391c: 85 29 20 01 sll %g4, 1, %g2 <== NOT EXECUTED
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
2023920: 88 01 20 01 inc %g4 <== NOT EXECUTED
2023924: 80 a1 21 00 cmp %g4, 0x100 <== NOT EXECUTED
2023928: 12 bf ff f1 bne 20238ec <rtems_nvdisk_initialize+0x4c> <== NOT EXECUTED
202392c: c2 37 00 02 sth %g1, [ %i4 + %g2 ] <== NOT EXECUTED
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_nvdisks = calloc (rtems_nvdisk_configuration_size,
2023930: 21 00 81 be sethi %hi(0x206f800), %l0 <== NOT EXECUTED
2023934: fa 04 23 4c ld [ %l0 + 0x34c ], %i5 ! 206fb4c <rtems_nvdisk_configuration_size><== NOT EXECUTED
2023938: 92 10 20 28 mov 0x28, %o1 <== NOT EXECUTED
202393c: 7f ff 94 4b call 2008a68 <calloc> <== NOT EXECUTED
2023940: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2023944: 03 00 81 cd sethi %hi(0x2073400), %g1 <== NOT EXECUTED
2023948: d0 20 63 f0 st %o0, [ %g1 + 0x3f0 ] ! 20737f0 <rtems_nvdisks><== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
202394c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2023950: 02 bf ff da be 20238b8 <rtems_nvdisk_initialize+0x18> <== NOT EXECUTED
2023954: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
2023958: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED
202395c: 02 80 00 63 be 2023ae8 <rtems_nvdisk_initialize+0x248> <== NOT EXECUTED
2023960: 39 00 81 8d sethi %hi(0x2063400), %i4 <== NOT EXECUTED
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
2023964: 25 0b d9 19 sethi %hi(0x2f646400), %l2 <== NOT EXECUTED
2023968: 27 0b db 9d sethi %hi(0x2f6e7400), %l3 <== NOT EXECUTED
202396c: 23 00 00 18 sethi %hi(0x6000), %l1 <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
2023970: b4 10 20 00 clr %i2 <== NOT EXECUTED
2023974: b8 17 23 48 or %i4, 0x348, %i4 <== NOT EXECUTED
2023978: b6 10 20 00 clr %i3 <== NOT EXECUTED
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
202397c: a4 14 a1 76 or %l2, 0x176, %l2 <== NOT EXECUTED
2023980: a6 14 e2 64 or %l3, 0x264, %l3 <== NOT EXECUTED
2023984: a2 14 61 00 or %l1, 0x100, %l1 <== NOT EXECUTED
nvd->block_count = blocks;
nvd->device_count = c->device_count;
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
rtems_nvdisk_ioctl, NULL, name);
2023988: b0 07 bf f0 add %fp, -16, %i0 <== NOT EXECUTED
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
202398c: e2 37 bf f8 sth %l1, [ %fp + -8 ] <== NOT EXECUTED
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
2023990: f6 2f bf f9 stb %i3, [ %fp + -7 ] <== NOT EXECUTED
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
2023994: e4 3f bf f0 std %l2, [ %fp + -16 ] <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
nvd->minor = minor;
nvd->flags = c->flags;
nvd->block_size = c->block_size;
2023998: c6 07 00 00 ld [ %i4 ], %g3 <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
nvd->minor = minor;
nvd->flags = c->flags;
202399c: c4 07 20 0c ld [ %i4 + 0xc ], %g2 <== NOT EXECUTED
nvd->block_size = c->block_size;
nvd->info_level = c->info_level;
20239a0: c2 07 20 10 ld [ %i4 + 0x10 ], %g1 <== NOT EXECUTED
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
20239a4: ba 02 00 1a add %o0, %i2, %i5 <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
nvd->minor = minor;
nvd->flags = c->flags;
nvd->block_size = c->block_size;
20239a8: c6 27 bf ec st %g3, [ %fp + -20 ] <== NOT EXECUTED
nvd->info_level = c->info_level;
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
20239ac: c6 07 20 04 ld [ %i4 + 4 ], %g3 <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
nvd->minor = minor;
nvd->flags = c->flags;
20239b0: c4 27 60 08 st %g2, [ %i5 + 8 ] <== NOT EXECUTED
nvd->block_size = c->block_size;
20239b4: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED
nvd = &rtems_nvdisks[minor];
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
20239b8: f2 22 00 1a st %i1, [ %o0 + %i2 ] <== NOT EXECUTED
nvd->minor = minor;
nvd->flags = c->flags;
nvd->block_size = c->block_size;
nvd->info_level = c->info_level;
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
20239bc: c6 27 bf e8 st %g3, [ %fp + -24 ] <== NOT EXECUTED
nvd = &rtems_nvdisks[minor];
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
nvd->major = major;
nvd->minor = minor;
20239c0: f6 27 60 04 st %i3, [ %i5 + 4 ] <== NOT EXECUTED
nvd->flags = c->flags;
nvd->block_size = c->block_size;
20239c4: c4 27 60 0c st %g2, [ %i5 + 0xc ] <== NOT EXECUTED
nvd->info_level = c->info_level;
20239c8: c2 27 60 24 st %g1, [ %i5 + 0x24 ] <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
20239cc: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED
20239d0: 7f ff 94 26 call 2008a68 <calloc> <== NOT EXECUTED
20239d4: 92 10 20 14 mov 0x14, %o1 <== NOT EXECUTED
if (!nvd->devices)
20239d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20239dc: 02 80 00 41 be 2023ae0 <rtems_nvdisk_initialize+0x240> <== NOT EXECUTED
20239e0: d0 27 60 14 st %o0, [ %i5 + 0x14 ] <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
20239e4: c6 07 bf e8 ld [ %fp + -24 ], %g3 <== NOT EXECUTED
20239e8: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
20239ec: 02 80 00 1d be 2023a60 <rtems_nvdisk_initialize+0x1c0> <== NOT EXECUTED
20239f0: a8 10 20 00 clr %l4 <== NOT EXECUTED
20239f4: ee 07 20 08 ld [ %i4 + 8 ], %l7 <== NOT EXECUTED
20239f8: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED
20239fc: ac 10 20 00 clr %l6 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_pages_in_device (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
return dd->size / nvd->block_size;
2023a00: d0 05 e0 08 ld [ %l7 + 8 ], %o0 <== NOT EXECUTED
2023a04: d2 07 bf ec ld [ %fp + -20 ], %o1 <== NOT EXECUTED
2023a08: 40 00 f4 25 call 2060a9c <.udiv> <== NOT EXECUTED
2023a0c: ec 25 40 00 st %l6, [ %l5 ] <== NOT EXECUTED
rtems_nvdisk_page_desc_pages (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
uint32_t pages = rtems_nvdisk_pages_in_device (nvd, dd);
uint32_t bytes = pages * sizeof (uint16_t);
return ((bytes - 1) / nvd->block_size) + 1;
2023a10: d2 07 bf ec ld [ %fp + -20 ], %o1 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_pages_in_device (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
return dd->size / nvd->block_size;
2023a14: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
2023a18: d0 25 60 04 st %o0, [ %l5 + 4 ] <== NOT EXECUTED
rtems_nvdisk_page_desc_pages (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
uint32_t pages = rtems_nvdisk_pages_in_device (nvd, dd);
uint32_t bytes = pages * sizeof (uint16_t);
return ((bytes - 1) / nvd->block_size) + 1;
2023a1c: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED
static uint32_t
rtems_nvdisk_page_desc_pages (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
uint32_t pages = rtems_nvdisk_pages_in_device (nvd, dd);
uint32_t bytes = pages * sizeof (uint16_t);
2023a20: 91 2a 20 01 sll %o0, 1, %o0 <== NOT EXECUTED
return ((bytes - 1) / nvd->block_size) + 1;
2023a24: 40 00 f4 1e call 2060a9c <.udiv> <== NOT EXECUTED
2023a28: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
2023a2c: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
rtems_nvdisk_page_desc_pages (const rtems_nvdisk* nvd,
const rtems_nvdisk_device_desc* dd)
{
uint32_t pages = rtems_nvdisk_pages_in_device (nvd, dd);
uint32_t bytes = pages * sizeof (uint16_t);
return ((bytes - 1) / nvd->block_size) + 1;
2023a30: 90 02 20 01 inc %o0 <== NOT EXECUTED
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
2023a34: 82 20 40 08 sub %g1, %o0, %g1 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
2023a38: e8 25 60 0c st %l4, [ %l5 + 0xc ] <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
2023a3c: a8 05 00 01 add %l4, %g1, %l4 <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
2023a40: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
dc->block_base = blocks;
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
2023a44: ee 25 60 10 st %l7, [ %l5 + 0x10 ] <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
dc->pages_desc = rtems_nvdisk_page_desc_pages (nvd, &c->devices[device]);
2023a48: d0 25 60 08 st %o0, [ %l5 + 8 ] <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
if (!nvd->devices)
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
2023a4c: ac 05 a0 01 inc %l6 <== NOT EXECUTED
2023a50: aa 05 60 14 add %l5, 0x14, %l5 <== NOT EXECUTED
2023a54: 80 a5 80 01 cmp %l6, %g1 <== NOT EXECUTED
2023a58: 12 bf ff ea bne 2023a00 <rtems_nvdisk_initialize+0x160> <== NOT EXECUTED
2023a5c: ae 05 e0 10 add %l7, 0x10, %l7 <== NOT EXECUTED
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
nvd->device_count = c->device_count;
2023a60: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
2023a64: d4 07 bf ec ld [ %fp + -20 ], %o2 <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
2023a68: e8 27 60 10 st %l4, [ %i5 + 0x10 ] <== NOT EXECUTED
nvd->device_count = c->device_count;
2023a6c: c4 27 60 18 st %g2, [ %i5 + 0x18 ] <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
2023a70: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED
2023a74: f0 23 a0 5c st %i0, [ %sp + 0x5c ] <== NOT EXECUTED
2023a78: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2023a7c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2023a80: 19 00 80 8c sethi %hi(0x2023000), %o4 <== NOT EXECUTED
2023a84: 9a 10 20 00 clr %o5 <== NOT EXECUTED
2023a88: 7f ff 90 0e call 2007ac0 <rtems_disk_create_phys> <== NOT EXECUTED
2023a8c: 98 13 22 78 or %o4, 0x278, %o4 <== NOT EXECUTED
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
2023a90: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED
2023a94: 12 80 00 1f bne 2023b10 <rtems_nvdisk_initialize+0x270> <== NOT EXECUTED
2023a98: 07 00 81 9e sethi %hi(0x2067800), %g3 <== NOT EXECUTED
{
rtems_nvdisk_error ("disk create phy failed");
return sc;
}
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
2023a9c: d0 00 e0 88 ld [ %g3 + 0x88 ], %o0 ! 2067888 <msdos_ops+0x118><== NOT EXECUTED
2023aa0: 98 07 60 20 add %i5, 0x20, %o4 <== NOT EXECUTED
2023aa4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2023aa8: 94 10 20 54 mov 0x54, %o2 <== NOT EXECUTED
2023aac: 7f ff a7 76 call 200d884 <rtems_semaphore_create> <== NOT EXECUTED
2023ab0: 96 10 20 00 clr %o3 <== NOT EXECUTED
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
2023ab4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2023ab8: 12 80 00 10 bne 2023af8 <rtems_nvdisk_initialize+0x258> <== NOT EXECUTED
2023abc: b6 06 e0 01 inc %i3 <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
2023ac0: fa 04 23 4c ld [ %l0 + 0x34c ], %i5 <== NOT EXECUTED
2023ac4: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED
2023ac8: 08 80 00 08 bleu 2023ae8 <rtems_nvdisk_initialize+0x248> <== NOT EXECUTED
2023acc: b4 06 a0 28 add %i2, 0x28, %i2 <== NOT EXECUTED
2023ad0: 03 00 81 cd sethi %hi(0x2073400), %g1 <== NOT EXECUTED
2023ad4: b8 07 20 14 add %i4, 0x14, %i4 <== NOT EXECUTED
2023ad8: 10 bf ff ad b 202398c <rtems_nvdisk_initialize+0xec> <== NOT EXECUTED
2023adc: d0 00 63 f0 ld [ %g1 + 0x3f0 ], %o0 <== NOT EXECUTED
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
2023ae0: 81 c7 e0 08 ret <== NOT EXECUTED
2023ae4: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED
rtems_nvdisk_error ("disk lock create failed");
return sc;
}
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
2023ae8: 03 00 81 cd sethi %hi(0x2073400), %g1 <== NOT EXECUTED
2023aec: fa 20 63 f4 st %i5, [ %g1 + 0x3f4 ] ! 20737f4 <rtems_nvdisk_count><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
2023af0: 81 c7 e0 08 ret <== NOT EXECUTED
2023af4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk lock create failed");
2023af8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
{
rtems_nvdisk_error ("disk create phy failed");
return sc;
}
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
2023afc: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk lock create failed");
2023b00: 7f ff fd 99 call 2023164 <rtems_nvdisk_error> <== NOT EXECUTED
2023b04: 90 12 20 70 or %o0, 0x70, %o0 <== NOT EXECUTED
return sc;
2023b08: 81 c7 e0 08 ret <== NOT EXECUTED
2023b0c: 81 e8 00 00 restore <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk create phy failed");
2023b10: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
}
nvd->block_count = blocks;
nvd->device_count = c->device_count;
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
2023b14: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
{
rtems_nvdisk_error ("disk create phy failed");
2023b18: 7f ff fd 93 call 2023164 <rtems_nvdisk_error> <== NOT EXECUTED
2023b1c: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED
return sc;
2023b20: 81 c7 e0 08 ret <== NOT EXECUTED
2023b24: 81 e8 00 00 restore <== NOT EXECUTED
02023278 <rtems_nvdisk_ioctl>:
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
2023278: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
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;
if (minor >= rtems_nvdisk_count)
202327c: 05 00 81 cd sethi %hi(0x2073400), %g2 <== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
2023280: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED
2023284: c4 00 a3 f4 ld [ %g2 + 0x3f4 ], %g2 <== NOT EXECUTED
2023288: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
202328c: 08 80 01 0e bleu 20236c4 <rtems_nvdisk_ioctl+0x44c> <== NOT EXECUTED
2023290: ac 10 00 1a mov %i2, %l6 <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
2023294: 27 00 81 cd sethi %hi(0x2073400), %l3 <== NOT EXECUTED
2023298: c4 04 e3 f0 ld [ %l3 + 0x3f0 ], %g2 ! 20737f0 <rtems_nvdisks><== NOT EXECUTED
202329c: a5 28 60 03 sll %g1, 3, %l2 <== NOT EXECUTED
20232a0: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
20232a4: a4 04 80 01 add %l2, %g1, %l2 <== NOT EXECUTED
20232a8: 82 00 80 12 add %g2, %l2, %g1 <== NOT EXECUTED
20232ac: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED
20232b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20232b4: 02 80 01 04 be 20236c4 <rtems_nvdisk_ioctl+0x44c> <== NOT EXECUTED
20232b8: 01 00 00 00 nop <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
20232bc: 40 00 90 0c call 20472ec <__errno> <== NOT EXECUTED
20232c0: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
20232c4: c2 04 e3 f0 ld [ %l3 + 0x3f0 ], %g1 <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
20232c8: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
20232cc: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
20232d0: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 <== NOT EXECUTED
20232d4: 92 10 20 00 clr %o1 <== NOT EXECUTED
20232d8: 7f ff aa 2f call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
20232dc: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20232e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20232e4: 12 80 00 1b bne 2023350 <rtems_nvdisk_ioctl+0xd8> <== NOT EXECUTED
20232e8: 01 00 00 00 nop <== NOT EXECUTED
errno = EIO;
else
{
errno = 0;
20232ec: 40 00 90 00 call 20472ec <__errno> <== NOT EXECUTED
20232f0: 01 00 00 00 nop <== NOT EXECUTED
switch (req)
20232f4: 03 08 00 10 sethi %hi(0x20004000), %g1 <== NOT EXECUTED
20232f8: 84 10 62 82 or %g1, 0x282, %g2 ! 20004282 <RAM_END+0x1dc04282><== NOT EXECUTED
20232fc: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED
2023300: 02 80 00 51 be 2023444 <rtems_nvdisk_ioctl+0x1cc> <== NOT EXECUTED
2023304: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED
2023308: 05 30 06 10 sethi %hi(0xc0184000), %g2 <== NOT EXECUTED
202330c: 84 10 a2 01 or %g2, 0x201, %g2 ! c0184201 <RAM_END+0xbdd84201><== NOT EXECUTED
2023310: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED
2023314: 02 80 00 50 be 2023454 <rtems_nvdisk_ioctl+0x1dc> <== NOT EXECUTED
2023318: 82 10 62 80 or %g1, 0x280, %g1 <== NOT EXECUTED
202331c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2023320: 02 80 00 17 be 202337c <rtems_nvdisk_ioctl+0x104> <== NOT EXECUTED
2023324: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
break;
default:
rtems_blkdev_ioctl (dd, req, argp);
2023328: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
202332c: 40 00 11 4e call 2027864 <rtems_blkdev_ioctl> <== NOT EXECUTED
2023330: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2023334: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023338: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
break;
}
sc = rtems_semaphore_release (rtems_nvdisks[minor].lock);
202333c: 7f ff aa 60 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2023340: d0 06 e0 20 ld [ %i3 + 0x20 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2023344: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2023348: 02 80 00 06 be 2023360 <rtems_nvdisk_ioctl+0xe8> <== NOT EXECUTED
202334c: 01 00 00 00 nop <== NOT EXECUTED
errno = EIO;
2023350: 40 00 8f e7 call 20472ec <__errno> <== NOT EXECUTED
2023354: 01 00 00 00 nop <== NOT EXECUTED
2023358: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5> <== NOT EXECUTED
202335c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
2023360: 40 00 8f e3 call 20472ec <__errno> <== NOT EXECUTED
2023364: 01 00 00 00 nop <== NOT EXECUTED
2023368: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
202336c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
2023370: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED
}
2023374: 81 c7 e0 08 ret <== NOT EXECUTED
2023378: 81 e8 00 00 restore <== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
202337c: 40 00 8f dc call 20472ec <__errno> <== NOT EXECUTED
2023380: 01 00 00 00 nop <== NOT EXECUTED
2023384: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023388: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
202338c: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
2023390: c8 06 e0 18 ld [ %i3 + 0x18 ], %g4 <== NOT EXECUTED
2023394: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
2023398: 02 80 00 29 be 202343c <rtems_nvdisk_ioctl+0x1c4> <== NOT EXECUTED
202339c: 90 10 20 00 clr %o0 <== NOT EXECUTED
20233a0: b2 10 20 00 clr %i1 <== NOT EXECUTED
20233a4: b0 10 20 00 clr %i0 <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
20233a8: b4 10 3f ff mov -1, %i2 <== NOT EXECUTED
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
20233ac: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 <== NOT EXECUTED
20233b0: b8 00 40 19 add %g1, %i1, %i4 <== NOT EXECUTED
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
20233b4: c6 07 20 08 ld [ %i4 + 8 ], %g3 <== NOT EXECUTED
20233b8: c4 07 20 04 ld [ %i4 + 4 ], %g2 <== NOT EXECUTED
20233bc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
20233c0: 02 80 00 af be 202367c <rtems_nvdisk_ioctl+0x404> <== NOT EXECUTED
20233c4: ba 10 20 00 clr %i5 <== NOT EXECUTED
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
20233c8: 10 80 00 0a b 20233f0 <rtems_nvdisk_ioctl+0x178> <== NOT EXECUTED
20233cc: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
20233d0: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED
20233d4: ba 07 60 01 inc %i5 <== NOT EXECUTED
20233d8: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
20233dc: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
20233e0: 3a 80 00 a7 bcc,a 202367c <rtems_nvdisk_ioctl+0x404> <== NOT EXECUTED
20233e4: c8 06 e0 18 ld [ %i3 + 0x18 ], %g4 <== NOT EXECUTED
20233e8: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 <== NOT EXECUTED
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
20233ec: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20233f0: 97 2f 60 01 sll %i5, 1, %o3 <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
20233f4: 87 2a 20 02 sll %o0, 2, %g3 <== NOT EXECUTED
20233f8: 85 2a 20 04 sll %o0, 4, %g2 <== NOT EXECUTED
20233fc: 84 00 c0 02 add %g3, %g2, %g2 <== NOT EXECUTED
2023400: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
2023404: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
2023408: 98 07 bf fe add %fp, -2, %o4 <== NOT EXECUTED
202340c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED
2023410: d2 00 80 00 ld [ %g2 ], %o1 <== NOT EXECUTED
2023414: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2023418: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
202341c: f4 37 bf fe sth %i2, [ %fp + -2 ] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
2023420: 9f c0 40 00 call %g1 <== NOT EXECUTED
2023424: 9a 10 20 02 mov 2, %o5 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
uint32_t page;
for (page = 0; page < (dc->pages - dc->pages_desc); page++)
{
int ret = rtems_nvdisk_write_checksum (nvd, dc->device, page, 0xffff);
if (ret)
2023428: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202342c: 22 bf ff e9 be,a 20233d0 <rtems_nvdisk_ioctl+0x158> <== NOT EXECUTED
2023430: c4 07 20 04 ld [ %i4 + 4 ], %g2 <== NOT EXECUTED
2023434: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023438: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
break;
202343c: 10 bf ff c0 b 202333c <rtems_nvdisk_ioctl+0xc4> <== NOT EXECUTED
2023440: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
2023444: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023448: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
break;
202344c: 10 bf ff bc b 202333c <rtems_nvdisk_ioctl+0xc4> <== NOT EXECUTED
2023450: f4 26 e0 24 st %i2, [ %i3 + 0x24 ] <== NOT EXECUTED
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
2023454: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
2023458: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
202345c: 12 80 00 91 bne 20236a0 <rtems_nvdisk_ioctl+0x428> <== NOT EXECUTED
2023460: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
2023464: 40 00 8f a2 call 20472ec <__errno> <== NOT EXECUTED
2023468: 23 00 00 3f sethi %hi(0xfc00), %l1 <== NOT EXECUTED
202346c: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023470: fa 06 a0 10 ld [ %i2 + 0x10 ], %i5 <== NOT EXECUTED
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
2023474: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
2023478: d0 27 bf f0 st %o0, [ %fp + -16 ] <== NOT EXECUTED
202347c: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
2023480: a0 06 a0 28 add %i2, 0x28, %l0 <== NOT EXECUTED
2023484: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
return ret;
if (crc == 0xffff)
2023488: a2 14 63 ff or %l1, 0x3ff, %l1 <== NOT EXECUTED
rtems_nvdisk_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++)
202348c: 2f 00 81 cd sethi %hi(0x2073400), %l7 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "read: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
2023490: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED
2023494: 82 00 bf ff add %g2, -1, %g1 <== NOT EXECUTED
2023498: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
202349c: 1a 80 00 ff bcc 2023898 <rtems_nvdisk_ioctl+0x620> <== NOT EXECUTED
20234a0: a8 10 20 00 clr %l4 <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
20234a4: d0 04 3f f4 ld [ %l0 + -12 ], %o0 <== NOT EXECUTED
20234a8: 40 00 f5 7d call 2060a9c <.udiv> <== NOT EXECUTED
20234ac: d2 06 e0 0c ld [ %i3 + 0xc ], %o1 <== NOT EXECUTED
data = sg->buffer;
20234b0: f4 04 3f f8 ld [ %l0 + -8 ], %i2 <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
20234b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20234b8: 02 80 00 6c be 2023668 <rtems_nvdisk_ioctl+0x3f0> <== NOT EXECUTED
20234bc: aa 10 00 08 mov %o0, %l5 <== NOT EXECUTED
20234c0: b2 10 20 00 clr %i1 <== NOT EXECUTED
{
ret = rtems_nvdisk_read_block (nvd, sg->block + b, data);
20234c4: f8 04 3f f0 ld [ %l0 + -16 ], %i4 <== NOT EXECUTED
uint32_t page;
uint16_t crc;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
20234c8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_read_block (nvd, sg->block + b, data);
20234cc: b8 06 40 1c add %i1, %i4, %i4 <== NOT EXECUTED
uint32_t page;
uint16_t crc;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
20234d0: 7f ff ff 44 call 20231e0 <rtems_nvdisk_get_device> <== NOT EXECUTED
20234d4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
if (!dc)
20234d8: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20234dc: 02 80 00 58 be 202363c <rtems_nvdisk_ioctl+0x3c4> <== NOT EXECUTED
20234e0: 98 07 bf fe add %fp, -2, %o4 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " read-block:%d=>%02d-%03d, cs:%04x",
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
20234e4: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
20234e8: c4 06 e0 14 ld [ %i3 + 0x14 ], %g2 <== NOT EXECUTED
20234ec: 87 2a 20 02 sll %o0, 2, %g3 <== NOT EXECUTED
20234f0: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
20234f4: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED
20234f8: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
20234fc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
2023500: f0 07 60 0c ld [ %i5 + 0xc ], %i0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
2023504: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED
2023508: d2 00 80 00 ld [ %g2 ], %o1 <== NOT EXECUTED
202350c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2023510: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
2023514: b0 27 00 18 sub %i4, %i0, %i0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
2023518: 97 2e 20 01 sll %i0, 1, %o3 <== NOT EXECUTED
202351c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2023520: 9a 10 20 02 mov 2, %o5 <== NOT EXECUTED
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
2023524: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED
2023528: 12 80 00 3b bne 2023614 <rtems_nvdisk_ioctl+0x39c> <== NOT EXECUTED
202352c: c2 17 bf fe lduh [ %fp + -2 ], %g1 <== NOT EXECUTED
return ret;
if (crc == 0xffff)
2023530: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED
2023534: 22 80 00 44 be,a 2023644 <rtems_nvdisk_ioctl+0x3cc> <== NOT EXECUTED
2023538: d4 06 e0 0c ld [ %i3 + 0xc ], %o2 <== NOT EXECUTED
#endif
memset (buffer, 0, nvd->block_size);
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
202353c: c4 07 40 00 ld [ %i5 ], %g2 <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
2023540: c6 06 e0 14 ld [ %i3 + 0x14 ], %g3 <== NOT EXECUTED
2023544: 89 28 a0 02 sll %g2, 2, %g4 <== NOT EXECUTED
2023548: 83 28 a0 04 sll %g2, 4, %g1 <== NOT EXECUTED
202354c: 82 01 00 01 add %g4, %g1, %g1 <== NOT EXECUTED
2023550: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED
2023554: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 <== NOT EXECUTED
uint32_t device,
uint32_t page,
void* buffer)
{
return rtems_nvdisk_device_read (nvd, device,
page * nvd->block_size, buffer,
2023558: e8 06 e0 0c ld [ %i3 + 0xc ], %l4 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
202355c: c2 01 20 0c ld [ %g4 + 0xc ], %g1 <== NOT EXECUTED
#endif
memset (buffer, 0, nvd->block_size);
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
2023560: d0 07 60 08 ld [ %i5 + 8 ], %o0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
2023564: c6 01 00 00 ld [ %g4 ], %g3 <== NOT EXECUTED
2023568: fa 01 20 04 ld [ %g4 + 4 ], %i5 <== NOT EXECUTED
rtems_nvdisk_read_page (const rtems_nvdisk* nvd,
uint32_t device,
uint32_t page,
void* buffer)
{
return rtems_nvdisk_device_read (nvd, device,
202356c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
2023570: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
2023574: c4 3f bf e0 std %g2, [ %fp + -32 ] <== NOT EXECUTED
2023578: 7f ff 7e 5a call 2002ee0 <.umul> <== NOT EXECUTED
202357c: 90 06 00 08 add %i0, %o0, %o0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
2023580: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2023584: c4 1f bf e0 ldd [ %fp + -32 ], %g2 <== NOT EXECUTED
2023588: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_nvdisk_read_page (const rtems_nvdisk* nvd,
uint32_t device,
uint32_t page,
void* buffer)
{
return rtems_nvdisk_device_read (nvd, device,
202358c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-read: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->read (device, dd->flags, dd->base, offset, buffer, size);
2023590: 9a 10 00 14 mov %l4, %o5 <== NOT EXECUTED
2023594: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED
2023598: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED
202359c: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
20235a0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20235a4: 98 10 00 1a mov %i2, %o4 <== NOT EXECUTED
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
20235a8: a8 92 20 00 orcc %o0, 0, %l4 <== NOT EXECUTED
20235ac: 12 80 00 1b bne 2023618 <rtems_nvdisk_ioctl+0x3a0> <== NOT EXECUTED
20235b0: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
20235b4: c6 06 e0 0c ld [ %i3 + 0xc ], %g3 <== NOT EXECUTED
rtems_nvdisk_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++)
20235b8: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
20235bc: 02 80 00 0c be 20235ec <rtems_nvdisk_ioctl+0x374> <== NOT EXECUTED
20235c0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
20235c4: c8 05 e3 ec ld [ %l7 + 0x3ec ], %g4 <== NOT EXECUTED
20235c8: 82 10 20 00 clr %g1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20235cc: c4 0e 80 01 ldub [ %i2 + %g1 ], %g2 <== NOT EXECUTED
20235d0: 94 0a a0 ff and %o2, 0xff, %o2 <== NOT EXECUTED
rtems_nvdisk_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++)
20235d4: 82 00 60 01 inc %g1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20235d8: 94 1a 80 02 xor %o2, %g2, %o2 <== NOT EXECUTED
rtems_nvdisk_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++)
20235dc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
20235e0: 95 2a a0 01 sll %o2, 1, %o2 <== NOT EXECUTED
rtems_nvdisk_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++)
20235e4: 12 bf ff fa bne 20235cc <rtems_nvdisk_ioctl+0x354> <== NOT EXECUTED
20235e8: d4 11 00 0a lduh [ %g4 + %o2 ], %o2 <== NOT EXECUTED
if (ret)
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
if (cs != crc)
20235ec: d6 17 bf fe lduh [ %fp + -2 ], %o3 <== NOT EXECUTED
20235f0: 95 2a a0 10 sll %o2, 0x10, %o2 <== NOT EXECUTED
20235f4: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED
20235f8: 80 a2 80 0b cmp %o2, %o3 <== NOT EXECUTED
20235fc: 02 80 00 16 be 2023654 <rtems_nvdisk_ioctl+0x3dc> <== NOT EXECUTED
2023600: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
2023604: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2023608: 90 12 20 20 or %o0, 0x20, %o0 <== NOT EXECUTED
202360c: 7f ff fe d6 call 2023164 <rtems_nvdisk_error> <== NOT EXECUTED
2023610: a8 10 20 05 mov 5, %l4 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2023614: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
2023618: c2 05 a0 04 ld [ %l6 + 4 ], %g1 <== NOT EXECUTED
202361c: d0 05 a0 08 ld [ %l6 + 8 ], %o0 <== NOT EXECUTED
2023620: 9f c0 40 00 call %g1 <== NOT EXECUTED
2023624: d2 25 a0 0c st %o1, [ %l6 + 0xc ] <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
2023628: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
202362c: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023630: e8 20 40 00 st %l4, [ %g1 ] <== NOT EXECUTED
break;
2023634: 10 bf ff 42 b 202333c <rtems_nvdisk_ioctl+0xc4> <== NOT EXECUTED
2023638: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
if (!dc)
return EIO;
202363c: 10 bf ff f6 b 2023614 <rtems_nvdisk_ioctl+0x39c> <== NOT EXECUTED
2023640: a8 10 20 05 mov 5, %l4 <== NOT EXECUTED
if (crc == 0xffff)
{
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_warning (nvd, "read-block: crc not set: %d", block);
#endif
memset (buffer, 0, nvd->block_size);
2023644: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2023648: 40 00 9c f6 call 204aa20 <memset> <== NOT EXECUTED
202364c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2023650: c6 06 e0 0c ld [ %i3 + 0xc ], %g3 <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
2023654: b2 06 60 01 inc %i1 <== NOT EXECUTED
2023658: 80 a6 40 15 cmp %i1, %l5 <== NOT EXECUTED
202365c: 12 bf ff 9a bne 20234c4 <rtems_nvdisk_ioctl+0x24c> <== NOT EXECUTED
2023660: b4 06 80 03 add %i2, %g3, %i2 <== NOT EXECUTED
2023664: fa 05 a0 10 ld [ %l6 + 0x10 ], %i5 <== NOT EXECUTED
2023668: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
202366c: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED
2023670: 82 00 60 01 inc %g1 <== NOT EXECUTED
2023674: 10 bf ff 87 b 2023490 <rtems_nvdisk_ioctl+0x218> <== NOT EXECUTED
2023678: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
202367c: b0 06 20 01 inc %i0 <== NOT EXECUTED
2023680: 80 a6 00 04 cmp %i0, %g4 <== NOT EXECUTED
2023684: 0a bf ff 4a bcs 20233ac <rtems_nvdisk_ioctl+0x134> <== NOT EXECUTED
2023688: b2 06 60 14 add %i1, 0x14, %i1 <== NOT EXECUTED
202368c: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
if (ret)
return ret;
}
}
return 0;
2023690: 90 10 20 00 clr %o0 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
2023694: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
2023698: 10 bf ff 29 b 202333c <rtems_nvdisk_ioctl+0xc4> <== NOT EXECUTED
202369c: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
20236a0: 02 80 00 0f be 20236dc <rtems_nvdisk_ioctl+0x464> <== NOT EXECUTED
20236a4: 01 00 00 00 nop <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
break;
default:
errno = EINVAL;
20236a8: 40 00 8f 11 call 20472ec <__errno> <== NOT EXECUTED
20236ac: 01 00 00 00 nop <== NOT EXECUTED
20236b0: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
20236b4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20236b8: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
break;
20236bc: 10 bf ff 20 b 202333c <rtems_nvdisk_ioctl+0xc4> <== NOT EXECUTED
20236c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
{
errno = ENODEV;
20236c4: 40 00 8f 0a call 20472ec <__errno> <== NOT EXECUTED
20236c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20236cc: 82 10 20 13 mov 0x13, %g1 <== NOT EXECUTED
20236d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
20236d4: 81 c7 e0 08 ret <== NOT EXECUTED
20236d8: 81 e8 00 00 restore <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
20236dc: 40 00 8f 04 call 20472ec <__errno> <== NOT EXECUTED
20236e0: a0 06 a0 28 add %i2, 0x28, %l0 <== NOT EXECUTED
20236e4: f2 04 e3 f0 ld [ %l3 + 0x3f0 ], %i1 <== NOT EXECUTED
20236e8: fa 06 a0 10 ld [ %i2 + 0x10 ], %i5 <== NOT EXECUTED
20236ec: d0 27 bf f4 st %o0, [ %fp + -12 ] <== NOT EXECUTED
20236f0: b2 06 40 12 add %i1, %l2, %i1 <== NOT EXECUTED
* @param req IOCTL request code.
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_nvdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
20236f4: ae 10 20 01 mov 1, %l7 <== NOT EXECUTED
rtems_nvdisk_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++)
20236f8: 29 00 81 cd sethi %hi(0x2073400), %l4 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "write: blocks=%d", req->bufnum);
#endif
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
20236fc: 82 05 ff ff add %l7, -1, %g1 <== NOT EXECUTED
2023700: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
2023704: 1a 80 00 41 bcc 2023808 <rtems_nvdisk_ioctl+0x590> <== NOT EXECUTED
2023708: 92 10 20 00 clr %o1 <== NOT EXECUTED
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
202370c: d0 04 3f f4 ld [ %l0 + -12 ], %o0 <== NOT EXECUTED
2023710: 40 00 f4 e3 call 2060a9c <.udiv> <== NOT EXECUTED
2023714: d2 06 60 0c ld [ %i1 + 0xc ], %o1 <== NOT EXECUTED
data = sg->buffer;
2023718: f8 04 3f f8 ld [ %l0 + -8 ], %i4 <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
202371c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2023720: 02 80 00 5b be 202388c <rtems_nvdisk_ioctl+0x614> <== NOT EXECUTED
2023724: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
2023728: b4 10 20 00 clr %i2 <== NOT EXECUTED
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
202372c: f0 04 3f f0 ld [ %l0 + -16 ], %i0 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc;
uint32_t page;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
2023730: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
2023734: b0 06 80 18 add %i2, %i0, %i0 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc;
uint32_t page;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
2023738: 7f ff fe aa call 20231e0 <rtems_nvdisk_get_device> <== NOT EXECUTED
202373c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (!dc)
2023740: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2023744: 22 80 00 31 be,a 2023808 <rtems_nvdisk_ioctl+0x590> <== NOT EXECUTED
2023748: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
202374c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1 <== NOT EXECUTED
if (!dc)
return EIO;
page = rtems_nvdisk_get_page (dc, block);
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
2023750: ea 06 60 0c ld [ %i1 + 0xc ], %l5 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
2023754: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED
rtems_nvdisk_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++)
2023758: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
202375c: 02 80 00 0c be 202378c <rtems_nvdisk_ioctl+0x514> <== NOT EXECUTED
2023760: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
2023764: c6 05 23 ec ld [ %l4 + 0x3ec ], %g3 <== NOT EXECUTED
2023768: 82 10 20 00 clr %g1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
202376c: c4 0f 00 01 ldub [ %i4 + %g1 ], %g2 <== NOT EXECUTED
2023770: ba 0f 60 ff and %i5, 0xff, %i5 <== NOT EXECUTED
rtems_nvdisk_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++)
2023774: 82 00 60 01 inc %g1 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
2023778: ba 1f 40 02 xor %i5, %g2, %i5 <== NOT EXECUTED
rtems_nvdisk_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++)
202377c: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
2023780: bb 2f 60 01 sll %i5, 1, %i5 <== NOT EXECUTED
rtems_nvdisk_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++)
2023784: 12 bf ff fa bne 202376c <rtems_nvdisk_ioctl+0x4f4> <== NOT EXECUTED
2023788: fa 10 c0 1d lduh [ %g3 + %i5 ], %i5 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
202378c: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
2023790: c6 06 60 14 ld [ %i1 + 0x14 ], %g3 <== NOT EXECUTED
2023794: 89 28 a0 02 sll %g2, 2, %g4 <== NOT EXECUTED
2023798: 83 28 a0 04 sll %g2, 4, %g1 <== NOT EXECUTED
202379c: 82 01 00 01 add %g4, %g1, %g1 <== NOT EXECUTED
20237a0: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED
20237a4: c8 00 60 10 ld [ %g1 + 0x10 ], %g4 <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
20237a8: d0 06 e0 08 ld [ %i3 + 8 ], %o0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20237ac: c2 01 20 0c ld [ %g4 + 0xc ], %g1 <== NOT EXECUTED
20237b0: c6 01 00 00 ld [ %g4 ], %g3 <== NOT EXECUTED
20237b4: d4 01 20 04 ld [ %g4 + 4 ], %o2 <== NOT EXECUTED
rtems_nvdisk_write_page (const rtems_nvdisk* nvd,
uint32_t device,
uint32_t page,
const void* buffer)
{
return rtems_nvdisk_device_write (nvd, device,
20237b8: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
20237bc: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
20237c0: c4 3f bf e0 std %g2, [ %fp + -32 ] <== NOT EXECUTED
20237c4: d4 27 bf dc st %o2, [ %fp + -36 ] <== NOT EXECUTED
20237c8: 7f ff 7d c6 call 2002ee0 <.umul> <== NOT EXECUTED
20237cc: 90 06 00 08 add %i0, %o0, %o0 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20237d0: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
20237d4: c4 1f bf e0 ldd [ %fp + -32 ], %g2 <== NOT EXECUTED
20237d8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
20237dc: d4 07 bf dc ld [ %fp + -36 ], %o2 <== NOT EXECUTED
rtems_nvdisk_write_page (const rtems_nvdisk* nvd,
uint32_t device,
uint32_t page,
const void* buffer)
{
return rtems_nvdisk_device_write (nvd, device,
20237e0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
20237e4: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED
20237e8: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED
20237ec: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED
20237f0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20237f4: 9a 10 00 15 mov %l5, %o5 <== NOT EXECUTED
rtems_nvdisk_info (nvd, " write-block:%d=>%02d-%03d", block, dc->device, page);
#endif
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
20237f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20237fc: 22 80 00 0c be,a 202382c <rtems_nvdisk_ioctl+0x5b4> <== NOT EXECUTED
2023800: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2023804: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
2023808: c2 05 a0 04 ld [ %l6 + 4 ], %g1 <== NOT EXECUTED
202380c: d0 05 a0 08 ld [ %l6 + 8 ], %o0 <== NOT EXECUTED
2023810: 9f c0 40 00 call %g1 <== NOT EXECUTED
2023814: d2 25 a0 0c st %o1, [ %l6 + 0xc ] <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
2023818: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED
202381c: f6 04 e3 f0 ld [ %l3 + 0x3f0 ], %i3 <== NOT EXECUTED
2023820: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED
break;
2023824: 10 bf fe c6 b 202333c <rtems_nvdisk_ioctl+0xc4> <== NOT EXECUTED
2023828: b6 06 c0 12 add %i3, %l2, %i3 <== NOT EXECUTED
* Get the descriptor for a device.
*/
static const rtems_nvdisk_device_desc*
rtems_nvdisk_device_descriptor (const rtems_nvdisk* nvd, uint32_t device)
{
return nvd->devices[device].descriptor;
202382c: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 <== NOT EXECUTED
2023830: 87 2a 20 02 sll %o0, 2, %g3 <== NOT EXECUTED
2023834: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
2023838: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED
202383c: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
2023840: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
2023844: 97 2e 20 01 sll %i0, 1, %o3 <== NOT EXECUTED
2023848: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED
202384c: d2 00 80 00 ld [ %g2 ], %o1 <== NOT EXECUTED
2023850: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2023854: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED
ret = rtems_nvdisk_write_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
return ret;
return rtems_nvdisk_write_checksum (nvd, dc->device, page, cs);
2023858: fa 37 bf fe sth %i5, [ %fp + -2 ] <== NOT EXECUTED
ops = nvd->devices[device].descriptor->nv_ops;
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_printf (nvd, " dev-write: %02d-%08x: s=%d",
device, offset, size);
#endif
return ops->write (device, dd->flags, dd->base, offset, buffer, size);
202385c: 98 07 bf fe add %fp, -2, %o4 <== NOT EXECUTED
2023860: 9f c0 40 00 call %g1 <== NOT EXECUTED
2023864: 9a 10 20 02 mov 2, %o5 <== NOT EXECUTED
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
if (ret)
2023868: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202386c: 12 bf ff e7 bne 2023808 <rtems_nvdisk_ioctl+0x590> <== NOT EXECUTED
2023870: 92 10 20 1b mov 0x1b, %o1 <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
2023874: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
2023878: b4 06 a0 01 inc %i2 <== NOT EXECUTED
202387c: 80 a6 80 11 cmp %i2, %l1 <== NOT EXECUTED
2023880: 12 bf ff ab bne 202372c <rtems_nvdisk_ioctl+0x4b4> <== NOT EXECUTED
2023884: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED
2023888: fa 05 a0 10 ld [ %l6 + 0x10 ], %i5 <== NOT EXECUTED
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
202388c: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED
2023890: 10 bf ff 9b b 20236fc <rtems_nvdisk_ioctl+0x484> <== NOT EXECUTED
2023894: ae 05 e0 01 inc %l7 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
2023898: 10 bf ff 60 b 2023618 <rtems_nvdisk_ioctl+0x3a0> <== NOT EXECUTED
202389c: 92 10 20 00 clr %o1 <== NOT EXECUTED
02023b70 <rtems_nvdisk_sram_read>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
void* buffer,
size_t size)
{
2023b70: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
memcpy (buffer, (base + offset), size);
return 0;
}
2023b74: b0 10 20 00 clr %i0 <== NOT EXECUTED
void* base,
uint32_t offset,
void* buffer,
size_t size)
{
memcpy (buffer, (base + offset), size);
2023b78: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2023b7c: 92 06 80 1b add %i2, %i3, %o1 <== NOT EXECUTED
2023b80: 40 00 9b 1c call 204a7f0 <memcpy> <== NOT EXECUTED
2023b84: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
return 0;
}
2023b88: 81 c7 e0 08 ret <== NOT EXECUTED
2023b8c: 81 e8 00 00 restore <== NOT EXECUTED
02023b28 <rtems_nvdisk_sram_verify>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
2023b28: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
return memcmp ((base + offset), buffer, size) == 0 ? 0 : EIO;
2023b2c: 90 06 80 1b add %i2, %i3, %o0 <== NOT EXECUTED
2023b30: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2023b34: 40 00 9b 01 call 204a738 <memcmp> <== NOT EXECUTED
2023b38: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2023b3c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
2023b40: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED
}
2023b44: b0 0e 20 05 and %i0, 5, %i0 <== NOT EXECUTED
2023b48: 81 c7 e0 08 ret <== NOT EXECUTED
2023b4c: 81 e8 00 00 restore <== NOT EXECUTED
02023b50 <rtems_nvdisk_sram_write>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
2023b50: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
memcpy ((base + offset), buffer, size);
return 0;
}
2023b54: b0 10 20 00 clr %i0 <== NOT EXECUTED
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
memcpy ((base + offset), buffer, size);
2023b58: 90 06 80 1b add %i2, %i3, %o0 <== NOT EXECUTED
2023b5c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2023b60: 40 00 9b 24 call 204a7f0 <memcpy> <== NOT EXECUTED
2023b64: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
return 0;
}
2023b68: 81 c7 e0 08 ret <== NOT EXECUTED
2023b6c: 81 e8 00 00 restore <== NOT EXECUTED
02009590 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
2009590: 9d e3 bf a0 save %sp, -96, %sp
2009594: 90 10 00 18 mov %i0, %o0
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
2009598: 80 a6 a0 00 cmp %i2, 0
200959c: 02 80 00 21 be 2009620 <rtems_object_get_class_information+0x90>
20095a0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
20095a4: 93 2e 60 10 sll %i1, 0x10, %o1
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
20095a8: b0 10 20 0a mov 0xa, %i0
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
20095ac: 40 00 07 74 call 200b37c <_Objects_Get_information>
20095b0: 93 32 60 10 srl %o1, 0x10, %o1
if ( !obj_info )
20095b4: 80 a2 20 00 cmp %o0, 0
20095b8: 02 80 00 1a be 2009620 <rtems_object_get_class_information+0x90>
20095bc: 01 00 00 00 nop
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
20095c0: c4 02 20 0c ld [ %o0 + 0xc ], %g2
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
20095c4: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
20095c8: c6 02 20 08 ld [ %o0 + 8 ], %g3
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
20095cc: c2 0a 20 12 ldub [ %o0 + 0x12 ], %g1
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
20095d0: c4 26 a0 04 st %g2, [ %i2 + 4 ]
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
20095d4: c6 26 80 00 st %g3, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
20095d8: c2 2e a0 0c stb %g1, [ %i2 + 0xc ]
info->maximum = obj_info->maximum;
20095dc: c8 26 a0 08 st %g4, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
20095e0: 80 a1 20 00 cmp %g4, 0
20095e4: 02 80 00 0d be 2009618 <rtems_object_get_class_information+0x88><== NEVER TAKEN
20095e8: 84 10 20 00 clr %g2
20095ec: de 02 20 1c ld [ %o0 + 0x1c ], %o7
20095f0: 86 10 20 01 mov 1, %g3
20095f4: 82 10 20 01 mov 1, %g1
if ( !obj_info->local_table[i] )
20095f8: 87 28 e0 02 sll %g3, 2, %g3
20095fc: c6 03 c0 03 ld [ %o7 + %g3 ], %g3
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2009600: 82 00 60 01 inc %g1
if ( !obj_info->local_table[i] )
unallocated++;
2009604: 80 a0 00 03 cmp %g0, %g3
2009608: 84 60 bf ff subx %g2, -1, %g2
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
200960c: 80 a1 00 01 cmp %g4, %g1
2009610: 1a bf ff fa bcc 20095f8 <rtems_object_get_class_information+0x68>
2009614: 86 10 00 01 mov %g1, %g3
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
2009618: c4 26 a0 10 st %g2, [ %i2 + 0x10 ]
return RTEMS_SUCCESSFUL;
200961c: b0 10 20 00 clr %i0
}
2009620: 81 c7 e0 08 ret
2009624: 81 e8 00 00 restore
020152ec <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
20152ec: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
20152f0: 80 a6 20 00 cmp %i0, 0
20152f4: 12 80 00 04 bne 2015304 <rtems_partition_create+0x18>
20152f8: 82 10 20 03 mov 3, %g1
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
20152fc: 81 c7 e0 08 ret
2015300: 91 e8 00 01 restore %g0, %g1, %o0
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
2015304: 80 a6 60 00 cmp %i1, 0
2015308: 02 bf ff fd be 20152fc <rtems_partition_create+0x10>
201530c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
2015310: 80 a7 60 00 cmp %i5, 0
2015314: 02 bf ff fa be 20152fc <rtems_partition_create+0x10> <== NEVER TAKEN
2015318: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
201531c: 02 bf ff f8 be 20152fc <rtems_partition_create+0x10>
2015320: 82 10 20 08 mov 8, %g1
2015324: 80 a6 a0 00 cmp %i2, 0
2015328: 02 bf ff f5 be 20152fc <rtems_partition_create+0x10>
201532c: 80 a6 80 1b cmp %i2, %i3
2015330: 0a bf ff f3 bcs 20152fc <rtems_partition_create+0x10>
2015334: 80 8e e0 07 btst 7, %i3
2015338: 12 bf ff f1 bne 20152fc <rtems_partition_create+0x10>
201533c: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
2015340: 12 bf ff ef bne 20152fc <rtems_partition_create+0x10>
2015344: 82 10 20 09 mov 9, %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2015348: 03 00 80 ec sethi %hi(0x203b000), %g1
201534c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 203b240 <_Thread_Dispatch_disable_level>
2015350: 84 00 a0 01 inc %g2
2015354: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
return _Thread_Dispatch_disable_level;
2015358: c2 00 62 40 ld [ %g1 + 0x240 ], %g1
* 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 );
201535c: 23 00 80 ec sethi %hi(0x203b000), %l1
2015360: 40 00 13 b4 call 201a230 <_Objects_Allocate>
2015364: 90 14 60 54 or %l1, 0x54, %o0 ! 203b054 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
2015368: a0 92 20 00 orcc %o0, 0, %l0
201536c: 02 80 00 1a be 20153d4 <rtems_partition_create+0xe8>
2015370: 92 10 00 1b mov %i3, %o1
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
2015374: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
2015378: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
201537c: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
2015380: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2015384: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
2015388: 40 00 56 b6 call 202ae60 <.udiv>
201538c: 90 10 00 1a mov %i2, %o0
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,
2015390: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
2015394: 94 10 00 08 mov %o0, %o2
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,
2015398: 96 10 00 1b mov %i3, %o3
201539c: b8 04 20 24 add %l0, 0x24, %i4
20153a0: 40 00 0d 59 call 2018904 <_Chain_Initialize>
20153a4: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
20153a8: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20153ac: a2 14 60 54 or %l1, 0x54, %l1
20153b0: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
20153b4: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20153b8: 85 28 a0 02 sll %g2, 2, %g2
20153bc: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20153c0: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
20153c4: 40 00 18 fa call 201b7ac <_Thread_Enable_dispatch>
20153c8: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
20153cc: 10 bf ff cc b 20152fc <rtems_partition_create+0x10>
20153d0: 82 10 20 00 clr %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
20153d4: 40 00 18 f6 call 201b7ac <_Thread_Enable_dispatch>
20153d8: 01 00 00 00 nop
return RTEMS_TOO_MANY;
20153dc: 10 bf ff c8 b 20152fc <rtems_partition_create+0x10>
20153e0: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5>
02043c60 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2043c60: 9d e3 bf 98 save %sp, -104, %sp
2043c64: 11 00 81 d1 sethi %hi(0x2074400), %o0
2043c68: 92 10 00 18 mov %i0, %o1
2043c6c: 90 12 20 70 or %o0, 0x70, %o0
2043c70: 7f ff 2f 9f call 200faec <_Objects_Get>
2043c74: 94 07 bf fc add %fp, -4, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
2043c78: c2 07 bf fc ld [ %fp + -4 ], %g1
2043c7c: 80 a0 60 00 cmp %g1, 0
2043c80: 12 80 00 0d bne 2043cb4 <rtems_rate_monotonic_period+0x54>
2043c84: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2043c88: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
2043c8c: 39 00 81 d0 sethi %hi(0x2074000), %i4
2043c90: b8 17 21 a0 or %i4, 0x1a0, %i4 ! 20741a0 <_Per_CPU_Information>
2043c94: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2043c98: 80 a0 80 01 cmp %g2, %g1
2043c9c: 02 80 00 08 be 2043cbc <rtems_rate_monotonic_period+0x5c>
2043ca0: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
2043ca4: 7f ff 33 76 call 2010a7c <_Thread_Enable_dispatch>
2043ca8: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
2043cac: 81 c7 e0 08 ret
2043cb0: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2043cb4: 81 c7 e0 08 ret
2043cb8: 91 e8 20 04 restore %g0, 4, %o0
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
2043cbc: 12 80 00 0e bne 2043cf4 <rtems_rate_monotonic_period+0x94>
2043cc0: 01 00 00 00 nop
switch ( the_period->state ) {
2043cc4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2043cc8: 80 a0 60 04 cmp %g1, 4
2043ccc: 18 80 00 06 bgu 2043ce4 <rtems_rate_monotonic_period+0x84><== NEVER TAKEN
2043cd0: b0 10 20 00 clr %i0
2043cd4: 83 28 60 02 sll %g1, 2, %g1
2043cd8: 05 00 81 b7 sethi %hi(0x206dc00), %g2
2043cdc: 84 10 a3 bc or %g2, 0x3bc, %g2 ! 206dfbc <CSWTCH.11>
2043ce0: f0 00 80 01 ld [ %g2 + %g1 ], %i0
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();
2043ce4: 7f ff 33 66 call 2010a7c <_Thread_Enable_dispatch>
2043ce8: 01 00 00 00 nop
return RTEMS_TIMEOUT;
2043cec: 81 c7 e0 08 ret
2043cf0: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
2043cf4: 7f ff 01 25 call 2004188 <sparc_disable_interrupts>
2043cf8: 01 00 00 00 nop
2043cfc: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
2043d00: f6 07 60 38 ld [ %i5 + 0x38 ], %i3
2043d04: 80 a6 e0 00 cmp %i3, 0
2043d08: 02 80 00 19 be 2043d6c <rtems_rate_monotonic_period+0x10c>
2043d0c: 80 a6 e0 02 cmp %i3, 2
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
2043d10: 02 80 00 2e be 2043dc8 <rtems_rate_monotonic_period+0x168>
2043d14: 80 a6 e0 04 cmp %i3, 4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
2043d18: 12 bf ff e5 bne 2043cac <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
2043d1c: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2043d20: 7f ff ff 60 call 2043aa0 <_Rate_monotonic_Update_statistics>
2043d24: 90 10 00 1d mov %i5, %o0
_ISR_Enable( level );
2043d28: 7f ff 01 1c call 2004198 <sparc_enable_interrupts>
2043d2c: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2043d30: 82 10 20 02 mov 2, %g1
2043d34: 92 07 60 10 add %i5, 0x10, %o1
2043d38: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
2043d3c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043d40: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043d44: 11 00 81 d0 sethi %hi(0x2074000), %o0
2043d48: 7f ff 36 c4 call 2011858 <_Watchdog_Insert>
2043d4c: 90 12 20 30 or %o0, 0x30, %o0 ! 2074030 <_Watchdog_Ticks_chain>
2043d50: d0 07 60 40 ld [ %i5 + 0x40 ], %o0
2043d54: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
2043d58: 03 00 81 bf sethi %hi(0x206fc00), %g1
2043d5c: c2 00 60 d4 ld [ %g1 + 0xd4 ], %g1 ! 206fcd4 <_Scheduler+0x34>
2043d60: 9f c0 40 00 call %g1
2043d64: b0 10 20 06 mov 6, %i0
2043d68: 30 bf ff df b,a 2043ce4 <rtems_rate_monotonic_period+0x84>
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
2043d6c: 7f ff 01 0b call 2004198 <sparc_enable_interrupts>
2043d70: 01 00 00 00 nop
the_period->next_length = length;
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2043d74: 90 10 00 1d mov %i5, %o0
2043d78: 7f ff ff 99 call 2043bdc <_Rate_monotonic_Initiate_statistics>
2043d7c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
the_period->state = RATE_MONOTONIC_ACTIVE;
2043d80: 82 10 20 02 mov 2, %g1
2043d84: 92 07 60 10 add %i5, 0x10, %o1
2043d88: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
2043d8c: 11 00 81 d0 sethi %hi(0x2074000), %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2043d90: 03 00 81 0f sethi %hi(0x2043c00), %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043d94: 90 12 20 30 or %o0, 0x30, %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2043d98: 82 10 62 3c or %g1, 0x23c, %g1
the_watchdog->id = id;
2043d9c: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2043da0: c2 27 60 2c st %g1, [ %i5 + 0x2c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2043da4: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2043da8: c0 27 60 34 clr [ %i5 + 0x34 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043dac: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043db0: 7f ff 36 aa call 2011858 <_Watchdog_Insert>
2043db4: b0 10 20 00 clr %i0
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2043db8: 7f ff 33 31 call 2010a7c <_Thread_Enable_dispatch>
2043dbc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2043dc0: 81 c7 e0 08 ret
2043dc4: 81 e8 00 00 restore
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2043dc8: 7f ff ff 36 call 2043aa0 <_Rate_monotonic_Update_statistics>
2043dcc: 90 10 00 1d mov %i5, %o0
/*
* 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;
2043dd0: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
2043dd4: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
/*
* 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;
2043dd8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2043ddc: 7f ff 00 ef call 2004198 <sparc_enable_interrupts>
2043de0: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
2043de4: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2043de8: c4 07 60 08 ld [ %i5 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2043dec: 90 10 00 01 mov %g1, %o0
2043df0: 13 00 00 10 sethi %hi(0x4000), %o1
2043df4: 7f ff 35 78 call 20113d4 <_Thread_Set_state>
2043df8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2043dfc: 7f ff 00 e3 call 2004188 <sparc_disable_interrupts>
2043e00: 01 00 00 00 nop
local_state = the_period->state;
2043e04: f4 07 60 38 ld [ %i5 + 0x38 ], %i2
the_period->state = RATE_MONOTONIC_ACTIVE;
2043e08: f6 27 60 38 st %i3, [ %i5 + 0x38 ]
_ISR_Enable( level );
2043e0c: 7f ff 00 e3 call 2004198 <sparc_enable_interrupts>
2043e10: 01 00 00 00 nop
/*
* 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 )
2043e14: 80 a6 a0 03 cmp %i2, 3
2043e18: 22 80 00 06 be,a 2043e30 <rtems_rate_monotonic_period+0x1d0>
2043e1c: d0 07 20 0c ld [ %i4 + 0xc ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
2043e20: 7f ff 33 17 call 2010a7c <_Thread_Enable_dispatch>
2043e24: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2043e28: 81 c7 e0 08 ret
2043e2c: 81 e8 00 00 restore
/*
* 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 )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2043e30: 7f ff 32 21 call 20106b4 <_Thread_Clear_state>
2043e34: 13 00 00 10 sethi %hi(0x4000), %o1
2043e38: 30 bf ff fa b,a 2043e20 <rtems_rate_monotonic_period+0x1c0>
0202d334 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
202d334: 9d e3 bf 38 save %sp, -200, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
202d338: 80 a6 60 00 cmp %i1, 0
202d33c: 02 80 00 48 be 202d45c <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
202d340: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
202d344: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d348: 9f c6 40 00 call %i1
202d34c: 92 12 60 60 or %o1, 0x60, %o1 ! 2069060 <_TOD_Days_per_month+0x68>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
202d350: 90 10 00 18 mov %i0, %o0
202d354: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d358: 9f c6 40 00 call %i1
202d35c: 92 12 60 80 or %o1, 0x80, %o1 ! 2069080 <_TOD_Days_per_month+0x88>
(*print)( context, "--- Wall times are in seconds ---\n" );
202d360: 90 10 00 18 mov %i0, %o0
202d364: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d368: 9f c6 40 00 call %i1
202d36c: 92 12 60 a8 or %o1, 0xa8, %o1 ! 20690a8 <_TOD_Days_per_month+0xb0>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
202d370: 90 10 00 18 mov %i0, %o0
202d374: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d378: 9f c6 40 00 call %i1
202d37c: 92 12 60 d0 or %o1, 0xd0, %o1 ! 20690d0 <_TOD_Days_per_month+0xd8>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
202d380: 90 10 00 18 mov %i0, %o0
202d384: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d388: 9f c6 40 00 call %i1
202d38c: 92 12 61 20 or %o1, 0x120, %o1 ! 2069120 <_TOD_Days_per_month+0x128>
/*
* 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 ;
202d390: 39 00 81 d1 sethi %hi(0x2074400), %i4
202d394: b8 17 20 70 or %i4, 0x70, %i4 ! 2074470 <_Rate_monotonic_Information>
202d398: fa 07 20 08 ld [ %i4 + 8 ], %i5
202d39c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
202d3a0: 80 a7 40 01 cmp %i5, %g1
202d3a4: 18 80 00 2e bgu 202d45c <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
202d3a8: 35 00 81 a4 sethi %hi(0x2069000), %i2
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,
202d3ac: 23 00 81 a4 sethi %hi(0x2069000), %l1
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,
202d3b0: 21 00 81 a4 sethi %hi(0x2069000), %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
202d3b4: 37 00 81 a9 sethi %hi(0x206a400), %i3
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
202d3b8: b4 16 a1 70 or %i2, 0x170, %i2
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,
202d3bc: a2 14 61 88 or %l1, 0x188, %l1
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,
202d3c0: a0 14 21 a8 or %l0, 0x1a8, %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
202d3c4: 10 80 00 06 b 202d3dc <rtems_rate_monotonic_report_statistics_with_plugin+0xa8>
202d3c8: b6 16 e2 48 or %i3, 0x248, %i3
* 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++ ) {
202d3cc: ba 07 60 01 inc %i5
/*
* 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 ;
202d3d0: 80 a0 40 1d cmp %g1, %i5
202d3d4: 0a 80 00 22 bcs 202d45c <rtems_rate_monotonic_report_statistics_with_plugin+0x128>
202d3d8: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
202d3dc: 90 10 00 1d mov %i5, %o0
202d3e0: 40 00 58 ce call 2043718 <rtems_rate_monotonic_get_statistics>
202d3e4: 92 07 bf a0 add %fp, -96, %o1
if ( status != RTEMS_SUCCESSFUL )
202d3e8: 80 a2 20 00 cmp %o0, 0
202d3ec: 32 bf ff f8 bne,a 202d3cc <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
202d3f0: c2 07 20 0c ld [ %i4 + 0xc ], %g1
#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 );
202d3f4: 92 07 bf d8 add %fp, -40, %o1
202d3f8: 40 00 59 3a call 20438e0 <rtems_rate_monotonic_get_status>
202d3fc: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
202d400: d0 07 bf d8 ld [ %fp + -40 ], %o0
202d404: 92 10 20 05 mov 5, %o1
202d408: 7f ff 81 1c call 200d878 <rtems_object_get_name>
202d40c: 94 07 bf f8 add %fp, -8, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
202d410: d8 1f bf a0 ldd [ %fp + -96 ], %o4
202d414: 92 10 00 1a mov %i2, %o1
202d418: 94 10 00 1d mov %i5, %o2
202d41c: 90 10 00 18 mov %i0, %o0
202d420: 9f c6 40 00 call %i1
202d424: 96 07 bf f8 add %fp, -8, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
202d428: c2 07 bf a0 ld [ %fp + -96 ], %g1
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 );
202d42c: 94 07 bf f0 add %fp, -16, %o2
202d430: 90 07 bf b8 add %fp, -72, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
202d434: 80 a0 60 00 cmp %g1, 0
202d438: 12 80 00 0b bne 202d464 <rtems_rate_monotonic_report_statistics_with_plugin+0x130>
202d43c: 92 10 00 1b mov %i3, %o1
(*print)( context, "\n" );
202d440: 9f c6 40 00 call %i1
202d444: 90 10 00 18 mov %i0, %o0
/*
* 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 ;
202d448: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
202d44c: ba 07 60 01 inc %i5
/*
* 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 ;
202d450: 80 a0 40 1d cmp %g1, %i5
202d454: 1a bf ff e3 bcc 202d3e0 <rtems_rate_monotonic_report_statistics_with_plugin+0xac><== ALWAYS TAKEN
202d458: 90 10 00 1d mov %i5, %o0
202d45c: 81 c7 e0 08 ret
202d460: 81 e8 00 00 restore
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 );
202d464: 40 00 05 36 call 202e93c <_Timespec_Divide_by_integer>
202d468: 92 10 00 01 mov %g1, %o1
(*print)( context,
202d46c: d0 07 bf ac ld [ %fp + -84 ], %o0
202d470: 40 00 cd 8d call 2060aa4 <.div>
202d474: 92 10 23 e8 mov 0x3e8, %o1
202d478: aa 10 00 08 mov %o0, %l5
202d47c: d0 07 bf b4 ld [ %fp + -76 ], %o0
202d480: 40 00 cd 89 call 2060aa4 <.div>
202d484: 92 10 23 e8 mov 0x3e8, %o1
202d488: c2 07 bf f0 ld [ %fp + -16 ], %g1
202d48c: a6 10 00 08 mov %o0, %l3
202d490: d0 07 bf f4 ld [ %fp + -12 ], %o0
202d494: e4 07 bf a8 ld [ %fp + -88 ], %l2
202d498: e8 07 bf b0 ld [ %fp + -80 ], %l4
202d49c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
202d4a0: 40 00 cd 81 call 2060aa4 <.div>
202d4a4: 92 10 23 e8 mov 0x3e8, %o1
202d4a8: 96 10 00 15 mov %l5, %o3
202d4ac: 98 10 00 14 mov %l4, %o4
202d4b0: 9a 10 00 13 mov %l3, %o5
202d4b4: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
202d4b8: 92 10 00 11 mov %l1, %o1
202d4bc: 94 10 00 12 mov %l2, %o2
202d4c0: 9f c6 40 00 call %i1
202d4c4: 90 10 00 18 mov %i0, %o0
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);
202d4c8: d2 07 bf a0 ld [ %fp + -96 ], %o1
202d4cc: 94 07 bf f0 add %fp, -16, %o2
202d4d0: 40 00 05 1b call 202e93c <_Timespec_Divide_by_integer>
202d4d4: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
202d4d8: d0 07 bf c4 ld [ %fp + -60 ], %o0
202d4dc: 40 00 cd 72 call 2060aa4 <.div>
202d4e0: 92 10 23 e8 mov 0x3e8, %o1
202d4e4: a8 10 00 08 mov %o0, %l4
202d4e8: d0 07 bf cc ld [ %fp + -52 ], %o0
202d4ec: 40 00 cd 6e call 2060aa4 <.div>
202d4f0: 92 10 23 e8 mov 0x3e8, %o1
202d4f4: c2 07 bf f0 ld [ %fp + -16 ], %g1
202d4f8: a4 10 00 08 mov %o0, %l2
202d4fc: d0 07 bf f4 ld [ %fp + -12 ], %o0
202d500: ea 07 bf c0 ld [ %fp + -64 ], %l5
202d504: e6 07 bf c8 ld [ %fp + -56 ], %l3
202d508: 92 10 23 e8 mov 0x3e8, %o1
202d50c: 40 00 cd 66 call 2060aa4 <.div>
202d510: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
202d514: 92 10 00 10 mov %l0, %o1
202d518: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
202d51c: 94 10 00 15 mov %l5, %o2
202d520: 90 10 00 18 mov %i0, %o0
202d524: 96 10 00 14 mov %l4, %o3
202d528: 98 10 00 13 mov %l3, %o4
202d52c: 9f c6 40 00 call %i1
202d530: 9a 10 00 12 mov %l2, %o5
/*
* 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 ;
202d534: 10 bf ff a6 b 202d3cc <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
202d538: c2 07 20 0c ld [ %i4 + 0xc ], %g1
0202d554 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
202d554: 9d e3 bf a0 save %sp, -96, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
202d558: 03 00 81 cf sethi %hi(0x2073c00), %g1
202d55c: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2073f70 <_Thread_Dispatch_disable_level>
202d560: 84 00 a0 01 inc %g2
202d564: c4 20 63 70 st %g2, [ %g1 + 0x370 ]
return _Thread_Dispatch_disable_level;
202d568: c2 00 63 70 ld [ %g1 + 0x370 ], %g1
/*
* Cycle through all possible ids and try to reset 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 ;
202d56c: 39 00 81 d1 sethi %hi(0x2074400), %i4
202d570: b8 17 20 70 or %i4, 0x70, %i4 ! 2074470 <_Rate_monotonic_Information>
202d574: fa 07 20 08 ld [ %i4 + 8 ], %i5
202d578: c2 07 20 0c ld [ %i4 + 0xc ], %g1
202d57c: 80 a7 40 01 cmp %i5, %g1
202d580: 18 80 00 09 bgu 202d5a4 <rtems_rate_monotonic_reset_all_statistics+0x50><== NEVER TAKEN
202d584: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
202d588: 40 00 00 09 call 202d5ac <rtems_rate_monotonic_reset_statistics>
202d58c: 90 10 00 1d mov %i5, %o0
/*
* Cycle through all possible ids and try to reset 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 ;
202d590: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
202d594: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to reset 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 ;
202d598: 80 a0 40 1d cmp %g1, %i5
202d59c: 1a bf ff fb bcc 202d588 <rtems_rate_monotonic_reset_all_statistics+0x34>
202d5a0: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
202d5a4: 7f ff 8d 36 call 2010a7c <_Thread_Enable_dispatch>
202d5a8: 81 e8 00 00 restore
02008e48 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
2008e48: 9d e3 bf a0 save %sp, -96, %sp
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
uintptr_t page_alignment = control->page_alignment;
2008e4c: f8 06 20 30 ld [ %i0 + 0x30 ], %i4
#include <stdlib.h>
static uintptr_t align_up(uintptr_t page_alignment, uintptr_t value)
{
uintptr_t excess = value % page_alignment;
2008e50: 90 10 00 19 mov %i1, %o0
2008e54: 40 00 44 03 call 2019e60 <.urem>
2008e58: 92 10 00 1c mov %i4, %o1
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
2008e5c: ba 10 00 18 mov %i0, %i5
static uintptr_t align_up(uintptr_t page_alignment, uintptr_t value)
{
uintptr_t excess = value % page_alignment;
if (excess > 0) {
2008e60: b4 10 00 19 mov %i1, %i2
2008e64: 80 a2 20 00 cmp %o0, 0
2008e68: 02 80 00 06 be 2008e80 <rtems_rbheap_allocate+0x38> <== ALWAYS TAKEN
2008e6c: 82 10 20 01 mov 1, %g1
value += page_alignment - excess;
2008e70: b8 06 40 1c add %i1, %i4, %i4 <== NOT EXECUTED
2008e74: b4 27 00 08 sub %i4, %o0, %i2 <== NOT EXECUTED
2008e78: 80 a6 80 19 cmp %i2, %i1 <== NOT EXECUTED
2008e7c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
uintptr_t page_alignment = control->page_alignment;
uintptr_t aligned_size = align_up(page_alignment, size);
if (size > 0 && size <= aligned_size) {
2008e80: 80 88 60 ff btst 0xff, %g1
2008e84: 02 80 00 1f be 2008f00 <rtems_rbheap_allocate+0xb8> <== NEVER TAKEN
2008e88: 80 a6 60 00 cmp %i1, 0
2008e8c: 02 80 00 1d be 2008f00 <rtems_rbheap_allocate+0xb8>
2008e90: 82 07 60 04 add %i5, 4, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2008e94: f8 07 40 00 ld [ %i5 ], %i4
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_page *big_enough = NULL;
while (current != tail && big_enough == NULL) {
2008e98: 80 a7 00 01 cmp %i4, %g1
2008e9c: 02 80 00 12 be 2008ee4 <rtems_rbheap_allocate+0x9c>
2008ea0: b0 10 20 00 clr %i0
rtems_rbheap_page *free_page = (rtems_rbheap_page *) current;
if (free_page->size >= size) {
2008ea4: f6 07 20 1c ld [ %i4 + 0x1c ], %i3
2008ea8: 80 a6 80 1b cmp %i2, %i3
2008eac: 38 80 00 10 bgu,a 2008eec <rtems_rbheap_allocate+0xa4>
2008eb0: f8 07 00 00 ld [ %i4 ], %i4
uintptr_t aligned_size = align_up(page_alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_page *free_page = search_free_page(free_chain, aligned_size);
if (free_page != NULL) {
2008eb4: 80 a7 20 00 cmp %i4, 0
2008eb8: 02 80 00 10 be 2008ef8 <rtems_rbheap_allocate+0xb0> <== NEVER TAKEN
2008ebc: 80 a6 c0 1a cmp %i3, %i2
uintptr_t free_size = free_page->size;
if (free_size > aligned_size) {
2008ec0: 18 80 00 12 bgu 2008f08 <rtems_rbheap_allocate+0xc0>
2008ec4: 90 10 00 1d mov %i5, %o0
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008ec8: c4 07 00 00 ld [ %i4 ], %g2
previous = the_node->previous;
2008ecc: c2 07 20 04 ld [ %i4 + 4 ], %g1
ptr = (void *) new_page->begin;
}
} else {
rtems_chain_extract_unprotected(&free_page->chain_node);
rtems_chain_set_off_chain(&free_page->chain_node);
ptr = (void *) free_page->begin;
2008ed0: f0 07 20 18 ld [ %i4 + 0x18 ], %i0
next->previous = previous;
2008ed4: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
2008ed8: c4 20 40 00 st %g2, [ %g1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
2008edc: c0 27 20 04 clr [ %i4 + 4 ]
2008ee0: c0 27 00 00 clr [ %i4 ]
2008ee4: 81 c7 e0 08 ret
2008ee8: 81 e8 00 00 restore
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_page *big_enough = NULL;
while (current != tail && big_enough == NULL) {
2008eec: 80 a0 40 1c cmp %g1, %i4
2008ef0: 32 bf ff ee bne,a 2008ea8 <rtems_rbheap_allocate+0x60> <== NEVER TAKEN
2008ef4: f6 07 20 1c ld [ %i4 + 0x1c ], %i3 <== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
2008ef8: 81 c7 e0 08 ret
2008efc: 91 e8 20 00 restore %g0, 0, %o0
}
}
}
return ptr;
}
2008f00: 81 c7 e0 08 ret
2008f04: 91 e8 20 00 restore %g0, 0, %o0
if (free_page != NULL) {
uintptr_t free_size = free_page->size;
if (free_size > aligned_size) {
rtems_rbheap_page *new_page = get_page(control);
2008f08: 7f ff ff 60 call 2008c88 <get_page>
2008f0c: b0 10 20 00 clr %i0
if (new_page != NULL) {
2008f10: 80 a2 20 00 cmp %o0, 0
2008f14: 02 bf ff f4 be 2008ee4 <rtems_rbheap_allocate+0x9c> <== NEVER TAKEN
2008f18: b2 10 00 08 mov %o0, %i1
uintptr_t new_free_size = free_size - aligned_size;
free_page->size = new_free_size;
new_page->begin = free_page->begin + new_free_size;
2008f1c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
if (free_size > aligned_size) {
rtems_rbheap_page *new_page = get_page(control);
if (new_page != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
2008f20: b6 26 c0 1a sub %i3, %i2, %i3
free_page->size = new_free_size;
2008f24: f6 27 20 1c st %i3, [ %i4 + 0x1c ]
new_page->begin = free_page->begin + new_free_size;
new_page->size = aligned_size;
2008f28: f4 22 20 1c st %i2, [ %o0 + 0x1c ]
if (new_page != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_page->size = new_free_size;
new_page->begin = free_page->begin + new_free_size;
2008f2c: b6 06 c0 01 add %i3, %g1, %i3
2008f30: c0 22 20 04 clr [ %o0 + 4 ]
2008f34: f6 22 20 18 st %i3, [ %o0 + 0x18 ]
2008f38: c0 22 00 00 clr [ %o0 ]
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_page *page
)
{
_RBTree_Insert_unprotected(tree, &page->tree_node);
2008f3c: 92 06 60 08 add %i1, 8, %o1
2008f40: 40 00 07 31 call 200ac04 <_RBTree_Insert_unprotected>
2008f44: 90 07 60 18 add %i5, 0x18, %o0
free_page->size = new_free_size;
new_page->begin = free_page->begin + new_free_size;
new_page->size = aligned_size;
rtems_chain_set_off_chain(&new_page->chain_node);
insert_into_tree(page_tree, new_page);
ptr = (void *) new_page->begin;
2008f48: f0 06 60 18 ld [ %i1 + 0x18 ], %i0
2008f4c: 81 c7 e0 08 ret
2008f50: 81 e8 00 00 restore
020090ec <rtems_rbheap_extend_page_pool_with_malloc>:
void rtems_rbheap_extend_page_pool_with_malloc(rtems_rbheap_control *control)
{
20090ec: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rbheap_page *page = malloc(sizeof(*page));
20090f0: 7f ff ec a0 call 2004370 <malloc> <== NOT EXECUTED
20090f4: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
if (page != NULL) {
20090f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20090fc: 02 80 00 07 be 2009118 <rtems_rbheap_extend_page_pool_with_malloc+0x2c><== NOT EXECUTED
2009100: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED
2009104: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
after_node->next = the_node;
2009108: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
200910c: c4 22 20 04 st %g2, [ %o0 + 4 ] <== NOT EXECUTED
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
2009110: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
before_node->previous = the_node;
2009114: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED
2009118: 81 c7 e0 08 ret <== NOT EXECUTED
200911c: 81 e8 00 00 restore <== NOT EXECUTED
02008f54 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(page_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
2008f54: 9d e3 bf 80 save %sp, -128, %sp
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
2008f58: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
#define NULL_PAGE rtems_rbheap_page_of_node(NULL)
static rtems_rbheap_page *find(rtems_rbtree_control *page_tree, uintptr_t key)
{
rtems_rbheap_page page = { .begin = key };
2008f5c: c0 27 bf fc clr [ %fp + -4 ]
2008f60: c0 27 bf e0 clr [ %fp + -32 ]
2008f64: c0 27 bf e4 clr [ %fp + -28 ]
2008f68: c0 27 bf e8 clr [ %fp + -24 ]
2008f6c: c0 27 bf ec clr [ %fp + -20 ]
2008f70: c0 27 bf f0 clr [ %fp + -16 ]
2008f74: c0 27 bf f4 clr [ %fp + -12 ]
2008f78: f2 27 bf f8 st %i1, [ %fp + -8 ]
_RBTree_Extract_unprotected(page_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
2008f7c: ba 10 00 18 mov %i0, %i5
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2008f80: 80 a7 20 00 cmp %i4, 0
2008f84: 02 80 00 1e be 2008ffc <rtems_rbheap_free+0xa8> <== NEVER TAKEN
2008f88: b0 10 20 04 mov 4, %i0
2008f8c: b6 10 20 00 clr %i3
compare_result = the_rbtree->compare_function(the_node, iter_node);
2008f90: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2008f94: 92 10 00 1c mov %i4, %o1
2008f98: 9f c0 40 00 call %g1
2008f9c: 90 07 bf e8 add %fp, -24, %o0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
2008fa0: 83 3a 20 1f sra %o0, 0x1f, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
2008fa4: 80 a2 20 00 cmp %o0, 0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
2008fa8: 82 20 40 08 sub %g1, %o0, %g1
2008fac: 83 30 60 1f srl %g1, 0x1f, %g1
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
2008fb0: 83 28 60 02 sll %g1, 2, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
2008fb4: 12 80 00 06 bne 2008fcc <rtems_rbheap_free+0x78>
2008fb8: 82 07 00 01 add %i4, %g1, %g1
found = iter_node;
if ( the_rbtree->is_unique )
2008fbc: c4 0f 60 2c ldub [ %i5 + 0x2c ], %g2
2008fc0: 80 a0 a0 00 cmp %g2, 0
2008fc4: 12 80 00 10 bne 2009004 <rtems_rbheap_free+0xb0> <== ALWAYS TAKEN
2008fc8: b6 10 00 1c mov %i4, %i3
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
2008fcc: f8 00 60 04 ld [ %g1 + 4 ], %i4
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2008fd0: 80 a7 20 00 cmp %i4, 0
2008fd4: 32 bf ff f0 bne,a 2008f94 <rtems_rbheap_free+0x40>
2008fd8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
static rtems_rbheap_page *find(rtems_rbtree_control *page_tree, uintptr_t key)
{
rtems_rbheap_page page = { .begin = key };
return rtems_rbheap_page_of_node(
2008fdc: b8 06 ff f8 add %i3, -8, %i4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
rtems_rbheap_page *page = find(page_tree, (uintptr_t) ptr);
if (page != NULL_PAGE) {
2008fe0: 80 a7 3f f8 cmp %i4, -8
2008fe4: 02 80 00 06 be 2008ffc <rtems_rbheap_free+0xa8>
2008fe8: b0 10 20 04 mov 4, %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
2008fec: c2 06 ff f8 ld [ %i3 + -8 ], %g1
2008ff0: 80 a0 60 00 cmp %g1, 0
2008ff4: 02 80 00 06 be 200900c <rtems_rbheap_free+0xb8>
2008ff8: b0 10 20 0e mov 0xe, %i0
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
2008ffc: 81 c7 e0 08 ret
2009000: 81 e8 00 00 restore
static rtems_rbheap_page *find(rtems_rbtree_control *page_tree, uintptr_t key)
{
rtems_rbheap_page page = { .begin = key };
return rtems_rbheap_page_of_node(
2009004: 10 bf ff f7 b 2008fe0 <rtems_rbheap_free+0x8c>
2009008: b8 06 ff f8 add %i3, -8, %i4
200900c: c2 07 20 04 ld [ %i4 + 4 ], %g1
2009010: 80 a0 60 00 cmp %g1, 0
2009014: 12 bf ff fa bne 2008ffc <rtems_rbheap_free+0xa8> <== NEVER TAKEN
2009018: 92 10 00 1b mov %i3, %o1
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
200901c: b4 07 60 18 add %i5, 0x18, %i2
const rtems_rbtree_control *page_tree,
const rtems_rbheap_page *page,
RBTree_Direction dir
)
{
return rtems_rbheap_page_of_node(
2009020: 94 10 20 00 clr %o2
2009024: 40 00 07 c4 call 200af34 <_RBTree_Next_unprotected>
2009028: 90 10 00 1a mov %i2, %o0
200902c: 92 10 00 1b mov %i3, %o1
2009030: b2 10 00 08 mov %o0, %i1
2009034: 94 10 20 01 mov 1, %o2
2009038: 40 00 07 bf call 200af34 <_RBTree_Next_unprotected>
200903c: 90 10 00 1a mov %i2, %o0
2009040: 96 02 3f f8 add %o0, -8, %o3
rtems_rbtree_control *page_tree,
rtems_rbheap_page *a,
rtems_rbheap_page *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_page_free(b)) {
2009044: 80 a2 ff f8 cmp %o3, -8
2009048: 02 80 00 0a be 2009070 <rtems_rbheap_free+0x11c>
200904c: b6 06 7f f8 add %i1, -8, %i3
2009050: c2 02 3f f8 ld [ %o0 + -8 ], %g1
2009054: 80 a0 60 00 cmp %g1, 0
2009058: 22 80 00 1e be,a 20090d0 <rtems_rbheap_free+0x17c>
200905c: c2 02 e0 04 ld [ %o3 + 4 ], %g1
}
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
2009060: 90 10 00 1d mov %i5, %o0
2009064: 92 10 00 1a mov %i2, %o1
2009068: 7f ff ff 16 call 2008cc0 <check_and_merge.part.0>
200906c: 94 10 00 1c mov %i4, %o2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2009070: c2 07 40 00 ld [ %i5 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2009074: fa 27 20 04 st %i5, [ %i4 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
2009078: f8 27 40 00 st %i4, [ %i5 ]
the_node->next = before_node;
200907c: c2 27 00 00 st %g1, [ %i4 ]
before_node->previous = the_node;
2009080: f8 20 60 04 st %i4, [ %g1 + 4 ]
rtems_rbtree_control *page_tree,
rtems_rbheap_page *a,
rtems_rbheap_page *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_page_free(b)) {
2009084: 80 a6 ff f8 cmp %i3, -8
2009088: 02 bf ff dd be 2008ffc <rtems_rbheap_free+0xa8>
200908c: b0 10 20 00 clr %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
2009090: c2 06 7f f8 ld [ %i1 + -8 ], %g1
2009094: 80 a0 60 00 cmp %g1, 0
2009098: 22 80 00 0a be,a 20090c0 <rtems_rbheap_free+0x16c>
200909c: c2 06 e0 04 ld [ %i3 + 4 ], %g1
}
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
20090a0: 90 10 00 1d mov %i5, %o0
20090a4: 92 10 00 1a mov %i2, %o1
20090a8: 94 10 00 1c mov %i4, %o2
20090ac: 96 10 00 1b mov %i3, %o3
20090b0: 7f ff ff 04 call 2008cc0 <check_and_merge.part.0>
20090b4: b0 10 20 00 clr %i0
20090b8: 81 c7 e0 08 ret
20090bc: 81 e8 00 00 restore
20090c0: 80 a0 60 00 cmp %g1, 0
20090c4: 12 bf ff f8 bne 20090a4 <rtems_rbheap_free+0x150> <== NEVER TAKEN
20090c8: 90 10 00 1d mov %i5, %o0
20090cc: 30 bf ff fb b,a 20090b8 <rtems_rbheap_free+0x164>
20090d0: 80 a0 60 00 cmp %g1, 0
20090d4: 12 bf ff e4 bne 2009064 <rtems_rbheap_free+0x110> <== NEVER TAKEN
20090d8: 90 10 00 1d mov %i5, %o0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
20090dc: 10 bf ff e6 b 2009074 <rtems_rbheap_free+0x120>
20090e0: c2 07 40 00 ld [ %i5 ], %g1
02046aa4 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
2046aa4: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
2046aa8: 92 07 bf fc add %fp, -4, %o1
2046aac: 90 10 00 18 mov %i0, %o0
2046ab0: 7f ff fe 29 call 2046354 <rtems_rfs_bitmap_load_map>
2046ab4: ba 10 00 18 mov %i0, %i5
if (rc > 0)
2046ab8: 80 a2 20 00 cmp %o0, 0
2046abc: 24 80 00 04 ble,a 2046acc <rtems_rfs_bitmap_create_search+0x28><== ALWAYS TAKEN
2046ac0: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
bit++;
map++;
}
return 0;
}
2046ac4: 81 c7 e0 08 ret <== NOT EXECUTED
2046ac8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (rc > 0)
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
2046acc: de 06 20 0c ld [ %i0 + 0xc ], %o7
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
2046ad0: c0 26 20 10 clr [ %i0 + 0x10 ]
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
2046ad4: 82 10 3f ff mov -1, %g1
2046ad8: c2 22 40 00 st %g1, [ %o1 ]
while (size)
2046adc: 80 a3 e0 00 cmp %o7, 0
2046ae0: 02 bf ff f9 be 2046ac4 <rtems_rfs_bitmap_create_search+0x20><== NEVER TAKEN
2046ae4: 90 10 20 00 clr %o0
2046ae8: d8 07 bf fc ld [ %fp + -4 ], %o4
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
2046aec: 96 10 20 00 clr %o3
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);
2046af0: 90 10 3f ff mov -1, %o0
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
2046af4: 9a 10 20 01 mov 1, %o5
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
2046af8: 80 a3 e0 1f cmp %o7, 0x1f
2046afc: 38 80 00 20 bgu,a 2046b7c <rtems_rfs_bitmap_create_search+0xd8>
2046b00: c6 03 00 00 ld [ %o4 ], %g3
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
2046b04: c2 03 00 00 ld [ %o4 ], %g1
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);
2046b08: 86 20 00 0f neg %o7, %g3
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;
2046b0c: 88 10 00 0f mov %o7, %g4
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);
2046b10: 87 32 00 03 srl %o0, %g3, %g3
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;
2046b14: 94 10 00 0f mov %o7, %o2
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
2046b18: 86 08 c0 01 and %g3, %g1, %g3
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
2046b1c: 80 a0 e0 00 cmp %g3, 0
2046b20: 02 80 00 0e be 2046b58 <rtems_rfs_bitmap_create_search+0xb4>
2046b24: 80 a2 e0 20 cmp %o3, 0x20
2046b28: 82 10 20 00 clr %g1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
2046b2c: 85 2b 40 01 sll %o5, %g1, %g2
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
2046b30: 80 88 80 03 btst %g2, %g3
2046b34: 02 80 00 05 be 2046b48 <rtems_rfs_bitmap_create_search+0xa4>
2046b38: 82 00 60 01 inc %g1
control->free++;
2046b3c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
2046b40: 84 00 a0 01 inc %g2
2046b44: c4 27 60 10 st %g2, [ %i5 + 0x10 ]
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++)
2046b48: 80 a1 00 01 cmp %g4, %g1
2046b4c: 14 bf ff f9 bg 2046b30 <rtems_rfs_bitmap_create_search+0x8c>
2046b50: 85 2b 40 01 sll %o5, %g1, %g2
control->free++;
}
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
2046b54: 80 a2 e0 20 cmp %o3, 0x20
2046b58: 02 80 00 0c be 2046b88 <rtems_rfs_bitmap_create_search+0xe4><== NEVER TAKEN
2046b5c: 9e 23 c0 0a sub %o7, %o2, %o7
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
2046b60: 96 02 e0 01 inc %o3
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
2046b64: 80 a3 e0 00 cmp %o7, 0
2046b68: 12 bf ff e4 bne 2046af8 <rtems_rfs_bitmap_create_search+0x54>
2046b6c: 98 03 20 04 add %o4, 4, %o4
else
bit++;
map++;
}
return 0;
2046b70: 90 10 20 00 clr %o0
}
2046b74: 81 c7 e0 08 ret
2046b78: 91 e8 00 08 restore %g0, %o0, %o0
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
2046b7c: 94 10 20 20 mov 0x20, %o2
available = rtems_rfs_bitmap_element_bits ();
2046b80: 10 bf ff e7 b 2046b1c <rtems_rfs_bitmap_create_search+0x78>
2046b84: 88 10 20 20 mov 0x20, %g4
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
2046b88: d0 22 60 04 st %o0, [ %o1 + 4 ] <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
2046b8c: 96 10 20 00 clr %o3 <== NOT EXECUTED
search_map++;
2046b90: 10 bf ff f5 b 2046b64 <rtems_rfs_bitmap_create_search+0xc0><== NOT EXECUTED
2046b94: 92 02 60 04 add %o1, 4, %o1 <== NOT EXECUTED
02046354 <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)
{
2046354: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (!control->buffer)
2046358: c2 06 00 00 ld [ %i0 ], %g1
* @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)
{
204635c: ba 10 00 18 mov %i0, %i5
int rc;
if (!control->buffer)
2046360: 80 a0 60 00 cmp %g1, 0
2046364: 02 80 00 0f be 20463a0 <rtems_rfs_bitmap_load_map+0x4c> <== NEVER TAKEN
2046368: b0 10 20 06 mov 6, %i0
return ENXIO;
*map = NULL;
204636c: c0 26 40 00 clr [ %i1 ]
rc = rtems_rfs_buffer_handle_request (control->fs,
2046370: d4 07 60 08 ld [ %i5 + 8 ], %o2
2046374: d0 07 60 04 ld [ %i5 + 4 ], %o0
2046378: d2 07 40 00 ld [ %i5 ], %o1
204637c: 7f ff d4 1e call 203b3f4 <rtems_rfs_buffer_handle_request>
2046380: 96 10 20 01 mov 1, %o3
control->buffer,
control->block,
true);
if (rc)
2046384: b0 92 20 00 orcc %o0, 0, %i0
2046388: 12 80 00 06 bne 20463a0 <rtems_rfs_bitmap_load_map+0x4c> <== NEVER TAKEN
204638c: 01 00 00 00 nop
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
2046390: c2 07 40 00 ld [ %i5 ], %g1
2046394: c2 00 60 08 ld [ %g1 + 8 ], %g1
2046398: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
204639c: c2 26 40 00 st %g1, [ %i1 ]
return 0;
}
20463a0: 81 c7 e0 08 ret
20463a4: 81 e8 00 00 restore
020469bc <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)
{
20469bc: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
20469c0: c0 2e 80 00 clrb [ %i2 ]
* 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;
20469c4: ba 10 00 19 mov %i1, %i5
* 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))
20469c8: 80 a7 60 00 cmp %i5, 0
20469cc: 06 80 00 1f bl 2046a48 <rtems_rfs_bitmap_map_alloc+0x8c> <== NEVER TAKEN
20469d0: 80 a6 60 00 cmp %i1, 0
20469d4: c2 06 20 0c ld [ %i0 + 0xc ], %g1
20469d8: 80 a7 40 01 cmp %i5, %g1
20469dc: 1a 80 00 1b bcc 2046a48 <rtems_rfs_bitmap_map_alloc+0x8c>
20469e0: 80 a6 60 00 cmp %i1, 0
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
20469e4: fa 26 c0 00 st %i5, [ %i3 ]
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
20469e8: 90 10 00 18 mov %i0, %o0
20469ec: 92 10 00 1b mov %i3, %o1
20469f0: 94 10 00 1a mov %i2, %o2
20469f4: 7f ff fe 6d call 20463a8 <rtems_rfs_search_map_for_clear_bit.constprop.1>
20469f8: 96 10 20 01 mov 1, %o3
window, 1);
if ((rc > 0) || *allocated)
20469fc: 80 a2 20 00 cmp %o0, 0
2046a00: 14 80 00 27 bg 2046a9c <rtems_rfs_bitmap_map_alloc+0xe0> <== NEVER TAKEN
2046a04: 01 00 00 00 nop
2046a08: c2 0e 80 00 ldub [ %i2 ], %g1
2046a0c: 80 a0 60 00 cmp %g1, 0
2046a10: 12 80 00 23 bne 2046a9c <rtems_rfs_bitmap_map_alloc+0xe0>
2046a14: 80 a6 60 00 cmp %i1, 0
break;
}
if (lower_seed >= 0)
2046a18: 36 80 00 15 bge,a 2046a6c <rtems_rfs_bitmap_map_alloc+0xb0><== ALWAYS TAKEN
2046a1c: f2 26 c0 00 st %i1, [ %i3 ]
/*
* 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)
2046a20: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
2046a24: 80 a0 40 1d cmp %g1, %i5
2046a28: 38 80 00 02 bgu,a 2046a30 <rtems_rfs_bitmap_map_alloc+0x74><== ALWAYS TAKEN
2046a2c: ba 07 68 00 add %i5, 0x800, %i5
upper_seed += window;
if (lower_seed >= 0)
2046a30: 80 a6 60 00 cmp %i1, 0
2046a34: 06 bf ff e5 bl 20469c8 <rtems_rfs_bitmap_map_alloc+0xc> <== NEVER TAKEN
2046a38: 80 a7 60 00 cmp %i5, 0
* 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))
2046a3c: 16 bf ff e6 bge 20469d4 <rtems_rfs_bitmap_map_alloc+0x18> <== ALWAYS TAKEN
2046a40: b2 06 78 00 add %i1, -2048, %i1
|| ((lower_seed >= 0) && (lower_seed < control->size)))
2046a44: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2046a48: 06 80 00 15 bl 2046a9c <rtems_rfs_bitmap_map_alloc+0xe0>
2046a4c: 01 00 00 00 nop
2046a50: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2046a54: 80 a6 40 01 cmp %i1, %g1
2046a58: 1a 80 00 11 bcc 2046a9c <rtems_rfs_bitmap_map_alloc+0xe0> <== ALWAYS TAKEN
2046a5c: 80 a0 40 1d cmp %g1, %i5
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
2046a60: 38 bf ff e2 bgu,a 20469e8 <rtems_rfs_bitmap_map_alloc+0x2c><== NOT EXECUTED
2046a64: fa 26 c0 00 st %i5, [ %i3 ] <== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
2046a68: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
2046a6c: 90 10 00 18 mov %i0, %o0
2046a70: 92 10 00 1b mov %i3, %o1
2046a74: 94 10 00 1a mov %i2, %o2
2046a78: 7f ff fe 4c call 20463a8 <rtems_rfs_search_map_for_clear_bit.constprop.1>
2046a7c: 96 10 3f ff mov -1, %o3
window, -1);
if ((rc > 0) || *allocated)
2046a80: 80 a2 20 00 cmp %o0, 0
2046a84: 14 80 00 06 bg 2046a9c <rtems_rfs_bitmap_map_alloc+0xe0> <== NEVER TAKEN
2046a88: 01 00 00 00 nop
2046a8c: c2 0e 80 00 ldub [ %i2 ], %g1
2046a90: 80 a0 60 00 cmp %g1, 0
2046a94: 22 bf ff e4 be,a 2046a24 <rtems_rfs_bitmap_map_alloc+0x68>
2046a98: c2 06 20 0c ld [ %i0 + 0xc ], %g1
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
2046a9c: 81 c7 e0 08 ret
2046aa0: 91 e8 20 00 restore %g0, 0, %o0
02046764 <rtems_rfs_bitmap_map_clear>:
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
2046764: 9d e3 bf 98 save %sp, -104, %sp
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);
2046768: 92 07 bf fc add %fp, -4, %o1
204676c: 7f ff fe fa call 2046354 <rtems_rfs_bitmap_load_map>
2046770: 90 10 00 18 mov %i0, %o0
if (rc > 0)
2046774: 80 a2 20 00 cmp %o0, 0
2046778: 24 80 00 04 ble,a 2046788 <rtems_rfs_bitmap_map_clear+0x24><== ALWAYS TAKEN
204677c: c2 06 20 0c ld [ %i0 + 0xc ], %g1
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);
control->free++;
return 0;
}
2046780: 81 c7 e0 08 ret <== NOT EXECUTED
2046784: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
2046788: 80 a6 40 01 cmp %i1, %g1
204678c: 1a bf ff fd bcc 2046780 <rtems_rfs_bitmap_map_clear+0x1c> <== NEVER TAKEN
2046790: 90 10 20 16 mov 0x16, %o0
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);
2046794: da 07 bf fc ld [ %fp + -4 ], %o5
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
2046798: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
index = rtems_rfs_bitmap_map_index (bit);
204679c: 89 3e 60 05 sra %i1, 5, %g4
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
20467a0: 9f 29 20 02 sll %g4, 2, %o7
*/
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);
20467a4: d8 03 40 0f ld [ %o5 + %o7 ], %o4
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);
20467a8: 82 10 20 01 mov 1, %g1
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
20467ac: 85 3e 60 0a sra %i1, 0xa, %g2
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);
20467b0: b3 28 40 19 sll %g1, %i1, %i1
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);
20467b4: 85 28 a0 02 sll %g2, 2, %g2
*/
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);
20467b8: b2 13 00 19 or %o4, %i1, %i1
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);
20467bc: f2 23 40 0f st %i1, [ %o5 + %o7 ]
*/
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);
20467c0: da 00 c0 02 ld [ %g3 + %g2 ], %o5
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);
20467c4: de 06 00 00 ld [ %i0 ], %o7
control->free++;
20467c8: f2 06 20 10 ld [ %i0 + 0x10 ], %i1
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);
20467cc: 89 28 40 04 sll %g1, %g4, %g4
*/
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);
20467d0: 88 13 40 04 or %o5, %g4, %g4
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);
20467d4: c8 20 c0 02 st %g4, [ %g3 + %g2 ]
rtems_rfs_buffer_mark_dirty (control->buffer);
20467d8: c2 2b c0 00 stb %g1, [ %o7 ]
control->free++;
return 0;
20467dc: 90 10 20 00 clr %o0
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);
control->free++;
20467e0: 82 06 60 01 add %i1, 1, %g1
20467e4: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
return 0;
}
20467e8: 81 c7 e0 08 ret
20467ec: 91 e8 00 08 restore %g0, %o0, %o0
020468f4 <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
20468f4: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
20468f8: 92 07 bf fc add %fp, -4, %o1
20468fc: 90 10 00 18 mov %i0, %o0
2046900: 7f ff fe 95 call 2046354 <rtems_rfs_bitmap_load_map>
2046904: ba 10 00 18 mov %i0, %i5
if (rc > 0)
2046908: 80 a2 20 00 cmp %o0, 0
204690c: 24 80 00 04 ble,a 204691c <rtems_rfs_bitmap_map_clear_all+0x28><== ALWAYS TAKEN
2046910: da 06 20 0c ld [ %i0 + 0xc ], %o5
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
2046914: 81 c7 e0 08 ret <== NOT EXECUTED
2046918: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
204691c: de 07 bf fc ld [ %fp + -4 ], %o7
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
2046920: 9a 03 7f ff add %o5, -1, %o5
control->free = elements;
for (e = 0; e < elements; e++)
2046924: 84 10 20 00 clr %g2
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
2046928: 9b 33 60 05 srl %o5, 5, %o5
control->free = elements;
for (e = 0; e < elements; e++)
204692c: 82 10 20 00 clr %g1
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
2046930: 86 03 60 01 add %o5, 1, %g3
control->free = elements;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
2046934: 88 10 3f ff mov -1, %g4
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
2046938: c6 26 20 10 st %g3, [ %i0 + 0x10 ]
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
204693c: 85 28 a0 02 sll %g2, 2, %g2
2046940: c8 23 c0 02 st %g4, [ %o7 + %g2 ]
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
2046944: 82 00 60 01 inc %g1
2046948: 80 a0 c0 01 cmp %g3, %g1
204694c: 18 bf ff fc bgu 204693c <rtems_rfs_bitmap_map_clear_all+0x48>
2046950: 84 10 00 01 mov %g1, %g2
* 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)
2046954: 86 88 e0 1f andcc %g3, 0x1f, %g3
2046958: 02 80 00 04 be 2046968 <rtems_rfs_bitmap_map_clear_all+0x74>
204695c: 98 10 3f ff mov -1, %o4
2046960: 86 20 00 03 neg %g3
2046964: 99 33 00 03 srl %o4, %g3, %o4
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
2046968: 87 33 60 05 srl %o5, 5, %g3
for (e = 0; e < (elements - 1); e++)
204696c: 80 a0 e0 00 cmp %g3, 0
2046970: 02 80 00 0b be 204699c <rtems_rfs_bitmap_map_clear_all+0xa8><== ALWAYS TAKEN
2046974: c8 07 60 14 ld [ %i5 + 0x14 ], %g4
2046978: 84 10 20 00 clr %g2 <== NOT EXECUTED
204697c: 82 10 20 00 clr %g1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
2046980: 9e 10 3f ff mov -1, %o7 <== NOT EXECUTED
2046984: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
2046988: de 21 00 02 st %o7, [ %g4 + %g2 ] <== 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++)
204698c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2046990: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2046994: 12 bf ff fc bne 2046984 <rtems_rfs_bitmap_map_clear_all+0x90><== NOT EXECUTED
2046998: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
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);
204699c: c2 07 40 00 ld [ %i5 ], %g1
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] =
20469a0: 87 28 e0 02 sll %g3, 2, %g3
20469a4: d8 21 00 03 st %o4, [ %g4 + %g3 ]
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
20469a8: 90 10 20 00 clr %o0
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);
20469ac: 84 10 20 01 mov 1, %g2
20469b0: c4 28 40 00 stb %g2, [ %g1 ]
return 0;
}
20469b4: 81 c7 e0 08 ret
20469b8: 91 e8 00 08 restore %g0, %o0, %o0
020466d4 <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
20466d4: 9d e3 bf 98 save %sp, -104, %sp
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);
20466d8: 92 07 bf fc add %fp, -4, %o1
20466dc: 7f ff ff 1e call 2046354 <rtems_rfs_bitmap_load_map>
20466e0: 90 10 00 18 mov %i0, %o0
if (rc > 0)
20466e4: 80 a2 20 00 cmp %o0, 0
20466e8: 24 80 00 04 ble,a 20466f8 <rtems_rfs_bitmap_map_set+0x24><== ALWAYS TAKEN
20466ec: c2 06 20 0c ld [ %i0 + 0xc ], %g1
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
20466f0: 81 c7 e0 08 ret
20466f4: 91 e8 00 08 restore %g0, %o0, %o0
int offset;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
20466f8: 80 a6 40 01 cmp %i1, %g1
20466fc: 1a bf ff fd bcc 20466f0 <rtems_rfs_bitmap_map_set+0x1c> <== NEVER TAKEN
2046700: 90 10 20 16 mov 0x16, %o0
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);
2046704: c8 07 bf fc ld [ %fp + -4 ], %g4
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
2046708: 9f 3e 60 05 sra %i1, 5, %o7
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
204670c: 87 2b e0 02 sll %o7, 2, %g3
*/
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);
2046710: c4 01 00 03 ld [ %g4 + %g3 ], %g2
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
2046714: da 06 20 14 ld [ %i0 + 0x14 ], %o5
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
2046718: 82 10 20 01 mov 1, %g1
204671c: 99 28 40 19 sll %g1, %i1, %o4
*/
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);
2046720: 84 28 80 0c andn %g2, %o4, %g2
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);
2046724: c4 21 00 03 st %g2, [ %g4 + %g3 ]
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
2046728: 80 a0 a0 00 cmp %g2, 0
204672c: 12 bf ff f1 bne 20466f0 <rtems_rfs_bitmap_map_set+0x1c> <== ALWAYS TAKEN
2046730: 90 10 20 00 clr %o0
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
2046734: b3 3e 60 0a sra %i1, 0xa, %i1 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
2046738: b3 2e 60 02 sll %i1, 2, %i1 <== 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);
204673c: c8 03 40 19 ld [ %o5 + %i1 ], %g4 <== NOT EXECUTED
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
2046740: c6 06 20 10 ld [ %i0 + 0x10 ], %g3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
2046744: c4 06 00 00 ld [ %i0 ], %g2 <== 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);
2046748: 9f 28 40 0f sll %g1, %o7, %o7 <== 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);
204674c: 9e 29 00 0f andn %g4, %o7, %o7 <== 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);
2046750: de 23 40 19 st %o7, [ %o5 + %i1 ] <== NOT EXECUTED
control->free--;
2046754: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
2046758: c6 26 20 10 st %g3, [ %i0 + 0x10 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
204675c: 10 bf ff e5 b 20466f0 <rtems_rfs_bitmap_map_set+0x1c> <== NOT EXECUTED
2046760: c2 28 80 00 stb %g1, [ %g2 ] <== NOT EXECUTED
02046854 <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
2046854: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
2046858: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
204685c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2046860: 7f ff fe bd call 2046354 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
2046864: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
if (rc > 0)
2046868: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
204686c: 24 80 00 04 ble,a 204687c <rtems_rfs_bitmap_map_set_all+0x28><== NOT EXECUTED
2046870: de 06 20 0c ld [ %i0 + 0xc ], %o7 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
2046874: 81 c7 e0 08 ret <== NOT EXECUTED
2046878: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
204687c: c8 07 bf fc ld [ %fp + -4 ], %g4 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
2046880: 9e 03 ff ff add %o7, -1, %o7 <== NOT EXECUTED
control->free = 0;
2046884: c0 26 20 10 clr [ %i0 + 0x10 ] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
2046888: 9f 33 e0 05 srl %o7, 5, %o7 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
204688c: 84 10 20 00 clr %g2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
2046890: 86 03 e0 01 add %o7, 1, %g3 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
2046894: 82 10 20 00 clr %g1 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
2046898: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
204689c: c0 21 00 02 clr [ %g4 + %g2 ] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
20468a0: 82 00 60 01 inc %g1 <== NOT EXECUTED
20468a4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
20468a8: 18 bf ff fc bgu 2046898 <rtems_rfs_bitmap_map_set_all+0x44><== NOT EXECUTED
20468ac: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
20468b0: c8 07 60 14 ld [ %i5 + 0x14 ], %g4 <== NOT EXECUTED
20468b4: 87 33 e0 05 srl %o7, 5, %g3 <== NOT EXECUTED
for (e = 0; e < elements; e++)
20468b8: 84 10 20 00 clr %g2 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
20468bc: 86 00 e0 01 inc %g3 <== NOT EXECUTED
for (e = 0; e < elements; e++)
20468c0: 82 10 20 00 clr %g1 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
20468c4: 85 28 a0 02 sll %g2, 2, %g2 <== NOT EXECUTED
20468c8: c0 21 00 02 clr [ %g4 + %g2 ] <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
20468cc: 82 00 60 01 inc %g1 <== NOT EXECUTED
20468d0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
20468d4: 18 bf ff fc bgu 20468c4 <rtems_rfs_bitmap_map_set_all+0x70><== NOT EXECUTED
20468d8: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
20468dc: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
return 0;
20468e0: 90 10 20 00 clr %o0 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (elements);
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
20468e4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
20468e8: c4 28 40 00 stb %g2, [ %g1 ] <== NOT EXECUTED
return 0;
}
20468ec: 81 c7 e0 08 ret <== NOT EXECUTED
20468f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020467f0 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
20467f0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
20467f4: 92 07 bf fc add %fp, -4, %o1 <== NOT EXECUTED
20467f8: 7f ff fe d7 call 2046354 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
20467fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (rc > 0)
2046800: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2046804: 24 80 00 04 ble,a 2046814 <rtems_rfs_bitmap_map_test+0x24><== NOT EXECUTED
2046808: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
204680c: 81 c7 e0 08 ret <== NOT EXECUTED
2046810: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
2046814: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
2046818: 1a bf ff fd bcc 204680c <rtems_rfs_bitmap_map_test+0x1c> <== NOT EXECUTED
204681c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
2046820: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
2046824: 83 3e 60 05 sra %i1, 5, %g1 <== NOT EXECUTED
*state = rtems_rfs_bitmap_test (map[index], bit);
2046828: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
204682c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED
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;
2046830: 90 10 20 00 clr %o0 <== NOT EXECUTED
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
2046834: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
2046838: b3 28 80 19 sll %g2, %i1, %i1 <== NOT EXECUTED
204683c: b2 0e 40 01 and %i1, %g1, %i1 <== NOT EXECUTED
2046840: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
2046844: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
2046848: c2 2e 80 00 stb %g1, [ %i2 ] <== NOT EXECUTED
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
204684c: 81 c7 e0 08 ret <== NOT EXECUTED
2046850: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0204669c <rtems_rfs_bitmap_mask>:
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);
204669c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
20466a0: 90 20 00 08 neg %o0 <== NOT EXECUTED
return mask;
}
20466a4: 81 c3 e0 08 retl <== NOT EXECUTED
20466a8: 91 30 40 08 srl %g1, %o0, %o0 <== NOT EXECUTED
020466ac <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
20466ac: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
rtems_rfs_bitmap_element mask = 0;
if (end > start)
20466b0: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
20466b4: 08 80 00 06 bleu 20466cc <rtems_rfs_bitmap_mask_section+0x20><== NOT EXECUTED
20466b8: 90 10 20 00 clr %o0 <== 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);
20466bc: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED
20466c0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
20466c4: 91 32 00 09 srl %o0, %o1, %o0 <== NOT EXECUTED
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;
20466c8: 91 2a 00 01 sll %o0, %g1, %o0 <== NOT EXECUTED
return mask;
}
20466cc: 81 c3 e0 08 retl <== NOT EXECUTED
02046b98 <rtems_rfs_bitmap_open>:
rtems_rfs_bitmap_open (rtems_rfs_bitmap_control* control,
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
2046b98: 9d e3 bf a0 save %sp, -96, %sp
size_t elements = rtems_rfs_bitmap_elements (size);
2046b9c: 82 06 ff ff add %i3, -1, %g1
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
2046ba0: 83 30 60 0a srl %g1, 0xa, %g1
2046ba4: 82 00 60 01 inc %g1
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
2046ba8: f4 26 00 00 st %i2, [ %i0 ]
control->fs = fs;
2046bac: f2 26 20 04 st %i1, [ %i0 + 4 ]
control->block = block;
2046bb0: f8 26 20 08 st %i4, [ %i0 + 8 ]
control->size = size;
2046bb4: f6 26 20 0c st %i3, [ %i0 + 0xc ]
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
2046bb8: 7f ff 0a 14 call 2009408 <malloc>
2046bbc: 91 28 60 02 sll %g1, 2, %o0
if (!control->search_bits)
2046bc0: 80 a2 20 00 cmp %o0, 0
2046bc4: 02 80 00 04 be 2046bd4 <rtems_rfs_bitmap_open+0x3c> <== NEVER TAKEN
2046bc8: d0 26 20 14 st %o0, [ %i0 + 0x14 ]
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
2046bcc: 7f ff ff b6 call 2046aa4 <rtems_rfs_bitmap_create_search>
2046bd0: 81 e8 00 00 restore
}
2046bd4: 81 c7 e0 08 ret <== NOT EXECUTED
2046bd8: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED
0203a1cc <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)
{
203a1cc: 9d e3 bf a0 save %sp, -96, %sp
/*
* 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);
203a1d0: 96 10 20 01 mov 1, %o3
203a1d4: 90 10 00 18 mov %i0, %o0
203a1d8: 92 10 00 19 mov %i1, %o1
203a1dc: 40 00 04 86 call 203b3f4 <rtems_rfs_buffer_handle_request>
203a1e0: 94 10 00 1a mov %i2, %o2
if (rc > 0)
203a1e4: 80 a2 20 00 cmp %o0, 0
203a1e8: 24 80 00 04 ble,a 203a1f8 <rtems_rfs_block_find_indirect+0x2c><== ALWAYS TAKEN
203a1ec: c4 06 60 08 ld [ %i1 + 8 ], %g2
*result = 0;
rc = EIO;
}
return 0;
}
203a1f0: 81 c7 e0 08 ret
203a1f4: 91 e8 00 08 restore %g0, %o0, %o0
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
203a1f8: 83 2e e0 02 sll %i3, 2, %g1
203a1fc: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3
if ((*result + 1) == 0)
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
203a200: c8 06 20 04 ld [ %i0 + 4 ], %g4
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
203a204: fa 08 c0 01 ldub [ %g3 + %g1 ], %i5
203a208: 84 00 c0 01 add %g3, %g1, %g2
203a20c: c2 08 a0 03 ldub [ %g2 + 3 ], %g1
203a210: c6 08 a0 01 ldub [ %g2 + 1 ], %g3
203a214: c4 08 a0 02 ldub [ %g2 + 2 ], %g2
203a218: bb 2f 60 18 sll %i5, 0x18, %i5
203a21c: 85 28 a0 08 sll %g2, 8, %g2
203a220: 87 28 e0 10 sll %g3, 0x10, %g3
203a224: 82 10 40 1d or %g1, %i5, %g1
203a228: 82 10 40 03 or %g1, %g3, %g1
203a22c: 82 10 40 02 or %g1, %g2, %g1
if ((*result + 1) == 0)
*result = 0;
203a230: 84 38 00 01 xnor %g0, %g1, %g2
203a234: 80 a0 00 02 cmp %g0, %g2
203a238: 84 60 20 00 subx %g0, 0, %g2
203a23c: 82 08 40 02 and %g1, %g2, %g1
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
if ((*result + 1) == 0)
203a240: c2 27 00 00 st %g1, [ %i4 ]
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
203a244: 80 a0 40 04 cmp %g1, %g4
203a248: 0a bf ff ea bcs 203a1f0 <rtems_rfs_block_find_indirect+0x24><== ALWAYS TAKEN
203a24c: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
203a250: 90 10 20 00 clr %o0 <== NOT EXECUTED
203a254: 7f ff b0 76 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203a258: 13 00 00 04 sethi %hi(0x1000), %o1 <== NOT EXECUTED
203a25c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203a260: 32 80 00 06 bne,a 203a278 <rtems_rfs_block_find_indirect+0xac><== NOT EXECUTED
203a264: d2 07 00 00 ld [ %i4 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
203a268: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
203a26c: 90 10 20 00 clr %o0 <== NOT EXECUTED
rc = EIO;
}
return 0;
}
203a270: 81 c7 e0 08 ret <== NOT EXECUTED
203a274: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
printf ("rtems-rfs: block-find: invalid block in table:"
203a278: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203a27c: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203a280: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
203a284: 40 00 46 53 call 204bbd0 <printf> <== NOT EXECUTED
203a288: 90 12 22 90 or %o0, 0x290, %o0 <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
203a28c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203a290: 10 bf ff f8 b 203a270 <rtems_rfs_block_find_indirect+0xa4><== NOT EXECUTED
203a294: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
0203a2f8 <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)
{
203a2f8: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
if (pos == 0)
203a2fc: 80 96 40 1a orcc %i1, %i2, %g0 <== NOT EXECUTED
203a300: 02 80 00 11 be 203a344 <rtems_rfs_block_get_block_size+0x4c><== NOT EXECUTED
203a304: 94 10 20 00 clr %o2 <== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
203a308: fa 06 20 08 ld [ %i0 + 8 ], %i5 <== NOT EXECUTED
203a30c: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
203a310: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
203a314: 40 00 9d 79 call 20618f8 <__udivdi3> <== NOT EXECUTED
203a318: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203a31c: 92 02 60 01 inc %o1 <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
203a320: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
if (pos == 0)
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
203a324: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
203a328: 94 10 20 00 clr %o2 <== NOT EXECUTED
203a32c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203a330: 40 00 9e 47 call 2061c4c <__umoddi3> <== NOT EXECUTED
203a334: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
203a338: d2 26 e0 04 st %o1, [ %i3 + 4 ] <== NOT EXECUTED
203a33c: 81 c7 e0 08 ret <== NOT EXECUTED
203a340: 81 e8 00 00 restore <== 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;
203a344: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
size->offset = 0;
203a348: c0 26 e0 04 clr [ %i3 + 4 ] <== NOT EXECUTED
203a34c: 81 c7 e0 08 ret <== NOT EXECUTED
203a350: 81 e8 00 00 restore <== NOT EXECUTED
0203a53c <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
203a53c: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
int brc;
if (map->dirty && map->inode)
203a540: c2 0e 40 00 ldub [ %i1 ], %g1
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
203a544: ba 10 00 18 mov %i0, %i5
int rc = 0;
int brc;
if (map->dirty && map->inode)
203a548: 80 a0 60 00 cmp %g1, 0
203a54c: 02 80 00 0b be 203a578 <rtems_rfs_block_map_close+0x3c>
203a550: b0 10 20 00 clr %i0
203a554: d2 06 60 04 ld [ %i1 + 4 ], %o1
203a558: 80 a2 60 00 cmp %o1, 0
203a55c: 22 80 00 08 be,a 203a57c <rtems_rfs_block_map_close+0x40><== NEVER TAKEN
203a560: 92 06 60 38 add %i1, 0x38, %o1 <== NOT EXECUTED
{
brc = rtems_rfs_inode_load (fs, map->inode);
203a564: 40 00 16 eb call 2040110 <rtems_rfs_inode_load>
203a568: 90 10 00 1d mov %i5, %o0
if (brc > 0)
203a56c: b0 92 20 00 orcc %o0, 0, %i0
203a570: 04 80 00 11 ble 203a5b4 <rtems_rfs_block_map_close+0x78> <== ALWAYS TAKEN
203a574: 84 10 20 01 mov 1, %g2
*/
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);
203a578: 92 06 60 38 add %i1, 0x38, %o1
map->dirty = false;
}
}
map->inode = NULL;
203a57c: c0 26 60 04 clr [ %i1 + 4 ]
203a580: 40 00 03 22 call 203b208 <rtems_rfs_buffer_handle_release>
203a584: 90 10 00 1d mov %i5, %o0
203a588: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
203a58c: c0 2e 60 38 clrb [ %i1 + 0x38 ]
handle->bnum = 0;
203a590: c0 26 60 3c clr [ %i1 + 0x3c ]
handle->buffer = NULL;
203a594: c0 26 60 40 clr [ %i1 + 0x40 ]
*/
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);
203a598: 40 00 03 1c call 203b208 <rtems_rfs_buffer_handle_release>
203a59c: 92 06 60 44 add %i1, 0x44, %o1
handle->dirty = false;
203a5a0: c0 2e 60 44 clrb [ %i1 + 0x44 ]
handle->bnum = 0;
203a5a4: c0 26 60 48 clr [ %i1 + 0x48 ]
handle->buffer = NULL;
203a5a8: c0 26 60 4c clr [ %i1 + 0x4c ]
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
203a5ac: 81 c7 e0 08 ret
203a5b0: 81 e8 00 00 restore
int brc;
if (map->dirty && map->inode)
{
brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
203a5b4: 88 10 20 00 clr %g4
*/
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);
203a5b8: 98 10 20 01 mov 1, %o4
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]);
203a5bc: c2 06 60 04 ld [ %i1 + 4 ], %g1
return rc;
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
203a5c0: 86 06 40 02 add %i1, %g2, %g3
* @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);
203a5c4: da 00 60 0c ld [ %g1 + 0xc ], %o5
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]);
203a5c8: c6 00 e0 23 ld [ %g3 + 0x23 ], %g3
203a5cc: b0 01 20 06 add %g4, 6, %i0
203a5d0: b1 2e 20 02 sll %i0, 2, %i0
203a5d4: b0 03 40 18 add %o5, %i0, %i0
203a5d8: 9f 30 e0 18 srl %g3, 0x18, %o7
203a5dc: de 2e 20 04 stb %o7, [ %i0 + 4 ]
203a5e0: f0 00 60 0c ld [ %g1 + 0xc ], %i0
203a5e4: 9f 30 e0 10 srl %g3, 0x10, %o7
203a5e8: b0 06 00 02 add %i0, %g2, %i0
203a5ec: de 2e 20 1c stb %o7, [ %i0 + 0x1c ]
203a5f0: f0 00 60 0c ld [ %g1 + 0xc ], %i0
203a5f4: 9f 30 e0 08 srl %g3, 8, %o7
203a5f8: b0 06 00 02 add %i0, %g2, %i0
203a5fc: de 2e 20 1d stb %o7, [ %i0 + 0x1d ]
203a600: f0 00 60 0c ld [ %g1 + 0xc ], %i0
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
203a604: 88 01 20 01 inc %g4
203a608: b0 06 00 02 add %i0, %g2, %i0
203a60c: c6 2e 20 1e stb %g3, [ %i0 + 0x1e ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203a610: d8 28 60 10 stb %o4, [ %g1 + 0x10 ]
203a614: 84 00 a0 04 add %g2, 4, %g2
203a618: 80 a1 20 05 cmp %g4, 5
203a61c: 12 bf ff e8 bne 203a5bc <rtems_rfs_block_map_close+0x80>
203a620: 82 10 20 01 mov 1, %g1
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
203a624: c6 06 60 04 ld [ %i1 + 4 ], %g3
203a628: c4 06 60 08 ld [ %i1 + 8 ], %g2
* @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);
203a62c: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
203a630: b1 30 a0 18 srl %g2, 0x18, %i0
203a634: f0 29 20 0c stb %i0, [ %g4 + 0xc ]
203a638: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
203a63c: b1 30 a0 10 srl %g2, 0x10, %i0
203a640: f0 29 20 0d stb %i0, [ %g4 + 0xd ]
203a644: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
203a648: b1 30 a0 08 srl %g2, 8, %i0
203a64c: f0 29 20 0e stb %i0, [ %g4 + 0xe ]
203a650: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
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);
203a654: 90 10 00 1d mov %i5, %o0
203a658: c4 29 20 0f stb %g2, [ %g4 + 0xf ]
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);
203a65c: c8 06 60 04 ld [ %i1 + 4 ], %g4
203a660: c4 06 60 0c ld [ %i1 + 0xc ], %g2
*/
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);
203a664: f0 01 20 0c ld [ %g4 + 0xc ], %i0
*/
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);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203a668: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
*/
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);
203a66c: 87 30 a0 08 srl %g2, 8, %g3
203a670: c6 2e 20 0a stb %g3, [ %i0 + 0xa ]
203a674: c6 01 20 0c ld [ %g4 + 0xc ], %g3
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);
203a678: 94 10 20 01 mov 1, %o2
203a67c: c4 28 e0 0b stb %g2, [ %g3 + 0xb ]
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);
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
203a680: c6 06 60 04 ld [ %i1 + 4 ], %g3
203a684: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
* @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);
203a688: f0 00 e0 0c ld [ %g3 + 0xc ], %i0
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);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203a68c: c2 29 20 10 stb %g1, [ %g4 + 0x10 ]
* @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);
203a690: 89 30 a0 18 srl %g2, 0x18, %g4
203a694: c8 2e 20 30 stb %g4, [ %i0 + 0x30 ]
203a698: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
203a69c: b1 30 a0 10 srl %g2, 0x10, %i0
203a6a0: f0 29 20 31 stb %i0, [ %g4 + 0x31 ]
203a6a4: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
203a6a8: b1 30 a0 08 srl %g2, 8, %i0
203a6ac: f0 29 20 32 stb %i0, [ %g4 + 0x32 ]
203a6b0: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
203a6b4: c4 29 20 33 stb %g2, [ %g4 + 0x33 ]
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
203a6b8: c4 06 60 04 ld [ %i1 + 4 ], %g2
203a6bc: c8 06 60 20 ld [ %i1 + 0x20 ], %g4
* @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);
203a6c0: f0 00 a0 0c ld [ %g2 + 0xc ], %i0
*/
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);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203a6c4: c2 28 e0 10 stb %g1, [ %g3 + 0x10 ]
* @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);
203a6c8: 87 31 20 18 srl %g4, 0x18, %g3
203a6cc: c6 2e 20 34 stb %g3, [ %i0 + 0x34 ]
203a6d0: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
203a6d4: b1 31 20 10 srl %g4, 0x10, %i0
203a6d8: f0 28 e0 35 stb %i0, [ %g3 + 0x35 ]
203a6dc: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
203a6e0: b1 31 20 08 srl %g4, 8, %i0
203a6e4: f0 28 e0 36 stb %i0, [ %g3 + 0x36 ]
203a6e8: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
203a6ec: c8 28 e0 37 stb %g4, [ %g3 + 0x37 ]
brc = rtems_rfs_inode_unload (fs, map->inode, true);
203a6f0: d2 06 60 04 ld [ %i1 + 4 ], %o1
203a6f4: 40 00 16 eb call 20402a0 <rtems_rfs_inode_unload>
203a6f8: c2 28 a0 10 stb %g1, [ %g2 + 0x10 ]
if (brc > 0)
rc = brc;
map->dirty = false;
203a6fc: c0 2e 40 00 clrb [ %i1 ]
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
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);
203a700: 82 38 00 08 xnor %g0, %o0, %g1
203a704: 83 38 60 1f sra %g1, 0x1f, %g1
203a708: 10 bf ff 9c b 203a578 <rtems_rfs_block_map_close+0x3c>
203a70c: b0 0a 00 01 and %o0, %g1, %i0
0203a710 <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)
{
203a710: 9d e3 bf 98 save %sp, -104, %sp
int rc = 0;
*block = 0;
203a714: c0 26 c0 00 clr [ %i3 ]
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
203a718: e0 06 80 00 ld [ %i2 ], %l0
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)
{
203a71c: ba 10 00 18 mov %i0, %i5
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
203a720: 80 a4 20 00 cmp %l0, 0
203a724: 02 80 00 05 be 203a738 <rtems_rfs_block_map_find+0x28>
203a728: e2 06 60 08 ld [ %i1 + 8 ], %l1
203a72c: 80 a4 60 00 cmp %l1, 0
203a730: 02 80 00 4b be 203a85c <rtems_rfs_block_map_find+0x14c> <== NEVER TAKEN
203a734: b0 10 20 06 mov 6, %i0
203a738: 80 a4 00 11 cmp %l0, %l1
203a73c: 1a 80 00 48 bcc 203a85c <rtems_rfs_block_map_find+0x14c>
203a740: b0 10 20 06 mov 6, %i0
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))
203a744: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
203a748: 80 a4 00 01 cmp %l0, %g1
203a74c: 22 80 00 14 be,a 203a79c <rtems_rfs_block_map_find+0x8c>
203a750: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
/*
* 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)
203a754: 80 a4 60 05 cmp %l1, 5
203a758: 38 80 00 16 bgu,a 203a7b0 <rtems_rfs_block_map_find+0xa0>
203a75c: e4 07 60 34 ld [ %i5 + 0x34 ], %l2
{
*block = map->blocks[bpos->bno];
203a760: a0 04 20 08 add %l0, 8, %l0
203a764: a1 2c 20 02 sll %l0, 2, %l0
203a768: a0 06 40 10 add %i1, %l0, %l0
203a76c: c2 04 20 04 ld [ %l0 + 4 ], %g1
203a770: c2 26 c0 00 st %g1, [ %i3 ]
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
203a774: c6 06 a0 08 ld [ %i2 + 8 ], %g3
203a778: c2 06 a0 04 ld [ %i2 + 4 ], %g1
203a77c: c4 06 80 00 ld [ %i2 ], %g2
203a780: c6 26 60 18 st %g3, [ %i1 + 0x18 ]
203a784: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
203a788: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
map->bpos.block = *block;
203a78c: c2 06 c0 00 ld [ %i3 ], %g1
203a790: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
}
return rc;
}
203a794: 81 c7 e0 08 ret
203a798: 91 e8 20 00 restore %g0, 0, %o0
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))
203a79c: 80 a0 60 00 cmp %g1, 0
203a7a0: 02 bf ff ee be 203a758 <rtems_rfs_block_map_find+0x48>
203a7a4: 80 a4 60 05 cmp %l1, 5
* 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)
{
*block = map->blocks[bpos->bno];
203a7a8: 10 bf ff f3 b 203a774 <rtems_rfs_block_map_find+0x64>
203a7ac: c2 26 c0 00 st %g1, [ %i3 ]
* 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;
203a7b0: 90 10 00 10 mov %l0, %o0
203a7b4: 40 00 99 66 call 2060d4c <.urem>
203a7b8: 92 10 00 12 mov %l2, %o1
singly = bpos->bno / fs->blocks_per_block;
203a7bc: 92 10 00 12 mov %l2, %o1
* 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;
203a7c0: b8 10 00 08 mov %o0, %i4
singly = bpos->bno / fs->blocks_per_block;
203a7c4: 40 00 98 b6 call 2060a9c <.udiv>
203a7c8: 90 10 00 10 mov %l0, %o0
if (map->size.count <= fs->block_map_singly_blocks)
203a7cc: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = bpos->bno % fs->blocks_per_block;
singly = bpos->bno / fs->blocks_per_block;
203a7d0: d0 27 bf fc st %o0, [ %fp + -4 ]
if (map->size.count <= fs->block_map_singly_blocks)
203a7d4: 80 a0 40 11 cmp %g1, %l1
203a7d8: 1a 80 00 23 bcc 203a864 <rtems_rfs_block_map_find+0x154> <== ALWAYS TAKEN
203a7dc: a6 10 00 08 mov %o0, %l3
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
203a7e0: 40 00 99 5b call 2060d4c <.urem> <== NOT EXECUTED
203a7e4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
203a7e8: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
203a7ec: d0 27 bf fc st %o0, [ %fp + -4 ] <== NOT EXECUTED
203a7f0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
203a7f4: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED
203a7f8: 08 80 00 19 bleu 203a85c <rtems_rfs_block_map_find+0x14c> <== NOT EXECUTED
203a7fc: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
/*
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
203a800: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
203a804: 40 00 98 a6 call 2060a9c <.udiv> <== NOT EXECUTED
203a808: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
singly %= fs->blocks_per_block;
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
203a80c: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
203a810: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
203a814: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
203a818: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
203a81c: 92 06 60 44 add %i1, 0x44, %o1 <== NOT EXECUTED
203a820: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203a824: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
203a828: 7f ff fe 69 call 203a1cc <rtems_rfs_block_find_indirect> <== NOT EXECUTED
203a82c: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
203a830: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203a834: 12 80 00 0a bne 203a85c <rtems_rfs_block_map_find+0x14c> <== NOT EXECUTED
203a838: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
203a83c: 90 10 00 1d mov %i5, %o0
203a840: 92 06 60 38 add %i1, 0x38, %o1
203a844: 96 10 00 1c mov %i4, %o3
203a848: 7f ff fe 61 call 203a1cc <rtems_rfs_block_find_indirect>
203a84c: 98 10 00 1b mov %i3, %o4
}
}
}
}
if (rc == 0)
203a850: b0 92 20 00 orcc %o0, 0, %i0
203a854: 22 bf ff c9 be,a 203a778 <rtems_rfs_block_map_find+0x68> <== ALWAYS TAKEN
203a858: c6 06 a0 08 ld [ %i2 + 8 ], %g3
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
203a85c: 81 c7 e0 08 ret
203a860: 81 e8 00 00 restore
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
203a864: 82 02 20 08 add %o0, 8, %g1
203a868: 83 28 60 02 sll %g1, 2, %g1
203a86c: 82 06 40 01 add %i1, %g1, %g1
203a870: 10 bf ff f3 b 203a83c <rtems_rfs_block_map_find+0x12c>
203a874: d4 00 60 04 ld [ %g1 + 4 ], %o2
0203a920 <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)
{
203a920: 9d e3 bf 98 save %sp, -104, %sp
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
203a924: 90 10 20 00 clr %o0
203a928: 13 00 00 08 sethi %hi(0x2000), %o1
203a92c: 7f ff ae c0 call 202642c <rtems_rfs_trace>
203a930: ba 10 00 18 mov %i0, %i5
203a934: 80 8a 20 ff btst 0xff, %o0
203a938: 32 80 00 ce bne,a 203ac70 <rtems_rfs_block_map_grow+0x350><== NEVER TAKEN
203a93c: d4 06 60 08 ld [ %i1 + 8 ], %o2 <== NOT EXECUTED
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))
203a940: c4 06 60 08 ld [ %i1 + 8 ], %g2
203a944: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
203a948: 84 06 80 02 add %i2, %g2, %g2
203a94c: 80 a0 80 01 cmp %g2, %g1
203a950: 1a 80 00 e1 bcc 203acd4 <rtems_rfs_block_map_grow+0x3b4> <== NEVER TAKEN
203a954: b0 10 20 1b mov 0x1b, %i0
/*
* 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++)
203a958: 80 a6 a0 00 cmp %i2, 0
203a95c: 02 80 00 de be 203acd4 <rtems_rfs_block_map_grow+0x3b4> <== NEVER TAKEN
203a960: b0 10 20 00 clr %i0
203a964: d2 06 60 20 ld [ %i1 + 0x20 ], %o1
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
203a968: b8 10 20 00 clr %i4
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
203a96c: a2 10 20 01 mov 1, %l1
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
203a970: aa 06 60 44 add %i1, 0x44, %l5
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203a974: 10 80 00 11 b 203a9b8 <rtems_rfs_block_map_grow+0x98>
203a978: a8 06 60 38 add %i1, 0x38, %l4
false, &block);
if (rc > 0)
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
map->blocks[map->size.count] = block;
203a97c: 82 06 20 08 add %i0, 8, %g1
203a980: 83 28 60 02 sll %g1, 2, %g1
203a984: 82 06 40 01 add %i1, %g1, %g1
203a988: d2 20 60 04 st %o1, [ %g1 + 4 ]
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
}
map->size.count++;
203a98c: b0 06 20 01 inc %i0
map->size.offset = 0;
203a990: c0 26 60 0c clr [ %i1 + 0xc ]
if (b == 0)
203a994: 80 a7 20 00 cmp %i4, 0
203a998: 12 80 00 03 bne 203a9a4 <rtems_rfs_block_map_grow+0x84> <== NEVER TAKEN
203a99c: f0 26 60 08 st %i0, [ %i1 + 8 ]
*new_block = block;
203a9a0: d2 26 c0 00 st %o1, [ %i3 ]
map->last_data_block = block;
203a9a4: d2 26 60 20 st %o1, [ %i1 + 0x20 ]
/*
* 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++)
203a9a8: b8 07 20 01 inc %i4
203a9ac: 80 a7 00 1a cmp %i4, %i2
203a9b0: 02 80 00 cb be 203acdc <rtems_rfs_block_map_grow+0x3bc> <== ALWAYS TAKEN
203a9b4: e2 2e 40 00 stb %l1, [ %i1 ]
/*
* 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,
203a9b8: 90 10 00 1d mov %i5, %o0
203a9bc: 94 10 20 00 clr %o2
203a9c0: 40 00 14 85 call 203fbd4 <rtems_rfs_group_bitmap_alloc>
203a9c4: 96 07 bf f8 add %fp, -8, %o3
false, &block);
if (rc > 0)
203a9c8: b0 92 20 00 orcc %o0, 0, %i0
203a9cc: 14 80 00 ca bg 203acf4 <rtems_rfs_block_map_grow+0x3d4>
203a9d0: 01 00 00 00 nop
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
203a9d4: f0 06 60 08 ld [ %i1 + 8 ], %i0
203a9d8: 80 a6 20 04 cmp %i0, 4
203a9dc: 08 bf ff e8 bleu 203a97c <rtems_rfs_block_map_grow+0x5c>
203a9e0: d2 07 bf f8 ld [ %fp + -8 ], %o1
* 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;
203a9e4: e4 07 60 34 ld [ %i5 + 0x34 ], %l2
203a9e8: 90 10 00 18 mov %i0, %o0
203a9ec: 40 00 98 d8 call 2060d4c <.urem>
203a9f0: 92 10 00 12 mov %l2, %o1
singly = map->size.count / fs->blocks_per_block;
203a9f4: 92 10 00 12 mov %l2, %o1
* 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;
203a9f8: a0 10 00 08 mov %o0, %l0
singly = map->size.count / fs->blocks_per_block;
203a9fc: 40 00 98 28 call 2060a9c <.udiv>
203aa00: 90 10 00 18 mov %i0, %o0
if (map->size.count < fs->block_map_singly_blocks)
203aa04: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
203aa08: 80 a6 00 01 cmp %i0, %g1
203aa0c: 1a 80 00 31 bcc 203aad0 <rtems_rfs_block_map_grow+0x1b0> <== NEVER TAKEN
203aa10: ac 10 00 08 mov %o0, %l6
* 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) ||
203aa14: 80 a4 20 00 cmp %l0, 0
203aa18: 02 80 00 06 be 203aa30 <rtems_rfs_block_map_grow+0x110> <== NEVER TAKEN
203aa1c: 80 a4 20 05 cmp %l0, 5
203aa20: 12 80 00 8a bne 203ac48 <rtems_rfs_block_map_grow+0x328>
203aa24: 80 a2 20 00 cmp %o0, 0
203aa28: 12 80 00 89 bne 203ac4c <rtems_rfs_block_map_grow+0x32c> <== NEVER TAKEN
203aa2c: 82 05 a0 08 add %l6, 8, %g1
{
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
203aa30: b0 1e 20 05 xor %i0, 5, %i0
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
203aa34: 80 a0 00 18 cmp %g0, %i0
203aa38: 96 05 a0 08 add %l6, 8, %o3
203aa3c: 90 10 00 1d mov %i5, %o0
203aa40: 97 2a e0 02 sll %o3, 2, %o3
203aa44: 92 10 00 19 mov %i1, %o1
203aa48: 96 06 40 0b add %i1, %o3, %o3
203aa4c: 94 10 00 14 mov %l4, %o2
203aa50: 96 02 e0 04 add %o3, 4, %o3
203aa54: 7f ff fd 8d call 203a088 <rtems_rfs_block_map_indirect_alloc>
203aa58: 98 60 3f ff subx %g0, -1, %o4
203aa5c: b0 10 00 08 mov %o0, %i0
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
203aa60: 80 a6 20 00 cmp %i0, 0
203aa64: 14 80 00 a1 bg 203ace8 <rtems_rfs_block_map_grow+0x3c8> <== NEVER TAKEN
203aa68: d4 07 bf f8 ld [ %fp + -8 ], %o2
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
203aa6c: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
203aa70: c4 0f bf f8 ldub [ %fp + -8 ], %g2
203aa74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
203aa78: a1 2c 20 02 sll %l0, 2, %l0
203aa7c: c4 28 40 10 stb %g2, [ %g1 + %l0 ]
203aa80: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
203aa84: c4 17 bf f8 lduh [ %fp + -8 ], %g2
203aa88: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
203aa8c: 82 00 40 10 add %g1, %l0, %g1
203aa90: c4 28 60 01 stb %g2, [ %g1 + 1 ]
203aa94: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
203aa98: c4 07 bf f8 ld [ %fp + -8 ], %g2
203aa9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
203aaa0: 85 30 a0 08 srl %g2, 8, %g2
203aaa4: 82 00 40 10 add %g1, %l0, %g1
203aaa8: c4 28 60 02 stb %g2, [ %g1 + 2 ]
203aaac: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
203aab0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
203aab4: a0 00 40 10 add %g1, %l0, %l0
203aab8: c2 07 bf f8 ld [ %fp + -8 ], %g1
203aabc: c2 2c 20 03 stb %g1, [ %l0 + 3 ]
203aac0: e2 2e 60 38 stb %l1, [ %i1 + 0x38 ]
203aac4: f0 06 60 08 ld [ %i1 + 8 ], %i0
203aac8: 10 bf ff b1 b 203a98c <rtems_rfs_block_map_grow+0x6c>
203aacc: d2 07 bf f8 ld [ %fp + -8 ], %o1
* Doubly indirect tables are being used.
*/
rtems_rfs_block_no doubly;
rtems_rfs_block_no singly_block;
doubly = singly / fs->blocks_per_block;
203aad0: 40 00 97 f3 call 2060a9c <.udiv> <== NOT EXECUTED
203aad4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
singly %= fs->blocks_per_block;
203aad8: 92 10 00 12 mov %l2, %o1 <== 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;
203aadc: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
singly %= fs->blocks_per_block;
203aae0: 40 00 98 9b call 2060d4c <.urem> <== NOT EXECUTED
203aae4: 90 10 00 16 mov %l6, %o0 <== 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)
203aae8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
203aaec: 12 80 00 38 bne 203abcc <rtems_rfs_block_map_grow+0x2ac> <== NOT EXECUTED
203aaf0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
203aaf4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203aaf8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203aafc: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
203ab00: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
203ab04: 7f ff fd 61 call 203a088 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
203ab08: 98 10 20 00 clr %o4 <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
203ab0c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203ab10: 14 80 00 75 bg 203ace4 <rtems_rfs_block_map_grow+0x3c4> <== NOT EXECUTED
203ab14: 80 a4 a0 00 cmp %l2, 0 <== 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) ||
203ab18: 02 80 00 06 be 203ab30 <rtems_rfs_block_map_grow+0x210> <== NOT EXECUTED
203ab1c: 80 a4 a0 05 cmp %l2, 5 <== NOT EXECUTED
203ab20: 12 80 00 5a bne 203ac88 <rtems_rfs_block_map_grow+0x368> <== NOT EXECUTED
203ab24: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
203ab28: 12 80 00 59 bne 203ac8c <rtems_rfs_block_map_grow+0x36c> <== NOT EXECUTED
203ab2c: 82 04 e0 08 add %l3, 8, %g1 <== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
203ab30: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
203ab34: c2 07 60 38 ld [ %i5 + 0x38 ], %g1 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
203ab38: 96 04 e0 08 add %l3, 8, %o3 <== NOT EXECUTED
*/
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
203ab3c: 82 18 80 01 xor %g2, %g1, %g1 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
203ab40: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
203ab44: 97 2a e0 02 sll %o3, 2, %o3 <== NOT EXECUTED
203ab48: 98 60 3f ff subx %g0, -1, %o4 <== NOT EXECUTED
203ab4c: 96 06 40 0b add %i1, %o3, %o3 <== NOT EXECUTED
203ab50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203ab54: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203ab58: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED
203ab5c: 7f ff fd 4b call 203a088 <rtems_rfs_block_map_indirect_alloc><== NOT EXECUTED
203ab60: 96 02 e0 04 add %o3, 4, %o3 <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
203ab64: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203ab68: 14 80 00 54 bg 203acb8 <rtems_rfs_block_map_grow+0x398> <== NOT EXECUTED
203ab6c: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
203ab70: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
203ab74: c4 0f bf fc ldub [ %fp + -4 ], %g2 <== NOT EXECUTED
203ab78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
203ab7c: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED
203ab80: c4 28 40 12 stb %g2, [ %g1 + %l2 ] <== NOT EXECUTED
203ab84: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
203ab88: c4 17 bf fc lduh [ %fp + -4 ], %g2 <== NOT EXECUTED
203ab8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
203ab90: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
203ab94: c4 28 60 01 stb %g2, [ %g1 + 1 ] <== NOT EXECUTED
203ab98: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
203ab9c: c4 07 bf fc ld [ %fp + -4 ], %g2 <== NOT EXECUTED
203aba0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
203aba4: 85 30 a0 08 srl %g2, 8, %g2 <== NOT EXECUTED
203aba8: 82 00 40 12 add %g1, %l2, %g1 <== NOT EXECUTED
203abac: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
203abb0: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
203abb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
203abb8: a4 00 40 12 add %g1, %l2, %l2 <== NOT EXECUTED
203abbc: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
203abc0: c2 2c a0 03 stb %g1, [ %l2 + 3 ] <== NOT EXECUTED
203abc4: 10 bf ff aa b 203aa6c <rtems_rfs_block_map_grow+0x14c> <== NOT EXECUTED
203abc8: e2 2e 60 44 stb %l1, [ %i1 + 0x44 ] <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
203abcc: a6 04 e0 08 add %l3, 8, %l3 <== NOT EXECUTED
203abd0: a7 2c e0 02 sll %l3, 2, %l3 <== NOT EXECUTED
203abd4: a6 06 40 13 add %i1, %l3, %l3 <== NOT EXECUTED
203abd8: d4 04 e0 04 ld [ %l3 + 4 ], %o2 <== NOT EXECUTED
203abdc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203abe0: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
203abe4: 40 00 02 04 call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
203abe8: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
203abec: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203abf0: 14 80 00 3d bg 203ace4 <rtems_rfs_block_map_grow+0x3c4> <== NOT EXECUTED
203abf4: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
203abf8: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
203abfc: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ac00: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
203ac04: c6 08 80 12 ldub [ %g2 + %l2 ], %g3 <== NOT EXECUTED
203ac08: 82 00 80 12 add %g2, %l2, %g1 <== NOT EXECUTED
203ac0c: d4 08 60 03 ldub [ %g1 + 3 ], %o2 <== NOT EXECUTED
203ac10: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
203ac14: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
203ac18: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
203ac1c: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
203ac20: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
203ac24: 94 12 80 03 or %o2, %g3, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ac28: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
203ac2c: 94 12 80 02 or %o2, %g2, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ac30: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
203ac34: 94 12 80 01 or %o2, %g1, %o2 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ac38: 40 00 01 ef call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
203ac3c: d4 27 bf fc st %o2, [ %fp + -4 ] <== NOT EXECUTED
203ac40: 10 bf ff 88 b 203aa60 <rtems_rfs_block_map_grow+0x140> <== NOT EXECUTED
203ac44: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ac48: 82 05 a0 08 add %l6, 8, %g1
203ac4c: 83 28 60 02 sll %g1, 2, %g1
203ac50: 82 06 40 01 add %i1, %g1, %g1
203ac54: d4 00 60 04 ld [ %g1 + 4 ], %o2
203ac58: 90 10 00 1d mov %i5, %o0
203ac5c: 92 10 00 14 mov %l4, %o1
203ac60: 40 00 01 e5 call 203b3f4 <rtems_rfs_buffer_handle_request>
203ac64: 96 10 20 01 mov 1, %o3
203ac68: 10 bf ff 7e b 203aa60 <rtems_rfs_block_map_grow+0x140>
203ac6c: b0 10 00 08 mov %o0, %i0
rtems_rfs_block_no* new_block)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
203ac70: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203ac74: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203ac78: 40 00 43 d6 call 204bbd0 <printf> <== NOT EXECUTED
203ac7c: 90 12 22 e0 or %o0, 0x2e0, %o0 ! 206bae0 <__FUNCTION__.7603+0xb8><== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
203ac80: 10 bf ff 31 b 203a944 <rtems_rfs_block_map_grow+0x24> <== NOT EXECUTED
203ac84: c4 06 60 08 ld [ %i1 + 8 ], %g2 <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
203ac88: 82 04 e0 08 add %l3, 8, %g1 <== NOT EXECUTED
203ac8c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
203ac90: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
203ac94: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== NOT EXECUTED
203ac98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203ac9c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED
203aca0: 40 00 01 d5 call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
203aca4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
203aca8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203acac: 24 bf ff b2 ble,a 203ab74 <rtems_rfs_block_map_grow+0x254><== NOT EXECUTED
203acb0: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
203acb4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
203acb8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203acbc: 40 00 14 53 call 203fe08 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
203acc0: 92 10 20 00 clr %o1 <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
203acc4: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
203acc8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203accc: 40 00 14 4f call 203fe08 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
203acd0: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
203acd4: 81 c7 e0 08 ret <== NOT EXECUTED
203acd8: 81 e8 00 00 restore <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
203acdc: 81 c7 e0 08 ret
203ace0: 91 e8 20 00 restore %g0, 0, %o0
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
singly_block, true);
if (rc > 0)
{
rtems_rfs_group_bitmap_free (fs, false, block);
203ace4: d4 07 bf f8 ld [ %fp + -8 ], %o2 <== NOT EXECUTED
203ace8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203acec: 40 00 14 47 call 203fe08 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
203acf0: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
203acf4: 81 c7 e0 08 ret
203acf8: 81 e8 00 00 restore
0203a088 <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)
{
203a088: 9d e3 bf 98 save %sp, -104, %sp
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);
203a08c: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
203a090: 90 10 00 18 mov %i0, %o0
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)
{
203a094: ba 10 00 18 mov %i0, %i5
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);
203a098: 94 10 20 00 clr %o2
203a09c: 40 00 16 ce call 203fbd4 <rtems_rfs_group_bitmap_alloc>
203a0a0: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
203a0a4: b0 92 20 00 orcc %o0, 0, %i0
203a0a8: 14 80 00 0c bg 203a0d8 <rtems_rfs_block_map_indirect_alloc+0x50><== NEVER TAKEN
203a0ac: d4 07 bf fc ld [ %fp + -4 ], %o2
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
203a0b0: 90 10 00 1d mov %i5, %o0
203a0b4: 92 10 00 1a mov %i2, %o1
203a0b8: 40 00 04 cf call 203b3f4 <rtems_rfs_buffer_handle_request>
203a0bc: 96 10 20 00 clr %o3
if (rc > 0)
203a0c0: b0 92 20 00 orcc %o0, 0, %i0
203a0c4: 04 80 00 07 ble 203a0e0 <rtems_rfs_block_map_indirect_alloc+0x58><== ALWAYS TAKEN
203a0c8: d4 07 bf fc ld [ %fp + -4 ], %o2
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
203a0cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203a0d0: 40 00 17 4e call 203fe08 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
203a0d4: 92 10 20 00 clr %o1 <== NOT EXECUTED
return rc;
203a0d8: 81 c7 e0 08 ret <== NOT EXECUTED
203a0dc: 81 e8 00 00 restore <== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
203a0e0: c2 06 a0 08 ld [ %i2 + 8 ], %g1
203a0e4: d4 07 60 08 ld [ %i5 + 8 ], %o2
203a0e8: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
203a0ec: 40 00 42 4d call 204aa20 <memset>
203a0f0: 92 10 20 ff mov 0xff, %o1
if (upping)
203a0f4: 80 a7 20 00 cmp %i4, 0
203a0f8: 12 80 00 08 bne 203a118 <rtems_rfs_block_map_indirect_alloc+0x90><== ALWAYS TAKEN
203a0fc: c2 07 bf fc ld [ %fp + -4 ], %g1
map->size.count);
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);
203a100: 84 10 20 01 mov 1, %g2
203a104: c4 2e 80 00 stb %g2, [ %i2 ]
*block = new_block;
203a108: c2 26 c0 00 st %g1, [ %i3 ]
map->last_map_block = new_block;
203a10c: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
return 0;
}
203a110: 81 c7 e0 08 ret
203a114: 91 e8 20 00 restore %g0, 0, %o0
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
203a118: 90 10 20 00 clr %o0
203a11c: 7f ff b0 c4 call 202642c <rtems_rfs_trace>
203a120: 13 00 00 08 sethi %hi(0x2000), %o1
203a124: 80 8a 20 ff btst 0xff, %o0
203a128: 32 80 00 24 bne,a 203a1b8 <rtems_rfs_block_map_indirect_alloc+0x130><== NEVER TAKEN
203a12c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
203a130: 84 10 00 19 mov %i1, %g2
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)
{
203a134: 82 10 20 00 clr %g1
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]);
203a138: ba 10 20 01 mov 1, %i5
203a13c: c6 06 a0 08 ld [ %i2 + 8 ], %g3
203a140: c8 08 a0 24 ldub [ %g2 + 0x24 ], %g4
203a144: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
203a148: c8 28 c0 01 stb %g4, [ %g3 + %g1 ]
203a14c: c6 06 a0 08 ld [ %i2 + 8 ], %g3
203a150: c8 10 a0 24 lduh [ %g2 + 0x24 ], %g4
203a154: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
203a158: 86 00 c0 01 add %g3, %g1, %g3
203a15c: c8 28 e0 01 stb %g4, [ %g3 + 1 ]
203a160: c6 06 a0 08 ld [ %i2 + 8 ], %g3
203a164: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4
203a168: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
203a16c: 89 31 20 08 srl %g4, 8, %g4
203a170: 86 00 c0 01 add %g3, %g1, %g3
203a174: c8 28 e0 02 stb %g4, [ %g3 + 2 ]
203a178: c6 06 a0 08 ld [ %i2 + 8 ], %g3
203a17c: c8 00 a0 24 ld [ %g2 + 0x24 ], %g4
203a180: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
203a184: 84 00 a0 04 add %g2, 4, %g2
203a188: 86 00 c0 01 add %g3, %g1, %g3
203a18c: c8 28 e0 03 stb %g4, [ %g3 + 3 ]
203a190: 82 00 60 04 add %g1, 4, %g1
{
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++)
203a194: 80 a0 60 14 cmp %g1, 0x14
203a198: 12 bf ff e9 bne 203a13c <rtems_rfs_block_map_indirect_alloc+0xb4>
203a19c: fa 2e 80 00 stb %i5, [ %i2 ]
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
203a1a0: 90 06 60 24 add %i1, 0x24, %o0
203a1a4: 92 10 20 00 clr %o1
203a1a8: 40 00 42 1e call 204aa20 <memset>
203a1ac: 94 10 20 14 mov 0x14, %o2
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
203a1b0: 10 bf ff d4 b 203a100 <rtems_rfs_block_map_indirect_alloc+0x78>
203a1b4: c2 07 bf fc ld [ %fp + -4 ], %g1
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
if (upping)
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
203a1b8: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203a1bc: 40 00 46 85 call 204bbd0 <printf> <== NOT EXECUTED
203a1c0: 90 12 22 58 or %o0, 0x258, %o0 ! 206ba58 <__FUNCTION__.7603+0x30><== NOT EXECUTED
203a1c4: 10 bf ff dc b 203a134 <rtems_rfs_block_map_indirect_alloc+0xac><== NOT EXECUTED
203a1c8: 84 10 00 19 mov %i1, %g2 <== NOT EXECUTED
02039fd4 <rtems_rfs_block_map_indirect_shrink>:
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
2039fd4: 9d e3 bf a0 save %sp, -96, %sp
* 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) ||
2039fd8: 80 a7 20 00 cmp %i4, 0
2039fdc: 22 80 00 07 be,a 2039ff8 <rtems_rfs_block_map_indirect_shrink+0x24><== NEVER TAKEN
2039fe0: b6 06 e0 08 add %i3, 8, %i3 <== NOT EXECUTED
2039fe4: 80 a7 20 05 cmp %i4, 5
2039fe8: 02 80 00 11 be 203a02c <rtems_rfs_block_map_indirect_shrink+0x58>
2039fec: 80 a6 e0 00 cmp %i3, 0
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
2039ff0: 81 c7 e0 08 ret
2039ff4: 91 e8 20 00 restore %g0, 0, %o0
* 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];
2039ff8: b7 2e e0 02 sll %i3, 2, %i3 <== NOT EXECUTED
2039ffc: b6 06 40 1b add %i1, %i3, %i3 <== NOT EXECUTED
203a000: f8 06 e0 04 ld [ %i3 + 4 ], %i4 <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
203a004: c0 26 e0 04 clr [ %i3 + 4 ] <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
203a008: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203a00c: 92 10 20 00 clr %o1
203a010: 40 00 17 7e call 203fe08 <rtems_rfs_group_bitmap_free>
203a014: 94 10 00 1c mov %i4, %o2
if (rc > 0)
203a018: b0 92 20 00 orcc %o0, 0, %i0
203a01c: 24 80 00 02 ble,a 203a024 <rtems_rfs_block_map_indirect_shrink+0x50><== ALWAYS TAKEN
203a020: f8 26 60 1c st %i4, [ %i1 + 0x1c ]
map->last_map_block = block_to_free;
}
return rc;
}
203a024: 81 c7 e0 08 ret
203a028: 81 e8 00 00 restore
* 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) ||
203a02c: 12 bf ff f1 bne 2039ff0 <rtems_rfs_block_map_indirect_shrink+0x1c><== NEVER TAKEN
203a030: 84 10 20 00 clr %g2
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
203a034: c2 06 a0 08 ld [ %i2 + 8 ], %g1
203a038: f8 06 60 24 ld [ %i1 + 0x24 ], %i4
203a03c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
/*
* 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);
203a040: c8 08 40 00 ldub [ %g1 ], %g4
203a044: da 08 60 01 ldub [ %g1 + 1 ], %o5
203a048: de 08 60 03 ldub [ %g1 + 3 ], %o7
203a04c: f4 08 60 02 ldub [ %g1 + 2 ], %i2
* @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,
203a050: 86 06 40 02 add %i1, %g2, %g3
/*
* 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);
203a054: 89 29 20 18 sll %g4, 0x18, %g4
203a058: 9b 2b 60 10 sll %o5, 0x10, %o5
203a05c: b5 2e a0 08 sll %i2, 8, %i2
203a060: 88 11 00 0d or %g4, %o5, %g4
203a064: 88 11 00 0f or %g4, %o7, %g4
203a068: 88 11 00 1a or %g4, %i2, %g4
203a06c: c8 20 e0 24 st %g4, [ %g3 + 0x24 ]
203a070: 84 00 a0 04 add %g2, 4, %g2
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
203a074: 80 a0 a0 14 cmp %g2, 0x14
203a078: 12 bf ff f2 bne 203a040 <rtems_rfs_block_map_indirect_shrink+0x6c>
203a07c: 82 00 60 04 add %g1, 4, %g1
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
203a080: 10 bf ff e3 b 203a00c <rtems_rfs_block_map_indirect_shrink+0x38>
203a084: 90 10 00 18 mov %i0, %o0
0203a3ac <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)
{
203a3ac: 9d e3 bf a0 save %sp, -96, %sp
* 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;
203a3b0: c0 2e 80 00 clrb [ %i2 ]
map->inode = NULL;
203a3b4: c0 26 a0 04 clr [ %i2 + 4 ]
* @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;
203a3b8: c0 26 a0 08 clr [ %i2 + 8 ]
size->offset = 0;
203a3bc: c0 26 a0 0c clr [ %i2 + 0xc ]
* @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;
203a3c0: c0 26 a0 10 clr [ %i2 + 0x10 ]
bpos->boff = 0;
203a3c4: c0 26 a0 14 clr [ %i2 + 0x14 ]
bpos->block = 0;
203a3c8: c0 26 a0 18 clr [ %i2 + 0x18 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203a3cc: c0 2e a0 38 clrb [ %i2 + 0x38 ]
handle->bnum = 0;
203a3d0: c0 26 a0 3c clr [ %i2 + 0x3c ]
handle->buffer = NULL;
203a3d4: c0 26 a0 40 clr [ %i2 + 0x40 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203a3d8: c0 2e a0 44 clrb [ %i2 + 0x44 ]
handle->bnum = 0;
203a3dc: c0 26 a0 48 clr [ %i2 + 0x48 ]
handle->buffer = NULL;
203a3e0: c0 26 a0 4c clr [ %i2 + 0x4c ]
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
203a3e4: 90 10 00 18 mov %i0, %o0
203a3e8: 92 10 00 19 mov %i1, %o1
203a3ec: 40 00 17 49 call 2040110 <rtems_rfs_inode_load>
203a3f0: ba 10 00 1a mov %i2, %i5
if (rc > 0)
203a3f4: b8 92 20 00 orcc %o0, 0, %i4
203a3f8: 14 80 00 42 bg 203a500 <rtems_rfs_block_map_open+0x154> <== NEVER TAKEN
203a3fc: 82 10 20 01 mov 1, %g1
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
203a400: c8 06 60 0c ld [ %i1 + 0xc ], %g4
203a404: f2 26 a0 04 st %i1, [ %i2 + 4 ]
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
203a408: 84 10 20 00 clr %g2
203a40c: b8 01 20 1c add %g4, 0x1c, %i4
203a410: 86 07 00 01 add %i4, %g1, %g3
203a414: 96 00 a0 06 add %g2, 6, %o3
203a418: d8 0f 00 01 ldub [ %i4 + %g1 ], %o4
203a41c: de 08 e0 02 ldub [ %g3 + 2 ], %o7
203a420: da 08 e0 01 ldub [ %g3 + 1 ], %o5
203a424: 87 2a e0 02 sll %o3, 2, %g3
203a428: 86 01 00 03 add %g4, %g3, %g3
203a42c: d6 08 e0 04 ldub [ %g3 + 4 ], %o3
203a430: 99 2b 20 10 sll %o4, 0x10, %o4
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,
203a434: 86 07 40 01 add %i5, %g1, %g3
203a438: 97 2a e0 18 sll %o3, 0x18, %o3
203a43c: 9b 2b 60 08 sll %o5, 8, %o5
203a440: 9e 13 c0 0b or %o7, %o3, %o7
203a444: 9e 13 c0 0c or %o7, %o4, %o7
203a448: 9e 13 c0 0d or %o7, %o5, %o7
* 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++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
203a44c: de 20 e0 23 st %o7, [ %g3 + 0x23 ]
/*
* 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++)
203a450: 84 00 a0 01 inc %g2
203a454: 80 a0 a0 05 cmp %g2, 5
203a458: 12 bf ff ee bne 203a410 <rtems_rfs_block_map_open+0x64>
203a45c: 82 00 60 04 add %g1, 4, %g1
* @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);
203a460: c6 09 20 0f ldub [ %g4 + 0xf ], %g3
203a464: c2 09 20 0c ldub [ %g4 + 0xc ], %g1
203a468: f8 09 20 0d ldub [ %g4 + 0xd ], %i4
203a46c: c4 09 20 0e ldub [ %g4 + 0xe ], %g2
203a470: b9 2f 20 10 sll %i4, 0x10, %i4
203a474: 85 28 a0 08 sll %g2, 8, %g2
203a478: 83 28 60 18 sll %g1, 0x18, %g1
203a47c: 82 10 40 1c or %g1, %i4, %g1
203a480: 82 10 40 03 or %g1, %g3, %g1
203a484: 82 10 40 02 or %g1, %g2, %g1
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
203a488: c2 27 60 08 st %g1, [ %i5 + 8 ]
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
203a48c: c4 09 20 0b ldub [ %g4 + 0xb ], %g2
* @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);
203a490: c2 09 20 0a ldub [ %g4 + 0xa ], %g1
203a494: 83 28 60 08 sll %g1, 8, %g1
203a498: 82 10 80 01 or %g2, %g1, %g1
203a49c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
* @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);
203a4a0: c6 09 20 33 ldub [ %g4 + 0x33 ], %g3
203a4a4: c2 09 20 30 ldub [ %g4 + 0x30 ], %g1
203a4a8: f8 09 20 31 ldub [ %g4 + 0x31 ], %i4
203a4ac: c4 09 20 32 ldub [ %g4 + 0x32 ], %g2
203a4b0: b9 2f 20 10 sll %i4, 0x10, %i4
203a4b4: 85 28 a0 08 sll %g2, 8, %g2
203a4b8: 83 28 60 18 sll %g1, 0x18, %g1
203a4bc: 82 10 40 1c or %g1, %i4, %g1
203a4c0: 82 10 40 03 or %g1, %g3, %g1
203a4c4: 82 10 40 02 or %g1, %g2, %g1
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
203a4c8: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
* @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);
203a4cc: c2 09 20 34 ldub [ %g4 + 0x34 ], %g1
203a4d0: c6 09 20 37 ldub [ %g4 + 0x37 ], %g3
203a4d4: c4 09 20 36 ldub [ %g4 + 0x36 ], %g2
203a4d8: f8 09 20 35 ldub [ %g4 + 0x35 ], %i4
203a4dc: 83 28 60 18 sll %g1, 0x18, %g1
203a4e0: 89 2f 20 10 sll %i4, 0x10, %g4
203a4e4: 85 28 a0 08 sll %g2, 8, %g2
203a4e8: 82 10 40 04 or %g1, %g4, %g1
203a4ec: 82 10 40 03 or %g1, %g3, %g1
203a4f0: 82 10 40 02 or %g1, %g2, %g1
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
203a4f4: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
rc = rtems_rfs_inode_unload (fs, inode, false);
203a4f8: 40 00 17 6a call 20402a0 <rtems_rfs_inode_unload>
203a4fc: 95 e8 20 00 restore %g0, 0, %o2
*/
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);
203a500: 92 06 a0 38 add %i2, 0x38, %o1 <== NOT EXECUTED
203a504: 40 00 03 41 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203a508: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203a50c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
203a510: c0 2e a0 38 clrb [ %i2 + 0x38 ] <== NOT EXECUTED
handle->bnum = 0;
203a514: c0 26 a0 3c clr [ %i2 + 0x3c ] <== NOT EXECUTED
handle->buffer = NULL;
203a518: c0 26 a0 40 clr [ %i2 + 0x40 ] <== 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);
203a51c: 92 06 a0 44 add %i2, 0x44, %o1 <== NOT EXECUTED
203a520: 40 00 03 3a call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203a524: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
handle->dirty = false;
203a528: c0 2e a0 44 clrb [ %i2 + 0x44 ] <== NOT EXECUTED
handle->bnum = 0;
203a52c: c0 26 a0 48 clr [ %i2 + 0x48 ] <== NOT EXECUTED
handle->buffer = NULL;
203a530: c0 26 a0 4c clr [ %i2 + 0x4c ] <== NOT EXECUTED
return rc;
}
203a534: 81 c7 e0 08 ret <== NOT EXECUTED
203a538: 81 e8 00 00 restore <== NOT EXECUTED
0203acfc <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
203acfc: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
203ad00: 90 10 20 00 clr %o0
203ad04: 13 00 00 10 sethi %hi(0x4000), %o1
203ad08: 7f ff ad c9 call 202642c <rtems_rfs_trace>
203ad0c: ba 10 00 18 mov %i0, %i5
203ad10: 80 8a 20 ff btst 0xff, %o0
203ad14: 32 80 00 a1 bne,a 203af98 <rtems_rfs_block_map_shrink+0x29c><== NEVER TAKEN
203ad18: d4 06 60 08 ld [ %i1 + 8 ], %o2 <== NOT EXECUTED
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if (map->size.count == 0)
203ad1c: e6 06 60 08 ld [ %i1 + 8 ], %l3
203ad20: 80 a4 e0 00 cmp %l3, 0
203ad24: 02 80 00 77 be 203af00 <rtems_rfs_block_map_shrink+0x204>
203ad28: 90 10 20 00 clr %o0
203ad2c: 80 a6 80 13 cmp %i2, %l3
203ad30: 38 80 00 02 bgu,a 203ad38 <rtems_rfs_block_map_shrink+0x3c><== NEVER TAKEN
203ad34: b4 10 00 13 mov %l3, %i2 <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
203ad38: 80 a6 a0 00 cmp %i2, 0
203ad3c: 02 80 00 a2 be 203afc4 <rtems_rfs_block_map_shrink+0x2c8> <== NEVER TAKEN
203ad40: a2 06 60 44 add %i1, 0x44, %l1
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ad44: a0 06 60 38 add %i1, 0x38, %l0
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
203ad48: 10 80 00 14 b 203ad98 <rtems_rfs_block_map_shrink+0x9c>
203ad4c: b6 10 20 01 mov 1, %i3
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
203ad50: a7 2c e0 02 sll %l3, 2, %l3
203ad54: a6 06 40 13 add %i1, %l3, %l3
203ad58: f8 04 e0 04 ld [ %l3 + 4 ], %i4
map->blocks[block] = 0;
203ad5c: c0 24 e0 04 clr [ %l3 + 4 ]
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
203ad60: 90 10 00 1d mov %i5, %o0
203ad64: 92 10 20 00 clr %o1
203ad68: 40 00 14 28 call 203fe08 <rtems_rfs_group_bitmap_free>
203ad6c: 94 10 00 1c mov %i4, %o2
if (rc > 0)
203ad70: 80 a2 20 00 cmp %o0, 0
203ad74: 14 80 00 63 bg 203af00 <rtems_rfs_block_map_shrink+0x204> <== NEVER TAKEN
203ad78: b4 86 bf ff addcc %i2, -1, %i2
return rc;
map->size.count--;
203ad7c: e6 06 60 08 ld [ %i1 + 8 ], %l3
map->size.offset = 0;
203ad80: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
203ad84: a6 04 ff ff add %l3, -1, %l3
map->size.offset = 0;
map->last_data_block = block_to_free;
203ad88: f8 26 60 20 st %i4, [ %i1 + 0x20 ]
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
203ad8c: e6 26 60 08 st %l3, [ %i1 + 8 ]
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
203ad90: 02 80 00 88 be 203afb0 <rtems_rfs_block_map_shrink+0x2b4>
203ad94: f6 2e 40 00 stb %i3, [ %i1 ]
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
203ad98: a4 04 ff ff add %l3, -1, %l2
if (block < RTEMS_RFS_INODE_BLOCKS)
203ad9c: 80 a4 a0 04 cmp %l2, 4
203ada0: 28 bf ff ec bleu,a 203ad50 <rtems_rfs_block_map_shrink+0x54>
203ada4: a6 04 e0 07 add %l3, 7, %l3
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
203ada8: f8 07 60 34 ld [ %i5 + 0x34 ], %i4
203adac: 90 10 00 12 mov %l2, %o0
203adb0: 40 00 97 e7 call 2060d4c <.urem>
203adb4: 92 10 00 1c mov %i4, %o1
singly = block / fs->blocks_per_block;
203adb8: 92 10 00 1c mov %i4, %o1
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
203adbc: aa 10 00 08 mov %o0, %l5
singly = block / fs->blocks_per_block;
203adc0: 40 00 97 37 call 2060a9c <.udiv>
203adc4: 90 10 00 12 mov %l2, %o0
if (block < fs->block_map_singly_blocks)
203adc8: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
203adcc: 80 a4 80 01 cmp %l2, %g1
203add0: 0a 80 00 4e bcs 203af08 <rtems_rfs_block_map_shrink+0x20c><== ALWAYS TAKEN
203add4: ac 10 00 08 mov %o0, %l6
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
singly, direct);
if (rc)
return rc;
}
else if (block < fs->block_map_doubly_blocks)
203add8: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
203addc: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED
203ade0: 1a 80 00 75 bcc 203afb4 <rtems_rfs_block_map_shrink+0x2b8><== NOT EXECUTED
203ade4: 80 a4 e0 00 cmp %l3, 0 <== 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;
203ade8: 40 00 97 2d call 2060a9c <.udiv> <== NOT EXECUTED
203adec: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
203adf0: 82 02 20 08 add %o0, 8, %g1 <== NOT EXECUTED
203adf4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
203adf8: 82 06 40 01 add %i1, %g1, %g1 <== NOT EXECUTED
203adfc: d4 00 60 04 ld [ %g1 + 4 ], %o2 <== 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;
203ae00: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
203ae04: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
203ae08: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203ae0c: 40 00 01 7a call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
203ae10: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
203ae14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203ae18: 14 80 00 3a bg 203af00 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
203ae1c: 92 10 00 1c mov %i4, %o1 <== 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;
203ae20: 40 00 97 cb call 2060d4c <.urem> <== NOT EXECUTED
203ae24: 90 10 00 16 mov %l6, %o0 <== 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,
203ae28: c2 06 60 4c ld [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
203ae2c: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED
203ae30: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 <== 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;
203ae34: a8 10 00 08 mov %o0, %l4 <== 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,
203ae38: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
203ae3c: c6 08 c0 02 ldub [ %g3 + %g2 ], %g3 <== NOT EXECUTED
203ae40: e4 08 60 03 ldub [ %g1 + 3 ], %l2 <== NOT EXECUTED
203ae44: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
203ae48: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
203ae4c: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
203ae50: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
203ae54: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
203ae58: a4 14 80 03 or %l2, %g3, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ae5c: 90 10 00 1d mov %i5, %o0 <== 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,
203ae60: a4 14 80 02 or %l2, %g2, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ae64: 92 10 00 10 mov %l0, %o1 <== 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,
203ae68: a4 14 80 01 or %l2, %g1, %l2 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203ae6c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
203ae70: 40 00 01 61 call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
203ae74: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
singly, true);
if (rc > 0)
203ae78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203ae7c: 14 80 00 21 bg 203af00 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
203ae80: 85 2d 60 02 sll %l5, 2, %g2 <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
203ae84: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 <== NOT EXECUTED
203ae88: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 <== NOT EXECUTED
direct);
if (direct == 0)
203ae8c: 80 a5 60 00 cmp %l5, 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,
203ae90: 82 00 c0 02 add %g3, %g2, %g1 <== NOT EXECUTED
203ae94: c6 08 c0 02 ldub [ %g3 + %g2 ], %g3 <== NOT EXECUTED
203ae98: f8 08 60 03 ldub [ %g1 + 3 ], %i4 <== NOT EXECUTED
203ae9c: c4 08 60 01 ldub [ %g1 + 1 ], %g2 <== NOT EXECUTED
203aea0: c2 08 60 02 ldub [ %g1 + 2 ], %g1 <== NOT EXECUTED
203aea4: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
203aea8: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
203aeac: b8 17 00 03 or %i4, %g3, %i4 <== NOT EXECUTED
203aeb0: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
203aeb4: b8 17 00 02 or %i4, %g2, %i4 <== NOT EXECUTED
direct);
if (direct == 0)
203aeb8: 12 bf ff aa bne 203ad60 <rtems_rfs_block_map_shrink+0x64> <== NOT EXECUTED
203aebc: b8 17 00 01 or %i4, %g1, %i4 <== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
203aec0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203aec4: 92 10 20 00 clr %o1 <== NOT EXECUTED
203aec8: 40 00 13 d0 call 203fe08 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
203aecc: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
if (rc > 0)
203aed0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203aed4: 14 80 00 0b bg 203af00 <rtems_rfs_block_map_shrink+0x204> <== NOT EXECUTED
203aed8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
return rc;
map->last_map_block = singly;
203aedc: e4 26 60 1c st %l2, [ %i1 + 0x1c ] <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
203aee0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203aee4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
203aee8: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
203aeec: 7f ff fc 3a call 2039fd4 <rtems_rfs_block_map_indirect_shrink><== NOT EXECUTED
203aef0: 98 10 00 14 mov %l4, %o4 <== NOT EXECUTED
doubly, doubly_singly);
if (rc)
203aef4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203aef8: 22 bf ff 9b be,a 203ad64 <rtems_rfs_block_map_shrink+0x68><== NOT EXECUTED
203aefc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
return 0;
}
203af00: 81 c7 e0 08 ret
203af04: 91 e8 00 08 restore %g0, %o0, %o0
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
203af08: 82 02 20 08 add %o0, 8, %g1
203af0c: 83 28 60 02 sll %g1, 2, %g1
203af10: 82 06 40 01 add %i1, %g1, %g1
203af14: d4 00 60 04 ld [ %g1 + 4 ], %o2
203af18: 90 10 00 1d mov %i5, %o0
203af1c: 92 10 00 10 mov %l0, %o1
203af20: 40 00 01 35 call 203b3f4 <rtems_rfs_buffer_handle_request>
203af24: 96 10 20 01 mov 1, %o3
map->blocks[singly], true);
if (rc > 0)
203af28: 80 a2 20 00 cmp %o0, 0
203af2c: 14 bf ff f5 bg 203af00 <rtems_rfs_block_map_shrink+0x204> <== NEVER TAKEN
203af30: 85 2d 60 02 sll %l5, 2, %g2
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
203af34: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
203af38: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
203af3c: 90 10 00 1d mov %i5, %o0
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,
203af40: 82 00 c0 02 add %g3, %g2, %g1
203af44: e6 08 c0 02 ldub [ %g3 + %g2 ], %l3
203af48: f8 08 60 01 ldub [ %g1 + 1 ], %i4
203af4c: e4 08 60 02 ldub [ %g1 + 2 ], %l2
203af50: e8 08 60 03 ldub [ %g1 + 3 ], %l4
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
203af54: 92 10 00 19 mov %i1, %o1
203af58: 94 10 00 10 mov %l0, %o2
203af5c: 96 10 00 16 mov %l6, %o3
203af60: 7f ff fc 1d call 2039fd4 <rtems_rfs_block_map_indirect_shrink>
203af64: 98 10 00 15 mov %l5, %o4
singly, direct);
if (rc)
203af68: 80 a2 20 00 cmp %o0, 0
203af6c: 12 bf ff e5 bne 203af00 <rtems_rfs_block_map_shrink+0x204><== NEVER TAKEN
203af70: a8 0d 20 ff and %l4, 0xff, %l4
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,
203af74: a7 2c e0 18 sll %l3, 0x18, %l3
203af78: b8 0f 20 ff and %i4, 0xff, %i4
203af7c: a6 15 00 13 or %l4, %l3, %l3
203af80: b9 2f 20 10 sll %i4, 0x10, %i4
203af84: a4 0c a0 ff and %l2, 0xff, %l2
203af88: b8 14 c0 1c or %l3, %i4, %i4
203af8c: a5 2c a0 08 sll %l2, 8, %l2
203af90: 10 bf ff 74 b 203ad60 <rtems_rfs_block_map_shrink+0x64>
203af94: b8 17 00 12 or %i4, %l2, %i4
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
203af98: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203af9c: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203afa0: 40 00 43 0c call 204bbd0 <printf> <== NOT EXECUTED
203afa4: 90 12 23 18 or %o0, 0x318, %o0 ! 206bb18 <__FUNCTION__.7603+0xf0><== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
203afa8: 10 bf ff 5e b 203ad20 <rtems_rfs_block_map_shrink+0x24> <== NOT EXECUTED
203afac: e6 06 60 08 ld [ %i1 + 8 ], %l3 <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
203afb0: 80 a4 e0 00 cmp %l3, 0
203afb4: 32 80 00 05 bne,a 203afc8 <rtems_rfs_block_map_shrink+0x2cc><== NEVER TAKEN
203afb8: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== NOT EXECUTED
{
map->last_map_block = 0;
203afbc: c0 26 60 1c clr [ %i1 + 0x1c ]
map->last_data_block = 0;
203afc0: c0 26 60 20 clr [ %i1 + 0x20 ]
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
203afc4: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
203afc8: 80 a0 60 00 cmp %g1, 0
203afcc: 12 80 00 0f bne 203b008 <rtems_rfs_block_map_shrink+0x30c><== NEVER TAKEN
203afd0: 80 a4 e0 00 cmp %l3, 0
203afd4: 80 a4 c0 01 cmp %l3, %g1
203afd8: 28 80 00 0f bleu,a 203b014 <rtems_rfs_block_map_shrink+0x318><== ALWAYS TAKEN
203afdc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
203afe0: 84 04 ff ff add %l3, -1, %g2 <== NOT EXECUTED
203afe4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
203afe8: 12 bf ff c6 bne 203af00 <rtems_rfs_block_map_shrink+0x204><== NOT EXECUTED
203afec: 90 10 20 00 clr %o0 <== NOT EXECUTED
203aff0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
203aff4: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 <== NOT EXECUTED
203aff8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
203affc: 38 80 00 07 bgu,a 203b018 <rtems_rfs_block_map_shrink+0x31c><== NOT EXECUTED
203b000: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
203b004: 30 bf ff bf b,a 203af00 <rtems_rfs_block_map_shrink+0x204><== NOT EXECUTED
203b008: 12 bf ff f4 bne 203afd8 <rtems_rfs_block_map_shrink+0x2dc><== NOT EXECUTED
203b00c: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
203b010: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
203b014: e6 26 60 10 st %l3, [ %i1 + 0x10 ]
203b018: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
203b01c: c0 26 60 18 clr [ %i1 + 0x18 ]
203b020: 80 a0 60 00 cmp %g1, 0
203b024: 02 bf ff b7 be 203af00 <rtems_rfs_block_map_shrink+0x204> <== ALWAYS TAKEN
203b028: 90 10 20 00 clr %o0
203b02c: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED
203b030: e6 26 60 10 st %l3, [ %i1 + 0x10 ] <== NOT EXECUTED
return 0;
}
203b034: 81 c7 e0 08 ret <== NOT EXECUTED
203b038: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02046c44 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
2046c44: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
2046c48: 90 10 20 00 clr %o0
2046c4c: 7f ff 7d f8 call 202642c <rtems_rfs_trace>
2046c50: 92 10 20 40 mov 0x40, %o1
2046c54: 80 8a 20 ff btst 0xff, %o0
2046c58: 02 80 00 0b be 2046c84 <rtems_rfs_buffer_bdbuf_release+0x40><== ALWAYS TAKEN
2046c5c: 80 a6 60 00 cmp %i1, 0
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
2046c60: 17 00 81 95 sethi %hi(0x2065400), %o3 <== NOT EXECUTED
2046c64: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 <== NOT EXECUTED
2046c68: d4 06 20 18 ld [ %i0 + 0x18 ], %o2 <== NOT EXECUTED
2046c6c: 12 80 00 16 bne 2046cc4 <rtems_rfs_buffer_bdbuf_release+0x80><== NOT EXECUTED
2046c70: 96 12 e2 b8 or %o3, 0x2b8, %o3 <== NOT EXECUTED
2046c74: 11 00 81 b9 sethi %hi(0x206e400), %o0 <== NOT EXECUTED
2046c78: 40 00 13 d6 call 204bbd0 <printf> <== NOT EXECUTED
2046c7c: 90 12 22 18 or %o0, 0x218, %o0 ! 206e618 <msdos_map+0x110><== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
2046c80: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2046c84: 02 80 00 09 be 2046ca8 <rtems_rfs_buffer_bdbuf_release+0x64>
2046c88: 90 10 00 18 mov %i0, %o0
sc = rtems_bdbuf_release_modified (buffer);
2046c8c: 7f fe ff 76 call 2006a64 <rtems_bdbuf_release_modified>
2046c90: 01 00 00 00 nop
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
2046c94: 80 a0 00 08 cmp %g0, %o0
2046c98: b0 60 20 00 subx %g0, 0, %i0
#endif
rc = EIO;
}
return rc;
}
2046c9c: b0 0e 20 05 and %i0, 5, %i0
2046ca0: 81 c7 e0 08 ret
2046ca4: 81 e8 00 00 restore
buffer->block, modified ? "(modified)" : "");
if (modified)
sc = rtems_bdbuf_release_modified (buffer);
else
sc = rtems_bdbuf_release (buffer);
2046ca8: 7f fe ff 37 call 2006984 <rtems_bdbuf_release>
2046cac: 01 00 00 00 nop
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
rtems_status_code sc;
int rc = 0;
2046cb0: 80 a0 00 08 cmp %g0, %o0
2046cb4: b0 60 20 00 subx %g0, 0, %i0
#endif
rc = EIO;
}
return rc;
}
2046cb8: b0 0e 20 05 and %i0, 5, %i0
2046cbc: 81 c7 e0 08 ret
2046cc0: 81 e8 00 00 restore
{
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
2046cc4: 17 00 81 b9 sethi %hi(0x206e400), %o3 <== NOT EXECUTED
2046cc8: 10 bf ff eb b 2046c74 <rtems_rfs_buffer_bdbuf_release+0x30><== NOT EXECUTED
2046ccc: 96 12 e2 08 or %o3, 0x208, %o3 ! 206e608 <msdos_map+0x100><== NOT EXECUTED
0203ba90 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
203ba90: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
203ba94: 90 10 20 00 clr %o0
203ba98: 92 10 20 10 mov 0x10, %o1
203ba9c: 7f ff aa 64 call 202642c <rtems_rfs_trace>
203baa0: ba 10 00 18 mov %i0, %i5
203baa4: 80 8a 20 ff btst 0xff, %o0
203baa8: 12 80 00 15 bne 203bafc <rtems_rfs_buffer_close+0x6c> <== NEVER TAKEN
203baac: 11 00 81 af sethi %hi(0x206bc00), %o0
/*
* 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));
203bab0: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
203bab4: 90 10 00 1d mov %i5, %o0
203bab8: 7f ff ff ad call 203b96c <rtems_rfs_buffer_setblksize>
203babc: d2 00 60 24 ld [ %g1 + 0x24 ], %o1
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
203bac0: b0 92 20 00 orcc %o0, 0, %i0
203bac4: 04 80 00 07 ble 203bae0 <rtems_rfs_buffer_close+0x50> <== ALWAYS TAKEN
203bac8: 90 10 20 00 clr %o0
203bacc: 7f ff aa 58 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203bad0: 92 10 20 10 mov 0x10, %o1 <== NOT EXECUTED
203bad4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203bad8: 12 80 00 1f bne 203bb54 <rtems_rfs_buffer_close+0xc4> <== NOT EXECUTED
203badc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
rc, strerror (rc));
if (close (fs->device) < 0)
203bae0: 7f ff 34 05 call 2008af4 <close>
203bae4: d0 07 60 0c ld [ %i5 + 0xc ], %o0
203bae8: 80 a2 20 00 cmp %o0, 0
203baec: 06 80 00 08 bl 203bb0c <rtems_rfs_buffer_close+0x7c> <== NEVER TAKEN
203baf0: 01 00 00 00 nop
printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n",
rc, strerror (rc));
}
return rc;
}
203baf4: 81 c7 e0 08 ret
203baf8: 81 e8 00 00 restore
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: closing\n");
203bafc: 40 00 40 d0 call 204be3c <puts> <== NOT EXECUTED
203bb00: 90 12 23 e8 or %o0, 0x3e8, %o0 <== 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));
203bb04: 10 bf ff ec b 203bab4 <rtems_rfs_buffer_close+0x24> <== NOT EXECUTED
203bb08: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== 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;
203bb0c: 40 00 2d f8 call 20472ec <__errno> <== NOT EXECUTED
203bb10: 01 00 00 00 nop <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
203bb14: 92 10 20 10 mov 0x10, %o1 ! 10 <PROM_START+0x10> <== 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;
203bb18: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
203bb1c: 7f ff aa 44 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203bb20: 90 10 20 00 clr %o0 <== NOT EXECUTED
203bb24: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203bb28: 02 80 00 09 be 203bb4c <rtems_rfs_buffer_close+0xbc> <== NOT EXECUTED
203bb2c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n",
203bb30: 40 00 49 be call 204e228 <strerror> <== NOT EXECUTED
203bb34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203bb38: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203bb3c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203bb40: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bb44: 40 00 40 23 call 204bbd0 <printf> <== NOT EXECUTED
203bb48: 90 12 20 50 or %o0, 0x50, %o0 ! 206c050 <__FUNCTION__.7603+0x628><== NOT EXECUTED
rc, strerror (rc));
}
return rc;
}
203bb4c: 81 c7 e0 08 ret <== NOT EXECUTED
203bb50: 81 e8 00 00 restore <== NOT EXECUTED
* all buffers.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs));
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
203bb54: 40 00 49 b5 call 204e228 <strerror> <== NOT EXECUTED
203bb58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203bb5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203bb60: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203bb64: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bb68: 40 00 40 1a call 204bbd0 <printf> <== NOT EXECUTED
203bb6c: 90 12 20 10 or %o0, 0x10, %o0 ! 206c010 <__FUNCTION__.7603+0x5e8><== NOT EXECUTED
rc, strerror (rc));
if (close (fs->device) < 0)
203bb70: 7f ff 33 e1 call 2008af4 <close> <== NOT EXECUTED
203bb74: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
203bb78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203bb7c: 16 bf ff f4 bge 203bb4c <rtems_rfs_buffer_close+0xbc> <== NOT EXECUTED
203bb80: 01 00 00 00 nop <== NOT EXECUTED
203bb84: 30 bf ff e2 b,a 203bb0c <rtems_rfs_buffer_close+0x7c> <== NOT EXECUTED
0203b208 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
203b208: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
203b20c: c2 06 60 08 ld [ %i1 + 8 ], %g1
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
203b210: ba 10 00 18 mov %i0, %i5
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
203b214: 80 a0 60 00 cmp %g1, 0
203b218: 02 80 00 13 be 203b264 <rtems_rfs_buffer_handle_release+0x5c>
203b21c: b0 10 20 00 clr %i0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
203b220: 90 10 20 00 clr %o0
203b224: 7f ff ac 82 call 202642c <rtems_rfs_trace>
203b228: 92 10 22 00 mov 0x200, %o1
203b22c: 80 8a 20 ff btst 0xff, %o0
203b230: 32 80 00 0f bne,a 203b26c <rtems_rfs_buffer_handle_release+0x64><== NEVER TAKEN
203b234: c2 0e 40 00 ldub [ %i1 ], %g1 <== 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)
203b238: d0 06 60 08 ld [ %i1 + 8 ], %o0
203b23c: f8 02 20 30 ld [ %o0 + 0x30 ], %i4
203b240: 80 a7 20 00 cmp %i4, 0
203b244: 04 80 00 05 ble 203b258 <rtems_rfs_buffer_handle_release+0x50><== NEVER TAKEN
203b248: 01 00 00 00 nop
rtems_rfs_buffer_refs_down (handle);
203b24c: b8 07 3f ff add %i4, -1, %i4
203b250: f8 22 20 30 st %i4, [ %o0 + 0x30 ]
if (rtems_rfs_buffer_refs (handle) == 0)
203b254: 80 a7 20 00 cmp %i4, 0
203b258: 02 80 00 19 be 203b2bc <rtems_rfs_buffer_handle_release+0xb4>
203b25c: b0 10 20 00 clr %i0
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
203b260: c0 26 60 08 clr [ %i1 + 8 ]
}
return rc;
}
203b264: 81 c7 e0 08 ret
203b268: 81 e8 00 00 restore
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",
203b26c: 15 00 81 95 sethi %hi(0x2065400), %o2 <== NOT EXECUTED
203b270: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED
203b274: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
203b278: 02 80 00 04 be 203b288 <rtems_rfs_buffer_handle_release+0x80><== NOT EXECUTED
203b27c: 94 12 a2 b8 or %o2, 0x2b8, %o2 <== NOT EXECUTED
203b280: 15 00 81 ae sethi %hi(0x206b800), %o2 <== NOT EXECUTED
203b284: 94 12 a3 d8 or %o2, 0x3d8, %o2 ! 206bbd8 <__FUNCTION__.7603+0x1b0><== 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" : "");
203b288: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== 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",
203b28c: 19 00 81 95 sethi %hi(0x2065400), %o4 <== 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" : "");
203b290: d6 00 60 30 ld [ %g1 + 0x30 ], %o3 <== 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",
203b294: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
203b298: 12 80 00 04 bne 203b2a8 <rtems_rfs_buffer_handle_release+0xa0><== NOT EXECUTED
203b29c: 98 13 22 b8 or %o4, 0x2b8, %o4 <== NOT EXECUTED
203b2a0: 19 00 81 ae sethi %hi(0x206b800), %o4 <== NOT EXECUTED
203b2a4: 98 13 23 e0 or %o4, 0x3e0, %o4 ! 206bbe0 <__FUNCTION__.7603+0x1b8><== NOT EXECUTED
203b2a8: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203b2ac: 40 00 42 49 call 204bbd0 <printf> <== NOT EXECUTED
203b2b0: 90 12 23 f0 or %o0, 0x3f0, %o0 ! 206bbf0 <__FUNCTION__.7603+0x1c8><== 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)
203b2b4: 10 bf ff e2 b 203b23c <rtems_rfs_buffer_handle_release+0x34><== NOT EXECUTED
203b2b8: d0 06 60 08 ld [ %i1 + 8 ], %o0 <== NOT EXECUTED
203b2bc: 7f ff 4d 94 call 200e90c <_Chain_Extract>
203b2c0: 01 00 00 00 nop
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
203b2c4: c4 07 60 50 ld [ %i5 + 0x50 ], %g2
if (rtems_rfs_fs_no_local_cache (fs))
203b2c8: c2 07 40 00 ld [ %i5 ], %g1
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
203b2cc: 84 00 bf ff add %g2, -1, %g2
if (rtems_rfs_fs_no_local_cache (fs))
203b2d0: 80 88 60 02 btst 2, %g1
203b2d4: 12 80 00 15 bne 203b328 <rtems_rfs_buffer_handle_release+0x120>
203b2d8: c4 27 60 50 st %g2, [ %i5 + 0x50 ]
* 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 +
203b2dc: c6 07 60 70 ld [ %i5 + 0x70 ], %g3
203b2e0: c4 07 60 60 ld [ %i5 + 0x60 ], %g2
203b2e4: c2 07 60 40 ld [ %i5 + 0x40 ], %g1
203b2e8: 84 00 c0 02 add %g3, %g2, %g2
203b2ec: 80 a0 80 01 cmp %g2, %g1
203b2f0: 1a 80 00 1d bcc 203b364 <rtems_rfs_buffer_handle_release+0x15c>
203b2f4: b0 10 00 1c mov %i4, %i0
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
203b2f8: c2 0e 40 00 ldub [ %i1 ], %g1
203b2fc: 80 a0 60 00 cmp %g1, 0
203b300: 02 80 00 11 be 203b344 <rtems_rfs_buffer_handle_release+0x13c>
203b304: d2 06 60 08 ld [ %i1 + 8 ], %o1
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
203b308: 7f ff 4d 76 call 200e8e0 <_Chain_Append>
203b30c: 90 07 60 64 add %i5, 0x64, %o0
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
203b310: c2 07 60 70 ld [ %i5 + 0x70 ], %g1
203b314: 82 00 60 01 inc %g1
203b318: c2 27 60 70 st %g1, [ %i5 + 0x70 ]
203b31c: c0 26 60 08 clr [ %i1 + 8 ]
203b320: 81 c7 e0 08 ret
203b324: 81 e8 00 00 restore
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
203b328: d0 06 60 08 ld [ %i1 + 8 ], %o0
rc = rtems_rfs_buffer_io_release (handle->buffer,
203b32c: d2 0e 40 00 ldub [ %i1 ], %o1
203b330: 40 00 2e 45 call 2046c44 <rtems_rfs_buffer_bdbuf_release>
203b334: c0 22 20 34 clr [ %o0 + 0x34 ]
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
203b338: c0 26 60 08 clr [ %i1 + 8 ]
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (handle->buffer,
203b33c: 81 c7 e0 08 ret
203b340: 91 e8 00 08 restore %g0, %o0, %o0
203b344: 7f ff 4d 67 call 200e8e0 <_Chain_Append>
203b348: 90 07 60 54 add %i5, 0x54, %o0
fs->release_modified_count++;
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
203b34c: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
203b350: 82 00 60 01 inc %g1
203b354: c2 27 60 60 st %g1, [ %i5 + 0x60 ]
203b358: c0 26 60 08 clr [ %i1 + 8 ]
203b35c: 81 c7 e0 08 ret
203b360: 81 e8 00 00 restore
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
203b364: 90 10 20 00 clr %o0
203b368: 7f ff ac 31 call 202642c <rtems_rfs_trace>
203b36c: 92 10 22 00 mov 0x200, %o1
203b370: 80 8a 20 ff btst 0xff, %o0
203b374: 32 80 00 19 bne,a 203b3d8 <rtems_rfs_buffer_handle_release+0x1d0><== NEVER TAKEN
203b378: d2 07 60 70 ld [ %i5 + 0x70 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-release: local cache overflow:"
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
203b37c: c4 07 60 60 ld [ %i5 + 0x60 ], %g2
203b380: c2 07 60 70 ld [ %i5 + 0x70 ], %g1
203b384: 80 a0 80 01 cmp %g2, %g1
203b388: 08 80 00 0d bleu 203b3bc <rtems_rfs_buffer_handle_release+0x1b4>
203b38c: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
203b390: 7f ff 4d 68 call 200e930 <_Chain_Get>
203b394: 90 07 60 54 add %i5, 0x54, %o0
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
203b398: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
modified = false;
203b39c: 92 10 20 00 clr %o1
" %" 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--;
203b3a0: 82 00 7f ff add %g1, -1, %g1
203b3a4: c2 27 60 60 st %g1, [ %i5 + 0x60 ]
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
modified = true;
}
buffer->user = (void*) 0;
203b3a8: c0 22 20 34 clr [ %o0 + 0x34 ]
rc = rtems_rfs_buffer_io_release (buffer, modified);
203b3ac: 40 00 2e 26 call 2046c44 <rtems_rfs_buffer_bdbuf_release>
203b3b0: 92 0a 60 01 and %o1, 1, %o1
203b3b4: 10 bf ff d1 b 203b2f8 <rtems_rfs_buffer_handle_release+0xf0>
203b3b8: b0 10 00 08 mov %o0, %i0
203b3bc: 7f ff 4d 5d call 200e930 <_Chain_Get>
203b3c0: 90 07 60 64 add %i5, 0x64, %o0
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
203b3c4: c2 07 60 70 ld [ %i5 + 0x70 ], %g1
modified = true;
203b3c8: 92 10 20 01 mov 1, %o1
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
203b3cc: 82 00 7f ff add %g1, -1, %g1
203b3d0: 10 bf ff f6 b 203b3a8 <rtems_rfs_buffer_handle_release+0x1a0>
203b3d4: c2 27 60 70 st %g1, [ %i5 + 0x70 ]
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
printf ("rtems-rfs: buffer-release: local cache overflow:"
203b3d8: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 <== NOT EXECUTED
203b3dc: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b3e0: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED
203b3e4: 40 00 41 fb call 204bbd0 <printf> <== NOT EXECUTED
203b3e8: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
203b3ec: 10 bf ff e5 b 203b380 <rtems_rfs_buffer_handle_release+0x178><== NOT EXECUTED
203b3f0: c4 07 60 60 ld [ %i5 + 0x60 ], %g2 <== NOT EXECUTED
0203b3f4 <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)
{
203b3f4: 9d e3 bf a0 save %sp, -96, %sp
/*
* 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))
203b3f8: c2 06 60 08 ld [ %i1 + 8 ], %g1
203b3fc: 80 a0 60 00 cmp %g1, 0
203b400: 02 80 00 18 be 203b460 <rtems_rfs_buffer_handle_request+0x6c>
203b404: ba 10 00 18 mov %i0, %i5
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
203b408: 80 a6 a0 00 cmp %i2, 0
203b40c: 02 80 00 07 be 203b428 <rtems_rfs_buffer_handle_request+0x34><== NEVER TAKEN
203b410: 90 10 20 00 clr %o0
203b414: c2 06 60 04 ld [ %i1 + 4 ], %g1
203b418: 80 a0 40 1a cmp %g1, %i2
203b41c: 02 80 00 0e be 203b454 <rtems_rfs_buffer_handle_request+0x60>
203b420: b0 10 20 00 clr %i0
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
203b424: 90 10 20 00 clr %o0
203b428: 7f ff ac 01 call 202642c <rtems_rfs_trace>
203b42c: 92 10 21 00 mov 0x100, %o1
203b430: 80 8a 20 ff btst 0xff, %o0
203b434: 32 80 00 3e bne,a 203b52c <rtems_rfs_buffer_handle_request+0x138><== NEVER TAKEN
203b438: d2 06 60 04 ld [ %i1 + 4 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
203b43c: 90 10 00 1d mov %i5, %o0
203b440: 7f ff ff 72 call 203b208 <rtems_rfs_buffer_handle_release>
203b444: 92 10 00 19 mov %i1, %o1
if (rc > 0)
203b448: b0 92 20 00 orcc %o0, 0, %i0
203b44c: 24 80 00 04 ble,a 203b45c <rtems_rfs_buffer_handle_request+0x68><== ALWAYS TAKEN
203b450: c0 2e 40 00 clrb [ %i1 ]
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
203b454: 81 c7 e0 08 ret
203b458: 81 e8 00 00 restore
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
handle->bnum = 0;
203b45c: c0 26 60 04 clr [ %i1 + 4 ]
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
203b460: 90 10 20 00 clr %o0
203b464: 7f ff ab f2 call 202642c <rtems_rfs_trace>
203b468: 92 10 21 00 mov 0x100, %o1
203b46c: 80 8a 20 ff btst 0xff, %o0
203b470: 32 80 00 5d bne,a 203b5e4 <rtems_rfs_buffer_handle_request+0x1f0><== NEVER TAKEN
203b474: 92 10 00 1a mov %i2, %o1 <== 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)
203b478: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
203b47c: 80 a0 60 00 cmp %g1, 0
203b480: 12 80 00 45 bne 203b594 <rtems_rfs_buffer_handle_request+0x1a0>
203b484: 90 07 60 44 add %i5, 0x44, %o0
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",
203b488: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* 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) &&
203b48c: c4 07 40 00 ld [ %i5 ], %g2
203b490: 80 88 a0 02 btst 2, %g2
203b494: 02 80 00 2b be 203b540 <rtems_rfs_buffer_handle_request+0x14c>
203b498: 80 a0 60 00 cmp %g1, 0
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
203b49c: 02 80 00 58 be 203b5fc <rtems_rfs_buffer_handle_request+0x208><== ALWAYS TAKEN
203b4a0: 90 10 00 1d mov %i5, %o0
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
203b4a4: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
203b4a8: 92 10 00 01 mov %g1, %o1
203b4ac: 84 00 a0 01 inc %g2
203b4b0: 90 07 60 44 add %i5, 0x44, %o0
203b4b4: 7f ff 4d 0b call 200e8e0 <_Chain_Append>
203b4b8: c4 20 60 30 st %g2, [ %g1 + 0x30 ]
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
203b4bc: c4 07 60 50 ld [ %i5 + 0x50 ], %g2
handle->buffer->user = (void*) ((intptr_t) block);
203b4c0: c2 06 60 08 ld [ %i1 + 8 ], %g1
/*
* 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++;
203b4c4: 84 00 a0 01 inc %g2
203b4c8: c4 27 60 50 st %g2, [ %i5 + 0x50 ]
handle->buffer->user = (void*) ((intptr_t) block);
203b4cc: f4 20 60 34 st %i2, [ %g1 + 0x34 ]
handle->bnum = block;
203b4d0: f4 26 60 04 st %i2, [ %i1 + 4 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
203b4d4: 90 10 20 00 clr %o0
203b4d8: 92 10 21 00 mov 0x100, %o1
203b4dc: 7f ff ab d4 call 202642c <rtems_rfs_trace>
203b4e0: b0 10 20 00 clr %i0
203b4e4: 80 8a 20 ff btst 0xff, %o0
203b4e8: 02 bf ff db be 203b454 <rtems_rfs_buffer_handle_request+0x60><== ALWAYS TAKEN
203b4ec: 15 00 81 af sethi %hi(0x206bc00), %o2
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
203b4f0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
203b4f4: 02 80 00 04 be 203b504 <rtems_rfs_buffer_handle_request+0x110><== NOT EXECUTED
203b4f8: 94 12 a0 60 or %o2, 0x60, %o2 <== NOT EXECUTED
203b4fc: 15 00 81 a1 sethi %hi(0x2068400), %o2 <== NOT EXECUTED
203b500: 94 12 a2 f0 or %o2, 0x2f0, %o2 ! 20686f0 <rtems_rfs_rtems_eval_config+0xd48><== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
203b504: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
handle->buffer->references);
return 0;
203b508: b0 10 20 00 clr %i0 <== 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",
203b50c: d6 00 60 18 ld [ %g1 + 0x18 ], %o3 <== NOT EXECUTED
203b510: d8 00 60 30 ld [ %g1 + 0x30 ], %o4 <== NOT EXECUTED
203b514: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b518: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203b51c: 40 00 41 ad call 204bbd0 <printf> <== NOT EXECUTED
203b520: 90 12 21 38 or %o0, 0x138, %o0 <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
}
203b524: 81 c7 e0 08 ret <== NOT EXECUTED
203b528: 81 e8 00 00 restore <== NOT EXECUTED
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
203b52c: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b530: 40 00 41 a8 call 204bbd0 <printf> <== NOT EXECUTED
203b534: 90 12 20 68 or %o0, 0x68, %o0 ! 206bc68 <__FUNCTION__.7603+0x240><== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
203b538: 10 bf ff c2 b 203b440 <rtems_rfs_buffer_handle_request+0x4c><== NOT EXECUTED
203b53c: 90 10 00 1d mov %i5, %o0 <== 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) &&
203b540: 32 bf ff da bne,a 203b4a8 <rtems_rfs_buffer_handle_request+0xb4>
203b544: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
203b548: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
203b54c: 80 a0 60 00 cmp %g1, 0
203b550: 12 80 00 4b bne 203b67c <rtems_rfs_buffer_handle_request+0x288>
203b554: 90 07 60 54 add %i5, 0x54, %o0
handle->buffer = rtems_rfs_scan_chain (&fs->release,
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
203b558: c2 07 60 70 ld [ %i5 + 0x70 ], %g1
203b55c: 80 a0 60 00 cmp %g1, 0
203b560: 02 80 00 27 be 203b5fc <rtems_rfs_buffer_handle_request+0x208>
203b564: 90 10 00 1d mov %i5, %o0
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
203b568: 90 07 60 64 add %i5, 0x64, %o0
203b56c: 92 07 60 70 add %i5, 0x70, %o1
203b570: 7f ff fe de call 203b0e8 <rtems_rfs_scan_chain>
203b574: 94 10 00 1a mov %i2, %o2
203b578: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
203b57c: 80 a2 20 00 cmp %o0, 0
203b580: 02 80 00 1e be 203b5f8 <rtems_rfs_buffer_handle_request+0x204>
203b584: 82 10 00 08 mov %o0, %g1
rtems_rfs_buffer_mark_dirty (handle);
203b588: 84 10 20 01 mov 1, %g2
203b58c: 10 bf ff c6 b 203b4a4 <rtems_rfs_buffer_handle_request+0xb0>
203b590: c4 2e 40 00 stb %g2, [ %i1 ]
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
203b594: 92 07 60 50 add %i5, 0x50, %o1
203b598: 7f ff fe d4 call 203b0e8 <rtems_rfs_scan_chain>
203b59c: 94 10 00 1a mov %i2, %o2
203b5a0: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
203b5a4: 80 a2 20 00 cmp %o0, 0
203b5a8: 02 bf ff b9 be 203b48c <rtems_rfs_buffer_handle_request+0x98>
203b5ac: 82 10 20 00 clr %g1
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
203b5b0: 90 10 20 00 clr %o0
203b5b4: 7f ff ab 9e call 202642c <rtems_rfs_trace>
203b5b8: 92 10 21 00 mov 0x100, %o1
* 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) &&
203b5bc: 80 8a 20 ff btst 0xff, %o0
203b5c0: 02 bf ff b3 be 203b48c <rtems_rfs_buffer_handle_request+0x98><== ALWAYS TAKEN
203b5c4: c2 06 60 08 ld [ %i1 + 8 ], %g1
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
203b5c8: d2 00 60 30 ld [ %g1 + 0x30 ], %o1 <== NOT EXECUTED
203b5cc: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b5d0: 92 02 60 01 inc %o1 <== NOT EXECUTED
203b5d4: 40 00 41 7f call 204bbd0 <printf> <== NOT EXECUTED
203b5d8: 90 12 20 c8 or %o0, 0xc8, %o0 <== NOT EXECUTED
203b5dc: 10 bf ff ac b 203b48c <rtems_rfs_buffer_handle_request+0x98><== NOT EXECUTED
203b5e0: c2 06 60 08 ld [ %i1 + 8 ], %g1 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
203b5e4: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b5e8: 40 00 41 7a call 204bbd0 <printf> <== NOT EXECUTED
203b5ec: 90 12 20 a0 or %o0, 0xa0, %o0 ! 206bca0 <__FUNCTION__.7603+0x278><== 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)
203b5f0: 10 bf ff a3 b 203b47c <rtems_rfs_buffer_handle_request+0x88><== NOT EXECUTED
203b5f4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1 <== NOT EXECUTED
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
203b5f8: 90 10 00 1d mov %i5, %o0
203b5fc: 92 10 00 1a mov %i2, %o1
203b600: 94 10 00 1b mov %i3, %o2
203b604: 40 00 2d 7c call 2046bf4 <rtems_rfs_buffer_bdbuf_request>
203b608: 96 06 60 08 add %i1, 8, %o3
if (rc > 0)
203b60c: b0 92 20 00 orcc %o0, 0, %i0
203b610: 04 80 00 17 ble 203b66c <rtems_rfs_buffer_handle_request+0x278><== ALWAYS TAKEN
203b614: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
203b618: 7f ff ab 85 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b61c: 92 10 21 00 mov 0x100, %o1 <== NOT EXECUTED
203b620: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b624: 02 bf ff 8c be 203b454 <rtems_rfs_buffer_handle_request+0x60><== NOT EXECUTED
203b628: 3b 00 81 af sethi %hi(0x206bc00), %i5 <== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
203b62c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
203b630: 02 80 00 04 be 203b640 <rtems_rfs_buffer_handle_request+0x24c><== NOT EXECUTED
203b634: ba 17 60 60 or %i5, 0x60, %i5 <== NOT EXECUTED
203b638: 3b 00 81 a1 sethi %hi(0x2068400), %i5 <== NOT EXECUTED
203b63c: ba 17 62 f0 or %i5, 0x2f0, %i5 ! 20686f0 <rtems_rfs_rtems_eval_config+0xd48><== NOT EXECUTED
203b640: 40 00 4a fa call 204e228 <strerror> <== NOT EXECUTED
203b644: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203b648: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203b64c: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
203b650: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
203b654: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b658: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
203b65c: 40 00 41 5d call 204bbd0 <printf> <== NOT EXECUTED
203b660: 90 12 21 00 or %o0, 0x100, %o0 <== NOT EXECUTED
203b664: 81 c7 e0 08 ret <== NOT EXECUTED
203b668: 81 e8 00 00 restore <== NOT EXECUTED
block, read ? "read" : "get", rc, strerror (rc));
return rc;
}
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
203b66c: c2 06 60 08 ld [ %i1 + 8 ], %g1
203b670: c0 20 60 04 clr [ %g1 + 4 ]
203b674: 10 bf ff 8c b 203b4a4 <rtems_rfs_buffer_handle_request+0xb0>
203b678: c0 20 40 00 clr [ %g1 ]
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
203b67c: 92 07 60 60 add %i5, 0x60, %o1
203b680: 7f ff fe 9a call 203b0e8 <rtems_rfs_scan_chain>
203b684: 94 10 00 1a mov %i2, %o2
203b688: d0 26 60 08 st %o0, [ %i1 + 8 ]
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
203b68c: 80 a2 20 00 cmp %o0, 0
203b690: 12 bf ff 85 bne 203b4a4 <rtems_rfs_buffer_handle_request+0xb0>
203b694: 82 10 00 08 mov %o0, %g1
203b698: 10 bf ff b1 b 203b55c <rtems_rfs_buffer_handle_request+0x168>
203b69c: c2 07 60 70 ld [ %i5 + 0x70 ], %g1
0203b6a0 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
203b6a0: 9d e3 bf 58 save %sp, -168, %sp
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
203b6a4: 90 10 20 00 clr %o0
203b6a8: 92 10 20 20 mov 0x20, %o1
203b6ac: 7f ff ab 60 call 202642c <rtems_rfs_trace>
203b6b0: ba 10 00 18 mov %i0, %i5
203b6b4: 80 8a 20 ff btst 0xff, %o0
203b6b8: 12 80 00 1c bne 203b728 <rtems_rfs_buffer_open+0x88> <== NEVER TAKEN
203b6bc: 92 10 00 18 mov %i0, %o1
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
fs->device = open (name, O_RDWR);
203b6c0: 90 10 00 1d mov %i5, %o0
203b6c4: 7f ff 39 c1 call 2009dc8 <open>
203b6c8: 92 10 20 02 mov 2, %o1
if (fs->device < 0)
203b6cc: 80 a2 20 00 cmp %o0, 0
203b6d0: 06 80 00 1f bl 203b74c <rtems_rfs_buffer_open+0xac> <== NEVER TAKEN
203b6d4: d0 26 60 0c st %o0, [ %i1 + 0xc ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: cannot open file\n");
return ENXIO;
}
if (fstat (fs->device, &st) < 0)
203b6d8: 7f ff bd 8e call 202ad10 <fstat>
203b6dc: 92 07 bf b8 add %fp, -72, %o1
203b6e0: 80 a2 20 00 cmp %o0, 0
203b6e4: 06 80 00 3b bl 203b7d0 <rtems_rfs_buffer_open+0x130> <== NEVER TAKEN
203b6e8: c4 07 bf c4 ld [ %fp + -60 ], %g2
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
203b6ec: 03 00 00 3c sethi %hi(0xf000), %g1
203b6f0: 84 08 80 01 and %g2, %g1, %g2
203b6f4: 03 00 00 18 sethi %hi(0x6000), %g1
203b6f8: 80 a0 80 01 cmp %g2, %g1
203b6fc: 22 80 00 1f be,a 203b778 <rtems_rfs_buffer_open+0xd8> <== ALWAYS TAKEN
203b700: d0 06 60 0c ld [ %i1 + 0xc ], %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
203b704: 90 10 20 00 clr %o0 <== NOT EXECUTED
203b708: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
203b70c: 7f ff ab 48 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b710: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
203b714: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b718: 12 80 00 29 bne 203b7bc <rtems_rfs_buffer_open+0x11c> <== NOT EXECUTED
203b71c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
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;
}
203b720: 81 c7 e0 08 ret
203b724: 81 e8 00 00 restore
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
203b728: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b72c: 40 00 41 29 call 204bbd0 <printf> <== NOT EXECUTED
203b730: 90 12 21 78 or %o0, 0x178, %o0 ! 206bd78 <__FUNCTION__.7603+0x350><== NOT EXECUTED
fs->device = open (name, O_RDWR);
203b734: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203b738: 7f ff 39 a4 call 2009dc8 <open> <== NOT EXECUTED
203b73c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
if (fs->device < 0)
203b740: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203b744: 16 bf ff e5 bge 203b6d8 <rtems_rfs_buffer_open+0x38> <== NOT EXECUTED
203b748: d0 26 60 0c st %o0, [ %i1 + 0xc ] <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
203b74c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203b750: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
203b754: 7f ff ab 36 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b758: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
203b75c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b760: 02 bf ff f0 be 203b720 <rtems_rfs_buffer_open+0x80> <== NOT EXECUTED
203b764: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot open file\n");
203b768: 40 00 41 b5 call 204be3c <puts> <== NOT EXECUTED
203b76c: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 206bda0 <__FUNCTION__.7603+0x378><== NOT EXECUTED
203b770: 81 c7 e0 08 ret <== NOT EXECUTED
203b774: 81 e8 00 00 restore <== NOT EXECUTED
203b778: 94 06 60 10 add %i1, 0x10, %o2
203b77c: 13 10 01 10 sethi %hi(0x40044000), %o1
203b780: 7f ff 35 f1 call 2008f44 <ioctl>
203b784: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <RAM_END+0x3dc44209>
/*
* 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)
203b788: 80 a2 20 00 cmp %o0, 0
203b78c: 02 80 00 23 be 203b818 <rtems_rfs_buffer_open+0x178> <== ALWAYS TAKEN
203b790: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
203b794: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
203b798: 7f ff ab 25 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b79c: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
203b7a0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b7a4: 02 bf ff df be 203b720 <rtems_rfs_buffer_open+0x80> <== NOT EXECUTED
203b7a8: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
203b7ac: 40 00 41 a4 call 204be3c <puts> <== NOT EXECUTED
203b7b0: 90 12 22 38 or %o0, 0x238, %o0 ! 206be38 <__FUNCTION__.7603+0x410><== NOT EXECUTED
203b7b4: 81 c7 e0 08 ret <== NOT EXECUTED
203b7b8: 81 e8 00 00 restore <== NOT EXECUTED
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
203b7bc: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b7c0: 40 00 41 04 call 204bbd0 <printf> <== NOT EXECUTED
203b7c4: 90 12 22 00 or %o0, 0x200, %o0 ! 206be00 <__FUNCTION__.7603+0x3d8><== NOT EXECUTED
203b7c8: 81 c7 e0 08 ret <== NOT EXECUTED
203b7cc: 81 e8 00 00 restore <== NOT EXECUTED
return ENXIO;
}
if (fstat (fs->device, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
203b7d0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203b7d4: 92 10 20 08 mov 8, %o1 <== NOT EXECUTED
203b7d8: 7f ff ab 15 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b7dc: b0 10 20 06 mov 6, %i0 <== NOT EXECUTED
203b7e0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b7e4: 02 80 00 18 be 203b844 <rtems_rfs_buffer_open+0x1a4> <== NOT EXECUTED
203b7e8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
203b7ec: 40 00 2e c0 call 20472ec <__errno> <== NOT EXECUTED
203b7f0: 01 00 00 00 nop <== 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",
203b7f4: 40 00 4a 8d call 204e228 <strerror> <== NOT EXECUTED
203b7f8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
203b7fc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203b800: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203b804: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b808: 40 00 40 f2 call 204bbd0 <printf> <== NOT EXECUTED
203b80c: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 206bdd0 <__FUNCTION__.7603+0x3a8><== NOT EXECUTED
203b810: 81 c7 e0 08 ret <== NOT EXECUTED
203b814: 81 e8 00 00 restore <== NOT EXECUTED
#else
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
203b818: 92 10 20 20 mov 0x20, %o1
203b81c: 7f ff ab 04 call 202642c <rtems_rfs_trace>
203b820: b0 10 20 00 clr %i0
203b824: 80 8a 20 ff btst 0xff, %o0
203b828: 02 bf ff be be 203b720 <rtems_rfs_buffer_open+0x80> <== ALWAYS TAKEN
203b82c: 11 00 81 af sethi %hi(0x206bc00), %o0
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
203b830: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 <== 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",
203b834: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
203b838: d4 00 60 24 ld [ %g1 + 0x24 ], %o2 <== NOT EXECUTED
203b83c: 40 00 40 e5 call 204bbd0 <printf> <== NOT EXECUTED
203b840: 90 12 22 68 or %o0, 0x268, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
}
203b844: 81 c7 e0 08 ret <== NOT EXECUTED
203b848: 81 e8 00 00 restore <== NOT EXECUTED
0203b96c <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
203b96c: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
203b970: 90 10 20 00 clr %o0
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
203b974: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
203b978: 7f ff aa ad call 202642c <rtems_rfs_trace>
203b97c: 92 10 24 00 mov 0x400, %o1
203b980: 80 8a 20 ff btst 0xff, %o0
203b984: 12 80 00 21 bne 203ba08 <rtems_rfs_buffer_setblksize+0x9c><== NEVER TAKEN
203b988: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
203b98c: 7f ff ff d6 call 203b8e4 <rtems_rfs_buffers_release>
203b990: 90 10 00 18 mov %i0, %o0
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
203b994: ba 92 20 00 orcc %o0, 0, %i5
203b998: 04 80 00 07 ble 203b9b4 <rtems_rfs_buffer_setblksize+0x48><== ALWAYS TAKEN
203b99c: 90 10 20 00 clr %o0
203b9a0: 7f ff aa a3 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b9a4: 92 10 24 00 mov 0x400, %o1 <== NOT EXECUTED
203b9a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b9ac: 12 80 00 20 bne 203ba2c <rtems_rfs_buffer_setblksize+0xc0><== NOT EXECUTED
203b9b0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
203b9b4: 7f ff ff a6 call 203b84c <rtems_rfs_buffer_sync>
203b9b8: 90 10 00 18 mov %i0, %o0
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
203b9bc: ba 92 20 00 orcc %o0, 0, %i5
203b9c0: 04 80 00 07 ble 203b9dc <rtems_rfs_buffer_setblksize+0x70><== ALWAYS TAKEN
203b9c4: 90 10 20 00 clr %o0
203b9c8: 7f ff aa 99 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b9cc: 92 10 24 00 mov 0x400, %o1 <== NOT EXECUTED
203b9d0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b9d4: 12 80 00 1e bne 203ba4c <rtems_rfs_buffer_setblksize+0xe0><== NOT EXECUTED
203b9d8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
203b9dc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
203b9e0: 13 20 01 10 sethi %hi(0x80044000), %o1
203b9e4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
203b9e8: 92 12 62 04 or %o1, 0x204, %o1
203b9ec: 9f c0 40 00 call %g1
203b9f0: 94 07 a0 48 add %fp, 0x48, %o2
if (rc < 0)
203b9f4: b0 92 20 00 orcc %o0, 0, %i0
203b9f8: 06 80 00 08 bl 203ba18 <rtems_rfs_buffer_setblksize+0xac> <== NEVER TAKEN
203b9fc: 01 00 00 00 nop
rc = errno;
#endif
return rc;
}
203ba00: 81 c7 e0 08 ret
203ba04: 81 e8 00 00 restore
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
203ba08: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203ba0c: 40 00 40 71 call 204bbd0 <printf> <== NOT EXECUTED
203ba10: 90 12 23 38 or %o0, 0x338, %o0 ! 206bf38 <__FUNCTION__.7603+0x510><== NOT EXECUTED
203ba14: 30 bf ff de b,a 203b98c <rtems_rfs_buffer_setblksize+0x20><== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
if (rc < 0)
rc = errno;
203ba18: 40 00 2e 35 call 20472ec <__errno> <== NOT EXECUTED
203ba1c: 01 00 00 00 nop <== NOT EXECUTED
203ba20: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
#endif
return rc;
}
203ba24: 81 c7 e0 08 ret <== NOT EXECUTED
203ba28: 81 e8 00 00 restore <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
rc = rtems_rfs_buffers_release (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
203ba2c: 40 00 49 ff call 204e228 <strerror> <== NOT EXECUTED
203ba30: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203ba34: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203ba38: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203ba3c: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203ba40: 40 00 40 64 call 204bbd0 <printf> <== NOT EXECUTED
203ba44: 90 12 23 68 or %o0, 0x368, %o0 ! 206bf68 <__FUNCTION__.7603+0x540><== NOT EXECUTED
203ba48: 30 bf ff db b,a 203b9b4 <rtems_rfs_buffer_setblksize+0x48><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
203ba4c: 40 00 49 f7 call 204e228 <strerror> <== NOT EXECUTED
203ba50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203ba54: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203ba58: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203ba5c: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203ba60: 40 00 40 5c call 204bbd0 <printf> <== NOT EXECUTED
203ba64: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 206bfa8 <__FUNCTION__.7603+0x580><== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
203ba68: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
203ba6c: 13 20 01 10 sethi %hi(0x80044000), %o1 <== NOT EXECUTED
203ba70: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
203ba74: 92 12 62 04 or %o1, 0x204, %o1 <== NOT EXECUTED
203ba78: 9f c0 40 00 call %g1 <== NOT EXECUTED
203ba7c: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED
if (rc < 0)
203ba80: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203ba84: 16 bf ff e8 bge 203ba24 <rtems_rfs_buffer_setblksize+0xb8><== NOT EXECUTED
203ba88: 01 00 00 00 nop <== NOT EXECUTED
203ba8c: 30 bf ff e3 b,a 203ba18 <rtems_rfs_buffer_setblksize+0xac><== NOT EXECUTED
0203b84c <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
203b84c: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
203b850: 90 10 20 00 clr %o0
203b854: 92 10 20 20 mov 0x20, %o1
203b858: 7f ff aa f5 call 202642c <rtems_rfs_trace>
203b85c: ba 10 00 18 mov %i0, %i5
203b860: 80 8a 20 ff btst 0xff, %o0
203b864: 12 80 00 1c bne 203b8d4 <rtems_rfs_buffer_sync+0x88> <== NEVER TAKEN
203b868: 11 00 81 af sethi %hi(0x206bc00), %o0
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
203b86c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
203b870: 7f ff 2c f4 call 2006c40 <rtems_bdbuf_syncdev>
203b874: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
203b878: b8 92 20 00 orcc %o0, 0, %i4
203b87c: 12 80 00 06 bne 203b894 <rtems_rfs_buffer_sync+0x48> <== NEVER TAKEN
203b880: 90 10 20 00 clr %o0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
203b884: 7f ff 31 8d call 2007eb8 <rtems_disk_release>
203b888: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
203b88c: 81 c7 e0 08 ret
203b890: 81 e8 00 00 restore
*/
#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))
203b894: 92 10 20 20 mov 0x20, %o1 <== NOT EXECUTED
203b898: 7f ff aa e5 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203b89c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
203b8a0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203b8a4: 02 bf ff f8 be 203b884 <rtems_rfs_buffer_sync+0x38> <== NOT EXECUTED
203b8a8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
203b8ac: 7f ff 34 b4 call 2008b7c <rtems_status_text> <== NOT EXECUTED
203b8b0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
203b8b4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
203b8b8: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b8bc: 40 00 40 c5 call 204bbd0 <printf> <== NOT EXECUTED
203b8c0: 90 12 22 b8 or %o0, 0x2b8, %o0 ! 206beb8 <__FUNCTION__.7603+0x490><== NOT EXECUTED
rtems_status_text (sc));
result = EIO;
}
rtems_disk_release (fs->disk);
203b8c4: 7f ff 31 7d call 2007eb8 <rtems_disk_release> <== NOT EXECUTED
203b8c8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
203b8cc: 81 c7 e0 08 ret <== NOT EXECUTED
203b8d0: 81 e8 00 00 restore <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-sync: syncing\n");
203b8d4: 40 00 41 5a call 204be3c <puts> <== NOT EXECUTED
203b8d8: 90 12 22 98 or %o0, 0x298, %o0 <== 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));
203b8dc: 10 bf ff e5 b 203b870 <rtems_rfs_buffer_sync+0x24> <== NOT EXECUTED
203b8e0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
0203b8e4 <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
203b8e4: 9d e3 bf a0 save %sp, -96, %sp
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
203b8e8: 90 10 20 00 clr %o0
203b8ec: 92 10 20 40 mov 0x40, %o1
203b8f0: 7f ff aa cf call 202642c <rtems_rfs_trace>
203b8f4: ba 10 00 18 mov %i0, %i5
203b8f8: 80 8a 20 ff btst 0xff, %o0
203b8fc: 32 80 00 15 bne,a 203b950 <rtems_rfs_buffers_release+0x6c><== NEVER TAKEN
203b900: d2 06 20 50 ld [ %i0 + 0x50 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
203b904: 92 07 60 60 add %i5, 0x60, %o1
203b908: 94 10 20 00 clr %o2
203b90c: 7f ff fd d0 call 203b04c <rtems_rfs_release_chain>
203b910: 90 07 60 54 add %i5, 0x54, %o0
203b914: 82 38 00 08 xnor %g0, %o0, %g1
203b918: 83 38 60 1f sra %g1, 0x1f, %g1
203b91c: b0 10 00 08 mov %o0, %i0
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
203b920: 92 07 60 70 add %i5, 0x70, %o1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
"release:%" PRIu32 " release-modified:%" PRIu32 "\n",
fs->buffers_count, fs->release_count, fs->release_modified_count);
rc = rtems_rfs_release_chain (&fs->release,
203b924: b0 0e 00 01 and %i0, %g1, %i0
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
203b928: 90 07 60 64 add %i5, 0x64, %o0
203b92c: 7f ff fd c8 call 203b04c <rtems_rfs_release_chain>
203b930: 94 10 20 01 mov 1, %o2
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
203b934: 80 a6 20 00 cmp %i0, 0
203b938: 12 80 00 04 bne 203b948 <rtems_rfs_buffers_release+0x64> <== NEVER TAKEN
203b93c: 80 a2 20 00 cmp %o0, 0
203b940: 34 80 00 02 bg,a 203b948 <rtems_rfs_buffers_release+0x64><== NEVER TAKEN
203b944: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rrc = rc;
return rrc;
}
203b948: 81 c7 e0 08 ret
203b94c: 81 e8 00 00 restore
{
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
203b950: d4 06 20 60 ld [ %i0 + 0x60 ], %o2 <== NOT EXECUTED
203b954: d6 06 20 70 ld [ %i0 + 0x70 ], %o3 <== NOT EXECUTED
203b958: 11 00 81 af sethi %hi(0x206bc00), %o0 <== NOT EXECUTED
203b95c: 40 00 40 9d call 204bbd0 <printf> <== NOT EXECUTED
203b960: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 206bee8 <__FUNCTION__.7603+0x4c0><== 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,
203b964: 10 bf ff e9 b 203b908 <rtems_rfs_buffers_release+0x24> <== NOT EXECUTED
203b968: 92 07 60 60 add %i5, 0x60, %o1 <== NOT EXECUTED
0203c0d4 <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)
{
203c0d4: 9d e3 bf 30 save %sp, -208, %sp
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))
203c0d8: 90 10 20 00 clr %o0
203c0dc: 13 08 00 00 sethi %hi(0x20000000), %o1
203c0e0: 7f ff a8 d3 call 202642c <rtems_rfs_trace>
203c0e4: ba 10 00 18 mov %i0, %i5
203c0e8: 80 8a 20 ff btst 0xff, %o0
203c0ec: 32 80 00 84 bne,a 203c2fc <rtems_rfs_dir_add_entry+0x228><== NEVER TAKEN
203c0f0: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
203c0f4: 90 10 00 1d mov %i5, %o0
203c0f8: 92 10 00 19 mov %i1, %o1
203c0fc: 7f ff f8 ac call 203a3ac <rtems_rfs_block_map_open>
203c100: 94 07 bf 94 add %fp, -108, %o2
if (rc > 0)
203c104: b0 92 20 00 orcc %o0, 0, %i0
203c108: 14 80 00 7b bg 203c2f4 <rtems_rfs_dir_add_entry+0x220> <== NEVER TAKEN
203c10c: 21 00 00 3f sethi %hi(0xfc00), %l0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203c110: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203c114: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203c118: c0 27 bf f8 clr [ %fp + -8 ]
* @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;
203c11c: c0 27 bf e4 clr [ %fp + -28 ]
bpos->boff = 0;
203c120: c0 27 bf e8 clr [ %fp + -24 ]
bpos->block = 0;
203c124: c0 27 bf ec clr [ %fp + -20 ]
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c128: a0 14 23 ff or %l0, 0x3ff, %l0
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
203c12c: a4 06 e0 0a add %i3, 0xa, %l2
/*
* 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);
203c130: 90 10 00 1d mov %i5, %o0
203c134: 92 07 bf 94 add %fp, -108, %o1
203c138: 94 07 bf e4 add %fp, -28, %o2
203c13c: 7f ff f9 75 call 203a710 <rtems_rfs_block_map_find>
203c140: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
203c144: b0 92 20 00 orcc %o0, 0, %i0
203c148: 04 80 00 b1 ble 203c40c <rtems_rfs_dir_add_entry+0x338>
203c14c: 80 a6 20 06 cmp %i0, 6
{
if (rc != ENXIO)
203c150: 12 80 00 c2 bne 203c458 <rtems_rfs_dir_add_entry+0x384> <== NEVER TAKEN
203c154: 90 10 00 1d mov %i5, %o0
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
203c158: 92 07 bf 94 add %fp, -108, %o1
203c15c: 94 10 20 01 mov 1, %o2
203c160: 7f ff f9 f0 call 203a920 <rtems_rfs_block_map_grow>
203c164: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
203c168: b0 92 20 00 orcc %o0, 0, %i0
203c16c: 14 80 00 cc bg 203c49c <rtems_rfs_dir_add_entry+0x3c8> <== NEVER TAKEN
203c170: a2 10 20 00 clr %l1
}
read = false;
}
bpos.bno++;
203c174: c2 07 bf e4 ld [ %fp + -28 ], %g1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
203c178: d4 07 bf fc ld [ %fp + -4 ], %o2
}
read = false;
}
bpos.bno++;
203c17c: 82 00 60 01 inc %g1
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
203c180: a2 0c 60 ff and %l1, 0xff, %l1
}
read = false;
}
bpos.bno++;
203c184: c2 27 bf e4 st %g1, [ %fp + -28 ]
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
203c188: 90 10 00 1d mov %i5, %o0
203c18c: 92 07 bf f0 add %fp, -16, %o1
203c190: 7f ff fc 99 call 203b3f4 <rtems_rfs_buffer_handle_request>
203c194: 96 10 00 11 mov %l1, %o3
if (rc > 0)
203c198: b0 92 20 00 orcc %o0, 0, %i0
203c19c: 14 80 00 9e bg 203c414 <rtems_rfs_dir_add_entry+0x340> <== NEVER TAKEN
203c1a0: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
203c1a4: 80 a4 60 00 cmp %l1, 0
203c1a8: 02 80 00 68 be 203c348 <rtems_rfs_dir_add_entry+0x274>
203c1ac: e2 00 60 1c ld [ %g1 + 0x1c ], %l1
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
203c1b0: da 07 60 08 ld [ %i5 + 8 ], %o5
203c1b4: 9e 83 7f f6 addcc %o5, -10, %o7
203c1b8: 02 bf ff df be 203c134 <rtems_rfs_dir_add_entry+0x60> <== NEVER TAKEN
203c1bc: 90 10 00 1d mov %i5, %o0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
203c1c0: c2 0c 60 09 ldub [ %l1 + 9 ], %g1
203c1c4: e8 0c 60 08 ldub [ %l1 + 8 ], %l4
eino = rtems_rfs_dir_entry_ino (entry);
203c1c8: c4 0c 40 00 ldub [ %l1 ], %g2
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);
203c1cc: a9 2d 20 08 sll %l4, 8, %l4
eino = rtems_rfs_dir_entry_ino (entry);
203c1d0: c8 0c 60 01 ldub [ %l1 + 1 ], %g4
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);
203c1d4: a8 15 00 01 or %l4, %g1, %l4
eino = rtems_rfs_dir_entry_ino (entry);
203c1d8: c6 0c 60 02 ldub [ %l1 + 2 ], %g3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c1dc: 80 a5 00 10 cmp %l4, %l0
203c1e0: 02 80 00 60 be 203c360 <rtems_rfs_dir_add_entry+0x28c>
203c1e4: c2 0c 60 03 ldub [ %l1 + 3 ], %g1
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203c1e8: a6 09 20 ff and %g4, 0xff, %l3
203c1ec: 86 08 e0 ff and %g3, 0xff, %g3
203c1f0: a7 2c e0 10 sll %l3, 0x10, %l3
203c1f4: 87 28 e0 08 sll %g3, 8, %g3
203c1f8: 82 08 60 ff and %g1, 0xff, %g1
203c1fc: a6 14 c0 03 or %l3, %g3, %l3
203c200: 85 28 a0 18 sll %g2, 0x18, %g2
203c204: a6 14 c0 01 or %l3, %g1, %l3
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
203c208: b0 10 20 00 clr %i0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203c20c: 10 80 00 20 b 203c28c <rtems_rfs_dir_add_entry+0x1b8>
203c210: a6 14 c0 02 or %l3, %g2, %l3
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
203c214: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
203c218: 80 a5 00 01 cmp %l4, %g1
203c21c: 1a 80 00 1f bcc 203c298 <rtems_rfs_dir_add_entry+0x1c4> <== NEVER TAKEN
203c220: 80 a4 e0 00 cmp %l3, 0
203c224: 02 80 00 1e be 203c29c <rtems_rfs_dir_add_entry+0x1c8> <== NEVER TAKEN
203c228: 90 10 20 00 clr %o0
203c22c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
203c230: 80 a0 40 13 cmp %g1, %l3
203c234: 0a 80 00 1a bcs 203c29c <rtems_rfs_dir_add_entry+0x1c8> <== NEVER TAKEN
203c238: 01 00 00 00 nop
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
offset += elength;
203c23c: b0 06 00 14 add %i0, %l4, %i0
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))
203c240: 80 a6 00 0f cmp %i0, %o7
203c244: 1a bf ff bb bcc 203c130 <rtems_rfs_dir_add_entry+0x5c> <== NEVER TAKEN
203c248: 98 10 00 18 mov %i0, %o4
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
203c24c: e8 0c 60 08 ldub [ %l1 + 8 ], %l4
203c250: c8 0c 60 09 ldub [ %l1 + 9 ], %g4
eino = rtems_rfs_dir_entry_ino (entry);
203c254: e6 0c 40 00 ldub [ %l1 ], %l3
203c258: c6 0c 60 01 ldub [ %l1 + 1 ], %g3
203c25c: c4 0c 60 03 ldub [ %l1 + 3 ], %g2
203c260: c2 0c 60 02 ldub [ %l1 + 2 ], %g1
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);
203c264: a9 2d 20 08 sll %l4, 8, %l4
eino = rtems_rfs_dir_entry_ino (entry);
203c268: a7 2c e0 18 sll %l3, 0x18, %l3
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);
203c26c: a8 15 00 04 or %l4, %g4, %l4
eino = rtems_rfs_dir_entry_ino (entry);
203c270: 87 28 e0 10 sll %g3, 0x10, %g3
203c274: 83 28 60 08 sll %g1, 8, %g1
203c278: a6 14 c0 03 or %l3, %g3, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c27c: 80 a5 00 10 cmp %l4, %l0
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203c280: a6 14 c0 02 or %l3, %g2, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c284: 02 80 00 38 be 203c364 <rtems_rfs_dir_add_entry+0x290>
203c288: a6 14 c0 01 or %l3, %g1, %l3
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
203c28c: 80 a5 20 0a cmp %l4, 0xa
203c290: 14 bf ff e1 bg 203c214 <rtems_rfs_dir_add_entry+0x140> <== ALWAYS TAKEN
203c294: a2 04 40 14 add %l1, %l4, %l1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
203c298: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c29c: 7f ff a8 64 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c2a0: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
203c2a4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c2a8: 02 80 00 0a be 203c2d0 <rtems_rfs_dir_add_entry+0x1fc> <== NOT EXECUTED
203c2ac: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
203c2b0: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203c2b4: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c2b8: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
203c2bc: 90 12 20 70 or %o0, 0x70, %o0 <== NOT EXECUTED
203c2c0: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
203c2c4: 40 00 3e 43 call 204bbd0 <printf> <== NOT EXECUTED
203c2c8: 98 10 00 18 mov %i0, %o4 <== 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);
203c2cc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
203c2d0: 7f ff fb ce call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203c2d4: 90 10 00 1d mov %i5, %o0 <== 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);
rtems_rfs_block_map_close (fs, &map);
203c2d8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203c2dc: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
203c2e0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
203c2e4: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
203c2e8: 92 07 bf 94 add %fp, -108, %o1 <== NOT EXECUTED
203c2ec: 7f ff f8 94 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203c2f0: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
return EIO;
203c2f4: 81 c7 e0 08 ret <== NOT EXECUTED
203c2f8: 81 e8 00 00 restore <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
203c2fc: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203c300: 40 00 3e 34 call 204bbd0 <printf> <== NOT EXECUTED
203c304: 90 12 23 58 or %o0, 0x358, %o0 ! 206c358 <__FUNCTION__.7603+0x930><== NOT EXECUTED
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
203c308: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
203c30c: 02 80 00 09 be 203c330 <rtems_rfs_dir_add_entry+0x25c> <== NOT EXECUTED
203c310: 82 10 20 00 clr %g1 <== NOT EXECUTED
203c314: b0 10 20 00 clr %i0 <== NOT EXECUTED
printf ("%c", name[c]);
203c318: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 <== NOT EXECUTED
203c31c: 40 00 3e 9a call 204bd84 <putchar> <== NOT EXECUTED
203c320: b0 06 20 01 inc %i0 <== 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++)
203c324: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED
203c328: 12 bf ff fc bne 203c318 <rtems_rfs_dir_add_entry+0x244> <== NOT EXECUTED
203c32c: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
203c330: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203c334: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203c338: 40 00 3e 26 call 204bbd0 <printf> <== NOT EXECUTED
203c33c: 90 12 23 88 or %o0, 0x388, %o0 ! 206c388 <__FUNCTION__.7603+0x960><== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
203c340: 10 bf ff 6e b 203c0f8 <rtems_rfs_dir_add_entry+0x24> <== NOT EXECUTED
203c344: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
203c348: d4 07 60 08 ld [ %i5 + 8 ], %o2
203c34c: 90 10 00 11 mov %l1, %o0
203c350: 40 00 39 b4 call 204aa20 <memset>
203c354: 92 10 20 ff mov 0xff, %o1
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
203c358: 10 bf ff 97 b 203c1b4 <rtems_rfs_dir_add_entry+0xe0>
203c35c: da 07 60 08 ld [ %i5 + 8 ], %o5
203c360: 98 10 20 00 clr %o4
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
203c364: 9a 23 40 0c sub %o5, %o4, %o5
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) <
203c368: 80 a4 80 0d cmp %l2, %o5
203c36c: 3a bf ff 72 bcc,a 203c134 <rtems_rfs_dir_add_entry+0x60> <== NEVER TAKEN
203c370: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
203c374: 92 10 00 1b mov %i3, %o1
203c378: 40 00 2a 63 call 2046d04 <rtems_rfs_dir_hash>
203c37c: 90 10 00 1a mov %i2, %o0
rtems_rfs_dir_set_entry_hash (entry, hash);
203c380: 83 32 20 08 srl %o0, 8, %g1
203c384: c2 2c 60 06 stb %g1, [ %l1 + 6 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
203c388: 83 37 20 10 srl %i4, 0x10, %g1
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);
203c38c: 85 32 20 10 srl %o0, 0x10, %g2
rtems_rfs_dir_set_entry_ino (entry, ino);
203c390: c2 2c 60 01 stb %g1, [ %l1 + 1 ]
203c394: 83 37 20 08 srl %i4, 8, %g1
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);
203c398: 87 32 20 18 srl %o0, 0x18, %g3
203c39c: c4 2c 60 05 stb %g2, [ %l1 + 5 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
203c3a0: c2 2c 60 02 stb %g1, [ %l1 + 2 ]
203c3a4: 85 37 20 18 srl %i4, 0x18, %g2
rtems_rfs_dir_set_entry_length (entry,
203c3a8: 83 34 a0 08 srl %l2, 8, %g1
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
203c3ac: 94 10 00 1b mov %i3, %o2
203c3b0: 92 10 00 1a mov %i2, %o1
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);
203c3b4: c6 2c 60 04 stb %g3, [ %l1 + 4 ]
203c3b8: d0 2c 60 07 stb %o0, [ %l1 + 7 ]
rtems_rfs_dir_set_entry_ino (entry, ino);
203c3bc: c4 2c 40 00 stb %g2, [ %l1 ]
rtems_rfs_dir_set_entry_length (entry,
203c3c0: c2 2c 60 08 stb %g1, [ %l1 + 8 ]
(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);
rtems_rfs_dir_set_entry_ino (entry, ino);
203c3c4: f8 2c 60 03 stb %i4, [ %l1 + 3 ]
rtems_rfs_dir_set_entry_length (entry,
203c3c8: e4 2c 60 09 stb %l2, [ %l1 + 9 ]
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
203c3cc: 40 00 39 09 call 204a7f0 <memcpy>
203c3d0: 90 04 60 0a add %l1, 0xa, %o0
rtems_rfs_buffer_mark_dirty (&buffer);
203c3d4: 82 10 20 01 mov 1, %g1
*/
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);
203c3d8: 92 07 bf f0 add %fp, -16, %o1
203c3dc: 90 10 00 1d mov %i5, %o0
203c3e0: 7f ff fb 8a call 203b208 <rtems_rfs_buffer_handle_release>
203c3e4: c2 2f bf f0 stb %g1, [ %fp + -16 ]
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
203c3e8: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
203c3ec: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203c3f0: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203c3f4: c0 27 bf f8 clr [ %fp + -8 ]
203c3f8: 92 07 bf 94 add %fp, -108, %o1
203c3fc: 7f ff f8 50 call 203a53c <rtems_rfs_block_map_close>
203c400: b0 10 20 00 clr %i0
return 0;
203c404: 81 c7 e0 08 ret
203c408: 81 e8 00 00 restore
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
203c40c: 10 bf ff 5a b 203c174 <rtems_rfs_dir_add_entry+0xa0>
203c410: a2 10 20 01 mov 1, %l1
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
203c414: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c418: 7f ff a8 05 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c41c: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
203c420: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c424: 32 80 00 2f bne,a 203c4e0 <rtems_rfs_dir_add_entry+0x40c><== NOT EXECUTED
203c428: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== 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);
203c42c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
203c430: 7f ff fb 76 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203c434: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
203c438: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203c43c: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
203c440: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
203c444: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
203c448: 7f ff f8 3d call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203c44c: 92 07 bf 94 add %fp, -108, %o1 <== NOT EXECUTED
return rc;
}
203c450: 81 c7 e0 08 ret <== NOT EXECUTED
203c454: 81 e8 00 00 restore <== NOT EXECUTED
rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block);
if (rc > 0)
{
if (rc != ENXIO)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
203c458: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c45c: 7f ff a7 f4 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c460: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
203c464: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c468: 22 bf ff f2 be,a 203c430 <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
203c46c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
203c470: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
203c474: 40 00 47 6d call 204e228 <strerror> <== NOT EXECUTED
203c478: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203c47c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
203c480: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203c484: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
203c488: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203c48c: 40 00 3d d1 call 204bbd0 <printf> <== NOT EXECUTED
203c490: 90 12 23 98 or %o0, 0x398, %o0 ! 206c398 <__FUNCTION__.7603+0x970><== 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);
203c494: 10 bf ff e7 b 203c430 <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
203c498: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
203c49c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c4a0: 7f ff a7 e3 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c4a4: 13 08 00 00 sethi %hi(0x20000000), %o1 <== NOT EXECUTED
203c4a8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c4ac: 22 bf ff e1 be,a 203c430 <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
203c4b0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
203c4b4: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
203c4b8: 40 00 47 5c call 204e228 <strerror> <== NOT EXECUTED
203c4bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203c4c0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
203c4c4: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203c4c8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
203c4cc: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203c4d0: 40 00 3d c0 call 204bbd0 <printf> <== NOT EXECUTED
203c4d4: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 206c3e0 <__FUNCTION__.7603+0x9b8><== NOT EXECUTED
203c4d8: 10 bf ff d6 b 203c430 <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
203c4dc: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
203c4e0: 40 00 47 52 call 204e228 <strerror> <== NOT EXECUTED
203c4e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203c4e8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
203c4ec: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203c4f0: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
203c4f4: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c4f8: 40 00 3d b6 call 204bbd0 <printf> <== NOT EXECUTED
203c4fc: 90 12 20 28 or %o0, 0x28, %o0 ! 206c428 <__FUNCTION__.7603+0xa00><== NOT EXECUTED
203c500: 10 bf ff cc b 203c430 <rtems_rfs_dir_add_entry+0x35c> <== NOT EXECUTED
203c504: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0203c508 <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)
{
203c508: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
203c50c: 90 10 20 00 clr %o0
203c510: 13 10 00 00 sethi %hi(0x40000000), %o1
203c514: 7f ff a7 c6 call 202642c <rtems_rfs_trace>
203c518: ba 10 00 18 mov %i0, %i5
203c51c: 80 8a 20 ff btst 0xff, %o0
203c520: 12 80 00 0a bne 203c548 <rtems_rfs_dir_del_entry+0x40> <== NEVER TAKEN
203c524: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
203c528: 90 10 00 1d mov %i5, %o0
203c52c: 7f ff f7 a0 call 203a3ac <rtems_rfs_block_map_open>
203c530: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
203c534: b0 92 20 00 orcc %o0, 0, %i0
203c538: 04 80 00 11 ble 203c57c <rtems_rfs_dir_del_entry+0x74> <== ALWAYS TAKEN
203c53c: 90 10 00 1d mov %i5, %o0
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203c540: 81 c7 e0 08 ret <== NOT EXECUTED
203c544: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
203c548: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203c54c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203c550: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
203c554: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c558: 40 00 3d 9e call 204bbd0 <printf> <== NOT EXECUTED
203c55c: 90 12 20 c8 or %o0, 0xc8, %o0 ! 206c4c8 <__FUNCTION__.7603+0xaa0><== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
203c560: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203c564: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203c568: 7f ff f7 91 call 203a3ac <rtems_rfs_block_map_open> <== NOT EXECUTED
203c56c: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
203c570: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203c574: 14 bf ff f3 bg 203c540 <rtems_rfs_dir_del_entry+0x38> <== NOT EXECUTED
203c578: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
203c57c: 92 07 bf a0 add %fp, -96, %o1
203c580: 94 10 20 00 clr %o2
203c584: 96 10 00 1b mov %i3, %o3
203c588: 7f ff f8 bc call 203a878 <rtems_rfs_block_map_seek>
203c58c: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
203c590: b0 92 20 00 orcc %o0, 0, %i0
203c594: 04 80 00 09 ble 203c5b8 <rtems_rfs_dir_del_entry+0xb0> <== ALWAYS TAKEN
203c598: 80 a6 20 06 cmp %i0, 6
{
if (rc == ENXIO)
203c59c: 22 80 00 02 be,a 203c5a4 <rtems_rfs_dir_del_entry+0x9c> <== NOT EXECUTED
203c5a0: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
203c5a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203c5a8: 7f ff f7 e5 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203c5ac: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
203c5b0: 81 c7 e0 08 ret <== NOT EXECUTED
203c5b4: 81 e8 00 00 restore <== 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)
203c5b8: 80 a0 00 1b cmp %g0, %i3
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c5bc: 27 00 00 3f sethi %hi(0xfc00), %l3
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203c5c0: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203c5c4: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203c5c8: c0 27 bf f8 clr [ %fp + -8 ]
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
203c5cc: a4 60 3f ff subx %g0, -1, %l2
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c5d0: a6 14 e3 ff or %l3, 0x3ff, %l3
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
203c5d4: d4 07 bf fc ld [ %fp + -4 ], %o2
203c5d8: 90 10 00 1d mov %i5, %o0
203c5dc: 92 07 bf f0 add %fp, -16, %o1
203c5e0: 7f ff fb 85 call 203b3f4 <rtems_rfs_buffer_handle_request>
203c5e4: 96 10 20 01 mov 1, %o3
if (rc > 0)
203c5e8: b0 92 20 00 orcc %o0, 0, %i0
203c5ec: 14 80 00 d3 bg 203c938 <rtems_rfs_dir_del_entry+0x430> <== NEVER TAKEN
203c5f0: 82 10 20 00 clr %g1
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
203c5f4: ea 07 60 08 ld [ %i5 + 8 ], %l5
203c5f8: 80 a4 a0 00 cmp %l2, 0
203c5fc: 12 80 00 07 bne 203c618 <rtems_rfs_dir_del_entry+0x110> <== NEVER TAKEN
203c600: b8 10 20 00 clr %i4
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
203c604: 90 10 00 1b mov %i3, %o0
203c608: 40 00 91 d1 call 2060d4c <.urem>
203c60c: 92 10 00 15 mov %l5, %o1
203c610: b8 10 00 08 mov %o0, %i4
203c614: 82 10 00 08 mov %o0, %g1
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
203c618: c4 07 bf f8 ld [ %fp + -8 ], %g2
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
203c61c: 9e 05 7f f6 add %l5, -10, %o7
203c620: 80 a0 40 0f cmp %g1, %o7
203c624: 1a 80 00 4d bcc 203c758 <rtems_rfs_dir_del_entry+0x250> <== NEVER TAKEN
203c628: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
203c62c: a8 00 80 01 add %g2, %g1, %l4
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);
203c630: c6 0d 20 09 ldub [ %l4 + 9 ], %g3
203c634: e0 0d 20 08 ldub [ %l4 + 8 ], %l0
eino = rtems_rfs_dir_entry_ino (entry);
203c638: c2 08 80 01 ldub [ %g2 + %g1 ], %g1
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);
203c63c: a1 2c 20 08 sll %l0, 8, %l0
eino = rtems_rfs_dir_entry_ino (entry);
203c640: c8 0d 20 02 ldub [ %l4 + 2 ], %g4
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);
203c644: a0 14 00 03 or %l0, %g3, %l0
eino = rtems_rfs_dir_entry_ino (entry);
203c648: c4 0d 20 03 ldub [ %l4 + 3 ], %g2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c64c: 80 a4 00 13 cmp %l0, %l3
203c650: 02 80 00 42 be 203c758 <rtems_rfs_dir_del_entry+0x250> <== NEVER TAKEN
203c654: c6 0d 20 01 ldub [ %l4 + 1 ], %g3
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203c658: a2 09 20 ff and %g4, 0xff, %l1
203c65c: 86 08 e0 ff and %g3, 0xff, %g3
203c660: a3 2c 60 08 sll %l1, 8, %l1
203c664: 87 28 e0 10 sll %g3, 0x10, %g3
203c668: 84 08 a0 ff and %g2, 0xff, %g2
203c66c: a2 14 40 03 or %l1, %g3, %l1
203c670: 83 28 60 18 sll %g1, 0x18, %g1
203c674: a2 14 40 02 or %l1, %g2, %l1
203c678: 10 80 00 23 b 203c704 <rtems_rfs_dir_del_entry+0x1fc>
203c67c: a2 14 40 01 or %l1, %g1, %l1
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
203c680: 80 a4 00 01 cmp %l0, %g1
203c684: 1a 80 00 23 bcc 203c710 <rtems_rfs_dir_del_entry+0x208> <== NEVER TAKEN
203c688: 80 a4 60 00 cmp %l1, 0
203c68c: 02 80 00 22 be 203c714 <rtems_rfs_dir_del_entry+0x20c> <== NEVER TAKEN
203c690: 90 10 20 00 clr %o0
203c694: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
203c698: 80 a0 40 11 cmp %g1, %l1
203c69c: 0a 80 00 1e bcs 203c714 <rtems_rfs_dir_del_entry+0x20c> <== NEVER TAKEN
203c6a0: 80 a6 80 11 cmp %i2, %l1
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
203c6a4: 02 80 00 45 be 203c7b8 <rtems_rfs_dir_del_entry+0x2b0> <== ALWAYS TAKEN
203c6a8: 80 a4 a0 00 cmp %l2, 0
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
203c6ac: 02 80 00 1f be 203c728 <rtems_rfs_dir_del_entry+0x220> <== NOT EXECUTED
203c6b0: a8 05 00 10 add %l4, %l0, %l4 <== NOT EXECUTED
rc = EIO;
break;
}
entry += elength;
eoffset += elength;
203c6b4: b8 07 00 10 add %i4, %l0, %i4 <== 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))
203c6b8: 80 a7 00 0f cmp %i4, %o7 <== NOT EXECUTED
203c6bc: 1a 80 00 28 bcc 203c75c <rtems_rfs_dir_del_entry+0x254> <== NOT EXECUTED
203c6c0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
203c6c4: e0 0d 20 08 ldub [ %l4 + 8 ], %l0 <== NOT EXECUTED
203c6c8: c8 0d 20 09 ldub [ %l4 + 9 ], %g4 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
203c6cc: e2 0d 00 00 ldub [ %l4 ], %l1 <== NOT EXECUTED
203c6d0: c6 0d 20 01 ldub [ %l4 + 1 ], %g3 <== NOT EXECUTED
203c6d4: c4 0d 20 03 ldub [ %l4 + 3 ], %g2 <== NOT EXECUTED
203c6d8: c2 0d 20 02 ldub [ %l4 + 2 ], %g1 <== NOT EXECUTED
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);
203c6dc: a1 2c 20 08 sll %l0, 8, %l0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
203c6e0: a3 2c 60 18 sll %l1, 0x18, %l1 <== NOT EXECUTED
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);
203c6e4: a0 14 00 04 or %l0, %g4, %l0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
203c6e8: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
203c6ec: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
203c6f0: a2 14 40 03 or %l1, %g3, %l1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c6f4: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203c6f8: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203c6fc: 02 80 00 17 be 203c758 <rtems_rfs_dir_del_entry+0x250> <== NOT EXECUTED
203c700: a2 14 40 01 or %l1, %g1, %l1 <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
203c704: 80 a4 20 0a cmp %l0, 0xa
203c708: 34 bf ff de bg,a 203c680 <rtems_rfs_dir_del_entry+0x178> <== ALWAYS TAKEN
203c70c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
203c710: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c714: 7f ff a7 46 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c718: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
203c71c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c720: 32 80 00 1d bne,a 203c794 <rtems_rfs_dir_del_entry+0x28c><== NOT EXECUTED
203c724: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
203c728: b0 10 20 05 mov 5, %i0 <== 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);
203c72c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
203c730: 7f ff fa b6 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203c734: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
203c738: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203c73c: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
203c740: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
203c744: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
203c748: 7f ff f7 7d call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203c74c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
}
203c750: 81 c7 e0 08 ret <== NOT EXECUTED
203c754: 81 e8 00 00 restore <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
203c758: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
203c75c: 12 bf ff f5 bne 203c730 <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
203c760: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
203c764: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203c768: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
203c76c: 7f ff f8 60 call 203a8ec <rtems_rfs_block_map_next_block> <== NOT EXECUTED
203c770: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
203c774: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
203c778: 02 80 00 6e be 203c930 <rtems_rfs_dir_del_entry+0x428> <== NOT EXECUTED
203c77c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
203c780: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203c784: 02 bf ff 95 be 203c5d8 <rtems_rfs_dir_del_entry+0xd0> <== NOT EXECUTED
203c788: d4 07 bf fc ld [ %fp + -4 ], %o2 <== 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);
203c78c: 10 bf ff e9 b 203c730 <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
203c790: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
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: "
203c794: d8 07 bf fc ld [ %fp + -4 ], %o4 <== NOT EXECUTED
203c798: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
203c79c: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c7a0: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
203c7a4: 9a 10 00 1c mov %i4, %o5 <== NOT EXECUTED
203c7a8: 40 00 3d 0a call 204bbd0 <printf> <== NOT EXECUTED
203c7ac: 90 12 21 50 or %o0, 0x150, %o0 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
203c7b0: 10 bf ff df b 203c72c <rtems_rfs_dir_del_entry+0x224> <== NOT EXECUTED
203c7b4: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
memmove (entry, entry + elength, remaining);
203c7b8: 92 05 00 10 add %l4, %l0, %o1
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
203c7bc: b6 04 00 1c add %l0, %i4, %i3
memmove (entry, entry + elength, remaining);
203c7c0: 90 10 00 14 mov %l4, %o0
}
if (ino == rtems_rfs_dir_entry_ino (entry))
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
203c7c4: b6 25 40 1b sub %l5, %i3, %i3
memmove (entry, entry + elength, remaining);
203c7c8: 40 00 38 46 call 204a8e0 <memmove>
203c7cc: 94 10 00 1b mov %i3, %o2
memset (entry + remaining, 0xff, elength);
203c7d0: 92 10 20 ff mov 0xff, %o1
203c7d4: 94 10 00 10 mov %l0, %o2
203c7d8: 40 00 38 92 call 204aa20 <memset>
203c7dc: 90 05 00 1b add %l4, %i3, %o0
* 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);
203c7e0: c2 0d 20 09 ldub [ %l4 + 9 ], %g1
203c7e4: f6 0d 20 08 ldub [ %l4 + 8 ], %i3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
203c7e8: 90 10 20 00 clr %o0
* 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);
203c7ec: b7 2e e0 08 sll %i3, 8, %i3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
203c7f0: 13 10 00 00 sethi %hi(0x40000000), %o1
203c7f4: 7f ff a7 0e call 202642c <rtems_rfs_trace>
203c7f8: b6 16 c0 01 or %i3, %g1, %i3
203c7fc: 80 8a 20 ff btst 0xff, %o0
203c800: 02 80 00 17 be 203c85c <rtems_rfs_dir_del_entry+0x354> <== ALWAYS TAKEN
203c804: 03 3f ff c0 sethi %hi(0xffff0000), %g1
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");
203c808: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== 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: "
203c80c: d6 07 bf fc ld [ %fp + -4 ], %o3 <== NOT EXECUTED
203c810: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
203c814: 12 80 00 06 bne 203c82c <rtems_rfs_dir_del_entry+0x324> <== NOT EXECUTED
203c818: c4 07 bf a8 ld [ %fp + -88 ], %g2 <== NOT EXECUTED
203c81c: 1b 00 81 b1 sethi %hi(0x206c400), %o5 <== 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");
203c820: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
203c824: 02 80 00 07 be 203c840 <rtems_rfs_dir_del_entry+0x338> <== NOT EXECUTED
203c828: 9a 13 60 b8 or %o5, 0xb8, %o5 <== NOT EXECUTED
203c82c: 84 00 bf ff add %g2, -1, %g2 <== 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: "
203c830: 1b 00 81 b1 sethi %hi(0x206c400), %o5 <== 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");
203c834: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
203c838: 02 80 00 51 be 203c97c <rtems_rfs_dir_del_entry+0x474> <== NOT EXECUTED
203c83c: 9a 13 60 c0 or %o5, 0xc0, %o5 <== 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: "
203c840: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c844: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203c848: 90 12 21 a0 or %o0, 0x1a0, %o0 <== NOT EXECUTED
203c84c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
203c850: 40 00 3c e0 call 204bbd0 <printf> <== NOT EXECUTED
203c854: 98 10 00 1c mov %i4, %o4 <== 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) &&
203c858: 03 3f ff c0 sethi %hi(0xffff0000), %g1 <== NOT EXECUTED
203c85c: b6 38 40 1b xnor %g1, %i3, %i3
203c860: 80 a6 e0 00 cmp %i3, 0
203c864: 12 80 00 1f bne 203c8e0 <rtems_rfs_dir_del_entry+0x3d8>
203c868: 80 a7 20 00 cmp %i4, 0
203c86c: 12 80 00 1d bne 203c8e0 <rtems_rfs_dir_del_entry+0x3d8> <== ALWAYS TAKEN
203c870: c2 07 bf b0 ld [ %fp + -80 ], %g1
(eoffset == 0) && rtems_rfs_block_map_last (&map))
203c874: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
203c878: 12 80 00 28 bne 203c918 <rtems_rfs_dir_del_entry+0x410> <== NOT EXECUTED
203c87c: c4 07 bf a8 ld [ %fp + -88 ], %g2 <== NOT EXECUTED
203c880: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
203c884: 12 80 00 26 bne 203c91c <rtems_rfs_dir_del_entry+0x414> <== NOT EXECUTED
203c888: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
203c88c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203c890: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
203c894: 7f ff f9 1a call 203acfc <rtems_rfs_block_map_shrink> <== NOT EXECUTED
203c898: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
if (rc > 0)
203c89c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
203c8a0: 04 80 00 10 ble 203c8e0 <rtems_rfs_dir_del_entry+0x3d8> <== NOT EXECUTED
203c8a4: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
203c8a8: 7f ff a6 e1 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c8ac: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
203c8b0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c8b4: 02 80 00 0c be 203c8e4 <rtems_rfs_dir_del_entry+0x3dc> <== NOT EXECUTED
203c8b8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
203c8bc: f6 06 60 08 ld [ %i1 + 8 ], %i3 <== NOT EXECUTED
203c8c0: 40 00 46 5a call 204e228 <strerror> <== NOT EXECUTED
203c8c4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
203c8c8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203c8cc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203c8d0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203c8d4: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c8d8: 40 00 3c be call 204bbd0 <printf> <== NOT EXECUTED
203c8dc: 90 12 22 00 or %o0, 0x200, %o0 ! 206c600 <__FUNCTION__.7603+0xbd8><== 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);
203c8e0: 82 10 20 01 mov 1, %g1
203c8e4: 92 07 bf f0 add %fp, -16, %o1
203c8e8: 90 10 00 1d mov %i5, %o0
203c8ec: 7f ff fa 47 call 203b208 <rtems_rfs_buffer_handle_release>
203c8f0: c2 2f bf f0 stb %g1, [ %fp + -16 ]
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
203c8f4: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
203c8f8: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203c8fc: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203c900: c0 27 bf f8 clr [ %fp + -8 ]
203c904: 92 07 bf a0 add %fp, -96, %o1
203c908: 7f ff f7 0d call 203a53c <rtems_rfs_block_map_close>
203c90c: b0 10 20 00 clr %i0
return 0;
203c910: 81 c7 e0 08 ret
203c914: 81 e8 00 00 restore
" offset=%d last=%s\n",
ino, elength, block, eoffset,
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
203c918: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
203c91c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
203c920: 12 bf ff f1 bne 203c8e4 <rtems_rfs_dir_del_entry+0x3dc> <== NOT EXECUTED
203c924: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
203c928: 10 bf ff da b 203c890 <rtems_rfs_dir_del_entry+0x388> <== NOT EXECUTED
203c92c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
203c930: 10 bf ff 7f b 203c72c <rtems_rfs_dir_del_entry+0x224> <== NOT EXECUTED
203c934: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
203c938: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c93c: 7f ff a6 bc call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c940: 13 10 00 00 sethi %hi(0x40000000), %o1 <== NOT EXECUTED
203c944: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c948: 22 bf ff 7a be,a 203c730 <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
203c94c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
203c950: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
203c954: 40 00 46 35 call 204e228 <strerror> <== NOT EXECUTED
203c958: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203c95c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
203c960: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203c964: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
203c968: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203c96c: 40 00 3c 99 call 204bbd0 <printf> <== NOT EXECUTED
203c970: 90 12 21 08 or %o0, 0x108, %o0 ! 206c508 <__FUNCTION__.7603+0xae0><== 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);
203c974: 10 bf ff 6f b 203c730 <rtems_rfs_dir_del_entry+0x228> <== NOT EXECUTED
203c978: 92 07 bf f0 add %fp, -16, %o1 <== 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: "
203c97c: 1b 00 81 b1 sethi %hi(0x206c400), %o5 <== NOT EXECUTED
203c980: 10 bf ff b0 b 203c840 <rtems_rfs_dir_del_entry+0x338> <== NOT EXECUTED
203c984: 9a 13 60 b8 or %o5, 0xb8, %o5 ! 206c4b8 <__FUNCTION__.7603+0xa90><== NOT EXECUTED
0203cd30 <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
203cd30: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
203cd34: 90 10 20 00 clr %o0
203cd38: 13 20 00 00 sethi %hi(0x80000000), %o1
203cd3c: 7f ff a5 bc call 202642c <rtems_rfs_trace>
203cd40: ba 10 00 18 mov %i0, %i5
203cd44: 80 8a 20 ff btst 0xff, %o0
203cd48: 12 80 00 0a bne 203cd70 <rtems_rfs_dir_empty+0x40> <== NEVER TAKEN
203cd4c: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
203cd50: 90 10 00 1d mov %i5, %o0
203cd54: 7f ff f5 96 call 203a3ac <rtems_rfs_block_map_open>
203cd58: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
203cd5c: b0 92 20 00 orcc %o0, 0, %i0
203cd60: 04 80 00 0f ble 203cd9c <rtems_rfs_dir_empty+0x6c> <== ALWAYS TAKEN
203cd64: 90 10 00 1d mov %i5, %o0
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203cd68: 81 c7 e0 08 ret <== NOT EXECUTED
203cd6c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
203cd70: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203cd74: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203cd78: 40 00 3b 96 call 204bbd0 <printf> <== NOT EXECUTED
203cd7c: 90 12 23 30 or %o0, 0x330, %o0 ! 206c730 <__FUNCTION__.7603+0xd08><== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
203cd80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203cd84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203cd88: 7f ff f5 89 call 203a3ac <rtems_rfs_block_map_open> <== NOT EXECUTED
203cd8c: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
203cd90: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203cd94: 14 bf ff f5 bg 203cd68 <rtems_rfs_dir_empty+0x38> <== NOT EXECUTED
203cd98: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
203cd9c: 92 07 bf a0 add %fp, -96, %o1
203cda0: 94 10 20 00 clr %o2
203cda4: 96 10 20 00 clr %o3
203cda8: 7f ff f6 b4 call 203a878 <rtems_rfs_block_map_seek>
203cdac: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
203cdb0: b0 92 20 00 orcc %o0, 0, %i0
203cdb4: 14 80 00 7f bg 203cfb0 <rtems_rfs_dir_empty+0x280> <== NEVER TAKEN
203cdb8: 39 00 00 3f sethi %hi(0xfc00), %i4
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
203cdbc: 37 00 81 b1 sethi %hi(0x206c400), %i3
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203cdc0: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203cdc4: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203cdc8: c0 27 bf f8 clr [ %fp + -8 ]
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203cdcc: b8 17 23 ff or %i4, 0x3ff, %i4
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
203cdd0: b6 16 e3 50 or %i3, 0x350, %i3
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
203cdd4: d4 07 bf fc ld [ %fp + -4 ], %o2
203cdd8: 90 10 00 1d mov %i5, %o0
203cddc: 92 07 bf f0 add %fp, -16, %o1
203cde0: 7f ff f9 85 call 203b3f4 <rtems_rfs_buffer_handle_request>
203cde4: 96 10 20 01 mov 1, %o3
if (rc > 0)
203cde8: b0 92 20 00 orcc %o0, 0, %i0
203cdec: 14 80 00 4e bg 203cf24 <rtems_rfs_dir_empty+0x1f4> <== NEVER TAKEN
203cdf0: c2 07 bf f8 ld [ %fp + -8 ], %g1
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
203cdf4: da 07 60 08 ld [ %i5 + 8 ], %o5
203cdf8: 9a 83 7f f6 addcc %o5, -10, %o5
203cdfc: 02 80 00 5a be 203cf64 <rtems_rfs_dir_empty+0x234> <== NEVER TAKEN
203ce00: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
203ce04: c4 08 60 09 ldub [ %g1 + 9 ], %g2
203ce08: e2 08 60 08 ldub [ %g1 + 8 ], %l1
eino = rtems_rfs_dir_entry_ino (entry);
203ce0c: c6 08 40 00 ldub [ %g1 ], %g3
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);
203ce10: a3 2c 60 08 sll %l1, 8, %l1
eino = rtems_rfs_dir_entry_ino (entry);
203ce14: c8 08 60 01 ldub [ %g1 + 1 ], %g4
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);
203ce18: a2 14 40 02 or %l1, %g2, %l1
eino = rtems_rfs_dir_entry_ino (entry);
203ce1c: f4 08 60 02 ldub [ %g1 + 2 ], %i2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203ce20: 80 a4 40 1c cmp %l1, %i4
203ce24: 02 80 00 50 be 203cf64 <rtems_rfs_dir_empty+0x234> <== NEVER TAKEN
203ce28: c4 08 60 03 ldub [ %g1 + 3 ], %g2
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203ce2c: a0 0e a0 ff and %i2, 0xff, %l0
203ce30: 88 09 20 ff and %g4, 0xff, %g4
203ce34: a1 2c 20 08 sll %l0, 8, %l0
203ce38: 89 29 20 10 sll %g4, 0x10, %g4
203ce3c: 84 08 a0 ff and %g2, 0xff, %g2
203ce40: a0 14 00 04 or %l0, %g4, %l0
203ce44: 87 28 e0 18 sll %g3, 0x18, %g3
203ce48: a0 14 00 02 or %l0, %g2, %l0
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
203ce4c: b4 10 20 00 clr %i2
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203ce50: 10 80 00 20 b 203ced0 <rtems_rfs_dir_empty+0x1a0>
203ce54: a0 14 00 03 or %l0, %g3, %l0
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
203ce58: 12 80 00 31 bne 203cf1c <rtems_rfs_dir_empty+0x1ec>
203ce5c: 80 a6 20 00 cmp %i0, 0
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
203ce60: c4 08 60 0a ldub [ %g1 + 0xa ], %g2
203ce64: 80 a0 a0 2e cmp %g2, 0x2e
203ce68: 12 80 00 2d bne 203cf1c <rtems_rfs_dir_empty+0x1ec> <== NEVER TAKEN
203ce6c: 80 a6 20 00 cmp %i0, 0
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
203ce70: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
203ce74: 80 a0 a0 2e cmp %g2, 0x2e
203ce78: 12 80 00 29 bne 203cf1c <rtems_rfs_dir_empty+0x1ec> <== NEVER TAKEN
203ce7c: 80 a6 20 00 cmp %i0, 0
empty = false;
break;
}
entry += elength;
offset += elength;
203ce80: b4 06 80 11 add %i2, %l1, %i2
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
203ce84: 80 a6 80 0d cmp %i2, %o5
203ce88: 1a 80 00 37 bcc 203cf64 <rtems_rfs_dir_empty+0x234> <== NEVER TAKEN
203ce8c: 82 00 40 11 add %g1, %l1, %g1
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
203ce90: e2 08 60 08 ldub [ %g1 + 8 ], %l1
203ce94: de 08 60 09 ldub [ %g1 + 9 ], %o7
eino = rtems_rfs_dir_entry_ino (entry);
203ce98: e0 08 40 00 ldub [ %g1 ], %l0
203ce9c: c8 08 60 01 ldub [ %g1 + 1 ], %g4
203cea0: c6 08 60 03 ldub [ %g1 + 3 ], %g3
203cea4: c4 08 60 02 ldub [ %g1 + 2 ], %g2
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);
203cea8: a3 2c 60 08 sll %l1, 8, %l1
eino = rtems_rfs_dir_entry_ino (entry);
203ceac: a1 2c 20 18 sll %l0, 0x18, %l0
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);
203ceb0: a2 14 40 0f or %l1, %o7, %l1
eino = rtems_rfs_dir_entry_ino (entry);
203ceb4: 89 29 20 10 sll %g4, 0x10, %g4
203ceb8: 85 28 a0 08 sll %g2, 8, %g2
203cebc: a0 14 00 04 or %l0, %g4, %l0
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203cec0: 80 a4 40 1c cmp %l1, %i4
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203cec4: a0 14 00 03 or %l0, %g3, %l0
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203cec8: 02 80 00 27 be 203cf64 <rtems_rfs_dir_empty+0x234>
203cecc: a0 14 00 02 or %l0, %g2, %l0
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
203ced0: 80 a4 60 0a cmp %l1, 0xa
203ced4: 04 80 00 1f ble 203cf50 <rtems_rfs_dir_empty+0x220> <== NEVER TAKEN
203ced8: 90 10 20 01 mov 1, %o0
203cedc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
203cee0: 80 a4 40 02 cmp %l1, %g2
203cee4: 1a 80 00 1b bcc 203cf50 <rtems_rfs_dir_empty+0x220> <== NEVER TAKEN
203cee8: 80 a4 20 00 cmp %l0, 0
203ceec: 02 80 00 19 be 203cf50 <rtems_rfs_dir_empty+0x220> <== NEVER TAKEN
203cef0: 01 00 00 00 nop
203cef4: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
203cef8: 80 a0 80 10 cmp %g2, %l0
203cefc: 0a 80 00 15 bcs 203cf50 <rtems_rfs_dir_empty+0x220> <== NEVER TAKEN
203cf00: 80 a4 60 0b cmp %l1, 0xb
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
203cf04: 12 bf ff d5 bne 203ce58 <rtems_rfs_dir_empty+0x128>
203cf08: 80 a4 60 0c cmp %l1, 0xc
203cf0c: c4 08 60 0a ldub [ %g1 + 0xa ], %g2
203cf10: 80 a0 a0 2e cmp %g2, 0x2e
203cf14: 02 bf ff db be 203ce80 <rtems_rfs_dir_empty+0x150> <== ALWAYS TAKEN
203cf18: 80 a6 20 00 cmp %i0, 0
break;
}
}
}
if ((rc == 0) && !empty)
203cf1c: 22 80 00 02 be,a 203cf24 <rtems_rfs_dir_empty+0x1f4> <== ALWAYS TAKEN
203cf20: b0 10 20 5a mov 0x5a, %i0
*/
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);
203cf24: 92 07 bf f0 add %fp, -16, %o1
203cf28: 7f ff f8 b8 call 203b208 <rtems_rfs_buffer_handle_release>
203cf2c: 90 10 00 1d mov %i5, %o0
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
203cf30: 90 10 00 1d mov %i5, %o0
handle->dirty = false;
203cf34: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203cf38: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203cf3c: c0 27 bf f8 clr [ %fp + -8 ]
203cf40: 7f ff f5 7f call 203a53c <rtems_rfs_block_map_close>
203cf44: 92 07 bf a0 add %fp, -96, %o1
return rc;
}
203cf48: 81 c7 e0 08 ret
203cf4c: 81 e8 00 00 restore
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
203cf50: 7f ff a5 37 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203cf54: 92 10 20 00 clr %o1 <== NOT EXECUTED
203cf58: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203cf5c: 32 80 00 0e bne,a 203cf94 <rtems_rfs_dir_empty+0x264> <== NOT EXECUTED
203cf60: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
203cf64: 90 10 00 1d mov %i5, %o0
203cf68: 92 07 bf a0 add %fp, -96, %o1
203cf6c: 7f ff f6 60 call 203a8ec <rtems_rfs_block_map_next_block>
203cf70: 94 07 bf fc add %fp, -4, %o2
if (rc > 0)
203cf74: b0 92 20 00 orcc %o0, 0, %i0
203cf78: 04 bf ff 98 ble 203cdd8 <rtems_rfs_dir_empty+0xa8> <== NEVER TAKEN
203cf7c: d4 07 bf fc ld [ %fp + -4 ], %o2
{
if (rc == ENXIO)
203cf80: 82 1e 20 06 xor %i0, 6, %g1
203cf84: 80 a0 00 01 cmp %g0, %g1
203cf88: 82 60 20 00 subx %g0, 0, %g1
203cf8c: 10 bf ff e6 b 203cf24 <rtems_rfs_dir_empty+0x1f4>
203cf90: b0 0e 00 01 and %i0, %g1, %i0
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
printf ("rtems-rfs: dir-empty: "
203cf94: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
203cf98: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
203cf9c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
203cfa0: 40 00 3b 0c call 204bbd0 <printf> <== NOT EXECUTED
203cfa4: 98 10 00 1a mov %i2, %o4 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
203cfa8: 10 bf ff f0 b 203cf68 <rtems_rfs_dir_empty+0x238> <== NOT EXECUTED
203cfac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
203cfb0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203cfb4: 7f ff f5 62 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203cfb8: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
return rc;
203cfbc: 81 c7 e0 08 ret <== NOT EXECUTED
203cfc0: 81 e8 00 00 restore <== NOT EXECUTED
02046d04 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
2046d04: 9d e3 bf a0 save %sp, -96, %sp
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;
2046d08: 09 37 f7 c5 sethi %hi(0xdfdf1400), %g4
} 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)
2046d0c: 82 10 00 18 mov %i0, %g1
{
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;
2046d10: 88 11 22 9f or %g4, 0x29f, %g4
} 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)
2046d14: 80 a6 60 0c cmp %i1, 0xc
{
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;
2046d18: 88 06 40 04 add %i1, %g4, %g4
} 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)
2046d1c: 84 10 00 04 mov %g4, %g2
2046d20: 08 80 00 4b bleu 2046e4c <rtems_rfs_dir_hash+0x148>
2046d24: 86 10 00 04 mov %g4, %g3
{
a += k[0];
2046d28: da 08 40 00 ldub [ %g1 ], %o5
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
2046d2c: f0 08 60 04 ldub [ %g1 + 4 ], %i0
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2046d30: f6 08 60 01 ldub [ %g1 + 1 ], %i3
a += ((uint32_t)k[2])<<16;
2046d34: f8 08 60 02 ldub [ %g1 + 2 ], %i4
a += ((uint32_t)k[3])<<24;
2046d38: fa 08 60 03 ldub [ %g1 + 3 ], %i5
b += k[4];
b += ((uint32_t)k[5])<<8;
2046d3c: de 08 60 05 ldub [ %g1 + 5 ], %o7
b += ((uint32_t)k[6])<<16;
2046d40: d0 08 60 06 ldub [ %g1 + 6 ], %o0
b += ((uint32_t)k[7])<<24;
c += k[8];
2046d44: f4 08 60 08 ldub [ %g1 + 8 ], %i2
c += ((uint32_t)k[9])<<8;
c += ((uint32_t)k[10])<<16;
c += ((uint32_t)k[11])<<24;
2046d48: d6 08 60 0b ldub [ %g1 + 0xb ], %o3
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
2046d4c: d4 08 60 07 ldub [ %g1 + 7 ], %o2
c += k[8];
c += ((uint32_t)k[9])<<8;
2046d50: d2 08 60 09 ldub [ %g1 + 9 ], %o1
c += ((uint32_t)k[10])<<16;
2046d54: d8 08 60 0a ldub [ %g1 + 0xa ], %o4
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];
2046d58: 86 03 40 03 add %o5, %g3, %g3
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
2046d5c: 84 06 00 02 add %i0, %g2, %g2
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
c += k[8];
2046d60: 88 06 80 04 add %i2, %g4, %g4
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2046d64: b7 2e e0 08 sll %i3, 8, %i3
a += ((uint32_t)k[2])<<16;
2046d68: b9 2f 20 10 sll %i4, 0x10, %i4
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
2046d6c: 9a 00 c0 1b add %g3, %i3, %o5
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
2046d70: bb 2f 60 18 sll %i5, 0x18, %i5
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
2046d74: 87 2a 20 10 sll %o0, 0x10, %g3
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
2046d78: 9a 03 40 1c add %o5, %i4, %o5
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
2046d7c: 9f 2b e0 08 sll %o7, 8, %o7
while (length > 12)
{
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
2046d80: 9a 03 40 1d add %o5, %i5, %o5
b += k[4];
b += ((uint32_t)k[5])<<8;
2046d84: 9e 00 80 0f add %g2, %o7, %o7
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;
2046d88: 85 2a e0 18 sll %o3, 0x18, %g2
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
2046d8c: 9e 03 c0 03 add %o7, %g3, %o7
b += ((uint32_t)k[7])<<24;
2046d90: 95 2a a0 18 sll %o2, 0x18, %o2
c += k[8];
c += ((uint32_t)k[9])<<8;
2046d94: 87 2a 60 08 sll %o1, 8, %g3
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
b += ((uint32_t)k[6])<<16;
b += ((uint32_t)k[7])<<24;
2046d98: 9e 03 c0 0a add %o7, %o2, %o7
c += k[8];
c += ((uint32_t)k[9])<<8;
2046d9c: 86 01 00 03 add %g4, %g3, %g3
c += ((uint32_t)k[10])<<16;
2046da0: 99 2b 20 10 sll %o4, 0x10, %o4
2046da4: 86 00 c0 0c add %g3, %o4, %g3
c += ((uint32_t)k[11])<<24;
2046da8: 86 00 c0 02 add %g3, %g2, %g3
mix(a,b,c);
2046dac: 88 00 c0 0f add %g3, %o7, %g4
2046db0: 84 23 40 03 sub %o5, %g3, %g2
2046db4: 9b 28 e0 04 sll %g3, 4, %o5
2046db8: 87 30 e0 1c srl %g3, 0x1c, %g3
2046dbc: 86 13 40 03 or %o5, %g3, %g3
2046dc0: 84 18 80 03 xor %g2, %g3, %g2
2046dc4: 86 00 80 04 add %g2, %g4, %g3
2046dc8: 9b 28 a0 06 sll %g2, 6, %o5
2046dcc: 9e 23 c0 02 sub %o7, %g2, %o7
2046dd0: 85 30 a0 1a srl %g2, 0x1a, %g2
2046dd4: 84 13 40 02 or %o5, %g2, %g2
2046dd8: 9e 18 80 0f xor %g2, %o7, %o7
2046ddc: 84 03 c0 03 add %o7, %g3, %g2
2046de0: 9b 2b e0 08 sll %o7, 8, %o5
2046de4: 88 21 00 0f sub %g4, %o7, %g4
2046de8: 9f 33 e0 18 srl %o7, 0x18, %o7
2046dec: 9e 13 40 0f or %o5, %o7, %o7
2046df0: 88 1b c0 04 xor %o7, %g4, %g4
2046df4: 9e 01 00 02 add %g4, %g2, %o7
2046df8: 9b 29 20 10 sll %g4, 0x10, %o5
2046dfc: 86 20 c0 04 sub %g3, %g4, %g3
2046e00: 89 31 20 10 srl %g4, 0x10, %g4
2046e04: 88 13 40 04 or %o5, %g4, %g4
2046e08: 86 19 00 03 xor %g4, %g3, %g3
2046e0c: 9b 28 e0 13 sll %g3, 0x13, %o5
2046e10: 89 30 e0 0d srl %g3, 0xd, %g4
2046e14: 88 13 40 04 or %o5, %g4, %g4
2046e18: 84 20 80 03 sub %g2, %g3, %g2
length -= 12;
2046e1c: b2 06 7f f4 add %i1, -12, %i1
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;
mix(a,b,c);
2046e20: 84 19 00 02 xor %g4, %g2, %g2
2046e24: 86 00 c0 0f add %g3, %o7, %g3
2046e28: 9b 28 a0 04 sll %g2, 4, %o5
2046e2c: 9e 23 c0 02 sub %o7, %g2, %o7
2046e30: 89 30 a0 1c srl %g2, 0x1c, %g4
length -= 12;
k += 12;
2046e34: 82 00 60 0c add %g1, 0xc, %g1
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;
mix(a,b,c);
2046e38: 88 13 40 04 or %o5, %g4, %g4
} 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)
2046e3c: 80 a6 60 0c cmp %i1, 0xc
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;
mix(a,b,c);
2046e40: 84 00 80 03 add %g2, %g3, %g2
} 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)
2046e44: 18 bf ff b9 bgu 2046d28 <rtems_rfs_dir_hash+0x24> <== NEVER TAKEN
2046e48: 88 19 00 0f xor %g4, %o7, %g4
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
2046e4c: b3 2e 60 02 sll %i1, 2, %i1
2046e50: 3b 00 81 1b sethi %hi(0x2046c00), %i5
2046e54: ba 17 60 d0 or %i5, 0xd0, %i5 ! 2046cd0 <rtems_rfs_buffer_bdbuf_release+0x8c>
2046e58: fa 07 40 19 ld [ %i5 + %i1 ], %i5
2046e5c: 81 c7 40 00 jmp %i5
2046e60: 01 00 00 00 nop
{
case 12: c+=((uint32_t)k[11])<<24;
2046e64: fa 08 60 0b ldub [ %g1 + 0xb ], %i5
2046e68: bb 2f 60 18 sll %i5, 0x18, %i5
2046e6c: 88 01 00 1d add %g4, %i5, %g4
case 11: c+=((uint32_t)k[10])<<16;
2046e70: fa 08 60 0a ldub [ %g1 + 0xa ], %i5
2046e74: bb 2f 60 10 sll %i5, 0x10, %i5
2046e78: 88 01 00 1d add %g4, %i5, %g4
case 10: c+=((uint32_t)k[9])<<8;
2046e7c: fa 08 60 09 ldub [ %g1 + 9 ], %i5
2046e80: bb 2f 60 08 sll %i5, 8, %i5
2046e84: 88 01 00 1d add %g4, %i5, %g4
case 9 : c+=k[8];
2046e88: fa 08 60 08 ldub [ %g1 + 8 ], %i5
2046e8c: 88 01 00 1d add %g4, %i5, %g4
case 8 : b+=((uint32_t)k[7])<<24;
2046e90: fa 08 60 07 ldub [ %g1 + 7 ], %i5
2046e94: bb 2f 60 18 sll %i5, 0x18, %i5
2046e98: 84 00 80 1d add %g2, %i5, %g2
case 7 : b+=((uint32_t)k[6])<<16;
2046e9c: fa 08 60 06 ldub [ %g1 + 6 ], %i5
2046ea0: bb 2f 60 10 sll %i5, 0x10, %i5
2046ea4: 84 00 80 1d add %g2, %i5, %g2
case 6 : b+=((uint32_t)k[5])<<8;
2046ea8: fa 08 60 05 ldub [ %g1 + 5 ], %i5
2046eac: bb 2f 60 08 sll %i5, 8, %i5
2046eb0: 84 00 80 1d add %g2, %i5, %g2
case 5 : b+=k[4];
2046eb4: fa 08 60 04 ldub [ %g1 + 4 ], %i5
2046eb8: 84 00 80 1d add %g2, %i5, %g2
case 4 : a+=((uint32_t)k[3])<<24;
2046ebc: fa 08 60 03 ldub [ %g1 + 3 ], %i5
2046ec0: bb 2f 60 18 sll %i5, 0x18, %i5
2046ec4: 86 00 c0 1d add %g3, %i5, %g3
case 3 : a+=((uint32_t)k[2])<<16;
2046ec8: fa 08 60 02 ldub [ %g1 + 2 ], %i5
2046ecc: bb 2f 60 10 sll %i5, 0x10, %i5
2046ed0: 86 00 c0 1d add %g3, %i5, %g3
case 2 : a+=((uint32_t)k[1])<<8;
2046ed4: fa 08 60 01 ldub [ %g1 + 1 ], %i5
2046ed8: bb 2f 60 08 sll %i5, 8, %i5
2046edc: 86 00 c0 1d add %g3, %i5, %g3
case 1 : a+=k[0];
2046ee0: c2 08 40 00 ldub [ %g1 ], %g1
break;
case 0 : return c;
}
}
final(a,b,c);
2046ee4: bb 30 a0 12 srl %g2, 0x12, %i5
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];
2046ee8: 86 00 c0 01 add %g3, %g1, %g3
break;
case 0 : return c;
}
}
final(a,b,c);
2046eec: 83 28 a0 0e sll %g2, 0xe, %g1
2046ef0: 82 17 40 01 or %i5, %g1, %g1
2046ef4: 88 19 00 02 xor %g4, %g2, %g4
2046ef8: 88 21 00 01 sub %g4, %g1, %g4
2046efc: bb 29 20 0b sll %g4, 0xb, %i5
2046f00: 83 31 20 15 srl %g4, 0x15, %g1
2046f04: 82 17 40 01 or %i5, %g1, %g1
2046f08: 86 19 00 03 xor %g4, %g3, %g3
2046f0c: 86 20 c0 01 sub %g3, %g1, %g3
2046f10: bb 28 e0 19 sll %g3, 0x19, %i5
2046f14: 83 30 e0 07 srl %g3, 7, %g1
2046f18: 82 17 40 01 or %i5, %g1, %g1
2046f1c: 84 18 c0 02 xor %g3, %g2, %g2
2046f20: 84 20 80 01 sub %g2, %g1, %g2
2046f24: bb 28 a0 10 sll %g2, 0x10, %i5
2046f28: 83 30 a0 10 srl %g2, 0x10, %g1
2046f2c: 82 17 40 01 or %i5, %g1, %g1
2046f30: 88 18 80 04 xor %g2, %g4, %g4
2046f34: 88 21 00 01 sub %g4, %g1, %g4
2046f38: bb 29 20 04 sll %g4, 4, %i5
2046f3c: 83 31 20 1c srl %g4, 0x1c, %g1
2046f40: 82 17 40 01 or %i5, %g1, %g1
2046f44: 86 19 00 03 xor %g4, %g3, %g3
2046f48: 86 20 c0 01 sub %g3, %g1, %g3
2046f4c: 83 28 e0 0e sll %g3, 0xe, %g1
2046f50: 84 18 c0 02 xor %g3, %g2, %g2
2046f54: 87 30 e0 12 srl %g3, 0x12, %g3
2046f58: 86 10 40 03 or %g1, %g3, %g3
2046f5c: 84 20 80 03 sub %g2, %g3, %g2
2046f60: 88 18 80 04 xor %g2, %g4, %g4
2046f64: 83 28 a0 18 sll %g2, 0x18, %g1
2046f68: 85 30 a0 08 srl %g2, 8, %g2
2046f6c: 84 10 40 02 or %g1, %g2, %g2
2046f70: 88 21 00 02 sub %g4, %g2, %g4
return c;
}
2046f74: 81 c7 e0 08 ret
2046f78: 91 e8 00 04 restore %g0, %g4, %o0
0203bb88 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
203bb88: 9d e3 bf 40 save %sp, -192, %sp
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203bb8c: 90 10 20 00 clr %o0
203bb90: 13 01 00 00 sethi %hi(0x4000000), %o1
203bb94: 7f ff aa 26 call 202642c <rtems_rfs_trace>
203bb98: aa 10 00 1d mov %i5, %l5
203bb9c: 80 8a 20 ff btst 0xff, %o0
203bba0: 12 80 00 12 bne 203bbe8 <rtems_rfs_dir_lookup_ino+0x60> <== NEVER TAKEN
203bba4: 92 10 00 19 mov %i1, %o1
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
203bba8: c0 27 00 00 clr [ %i4 ]
*offset = 0;
203bbac: c0 25 40 00 clr [ %l5 ]
rc = rtems_rfs_block_map_open (fs, inode, &map);
203bbb0: 90 10 00 18 mov %i0, %o0
203bbb4: 7f ff f9 fe call 203a3ac <rtems_rfs_block_map_open>
203bbb8: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
203bbbc: a6 92 20 00 orcc %o0, 0, %l3
203bbc0: 24 80 00 26 ble,a 203bc58 <rtems_rfs_dir_lookup_ino+0xd0><== ALWAYS TAKEN
203bbc4: 92 10 00 1b mov %i3, %o1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203bbc8: 90 10 20 00 clr %o0 <== NOT EXECUTED
203bbcc: 7f ff aa 18 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203bbd0: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
203bbd4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203bbd8: 32 80 00 43 bne,a 203bce4 <rtems_rfs_dir_lookup_ino+0x15c><== NOT EXECUTED
203bbdc: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203bbe0: 81 c7 e0 08 ret <== NOT EXECUTED
203bbe4: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
203bbe8: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203bbec: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bbf0: 40 00 3f f8 call 204bbd0 <printf> <== NOT EXECUTED
203bbf4: 90 12 20 88 or %o0, 0x88, %o0 ! 206c088 <__FUNCTION__.7603+0x660><== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
203bbf8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
203bbfc: 04 80 00 0a ble 203bc24 <rtems_rfs_dir_lookup_ino+0x9c> <== NOT EXECUTED
203bc00: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203bc04: ba 10 20 00 clr %i5 <== NOT EXECUTED
printf ("%c", name[c]);
203bc08: d0 4e 80 1d ldsb [ %i2 + %i5 ], %o0 <== NOT EXECUTED
203bc0c: 40 00 40 5e call 204bd84 <putchar> <== NOT EXECUTED
203bc10: ba 07 60 01 inc %i5 <== 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++)
203bc14: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED
203bc18: 32 bf ff fd bne,a 203bc0c <rtems_rfs_dir_lookup_ino+0x84><== NOT EXECUTED
203bc1c: d0 4e 80 1d ldsb [ %i2 + %i5 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
203bc20: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203bc24: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bc28: 40 00 3f ea call 204bbd0 <printf> <== NOT EXECUTED
203bc2c: 90 12 20 c0 or %o0, 0xc0, %o0 ! 206c0c0 <__FUNCTION__.7603+0x698><== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
203bc30: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED
*offset = 0;
203bc34: c0 25 40 00 clr [ %l5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
203bc38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203bc3c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203bc40: 7f ff f9 db call 203a3ac <rtems_rfs_block_map_open> <== NOT EXECUTED
203bc44: 94 07 bf a0 add %fp, -96, %o2 <== NOT EXECUTED
if (rc > 0)
203bc48: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED
203bc4c: 14 bf ff e0 bg 203bbcc <rtems_rfs_dir_lookup_ino+0x44> <== NOT EXECUTED
203bc50: 90 10 20 00 clr %o0 <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
203bc54: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203bc58: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203bc5c: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203bc60: c0 27 bf f8 clr [ %fp + -8 ]
203bc64: 40 00 2c 28 call 2046d04 <rtems_rfs_dir_hash>
203bc68: 90 10 00 1a mov %i2, %o0
/*
* 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);
203bc6c: 92 07 bf a0 add %fp, -96, %o1
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
203bc70: a4 10 00 08 mov %o0, %l2
/*
* 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);
203bc74: 94 10 20 00 clr %o2
203bc78: 90 10 00 18 mov %i0, %o0
203bc7c: 96 10 20 00 clr %o3
203bc80: 7f ff fa fe call 203a878 <rtems_rfs_block_map_seek>
203bc84: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
203bc88: a6 92 20 00 orcc %o0, 0, %l3
203bc8c: 04 80 00 21 ble 203bd10 <rtems_rfs_dir_lookup_ino+0x188> <== ALWAYS TAKEN
203bc90: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203bc94: 7f ff a9 e6 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203bc98: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
203bc9c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203bca0: 12 80 00 cd bne 203bfd4 <rtems_rfs_dir_lookup_ino+0x44c> <== NOT EXECUTED
203bca4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
rc, strerror (rc));
if (rc == ENXIO)
203bca8: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
203bcac: 22 80 00 02 be,a 203bcb4 <rtems_rfs_dir_lookup_ino+0x12c><== NOT EXECUTED
203bcb0: a6 10 20 02 mov 2, %l3 <== 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);
203bcb4: 92 07 bf f0 add %fp, -16, %o1
203bcb8: 7f ff fd 54 call 203b208 <rtems_rfs_buffer_handle_release>
203bcbc: 90 10 00 18 mov %i0, %o0
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
203bcc0: 90 10 00 18 mov %i0, %o0
handle->dirty = false;
203bcc4: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203bcc8: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203bccc: c0 27 bf f8 clr [ %fp + -8 ]
203bcd0: 92 07 bf a0 add %fp, -96, %o1
203bcd4: 7f ff fa 1a call 203a53c <rtems_rfs_block_map_close>
203bcd8: b0 10 00 13 mov %l3, %i0
return rc;
}
203bcdc: 81 c7 e0 08 ret
203bce0: 81 e8 00 00 restore
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
203bce4: 40 00 49 51 call 204e228 <strerror> <== NOT EXECUTED
203bce8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
203bcec: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203bcf0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203bcf4: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
203bcf8: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203bcfc: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
203bd00: 40 00 3f b4 call 204bbd0 <printf> <== NOT EXECUTED
203bd04: 90 12 20 d0 or %o0, 0xd0, %o0 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203bd08: 81 c7 e0 08 ret <== NOT EXECUTED
203bd0c: 81 e8 00 00 restore <== 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",
203bd10: 2f 00 81 b0 sethi %hi(0x206c000), %l7
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)
203bd14: 23 00 00 3f sethi %hi(0xfc00), %l1
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
203bd18: 2d 00 81 b0 sethi %hi(0x206c000), %l6
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",
203bd1c: ae 15 e1 50 or %l7, 0x150, %l7
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)
203bd20: a2 14 63 ff or %l1, 0x3ff, %l1
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
203bd24: ac 15 a2 20 or %l6, 0x220, %l6
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
203bd28: 80 a4 e0 00 cmp %l3, 0
203bd2c: 12 80 00 7f bne 203bf28 <rtems_rfs_dir_lookup_ino+0x3a0> <== NEVER TAKEN
203bd30: c2 07 bf fc ld [ %fp + -4 ], %g1
203bd34: 80 a0 60 00 cmp %g1, 0
203bd38: 02 80 00 d5 be 203c08c <rtems_rfs_dir_lookup_ino+0x504> <== NEVER TAKEN
203bd3c: 90 10 20 00 clr %o0
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203bd40: 7f ff a9 bb call 202642c <rtems_rfs_trace>
203bd44: 13 01 00 00 sethi %hi(0x4000000), %o1
203bd48: 80 8a 20 ff btst 0xff, %o0
203bd4c: 32 80 00 89 bne,a 203bf70 <rtems_rfs_dir_lookup_ino+0x3e8><== NEVER TAKEN
203bd50: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
203bd54: d4 07 bf fc ld [ %fp + -4 ], %o2
203bd58: 90 10 00 18 mov %i0, %o0
203bd5c: 92 07 bf f0 add %fp, -16, %o1
203bd60: 7f ff fd a5 call 203b3f4 <rtems_rfs_buffer_handle_request>
203bd64: 96 10 20 01 mov 1, %o3
if (rc > 0)
203bd68: a8 92 20 00 orcc %o0, 0, %l4
203bd6c: 14 80 00 b5 bg 203c040 <rtems_rfs_dir_lookup_ino+0x4b8> <== NEVER TAKEN
203bd70: c2 07 bf f8 ld [ %fp + -8 ], %g1
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))
203bd74: d8 06 20 08 ld [ %i0 + 8 ], %o4
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
map.bpos.boff = 0;
203bd78: c0 27 bf b4 clr [ %fp + -76 ]
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
203bd7c: 80 a3 20 0a cmp %o4, 0xa
203bd80: 12 80 00 0a bne 203bda8 <rtems_rfs_dir_lookup_ino+0x220> <== ALWAYS TAKEN
203bd84: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
203bd88: 10 80 00 4a b 203beb0 <rtems_rfs_dir_lookup_ino+0x328> <== NOT EXECUTED
203bd8c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
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))
203bd90: 84 03 3f f6 add %o4, -10, %g2
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
203bd94: 82 04 00 01 add %l0, %g1, %g1
203bd98: c2 27 bf b4 st %g1, [ %fp + -76 ]
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))
203bd9c: 80 a0 80 01 cmp %g2, %g1
203bda0: 08 80 00 43 bleu 203beac <rtems_rfs_dir_lookup_ino+0x324> <== NEVER TAKEN
203bda4: ba 07 40 10 add %i5, %l0, %i5
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);
203bda8: c2 0f 40 00 ldub [ %i5 ], %g1
203bdac: d2 0f 60 01 ldub [ %i5 + 1 ], %o1
203bdb0: d4 0f 60 03 ldub [ %i5 + 3 ], %o2
203bdb4: c6 0f 60 02 ldub [ %i5 + 2 ], %g3
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
203bdb8: e0 0f 60 08 ldub [ %i5 + 8 ], %l0
203bdbc: c4 0f 60 09 ldub [ %i5 + 9 ], %g2
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);
203bdc0: d6 0f 60 04 ldub [ %i5 + 4 ], %o3
203bdc4: da 0f 60 05 ldub [ %i5 + 5 ], %o5
203bdc8: c8 0f 60 06 ldub [ %i5 + 6 ], %g4
203bdcc: de 0f 60 07 ldub [ %i5 + 7 ], %o7
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
203bdd0: 83 28 60 18 sll %g1, 0x18, %g1
203bdd4: 93 2a 60 10 sll %o1, 0x10, %o1
203bdd8: 87 28 e0 08 sll %g3, 8, %g3
203bddc: 82 10 40 09 or %g1, %o1, %g1
203bde0: 82 10 40 0a or %g1, %o2, %g1
203bde4: 82 10 40 03 or %g1, %g3, %g1
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
203bde8: a1 2c 20 08 sll %l0, 8, %l0
203bdec: a0 14 00 02 or %l0, %g2, %l0
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
203bdf0: 80 a4 00 11 cmp %l0, %l1
203bdf4: 02 80 00 2e be 203beac <rtems_rfs_dir_lookup_ino+0x324>
203bdf8: c2 27 00 00 st %g1, [ %i4 ]
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
203bdfc: 80 a4 20 0a cmp %l0, 0xa
203be00: 04 80 00 30 ble 203bec0 <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
203be04: 90 10 20 00 clr %o0
203be08: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
203be0c: 80 a4 00 02 cmp %l0, %g2
203be10: 1a 80 00 2c bcc 203bec0 <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
203be14: 80 a0 60 00 cmp %g1, 0
203be18: 02 80 00 2a be 203bec0 <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
203be1c: 01 00 00 00 nop
203be20: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
203be24: 80 a0 40 02 cmp %g1, %g2
203be28: 18 80 00 26 bgu 203bec0 <rtems_rfs_dir_lookup_ino+0x338> <== NEVER TAKEN
203be2c: 82 09 20 ff and %g4, 0xff, %g1
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);
203be30: 97 2a e0 18 sll %o3, 0x18, %o3
203be34: 9a 0b 60 ff and %o5, 0xff, %o5
203be38: 9e 0b e0 ff and %o7, 0xff, %o7
203be3c: 9b 2b 60 10 sll %o5, 0x10, %o5
203be40: 83 28 60 08 sll %g1, 8, %g1
203be44: 96 12 c0 0d or %o3, %o5, %o3
203be48: 88 12 c0 0f or %o3, %o7, %g4
203be4c: 88 11 00 01 or %g4, %g1, %g4
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
203be50: 80 a1 00 12 cmp %g4, %l2
203be54: 12 bf ff cf bne 203bd90 <rtems_rfs_dir_lookup_ino+0x208>
203be58: c2 07 bf b4 ld [ %fp + -76 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
203be5c: 90 10 20 00 clr %o0
203be60: 7f ff a9 73 call 202642c <rtems_rfs_trace>
203be64: 13 02 00 00 sethi %hi(0x8000000), %o1
203be68: 80 8a 20 ff btst 0xff, %o0
203be6c: 32 80 00 31 bne,a 203bf30 <rtems_rfs_dir_lookup_ino+0x3a8><== NEVER TAKEN
203be70: c6 0f 60 01 ldub [ %i5 + 1 ], %g3 <== 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)
203be74: 90 07 60 0a add %i5, 0xa, %o0
203be78: 92 10 00 1a mov %i2, %o1
203be7c: 40 00 3a 2f call 204a738 <memcmp>
203be80: 94 10 00 1b mov %i3, %o2
203be84: 80 a2 20 00 cmp %o0, 0
203be88: 02 80 00 5c be 203bff8 <rtems_rfs_dir_lookup_ino+0x470> <== ALWAYS TAKEN
203be8c: c2 07 bf b4 ld [ %fp + -76 ], %g1
203be90: d8 06 20 08 ld [ %i0 + 8 ], %o4 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
203be94: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED
203be98: c2 27 bf b4 st %g1, [ %fp + -76 ] <== NOT EXECUTED
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))
203be9c: 84 03 3f f6 add %o4, -10, %g2 <== NOT EXECUTED
203bea0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
203bea4: 18 bf ff c1 bgu 203bda8 <rtems_rfs_dir_lookup_ino+0x220> <== NOT EXECUTED
203bea8: ba 07 40 10 add %i5, %l0, %i5 <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
203beac: 80 a5 20 00 cmp %l4, 0
203beb0: 02 80 00 14 be 203bf00 <rtems_rfs_dir_lookup_ino+0x378> <== ALWAYS TAKEN
203beb4: 90 10 00 18 mov %i0, %o0
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
203beb8: 10 bf ff 7f b 203bcb4 <rtems_rfs_dir_lookup_ino+0x12c>
203bebc: a6 10 00 14 mov %l4, %l3
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203bec0: 7f ff a9 5b call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203bec4: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
203bec8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203becc: 12 80 00 04 bne 203bedc <rtems_rfs_dir_lookup_ino+0x354> <== NOT EXECUTED
203bed0: a8 10 20 05 mov 5, %l4 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
203bed4: 10 bf ff 78 b 203bcb4 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
203bed8: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
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: "
203bedc: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203bee0: d6 07 00 00 ld [ %i4 ], %o3 <== NOT EXECUTED
203bee4: d8 07 bf b4 ld [ %fp + -76 ], %o4 <== NOT EXECUTED
203bee8: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
203beec: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bef0: 40 00 3f 38 call 204bbd0 <printf> <== NOT EXECUTED
203bef4: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 206c1d0 <__FUNCTION__.7603+0x7a8><== NOT EXECUTED
203bef8: 10 bf ff 6f b 203bcb4 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
203befc: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
203bf00: 92 07 bf a0 add %fp, -96, %o1
203bf04: 7f ff fa 7a call 203a8ec <rtems_rfs_block_map_next_block>
203bf08: 94 07 bf fc add %fp, -4, %o2
if ((rc > 0) && (rc != ENXIO))
203bf0c: 80 a2 20 06 cmp %o0, 6
203bf10: 12 80 00 1d bne 203bf84 <rtems_rfs_dir_lookup_ino+0x3fc> <== NEVER TAKEN
203bf14: a6 10 00 08 mov %o0, %l3
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
203bf18: 80 a4 e0 06 cmp %l3, 6
203bf1c: 12 bf ff 84 bne 203bd2c <rtems_rfs_dir_lookup_ino+0x1a4> <== NEVER TAKEN
203bf20: 80 a4 e0 00 cmp %l3, 0
rc = ENOENT;
203bf24: a6 10 20 02 mov 2, %l3
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
203bf28: 10 bf ff e4 b 203beb8 <rtems_rfs_dir_lookup_ino+0x330>
203bf2c: a8 10 00 13 mov %l3, %l4
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
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));
203bf30: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED
203bf34: da 0f 40 00 ldub [ %i5 ], %o5 <== NOT EXECUTED
203bf38: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
203bf3c: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203bf40: d4 1f bf b0 ldd [ %fp + -80 ], %o2 <== 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));
203bf44: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
203bf48: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
203bf4c: 9b 2b 60 18 sll %o5, 0x18, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
203bf50: 90 10 00 16 mov %l6, %o0 <== 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));
203bf54: 9a 13 40 03 or %o5, %g3, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
203bf58: 98 10 00 10 mov %l0, %o4 <== 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));
203bf5c: 9a 13 40 02 or %o5, %g2, %o5 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
203bf60: 40 00 3f 1c call 204bbd0 <printf> <== NOT EXECUTED
203bf64: 9a 13 40 01 or %o5, %g1, %o5 <== 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)
203bf68: 10 bf ff c4 b 203be78 <rtems_rfs_dir_lookup_ino+0x2f0> <== NOT EXECUTED
203bf6c: 90 07 60 0a add %i5, 0xa, %o0 <== 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",
203bf70: d4 07 bf b0 ld [ %fp + -80 ], %o2 <== NOT EXECUTED
203bf74: 40 00 3f 17 call 204bbd0 <printf> <== NOT EXECUTED
203bf78: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
203bf7c: 10 bf ff 77 b 203bd58 <rtems_rfs_dir_lookup_ino+0x1d0> <== NOT EXECUTED
203bf80: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if ((rc > 0) && (rc != ENXIO))
203bf84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203bf88: 04 bf ff e5 ble 203bf1c <rtems_rfs_dir_lookup_ino+0x394> <== NOT EXECUTED
203bf8c: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203bf90: 90 10 20 00 clr %o0 <== NOT EXECUTED
203bf94: 7f ff a9 26 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203bf98: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
203bf9c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203bfa0: 22 bf ff 63 be,a 203bd2c <rtems_rfs_dir_lookup_ino+0x1a4><== NOT EXECUTED
203bfa4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
203bfa8: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
203bfac: 40 00 48 9f call 204e228 <strerror> <== NOT EXECUTED
203bfb0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
203bfb4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203bfb8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203bfbc: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED
203bfc0: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bfc4: 40 00 3f 03 call 204bbd0 <printf> <== NOT EXECUTED
203bfc8: 90 12 22 c8 or %o0, 0x2c8, %o0 ! 206c2c8 <__FUNCTION__.7603+0x8a0><== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
203bfcc: 10 bf ff 58 b 203bd2c <rtems_rfs_dir_lookup_ino+0x1a4> <== NOT EXECUTED
203bfd0: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
*/
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
203bfd4: 40 00 48 95 call 204e228 <strerror> <== NOT EXECUTED
203bfd8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
203bfdc: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
203bfe0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203bfe4: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203bfe8: 40 00 3e fa call 204bbd0 <printf> <== NOT EXECUTED
203bfec: 90 12 21 10 or %o0, 0x110, %o0 ! 206c110 <__FUNCTION__.7603+0x6e8><== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
203bff0: 10 bf ff 2f b 203bcac <rtems_rfs_dir_lookup_ino+0x124> <== NOT EXECUTED
203bff4: 80 a4 e0 06 cmp %l3, 6 <== NOT EXECUTED
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);
203bff8: 90 10 00 18 mov %i0, %o0
203bffc: 7f ff f8 b7 call 203a2d8 <rtems_rfs_block_get_pos>
203c000: 92 07 bf b0 add %fp, -80, %o1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
203c004: 90 10 20 00 clr %o0
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);
203c008: d2 25 40 00 st %o1, [ %l5 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
203c00c: 7f ff a9 08 call 202642c <rtems_rfs_trace>
203c010: 13 04 00 00 sethi %hi(0x10000000), %o1
203c014: 80 8a 20 ff btst 0xff, %o0
203c018: 22 bf ff 28 be,a 203bcb8 <rtems_rfs_dir_lookup_ino+0x130><== ALWAYS TAKEN
203c01c: 92 07 bf f0 add %fp, -16, %o1
printf ("rtems-rfs: dir-lookup-ino: "
203c020: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203c024: d4 07 00 00 ld [ %i4 ], %o2 <== NOT EXECUTED
203c028: d6 05 40 00 ld [ %l5 ], %o3 <== NOT EXECUTED
203c02c: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203c030: 40 00 3e e8 call 204bbd0 <printf> <== NOT EXECUTED
203c034: 90 12 22 80 or %o0, 0x280, %o0 ! 206c280 <__FUNCTION__.7603+0x858><== 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);
203c038: 10 bf ff 20 b 203bcb8 <rtems_rfs_dir_lookup_ino+0x130> <== NOT EXECUTED
203c03c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203c040: 90 10 20 00 clr %o0 <== NOT EXECUTED
203c044: 7f ff a8 fa call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c048: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
203c04c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c050: 22 bf ff 19 be,a 203bcb4 <rtems_rfs_dir_lookup_ino+0x12c><== NOT EXECUTED
203c054: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
203c058: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
203c05c: fa 07 bf fc ld [ %fp + -4 ], %i5 <== NOT EXECUTED
203c060: 40 00 48 72 call 204e228 <strerror> <== NOT EXECUTED
203c064: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
203c068: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
203c06c: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
203c070: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
203c074: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
203c078: 96 10 00 14 mov %l4, %o3 <== NOT EXECUTED
203c07c: 40 00 3e d5 call 204bbd0 <printf> <== NOT EXECUTED
203c080: 90 12 21 88 or %o0, 0x188, %o0 <== NOT EXECUTED
203c084: 10 bf ff 0c b 203bcb4 <rtems_rfs_dir_lookup_ino+0x12c> <== NOT EXECUTED
203c088: a6 10 00 14 mov %l4, %l3 <== NOT EXECUTED
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
203c08c: 13 01 00 00 sethi %hi(0x4000000), %o1 <== NOT EXECUTED
203c090: 7f ff a8 e7 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203c094: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
203c098: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203c09c: 22 bf ff 07 be,a 203bcb8 <rtems_rfs_dir_lookup_ino+0x130><== NOT EXECUTED
203c0a0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
203c0a4: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== NOT EXECUTED
203c0a8: 40 00 48 60 call 204e228 <strerror> <== NOT EXECUTED
203c0ac: 90 10 20 05 mov 5, %o0 <== NOT EXECUTED
203c0b0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203c0b4: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203c0b8: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED
203c0bc: 11 00 81 b0 sethi %hi(0x206c000), %o0 <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
203c0c0: a6 10 20 05 mov 5, %l3 <== NOT EXECUTED
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",
203c0c4: 40 00 3e c3 call 204bbd0 <printf> <== NOT EXECUTED
203c0c8: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED
203c0cc: 10 bf fe fb b 203bcb8 <rtems_rfs_dir_lookup_ino+0x130> <== NOT EXECUTED
203c0d0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0203c988 <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)
{
203c988: 9d e3 bf 40 save %sp, -192, %sp
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))
203c98c: 90 10 20 00 clr %o0
203c990: 7f ff a6 a7 call 202642c <rtems_rfs_trace>
203c994: 13 20 00 00 sethi %hi(0x80000000), %o1
203c998: 80 8a 20 ff btst 0xff, %o0
203c99c: 32 80 00 27 bne,a 203ca38 <rtems_rfs_dir_read+0xb0> <== NEVER TAKEN
203c9a0: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
203c9a4: c0 27 40 00 clr [ %i5 ]
rc = rtems_rfs_block_map_open (fs, dir, &map);
203c9a8: 90 10 00 18 mov %i0, %o0
203c9ac: 92 10 00 19 mov %i1, %o1
203c9b0: 7f ff f6 7f call 203a3ac <rtems_rfs_block_map_open>
203c9b4: 94 07 bf a0 add %fp, -96, %o2
if (rc > 0)
203c9b8: a0 92 20 00 orcc %o0, 0, %l0
203c9bc: 24 80 00 04 ble,a 203c9cc <rtems_rfs_dir_read+0x44> <== ALWAYS TAKEN
203c9c0: e0 06 20 08 ld [ %i0 + 8 ], %l0
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203c9c4: 81 c7 e0 08 ret
203c9c8: 91 e8 00 10 restore %g0, %l0, %o0
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
203c9cc: 90 10 00 1a mov %i2, %o0
203c9d0: a2 10 00 10 mov %l0, %l1
203c9d4: 92 10 00 1b mov %i3, %o1
203c9d8: a0 10 20 00 clr %l0
203c9dc: 96 10 00 11 mov %l1, %o3
203c9e0: 40 00 92 d2 call 2061528 <__moddi3>
203c9e4: 94 10 00 10 mov %l0, %o2
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
203c9e8: 86 a4 40 09 subcc %l1, %o1, %g3
203c9ec: 84 64 00 08 subx %l0, %o0, %g2
203c9f0: 80 a0 a0 00 cmp %g2, 0
203c9f4: 04 80 00 18 ble 203ca54 <rtems_rfs_dir_read+0xcc> <== ALWAYS TAKEN
203c9f8: 01 00 00 00 nop
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
203c9fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203ca00: 92 07 bf a0 add %fp, -96, %o1
203ca04: 94 10 00 1a mov %i2, %o2
203ca08: 96 10 00 1b mov %i3, %o3
203ca0c: 7f ff f7 9b call 203a878 <rtems_rfs_block_map_seek>
203ca10: 98 07 bf fc add %fp, -4, %o4
if (rc > 0)
203ca14: a0 92 20 00 orcc %o0, 0, %l0
203ca18: 04 80 00 25 ble 203caac <rtems_rfs_dir_read+0x124> <== ALWAYS TAKEN
203ca1c: 80 a4 20 06 cmp %l0, 6
{
if (rc == ENXIO)
203ca20: 02 80 00 1f be 203ca9c <rtems_rfs_dir_read+0x114> <== NOT EXECUTED
203ca24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
203ca28: 7f ff f6 c5 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203ca2c: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
203ca30: 81 c7 e0 08 ret <== NOT EXECUTED
203ca34: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
203ca38: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203ca3c: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203ca40: 96 10 00 1b mov %i3, %o3 <== NOT EXECUTED
203ca44: 40 00 3c 63 call 204bbd0 <printf> <== NOT EXECUTED
203ca48: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
203ca4c: 10 bf ff d7 b 203c9a8 <rtems_rfs_dir_read+0x20> <== NOT EXECUTED
203ca50: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
203ca54: 12 80 00 06 bne 203ca6c <rtems_rfs_dir_read+0xe4> <== NEVER TAKEN
203ca58: 90 10 00 1a mov %i2, %o0
203ca5c: 80 a0 e0 0a cmp %g3, 0xa
203ca60: 38 bf ff e8 bgu,a 203ca00 <rtems_rfs_dir_read+0x78> <== ALWAYS TAKEN
203ca64: 90 10 00 18 mov %i0, %o0
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
203ca68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
203ca6c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203ca70: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
203ca74: 40 00 91 c7 call 2061190 <__divdi3> <== NOT EXECUTED
203ca78: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
203ca7c: 96 82 60 01 addcc %o1, 1, %o3 <== NOT EXECUTED
203ca80: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
203ca84: 94 42 20 00 addx %o0, 0, %o2 <== NOT EXECUTED
203ca88: 40 00 91 5d call 2060ffc <__muldi3> <== NOT EXECUTED
203ca8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
203ca90: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
203ca94: 10 bf ff da b 203c9fc <rtems_rfs_dir_read+0x74> <== NOT EXECUTED
203ca98: b6 10 00 09 mov %o1, %i3 <== NOT EXECUTED
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
rc = ENOENT;
203ca9c: a0 10 20 02 mov 2, %l0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
203caa0: 7f ff f6 a7 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
203caa4: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
203caa8: 30 bf ff e2 b,a 203ca30 <rtems_rfs_dir_read+0xa8> <== NOT EXECUTED
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)
203caac: 25 00 00 3f sethi %hi(0xfc00), %l2
}
*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",
203cab0: 29 00 81 b1 sethi %hi(0x206c400), %l4
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203cab4: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203cab8: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203cabc: c0 27 bf f8 clr [ %fp + -8 ]
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)
203cac0: a4 14 a3 ff or %l2, 0x3ff, %l2
}
*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",
203cac4: a8 15 22 f8 or %l4, 0x2f8, %l4
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
203cac8: d4 07 bf fc ld [ %fp + -4 ], %o2
203cacc: 96 10 20 01 mov 1, %o3
203cad0: 92 07 bf f0 add %fp, -16, %o1
203cad4: 7f ff fa 48 call 203b3f4 <rtems_rfs_buffer_handle_request>
203cad8: 90 10 00 18 mov %i0, %o0
if (rc > 0)
203cadc: a0 92 20 00 orcc %o0, 0, %l0
203cae0: 14 80 00 38 bg 203cbc0 <rtems_rfs_dir_read+0x238> <== NEVER TAKEN
203cae4: c2 07 bf f8 ld [ %fp + -8 ], %g1
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
203cae8: ec 07 bf b4 ld [ %fp + -76 ], %l6
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
203caec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
203caf0: 90 10 20 00 clr %o0
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
203caf4: aa 00 40 16 add %g1, %l6, %l5
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203caf8: e6 08 40 16 ldub [ %g1 + %l6 ], %l3
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
203cafc: e2 0d 60 08 ldub [ %l5 + 8 ], %l1
203cb00: c8 0d 60 09 ldub [ %l5 + 9 ], %g4
eino = rtems_rfs_dir_entry_ino (entry);
203cb04: c6 0d 60 01 ldub [ %l5 + 1 ], %g3
203cb08: c4 0d 60 03 ldub [ %l5 + 3 ], %g2
203cb0c: c2 0d 60 02 ldub [ %l5 + 2 ], %g1
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
203cb10: a3 2c 60 08 sll %l1, 8, %l1
eino = rtems_rfs_dir_entry_ino (entry);
203cb14: a7 2c e0 18 sll %l3, 0x18, %l3
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
203cb18: a2 14 40 04 or %l1, %g4, %l1
eino = rtems_rfs_dir_entry_ino (entry);
203cb1c: 87 28 e0 10 sll %g3, 0x10, %g3
203cb20: 83 28 60 08 sll %g1, 8, %g1
203cb24: a6 14 c0 03 or %l3, %g3, %l3
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
203cb28: 13 20 00 00 sethi %hi(0x80000000), %o1
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
203cb2c: a6 14 c0 02 or %l3, %g2, %l3
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
203cb30: 80 a4 40 12 cmp %l1, %l2
203cb34: 12 80 00 2d bne 203cbe8 <rtems_rfs_dir_read+0x260>
203cb38: a6 14 c0 01 or %l3, %g1, %l3
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;
203cb3c: c4 06 20 08 ld [ %i0 + 8 ], %g2
203cb40: c2 07 40 00 ld [ %i5 ], %g1
203cb44: ac 20 80 16 sub %g2, %l6, %l6
203cb48: ac 00 40 16 add %g1, %l6, %l6
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
203cb4c: 7f ff a6 38 call 202642c <rtems_rfs_trace>
203cb50: ec 27 40 00 st %l6, [ %i5 ]
203cb54: 80 8a 20 ff btst 0xff, %o0
203cb58: 12 80 00 0d bne 203cb8c <rtems_rfs_dir_read+0x204> <== NEVER TAKEN
203cb5c: 90 10 00 18 mov %i0, %o0
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
203cb60: 92 07 bf a0 add %fp, -96, %o1
203cb64: 7f ff f7 62 call 203a8ec <rtems_rfs_block_map_next_block>
203cb68: 94 07 bf fc add %fp, -4, %o2
if (rc == ENXIO)
203cb6c: 80 a2 20 06 cmp %o0, 6
203cb70: 02 80 00 13 be 203cbbc <rtems_rfs_dir_read+0x234> <== ALWAYS TAKEN
203cb74: a0 10 00 08 mov %o0, %l0
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
203cb78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203cb7c: 02 bf ff d4 be 203cacc <rtems_rfs_dir_read+0x144> <== NOT EXECUTED
203cb80: d4 07 bf fc ld [ %fp + -4 ], %o2 <== 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);
203cb84: 10 80 00 10 b 203cbc4 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
203cb88: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
}
*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",
203cb8c: d6 07 40 00 ld [ %i5 ], %o3 <== NOT EXECUTED
203cb90: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203cb94: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
203cb98: 40 00 3c 0e call 204bbd0 <printf> <== NOT EXECUTED
203cb9c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
203cba0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203cba4: 92 07 bf a0 add %fp, -96, %o1 <== NOT EXECUTED
203cba8: 7f ff f7 51 call 203a8ec <rtems_rfs_block_map_next_block> <== NOT EXECUTED
203cbac: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
if (rc == ENXIO)
203cbb0: 80 a2 20 06 cmp %o0, 6 <== NOT EXECUTED
203cbb4: 12 bf ff f1 bne 203cb78 <rtems_rfs_dir_read+0x1f0> <== NOT EXECUTED
203cbb8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
rc = ENOENT;
203cbbc: a0 10 20 02 mov 2, %l0
203cbc0: 92 07 bf f0 add %fp, -16, %o1
203cbc4: 7f ff f9 91 call 203b208 <rtems_rfs_buffer_handle_release>
203cbc8: 90 10 00 18 mov %i0, %o0
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
203cbcc: 90 10 00 18 mov %i0, %o0
handle->dirty = false;
203cbd0: c0 2f bf f0 clrb [ %fp + -16 ]
handle->bnum = 0;
203cbd4: c0 27 bf f4 clr [ %fp + -12 ]
handle->buffer = NULL;
203cbd8: c0 27 bf f8 clr [ %fp + -8 ]
203cbdc: 7f ff f6 58 call 203a53c <rtems_rfs_block_map_close>
203cbe0: 92 07 bf a0 add %fp, -96, %o1
return rc;
203cbe4: 30 bf ff 78 b,a 203c9c4 <rtems_rfs_dir_read+0x3c>
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
203cbe8: 80 a4 60 0a cmp %l1, 0xa
203cbec: 04 80 00 0d ble 203cc20 <rtems_rfs_dir_read+0x298> <== NEVER TAKEN
203cbf0: 90 10 20 00 clr %o0
203cbf4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
203cbf8: 80 a4 40 01 cmp %l1, %g1
203cbfc: 1a 80 00 0a bcc 203cc24 <rtems_rfs_dir_read+0x29c> <== NEVER TAKEN
203cc00: 13 20 00 00 sethi %hi(0x80000000), %o1
203cc04: 80 a4 e0 00 cmp %l3, 0
203cc08: 02 80 00 07 be 203cc24 <rtems_rfs_dir_read+0x29c> <== NEVER TAKEN
203cc0c: 01 00 00 00 nop
203cc10: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
203cc14: 80 a0 40 13 cmp %g1, %l3
203cc18: 3a 80 00 11 bcc,a 203cc5c <rtems_rfs_dir_read+0x2d4> <== ALWAYS TAKEN
203cc1c: 90 10 00 1c mov %i4, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
203cc20: 13 20 00 00 sethi %hi(0x80000000), %o1 <== NOT EXECUTED
203cc24: 7f ff a6 02 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203cc28: a0 10 20 05 mov 5, %l0 <== NOT EXECUTED
203cc2c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203cc30: 22 bf ff e5 be,a 203cbc4 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
203cc34: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
203cc38: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
203cc3c: d8 07 bf b4 ld [ %fp + -76 ], %o4 <== NOT EXECUTED
203cc40: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
203cc44: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203cc48: 96 10 00 13 mov %l3, %o3 <== NOT EXECUTED
203cc4c: 40 00 3b e1 call 204bbd0 <printf> <== NOT EXECUTED
203cc50: 90 12 22 78 or %o0, 0x278, %o0 <== 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);
203cc54: 10 bf ff dc b 203cbc4 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
203cc58: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
203cc5c: 92 10 20 00 clr %o1
203cc60: 40 00 37 70 call 204aa20 <memset>
203cc64: 94 10 21 18 mov 0x118, %o2
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
203cc68: c2 07 40 00 ld [ %i5 ], %g1
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
203cc6c: 84 10 21 18 mov 0x118, %g2
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
203cc70: f4 3f 20 08 std %i2, [ %i4 + 8 ]
dirent->d_reclen = sizeof (struct dirent);
203cc74: c4 37 20 10 sth %g2, [ %i4 + 0x10 ]
*length += elength;
203cc78: 82 04 40 01 add %l1, %g1, %g1
203cc7c: c2 27 40 00 st %g1, [ %i5 ]
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
203cc80: c4 06 20 08 ld [ %i0 + 8 ], %g2
203cc84: 84 20 80 16 sub %g2, %l6, %g2
203cc88: 84 20 80 11 sub %g2, %l1, %g2
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
203cc8c: 80 a0 a0 0a cmp %g2, 0xa
203cc90: 14 80 00 04 bg 203cca0 <rtems_rfs_dir_read+0x318> <== ALWAYS TAKEN
203cc94: a2 04 7f f6 add %l1, -10, %l1
*length += remaining;
203cc98: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
203cc9c: c2 27 40 00 st %g1, [ %i5 ] <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
203cca0: 80 a4 60 ff cmp %l1, 0xff
203cca4: 34 80 00 02 bg,a 203ccac <rtems_rfs_dir_read+0x324> <== NEVER TAKEN
203cca8: a2 10 20 ff mov 0xff, %l1 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
203ccac: 92 05 60 0a add %l5, 0xa, %o1
203ccb0: 94 10 00 11 mov %l1, %o2
203ccb4: ba 07 20 14 add %i4, 0x14, %i5
203ccb8: 40 00 36 ce call 204a7f0 <memcpy>
203ccbc: 90 10 00 1d mov %i5, %o0
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
203ccc0: c8 0d 40 00 ldub [ %l5 ], %g4
203ccc4: c6 0d 60 01 ldub [ %l5 + 1 ], %g3
203ccc8: c4 0d 60 03 ldub [ %l5 + 3 ], %g2
203cccc: c2 0d 60 02 ldub [ %l5 + 2 ], %g1
203ccd0: 89 29 20 18 sll %g4, 0x18, %g4
203ccd4: 87 28 e0 10 sll %g3, 0x10, %g3
203ccd8: 83 28 60 08 sll %g1, 8, %g1
203ccdc: 86 11 00 03 or %g4, %g3, %g3
203cce0: 84 10 c0 02 or %g3, %g2, %g2
203cce4: 82 10 80 01 or %g2, %g1, %g1
dirent->d_namlen = elength;
203cce8: e2 37 20 12 sth %l1, [ %i4 + 0x12 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
203ccec: 90 10 20 00 clr %o0
203ccf0: 13 20 00 00 sethi %hi(0x80000000), %o1
203ccf4: 7f ff a5 ce call 202642c <rtems_rfs_trace>
203ccf8: c2 27 00 00 st %g1, [ %i4 ]
203ccfc: 80 8a 20 ff btst 0xff, %o0
203cd00: 22 bf ff b1 be,a 203cbc4 <rtems_rfs_dir_read+0x23c> <== ALWAYS TAKEN
203cd04: 92 07 bf f0 add %fp, -16, %o1
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
203cd08: c4 1f 20 08 ldd [ %i4 + 8 ], %g2 <== NOT EXECUTED
203cd0c: d6 07 00 00 ld [ %i4 ], %o3 <== NOT EXECUTED
203cd10: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
203cd14: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
203cd18: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203cd1c: 98 10 00 1d mov %i5, %o4 <== NOT EXECUTED
203cd20: 40 00 3b ac call 204bbd0 <printf> <== NOT EXECUTED
203cd24: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED
203cd28: 10 bf ff a7 b 203cbc4 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
203cd2c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
0203d308 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
203d308: 9d e3 bf a0 save %sp, -96, %sp
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
203d30c: 90 10 20 10 mov 0x10, %o0
203d310: 92 10 20 00 clr %o1
203d314: 7f ff a4 46 call 202642c <rtems_rfs_trace>
203d318: ba 10 00 18 mov %i0, %i5
203d31c: 80 8a 20 ff btst 0xff, %o0
203d320: 32 80 00 87 bne,a 203d53c <rtems_rfs_file_close+0x234> <== NEVER TAKEN
203d324: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
if (handle->shared->references > 0)
203d328: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
203d32c: c2 02 60 08 ld [ %o1 + 8 ], %g1
203d330: 80 a0 60 00 cmp %g1, 0
203d334: 04 80 00 04 ble 203d344 <rtems_rfs_file_close+0x3c> <== NEVER TAKEN
203d338: 82 00 7f ff add %g1, -1, %g1
handle->shared->references--;
203d33c: c2 22 60 08 st %g1, [ %o1 + 8 ]
if (handle->shared->references == 0)
203d340: 80 a0 60 00 cmp %g1, 0
203d344: 12 80 00 74 bne 203d514 <rtems_rfs_file_close+0x20c> <== NEVER TAKEN
203d348: 90 10 00 1d mov %i5, %o0
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
203d34c: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
203d350: 80 a0 60 00 cmp %g1, 0
203d354: 22 80 00 a7 be,a 203d5f0 <rtems_rfs_file_close+0x2e8> <== ALWAYS TAKEN
203d358: 92 02 60 0c add %o1, 0xc, %o1
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
203d35c: c4 02 60 8c ld [ %o1 + 0x8c ], %g2
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);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203d360: 86 10 20 01 mov 1, %g3
*/
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);
203d364: 89 30 a0 18 srl %g2, 0x18, %g4
203d368: c8 28 60 10 stb %g4, [ %g1 + 0x10 ]
203d36c: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
203d370: 89 30 a0 10 srl %g2, 0x10, %g4
203d374: c8 28 60 11 stb %g4, [ %g1 + 0x11 ]
203d378: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
203d37c: 89 30 a0 08 srl %g2, 8, %g4
203d380: c8 28 60 12 stb %g4, [ %g1 + 0x12 ]
203d384: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
203d388: c4 28 60 13 stb %g2, [ %g1 + 0x13 ]
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
203d38c: c4 06 60 1c ld [ %i1 + 0x1c ], %g2
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203d390: c6 2a 60 1c stb %g3, [ %o1 + 0x1c ]
203d394: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1
*/
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);
203d398: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
203d39c: b9 30 60 18 srl %g1, 0x18, %i4
203d3a0: f8 29 20 14 stb %i4, [ %g4 + 0x14 ]
203d3a4: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
203d3a8: b9 30 60 10 srl %g1, 0x10, %i4
203d3ac: f8 29 20 15 stb %i4, [ %g4 + 0x15 ]
203d3b0: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
203d3b4: b9 30 60 08 srl %g1, 8, %i4
203d3b8: f8 29 20 16 stb %i4, [ %g4 + 0x16 ]
203d3bc: c8 00 a0 18 ld [ %g2 + 0x18 ], %g4
203d3c0: c2 29 20 17 stb %g1, [ %g4 + 0x17 ]
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
203d3c4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203d3c8: c6 28 a0 1c stb %g3, [ %g2 + 0x1c ]
*/
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);
203d3cc: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
203d3d0: c4 00 60 94 ld [ %g1 + 0x94 ], %g2
203d3d4: b9 30 a0 18 srl %g2, 0x18, %i4
203d3d8: f8 29 20 18 stb %i4, [ %g4 + 0x18 ]
203d3dc: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
203d3e0: b9 30 a0 10 srl %g2, 0x10, %i4
203d3e4: f8 29 20 19 stb %i4, [ %g4 + 0x19 ]
203d3e8: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
203d3ec: b9 30 a0 08 srl %g2, 8, %i4
203d3f0: f8 29 20 1a stb %i4, [ %g4 + 0x1a ]
203d3f4: c8 00 60 18 ld [ %g1 + 0x18 ], %g4
203d3f8: c4 29 20 1b stb %g2, [ %g4 + 0x1b ]
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
203d3fc: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
203d400: c6 28 60 1c stb %g3, [ %g1 + 0x1c ]
203d404: c4 02 60 3c ld [ %o1 + 0x3c ], %g2
203d408: c2 02 60 84 ld [ %o1 + 0x84 ], %g1
203d40c: 80 a0 40 02 cmp %g1, %g2
203d410: 02 80 00 72 be 203d5d8 <rtems_rfs_file_close+0x2d0> <== ALWAYS TAKEN
203d414: c4 02 60 88 ld [ %o1 + 0x88 ], %g2
*/
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);
203d418: c2 22 60 3c st %g1, [ %o1 + 0x3c ] <== NOT EXECUTED
203d41c: c4 22 60 40 st %g2, [ %o1 + 0x40 ] <== NOT EXECUTED
map->dirty = true;
203d420: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
203d424: b0 10 20 00 clr %i0 <== NOT EXECUTED
203d428: c2 2a 60 34 stb %g1, [ %o1 + 0x34 ] <== 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);
203d42c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203d430: 7f ff f4 43 call 203a53c <rtems_rfs_block_map_close>
203d434: 92 02 60 34 add %o1, 0x34, %o1
if (rc > 0)
203d438: b8 92 20 00 orcc %o0, 0, %i4
203d43c: 04 80 00 0a ble 203d464 <rtems_rfs_file_close+0x15c> <== ALWAYS TAKEN
203d440: 90 10 20 10 mov 0x10, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
203d444: 7f ff a3 fa call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203d448: 92 10 20 00 clr %o1 <== NOT EXECUTED
203d44c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203d450: 32 80 00 57 bne,a 203d5ac <rtems_rfs_file_close+0x2a4> <== NOT EXECUTED
203d454: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
203d458: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
203d45c: 22 80 00 02 be,a 203d464 <rtems_rfs_file_close+0x15c> <== NOT EXECUTED
203d460: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
203d464: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
203d468: 90 10 00 1d mov %i5, %o0
203d46c: 40 00 0b cc call 204039c <rtems_rfs_inode_close>
203d470: 92 02 60 0c add %o1, 0xc, %o1
if (rc > 0)
203d474: b8 92 20 00 orcc %o0, 0, %i4
203d478: 04 80 00 0a ble 203d4a0 <rtems_rfs_file_close+0x198> <== ALWAYS TAKEN
203d47c: 90 10 20 10 mov 0x10, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
203d480: 7f ff a3 eb call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203d484: 92 10 20 00 clr %o1 <== NOT EXECUTED
203d488: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203d48c: 32 80 00 3d bne,a 203d580 <rtems_rfs_file_close+0x278> <== NOT EXECUTED
203d490: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
203d494: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
203d498: 22 80 00 2f be,a 203d554 <rtems_rfs_file_close+0x24c> <== NOT EXECUTED
203d49c: d0 06 60 1c ld [ %i1 + 0x1c ], %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
203d4a0: 7f ff 45 1b call 200e90c <_Chain_Extract>
203d4a4: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
203d4a8: 7f ff 2e 4f call 2008de4 <free>
203d4ac: d0 06 60 1c ld [ %i1 + 0x1c ], %o0
*/
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);
203d4b0: 90 10 00 1d mov %i5, %o0
203d4b4: 7f ff f7 55 call 203b208 <rtems_rfs_buffer_handle_release>
203d4b8: 92 06 60 04 add %i1, 4, %o1
handle->dirty = false;
203d4bc: c0 2e 60 04 clrb [ %i1 + 4 ]
handle->bnum = 0;
203d4c0: c0 26 60 08 clr [ %i1 + 8 ]
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
203d4c4: 80 a6 20 00 cmp %i0, 0
203d4c8: 04 80 00 19 ble 203d52c <rtems_rfs_file_close+0x224> <== ALWAYS TAKEN
203d4cc: c0 26 60 0c clr [ %i1 + 0xc ]
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
203d4d0: 90 10 20 10 mov 0x10, %o0 <== NOT EXECUTED
203d4d4: 7f ff a3 d6 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203d4d8: 92 10 20 00 clr %o1 <== NOT EXECUTED
203d4dc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203d4e0: 02 80 00 13 be 203d52c <rtems_rfs_file_close+0x224> <== NOT EXECUTED
203d4e4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
203d4e8: 40 00 43 50 call 204e228 <strerror> <== NOT EXECUTED
203d4ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203d4f0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203d4f4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203d4f8: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d4fc: 40 00 39 b5 call 204bbd0 <printf> <== NOT EXECUTED
203d500: 90 12 21 28 or %o0, 0x128, %o0 ! 206c928 <__FUNCTION__.7603+0xf00><== NOT EXECUTED
}
free (handle);
203d504: 7f ff 2e 38 call 2008de4 <free> <== NOT EXECUTED
203d508: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
return rrc;
}
203d50c: 81 c7 e0 08 ret <== NOT EXECUTED
203d510: 81 e8 00 00 restore <== 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);
203d514: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED
203d518: 7f ff f7 3c call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203d51c: b0 10 20 00 clr %i0 <== NOT EXECUTED
handle->dirty = false;
203d520: c0 2e 60 04 clrb [ %i1 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
203d524: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
203d528: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
}
free (handle);
203d52c: 7f ff 2e 2e call 2008de4 <free>
203d530: 90 10 00 19 mov %i1, %o0
return rrc;
}
203d534: 81 c7 e0 08 ret
203d538: 81 e8 00 00 restore
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
203d53c: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d540: d2 00 60 14 ld [ %g1 + 0x14 ], %o1 <== NOT EXECUTED
203d544: 40 00 39 a3 call 204bbd0 <printf> <== NOT EXECUTED
203d548: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
203d54c: 10 bf ff 78 b 203d32c <rtems_rfs_file_close+0x24> <== NOT EXECUTED
203d550: d2 06 60 1c ld [ %i1 + 0x1c ], %o1 <== NOT EXECUTED
203d554: 7f ff 44 ee call 200e90c <_Chain_Extract> <== NOT EXECUTED
203d558: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
if (rrc == 0)
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
203d55c: 7f ff 2e 22 call 2008de4 <free> <== NOT EXECUTED
203d560: d0 06 60 1c ld [ %i1 + 0x1c ], %o0 <== 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);
203d564: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203d568: 7f ff f7 28 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203d56c: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED
handle->dirty = false;
203d570: c0 2e 60 04 clrb [ %i1 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
203d574: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
203d578: 10 bf ff d6 b 203d4d0 <rtems_rfs_file_close+0x1c8> <== NOT EXECUTED
203d57c: c0 26 60 0c clr [ %i1 + 0xc ] <== 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",
203d580: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
203d584: 40 00 43 29 call 204e228 <strerror> <== NOT EXECUTED
203d588: f6 00 60 14 ld [ %g1 + 0x14 ], %i3 <== NOT EXECUTED
203d58c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203d590: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203d594: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203d598: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d59c: 40 00 39 8d call 204bbd0 <printf> <== NOT EXECUTED
203d5a0: 90 12 20 e8 or %o0, 0xe8, %o0 ! 206c8e8 <__FUNCTION__.7603+0xec0><== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
203d5a4: 10 bf ff bd b 203d498 <rtems_rfs_file_close+0x190> <== NOT EXECUTED
203d5a8: 80 a6 20 00 cmp %i0, 0 <== 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",
203d5ac: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
203d5b0: 40 00 43 1e call 204e228 <strerror> <== NOT EXECUTED
203d5b4: f6 00 60 14 ld [ %g1 + 0x14 ], %i3 <== NOT EXECUTED
203d5b8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203d5bc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203d5c0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203d5c4: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d5c8: 40 00 39 82 call 204bbd0 <printf> <== NOT EXECUTED
203d5cc: 90 12 20 a8 or %o0, 0xa8, %o0 ! 206c8a8 <__FUNCTION__.7603+0xe80><== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
203d5d0: 10 bf ff a3 b 203d45c <rtems_rfs_file_close+0x154> <== NOT EXECUTED
203d5d4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
203d5d8: c6 02 60 40 ld [ %o1 + 0x40 ], %g3
203d5dc: 80 a0 80 03 cmp %g2, %g3
203d5e0: 12 bf ff 8e bne 203d418 <rtems_rfs_file_close+0x110> <== NEVER TAKEN
203d5e4: b0 10 20 00 clr %i0
&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);
203d5e8: 10 bf ff 92 b 203d430 <rtems_rfs_file_close+0x128>
203d5ec: 90 10 00 1d mov %i5, %o0
handle->shared->references--;
if (handle->shared->references == 0)
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
203d5f0: 40 00 0a c8 call 2040110 <rtems_rfs_inode_load>
203d5f4: 90 10 00 1d mov %i5, %o0
if (rrc == 0)
203d5f8: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
203d5fc: 80 a2 20 00 cmp %o0, 0
203d600: 12 bf ff 8b bne 203d42c <rtems_rfs_file_close+0x124> <== NEVER TAKEN
203d604: b0 10 00 08 mov %o0, %i0
203d608: 10 bf ff 55 b 203d35c <rtems_rfs_file_close+0x54>
203d60c: c2 02 60 18 ld [ %o1 + 0x18 ], %g1
0203df98 <rtems_rfs_file_get_shared>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
203df98: c2 02 20 74 ld [ %o0 + 0x74 ], %g1
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 ));
203df9c: 84 02 20 78 add %o0, 0x78, %g2
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
203dfa0: 80 a0 40 02 cmp %g1, %g2
203dfa4: 02 80 00 10 be 203dfe4 <rtems_rfs_file_get_shared+0x4c>
203dfa8: 90 10 20 00 clr %o0
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
203dfac: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
203dfb0: 80 a0 c0 09 cmp %g3, %o1
203dfb4: 12 80 00 06 bne 203dfcc <rtems_rfs_file_get_shared+0x34> <== NEVER TAKEN
203dfb8: 90 10 00 01 mov %g1, %o0
203dfbc: 30 80 00 0a b,a 203dfe4 <rtems_rfs_file_get_shared+0x4c>
203dfc0: 80 a0 c0 09 cmp %g3, %o1 <== NOT EXECUTED
203dfc4: 02 80 00 08 be 203dfe4 <rtems_rfs_file_get_shared+0x4c> <== NOT EXECUTED
203dfc8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
203dfcc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
203dfd0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
203dfd4: 32 bf ff fb bne,a 203dfc0 <rtems_rfs_file_get_shared+0x28><== NOT EXECUTED
203dfd8: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 <== NOT EXECUTED
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
203dfdc: 81 c3 e0 08 retl <== NOT EXECUTED
203dfe0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203dfe4: 81 c3 e0 08 retl
0203d844 <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
203d844: 9d e3 bf a0 save %sp, -96, %sp
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d848: 90 10 20 20 mov 0x20, %o0
203d84c: 92 10 20 00 clr %o1
203d850: 7f ff a2 f7 call 202642c <rtems_rfs_trace>
203d854: ba 10 00 18 mov %i0, %i5
203d858: 80 8a 20 ff btst 0xff, %o0
203d85c: 22 80 00 0b be,a 203d888 <rtems_rfs_file_io_end+0x44> <== ALWAYS TAKEN
203d860: c2 07 60 0c ld [ %i5 + 0xc ], %g1
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
203d864: 13 00 81 92 sethi %hi(0x2064800), %o1 <== NOT EXECUTED
203d868: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203d86c: 12 80 00 66 bne 203da04 <rtems_rfs_file_io_end+0x1c0> <== NOT EXECUTED
203d870: 92 12 60 c8 or %o1, 0xc8, %o1 <== NOT EXECUTED
203d874: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d878: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
203d87c: 40 00 38 d5 call 204bbd0 <printf> <== NOT EXECUTED
203d880: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
203d884: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
203d888: 80 a0 60 00 cmp %g1, 0
203d88c: 02 80 00 a0 be 203db0c <rtems_rfs_file_io_end+0x2c8> <== NEVER TAKEN
203d890: 80 a6 a0 00 cmp %i2, 0
{
if (!read)
203d894: 02 80 00 18 be 203d8f4 <rtems_rfs_file_io_end+0xb0>
203d898: 82 10 20 01 mov 1, %g1
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
203d89c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
203d8a0: 92 07 60 04 add %i5, 4, %o1
203d8a4: 7f ff f6 59 call 203b208 <rtems_rfs_buffer_handle_release>
203d8a8: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_file_buffer (handle));
if (rc > 0)
203d8ac: b0 92 20 00 orcc %o0, 0, %i0
203d8b0: 24 80 00 1a ble,a 203d918 <rtems_rfs_file_io_end+0xd4> <== ALWAYS TAKEN
203d8b4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
{
printf (
203d8b8: 3b 00 81 92 sethi %hi(0x2064800), %i5 <== NOT EXECUTED
203d8bc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203d8c0: 12 80 00 54 bne 203da10 <rtems_rfs_file_io_end+0x1cc> <== NOT EXECUTED
203d8c4: ba 17 60 c8 or %i5, 0xc8, %i5 <== NOT EXECUTED
203d8c8: 40 00 42 58 call 204e228 <strerror> <== NOT EXECUTED
203d8cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203d8d0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203d8d4: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
203d8d8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
203d8dc: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d8e0: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
203d8e4: 40 00 38 bb call 204bbd0 <printf> <== NOT EXECUTED
203d8e8: 90 12 22 30 or %o0, 0x230, %o0 <== 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;
203d8ec: 81 c7 e0 08 ret <== NOT EXECUTED
203d8f0: 81 e8 00 00 restore <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
if (!read)
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
203d8f4: c2 2f 60 04 stb %g1, [ %i5 + 4 ]
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
203d8f8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
203d8fc: 92 07 60 04 add %i5, 4, %o1
203d900: 7f ff f6 42 call 203b208 <rtems_rfs_buffer_handle_release>
203d904: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_file_buffer (handle));
if (rc > 0)
203d908: b0 92 20 00 orcc %o0, 0, %i0
203d90c: 34 bf ff ec bg,a 203d8bc <rtems_rfs_file_io_end+0x78> <== NEVER TAKEN
203d910: 3b 00 81 92 sethi %hi(0x2064800), %i5 <== NOT EXECUTED
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
203d914: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 ! 206481c <__log2table+0xb4>
* 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;
203d918: c6 07 60 14 ld [ %i5 + 0x14 ], %g3
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
203d91c: c4 00 60 98 ld [ %g1 + 0x98 ], %g2
* 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;
203d920: b2 06 40 03 add %i1, %g3, %i1
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
203d924: c4 00 a0 08 ld [ %g2 + 8 ], %g2
* 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 >=
203d928: 80 a6 40 02 cmp %i1, %g2
203d92c: 0a 80 00 07 bcs 203d948 <rtems_rfs_file_io_end+0x104>
203d930: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
203d934: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
203d938: b2 26 40 02 sub %i1, %g2, %i1
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
203d93c: 86 00 e0 01 inc %g3
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
203d940: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
203d944: c6 27 60 10 st %g3, [ %i5 + 0x10 ]
}
length = false;
mtime = false;
if (!read &&
203d948: 80 a6 a0 00 cmp %i2, 0
203d94c: 12 80 00 0e bne 203d984 <rtems_rfs_file_io_end+0x140>
203d950: b2 10 20 00 clr %i1
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
203d954: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
}
length = false;
mtime = false;
if (!read &&
203d958: 80 a0 a0 00 cmp %g2, 0
203d95c: 02 80 00 5e be 203dad4 <rtems_rfs_file_io_end+0x290>
203d960: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
203d964: 80 a0 e0 00 cmp %g3, 0
203d968: 12 80 00 5c bne 203dad8 <rtems_rfs_file_io_end+0x294> <== ALWAYS TAKEN
203d96c: 80 a0 80 03 cmp %g2, %g3
203d970: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
203d974: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
203d978: b2 10 20 01 mov 1, %i1
map->dirty = true;
203d97c: 84 10 20 01 mov 1, %g2
203d980: c4 28 60 34 stb %g2, [ %g1 + 0x34 ]
}
atime = rtems_rfs_file_update_atime (handle);
203d984: c2 07 40 00 ld [ %i5 ], %g1
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
203d988: b8 10 20 00 clr %i4
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
203d98c: b6 08 60 01 and %g1, 1, %i3
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
203d990: 80 88 60 02 btst 2, %g1
203d994: 12 80 00 03 bne 203d9a0 <rtems_rfs_file_io_end+0x15c> <== NEVER TAKEN
203d998: b6 1e e0 01 xor %i3, 1, %i3
203d99c: b8 10 00 19 mov %i1, %i4
length = rtems_rfs_file_update_length (handle) && length;
203d9a0: 82 08 60 04 and %g1, 4, %g1
203d9a4: 80 a0 00 01 cmp %g0, %g1
203d9a8: 82 40 3f ff addx %g0, -1, %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d9ac: 90 10 20 20 mov 0x20, %o0
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;
203d9b0: b2 0e 40 01 and %i1, %g1, %i1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d9b4: 92 10 20 00 clr %o1
203d9b8: 7f ff a2 9d call 202642c <rtems_rfs_trace>
203d9bc: b6 0e e0 ff and %i3, 0xff, %i3
203d9c0: 80 8a 20 ff btst 0xff, %o0
203d9c4: 12 80 00 2b bne 203da70 <rtems_rfs_file_io_end+0x22c> <== NEVER TAKEN
203d9c8: b2 0e 60 ff and %i1, 0xff, %i1
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
203d9cc: 80 a6 e0 00 cmp %i3, 0
203d9d0: 12 80 00 1d bne 203da44 <rtems_rfs_file_io_end+0x200> <== ALWAYS TAKEN
203d9d4: 80 8f 20 ff btst 0xff, %i4
203d9d8: 12 80 00 1b bne 203da44 <rtems_rfs_file_io_end+0x200> <== NOT EXECUTED
203d9dc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
203d9e0: 02 80 00 17 be 203da3c <rtems_rfs_file_io_end+0x1f8>
203d9e4: 01 00 00 00 nop
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
203d9e8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
203d9ec: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
203d9f0: c4 00 60 40 ld [ %g1 + 0x40 ], %g2
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
203d9f4: c6 20 60 84 st %g3, [ %g1 + 0x84 ]
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
203d9f8: c4 20 60 88 st %g2, [ %g1 + 0x88 ]
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
203d9fc: 81 c7 e0 08 ret
203da00: 81 e8 00 00 restore
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
203da04: 13 00 81 a1 sethi %hi(0x2068400), %o1 <== NOT EXECUTED
203da08: 10 bf ff 9b b 203d874 <rtems_rfs_file_io_end+0x30> <== NOT EXECUTED
203da0c: 92 12 62 f0 or %o1, 0x2f0, %o1 ! 20686f0 <rtems_rfs_rtems_eval_config+0xd48><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
if (rc > 0)
{
printf (
203da10: 40 00 42 06 call 204e228 <strerror> <== NOT EXECUTED
203da14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203da18: 3b 00 81 a1 sethi %hi(0x2068400), %i5 <== NOT EXECUTED
203da1c: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
203da20: ba 17 62 f0 or %i5, 0x2f0, %i5 <== NOT EXECUTED
203da24: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203da28: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203da2c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
203da30: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
203da34: 40 00 38 67 call 204bbd0 <printf> <== NOT EXECUTED
203da38: 90 12 22 30 or %o0, 0x230, %o0 <== 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;
203da3c: 81 c7 e0 08 ret
203da40: 81 e8 00 00 restore
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
{
time_t now = time (NULL);
203da44: 40 00 59 15 call 2053e98 <time>
203da48: 90 10 20 00 clr %o0
if (read && atime)
203da4c: 80 a6 a0 00 cmp %i2, 0
203da50: 02 80 00 1c be 203dac0 <rtems_rfs_file_io_end+0x27c>
203da54: 80 8f 20 ff btst 0xff, %i4
203da58: 80 a6 e0 00 cmp %i3, 0
203da5c: 02 bf ff e1 be 203d9e0 <rtems_rfs_file_io_end+0x19c> <== NEVER TAKEN
203da60: 80 a6 60 00 cmp %i1, 0
handle->shared->atime = now;
203da64: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
203da68: 10 bf ff de b 203d9e0 <rtems_rfs_file_io_end+0x19c>
203da6c: d0 20 60 8c st %o0, [ %g1 + 0x8c ]
atime = rtems_rfs_file_update_atime (handle);
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
203da70: 80 a0 00 1b cmp %g0, %i3 <== NOT EXECUTED
203da74: 82 0f 20 ff and %i4, 0xff, %g1 <== NOT EXECUTED
203da78: 96 40 3f ff addx %g0, -1, %o3 <== NOT EXECUTED
203da7c: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 <== NOT EXECUTED
203da80: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
203da84: d4 07 60 14 ld [ %i5 + 0x14 ], %o2 <== NOT EXECUTED
203da88: 98 40 3f ff addx %g0, -1, %o4 <== NOT EXECUTED
203da8c: 80 a0 00 19 cmp %g0, %i1 <== NOT EXECUTED
203da90: 96 0a ff ec and %o3, -20, %o3 <== NOT EXECUTED
203da94: 9a 40 3f ff addx %g0, -1, %o5 <== NOT EXECUTED
203da98: 98 0b 3f e0 and %o4, -32, %o4 <== NOT EXECUTED
203da9c: 9a 0b 7f e1 and %o5, -31, %o5 <== NOT EXECUTED
203daa0: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203daa4: 96 02 e0 41 add %o3, 0x41, %o3 <== NOT EXECUTED
203daa8: 98 03 20 4d add %o4, 0x4d, %o4 <== NOT EXECUTED
203daac: 9a 03 60 4c add %o5, 0x4c, %o5 <== NOT EXECUTED
203dab0: 40 00 38 48 call 204bbd0 <printf> <== NOT EXECUTED
203dab4: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
203dab8: 10 bf ff c6 b 203d9d0 <rtems_rfs_file_io_end+0x18c> <== NOT EXECUTED
203dabc: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
203dac0: 02 bf ff c8 be 203d9e0 <rtems_rfs_file_io_end+0x19c>
203dac4: 80 a6 60 00 cmp %i1, 0
handle->shared->mtime = now;
203dac8: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
203dacc: 10 bf ff c5 b 203d9e0 <rtems_rfs_file_io_end+0x19c>
203dad0: d0 20 60 90 st %o0, [ %g1 + 0x90 ]
length = false;
mtime = false;
if (!read &&
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
203dad4: 80 a0 80 03 cmp %g2, %g3
203dad8: 3a bf ff a7 bcc,a 203d974 <rtems_rfs_file_io_end+0x130>
203dadc: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
203dae0: 86 00 ff ff add %g3, -1, %g3
203dae4: 80 a0 80 03 cmp %g2, %g3
203dae8: 12 bf ff a7 bne 203d984 <rtems_rfs_file_io_end+0x140> <== NEVER TAKEN
203daec: b2 10 20 00 clr %i1
203daf0: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
203daf4: c6 00 60 40 ld [ %g1 + 0x40 ], %g3
203daf8: 80 a0 80 03 cmp %g2, %g3
203dafc: 28 bf ff a3 bleu,a 203d988 <rtems_rfs_file_io_end+0x144>
203db00: c2 07 40 00 ld [ %i5 ], %g1
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
203db04: 10 bf ff 9d b 203d978 <rtems_rfs_file_io_end+0x134>
203db08: c4 20 60 40 st %g2, [ %g1 + 0x40 ]
* the size with the new length. The map holds the block count.
*/
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
203db0c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== 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;
203db10: c6 07 60 14 ld [ %i5 + 0x14 ], %g3 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
203db14: c4 00 60 98 ld [ %g1 + 0x98 ], %g2 <== 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;
203db18: b2 06 40 03 add %i1, %g3, %i1 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
203db1c: c4 00 a0 08 ld [ %g2 + 8 ], %g2 <== 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;
203db20: f2 27 60 14 st %i1, [ %i5 + 0x14 ] <== NOT EXECUTED
if (handle->bpos.boff >=
203db24: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED
203db28: 0a bf ff 88 bcs 203d948 <rtems_rfs_file_io_end+0x104> <== NOT EXECUTED
203db2c: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
203db30: 10 bf ff 82 b 203d938 <rtems_rfs_file_io_end+0xf4> <== NOT EXECUTED
203db34: c6 07 60 10 ld [ %i5 + 0x10 ], %g3 <== NOT EXECUTED
0203db38 <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))
203db38: c2 02 20 0c ld [ %o0 + 0xc ], %g1
203db3c: 80 a0 60 00 cmp %g1, 0
203db40: 02 80 00 07 be 203db5c <rtems_rfs_file_io_release+0x24> <== ALWAYS TAKEN
203db44: 92 02 20 04 add %o0, 4, %o1
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
203db48: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED
203db4c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
203db50: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
203db54: 7f ff f5 ad call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203db58: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
return rc;
}
203db5c: 81 c3 e0 08 retl
203db60: 90 10 20 00 clr %o0
0203d610 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
203d610: 9d e3 bf 98 save %sp, -104, %sp
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d614: 90 10 20 20 mov 0x20, %o0
203d618: 92 10 20 00 clr %o1
203d61c: 7f ff a3 84 call 202642c <rtems_rfs_trace>
203d620: ba 10 00 18 mov %i0, %i5
203d624: 80 8a 20 ff btst 0xff, %o0
203d628: 22 80 00 0c be,a 203d658 <rtems_rfs_file_io_start+0x48> <== ALWAYS TAKEN
203d62c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
203d630: 13 00 81 92 sethi %hi(0x2064800), %o1 <== NOT EXECUTED
203d634: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203d638: 12 80 00 2d bne 203d6ec <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
203d63c: 92 12 60 c8 or %o1, 0xc8, %o1 <== NOT EXECUTED
203d640: d4 07 60 10 ld [ %i5 + 0x10 ], %o2 <== NOT EXECUTED
203d644: d6 07 60 14 ld [ %i5 + 0x14 ], %o3 <== NOT EXECUTED
203d648: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d64c: 40 00 39 61 call 204bbd0 <printf> <== NOT EXECUTED
203d650: 90 12 21 50 or %o0, 0x150, %o0 ! 206c950 <__FUNCTION__.7603+0xf28><== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
203d654: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
203d658: 80 a0 60 00 cmp %g1, 0
203d65c: 22 80 00 2d be,a 203d710 <rtems_rfs_file_io_start+0x100> <== ALWAYS TAKEN
203d660: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
block, request_read);
if (rc > 0)
return rc;
}
if (read
203d664: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203d668: 02 80 00 0d be 203d69c <rtems_rfs_file_io_start+0x8c>
203d66c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
203d670: c4 00 60 44 ld [ %g1 + 0x44 ], %g2
203d674: 80 a0 a0 00 cmp %g2, 0
203d678: 12 80 00 20 bne 203d6f8 <rtems_rfs_file_io_start+0xe8> <== NEVER TAKEN
203d67c: c6 00 60 3c ld [ %g1 + 0x3c ], %g3
203d680: 80 a0 e0 00 cmp %g3, 0
203d684: 12 80 00 1e bne 203d6fc <rtems_rfs_file_io_start+0xec> <== ALWAYS TAKEN
203d688: 86 00 ff ff add %g3, -1, %g3
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
203d68c: f4 00 60 40 ld [ %g1 + 0x40 ], %i2 <== NOT EXECUTED
203d690: 80 a6 a0 00 cmp %i2, 0
203d694: 32 80 00 05 bne,a 203d6a8 <rtems_rfs_file_io_start+0x98> <== ALWAYS TAKEN
203d698: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
203d69c: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
203d6a0: f4 00 60 08 ld [ %g1 + 8 ], %i2
*available = size - rtems_rfs_file_block_offset (handle);
203d6a4: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d6a8: 90 10 20 20 mov 0x20, %o0
&& 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);
203d6ac: 82 26 80 01 sub %i2, %g1, %g1
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d6b0: 92 10 20 00 clr %o1
&& 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);
203d6b4: c2 26 40 00 st %g1, [ %i1 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d6b8: 7f ff a3 5d call 202642c <rtems_rfs_trace>
203d6bc: b0 10 20 00 clr %i0
203d6c0: 80 8a 20 ff btst 0xff, %o0
203d6c4: 32 80 00 04 bne,a 203d6d4 <rtems_rfs_file_io_start+0xc4> <== NEVER TAKEN
203d6c8: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
203d6cc: 81 c7 e0 08 ret
203d6d0: 81 e8 00 00 restore
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))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
203d6d4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203d6d8: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d6dc: 40 00 39 3d call 204bbd0 <printf> <== NOT EXECUTED
203d6e0: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 206c9d8 <__FUNCTION__.7603+0xfb0><== NOT EXECUTED
*available, size);
return 0;
}
203d6e4: 81 c7 e0 08 ret <== NOT EXECUTED
203d6e8: 81 e8 00 00 restore <== NOT EXECUTED
bool read)
{
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
203d6ec: 13 00 81 a1 sethi %hi(0x2068400), %o1 <== NOT EXECUTED
203d6f0: 10 bf ff d4 b 203d640 <rtems_rfs_file_io_start+0x30> <== NOT EXECUTED
203d6f4: 92 12 62 f0 or %o1, 0x2f0, %o1 ! 20686f0 <rtems_rfs_rtems_eval_config+0xd48><== NOT EXECUTED
if (rc > 0)
return rc;
}
if (read
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
203d6f8: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
203d6fc: 80 a0 80 03 cmp %g2, %g3
203d700: 32 bf ff e8 bne,a 203d6a0 <rtems_rfs_file_io_start+0x90> <== NEVER TAKEN
203d704: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 <== NOT EXECUTED
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
203d708: 10 bf ff e2 b 203d690 <rtems_rfs_file_io_start+0x80>
203d70c: f4 00 60 40 ld [ %g1 + 0x40 ], %i2
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
203d710: 94 07 60 10 add %i5, 0x10, %o2
203d714: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
203d718: 96 07 bf fc add %fp, -4, %o3
203d71c: 7f ff f3 fd call 203a710 <rtems_rfs_block_map_find>
203d720: 92 02 60 34 add %o1, 0x34, %o1
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
203d724: b0 92 20 00 orcc %o0, 0, %i0
203d728: 04 80 00 09 ble 203d74c <rtems_rfs_file_io_start+0x13c>
203d72c: 80 a6 a0 00 cmp %i2, 0
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
203d730: 02 80 00 2f be 203d7ec <rtems_rfs_file_io_start+0x1dc> <== ALWAYS TAKEN
203d734: 80 a6 20 06 cmp %i0, 6
203d738: 12 80 00 2b bne 203d7e4 <rtems_rfs_file_io_start+0x1d4> <== NOT EXECUTED
203d73c: 01 00 00 00 nop <== NOT EXECUTED
{
*available = 0;
203d740: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
return 0;
203d744: 81 c7 e0 08 ret <== NOT EXECUTED
203d748: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
/*
* 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 &&
203d74c: 12 80 00 0c bne 203d77c <rtems_rfs_file_io_start+0x16c>
203d750: b0 10 00 1a mov %i2, %i0
203d754: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
203d758: 80 a0 60 00 cmp %g1, 0
203d75c: 12 80 00 08 bne 203d77c <rtems_rfs_file_io_start+0x16c>
203d760: b0 10 20 01 mov 1, %i0
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
203d764: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
* 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) ||
203d768: c4 06 40 00 ld [ %i1 ], %g2
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
203d76c: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
* 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) ||
203d770: c2 00 60 08 ld [ %g1 + 8 ], %g1
203d774: 80 a0 80 01 cmp %g2, %g1
203d778: b0 40 20 00 addx %g0, 0, %i0
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d77c: 90 10 20 20 mov 0x20, %o0
203d780: 92 10 20 00 clr %o1
203d784: 7f ff a3 2a call 202642c <rtems_rfs_trace>
203d788: b0 0e 20 ff and %i0, 0xff, %i0
203d78c: 80 8a 20 ff btst 0xff, %o0
203d790: 22 80 00 0d be,a 203d7c4 <rtems_rfs_file_io_start+0x1b4> <== ALWAYS TAKEN
203d794: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
203d798: 15 00 81 b1 sethi %hi(0x206c400), %o2 <== NOT EXECUTED
203d79c: d2 07 bf fc ld [ %fp + -4 ], %o1 <== NOT EXECUTED
203d7a0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
203d7a4: 02 80 00 04 be 203d7b4 <rtems_rfs_file_io_start+0x1a4> <== NOT EXECUTED
203d7a8: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED
203d7ac: 15 00 81 b1 sethi %hi(0x206c400), %o2 <== NOT EXECUTED
203d7b0: 94 12 a0 b8 or %o2, 0xb8, %o2 ! 206c4b8 <__FUNCTION__.7603+0xa90><== NOT EXECUTED
203d7b4: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d7b8: 40 00 39 06 call 204bbd0 <printf> <== NOT EXECUTED
203d7bc: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 206c9a0 <__FUNCTION__.7603+0xf78><== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
203d7c0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
203d7c4: d4 07 bf fc ld [ %fp + -4 ], %o2
203d7c8: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
203d7cc: 96 10 00 18 mov %i0, %o3
203d7d0: 7f ff f7 09 call 203b3f4 <rtems_rfs_buffer_handle_request>
203d7d4: 92 07 60 04 add %i5, 4, %o1
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
203d7d8: b0 92 20 00 orcc %o0, 0, %i0
203d7dc: 04 bf ff a3 ble 203d668 <rtems_rfs_file_io_start+0x58> <== ALWAYS TAKEN
203d7e0: 80 a6 a0 00 cmp %i2, 0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
*available, size);
return 0;
}
203d7e4: 81 c7 e0 08 ret
203d7e8: 81 e8 00 00 restore
{
*available = 0;
return 0;
}
if (rc != ENXIO)
203d7ec: 12 bf ff b8 bne 203d6cc <rtems_rfs_file_io_start+0xbc> <== NEVER TAKEN
203d7f0: 90 10 20 20 mov 0x20, %o0
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203d7f4: 7f ff a3 0e call 202642c <rtems_rfs_trace>
203d7f8: 92 10 20 00 clr %o1
203d7fc: 80 8a 20 ff btst 0xff, %o0
203d800: 12 80 00 0d bne 203d834 <rtems_rfs_file_io_start+0x224> <== NEVER TAKEN
203d804: 11 00 81 b2 sethi %hi(0x206c800), %o0
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
203d808: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
203d80c: 94 10 20 01 mov 1, %o2
203d810: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
203d814: 96 07 bf fc add %fp, -4, %o3
203d818: 7f ff f4 42 call 203a920 <rtems_rfs_block_map_grow>
203d81c: 92 02 60 34 add %o1, 0x34, %o1
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
203d820: b0 92 20 00 orcc %o0, 0, %i0
203d824: 14 bf ff f0 bg 203d7e4 <rtems_rfs_file_io_start+0x1d4>
203d828: 01 00 00 00 nop
return rc;
request_read = false;
203d82c: 10 bf ff d4 b 203d77c <rtems_rfs_file_io_start+0x16c>
203d830: b0 10 20 00 clr %i0 ! 0 <PROM_START>
if (rc != ENXIO)
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
203d834: 40 00 39 82 call 204be3c <puts> <== NOT EXECUTED
203d838: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
203d83c: 10 bf ff f4 b 203d80c <rtems_rfs_file_io_start+0x1fc> <== NOT EXECUTED
203d840: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
0203cfc4 <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)
{
203cfc4: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
203cfc8: 90 10 20 08 mov 8, %o0
203cfcc: 92 10 20 00 clr %o1
203cfd0: 7f ff a5 17 call 202642c <rtems_rfs_trace>
203cfd4: ba 10 00 18 mov %i0, %i5
203cfd8: 80 8a 20 ff btst 0xff, %o0
203cfdc: 12 80 00 2b bne 203d088 <rtems_rfs_file_open+0xc4> <== NEVER TAKEN
203cfe0: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
*file = NULL;
203cfe4: c0 26 c0 00 clr [ %i3 ]
/*
* 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));
203cfe8: 90 10 20 20 mov 0x20, %o0
203cfec: 7f ff 31 07 call 2009408 <malloc>
203cff0: b0 10 20 0c mov 0xc, %i0
if (!handle)
203cff4: 80 a2 20 00 cmp %o0, 0
203cff8: 02 80 00 58 be 203d158 <rtems_rfs_file_open+0x194> <== NEVER TAKEN
203cffc: a0 10 00 08 mov %o0, %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
203d000: f8 07 60 74 ld [ %i5 + 0x74 ], %i4
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
203d004: c0 22 00 00 clr [ %o0 ]
203d008: c0 22 20 04 clr [ %o0 + 4 ]
203d00c: c0 22 20 10 clr [ %o0 + 0x10 ]
203d010: c0 22 20 14 clr [ %o0 + 0x14 ]
203d014: c0 22 20 18 clr [ %o0 + 0x18 ]
203d018: c0 22 20 1c clr [ %o0 + 0x1c ]
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
203d01c: c0 22 20 08 clr [ %o0 + 8 ]
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 ));
203d020: 84 07 60 78 add %i5, 0x78, %g2
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
203d024: 80 a7 00 02 cmp %i4, %g2
203d028: 12 80 00 06 bne 203d040 <rtems_rfs_file_open+0x7c> <== NEVER TAKEN
203d02c: c0 22 20 0c clr [ %o0 + 0xc ]
203d030: 30 80 00 24 b,a 203d0c0 <rtems_rfs_file_open+0xfc>
203d034: 80 a7 00 02 cmp %i4, %g2 <== NOT EXECUTED
203d038: 02 80 00 22 be 203d0c0 <rtems_rfs_file_open+0xfc> <== NOT EXECUTED
203d03c: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
203d040: c2 07 20 14 ld [ %i4 + 0x14 ], %g1 <== NOT EXECUTED
203d044: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
203d048: 32 bf ff fb bne,a 203d034 <rtems_rfs_file_open+0x70> <== NOT EXECUTED
203d04c: f8 07 00 00 ld [ %i4 ], %i4 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
203d050: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
203d054: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
203d058: 82 00 60 01 inc %g1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
203d05c: 92 10 20 00 clr %o1 <== NOT EXECUTED
203d060: 7f ff a4 f3 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203d064: c2 27 20 08 st %g1, [ %i4 + 8 ] <== NOT EXECUTED
203d068: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203d06c: 12 80 00 0c bne 203d09c <rtems_rfs_file_open+0xd8> <== NOT EXECUTED
203d070: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = oflag;
203d074: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
handle->shared = shared;
203d078: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
*file = handle;
203d07c: e0 26 c0 00 st %l0, [ %i3 ]
return 0;
}
203d080: 81 c7 e0 08 ret
203d084: 91 e8 20 00 restore %g0, 0, %o0
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
203d088: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203d08c: 40 00 3a d1 call 204bbd0 <printf> <== NOT EXECUTED
203d090: 90 12 23 98 or %o0, 0x398, %o0 ! 206c798 <__FUNCTION__.7603+0xd70><== NOT EXECUTED
*file = NULL;
203d094: 10 bf ff d5 b 203cfe8 <rtems_rfs_file_open+0x24> <== NOT EXECUTED
203d098: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
203d09c: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
handle->flags = oflag;
handle->shared = shared;
*file = handle;
return 0;
203d0a0: b0 10 20 00 clr %i0 <== NOT EXECUTED
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
203d0a4: 40 00 3a cb call 204bbd0 <printf> <== NOT EXECUTED
203d0a8: 90 12 23 b8 or %o0, 0x3b8, %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
}
handle->flags = oflag;
203d0ac: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
handle->shared = shared;
203d0b0: f8 24 20 1c st %i4, [ %l0 + 0x1c ] <== NOT EXECUTED
203d0b4: e0 26 c0 00 st %l0, [ %i3 ] <== NOT EXECUTED
203d0b8: 81 c7 e0 08 ret <== NOT EXECUTED
203d0bc: 81 e8 00 00 restore <== 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));
203d0c0: 7f ff 30 d2 call 2009408 <malloc>
203d0c4: 90 10 20 9c mov 0x9c, %o0
if (!shared)
203d0c8: b8 92 20 00 orcc %o0, 0, %i4
203d0cc: 02 80 00 3d be 203d1c0 <rtems_rfs_file_open+0x1fc> <== NEVER TAKEN
203d0d0: 92 10 20 00 clr %o1
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
203d0d4: 40 00 36 53 call 204aa20 <memset>
203d0d8: 94 10 20 9c mov 0x9c, %o2
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
203d0dc: a2 07 20 0c add %i4, 0xc, %l1
203d0e0: 90 10 00 1d mov %i5, %o0
203d0e4: 92 10 00 19 mov %i1, %o1
203d0e8: 94 10 00 11 mov %l1, %o2
203d0ec: 40 00 0c 35 call 20401c0 <rtems_rfs_inode_open>
203d0f0: 96 10 20 01 mov 1, %o3
if (rc > 0)
203d0f4: b0 92 20 00 orcc %o0, 0, %i0
203d0f8: 04 80 00 1a ble 203d160 <rtems_rfs_file_open+0x19c> <== ALWAYS TAKEN
203d0fc: 90 10 20 08 mov 8, %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
203d100: 7f ff a4 cb call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203d104: 92 10 20 00 clr %o1 <== NOT EXECUTED
203d108: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203d10c: 02 80 00 09 be 203d130 <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
203d110: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
203d114: 40 00 44 45 call 204e228 <strerror> <== NOT EXECUTED
203d118: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203d11c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203d120: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203d124: 11 00 81 b1 sethi %hi(0x206c400), %o0 <== NOT EXECUTED
203d128: 40 00 3a aa call 204bbd0 <printf> <== NOT EXECUTED
203d12c: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 206c7e0 <__FUNCTION__.7603+0xdb8><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
free (shared);
203d130: 7f ff 2f 2d call 2008de4 <free> <== NOT EXECUTED
203d134: 90 10 00 1c mov %i4, %o0 <== 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);
203d138: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203d13c: 7f ff f8 33 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203d140: 92 04 20 04 add %l0, 4, %o1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
203d144: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
203d148: c0 2c 20 04 clrb [ %l0 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
203d14c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
203d150: 7f ff 2f 25 call 2008de4 <free> <== NOT EXECUTED
203d154: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
return rc;
203d158: 81 c7 e0 08 ret <== NOT EXECUTED
203d15c: 81 e8 00 00 restore <== 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);
203d160: 90 10 00 1d mov %i5, %o0
203d164: 92 10 00 11 mov %l1, %o1
203d168: 7f ff f4 91 call 203a3ac <rtems_rfs_block_map_open>
203d16c: 94 07 20 34 add %i4, 0x34, %o2
if (rc > 0)
203d170: b0 92 20 00 orcc %o0, 0, %i0
203d174: 24 80 00 1e ble,a 203d1ec <rtems_rfs_file_open+0x228> <== ALWAYS TAKEN
203d178: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
203d17c: 90 10 20 08 mov 8, %o0 <== NOT EXECUTED
203d180: 7f ff a4 ab call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203d184: 92 10 20 00 clr %o1 <== NOT EXECUTED
203d188: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203d18c: 22 80 00 0a be,a 203d1b4 <rtems_rfs_file_open+0x1f0> <== NOT EXECUTED
203d190: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
203d194: 40 00 44 25 call 204e228 <strerror> <== NOT EXECUTED
203d198: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203d19c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203d1a0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203d1a4: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d1a8: 40 00 3a 8a call 204bbd0 <printf> <== NOT EXECUTED
203d1ac: 90 12 20 18 or %o0, 0x18, %o0 ! 206c818 <__FUNCTION__.7603+0xdf0><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
203d1b0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
203d1b4: 40 00 0c 7a call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
203d1b8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203d1bc: 30 bf ff dd b,a 203d130 <rtems_rfs_file_open+0x16c> <== 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);
203d1c0: 92 04 20 04 add %l0, 4, %o1 <== NOT EXECUTED
203d1c4: 7f ff f8 11 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203d1c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
shared = malloc (sizeof (rtems_rfs_file_shared));
if (!shared)
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
203d1cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
203d1d0: c0 2c 20 04 clrb [ %l0 + 4 ] <== NOT EXECUTED
handle->bnum = 0;
203d1d4: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED
handle->buffer = NULL;
203d1d8: c0 24 20 0c clr [ %l0 + 0xc ] <== NOT EXECUTED
203d1dc: 7f ff 2f 02 call 2008de4 <free> <== NOT EXECUTED
203d1e0: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
return ENOMEM;
203d1e4: 81 c7 e0 08 ret <== NOT EXECUTED
203d1e8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
203d1ec: 84 10 20 01 mov 1, %g2
203d1f0: c4 27 20 08 st %g2, [ %i4 + 8 ]
* @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);
203d1f4: f0 08 60 0c ldub [ %g1 + 0xc ], %i0
203d1f8: c8 08 60 0d ldub [ %g1 + 0xd ], %g4
203d1fc: c6 08 60 0f ldub [ %g1 + 0xf ], %g3
203d200: c4 08 60 0e ldub [ %g1 + 0xe ], %g2
203d204: b1 2e 20 18 sll %i0, 0x18, %i0
203d208: 89 29 20 10 sll %g4, 0x10, %g4
203d20c: 85 28 a0 08 sll %g2, 8, %g2
203d210: 88 16 00 04 or %i0, %g4, %g4
203d214: 86 11 00 03 or %g4, %g3, %g3
203d218: 84 10 c0 02 or %g3, %g2, %g2
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
203d21c: c4 27 20 84 st %g2, [ %i4 + 0x84 ]
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
203d220: c6 08 60 0b ldub [ %g1 + 0xb ], %g3
* @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);
203d224: c4 08 60 0a ldub [ %g1 + 0xa ], %g2
203d228: 90 07 60 74 add %i5, 0x74, %o0
203d22c: 85 28 a0 08 sll %g2, 8, %g2
203d230: 84 10 c0 02 or %g3, %g2, %g2
203d234: c4 27 20 88 st %g2, [ %i4 + 0x88 ]
* @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);
203d238: f0 08 60 10 ldub [ %g1 + 0x10 ], %i0
203d23c: c8 08 60 11 ldub [ %g1 + 0x11 ], %g4
203d240: c6 08 60 13 ldub [ %g1 + 0x13 ], %g3
203d244: c4 08 60 12 ldub [ %g1 + 0x12 ], %g2
203d248: b1 2e 20 18 sll %i0, 0x18, %i0
203d24c: 89 29 20 10 sll %g4, 0x10, %g4
203d250: 85 28 a0 08 sll %g2, 8, %g2
203d254: 88 16 00 04 or %i0, %g4, %g4
203d258: 86 11 00 03 or %g4, %g3, %g3
203d25c: 84 10 c0 02 or %g3, %g2, %g2
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
203d260: c4 27 20 8c st %g2, [ %i4 + 0x8c ]
* @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);
203d264: f0 08 60 14 ldub [ %g1 + 0x14 ], %i0
203d268: c8 08 60 15 ldub [ %g1 + 0x15 ], %g4
203d26c: c6 08 60 17 ldub [ %g1 + 0x17 ], %g3
203d270: c4 08 60 16 ldub [ %g1 + 0x16 ], %g2
203d274: b1 2e 20 18 sll %i0, 0x18, %i0
203d278: 89 29 20 10 sll %g4, 0x10, %g4
203d27c: 85 28 a0 08 sll %g2, 8, %g2
203d280: 88 16 00 04 or %i0, %g4, %g4
203d284: 86 11 00 03 or %g4, %g3, %g3
203d288: 84 10 c0 02 or %g3, %g2, %g2
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
203d28c: c4 27 20 90 st %g2, [ %i4 + 0x90 ]
* @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);
203d290: c8 08 60 18 ldub [ %g1 + 0x18 ], %g4
203d294: c6 08 60 19 ldub [ %g1 + 0x19 ], %g3
203d298: c4 08 60 1b ldub [ %g1 + 0x1b ], %g2
203d29c: c2 08 60 1a ldub [ %g1 + 0x1a ], %g1
203d2a0: 89 29 20 18 sll %g4, 0x18, %g4
203d2a4: 87 28 e0 10 sll %g3, 0x10, %g3
203d2a8: 83 28 60 08 sll %g1, 8, %g1
203d2ac: 86 11 00 03 or %g4, %g3, %g3
203d2b0: 84 10 c0 02 or %g3, %g2, %g2
203d2b4: 82 10 80 01 or %g2, %g1, %g1
203d2b8: 92 10 00 1c mov %i4, %o1
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
203d2bc: c2 27 20 94 st %g1, [ %i4 + 0x94 ]
203d2c0: 7f ff 45 88 call 200e8e0 <_Chain_Append>
203d2c4: fa 27 20 98 st %i5, [ %i4 + 0x98 ]
shared->fs = fs;
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
203d2c8: 92 10 00 11 mov %l1, %o1
203d2cc: 94 10 20 00 clr %o2
203d2d0: 40 00 0b f4 call 20402a0 <rtems_rfs_inode_unload>
203d2d4: 90 10 00 1d mov %i5, %o0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
203d2d8: 90 10 20 08 mov 8, %o0
203d2dc: 7f ff a4 54 call 202642c <rtems_rfs_trace>
203d2e0: 92 10 20 00 clr %o1
203d2e4: 80 8a 20 ff btst 0xff, %o0
203d2e8: 22 bf ff 64 be,a 203d078 <rtems_rfs_file_open+0xb4> <== ALWAYS TAKEN
203d2ec: f4 24 00 00 st %i2, [ %l0 ]
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
203d2f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203d2f4: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203d2f8: 40 00 3a 36 call 204bbd0 <printf> <== NOT EXECUTED
203d2fc: 90 12 20 50 or %o0, 0x50, %o0 ! 206c850 <__FUNCTION__.7603+0xe28><== NOT EXECUTED
}
handle->flags = oflag;
203d300: 10 bf ff 5e b 203d078 <rtems_rfs_file_open+0xb4> <== NOT EXECUTED
203d304: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
0203db64 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
203db64: 9d e3 bf 98 save %sp, -104, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203db68: 90 10 20 20 mov 0x20, %o0
203db6c: 92 10 20 00 clr %o1
203db70: 7f ff a2 2f call 202642c <rtems_rfs_trace>
203db74: ba 10 00 18 mov %i0, %i5
203db78: 80 8a 20 ff btst 0xff, %o0
203db7c: 32 80 00 36 bne,a 203dc54 <rtems_rfs_file_seek+0xf0> <== NEVER TAKEN
203db80: 92 10 00 19 mov %i1, %o1 <== 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),
203db84: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
203db88: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
203db8c: 7f ff f1 f2 call 203a354 <rtems_rfs_block_get_size>
203db90: 92 02 60 84 add %o1, 0x84, %o1
203db94: 80 a2 00 19 cmp %o0, %i1
203db98: 38 80 00 0f bgu,a 203dbd4 <rtems_rfs_file_seek+0x70> <== NEVER TAKEN
203db9c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
203dba0: 80 a2 00 19 cmp %o0, %i1
203dba4: 02 80 00 09 be 203dbc8 <rtems_rfs_file_seek+0x64> <== ALWAYS TAKEN
203dba8: 80 a2 40 1a cmp %o1, %i2
{
/*
* 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);
203dbac: 7f ff ff e3 call 203db38 <rtems_rfs_file_io_release>
203dbb0: 90 10 00 1d mov %i5, %o0
if (rc > 0)
203dbb4: b0 92 20 00 orcc %o0, 0, %i0
203dbb8: 24 80 00 24 ble,a 203dc48 <rtems_rfs_file_seek+0xe4> <== ALWAYS TAKEN
203dbbc: f2 26 c0 00 st %i1, [ %i3 ]
return rc;
}
*new_pos = pos;
return 0;
}
203dbc0: 81 c7 e0 08 ret <== NOT EXECUTED
203dbc4: 81 e8 00 00 restore <== 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),
203dbc8: 08 bf ff f9 bleu 203dbac <rtems_rfs_file_seek+0x48>
203dbcc: 01 00 00 00 nop
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
203dbd0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
203dbd4: b8 07 60 10 add %i5, 0x10, %i4
203dbd8: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
203dbdc: 92 10 00 19 mov %i1, %o1
203dbe0: 94 10 00 1a mov %i2, %o2
203dbe4: 7f ff f1 ad call 203a298 <rtems_rfs_block_get_bpos>
203dbe8: 96 10 00 1c mov %i4, %o3
/*
* 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))
203dbec: c2 07 60 0c ld [ %i5 + 0xc ], %g1
203dbf0: 80 a0 60 00 cmp %g1, 0
203dbf4: 02 80 00 14 be 203dc44 <rtems_rfs_file_seek+0xe0> <== ALWAYS TAKEN
203dbf8: 94 10 00 1c mov %i4, %o2
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
203dbfc: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
203dc00: d0 02 60 98 ld [ %o1 + 0x98 ], %o0 <== NOT EXECUTED
203dc04: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
203dc08: 7f ff f2 c2 call 203a710 <rtems_rfs_block_map_find> <== NOT EXECUTED
203dc0c: 92 02 60 34 add %o1, 0x34, %o1 <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
203dc10: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203dc14: 14 bf ff eb bg 203dbc0 <rtems_rfs_file_seek+0x5c> <== NOT EXECUTED
203dc18: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
203dc1c: c4 07 60 08 ld [ %i5 + 8 ], %g2 <== NOT EXECUTED
203dc20: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
203dc24: 02 80 00 08 be 203dc44 <rtems_rfs_file_seek+0xe0> <== NOT EXECUTED
203dc28: 92 07 60 04 add %i5, 4, %o1 <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
203dc2c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
203dc30: 7f ff f5 76 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203dc34: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
203dc38: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203dc3c: 14 bf ff e1 bg 203dbc0 <rtems_rfs_file_seek+0x5c> <== NOT EXECUTED
203dc40: 01 00 00 00 nop <== NOT EXECUTED
int rc = rtems_rfs_file_io_release (handle);
if (rc > 0)
return rc;
}
*new_pos = pos;
203dc44: f2 26 c0 00 st %i1, [ %i3 ]
203dc48: f4 26 e0 04 st %i2, [ %i3 + 4 ]
return 0;
}
203dc4c: 81 c7 e0 08 ret
203dc50: 91 e8 20 00 restore %g0, 0, %o0
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
203dc54: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203dc58: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203dc5c: 40 00 37 dd call 204bbd0 <printf> <== NOT EXECUTED
203dc60: 90 12 22 b0 or %o0, 0x2b0, %o0 <== 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),
203dc64: 10 bf ff c9 b 203db88 <rtems_rfs_file_seek+0x24> <== NOT EXECUTED
203dc68: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
0203dc6c <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
203dc6c: 9d e3 bf 90 save %sp, -112, %sp
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))
203dc70: 90 10 20 20 mov 0x20, %o0
203dc74: 92 10 20 00 clr %o1
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);
203dc78: e0 06 20 1c ld [ %i0 + 0x1c ], %l0
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
203dc7c: 7f ff a1 ec call 202642c <rtems_rfs_trace>
203dc80: b6 10 00 18 mov %i0, %i3
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
203dc84: a4 10 00 19 mov %i1, %l2
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))
203dc88: 80 8a 20 ff btst 0xff, %o0
203dc8c: 12 80 00 97 bne 203dee8 <rtems_rfs_file_set_size+0x27c> <== NEVER TAKEN
203dc90: a6 10 00 1a mov %i2, %l3
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
size = rtems_rfs_file_size (handle);
203dc94: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
203dc98: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
203dc9c: 7f ff f1 ae call 203a354 <rtems_rfs_block_get_size>
203dca0: 92 02 60 84 add %o1, 0x84, %o1
/*
* 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)
203dca4: 80 a4 80 08 cmp %l2, %o0
203dca8: 02 80 00 8b be 203ded4 <rtems_rfs_file_set_size+0x268> <== ALWAYS TAKEN
203dcac: 80 a4 c0 09 cmp %l3, %o1
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
203dcb0: 80 94 80 13 orcc %l2, %l3, %g0 <== NOT EXECUTED
203dcb4: 02 80 00 94 be 203df04 <rtems_rfs_file_set_size+0x298> <== NEVER TAKEN
203dcb8: b4 04 20 34 add %l0, 0x34, %i2
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
203dcbc: 80 a4 80 08 cmp %l2, %o0
203dcc0: 08 80 00 55 bleu 203de14 <rtems_rfs_file_set_size+0x1a8> <== ALWAYS TAKEN
203dcc4: 01 00 00 00 nop
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));
203dcc8: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
203dccc: ba a4 c0 09 subcc %l3, %o1, %i5
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
203dcd0: c2 04 60 98 ld [ %l1 + 0x98 ], %g1
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
203dcd4: b8 64 80 08 subx %l2, %o0, %i4
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
203dcd8: b2 10 00 11 mov %l1, %i1
read_block = false;
while (count)
203dcdc: 80 97 00 1d orcc %i4, %i5, %g0
203dce0: 02 80 00 91 be 203df24 <rtems_rfs_file_set_size+0x2b8> <== NEVER TAKEN
203dce4: e4 00 60 08 ld [ %g1 + 8 ], %l2
203dce8: a8 10 20 00 clr %l4
map->dirty = true;
203dcec: a6 10 20 01 mov 1, %l3
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
203dcf0: 10 80 00 27 b 203dd8c <rtems_rfs_file_set_size+0x120>
203dcf4: a2 06 e0 04 add %i3, 4, %l1
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
203dcf8: 80 a0 80 1d cmp %g2, %i5
203dcfc: 28 80 00 44 bleu,a 203de0c <rtems_rfs_file_set_size+0x1a0><== NEVER TAKEN
203dd00: c0 24 20 40 clr [ %l0 + 0x40 ] <== NOT EXECUTED
{
length = count + bpos.boff;
203dd04: a4 00 40 1d add %g1, %i5, %l2
203dd08: e6 2c 20 34 stb %l3, [ %l0 + 0x34 ]
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
203dd0c: e4 24 20 40 st %l2, [ %l0 + 0x40 ]
read_block = true;
203dd10: a8 10 20 01 mov 1, %l4
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
203dd14: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
203dd18: d4 07 bf fc ld [ %fp + -4 ], %o2
203dd1c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
203dd20: 92 10 00 11 mov %l1, %o1
203dd24: 7f ff f5 b4 call 203b3f4 <rtems_rfs_buffer_handle_request>
203dd28: 96 0d 20 01 and %l4, 1, %o3
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
203dd2c: b0 92 20 00 orcc %o0, 0, %i0
203dd30: 14 80 00 67 bg 203decc <rtems_rfs_file_set_size+0x260> <== NEVER TAKEN
203dd34: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
203dd38: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
memset (dst + bpos.boff, 0, length - bpos.boff);
203dd3c: d0 00 a0 1c ld [ %g2 + 0x1c ], %o0
203dd40: 94 24 80 01 sub %l2, %g1, %o2
203dd44: 92 10 20 00 clr %o1
203dd48: 40 00 33 36 call 204aa20 <memset>
203dd4c: 90 02 00 01 add %o0, %g1, %o0
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
203dd50: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
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));
203dd54: e6 2e e0 04 stb %l3, [ %i3 + 4 ]
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
203dd58: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
203dd5c: 7f ff f5 2b call 203b208 <rtems_rfs_buffer_handle_release>
203dd60: 92 10 00 11 mov %l1, %o1
rtems_rfs_file_buffer (handle));
if (rc > 0)
203dd64: b0 92 20 00 orcc %o0, 0, %i0
203dd68: 14 80 00 59 bg 203decc <rtems_rfs_file_set_size+0x260> <== NEVER TAKEN
203dd6c: c2 07 bf f4 ld [ %fp + -12 ], %g1
return rc;
count -= length - bpos.boff;
203dd70: 82 24 80 01 sub %l2, %g1, %g1
203dd74: ba a7 40 01 subcc %i5, %g1, %i5
203dd78: b8 67 20 00 subx %i4, 0, %i4
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
203dd7c: 80 97 00 1d orcc %i4, %i5, %g0
203dd80: 22 80 00 69 be,a 203df24 <rtems_rfs_file_set_size+0x2b8> <== ALWAYS TAKEN
203dd84: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
203dd88: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
/*
* 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);
203dd8c: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
203dd90: c4 04 20 3c ld [ %l0 + 0x3c ], %g2
203dd94: c2 27 bf f4 st %g1, [ %fp + -12 ]
203dd98: c4 27 bf f0 st %g2, [ %fp + -16 ]
203dd9c: 80 a0 60 00 cmp %g1, 0
203dda0: 02 80 00 04 be 203ddb0 <rtems_rfs_file_set_size+0x144>
203dda4: c0 27 bf f8 clr [ %fp + -8 ]
203dda8: 84 00 bf ff add %g2, -1, %g2
203ddac: c4 27 bf f0 st %g2, [ %fp + -16 ]
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
203ddb0: d0 06 60 98 ld [ %i1 + 0x98 ], %o0
203ddb4: 92 10 00 1a mov %i2, %o1
203ddb8: 94 07 bf f0 add %fp, -16, %o2
203ddbc: 7f ff f2 55 call 203a710 <rtems_rfs_block_map_find>
203ddc0: 96 07 bf fc add %fp, -4, %o3
map, &bpos, &block);
if (rc > 0)
203ddc4: b0 92 20 00 orcc %o0, 0, %i0
203ddc8: 04 80 00 0c ble 203ddf8 <rtems_rfs_file_set_size+0x18c>
203ddcc: 80 a6 20 06 cmp %i0, 6
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
203ddd0: 12 80 00 3f bne 203decc <rtems_rfs_file_set_size+0x260> <== NEVER TAKEN
203ddd4: 92 10 00 1a mov %i2, %o1
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
203ddd8: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
203dddc: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
203dde0: 94 10 20 01 mov 1, %o2
203dde4: 7f ff f2 cf call 203a920 <rtems_rfs_block_map_grow>
203dde8: 96 07 bf fc add %fp, -4, %o3
map, 1, &block);
if (rc > 0)
203ddec: b0 92 20 00 orcc %o0, 0, %i0
203ddf0: 14 80 00 3c bg 203dee0 <rtems_rfs_file_set_size+0x274> <== NEVER TAKEN
203ddf4: 01 00 00 00 nop
return rc;
}
if (count < (length - bpos.boff))
203ddf8: c2 07 bf f4 ld [ %fp + -12 ], %g1
203ddfc: 80 a7 20 00 cmp %i4, 0
203de00: 02 bf ff be be 203dcf8 <rtems_rfs_file_set_size+0x8c> <== ALWAYS TAKEN
203de04: 84 24 80 01 sub %l2, %g1, %g2
203de08: c0 24 20 40 clr [ %l0 + 0x40 ] <== NOT EXECUTED
map->dirty = true;
203de0c: 10 bf ff c2 b 203dd14 <rtems_rfs_file_set_size+0xa8> <== NOT EXECUTED
203de10: e6 2c 20 34 stb %l3, [ %l0 + 0x34 ] <== NOT EXECUTED
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
203de14: 02 80 00 47 be 203df30 <rtems_rfs_file_set_size+0x2c4> <== ALWAYS TAKEN
203de18: 80 a4 c0 09 cmp %l3, %o1
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
203de1c: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
203de20: f8 04 20 3c ld [ %l0 + 0x3c ], %i4 <== NOT EXECUTED
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
203de24: e2 06 60 98 ld [ %i1 + 0x98 ], %l1 <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
203de28: 92 84 ff ff addcc %l3, -1, %o1 <== NOT EXECUTED
203de2c: f4 04 60 08 ld [ %l1 + 8 ], %i2 <== NOT EXECUTED
203de30: 90 44 bf ff addx %l2, -1, %o0 <== NOT EXECUTED
203de34: 94 10 20 00 clr %o2 <== NOT EXECUTED
203de38: 40 00 8e b0 call 20618f8 <__udivdi3> <== NOT EXECUTED
203de3c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
203de40: 94 38 00 09 xnor %g0, %o1, %o2 <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
new_size % rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
if (blocks)
203de44: 94 82 80 1c addcc %o2, %i4, %o2 <== NOT EXECUTED
203de48: 12 80 00 47 bne 203df64 <rtems_rfs_file_set_size+0x2f8> <== NOT EXECUTED
203de4c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
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));
203de50: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
203de54: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
203de58: 94 10 20 00 clr %o2 <== NOT EXECUTED
203de5c: 40 00 8f 7c call 2061c4c <__umoddi3> <== NOT EXECUTED
203de60: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
203de64: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1 <== NOT EXECUTED
203de68: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size_offset (rtems_rfs_block_map* map,
rtems_rfs_block_off offset)
{
map->size.offset = offset;
203de6c: d2 24 20 40 st %o1, [ %l0 + 0x40 ] <== NOT EXECUTED
203de70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
203de74: 02 80 00 33 be 203df40 <rtems_rfs_file_set_size+0x2d4> <== NOT EXECUTED
203de78: c4 2c 20 34 stb %g2, [ %l0 + 0x34 ] <== NOT EXECUTED
203de7c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
203de80: 12 80 00 31 bne 203df44 <rtems_rfs_file_set_size+0x2d8> <== NOT EXECUTED
203de84: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
203de88: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
203de8c: d2 26 e0 14 st %o1, [ %i3 + 0x14 ] <== NOT EXECUTED
203de90: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
203de94: 02 80 00 32 be 203df5c <rtems_rfs_file_set_size+0x2f0> <== NOT EXECUTED
203de98: c0 26 e0 18 clr [ %i3 + 0x18 ] <== NOT EXECUTED
203de9c: 82 07 3f ff add %i4, -1, %g1 <== NOT EXECUTED
203dea0: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
203dea4: c2 26 e0 10 st %g1, [ %i3 + 0x10 ] <== NOT EXECUTED
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
203dea8: c2 06 c0 00 ld [ %i3 ], %g1
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
203deac: f8 24 60 84 st %i4, [ %l1 + 0x84 ]
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
203deb0: d2 24 60 88 st %o1, [ %l1 + 0x88 ]
if (rtems_rfs_file_update_mtime (handle))
203deb4: 80 88 60 02 btst 2, %g1
203deb8: 12 80 00 05 bne 203decc <rtems_rfs_file_set_size+0x260> <== NEVER TAKEN
203debc: b0 10 20 00 clr %i0
handle->shared->mtime = time (NULL);
203dec0: 40 00 57 f6 call 2053e98 <time>
203dec4: 90 10 20 00 clr %o0
203dec8: d0 24 60 90 st %o0, [ %l1 + 0x90 ]
203decc: 81 c7 e0 08 ret
203ded0: 81 e8 00 00 restore
/*
* 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)
203ded4: 12 bf ff 78 bne 203dcb4 <rtems_rfs_file_set_size+0x48>
203ded8: 80 94 80 13 orcc %l2, %l3, %g0
if (rtems_rfs_file_update_mtime (handle))
handle->shared->mtime = time (NULL);
}
return 0;
203dedc: b0 10 20 00 clr %i0
}
203dee0: 81 c7 e0 08 ret
203dee4: 81 e8 00 00 restore
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))
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
203dee8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203deec: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203def0: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203def4: 40 00 37 37 call 204bbd0 <printf> <== NOT EXECUTED
203def8: 90 12 22 d0 or %o0, 0x2d0, %o0 ! 206cad0 <__FUNCTION__.7603+0x10a8><== NOT EXECUTED
size = rtems_rfs_file_size (handle);
203defc: 10 bf ff 67 b 203dc98 <rtems_rfs_file_set_size+0x2c> <== NOT EXECUTED
203df00: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
203df04: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
203df08: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203df0c: 7f ff f4 4c call 203b03c <rtems_rfs_block_map_free_all> <== NOT EXECUTED
203df10: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
if (rc > 0)
203df14: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203df18: 14 bf ff f2 bg 203dee0 <rtems_rfs_file_set_size+0x274> <== NOT EXECUTED
203df1c: 01 00 00 00 nop <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
203df20: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1 <== NOT EXECUTED
203df24: f8 04 20 3c ld [ %l0 + 0x3c ], %i4
203df28: 10 bf ff e0 b 203dea8 <rtems_rfs_file_set_size+0x23c>
203df2c: d2 04 20 40 ld [ %l0 + 0x40 ], %o1
if (rc > 0)
return rc;
}
else
{
if (size < new_size)
203df30: 28 bf ff bc bleu,a 203de20 <rtems_rfs_file_set_size+0x1b4><== NEVER TAKEN
203df34: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
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));
203df38: 10 bf ff 65 b 203dccc <rtems_rfs_file_set_size+0x60>
203df3c: e2 06 e0 1c ld [ %i3 + 0x1c ], %l1
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
203df40: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
203df44: 3a bf ff d2 bcc,a 203de8c <rtems_rfs_file_set_size+0x220><== NOT EXECUTED
203df48: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
203df4c: 84 07 3f ff add %i4, -1, %g2 <== NOT EXECUTED
203df50: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
203df54: 22 80 00 0c be,a 203df84 <rtems_rfs_file_set_size+0x318> <== NOT EXECUTED
203df58: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1 <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
203df5c: 10 bf ff d3 b 203dea8 <rtems_rfs_file_set_size+0x23c> <== NOT EXECUTED
203df60: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
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),
203df64: 7f ff f3 66 call 203acfc <rtems_rfs_block_map_shrink> <== NOT EXECUTED
203df68: 92 06 60 34 add %i1, 0x34, %o1 <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
203df6c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
203df70: 14 bf ff dc bg 203dee0 <rtems_rfs_file_set_size+0x274> <== NOT EXECUTED
203df74: 01 00 00 00 nop <== NOT EXECUTED
203df78: f8 04 20 3c ld [ %l0 + 0x3c ], %i4 <== NOT EXECUTED
203df7c: 10 bf ff b5 b 203de50 <rtems_rfs_file_set_size+0x1e4> <== NOT EXECUTED
203df80: f2 06 e0 1c ld [ %i3 + 0x1c ], %i1 <== NOT EXECUTED
return rc;
}
rtems_rfs_block_map_set_size_offset (map, offset);
if (rtems_rfs_block_pos_past_end (rtems_rfs_file_bpos (handle),
203df84: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED
203df88: 2a bf ff c1 bcs,a 203de8c <rtems_rfs_file_set_size+0x220><== NOT EXECUTED
203df8c: f8 26 e0 10 st %i4, [ %i3 + 0x10 ] <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
203df90: 10 bf ff c6 b 203dea8 <rtems_rfs_file_set_size+0x23c> <== NOT EXECUTED
203df94: a2 10 00 19 mov %i1, %l1 <== NOT EXECUTED
0203e9a8 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
203e9a8: 9d e3 be c8 save %sp, -312, %sp
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
203e9ac: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
203e9b0: 80 a0 60 00 cmp %g1, 0
203e9b4: 32 80 00 8b bne,a 203ebe0 <rtems_rfs_format+0x238> <== NEVER TAKEN
203e9b8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
printf ("rtems-rfs: format: %s\n", name);
memset (&fs, 0, sizeof (rtems_rfs_file_system));
203e9bc: 92 10 20 00 clr %o1
203e9c0: 94 10 20 84 mov 0x84, %o2
203e9c4: 40 00 30 17 call 204aa20 <memset>
203e9c8: 90 07 bf 28 add %fp, -216, %o0
203e9cc: 82 07 bf 70 add %fp, -144, %g1
203e9d0: c2 27 bf 6c st %g1, [ %fp + -148 ]
head->previous = NULL;
tail->previous = head;
203e9d4: 82 07 bf 6c add %fp, -148, %g1
203e9d8: c2 27 bf 74 st %g1, [ %fp + -140 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e9dc: 82 07 bf 80 add %fp, -128, %g1
203e9e0: c2 27 bf 7c st %g1, [ %fp + -132 ]
head->previous = NULL;
tail->previous = head;
203e9e4: 82 07 bf 7c add %fp, -132, %g1
203e9e8: c2 27 bf 84 st %g1, [ %fp + -124 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e9ec: 82 07 bf 90 add %fp, -112, %g1
203e9f0: c2 27 bf 8c st %g1, [ %fp + -116 ]
head->previous = NULL;
tail->previous = head;
203e9f4: 82 07 bf 8c add %fp, -116, %g1
203e9f8: c2 27 bf 94 st %g1, [ %fp + -108 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e9fc: 82 07 bf a0 add %fp, -96, %g1
203ea00: c2 27 bf 9c st %g1, [ %fp + -100 ]
head->previous = NULL;
tail->previous = head;
203ea04: 82 07 bf 9c add %fp, -100, %g1
203ea08: c2 27 bf a4 st %g1, [ %fp + -92 ]
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;
203ea0c: 82 10 20 05 mov 5, %g1
203ea10: c2 27 bf 68 st %g1, [ %fp + -152 ]
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
203ea14: 82 10 20 02 mov 2, %g1
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
203ea18: 90 10 00 18 mov %i0, %o0
fs.max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
203ea1c: c2 27 bf 28 st %g1, [ %fp + -216 ]
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
203ea20: 7f ff f3 20 call 203b6a0 <rtems_rfs_buffer_open>
203ea24: 92 07 bf 28 add %fp, -216, %o1
if (rc > 0)
203ea28: ba 92 20 00 orcc %o0, 0, %i5
203ea2c: 14 80 03 5f bg 203f7a8 <rtems_rfs_format+0xe00> <== NEVER TAKEN
203ea30: c2 07 bf 38 ld [ %fp + -200 ], %g1
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
203ea34: f8 00 60 24 ld [ %g1 + 0x24 ], %i4
203ea38: 80 a7 20 00 cmp %i4, 0
203ea3c: 02 80 03 6d be 203f7f0 <rtems_rfs_format+0xe48> <== NEVER TAKEN
203ea40: 92 10 20 00 clr %o1
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
203ea44: fa 06 40 00 ld [ %i1 ], %i5
if (!fs->block_size)
203ea48: 80 a7 60 00 cmp %i5, 0
203ea4c: 02 80 00 d8 be 203edac <rtems_rfs_format+0x404>
203ea50: fa 27 bf 30 st %i5, [ %fp + -208 ]
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
203ea54: 90 10 00 1d mov %i5, %o0
203ea58: 40 00 88 bd call 2060d4c <.urem>
203ea5c: 92 10 00 1c mov %i4, %o1
203ea60: 80 a2 20 00 cmp %o0, 0
203ea64: 32 80 00 f7 bne,a 203ee40 <rtems_rfs_format+0x498> <== NEVER TAKEN
203ea68: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
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;
203ea6c: c2 06 60 04 ld [ %i1 + 4 ], %g1
{
/*
* 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);
203ea70: bb 2f 60 03 sll %i5, 3, %i5
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
if (!fs->group_blocks)
203ea74: 80 a0 60 00 cmp %g1, 0
203ea78: 12 80 00 52 bne 203ebc0 <rtems_rfs_format+0x218> <== NEVER TAKEN
203ea7c: c2 27 bf 50 st %g1, [ %fp + -176 ]
{
/*
* 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);
203ea80: fa 27 bf 50 st %i5, [ %fp + -176 ]
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
203ea84: 7f ff fd 63 call 203e010 <rtems_rfs_fs_media_size>
203ea88: 90 07 bf 28 add %fp, -216, %o0
203ea8c: fa 07 bf 30 ld [ %fp + -208 ], %i5
203ea90: 94 10 20 00 clr %o2
203ea94: 40 00 8b 99 call 20618f8 <__udivdi3>
203ea98: 96 10 00 1d mov %i5, %o3
203ea9c: d2 27 bf 2c st %o1, [ %fp + -212 ]
203eaa0: b8 10 00 09 mov %o1, %i4
* 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));
203eaa4: b5 2f 60 03 sll %i5, 3, %i2
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203eaa8: 80 a2 60 00 cmp %o1, 0
203eaac: 02 80 00 06 be 203eac4 <rtems_rfs_format+0x11c> <== NEVER TAKEN
203eab0: a0 10 20 01 mov 1, %l0
return 1;
return ((dividend - 1) / divisor) + 1;
203eab4: 90 02 7f ff add %o1, -1, %o0
203eab8: 40 00 87 f9 call 2060a9c <.udiv>
203eabc: 92 10 00 1a mov %i2, %o1
203eac0: a0 02 20 01 add %o0, 1, %l0
* 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;
203eac4: f6 06 60 08 ld [ %i1 + 8 ], %i3
if (!fs->group_inodes)
203eac8: 80 a6 e0 00 cmp %i3, 0
203eacc: 02 80 01 43 be 203efd8 <rtems_rfs_format+0x630> <== ALWAYS TAKEN
203ead0: e0 27 bf 4c st %l0, [ %fp + -180 ]
203ead4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203ead8: 40 00 87 f1 call 2060a9c <.udiv> <== NOT EXECUTED
203eadc: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
203eae0: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
}
/*
* 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;
203eae4: d0 27 bf 58 st %o0, [ %fp + -168 ] <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
203eae8: 90 06 ff ff add %i3, -1, %o0 <== NOT EXECUTED
203eaec: 40 00 87 ec call 2060a9c <.udiv>
203eaf0: 92 10 00 1c mov %i4, %o1
203eaf4: 90 02 20 01 inc %o0
* 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 =
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
203eaf8: 7f ff 10 fa call 2002ee0 <.umul>
203eafc: 92 10 00 1c mov %i4, %o1
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
203eb00: 80 a6 80 08 cmp %i2, %o0
203eb04: 1a 80 00 03 bcc 203eb10 <rtems_rfs_format+0x168> <== ALWAYS TAKEN
203eb08: d0 27 bf 54 st %o0, [ %fp + -172 ]
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
203eb0c: f4 27 bf 54 st %i2, [ %fp + -172 ] <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
203eb10: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
if (!fs->max_name_length)
203eb14: 80 a0 60 00 cmp %g1, 0
203eb18: 12 80 00 04 bne 203eb28 <rtems_rfs_format+0x180> <== NEVER TAKEN
203eb1c: c2 27 bf 44 st %g1, [ %fp + -188 ]
{
fs->max_name_length = 512;
203eb20: 82 10 22 00 mov 0x200, %g1
203eb24: c2 27 bf 44 st %g1, [ %fp + -188 ]
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
203eb28: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
203eb2c: 80 a0 60 00 cmp %g1, 0
203eb30: 12 80 00 cb bne 203ee5c <rtems_rfs_format+0x4b4> <== NEVER TAKEN
203eb34: 01 00 00 00 nop
printf ("rtems-rfs: format: groups = %u\n", fs.group_count);
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
203eb38: 92 10 00 1d mov %i5, %o1
203eb3c: 7f ff f3 8c call 203b96c <rtems_rfs_buffer_setblksize>
203eb40: 90 07 bf 28 add %fp, -216, %o0
if (rc > 0)
203eb44: ba 92 20 00 orcc %o0, 0, %i5
203eb48: 14 80 02 82 bg 203f550 <rtems_rfs_format+0xba8> <== NEVER TAKEN
203eb4c: 92 07 bf ec add %fp, -20, %o1
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203eb50: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
203eb54: c0 27 bf f0 clr [ %fp + -16 ]
handle->buffer = NULL;
203eb58: c0 27 bf f4 clr [ %fp + -12 ]
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);
203eb5c: 90 07 bf 28 add %fp, -216, %o0
203eb60: 94 10 20 00 clr %o2
203eb64: 7f ff f2 24 call 203b3f4 <rtems_rfs_buffer_handle_request>
203eb68: 96 10 20 00 clr %o3
if (rc > 0)
203eb6c: ba 92 20 00 orcc %o0, 0, %i5
203eb70: 04 80 00 21 ble 203ebf4 <rtems_rfs_format+0x24c> <== ALWAYS TAKEN
203eb74: 92 07 bf ec add %fp, -20, %o1
*/
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);
203eb78: 7f ff f1 a4 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203eb7c: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
203eb80: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203eb84: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203eb88: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203eb8c: 40 00 3d a7 call 204e228 <strerror> <== NOT EXECUTED
203eb90: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203eb94: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203eb98: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203eb9c: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203eba0: 40 00 34 0c call 204bbd0 <printf> <== NOT EXECUTED
203eba4: 90 12 21 48 or %o0, 0x148, %o0 ! 206d148 <__FUNCTION__.7603+0x1720><== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
203eba8: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
return -1;
203ebac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
203ebb0: 40 00 34 a3 call 204be3c <puts> <== NOT EXECUTED
203ebb4: 90 12 21 c0 or %o0, 0x1c0, %o0 <== NOT EXECUTED
return -1;
203ebb8: 81 c7 e0 08 ret <== NOT EXECUTED
203ebbc: 81 e8 00 00 restore <== NOT EXECUTED
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
203ebc0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED
203ebc4: 08 bf ff b0 bleu 203ea84 <rtems_rfs_format+0xdc> <== NOT EXECUTED
203ebc8: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
203ebcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
{
printf ("group block count is higher than bits in block\n");
203ebd0: 40 00 34 9b call 204be3c <puts> <== NOT EXECUTED
203ebd4: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED
203ebd8: 81 c7 e0 08 ret <== NOT EXECUTED
203ebdc: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
203ebe0: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203ebe4: 40 00 33 fb call 204bbd0 <printf> <== NOT EXECUTED
203ebe8: 90 12 22 50 or %o0, 0x250, %o0 ! 206ce50 <__FUNCTION__.7603+0x1428><== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
203ebec: 10 bf ff 75 b 203e9c0 <rtems_rfs_format+0x18> <== NOT EXECUTED
203ebf0: 92 10 20 00 clr %o1 <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
203ebf4: c2 07 bf f4 ld [ %fp + -12 ], %g1
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
203ebf8: d4 07 bf 30 ld [ %fp + -208 ], %o2
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
203ebfc: fa 00 60 1c ld [ %g1 + 0x1c ], %i5
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
203ec00: 92 10 20 ff mov 0xff, %o1
203ec04: 40 00 2f 87 call 204aa20 <memset>
203ec08: 90 10 00 1d mov %i5, %o0
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
203ec0c: 84 10 20 28 mov 0x28, %g2
203ec10: c4 2f 40 00 stb %g2, [ %i5 ]
203ec14: 84 10 20 09 mov 9, %g2
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
203ec18: c0 2f 60 04 clrb [ %i5 + 4 ]
#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);
203ec1c: c4 2f 60 01 stb %g2, [ %i5 + 1 ]
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
203ec20: c0 2f 60 05 clrb [ %i5 + 5 ]
203ec24: c0 2f 60 06 clrb [ %i5 + 6 ]
203ec28: c0 2f 60 07 clrb [ %i5 + 7 ]
#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);
203ec2c: 82 10 20 01 mov 1, %g1
203ec30: 84 10 20 20 mov 0x20, %g2
203ec34: c2 2f 60 03 stb %g1, [ %i5 + 3 ]
203ec38: c4 2f 60 02 stb %g2, [ %i5 + 2 ]
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
203ec3c: c6 0f bf 30 ldub [ %fp + -208 ], %g3
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));
203ec40: c4 07 bf 2c ld [ %fp + -212 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
203ec44: c6 2f 60 08 stb %g3, [ %i5 + 8 ]
203ec48: c6 17 bf 30 lduh [ %fp + -208 ], %g3
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));
203ec4c: c4 2f 60 0f stb %g2, [ %i5 + 0xf ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
203ec50: c6 2f 60 09 stb %g3, [ %i5 + 9 ]
203ec54: c8 07 bf 30 ld [ %fp + -208 ], %g4
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));
203ec58: 87 30 a0 18 srl %g2, 0x18, %g3
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
203ec5c: 89 31 20 08 srl %g4, 8, %g4
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));
203ec60: c6 2f 60 0c stb %g3, [ %i5 + 0xc ]
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
203ec64: c8 2f 60 0a stb %g4, [ %i5 + 0xa ]
203ec68: c6 07 bf 30 ld [ %fp + -208 ], %g3
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);
203ec6c: 90 07 bf 28 add %fp, -216, %o0
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));
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
203ec70: c6 2f 60 0b stb %g3, [ %i5 + 0xb ]
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));
203ec74: 87 30 a0 10 srl %g2, 0x10, %g3
203ec78: 85 30 a0 08 srl %g2, 8, %g2
203ec7c: c6 2f 60 0d stb %g3, [ %i5 + 0xd ]
203ec80: c4 2f 60 0e stb %g2, [ %i5 + 0xe ]
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);
203ec84: c4 0f bf 40 ldub [ %fp + -192 ], %g2
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);
203ec88: 92 07 bf ec add %fp, -20, %o1
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));
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);
203ec8c: c4 2f 60 10 stb %g2, [ %i5 + 0x10 ]
203ec90: c4 17 bf 40 lduh [ %fp + -192 ], %g2
203ec94: c4 2f 60 11 stb %g2, [ %i5 + 0x11 ]
203ec98: c4 07 bf 40 ld [ %fp + -192 ], %g2
203ec9c: 85 30 a0 08 srl %g2, 8, %g2
203eca0: c4 2f 60 12 stb %g2, [ %i5 + 0x12 ]
203eca4: c4 07 bf 40 ld [ %fp + -192 ], %g2
203eca8: c4 2f 60 13 stb %g2, [ %i5 + 0x13 ]
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
203ecac: c4 0f bf 44 ldub [ %fp + -188 ], %g2
203ecb0: c4 2f 60 14 stb %g2, [ %i5 + 0x14 ]
203ecb4: c4 17 bf 44 lduh [ %fp + -188 ], %g2
203ecb8: c4 2f 60 15 stb %g2, [ %i5 + 0x15 ]
203ecbc: c4 07 bf 44 ld [ %fp + -188 ], %g2
203ecc0: 85 30 a0 08 srl %g2, 8, %g2
203ecc4: c4 2f 60 16 stb %g2, [ %i5 + 0x16 ]
203ecc8: c4 07 bf 44 ld [ %fp + -188 ], %g2
203eccc: c4 2f 60 17 stb %g2, [ %i5 + 0x17 ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
203ecd0: c4 0f bf 4c ldub [ %fp + -180 ], %g2
203ecd4: c4 2f 60 18 stb %g2, [ %i5 + 0x18 ]
203ecd8: c4 17 bf 4c lduh [ %fp + -180 ], %g2
203ecdc: c4 2f 60 19 stb %g2, [ %i5 + 0x19 ]
203ece0: c4 07 bf 4c ld [ %fp + -180 ], %g2
203ece4: 85 30 a0 08 srl %g2, 8, %g2
203ece8: c4 2f 60 1a stb %g2, [ %i5 + 0x1a ]
203ecec: c4 07 bf 4c ld [ %fp + -180 ], %g2
203ecf0: c4 2f 60 1b stb %g2, [ %i5 + 0x1b ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
203ecf4: c4 0f bf 50 ldub [ %fp + -176 ], %g2
203ecf8: c4 2f 60 1c stb %g2, [ %i5 + 0x1c ]
203ecfc: c4 17 bf 50 lduh [ %fp + -176 ], %g2
203ed00: c4 2f 60 1d stb %g2, [ %i5 + 0x1d ]
203ed04: c4 07 bf 50 ld [ %fp + -176 ], %g2
203ed08: 85 30 a0 08 srl %g2, 8, %g2
203ed0c: c4 2f 60 1e stb %g2, [ %i5 + 0x1e ]
203ed10: c4 07 bf 50 ld [ %fp + -176 ], %g2
203ed14: c4 2f 60 1f stb %g2, [ %i5 + 0x1f ]
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
203ed18: c4 0f bf 54 ldub [ %fp + -172 ], %g2
203ed1c: c4 2f 60 20 stb %g2, [ %i5 + 0x20 ]
203ed20: c4 17 bf 54 lduh [ %fp + -172 ], %g2
203ed24: c4 2f 60 21 stb %g2, [ %i5 + 0x21 ]
203ed28: c4 07 bf 54 ld [ %fp + -172 ], %g2
203ed2c: 85 30 a0 08 srl %g2, 8, %g2
203ed30: c4 2f 60 22 stb %g2, [ %i5 + 0x22 ]
203ed34: c4 07 bf 54 ld [ %fp + -172 ], %g2
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
203ed38: c0 2f 60 24 clrb [ %i5 + 0x24 ]
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);
203ed3c: c4 2f 60 23 stb %g2, [ %i5 + 0x23 ]
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
203ed40: c0 2f 60 25 clrb [ %i5 + 0x25 ]
203ed44: c0 2f 60 26 clrb [ %i5 + 0x26 ]
203ed48: 84 10 20 38 mov 0x38, %g2
203ed4c: c4 2f 60 27 stb %g2, [ %i5 + 0x27 ]
rtems_rfs_buffer_mark_dirty (&handle);
rc = rtems_rfs_buffer_handle_release (fs, &handle);
203ed50: 7f ff f1 2e call 203b208 <rtems_rfs_buffer_handle_release>
203ed54: c2 2f bf ec stb %g1, [ %fp + -20 ]
if (rc > 0)
203ed58: ba 92 20 00 orcc %o0, 0, %i5
203ed5c: 04 80 00 f0 ble 203f11c <rtems_rfs_format+0x774> <== ALWAYS TAKEN
203ed60: 92 07 bf ec add %fp, -20, %o1
*/
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);
203ed64: 7f ff f1 29 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203ed68: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
203ed6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203ed70: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203ed74: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203ed78: 40 00 3d 2c call 204e228 <strerror> <== NOT EXECUTED
203ed7c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203ed80: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203ed84: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203ed88: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203ed8c: 40 00 33 91 call 204bbd0 <printf> <== NOT EXECUTED
203ed90: 90 12 21 80 or %o0, 0x180, %o0 ! 206d180 <__FUNCTION__.7603+0x1758><== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
203ed94: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
return -1;
203ed98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
203ed9c: 40 00 34 28 call 204be3c <puts> <== NOT EXECUTED
203eda0: 90 12 21 c0 or %o0, 0x1c0, %o0 <== NOT EXECUTED
return -1;
203eda4: 81 c7 e0 08 ret <== NOT EXECUTED
203eda8: 81 e8 00 00 restore <== NOT EXECUTED
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
203edac: 7f ff fc 99 call 203e010 <rtems_rfs_fs_media_size>
203edb0: 90 07 bf 28 add %fp, -216, %o0
if (total_size >= GIGS (1))
203edb4: 80 a2 20 00 cmp %o0, 0
203edb8: 22 80 00 a3 be,a 203f044 <rtems_rfs_format+0x69c> <== ALWAYS TAKEN
203edbc: 03 00 03 ff sethi %hi(0xffc00), %g1
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
203edc0: 84 10 20 00 clr %g2 <== NOT EXECUTED
203edc4: 07 00 04 00 sethi %hi(0x100000), %g3 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
203edc8: 82 10 20 1f mov 0x1f, %g1 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
203edcc: 92 82 40 03 addcc %o1, %g3, %o1 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
203edd0: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
203edd4: 90 42 00 02 addx %o0, %g2, %o0 <== NOT EXECUTED
203edd8: 85 32 60 14 srl %o1, 0x14, %g2 <== NOT EXECUTED
203eddc: 89 2a 20 0c sll %o0, 0xc, %g4 <== NOT EXECUTED
203ede0: 10 80 00 04 b 203edf0 <rtems_rfs_format+0x448> <== NOT EXECUTED
203ede4: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
203ede8: 02 80 00 06 be 203ee00 <rtems_rfs_format+0x458> <== NOT EXECUTED
203edec: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
203edf0: bb 28 c0 01 sll %g3, %g1, %i5 <== NOT EXECUTED
203edf4: 80 8f 40 02 btst %i5, %g2 <== NOT EXECUTED
203edf8: 02 bf ff fc be 203ede8 <rtems_rfs_format+0x440> <== NOT EXECUTED
203edfc: 82 80 7f ff addcc %g1, -1, %g1 <== NOT EXECUTED
break;
fs->block_size = 1 << b;
203ee00: fa 27 bf 30 st %i5, [ %fp + -208 ] <== NOT EXECUTED
}
if (fs->block_size < 512)
203ee04: 80 a7 61 ff cmp %i5, 0x1ff
203ee08: 18 80 01 c8 bgu 203f528 <rtems_rfs_format+0xb80> <== NEVER TAKEN
203ee0c: 03 00 00 04 sethi %hi(0x1000), %g1
fs->block_size = 512;
203ee10: c2 07 bf 38 ld [ %fp + -200 ], %g1
203ee14: ba 10 22 00 mov 0x200, %i5
203ee18: f8 00 60 24 ld [ %g1 + 0x24 ], %i4
203ee1c: 82 10 22 00 mov 0x200, %g1
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
203ee20: 90 10 00 1d mov %i5, %o0
break;
fs->block_size = 1 << b;
}
if (fs->block_size < 512)
fs->block_size = 512;
203ee24: c2 27 bf 30 st %g1, [ %fp + -208 ]
if (fs->block_size > (4 * 1024))
fs->block_size = (4 * 1024);
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
203ee28: 40 00 87 c9 call 2060d4c <.urem>
203ee2c: 92 10 00 1c mov %i4, %o1
203ee30: 80 a2 20 00 cmp %o0, 0
203ee34: 22 bf ff 0f be,a 203ea70 <rtems_rfs_format+0xc8> <== ALWAYS TAKEN
203ee38: c2 06 60 04 ld [ %i1 + 4 ], %g1
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
203ee3c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203ee40: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203ee44: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203ee48: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED
203ee4c: 40 00 33 61 call 204bbd0 <printf> <== NOT EXECUTED
203ee50: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203ee54: 81 c7 e0 08 ret <== NOT EXECUTED
203ee58: 81 e8 00 00 restore <== NOT EXECUTED
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
203ee5c: 7f ff fc 6d call 203e010 <rtems_rfs_fs_media_size> <== NOT EXECUTED
203ee60: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
203ee64: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
203ee68: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
203ee6c: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203ee70: 40 00 33 58 call 204bbd0 <printf> <== NOT EXECUTED
203ee74: 90 12 23 30 or %o0, 0x330, %o0 ! 206cf30 <__FUNCTION__.7603+0x1508><== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
203ee78: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
203ee7c: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203ee80: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
203ee84: 40 00 33 53 call 204bbd0 <printf> <== NOT EXECUTED
203ee88: 90 12 23 58 or %o0, 0x358, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
rtems_rfs_fs_media_block_size (&fs));
203ee8c: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
203ee90: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203ee94: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
203ee98: 40 00 33 4e call 204bbd0 <printf> <== NOT EXECUTED
203ee9c: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
203eea0: 7f ff fc 53 call 203dfec <rtems_rfs_fs_size> <== NOT EXECUTED
203eea4: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
203eea8: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED
203eeac: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
203eeb0: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203eeb4: 40 00 33 47 call 204bbd0 <printf> <== NOT EXECUTED
203eeb8: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 206cfb0 <__FUNCTION__.7603+0x1588><== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
203eebc: d2 07 bf 2c ld [ %fp + -212 ], %o1 <== NOT EXECUTED
203eec0: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203eec4: 40 00 33 43 call 204bbd0 <printf> <== NOT EXECUTED
203eec8: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 206cfd0 <__FUNCTION__.7603+0x15a8><== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
203eecc: d2 07 bf 30 ld [ %fp + -208 ], %o1 <== NOT EXECUTED
203eed0: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203eed4: 40 00 33 3f call 204bbd0 <printf> <== NOT EXECUTED
203eed8: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 206cff8 <__FUNCTION__.7603+0x15d0><== 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));
203eedc: d2 07 bf 30 ld [ %fp + -208 ], %o1 <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
203eee0: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203eee4: 93 2a 60 03 sll %o1, 3, %o1 <== NOT EXECUTED
203eee8: 40 00 33 3a call 204bbd0 <printf> <== NOT EXECUTED
203eeec: 90 12 20 20 or %o0, 0x20, %o0 <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
203eef0: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
203eef4: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203eef8: 40 00 33 36 call 204bbd0 <printf> <== NOT EXECUTED
203eefc: 90 12 20 48 or %o0, 0x48, %o0 ! 206d048 <__FUNCTION__.7603+0x1620><== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
203ef00: d2 07 bf 4c ld [ %fp + -180 ], %o1 <== NOT EXECUTED
fs.group_inodes * fs.group_count,
203ef04: f8 07 bf 54 ld [ %fp + -172 ], %i4 <== 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",
203ef08: 7f ff 0f f6 call 2002ee0 <.umul> <== NOT EXECUTED
203ef0c: 90 10 00 1c mov %i4, %o0 <== 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,
203ef10: 83 2f 20 03 sll %i4, 3, %g1 <== 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",
203ef14: ba 10 00 08 mov %o0, %i5 <== 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,
203ef18: b9 2f 20 06 sll %i4, 6, %i4 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
203ef1c: f4 07 bf 30 ld [ %fp + -208 ], %i2 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203ef20: a0 a7 00 01 subcc %i4, %g1, %l0 <== NOT EXECUTED
203ef24: 12 80 00 4e bne 203f05c <rtems_rfs_format+0x6b4> <== NOT EXECUTED
203ef28: 90 10 27 d0 mov 0x7d0, %o0 <== 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))
203ef2c: f6 07 bf 2c ld [ %fp + -212 ], %i3 <== 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));
203ef30: b9 2e a0 03 sll %i2, 3, %i4 <== 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))
203ef34: b6 06 ff ff add %i3, -1, %i3 <== 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));
203ef38: a2 10 00 1c mov %i4, %l1 <== 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))
203ef3c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
203ef40: 08 80 00 03 bleu 203ef4c <rtems_rfs_format+0x5a4> <== NOT EXECUTED
203ef44: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
203ef48: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
203ef4c: 40 00 86 d6 call 2060aa4 <.div> <== NOT EXECUTED
203ef50: 01 00 00 00 nop <== 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",
203ef54: 40 00 86 d4 call 2060aa4 <.div> <== NOT EXECUTED
203ef58: 92 10 20 0a mov 0xa, %o1 ! a <PROM_START+0xa> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203ef5c: 80 a4 20 00 cmp %l0, 0 <== 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",
203ef60: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203ef64: 12 80 00 50 bne 203f0a4 <rtems_rfs_format+0x6fc> <== NOT EXECUTED
203ef68: 90 10 27 d0 mov 0x7d0, %o0 <== 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))
203ef6c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
203ef70: 38 80 00 02 bgu,a 203ef78 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
203ef74: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
203ef78: 40 00 86 cb call 2060aa4 <.div> <== NOT EXECUTED
203ef7c: 92 10 00 11 mov %l1, %o1 <== 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",
203ef80: 40 00 87 75 call 2060d54 <.rem> <== NOT EXECUTED
203ef84: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
203ef88: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
203ef8c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203ef90: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203ef94: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203ef98: 40 00 33 0e call 204bbd0 <printf> <== NOT EXECUTED
203ef9c: 90 12 20 70 or %o0, 0x70, %o0 ! 206d070 <__FUNCTION__.7603+0x1648><== 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);
203efa0: d2 07 bf 4c ld [ %fp + -180 ], %o1 <== NOT EXECUTED
203efa4: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203efa8: 40 00 33 0a call 204bbd0 <printf> <== NOT EXECUTED
203efac: 90 12 20 a0 or %o0, 0xa0, %o0 ! 206d0a0 <__FUNCTION__.7603+0x1678><== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
203efb0: d2 07 bf 50 ld [ %fp + -176 ], %o1 <== NOT EXECUTED
203efb4: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203efb8: 40 00 33 06 call 204bbd0 <printf> <== NOT EXECUTED
203efbc: 90 12 20 c0 or %o0, 0xc0, %o0 ! 206d0c0 <__FUNCTION__.7603+0x1698><== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
203efc0: d2 07 bf 54 ld [ %fp + -172 ], %o1 <== NOT EXECUTED
203efc4: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203efc8: 40 00 33 02 call 204bbd0 <printf> <== NOT EXECUTED
203efcc: 90 12 20 e8 or %o0, 0xe8, %o0 ! 206d0e8 <__FUNCTION__.7603+0x16c0><== NOT EXECUTED
203efd0: 10 bf fe da b 203eb38 <rtems_rfs_format+0x190> <== NOT EXECUTED
203efd4: fa 07 bf 30 ld [ %fp + -208 ], %i5 <== NOT EXECUTED
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
203efd8: c2 06 60 0c ld [ %i1 + 0xc ], %g1
203efdc: 80 a0 60 00 cmp %g1, 0
203efe0: 02 80 00 03 be 203efec <rtems_rfs_format+0x644> <== ALWAYS TAKEN
203efe4: 90 10 20 01 mov 1, %o0
203efe8: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
203efec: 7f ff 0f bd call 2002ee0 <.umul>
203eff0: 92 07 3f ff add %i4, -1, %o1
203eff4: 92 10 20 64 mov 0x64, %o1
203eff8: 40 00 86 a9 call 2060a9c <.udiv>
203effc: b6 10 20 01 mov 1, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f000: 80 a2 20 00 cmp %o0, 0
203f004: 32 80 00 35 bne,a 203f0d8 <rtems_rfs_format+0x730>
203f008: 92 10 00 10 mov %l0, %o1
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
203f00c: 92 10 20 38 mov 0x38, %o1
203f010: 40 00 86 a3 call 2060a9c <.udiv>
203f014: 90 10 00 1d mov %i5, %o0
203f018: b8 10 00 08 mov %o0, %i4
203f01c: 90 10 00 1b mov %i3, %o0
203f020: 7f ff 0f b0 call 2002ee0 <.umul>
203f024: 92 10 00 1c mov %i4, %o1
}
/*
* 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;
203f028: f8 27 bf 58 st %i4, [ %fp + -168 ]
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
203f02c: b6 10 00 08 mov %o0, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f030: 80 a6 e0 00 cmp %i3, 0
203f034: 02 bf fe b1 be 203eaf8 <rtems_rfs_format+0x150> <== NEVER TAKEN
203f038: 90 10 20 01 mov 1, %o0
return 1;
return ((dividend - 1) / divisor) + 1;
203f03c: 10 bf fe ac b 203eaec <rtems_rfs_format+0x144>
203f040: 90 06 ff ff add %i3, -1, %o0
fs->block_size = config->block_size;
if (!fs->block_size)
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
if (total_size >= GIGS (1))
203f044: 82 10 63 ff or %g1, 0x3ff, %g1
203f048: 80 a2 40 01 cmp %o1, %g1
203f04c: 08 bf ff 6e bleu 203ee04 <rtems_rfs_format+0x45c> <== ALWAYS TAKEN
203f050: fa 07 bf 30 ld [ %fp + -208 ], %i5
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
203f054: 10 bf ff 5c b 203edc4 <rtems_rfs_format+0x41c> <== NOT EXECUTED
203f058: 84 10 20 00 clr %g2 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
203f05c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
203f060: 40 00 86 8f call 2060a9c <.udiv> <== NOT EXECUTED
203f064: 90 04 3f ff add %l0, -1, %o0 <== 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))
203f068: f6 07 bf 2c ld [ %fp + -212 ], %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f06c: 90 02 20 02 add %o0, 2, %o0 <== 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));
203f070: b9 2e a0 03 sll %i2, 3, %i4 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f074: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
203f078: 85 2a 20 07 sll %o0, 7, %g2 <== 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))
203f07c: b6 06 ff ff add %i3, -1, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f080: 82 20 80 01 sub %g2, %g1, %g1 <== 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));
203f084: a2 10 00 1c mov %i4, %l1 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f088: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
{
int blocks;
int bits_per_block;
blocks = rtems_rfs_rup_quotient(fs->group_inodes * RTEMS_RFS_INODE_SIZE,
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
203f08c: 92 10 00 1c mov %i4, %o1 <== 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))
203f090: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
203f094: 08 bf ff ae bleu 203ef4c <rtems_rfs_format+0x5a4> <== NOT EXECUTED
203f098: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
203f09c: 10 bf ff ac b 203ef4c <rtems_rfs_format+0x5a4> <== NOT EXECUTED
203f0a0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
203f0a4: 90 04 3f ff add %l0, -1, %o0 <== NOT EXECUTED
203f0a8: 40 00 86 7d call 2060a9c <.udiv> <== NOT EXECUTED
203f0ac: 92 10 00 1a mov %i2, %o1 <== 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))
203f0b0: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f0b4: 90 02 20 02 add %o0, 2, %o0 <== NOT EXECUTED
203f0b8: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
203f0bc: 85 2a 20 07 sll %o0, 7, %g2 <== NOT EXECUTED
203f0c0: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
203f0c4: 90 00 40 08 add %g1, %o0, %o0 <== 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))
203f0c8: 08 bf ff ac bleu 203ef78 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
203f0cc: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
203f0d0: 10 bf ff aa b 203ef78 <rtems_rfs_format+0x5d0> <== NOT EXECUTED
203f0d4: a2 10 00 1b mov %i3, %l1 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
203f0d8: 40 00 86 71 call 2060a9c <.udiv>
203f0dc: 90 02 3f ff add %o0, -1, %o0
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
203f0e0: 92 10 20 38 mov 0x38, %o1
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
203f0e4: b6 02 20 01 add %o0, 1, %i3
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
203f0e8: 40 00 86 6d call 2060a9c <.udiv>
203f0ec: 90 10 00 1d mov %i5, %o0
203f0f0: b8 10 00 08 mov %o0, %i4
203f0f4: 90 10 00 1b mov %i3, %o0
203f0f8: 7f ff 0f 7a call 2002ee0 <.umul>
203f0fc: 92 10 00 1c mov %i4, %o1
}
/*
* 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;
203f100: f8 27 bf 58 st %i4, [ %fp + -168 ]
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
203f104: b6 10 00 08 mov %o0, %i3
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f108: 80 a6 e0 00 cmp %i3, 0
203f10c: 02 bf fe 7b be 203eaf8 <rtems_rfs_format+0x150> <== NEVER TAKEN
203f110: 90 10 20 01 mov 1, %o0
return 1;
return ((dividend - 1) / divisor) + 1;
203f114: 10 bf fe 76 b 203eaec <rtems_rfs_format+0x144>
203f118: 90 06 ff ff add %i3, -1, %o0
*/
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);
203f11c: 90 07 bf 28 add %fp, -216, %o0
203f120: 7f ff f0 3a call 203b208 <rtems_rfs_buffer_handle_release>
203f124: 92 07 bf ec add %fp, -20, %o1
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
203f128: c2 07 bf 4c ld [ %fp + -180 ], %g1
handle->dirty = false;
203f12c: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
203f130: c0 27 bf f0 clr [ %fp + -16 ]
203f134: 80 a0 60 00 cmp %g1, 0
203f138: 04 80 00 96 ble 203f390 <rtems_rfs_format+0x9e8> <== NEVER TAKEN
203f13c: c0 27 bf f4 clr [ %fp + -12 ]
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
203f140: c2 07 bf 2c ld [ %fp + -212 ], %g1
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,
203f144: e2 0e 60 14 ldub [ %i1 + 0x14 ], %l1
203f148: e4 0e 60 15 ldub [ %i1 + 0x15 ], %l2
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
203f14c: 80 a0 60 00 cmp %g1, 0
203f150: 02 80 01 ca be 203f878 <rtems_rfs_format+0xed0> <== NEVER TAKEN
203f154: fa 07 bf 50 ld [ %fp + -176 ], %i5
*/
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",
203f158: 29 00 81 b4 sethi %hi(0x206d000), %l4
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
203f15c: 27 00 81 b4 sethi %hi(0x206d000), %l3
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
203f160: 2d 00 81 b4 sethi %hi(0x206d000), %l6
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
203f164: b8 10 20 01 mov 1, %i4
203f168: b4 10 20 00 clr %i2
203f16c: b6 10 20 00 clr %i3
*/
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",
203f170: a8 15 22 30 or %l4, 0x230, %l4
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
203f174: a6 14 e2 68 or %l3, 0x268, %l3
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);
203f178: aa 10 20 01 mov 1, %l5
if (verbose)
printf (", inodes");
203f17c: ac 15 a3 58 or %l6, 0x358, %l6
/*
* 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))
203f180: 84 07 40 1c add %i5, %i4, %g2
203f184: 80 a0 40 02 cmp %g1, %g2
203f188: 2a 80 00 02 bcs,a 203f190 <rtems_rfs_format+0x7e8> <== ALWAYS TAKEN
203f18c: ba 20 40 1c sub %g1, %i4, %i5
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
203f190: a4 8c a0 ff andcc %l2, 0xff, %l2
203f194: 12 80 00 3b bne 203f280 <rtems_rfs_format+0x8d8> <== NEVER TAKEN
203f198: 90 10 00 14 mov %l4, %o0
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203f19c: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
203f1a0: c0 27 bf f0 clr [ %fp + -16 ]
handle->buffer = NULL;
203f1a4: c0 27 bf f4 clr [ %fp + -12 ]
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
203f1a8: 90 07 bf d4 add %fp, -44, %o0
203f1ac: 92 07 bf 28 add %fp, -216, %o1
203f1b0: 94 07 bf ec add %fp, -20, %o2
203f1b4: 96 10 00 1d mov %i5, %o3
203f1b8: 40 00 1e 78 call 2046b98 <rtems_rfs_bitmap_open>
203f1bc: 98 10 00 1c mov %i4, %o4
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
203f1c0: a0 92 20 00 orcc %o0, 0, %l0
203f1c4: 04 80 00 12 ble 203f20c <rtems_rfs_format+0x864> <== ALWAYS TAKEN
203f1c8: 92 07 bf ec add %fp, -20, %o1
*/
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);
203f1cc: 7f ff f0 0f call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f1d0: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
203f1d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
203f1d8: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f1dc: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f1e0: 40 00 3c 12 call 204e228 <strerror> <== NOT EXECUTED
203f1e4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f1e8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f1ec: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203f1f0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
203f1f4: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
203f1f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
203f1fc: 40 00 32 75 call 204bbd0 <printf> <== NOT EXECUTED
203f200: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED
203f204: 81 c7 e0 08 ret <== NOT EXECUTED
203f208: 81 e8 00 00 restore <== 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));
203f20c: c2 07 bf f4 ld [ %fp + -12 ], %g1
203f210: d4 07 bf 30 ld [ %fp + -208 ], %o2
203f214: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
203f218: 40 00 2e 02 call 204aa20 <memset>
203f21c: 92 10 20 ff mov 0xff, %o1
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
203f220: 40 00 1d b5 call 20468f4 <rtems_rfs_bitmap_map_clear_all>
203f224: 90 07 bf d4 add %fp, -44, %o0
if (rc > 0)
203f228: a0 92 20 00 orcc %o0, 0, %l0
203f22c: 04 80 00 20 ble 203f2ac <rtems_rfs_format+0x904> <== ALWAYS TAKEN
203f230: 92 10 20 00 clr %o1
{
rtems_rfs_bitmap_close (&bitmap);
203f234: 40 00 1e 6a call 2046bdc <rtems_rfs_bitmap_close> <== NOT EXECUTED
203f238: 90 07 bf d4 add %fp, -44, %o0 <== 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);
203f23c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
203f240: 7f ff ef f2 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f244: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
203f248: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
203f24c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f250: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f254: 40 00 3b f5 call 204e228 <strerror> <== NOT EXECUTED
203f258: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f25c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f260: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203f264: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
203f268: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
203f26c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
if (rc > 0)
{
rtems_rfs_bitmap_close (&bitmap);
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
203f270: 40 00 32 58 call 204bbd0 <printf> <== NOT EXECUTED
203f274: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED
203f278: 81 c7 e0 08 ret <== NOT EXECUTED
203f27c: 81 e8 00 00 restore <== 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",
203f280: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f284: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203f288: 40 00 32 52 call 204bbd0 <printf> <== NOT EXECUTED
203f28c: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
rc, strerror (rc));
return false;
}
if (verbose)
printf (", blocks");
203f290: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203f294: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f298: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f29c: 40 00 32 4d call 204bbd0 <printf> <== NOT EXECUTED
203f2a0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
203f2a4: 10 bf ff c2 b 203f1ac <rtems_rfs_format+0x804> <== NOT EXECUTED
203f2a8: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
203f2ac: 40 00 1d 0a call 20466d4 <rtems_rfs_bitmap_map_set>
203f2b0: 90 07 bf d4 add %fp, -44, %o0
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
203f2b4: 92 10 20 01 mov 1, %o1
203f2b8: 40 00 1d 07 call 20466d4 <rtems_rfs_bitmap_map_set>
203f2bc: 90 07 bf d4 add %fp, -44, %o0
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
203f2c0: d0 07 bf 54 ld [ %fp + -172 ], %o0
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
203f2c4: 80 a2 20 00 cmp %o0, 0
203f2c8: 12 80 00 2b bne 203f374 <rtems_rfs_format+0x9cc> <== ALWAYS TAKEN
203f2cc: d2 07 bf 58 ld [ %fp + -168 ], %o1
return 1;
203f2d0: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
203f2d4: ae 10 20 00 clr %l7 <== NOT EXECUTED
/*
* 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);
203f2d8: 92 05 e0 02 add %l7, 2, %o1
203f2dc: 40 00 1c fe call 20466d4 <rtems_rfs_bitmap_map_set>
203f2e0: 90 07 bf d4 add %fp, -44, %o0
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++)
203f2e4: ae 05 e0 01 inc %l7
203f2e8: 80 a4 00 17 cmp %l0, %l7
203f2ec: 14 bf ff fc bg 203f2dc <rtems_rfs_format+0x934>
203f2f0: 92 05 e0 02 add %l7, 2, %o1
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
203f2f4: 40 00 1e 3a call 2046bdc <rtems_rfs_bitmap_close>
203f2f8: 90 07 bf d4 add %fp, -44, %o0
if (rc > 0)
203f2fc: ae 92 20 00 orcc %o0, 0, %l7
203f300: 14 80 00 45 bg 203f414 <rtems_rfs_format+0xa6c> <== NEVER TAKEN
203f304: 80 a4 a0 00 cmp %l2, 0
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
203f308: 12 80 00 71 bne 203f4cc <rtems_rfs_format+0xb24> <== NEVER TAKEN
203f30c: ea 2f bf ec stb %l5, [ %fp + -20 ]
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
203f310: 96 10 00 1d mov %i5, %o3
203f314: 90 07 bf d4 add %fp, -44, %o0
203f318: 92 07 bf 28 add %fp, -216, %o1
203f31c: 94 07 bf ec add %fp, -20, %o2
203f320: 40 00 1e 1e call 2046b98 <rtems_rfs_bitmap_open>
203f324: 98 06 a0 02 add %i2, 2, %o4
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
203f328: ba 92 20 00 orcc %o0, 0, %i5
203f32c: 04 80 00 4b ble 203f458 <rtems_rfs_format+0xab0> <== ALWAYS TAKEN
203f330: 92 07 bf ec add %fp, -20, %o1
*/
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);
203f334: 7f ff ef b5 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f338: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
203f33c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203f340: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f344: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f348: 40 00 3b b8 call 204e228 <strerror> <== NOT EXECUTED
203f34c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f350: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f354: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203f358: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
203f35c: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
203f360: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
203f364: 40 00 32 1b call 204bbd0 <printf> <== NOT EXECUTED
203f368: 90 12 23 68 or %o0, 0x368, %o0 <== NOT EXECUTED
203f36c: 81 c7 e0 08 ret <== NOT EXECUTED
203f370: 81 e8 00 00 restore <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
203f374: 40 00 85 ca call 2060a9c <.udiv>
203f378: 90 02 3f ff add %o0, -1, %o0
203f37c: a0 02 20 01 add %o0, 1, %l0
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++)
203f380: 80 a4 20 00 cmp %l0, 0
203f384: 14 bf ff d5 bg 203f2d8 <rtems_rfs_format+0x930> <== ALWAYS TAKEN
203f388: ae 10 20 00 clr %l7
203f38c: 30 bf ff da b,a 203f2f4 <rtems_rfs_format+0x94c> <== NOT EXECUTED
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
203f390: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
203f394: 80 a0 60 00 cmp %g1, 0
203f398: 12 80 00 6b bne 203f544 <rtems_rfs_format+0xb9c> <== NEVER TAKEN
203f39c: 01 00 00 00 nop
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
203f3a0: 7f ff f1 bc call 203ba90 <rtems_rfs_buffer_close>
203f3a4: 90 07 bf 28 add %fp, -216, %o0
if (rc > 0)
203f3a8: ba 92 20 00 orcc %o0, 0, %i5
203f3ac: 14 80 01 08 bg 203f7cc <rtems_rfs_format+0xe24> <== NEVER TAKEN
203f3b0: 92 10 20 00 clr %o1
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
203f3b4: 90 10 00 18 mov %i0, %o0
203f3b8: 94 10 20 06 mov 6, %o2
203f3bc: 96 10 20 00 clr %o3
203f3c0: 7f ff fb 1e call 203e038 <rtems_rfs_fs_open>
203f3c4: 98 07 bf f8 add %fp, -8, %o4
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
203f3c8: 80 a2 20 00 cmp %o0, 0
203f3cc: 06 80 01 3a bl 203f8b4 <rtems_rfs_format+0xf0c> <== NEVER TAKEN
203f3d0: 92 10 20 01 mov 1, %o1
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
203f3d4: d0 07 bf f8 ld [ %fp + -8 ], %o0
203f3d8: 40 00 03 3f call 20400d4 <rtems_rfs_inode_alloc>
203f3dc: 94 07 bf fc add %fp, -4, %o2
if (rc > 0)
203f3e0: ba 92 20 00 orcc %o0, 0, %i5
203f3e4: 14 80 00 3e bg 203f4dc <rtems_rfs_format+0xb34> <== NEVER TAKEN
203f3e8: d2 07 bf fc ld [ %fp + -4 ], %o1
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
203f3ec: 80 a2 60 01 cmp %o1, 1
203f3f0: 02 80 00 61 be 203f574 <rtems_rfs_format+0xbcc> <== ALWAYS TAKEN
203f3f4: 11 00 81 b5 sethi %hi(0x206d400), %o0
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
203f3f8: 40 00 31 f6 call 204bbd0 <printf> <== NOT EXECUTED
203f3fc: 90 12 21 30 or %o0, 0x130, %o0 ! 206d530 <__FUNCTION__.7603+0x1b08><== NOT EXECUTED
rtems_rfs_fs_close (fs);
203f400: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
203f404: 7f ff fd 3c call 203e8f4 <rtems_rfs_fs_close> <== NOT EXECUTED
203f408: b0 10 20 00 clr %i0 <== NOT EXECUTED
203f40c: 81 c7 e0 08 ret <== NOT EXECUTED
203f410: 81 e8 00 00 restore <== 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);
203f414: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
203f418: 7f ff ef 7c call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f41c: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
203f420: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
handle->dirty = false;
203f424: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f428: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f42c: 40 00 3b 7f call 204e228 <strerror> <== NOT EXECUTED
203f430: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f434: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f438: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203f43c: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED
203f440: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
203f444: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
203f448: 40 00 31 e2 call 204bbd0 <printf> <== NOT EXECUTED
203f44c: 90 12 23 10 or %o0, 0x310, %o0 <== NOT EXECUTED
203f450: 81 c7 e0 08 ret <== NOT EXECUTED
203f454: 81 e8 00 00 restore <== 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));
203f458: c2 07 bf f4 ld [ %fp + -12 ], %g1
203f45c: d4 07 bf 30 ld [ %fp + -208 ], %o2
203f460: d0 00 60 1c ld [ %g1 + 0x1c ], %o0
203f464: 40 00 2d 6f call 204aa20 <memset>
203f468: 92 10 20 00 clr %o1
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
203f46c: 40 00 1d 22 call 20468f4 <rtems_rfs_bitmap_map_clear_all>
203f470: 90 07 bf d4 add %fp, -44, %o0
203f474: ba 10 00 08 mov %o0, %i5
if (rc > 0)
203f478: 80 a7 60 00 cmp %i5, 0
203f47c: 04 80 00 54 ble 203f5cc <rtems_rfs_format+0xc24> <== ALWAYS TAKEN
203f480: 90 07 bf d4 add %fp, -44, %o0
{
rtems_rfs_bitmap_close (&bitmap);
203f484: 40 00 1d d6 call 2046bdc <rtems_rfs_bitmap_close> <== NOT EXECUTED
203f488: b0 10 3f ff mov -1, %i0 <== 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);
203f48c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
203f490: 7f ff ef 5e call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f494: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
203f498: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203f49c: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f4a0: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f4a4: 40 00 3b 61 call 204e228 <strerror> <== NOT EXECUTED
203f4a8: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f4ac: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f4b0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203f4b4: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
203f4b8: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203f4bc: 40 00 31 c5 call 204bbd0 <printf> <== NOT EXECUTED
203f4c0: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 206d3b0 <__FUNCTION__.7603+0x1988><== NOT EXECUTED
203f4c4: 81 c7 e0 08 ret <== NOT EXECUTED
203f4c8: 81 e8 00 00 restore <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
printf (", inodes");
203f4cc: 40 00 31 c1 call 204bbd0 <printf> <== NOT EXECUTED
203f4d0: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
203f4d4: 10 bf ff 90 b 203f314 <rtems_rfs_format+0x96c> <== NOT EXECUTED
203f4d8: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
if (rc > 0)
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
203f4dc: 40 00 3b 53 call 204e228 <strerror> <== NOT EXECUTED
203f4e0: 01 00 00 00 nop <== NOT EXECUTED
203f4e4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f4e8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f4ec: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f4f0: 40 00 31 b8 call 204bbd0 <printf> <== NOT EXECUTED
203f4f4: 90 12 20 f8 or %o0, 0xf8, %o0 ! 206d4f8 <__FUNCTION__.7603+0x1ad0><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
203f4f8: 7f ff fc ff call 203e8f4 <rtems_rfs_fs_close> <== NOT EXECUTED
203f4fc: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
203f500: 40 00 3b 4a call 204e228 <strerror> <== NOT EXECUTED
203f504: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203f508: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f50c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
rc, strerror (rc));
return -1;
203f510: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
203f514: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f518: 40 00 31 ae call 204bbd0 <printf> <== NOT EXECUTED
203f51c: 90 12 22 70 or %o0, 0x270, %o0 ! 206d670 <__FUNCTION__.7603+0x1c48><== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
203f520: 81 c7 e0 08 ret <== NOT EXECUTED
203f524: 81 e8 00 00 restore <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
203f528: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
203f52c: 08 80 00 ef bleu 203f8e8 <rtems_rfs_format+0xf40> <== NOT EXECUTED
203f530: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED
fs->block_size = (4 * 1024);
203f534: c2 27 bf 30 st %g1, [ %fp + -208 ] <== NOT EXECUTED
203f538: f8 00 a0 24 ld [ %g2 + 0x24 ], %i4 <== NOT EXECUTED
203f53c: 10 bf fd 46 b 203ea54 <rtems_rfs_format+0xac> <== NOT EXECUTED
203f540: ba 10 00 01 mov %g1, %i5 <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
printf ("\n");
203f544: 40 00 32 10 call 204bd84 <putchar> <== NOT EXECUTED
203f548: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
203f54c: 30 bf ff 95 b,a 203f3a0 <rtems_rfs_format+0x9f8> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
if (rc > 0)
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
203f550: 40 00 3b 36 call 204e228 <strerror> <== NOT EXECUTED
203f554: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203f558: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f55c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f560: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
203f564: 40 00 31 9b call 204bbd0 <printf> <== NOT EXECUTED
203f568: 90 12 21 10 or %o0, 0x110, %o0 ! 206d110 <__FUNCTION__.7603+0x16e8><== NOT EXECUTED
rc, strerror (rc));
return -1;
203f56c: 81 c7 e0 08 ret <== NOT EXECUTED
203f570: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
203f574: d0 07 bf f8 ld [ %fp + -8 ], %o0
203f578: 92 10 20 01 mov 1, %o1
203f57c: 94 07 bf ac add %fp, -84, %o2
203f580: 40 00 03 10 call 20401c0 <rtems_rfs_inode_open>
203f584: 96 10 20 01 mov 1, %o3
if (rc > 0)
203f588: ba 92 20 00 orcc %o0, 0, %i5
203f58c: 24 80 00 50 ble,a 203f6cc <rtems_rfs_format+0xd24> <== ALWAYS TAKEN
203f590: 90 07 bf ac add %fp, -84, %o0
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
203f594: 40 00 3b 25 call 204e228 <strerror> <== NOT EXECUTED
203f598: 01 00 00 00 nop <== NOT EXECUTED
203f59c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f5a0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f5a4: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f5a8: 40 00 31 8a call 204bbd0 <printf> <== NOT EXECUTED
203f5ac: 90 12 21 68 or %o0, 0x168, %o0 ! 206d568 <__FUNCTION__.7603+0x1b40><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
203f5b0: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
203f5b4: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
203f5b8: 40 00 02 14 call 203fe08 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
203f5bc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
rtems_rfs_fs_close (fs);
203f5c0: 7f ff fc cd call 203e8f4 <rtems_rfs_fs_close> <== NOT EXECUTED
203f5c4: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
203f5c8: 30 bf ff ce b,a 203f500 <rtems_rfs_format+0xb58> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
203f5cc: 40 00 1d 84 call 2046bdc <rtems_rfs_bitmap_close>
203f5d0: 01 00 00 00 nop
if (rc > 0)
203f5d4: ba 92 20 00 orcc %o0, 0, %i5
203f5d8: 14 80 00 2c bg 203f688 <rtems_rfs_format+0xce0> <== NEVER TAKEN
203f5dc: 80 8c 60 ff btst 0xff, %l1
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
203f5e0: 02 80 00 8a be 203f808 <rtems_rfs_format+0xe60> <== ALWAYS TAKEN
203f5e4: ea 2f bf ec stb %l5, [ %fp + -20 ]
{
for (b = 0; b < blocks; b++)
203f5e8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
203f5ec: 04 80 00 87 ble 203f808 <rtems_rfs_format+0xe60> <== NOT EXECUTED
203f5f0: b8 07 20 02 add %i4, 2, %i4 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
203f5f4: 10 80 00 0a b 203f61c <rtems_rfs_format+0xc74> <== NOT EXECUTED
203f5f8: a0 07 00 10 add %i4, %l0, %l0 <== 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));
203f5fc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
203f600: d4 07 bf 30 ld [ %fp + -208 ], %o2 <== NOT EXECUTED
203f604: d0 00 60 1c ld [ %g1 + 0x1c ], %o0 <== NOT EXECUTED
203f608: 40 00 2d 06 call 204aa20 <memset> <== NOT EXECUTED
203f60c: b8 07 20 01 inc %i4 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
203f610: 80 a7 00 10 cmp %i4, %l0 <== NOT EXECUTED
203f614: 02 80 00 7d be 203f808 <rtems_rfs_format+0xe60> <== NOT EXECUTED
203f618: ea 2f bf ec stb %l5, [ %fp + -20 ] <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
203f61c: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
203f620: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203f624: 96 10 20 00 clr %o3 <== NOT EXECUTED
203f628: 7f ff ef 73 call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
203f62c: 90 07 bf 28 add %fp, -216, %o0 <== 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));
203f630: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
203f634: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
203f638: 04 bf ff f1 ble 203f5fc <rtems_rfs_format+0xc54> <== NOT EXECUTED
203f63c: ba 10 00 08 mov %o0, %i5 <== 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);
203f640: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
203f644: 7f ff ee f1 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f648: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
203f64c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203f650: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f654: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f658: 40 00 3a f4 call 204e228 <strerror> <== NOT EXECUTED
203f65c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f660: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f664: 98 10 00 08 mov %o0, %o4 <== NOT EXECUTED
203f668: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
203f66c: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f670: 96 10 00 1d mov %i5, %o3 <== NOT EXECUTED
203f674: 90 12 20 48 or %o0, 0x48, %o0 <== NOT EXECUTED
203f678: 40 00 31 56 call 204bbd0 <printf> <== NOT EXECUTED
203f67c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203f680: 81 c7 e0 08 ret <== NOT EXECUTED
203f684: 81 e8 00 00 restore <== 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);
203f688: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
203f68c: 7f ff ee df call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f690: 90 07 bf 28 add %fp, -216, %o0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
203f694: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
203f698: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
203f69c: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
203f6a0: 40 00 3a e2 call 204e228 <strerror> <== NOT EXECUTED
203f6a4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
203f6a8: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f6ac: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
203f6b0: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
203f6b4: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
203f6b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
*/
rc = rtems_rfs_bitmap_close (&bitmap);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &handle);
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
203f6bc: 40 00 31 45 call 204bbd0 <printf> <== NOT EXECUTED
203f6c0: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED
203f6c4: 81 c7 e0 08 ret <== NOT EXECUTED
203f6c8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
203f6cc: 92 10 20 00 clr %o1
203f6d0: 96 10 20 00 clr %o3
203f6d4: 15 00 00 10 sethi %hi(0x4000), %o2
203f6d8: 98 10 20 00 clr %o4
203f6dc: 40 00 03 b5 call 20405b0 <rtems_rfs_inode_initialise>
203f6e0: 94 12 a1 c9 or %o2, 0x1c9, %o2
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
203f6e4: ba 92 20 00 orcc %o0, 0, %i5
203f6e8: 24 80 00 0a ble,a 203f710 <rtems_rfs_format+0xd68> <== ALWAYS TAKEN
203f6ec: d0 07 bf f8 ld [ %fp + -8 ], %o0
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
203f6f0: 40 00 3a ce call 204e228 <strerror> <== NOT EXECUTED
203f6f4: 01 00 00 00 nop <== NOT EXECUTED
203f6f8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f6fc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f700: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f704: 40 00 31 33 call 204bbd0 <printf> <== NOT EXECUTED
203f708: 90 12 21 98 or %o0, 0x198, %o0 ! 206d598 <__FUNCTION__.7603+0x1b70><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
203f70c: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
203f710: d8 07 bf fc ld [ %fp + -4 ], %o4
203f714: 92 07 bf ac add %fp, -84, %o1
203f718: 96 10 20 01 mov 1, %o3
203f71c: 15 00 81 95 sethi %hi(0x2065400), %o2
203f720: 7f ff f2 6d call 203c0d4 <rtems_rfs_dir_add_entry>
203f724: 94 12 a3 b8 or %o2, 0x3b8, %o2 ! 20657b8 <rtems_bdpart_shell_usage+0xcf0>
if (rc > 0)
203f728: ba 92 20 00 orcc %o0, 0, %i5
203f72c: 24 80 00 0a ble,a 203f754 <rtems_rfs_format+0xdac> <== ALWAYS TAKEN
203f730: d0 07 bf f8 ld [ %fp + -8 ], %o0
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
203f734: 40 00 3a bd call 204e228 <strerror> <== NOT EXECUTED
203f738: 01 00 00 00 nop <== NOT EXECUTED
203f73c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f740: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f744: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f748: 40 00 31 22 call 204bbd0 <printf> <== NOT EXECUTED
203f74c: 90 12 21 d0 or %o0, 0x1d0, %o0 ! 206d5d0 <__FUNCTION__.7603+0x1ba8><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
203f750: d0 07 bf f8 ld [ %fp + -8 ], %o0 <== NOT EXECUTED
203f754: 40 00 03 12 call 204039c <rtems_rfs_inode_close>
203f758: 92 07 bf ac add %fp, -84, %o1
if (rc > 0)
203f75c: ba 92 20 00 orcc %o0, 0, %i5
203f760: 04 80 00 09 ble 203f784 <rtems_rfs_format+0xddc> <== ALWAYS TAKEN
203f764: 01 00 00 00 nop
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
203f768: 40 00 3a b0 call 204e228 <strerror> <== NOT EXECUTED
203f76c: 01 00 00 00 nop <== NOT EXECUTED
203f770: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f774: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f778: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f77c: 40 00 31 15 call 204bbd0 <printf> <== NOT EXECUTED
203f780: 90 12 22 08 or %o0, 0x208, %o0 ! 206d608 <__FUNCTION__.7603+0x1be0><== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
203f784: 7f ff fc 5c call 203e8f4 <rtems_rfs_fs_close>
203f788: d0 07 bf f8 ld [ %fp + -8 ], %o0
if (rc < 0)
203f78c: ba 92 20 00 orcc %o0, 0, %i5
203f790: 06 80 00 3c bl 203f880 <rtems_rfs_format+0xed8> <== NEVER TAKEN
203f794: 80 a7 60 00 cmp %i5, 0
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
203f798: 12 bf ff 5a bne 203f500 <rtems_rfs_format+0xb58> <== NEVER TAKEN
203f79c: b0 10 20 00 clr %i0
rc, strerror (rc));
return -1;
}
return 0;
}
203f7a0: 81 c7 e0 08 ret
203f7a4: 81 e8 00 00 restore
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
203f7a8: 40 00 3a a0 call 204e228 <strerror> <== NOT EXECUTED
203f7ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203f7b0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f7b4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f7b8: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203f7bc: 40 00 31 05 call 204bbd0 <printf> <== NOT EXECUTED
203f7c0: 90 12 22 68 or %o0, 0x268, %o0 ! 206ce68 <__FUNCTION__.7603+0x1440><== NOT EXECUTED
rc, strerror (rc));
return -1;
203f7c4: 81 c7 e0 08 ret <== NOT EXECUTED
203f7c8: 81 e8 00 00 restore <== NOT EXECUTED
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
if (rc > 0)
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
203f7cc: 40 00 3a 97 call 204e228 <strerror> <== NOT EXECUTED
203f7d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203f7d4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f7d8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f7dc: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f7e0: 40 00 30 fc call 204bbd0 <printf> <== NOT EXECUTED
203f7e4: 90 12 20 90 or %o0, 0x90, %o0 ! 206d490 <__FUNCTION__.7603+0x1a68><== NOT EXECUTED
rc, strerror (rc));
return -1;
203f7e8: 81 c7 e0 08 ret <== NOT EXECUTED
203f7ec: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
203f7f0: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
203f7f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
203f7f8: 40 00 30 f6 call 204bbd0 <printf> <== NOT EXECUTED
203f7fc: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
return -1;
203f800: 81 c7 e0 08 ret <== NOT EXECUTED
203f804: 81 e8 00 00 restore <== 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);
203f808: 90 07 bf 28 add %fp, -216, %o0
203f80c: 7f ff ee 7f call 203b208 <rtems_rfs_buffer_handle_release>
203f810: 92 07 bf ec add %fp, -20, %o1
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
203f814: c2 07 bf 4c ld [ %fp + -180 ], %g1
handle->dirty = false;
203f818: c0 2f bf ec clrb [ %fp + -20 ]
handle->bnum = 0;
203f81c: c0 27 bf f0 clr [ %fp + -16 ]
203f820: b6 06 e0 01 inc %i3
203f824: 80 a0 40 1b cmp %g1, %i3
203f828: 04 bf fe da ble 203f390 <rtems_rfs_format+0x9e8> <== ALWAYS TAKEN
203f82c: c0 27 bf f4 clr [ %fp + -12 ]
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
203f830: fa 07 bf 50 ld [ %fp + -176 ], %i5 <== NOT EXECUTED
203f834: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
203f838: 7f ff 0d aa call 2002ee0 <.umul> <== NOT EXECUTED
203f83c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
203f840: c2 07 bf 2c ld [ %fp + -212 ], %g1 <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
203f844: b8 02 20 01 add %o0, 1, %i4 <== NOT EXECUTED
203f848: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
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,
203f84c: e2 0e 60 14 ldub [ %i1 + 0x14 ], %l1 <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
203f850: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
203f854: 08 bf fe 4b bleu 203f180 <rtems_rfs_format+0x7d8> <== NOT EXECUTED
203f858: e4 0e 60 15 ldub [ %i1 + 0x15 ], %l2 <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
203f85c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203f860: 11 00 81 b4 sethi %hi(0x206d000), %o0 <== NOT EXECUTED
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
203f864: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
203f868: 40 00 30 da call 204bbd0 <printf> <== NOT EXECUTED
203f86c: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED
203f870: 81 c7 e0 08 ret <== NOT EXECUTED
203f874: 81 e8 00 00 restore <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
203f878: 10 bf ff f9 b 203f85c <rtems_rfs_format+0xeb4> <== NOT EXECUTED
203f87c: b6 10 20 00 clr %i3 <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
if (rc < 0)
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
203f880: 40 00 1e 9b call 20472ec <__errno> <== NOT EXECUTED
203f884: b0 10 20 00 clr %i0 <== NOT EXECUTED
203f888: 40 00 1e 99 call 20472ec <__errno> <== NOT EXECUTED
203f88c: fa 02 00 00 ld [ %o0 ], %i5 <== 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",
203f890: 40 00 3a 66 call 204e228 <strerror> <== NOT EXECUTED
203f894: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
203f898: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f89c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f8a0: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f8a4: 40 00 30 cb call 204bbd0 <printf> <== NOT EXECUTED
203f8a8: 90 12 22 38 or %o0, 0x238, %o0 ! 206d638 <__FUNCTION__.7603+0x1c10><== NOT EXECUTED
203f8ac: 81 c7 e0 08 ret <== NOT EXECUTED
203f8b0: 81 e8 00 00 restore <== NOT EXECUTED
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",
errno, strerror (errno));
203f8b4: 40 00 1e 8e call 20472ec <__errno> <== NOT EXECUTED
203f8b8: b0 10 20 00 clr %i0 <== NOT EXECUTED
203f8bc: 40 00 1e 8c call 20472ec <__errno> <== NOT EXECUTED
203f8c0: fa 02 00 00 ld [ %o0 ], %i5 <== 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",
203f8c4: 40 00 3a 59 call 204e228 <strerror> <== NOT EXECUTED
203f8c8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
203f8cc: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203f8d0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203f8d4: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f8d8: 40 00 30 be call 204bbd0 <printf> <== NOT EXECUTED
203f8dc: 90 12 20 c0 or %o0, 0xc0, %o0 ! 206d4c0 <__FUNCTION__.7603+0x1a98><== NOT EXECUTED
203f8e0: 81 c7 e0 08 ret <== NOT EXECUTED
203f8e4: 81 e8 00 00 restore <== NOT EXECUTED
}
if (fs->block_size < 512)
fs->block_size = 512;
if (fs->block_size > (4 * 1024))
203f8e8: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED
203f8ec: 10 bf fc 5a b 203ea54 <rtems_rfs_format+0xac> <== NOT EXECUTED
203f8f0: f8 00 60 24 ld [ %g1 + 0x24 ], %i4 <== NOT EXECUTED
0203e8f4 <rtems_rfs_fs_close>:
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
203e8f4: 9d e3 bf a0 save %sp, -96, %sp
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
203e8f8: 90 10 20 00 clr %o0
203e8fc: 92 10 20 02 mov 2, %o1
203e900: 7f ff 9e cb call 202642c <rtems_rfs_trace>
203e904: ba 10 00 18 mov %i0, %i5
203e908: 80 8a 20 ff btst 0xff, %o0
203e90c: 12 80 00 18 bne 203e96c <rtems_rfs_fs_close+0x78> <== NEVER TAKEN
203e910: 11 00 81 b3 sethi %hi(0x206cc00), %o0
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
203e914: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
203e918: 80 a0 60 00 cmp %g1, 0
203e91c: 04 80 00 0d ble 203e950 <rtems_rfs_fs_close+0x5c> <== NEVER TAKEN
203e920: 01 00 00 00 nop
203e924: b6 10 20 00 clr %i3 ! 0 <PROM_START>
203e928: b8 10 20 00 clr %i4
rtems_rfs_group_close (fs, &fs->groups[group]);
203e92c: d2 07 60 20 ld [ %i5 + 0x20 ], %o1
203e930: 90 10 00 1d mov %i5, %o0
203e934: 40 00 04 7d call 203fb28 <rtems_rfs_group_close>
203e938: 92 02 40 1b add %o1, %i3, %o1
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
203e93c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
203e940: b8 07 20 01 inc %i4
203e944: 80 a0 40 1c cmp %g1, %i4
203e948: 14 bf ff f9 bg 203e92c <rtems_rfs_fs_close+0x38> <== NEVER TAKEN
203e94c: b6 06 e0 50 add %i3, 0x50, %i3
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
203e950: 7f ff f4 50 call 203ba90 <rtems_rfs_buffer_close>
203e954: 90 10 00 1d mov %i5, %o0
free (fs);
return 0;
}
203e958: b0 10 20 00 clr %i0
for (group = 0; group < fs->group_count; group++)
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
free (fs);
203e95c: 7f ff 29 22 call 2008de4 <free>
203e960: 90 10 00 1d mov %i5, %o0
return 0;
}
203e964: 81 c7 e0 08 ret
203e968: 81 e8 00 00 restore
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
203e96c: 40 00 35 34 call 204be3c <puts> <== NOT EXECUTED
203e970: 90 12 22 38 or %o0, 0x238, %o0 <== NOT EXECUTED
for (group = 0; group < fs->group_count; group++)
203e974: 10 bf ff e9 b 203e918 <rtems_rfs_fs_close+0x24> <== NOT EXECUTED
203e978: c2 07 60 24 ld [ %i5 + 0x24 ], %g1 <== NOT EXECUTED
0203e038 <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)
{
203e038: 9d e3 bf 68 save %sp, -152, %sp
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e03c: 90 10 20 00 clr %o0
203e040: 7f ff a0 fb call 202642c <rtems_rfs_trace>
203e044: 92 10 20 01 mov 1, %o1
203e048: 80 8a 20 ff btst 0xff, %o0
203e04c: 12 80 00 7b bne 203e238 <rtems_rfs_fs_open+0x200> <== NEVER TAKEN
203e050: 92 10 00 18 mov %i0, %o1
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
203e054: 7f ff 2c ed call 2009408 <malloc>
203e058: 90 10 20 84 mov 0x84, %o0
if (!*fs)
203e05c: 80 a2 20 00 cmp %o0, 0
203e060: 02 80 01 69 be 203e604 <rtems_rfs_fs_open+0x5cc> <== NEVER TAKEN
203e064: d0 27 00 00 st %o0, [ %i4 ]
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
203e068: 92 10 20 00 clr %o1
203e06c: 40 00 32 6d call 204aa20 <memset>
203e070: 94 10 20 84 mov 0x84, %o2
(*fs)->user = user;
203e074: c2 07 00 00 ld [ %i4 ], %g1
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
203e078: 90 10 00 18 mov %i0, %o0
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
203e07c: f2 20 60 80 st %i1, [ %g1 + 0x80 ]
rtems_chain_initialize_empty (&(*fs)->buffers);
203e080: c2 07 00 00 ld [ %i4 ], %g1
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
203e084: c0 20 60 48 clr [ %g1 + 0x48 ]
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 );
203e088: 86 00 60 44 add %g1, 0x44, %g3
203e08c: 84 00 60 48 add %g1, 0x48, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
203e090: c6 20 60 4c st %g3, [ %g1 + 0x4c ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e094: c4 20 60 44 st %g2, [ %g1 + 0x44 ]
rtems_chain_initialize_empty (&(*fs)->release);
203e098: c2 07 00 00 ld [ %i4 ], %g1
head->previous = NULL;
203e09c: c0 20 60 58 clr [ %g1 + 0x58 ]
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 );
203e0a0: 86 00 60 54 add %g1, 0x54, %g3
203e0a4: 84 00 60 58 add %g1, 0x58, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
203e0a8: c6 20 60 5c st %g3, [ %g1 + 0x5c ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e0ac: c4 20 60 54 st %g2, [ %g1 + 0x54 ]
rtems_chain_initialize_empty (&(*fs)->release_modified);
203e0b0: c2 07 00 00 ld [ %i4 ], %g1
head->previous = NULL;
203e0b4: c0 20 60 68 clr [ %g1 + 0x68 ]
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 );
203e0b8: 86 00 60 64 add %g1, 0x64, %g3
203e0bc: 84 00 60 68 add %g1, 0x68, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
203e0c0: c6 20 60 6c st %g3, [ %g1 + 0x6c ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e0c4: c4 20 60 64 st %g2, [ %g1 + 0x64 ]
rtems_chain_initialize_empty (&(*fs)->file_shares);
203e0c8: c2 07 00 00 ld [ %i4 ], %g1
head->previous = NULL;
203e0cc: c0 20 60 78 clr [ %g1 + 0x78 ]
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 );
203e0d0: 86 00 60 74 add %g1, 0x74, %g3
203e0d4: 84 00 60 78 add %g1, 0x78, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
203e0d8: c6 20 60 7c st %g3, [ %g1 + 0x7c ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
203e0dc: c4 20 60 74 st %g2, [ %g1 + 0x74 ]
(*fs)->max_held_buffers = max_held_buffers;
203e0e0: d2 07 00 00 ld [ %i4 ], %o1
203e0e4: f6 22 60 40 st %i3, [ %o1 + 0x40 ]
(*fs)->buffers_count = 0;
203e0e8: c0 22 60 50 clr [ %o1 + 0x50 ]
(*fs)->release_count = 0;
203e0ec: c0 22 60 60 clr [ %o1 + 0x60 ]
(*fs)->release_modified_count = 0;
203e0f0: c0 22 60 70 clr [ %o1 + 0x70 ]
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
203e0f4: 7f ff f5 6b call 203b6a0 <rtems_rfs_buffer_open>
203e0f8: f4 22 40 00 st %i2, [ %o1 ]
if (rc > 0)
203e0fc: ba 92 20 00 orcc %o0, 0, %i5
203e100: 14 80 00 aa bg 203e3a8 <rtems_rfs_fs_open+0x370> <== NEVER TAKEN
203e104: 94 10 20 00 clr %o2
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
203e108: f2 07 00 00 ld [ %i4 ], %i1
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203e10c: c0 2f bf f4 clrb [ %fp + -12 ]
handle->bnum = 0;
203e110: c0 27 bf f8 clr [ %fp + -8 ]
handle->buffer = NULL;
203e114: c0 27 bf fc clr [ %fp + -4 ]
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);
203e118: 90 10 00 19 mov %i1, %o0
203e11c: 92 07 bf f4 add %fp, -12, %o1
203e120: 7f ff f4 b5 call 203b3f4 <rtems_rfs_buffer_handle_request>
203e124: 96 10 20 01 mov 1, %o3
if (rc > 0)
203e128: ba 92 20 00 orcc %o0, 0, %i5
203e12c: 04 80 00 16 ble 203e184 <rtems_rfs_fs_open+0x14c> <== ALWAYS TAKEN
203e130: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e134: 7f ff a0 be call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e138: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e13c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e140: 12 80 00 49 bne 203e264 <rtems_rfs_fs_open+0x22c> <== NOT EXECUTED
203e144: 01 00 00 00 nop <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
203e148: 7f ff f6 52 call 203ba90 <rtems_rfs_buffer_close> <== NOT EXECUTED
203e14c: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
203e150: 7f ff 2b 25 call 2008de4 <free> <== NOT EXECUTED
203e154: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e158: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e15c: 7f ff a0 b4 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e160: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e164: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e168: 12 80 00 2c bne 203e218 <rtems_rfs_fs_open+0x1e0> <== NOT EXECUTED
203e16c: 01 00 00 00 nop <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
free (*fs);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
203e170: 40 00 24 5f call 20472ec <__errno> <== NOT EXECUTED
203e174: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
203e178: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
return -1;
203e17c: 81 c7 e0 08 ret <== NOT EXECUTED
203e180: 81 e8 00 00 restore <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
203e184: c2 07 bf fc ld [ %fp + -4 ], %g1
203e188: f4 00 60 1c ld [ %g1 + 0x1c ], %i2
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
203e18c: c2 0e a0 02 ldub [ %i2 + 2 ], %g1
203e190: c4 0e 80 00 ldub [ %i2 ], %g2
203e194: c8 0e a0 01 ldub [ %i2 + 1 ], %g4
203e198: c6 0e a0 03 ldub [ %i2 + 3 ], %g3
203e19c: 83 28 60 08 sll %g1, 8, %g1
203e1a0: 85 28 a0 18 sll %g2, 0x18, %g2
203e1a4: 89 29 20 10 sll %g4, 0x10, %g4
203e1a8: 84 10 80 04 or %g2, %g4, %g2
203e1ac: 84 10 80 03 or %g2, %g3, %g2
203e1b0: 84 10 80 01 or %g2, %g1, %g2
203e1b4: 03 0a 02 48 sethi %hi(0x28092000), %g1
203e1b8: 82 10 60 01 or %g1, 1, %g1 ! 28092001 <RAM_END+0x25c92001>
203e1bc: 80 a0 80 01 cmp %g2, %g1
203e1c0: 22 80 00 31 be,a 203e284 <rtems_rfs_fs_open+0x24c> <== ALWAYS TAKEN
203e1c4: c6 0e a0 0d ldub [ %i2 + 0xd ], %g3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e1c8: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e1cc: 7f ff a0 98 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e1d0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e1d4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e1d8: 32 80 00 1c bne,a 203e248 <rtems_rfs_fs_open+0x210> <== NOT EXECUTED
203e1dc: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== 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);
203e1e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
203e1e4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
203e1e8: 7f ff f4 08 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203e1ec: ba 10 20 05 mov 5, %i5 <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
203e1f0: 7f ff f6 28 call 203ba90 <rtems_rfs_buffer_close> <== NOT EXECUTED
203e1f4: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
203e1f8: 7f ff 2a fb call 2008de4 <free> <== NOT EXECUTED
203e1fc: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e200: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e204: 7f ff a0 8a call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e208: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e20c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e210: 02 bf ff d8 be 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
203e214: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
203e218: 40 00 40 04 call 204e228 <strerror> <== NOT EXECUTED
203e21c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e220: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e224: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e228: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203e22c: 40 00 36 69 call 204bbd0 <printf> <== NOT EXECUTED
203e230: 90 12 21 78 or %o0, 0x178, %o0 ! 206cd78 <__FUNCTION__.7603+0x1350><== NOT EXECUTED
203e234: 30 bf ff cf b,a 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
203e238: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203e23c: 40 00 36 65 call 204bbd0 <printf> <== NOT EXECUTED
203e240: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 206caf8 <__FUNCTION__.7603+0x10d0><== NOT EXECUTED
203e244: 30 bf ff 84 b,a 203e054 <rtems_rfs_fs_open+0x1c> <== NOT EXECUTED
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
203e248: 40 00 36 fd call 204be3c <puts> <== NOT EXECUTED
203e24c: 90 12 23 a8 or %o0, 0x3a8, %o0 <== NOT EXECUTED
203e250: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
203e254: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
203e258: 7f ff f3 ec call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203e25c: ba 10 20 05 mov 5, %i5 <== NOT EXECUTED
203e260: 30 bf ff e4 b,a 203e1f0 <rtems_rfs_fs_open+0x1b8> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, true);
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
203e264: 40 00 3f f1 call 204e228 <strerror> <== NOT EXECUTED
203e268: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e26c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e270: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e274: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203e278: 40 00 36 56 call 204bbd0 <printf> <== NOT EXECUTED
203e27c: 90 12 23 70 or %o0, 0x370, %o0 ! 206cb70 <__FUNCTION__.7603+0x1148><== NOT EXECUTED
203e280: 30 bf ff b2 b,a 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
203e284: c2 0e a0 0e ldub [ %i2 + 0xe ], %g1
203e288: c4 0e a0 0f ldub [ %i2 + 0xf ], %g2
203e28c: d6 0e a0 0c ldub [ %i2 + 0xc ], %o3
203e290: 87 28 e0 10 sll %g3, 0x10, %g3
203e294: 83 28 60 08 sll %g1, 8, %g1
203e298: 97 2a e0 18 sll %o3, 0x18, %o3
203e29c: 96 12 c0 03 or %o3, %g3, %o3
203e2a0: 96 12 c0 02 or %o3, %g2, %o3
203e2a4: 96 12 c0 01 or %o3, %g1, %o3
203e2a8: d6 26 60 04 st %o3, [ %i1 + 4 ]
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
203e2ac: c6 0e a0 09 ldub [ %i2 + 9 ], %g3
203e2b0: c2 0e a0 0a ldub [ %i2 + 0xa ], %g1
203e2b4: c4 0e a0 0b ldub [ %i2 + 0xb ], %g2
203e2b8: f6 0e a0 08 ldub [ %i2 + 8 ], %i3
203e2bc: 87 28 e0 10 sll %g3, 0x10, %g3
203e2c0: 83 28 60 08 sll %g1, 8, %g1
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
203e2c4: f0 06 60 10 ld [ %i1 + 0x10 ], %i0
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;
203e2c8: 94 10 20 00 clr %o2
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);
203e2cc: b7 2e e0 18 sll %i3, 0x18, %i3
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;
203e2d0: 90 10 20 00 clr %o0
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);
203e2d4: b6 16 c0 03 or %i3, %g3, %i3
203e2d8: b6 16 c0 02 or %i3, %g2, %i3
203e2dc: b6 16 c0 01 or %i3, %g1, %i3
203e2e0: f6 26 60 08 st %i3, [ %i1 + 8 ]
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;
203e2e4: 40 00 8b 46 call 2060ffc <__muldi3>
203e2e8: 92 10 00 1b mov %i3, %o1
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;
203e2ec: d6 06 20 1c ld [ %i0 + 0x1c ], %o3
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;
203e2f0: a0 10 00 09 mov %o1, %l0
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;
203e2f4: d2 06 20 24 ld [ %i0 + 0x24 ], %o1
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;
203e2f8: ba 10 00 08 mov %o0, %i5
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;
203e2fc: 94 10 20 00 clr %o2
203e300: 40 00 8b 3f call 2060ffc <__muldi3>
203e304: 90 10 20 00 clr %o0
}
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))
203e308: 80 a7 40 08 cmp %i5, %o0
203e30c: 38 80 00 3a bgu,a 203e3f4 <rtems_rfs_fs_open+0x3bc> <== NEVER TAKEN
203e310: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e314: 02 80 00 35 be 203e3e8 <rtems_rfs_fs_open+0x3b0> <== ALWAYS TAKEN
203e318: 80 a4 00 09 cmp %l0, %o1
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)
203e31c: c2 0e a0 24 ldub [ %i2 + 0x24 ], %g1 <== NOT EXECUTED
203e320: c8 0e a0 25 ldub [ %i2 + 0x25 ], %g4
203e324: c6 0e a0 27 ldub [ %i2 + 0x27 ], %g3
203e328: c4 0e a0 26 ldub [ %i2 + 0x26 ], %g2
203e32c: 83 28 60 18 sll %g1, 0x18, %g1
203e330: 89 29 20 10 sll %g4, 0x10, %g4
203e334: 85 28 a0 08 sll %g2, 8, %g2
203e338: 82 10 40 04 or %g1, %g4, %g1
203e33c: 82 10 40 03 or %g1, %g3, %g1
203e340: 82 10 40 02 or %g1, %g2, %g1
203e344: 80 a0 60 38 cmp %g1, 0x38
203e348: 22 80 00 35 be,a 203e41c <rtems_rfs_fs_open+0x3e4> <== ALWAYS TAKEN
203e34c: c6 0e a0 13 ldub [ %i2 + 0x13 ], %g3
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e350: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e354: 7f ff a0 36 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e358: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e35c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e360: 22 bf ff a1 be,a 203e1e4 <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
203e364: 90 10 00 19 mov %i1, %o0 <== 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);
203e368: c6 0e a0 05 ldub [ %i2 + 5 ], %g3 <== NOT EXECUTED
203e36c: c2 0e a0 06 ldub [ %i2 + 6 ], %g1 <== NOT EXECUTED
203e370: d2 0e a0 04 ldub [ %i2 + 4 ], %o1 <== NOT EXECUTED
203e374: c4 0e a0 07 ldub [ %i2 + 7 ], %g2 <== NOT EXECUTED
203e378: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
203e37c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
203e380: 93 2a 60 18 sll %o1, 0x18, %o1 <== 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",
203e384: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
203e388: 92 12 40 03 or %o1, %g3, %o1 <== 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",
203e38c: 94 10 20 00 clr %o2 <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
203e390: 92 12 40 02 or %o1, %g2, %o1 <== 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",
203e394: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED
203e398: 40 00 36 0e call 204bbd0 <printf> <== NOT EXECUTED
203e39c: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
203e3a0: 10 bf ff 91 b 203e1e4 <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
203e3a4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
if (rc > 0)
{
free (*fs);
203e3a8: 7f ff 2a 8f call 2008de4 <free> <== NOT EXECUTED
203e3ac: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e3b0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e3b4: 7f ff a0 1e call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e3b8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e3bc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e3c0: 02 bf ff 6c be 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
203e3c4: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
203e3c8: 40 00 3f 98 call 204e228 <strerror> <== NOT EXECUTED
203e3cc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e3d0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e3d4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e3d8: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203e3dc: 40 00 35 fd call 204bbd0 <printf> <== NOT EXECUTED
203e3e0: 90 12 23 40 or %o0, 0x340, %o0 ! 206cb40 <__FUNCTION__.7603+0x1118><== NOT EXECUTED
203e3e4: 30 bf ff 63 b,a 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
}
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))
203e3e8: 28 bf ff ce bleu,a 203e320 <rtems_rfs_fs_open+0x2e8> <== ALWAYS TAKEN
203e3ec: c2 0e a0 24 ldub [ %i2 + 0x24 ], %g1
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e3f0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e3f4: 7f ff a0 0e call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e3f8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e3fc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e400: 22 bf ff 79 be,a 203e1e4 <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
203e404: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
203e408: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
203e40c: 40 00 36 8c call 204be3c <puts> <== NOT EXECUTED
203e410: 90 12 23 e8 or %o0, 0x3e8, %o0 ! 206cbe8 <__FUNCTION__.7603+0x11c0><== NOT EXECUTED
203e414: 10 bf ff 74 b 203e1e4 <rtems_rfs_fs_open+0x1ac> <== NOT EXECUTED
203e418: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
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);
203e41c: c2 0e a0 10 ldub [ %i2 + 0x10 ], %g1
203e420: c8 0e a0 11 ldub [ %i2 + 0x11 ], %g4
203e424: c4 0e a0 12 ldub [ %i2 + 0x12 ], %g2
203e428: 89 29 20 10 sll %g4, 0x10, %g4
203e42c: 85 28 a0 08 sll %g2, 8, %g2
203e430: 83 28 60 18 sll %g1, 0x18, %g1
203e434: 82 10 40 04 or %g1, %g4, %g1
203e438: 82 10 40 03 or %g1, %g3, %g1
203e43c: 82 10 40 02 or %g1, %g2, %g1
203e440: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
203e444: c6 0e a0 17 ldub [ %i2 + 0x17 ], %g3
203e448: c2 0e a0 14 ldub [ %i2 + 0x14 ], %g1
203e44c: c8 0e a0 15 ldub [ %i2 + 0x15 ], %g4
203e450: c4 0e a0 16 ldub [ %i2 + 0x16 ], %g2
203e454: 89 29 20 10 sll %g4, 0x10, %g4
203e458: 85 28 a0 08 sll %g2, 8, %g2
203e45c: 83 28 60 18 sll %g1, 0x18, %g1
203e460: 82 10 40 04 or %g1, %g4, %g1
203e464: 82 10 40 03 or %g1, %g3, %g1
203e468: 82 10 40 02 or %g1, %g2, %g1
203e46c: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
203e470: c6 0e a0 19 ldub [ %i2 + 0x19 ], %g3
203e474: c2 0e a0 1a ldub [ %i2 + 0x1a ], %g1
203e478: c4 0e a0 1b ldub [ %i2 + 0x1b ], %g2
203e47c: f0 0e a0 18 ldub [ %i2 + 0x18 ], %i0
203e480: 87 28 e0 10 sll %g3, 0x10, %g3
203e484: 83 28 60 08 sll %g1, 8, %g1
203e488: b1 2e 20 18 sll %i0, 0x18, %i0
203e48c: b0 16 00 03 or %i0, %g3, %i0
203e490: b0 16 00 02 or %i0, %g2, %i0
203e494: b0 16 00 01 or %i0, %g1, %i0
203e498: f0 26 60 24 st %i0, [ %i1 + 0x24 ]
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
203e49c: c4 0e a0 1f ldub [ %i2 + 0x1f ], %g2
203e4a0: fa 0e a0 1c ldub [ %i2 + 0x1c ], %i5
203e4a4: c6 0e a0 1d ldub [ %i2 + 0x1d ], %g3
203e4a8: c2 0e a0 1e ldub [ %i2 + 0x1e ], %g1
203e4ac: 87 28 e0 10 sll %g3, 0x10, %g3
203e4b0: 83 28 60 08 sll %g1, 8, %g1
203e4b4: bb 2f 60 18 sll %i5, 0x18, %i5
203e4b8: ba 17 40 03 or %i5, %g3, %i5
203e4bc: ba 17 40 02 or %i5, %g2, %i5
203e4c0: ba 17 40 01 or %i5, %g1, %i5
203e4c4: fa 26 60 28 st %i5, [ %i1 + 0x28 ]
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
203e4c8: c4 0e a0 21 ldub [ %i2 + 0x21 ], %g2
203e4cc: de 0e a0 20 ldub [ %i2 + 0x20 ], %o7
203e4d0: c6 0e a0 22 ldub [ %i2 + 0x22 ], %g3
203e4d4: c8 0e a0 23 ldub [ %i2 + 0x23 ], %g4
203e4d8: 85 28 a0 10 sll %g2, 0x10, %g2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
203e4dc: 83 36 e0 02 srl %i3, 2, %g1
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);
203e4e0: b5 2b e0 18 sll %o7, 0x18, %i2
203e4e4: 87 28 e0 08 sll %g3, 8, %g3
203e4e8: b4 16 80 02 or %i2, %g2, %i2
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;
203e4ec: 85 28 60 02 sll %g1, 2, %g2
203e4f0: 84 00 80 01 add %g2, %g1, %g2
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);
203e4f4: b4 16 80 04 or %i2, %g4, %i2
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;
203e4f8: 92 10 00 01 mov %g1, %o1
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);
203e4fc: b4 16 80 03 or %i2, %g3, %i2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
203e500: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
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;
203e504: 90 10 00 01 mov %g1, %o0
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 =
203e508: c2 26 60 34 st %g1, [ %i1 + 0x34 ]
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;
203e50c: 7f ff 12 75 call 2002ee0 <.umul>
203e510: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
203e514: 83 2a 20 02 sll %o0, 2, %g1
203e518: 82 00 40 08 add %g1, %o0, %g1
fs->inodes = fs->group_count * fs->group_inodes;
203e51c: 92 10 00 18 mov %i0, %o1
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 =
203e520: c2 26 60 3c st %g1, [ %i1 + 0x3c ]
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
203e524: 7f ff 12 6f call 2002ee0 <.umul>
203e528: 90 10 00 1a mov %i2, %o0
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
203e52c: 92 10 20 38 mov 0x38, %o1
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;
fs->inodes = fs->group_count * fs->group_inodes;
203e530: d0 26 60 14 st %o0, [ %i1 + 0x14 ]
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
203e534: 40 00 89 5a call 2060a9c <.udiv>
203e538: 90 10 00 1b mov %i3, %o0
203e53c: d0 26 60 30 st %o0, [ %i1 + 0x30 ]
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
203e540: b7 2e e0 03 sll %i3, 3, %i3
203e544: 92 07 bf f4 add %fp, -12, %o1
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
if (fs->group_blocks >
203e548: 80 a7 40 1b cmp %i5, %i3
203e54c: 08 80 00 10 bleu 203e58c <rtems_rfs_fs_open+0x554> <== ALWAYS TAKEN
203e550: 90 10 00 19 mov %i1, %o0
203e554: 7f ff f3 2d call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203e558: ba 10 20 05 mov 5, %i5 <== NOT EXECUTED
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))
203e55c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e560: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
203e564: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
203e568: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
203e56c: 7f ff 9f b0 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e570: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
203e574: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e578: 02 bf fe f4 be 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
203e57c: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
203e580: 40 00 36 2f call 204be3c <puts> <== NOT EXECUTED
203e584: 90 12 20 70 or %o0, 0x70, %o0 ! 206cc70 <__FUNCTION__.7603+0x1248><== NOT EXECUTED
203e588: 30 bf fe f0 b,a 203e148 <rtems_rfs_fs_open+0x110> <== 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);
203e58c: 7f ff f3 1f call 203b208 <rtems_rfs_buffer_handle_release>
203e590: 01 00 00 00 nop
rtems_rfs_buffer_handle_close (fs, &handle);
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
203e594: d2 06 60 08 ld [ %i1 + 8 ], %o1
handle->dirty = false;
203e598: c0 2f bf f4 clrb [ %fp + -12 ]
handle->bnum = 0;
203e59c: c0 27 bf f8 clr [ %fp + -8 ]
handle->buffer = NULL;
203e5a0: c0 27 bf fc clr [ %fp + -4 ]
203e5a4: 7f ff f4 f2 call 203b96c <rtems_rfs_buffer_setblksize>
203e5a8: 90 10 00 19 mov %i1, %o0
if (rc > 0)
203e5ac: ba 92 20 00 orcc %o0, 0, %i5
203e5b0: 04 80 00 23 ble 203e63c <rtems_rfs_fs_open+0x604> <== ALWAYS TAKEN
203e5b4: 92 07 bf f4 add %fp, -12, %o1
*/
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);
203e5b8: 7f ff f3 14 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203e5bc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e5c0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e5c4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
203e5c8: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
203e5cc: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
203e5d0: 7f ff 9f 97 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e5d4: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
203e5d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e5dc: 02 bf fe db be 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
203e5e0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
203e5e4: 40 00 3f 11 call 204e228 <strerror> <== NOT EXECUTED
203e5e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e5ec: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e5f0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e5f4: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203e5f8: 40 00 35 76 call 204bbd0 <printf> <== NOT EXECUTED
203e5fc: 90 12 20 b8 or %o0, 0xb8, %o0 ! 206ccb8 <__FUNCTION__.7603+0x1290><== NOT EXECUTED
203e600: 30 bf fe d2 b,a 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
if (!*fs)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e604: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e608: 7f ff 9f 89 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e60c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e610: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e614: 02 80 00 04 be 203e624 <rtems_rfs_fs_open+0x5ec> <== NOT EXECUTED
203e618: 11 00 81 b2 sethi %hi(0x206c800), %o0 <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
203e61c: 40 00 36 08 call 204be3c <puts> <== NOT EXECUTED
203e620: 90 12 23 10 or %o0, 0x310, %o0 ! 206cb10 <__FUNCTION__.7603+0x10e8><== NOT EXECUTED
errno = ENOMEM;
203e624: 40 00 23 32 call 20472ec <__errno> <== NOT EXECUTED
203e628: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203e62c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
203e630: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
203e634: 81 c7 e0 08 ret <== NOT EXECUTED
203e638: 81 e8 00 00 restore <== NOT EXECUTED
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));
203e63c: fa 06 60 24 ld [ %i1 + 0x24 ], %i5
203e640: 92 10 20 50 mov 0x50, %o1
203e644: 7f ff 29 09 call 2008a68 <calloc>
203e648: 90 10 00 1d mov %i5, %o0
203e64c: d0 26 60 20 st %o0, [ %i1 + 0x20 ]
if (!fs->groups)
203e650: 80 a2 20 00 cmp %o0, 0
203e654: 02 80 00 98 be 203e8b4 <rtems_rfs_fs_open+0x87c> <== NEVER TAKEN
203e658: b6 10 00 08 mov %o0, %i3
/*
* 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++)
203e65c: 80 a7 60 00 cmp %i5, 0
203e660: 04 80 00 38 ble 203e740 <rtems_rfs_fs_open+0x708> <== NEVER TAKEN
203e664: b0 10 20 00 clr %i0
if (!fs->groups)
{
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: no memory for group table\n");
203e668: fa 06 60 28 ld [ %i1 + 0x28 ], %i5
/*
* 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++)
203e66c: 10 80 00 08 b 203e68c <rtems_rfs_fs_open+0x654>
203e670: b4 10 20 00 clr %i2
203e674: b4 06 a0 01 inc %i2
203e678: 80 a6 80 01 cmp %i2, %g1
203e67c: 16 80 00 31 bge 203e740 <rtems_rfs_fs_open+0x708> <== ALWAYS TAKEN
203e680: b0 06 20 50 add %i0, 0x50, %i0
203e684: fa 06 60 28 ld [ %i1 + 0x28 ], %i5 <== NOT EXECUTED
203e688: f6 06 60 20 ld [ %i1 + 0x20 ], %i3 <== NOT EXECUTED
{
rc = rtems_rfs_group_open (fs,
rtems_rfs_fs_block (fs, group, 0),
203e68c: 92 10 00 1d mov %i5, %o1
203e690: 7f ff 12 14 call 2002ee0 <.umul>
203e694: 90 10 00 1a mov %i2, %o0
* 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,
203e698: d6 06 60 2c ld [ %i1 + 0x2c ], %o3
rtems_rfs_fs_block (fs, group, 0),
203e69c: 92 02 20 01 add %o0, 1, %o1
* 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,
203e6a0: 94 10 00 1d mov %i5, %o2
203e6a4: 98 06 c0 18 add %i3, %i0, %o4
203e6a8: 40 00 04 93 call 203f8f4 <rtems_rfs_group_open>
203e6ac: 90 10 00 19 mov %i1, %o0
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
203e6b0: ba 92 20 00 orcc %o0, 0, %i5
203e6b4: 24 bf ff f0 ble,a 203e674 <rtems_rfs_fs_open+0x63c> <== ALWAYS TAKEN
203e6b8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
{
int g;
for (g = 0; g < group; g++)
203e6bc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203e6c0: 22 80 00 0d be,a 203e6f4 <rtems_rfs_fs_open+0x6bc> <== NOT EXECUTED
203e6c4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
203e6c8: b0 10 20 00 clr %i0 <== NOT EXECUTED
203e6cc: b6 10 20 00 clr %i3 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
203e6d0: d2 06 60 20 ld [ %i1 + 0x20 ], %o1 <== NOT EXECUTED
203e6d4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
203e6d8: 40 00 05 14 call 203fb28 <rtems_rfs_group_close> <== NOT EXECUTED
203e6dc: 92 02 40 18 add %o1, %i0, %o1 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
203e6e0: b6 06 e0 01 inc %i3 <== NOT EXECUTED
203e6e4: 80 a6 c0 1a cmp %i3, %i2 <== NOT EXECUTED
203e6e8: 12 bf ff fa bne 203e6d0 <rtems_rfs_fs_open+0x698> <== NOT EXECUTED
203e6ec: b0 06 20 50 add %i0, 0x50, %i0 <== 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);
203e6f0: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
203e6f4: 7f ff f2 c5 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203e6f8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e6fc: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e700: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
203e704: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
203e708: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
203e70c: 7f ff 9f 48 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e710: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
203e714: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e718: 02 bf fe 8c be 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
203e71c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
203e720: 40 00 3e c2 call 204e228 <strerror> <== NOT EXECUTED
203e724: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e728: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e72c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e730: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203e734: 40 00 35 27 call 204bbd0 <printf> <== NOT EXECUTED
203e738: 90 12 21 38 or %o0, 0x138, %o0 ! 206cd38 <__FUNCTION__.7603+0x1310><== NOT EXECUTED
203e73c: 30 bf fe 83 b,a 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
203e740: d0 07 00 00 ld [ %i4 ], %o0
203e744: 92 10 20 01 mov 1, %o1
203e748: 94 07 bf cc add %fp, -52, %o2
203e74c: 40 00 06 9d call 20401c0 <rtems_rfs_inode_open>
203e750: 96 10 20 01 mov 1, %o3
if (rc > 0)
203e754: ba 92 20 00 orcc %o0, 0, %i5
203e758: 14 80 00 45 bg 203e86c <rtems_rfs_fs_open+0x834> <== NEVER TAKEN
203e75c: 01 00 00 00 nop
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
203e760: d0 07 00 00 ld [ %i4 ], %o0
203e764: c2 02 00 00 ld [ %o0 ], %g1
203e768: 80 88 60 04 btst 4, %g1
203e76c: 12 80 00 10 bne 203e7ac <rtems_rfs_fs_open+0x774>
203e770: c2 07 bf d8 ld [ %fp + -40 ], %g1
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
203e774: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @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);
203e778: c6 08 60 02 ldub [ %g1 + 2 ], %g3
203e77c: 83 28 e0 08 sll %g3, 8, %g1
203e780: 82 10 80 01 or %g2, %g1, %g1
203e784: 05 00 00 3f sethi %hi(0xfc00), %g2
203e788: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
203e78c: 80 a0 40 02 cmp %g1, %g2
203e790: 02 80 00 23 be 203e81c <rtems_rfs_fs_open+0x7e4> <== NEVER TAKEN
203e794: 05 00 00 3c sethi %hi(0xf000), %g2
203e798: 82 08 40 02 and %g1, %g2, %g1
203e79c: 05 00 00 10 sethi %hi(0x4000), %g2
203e7a0: 80 a0 40 02 cmp %g1, %g2
203e7a4: 12 80 00 1e bne 203e81c <rtems_rfs_fs_open+0x7e4> <== NEVER TAKEN
203e7a8: 01 00 00 00 nop
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
203e7ac: 40 00 06 fc call 204039c <rtems_rfs_inode_close>
203e7b0: 92 07 bf cc add %fp, -52, %o1
if (rc > 0)
203e7b4: ba 92 20 00 orcc %o0, 0, %i5
203e7b8: 14 80 00 07 bg 203e7d4 <rtems_rfs_fs_open+0x79c> <== NEVER TAKEN
203e7bc: 01 00 00 00 nop
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
203e7c0: 40 00 22 cb call 20472ec <__errno>
203e7c4: b0 10 20 00 clr %i0 ! 0 <PROM_START>
203e7c8: c0 22 00 00 clr [ %o0 ]
return 0;
}
203e7cc: 81 c7 e0 08 ret
203e7d0: 81 e8 00 00 restore
}
rc = rtems_rfs_inode_close (*fs, &inode);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
203e7d4: 7f ff f4 af call 203ba90 <rtems_rfs_buffer_close> <== NOT EXECUTED
203e7d8: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
203e7dc: 7f ff 29 82 call 2008de4 <free> <== NOT EXECUTED
203e7e0: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e7e4: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e7e8: 7f ff 9f 11 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e7ec: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e7f0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e7f4: 02 bf fe 5f be 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
203e7f8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
203e7fc: 40 00 3e 8b call 204e228 <strerror> <== NOT EXECUTED
203e800: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e804: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e808: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e80c: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203e810: 40 00 34 f0 call 204bbd0 <printf> <== NOT EXECUTED
203e814: 90 12 22 08 or %o0, 0x208, %o0 ! 206ce08 <__FUNCTION__.7603+0x13e0><== NOT EXECUTED
203e818: 30 bf fe 56 b,a 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
{
rtems_rfs_inode_close (*fs, &inode);
203e81c: 40 00 06 e0 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
203e820: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
203e824: 7f ff f4 9b call 203ba90 <rtems_rfs_buffer_close> <== NOT EXECUTED
203e828: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
203e82c: 7f ff 29 6e call 2008de4 <free> <== NOT EXECUTED
203e830: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e834: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e838: 7f ff 9e fd call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e83c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e840: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e844: 02 80 00 04 be 203e854 <rtems_rfs_fs_open+0x81c> <== NOT EXECUTED
203e848: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
203e84c: 40 00 35 7c call 204be3c <puts> <== NOT EXECUTED
203e850: 90 12 21 d8 or %o0, 0x1d8, %o0 ! 206cdd8 <__FUNCTION__.7603+0x13b0><== NOT EXECUTED
errno = EIO;
203e854: 40 00 22 a6 call 20472ec <__errno> <== NOT EXECUTED
203e858: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
203e85c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
203e860: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return -1;
203e864: 81 c7 e0 08 ret <== NOT EXECUTED
203e868: 81 e8 00 00 restore <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
203e86c: 7f ff f4 89 call 203ba90 <rtems_rfs_buffer_close> <== NOT EXECUTED
203e870: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
free (*fs);
203e874: 7f ff 29 5c call 2008de4 <free> <== NOT EXECUTED
203e878: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
203e87c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e880: 7f ff 9e eb call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e884: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
203e888: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e88c: 02 bf fe 39 be 203e170 <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
203e890: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
203e894: 40 00 3e 65 call 204e228 <strerror> <== NOT EXECUTED
203e898: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
203e89c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
203e8a0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203e8a4: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
203e8a8: 40 00 34 ca call 204bbd0 <printf> <== NOT EXECUTED
203e8ac: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 206cda8 <__FUNCTION__.7603+0x1380><== NOT EXECUTED
203e8b0: 30 bf fe 30 b,a 203e170 <rtems_rfs_fs_open+0x138> <== 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);
203e8b4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
203e8b8: 7f ff f2 54 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203e8bc: 90 10 00 19 mov %i1, %o0 <== 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))
203e8c0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203e8c4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
handle->dirty = false;
203e8c8: c0 2f bf f4 clrb [ %fp + -12 ] <== NOT EXECUTED
handle->bnum = 0;
203e8cc: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
handle->buffer = NULL;
203e8d0: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
203e8d4: 7f ff 9e d6 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203e8d8: ba 10 20 0c mov 0xc, %i5 <== NOT EXECUTED
203e8dc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203e8e0: 02 bf fe 1a be 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
203e8e4: 11 00 81 b3 sethi %hi(0x206cc00), %o0 <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
203e8e8: 40 00 35 55 call 204be3c <puts> <== NOT EXECUTED
203e8ec: 90 12 21 00 or %o0, 0x100, %o0 ! 206cd00 <__FUNCTION__.7603+0x12d8><== NOT EXECUTED
203e8f0: 30 bf fe 16 b,a 203e148 <rtems_rfs_fs_open+0x110> <== NOT EXECUTED
0203dfec <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-inode.h>
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
203dfec: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
203dff0: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED
203dff4: d6 06 20 04 ld [ %i0 + 4 ], %o3 <== NOT EXECUTED
203dff8: 94 10 20 00 clr %o2 <== NOT EXECUTED
203dffc: 40 00 8c 00 call 2060ffc <__muldi3> <== NOT EXECUTED
203e000: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
203e004: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
203e008: 81 c7 e0 08 ret <== NOT EXECUTED
203e00c: 93 e8 00 09 restore %g0, %o1, %o1 <== NOT EXECUTED
0203fbd4 <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)
{
203fbd4: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
203fbd8: 80 a6 a0 00 cmp %i2, 0
203fbdc: 02 80 00 62 be 203fd64 <rtems_rfs_group_bitmap_alloc+0x190>
203fbe0: ba 10 00 18 mov %i0, %i5
{
size = fs->group_inodes;
203fbe4: e8 06 20 2c ld [ %i0 + 0x2c ], %l4
goal -= RTEMS_RFS_ROOT_INO;
203fbe8: b2 06 7f ff add %i1, -1, %i1
}
else
size = fs->group_blocks;
group_start = goal / size;
203fbec: 90 10 00 19 mov %i1, %o0
203fbf0: 40 00 83 ab call 2060a9c <.udiv>
203fbf4: 92 10 00 14 mov %l4, %o1
bit = (rtems_rfs_bitmap_bit) (goal % size);
203fbf8: 92 10 00 14 mov %l4, %o1
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
203fbfc: a4 10 00 08 mov %o0, %l2
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
direction = 1;
203fc00: a0 10 20 01 mov 1, %l0
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
203fc04: 90 10 00 19 mov %i1, %o0
203fc08: 40 00 84 51 call 2060d4c <.urem>
203fc0c: b8 10 00 12 mov %l2, %i4
offset = 0;
updown = true;
203fc10: a2 10 20 01 mov 1, %l1
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
203fc14: d0 27 bf f8 st %o0, [ %fp + -8 ]
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
203fc18: c0 2f bf ff clrb [ %fp + -1 ]
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
203fc1c: b2 10 20 00 clr %i1
/*
* 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))
203fc20: 80 a7 20 00 cmp %i4, 0
203fc24: 06 80 00 30 bl 203fce4 <rtems_rfs_group_bitmap_alloc+0x110><== NEVER TAKEN
203fc28: 80 8c 60 ff btst 0xff, %l1
203fc2c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
203fc30: 80 a0 40 1c cmp %g1, %i4
203fc34: 04 80 00 2c ble 203fce4 <rtems_rfs_group_bitmap_alloc+0x110>
203fc38: 80 8c 60 ff btst 0xff, %l1
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
203fc3c: e6 07 60 20 ld [ %i5 + 0x20 ], %l3
203fc40: ad 2f 20 04 sll %i4, 4, %l6
203fc44: ab 2f 20 06 sll %i4, 6, %l5
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
203fc48: 80 a6 a0 00 cmp %i2, 0
bitmap = &fs->groups[group].inode_bitmap;
203fc4c: 82 05 80 15 add %l6, %l5, %g1
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
203fc50: 02 80 00 43 be 203fd5c <rtems_rfs_group_bitmap_alloc+0x188>
203fc54: a6 04 c0 01 add %l3, %g1, %l3
bitmap = &fs->groups[group].inode_bitmap;
203fc58: a6 04 e0 2c add %l3, 0x2c, %l3
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
203fc5c: d2 07 bf f8 ld [ %fp + -8 ], %o1
203fc60: 90 10 00 13 mov %l3, %o0
203fc64: 94 07 bf ff add %fp, -1, %o2
203fc68: 40 00 1b 55 call 20469bc <rtems_rfs_bitmap_map_alloc>
203fc6c: 96 07 bf f8 add %fp, -8, %o3
if (rc > 0)
203fc70: b0 92 20 00 orcc %o0, 0, %i0
203fc74: 14 80 00 5c bg 203fde4 <rtems_rfs_group_bitmap_alloc+0x210><== NEVER TAKEN
203fc78: 01 00 00 00 nop
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
203fc7c: c2 07 40 00 ld [ %i5 ], %g1
203fc80: 80 88 60 01 btst 1, %g1
203fc84: 22 80 00 3a be,a 203fd6c <rtems_rfs_group_bitmap_alloc+0x198><== ALWAYS TAKEN
203fc88: d2 04 c0 00 ld [ %l3 ], %o1
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
203fc8c: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
203fc90: 80 a0 60 00 cmp %g1, 0
203fc94: 12 80 00 3a bne 203fd7c <rtems_rfs_group_bitmap_alloc+0x1a8>
203fc98: 80 8c 60 ff btst 0xff, %l1
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
203fc9c: 02 80 00 06 be 203fcb4 <rtems_rfs_group_bitmap_alloc+0xe0><== NEVER TAKEN
203fca0: b2 06 60 01 inc %i1
direction = direction > 0 ? -1 : 1;
203fca4: a0 1c 20 01 xor %l0, 1, %l0
203fca8: 80 a0 00 10 cmp %g0, %l0
203fcac: a0 40 3f ff addx %g0, -1, %l0
203fcb0: a0 14 20 01 or %l0, 1, %l0
/*
* 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);
203fcb4: 90 10 00 10 mov %l0, %o0
203fcb8: 7f ff 0c 8a call 2002ee0 <.umul>
203fcbc: 92 10 00 19 mov %i1, %o1
if (offset)
bit = direction > 0 ? 0 : size - 1;
203fcc0: 82 10 20 00 clr %g1
203fcc4: 80 a4 20 01 cmp %l0, 1
203fcc8: 12 80 00 17 bne 203fd24 <rtems_rfs_group_bitmap_alloc+0x150><== ALWAYS TAKEN
203fccc: b8 02 00 12 add %o0, %l2, %i4
203fcd0: c2 27 bf f8 st %g1, [ %fp + -8 ]
/*
* 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))
203fcd4: 80 a7 20 00 cmp %i4, 0
203fcd8: 36 bf ff d6 bge,a 203fc30 <rtems_rfs_group_bitmap_alloc+0x5c>
203fcdc: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
{
if (!updown)
203fce0: 80 8c 60 ff btst 0xff, %l1
203fce4: 02 80 00 13 be 203fd30 <rtems_rfs_group_bitmap_alloc+0x15c>
203fce8: a0 1c 20 01 xor %l0, 1, %l0
break;
direction = direction > 0 ? -1 : 1;
203fcec: 80 a0 00 10 cmp %g0, %l0
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
203fcf0: c0 2f bf ff clrb [ %fp + -1 ]
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
203fcf4: a0 40 3f ff addx %g0, -1, %l0
/*
* 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);
203fcf8: 92 10 00 19 mov %i1, %o1
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
203fcfc: a0 14 20 01 or %l0, 1, %l0
/*
* 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);
203fd00: 7f ff 0c 78 call 2002ee0 <.umul>
203fd04: 90 10 00 10 mov %l0, %o0
if (offset)
203fd08: a2 10 20 00 clr %l1
203fd0c: 80 a6 60 00 cmp %i1, 0
203fd10: 02 bf ff c4 be 203fc20 <rtems_rfs_group_bitmap_alloc+0x4c><== NEVER TAKEN
203fd14: b8 02 00 12 add %o0, %l2, %i4
bit = direction > 0 ? 0 : size - 1;
203fd18: 80 a4 20 01 cmp %l0, 1
203fd1c: 02 bf ff ed be 203fcd0 <rtems_rfs_group_bitmap_alloc+0xfc><== ALWAYS TAKEN
203fd20: 82 10 20 00 clr %g1
203fd24: 82 05 3f ff add %l4, -1, %g1
203fd28: 10 bf ff eb b 203fcd4 <rtems_rfs_group_bitmap_alloc+0x100>
203fd2c: c2 27 bf f8 st %g1, [ %fp + -8 ]
direction = direction > 0 ? -1 : 1;
offset++;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
203fd30: 90 10 20 00 clr %o0
203fd34: 13 00 00 80 sethi %hi(0x20000), %o1
203fd38: 7f ff 99 bd call 202642c <rtems_rfs_trace>
203fd3c: b0 10 20 1c mov 0x1c, %i0
203fd40: 80 8a 20 ff btst 0xff, %o0
203fd44: 02 80 00 04 be 203fd54 <rtems_rfs_group_bitmap_alloc+0x180><== ALWAYS TAKEN
203fd48: 11 00 81 b6 sethi %hi(0x206d800), %o0
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
203fd4c: 40 00 30 3c call 204be3c <puts> <== NOT EXECUTED
203fd50: 90 12 20 00 mov %o0, %o0 ! 206d800 <__FUNCTION__.7603+0x1dd8><== NOT EXECUTED
return ENOSPC;
}
203fd54: 81 c7 e0 08 ret
203fd58: 81 e8 00 00 restore
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
203fd5c: 10 bf ff c0 b 203fc5c <rtems_rfs_group_bitmap_alloc+0x88>
203fd60: a6 04 e0 08 add %l3, 8, %l3
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
203fd64: 10 bf ff a2 b 203fbec <rtems_rfs_group_bitmap_alloc+0x18>
203fd68: e8 06 20 28 ld [ %i0 + 0x28 ], %l4
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
if (rc > 0)
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203fd6c: 7f ff ed 27 call 203b208 <rtems_rfs_buffer_handle_release>
203fd70: 90 10 00 1d mov %i5, %o0
if (allocated)
203fd74: 10 bf ff c7 b 203fc90 <rtems_rfs_group_bitmap_alloc+0xbc>
203fd78: c2 0f bf ff ldub [ %fp + -1 ], %g1
{
if (inode)
203fd7c: 80 a6 a0 00 cmp %i2, 0
203fd80: 32 80 00 1b bne,a 203fdec <rtems_rfs_group_bitmap_alloc+0x218>
203fd84: d2 07 60 2c ld [ %i5 + 0x2c ], %o1
*result = rtems_rfs_group_inode (fs, group, bit);
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
203fd88: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
203fd8c: aa 05 80 15 add %l6, %l5, %l5
203fd90: c4 07 bf f8 ld [ %fp + -8 ], %g2
203fd94: c2 00 40 15 ld [ %g1 + %l5 ], %g1
203fd98: 82 00 80 01 add %g2, %g1, %g1
203fd9c: c2 26 c0 00 st %g1, [ %i3 ]
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
203fda0: 90 10 20 00 clr %o0
203fda4: 13 00 00 80 sethi %hi(0x20000), %o1
203fda8: 7f ff 99 a1 call 202642c <rtems_rfs_trace>
203fdac: b0 10 20 00 clr %i0
203fdb0: 80 8a 20 ff btst 0xff, %o0
203fdb4: 02 bf ff e8 be 203fd54 <rtems_rfs_group_bitmap_alloc+0x180><== ALWAYS TAKEN
203fdb8: 13 00 81 a0 sethi %hi(0x2068000), %o1
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
203fdbc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203fdc0: 02 80 00 04 be 203fdd0 <rtems_rfs_group_bitmap_alloc+0x1fc><== NOT EXECUTED
203fdc4: 92 12 61 b8 or %o1, 0x1b8, %o1 <== NOT EXECUTED
203fdc8: 13 00 81 a0 sethi %hi(0x2068000), %o1 <== NOT EXECUTED
203fdcc: 92 12 62 c8 or %o1, 0x2c8, %o1 ! 20682c8 <rtems_rfs_rtems_eval_config+0x920><== NOT EXECUTED
203fdd0: d4 06 c0 00 ld [ %i3 ], %o2 <== NOT EXECUTED
203fdd4: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
203fdd8: b0 10 20 00 clr %i0 <== NOT EXECUTED
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))
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
203fddc: 40 00 2f 7d call 204bbd0 <printf> <== NOT EXECUTED
203fde0: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED
203fde4: 81 c7 e0 08 ret <== NOT EXECUTED
203fde8: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
if (allocated)
{
if (inode)
*result = rtems_rfs_group_inode (fs, group, bit);
203fdec: fa 07 bf f8 ld [ %fp + -8 ], %i5
203fdf0: 90 10 00 1c mov %i4, %o0
203fdf4: 7f ff 0c 3b call 2002ee0 <.umul>
203fdf8: ba 07 60 01 inc %i5
203fdfc: ba 07 40 08 add %i5, %o0, %i5
203fe00: 10 bf ff e8 b 203fda0 <rtems_rfs_group_bitmap_alloc+0x1cc>
203fe04: fa 26 c0 00 st %i5, [ %i3 ]
0203fe08 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
203fe08: 9d e3 bf a0 save %sp, -96, %sp
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
203fe0c: 90 10 20 00 clr %o0
203fe10: 13 00 00 80 sethi %hi(0x20000), %o1
203fe14: 7f ff 99 86 call 202642c <rtems_rfs_trace>
203fe18: ba 10 00 18 mov %i0, %i5
203fe1c: 80 8a 20 ff btst 0xff, %o0
203fe20: 02 80 00 0a be 203fe48 <rtems_rfs_group_bitmap_free+0x40> <== ALWAYS TAKEN
203fe24: 80 a6 60 00 cmp %i1, 0
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
203fe28: 13 00 81 a0 sethi %hi(0x2068000), %o1 <== NOT EXECUTED
203fe2c: 12 80 00 38 bne 203ff0c <rtems_rfs_group_bitmap_free+0x104><== NOT EXECUTED
203fe30: 92 12 61 b8 or %o1, 0x1b8, %o1 ! 20681b8 <rtems_rfs_rtems_eval_config+0x810><== NOT EXECUTED
203fe34: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
203fe38: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203fe3c: 40 00 2f 65 call 204bbd0 <printf> <== NOT EXECUTED
203fe40: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
203fe44: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
203fe48: 22 80 00 1a be,a 203feb0 <rtems_rfs_group_bitmap_free+0xa8>
203fe4c: f0 07 60 28 ld [ %i5 + 0x28 ], %i0
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
203fe50: f0 07 60 2c ld [ %i5 + 0x2c ], %i0
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
{
no -= RTEMS_RFS_ROOT_INO;
203fe54: b4 06 bf ff add %i2, -1, %i2
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
203fe58: 92 10 00 18 mov %i0, %o1
203fe5c: 40 00 83 bc call 2060d4c <.urem>
203fe60: 90 10 00 1a mov %i2, %o0
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
203fe64: 92 10 00 18 mov %i0, %o1
bit = (rtems_rfs_bitmap_bit) (no % size);
203fe68: b2 10 00 08 mov %o0, %i1
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
203fe6c: 40 00 83 0c call 2060a9c <.udiv>
203fe70: 90 10 00 1a mov %i2, %o0
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
203fe74: f4 07 60 20 ld [ %i5 + 0x20 ], %i2
203fe78: 83 2a 20 04 sll %o0, 4, %g1
203fe7c: 91 2a 20 06 sll %o0, 6, %o0
203fe80: 90 00 40 08 add %g1, %o0, %o0
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
203fe84: 92 10 00 19 mov %i1, %o1
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
203fe88: b4 06 80 08 add %i2, %o0, %i2
203fe8c: b4 06 a0 2c add %i2, 0x2c, %i2
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
203fe90: 40 00 1a 35 call 2046764 <rtems_rfs_bitmap_map_clear>
203fe94: 90 10 00 1a mov %i2, %o0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203fe98: d2 06 80 00 ld [ %i2 ], %o1
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
203fe9c: b0 10 00 08 mov %o0, %i0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203fea0: 7f ff ec da call 203b208 <rtems_rfs_buffer_handle_release>
203fea4: 90 10 00 1d mov %i5, %o0
return rc;
}
203fea8: 81 c7 e0 08 ret
203feac: 81 e8 00 00 restore
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
203feb0: b4 06 bf ff add %i2, -1, %i2
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
203feb4: 92 10 00 18 mov %i0, %o1
203feb8: 40 00 83 a5 call 2060d4c <.urem>
203febc: 90 10 00 1a mov %i2, %o0
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
203fec0: 92 10 00 18 mov %i0, %o1
bit = (rtems_rfs_bitmap_bit) (no % size);
203fec4: b2 10 00 08 mov %o0, %i1
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
203fec8: 40 00 82 f5 call 2060a9c <.udiv>
203fecc: 90 10 00 1a mov %i2, %o0
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
203fed0: f4 07 60 20 ld [ %i5 + 0x20 ], %i2
203fed4: 83 2a 20 04 sll %o0, 4, %g1
203fed8: 91 2a 20 06 sll %o0, 6, %o0
203fedc: 90 00 40 08 add %g1, %o0, %o0
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
203fee0: 92 10 00 19 mov %i1, %o1
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
203fee4: b4 06 80 08 add %i2, %o0, %i2
203fee8: b4 06 a0 08 add %i2, 8, %i2
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
203feec: 40 00 1a 1e call 2046764 <rtems_rfs_bitmap_map_clear>
203fef0: 90 10 00 1a mov %i2, %o0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203fef4: d2 06 80 00 ld [ %i2 ], %o1
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
203fef8: b0 10 00 08 mov %o0, %i0
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203fefc: 7f ff ec c3 call 203b208 <rtems_rfs_buffer_handle_release>
203ff00: 90 10 00 1d mov %i5, %o0
return rc;
}
203ff04: 81 c7 e0 08 ret
203ff08: 81 e8 00 00 restore
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
203ff0c: 13 00 81 a0 sethi %hi(0x2068000), %o1 <== NOT EXECUTED
203ff10: 10 bf ff c9 b 203fe34 <rtems_rfs_group_bitmap_free+0x2c> <== NOT EXECUTED
203ff14: 92 12 62 c8 or %o1, 0x2c8, %o1 ! 20682c8 <rtems_rfs_rtems_eval_config+0x920><== NOT EXECUTED
0203ff18 <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)
{
203ff18: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
203ff1c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203ff20: 13 00 00 80 sethi %hi(0x20000), %o1 <== NOT EXECUTED
203ff24: 7f ff 99 42 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203ff28: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
203ff2c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203ff30: 02 80 00 0a be 203ff58 <rtems_rfs_group_bitmap_test+0x40> <== NOT EXECUTED
203ff34: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
203ff38: 13 00 81 a0 sethi %hi(0x2068000), %o1 <== NOT EXECUTED
203ff3c: 12 80 00 2d bne 203fff0 <rtems_rfs_group_bitmap_test+0xd8><== NOT EXECUTED
203ff40: 92 12 61 b8 or %o1, 0x1b8, %o1 ! 20681b8 <rtems_rfs_rtems_eval_config+0x810><== NOT EXECUTED
203ff44: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
203ff48: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203ff4c: 40 00 2f 21 call 204bbd0 <printf> <== NOT EXECUTED
203ff50: 90 12 20 68 or %o0, 0x68, %o0 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
203ff54: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
203ff58: 22 80 00 0b be,a 203ff84 <rtems_rfs_group_bitmap_test+0x6c><== NOT EXECUTED
203ff5c: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
203ff60: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
203ff64: 04 80 00 06 ble 203ff7c <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
203ff68: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
203ff6c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
203ff70: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
203ff74: 28 80 00 22 bleu,a 203fffc <rtems_rfs_group_bitmap_test+0xe4><== NOT EXECUTED
203ff78: f0 07 60 2c ld [ %i5 + 0x2c ], %i0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
}
203ff7c: 81 c7 e0 08 ret <== NOT EXECUTED
203ff80: 81 e8 00 00 restore <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
203ff84: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
203ff88: 1a bf ff fd bcc 203ff7c <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
203ff8c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
203ff90: f0 07 60 28 ld [ %i5 + 0x28 ], %i0 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
203ff94: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
203ff98: 40 00 83 6d call 2060d4c <.urem> <== NOT EXECUTED
203ff9c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
203ffa0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
203ffa4: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
203ffa8: 40 00 82 bd call 2060a9c <.udiv> <== NOT EXECUTED
203ffac: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
203ffb0: f4 07 60 20 ld [ %i5 + 0x20 ], %i2 <== NOT EXECUTED
203ffb4: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
203ffb8: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
203ffbc: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
203ffc0: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
203ffc4: b4 06 a0 08 add %i2, 8, %i2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
203ffc8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203ffcc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
203ffd0: 40 00 1a 08 call 20467f0 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
203ffd4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203ffd8: d2 06 80 00 ld [ %i2 ], %o1 <== 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);
203ffdc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
203ffe0: 7f ff ec 8a call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203ffe4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rc;
}
203ffe8: 81 c7 e0 08 ret <== NOT EXECUTED
203ffec: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
203fff0: 13 00 81 a0 sethi %hi(0x2068000), %o1 <== NOT EXECUTED
203fff4: 10 bf ff d4 b 203ff44 <rtems_rfs_group_bitmap_test+0x2c> <== NOT EXECUTED
203fff8: 92 12 62 c8 or %o1, 0x2c8, %o1 ! 20682c8 <rtems_rfs_rtems_eval_config+0x920><== NOT EXECUTED
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
203fffc: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
2040000: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040004: 40 00 83 52 call 2060d4c <.urem> <== NOT EXECUTED
2040008: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
204000c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
2040010: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
if (no >= rtems_rfs_fs_blocks (fs))
return EINVAL;
size = fs->group_blocks;
}
group = no / size;
2040014: 40 00 82 a2 call 2060a9c <.udiv> <== NOT EXECUTED
2040018: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
204001c: f4 07 60 20 ld [ %i5 + 0x20 ], %i2 <== NOT EXECUTED
2040020: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED
2040024: 91 2a 20 06 sll %o0, 6, %o0 <== NOT EXECUTED
2040028: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
204002c: b4 06 80 08 add %i2, %o0, %i2 <== NOT EXECUTED
2040030: 10 bf ff e6 b 203ffc8 <rtems_rfs_group_bitmap_test+0xb0> <== NOT EXECUTED
2040034: b4 06 a0 2c add %i2, 0x2c, %i2 <== NOT EXECUTED
0203fb28 <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
203fb28: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
203fb2c: 90 10 20 00 clr %o0
203fb30: 13 00 00 40 sethi %hi(0x10000), %o1
203fb34: 7f ff 9a 3e call 202642c <rtems_rfs_trace>
203fb38: ba 10 00 18 mov %i0, %i5
203fb3c: 80 8a 20 ff btst 0xff, %o0
203fb40: 32 80 00 17 bne,a 203fb9c <rtems_rfs_group_close+0x74> <== NEVER TAKEN
203fb44: d2 06 40 00 ld [ %i1 ], %o1 <== 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);
203fb48: 40 00 1c 25 call 2046bdc <rtems_rfs_bitmap_close>
203fb4c: 90 06 60 2c add %i1, 0x2c, %o0
*/
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);
203fb50: 92 06 60 44 add %i1, 0x44, %o1
203fb54: b8 10 00 08 mov %o0, %i4
203fb58: 7f ff ed ac call 203b208 <rtems_rfs_buffer_handle_release>
203fb5c: 90 10 00 1d mov %i5, %o0
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);
203fb60: 90 06 60 08 add %i1, 8, %o0
handle->dirty = false;
203fb64: c0 2e 60 44 clrb [ %i1 + 0x44 ]
handle->bnum = 0;
203fb68: c0 26 60 48 clr [ %i1 + 0x48 ]
203fb6c: 40 00 1c 1c call 2046bdc <rtems_rfs_bitmap_close>
203fb70: c0 26 60 4c clr [ %i1 + 0x4c ]
if (rc > 0)
203fb74: b0 92 20 00 orcc %o0, 0, %i0
203fb78: 04 80 00 0d ble 203fbac <rtems_rfs_group_close+0x84> <== ALWAYS TAKEN
203fb7c: 90 10 00 1d mov %i5, %o0
*/
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);
203fb80: 7f ff ed a2 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203fb84: 92 06 60 20 add %i1, 0x20, %o1 <== NOT EXECUTED
handle->dirty = false;
203fb88: c0 2e 60 20 clrb [ %i1 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
203fb8c: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED
handle->buffer = NULL;
203fb90: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
203fb94: 81 c7 e0 08 ret <== NOT EXECUTED
203fb98: 81 e8 00 00 restore <== NOT EXECUTED
{
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
203fb9c: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203fba0: 40 00 30 0c call 204bbd0 <printf> <== NOT EXECUTED
203fba4: 90 12 23 a0 or %o0, 0x3a0, %o0 ! 206d7a0 <__FUNCTION__.7603+0x1d78><== NOT EXECUTED
203fba8: 30 bf ff e8 b,a 203fb48 <rtems_rfs_group_close+0x20> <== NOT EXECUTED
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);
if (rc > 0)
203fbac: b0 38 00 1c xnor %g0, %i4, %i0
*/
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);
203fbb0: 92 06 60 20 add %i1, 0x20, %o1
203fbb4: 7f ff ed 95 call 203b208 <rtems_rfs_buffer_handle_release>
203fbb8: b1 3e 20 1f sra %i0, 0x1f, %i0
203fbbc: b0 0f 00 18 and %i4, %i0, %i0
handle->dirty = false;
203fbc0: c0 2e 60 20 clrb [ %i1 + 0x20 ]
handle->bnum = 0;
203fbc4: c0 26 60 24 clr [ %i1 + 0x24 ]
handle->buffer = NULL;
203fbc8: c0 26 60 28 clr [ %i1 + 0x28 ]
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
203fbcc: 81 c7 e0 08 ret
203fbd0: 81 e8 00 00 restore
0203f8f4 <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)
{
203f8f4: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
203f8f8: c2 06 20 04 ld [ %i0 + 4 ], %g1
203f8fc: 80 a0 40 19 cmp %g1, %i1
203f900: 08 80 00 3b bleu 203f9ec <rtems_rfs_group_open+0xf8> <== NEVER TAKEN
203f904: ba 10 00 18 mov %i0, %i5
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
203f908: 84 06 80 19 add %i2, %i1, %g2
203f90c: 80 a0 40 02 cmp %g1, %g2
203f910: 28 80 00 02 bleu,a 203f918 <rtems_rfs_group_open+0x24> <== ALWAYS TAKEN
203f914: b4 20 40 19 sub %g1, %i1, %i2
size = rtems_rfs_fs_blocks (fs) - base;
203f918: 80 a6 80 1b cmp %i2, %i3
203f91c: 18 80 00 25 bgu 203f9b0 <rtems_rfs_group_open+0xbc> <== ALWAYS TAKEN
203f920: a2 10 00 1a mov %i2, %l1
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
203f924: 90 10 20 00 clr %o0 <== NOT EXECUTED
203f928: 7f ff 9a c1 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203f92c: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
203f930: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203f934: 12 80 00 27 bne 203f9d0 <rtems_rfs_group_open+0xdc> <== NOT EXECUTED
203f938: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
203f93c: f2 27 00 00 st %i1, [ %i4 ] <== NOT EXECUTED
group->size = size;
203f940: f4 27 20 04 st %i2, [ %i4 + 4 ]
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203f944: c0 2f 20 20 clrb [ %i4 + 0x20 ]
handle->bnum = 0;
203f948: c0 27 20 24 clr [ %i4 + 0x24 ]
handle->buffer = NULL;
203f94c: c0 27 20 28 clr [ %i4 + 0x28 ]
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,
203f950: a0 07 20 08 add %i4, 8, %l0
203f954: b6 07 20 20 add %i4, 0x20, %i3
203f958: 90 10 00 10 mov %l0, %o0
203f95c: 92 10 00 1d mov %i5, %o1
203f960: 94 10 00 1b mov %i3, %o2
203f964: 96 10 00 1a mov %i2, %o3
203f968: 40 00 1c 8c call 2046b98 <rtems_rfs_bitmap_open>
203f96c: 98 10 00 19 mov %i1, %o4
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
203f970: b0 92 20 00 orcc %o0, 0, %i0
203f974: 04 80 00 37 ble 203fa50 <rtems_rfs_group_open+0x15c> <== ALWAYS TAKEN
203f978: 92 10 00 1b mov %i3, %o1
*/
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);
203f97c: 7f ff ee 23 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203f980: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
203f984: 90 10 20 00 clr %o0 <== NOT EXECUTED
203f988: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
handle->dirty = false;
203f98c: c0 2f 20 20 clrb [ %i4 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
203f990: c0 27 20 24 clr [ %i4 + 0x24 ] <== NOT EXECUTED
203f994: 7f ff 9a a6 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203f998: c0 27 20 28 clr [ %i4 + 0x28 ] <== NOT EXECUTED
203f99c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203f9a0: 12 80 00 23 bne 203fa2c <rtems_rfs_group_open+0x138> <== NOT EXECUTED
203f9a4: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
}
203f9a8: 81 c7 e0 08 ret <== NOT EXECUTED
203f9ac: 81 e8 00 00 restore <== NOT EXECUTED
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
203f9b0: 90 10 20 00 clr %o0
203f9b4: 13 00 00 20 sethi %hi(0x8000), %o1
203f9b8: 7f ff 9a 9d call 202642c <rtems_rfs_trace>
203f9bc: a2 10 00 1b mov %i3, %l1
203f9c0: 80 8a 20 ff btst 0xff, %o0
203f9c4: 22 bf ff df be,a 203f940 <rtems_rfs_group_open+0x4c> <== ALWAYS TAKEN
203f9c8: f2 27 00 00 st %i1, [ %i4 ]
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
203f9cc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203f9d0: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203f9d4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203f9d8: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
203f9dc: 40 00 30 7d call 204bbd0 <printf> <== NOT EXECUTED
203f9e0: 90 12 22 e8 or %o0, 0x2e8, %o0 <== NOT EXECUTED
base, size, inodes);
group->base = base;
203f9e4: 10 bf ff d7 b 203f940 <rtems_rfs_group_open+0x4c> <== NOT EXECUTED
203f9e8: f2 27 00 00 st %i1, [ %i4 ] <== NOT EXECUTED
{
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
203f9ec: 90 10 20 00 clr %o0 <== NOT EXECUTED
203f9f0: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
203f9f4: 7f ff 9a 8e call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203f9f8: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
203f9fc: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203fa00: 02 80 00 48 be 203fb20 <rtems_rfs_group_open+0x22c> <== NOT EXECUTED
203fa04: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
203fa08: 40 00 3a 08 call 204e228 <strerror> <== NOT EXECUTED
203fa0c: 90 10 20 05 mov 5, %o0 ! 5 <PROM_START+0x5> <== NOT EXECUTED
203fa10: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
203fa14: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203fa18: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203fa1c: 40 00 30 6d call 204bbd0 <printf> <== NOT EXECUTED
203fa20: 90 12 22 a8 or %o0, 0x2a8, %o0 ! 206d6a8 <__FUNCTION__.7603+0x1c80><== NOT EXECUTED
203fa24: 81 c7 e0 08 ret <== NOT EXECUTED
203fa28: 81 e8 00 00 restore <== NOT EXECUTED
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
203fa2c: 40 00 39 ff call 204e228 <strerror> <== NOT EXECUTED
203fa30: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203fa34: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203fa38: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203fa3c: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203fa40: 40 00 30 64 call 204bbd0 <printf> <== NOT EXECUTED
203fa44: 90 12 23 20 or %o0, 0x320, %o0 ! 206d720 <__FUNCTION__.7603+0x1cf8><== NOT EXECUTED
203fa48: 81 c7 e0 08 ret <== NOT EXECUTED
203fa4c: 81 e8 00 00 restore <== 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,
203fa50: d8 07 00 00 ld [ %i4 ], %o4
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
203fa54: c0 2f 20 44 clrb [ %i4 + 0x44 ]
handle->bnum = 0;
203fa58: c0 27 20 48 clr [ %i4 + 0x48 ]
handle->buffer = NULL;
203fa5c: c0 27 20 4c clr [ %i4 + 0x4c ]
203fa60: b4 07 20 44 add %i4, 0x44, %i2
203fa64: 90 07 20 2c add %i4, 0x2c, %o0
203fa68: 92 10 00 1d mov %i5, %o1
203fa6c: 94 10 00 1a mov %i2, %o2
203fa70: 96 10 00 11 mov %l1, %o3
203fa74: 40 00 1c 49 call 2046b98 <rtems_rfs_bitmap_open>
203fa78: 98 03 20 01 inc %o4
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
203fa7c: b0 92 20 00 orcc %o0, 0, %i0
203fa80: 04 80 00 1e ble 203faf8 <rtems_rfs_group_open+0x204> <== ALWAYS TAKEN
203fa84: 92 10 00 1a mov %i2, %o1
*/
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);
203fa88: 7f ff ed e0 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203fa8c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
203fa90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handle->dirty = false;
203fa94: c0 2f 20 44 clrb [ %i4 + 0x44 ] <== NOT EXECUTED
handle->bnum = 0;
203fa98: c0 27 20 48 clr [ %i4 + 0x48 ] <== NOT EXECUTED
203fa9c: 40 00 1c 50 call 2046bdc <rtems_rfs_bitmap_close> <== NOT EXECUTED
203faa0: c0 27 20 4c clr [ %i4 + 0x4c ] <== 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);
203faa4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
203faa8: 7f ff ed d8 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
203faac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
203fab0: 90 10 20 00 clr %o0 <== NOT EXECUTED
203fab4: 13 00 00 20 sethi %hi(0x8000), %o1 <== NOT EXECUTED
handle->dirty = false;
203fab8: c0 2f 20 20 clrb [ %i4 + 0x20 ] <== NOT EXECUTED
handle->bnum = 0;
203fabc: c0 27 20 24 clr [ %i4 + 0x24 ] <== NOT EXECUTED
203fac0: 7f ff 9a 5b call 202642c <rtems_rfs_trace> <== NOT EXECUTED
203fac4: c0 27 20 28 clr [ %i4 + 0x28 ] <== NOT EXECUTED
203fac8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
203facc: 02 80 00 15 be 203fb20 <rtems_rfs_group_open+0x22c> <== NOT EXECUTED
203fad0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
203fad4: 40 00 39 d5 call 204e228 <strerror> <== NOT EXECUTED
203fad8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
203fadc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
203fae0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
203fae4: 11 00 81 b5 sethi %hi(0x206d400), %o0 <== NOT EXECUTED
203fae8: 40 00 30 3a call 204bbd0 <printf> <== NOT EXECUTED
203faec: 90 12 23 60 or %o0, 0x360, %o0 ! 206d760 <__FUNCTION__.7603+0x1d38><== NOT EXECUTED
203faf0: 81 c7 e0 08 ret <== NOT EXECUTED
203faf4: 81 e8 00 00 restore <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
203faf8: c2 07 40 00 ld [ %i5 ], %g1
203fafc: 80 88 60 01 btst 1, %g1
203fb00: 12 bf ff aa bne 203f9a8 <rtems_rfs_group_open+0xb4> <== NEVER TAKEN
203fb04: b0 10 20 00 clr %i0
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
203fb08: d2 07 20 08 ld [ %i4 + 8 ], %o1
203fb0c: 7f ff ed bf call 203b208 <rtems_rfs_buffer_handle_release>
203fb10: 90 10 00 1d mov %i5, %o0
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
203fb14: d2 07 20 2c ld [ %i4 + 0x2c ], %o1
203fb18: 7f ff ed bc call 203b208 <rtems_rfs_buffer_handle_release>
203fb1c: 90 10 00 1d mov %i5, %o0
}
return 0;
}
203fb20: 81 c7 e0 08 ret
203fb24: 81 e8 00 00 restore
02040038 <rtems_rfs_group_usage>:
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
2040038: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int g;
*blocks = 0;
204003c: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED
*inodes = 0;
2040040: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
2040044: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED
2040048: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
204004c: 04 80 00 14 ble 204009c <rtems_rfs_group_usage+0x64> <== NOT EXECUTED
2040050: 84 10 20 00 clr %g2 <== NOT EXECUTED
2040054: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
2040058: de 00 60 14 ld [ %g1 + 0x14 ], %o7 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
204005c: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
2040060: c6 06 40 00 ld [ %i1 ], %g3 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
2040064: 84 00 a0 01 inc %g2 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
2040068: 86 03 c0 03 add %o7, %g3, %g3 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
204006c: 86 20 c0 04 sub %g3, %g4, %g3 <== NOT EXECUTED
2040070: c6 26 40 00 st %g3, [ %i1 ] <== 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) -
2040074: de 00 60 38 ld [ %g1 + 0x38 ], %o7 <== 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 +=
2040078: c8 00 60 3c ld [ %g1 + 0x3c ], %g4 <== NOT EXECUTED
rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
204007c: c6 06 80 00 ld [ %i2 ], %g3 <== NOT EXECUTED
2040080: 86 03 c0 03 add %o7, %g3, %g3 <== 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 +=
2040084: 86 20 c0 04 sub %g3, %g4, %g3 <== NOT EXECUTED
2040088: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
204008c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 <== NOT EXECUTED
2040090: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2040094: 14 bf ff f1 bg 2040058 <rtems_rfs_group_usage+0x20> <== NOT EXECUTED
2040098: 82 00 60 50 add %g1, 0x50, %g1 <== 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))
204009c: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED
20400a0: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
20400a4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20400a8: 38 80 00 02 bgu,a 20400b0 <rtems_rfs_group_usage+0x78> <== NOT EXECUTED
20400ac: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
20400b0: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
20400b4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED
20400b8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED
20400bc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20400c0: 38 80 00 02 bgu,a 20400c8 <rtems_rfs_group_usage+0x90> <== NOT EXECUTED
20400c4: 82 10 00 02 mov %g2, %g1 <== NOT EXECUTED
20400c8: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
20400cc: 81 c7 e0 08 ret <== NOT EXECUTED
20400d0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0204039c <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
204039c: 9d e3 bf a0 save %sp, -96, %sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
20403a0: 90 10 20 00 clr %o0
20403a4: 7f ff 98 22 call 202642c <rtems_rfs_trace>
20403a8: 13 00 02 00 sethi %hi(0x80000), %o1
20403ac: 80 8a 20 ff btst 0xff, %o0
20403b0: 32 80 00 16 bne,a 2040408 <rtems_rfs_inode_close+0x6c> <== NEVER TAKEN
20403b4: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
rc = rtems_rfs_inode_unload (fs, handle, true);
20403b8: 90 10 00 18 mov %i0, %o0
20403bc: 92 10 00 19 mov %i1, %o1
20403c0: 7f ff ff b8 call 20402a0 <rtems_rfs_inode_unload>
20403c4: 94 10 20 01 mov 1, %o2
if ((rc == 0) && (handle->loads > 0))
20403c8: b0 92 20 00 orcc %o0, 0, %i0
20403cc: 32 80 00 0d bne,a 2040400 <rtems_rfs_inode_close+0x64> <== NEVER TAKEN
20403d0: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
20403d4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
20403d8: 80 a0 60 00 cmp %g1, 0
20403dc: 04 80 00 08 ble 20403fc <rtems_rfs_inode_close+0x60> <== ALWAYS TAKEN
20403e0: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
20403e4: 13 00 02 00 sethi %hi(0x80000), %o1 <== NOT EXECUTED
20403e8: 7f ff 98 11 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20403ec: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
20403f0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20403f4: 32 80 00 0a bne,a 204041c <rtems_rfs_inode_close+0x80> <== NOT EXECUTED
20403f8: d2 06 60 24 ld [ %i1 + 0x24 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
20403fc: c0 26 60 08 clr [ %i1 + 8 ]
return rc;
}
2040400: 81 c7 e0 08 ret
2040404: 81 e8 00 00 restore
rtems_rfs_inode_handle* handle)
{
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
2040408: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
204040c: 40 00 2d f1 call 204bbd0 <printf> <== NOT EXECUTED
2040410: 90 12 21 30 or %o0, 0x130, %o0 ! 206d930 <__FUNCTION__.7603+0x1f08><== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
2040414: 10 bf ff ea b 20403bc <rtems_rfs_inode_close+0x20> <== NOT EXECUTED
2040418: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
204041c: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040420: 40 00 2d ec call 204bbd0 <printf> <== NOT EXECUTED
2040424: 90 12 21 58 or %o0, 0x158, %o0 ! 206d958 <__FUNCTION__.7603+0x1f30><== NOT EXECUTED
handle->loads);
rc = EIO;
}
handle->ino = 0;
2040428: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
return rc;
}
204042c: 81 c7 e0 08 ret <== NOT EXECUTED
2040430: 81 e8 00 00 restore <== NOT EXECUTED
02040710 <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
2040710: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
2040714: 90 10 20 00 clr %o0
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
2040718: e4 07 a0 64 ld [ %fp + 0x64 ], %l2
204071c: e2 17 a0 5e lduh [ %fp + 0x5e ], %l1
2040720: e0 17 a0 62 lduh [ %fp + 0x62 ], %l0
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
2040724: 13 00 10 00 sethi %hi(0x400000), %o1
2040728: 7f ff 97 41 call 202642c <rtems_rfs_trace>
204072c: 27 00 00 3c sethi %hi(0xf000), %l3
2040730: 80 8a 20 ff btst 0xff, %o0
2040734: 02 80 00 2f be 20407f0 <rtems_rfs_inode_create+0xe0> <== ALWAYS TAKEN
2040738: a6 0f 00 13 and %i4, %l3, %l3
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
204073c: 03 00 00 10 sethi %hi(0x4000), %g1 <== NOT EXECUTED
type = "dir";
2040740: 29 00 81 95 sethi %hi(0x2065400), %l4 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
2040744: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2040748: 02 80 00 16 be 20407a0 <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
204074c: a8 15 20 28 or %l4, 0x28, %l4 <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
2040750: 03 00 00 08 sethi %hi(0x2000), %g1 <== NOT EXECUTED
type = "char";
2040754: 29 00 81 b6 sethi %hi(0x206d800), %l4 <== NOT EXECUTED
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
2040758: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
204075c: 02 80 00 11 be 20407a0 <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2040760: a8 15 21 b8 or %l4, 0x1b8, %l4 <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
2040764: 03 00 00 18 sethi %hi(0x6000), %g1 <== NOT EXECUTED
type = "block";
2040768: 29 00 81 a0 sethi %hi(0x2068000), %l4 <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
204076c: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2040770: 02 80 00 0c be 20407a0 <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2040774: a8 15 21 b8 or %l4, 0x1b8, %l4 <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
2040778: 03 00 00 20 sethi %hi(0x8000), %g1 <== NOT EXECUTED
type = "file";
204077c: 29 00 81 9d sethi %hi(0x2067400), %l4 <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
2040780: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2040784: 02 80 00 07 be 20407a0 <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2040788: a8 15 21 10 or %l4, 0x110, %l4 <== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
204078c: 03 00 00 28 sethi %hi(0xa000), %g1 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
2040790: 29 00 81 b6 sethi %hi(0x206d800), %l4 <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
2040794: 80 a4 c0 01 cmp %l3, %g1 <== NOT EXECUTED
2040798: 02 80 00 3e be 2040890 <rtems_rfs_inode_create+0x180> <== NOT EXECUTED
204079c: a8 15 21 c0 or %l4, 0x1c0, %l4 <== NOT EXECUTED
type = "link";
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
20407a0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20407a4: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
20407a8: 40 00 2d 0a call 204bbd0 <printf> <== NOT EXECUTED
20407ac: 90 12 21 c8 or %o0, 0x1c8, %o0 ! 206d9c8 <__FUNCTION__.7603+0x1fa0><== NOT EXECUTED
for (c = 0; c < length; c++)
20407b0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
20407b4: 02 80 00 09 be 20407d8 <rtems_rfs_inode_create+0xc8> <== NOT EXECUTED
20407b8: 82 10 20 00 clr %g1 <== NOT EXECUTED
20407bc: aa 10 20 00 clr %l5 <== NOT EXECUTED
printf ("%c", name[c]);
20407c0: d0 4e 80 01 ldsb [ %i2 + %g1 ], %o0 <== NOT EXECUTED
20407c4: 40 00 2d 70 call 204bd84 <putchar> <== NOT EXECUTED
20407c8: aa 05 60 01 inc %l5 <== 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++)
20407cc: 80 a5 40 1b cmp %l5, %i3 <== NOT EXECUTED
20407d0: 12 bf ff fc bne 20407c0 <rtems_rfs_inode_create+0xb0> <== NOT EXECUTED
20407d4: 82 10 00 15 mov %l5, %g1 <== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
20407d8: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
20407dc: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
20407e0: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED
20407e4: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
20407e8: 40 00 2c fa call 204bbd0 <printf> <== NOT EXECUTED
20407ec: 96 0f 23 ff and %i4, 0x3ff, %o3 <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
20407f0: 03 00 00 18 sethi %hi(0x6000), %g1
20407f4: 80 a4 c0 01 cmp %l3, %g1
20407f8: 02 80 00 15 be 204084c <rtems_rfs_inode_create+0x13c> <== NEVER TAKEN
20407fc: 90 10 00 18 mov %i0, %o0
2040800: 04 80 00 0c ble 2040830 <rtems_rfs_inode_create+0x120>
2040804: 03 00 00 08 sethi %hi(0x2000), %g1
2040808: 03 00 00 20 sethi %hi(0x8000), %g1
204080c: 80 a4 c0 01 cmp %l3, %g1
2040810: 02 80 00 0f be 204084c <rtems_rfs_inode_create+0x13c>
2040814: 03 00 00 28 sethi %hi(0xa000), %g1
2040818: 80 a4 c0 01 cmp %l3, %g1
204081c: 02 80 00 0d be 2040850 <rtems_rfs_inode_create+0x140> <== ALWAYS TAKEN
2040820: 92 10 00 19 mov %i1, %o1
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
2040824: a8 10 20 16 mov 0x16, %l4 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
}
2040828: 81 c7 e0 08 ret
204082c: 91 e8 00 14 restore %g0, %l4, %o0
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
2040830: 80 a4 c0 01 cmp %l3, %g1
2040834: 02 80 00 05 be 2040848 <rtems_rfs_inode_create+0x138> <== NEVER TAKEN
2040838: 03 00 00 10 sethi %hi(0x4000), %g1
204083c: 80 a4 c0 01 cmp %l3, %g1
2040840: 12 bf ff fa bne 2040828 <rtems_rfs_inode_create+0x118> <== NEVER TAKEN
2040844: a8 10 20 16 mov 0x16, %l4
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
2040848: 90 10 00 18 mov %i0, %o0
204084c: 92 10 00 19 mov %i1, %o1
2040850: 7f ff fe 21 call 20400d4 <rtems_rfs_inode_alloc>
2040854: 94 10 00 12 mov %l2, %o2
if (rc > 0)
2040858: a8 92 20 00 orcc %o0, 0, %l4
204085c: 14 bf ff f3 bg 2040828 <rtems_rfs_inode_create+0x118>
2040860: 90 10 00 18 mov %i0, %o0
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
2040864: d2 04 80 00 ld [ %l2 ], %o1
2040868: 94 07 bf d8 add %fp, -40, %o2
204086c: 7f ff fe 55 call 20401c0 <rtems_rfs_inode_open>
2040870: 96 10 20 01 mov 1, %o3
if (rc > 0)
2040874: a8 92 20 00 orcc %o0, 0, %l4
2040878: 04 80 00 09 ble 204089c <rtems_rfs_inode_create+0x18c> <== ALWAYS TAKEN
204087c: 90 07 bf d8 add %fp, -40, %o0
}
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_inode_free (fs, *ino);
2040880: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
2040884: 7f ff fe 1e call 20400fc <rtems_rfs_inode_free> <== NOT EXECUTED
2040888: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
204088c: 30 bf ff e7 b,a 2040828 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
2040890: 29 00 81 a1 sethi %hi(0x2068400), %l4 <== NOT EXECUTED
2040894: 10 bf ff c3 b 20407a0 <rtems_rfs_inode_create+0x90> <== NOT EXECUTED
2040898: a8 15 22 58 or %l4, 0x258, %l4 ! 2068658 <rtems_rfs_rtems_eval_config+0xcb0><== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
204089c: 92 10 00 1d mov %i5, %o1
20408a0: 94 10 00 1c mov %i4, %o2
20408a4: 96 10 00 11 mov %l1, %o3
20408a8: 7f ff ff 42 call 20405b0 <rtems_rfs_inode_initialise>
20408ac: 98 10 00 10 mov %l0, %o4
if (rc > 0)
20408b0: a8 92 20 00 orcc %o0, 0, %l4
20408b4: 14 80 00 13 bg 2040900 <rtems_rfs_inode_create+0x1f0> <== NEVER TAKEN
20408b8: 03 00 00 10 sethi %hi(0x4000), %g1
/*
* 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))
20408bc: 80 a4 c0 01 cmp %l3, %g1
20408c0: 22 80 00 43 be,a 20409cc <rtems_rfs_inode_create+0x2bc>
20408c4: d8 04 80 00 ld [ %l2 ], %o4
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
20408c8: 90 10 00 18 mov %i0, %o0
20408cc: 92 10 00 19 mov %i1, %o1
20408d0: 94 07 bf b0 add %fp, -80, %o2
20408d4: 7f ff fe 3b call 20401c0 <rtems_rfs_inode_open>
20408d8: 96 10 20 01 mov 1, %o3
if (rc > 0)
20408dc: a8 92 20 00 orcc %o0, 0, %l4
20408e0: 04 80 00 0f ble 204091c <rtems_rfs_inode_create+0x20c> <== ALWAYS TAKEN
20408e4: 92 07 bf d8 add %fp, -40, %o1
{
rtems_rfs_inode_delete (fs, &inode);
20408e8: 7f ff fe d3 call 2040434 <rtems_rfs_inode_delete> <== NOT EXECUTED
20408ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20408f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20408f4: 7f ff fe aa call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
20408f8: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
20408fc: 30 bf ff cb b,a 2040828 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &inode);
2040900: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2040904: 7f ff fe a6 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040908: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
204090c: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
2040910: 7f ff fd fb call 20400fc <rtems_rfs_inode_free> <== NOT EXECUTED
2040914: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
2040918: 30 bf ff c4 b,a 2040828 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
204091c: d8 04 80 00 ld [ %l2 ], %o4
2040920: 90 10 00 18 mov %i0, %o0
2040924: 92 07 bf b0 add %fp, -80, %o1
2040928: 94 10 00 1a mov %i2, %o2
204092c: 7f ff ed ea call 203c0d4 <rtems_rfs_dir_add_entry>
2040930: 96 10 00 1b mov %i3, %o3
if (rc > 0)
2040934: a8 92 20 00 orcc %o0, 0, %l4
2040938: 14 80 00 3b bg 2040a24 <rtems_rfs_inode_create+0x314> <== NEVER TAKEN
204093c: 03 00 00 10 sethi %hi(0x4000), %g1
/*
* 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))
2040940: 80 a4 c0 01 cmp %l3, %g1
2040944: 12 80 00 15 bne 2040998 <rtems_rfs_inode_create+0x288>
2040948: 92 07 bf b0 add %fp, -80, %o1
*/
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);
204094c: c2 07 bf bc ld [ %fp + -68 ], %g1
if (links == 0xffff)
links = 0;
2040950: 09 3f ff c0 sethi %hi(0xffff0000), %g4
*/
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);
2040954: c6 08 40 00 ldub [ %g1 ], %g3
2040958: c4 08 60 01 ldub [ %g1 + 1 ], %g2
204095c: 87 28 e0 08 sll %g3, 8, %g3
2040960: 84 10 c0 02 or %g3, %g2, %g2
if (links == 0xffff)
2040964: 87 28 a0 10 sll %g2, 0x10, %g3
2040968: 87 30 e0 10 srl %g3, 0x10, %g3
links = 0;
204096c: 86 39 00 03 xnor %g4, %g3, %g3
2040970: 80 a0 00 03 cmp %g0, %g3
2040974: 86 60 20 00 subx %g0, 0, %g3
2040978: 84 08 80 03 and %g2, %g3, %g2
rtems_rfs_inode_set_links (&parent_inode,
204097c: 84 00 a0 01 inc %g2
* @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);
2040980: 87 30 a0 08 srl %g2, 8, %g3
2040984: c6 28 40 00 stb %g3, [ %g1 ]
2040988: c2 07 bf bc ld [ %fp + -68 ], %g1
204098c: c4 28 60 01 stb %g2, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2040990: 82 10 20 01 mov 1, %g1
2040994: c2 2f bf c0 stb %g1, [ %fp + -64 ]
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
2040998: 7f ff fe 81 call 204039c <rtems_rfs_inode_close>
204099c: 90 10 00 18 mov %i0, %o0
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
20409a0: 92 07 bf d8 add %fp, -40, %o1
*/
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);
20409a4: a8 10 00 08 mov %o0, %l4
if (rc > 0)
20409a8: 80 a5 20 00 cmp %l4, 0
20409ac: 04 80 00 28 ble 2040a4c <rtems_rfs_inode_create+0x33c> <== ALWAYS TAKEN
20409b0: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_delete (fs, &inode);
20409b4: 7f ff fe a0 call 2040434 <rtems_rfs_inode_delete> <== NOT EXECUTED
20409b8: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20409bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20409c0: 7f ff fe 77 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
20409c4: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
20409c8: 30 bf ff 98 b,a 2040828 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
20409cc: 90 10 00 18 mov %i0, %o0
20409d0: 92 07 bf d8 add %fp, -40, %o1
20409d4: 96 10 20 01 mov 1, %o3
20409d8: 15 00 81 95 sethi %hi(0x2065400), %o2
20409dc: 7f ff ed be call 203c0d4 <rtems_rfs_dir_add_entry>
20409e0: 94 12 a3 b8 or %o2, 0x3b8, %o2 ! 20657b8 <rtems_bdpart_shell_usage+0xcf0>
if (rc == 0)
20409e4: a8 92 20 00 orcc %o0, 0, %l4
20409e8: 12 80 00 0b bne 2040a14 <rtems_rfs_inode_create+0x304> <== NEVER TAKEN
20409ec: 80 a5 20 00 cmp %l4, 0
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
20409f0: 90 10 00 18 mov %i0, %o0
20409f4: 92 07 bf d8 add %fp, -40, %o1
20409f8: 96 10 20 02 mov 2, %o3
20409fc: 15 00 81 94 sethi %hi(0x2065000), %o2
2040a00: 98 10 00 19 mov %i1, %o4
2040a04: 7f ff ed b4 call 203c0d4 <rtems_rfs_dir_add_entry>
2040a08: 94 12 a0 d8 or %o2, 0xd8, %o2
2040a0c: a8 10 00 08 mov %o0, %l4
if (rc > 0)
2040a10: 80 a5 20 00 cmp %l4, 0
2040a14: 04 bf ff ae ble 20408cc <rtems_rfs_inode_create+0x1bc> <== ALWAYS TAKEN
2040a18: 90 10 00 18 mov %i0, %o0
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
2040a1c: 10 bf ff b3 b 20408e8 <rtems_rfs_inode_create+0x1d8> <== NOT EXECUTED
2040a20: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
2040a24: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2040a28: 7f ff fe 83 call 2040434 <rtems_rfs_inode_delete> <== NOT EXECUTED
2040a2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
2040a30: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2040a34: 7f ff fe 5a call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040a38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
2040a3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040a40: 7f ff fe 57 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040a44: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
return rc;
2040a48: 30 bf ff 78 b,a 2040828 <rtems_rfs_inode_create+0x118> <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
2040a4c: 7f ff fe 54 call 204039c <rtems_rfs_inode_close>
2040a50: 01 00 00 00 nop
if (rc > 0)
2040a54: a8 92 20 00 orcc %o0, 0, %l4
2040a58: 34 bf ff 8b bg,a 2040884 <rtems_rfs_inode_create+0x174> <== NEVER TAKEN
2040a5c: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
2040a60: 10 bf ff 72 b 2040828 <rtems_rfs_inode_create+0x118>
2040a64: a8 10 20 00 clr %l4
02040434 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
2040434: 9d e3 bf 50 save %sp, -176, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
2040438: 90 10 20 00 clr %o0
204043c: 13 00 20 00 sethi %hi(0x800000), %o1
2040440: 7f ff 97 fb call 202642c <rtems_rfs_trace>
2040444: ba 10 00 18 mov %i0, %i5
2040448: 80 8a 20 ff btst 0xff, %o0
204044c: 02 80 00 0d be 2040480 <rtems_rfs_inode_delete+0x4c> <== ALWAYS TAKEN
2040450: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
2040454: 15 00 81 b1 sethi %hi(0x206c400), %o2 <== NOT EXECUTED
2040458: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
204045c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2040460: 02 80 00 04 be 2040470 <rtems_rfs_inode_delete+0x3c> <== NOT EXECUTED
2040464: 94 12 a0 c0 or %o2, 0xc0, %o2 <== NOT EXECUTED
2040468: 15 00 81 b1 sethi %hi(0x206c400), %o2 <== NOT EXECUTED
204046c: 94 12 a0 b8 or %o2, 0xb8, %o2 ! 206c4b8 <__FUNCTION__.7603+0xa90><== NOT EXECUTED
2040470: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040474: 40 00 2d d7 call 204bbd0 <printf> <== NOT EXECUTED
2040478: 90 12 21 88 or %o0, 0x188, %o0 ! 206d988 <__FUNCTION__.7603+0x1f60><== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
204047c: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
2040480: 80 a0 60 00 cmp %g1, 0
2040484: 02 80 00 08 be 20404a4 <rtems_rfs_inode_delete+0x70> <== NEVER TAKEN
2040488: b0 10 20 00 clr %i0
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
204048c: d2 06 60 08 ld [ %i1 + 8 ], %o1
2040490: 7f ff ff 1b call 20400fc <rtems_rfs_inode_free>
2040494: 90 10 00 1d mov %i5, %o0
if (rc > 0)
2040498: b0 92 20 00 orcc %o0, 0, %i0
204049c: 04 80 00 04 ble 20404ac <rtems_rfs_inode_delete+0x78> <== ALWAYS TAKEN
20404a0: 90 10 00 1d mov %i5, %o0
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
20404a4: 81 c7 e0 08 ret <== NOT EXECUTED
20404a8: 81 e8 00 00 restore <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
20404ac: 92 10 00 19 mov %i1, %o1
20404b0: 7f ff e7 bf call 203a3ac <rtems_rfs_block_map_open>
20404b4: 94 07 bf b0 add %fp, -80, %o2
if (rc == 0)
20404b8: b0 92 20 00 orcc %o0, 0, %i0
20404bc: 12 bf ff fa bne 20404a4 <rtems_rfs_inode_delete+0x70> <== NEVER TAKEN
20404c0: 92 07 bf b0 add %fp, -80, %o1
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
20404c4: 7f ff ea de call 203b03c <rtems_rfs_block_map_free_all>
20404c8: 90 10 00 1d mov %i5, %o0
rc = rtems_rfs_block_map_close (fs, &map);
20404cc: 92 07 bf b0 add %fp, -80, %o1
20404d0: 7f ff e8 1b call 203a53c <rtems_rfs_block_map_close>
20404d4: 90 10 00 1d mov %i5, %o0
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
20404d8: d0 06 60 0c ld [ %i1 + 0xc ], %o0
20404dc: 94 10 20 38 mov 0x38, %o2
20404e0: 40 00 29 50 call 204aa20 <memset>
20404e4: 92 10 20 ff mov 0xff, %o1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20404e8: 82 10 20 01 mov 1, %g1
/*
* 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);
20404ec: 90 10 00 1d mov %i5, %o0
20404f0: 92 06 60 10 add %i1, 0x10, %o1
20404f4: 7f ff eb 45 call 203b208 <rtems_rfs_buffer_handle_release>
20404f8: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
handle->loads = 0;
20404fc: c0 26 60 24 clr [ %i1 + 0x24 ]
handle->node = NULL;
2040500: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
return rc;
}
2040504: 81 c7 e0 08 ret
2040508: 91 e8 00 08 restore %g0, %o0, %o0
02040110 <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
2040110: 9d e3 bf a0 save %sp, -96, %sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
2040114: 90 10 20 00 clr %o0
2040118: 7f ff 98 c5 call 202642c <rtems_rfs_trace>
204011c: 13 00 04 00 sethi %hi(0x100000), %o1
2040120: 80 8a 20 ff btst 0xff, %o0
2040124: 02 80 00 0e be 204015c <rtems_rfs_inode_load+0x4c> <== ALWAYS TAKEN
2040128: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
204012c: 17 00 81 b1 sethi %hi(0x206c400), %o3 <== NOT EXECUTED
2040130: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
2040134: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 <== NOT EXECUTED
2040138: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
204013c: 02 80 00 04 be 204014c <rtems_rfs_inode_load+0x3c> <== NOT EXECUTED
2040140: 96 12 e0 c0 or %o3, 0xc0, %o3 <== NOT EXECUTED
2040144: 17 00 81 b1 sethi %hi(0x206c400), %o3 <== NOT EXECUTED
2040148: 96 12 e0 b8 or %o3, 0xb8, %o3 ! 206c4b8 <__FUNCTION__.7603+0xa90><== NOT EXECUTED
204014c: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040150: 40 00 2e a0 call 204bbd0 <printf> <== NOT EXECUTED
2040154: 90 12 20 98 or %o0, 0x98, %o0 ! 206d898 <__FUNCTION__.7603+0x1e70><== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
2040158: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
204015c: 80 a0 60 00 cmp %g1, 0
2040160: 22 80 00 08 be,a 2040180 <rtems_rfs_inode_load+0x70>
2040164: d4 06 60 1c ld [ %i1 + 0x1c ], %o2
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
2040168: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return 0;
204016c: b0 10 20 00 clr %i0
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
}
handle->loads++;
2040170: 82 00 60 01 inc %g1
2040174: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
return 0;
}
2040178: 81 c7 e0 08 ret
204017c: 81 e8 00 00 restore
if (!rtems_rfs_inode_is_loaded (handle))
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
2040180: 90 10 00 18 mov %i0, %o0
2040184: 92 06 60 10 add %i1, 0x10, %o1
2040188: 7f ff ec 9b call 203b3f4 <rtems_rfs_buffer_handle_request>
204018c: 96 10 20 01 mov 1, %o3
handle->block, true);
if (rc > 0)
2040190: b0 92 20 00 orcc %o0, 0, %i0
2040194: 14 bf ff f9 bg 2040178 <rtems_rfs_inode_load+0x68> <== NEVER TAKEN
2040198: 01 00 00 00 nop
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
204019c: c4 06 60 18 ld [ %i1 + 0x18 ], %g2
handle->node += handle->offset;
20401a0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
20401a4: c4 00 a0 1c ld [ %g2 + 0x1c ], %g2
20401a8: 87 28 60 03 sll %g1, 3, %g3
20401ac: 83 28 60 06 sll %g1, 6, %g1
20401b0: 82 20 40 03 sub %g1, %g3, %g1
20401b4: 82 00 80 01 add %g2, %g1, %g1
20401b8: 10 bf ff ec b 2040168 <rtems_rfs_inode_load+0x58>
20401bc: c2 26 60 0c st %g1, [ %i1 + 0xc ]
020401c0 <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)
{
20401c0: 9d e3 bf a0 save %sp, -96, %sp
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
20401c4: 90 10 20 00 clr %o0
20401c8: 7f ff 98 99 call 202642c <rtems_rfs_trace>
20401cc: 13 00 01 00 sethi %hi(0x40000), %o1
20401d0: 80 8a 20 ff btst 0xff, %o0
20401d4: 32 80 00 2e bne,a 204028c <rtems_rfs_inode_open+0xcc> <== NEVER TAKEN
20401d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
20401dc: 80 a6 60 00 cmp %i1, 0
20401e0: 12 80 00 04 bne 20401f0 <rtems_rfs_inode_open+0x30> <== ALWAYS TAKEN
20401e4: 82 10 20 16 mov 0x16, %g1
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
20401e8: 81 c7 e0 08 ret <== NOT EXECUTED
20401ec: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
20401f0: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
20401f4: ba 06 7f ff add %i1, -1, %i5
20401f8: 80 a7 40 02 cmp %i5, %g2
20401fc: 18 bf ff fb bgu 20401e8 <rtems_rfs_inode_open+0x28> <== NEVER TAKEN
2040200: 01 00 00 00 nop
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
2040204: f8 06 20 2c ld [ %i0 + 0x2c ], %i4
gino = gino % fs->group_inodes;
2040208: 90 10 00 1d mov %i5, %o0
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
204020c: f2 26 a0 08 st %i1, [ %i2 + 8 ]
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
2040210: 92 10 00 1c mov %i4, %o1
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
2040214: c0 26 a0 0c clr [ %i2 + 0xc ]
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
2040218: 40 00 82 cd call 2060d4c <.urem>
204021c: c0 26 a0 24 clr [ %i2 + 0x24 ]
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
2040220: f2 06 20 30 ld [ %i0 + 0x30 ], %i1
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
2040224: a0 10 00 08 mov %o0, %l0
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
2040228: 40 00 82 c9 call 2060d4c <.urem>
204022c: 92 10 00 19 mov %i1, %o1
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
2040230: 92 10 00 1c mov %i4, %o1
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
2040234: d0 26 a0 20 st %o0, [ %i2 + 0x20 ]
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
2040238: 40 00 82 19 call 2060a9c <.udiv>
204023c: 90 10 00 1d mov %i5, %o0
gino = gino % fs->group_inodes;
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);
2040240: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2040244: 85 2a 20 04 sll %o0, 4, %g2
2040248: 91 2a 20 06 sll %o0, 6, %o0
204024c: 90 00 80 08 add %g2, %o0, %o0
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;
2040250: fa 00 40 08 ld [ %g1 + %o0 ], %i5
2040254: 92 10 00 19 mov %i1, %o1
2040258: 90 10 00 10 mov %l0, %o0
204025c: 40 00 82 10 call 2060a9c <.udiv>
2040260: ba 07 60 02 add %i5, 2, %i5
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2040264: c0 2e a0 10 clrb [ %i2 + 0x10 ]
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
2040268: ba 07 40 08 add %i5, %o0, %i5
handle->bnum = 0;
204026c: c0 26 a0 14 clr [ %i2 + 0x14 ]
2040270: fa 26 a0 1c st %i5, [ %i2 + 0x1c ]
handle->buffer = NULL;
2040274: c0 26 a0 18 clr [ %i2 + 0x18 ]
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
2040278: 80 a6 e0 00 cmp %i3, 0
204027c: 02 bf ff db be 20401e8 <rtems_rfs_inode_open+0x28> <== NEVER TAKEN
2040280: 82 10 20 00 clr %g1
rc = rtems_rfs_inode_load (fs, handle);
2040284: 7f ff ff a3 call 2040110 <rtems_rfs_inode_load>
2040288: 93 e8 00 1a restore %g0, %i2, %o1
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
204028c: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040290: 40 00 2e 50 call 204bbd0 <printf> <== NOT EXECUTED
2040294: 90 12 20 d0 or %o0, 0xd0, %o0 ! 206d8d0 <__FUNCTION__.7603+0x1ea8><== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
2040298: 10 bf ff d2 b 20401e0 <rtems_rfs_inode_open+0x20> <== NOT EXECUTED
204029c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
0204050c <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
204050c: 9d e3 bf a0 save %sp, -96, %sp
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
2040510: c2 06 20 0c ld [ %i0 + 0xc ], %g1
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
2040514: ba 10 00 18 mov %i0, %i5
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
2040518: 80 a0 60 00 cmp %g1, 0
204051c: 02 80 00 23 be 20405a8 <rtems_rfs_inode_time_stamp_now+0x9c><== NEVER TAKEN
2040520: b0 10 20 06 mov 6, %i0
return ENXIO;
now = time (NULL);
2040524: 40 00 4e 5d call 2053e98 <time>
2040528: 90 10 20 00 clr %o0
if (atime)
204052c: 80 a6 60 00 cmp %i1, 0
2040530: 02 80 00 0f be 204056c <rtems_rfs_inode_time_stamp_now+0x60><== NEVER TAKEN
2040534: 80 a6 a0 00 cmp %i2, 0
*/
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);
2040538: c2 07 60 0c ld [ %i5 + 0xc ], %g1
204053c: 85 32 20 18 srl %o0, 0x18, %g2
2040540: c4 28 60 10 stb %g2, [ %g1 + 0x10 ]
2040544: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2040548: 85 32 20 10 srl %o0, 0x10, %g2
204054c: c4 28 60 11 stb %g2, [ %g1 + 0x11 ]
2040550: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2040554: 85 32 20 08 srl %o0, 8, %g2
2040558: c4 28 60 12 stb %g2, [ %g1 + 0x12 ]
204055c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2040560: d0 28 60 13 stb %o0, [ %g1 + 0x13 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2040564: 82 10 20 01 mov 1, %g1
2040568: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
204056c: 02 80 00 0f be 20405a8 <rtems_rfs_inode_time_stamp_now+0x9c><== NEVER TAKEN
2040570: b0 10 20 00 clr %i0
*/
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);
2040574: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2040578: 85 32 20 18 srl %o0, 0x18, %g2
204057c: c4 28 60 14 stb %g2, [ %g1 + 0x14 ]
2040580: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2040584: 85 32 20 10 srl %o0, 0x10, %g2
2040588: c4 28 60 15 stb %g2, [ %g1 + 0x15 ]
204058c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2040590: 85 32 20 08 srl %o0, 8, %g2
2040594: c4 28 60 16 stb %g2, [ %g1 + 0x16 ]
2040598: c2 07 60 0c ld [ %i5 + 0xc ], %g1
204059c: d0 28 60 17 stb %o0, [ %g1 + 0x17 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20405a0: 82 10 20 01 mov 1, %g1
20405a4: c2 2f 60 10 stb %g1, [ %i5 + 0x10 ]
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
20405a8: 81 c7 e0 08 ret
20405ac: 81 e8 00 00 restore
020402a0 <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
20402a0: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
20402a4: 90 10 20 00 clr %o0
20402a8: 13 00 08 00 sethi %hi(0x200000), %o1
20402ac: 7f ff 98 60 call 202642c <rtems_rfs_trace>
20402b0: ba 10 00 18 mov %i0, %i5
20402b4: 80 8a 20 ff btst 0xff, %o0
20402b8: 02 80 00 0e be 20402f0 <rtems_rfs_inode_unload+0x50> <== ALWAYS TAKEN
20402bc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
20402c0: 17 00 81 b1 sethi %hi(0x206c400), %o3 <== NOT EXECUTED
20402c4: d2 06 60 08 ld [ %i1 + 8 ], %o1 <== NOT EXECUTED
20402c8: d4 06 60 24 ld [ %i1 + 0x24 ], %o2 <== NOT EXECUTED
20402cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20402d0: 02 80 00 04 be 20402e0 <rtems_rfs_inode_unload+0x40> <== NOT EXECUTED
20402d4: 96 12 e0 c0 or %o3, 0xc0, %o3 <== NOT EXECUTED
20402d8: 17 00 81 b1 sethi %hi(0x206c400), %o3 <== NOT EXECUTED
20402dc: 96 12 e0 b8 or %o3, 0xb8, %o3 ! 206c4b8 <__FUNCTION__.7603+0xa90><== NOT EXECUTED
20402e0: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
20402e4: 40 00 2e 3b call 204bbd0 <printf> <== NOT EXECUTED
20402e8: 90 12 20 f8 or %o0, 0xf8, %o0 ! 206d8f8 <__FUNCTION__.7603+0x1ed0><== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
20402ec: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED
20402f0: 80 a0 60 00 cmp %g1, 0
20402f4: 02 80 00 06 be 204030c <rtems_rfs_inode_unload+0x6c>
20402f8: b0 10 20 00 clr %i0
{
if (handle->loads == 0)
20402fc: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
2040300: 80 a0 60 00 cmp %g1, 0
2040304: 12 80 00 04 bne 2040314 <rtems_rfs_inode_unload+0x74> <== ALWAYS TAKEN
2040308: b0 10 20 05 mov 5, %i0
handle->node = NULL;
}
}
return rc;
}
204030c: 81 c7 e0 08 ret
2040310: 81 e8 00 00 restore
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
2040314: 82 00 7f ff add %g1, -1, %g1
2040318: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
if (handle->loads == 0)
204031c: 80 a0 60 00 cmp %g1, 0
2040320: 12 bf ff fb bne 204030c <rtems_rfs_inode_unload+0x6c>
2040324: b0 10 20 00 clr %i0
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
2040328: c2 0e 60 10 ldub [ %i1 + 0x10 ], %g1
204032c: 80 a0 60 00 cmp %g1, 0
2040330: 02 80 00 06 be 2040348 <rtems_rfs_inode_unload+0xa8>
2040334: 90 10 00 1d mov %i5, %o0
2040338: 80 a6 a0 00 cmp %i2, 0
204033c: 12 80 00 08 bne 204035c <rtems_rfs_inode_unload+0xbc> <== ALWAYS TAKEN
2040340: 01 00 00 00 nop
rtems_rfs_inode_set_ctime (handle, time (NULL));
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
2040344: 90 10 00 1d mov %i5, %o0
2040348: 7f ff eb b0 call 203b208 <rtems_rfs_buffer_handle_release>
204034c: 92 06 60 10 add %i1, 0x10, %o1
handle->node = NULL;
2040350: c0 26 60 0c clr [ %i1 + 0xc ]
}
}
return rc;
}
2040354: 81 c7 e0 08 ret
2040358: 91 e8 00 08 restore %g0, %o0, %o0
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
rtems_rfs_inode_set_ctime (handle, time (NULL));
204035c: 40 00 4e cf call 2053e98 <time>
2040360: 90 10 20 00 clr %o0
*/
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);
2040364: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2040368: 85 32 20 18 srl %o0, 0x18, %g2
204036c: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
2040370: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2040374: 85 32 20 10 srl %o0, 0x10, %g2
2040378: c4 28 60 19 stb %g2, [ %g1 + 0x19 ]
204037c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2040380: 85 32 20 08 srl %o0, 8, %g2
2040384: c4 28 60 1a stb %g2, [ %g1 + 0x1a ]
2040388: c2 06 60 0c ld [ %i1 + 0xc ], %g1
204038c: d0 28 60 1b stb %o0, [ %g1 + 0x1b ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2040390: 82 10 20 01 mov 1, %g1
2040394: 10 bf ff ec b 2040344 <rtems_rfs_inode_unload+0xa4>
2040398: c2 2e 60 10 stb %g1, [ %i1 + 0x10 ]
02040ac8 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
2040ac8: 9d e3 bf 50 save %sp, -176, %sp
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))
2040acc: 90 10 20 00 clr %o0
2040ad0: 7f ff 96 57 call 202642c <rtems_rfs_trace>
2040ad4: 13 00 40 00 sethi %hi(0x1000000), %o1
2040ad8: 80 8a 20 ff btst 0xff, %o0
2040adc: 12 80 00 50 bne 2040c1c <rtems_rfs_link+0x154> <== NEVER TAKEN
2040ae0: 92 10 00 1b mov %i3, %o1
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
2040ae4: 90 10 00 18 mov %i0, %o0
2040ae8: 92 10 00 1c mov %i4, %o1
2040aec: 94 07 bf d8 add %fp, -40, %o2
2040af0: 7f ff fd b4 call 20401c0 <rtems_rfs_inode_open>
2040af4: 96 10 20 01 mov 1, %o3
if (rc)
2040af8: a0 92 20 00 orcc %o0, 0, %l0
2040afc: 12 80 00 3d bne 2040bf0 <rtems_rfs_link+0x128> <== NEVER TAKEN
2040b00: 80 a7 60 00 cmp %i5, 0
/*
* 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)))
2040b04: 12 80 00 0b bne 2040b30 <rtems_rfs_link+0x68> <== NEVER TAKEN
2040b08: 90 10 00 18 mov %i0, %o0
* @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);
2040b0c: c2 07 bf e4 ld [ %fp + -28 ], %g1
2040b10: c4 08 60 02 ldub [ %g1 + 2 ], %g2
2040b14: 03 00 00 3c sethi %hi(0xf000), %g1
2040b18: 85 28 a0 08 sll %g2, 8, %g2
2040b1c: 84 08 80 01 and %g2, %g1, %g2
2040b20: 03 00 00 10 sethi %hi(0x4000), %g1
2040b24: 80 a0 80 01 cmp %g2, %g1
2040b28: 02 80 00 4f be 2040c64 <rtems_rfs_link+0x19c> <== NEVER TAKEN
2040b2c: 92 07 bf d8 add %fp, -40, %o1
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
2040b30: 92 10 00 1b mov %i3, %o1
2040b34: 94 07 bf b0 add %fp, -80, %o2
2040b38: 7f ff fd a2 call 20401c0 <rtems_rfs_inode_open>
2040b3c: 96 10 20 01 mov 1, %o3
2040b40: a0 10 00 08 mov %o0, %l0
if (rc)
2040b44: 80 a4 20 00 cmp %l0, 0
2040b48: 12 80 00 30 bne 2040c08 <rtems_rfs_link+0x140> <== NEVER TAKEN
2040b4c: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
2040b50: 92 07 bf b0 add %fp, -80, %o1
2040b54: 94 10 00 19 mov %i1, %o2
2040b58: 96 10 00 1a mov %i2, %o3
2040b5c: 7f ff ed 5e call 203c0d4 <rtems_rfs_dir_add_entry>
2040b60: 98 10 00 1c mov %i4, %o4
if (rc > 0)
2040b64: a0 92 20 00 orcc %o0, 0, %l0
2040b68: 14 80 00 24 bg 2040bf8 <rtems_rfs_link+0x130> <== NEVER TAKEN
2040b6c: c2 07 bf e4 ld [ %fp + -28 ], %g1
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);
if (links == 0xffff)
2040b70: 3b 3f ff c0 sethi %hi(0xffff0000), %i5
*/
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);
2040b74: c6 08 60 01 ldub [ %g1 + 1 ], %g3
2040b78: c8 08 40 00 ldub [ %g1 ], %g4
if (links == 0xffff)
2040b7c: 84 10 20 01 mov 1, %g2
*/
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);
2040b80: 89 29 20 08 sll %g4, 8, %g4
2040b84: 88 11 00 03 or %g4, %g3, %g4
if (links == 0xffff)
2040b88: b9 29 20 10 sll %g4, 0x10, %i4
2040b8c: 80 a7 00 1d cmp %i4, %i5
2040b90: 02 80 00 05 be 2040ba4 <rtems_rfs_link+0xdc> <== NEVER TAKEN
2040b94: 86 10 20 00 clr %g3
2040b98: 84 01 20 01 add %g4, 1, %g2
2040b9c: 87 28 a0 10 sll %g2, 0x10, %g3
2040ba0: 87 30 e0 18 srl %g3, 0x18, %g3
* @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);
2040ba4: c6 28 40 00 stb %g3, [ %g1 ]
2040ba8: c2 07 bf e4 ld [ %fp + -28 ], %g1
}
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);
2040bac: 92 10 20 01 mov 1, %o1
2040bb0: c4 28 60 01 stb %g2, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2040bb4: 82 10 20 01 mov 1, %g1
2040bb8: 90 07 bf b0 add %fp, -80, %o0
2040bbc: c2 2f bf e8 stb %g1, [ %fp + -24 ]
2040bc0: 7f ff fe 53 call 204050c <rtems_rfs_inode_time_stamp_now>
2040bc4: 94 10 20 01 mov 1, %o2
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
2040bc8: 92 07 bf b0 add %fp, -80, %o1
}
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);
2040bcc: a0 10 00 08 mov %o0, %l0
if (rc > 0)
2040bd0: 80 a4 20 00 cmp %l0, 0
2040bd4: 04 80 00 28 ble 2040c74 <rtems_rfs_link+0x1ac> <== ALWAYS TAKEN
2040bd8: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &parent_inode);
2040bdc: 7f ff fd f0 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040be0: 01 00 00 00 nop <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2040be4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040be8: 7f ff fd ed call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040bec: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
2040bf0: 81 c7 e0 08 ret
2040bf4: 91 e8 00 10 restore %g0, %l0, %o0
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
if (rc > 0)
{
rtems_rfs_inode_close (fs, &parent_inode);
2040bf8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040bfc: 7f ff fd e8 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040c00: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2040c04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040c08: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2040c0c: 7f ff fd e4 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040c10: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
2040c14: 81 c7 e0 08 ret <== NOT EXECUTED
2040c18: 81 e8 00 00 restore <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
2040c1c: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040c20: 40 00 2b ec call 204bbd0 <printf> <== NOT EXECUTED
2040c24: 90 12 22 18 or %o0, 0x218, %o0 ! 206da18 <__FUNCTION__.7603+0x1ff0><== NOT EXECUTED
for (c = 0; c < length; c++)
2040c28: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2040c2c: 04 80 00 08 ble 2040c4c <rtems_rfs_link+0x184> <== NOT EXECUTED
2040c30: a0 10 20 00 clr %l0 <== NOT EXECUTED
printf ("%c", name[c]);
2040c34: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
2040c38: 40 00 2c 53 call 204bd84 <putchar> <== NOT EXECUTED
2040c3c: a0 04 20 01 inc %l0 <== 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++)
2040c40: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED
2040c44: 32 bf ff fd bne,a 2040c38 <rtems_rfs_link+0x170> <== NOT EXECUTED
2040c48: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
2040c4c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2040c50: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040c54: 40 00 2b df call 204bbd0 <printf> <== NOT EXECUTED
2040c58: 90 12 22 40 or %o0, 0x240, %o0 ! 206da40 <__FUNCTION__.7603+0x2018><== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
2040c5c: 10 bf ff a3 b 2040ae8 <rtems_rfs_link+0x20> <== NOT EXECUTED
2040c60: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* 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)))
{
rtems_rfs_inode_close (fs, &target_inode);
2040c64: 7f ff fd ce call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040c68: a0 10 20 86 mov 0x86, %l0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
2040c6c: 81 c7 e0 08 ret <== NOT EXECUTED
2040c70: 91 e8 00 10 restore %g0, %l0, %o0 <== 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);
2040c74: 7f ff fd ca call 204039c <rtems_rfs_inode_close>
2040c78: 01 00 00 00 nop
if (rc > 0)
{
rtems_rfs_inode_close (fs, &target_inode);
2040c7c: 92 07 bf d8 add %fp, -40, %o1
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
2040c80: a0 10 00 08 mov %o0, %l0
if (rc > 0)
2040c84: 80 a4 20 00 cmp %l0, 0
2040c88: 14 bf ff e1 bg 2040c0c <rtems_rfs_link+0x144> <== NEVER TAKEN
2040c8c: 90 10 00 18 mov %i0, %o0
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
2040c90: 7f ff fd c3 call 204039c <rtems_rfs_inode_close>
2040c94: 01 00 00 00 nop
return rc;
2040c98: 10 bf ff d6 b 2040bf0 <rtems_rfs_link+0x128>
2040c9c: a0 10 00 08 mov %o0, %l0
02041534 <rtems_rfs_mutex_create>:
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
2041534: 9d e3 bf a0 save %sp, -96, %sp
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
2041538: 92 10 20 01 mov 1, %o1
204153c: 98 10 00 18 mov %i0, %o4
2041540: 11 14 91 94 sethi %hi(0x52465000), %o0
2041544: 94 10 20 54 mov 0x54, %o2
2041548: 90 12 23 6d or %o0, 0x36d, %o0
204154c: 96 10 20 00 clr %o3
2041550: 7f ff 30 cd call 200d884 <rtems_semaphore_create>
2041554: b0 10 20 00 clr %i0
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
2041558: 80 a2 20 00 cmp %o0, 0
204155c: 02 80 00 0f be 2041598 <rtems_rfs_mutex_create+0x64> <== ALWAYS TAKEN
2041560: ba 10 00 08 mov %o0, %i5
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041564: 90 10 20 00 clr %o0 <== NOT EXECUTED
2041568: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
204156c: 7f ff 93 b0 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041570: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2041574: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041578: 02 80 00 08 be 2041598 <rtems_rfs_mutex_create+0x64> <== NOT EXECUTED
204157c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: open failed: %s\n",
2041580: 7f ff 1d 7f call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041584: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041588: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
204158c: 11 00 81 b7 sethi %hi(0x206dc00), %o0 <== NOT EXECUTED
2041590: 40 00 29 90 call 204bbd0 <printf> <== NOT EXECUTED
2041594: 90 12 20 70 or %o0, 0x70, %o0 ! 206dc70 <__FUNCTION__.7603+0x2248><== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
2041598: 81 c7 e0 08 ret
204159c: 81 e8 00 00 restore
020415a0 <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
20415a0: 9d e3 bf a0 save %sp, -96, %sp
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
20415a4: d0 06 00 00 ld [ %i0 ], %o0
20415a8: 7f ff 31 27 call 200da44 <rtems_semaphore_delete>
20415ac: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
20415b0: ba 92 20 00 orcc %o0, 0, %i5
20415b4: 02 80 00 0e be 20415ec <rtems_rfs_mutex_destroy+0x4c> <== ALWAYS TAKEN
20415b8: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20415bc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20415c0: 7f ff 93 9b call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20415c4: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
20415c8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20415cc: 02 80 00 08 be 20415ec <rtems_rfs_mutex_destroy+0x4c> <== NOT EXECUTED
20415d0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
20415d4: 7f ff 1d 6a call 2008b7c <rtems_status_text> <== NOT EXECUTED
20415d8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20415dc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20415e0: 11 00 81 b7 sethi %hi(0x206dc00), %o0 <== NOT EXECUTED
20415e4: 40 00 29 7b call 204bbd0 <printf> <== NOT EXECUTED
20415e8: 90 12 20 98 or %o0, 0x98, %o0 ! 206dc98 <__FUNCTION__.7603+0x2270><== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
20415ec: 81 c7 e0 08 ret
20415f0: 81 e8 00 00 restore
0203b04c <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
203b04c: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
203b050: 90 10 20 00 clr %o0
203b054: 92 10 20 80 mov 0x80, %o1
203b058: 7f ff ac f5 call 202642c <rtems_rfs_trace>
203b05c: ba 10 00 18 mov %i0, %i5
203b060: 80 8a 20 ff btst 0xff, %o0
203b064: 32 80 00 1c bne,a 203b0d4 <rtems_rfs_release_chain+0x88> <== NEVER TAKEN
203b068: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
203b06c: b0 10 20 00 clr %i0
203b070: b8 07 60 04 add %i5, 4, %i4
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))
203b074: c2 07 40 00 ld [ %i5 ], %g1
203b078: 80 a0 40 1c cmp %g1, %i4
203b07c: 02 80 00 14 be 203b0cc <rtems_rfs_release_chain+0x80>
203b080: 90 10 00 1d mov %i5, %o0
203b084: 7f ff 4e 2b call 200e930 <_Chain_Get>
203b088: 01 00 00 00 nop
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
203b08c: c2 06 40 00 ld [ %i1 ], %g1
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
203b090: 92 10 00 1a mov %i2, %o1
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
203b094: 82 00 7f ff add %g1, -1, %g1
203b098: c2 26 40 00 st %g1, [ %i1 ]
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
203b09c: 40 00 2e ea call 2046c44 <rtems_rfs_buffer_bdbuf_release>
203b0a0: c0 22 20 34 clr [ %o0 + 0x34 ]
if ((rc > 0) && (rrc == 0))
203b0a4: 80 a2 20 00 cmp %o0, 0
203b0a8: 04 bf ff f4 ble 203b078 <rtems_rfs_release_chain+0x2c> <== ALWAYS TAKEN
203b0ac: c2 07 40 00 ld [ %i5 ], %g1
203b0b0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
203b0b4: 12 bf ff f1 bne 203b078 <rtems_rfs_release_chain+0x2c> <== NOT EXECUTED
203b0b8: 01 00 00 00 nop <== NOT EXECUTED
203b0bc: b0 10 00 08 mov %o0, %i0 <== 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))
203b0c0: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
203b0c4: 12 bf ff f0 bne 203b084 <rtems_rfs_release_chain+0x38> <== NOT EXECUTED
203b0c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
203b0cc: 81 c7 e0 08 ret
203b0d0: 81 e8 00 00 restore
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
203b0d4: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203b0d8: 40 00 42 be call 204bbd0 <printf> <== NOT EXECUTED
203b0dc: 90 12 23 58 or %o0, 0x358, %o0 ! 206bb58 <__FUNCTION__.7603+0x130><== NOT EXECUTED
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
203b0e0: 10 bf ff e4 b 203b070 <rtems_rfs_release_chain+0x24> <== NOT EXECUTED
203b0e4: b0 10 20 00 clr %i0 <== NOT EXECUTED
02024238 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
2024238: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
202423c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
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);
2024240: d2 06 20 08 ld [ %i0 + 8 ], %o1
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);
2024244: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
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);
2024248: 94 07 bf d8 add %fp, -40, %o2
202424c: 90 10 00 1d mov %i5, %o0
2024250: 40 00 6f dc call 20401c0 <rtems_rfs_inode_open>
2024254: 96 10 20 01 mov 1, %o3
if (rc > 0)
2024258: b8 92 20 00 orcc %o0, 0, %i4
202425c: 04 80 00 07 ble 2024278 <rtems_rfs_rtems_chown+0x40> <== ALWAYS TAKEN
2024260: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
return rtems_rfs_rtems_error ("chown: opening inode", rc);
2024264: 40 00 8c 22 call 20472ec <__errno> <== NOT EXECUTED
2024268: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202426c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2024270: 81 c7 e0 08 ret
2024274: 81 e8 00 00 restore
*/
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);
2024278: b5 2e a0 10 sll %i2, 0x10, %i2
202427c: b4 16 80 19 or %i2, %i1, %i2
2024280: 85 36 a0 18 srl %i2, 0x18, %g2
2024284: c4 28 60 04 stb %g2, [ %g1 + 4 ]
2024288: c2 07 bf e4 ld [ %fp + -28 ], %g1
202428c: 85 36 a0 10 srl %i2, 0x10, %g2
2024290: c4 28 60 05 stb %g2, [ %g1 + 5 ]
2024294: c2 07 bf e4 ld [ %fp + -28 ], %g1
2024298: b5 36 a0 08 srl %i2, 8, %i2
202429c: f4 28 60 06 stb %i2, [ %g1 + 6 ]
20242a0: c2 07 bf e4 ld [ %fp + -28 ], %g1
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
20242a4: 90 10 00 1d mov %i5, %o0
20242a8: f2 28 60 07 stb %i1, [ %g1 + 7 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20242ac: 82 10 20 01 mov 1, %g1
20242b0: 92 07 bf d8 add %fp, -40, %o1
20242b4: c2 2f bf e8 stb %g1, [ %fp + -24 ]
20242b8: 40 00 70 39 call 204039c <rtems_rfs_inode_close>
20242bc: b0 10 20 00 clr %i0
if (rc)
20242c0: 80 a2 20 00 cmp %o0, 0
20242c4: 02 bf ff eb be 2024270 <rtems_rfs_rtems_chown+0x38> <== ALWAYS TAKEN
20242c8: ba 10 00 08 mov %o0, %i5
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
20242cc: 40 00 8c 08 call 20472ec <__errno> <== NOT EXECUTED
20242d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20242d4: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
20242d8: 81 c7 e0 08 ret <== NOT EXECUTED
20242dc: 81 e8 00 00 restore <== NOT EXECUTED
020416f8 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
20416f8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
20416fc: d2 06 20 40 ld [ %i0 + 0x40 ], %o1 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2041700: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 <== NOT EXECUTED
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
2041704: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
2041708: f0 27 bf f4 st %i0, [ %fp + -12 ] <== NOT EXECUTED
args.flags = 0;
204170c: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
2041710: 40 00 09 fc call 2043f00 <rtems_io_close> <== NOT EXECUTED
2041714: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
return rtems_deviceio_errno (status);
2041718: 40 00 04 39 call 20427fc <rtems_deviceio_errno> <== NOT EXECUTED
204171c: 01 00 00 00 nop <== NOT EXECUTED
}
2041720: 81 c7 e0 08 ret <== NOT EXECUTED
2041724: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02041600 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
return 0;
}
2041600: 81 c3 e0 08 retl <== NOT EXECUTED
2041604: 90 10 20 00 clr %o0 <== NOT EXECUTED
02041608 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
2041608: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
204160c: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2041610: d2 06 20 40 ld [ %i0 + 0x40 ], %o1 <== NOT EXECUTED
args.iop = iop;
args.command = command;
2041614: f0 3f bf f0 std %i0, [ %fp + -16 ] <== NOT EXECUTED
args.buffer = buffer;
2041618: f4 27 bf f8 st %i2, [ %fp + -8 ] <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
204161c: 40 00 0a 52 call 2043f64 <rtems_io_control> <== NOT EXECUTED
2041620: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
if (status)
2041624: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2041628: 12 80 00 04 bne 2041638 <rtems_rfs_rtems_device_ioctl+0x30><== NOT EXECUTED
204162c: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
}
2041630: 81 c7 e0 08 ret <== NOT EXECUTED
2041634: 81 e8 00 00 restore <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2041638: 40 00 04 71 call 20427fc <rtems_deviceio_errno> <== NOT EXECUTED
204163c: 01 00 00 00 nop <== NOT EXECUTED
return args.ioctl_return;
}
2041640: 81 c7 e0 08 ret <== NOT EXECUTED
2041644: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020415f4 <rtems_rfs_rtems_device_lseek>:
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
return offset;
}
20415f4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
20415f8: 81 c3 e0 08 retl <== NOT EXECUTED
20415fc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
02041728 <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
2041728: 9d e3 bf 68 save %sp, -152, %sp <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
204172c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
2041730: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 <== NOT EXECUTED
const char *pathname,
int oflag,
mode_t mode)
{
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2041734: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 <== 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);
2041738: 92 10 20 00 clr %o1 <== 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
};
204173c: c2 07 60 80 ld [ %i5 + 0x80 ], %g1 <== NOT EXECUTED
2041740: 94 10 20 00 clr %o2 <== NOT EXECUTED
2041744: 7f ff 31 14 call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
2041748: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
204174c: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2041750: 12 80 00 27 bne 20417ec <rtems_rfs_rtems_device_open+0xc4><== NOT EXECUTED
2041754: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2041758: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
204175c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041760: 94 07 bf cc add %fp, -52, %o2 <== NOT EXECUTED
2041764: 7f ff fa 97 call 20401c0 <rtems_rfs_inode_open> <== NOT EXECUTED
2041768: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
204176c: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2041770: 04 80 00 2c ble 2041820 <rtems_rfs_rtems_device_open+0xf8><== NOT EXECUTED
2041774: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED
* 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);
2041778: f6 07 60 80 ld [ %i5 + 0x80 ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
204177c: 7f ff e8 5a call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041780: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041784: 7f ff 31 4e call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041788: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
204178c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041790: 12 80 00 07 bne 20417ac <rtems_rfs_rtems_device_open+0x84><== NOT EXECUTED
2041794: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
2041798: 40 00 16 d5 call 20472ec <__errno> <== NOT EXECUTED
204179c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20417a0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20417a4: 81 c7 e0 08 ret <== NOT EXECUTED
20417a8: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20417ac: 7f ff 93 20 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20417b0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20417b4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20417b8: 02 bf ff f8 be 2041798 <rtems_rfs_rtems_device_open+0x70> <== NOT EXECUTED
20417bc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20417c0: 7f ff 1c ef call 2008b7c <rtems_status_text> <== NOT EXECUTED
20417c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20417c8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20417cc: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
20417d0: 40 00 29 00 call 204bbd0 <printf> <== NOT EXECUTED
20417d4: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
20417d8: 40 00 16 c5 call 20472ec <__errno> <== NOT EXECUTED
20417dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20417e0: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20417e4: 81 c7 e0 08 ret <== NOT EXECUTED
20417e8: 81 e8 00 00 restore <== 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))
20417ec: 7f ff 93 10 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20417f0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20417f4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20417f8: 22 bf ff d9 be,a 204175c <rtems_rfs_rtems_device_open+0x34><== NOT EXECUTED
20417fc: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2041800: 7f ff 1c df call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041804: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2041808: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
204180c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041810: 40 00 28 f0 call 204bbd0 <printf> <== NOT EXECUTED
2041814: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2041818: 10 bf ff d1 b 204175c <rtems_rfs_rtems_device_open+0x34> <== NOT EXECUTED
204181c: 92 10 00 1c mov %i4, %o1 <== 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);
2041820: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* @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]);
2041824: e0 08 60 1c ldub [ %g1 + 0x1c ], %l0 <== NOT EXECUTED
2041828: f2 08 60 1d ldub [ %g1 + 0x1d ], %i1 <== NOT EXECUTED
204182c: f8 08 60 1e ldub [ %g1 + 0x1e ], %i4 <== NOT EXECUTED
2041830: f4 08 60 1f ldub [ %g1 + 0x1f ], %i2 <== NOT EXECUTED
2041834: e8 08 60 20 ldub [ %g1 + 0x20 ], %l4 <== NOT EXECUTED
2041838: e6 08 60 21 ldub [ %g1 + 0x21 ], %l3 <== NOT EXECUTED
204183c: e2 08 60 22 ldub [ %g1 + 0x22 ], %l1 <== NOT EXECUTED
2041840: e4 08 60 23 ldub [ %g1 + 0x23 ], %l2 <== NOT EXECUTED
2041844: 7f ff fa d6 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041848: 92 07 bf cc add %fp, -52, %o1 <== NOT EXECUTED
if (rc > 0)
204184c: aa 92 20 00 orcc %o0, 0, %l5 <== NOT EXECUTED
2041850: 24 80 00 0f ble,a 204188c <rtems_rfs_rtems_device_open+0x164><== NOT EXECUTED
2041854: ea 07 60 80 ld [ %i5 + 0x80 ], %l5 <== NOT EXECUTED
* 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);
2041858: f8 07 60 80 ld [ %i5 + 0x80 ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
204185c: 7f ff e8 22 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041860: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041864: 7f ff 31 16 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041868: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
204186c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041870: 12 80 00 2d bne 2041924 <rtems_rfs_rtems_device_open+0x1fc><== NOT EXECUTED
2041874: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
2041878: 40 00 16 9d call 20472ec <__errno> <== NOT EXECUTED
204187c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2041880: ea 22 00 00 st %l5, [ %o0 ] <== NOT EXECUTED
2041884: 81 c7 e0 08 ret <== NOT EXECUTED
2041888: 81 e8 00 00 restore <== NOT EXECUTED
204188c: 7f ff e8 16 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041890: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041894: 7f ff 31 0a call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041898: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
204189c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20418a0: 12 80 00 2d bne 2041954 <rtems_rfs_rtems_device_open+0x22c><== NOT EXECUTED
20418a4: 90 10 20 00 clr %o0 <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
20418a8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
20418ac: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
20418b0: a4 0c a0 ff and %l2, 0xff, %l2 <== NOT EXECUTED
20418b4: 84 0c 60 ff and %l1, 0xff, %g2 <== NOT EXECUTED
20418b8: a9 2d 20 18 sll %l4, 0x18, %l4 <== NOT EXECUTED
20418bc: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
20418c0: a6 0c e0 ff and %l3, 0xff, %l3 <== NOT EXECUTED
20418c4: a7 2c e0 10 sll %l3, 0x10, %l3 <== NOT EXECUTED
20418c8: a8 15 00 13 or %l4, %l3, %l4 <== NOT EXECUTED
20418cc: a2 15 00 12 or %l4, %l2, %l1 <== NOT EXECUTED
20418d0: a2 14 40 02 or %l1, %g2, %l1 <== NOT EXECUTED
20418d4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
20418d8: e2 26 20 40 st %l1, [ %i0 + 0x40 ] <== NOT EXECUTED
args.iop = iop;
20418dc: f0 27 bf f4 st %i0, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
20418e0: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
20418e4: a1 2c 20 18 sll %l0, 0x18, %l0 <== NOT EXECUTED
20418e8: b4 0e a0 ff and %i2, 0xff, %i2 <== NOT EXECUTED
args.mode = mode;
20418ec: f6 27 bf fc st %i3, [ %fp + -4 ] <== NOT EXECUTED
20418f0: b2 0e 60 ff and %i1, 0xff, %i1 <== NOT EXECUTED
20418f4: b8 0f 20 ff and %i4, 0xff, %i4 <== NOT EXECUTED
20418f8: b3 2e 60 10 sll %i1, 0x10, %i1 <== NOT EXECUTED
20418fc: b9 2f 20 08 sll %i4, 8, %i4 <== NOT EXECUTED
2041900: 90 14 00 19 or %l0, %i1, %o0 <== NOT EXECUTED
2041904: 90 12 00 1a or %o0, %i2, %o0 <== NOT EXECUTED
2041908: 90 12 00 1c or %o0, %i4, %o0 <== NOT EXECUTED
status = rtems_io_open (major, minor, (void *) &args);
204190c: 40 00 09 af call 2043fc8 <rtems_io_open> <== NOT EXECUTED
2041910: d0 26 20 3c st %o0, [ %i0 + 0x3c ] <== NOT EXECUTED
return rtems_deviceio_errno (status);
2041914: 40 00 03 ba call 20427fc <rtems_deviceio_errno> <== NOT EXECUTED
2041918: 01 00 00 00 nop <== NOT EXECUTED
}
204191c: 81 c7 e0 08 ret <== NOT EXECUTED
2041920: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041924: 7f ff 92 c2 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041928: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
204192c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041930: 02 bf ff d2 be 2041878 <rtems_rfs_rtems_device_open+0x150><== NOT EXECUTED
2041934: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041938: 7f ff 1c 91 call 2008b7c <rtems_status_text> <== NOT EXECUTED
204193c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041940: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041944: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041948: 40 00 28 a2 call 204bbd0 <printf> <== NOT EXECUTED
204194c: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
2041950: 30 bf ff ca b,a 2041878 <rtems_rfs_rtems_device_open+0x150><== 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))
2041954: 7f ff 92 b6 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041958: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
204195c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041960: 22 bf ff d3 be,a 20418ac <rtems_rfs_rtems_device_open+0x184><== NOT EXECUTED
2041964: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041968: 7f ff 1c 85 call 2008b7c <rtems_status_text> <== NOT EXECUTED
204196c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041970: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041974: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041978: 40 00 28 96 call 204bbd0 <printf> <== NOT EXECUTED
204197c: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
2041980: 10 bf ff cb b 20418ac <rtems_rfs_rtems_device_open+0x184> <== NOT EXECUTED
2041984: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
020416a0 <rtems_rfs_rtems_device_read>:
* @return ssize_t
*/
static ssize_t
rtems_rfs_rtems_device_read (rtems_libio_t* iop, void* buffer, size_t count)
{
20416a0: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
20416a4: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
20416a8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
20416ac: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
20416b0: d2 06 20 40 ld [ %i0 + 0x40 ], %o1 <== NOT EXECUTED
args.iop = iop;
20416b4: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
20416b8: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = buffer;
20416bc: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
args.count = count;
20416c0: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
20416c4: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
args.bytes_moved = 0;
20416c8: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
20416cc: 40 00 0a 58 call 204402c <rtems_io_read> <== NOT EXECUTED
20416d0: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
if (status)
20416d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20416d8: 12 80 00 04 bne 20416e8 <rtems_rfs_rtems_device_read+0x48><== NOT EXECUTED
20416dc: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
20416e0: 81 c7 e0 08 ret <== NOT EXECUTED
20416e4: 81 e8 00 00 restore <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
20416e8: 40 00 04 45 call 20427fc <rtems_deviceio_errno> <== NOT EXECUTED
20416ec: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
20416f0: 81 c7 e0 08 ret <== NOT EXECUTED
20416f4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02041648 <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
2041648: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
204164c: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
2041650: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_libio_rw_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
2041654: d0 06 20 3c ld [ %i0 + 0x3c ], %o0 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
2041658: d2 06 20 40 ld [ %i0 + 0x40 ], %o1 <== NOT EXECUTED
args.iop = iop;
204165c: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED
args.offset = iop->offset;
2041660: c4 3f bf e8 std %g2, [ %fp + -24 ] <== NOT EXECUTED
args.buffer = (void *) buffer;
2041664: f2 27 bf f0 st %i1, [ %fp + -16 ] <== NOT EXECUTED
args.count = count;
2041668: f4 27 bf f4 st %i2, [ %fp + -12 ] <== NOT EXECUTED
args.flags = iop->flags;
204166c: c2 27 bf f8 st %g1, [ %fp + -8 ] <== NOT EXECUTED
args.bytes_moved = 0;
2041670: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
2041674: 40 00 0a 87 call 2044090 <rtems_io_write> <== NOT EXECUTED
2041678: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
if (status)
204167c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2041680: 12 80 00 04 bne 2041690 <rtems_rfs_rtems_device_write+0x48><== NOT EXECUTED
2041684: f0 07 bf fc ld [ %fp + -4 ], %i0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
}
2041688: 81 c7 e0 08 ret <== NOT EXECUTED
204168c: 81 e8 00 00 restore <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
2041690: 40 00 04 5b call 20427fc <rtems_deviceio_errno> <== NOT EXECUTED
2041694: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
2041698: 81 c7 e0 08 ret <== NOT EXECUTED
204169c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02041990 <rtems_rfs_rtems_dir_lseek>:
*/
static off_t
rtems_rfs_rtems_dir_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
2041990: 9d e3 bf a0 save %sp, -96, %sp
switch (whence)
2041994: 80 a6 e0 01 cmp %i3, 1
2041998: 28 80 00 09 bleu,a 20419bc <rtems_rfs_rtems_dir_lseek+0x2c><== ALWAYS TAKEN
204199c: b0 10 20 00 clr %i0
break;
case SEEK_END: /* Movement past the end of the directory via lseek */
/* is not a permitted operation */
default:
return rtems_rfs_rtems_error ("dir_lseek: bad whence", EINVAL);
20419a0: 40 00 16 53 call 20472ec <__errno> <== NOT EXECUTED
20419a4: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
20419a8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20419ac: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
20419b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20419b4: 81 c7 e0 08 ret <== NOT EXECUTED
20419b8: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
break;
}
return 0;
}
20419bc: 81 c7 e0 08 ret
20419c0: 93 e8 20 00 restore %g0, 0, %o1
02041bdc <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
2041bdc: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2041be0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
2041be4: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2041be8: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2041bec: 92 10 20 00 clr %o1
.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
};
2041bf0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2041bf4: 94 10 20 00 clr %o2
2041bf8: 7f ff 2f e7 call 200db94 <rtems_semaphore_obtain>
2041bfc: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2041c00: b6 92 20 00 orcc %o0, 0, %i3
2041c04: 12 80 00 2d bne 2041cb8 <rtems_rfs_rtems_dir_open+0xdc> <== NEVER TAKEN
2041c08: 90 10 20 00 clr %o0
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2041c0c: 92 10 00 1c mov %i4, %o1
2041c10: 90 10 00 1d mov %i5, %o0
2041c14: 94 07 bf d8 add %fp, -40, %o2
2041c18: 7f ff f9 6a call 20401c0 <rtems_rfs_inode_open>
2041c1c: 96 10 20 01 mov 1, %o3
if (rc)
2041c20: b8 92 20 00 orcc %o0, 0, %i4
2041c24: 32 80 00 39 bne,a 2041d08 <rtems_rfs_rtems_dir_open+0x12c><== NEVER TAKEN
2041c28: f6 07 60 80 ld [ %i5 + 0x80 ], %i3 <== 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);
2041c2c: c2 07 bf e4 ld [ %fp + -28 ], %g1
2041c30: c4 08 60 02 ldub [ %g1 + 2 ], %g2
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
2041c34: 03 00 00 3c sethi %hi(0xf000), %g1
2041c38: 85 28 a0 08 sll %g2, 8, %g2
2041c3c: 84 08 80 01 and %g2, %g1, %g2
2041c40: 03 00 00 10 sethi %hi(0x4000), %g1
2041c44: 80 a0 80 01 cmp %g2, %g1
2041c48: 12 80 00 48 bne 2041d68 <rtems_rfs_rtems_dir_open+0x18c> <== NEVER TAKEN
2041c4c: 92 07 bf d8 add %fp, -40, %o1
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
}
iop->offset = 0;
2041c50: c0 26 20 10 clr [ %i0 + 0x10 ]
2041c54: c0 26 20 14 clr [ %i0 + 0x14 ]
rtems_rfs_inode_close (fs, &inode);
2041c58: 7f ff f9 d1 call 204039c <rtems_rfs_inode_close>
2041c5c: 90 10 00 1d mov %i5, %o0
* 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);
2041c60: f8 07 60 80 ld [ %i5 + 0x80 ], %i4
rtems_rfs_buffers_release (fs);
2041c64: 7f ff e7 20 call 203b8e4 <rtems_rfs_buffers_release>
2041c68: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041c6c: d0 07 00 00 ld [ %i4 ], %o0
2041c70: 7f ff 30 13 call 200dcbc <rtems_semaphore_release>
2041c74: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2041c78: ba 92 20 00 orcc %o0, 0, %i5
2041c7c: 02 80 00 0d be 2041cb0 <rtems_rfs_rtems_dir_open+0xd4> <== ALWAYS TAKEN
2041c80: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041c84: 7f ff 91 ea call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041c88: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041c8c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041c90: 02 80 00 44 be 2041da0 <rtems_rfs_rtems_dir_open+0x1c4> <== NOT EXECUTED
2041c94: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041c98: 7f ff 1b b9 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041c9c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041ca0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041ca4: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041ca8: 40 00 27 ca call 204bbd0 <printf> <== NOT EXECUTED
2041cac: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
2041cb0: 81 c7 e0 08 ret
2041cb4: 81 e8 00 00 restore
#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))
2041cb8: 7f ff 91 dd call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041cbc: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041cc0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041cc4: 02 bf ff d3 be 2041c10 <rtems_rfs_rtems_dir_open+0x34> <== NOT EXECUTED
2041cc8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2041ccc: 7f ff 1b ac call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041cd0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2041cd4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041cd8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041cdc: 40 00 27 bd call 204bbd0 <printf> <== NOT EXECUTED
2041ce0: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2041ce4: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2041ce8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041cec: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
2041cf0: 7f ff f9 34 call 20401c0 <rtems_rfs_inode_open> <== NOT EXECUTED
2041cf4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2041cf8: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2041cfc: 02 bf ff cd be 2041c30 <rtems_rfs_rtems_dir_open+0x54> <== NOT EXECUTED
2041d00: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
* 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);
2041d04: f6 07 60 80 ld [ %i5 + 0x80 ], %i3 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2041d08: 7f ff e6 f7 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041d0c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041d10: 7f ff 2f eb call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041d14: d0 06 c0 00 ld [ %i3 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2041d18: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041d1c: 12 80 00 07 bne 2041d38 <rtems_rfs_rtems_dir_open+0x15c> <== NOT EXECUTED
2041d20: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
2041d24: 40 00 15 72 call 20472ec <__errno> <== NOT EXECUTED
2041d28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2041d2c: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2041d30: 81 c7 e0 08 ret <== NOT EXECUTED
2041d34: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041d38: 7f ff 91 bd call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041d3c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041d40: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041d44: 02 bf ff f8 be 2041d24 <rtems_rfs_rtems_dir_open+0x148> <== NOT EXECUTED
2041d48: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041d4c: 7f ff 1b 8c call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041d50: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041d54: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041d58: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041d5c: 40 00 27 9d call 204bbd0 <printf> <== NOT EXECUTED
2041d60: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
2041d64: 30 bf ff f0 b,a 2041d24 <rtems_rfs_rtems_dir_open+0x148> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
2041d68: 7f ff f9 8d call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041d6c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
* 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);
2041d70: f8 07 60 80 ld [ %i5 + 0x80 ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2041d74: 7f ff e6 dc call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041d78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041d7c: 7f ff 2f d0 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041d80: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2041d84: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041d88: 12 80 00 08 bne 2041da8 <rtems_rfs_rtems_dir_open+0x1cc> <== NOT EXECUTED
2041d8c: 90 10 20 00 clr %o0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
2041d90: 40 00 15 57 call 20472ec <__errno> <== NOT EXECUTED
2041d94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2041d98: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2041d9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2041da0: 81 c7 e0 08 ret <== NOT EXECUTED
2041da4: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041da8: 7f ff 91 a1 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041dac: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041db0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041db4: 02 bf ff f7 be 2041d90 <rtems_rfs_rtems_dir_open+0x1b4> <== NOT EXECUTED
2041db8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041dbc: 7f ff 1b 70 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041dc0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041dc4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041dc8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041dcc: 40 00 27 81 call 204bbd0 <printf> <== NOT EXECUTED
2041dd0: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
2041dd4: 30 bf ff ef b,a 2041d90 <rtems_rfs_rtems_dir_open+0x1b4> <== NOT EXECUTED
020419c4 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
20419c4: 9d e3 bf 70 save %sp, -144, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
20419c8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
20419cc: f6 06 20 24 ld [ %i0 + 0x24 ], %i3
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
20419d0: f8 00 60 20 ld [ %g1 + 0x20 ], %i4
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
20419d4: ba 10 00 18 mov %i0, %i5
.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
};
20419d8: c2 07 20 80 ld [ %i4 + 0x80 ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20419dc: 92 10 20 00 clr %o1
20419e0: d0 00 40 00 ld [ %g1 ], %o0
20419e4: 7f ff 30 6c call 200db94 <rtems_semaphore_obtain>
20419e8: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
20419ec: b0 92 20 00 orcc %o0, 0, %i0
20419f0: 12 80 00 40 bne 2041af0 <rtems_rfs_rtems_dir_read+0x12c> <== NEVER TAKEN
20419f4: 90 10 20 00 clr %o0
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20419f8: 92 10 00 1b mov %i3, %o1
20419fc: 90 10 00 1c mov %i4, %o0
2041a00: 94 07 bf d4 add %fp, -44, %o2
2041a04: 7f ff f9 ef call 20401c0 <rtems_rfs_inode_open>
2041a08: 96 10 20 01 mov 1, %o3
if (rc)
2041a0c: b6 92 20 00 orcc %o0, 0, %i3
2041a10: 32 80 00 4c bne,a 2041b40 <rtems_rfs_rtems_dir_read+0x17c><== NEVER TAKEN
2041a14: fa 07 20 80 ld [ %i4 + 0x80 ], %i5 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
2041a18: 90 10 00 1a mov %i2, %o0
2041a1c: 92 10 21 18 mov 0x118, %o1
2041a20: 40 00 7c 1f call 2060a9c <.udiv>
2041a24: b0 10 20 00 clr %i0
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
2041a28: b4 92 20 00 orcc %o0, 0, %i2
2041a2c: 02 80 00 1a be 2041a94 <rtems_rfs_rtems_dir_read+0xd0> <== NEVER TAKEN
2041a30: 92 07 bf d4 add %fp, -44, %o1
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
2041a34: d4 1f 60 10 ldd [ %i5 + 0x10 ], %o2
* 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,
2041a38: b6 10 20 00 clr %i3
2041a3c: 10 80 00 0d b 2041a70 <rtems_rfs_rtems_dir_read+0xac>
2041a40: b0 10 20 00 clr %i0
if (rc == ENOENT)
{
rc = 0;
break;
}
if (rc > 0)
2041a44: 80 a2 20 00 cmp %o0, 0
2041a48: 14 80 00 4a bg 2041b70 <rtems_rfs_rtems_dir_read+0x1ac> <== NEVER TAKEN
2041a4c: d4 07 bf fc ld [ %fp + -4 ], %o2
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
2041a50: c4 1f 60 10 ldd [ %i5 + 0x10 ], %g2
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
2041a54: b6 06 e0 01 inc %i3
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
2041a58: 96 80 c0 0a addcc %g3, %o2, %o3
2041a5c: 94 40 a0 00 addx %g2, 0, %o2
2041a60: d4 3f 60 10 std %o2, [ %i5 + 0x10 ]
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
2041a64: 80 a6 c0 1a cmp %i3, %i2
2041a68: 02 80 00 0a be 2041a90 <rtems_rfs_rtems_dir_read+0xcc> <== ALWAYS TAKEN
2041a6c: b0 06 21 18 add %i0, 0x118, %i0
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
2041a70: 98 06 40 18 add %i1, %i0, %o4
2041a74: 90 10 00 1c mov %i4, %o0
2041a78: 92 07 bf d4 add %fp, -44, %o1
2041a7c: 7f ff eb c3 call 203c988 <rtems_rfs_dir_read>
2041a80: 9a 07 bf fc add %fp, -4, %o5
if (rc == ENOENT)
2041a84: 80 a2 20 02 cmp %o0, 2
2041a88: 12 bf ff ef bne 2041a44 <rtems_rfs_rtems_dir_read+0x80>
2041a8c: a0 10 00 08 mov %o0, %l0
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2041a90: 92 07 bf d4 add %fp, -44, %o1
2041a94: 7f ff fa 42 call 204039c <rtems_rfs_inode_close>
2041a98: 90 10 00 1c mov %i4, %o0
* 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);
2041a9c: fa 07 20 80 ld [ %i4 + 0x80 ], %i5
rtems_rfs_buffers_release (fs);
2041aa0: 7f ff e7 91 call 203b8e4 <rtems_rfs_buffers_release>
2041aa4: 90 10 00 1c mov %i4, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041aa8: 7f ff 30 85 call 200dcbc <rtems_semaphore_release>
2041aac: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2041ab0: ba 92 20 00 orcc %o0, 0, %i5
2041ab4: 02 80 00 0d be 2041ae8 <rtems_rfs_rtems_dir_read+0x124> <== ALWAYS TAKEN
2041ab8: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041abc: 7f ff 92 5c call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041ac0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041ac4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041ac8: 02 80 00 28 be 2041b68 <rtems_rfs_rtems_dir_read+0x1a4> <== NOT EXECUTED
2041acc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041ad0: 7f ff 1c 2b call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041ad4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041ad8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041adc: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041ae0: 40 00 28 3c call 204bbd0 <printf> <== NOT EXECUTED
2041ae4: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return bytes_transferred;
}
2041ae8: 81 c7 e0 08 ret
2041aec: 81 e8 00 00 restore
#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))
2041af0: 7f ff 92 4f call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041af4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041af8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041afc: 02 bf ff c0 be 20419fc <rtems_rfs_rtems_dir_read+0x38> <== NOT EXECUTED
2041b00: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2041b04: 7f ff 1c 1e call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041b08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2041b0c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041b10: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041b14: 40 00 28 2f call 204bbd0 <printf> <== NOT EXECUTED
2041b18: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2041b1c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2041b20: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2041b24: 94 07 bf d4 add %fp, -44, %o2 <== NOT EXECUTED
2041b28: 7f ff f9 a6 call 20401c0 <rtems_rfs_inode_open> <== NOT EXECUTED
2041b2c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2041b30: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2041b34: 02 bf ff ba be 2041a1c <rtems_rfs_rtems_dir_read+0x58> <== NOT EXECUTED
2041b38: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
* 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);
2041b3c: fa 07 20 80 ld [ %i4 + 0x80 ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2041b40: 7f ff e7 69 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041b44: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041b48: 7f ff 30 5d call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041b4c: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2041b50: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041b54: 12 80 00 16 bne 2041bac <rtems_rfs_rtems_dir_read+0x1e8> <== NOT EXECUTED
2041b58: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
2041b5c: 40 00 15 e4 call 20472ec <__errno> <== NOT EXECUTED
2041b60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2041b64: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2041b68: 81 c7 e0 08 ret <== NOT EXECUTED
2041b6c: 81 e8 00 00 restore <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
2041b70: 40 00 15 df call 20472ec <__errno> <== NOT EXECUTED
2041b74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2041b78: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
rc = 0;
break;
}
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
2041b7c: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
2041b80: 7f ff fa 07 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041b84: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
* 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);
2041b88: fa 07 20 80 ld [ %i4 + 0x80 ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2041b8c: 7f ff e7 56 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041b90: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041b94: 7f ff 30 4a call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041b98: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2041b9c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041ba0: 02 bf ff d2 be 2041ae8 <rtems_rfs_rtems_dir_read+0x124> <== NOT EXECUTED
2041ba4: 90 10 20 00 clr %o0 <== NOT EXECUTED
2041ba8: 30 bf ff c5 b,a 2041abc <rtems_rfs_rtems_dir_read+0xf8> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041bac: 7f ff 92 20 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041bb0: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041bb4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041bb8: 02 bf ff e9 be 2041b5c <rtems_rfs_rtems_dir_read+0x198> <== NOT EXECUTED
2041bbc: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041bc0: 7f ff 1b ef call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041bc4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041bc8: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041bcc: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041bd0: 40 00 28 00 call 204bbd0 <printf> <== NOT EXECUTED
2041bd4: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
2041bd8: 30 bf ff e1 b,a 2041b5c <rtems_rfs_rtems_dir_read+0x198> <== NOT EXECUTED
0202454c <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)
{
202454c: 9d e3 bf 78 save %sp, -136, %sp
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc (ctx);
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
2024550: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
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);
2024554: d2 06 20 20 ld [ %i0 + 0x20 ], %o1
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);
2024558: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
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);
202455c: 94 07 bf d8 add %fp, -40, %o2
2024560: 90 10 00 1d mov %i5, %o0
2024564: 40 00 6f 17 call 20401c0 <rtems_rfs_inode_open>
2024568: 96 10 20 01 mov 1, %o3
if (rc == 0) {
202456c: b8 92 20 00 orcc %o0, 0, %i4
2024570: 12 80 00 0e bne 20245a8 <rtems_rfs_rtems_eval_path+0x5c> <== NEVER TAKEN
2024574: 92 07 bf d8 add %fp, -40, %o1
rtems_filesystem_eval_path_generic (
2024578: 90 10 00 18 mov %i0, %o0
202457c: 15 00 81 9e sethi %hi(0x2067800), %o2
2024580: 40 00 1f e4 call 202c510 <rtems_filesystem_eval_path_generic>
2024584: 94 12 a1 a8 or %o2, 0x1a8, %o2 ! 20679a8 <rtems_rfs_rtems_eval_config>
ctx,
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
2024588: 90 10 00 1d mov %i5, %o0
202458c: 40 00 6f 84 call 204039c <rtems_rfs_inode_close>
2024590: 92 07 bf d8 add %fp, -40, %o1
if (rc != 0) {
2024594: ba 92 20 00 orcc %o0, 0, %i5
2024598: 12 80 00 0c bne 20245c8 <rtems_rfs_rtems_eval_path+0x7c> <== NEVER TAKEN
202459c: 01 00 00 00 nop
20245a0: 81 c7 e0 08 ret
20245a4: 81 e8 00 00 restore
);
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
20245a8: 40 00 8b 51 call 20472ec <__errno> <== NOT EXECUTED
20245ac: 01 00 00 00 nop <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
);
}
} else {
rtems_filesystem_eval_path_error (
20245b0: 92 10 3f ff mov -1, %o1 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
20245b4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
);
}
} else {
rtems_filesystem_eval_path_error (
20245b8: 7f ff 98 3a call 200a6a0 <rtems_filesystem_eval_path_error><== NOT EXECUTED
20245bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20245c0: 81 c7 e0 08 ret <== NOT EXECUTED
20245c4: 81 e8 00 00 restore <== NOT EXECUTED
);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc != 0) {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
20245c8: 40 00 8b 49 call 20472ec <__errno> <== NOT EXECUTED
20245cc: 01 00 00 00 nop <== NOT EXECUTED
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc != 0) {
rtems_filesystem_eval_path_error (
20245d0: 92 10 3f ff mov -1, %o1 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
20245d4: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
if (rc != 0) {
rtems_filesystem_eval_path_error (
20245d8: 7f ff 98 32 call 200a6a0 <rtems_filesystem_eval_path_error><== NOT EXECUTED
20245dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20245e0: 81 c7 e0 08 ret <== NOT EXECUTED
20245e4: 81 e8 00 00 restore <== NOT EXECUTED
020245e8 <rtems_rfs_rtems_eval_token>:
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
20245e8: 9d e3 bf 90 save %sp, -112, %sp
* @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);
20245ec: c4 06 60 0c ld [ %i1 + 0xc ], %g2
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(
20245f0: 90 10 00 18 mov %i0, %o0
* @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;
20245f4: c6 08 a0 06 ldub [ %g2 + 6 ], %g3
20245f8: d6 08 a0 07 ldub [ %g2 + 7 ], %o3
* @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);
20245fc: c2 08 a0 02 ldub [ %g2 + 2 ], %g1
2024600: d4 08 a0 03 ldub [ %g2 + 3 ], %o2
* @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;
2024604: d8 08 a0 04 ldub [ %g2 + 4 ], %o4
2024608: c4 08 a0 05 ldub [ %g2 + 5 ], %g2
* @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);
202460c: 83 28 60 08 sll %g1, 8, %g1
* @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;
2024610: 87 28 e0 08 sll %g3, 8, %g3
* @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;
2024614: 85 28 a0 10 sll %g2, 0x10, %g2
* @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;
2024618: 96 10 c0 0b or %g3, %o3, %o3
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
202461c: ba 10 00 18 mov %i0, %i5
* @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;
2024620: 99 2b 20 18 sll %o4, 0x18, %o4
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(
2024624: 97 2a e0 10 sll %o3, 0x10, %o3
2024628: 98 13 00 02 or %o4, %g2, %o4
202462c: 92 10 20 01 mov 1, %o1
2024630: 94 12 80 01 or %o2, %g1, %o2
2024634: 97 32 e0 10 srl %o3, 0x10, %o3
2024638: 99 33 20 10 srl %o4, 0x10, %o4
202463c: 40 00 1f a7 call 202c4d8 <rtems_filesystem_eval_path_check_access>
2024640: b0 10 20 01 mov 1, %i0
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) {
2024644: 80 8a 20 ff btst 0xff, %o0
2024648: 02 80 00 10 be 2024688 <rtems_rfs_rtems_eval_token+0xa0> <== NEVER TAKEN
202464c: 80 a6 e0 01 cmp %i3, 1
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
2024650: 22 80 00 1c be,a 20246c0 <rtems_rfs_rtems_eval_token+0xd8>
2024654: c2 4e 80 00 ldsb [ %i2 ], %g1
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);
2024658: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
202465c: 92 10 00 19 mov %i1, %o1
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);
2024660: f8 00 60 20 ld [ %g1 + 0x20 ], %i4
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
2024664: 94 10 00 1a mov %i2, %o2
2024668: 90 10 00 1c mov %i4, %o0
202466c: 96 10 00 1b mov %i3, %o3
2024670: 98 07 bf f4 add %fp, -12, %o4
2024674: 40 00 5d 45 call 203bb88 <rtems_rfs_dir_lookup_ino>
2024678: 9a 07 bf f8 add %fp, -8, %o5
tokenlen,
&entry_ino,
&entry_doff
);
if (rc == 0) {
202467c: 80 a2 20 00 cmp %o0, 0
2024680: 02 80 00 16 be 20246d8 <rtems_rfs_rtems_eval_token+0xf0>
2024684: b0 10 20 02 mov 2, %i0
2024688: 81 c7 e0 08 ret
202468c: 81 e8 00 00 restore
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;
2024690: 90 07 60 18 add %i5, 0x18, %o0
2024694: 40 00 02 17 call 2024ef0 <rtems_rfs_rtems_set_handlers>
2024698: 92 10 00 19 mov %i1, %o1
202469c: 80 8a 20 ff btst 0xff, %o0
20246a0: 02 80 00 48 be 20247c0 <rtems_rfs_rtems_eval_token+0x1d8> <== NEVER TAKEN
20246a4: c2 07 bf f4 ld [ %fp + -12 ], %g1
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
20246a8: b0 0e e0 ff and %i3, 0xff, %i0
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);
20246ac: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
rtems_rfs_rtems_set_pathloc_doff (currentloc, entry_doff);
20246b0: c2 07 bf f8 ld [ %fp + -8 ], %g1
20246b4: c2 27 60 24 st %g1, [ %i5 + 0x24 ]
}
}
}
return status;
}
20246b8: 81 c7 e0 08 ret
20246bc: 81 e8 00 00 restore
20246c0: 80 a0 60 2e cmp %g1, 0x2e
20246c4: 32 bf ff e6 bne,a 202465c <rtems_rfs_rtems_eval_token+0x74>
20246c8: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
20246cc: c0 27 60 0c clr [ %i5 + 0xc ]
20246d0: 81 c7 e0 08 ret
20246d4: 81 e8 00 00 restore
&entry_ino,
&entry_doff
);
if (rc == 0) {
rc = rtems_rfs_inode_close (fs, inode);
20246d8: 90 10 00 1c mov %i4, %o0
20246dc: 40 00 6f 30 call 204039c <rtems_rfs_inode_close>
20246e0: 92 10 00 19 mov %i1, %o1
if (rc == 0) {
20246e4: 80 a2 20 00 cmp %o0, 0
20246e8: 02 80 00 09 be 202470c <rtems_rfs_rtems_eval_token+0x124> <== ALWAYS TAKEN
20246ec: d2 07 bf f4 ld [ %fp + -12 ], %o1
if (rc != 0) {
/*
* This prevents the rtems_rfs_inode_close() from doing something in
* rtems_rfs_rtems_eval_path().
*/
memset (inode, 0, sizeof(*inode));
20246f0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20246f4: 92 10 20 00 clr %o1 <== NOT EXECUTED
20246f8: 94 10 20 28 mov 0x28, %o2 <== NOT EXECUTED
20246fc: 40 00 98 c9 call 204aa20 <memset> <== NOT EXECUTED
2024700: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2024704: 81 c7 e0 08 ret <== NOT EXECUTED
2024708: 81 e8 00 00 restore <== 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);
202470c: 90 10 00 1c mov %i4, %o0
2024710: 94 10 00 19 mov %i1, %o2
2024714: 40 00 6e ab call 20401c0 <rtems_rfs_inode_open>
2024718: 96 10 20 01 mov 1, %o3
}
if (rc != 0) {
202471c: 80 a2 20 00 cmp %o0, 0
2024720: 12 bf ff f5 bne 20246f4 <rtems_rfs_rtems_eval_token+0x10c><== NEVER TAKEN
2024724: 90 10 00 19 mov %i1, %o0
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)
2024728: 7f ff fd ef call 2023ee4 <rtems_rfs_rtems_node_type_by_inode>
202472c: 90 10 00 19 mov %i1, %o0
== 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);
2024730: c2 07 60 04 ld [ %i5 + 4 ], %g1
2024734: c0 27 60 0c clr [ %i5 + 0xc ]
2024738: 80 a0 00 01 cmp %g0, %g1
202473c: b6 60 3f ff subx %g0, -1, %i3
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
2024740: 80 a2 20 03 cmp %o0, 3
2024744: 12 bf ff d3 bne 2024690 <rtems_rfs_rtems_eval_token+0xa8>
2024748: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
202474c: 80 88 60 10 btst 0x10, %g1
2024750: 12 80 00 04 bne 2024760 <rtems_rfs_rtems_eval_token+0x178>
2024754: 80 8e e0 ff btst 0xff, %i3
2024758: 12 bf ff cf bne 2024694 <rtems_rfs_rtems_eval_token+0xac>
202475c: 90 07 60 18 add %i5, 0x18, %o0
rtems_filesystem_eval_path_context_t* ctx,
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
2024760: 82 10 24 00 mov 0x400, %g1
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);
2024764: f6 07 bf f4 ld [ %fp + -12 ], %i3
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
char *link = malloc(len + 1);
2024768: 90 10 24 01 mov 0x401, %o0
202476c: 7f ff 93 27 call 2009408 <malloc>
2024770: c2 27 bf fc st %g1, [ %fp + -4 ]
if (link != NULL) {
2024774: b4 92 20 00 orcc %o0, 0, %i2
2024778: 02 80 00 1f be 20247f4 <rtems_rfs_rtems_eval_token+0x20c> <== NEVER TAKEN
202477c: 90 10 00 1c mov %i4, %o0
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
2024780: 92 10 00 1b mov %i3, %o1
2024784: 94 10 00 1a mov %i2, %o2
2024788: 96 10 24 00 mov 0x400, %o3
202478c: 40 00 72 f5 call 2041360 <rtems_rfs_symlink_read>
2024790: 98 07 bf fc add %fp, -4, %o4
if (rc == 0) {
2024794: 80 a2 20 00 cmp %o0, 0
2024798: 12 80 00 13 bne 20247e4 <rtems_rfs_rtems_eval_token+0x1fc><== NEVER TAKEN
202479c: 90 10 00 1d mov %i5, %o0
rtems_filesystem_eval_path_recursive (ctx, link, len);
20247a0: d4 07 bf fc ld [ %fp + -4 ], %o2
20247a4: 7f ff 98 b7 call 200aa80 <rtems_filesystem_eval_path_recursive>
20247a8: 92 10 00 1a mov %i2, %o1
} else {
rtems_filesystem_eval_path_error (ctx, 0);
}
free(link);
20247ac: 90 10 00 1a mov %i2, %o0
20247b0: 7f ff 91 8d call 2008de4 <free>
20247b4: b0 10 20 01 mov 1, %i0
20247b8: 81 c7 e0 08 ret
20247bc: 81 e8 00 00 restore
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: set handlers", rc)
20247c0: 40 00 8a cb call 20472ec <__errno> <== NOT EXECUTED
20247c4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
20247c8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
if (!terminal) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
20247cc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: set handlers", rc)
20247d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
if (!terminal) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
20247d4: 7f ff 97 b3 call 200a6a0 <rtems_filesystem_eval_path_error><== NOT EXECUTED
20247d8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20247dc: 81 c7 e0 08 ret <== NOT EXECUTED
20247e0: 81 e8 00 00 restore <== NOT EXECUTED
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
if (rc == 0) {
rtems_filesystem_eval_path_recursive (ctx, link, len);
} else {
rtems_filesystem_eval_path_error (ctx, 0);
20247e4: 7f ff 97 af call 200a6a0 <rtems_filesystem_eval_path_error><== NOT EXECUTED
20247e8: 92 10 20 00 clr %o1 <== NOT EXECUTED
}
free(link);
20247ec: 10 bf ff f1 b 20247b0 <rtems_rfs_rtems_eval_token+0x1c8> <== NOT EXECUTED
20247f0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
} else {
rtems_filesystem_eval_path_error (ctx, ENOMEM);
20247f4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20247f8: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED
20247fc: 7f ff 97 a9 call 200a6a0 <rtems_filesystem_eval_path_error><== NOT EXECUTED
2024800: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2024804: 81 c7 e0 08 ret <== NOT EXECUTED
2024808: 81 e8 00 00 restore <== NOT EXECUTED
020242e0 <rtems_rfs_rtems_fchmod>:
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
20242e0: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20242e4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
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);
20242e8: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED
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);
20242ec: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 <== NOT EXECUTED
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);
20242f0: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
20242f4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20242f8: 40 00 6f b2 call 20401c0 <rtems_rfs_inode_open> <== NOT EXECUTED
20242fc: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
2024300: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2024304: 02 80 00 07 be 2024320 <rtems_rfs_rtems_fchmod+0x40> <== NOT EXECUTED
2024308: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
202430c: 40 00 8b f8 call 20472ec <__errno> <== NOT EXECUTED
2024310: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024314: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2024318: 81 c7 e0 08 ret <== NOT EXECUTED
202431c: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2024320: 07 00 00 3c sethi %hi(0xf000), %g3 <== 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);
2024324: c4 08 60 02 ldub [ %g1 + 2 ], %g2 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2024328: b2 0e 6f ff and %i1, 0xfff, %i1 <== NOT EXECUTED
202432c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2024330: 84 08 80 03 and %g2, %g3, %g2 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
2024334: b2 10 80 19 or %g2, %i1, %i1 <== NOT EXECUTED
* @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);
2024338: 85 36 60 08 srl %i1, 8, %g2 <== NOT EXECUTED
202433c: c4 28 60 02 stb %g2, [ %g1 + 2 ] <== NOT EXECUTED
2024340: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
2024344: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2024348: f2 28 60 03 stb %i1, [ %g1 + 3 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
202434c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2024350: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2024354: c2 2f bf e8 stb %g1, [ %fp + -24 ] <== NOT EXECUTED
2024358: 40 00 70 11 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
202435c: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (rc > 0)
2024360: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2024364: 04 bf ff ed ble 2024318 <rtems_rfs_rtems_fchmod+0x38> <== NOT EXECUTED
2024368: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
202436c: 40 00 8b e0 call 20472ec <__errno> <== NOT EXECUTED
2024370: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024374: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2024378: 81 c7 e0 08 ret <== NOT EXECUTED
202437c: 81 e8 00 00 restore <== NOT EXECUTED
02024ebc <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
2024ebc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
2024ec0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
if (rc)
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
return 0;
2024ec4: b0 10 20 00 clr %i0 <== NOT EXECUTED
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
2024ec8: 40 00 5a 61 call 203b84c <rtems_rfs_buffer_sync> <== NOT EXECUTED
2024ecc: d0 00 60 20 ld [ %g1 + 0x20 ], %o0 <== NOT EXECUTED
if (rc)
2024ed0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2024ed4: 02 80 00 05 be 2024ee8 <rtems_rfs_rtems_fdatasync+0x2c> <== NOT EXECUTED
2024ed8: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
2024edc: 40 00 89 04 call 20472ec <__errno> <== NOT EXECUTED
2024ee0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024ee4: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
return 0;
}
2024ee8: 81 c7 e0 08 ret <== NOT EXECUTED
2024eec: 81 e8 00 00 restore <== NOT EXECUTED
020420c8 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
20420c8: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
20420cc: f8 06 20 28 ld [ %i0 + 0x28 ], %i4
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20420d0: 92 10 20 00 clr %o1
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
20420d4: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
20420d8: 94 10 20 00 clr %o2
20420dc: fa 00 60 98 ld [ %g1 + 0x98 ], %i5
.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
};
20420e0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
20420e4: 7f ff 2e ac call 200db94 <rtems_semaphore_obtain>
20420e8: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20420ec: b0 92 20 00 orcc %o0, 0, %i0
20420f0: 12 80 00 21 bne 2042174 <rtems_rfs_rtems_file_close+0xac> <== NEVER TAKEN
20420f4: 90 10 20 00 clr %o0
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);
20420f8: 90 10 00 1d mov %i5, %o0
20420fc: 7f ff ec 83 call 203d308 <rtems_rfs_file_close>
2042100: 92 10 00 1c mov %i4, %o1
if (rc > 0)
2042104: b0 92 20 00 orcc %o0, 0, %i0
2042108: 24 80 00 07 ble,a 2042124 <rtems_rfs_rtems_file_close+0x5c><== ALWAYS TAKEN
204210c: f8 07 60 80 ld [ %i5 + 0x80 ], %i4
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
2042110: 40 00 14 77 call 20472ec <__errno> <== NOT EXECUTED
2042114: 01 00 00 00 nop <== NOT EXECUTED
2042118: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
204211c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
* 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);
2042120: f8 07 60 80 ld [ %i5 + 0x80 ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2042124: 7f ff e5 f0 call 203b8e4 <rtems_rfs_buffers_release>
2042128: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
204212c: 7f ff 2e e4 call 200dcbc <rtems_semaphore_release>
2042130: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2042134: ba 92 20 00 orcc %o0, 0, %i5
2042138: 02 80 00 0d be 204216c <rtems_rfs_rtems_file_close+0xa4> <== ALWAYS TAKEN
204213c: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2042140: 7f ff 90 bb call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042144: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042148: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
204214c: 02 80 00 08 be 204216c <rtems_rfs_rtems_file_close+0xa4> <== NOT EXECUTED
2042150: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2042154: 7f ff 1a 8a call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042158: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
204215c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042160: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042164: 40 00 26 9b call 204bbd0 <printf> <== NOT EXECUTED
2042168: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return rc;
}
204216c: 81 c7 e0 08 ret
2042170: 81 e8 00 00 restore
#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))
2042174: 7f ff 90 ae call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042178: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
204217c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2042180: 22 bf ff df be,a 20420fc <rtems_rfs_rtems_file_close+0x34><== NOT EXECUTED
2042184: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2042188: 7f ff 1a 7d call 2008b7c <rtems_status_text> <== NOT EXECUTED
204218c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2042190: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042194: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042198: 40 00 26 8e call 204bbd0 <printf> <== NOT EXECUTED
204219c: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
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);
20421a0: 10 bf ff d7 b 20420fc <rtems_rfs_rtems_file_close+0x34> <== NOT EXECUTED
20421a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
02041fb8 <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
2041fb8: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2041fbc: f6 06 20 28 ld [ %i0 + 0x28 ], %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2041fc0: 92 10 20 00 clr %o1
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));
2041fc4: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
2041fc8: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2041fcc: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
2041fd0: ba 10 00 1a mov %i2, %i5
.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
};
2041fd4: c2 00 60 80 ld [ %g1 + 0x80 ], %g1
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
2041fd8: b8 10 00 19 mov %i1, %i4
2041fdc: 7f ff 2e ee call 200db94 <rtems_semaphore_obtain>
2041fe0: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2041fe4: b4 92 20 00 orcc %o0, 0, %i2
2041fe8: 12 80 00 1d bne 204205c <rtems_rfs_rtems_file_ftruncate+0xa4><== NEVER TAKEN
2041fec: 90 10 20 00 clr %o0
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);
2041ff0: 92 10 00 1c mov %i4, %o1
2041ff4: 90 10 00 1b mov %i3, %o0
2041ff8: 7f ff ef 1d call 203dc6c <rtems_rfs_file_set_size>
2041ffc: 94 10 00 1d mov %i5, %o2
if (rc)
2042000: b8 92 20 00 orcc %o0, 0, %i4
2042004: 22 80 00 07 be,a 2042020 <rtems_rfs_rtems_file_ftruncate+0x68><== ALWAYS TAKEN
2042008: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
204200c: 40 00 14 b8 call 20472ec <__errno> <== NOT EXECUTED
2042010: 01 00 00 00 nop <== NOT EXECUTED
2042014: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2042018: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
204201c: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
2042020: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2042024: 7f ff e0 cc call 203a354 <rtems_rfs_block_get_size>
2042028: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
204202c: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
rc = rtems_rfs_file_set_size (file, length);
if (rc)
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
iop->size = rtems_rfs_file_size (file);
2042030: d0 3e 20 08 std %o0, [ %i0 + 8 ]
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2042034: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
2042038: 7f ff e6 2b call 203b8e4 <rtems_rfs_buffers_release>
204203c: f6 02 20 80 ld [ %o0 + 0x80 ], %i3
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2042040: 7f ff 2f 1f call 200dcbc <rtems_semaphore_release>
2042044: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2042048: b6 92 20 00 orcc %o0, 0, %i3
204204c: 12 80 00 11 bne 2042090 <rtems_rfs_rtems_file_ftruncate+0xd8><== NEVER TAKEN
2042050: 90 10 20 00 clr %o0
return rc;
}
2042054: 81 c7 e0 08 ret
2042058: 91 e8 00 1c restore %g0, %i4, %o0
#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))
204205c: 7f ff 90 f4 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042060: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042064: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2042068: 22 bf ff e3 be,a 2041ff4 <rtems_rfs_rtems_file_ftruncate+0x3c><== NOT EXECUTED
204206c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2042070: 7f ff 1a c3 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042074: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2042078: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
204207c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042080: 40 00 26 d4 call 204bbd0 <printf> <== NOT EXECUTED
2042084: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
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);
2042088: 10 bf ff db b 2041ff4 <rtems_rfs_rtems_file_ftruncate+0x3c><== NOT EXECUTED
204208c: 92 10 00 1c mov %i4, %o1 <== 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))
2042090: 7f ff 90 e7 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042094: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042098: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
204209c: 02 bf ff ee be 2042054 <rtems_rfs_rtems_file_ftruncate+0x9c><== NOT EXECUTED
20420a0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20420a4: 7f ff 1a b6 call 2008b7c <rtems_status_text> <== NOT EXECUTED
20420a8: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rc;
}
20420ac: b0 10 00 1c mov %i4, %i0 <== NOT EXECUTED
20420b0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20420b4: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
20420b8: 40 00 26 c6 call 204bbd0 <printf> <== NOT EXECUTED
20420bc: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
20420c0: 81 c7 e0 08 ret <== NOT EXECUTED
20420c4: 81 e8 00 00 restore <== NOT EXECUTED
02041dd8 <rtems_rfs_rtems_file_ioctl>:
static int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
return 0;
}
2041dd8: 81 c3 e0 08 retl <== NOT EXECUTED
2041ddc: 90 10 20 00 clr %o0 <== NOT EXECUTED
02042430 <rtems_rfs_rtems_file_lseek>:
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
2042430: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2042434: fa 06 20 28 ld [ %i0 + 0x28 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2042438: 92 10 20 00 clr %o1
int rc;
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));
204243c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2042440: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2042444: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
.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
};
2042448: c2 00 60 80 ld [ %g1 + 0x80 ], %g1
204244c: 7f ff 2d d2 call 200db94 <rtems_semaphore_obtain>
2042450: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2042454: b8 92 20 00 orcc %o0, 0, %i4
2042458: 12 80 00 26 bne 20424f0 <rtems_rfs_rtems_file_lseek+0xc0> <== NEVER TAKEN
204245c: 90 10 20 00 clr %o0
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));
pos = iop->offset;
2042460: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2
rc = rtems_rfs_file_seek (file, pos, &pos);
2042464: 90 10 00 1d mov %i5, %o0
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));
pos = iop->offset;
2042468: c4 3f bf f8 std %g2, [ %fp + -8 ]
rc = rtems_rfs_file_seek (file, pos, &pos);
204246c: 92 10 00 02 mov %g2, %o1
2042470: 94 10 00 03 mov %g3, %o2
2042474: 7f ff ed bc call 203db64 <rtems_rfs_file_seek>
2042478: 96 07 bf f8 add %fp, -8, %o3
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
204247c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
2042480: b8 10 00 08 mov %o0, %i4
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2042484: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
2042488: 80 a7 20 00 cmp %i4, 0
204248c: 02 80 00 0f be 20424c8 <rtems_rfs_rtems_file_lseek+0x98> <== ALWAYS TAKEN
2042490: fa 02 20 80 ld [ %o0 + 0x80 ], %i5
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
2042494: 7f ff e5 14 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2042498: 01 00 00 00 nop <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
204249c: 7f ff 2e 08 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20424a0: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20424a4: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20424a8: 12 80 00 2d bne 204255c <rtems_rfs_rtems_file_lseek+0x12c><== NOT EXECUTED
20424ac: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
20424b0: 40 00 13 8f call 20472ec <__errno> <== NOT EXECUTED
20424b4: 31 3f ff ff sethi %hi(0xfffffc00), %i0 <== NOT EXECUTED
20424b8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20424bc: b0 16 23 ff or %i0, 0x3ff, %i0 <== NOT EXECUTED
20424c0: 81 c7 e0 08 ret <== NOT EXECUTED
20424c4: 93 e8 00 18 restore %g0, %i0, %o1 <== NOT EXECUTED
20424c8: 7f ff e5 07 call 203b8e4 <rtems_rfs_buffers_release>
20424cc: 01 00 00 00 nop
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20424d0: 7f ff 2d fb call 200dcbc <rtems_semaphore_release>
20424d4: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20424d8: ba 92 20 00 orcc %o0, 0, %i5
20424dc: 12 80 00 12 bne 2042524 <rtems_rfs_rtems_file_lseek+0xf4> <== NEVER TAKEN
20424e0: 90 10 20 00 clr %o0
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return iop->offset;
20424e4: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0
}
20424e8: 81 c7 e0 08 ret
20424ec: 81 e8 00 00 restore
#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))
20424f0: 7f ff 8f cf call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20424f4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20424f8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20424fc: 22 bf ff da be,a 2042464 <rtems_rfs_rtems_file_lseek+0x34><== NOT EXECUTED
2042500: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2042504: 7f ff 19 9e call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042508: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
204250c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042510: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042514: 40 00 25 af call 204bbd0 <printf> <== NOT EXECUTED
2042518: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
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));
pos = iop->offset;
204251c: 10 bf ff d2 b 2042464 <rtems_rfs_rtems_file_lseek+0x34> <== NOT EXECUTED
2042520: c4 1e 20 10 ldd [ %i0 + 0x10 ], %g2 <== 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))
2042524: 7f ff 8f c2 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042528: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
204252c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2042530: 22 bf ff ee be,a 20424e8 <rtems_rfs_rtems_file_lseek+0xb8><== NOT EXECUTED
2042534: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2042538: 7f ff 19 91 call 2008b7c <rtems_status_text> <== NOT EXECUTED
204253c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042540: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042544: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042548: 40 00 25 a2 call 204bbd0 <printf> <== NOT EXECUTED
204254c: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
2042550: f0 1e 20 10 ldd [ %i0 + 0x10 ], %i0 <== NOT EXECUTED
2042554: 81 c7 e0 08 ret <== NOT EXECUTED
2042558: 81 e8 00 00 restore <== 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))
204255c: 7f ff 8f b4 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042560: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042564: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2042568: 02 bf ff d2 be 20424b0 <rtems_rfs_rtems_file_lseek+0x80> <== NOT EXECUTED
204256c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2042570: 7f ff 19 83 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042574: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042578: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
204257c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042580: 40 00 25 94 call 204bbd0 <printf> <== NOT EXECUTED
2042584: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
2042588: 30 bf ff ca b,a 20424b0 <rtems_rfs_rtems_file_lseek+0x80><== NOT EXECUTED
0204258c <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
204258c: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
2042590: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2042594: 92 10 20 00 clr %o1
2042598: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
204259c: 94 10 20 00 clr %o2
.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
};
20425a0: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
20425a4: b8 10 00 18 mov %i0, %i4
20425a8: 7f ff 2d 7b call 200db94 <rtems_semaphore_obtain>
20425ac: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20425b0: b6 92 20 00 orcc %o0, 0, %i3
20425b4: 12 80 00 27 bne 2042650 <rtems_rfs_rtems_file_open+0xc4> <== NEVER TAKEN
20425b8: 90 10 20 00 clr %o0
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
20425bc: d2 07 20 24 ld [ %i4 + 0x24 ], %o1
20425c0: 90 10 00 1d mov %i5, %o0
20425c4: 94 10 20 00 clr %o2
20425c8: 7f ff ea 7f call 203cfc4 <rtems_rfs_file_open>
20425cc: 96 07 bf fc add %fp, -4, %o3
if (rc > 0)
20425d0: b6 92 20 00 orcc %o0, 0, %i3
20425d4: 04 80 00 33 ble 20426a0 <rtems_rfs_rtems_file_open+0x114> <== ALWAYS TAKEN
20425d8: c2 07 bf fc ld [ %fp + -4 ], %g1
* 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);
20425dc: f8 07 60 80 ld [ %i5 + 0x80 ], %i4 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
20425e0: 7f ff e4 c1 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
20425e4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20425e8: 7f ff 2d b5 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20425ec: d0 07 00 00 ld [ %i4 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20425f0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20425f4: 12 80 00 07 bne 2042610 <rtems_rfs_rtems_file_open+0x84> <== NOT EXECUTED
20425f8: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
return rtems_rfs_rtems_error ("file-open: open", rc);
20425fc: 40 00 13 3c call 20472ec <__errno> <== NOT EXECUTED
2042600: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2042604: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2042608: 81 c7 e0 08 ret
204260c: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2042610: 7f ff 8f 87 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042614: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042618: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
204261c: 02 bf ff f8 be 20425fc <rtems_rfs_rtems_file_open+0x70> <== NOT EXECUTED
2042620: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2042624: 7f ff 19 56 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042628: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
204262c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042630: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042634: 40 00 25 67 call 204bbd0 <printf> <== NOT EXECUTED
2042638: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
204263c: 40 00 13 2c call 20472ec <__errno> <== NOT EXECUTED
2042640: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2042644: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2042648: 81 c7 e0 08 ret <== NOT EXECUTED
204264c: 81 e8 00 00 restore <== 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))
2042650: 7f ff 8f 77 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042654: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042658: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
204265c: 22 bf ff d9 be,a 20425c0 <rtems_rfs_rtems_file_open+0x34><== NOT EXECUTED
2042660: d2 07 20 24 ld [ %i4 + 0x24 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2042664: 7f ff 19 46 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042668: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
204266c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042670: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042674: 40 00 25 57 call 204bbd0 <printf> <== NOT EXECUTED
2042678: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
204267c: d2 07 20 24 ld [ %i4 + 0x24 ], %o1 <== NOT EXECUTED
2042680: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2042684: 94 10 20 00 clr %o2 <== NOT EXECUTED
2042688: 7f ff ea 4f call 203cfc4 <rtems_rfs_file_open> <== NOT EXECUTED
204268c: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
2042690: b6 92 20 00 orcc %o0, 0, %i3 <== NOT EXECUTED
2042694: 34 bf ff d3 bg,a 20425e0 <rtems_rfs_rtems_file_open+0x54><== NOT EXECUTED
2042698: f8 07 60 80 ld [ %i5 + 0x80 ], %i4 <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
204269c: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
rtems_rfs_rtems_set_iop_file_handle (iop, file);
rtems_rfs_rtems_unlock (fs);
return 0;
20426a0: b0 10 20 00 clr %i0
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
20426a4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
20426a8: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
20426ac: 7f ff df 2a call 203a354 <rtems_rfs_block_get_size>
20426b0: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_set_iop_file_handle (iop, file);
20426b4: c2 07 bf fc ld [ %fp + -4 ], %g1
* 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);
20426b8: f6 07 60 80 ld [ %i5 + 0x80 ], %i3
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
iop->size = rtems_rfs_file_size (file);
20426bc: d0 3f 20 08 std %o0, [ %i4 + 8 ]
rtems_rfs_rtems_set_iop_file_handle (iop, file);
20426c0: c2 27 20 28 st %g1, [ %i4 + 0x28 ]
rtems_rfs_buffers_release (fs);
20426c4: 7f ff e4 88 call 203b8e4 <rtems_rfs_buffers_release>
20426c8: 90 10 00 1d mov %i5, %o0
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20426cc: 7f ff 2d 7c call 200dcbc <rtems_semaphore_release>
20426d0: d0 06 c0 00 ld [ %i3 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20426d4: ba 92 20 00 orcc %o0, 0, %i5
20426d8: 02 bf ff cc be 2042608 <rtems_rfs_rtems_file_open+0x7c> <== ALWAYS TAKEN
20426dc: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20426e0: 7f ff 8f 53 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20426e4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20426e8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20426ec: 02 80 00 08 be 204270c <rtems_rfs_rtems_file_open+0x180> <== NOT EXECUTED
20426f0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
20426f4: 7f ff 19 22 call 2008b7c <rtems_status_text> <== NOT EXECUTED
20426f8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20426fc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042700: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042704: 40 00 25 33 call 204bbd0 <printf> <== NOT EXECUTED
2042708: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
204270c: 81 c7 e0 08 ret <== NOT EXECUTED
2042710: 81 e8 00 00 restore <== NOT EXECUTED
02041de0 <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
2041de0: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
2041de4: fa 06 20 28 ld [ %i0 + 0x28 ], %i5
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2041de8: 92 10 20 00 clr %o1
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));
2041dec: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2041df0: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2041df4: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
.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
};
2041df8: c2 00 60 80 ld [ %g1 + 0x80 ], %g1
2041dfc: 7f ff 2f 66 call 200db94 <rtems_semaphore_obtain>
2041e00: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2041e04: b8 92 20 00 orcc %o0, 0, %i4
2041e08: 12 80 00 5b bne 2041f74 <rtems_rfs_rtems_file_read+0x194> <== NEVER TAKEN
2041e0c: 90 10 20 00 clr %o0
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2041e10: d2 07 60 1c ld [ %i5 + 0x1c ], %o1
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;
2041e14: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
2041e18: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
2041e1c: f0 06 20 14 ld [ %i0 + 0x14 ], %i0
2041e20: 7f ff e1 4d call 203a354 <rtems_rfs_block_get_size>
2041e24: 92 02 60 84 add %o1, 0x84, %o1
if (pos < rtems_rfs_file_size (file))
2041e28: 80 a2 00 1c cmp %o0, %i4
2041e2c: 08 80 00 43 bleu 2041f38 <rtems_rfs_rtems_file_read+0x158><== ALWAYS TAKEN
2041e30: 01 00 00 00 nop
{
while (count)
2041e34: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2041e38: 12 80 00 16 bne 2041e90 <rtems_rfs_rtems_file_read+0xb0> <== ALWAYS TAKEN
2041e3c: b0 10 20 00 clr %i0
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2041e40: 10 80 00 29 b 2041ee4 <rtems_rfs_rtems_file_read+0x104> <== NOT EXECUTED
2041e44: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
2041e48: c4 07 60 0c ld [ %i5 + 0xc ], %g2
2041e4c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2041e50: d2 00 a0 1c ld [ %g2 + 0x1c ], %o1
2041e54: 90 10 00 19 mov %i1, %o0
2041e58: 92 02 40 01 add %o1, %g1, %o1
2041e5c: 40 00 22 65 call 204a7f0 <memcpy>
2041e60: 94 10 00 1c mov %i4, %o2
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
2041e64: 90 10 00 1d mov %i5, %o0
2041e68: 92 10 00 1c mov %i4, %o1
2041e6c: 94 10 20 01 mov 1, %o2
2041e70: 7f ff ee 75 call 203d844 <rtems_rfs_file_io_end>
2041e74: b2 06 40 1c add %i1, %i4, %i1
if (rc > 0)
2041e78: 80 a2 20 00 cmp %o0, 0
2041e7c: 14 80 00 16 bg 2041ed4 <rtems_rfs_rtems_file_read+0xf4> <== NEVER TAKEN
2041e80: b6 10 00 08 mov %o0, %i3
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
2041e84: 80 a6 a0 00 cmp %i2, 0
2041e88: 02 80 00 16 be 2041ee0 <rtems_rfs_rtems_file_read+0x100> <== ALWAYS TAKEN
2041e8c: b0 07 00 18 add %i4, %i0, %i0
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
2041e90: 92 07 bf fc add %fp, -4, %o1
2041e94: 94 10 20 01 mov 1, %o2
2041e98: 7f ff ed de call 203d610 <rtems_rfs_file_io_start>
2041e9c: 90 10 00 1d mov %i5, %o0
if (rc > 0)
2041ea0: b8 92 20 00 orcc %o0, 0, %i4
2041ea4: 14 80 00 41 bg 2041fa8 <rtems_rfs_rtems_file_read+0x1c8> <== NEVER TAKEN
2041ea8: 01 00 00 00 nop
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
2041eac: f8 07 bf fc ld [ %fp + -4 ], %i4
2041eb0: 80 a7 20 00 cmp %i4, 0
2041eb4: 02 80 00 0b be 2041ee0 <rtems_rfs_rtems_file_read+0x100> <== NEVER TAKEN
2041eb8: 80 a7 00 1a cmp %i4, %i2
break;
if (size > count)
2041ebc: 28 bf ff e3 bleu,a 2041e48 <rtems_rfs_rtems_file_read+0x68><== ALWAYS TAKEN
2041ec0: b4 26 80 1c sub %i2, %i4, %i2
size = count;
2041ec4: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
2041ec8: f4 27 bf fc st %i2, [ %fp + -4 ] <== NOT EXECUTED
2041ecc: 10 bf ff df b 2041e48 <rtems_rfs_rtems_file_read+0x68> <== NOT EXECUTED
2041ed0: b4 10 20 00 clr %i2 <== NOT EXECUTED
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
2041ed4: 40 00 15 06 call 20472ec <__errno> <== NOT EXECUTED
2041ed8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2041edc: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2041ee0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2041ee4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
2041ee8: 7f ff e6 7f call 203b8e4 <rtems_rfs_buffers_release>
2041eec: fa 02 20 80 ld [ %o0 + 0x80 ], %i5
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041ef0: 7f ff 2f 73 call 200dcbc <rtems_semaphore_release>
2041ef4: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2041ef8: ba 92 20 00 orcc %o0, 0, %i5
2041efc: 02 80 00 0d be 2041f30 <rtems_rfs_rtems_file_read+0x150> <== ALWAYS TAKEN
2041f00: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2041f04: 7f ff 91 4a call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041f08: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041f0c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041f10: 02 80 00 08 be 2041f30 <rtems_rfs_rtems_file_read+0x150> <== NOT EXECUTED
2041f14: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2041f18: 7f ff 1b 19 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041f1c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2041f20: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041f24: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041f28: 40 00 27 2a call 204bbd0 <printf> <== NOT EXECUTED
2041f2c: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
return read;
}
2041f30: 81 c7 e0 08 ret
2041f34: 81 e8 00 00 restore
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2041f38: 12 80 00 04 bne 2041f48 <rtems_rfs_rtems_file_read+0x168> <== NEVER TAKEN
2041f3c: 80 a2 40 18 cmp %o1, %i0
2041f40: 18 bf ff be bgu 2041e38 <rtems_rfs_rtems_file_read+0x58> <== ALWAYS TAKEN
2041f44: 80 a6 a0 00 cmp %i2, 0
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2041f48: c2 07 60 1c ld [ %i5 + 0x1c ], %g1 <== NOT EXECUTED
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;
2041f4c: b0 10 20 00 clr %i0 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2041f50: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
2041f54: 7f ff e6 64 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2041f58: fa 02 20 80 ld [ %o0 + 0x80 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2041f5c: 7f ff 2f 58 call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2041f60: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2041f64: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2041f68: 02 bf ff f2 be 2041f30 <rtems_rfs_rtems_file_read+0x150> <== NOT EXECUTED
2041f6c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2041f70: 30 bf ff e5 b,a 2041f04 <rtems_rfs_rtems_file_read+0x124><== 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))
2041f74: 7f ff 91 2e call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041f78: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2041f7c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041f80: 22 bf ff a5 be,a 2041e14 <rtems_rfs_rtems_file_read+0x34><== NOT EXECUTED
2041f84: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2041f88: 7f ff 1a fd call 2008b7c <rtems_status_text> <== NOT EXECUTED
2041f8c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2041f90: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2041f94: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2041f98: 40 00 27 0e call 204bbd0 <printf> <== NOT EXECUTED
2041f9c: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
2041fa0: 10 bf ff 9d b 2041e14 <rtems_rfs_rtems_file_read+0x34> <== NOT EXECUTED
2041fa4: d2 07 60 1c ld [ %i5 + 0x1c ], %o1 <== NOT EXECUTED
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
2041fa8: 40 00 14 d1 call 20472ec <__errno> <== NOT EXECUTED
2041fac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2041fb0: 10 bf ff cc b 2041ee0 <rtems_rfs_rtems_file_read+0x100> <== NOT EXECUTED
2041fb4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
020421a8 <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
20421a8: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
20421ac: f6 06 20 28 ld [ %i0 + 0x28 ], %i3
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
20421b0: 92 10 20 00 clr %o1
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));
20421b4: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
20421b8: 94 10 20 00 clr %o2
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
20421bc: c2 00 60 98 ld [ %g1 + 0x98 ], %g1
.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
};
20421c0: c2 00 60 80 ld [ %g1 + 0x80 ], %g1
20421c4: 7f ff 2e 74 call 200db94 <rtems_semaphore_obtain>
20421c8: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20421cc: ba 92 20 00 orcc %o0, 0, %i5
20421d0: 12 80 00 60 bne 2042350 <rtems_rfs_rtems_file_write+0x1a8><== NEVER TAKEN
20421d4: 90 10 20 00 clr %o0
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
20421d8: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
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;
20421dc: f8 1e 20 10 ldd [ %i0 + 0x10 ], %i4
20421e0: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
20421e4: 7f ff e0 5c call 203a354 <rtems_rfs_block_get_size>
20421e8: 92 02 60 84 add %o1, 0x84, %o1
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
20421ec: 80 a2 00 1c cmp %o0, %i4
20421f0: 38 80 00 0e bgu,a 2042228 <rtems_rfs_rtems_file_write+0x80><== NEVER TAKEN
20421f4: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== NOT EXECUTED
20421f8: 80 a2 00 1c cmp %o0, %i4
20421fc: 02 80 00 48 be 204231c <rtems_rfs_rtems_file_write+0x174> <== ALWAYS TAKEN
2042200: 80 a2 40 1d cmp %o1, %i5
{
rc = rtems_rfs_file_set_size (file, pos + 1);
2042204: 86 87 60 01 addcc %i5, 1, %g3 <== NOT EXECUTED
2042208: 84 47 20 00 addx %i4, 0, %g2 <== NOT EXECUTED
204220c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2042210: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
2042214: 7f ff ee 96 call 203dc6c <rtems_rfs_file_set_size> <== NOT EXECUTED
2042218: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
if (rc)
204221c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
2042220: 12 80 00 67 bne 20423bc <rtems_rfs_rtems_file_write+0x214><== NOT EXECUTED
2042224: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1 <== 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);
2042228: 94 10 00 1d mov %i5, %o2
204222c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
2042230: 92 10 00 1c mov %i4, %o1
2042234: 7f ff e0 19 call 203a298 <rtems_rfs_block_get_bpos>
2042238: 96 06 e0 10 add %i3, 0x10, %o3
while (count)
204223c: 80 a6 a0 00 cmp %i2, 0
2042240: 12 80 00 07 bne 204225c <rtems_rfs_rtems_file_write+0xb4> <== ALWAYS TAKEN
2042244: ba 10 20 00 clr %i5
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
2042248: 10 80 00 26 b 20422e0 <rtems_rfs_rtems_file_write+0x138> <== NOT EXECUTED
204224c: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
2042250: b4 a6 80 1c subcc %i2, %i4, %i2
2042254: 02 80 00 22 be 20422dc <rtems_rfs_rtems_file_write+0x134>
2042258: ba 07 40 1c add %i5, %i4, %i5
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
204225c: 92 07 bf fc add %fp, -4, %o1
rtems_rfs_file_set_bpos (file, pos);
while (count)
{
size_t size = count;
2042260: f4 27 bf fc st %i2, [ %fp + -4 ]
rc = rtems_rfs_file_io_start (file, &size, false);
2042264: 94 10 20 00 clr %o2
2042268: 7f ff ec ea call 203d610 <rtems_rfs_file_io_start>
204226c: 90 10 00 1b mov %i3, %o0
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
2042270: 92 10 00 19 mov %i1, %o1
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
2042274: 80 a2 20 00 cmp %o0, 0
2042278: 12 80 00 5e bne 20423f0 <rtems_rfs_rtems_file_write+0x248>
204227c: b8 10 00 08 mov %o0, %i4
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
2042280: d4 07 bf fc ld [ %fp + -4 ], %o2
2042284: 80 a2 80 1a cmp %o2, %i2
2042288: 28 80 00 05 bleu,a 204229c <rtems_rfs_rtems_file_write+0xf4>
204228c: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
size = count;
2042290: f4 27 bf fc st %i2, [ %fp + -4 ]
2042294: 94 10 00 1a mov %i2, %o2
memcpy (rtems_rfs_file_data (file), data, size);
2042298: c4 06 e0 0c ld [ %i3 + 0xc ], %g2
204229c: c2 06 e0 14 ld [ %i3 + 0x14 ], %g1
20422a0: d0 00 a0 1c ld [ %g2 + 0x1c ], %o0
20422a4: 40 00 21 53 call 204a7f0 <memcpy>
20422a8: 90 02 00 01 add %o0, %g1, %o0
data += size;
20422ac: f8 07 bf fc ld [ %fp + -4 ], %i4
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
20422b0: 90 10 00 1b mov %i3, %o0
20422b4: 92 10 00 1c mov %i4, %o1
20422b8: 94 10 20 00 clr %o2
20422bc: 7f ff ed 62 call 203d844 <rtems_rfs_file_io_end>
20422c0: b2 06 40 1c add %i1, %i4, %i1
if (rc)
20422c4: 80 a2 20 00 cmp %o0, 0
20422c8: 02 bf ff e2 be 2042250 <rtems_rfs_rtems_file_write+0xa8> <== ALWAYS TAKEN
20422cc: a0 10 00 08 mov %o0, %l0
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
20422d0: 40 00 14 07 call 20472ec <__errno> <== NOT EXECUTED
20422d4: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
20422d8: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
break;
}
}
iop->size = rtems_rfs_file_size (file);
20422dc: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1
20422e0: d0 02 60 98 ld [ %o1 + 0x98 ], %o0
20422e4: 7f ff e0 1c call 203a354 <rtems_rfs_block_get_size>
20422e8: 92 02 60 84 add %o1, 0x84, %o1
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20422ec: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
20422f0: d0 3e 20 08 std %o0, [ %i0 + 8 ]
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20422f4: d0 00 60 98 ld [ %g1 + 0x98 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
20422f8: 7f ff e5 7b call 203b8e4 <rtems_rfs_buffers_release>
20422fc: f8 02 20 80 ld [ %o0 + 0x80 ], %i4
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2042300: 7f ff 2e 6f call 200dcbc <rtems_semaphore_release>
2042304: d0 07 00 00 ld [ %i4 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2042308: b8 92 20 00 orcc %o0, 0, %i4
204230c: 12 80 00 1e bne 2042384 <rtems_rfs_rtems_file_write+0x1dc><== NEVER TAKEN
2042310: 90 10 20 00 clr %o0
return write;
}
2042314: 81 c7 e0 08 ret
2042318: 91 e8 00 1d restore %g0, %i5, %o0
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
204231c: 38 bf ff c3 bgu,a 2042228 <rtems_rfs_rtems_file_write+0x80>
2042320: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
{
rc = rtems_rfs_file_set_size (file, pos + 1);
2042324: 86 87 60 01 addcc %i5, 1, %g3
2042328: 84 47 20 00 addx %i4, 0, %g2
204232c: 90 10 00 1b mov %i3, %o0
2042330: 92 10 00 02 mov %g2, %o1
2042334: 7f ff ee 4e call 203dc6c <rtems_rfs_file_set_size>
2042338: 94 10 00 03 mov %g3, %o2
if (rc)
204233c: a0 92 20 00 orcc %o0, 0, %l0
2042340: 02 bf ff ba be 2042228 <rtems_rfs_rtems_file_write+0x80> <== ALWAYS TAKEN
2042344: c2 06 e0 1c ld [ %i3 + 0x1c ], %g1
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
2042348: 10 80 00 1e b 20423c0 <rtems_rfs_rtems_file_write+0x218> <== NOT EXECUTED
204234c: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== 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))
2042350: 7f ff 90 37 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042354: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042358: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
204235c: 22 bf ff a0 be,a 20421dc <rtems_rfs_rtems_file_write+0x34><== NOT EXECUTED
2042360: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2042364: 7f ff 1a 06 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042368: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
204236c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042370: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042374: 40 00 26 17 call 204bbd0 <printf> <== NOT EXECUTED
2042378: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
* size of file we are still past the end of the file as positions number
* from 0. For a specific position we need a file that has a length of one
* more.
*/
if (pos >= rtems_rfs_file_size (file))
204237c: 10 bf ff 98 b 20421dc <rtems_rfs_rtems_file_write+0x34> <== NOT EXECUTED
2042380: d2 06 e0 1c ld [ %i3 + 0x1c ], %o1 <== 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))
2042384: 7f ff 90 2a call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042388: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
204238c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2042390: 02 bf ff e1 be 2042314 <rtems_rfs_rtems_file_write+0x16c> <== NOT EXECUTED
2042394: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2042398: 7f ff 19 f9 call 2008b7c <rtems_status_text> <== NOT EXECUTED
204239c: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
20423a0: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED
20423a4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
20423a8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
20423ac: 40 00 26 09 call 204bbd0 <printf> <== NOT EXECUTED
20423b0: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
20423b4: 81 c7 e0 08 ret <== NOT EXECUTED
20423b8: 81 e8 00 00 restore <== NOT EXECUTED
if (pos >= rtems_rfs_file_size (file))
{
rc = rtems_rfs_file_set_size (file, pos + 1);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
20423bc: d0 00 60 98 ld [ %g1 + 0x98 ], %o0 <== NOT EXECUTED
20423c0: 7f ff e5 49 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
20423c4: fa 02 20 80 ld [ %o0 + 0x80 ], %i5 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
20423c8: 7f ff 2e 3d call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
20423cc: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20423d0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20423d4: 12 80 00 0b bne 2042400 <rtems_rfs_rtems_file_write+0x258><== NOT EXECUTED
20423d8: 90 10 20 00 clr %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
20423dc: 40 00 13 c4 call 20472ec <__errno> <== NOT EXECUTED
20423e0: ba 10 3f ff mov -1, %i5 <== NOT EXECUTED
20423e4: e0 22 00 00 st %l0, [ %o0 ] <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return write;
}
20423e8: 81 c7 e0 08 ret <== NOT EXECUTED
20423ec: 91 e8 00 1d restore %g0, %i5, %o0 <== NOT EXECUTED
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
20423f0: 40 00 13 bf call 20472ec <__errno>
20423f4: ba 10 3f ff mov -1, %i5
20423f8: 10 bf ff b9 b 20422dc <rtems_rfs_rtems_file_write+0x134>
20423fc: f8 22 00 00 st %i4, [ %o0 ]
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2042400: 7f ff 90 0b call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2042404: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2042408: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
204240c: 02 bf ff f4 be 20423dc <rtems_rfs_rtems_file_write+0x234> <== NOT EXECUTED
2042410: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2042414: 7f ff 19 da call 2008b7c <rtems_status_text> <== NOT EXECUTED
2042418: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
204241c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2042420: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2042424: 40 00 25 eb call 204bbd0 <printf> <== NOT EXECUTED
2042428: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
204242c: 30 bf ff ec b,a 20423dc <rtems_rfs_rtems_file_write+0x234><== NOT EXECUTED
02024bc4 <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
2024bc4: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2024bc8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
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);
2024bcc: d2 06 20 08 ld [ %i0 + 8 ], %o1
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);
2024bd0: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
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);
2024bd4: 94 07 bf d8 add %fp, -40, %o2
2024bd8: 90 10 00 1d mov %i5, %o0
2024bdc: 40 00 6d 79 call 20401c0 <rtems_rfs_inode_open>
2024be0: 96 10 20 01 mov 1, %o3
if (rc)
2024be4: b8 92 20 00 orcc %o0, 0, %i4
2024be8: 12 80 00 72 bne 2024db0 <rtems_rfs_rtems_fstat+0x1ec> <== NEVER TAKEN
2024bec: c2 07 bf e4 ld [ %fp + -28 ], %g1
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
2024bf0: 07 00 00 18 sethi %hi(0x6000), %g3
2024bf4: c4 08 60 03 ldub [ %g1 + 3 ], %g2
* @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);
2024bf8: d0 08 60 02 ldub [ %g1 + 2 ], %o0
2024bfc: 91 2a 20 08 sll %o0, 8, %o0
2024c00: 90 10 80 08 or %g2, %o0, %o0
2024c04: 05 00 00 3c sethi %hi(0xf000), %g2
2024c08: 84 0a 00 02 and %o0, %g2, %g2
2024c0c: 80 a0 80 03 cmp %g2, %g3
2024c10: 12 80 00 5e bne 2024d88 <rtems_rfs_rtems_fstat+0x1c4> <== ALWAYS TAKEN
2024c14: 07 00 00 08 sethi %hi(0x2000), %g3
* @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]);
2024c18: d8 08 60 21 ldub [ %g1 + 0x21 ], %o4 <== NOT EXECUTED
2024c1c: c6 08 60 20 ldub [ %g1 + 0x20 ], %g3 <== NOT EXECUTED
2024c20: da 08 60 23 ldub [ %g1 + 0x23 ], %o5 <== NOT EXECUTED
2024c24: f0 08 60 22 ldub [ %g1 + 0x22 ], %i0 <== NOT EXECUTED
2024c28: f8 08 60 1c ldub [ %g1 + 0x1c ], %i4 <== NOT EXECUTED
2024c2c: de 08 60 1d ldub [ %g1 + 0x1d ], %o7 <== NOT EXECUTED
2024c30: c8 08 60 1f ldub [ %g1 + 0x1f ], %g4 <== NOT EXECUTED
2024c34: c4 08 60 1e ldub [ %g1 + 0x1e ], %g2 <== NOT EXECUTED
2024c38: 83 2b 20 10 sll %o4, 0x10, %g1 <== NOT EXECUTED
2024c3c: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
2024c40: b1 2e 20 08 sll %i0, 8, %i0 <== NOT EXECUTED
2024c44: 86 10 c0 01 or %g3, %g1, %g3 <== NOT EXECUTED
2024c48: b9 2f 20 18 sll %i4, 0x18, %i4 <== NOT EXECUTED
2024c4c: 86 10 c0 0d or %g3, %o5, %g3 <== NOT EXECUTED
2024c50: 83 2b e0 10 sll %o7, 0x10, %g1 <== NOT EXECUTED
2024c54: 86 10 c0 18 or %g3, %i0, %g3 <== NOT EXECUTED
2024c58: 82 17 00 01 or %i4, %g1, %g1 <== NOT EXECUTED
2024c5c: 85 28 a0 08 sll %g2, 8, %g2 <== NOT EXECUTED
2024c60: 82 10 40 04 or %g1, %g4, %g1 <== NOT EXECUTED
{
buf->st_rdev =
2024c64: c6 26 60 1c st %g3, [ %i1 + 0x1c ] <== NOT EXECUTED
2024c68: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
2024c6c: c2 26 60 18 st %g1, [ %i1 + 0x18 ] <== 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);
2024c70: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
2024c74: 85 38 60 1f sra %g1, 0x1f, %g2
2024c78: c2 26 60 04 st %g1, [ %i1 + 4 ]
buf->st_ino = rtems_rfs_inode_ino (&inode);
2024c7c: c2 07 bf e0 ld [ %fp + -32 ], %g1
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);
2024c80: c4 26 40 00 st %g2, [ %i1 ]
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
2024c84: 40 00 00 d8 call 2024fe4 <rtems_rfs_rtems_mode>
2024c88: c2 26 60 08 st %g1, [ %i1 + 8 ]
*/
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);
2024c8c: c2 07 bf e4 ld [ %fp + -28 ], %g1
2024c90: d0 26 60 0c st %o0, [ %i1 + 0xc ]
2024c94: c6 08 60 01 ldub [ %g1 + 1 ], %g3
2024c98: c4 08 40 00 ldub [ %g1 ], %g2
if (links == 0xffff)
links = 0;
2024c9c: 09 3f ff c0 sethi %hi(0xffff0000), %g4
*/
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);
2024ca0: 85 28 a0 08 sll %g2, 8, %g2
2024ca4: 84 10 80 03 or %g2, %g3, %g2
if (links == 0xffff)
2024ca8: 87 28 a0 10 sll %g2, 0x10, %g3
2024cac: 87 30 e0 10 srl %g3, 0x10, %g3
links = 0;
2024cb0: 86 39 00 03 xnor %g4, %g3, %g3
2024cb4: 80 a0 00 03 cmp %g0, %g3
2024cb8: 86 60 20 00 subx %g0, 0, %g3
2024cbc: 84 08 80 03 and %g2, %g3, %g2
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
2024cc0: c4 36 60 10 sth %g2, [ %i1 + 0x10 ]
* @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;
2024cc4: c4 08 60 06 ldub [ %g1 + 6 ], %g2
2024cc8: c6 08 60 07 ldub [ %g1 + 7 ], %g3
2024ccc: 85 28 a0 08 sll %g2, 8, %g2
2024cd0: 84 10 80 03 or %g2, %g3, %g2
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
2024cd4: c4 36 60 12 sth %g2, [ %i1 + 0x12 ]
* @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;
2024cd8: c4 08 60 04 ldub [ %g1 + 4 ], %g2
2024cdc: c2 08 60 05 ldub [ %g1 + 5 ], %g1
/*
* 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));
2024ce0: d2 07 bf e0 ld [ %fp + -32 ], %o1
2024ce4: 85 28 a0 18 sll %g2, 0x18, %g2
2024ce8: 83 28 60 10 sll %g1, 0x10, %g1
2024cec: 82 10 80 01 or %g2, %g1, %g1
2024cf0: 83 30 60 10 srl %g1, 0x10, %g1
2024cf4: 90 10 00 1d mov %i5, %o0
2024cf8: 40 00 64 a8 call 203df98 <rtems_rfs_file_get_shared>
2024cfc: c2 36 60 14 sth %g1, [ %i1 + 0x14 ]
if (shared)
2024d00: 92 92 20 00 orcc %o0, 0, %o1
2024d04: 02 80 00 30 be 2024dc4 <rtems_rfs_rtems_fstat+0x200>
2024d08: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
2024d0c: c2 02 60 84 ld [ %o1 + 0x84 ], %g1
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
2024d10: f8 02 60 8c ld [ %o1 + 0x8c ], %i4
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
2024d14: c8 02 60 90 ld [ %o1 + 0x90 ], %g4
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
2024d18: c6 02 60 94 ld [ %o1 + 0x94 ], %g3
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
2024d1c: c4 06 60 0c ld [ %i1 + 0xc ], %g2
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
2024d20: c2 26 60 44 st %g1, [ %i1 + 0x44 ]
*/
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
2024d24: f8 26 60 28 st %i4, [ %i1 + 0x28 ]
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
2024d28: 03 00 00 3c sethi %hi(0xf000), %g1
shared = rtems_rfs_file_get_shared (fs, rtems_rfs_inode_ino (&inode));
if (shared)
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
2024d2c: c8 26 60 30 st %g4, [ %i1 + 0x30 ]
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
2024d30: 84 08 80 01 and %g2, %g1, %g2
2024d34: 03 00 00 28 sethi %hi(0xa000), %g1
2024d38: 80 a0 80 01 cmp %g2, %g1
2024d3c: 12 80 00 18 bne 2024d9c <rtems_rfs_rtems_fstat+0x1d8> <== ALWAYS TAKEN
2024d40: c6 26 60 38 st %g3, [ %i1 + 0x38 ]
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
2024d44: c2 12 60 8a lduh [ %o1 + 0x8a ], %g1 <== NOT EXECUTED
2024d48: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
2024d4c: c2 26 60 24 st %g1, [ %i1 + 0x24 ] <== NOT EXECUTED
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);
2024d50: c2 07 60 08 ld [ %i5 + 8 ], %g1
rc = rtems_rfs_inode_close (fs, &inode);
2024d54: 90 10 00 1d mov %i5, %o0
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);
2024d58: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
rc = rtems_rfs_inode_close (fs, &inode);
2024d5c: 92 07 bf d8 add %fp, -40, %o1
2024d60: 40 00 6d 8f call 204039c <rtems_rfs_inode_close>
2024d64: b0 10 20 00 clr %i0
if (rc > 0)
2024d68: 80 a2 20 00 cmp %o0, 0
2024d6c: 04 80 00 05 ble 2024d80 <rtems_rfs_rtems_fstat+0x1bc> <== ALWAYS TAKEN
2024d70: ba 10 00 08 mov %o0, %i5
{
return rtems_rfs_rtems_error ("stat: closing inode", rc);
2024d74: 40 00 89 5e call 20472ec <__errno> <== NOT EXECUTED
2024d78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024d7c: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2024d80: 81 c7 e0 08 ret
2024d84: 81 e8 00 00 restore
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
2024d88: 80 a0 80 03 cmp %g2, %g3
2024d8c: 32 bf ff ba bne,a 2024c74 <rtems_rfs_rtems_fstat+0xb0> <== ALWAYS TAKEN
2024d90: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
* @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]);
2024d94: 10 bf ff a2 b 2024c1c <rtems_rfs_rtems_fstat+0x58> <== NOT EXECUTED
2024d98: d8 08 60 21 ldub [ %g1 + 0x21 ], %o4 <== 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);
2024d9c: 90 10 00 1d mov %i5, %o0
2024da0: 40 00 55 6d call 203a354 <rtems_rfs_block_get_size>
2024da4: 92 02 60 84 add %o1, 0x84, %o1
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
2024da8: 10 bf ff ea b 2024d50 <rtems_rfs_rtems_fstat+0x18c>
2024dac: d0 3e 60 20 std %o0, [ %i1 + 0x20 ]
printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
{
return rtems_rfs_rtems_error ("stat: opening inode", rc);
2024db0: 40 00 89 4f call 20472ec <__errno> <== NOT EXECUTED
2024db4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024db8: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2024dbc: 81 c7 e0 08 ret <== NOT EXECUTED
2024dc0: 81 e8 00 00 restore <== NOT EXECUTED
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
if (S_ISLNK (buf->st_mode))
2024dc4: c6 06 60 0c ld [ %i1 + 0xc ], %g3
* @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);
2024dc8: f8 08 60 13 ldub [ %g1 + 0x13 ], %i4
2024dcc: c4 08 60 10 ldub [ %g1 + 0x10 ], %g2
2024dd0: f0 08 60 11 ldub [ %g1 + 0x11 ], %i0
2024dd4: c8 08 60 12 ldub [ %g1 + 0x12 ], %g4
2024dd8: b1 2e 20 10 sll %i0, 0x10, %i0
2024ddc: 89 29 20 08 sll %g4, 8, %g4
2024de0: 85 28 a0 18 sll %g2, 0x18, %g2
2024de4: 84 10 80 18 or %g2, %i0, %g2
2024de8: 84 10 80 1c or %g2, %i4, %g2
2024dec: 84 10 80 04 or %g2, %g4, %g2
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
2024df0: c4 26 60 28 st %g2, [ %i1 + 0x28 ]
* @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);
2024df4: f8 08 60 17 ldub [ %g1 + 0x17 ], %i4
2024df8: c4 08 60 14 ldub [ %g1 + 0x14 ], %g2
2024dfc: f0 08 60 15 ldub [ %g1 + 0x15 ], %i0
2024e00: c8 08 60 16 ldub [ %g1 + 0x16 ], %g4
2024e04: b1 2e 20 10 sll %i0, 0x10, %i0
2024e08: 89 29 20 08 sll %g4, 8, %g4
2024e0c: 85 28 a0 18 sll %g2, 0x18, %g2
2024e10: 84 10 80 18 or %g2, %i0, %g2
2024e14: 84 10 80 1c or %g2, %i4, %g2
2024e18: 84 10 80 04 or %g2, %g4, %g2
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
2024e1c: c4 26 60 30 st %g2, [ %i1 + 0x30 ]
* @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);
2024e20: f8 08 60 1b ldub [ %g1 + 0x1b ], %i4
2024e24: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2
2024e28: f0 08 60 19 ldub [ %g1 + 0x19 ], %i0
2024e2c: c8 08 60 1a ldub [ %g1 + 0x1a ], %g4
2024e30: b1 2e 20 10 sll %i0, 0x10, %i0
2024e34: 89 29 20 08 sll %g4, 8, %g4
2024e38: 85 28 a0 18 sll %g2, 0x18, %g2
2024e3c: 84 10 80 18 or %g2, %i0, %g2
2024e40: 84 10 80 1c or %g2, %i4, %g2
2024e44: 84 10 80 04 or %g2, %g4, %g2
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
2024e48: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
* @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);
2024e4c: c4 08 60 0c ldub [ %g1 + 0xc ], %g2
2024e50: f0 08 60 0d ldub [ %g1 + 0xd ], %i0
2024e54: f8 08 60 0f ldub [ %g1 + 0xf ], %i4
2024e58: c8 08 60 0e ldub [ %g1 + 0xe ], %g4
2024e5c: 85 28 a0 18 sll %g2, 0x18, %g2
2024e60: b1 2e 20 10 sll %i0, 0x10, %i0
2024e64: 89 29 20 08 sll %g4, 8, %g4
2024e68: 84 10 80 18 or %g2, %i0, %g2
2024e6c: 84 10 80 1c or %g2, %i4, %g2
2024e70: 84 10 80 04 or %g2, %g4, %g2
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
2024e74: c4 26 60 44 st %g2, [ %i1 + 0x44 ]
if (S_ISLNK (buf->st_mode))
2024e78: 05 00 00 3c sethi %hi(0xf000), %g2
2024e7c: 86 08 c0 02 and %g3, %g2, %g3
2024e80: 05 00 00 28 sethi %hi(0xa000), %g2
2024e84: 80 a0 c0 02 cmp %g3, %g2
2024e88: 12 80 00 09 bne 2024eac <rtems_rfs_rtems_fstat+0x2e8>
2024e8c: 90 10 00 1d mov %i5, %o0
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
2024e90: c4 08 60 0b ldub [ %g1 + 0xb ], %g2
* @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);
2024e94: c6 08 60 0a ldub [ %g1 + 0xa ], %g3
2024e98: c0 26 60 20 clr [ %i1 + 0x20 ]
2024e9c: 83 28 e0 08 sll %g3, 8, %g1
2024ea0: 82 10 80 01 or %g2, %g1, %g1
2024ea4: 10 bf ff ab b 2024d50 <rtems_rfs_rtems_fstat+0x18c>
2024ea8: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
2024eac: 40 00 6e ef call 2040a68 <rtems_rfs_inode_get_size>
2024eb0: 92 07 bf d8 add %fp, -40, %o1
2024eb4: 10 bf ff a7 b 2024d50 <rtems_rfs_rtems_fstat+0x18c>
2024eb8: d0 3e 60 20 std %o0, [ %i1 + 0x20 ]
02024890 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
2024890: 9d e3 bf 98 save %sp, -104, %sp
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
2024894: a2 10 20 05 mov 5, %l1
2024898: 80 a6 60 00 cmp %i1, 0
202489c: 02 80 00 1f be 2024918 <rtems_rfs_rtems_initialise+0x88> <== ALWAYS TAKEN
20248a0: b8 10 20 00 clr %i4
{
printf ("options=%s\n", options);
20248a4: 37 00 81 9e sethi %hi(0x2067800), %i3 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
20248a8: 3b 00 81 9e sethi %hi(0x2067800), %i5 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
20248ac: 35 00 81 9e sethi %hi(0x2067800), %i2 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
20248b0: 21 00 81 9e sethi %hi(0x2067800), %l0 <== NOT EXECUTED
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
20248b4: b6 16 e0 98 or %i3, 0x98, %i3 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
20248b8: ba 17 60 a8 or %i5, 0xa8, %i5 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
20248bc: b4 16 a0 b8 or %i2, 0xb8, %i2 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
20248c0: a0 14 20 c8 or %l0, 0xc8, %l0 <== NOT EXECUTED
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
20248c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20248c8: 40 00 9c c2 call 204bbd0 <printf> <== NOT EXECUTED
20248cc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
20248d0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20248d4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20248d8: 40 00 a6 ec call 204e488 <strncmp> <== NOT EXECUTED
20248dc: 94 10 20 0c mov 0xc, %o2 <== NOT EXECUTED
20248e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20248e4: 12 80 00 1e bne 202495c <rtems_rfs_rtems_initialise+0xcc> <== NOT EXECUTED
20248e8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
20248ec: b8 17 20 01 or %i4, 1, %i4 <== NOT EXECUTED
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
20248f0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
20248f4: 40 00 a3 f1 call 204d8b8 <strchr> <== NOT EXECUTED
20248f8: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED
if (options)
20248fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2024900: 02 80 00 06 be 2024918 <rtems_rfs_rtems_initialise+0x88> <== NOT EXECUTED
2024904: 01 00 00 00 nop <== NOT EXECUTED
{
++options;
if (*options == '\0')
2024908: c2 4a 20 01 ldsb [ %o0 + 1 ], %g1 <== NOT EXECUTED
202490c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2024910: 12 80 00 1b bne 202497c <rtems_rfs_rtems_initialise+0xec> <== NOT EXECUTED
2024914: b2 82 20 01 addcc %o0, 1, %i1 <== NOT EXECUTED
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
2024918: 7f ff 92 bc call 2009408 <malloc>
202491c: 90 10 20 04 mov 4, %o0
if (!rtems)
2024920: ba 92 20 00 orcc %o0, 0, %i5
2024924: 02 80 00 75 be 2024af8 <rtems_rfs_rtems_initialise+0x268> <== NEVER TAKEN
2024928: 01 00 00 00 nop
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
rc = rtems_rfs_mutex_create (&rtems->access);
202492c: 40 00 73 02 call 2041534 <rtems_rfs_mutex_create>
2024930: c0 27 40 00 clr [ %i5 ]
if (rc > 0)
2024934: b6 92 20 00 orcc %o0, 0, %i3
2024938: 24 80 00 1f ble,a 20249b4 <rtems_rfs_rtems_initialise+0x124><== ALWAYS TAKEN
202493c: d0 07 40 00 ld [ %i5 ], %o0
{
free (rtems);
2024940: 7f ff 91 29 call 2008de4 <free> <== NOT EXECUTED
2024944: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
2024948: 40 00 8a 69 call 20472ec <__errno> <== NOT EXECUTED
202494c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024950: f6 22 00 00 st %i3, [ %o0 ] <== NOT EXECUTED
2024954: 81 c7 e0 08 ret
2024958: 81 e8 00 00 restore
{
printf ("options=%s\n", options);
if (strncmp (options, "hold-bitmaps",
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
202495c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2024960: 40 00 a6 ca call 204e488 <strncmp> <== NOT EXECUTED
2024964: 94 10 20 0e mov 0xe, %o2 <== NOT EXECUTED
2024968: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202496c: 12 80 00 07 bne 2024988 <rtems_rfs_rtems_initialise+0xf8> <== NOT EXECUTED
2024970: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
2024974: 10 bf ff df b 20248f0 <rtems_rfs_rtems_initialise+0x60> <== NOT EXECUTED
2024978: b8 17 20 02 or %i4, 2, %i4 <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
202497c: 12 bf ff d3 bne 20248c8 <rtems_rfs_rtems_initialise+0x38> <== NOT EXECUTED
2024980: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2024984: 30 bf ff e5 b,a 2024918 <rtems_rfs_rtems_initialise+0x88><== NOT EXECUTED
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",
2024988: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
202498c: 40 00 a6 bf call 204e488 <strncmp> <== NOT EXECUTED
2024990: 94 10 20 0d mov 0xd, %o2 <== NOT EXECUTED
2024994: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2024998: 12 80 00 2c bne 2024a48 <rtems_rfs_rtems_initialise+0x1b8><== NOT EXECUTED
202499c: 90 06 60 0e add %i1, 0xe, %o0 <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
20249a0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20249a4: 40 00 ac c4 call 204fcb4 <strtoul> <== NOT EXECUTED
20249a8: 94 10 20 00 clr %o2 <== NOT EXECUTED
20249ac: 10 bf ff d1 b 20248f0 <rtems_rfs_rtems_initialise+0x60> <== NOT EXECUTED
20249b0: a2 10 00 08 mov %o0, %l1 <== 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);
20249b4: 92 10 20 00 clr %o1
20249b8: 7f ff a4 77 call 200db94 <rtems_semaphore_obtain>
20249bc: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
20249c0: b6 92 20 00 orcc %o0, 0, %i3
20249c4: 12 80 00 11 bne 2024a08 <rtems_rfs_rtems_initialise+0x178><== NEVER TAKEN
20249c8: 94 10 00 1c mov %i4, %o2
rtems_rfs_mutex_destroy (&rtems->access);
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);
20249cc: d0 06 20 60 ld [ %i0 + 0x60 ], %o0
20249d0: 92 10 00 1d mov %i5, %o1
20249d4: 96 10 00 11 mov %l1, %o3
20249d8: 40 00 65 98 call 203e038 <rtems_rfs_fs_open>
20249dc: 98 07 bf fc add %fp, -4, %o4
if (rc)
20249e0: b8 92 20 00 orcc %o0, 0, %i4
20249e4: 02 80 00 1f be 2024a60 <rtems_rfs_rtems_initialise+0x1d0> <== ALWAYS TAKEN
20249e8: d0 07 bf fc ld [ %fp + -4 ], %o0
{
free (rtems);
20249ec: 7f ff 90 fe call 2008de4 <free> <== NOT EXECUTED
20249f0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
20249f4: 40 00 8a 3e call 20472ec <__errno> <== NOT EXECUTED
20249f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20249fc: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
2024a00: 81 c7 e0 08 ret <== NOT EXECUTED
2024a04: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2024a08: 90 10 20 00 clr %o0 <== NOT EXECUTED
2024a0c: 40 00 06 88 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2024a10: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2024a14: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2024a18: 12 80 00 31 bne 2024adc <rtems_rfs_rtems_initialise+0x24c><== NOT EXECUTED
2024a1c: 01 00 00 00 nop <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
2024a20: 40 00 72 e0 call 20415a0 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
2024a24: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
free (rtems);
2024a28: 7f ff 90 ef call 2008de4 <free> <== NOT EXECUTED
2024a2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
2024a30: 40 00 8a 2f call 20472ec <__errno> <== NOT EXECUTED
2024a34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024a38: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2024a3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2024a40: 81 c7 e0 08 ret <== NOT EXECUTED
2024a44: 81 e8 00 00 restore <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
2024a48: 40 00 8a 29 call 20472ec <__errno> <== NOT EXECUTED
2024a4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024a50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2024a54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2024a58: 81 c7 e0 08 ret <== NOT EXECUTED
2024a5c: 81 e8 00 00 restore <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
2024a60: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
2024a64: d0 26 20 20 st %o0, [ %i0 + 0x20 ]
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
2024a68: 84 10 20 01 mov 1, %g2
* 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);
2024a6c: fa 02 20 80 ld [ %o0 + 0x80 ], %i5
2024a70: c4 20 60 08 st %g2, [ %g1 + 8 ]
mt_entry->mt_fs_root->location.handlers = &rtems_rfs_rtems_dir_handlers;
2024a74: 05 00 81 b7 sethi %hi(0x206dc00), %g2
2024a78: 84 10 a0 e8 or %g2, 0xe8, %g2 ! 206dce8 <rtems_rfs_rtems_dir_handlers>
2024a7c: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
mt_entry->mt_fs_root->location.ops = &rtems_rfs_ops;
2024a80: 05 00 81 9e sethi %hi(0x2067800), %g2
2024a84: 84 10 a1 28 or %g2, 0x128, %g2 ! 2067928 <rtems_rfs_ops>
rtems_rfs_buffers_release (fs);
2024a88: 40 00 5b 97 call 203b8e4 <rtems_rfs_buffers_release>
2024a8c: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2024a90: d0 07 40 00 ld [ %i5 ], %o0
2024a94: 7f ff a4 8a call 200dcbc <rtems_semaphore_release>
2024a98: b0 10 20 00 clr %i0
if (sc != RTEMS_SUCCESSFUL)
2024a9c: ba 92 20 00 orcc %o0, 0, %i5
2024aa0: 02 bf ff ad be 2024954 <rtems_rfs_rtems_initialise+0xc4> <== ALWAYS TAKEN
2024aa4: 90 10 20 00 clr %o0
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2024aa8: 40 00 06 61 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2024aac: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2024ab0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2024ab4: 02 80 00 15 be 2024b08 <rtems_rfs_rtems_initialise+0x278> <== NOT EXECUTED
2024ab8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2024abc: 7f ff 90 30 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2024ac0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2024ac4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2024ac8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2024acc: 40 00 9c 41 call 204bbd0 <printf> <== NOT EXECUTED
2024ad0: 90 12 21 00 or %o0, 0x100, %o0 ! 2067900 <rtems_nvdisk_sram_handlers+0x74><== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
}
2024ad4: 81 c7 e0 08 ret <== NOT EXECUTED
2024ad8: 81 e8 00 00 restore <== NOT EXECUTED
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))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2024adc: 7f ff 90 28 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2024ae0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2024ae4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
2024ae8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2024aec: 40 00 9c 39 call 204bbd0 <printf> <== NOT EXECUTED
2024af0: 90 12 20 d8 or %o0, 0xd8, %o0 ! 20678d8 <rtems_nvdisk_sram_handlers+0x4c><== NOT EXECUTED
2024af4: 30 bf ff cb b,a 2024a20 <rtems_rfs_rtems_initialise+0x190><== NOT EXECUTED
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
2024af8: 40 00 89 fd call 20472ec <__errno> <== NOT EXECUTED
2024afc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024b00: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2024b04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2024b08: 81 c7 e0 08 ret <== NOT EXECUTED
2024b0c: 81 e8 00 00 restore <== NOT EXECUTED
02023ff4 <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)
{
2023ff4: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (targetloc);
2023ff8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
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);
2023ffc: d6 06 20 08 ld [ %i0 + 8 ], %o3
2024000: d8 06 60 08 ld [ %i1 + 8 ], %o4
2024004: d0 00 60 20 ld [ %g1 + 0x20 ], %o0
2024008: 92 10 00 1a mov %i2, %o1
202400c: 94 10 00 1b mov %i3, %o2
2024010: 9a 10 20 00 clr %o5
2024014: 40 00 72 ad call 2040ac8 <rtems_rfs_link>
2024018: b0 10 20 00 clr %i0
if (rc)
202401c: 80 a2 20 00 cmp %o0, 0
2024020: 02 80 00 05 be 2024034 <rtems_rfs_rtems_link+0x40> <== ALWAYS TAKEN
2024024: b2 10 00 08 mov %o0, %i1
{
return rtems_rfs_rtems_error ("link: linking", rc);
2024028: 40 00 8c b1 call 20472ec <__errno> <== NOT EXECUTED
202402c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024030: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2024034: 81 c7 e0 08 ret
2024038: 81 e8 00 00 restore
02024b10 <rtems_rfs_rtems_lock_by_mt_entry>:
return RTEMS_FILESYSTEM_MEMORY_FILE;
}
static void
rtems_rfs_rtems_lock_by_mt_entry (rtems_filesystem_mount_table_entry_t *mt_entry)
{
2024b10: 9d e3 bf a0 save %sp, -96, %sp
* Lock the RFS file system.
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
2024b14: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
2024b18: 92 10 20 00 clr %o1
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
2024b1c: c2 00 60 80 ld [ %g1 + 0x80 ], %g1
2024b20: 94 10 20 00 clr %o2
2024b24: 7f ff a4 1c call 200db94 <rtems_semaphore_obtain>
2024b28: d0 00 40 00 ld [ %g1 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2024b2c: ba 92 20 00 orcc %o0, 0, %i5
2024b30: 32 80 00 04 bne,a 2024b40 <rtems_rfs_rtems_lock_by_mt_entry+0x30><== NEVER TAKEN
2024b34: 90 10 20 00 clr %o0 <== NOT EXECUTED
2024b38: 81 c7 e0 08 ret
2024b3c: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2024b40: 40 00 06 3b call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2024b44: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2024b48: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2024b4c: 02 bf ff fb be 2024b38 <rtems_rfs_rtems_lock_by_mt_entry+0x28><== NOT EXECUTED
2024b50: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
2024b54: 7f ff 90 0a call 2008b7c <rtems_status_text> <== NOT EXECUTED
2024b58: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2024b5c: 31 00 81 9e sethi %hi(0x2067800), %i0 <== NOT EXECUTED
2024b60: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
2024b64: 40 00 9c 1b call 204bbd0 <printf> <== NOT EXECUTED
2024b68: 91 ee 20 d8 restore %i0, 0xd8, %o0 <== NOT EXECUTED
020243f8 <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)
{
20243f8: 9d e3 bf 60 save %sp, -160, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
20243fc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parentloc);
2024400: e0 06 20 08 ld [ %i0 + 8 ], %l0
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
2024404: 90 10 00 1b mov %i3, %o0
2024408: 40 00 02 f4 call 2024fd8 <rtems_rfs_rtems_imode>
202440c: f0 00 60 20 ld [ %g1 + 0x20 ], %i0
2024410: 82 07 bf fc add %fp, -4, %g1
2024414: 99 2a 20 10 sll %o0, 0x10, %o4
2024418: 92 10 00 10 mov %l0, %o1
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
202441c: 94 10 00 19 mov %i1, %o2
2024420: 96 10 00 1a mov %i2, %o3
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
2024424: c0 23 a0 5c clr [ %sp + 0x5c ]
2024428: c0 23 a0 60 clr [ %sp + 0x60 ]
202442c: 90 10 00 18 mov %i0, %o0
2024430: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
2024434: 99 33 20 10 srl %o4, 0x10, %o4
2024438: 40 00 70 b6 call 2040710 <rtems_rfs_inode_create>
202443c: 9a 10 20 01 mov 1, %o5
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
2024440: a0 92 20 00 orcc %o0, 0, %l0
2024444: 04 80 00 07 ble 2024460 <rtems_rfs_rtems_mknod+0x68>
2024448: d2 07 bf fc ld [ %fp + -4 ], %o1
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
return rtems_rfs_rtems_error ("mknod: inode open", rc);
202444c: 40 00 8b a8 call 20472ec <__errno>
2024450: b0 10 3f ff mov -1, %i0
2024454: e0 22 00 00 st %l0, [ %o0 ]
2024458: 81 c7 e0 08 ret
202445c: 81 e8 00 00 restore
if (rc > 0)
{
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2024460: 90 10 00 18 mov %i0, %o0
2024464: 94 07 bf d4 add %fp, -44, %o2
2024468: 40 00 6f 56 call 20401c0 <rtems_rfs_inode_open>
202446c: 96 10 20 01 mov 1, %o3
if (rc > 0)
2024470: a0 92 20 00 orcc %o0, 0, %l0
2024474: 14 bf ff f6 bg 202444c <rtems_rfs_rtems_mknod+0x54> <== NEVER TAKEN
2024478: 03 00 00 3c sethi %hi(0xf000), %g1
{
return rtems_rfs_rtems_error ("mknod: inode open", rc);
}
if (S_ISDIR(mode) || S_ISREG(mode))
202447c: b6 0e c0 01 and %i3, %g1, %i3
2024480: 03 00 00 20 sethi %hi(0x8000), %g1
2024484: 80 a6 c0 01 cmp %i3, %g1
2024488: 02 80 00 19 be 20244ec <rtems_rfs_rtems_mknod+0xf4>
202448c: 03 00 00 10 sethi %hi(0x4000), %g1
2024490: 80 a6 c0 01 cmp %i3, %g1
2024494: 02 80 00 16 be 20244ec <rtems_rfs_rtems_mknod+0xf4> <== ALWAYS TAKEN
2024498: 03 00 00 18 sethi %hi(0x6000), %g1
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
202449c: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED
20244a0: 12 80 00 1f bne 202451c <rtems_rfs_rtems_mknod+0x124> <== NOT EXECUTED
20244a4: 03 00 00 08 sethi %hi(0x2000), %g1 <== 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);
20244a8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
20244ac: 9b 37 20 18 srl %i4, 0x18, %o5 <== NOT EXECUTED
20244b0: 9f 37 20 10 srl %i4, 0x10, %o7 <== NOT EXECUTED
20244b4: b7 37 20 08 srl %i4, 8, %i3 <== NOT EXECUTED
20244b8: 89 37 60 18 srl %i5, 0x18, %g4 <== NOT EXECUTED
20244bc: 87 37 60 10 srl %i5, 0x10, %g3 <== NOT EXECUTED
20244c0: 85 37 60 08 srl %i5, 8, %g2 <== NOT EXECUTED
20244c4: f8 28 60 1f stb %i4, [ %g1 + 0x1f ] <== NOT EXECUTED
20244c8: da 28 60 1c stb %o5, [ %g1 + 0x1c ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20244cc: b8 10 20 01 mov 1, %i4 <== 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);
20244d0: de 28 60 1d stb %o7, [ %g1 + 0x1d ] <== NOT EXECUTED
20244d4: f6 28 60 1e stb %i3, [ %g1 + 0x1e ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20244d8: f8 2f bf e4 stb %i4, [ %fp + -28 ] <== 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);
20244dc: c8 28 60 20 stb %g4, [ %g1 + 0x20 ] <== NOT EXECUTED
20244e0: c6 28 60 21 stb %g3, [ %g1 + 0x21 ] <== NOT EXECUTED
20244e4: c4 28 60 22 stb %g2, [ %g1 + 0x22 ] <== NOT EXECUTED
20244e8: fa 28 60 23 stb %i5, [ %g1 + 0x23 ] <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
20244ec: 90 10 00 18 mov %i0, %o0
20244f0: 92 07 bf d4 add %fp, -44, %o1
20244f4: 40 00 6f aa call 204039c <rtems_rfs_inode_close>
20244f8: b0 10 20 00 clr %i0
if (rc > 0)
20244fc: 80 a2 20 00 cmp %o0, 0
2024500: 04 bf ff d6 ble 2024458 <rtems_rfs_rtems_mknod+0x60> <== ALWAYS TAKEN
2024504: ba 10 00 08 mov %o0, %i5
{
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
2024508: 40 00 8b 79 call 20472ec <__errno> <== NOT EXECUTED
202450c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024510: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2024514: 81 c7 e0 08 ret <== NOT EXECUTED
2024518: 81 e8 00 00 restore <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
202451c: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED
2024520: 02 bf ff e3 be 20244ac <rtems_rfs_rtems_mknod+0xb4> <== NOT EXECUTED
2024524: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== 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);
2024528: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
202452c: 40 00 6f 9c call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2024530: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
2024534: 40 00 8b 6e call 20472ec <__errno> <== NOT EXECUTED
2024538: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202453c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2024540: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2024544: 81 c7 e0 08 ret <== NOT EXECUTED
2024548: 81 e8 00 00 restore <== NOT EXECUTED
02024380 <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)
{
2024380: 9d e3 bf 78 save %sp, -136, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2024384: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
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);
2024388: d2 06 20 08 ld [ %i0 + 8 ], %o1
*/
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);
202438c: fa 00 60 20 ld [ %g1 + 0x20 ], %i5
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);
2024390: 94 07 bf d8 add %fp, -40, %o2
2024394: 90 10 00 1d mov %i5, %o0
2024398: 40 00 6f 8a call 20401c0 <rtems_rfs_inode_open>
202439c: 96 10 20 01 mov 1, %o3
if (rc > 0)
20243a0: b8 92 20 00 orcc %o0, 0, %i4
20243a4: 04 80 00 07 ble 20243c0 <rtems_rfs_rtems_node_type+0x40> <== ALWAYS TAKEN
20243a8: 01 00 00 00 nop
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
20243ac: 40 00 8b d0 call 20472ec <__errno> <== NOT EXECUTED
20243b0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
20243b4: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20243b8: 81 c7 e0 08 ret <== NOT EXECUTED
20243bc: 81 e8 00 00 restore <== NOT EXECUTED
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
20243c0: 7f ff fe c9 call 2023ee4 <rtems_rfs_rtems_node_type_by_inode>
20243c4: 90 07 bf d8 add %fp, -40, %o0
rc = rtems_rfs_inode_close (fs, &inode);
20243c8: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
20243cc: b0 10 00 08 mov %o0, %i0
rc = rtems_rfs_inode_close (fs, &inode);
20243d0: 40 00 6f f3 call 204039c <rtems_rfs_inode_close>
20243d4: 90 10 00 1d mov %i5, %o0
if (rc > 0)
20243d8: ba 92 20 00 orcc %o0, 0, %i5
20243dc: 04 80 00 05 ble 20243f0 <rtems_rfs_rtems_node_type+0x70> <== ALWAYS TAKEN
20243e0: 01 00 00 00 nop
{
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
20243e4: 40 00 8b c2 call 20472ec <__errno> <== NOT EXECUTED
20243e8: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
20243ec: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return type;
}
20243f0: 81 c7 e0 08 ret
20243f4: 81 e8 00 00 restore
02023ee4 <rtems_rfs_rtems_node_type_by_inode>:
* @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);
2023ee4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
* 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))
2023ee8: 05 00 00 3c sethi %hi(0xf000), %g2
2023eec: c2 08 60 02 ldub [ %g1 + 2 ], %g1
2023ef0: 83 28 60 08 sll %g1, 8, %g1
2023ef4: 82 08 40 02 and %g1, %g2, %g1
2023ef8: 05 00 00 10 sethi %hi(0x4000), %g2
2023efc: 80 a0 40 02 cmp %g1, %g2
2023f00: 02 80 00 0d be 2023f34 <rtems_rfs_rtems_node_type_by_inode+0x50>
2023f04: 90 10 20 00 clr %o0
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
2023f08: 05 00 00 28 sethi %hi(0xa000), %g2
2023f0c: 80 a0 40 02 cmp %g1, %g2
2023f10: 02 80 00 09 be 2023f34 <rtems_rfs_rtems_node_type_by_inode+0x50>
2023f14: 90 10 20 03 mov 3, %o0
return RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
2023f18: 05 00 00 08 sethi %hi(0x2000), %g2
2023f1c: 80 a0 40 02 cmp %g1, %g2
2023f20: 02 80 00 07 be 2023f3c <rtems_rfs_rtems_node_type_by_inode+0x58><== NEVER TAKEN
2023f24: 05 00 00 18 sethi %hi(0x6000), %g2
2023f28: 80 a0 40 02 cmp %g1, %g2
2023f2c: 02 80 00 04 be 2023f3c <rtems_rfs_rtems_node_type_by_inode+0x58><== NEVER TAKEN
2023f30: 90 10 20 04 mov 4, %o0
return RTEMS_FILESYSTEM_DEVICE;
else
return RTEMS_FILESYSTEM_MEMORY_FILE;
}
2023f34: 81 c3 e0 08 retl
2023f38: 01 00 00 00 nop
2023f3c: 81 c3 e0 08 retl <== NOT EXECUTED
2023f40: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1> <== NOT EXECUTED
020240c8 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
20240c8: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
20240cc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
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);
20240d0: d2 06 20 08 ld [ %i0 + 8 ], %o1
20240d4: d0 00 60 20 ld [ %g1 + 0x20 ], %o0
20240d8: 94 10 00 19 mov %i1, %o2
20240dc: 96 10 00 1a mov %i2, %o3
20240e0: 40 00 74 a0 call 2041360 <rtems_rfs_symlink_read>
20240e4: 98 07 bf fc add %fp, -4, %o4
if (rc)
{
return rtems_rfs_rtems_error ("readlink: reading link", rc);
}
return (ssize_t) length;
20240e8: f0 07 bf fc ld [ %fp + -4 ], %i0
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);
if (rc)
20240ec: 80 a2 20 00 cmp %o0, 0
20240f0: 02 80 00 05 be 2024104 <rtems_rfs_rtems_readlink+0x3c> <== ALWAYS TAKEN
20240f4: ba 10 00 08 mov %o0, %i5
{
return rtems_rfs_rtems_error ("readlink: reading link", rc);
20240f8: 40 00 8c 7d call 20472ec <__errno> <== NOT EXECUTED
20240fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024100: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return (ssize_t) length;
}
2024104: 81 c7 e0 08 ret
2024108: 81 e8 00 00 restore
0202403c <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)
{
202403c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
2024040: c2 06 60 18 ld [ %i1 + 0x18 ], %g1 <== 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);
2024044: fa 06 60 08 ld [ %i1 + 8 ], %i5 <== 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);
2024048: e0 00 60 20 ld [ %g1 + 0x20 ], %l0 <== 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);
202404c: d6 06 a0 08 ld [ %i2 + 8 ], %o3 <== 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);
2024050: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
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);
2024054: f4 06 60 0c ld [ %i1 + 0xc ], %i2 <== 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);
2024058: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
202405c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2024060: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2024064: 98 10 00 1d mov %i5, %o4 <== NOT EXECUTED
2024068: 40 00 72 98 call 2040ac8 <rtems_rfs_link> <== NOT EXECUTED
202406c: 9a 10 20 01 mov 1, %o5 <== NOT EXECUTED
if (rc)
2024070: b2 92 20 00 orcc %o0, 0, %i1 <== NOT EXECUTED
2024074: 02 80 00 07 be 2024090 <rtems_rfs_rtems_rename+0x54> <== NOT EXECUTED
2024078: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: linking", rc);
202407c: 40 00 8c 9c call 20472ec <__errno> <== NOT EXECUTED
2024080: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2024084: f2 22 00 00 st %i1, [ %o0 ] <== NOT EXECUTED
2024088: 81 c7 e0 08 ret <== NOT EXECUTED
202408c: 81 e8 00 00 restore <== 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,
2024090: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2024094: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2024098: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
202409c: 98 10 20 02 mov 2, %o4 <== NOT EXECUTED
20240a0: 40 00 73 00 call 2040ca0 <rtems_rfs_unlink> <== NOT EXECUTED
20240a4: b0 10 20 00 clr %i0 <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
20240a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20240ac: 02 bf ff f7 be 2024088 <rtems_rfs_rtems_rename+0x4c> <== NOT EXECUTED
20240b0: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
20240b4: 40 00 8c 8e call 20472ec <__errno> <== NOT EXECUTED
20240b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20240bc: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
20240c0: 81 c7 e0 08 ret <== NOT EXECUTED
20240c4: 81 e8 00 00 restore <== NOT EXECUTED
02024ef0 <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
2024ef0: 9d e3 bf a0 save %sp, -96, %sp
* @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);
2024ef4: c2 06 60 0c ld [ %i1 + 0xc ], %g1
2024ef8: c4 08 60 02 ldub [ %g1 + 2 ], %g2
2024efc: d2 08 60 03 ldub [ %g1 + 3 ], %o1
2024f00: 83 28 a0 08 sll %g2, 8, %g1
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
2024f04: 92 0a 60 ff and %o1, 0xff, %o1
2024f08: 05 00 00 10 sethi %hi(0x4000), %g2
2024f0c: 92 12 40 01 or %o1, %g1, %o1
2024f10: 03 00 00 3c sethi %hi(0xf000), %g1
2024f14: 82 0a 40 01 and %o1, %g1, %g1
2024f18: 80 a0 40 02 cmp %g1, %g2
2024f1c: 02 80 00 1c be 2024f8c <rtems_rfs_rtems_set_handlers+0x9c>
2024f20: c0 26 20 10 clr [ %i0 + 0x10 ]
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
2024f24: 05 00 00 18 sethi %hi(0x6000), %g2
2024f28: 80 a0 40 02 cmp %g1, %g2
2024f2c: 02 80 00 11 be 2024f70 <rtems_rfs_rtems_set_handlers+0x80><== NEVER TAKEN
2024f30: 05 00 00 08 sethi %hi(0x2000), %g2
2024f34: 80 a0 40 02 cmp %g1, %g2
2024f38: 02 80 00 0e be 2024f70 <rtems_rfs_rtems_set_handlers+0x80><== NEVER TAKEN
2024f3c: 05 00 00 28 sethi %hi(0xa000), %g2
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
2024f40: 80 a0 40 02 cmp %g1, %g2
2024f44: 02 80 00 20 be 2024fc4 <rtems_rfs_rtems_set_handlers+0xd4>
2024f48: 05 00 00 20 sethi %hi(0x8000), %g2
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
2024f4c: 80 a0 40 02 cmp %g1, %g2
2024f50: 02 80 00 16 be 2024fa8 <rtems_rfs_rtems_set_handlers+0xb8><== ALWAYS TAKEN
2024f54: 11 00 81 9e sethi %hi(0x2067800), %o0
loc->handlers = rtems_rfs_rtems_handlers (file);
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
2024f58: 40 00 9b 1e call 204bbd0 <printf> <== NOT EXECUTED
2024f5c: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 20679b0 <rtems_rfs_rtems_eval_config+0x8><== NOT EXECUTED
return false;
2024f60: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
return true;
}
2024f64: b0 08 60 01 and %g1, 1, %i0
2024f68: 81 c7 e0 08 ret
2024f6c: 81 e8 00 00 restore
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2024f70: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
2024f74: 05 00 81 b7 sethi %hi(0x206dc00), %g2 <== NOT EXECUTED
2024f78: 84 10 a0 bc or %g2, 0xbc, %g2 ! 206dcbc <rtems_rfs_rtems_device_handlers><== NOT EXECUTED
2024f7c: c4 26 20 10 st %g2, [ %i0 + 0x10 ] <== NOT EXECUTED
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2024f80: b0 08 60 01 and %g1, 1, %i0 <== NOT EXECUTED
2024f84: 81 c7 e0 08 ret <== NOT EXECUTED
2024f88: 81 e8 00 00 restore <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2024f8c: 82 10 20 01 mov 1, %g1
rtems_rfs_inode_handle* inode)
{
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
2024f90: 05 00 81 b7 sethi %hi(0x206dc00), %g2
2024f94: 84 10 a0 e8 or %g2, 0xe8, %g2 ! 206dce8 <rtems_rfs_rtems_dir_handlers>
2024f98: c4 26 20 10 st %g2, [ %i0 + 0x10 ]
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2024f9c: b0 08 60 01 and %g1, 1, %i0
2024fa0: 81 c7 e0 08 ret
2024fa4: 81 e8 00 00 restore
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2024fa8: 82 10 20 01 mov 1, %g1
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
loc->handlers = rtems_rfs_rtems_handlers (file);
2024fac: 05 00 81 b7 sethi %hi(0x206dc00), %g2
2024fb0: 84 10 a1 14 or %g2, 0x114, %g2 ! 206dd14 <rtems_rfs_rtems_file_handlers>
2024fb4: c4 26 20 10 st %g2, [ %i0 + 0x10 ]
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
}
2024fb8: b0 08 60 01 and %g1, 1, %i0
2024fbc: 81 c7 e0 08 ret
2024fc0: 81 e8 00 00 restore
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
2024fc4: 05 00 81 9e sethi %hi(0x2067800), %g2
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
2024fc8: 82 10 20 01 mov 1, %g1
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
loc->handlers = rtems_rfs_rtems_handlers (link);
2024fcc: 84 10 a1 7c or %g2, 0x17c, %g2
2024fd0: 10 bf ff e5 b 2024f64 <rtems_rfs_rtems_set_handlers+0x74>
2024fd4: c4 26 20 10 st %g2, [ %i0 + 0x10 ]
02023f60 <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
2023f60: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
2023f64: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
2023f68: 92 07 bf f8 add %fp, -8, %o1 <== 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);
2023f6c: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
2023f70: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
2023f74: 40 00 70 31 call 2040038 <rtems_rfs_group_usage> <== NOT EXECUTED
2023f78: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
2023f7c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2023f80: d8 07 60 04 ld [ %i5 + 4 ], %o4 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
2023f84: da 07 60 08 ld [ %i5 + 8 ], %o5 <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
2023f88: de 00 60 24 ld [ %g1 + 0x24 ], %o7 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
2023f8c: c8 00 60 1c ld [ %g1 + 0x1c ], %g4 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
2023f90: c6 07 40 00 ld [ %i5 ], %g3 <== 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);
2023f94: c2 07 60 14 ld [ %i5 + 0x14 ], %g1 <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
2023f98: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 <== 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);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2023f9c: fa 07 bf f8 ld [ %fp + -8 ], %i5 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
2023fa0: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== 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);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2023fa4: 98 23 00 1d sub %o4, %i5, %o4 <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
2023fa8: fa 07 bf fc ld [ %fp + -4 ], %i5 <== NOT EXECUTED
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
sb->f_bsize = rtems_rfs_fs_block_size (fs);
2023fac: da 26 40 00 st %o5, [ %i1 ] <== 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;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
2023fb0: ba 20 40 1d sub %g1, %i5, %i5 <== 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);
2023fb4: de 26 60 04 st %o7, [ %i1 + 4 ] <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
2023fb8: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED
2023fbc: c8 26 60 0c st %g4, [ %i1 + 0xc ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
2023fc0: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED
2023fc4: d8 26 60 14 st %o4, [ %i1 + 0x14 ] <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
2023fc8: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED
2023fcc: d8 26 60 1c st %o4, [ %i1 + 0x1c ] <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
2023fd0: fa 26 60 24 st %i5, [ %i1 + 0x24 ] <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
2023fd4: fa 26 60 28 st %i5, [ %i1 + 0x28 ] <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
2023fd8: 03 0a 02 48 sethi %hi(0x28092000), %g1 <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
2023fdc: c6 26 60 30 st %g3, [ %i1 + 0x30 ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
2023fe0: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
2023fe4: c4 26 60 34 st %g2, [ %i1 + 0x34 ] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
sb->f_files = rtems_rfs_fs_inodes (fs);
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
2023fe8: c2 26 60 2c st %g1, [ %i1 + 0x2c ] <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
2023fec: 81 c7 e0 08 ret <== NOT EXECUTED
2023ff0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0202410c <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)
{
202410c: 9d e3 bf 98 save %sp, -104, %sp
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
2024110: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
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),
2024114: 90 10 00 1b mov %i3, %o0
2024118: 40 00 a8 6b call 204e2c4 <strlen>
202411c: f8 00 60 20 ld [ %g1 + 0x20 ], %i4
const char* node_name,
size_t node_name_len,
const char* target)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
2024120: f0 06 20 08 ld [ %i0 + 8 ], %i0
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
2024124: 40 00 1b 71 call 202aee8 <geteuid>
2024128: ba 10 00 08 mov %o0, %i5
202412c: 40 00 1b 6b call 202aed8 <getegid>
2024130: a0 10 00 08 mov %o0, %l0
2024134: 91 2a 20 10 sll %o0, 0x10, %o0
2024138: 91 32 20 10 srl %o0, 0x10, %o0
202413c: f0 23 a0 60 st %i0, [ %sp + 0x60 ]
2024140: d0 23 a0 5c st %o0, [ %sp + 0x5c ]
2024144: 98 10 00 1d mov %i5, %o4
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)
{
2024148: 92 10 00 19 mov %i1, %o1
202414c: 94 10 00 1a mov %i2, %o2
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,
2024150: 9b 2c 20 10 sll %l0, 0x10, %o5
2024154: 90 10 00 1c mov %i4, %o0
2024158: 96 10 00 1b mov %i3, %o3
202415c: 9b 33 60 10 srl %o5, 0x10, %o5
2024160: 40 00 73 dc call 20410d0 <rtems_rfs_symlink>
2024164: b0 10 20 00 clr %i0
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
2024168: 80 a2 20 00 cmp %o0, 0
202416c: 02 80 00 05 be 2024180 <rtems_rfs_rtems_symlink+0x74> <== ALWAYS TAKEN
2024170: ba 10 00 08 mov %o0, %i5
{
return rtems_rfs_rtems_error ("symlink: linking", rc);
2024174: 40 00 8c 5e call 20472ec <__errno> <== NOT EXECUTED
2024178: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202417c: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2024180: 81 c7 e0 08 ret
2024184: 81 e8 00 00 restore
02024b6c <rtems_rfs_rtems_unlock_by_mt_entry>:
rtems_rfs_rtems_lock (fs);
}
static void
rtems_rfs_rtems_unlock_by_mt_entry (rtems_filesystem_mount_table_entry_t *mt_entry)
{
2024b6c: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_file_system* fs = mt_entry->fs_info;
2024b70: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
2024b74: 40 00 5b 5c call 203b8e4 <rtems_rfs_buffers_release>
2024b78: fa 02 20 80 ld [ %o0 + 0x80 ], %i5
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
2024b7c: 7f ff a4 50 call 200dcbc <rtems_semaphore_release>
2024b80: d0 07 40 00 ld [ %i5 ], %o0
if (sc != RTEMS_SUCCESSFUL)
2024b84: ba 92 20 00 orcc %o0, 0, %i5
2024b88: 32 80 00 04 bne,a 2024b98 <rtems_rfs_rtems_unlock_by_mt_entry+0x2c><== NEVER TAKEN
2024b8c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2024b90: 81 c7 e0 08 ret
2024b94: 81 e8 00 00 restore
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2024b98: 40 00 06 25 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2024b9c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2024ba0: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2024ba4: 02 bf ff fb be 2024b90 <rtems_rfs_rtems_unlock_by_mt_entry+0x24><== NOT EXECUTED
2024ba8: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
2024bac: 7f ff 8f f4 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2024bb0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2024bb4: 31 00 81 9e sethi %hi(0x2067800), %i0 <== NOT EXECUTED
2024bb8: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
2024bbc: 40 00 9c 05 call 204bbd0 <printf> <== NOT EXECUTED
2024bc0: 91 ee 21 00 restore %i0, 0x100, %o0 <== NOT EXECUTED
02024188 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
2024188: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
202418c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== 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);
2024190: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== 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);
2024194: fa 00 60 20 ld [ %g1 + 0x20 ], %i5 <== 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);
2024198: 94 07 bf d8 add %fp, -40, %o2 <== NOT EXECUTED
202419c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20241a0: 40 00 70 08 call 20401c0 <rtems_rfs_inode_open> <== NOT EXECUTED
20241a4: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc)
20241a8: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20241ac: 02 80 00 07 be 20241c8 <rtems_rfs_rtems_utime+0x40> <== NOT EXECUTED
20241b0: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: read inode", rc);
20241b4: 40 00 8c 4e call 20472ec <__errno> <== NOT EXECUTED
20241b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20241bc: f8 22 00 00 st %i4, [ %o0 ] <== NOT EXECUTED
20241c0: 81 c7 e0 08 ret <== NOT EXECUTED
20241c4: 81 e8 00 00 restore <== 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);
20241c8: 85 36 60 18 srl %i1, 0x18, %g2 <== NOT EXECUTED
20241cc: 87 36 60 10 srl %i1, 0x10, %g3 <== NOT EXECUTED
20241d0: c4 28 60 10 stb %g2, [ %g1 + 0x10 ] <== NOT EXECUTED
20241d4: 85 36 60 08 srl %i1, 8, %g2 <== NOT EXECUTED
20241d8: c6 28 60 11 stb %g3, [ %g1 + 0x11 ] <== NOT EXECUTED
20241dc: c4 28 60 12 stb %g2, [ %g1 + 0x12 ] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20241e0: 86 10 20 01 mov 1, %g3 <== 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);
20241e4: 85 36 a0 18 srl %i2, 0x18, %g2 <== 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);
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20241e8: c6 2f bf e8 stb %g3, [ %fp + -24 ] <== 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);
20241ec: c4 28 60 14 stb %g2, [ %g1 + 0x14 ] <== NOT EXECUTED
20241f0: 87 36 a0 10 srl %i2, 0x10, %g3 <== NOT EXECUTED
20241f4: 85 36 a0 08 srl %i2, 8, %g2 <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
20241f8: 90 10 00 1d mov %i5, %o0 <== 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);
20241fc: f2 28 60 13 stb %i1, [ %g1 + 0x13 ] <== 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);
2024200: c6 28 60 15 stb %g3, [ %g1 + 0x15 ] <== NOT EXECUTED
2024204: c4 28 60 16 stb %g2, [ %g1 + 0x16 ] <== NOT EXECUTED
2024208: f4 28 60 17 stb %i2, [ %g1 + 0x17 ] <== NOT EXECUTED
202420c: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2024210: 40 00 70 63 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2024214: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (rc)
2024218: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202421c: 02 bf ff e9 be 20241c0 <rtems_rfs_rtems_utime+0x38> <== NOT EXECUTED
2024220: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
2024224: 40 00 8c 32 call 20472ec <__errno> <== NOT EXECUTED
2024228: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
202422c: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2024230: 81 c7 e0 08 ret <== NOT EXECUTED
2024234: 81 e8 00 00 restore <== NOT EXECUTED
0203e97c <rtems_rfs_rup_quotient>:
* Return a rounded up integer quotient given a dividend and divisor. That is:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
203e97c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
203e980: 82 10 00 18 mov %i0, %g1 <== NOT EXECUTED
if (dividend == 0)
203e984: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
203e988: 02 80 00 06 be 203e9a0 <rtems_rfs_rup_quotient+0x24> <== NOT EXECUTED
203e98c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
203e990: 90 00 7f ff add %g1, -1, %o0 <== NOT EXECUTED
203e994: 40 00 88 42 call 2060a9c <.udiv> <== NOT EXECUTED
203e998: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
203e99c: b0 02 20 01 add %o0, 1, %i0 <== NOT EXECUTED
}
203e9a0: 81 c7 e0 08 ret <== NOT EXECUTED
203e9a4: 81 e8 00 00 restore <== NOT EXECUTED
0203b0e8 <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
203b0e8: 9d e3 bf a0 save %sp, -96, %sp
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
203b0ec: 90 10 20 00 clr %o0
203b0f0: 92 10 20 80 mov 0x80, %o1
203b0f4: 7f ff ac ce call 202642c <rtems_rfs_trace>
203b0f8: fa 06 20 08 ld [ %i0 + 8 ], %i5
203b0fc: 80 8a 20 ff btst 0xff, %o0
203b100: 32 80 00 38 bne,a 203b1e0 <rtems_rfs_scan_chain+0xf8> <== NEVER TAKEN
203b104: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
while (!rtems_chain_is_head (chain, node))
203b108: 80 a7 40 18 cmp %i5, %i0
203b10c: 02 80 00 2c be 203b1bc <rtems_rfs_scan_chain+0xd4> <== NEVER TAKEN
203b110: 39 00 81 9f sethi %hi(0x2067c00), %i4
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
203b114: 10 80 00 09 b 203b138 <rtems_rfs_scan_chain+0x50>
203b118: b8 17 23 70 or %i4, 0x370, %i4 ! 2067f70 <rtems_rfs_rtems_eval_config+0x5c8>
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
203b11c: 80 a0 40 1a cmp %g1, %i2
203b120: 02 80 00 14 be 203b170 <rtems_rfs_scan_chain+0x88>
203b124: 90 10 20 00 clr %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
203b128: fa 07 60 04 ld [ %i5 + 4 ], %i5
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))
203b12c: 80 a7 40 18 cmp %i5, %i0
203b130: 02 80 00 24 be 203b1c0 <rtems_rfs_scan_chain+0xd8>
203b134: 90 10 20 00 clr %o0
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
203b138: 90 10 20 00 clr %o0
203b13c: 7f ff ac bc call 202642c <rtems_rfs_trace>
203b140: 92 10 20 80 mov 0x80, %o1
203b144: 80 8a 20 ff btst 0xff, %o0
203b148: 22 bf ff f5 be,a 203b11c <rtems_rfs_scan_chain+0x34> <== ALWAYS TAKEN
203b14c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
203b150: d2 07 60 34 ld [ %i5 + 0x34 ], %o1 <== NOT EXECUTED
203b154: 40 00 42 9f call 204bbd0 <printf> <== NOT EXECUTED
203b158: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
203b15c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1 <== NOT EXECUTED
203b160: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
203b164: 32 bf ff f2 bne,a 203b12c <rtems_rfs_scan_chain+0x44> <== NOT EXECUTED
203b168: fa 07 60 04 ld [ %i5 + 4 ], %i5 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
203b16c: 90 10 20 00 clr %o0 <== NOT EXECUTED
203b170: 7f ff ac af call 202642c <rtems_rfs_trace>
203b174: 92 10 20 80 mov 0x80, %o1
203b178: 80 8a 20 ff btst 0xff, %o0
203b17c: 22 80 00 07 be,a 203b198 <rtems_rfs_scan_chain+0xb0> <== ALWAYS TAKEN
203b180: c2 06 40 00 ld [ %i1 ], %g1
printf (": found block=%" PRIuPTR "\n",
203b184: d2 07 60 34 ld [ %i5 + 0x34 ], %o1 <== NOT EXECUTED
203b188: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203b18c: 40 00 42 91 call 204bbd0 <printf> <== NOT EXECUTED
203b190: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 206bbb0 <__FUNCTION__.7603+0x188><== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
203b194: c2 06 40 00 ld [ %i1 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
203b198: 90 10 00 1d mov %i5, %o0
203b19c: 82 00 7f ff add %g1, -1, %g1
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
203b1a0: b0 10 00 1d mov %i5, %i0
203b1a4: 7f ff 4d da call 200e90c <_Chain_Extract>
203b1a8: c2 26 40 00 st %g1, [ %i1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
203b1ac: c0 27 60 04 clr [ %i5 + 4 ]
203b1b0: c0 27 40 00 clr [ %i5 ]
203b1b4: 81 c7 e0 08 ret
203b1b8: 81 e8 00 00 restore
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
203b1bc: 90 10 20 00 clr %o0 <== NOT EXECUTED
203b1c0: 92 10 20 80 mov 0x80, %o1
203b1c4: 7f ff ac 9a call 202642c <rtems_rfs_trace>
203b1c8: b0 10 20 00 clr %i0
203b1cc: 80 8a 20 ff btst 0xff, %o0
203b1d0: 12 80 00 0a bne 203b1f8 <rtems_rfs_scan_chain+0x110> <== NEVER TAKEN
203b1d4: 11 00 81 ae sethi %hi(0x206b800), %o0
printf (": not found\n");
return NULL;
}
203b1d8: 81 c7 e0 08 ret
203b1dc: 81 e8 00 00 restore
rtems_chain_node* node;
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);
203b1e0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
203b1e4: 11 00 81 ae sethi %hi(0x206b800), %o0 <== NOT EXECUTED
203b1e8: 40 00 42 7a call 204bbd0 <printf> <== NOT EXECUTED
203b1ec: 90 12 23 80 or %o0, 0x380, %o0 ! 206bb80 <__FUNCTION__.7603+0x158><== NOT EXECUTED
while (!rtems_chain_is_head (chain, node))
203b1f0: 10 bf ff c7 b 203b10c <rtems_rfs_scan_chain+0x24> <== NOT EXECUTED
203b1f4: 80 a7 40 18 cmp %i5, %i0 <== NOT EXECUTED
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": not found\n");
203b1f8: 40 00 43 11 call 204be3c <puts> <== NOT EXECUTED
203b1fc: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED
return NULL;
}
203b200: 81 c7 e0 08 ret <== NOT EXECUTED
203b204: 81 e8 00 00 restore <== NOT EXECUTED
020463a8 <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,
20463a8: 9d e3 bf 88 save %sp, -120, %sp
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
20463ac: 90 10 00 18 mov %i0, %o0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
20463b0: ba 10 00 18 mov %i0, %i5
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
20463b4: c0 2e 80 00 clrb [ %i2 ]
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
20463b8: 7f ff ff e7 call 2046354 <rtems_rfs_bitmap_load_map>
20463bc: 92 07 bf fc add %fp, -4, %o1
if (rc > 0)
20463c0: b0 92 20 00 orcc %o0, 0, %i0
20463c4: 24 80 00 04 ble,a 20463d4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2c><== ALWAYS TAKEN
20463c8: f0 06 40 00 ld [ %i1 ], %i0
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
return 0;
}
20463cc: 81 c7 e0 08 ret <== NOT EXECUTED
20463d0: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
20463d4: a1 2e e0 0b sll %i3, 0xb, %l0
if (end_bit < 0)
20463d8: a0 84 00 18 addcc %l0, %i0, %l0
20463dc: 2c 80 00 06 bneg,a 20463f4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x4c>
20463e0: a0 10 20 00 clr %l0
end_bit = 0;
else if (end_bit >= control->size)
20463e4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
20463e8: 80 a4 00 01 cmp %l0, %g1
20463ec: 3a 80 00 02 bcc,a 20463f4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x4c><== ALWAYS TAKEN
20463f0: a0 00 7f ff add %g1, -1, %l0
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];
map_bits = &map[map_index];
20463f4: e6 07 bf fc ld [ %fp + -4 ], %l3
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);
20463f8: a5 3e 20 05 sra %i0, 5, %l2
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];
20463fc: e8 07 60 14 ld [ %i5 + 0x14 ], %l4
map_bits = &map[map_index];
2046400: 83 2c a0 02 sll %l2, 2, %g1
2046404: a6 04 c0 01 add %l3, %g1, %l3
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
2046408: 82 10 20 1f mov 0x1f, %g1
204640c: c2 27 bf f4 st %g1, [ %fp + -12 ]
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);
2046410: 85 3e 20 0a sra %i0, 0xa, %g2
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);
2046414: b8 0e 20 1f and %i0, 0x1f, %i4
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];
2046418: 85 28 a0 02 sll %g2, 2, %g2
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);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
204641c: 92 0c a0 1f and %l2, 0x1f, %o1
search_bits = &control->search_bits[search_index];
2046420: a8 05 00 02 add %l4, %g2, %l4
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
2046424: 80 a6 e0 00 cmp %i3, 0
2046428: 04 80 00 03 ble 2046434 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x8c>
204642c: ab 2e e0 02 sll %i3, 2, %l5
2046430: c0 27 bf f4 clr [ %fp + -12 ]
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
2046434: ad 36 e0 1f srl %i3, 0x1f, %l6
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
2046438: 83 3e e0 1f sra %i3, 0x1f, %g1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
204643c: 84 0d a0 ff and %l6, 0xff, %g2
|| ((direction > 0) && (test_bit >= end_bit)))
2046440: 82 20 40 1b sub %g1, %i3, %g1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
2046444: af 2e e0 05 sll %i3, 5, %l7
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
2046448: 83 30 60 1f srl %g1, 0x1f, %g1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
204644c: a2 10 20 01 mov 1, %l1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
2046450: c4 27 bf ec st %g2, [ %fp + -20 ]
|| ((direction > 0) && (test_bit >= end_bit)))
2046454: c2 27 bf f0 st %g1, [ %fp + -16 ]
/*
* 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))
2046458: c8 05 00 00 ld [ %l4 ], %g4
204645c: 80 a1 20 00 cmp %g4, 0
2046460: 02 80 00 4f be 204659c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1f4><== NEVER TAKEN
2046464: 80 a6 e0 00 cmp %i3, 0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
2046468: c2 07 bf f4 ld [ %fp + -12 ], %g1
204646c: 86 06 c0 12 add %i3, %l2, %g3
2046470: 87 28 e0 05 sll %g3, 5, %g3
2046474: 86 00 c0 01 add %g3, %g1, %g3
* 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)
2046478: 80 a2 60 1f cmp %o1, 0x1f
204647c: 18 80 00 54 bgu 20465cc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x224><== NEVER TAKEN
2046480: 9f 2c 40 09 sll %l1, %o1, %o7
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
2046484: 80 8b c0 04 btst %o7, %g4
2046488: 22 80 00 15 be,a 20464dc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x134>
204648c: a6 04 c0 15 add %l3, %l5, %l3
* 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))
2046490: c4 04 c0 00 ld [ %l3 ], %g2
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
2046494: 83 2c 40 1c sll %l1, %i4, %g1
* 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))
2046498: 80 88 40 02 btst %g1, %g2
204649c: 12 80 00 55 bne 20465f0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x248>
20464a0: 80 a4 00 18 cmp %l0, %i0
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
20464a4: 12 80 00 0a bne 20464cc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x124>
20464a8: b8 06 c0 1c add %i3, %i4, %i4
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
20464ac: 10 80 00 0c b 20464dc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x134>
20464b0: a6 04 c0 15 add %l3, %l5, %l3
* 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))
20464b4: 80 88 40 02 btst %g1, %g2
20464b8: 12 80 00 4e bne 20465f0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x248>
20464bc: b0 06 c0 18 add %i3, %i0, %i0
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
}
if (test_bit == end_bit)
20464c0: 80 a6 00 10 cmp %i0, %l0
20464c4: 02 80 00 05 be 20464d8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x130>
20464c8: b8 06 c0 1c add %i3, %i4, %i4
{
/*
* 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)
20464cc: 80 a7 20 1f cmp %i4, 0x1f
20464d0: 28 bf ff f9 bleu,a 20464b4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x10c><== ALWAYS TAKEN
20464d4: 83 2c 40 1c sll %l1, %i4, %g1
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
20464d8: a6 04 c0 15 add %l3, %l5, %l3
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
20464dc: a4 06 c0 12 add %i3, %l2, %l2
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
20464e0: 80 a6 e0 00 cmp %i3, 0
20464e4: 04 80 00 03 ble 20464f0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x148>
20464e8: b8 10 20 1f mov 0x1f, %i4
20464ec: b8 10 20 00 clr %i4
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
20464f0: b0 10 00 03 mov %g3, %i0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
20464f4: 92 06 c0 09 add %i3, %o1, %o1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
20464f8: 84 10 00 16 mov %l6, %g2
20464fc: 80 a4 00 03 cmp %l0, %g3
2046500: 16 80 00 03 bge 204650c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x164>
2046504: 82 10 20 01 mov 1, %g1
2046508: 82 10 20 00 clr %g1
204650c: 80 88 60 ff btst 0xff, %g1
2046510: 12 80 00 58 bne 2046670 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2c8>
2046514: c2 07 bf ec ld [ %fp + -20 ], %g1
2046518: 86 00 c0 17 add %g3, %l7, %g3
|| ((direction > 0) && (test_bit >= end_bit)))
204651c: 80 a4 00 18 cmp %l0, %i0
2046520: 04 80 00 03 ble 204652c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x184>
2046524: 82 10 20 01 mov 1, %g1
2046528: 82 10 20 00 clr %g1
204652c: 80 88 60 ff btst 0xff, %g1
2046530: 02 bf ff d3 be 204647c <rtems_rfs_search_map_for_clear_bit.constprop.1+0xd4>
2046534: 80 a2 60 1f cmp %o1, 0x1f
2046538: c2 07 bf f0 ld [ %fp + -16 ], %g1
204653c: 80 a0 60 00 cmp %g1, 0
2046540: 02 bf ff cf be 204647c <rtems_rfs_search_map_for_clear_bit.constprop.1+0xd4><== NEVER TAKEN
2046544: 80 a2 60 1f cmp %o1, 0x1f
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
2046548: a8 05 00 15 add %l4, %l5, %l4
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
|| ((direction > 0) && (test_bit >= end_bit)))
204654c: 82 10 20 01 mov 1, %g1
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
2046550: 92 10 20 00 clr %o1
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
2046554: 80 88 60 ff btst 0xff, %g1
2046558: 02 80 00 06 be 2046570 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1c8>
204655c: 80 a4 00 18 cmp %l0, %i0
2046560: 80 88 a0 ff btst 0xff, %g2
2046564: 32 bf ff be bne,a 204645c <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb4><== NEVER TAKEN
2046568: c8 05 00 00 ld [ %l4 ], %g4 <== NOT EXECUTED
204656c: 80 a4 00 18 cmp %l0, %i0
2046570: 16 80 00 03 bge 204657c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1d4>
2046574: 82 10 20 01 mov 1, %g1
2046578: 82 10 20 00 clr %g1
204657c: 80 88 60 ff btst 0xff, %g1
2046580: 02 80 00 05 be 2046594 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ec>
2046584: c2 07 bf f0 ld [ %fp + -16 ], %g1
2046588: 80 a0 60 00 cmp %g1, 0
204658c: 32 bf ff b4 bne,a 204645c <rtems_rfs_search_map_for_clear_bit.constprop.1+0xb4><== NEVER TAKEN
2046590: c8 05 00 00 ld [ %l4 ], %g4 <== NOT EXECUTED
return 0;
}
2046594: 81 c7 e0 08 ret
2046598: 91 e8 20 00 restore %g0, 0, %o0
* 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)
204659c: 04 80 00 2f ble 2046658 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2b0><== NOT EXECUTED
20465a0: b0 0e 3f e0 and %i0, -32, %i0 <== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
20465a4: 84 10 20 20 mov 0x20, %g2 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
20465a8: b8 10 20 00 clr %i4 <== NOT EXECUTED
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
if (direction > 0)
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
20465ac: 92 20 80 09 sub %g2, %o1, %o1 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
20465b0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
20465b4: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
20465b8: 7f fe f2 4a call 2002ee0 <.umul> <== NOT EXECUTED
20465bc: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20465c0: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
map_index += direction * bits_skipped;
20465c4: a4 04 80 08 add %l2, %o0, %l2 <== NOT EXECUTED
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
20465c8: a6 04 c0 01 add %l3, %g1, %l3 <== NOT EXECUTED
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
20465cc: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
20465d0: 04 80 00 19 ble 2046634 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x28c><== NOT EXECUTED
20465d4: a8 05 00 15 add %l4, %l5, %l4 <== NOT EXECUTED
20465d8: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
20465dc: 04 80 00 03 ble 20465e8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x240><== NOT EXECUTED
20465e0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
20465e4: 82 10 20 00 clr %g1 <== NOT EXECUTED
20465e8: 10 bf ff da b 2046550 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1a8><== NOT EXECUTED
20465ec: 84 10 20 00 clr %g2 <== 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);
20465f0: 82 28 80 01 andn %g2, %g1, %g1
&& (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,
20465f4: 80 a0 60 00 cmp %g1, 0
20465f8: 12 80 00 05 bne 204660c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x264>
20465fc: c2 24 c0 00 st %g1, [ %l3 ]
*/
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);
2046600: c2 05 00 00 ld [ %l4 ], %g1
2046604: 9e 28 40 0f andn %g1, %o7, %o7
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,
2046608: de 25 00 00 st %o7, [ %l4 ]
1 << search_offset);
control->free--;
204660c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
2046610: c4 07 40 00 ld [ %i5 ], %g2
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
if (rtems_rfs_bitmap_match(*map_bits,
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
1 << search_offset);
control->free--;
2046614: 82 00 7f ff add %g1, -1, %g1
2046618: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
*bit = test_bit;
204661c: f0 26 40 00 st %i0, [ %i1 ]
*found = true;
2046620: 82 10 20 01 mov 1, %g1
2046624: c2 2e 80 00 stb %g1, [ %i2 ]
rtems_rfs_buffer_mark_dirty (control->buffer);
2046628: c2 28 80 00 stb %g1, [ %g2 ]
return 0;
204662c: 81 c7 e0 08 ret
2046630: 91 e8 20 00 restore %g0, 0, %o0
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
2046634: 84 10 00 16 mov %l6, %g2 <== NOT EXECUTED
2046638: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED
204663c: 14 80 00 04 bg 204664c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2a4><== NOT EXECUTED
2046640: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2046644: 10 bf ff c4 b 2046554 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ac><== NOT EXECUTED
2046648: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
204664c: 82 10 20 00 clr %g1 <== NOT EXECUTED
2046650: 10 bf ff c1 b 2046554 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ac><== NOT EXECUTED
2046654: 92 10 20 1f mov 0x1f, %o1 <== NOT EXECUTED
bits_skipped = search_offset + 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;
2046658: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
204665c: b8 10 20 1f mov 0x1f, %i4 <== NOT EXECUTED
bits_skipped = search_offset + 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;
2046660: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
2046664: 92 02 60 01 inc %o1 <== NOT EXECUTED
/*
* Need to remove 1 for the rounding up. The above rounds down and
* adds 1. Remember the logic is for subtraction.
*/
test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1;
2046668: 10 bf ff d4 b 20465b8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x210><== NOT EXECUTED
204666c: b0 00 40 18 add %g1, %i0, %i0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
2046670: 80 a0 60 00 cmp %g1, 0
2046674: 22 bf ff aa be,a 204651c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x174>
2046678: 86 00 c0 17 add %g3, %l7, %g3
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
204667c: a8 05 00 15 add %l4, %l5, %l4
2046680: 80 a4 00 03 cmp %l0, %g3
2046684: 04 80 00 03 ble 2046690 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x2e8><== NEVER TAKEN
2046688: 82 10 20 01 mov 1, %g1
204668c: 82 10 20 00 clr %g1
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
2046690: 84 10 20 01 mov 1, %g2
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
2046694: 10 bf ff b0 b 2046554 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x1ac>
2046698: 92 10 20 1f mov 0x1f, %o1
02025644 <rtems_rfs_shell_block>:
return 0;
}
static int
rtems_rfs_shell_block (rtems_rfs_file_system* fs, int argc, char *argv[])
{
2025644: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
uint8_t* data;
bool state;
int b;
int rc;
if (argc <= 1)
2025648: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED
202564c: 04 80 00 7d ble 2025840 <rtems_rfs_shell_block+0x1fc> <== NOT EXECUTED
2025650: 92 10 20 00 clr %o1 <== NOT EXECUTED
{
printf ("error: no block number provided\n");
return 1;
}
block = strtoul (argv[1], 0, 0);
2025654: d0 06 a0 04 ld [ %i2 + 4 ], %o0 <== NOT EXECUTED
2025658: 40 00 a9 97 call 204fcb4 <strtoul> <== NOT EXECUTED
202565c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2025660: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
2025664: 7f ff fe 90 call 20250a4 <rtems_rfs_shell_lock_rfs> <== NOT EXECUTED
2025668: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
202566c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2025670: 92 10 20 00 clr %o1 <== NOT EXECUTED
2025674: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2025678: 40 00 6a 28 call 203ff18 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
202567c: 96 07 bf ff add %fp, -1, %o3 <== NOT EXECUTED
if (rc > 0)
2025680: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2025684: 14 80 00 4b bg 20257b0 <rtems_rfs_shell_block+0x16c> <== NOT EXECUTED
2025688: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
202568c: 15 00 81 96 sethi %hi(0x2065800), %o2 <== NOT EXECUTED
2025690: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2025694: 02 80 00 04 be 20256a4 <rtems_rfs_shell_block+0x60> <== NOT EXECUTED
2025698: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
202569c: 15 00 81 9e sethi %hi(0x2067800), %o2 <== NOT EXECUTED
20256a0: 94 12 a2 68 or %o2, 0x268, %o2 ! 2067a68 <rtems_rfs_rtems_eval_config+0xc0><== NOT EXECUTED
20256a4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20256a8: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
20256ac: 40 00 99 49 call 204bbd0 <printf> <== NOT EXECUTED
20256b0: 90 12 22 c8 or %o0, 0x2c8, %o0 ! 2067ac8 <rtems_rfs_rtems_eval_config+0x120><== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
20256b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20256b8: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
20256bc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
20256c0: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
20256c4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
20256c8: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
20256cc: 40 00 57 4a call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
20256d0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
20256d4: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
20256d8: 14 80 00 47 bg 20257f4 <rtems_rfs_shell_block+0x1b0> <== NOT EXECUTED
20256dc: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
20256e0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
20256e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20256e8: 02 80 00 25 be 202577c <rtems_rfs_shell_block+0x138> <== NOT EXECUTED
20256ec: f8 00 a0 1c ld [ %g2 + 0x1c ], %i4 <== NOT EXECUTED
int mod = b % 16;
if (mod == 0)
{
if (b)
printf ("\n");
printf ("%04x ", b);
20256f0: 35 00 81 9e sethi %hi(0x2067800), %i2 <== NOT EXECUTED
}
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
20256f4: 37 00 81 9e sethi %hi(0x2067800), %i3 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
20256f8: ba 10 20 00 clr %i5 <== NOT EXECUTED
int mod = b % 16;
if (mod == 0)
{
if (b)
printf ("\n");
printf ("%04x ", b);
20256fc: b4 16 a3 a8 or %i2, 0x3a8, %i2 <== NOT EXECUTED
}
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
2025700: 10 80 00 0f b 202573c <rtems_rfs_shell_block+0xf8> <== NOT EXECUTED
2025704: b6 16 e3 b0 or %i3, 0x3b0, %i3 <== NOT EXECUTED
b++, data++)
{
int mod = b % 16;
if (mod == 0)
{
if (b)
2025708: 12 80 00 37 bne 20257e4 <rtems_rfs_shell_block+0x1a0> <== NOT EXECUTED
202570c: 01 00 00 00 nop <== NOT EXECUTED
printf ("\n");
printf ("%04x ", b);
2025710: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2025714: 40 00 99 2f call 204bbd0 <printf> <== NOT EXECUTED
2025718: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
}
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
202571c: d2 0f 00 1d ldub [ %i4 + %i5 ], %o1 <== NOT EXECUTED
2025720: 40 00 99 2c call 204bbd0 <printf> <== NOT EXECUTED
2025724: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
2025728: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
b < rtems_rfs_fs_block_size (fs);
b++, data++)
202572c: ba 07 60 01 inc %i5 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
2025730: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
2025734: 1a 80 00 12 bcc 202577c <rtems_rfs_shell_block+0x138> <== NOT EXECUTED
2025738: 01 00 00 00 nop <== NOT EXECUTED
b < rtems_rfs_fs_block_size (fs);
b++, data++)
{
int mod = b % 16;
if (mod == 0)
202573c: 82 8f 60 0f andcc %i5, 0xf, %g1 <== NOT EXECUTED
2025740: 02 bf ff f2 be 2025708 <rtems_rfs_shell_block+0xc4> <== NOT EXECUTED
2025744: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED
{
if (b)
printf ("\n");
printf ("%04x ", b);
}
if (mod == 8)
2025748: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED
202574c: 32 bf ff f5 bne,a 2025720 <rtems_rfs_shell_block+0xdc> <== NOT EXECUTED
2025750: d2 0f 00 1d ldub [ %i4 + %i5 ], %o1 <== NOT EXECUTED
printf (" ");
2025754: 40 00 99 8c call 204bd84 <putchar> <== NOT EXECUTED
2025758: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
printf ("%02x ", *data);
202575c: d2 0f 00 1d ldub [ %i4 + %i5 ], %o1 <== NOT EXECUTED
2025760: 40 00 99 1c call 204bbd0 <printf> <== NOT EXECUTED
2025764: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
2025768: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
b < rtems_rfs_fs_block_size (fs);
b++, data++)
202576c: ba 07 60 01 inc %i5 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
2025770: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
2025774: 0a bf ff f3 bcs 2025740 <rtems_rfs_shell_block+0xfc> <== NOT EXECUTED
2025778: 82 8f 60 0f andcc %i5, 0xf, %g1 <== NOT EXECUTED
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
}
printf ("\n");
202577c: 40 00 99 82 call 204bd84 <putchar> <== NOT EXECUTED
2025780: 90 10 20 0a mov 0xa, %o0 <== 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);
2025784: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2025788: 40 00 56 a0 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
202578c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rtems_rfs_shell_unlock_rfs (fs);
2025790: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
2025794: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2025798: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
202579c: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
20257a0: 7f ff fe 57 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
20257a4: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
20257a8: 81 c7 e0 08 ret <== NOT EXECUTED
20257ac: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
20257b0: 7f ff fe 53 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
20257b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
20257b8: 40 00 a2 9c call 204e228 <strerror> <== NOT EXECUTED
20257bc: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20257c0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20257c4: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20257c8: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
20257cc: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
20257d0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
20257d4: 40 00 98 ff call 204bbd0 <printf> <== NOT EXECUTED
20257d8: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
20257dc: 81 c7 e0 08 ret <== NOT EXECUTED
20257e0: 81 e8 00 00 restore <== NOT EXECUTED
{
int mod = b % 16;
if (mod == 0)
{
if (b)
printf ("\n");
20257e4: 40 00 99 68 call 204bd84 <putchar> <== NOT EXECUTED
20257e8: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED
printf ("%04x ", b);
20257ec: 10 bf ff ca b 2025714 <rtems_rfs_shell_block+0xd0> <== NOT EXECUTED
20257f0: 90 10 00 1a mov %i2, %o0 <== 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);
20257f4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
20257f8: 40 00 56 84 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20257fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
2025800: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
2025804: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2025808: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
202580c: 7f ff fe 3c call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2025810: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
2025814: 40 00 a2 85 call 204e228 <strerror> <== NOT EXECUTED
2025818: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
202581c: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2025820: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025824: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2025828: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
202582c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
2025830: 40 00 98 e8 call 204bbd0 <printf> <== NOT EXECUTED
2025834: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
2025838: 81 c7 e0 08 ret <== NOT EXECUTED
202583c: 81 e8 00 00 restore <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
2025840: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
return 1;
2025844: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
2025848: 40 00 99 7d call 204be3c <puts> <== NOT EXECUTED
202584c: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED
return 1;
2025850: 81 c7 e0 08 ret <== NOT EXECUTED
2025854: 81 e8 00 00 restore <== NOT EXECUTED
02025858 <rtems_rfs_shell_data>:
return rc;
}
static int
rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, char *argv[])
{
2025858: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
size_t blocks;
size_t inodes;
int bpcent;
int ipcent;
printf ("RFS Filesystem Data\n");
202585c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2025860: 40 00 99 77 call 204be3c <puts> <== NOT EXECUTED
2025864: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 2067bb8 <rtems_rfs_rtems_eval_config+0x210><== NOT EXECUTED
printf (" flags: %08" PRIx32 "\n", fs->flags);
2025868: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
202586c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2025870: 40 00 98 d8 call 204bbd0 <printf> <== NOT EXECUTED
2025874: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 2067bd0 <rtems_rfs_rtems_eval_config+0x228><== NOT EXECUTED
#if 0
printf (" device: %08lx\n", rtems_rfs_fs_device (fs));
#endif
printf (" blocks: %zu\n", rtems_rfs_fs_blocks (fs));
2025878: d2 06 20 04 ld [ %i0 + 4 ], %o1 <== NOT EXECUTED
202587c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2025880: 40 00 98 d4 call 204bbd0 <printf> <== NOT EXECUTED
2025884: 90 12 23 f0 or %o0, 0x3f0, %o0 ! 2067bf0 <rtems_rfs_rtems_eval_config+0x248><== NOT EXECUTED
printf (" block size: %zu\n", rtems_rfs_fs_block_size (fs));
2025888: d2 06 20 08 ld [ %i0 + 8 ], %o1 <== NOT EXECUTED
202588c: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025890: 40 00 98 d0 call 204bbd0 <printf> <== NOT EXECUTED
2025894: 90 12 20 10 or %o0, 0x10, %o0 ! 2067c10 <rtems_rfs_rtems_eval_config+0x268><== NOT EXECUTED
printf (" size: %" PRIu64 "\n", rtems_rfs_fs_size (fs));
2025898: 40 00 61 d5 call 203dfec <rtems_rfs_fs_size> <== NOT EXECUTED
202589c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20258a0: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
20258a4: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
20258a8: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
20258ac: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
20258b0: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
20258b4: 40 00 98 c7 call 204bbd0 <printf> <== NOT EXECUTED
20258b8: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
printf (" media block size: %" PRIu32 "\n", rtems_rfs_fs_media_block_size (fs));
20258bc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
20258c0: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
20258c4: d2 00 60 24 ld [ %g1 + 0x24 ], %o1 <== NOT EXECUTED
20258c8: 40 00 98 c2 call 204bbd0 <printf> <== NOT EXECUTED
20258cc: 90 12 20 50 or %o0, 0x50, %o0 <== NOT EXECUTED
printf (" media size: %" PRIu64 "\n", rtems_rfs_fs_media_size (fs));
20258d0: 40 00 61 d0 call 203e010 <rtems_rfs_fs_media_size> <== NOT EXECUTED
20258d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20258d8: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
20258dc: 86 10 00 09 mov %o1, %g3 <== NOT EXECUTED
20258e0: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
20258e4: 92 10 00 02 mov %g2, %o1 <== NOT EXECUTED
20258e8: 94 10 00 03 mov %g3, %o2 <== NOT EXECUTED
20258ec: 40 00 98 b9 call 204bbd0 <printf> <== NOT EXECUTED
20258f0: 90 12 20 70 or %o0, 0x70, %o0 <== NOT EXECUTED
printf (" inodes: %" PRIu32 "\n", rtems_rfs_fs_inodes (fs));
20258f4: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 <== NOT EXECUTED
20258f8: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
20258fc: 40 00 98 b5 call 204bbd0 <printf> <== NOT EXECUTED
2025900: 90 12 20 90 or %o0, 0x90, %o0 ! 2067c90 <rtems_rfs_rtems_eval_config+0x2e8><== NOT EXECUTED
printf (" bad blocks: %" PRIu32 "\n", fs->bad_blocks);
2025904: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 <== NOT EXECUTED
2025908: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202590c: 40 00 98 b1 call 204bbd0 <printf> <== NOT EXECUTED
2025910: 90 12 20 b0 or %o0, 0xb0, %o0 ! 2067cb0 <rtems_rfs_rtems_eval_config+0x308><== NOT EXECUTED
printf (" max. name length: %" PRIu32 "\n", rtems_rfs_fs_max_name (fs));
2025914: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 <== NOT EXECUTED
2025918: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202591c: 40 00 98 ad call 204bbd0 <printf> <== NOT EXECUTED
2025920: 90 12 20 d0 or %o0, 0xd0, %o0 ! 2067cd0 <rtems_rfs_rtems_eval_config+0x328><== NOT EXECUTED
printf (" groups: %d\n", fs->group_count);
2025924: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 <== NOT EXECUTED
2025928: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202592c: 40 00 98 a9 call 204bbd0 <printf> <== NOT EXECUTED
2025930: 90 12 20 f0 or %o0, 0xf0, %o0 ! 2067cf0 <rtems_rfs_rtems_eval_config+0x348><== NOT EXECUTED
printf (" group blocks: %zd\n", fs->group_blocks);
2025934: d2 06 20 28 ld [ %i0 + 0x28 ], %o1 <== NOT EXECUTED
2025938: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202593c: 40 00 98 a5 call 204bbd0 <printf> <== NOT EXECUTED
2025940: 90 12 21 08 or %o0, 0x108, %o0 ! 2067d08 <rtems_rfs_rtems_eval_config+0x360><== NOT EXECUTED
printf (" group inodes: %zd\n", fs->group_inodes);
2025944: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 <== NOT EXECUTED
2025948: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202594c: 40 00 98 a1 call 204bbd0 <printf> <== NOT EXECUTED
2025950: 90 12 21 28 or %o0, 0x128, %o0 ! 2067d28 <rtems_rfs_rtems_eval_config+0x380><== NOT EXECUTED
printf (" inodes per block: %zd\n", fs->inodes_per_block);
2025954: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 <== NOT EXECUTED
2025958: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202595c: 40 00 98 9d call 204bbd0 <printf> <== NOT EXECUTED
2025960: 90 12 21 48 or %o0, 0x148, %o0 ! 2067d48 <rtems_rfs_rtems_eval_config+0x3a0><== NOT EXECUTED
printf (" blocks per block: %zd\n", fs->blocks_per_block);
2025964: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 <== NOT EXECUTED
2025968: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202596c: 40 00 98 99 call 204bbd0 <printf> <== NOT EXECUTED
2025970: 90 12 21 68 or %o0, 0x168, %o0 ! 2067d68 <rtems_rfs_rtems_eval_config+0x3c0><== NOT EXECUTED
printf (" singly blocks: %zd\n", fs->block_map_singly_blocks);
2025974: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 <== NOT EXECUTED
2025978: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202597c: 40 00 98 95 call 204bbd0 <printf> <== NOT EXECUTED
2025980: 90 12 21 88 or %o0, 0x188, %o0 ! 2067d88 <rtems_rfs_rtems_eval_config+0x3e0><== NOT EXECUTED
printf (" doublly blocks: %zd\n", fs->block_map_doubly_blocks);
2025984: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED
2025988: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202598c: 40 00 98 91 call 204bbd0 <printf> <== NOT EXECUTED
2025990: 90 12 21 a8 or %o0, 0x1a8, %o0 ! 2067da8 <rtems_rfs_rtems_eval_config+0x400><== NOT EXECUTED
printf (" max. held buffers: %" PRId32 "\n", fs->max_held_buffers);
2025994: d2 06 20 40 ld [ %i0 + 0x40 ], %o1 <== NOT EXECUTED
2025998: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
202599c: 40 00 98 8d call 204bbd0 <printf> <== NOT EXECUTED
20259a0: 90 12 21 c8 or %o0, 0x1c8, %o0 ! 2067dc8 <rtems_rfs_rtems_eval_config+0x420><== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
20259a4: 7f ff fd c0 call 20250a4 <rtems_rfs_shell_lock_rfs> <== NOT EXECUTED
20259a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
20259ac: 94 07 bf fc add %fp, -4, %o2 <== NOT EXECUTED
20259b0: 92 07 bf f8 add %fp, -8, %o1 <== NOT EXECUTED
20259b4: 40 00 69 a1 call 2040038 <rtems_rfs_group_usage> <== NOT EXECUTED
20259b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_shell_unlock_rfs (fs);
20259bc: 7f ff fd d0 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
20259c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
20259c4: fa 07 bf f8 ld [ %fp + -8 ], %i5 <== NOT EXECUTED
20259c8: d2 06 20 04 ld [ %i0 + 4 ], %o1 <== NOT EXECUTED
20259cc: 83 2f 60 02 sll %i5, 2, %g1 <== NOT EXECUTED
20259d0: 91 2f 60 07 sll %i5, 7, %o0 <== NOT EXECUTED
20259d4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
20259d8: 90 02 00 1d add %o0, %i5, %o0 <== NOT EXECUTED
20259dc: 40 00 ec 30 call 2060a9c <.udiv> <== NOT EXECUTED
20259e0: 91 2a 20 03 sll %o0, 3, %o0 <== NOT EXECUTED
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
20259e4: c2 07 bf fc ld [ %fp + -4 ], %g1 <== NOT EXECUTED
return rc;
}
static int
rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, char *argv[])
{
20259e8: b8 10 00 18 mov %i0, %i4 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
rtems_rfs_shell_unlock_rfs (fs);
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
20259ec: d2 07 20 14 ld [ %i4 + 0x14 ], %o1 <== NOT EXECUTED
20259f0: 87 28 60 07 sll %g1, 7, %g3 <== NOT EXECUTED
20259f4: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED
20259f8: 84 20 c0 02 sub %g3, %g2, %g2 <== NOT EXECUTED
20259fc: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
rtems_rfs_shell_unlock_rfs (fs);
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
2025a00: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
2025a04: 40 00 ec 26 call 2060a9c <.udiv> <== NOT EXECUTED
2025a08: 91 28 60 03 sll %g1, 3, %o0 <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
2025a0c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
rtems_rfs_group_usage (fs, &blocks, &inodes);
rtems_rfs_shell_unlock_rfs (fs);
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
2025a10: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
2025a14: 40 00 ec 24 call 2060aa4 <.div> <== NOT EXECUTED
2025a18: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2025a1c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
2025a20: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
2025a24: 40 00 ec cc call 2060d54 <.rem> <== NOT EXECUTED
2025a28: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2025a2c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2025a30: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025a34: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2025a38: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025a3c: 40 00 98 65 call 204bbd0 <printf> <== NOT EXECUTED
2025a40: 90 12 21 e8 or %o0, 0x1e8, %o0 ! 2067de8 <rtems_rfs_rtems_eval_config+0x440><== NOT EXECUTED
blocks, bpcent / 10, bpcent % 10);
printf (" inodes used: %zd (%d.%d%%)\n",
2025a44: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
2025a48: f6 07 bf fc ld [ %fp + -4 ], %i3 <== NOT EXECUTED
2025a4c: 40 00 ec 16 call 2060aa4 <.div> <== NOT EXECUTED
2025a50: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2025a54: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
2025a58: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
2025a5c: 40 00 ec be call 2060d54 <.rem> <== NOT EXECUTED
2025a60: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
inodes, ipcent / 10, ipcent % 10);
return 0;
}
2025a64: b0 10 20 00 clr %i0 <== NOT EXECUTED
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
printf (" blocks used: %zd (%d.%d%%)\n",
blocks, bpcent / 10, bpcent % 10);
printf (" inodes used: %zd (%d.%d%%)\n",
2025a68: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025a6c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
2025a70: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025a74: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2025a78: 40 00 98 56 call 204bbd0 <printf> <== NOT EXECUTED
2025a7c: 90 12 22 10 or %o0, 0x210, %o0 <== NOT EXECUTED
inodes, ipcent / 10, ipcent % 10);
return 0;
}
2025a80: 81 c7 e0 08 ret <== NOT EXECUTED
2025a84: 81 e8 00 00 restore <== NOT EXECUTED
02025304 <rtems_rfs_shell_dir>:
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
{
2025304: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
bool state;
int entry;
int b;
int rc;
if (argc <= 1)
2025308: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED
202530c: 04 80 00 bc ble 20255fc <rtems_rfs_shell_dir+0x2f8> <== NOT EXECUTED
2025310: 92 10 20 00 clr %o1 <== NOT EXECUTED
{
printf ("error: no block number provided\n");
return 1;
}
block = strtoul (argv[1], 0, 0);
2025314: d0 06 a0 04 ld [ %i2 + 4 ], %o0 <== NOT EXECUTED
2025318: 40 00 aa 67 call 204fcb4 <strtoul> <== NOT EXECUTED
202531c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2025320: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
2025324: 7f ff ff 60 call 20250a4 <rtems_rfs_shell_lock_rfs> <== NOT EXECUTED
2025328: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
202532c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2025330: 92 10 20 00 clr %o1 <== NOT EXECUTED
2025334: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2025338: 40 00 6a f8 call 203ff18 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
202533c: 96 07 bf ff add %fp, -1, %o3 <== NOT EXECUTED
if (rc > 0)
2025340: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2025344: 14 80 00 85 bg 2025558 <rtems_rfs_shell_dir+0x254> <== NOT EXECUTED
2025348: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
202534c: 15 00 81 96 sethi %hi(0x2065800), %o2 <== NOT EXECUTED
2025350: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2025354: 02 80 00 04 be 2025364 <rtems_rfs_shell_dir+0x60> <== NOT EXECUTED
2025358: 94 12 a0 a0 or %o2, 0xa0, %o2 <== NOT EXECUTED
202535c: 15 00 81 9e sethi %hi(0x2067800), %o2 <== NOT EXECUTED
2025360: 94 12 a2 68 or %o2, 0x268, %o2 ! 2067a68 <rtems_rfs_rtems_eval_config+0xc0><== NOT EXECUTED
2025364: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
2025368: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
202536c: 40 00 9a 19 call 204bbd0 <printf> <== NOT EXECUTED
2025370: 90 12 22 c8 or %o0, 0x2c8, %o0 ! 2067ac8 <rtems_rfs_rtems_eval_config+0x120><== NOT EXECUTED
printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
2025374: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
2025378: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
202537c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2025380: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2025384: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2025388: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
202538c: 40 00 58 1a call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
2025390: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
2025394: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2025398: 14 80 00 86 bg 20255b0 <rtems_rfs_shell_dir+0x2ac> <== NOT EXECUTED
202539c: c4 07 bf f8 ld [ %fp + -8 ], %g2 <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
20253a0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
20253a4: 80 a0 60 0b cmp %g1, 0xb <== NOT EXECUTED
20253a8: 02 80 00 61 be 202552c <rtems_rfs_shell_dir+0x228> <== NOT EXECUTED
20253ac: fa 00 a0 1c ld [ %g2 + 0x1c ], %i5 <== NOT EXECUTED
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
20253b0: c2 0f 60 09 ldub [ %i5 + 9 ], %g1 <== NOT EXECUTED
20253b4: f8 0f 60 08 ldub [ %i5 + 8 ], %i4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20253b8: 23 00 00 3f sethi %hi(0xfc00), %l1 <== NOT EXECUTED
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
20253bc: b9 2f 20 08 sll %i4, 8, %i4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20253c0: a2 14 63 ff or %l1, 0x3ff, %l1 <== NOT EXECUTED
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
20253c4: b8 17 00 01 or %i4, %g1, %i4 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
20253c8: c6 0f 40 00 ldub [ %i5 ], %g3 <== NOT EXECUTED
20253cc: d6 0f 60 01 ldub [ %i5 + 1 ], %o3 <== NOT EXECUTED
20253d0: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20253d4: 80 a7 00 11 cmp %i4, %l1 <== NOT EXECUTED
20253d8: 02 80 00 55 be 202552c <rtems_rfs_shell_dir+0x228> <== NOT EXECUTED
20253dc: c4 0f 60 03 ldub [ %i5 + 3 ], %g2 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
20253e0: 96 0a e0 ff and %o3, 0xff, %o3 <== NOT EXECUTED
20253e4: 87 28 e0 18 sll %g3, 0x18, %g3 <== NOT EXECUTED
20253e8: 97 2a e0 10 sll %o3, 0x10, %o3 <== NOT EXECUTED
20253ec: 84 08 a0 ff and %g2, 0xff, %g2 <== NOT EXECUTED
20253f0: 96 12 c0 03 or %o3, %g3, %o3 <== NOT EXECUTED
20253f4: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
20253f8: 96 12 c0 02 or %o3, %g2, %o3 <== NOT EXECUTED
20253fc: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
2025400: 21 00 81 9e sethi %hi(0x2067800), %l0 <== NOT EXECUTED
length = 50;
for (c = 0; c < length; c++)
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
2025404: 25 00 81 9e sethi %hi(0x2067800), %l2 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
2025408: 96 12 c0 01 or %o3, %g1, %o3 <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
b = 0;
202540c: b4 10 20 00 clr %i2 <== NOT EXECUTED
entry = 1;
2025410: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
2025414: a0 14 23 70 or %l0, 0x370, %l0 <== NOT EXECUTED
length = 50;
for (c = 0; c < length; c++)
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
2025418: a4 14 a3 a0 or %l2, 0x3a0, %l2 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
202541c: 80 a7 20 09 cmp %i4, 9 <== NOT EXECUTED
2025420: 04 80 00 7d ble 2025614 <rtems_rfs_shell_dir+0x310> <== NOT EXECUTED
2025424: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2025428: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
202542c: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
2025430: 1a 80 00 79 bcc 2025614 <rtems_rfs_shell_dir+0x310> <== NOT EXECUTED
2025434: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
break;
}
if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
2025438: 02 80 00 7e be 2025630 <rtems_rfs_shell_dir+0x32c> <== NOT EXECUTED
202543c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2025440: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
2025444: 80 a0 40 0b cmp %g1, %o3 <== NOT EXECUTED
2025448: 08 80 00 79 bleu 202562c <rtems_rfs_shell_dir+0x328> <== NOT EXECUTED
202544c: b6 07 3f f6 add %i4, -10, %i3 <== NOT EXECUTED
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
entry, b,
rtems_rfs_dir_entry_ino (data),
rtems_rfs_dir_entry_hash (data),
2025450: c6 0f 60 05 ldub [ %i5 + 5 ], %g3 <== NOT EXECUTED
2025454: c2 0f 60 06 ldub [ %i5 + 6 ], %g1 <== NOT EXECUTED
2025458: d8 0f 60 04 ldub [ %i5 + 4 ], %o4 <== NOT EXECUTED
202545c: c4 0f 60 07 ldub [ %i5 + 7 ], %g2 <== NOT EXECUTED
2025460: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
2025464: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2025468: 99 2b 20 18 sll %o4, 0x18, %o4 <== NOT EXECUTED
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
202546c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
entry, b,
rtems_rfs_dir_entry_ino (data),
rtems_rfs_dir_entry_hash (data),
2025470: 98 13 00 03 or %o4, %g3, %o4 <== NOT EXECUTED
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
2025474: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
entry, b,
rtems_rfs_dir_entry_ino (data),
rtems_rfs_dir_entry_hash (data),
2025478: 98 13 00 02 or %o4, %g2, %o4 <== NOT EXECUTED
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
202547c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2025480: 98 13 00 01 or %o4, %g1, %o4 <== NOT EXECUTED
2025484: 40 00 99 d3 call 204bbd0 <printf> <== NOT EXECUTED
2025488: 9a 10 00 1b mov %i3, %o5 <== NOT EXECUTED
202548c: 80 a6 e0 32 cmp %i3, 0x32 <== NOT EXECUTED
2025490: 04 80 00 3f ble 202558c <rtems_rfs_shell_dir+0x288> <== NOT EXECUTED
2025494: a8 10 00 1b mov %i3, %l4 <== NOT EXECUTED
2025498: a8 10 20 32 mov 0x32, %l4 <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
202549c: a6 10 20 00 clr %l3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
20254a0: 82 07 40 13 add %i5, %l3, %g1 <== NOT EXECUTED
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
20254a4: d0 08 60 0a ldub [ %g1 + 0xa ], %o0 <== NOT EXECUTED
20254a8: 40 00 9a 37 call 204bd84 <putchar> <== NOT EXECUTED
20254ac: a6 04 e0 01 inc %l3 <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
20254b0: 80 a4 c0 14 cmp %l3, %l4 <== NOT EXECUTED
20254b4: 12 bf ff fc bne 20254a4 <rtems_rfs_shell_dir+0x1a0> <== NOT EXECUTED
20254b8: 82 07 40 13 add %i5, %l3, %g1 <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
20254bc: 80 a6 c0 14 cmp %i3, %l4 <== NOT EXECUTED
20254c0: 14 80 00 39 bg 20255a4 <rtems_rfs_shell_dir+0x2a0> <== NOT EXECUTED
20254c4: 01 00 00 00 nop <== NOT EXECUTED
printf ("...");
printf ("\n");
20254c8: 40 00 9a 2f call 204bd84 <putchar> <== NOT EXECUTED
20254cc: 90 10 20 0a mov 0xa, %o0 ! a <PROM_START+0xa> <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
20254d0: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
printf ("\n");
b += elength;
20254d4: b4 06 80 1c add %i2, %i4, %i2 <== NOT EXECUTED
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
while (b < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE - 1))
20254d8: 82 00 7f f5 add %g1, -11, %g1 <== NOT EXECUTED
20254dc: 80 a6 80 01 cmp %i2, %g1 <== NOT EXECUTED
20254e0: 1a 80 00 13 bcc 202552c <rtems_rfs_shell_dir+0x228> <== NOT EXECUTED
20254e4: b2 06 60 01 inc %i1 <== NOT EXECUTED
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
printf ("\n");
b += elength;
data += elength;
20254e8: ba 07 40 1c add %i5, %i4, %i5 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
20254ec: d6 0f 40 00 ldub [ %i5 ], %o3 <== NOT EXECUTED
20254f0: c8 0f 60 01 ldub [ %i5 + 1 ], %g4 <== NOT EXECUTED
20254f4: c6 0f 60 03 ldub [ %i5 + 3 ], %g3 <== NOT EXECUTED
20254f8: c2 0f 60 02 ldub [ %i5 + 2 ], %g1 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
20254fc: f8 0f 60 08 ldub [ %i5 + 8 ], %i4 <== NOT EXECUTED
2025500: c4 0f 60 09 ldub [ %i5 + 9 ], %g2 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
2025504: 97 2a e0 18 sll %o3, 0x18, %o3 <== NOT EXECUTED
2025508: 89 29 20 10 sll %g4, 0x10, %g4 <== NOT EXECUTED
202550c: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2025510: 96 12 c0 04 or %o3, %g4, %o3 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
2025514: b9 2f 20 08 sll %i4, 8, %i4 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
2025518: 96 12 c0 03 or %o3, %g3, %o3 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
202551c: b8 17 00 02 or %i4, %g2, %i4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
2025520: 80 a7 00 11 cmp %i4, %l1 <== NOT EXECUTED
2025524: 12 bf ff be bne 202541c <rtems_rfs_shell_dir+0x118> <== NOT EXECUTED
2025528: 96 12 c0 01 or %o3, %g1, %o3 <== 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);
202552c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
2025530: 40 00 57 36 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2025534: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
block, rc, strerror (rc));
return 1;
}
rtems_rfs_shell_unlock_rfs (fs);
2025538: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
202553c: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2025540: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
2025544: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2025548: 7f ff fe ed call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
202554c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
2025550: 81 c7 e0 08 ret <== NOT EXECUTED
2025554: 81 e8 00 00 restore <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
2025558: 7f ff fe e9 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
202555c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
2025560: 40 00 a3 32 call 204e228 <strerror> <== NOT EXECUTED
2025564: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2025568: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
202556c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025570: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2025574: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
2025578: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
202557c: 40 00 99 95 call 204bbd0 <printf> <== NOT EXECUTED
2025580: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
2025584: 81 c7 e0 08 ret <== NOT EXECUTED
2025588: 81 e8 00 00 restore <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
202558c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2025590: 12 bf ff c4 bne 20254a0 <rtems_rfs_shell_dir+0x19c> <== NOT EXECUTED
2025594: a6 10 20 00 clr %l3 <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
2025598: 80 a6 c0 14 cmp %i3, %l4 <== NOT EXECUTED
202559c: 04 bf ff cb ble 20254c8 <rtems_rfs_shell_dir+0x1c4> <== NOT EXECUTED
20255a0: 01 00 00 00 nop <== NOT EXECUTED
printf ("...");
20255a4: 40 00 99 8b call 204bbd0 <printf> <== NOT EXECUTED
20255a8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
20255ac: 30 bf ff c7 b,a 20254c8 <rtems_rfs_shell_dir+0x1c4> <== 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);
20255b0: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
20255b4: 40 00 57 15 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20255b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
20255bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
20255c0: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
20255c4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
20255c8: 7f ff fe cd call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
20255cc: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
20255d0: 40 00 a3 16 call 204e228 <strerror> <== NOT EXECUTED
20255d4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20255d8: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20255dc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20255e0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
20255e4: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
20255e8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
20255ec: 40 00 99 79 call 204bbd0 <printf> <== NOT EXECUTED
20255f0: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
20255f4: 81 c7 e0 08 ret <== NOT EXECUTED
20255f8: 81 e8 00 00 restore <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
20255fc: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
return 1;
2025600: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
int b;
int rc;
if (argc <= 1)
{
printf ("error: no block number provided\n");
2025604: 40 00 9a 0e call 204be3c <puts> <== NOT EXECUTED
2025608: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED
return 1;
202560c: 81 c7 e0 08 ret <== NOT EXECUTED
2025610: 81 e8 00 00 restore <== NOT EXECUTED
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
(elength >= rtems_rfs_fs_max_name (fs)))
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
2025614: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2025618: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
202561c: 40 00 99 6d call 204bbd0 <printf> <== NOT EXECUTED
2025620: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED
break;
2025624: 10 bf ff c3 b 2025530 <rtems_rfs_shell_dir+0x22c> <== NOT EXECUTED
2025628: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
}
if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
202562c: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
2025630: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED
2025634: 40 00 99 67 call 204bbd0 <printf> <== NOT EXECUTED
2025638: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED
break;
202563c: 10 bf ff bd b 2025530 <rtems_rfs_shell_dir+0x22c> <== NOT EXECUTED
2025640: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
02025154 <rtems_rfs_shell_group>:
return 0;
}
static int
rtems_rfs_shell_group (rtems_rfs_file_system* fs, int argc, char *argv[])
{
2025154: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int g;
start = 0;
end = fs->group_count - 1;
switch (argc)
2025158: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED
202515c: 02 80 00 2d be 2025210 <rtems_rfs_shell_group+0xbc> <== NOT EXECUTED
2025160: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 <== NOT EXECUTED
2025164: 80 a6 60 03 cmp %i1, 3 <== NOT EXECUTED
2025168: 02 80 00 1c be 20251d8 <rtems_rfs_shell_group+0x84> <== NOT EXECUTED
202516c: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED
2025170: 02 80 00 07 be 202518c <rtems_rfs_shell_group+0x38> <== NOT EXECUTED
2025174: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
start = strtoul (argv[1], 0, 0);
end = strtoul (argv[2], 0, 0);
break;
default:
printf ("error: too many arguments.\n");
return 1;
2025178: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
case 3:
start = strtoul (argv[1], 0, 0);
end = strtoul (argv[2], 0, 0);
break;
default:
printf ("error: too many arguments.\n");
202517c: 40 00 9b 30 call 204be3c <puts> <== NOT EXECUTED
2025180: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED
return 1;
2025184: 81 c7 e0 08 ret <== NOT EXECUTED
2025188: 81 e8 00 00 restore <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
202518c: b6 02 7f ff add %o1, -1, %i3 <== NOT EXECUTED
2025190: 84 10 20 00 clr %g2 <== NOT EXECUTED
2025194: 83 36 e0 1f srl %i3, 0x1f, %g1 <== NOT EXECUTED
{
int start;
int end;
int g;
start = 0;
2025198: ba 10 20 00 clr %i5 <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
202519c: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
20251a0: 12 80 00 08 bne 20251c0 <rtems_rfs_shell_group+0x6c> <== NOT EXECUTED
20251a4: 80 88 a0 ff btst 0xff, %g2 <== NOT EXECUTED
20251a8: 12 80 00 06 bne 20251c0 <rtems_rfs_shell_group+0x6c> <== NOT EXECUTED
20251ac: 80 a7 40 09 cmp %i5, %o1 <== NOT EXECUTED
20251b0: 16 80 00 04 bge 20251c0 <rtems_rfs_shell_group+0x6c> <== NOT EXECUTED
20251b4: 80 a6 c0 09 cmp %i3, %o1 <== NOT EXECUTED
(start >= fs->group_count) || (end >= fs->group_count))
20251b8: 06 80 00 20 bl 2025238 <rtems_rfs_shell_group+0xe4> <== NOT EXECUTED
20251bc: 01 00 00 00 nop <== NOT EXECUTED
{
printf ("error: group out of range (0->%d).\n", fs->group_count);
20251c0: 11 00 81 9e sethi %hi(0x2067800), %o0 <== NOT EXECUTED
return 1;
20251c4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
}
if ((start < 0) || (end < 0) ||
(start >= fs->group_count) || (end >= fs->group_count))
{
printf ("error: group out of range (0->%d).\n", fs->group_count);
20251c8: 40 00 9a 82 call 204bbd0 <printf> <== NOT EXECUTED
20251cc: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED
return 1;
20251d0: 81 c7 e0 08 ret <== NOT EXECUTED
20251d4: 81 e8 00 00 restore <== NOT EXECUTED
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
break;
case 3:
start = strtoul (argv[1], 0, 0);
20251d8: d0 06 a0 04 ld [ %i2 + 4 ], %o0 <== NOT EXECUTED
20251dc: 92 10 20 00 clr %o1 <== NOT EXECUTED
20251e0: 40 00 aa b5 call 204fcb4 <strtoul> <== NOT EXECUTED
20251e4: 94 10 20 00 clr %o2 <== NOT EXECUTED
20251e8: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
end = strtoul (argv[2], 0, 0);
20251ec: d0 06 a0 08 ld [ %i2 + 8 ], %o0 <== NOT EXECUTED
20251f0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20251f4: 40 00 aa b0 call 204fcb4 <strtoul> <== NOT EXECUTED
20251f8: 94 10 20 00 clr %o2 <== NOT EXECUTED
20251fc: 85 37 60 1f srl %i5, 0x1f, %g2 <== NOT EXECUTED
2025200: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
2025204: 83 32 20 1f srl %o0, 0x1f, %g1 <== NOT EXECUTED
break;
2025208: 10 bf ff e5 b 202519c <rtems_rfs_shell_group+0x48> <== NOT EXECUTED
202520c: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 <== NOT EXECUTED
switch (argc)
{
case 1:
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
2025210: d0 06 a0 04 ld [ %i2 + 4 ], %o0 <== NOT EXECUTED
2025214: 92 10 20 00 clr %o1 <== NOT EXECUTED
2025218: 40 00 aa a7 call 204fcb4 <strtoul> <== NOT EXECUTED
202521c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2025220: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 <== NOT EXECUTED
2025224: 83 32 20 1f srl %o0, 0x1f, %g1 <== NOT EXECUTED
2025228: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
202522c: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
break;
2025230: 10 bf ff db b 202519c <rtems_rfs_shell_group+0x48> <== NOT EXECUTED
2025234: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED
{
printf ("error: group out of range (0->%d).\n", fs->group_count);
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
2025238: 7f ff ff 9b call 20250a4 <rtems_rfs_shell_lock_rfs> <== NOT EXECUTED
202523c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
for (g = start; g <= end; g++)
2025240: 80 a7 40 1b cmp %i5, %i3 <== NOT EXECUTED
2025244: 14 80 00 2b bg 20252f0 <rtems_rfs_shell_group+0x19c> <== NOT EXECUTED
2025248: 83 2f 60 06 sll %i5, 6, %g1 <== NOT EXECUTED
202524c: b9 2f 60 04 sll %i5, 4, %i4 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2025250: 35 00 81 9e sethi %hi(0x2067800), %i2 <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
2025254: b8 07 00 01 add %i4, %g1, %i4 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2025258: b4 16 a2 20 or %i2, 0x220, %i2 <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
{
rtems_rfs_group* group = &fs->groups[g];
202525c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
2025260: e6 06 20 2c ld [ %i0 + 0x2c ], %l3 <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
{
rtems_rfs_group* group = &fs->groups[g];
2025264: 82 00 80 1c add %g2, %i4, %g1 <== NOT EXECUTED
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
2025268: e2 00 60 04 ld [ %g1 + 4 ], %l1 <== NOT EXECUTED
202526c: e0 00 60 18 ld [ %g1 + 0x18 ], %l0 <== NOT EXECUTED
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2025270: e8 00 80 1c ld [ %g2 + %i4 ], %l4 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
2025274: e4 00 60 3c ld [ %g1 + 0x3c ], %l2 <== NOT EXECUTED
for (g = start; g <= end; g++)
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
2025278: a0 24 40 10 sub %l1, %l0, %l0 <== NOT EXECUTED
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
202527c: 85 2c 20 02 sll %l0, 2, %g2 <== NOT EXECUTED
2025280: 83 2c 20 04 sll %l0, 4, %g1 <== NOT EXECUTED
2025284: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2025288: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
202528c: 91 28 60 02 sll %g1, 2, %o0 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
2025290: 40 00 ee 03 call 2060a9c <.udiv> <== NOT EXECUTED
2025294: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
2025298: a4 24 c0 12 sub %l3, %l2, %l2 <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
202529c: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
20252a0: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
20252a4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
20252a8: e4 23 a0 5c st %l2, [ %sp + 0x5c ] <== NOT EXECUTED
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
20252ac: a5 2c a0 04 sll %l2, 4, %l2 <== NOT EXECUTED
20252b0: a4 00 40 12 add %g1, %l2, %l2 <== NOT EXECUTED
20252b4: 91 2c a0 02 sll %l2, 2, %o0 <== NOT EXECUTED
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
20252b8: 40 00 ed f9 call 2060a9c <.udiv> <== NOT EXECUTED
20252bc: 90 04 80 08 add %l2, %o0, %o0 <== NOT EXECUTED
20252c0: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
20252c4: d0 23 a0 60 st %o0, [ %sp + 0x60 ] <== NOT EXECUTED
20252c8: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED
20252cc: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
20252d0: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED
20252d4: 98 10 00 10 mov %l0, %o4 <== NOT EXECUTED
20252d8: 40 00 9a 3e call 204bbd0 <printf> <== NOT EXECUTED
20252dc: 9a 10 00 19 mov %i1, %o5 <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
20252e0: ba 07 60 01 inc %i5 <== NOT EXECUTED
20252e4: 80 a6 c0 1d cmp %i3, %i5 <== NOT EXECUTED
20252e8: 16 bf ff dd bge 202525c <rtems_rfs_shell_group+0x108> <== NOT EXECUTED
20252ec: b8 07 20 50 add %i4, 0x50, %i4 <== NOT EXECUTED
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
}
rtems_rfs_shell_unlock_rfs (fs);
20252f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20252f4: 7f ff ff 82 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
20252f8: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
20252fc: 81 c7 e0 08 ret <== NOT EXECUTED
2025300: 81 e8 00 00 restore <== NOT EXECUTED
02025a88 <rtems_rfs_shell_inode>:
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
2025a88: 9d e3 bf 68 save %sp, -152, %sp <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
2025a8c: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 <== NOT EXECUTED
2025a90: 7f ff 75 14 call 2002ee0 <.umul> <== NOT EXECUTED
2025a94: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
2025a98: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED
int b;
int rc;
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
2025a9c: ac 02 3f ff add %o0, -1, %l6 <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
2025aa0: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
2025aa4: 04 80 01 33 ble 2025f70 <rtems_rfs_shell_inode+0x4e8> <== NOT EXECUTED
2025aa8: b6 10 00 16 mov %l6, %i3 <== NOT EXECUTED
}
}
else
{
if (have_end && have_start)
printf ("warning: option ignored: %s\n", argv[arg]);
2025aac: 2b 00 81 9f sethi %hi(0x2067c00), %l5 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
2025ab0: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED
2025ab4: a6 10 20 00 clr %l3 <== NOT EXECUTED
2025ab8: a4 10 20 00 clr %l2 <== NOT EXECUTED
2025abc: a8 10 20 00 clr %l4 <== NOT EXECUTED
2025ac0: a0 10 20 00 clr %l0 <== NOT EXECUTED
2025ac4: ae 10 20 00 clr %l7 <== NOT EXECUTED
2025ac8: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
}
}
else
{
if (have_end && have_start)
printf ("warning: option ignored: %s\n", argv[arg]);
2025acc: 10 80 00 0f b 2025b08 <rtems_rfs_shell_inode+0x80> <== NOT EXECUTED
2025ad0: aa 15 62 68 or %l5, 0x268, %l5 <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
2025ad4: 12 80 00 e9 bne 2025e78 <rtems_rfs_shell_inode+0x3f0> <== NOT EXECUTED
2025ad8: 01 00 00 00 nop <== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
{
start = end = strtoul (argv[arg], 0, 0);
2025adc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2025ae0: 94 10 20 00 clr %o2 <== NOT EXECUTED
2025ae4: 92 10 20 00 clr %o1 <== NOT EXECUTED
2025ae8: 40 00 a8 73 call 204fcb4 <strtoul> <== NOT EXECUTED
2025aec: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED
2025af0: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
2025af4: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
2025af8: a2 04 60 01 inc %l1 <== NOT EXECUTED
2025afc: 80 a4 40 19 cmp %l1, %i1 <== NOT EXECUTED
2025b00: 02 80 00 15 be 2025b54 <rtems_rfs_shell_inode+0xcc> <== NOT EXECUTED
2025b04: 80 a6 c0 1d cmp %i3, %i5 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
2025b08: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
2025b0c: d2 06 80 01 ld [ %i2 + %g1 ], %o1 <== NOT EXECUTED
2025b10: c2 4a 40 00 ldsb [ %o1 ], %g1 <== NOT EXECUTED
2025b14: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
2025b18: 02 80 00 d0 be 2025e58 <rtems_rfs_shell_inode+0x3d0> <== NOT EXECUTED
2025b1c: 80 8c e0 ff btst 0xff, %l3 <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
2025b20: 12 bf ff ed bne 2025ad4 <rtems_rfs_shell_inode+0x4c> <== NOT EXECUTED
2025b24: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
2025b28: 02 bf ff ed be 2025adc <rtems_rfs_shell_inode+0x54> <== NOT EXECUTED
2025b2c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
start = end = strtoul (argv[arg], 0, 0);
have_start = true;
}
else
{
end = strtoul (argv[arg], 0, 0);
2025b30: 94 10 20 00 clr %o2 <== NOT EXECUTED
2025b34: 40 00 a8 60 call 204fcb4 <strtoul> <== NOT EXECUTED
2025b38: 92 10 20 00 clr %o1 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
2025b3c: a2 04 60 01 inc %l1 <== NOT EXECUTED
have_start = true;
}
else
{
end = strtoul (argv[arg], 0, 0);
have_end = true;
2025b40: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
2025b44: 80 a4 40 19 cmp %l1, %i1 <== NOT EXECUTED
2025b48: 12 bf ff f0 bne 2025b08 <rtems_rfs_shell_inode+0x80> <== NOT EXECUTED
2025b4c: b6 10 00 08 mov %o0, %i3 <== NOT EXECUTED
have_end = true;
}
}
}
if ((start >= total) || (end >= total))
2025b50: 80 a6 c0 1d cmp %i3, %i5 <== NOT EXECUTED
2025b54: 1a 80 00 e6 bcc 2025eec <rtems_rfs_shell_inode+0x464> <== NOT EXECUTED
2025b58: 80 a7 00 1d cmp %i4, %i5 <== NOT EXECUTED
2025b5c: 1a 80 00 e5 bcc 2025ef0 <rtems_rfs_shell_inode+0x468> <== NOT EXECUTED
2025b60: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
{
printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
2025b64: 7f ff fd 50 call 20250a4 <rtems_rfs_shell_lock_rfs> <== NOT EXECUTED
2025b68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
for (ino = start; ino <= end; ino++)
2025b6c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
2025b70: 18 80 00 b6 bgu 2025e48 <rtems_rfs_shell_inode+0x3c0> <== NOT EXECUTED
2025b74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
}
if (!error_check_only || error)
{
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
2025b78: 23 00 81 9f sethi %hi(0x2067c00), %l1 <== NOT EXECUTED
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);
if (links == 0xffff)
2025b7c: 27 00 00 3f sethi %hi(0xfc00), %l3 <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "LNK";
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
2025b80: 25 00 81 9f sethi %hi(0x2067c00), %l2 <== NOT EXECUTED
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
2025b84: 35 00 81 9f sethi %hi(0x2067c00), %i2 <== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
ino, rc, strerror (rc));
return 1;
}
if (show_all || allocated)
2025b88: b2 0d e0 ff and %l7, 0xff, %i1 <== NOT EXECUTED
}
}
if (!error_check_only || error)
{
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
2025b8c: a2 14 63 10 or %l1, 0x310, %l1 <== NOT EXECUTED
2025b90: a6 14 e3 ff or %l3, 0x3ff, %l3 <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "LNK";
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
2025b94: a4 14 a3 38 or %l2, 0x338, %l2 <== NOT EXECUTED
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
2025b98: b4 16 a3 70 or %i2, 0x370, %i2 <== NOT EXECUTED
for (ino = start; ino <= end; ino++)
{
rtems_rfs_inode_handle inode;
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
2025b9c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2025ba0: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2025ba4: 40 00 68 dd call 203ff18 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
2025ba8: 96 07 bf ff add %fp, -1, %o3 <== NOT EXECUTED
if (rc > 0)
2025bac: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2025bb0: 14 80 00 d6 bg 2025f08 <rtems_rfs_shell_inode+0x480> <== NOT EXECUTED
2025bb4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
ino, rc, strerror (rc));
return 1;
}
if (show_all || allocated)
2025bb8: 12 80 00 05 bne 2025bcc <rtems_rfs_shell_inode+0x144> <== NOT EXECUTED
2025bbc: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
2025bc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2025bc4: 22 80 00 9e be,a 2025e3c <rtems_rfs_shell_inode+0x3b4> <== NOT EXECUTED
2025bc8: b8 07 20 01 inc %i4 <== NOT EXECUTED
{
uint16_t mode;
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
2025bcc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2025bd0: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2025bd4: 94 07 bf d4 add %fp, -44, %o2 <== NOT EXECUTED
2025bd8: 40 00 69 7a call 20401c0 <rtems_rfs_inode_open> <== NOT EXECUTED
2025bdc: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
if (rc > 0)
2025be0: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2025be4: 14 80 00 d6 bg 2025f3c <rtems_rfs_shell_inode+0x4b4> <== NOT EXECUTED
2025be8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
error = false;
mode = rtems_rfs_inode_get_mode (&inode);
if (error_check_only)
2025bec: 80 8c 20 ff btst 0xff, %l0 <== 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);
2025bf0: fa 08 60 02 ldub [ %g1 + 2 ], %i5 <== NOT EXECUTED
2025bf4: c2 08 60 03 ldub [ %g1 + 3 ], %g1 <== NOT EXECUTED
2025bf8: bb 2f 60 08 sll %i5, 8, %i5 <== NOT EXECUTED
2025bfc: 02 80 00 16 be 2025c54 <rtems_rfs_shell_inode+0x1cc> <== NOT EXECUTED
2025c00: ba 17 40 01 or %i5, %g1, %i5 <== NOT EXECUTED
{
if (!RTEMS_RFS_S_ISDIR (mode) &&
2025c04: 03 00 00 3c sethi %hi(0xf000), %g1 <== NOT EXECUTED
2025c08: 05 00 00 08 sethi %hi(0x2000), %g2 <== NOT EXECUTED
2025c0c: 82 0f 40 01 and %i5, %g1, %g1 <== NOT EXECUTED
2025c10: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025c14: 22 80 00 84 be,a 2025e24 <rtems_rfs_shell_inode+0x39c> <== NOT EXECUTED
2025c18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2025c1c: 05 00 00 10 sethi %hi(0x4000), %g2 <== NOT EXECUTED
2025c20: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025c24: 22 80 00 80 be,a 2025e24 <rtems_rfs_shell_inode+0x39c> <== NOT EXECUTED
2025c28: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
!RTEMS_RFS_S_ISCHR (mode) &&
2025c2c: 05 00 00 18 sethi %hi(0x6000), %g2 <== NOT EXECUTED
2025c30: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025c34: 02 80 00 7b be 2025e20 <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
2025c38: 05 00 00 20 sethi %hi(0x8000), %g2 <== NOT EXECUTED
!RTEMS_RFS_S_ISBLK (mode) &&
2025c3c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025c40: 02 80 00 78 be 2025e20 <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
2025c44: 05 00 00 28 sethi %hi(0xa000), %g2 <== NOT EXECUTED
}
#endif
}
}
if (!error_check_only || error)
2025c48: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025c4c: 02 80 00 76 be 2025e24 <rtems_rfs_shell_inode+0x39c> <== NOT EXECUTED
2025c50: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
{
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
2025c54: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
2025c58: d6 07 bf f4 ld [ %fp + -12 ], %o3 <== NOT EXECUTED
2025c5c: d4 07 bf e8 ld [ %fp + -24 ], %o2 <== NOT EXECUTED
2025c60: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
2025c64: 83 2a e0 03 sll %o3, 3, %g1 <== NOT EXECUTED
2025c68: 98 40 3f ff addx %g0, -1, %o4 <== NOT EXECUTED
2025c6c: 97 2a e0 06 sll %o3, 6, %o3 <== NOT EXECUTED
2025c70: 98 0b 20 05 and %o4, 5, %o4 <== NOT EXECUTED
2025c74: 96 22 c0 01 sub %o3, %g1, %o3 <== NOT EXECUTED
2025c78: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2025c7c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2025c80: 40 00 97 d4 call 204bbd0 <printf> <== NOT EXECUTED
2025c84: 98 03 20 41 add %o4, 0x41, %o4 <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
2025c88: c2 0f bf ff ldub [ %fp + -1 ], %g1 <== NOT EXECUTED
2025c8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2025c90: 12 80 00 05 bne 2025ca4 <rtems_rfs_shell_inode+0x21c> <== NOT EXECUTED
2025c94: bb 2f 60 10 sll %i5, 0x10, %i5 <== NOT EXECUTED
2025c98: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED
2025c9c: 02 80 00 7f be 2025e98 <rtems_rfs_shell_inode+0x410> <== NOT EXECUTED
2025ca0: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
printf (" --\n");
else
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
2025ca4: 03 00 00 3c sethi %hi(0xf000), %g1 <== NOT EXECUTED
2025ca8: 95 37 60 10 srl %i5, 0x10, %o2 <== NOT EXECUTED
2025cac: 05 00 00 10 sethi %hi(0x4000), %g2 <== NOT EXECUTED
2025cb0: 82 0a 80 01 and %o2, %g1, %g1 <== NOT EXECUTED
type = "DIR";
2025cb4: 17 00 81 9f sethi %hi(0x2067c00), %o3 <== NOT EXECUTED
printf (" --\n");
else
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
2025cb8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025cbc: 02 80 00 18 be 2025d1c <rtems_rfs_shell_inode+0x294> <== NOT EXECUTED
2025cc0: 96 12 e2 38 or %o3, 0x238, %o3 <== NOT EXECUTED
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
2025cc4: 05 00 00 08 sethi %hi(0x2000), %g2 <== NOT EXECUTED
type = "CHR";
2025cc8: 17 00 81 9f sethi %hi(0x2067c00), %o3 <== NOT EXECUTED
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
2025ccc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025cd0: 02 80 00 13 be 2025d1c <rtems_rfs_shell_inode+0x294> <== NOT EXECUTED
2025cd4: 96 12 e2 40 or %o3, 0x240, %o3 <== NOT EXECUTED
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
2025cd8: 05 00 00 18 sethi %hi(0x6000), %g2 <== NOT EXECUTED
type = "BLK";
2025cdc: 17 00 81 9f sethi %hi(0x2067c00), %o3 <== NOT EXECUTED
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
2025ce0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025ce4: 02 80 00 0e be 2025d1c <rtems_rfs_shell_inode+0x294> <== NOT EXECUTED
2025ce8: 96 12 e2 48 or %o3, 0x248, %o3 <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
2025cec: 05 00 00 20 sethi %hi(0x8000), %g2 <== NOT EXECUTED
type = "REG";
2025cf0: 17 00 81 9f sethi %hi(0x2067c00), %o3 <== NOT EXECUTED
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
2025cf4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025cf8: 02 80 00 09 be 2025d1c <rtems_rfs_shell_inode+0x294> <== NOT EXECUTED
2025cfc: 96 12 e2 50 or %o3, 0x250, %o3 <== NOT EXECUTED
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
2025d00: 05 00 00 28 sethi %hi(0xa000), %g2 <== NOT EXECUTED
type = "LNK";
2025d04: 17 00 81 9f sethi %hi(0x2067c00), %o3 <== NOT EXECUTED
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
2025d08: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2025d0c: 02 80 00 04 be 2025d1c <rtems_rfs_shell_inode+0x294> <== NOT EXECUTED
2025d10: 96 12 e2 60 or %o3, 0x260, %o3 <== NOT EXECUTED
if (!allocated && !forced)
printf (" --\n");
else
{
const char* type;
type = "UKN";
2025d14: 17 00 81 9f sethi %hi(0x2067c00), %o3 <== NOT EXECUTED
2025d18: 96 12 e2 58 or %o3, 0x258, %o3 ! 2067e58 <rtems_rfs_rtems_eval_config+0x4b0><== NOT EXECUTED
*/
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);
2025d1c: c6 07 bf e0 ld [ %fp + -32 ], %g3 <== NOT EXECUTED
2025d20: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED
if (links == 0xffff)
2025d24: c4 08 e0 01 ldub [ %g3 + 1 ], %g2 <== NOT EXECUTED
*/
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);
2025d28: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
if (links == 0xffff)
2025d2c: 82 10 80 01 or %g2, %g1, %g1 <== NOT EXECUTED
2025d30: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED
2025d34: 02 80 00 03 be 2025d40 <rtems_rfs_shell_inode+0x2b8> <== NOT EXECUTED
2025d38: 92 10 20 00 clr %o1 <== NOT EXECUTED
2025d3c: 92 10 00 01 mov %g1, %o1 <== 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);
2025d40: c2 08 e0 0a ldub [ %g3 + 0xa ], %g1 <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
type = "LNK";
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
2025d44: da 08 e0 0b ldub [ %g3 + 0xb ], %o5 <== NOT EXECUTED
* @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);
2025d48: c4 08 e0 0c ldub [ %g3 + 0xc ], %g2 <== NOT EXECUTED
2025d4c: fa 08 e0 0d ldub [ %g3 + 0xd ], %i5 <== NOT EXECUTED
2025d50: c8 08 e0 0f ldub [ %g3 + 0xf ], %g4 <== NOT EXECUTED
2025d54: c6 08 e0 0e ldub [ %g3 + 0xe ], %g3 <== 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);
2025d58: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
* @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);
2025d5c: bb 2f 60 10 sll %i5, 0x10, %i5 <== NOT EXECUTED
2025d60: 87 28 e0 08 sll %g3, 8, %g3 <== NOT EXECUTED
2025d64: 85 28 a0 18 sll %g2, 0x18, %g2 <== NOT EXECUTED
2025d68: 84 10 80 1d or %g2, %i5, %g2 <== NOT EXECUTED
2025d6c: 84 10 80 04 or %g2, %g4, %g2 <== NOT EXECUTED
2025d70: 84 10 80 03 or %g2, %g3, %g2 <== NOT EXECUTED
2025d74: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
2025d78: c4 23 a0 5c st %g2, [ %sp + 0x5c ] <== NOT EXECUTED
2025d7c: 98 0a a3 ff and %o2, 0x3ff, %o4 <== NOT EXECUTED
2025d80: 9a 13 40 01 or %o5, %g1, %o5 <== NOT EXECUTED
2025d84: 40 00 97 93 call 204bbd0 <printf> <== NOT EXECUTED
2025d88: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
2025d8c: aa 10 20 00 clr %l5 <== NOT EXECUTED
* @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]);
2025d90: c6 07 bf e0 ld [ %fp + -32 ], %g3 <== NOT EXECUTED
2025d94: 9e 05 60 06 add %l5, 6, %o7 <== NOT EXECUTED
2025d98: 84 00 e0 1c add %g3, 0x1c, %g2 <== NOT EXECUTED
2025d9c: 82 00 80 1d add %g2, %i5, %g1 <== NOT EXECUTED
2025da0: c4 08 80 1d ldub [ %g2 + %i5 ], %g2 <== NOT EXECUTED
2025da4: c8 08 60 02 ldub [ %g1 + 2 ], %g4 <== NOT EXECUTED
2025da8: c2 08 60 01 ldub [ %g1 + 1 ], %g1 <== NOT EXECUTED
2025dac: 9f 2b e0 02 sll %o7, 2, %o7 <== NOT EXECUTED
2025db0: 86 00 c0 0f add %g3, %o7, %g3 <== NOT EXECUTED
2025db4: d2 08 e0 04 ldub [ %g3 + 4 ], %o1 <== NOT EXECUTED
2025db8: 85 28 a0 10 sll %g2, 0x10, %g2 <== NOT EXECUTED
2025dbc: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2025dc0: 93 2a 60 18 sll %o1, 0x18, %o1 <== NOT EXECUTED
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
2025dc4: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2025dc8: 92 11 00 09 or %g4, %o1, %o1 <== NOT EXECUTED
2025dcc: 92 12 40 02 or %o1, %g2, %o1 <== NOT EXECUTED
2025dd0: 40 00 97 80 call 204bbd0 <printf> <== NOT EXECUTED
2025dd4: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
rtems_rfs_inode_get_links (&inode),
mode, type, mode & ((1 << 10) - 1),
rtems_rfs_inode_get_block_offset (&inode),
rtems_rfs_inode_get_block_count (&inode));
for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
2025dd8: aa 05 60 01 inc %l5 <== NOT EXECUTED
2025ddc: 80 a5 60 04 cmp %l5, 4 <== NOT EXECUTED
2025de0: 12 bf ff ec bne 2025d90 <rtems_rfs_shell_inode+0x308> <== NOT EXECUTED
2025de4: ba 07 60 04 add %i5, 4, %i5 <== NOT EXECUTED
2025de8: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
2025dec: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025df0: d2 08 60 2c ldub [ %g1 + 0x2c ], %o1 <== NOT EXECUTED
2025df4: c6 08 60 2d ldub [ %g1 + 0x2d ], %g3 <== NOT EXECUTED
2025df8: c4 08 60 2f ldub [ %g1 + 0x2f ], %g2 <== NOT EXECUTED
2025dfc: c2 08 60 2e ldub [ %g1 + 0x2e ], %g1 <== NOT EXECUTED
2025e00: 87 28 e0 10 sll %g3, 0x10, %g3 <== NOT EXECUTED
2025e04: 83 28 60 08 sll %g1, 8, %g1 <== NOT EXECUTED
2025e08: 93 2a 60 18 sll %o1, 0x18, %o1 <== NOT EXECUTED
2025e0c: 90 12 23 78 or %o0, 0x378, %o0 <== NOT EXECUTED
2025e10: 92 12 40 03 or %o1, %g3, %o1 <== NOT EXECUTED
2025e14: 92 12 40 02 or %o1, %g2, %o1 <== NOT EXECUTED
2025e18: 40 00 97 6e call 204bbd0 <printf> <== NOT EXECUTED
2025e1c: 92 12 40 01 or %o1, %g1, %o1 <== NOT EXECUTED
}
}
rc = rtems_rfs_inode_close (fs, &inode);
2025e20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2025e24: 40 00 69 5e call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2025e28: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
if (rc > 0)
2025e2c: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2025e30: 14 80 00 22 bg 2025eb8 <rtems_rfs_shell_inode+0x430> <== NOT EXECUTED
2025e34: 01 00 00 00 nop <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
2025e38: b8 07 20 01 inc %i4 <== NOT EXECUTED
2025e3c: 80 a7 00 1b cmp %i4, %i3 <== NOT EXECUTED
2025e40: 08 bf ff 57 bleu 2025b9c <rtems_rfs_shell_inode+0x114> <== NOT EXECUTED
2025e44: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return 1;
}
}
}
rtems_rfs_shell_unlock_rfs (fs);
2025e48: 7f ff fc ad call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2025e4c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
2025e50: 81 c7 e0 08 ret <== NOT EXECUTED
2025e54: 81 e8 00 00 restore <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
2025e58: c2 4a 60 01 ldsb [ %o1 + 1 ], %g1 <== NOT EXECUTED
2025e5c: 80 a0 60 65 cmp %g1, 0x65 <== NOT EXECUTED
2025e60: 02 80 00 0c be 2025e90 <rtems_rfs_shell_inode+0x408> <== NOT EXECUTED
2025e64: 80 a0 60 66 cmp %g1, 0x66 <== NOT EXECUTED
2025e68: 02 80 00 08 be 2025e88 <rtems_rfs_shell_inode+0x400> <== NOT EXECUTED
2025e6c: 80 a0 60 61 cmp %g1, 0x61 <== NOT EXECUTED
2025e70: 22 bf ff 22 be,a 2025af8 <rtems_rfs_shell_inode+0x70> <== NOT EXECUTED
2025e74: ae 10 20 01 mov 1, %l7 <== NOT EXECUTED
}
}
else
{
if (have_end && have_start)
printf ("warning: option ignored: %s\n", argv[arg]);
2025e78: 40 00 97 56 call 204bbd0 <printf> <== NOT EXECUTED
2025e7c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
2025e80: 10 bf ff 1f b 2025afc <rtems_rfs_shell_inode+0x74> <== NOT EXECUTED
2025e84: a2 04 60 01 inc %l1 <== NOT EXECUTED
case 'e':
error_check_only = true;
break;
case 'f':
forced = true;
break;
2025e88: 10 bf ff 1c b 2025af8 <rtems_rfs_shell_inode+0x70> <== NOT EXECUTED
2025e8c: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED
{
case 'a':
show_all = true;
break;
case 'e':
error_check_only = true;
2025e90: 10 bf ff 1a b 2025af8 <rtems_rfs_shell_inode+0x70> <== NOT EXECUTED
2025e94: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
printf (" --\n");
2025e98: 40 00 97 e9 call 204be3c <puts> <== NOT EXECUTED
2025e9c: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED
printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
}
}
rc = rtems_rfs_inode_close (fs, &inode);
2025ea0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2025ea4: 40 00 69 3e call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2025ea8: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED
if (rc > 0)
2025eac: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2025eb0: 24 bf ff e3 ble,a 2025e3c <rtems_rfs_shell_inode+0x3b4> <== NOT EXECUTED
2025eb4: b8 07 20 01 inc %i4 <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
2025eb8: 7f ff fc 91 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2025ebc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: closing inode handle: ino=%" PRIu32 ": (%d) %s\n",
2025ec0: 40 00 a0 da call 204e228 <strerror> <== NOT EXECUTED
2025ec4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2025ec8: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2025ecc: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025ed0: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2025ed4: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2025ed8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: closing inode handle: ino=%" PRIu32 ": (%d) %s\n",
2025edc: 40 00 97 3d call 204bbd0 <printf> <== NOT EXECUTED
2025ee0: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2025ee4: 81 c7 e0 08 ret <== NOT EXECUTED
2025ee8: 81 e8 00 00 restore <== NOT EXECUTED
}
}
if ((start >= total) || (end >= total))
{
printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
2025eec: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
2025ef0: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
return 1;
2025ef4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
}
}
if ((start >= total) || (end >= total))
{
printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
2025ef8: 40 00 97 36 call 204bbd0 <printf> <== NOT EXECUTED
2025efc: 90 12 22 88 or %o0, 0x288, %o0 <== NOT EXECUTED
return 1;
2025f00: 81 c7 e0 08 ret <== NOT EXECUTED
2025f04: 81 e8 00 00 restore <== NOT EXECUTED
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
2025f08: 7f ff fc 7d call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2025f0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
2025f10: 40 00 a0 c6 call 204e228 <strerror> <== NOT EXECUTED
2025f14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2025f18: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2025f1c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025f20: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2025f24: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2025f28: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
2025f2c: 40 00 97 29 call 204bbd0 <printf> <== NOT EXECUTED
2025f30: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2025f34: 81 c7 e0 08 ret <== NOT EXECUTED
2025f38: 81 e8 00 00 restore <== NOT EXECUTED
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
2025f3c: 7f ff fc 70 call 20250fc <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2025f40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
printf ("error: opening inode handle: ino=%" PRIu32 ": (%d) %s\n",
2025f44: 40 00 a0 b9 call 204e228 <strerror> <== NOT EXECUTED
2025f48: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2025f4c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
2025f50: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
2025f54: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
2025f58: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2025f5c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc > 0)
{
rtems_rfs_shell_unlock_rfs (fs);
printf ("error: opening inode handle: ino=%" PRIu32 ": (%d) %s\n",
2025f60: 40 00 97 1c call 204bbd0 <printf> <== NOT EXECUTED
2025f64: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
2025f68: 81 c7 e0 08 ret <== NOT EXECUTED
2025f6c: 81 e8 00 00 restore <== NOT EXECUTED
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
show_all = false;
error_check_only = false;
forced = false;
2025f70: a8 10 20 00 clr %l4 <== NOT EXECUTED
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
show_all = false;
error_check_only = false;
2025f74: a0 10 20 00 clr %l0 <== NOT EXECUTED
int rc;
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
show_all = false;
2025f78: ae 10 20 00 clr %l7 <== NOT EXECUTED
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
2025f7c: 10 bf fe f5 b 2025b50 <rtems_rfs_shell_inode+0xc8> <== NOT EXECUTED
2025f80: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
020250a4 <rtems_rfs_shell_lock_rfs>:
/**
* Lock the file system.
*/
static void
rtems_rfs_shell_lock_rfs (rtems_rfs_file_system* fs)
{
20250a4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
20250a8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== 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);
20250ac: 92 10 20 00 clr %o1 <== NOT EXECUTED
20250b0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
20250b4: 7f ff a2 b8 call 200db94 <rtems_semaphore_obtain> <== NOT EXECUTED
20250b8: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
20250bc: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
20250c0: 32 80 00 04 bne,a 20250d0 <rtems_rfs_shell_lock_rfs+0x2c><== NOT EXECUTED
20250c4: 90 10 20 00 clr %o0 <== NOT EXECUTED
20250c8: 81 c7 e0 08 ret <== NOT EXECUTED
20250cc: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
20250d0: 40 00 04 d7 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
20250d4: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
20250d8: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
20250dc: 02 bf ff fb be 20250c8 <rtems_rfs_shell_lock_rfs+0x24> <== NOT EXECUTED
20250e0: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
20250e4: 7f ff 8e a6 call 2008b7c <rtems_status_text> <== NOT EXECUTED
20250e8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20250ec: 31 00 81 9e sethi %hi(0x2067800), %i0 <== NOT EXECUTED
20250f0: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
20250f4: 40 00 9a b7 call 204bbd0 <printf> <== NOT EXECUTED
20250f8: 91 ee 20 d8 restore %i0, 0xd8, %o0 <== NOT EXECUTED
020250fc <rtems_rfs_shell_unlock_rfs>:
/**
* Unlock the file system.
*/
static void
rtems_rfs_shell_unlock_rfs (rtems_rfs_file_system* fs)
{
20250fc: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
* 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);
2025100: fa 06 20 80 ld [ %i0 + 0x80 ], %i5 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
2025104: 40 00 59 f8 call 203b8e4 <rtems_rfs_buffers_release> <== NOT EXECUTED
2025108: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
202510c: 7f ff a2 ec call 200dcbc <rtems_semaphore_release> <== NOT EXECUTED
2025110: d0 07 40 00 ld [ %i5 ], %o0 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2025114: ba 92 20 00 orcc %o0, 0, %i5 <== NOT EXECUTED
2025118: 32 80 00 04 bne,a 2025128 <rtems_rfs_shell_unlock_rfs+0x2c><== NOT EXECUTED
202511c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2025120: 81 c7 e0 08 ret <== NOT EXECUTED
2025124: 81 e8 00 00 restore <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
2025128: 40 00 04 c1 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
202512c: 92 10 20 04 mov 4, %o1 <== NOT EXECUTED
2025130: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2025134: 02 bf ff fb be 2025120 <rtems_rfs_shell_unlock_rfs+0x24> <== NOT EXECUTED
2025138: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
202513c: 7f ff 8e 90 call 2008b7c <rtems_status_text> <== NOT EXECUTED
2025140: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2025144: 31 00 81 9e sethi %hi(0x2067800), %i0 <== NOT EXECUTED
2025148: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
202514c: 40 00 9a a1 call 204bbd0 <printf> <== NOT EXECUTED
2025150: 91 ee 21 00 restore %i0, 0x100, %o0 <== NOT EXECUTED
02025f84 <rtems_rfs_shell_usage>:
}
void
rtems_rfs_shell_usage (const char* arg)
{
2025f84: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
printf ("%s: RFS debugger\n", arg);
2025f88: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025f8c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2025f90: 40 00 97 10 call 204bbd0 <printf> <== NOT EXECUTED
2025f94: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED
printf (" %s [-hl] <path> <command>\n", arg);
2025f98: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2025f9c: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025fa0: 40 00 97 0c call 204bbd0 <printf> <== NOT EXECUTED
2025fa4: 90 12 23 c8 or %o0, 0x3c8, %o0 ! 2067fc8 <rtems_rfs_rtems_eval_config+0x620><== NOT EXECUTED
printf (" where:\n");
2025fa8: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025fac: 40 00 97 a4 call 204be3c <puts> <== NOT EXECUTED
2025fb0: 90 12 23 e8 or %o0, 0x3e8, %o0 ! 2067fe8 <rtems_rfs_rtems_eval_config+0x640><== NOT EXECUTED
printf (" path: Path to the mounted RFS file system\n");
2025fb4: 11 00 81 9f sethi %hi(0x2067c00), %o0 <== NOT EXECUTED
2025fb8: 40 00 97 a1 call 204be3c <puts> <== NOT EXECUTED
2025fbc: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 2067ff8 <rtems_rfs_rtems_eval_config+0x650><== NOT EXECUTED
printf (" command: A debugger command. See -l for a list plus help.\n");
2025fc0: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
2025fc4: 40 00 97 9e call 204be3c <puts> <== NOT EXECUTED
2025fc8: 90 12 20 30 or %o0, 0x30, %o0 ! 2068030 <rtems_rfs_rtems_eval_config+0x688><== NOT EXECUTED
printf (" -h: This help\n");
2025fcc: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
2025fd0: 40 00 97 9b call 204be3c <puts> <== NOT EXECUTED
2025fd4: 90 12 20 70 or %o0, 0x70, %o0 ! 2068070 <rtems_rfs_rtems_eval_config+0x6c8><== NOT EXECUTED
printf (" -l: The debugger command list.\n");
2025fd8: 31 00 81 a0 sethi %hi(0x2068000), %i0 <== NOT EXECUTED
2025fdc: 40 00 97 98 call 204be3c <puts> <== NOT EXECUTED
2025fe0: 91 ee 20 88 restore %i0, 0x88, %o0 <== NOT EXECUTED
020410d0 <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
20410d0: 9d e3 bf 00 save %sp, -256, %sp
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
20410d4: 90 10 20 02 mov 2, %o0
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
20410d8: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
20410dc: e2 17 a0 5e lduh [ %fp + 0x5e ], %l1
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
20410e0: 7f ff 94 d3 call 202642c <rtems_rfs_trace>
20410e4: 92 10 20 00 clr %o1
20410e8: 80 8a 20 ff btst 0xff, %o0
20410ec: 32 80 00 08 bne,a 204110c <rtems_rfs_symlink+0x3c> <== NEVER TAKEN
20410f0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
20410f4: c2 06 20 08 ld [ %i0 + 8 ], %g1
20410f8: 80 a7 00 01 cmp %i4, %g1
20410fc: 0a 80 00 21 bcs 2041180 <rtems_rfs_symlink+0xb0> <== ALWAYS TAKEN
2041100: b4 10 20 5b mov 0x5b, %i2
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
2041104: 81 c7 e0 08 ret
2041108: 91 e8 00 1a restore %g0, %i2, %o0
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
204110c: 11 00 81 b7 sethi %hi(0x206dc00), %o0 <== NOT EXECUTED
2041110: 40 00 2a b0 call 204bbd0 <printf> <== NOT EXECUTED
2041114: 90 12 20 18 or %o0, 0x18, %o0 ! 206dc18 <__FUNCTION__.7603+0x21f0><== NOT EXECUTED
for (c = 0; c < length; c++)
2041118: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
204111c: 04 80 00 0a ble 2041144 <rtems_rfs_symlink+0x74> <== NOT EXECUTED
2041120: 11 00 81 b7 sethi %hi(0x206dc00), %o0 <== NOT EXECUTED
2041124: a4 10 20 00 clr %l2 <== NOT EXECUTED
printf ("%c", name[c]);
2041128: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
204112c: 40 00 2b 16 call 204bd84 <putchar> <== NOT EXECUTED
2041130: a4 04 a0 01 inc %l2 <== 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++)
2041134: 80 a4 80 1a cmp %l2, %i2 <== NOT EXECUTED
2041138: 32 bf ff fd bne,a 204112c <rtems_rfs_symlink+0x5c> <== NOT EXECUTED
204113c: d0 4e 40 12 ldsb [ %i1 + %l2 ], %o0 <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
2041140: 11 00 81 b7 sethi %hi(0x206dc00), %o0 <== NOT EXECUTED
2041144: 40 00 2a a3 call 204bbd0 <printf> <== NOT EXECUTED
2041148: 90 12 20 40 or %o0, 0x40, %o0 ! 206dc40 <__FUNCTION__.7603+0x2218><== NOT EXECUTED
for (c = 0; c < link_length; c++)
204114c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2041150: 04 bf ff e9 ble 20410f4 <rtems_rfs_symlink+0x24> <== NOT EXECUTED
2041154: b4 10 20 00 clr %i2 <== NOT EXECUTED
printf ("%c", link[c]);
2041158: d0 4e c0 1a ldsb [ %i3 + %i2 ], %o0 <== NOT EXECUTED
204115c: 40 00 2b 0a call 204bd84 <putchar> <== NOT EXECUTED
2041160: b4 06 a0 01 inc %i2 <== 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++)
2041164: 80 a6 80 1c cmp %i2, %i4 <== NOT EXECUTED
2041168: 32 bf ff fd bne,a 204115c <rtems_rfs_symlink+0x8c> <== NOT EXECUTED
204116c: d0 4e c0 1a ldsb [ %i3 + %i2 ], %o0 <== NOT EXECUTED
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
2041170: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
2041174: 80 a7 00 01 cmp %i4, %g1 <== NOT EXECUTED
2041178: 1a bf ff e3 bcc 2041104 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
204117c: b4 10 20 5b mov 0x5b, %i2 <== NOT EXECUTED
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
2041180: 40 00 34 51 call 204e2c4 <strlen>
2041184: 90 10 00 19 mov %i1, %o0
2041188: 82 07 bf f8 add %fp, -8, %g1
204118c: 96 10 00 08 mov %o0, %o3
2041190: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
2041194: e2 23 a0 60 st %l1, [ %sp + 0x60 ]
2041198: 90 10 00 18 mov %i0, %o0
204119c: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
20411a0: 92 10 00 10 mov %l0, %o1
20411a4: 94 10 00 19 mov %i1, %o2
20411a8: 9a 10 20 01 mov 1, %o5
20411ac: 19 00 00 28 sethi %hi(0xa000), %o4
20411b0: 7f ff fd 58 call 2040710 <rtems_rfs_inode_create>
20411b4: 98 13 21 ff or %o4, 0x1ff, %o4 ! a1ff <PROM_START+0xa1ff>
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
20411b8: b4 92 20 00 orcc %o0, 0, %i2
20411bc: 14 bf ff d2 bg 2041104 <rtems_rfs_symlink+0x34> <== NEVER TAKEN
20411c0: d2 07 bf f8 ld [ %fp + -8 ], %o1
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
20411c4: 90 10 00 18 mov %i0, %o0
20411c8: 94 07 bf c4 add %fp, -60, %o2
20411cc: 7f ff fb fd call 20401c0 <rtems_rfs_inode_open>
20411d0: 96 10 20 01 mov 1, %o3
if (rc > 0)
20411d4: b4 92 20 00 orcc %o0, 0, %i2
20411d8: 14 bf ff cb bg 2041104 <rtems_rfs_symlink+0x34> <== NEVER TAKEN
20411dc: 80 a7 20 13 cmp %i4, 0x13
/*
* 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)
20411e0: 38 80 00 20 bgu,a 2041260 <rtems_rfs_symlink+0x190> <== NEVER TAKEN
20411e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
20411e8: d0 07 bf d0 ld [ %fp + -48 ], %o0
20411ec: 92 10 20 00 clr %o1
20411f0: 94 10 20 14 mov 0x14, %o2
20411f4: 40 00 26 0b call 204aa20 <memset>
20411f8: 90 02 20 1c add %o0, 0x1c, %o0
memcpy (inode.node->data.name, link, link_length);
20411fc: d0 07 bf d0 ld [ %fp + -48 ], %o0
2041200: 92 10 00 1b mov %i3, %o1
2041204: 90 02 20 1c add %o0, 0x1c, %o0
2041208: 40 00 25 7a call 204a7f0 <memcpy>
204120c: 94 10 00 1c mov %i4, %o2
* @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);
2041210: c2 07 bf d0 ld [ %fp + -48 ], %g1
2041214: c0 28 60 0c clrb [ %g1 + 0xc ]
2041218: c2 07 bf d0 ld [ %fp + -48 ], %g1
204121c: c0 28 60 0d clrb [ %g1 + 0xd ]
2041220: c2 07 bf d0 ld [ %fp + -48 ], %g1
2041224: c0 28 60 0e clrb [ %g1 + 0xe ]
2041228: c2 07 bf d0 ld [ %fp + -48 ], %g1
204122c: c0 28 60 0f clrb [ %g1 + 0xf ]
*/
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);
2041230: c2 07 bf d0 ld [ %fp + -48 ], %g1
2041234: 85 37 20 08 srl %i4, 8, %g2
2041238: c4 28 60 0a stb %g2, [ %g1 + 0xa ]
204123c: c2 07 bf d0 ld [ %fp + -48 ], %g1
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
2041240: 90 10 00 18 mov %i0, %o0
2041244: f8 28 60 0b stb %i4, [ %g1 + 0xb ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2041248: 82 10 20 01 mov 1, %g1
204124c: 92 07 bf c4 add %fp, -60, %o1
2041250: 7f ff fc 53 call 204039c <rtems_rfs_inode_close>
2041254: c2 2f bf d4 stb %g1, [ %fp + -44 ]
return rc;
2041258: 10 bf ff ab b 2041104 <rtems_rfs_symlink+0x34>
204125c: b4 10 00 08 mov %o0, %i2
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);
2041260: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
2041264: 7f ff e4 52 call 203a3ac <rtems_rfs_block_map_open> <== NOT EXECUTED
2041268: 94 07 bf 74 add %fp, -140, %o2 <== NOT EXECUTED
204126c: b4 10 00 08 mov %o0, %i2 <== NOT EXECUTED
if (rc > 0)
2041270: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2041274: 04 80 00 05 ble 2041288 <rtems_rfs_symlink+0x1b8> <== NOT EXECUTED
2041278: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
204127c: 7f ff fc 48 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041280: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
2041284: 30 bf ff a0 b,a 2041104 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
2041288: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
204128c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2041290: 7f ff e5 a4 call 203a920 <rtems_rfs_block_map_grow> <== NOT EXECUTED
2041294: 96 07 bf fc add %fp, -4, %o3 <== NOT EXECUTED
if (rc > 0)
2041298: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
204129c: 04 80 00 08 ble 20412bc <rtems_rfs_symlink+0x1ec> <== NOT EXECUTED
20412a0: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
20412a4: 7f ff e4 a6 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
20412a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20412ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20412b0: 7f ff fc 3b call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
20412b4: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
20412b8: 30 bf ff 93 b,a 2041104 <rtems_rfs_symlink+0x34> <== 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);
20412bc: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20412c0: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
20412c4: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
handle->buffer = NULL;
20412c8: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
20412cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20412d0: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
20412d4: 7f ff e8 48 call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
20412d8: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
20412dc: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
20412e0: 04 80 00 07 ble 20412fc <rtems_rfs_symlink+0x22c> <== NOT EXECUTED
20412e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
20412e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20412ec: 7f ff e4 94 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
20412f0: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20412f4: 10 bf ff e2 b 204127c <rtems_rfs_symlink+0x1ac> <== NOT EXECUTED
20412f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
20412fc: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
2041300: f4 00 60 1c ld [ %g1 + 0x1c ], %i2 <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
2041304: 92 10 20 ff mov 0xff, %o1 <== NOT EXECUTED
2041308: 40 00 25 c6 call 204aa20 <memset> <== NOT EXECUTED
204130c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
memcpy (data, link, link_length);
2041310: 94 10 00 1c mov %i4, %o2 <== NOT EXECUTED
2041314: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
2041318: 40 00 25 36 call 204a7f0 <memcpy> <== NOT EXECUTED
204131c: 92 10 00 1b mov %i3, %o1 <== 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);
2041320: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED
2041324: 7f ff e7 b9 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
2041328: 90 10 00 18 mov %i0, %o0 <== 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);
204132c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
handle->dirty = false;
2041330: c0 2f bf ec clrb [ %fp + -20 ] <== NOT EXECUTED
handle->bnum = 0;
2041334: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
handle->buffer = NULL;
2041338: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
204133c: 7f ff e4 80 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
2041340: 92 07 bf 74 add %fp, -140, %o1 <== NOT EXECUTED
if (rc > 0)
2041344: b4 92 20 00 orcc %o0, 0, %i2 <== NOT EXECUTED
2041348: 04 bf ff bb ble 2041234 <rtems_rfs_symlink+0x164> <== NOT EXECUTED
204134c: c2 07 bf d0 ld [ %fp + -48 ], %g1 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
2041350: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2041354: 7f ff fc 12 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041358: 92 07 bf c4 add %fp, -60, %o1 <== NOT EXECUTED
return rc;
204135c: 30 bf ff 6a b,a 2041104 <rtems_rfs_symlink+0x34> <== NOT EXECUTED
02041360 <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)
{
2041360: 9d e3 bf 18 save %sp, -232, %sp
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
2041364: 90 10 20 04 mov 4, %o0
2041368: 92 10 20 00 clr %o1
204136c: 7f ff 94 30 call 202642c <rtems_rfs_trace>
2041370: ba 10 00 18 mov %i0, %i5
2041374: 80 8a 20 ff btst 0xff, %o0
2041378: 12 80 00 33 bne 2041444 <rtems_rfs_symlink_read+0xe4> <== NEVER TAKEN
204137c: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
2041380: 90 10 00 1d mov %i5, %o0
2041384: 92 10 00 19 mov %i1, %o1
2041388: 94 07 bf c8 add %fp, -56, %o2
204138c: 7f ff fb 8d call 20401c0 <rtems_rfs_inode_open>
2041390: 96 10 20 01 mov 1, %o3
if (rc)
2041394: b0 92 20 00 orcc %o0, 0, %i0
2041398: 12 80 00 0d bne 20413cc <rtems_rfs_symlink_read+0x6c> <== NEVER TAKEN
204139c: d2 07 bf d4 ld [ %fp + -44 ], %o1
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
20413a0: 03 00 00 3c sethi %hi(0xf000), %g1
* @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);
20413a4: c4 0a 60 02 ldub [ %o1 + 2 ], %g2
20413a8: 85 28 a0 08 sll %g2, 8, %g2
20413ac: 84 08 80 01 and %g2, %g1, %g2
20413b0: 03 00 00 28 sethi %hi(0xa000), %g1
20413b4: 80 a0 80 01 cmp %g2, %g1
20413b8: 02 80 00 07 be 20413d4 <rtems_rfs_symlink_read+0x74> <== ALWAYS TAKEN
20413bc: 90 10 00 1d mov %i5, %o0
{
rtems_rfs_inode_close (fs, &inode);
20413c0: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
20413c4: 7f ff fb f6 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
20413c8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
20413cc: 81 c7 e0 08 ret <== NOT EXECUTED
20413d0: 81 e8 00 00 restore <== 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);
20413d4: d4 0a 60 0a ldub [ %o1 + 0xa ], %o2
}
*length = rtems_rfs_inode_get_block_offset (&inode);
20413d8: c2 0a 60 0b ldub [ %o1 + 0xb ], %g1
20413dc: 95 2a a0 08 sll %o2, 8, %o2
20413e0: 94 10 40 0a or %g1, %o2, %o2
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
20413e4: 80 a2 80 1b cmp %o2, %i3
20413e8: 38 80 00 02 bgu,a 20413f0 <rtems_rfs_symlink_read+0x90>
20413ec: 94 10 00 1b mov %i3, %o2
20413f0: d4 27 00 00 st %o2, [ %i4 ]
* @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);
20413f4: c8 0a 60 0c ldub [ %o1 + 0xc ], %g4
20413f8: c4 0a 60 0d ldub [ %o1 + 0xd ], %g2
20413fc: c6 0a 60 0f ldub [ %o1 + 0xf ], %g3
2041400: c2 0a 60 0e ldub [ %o1 + 0xe ], %g1
2041404: 89 29 20 18 sll %g4, 0x18, %g4
2041408: 85 28 a0 10 sll %g2, 0x10, %g2
204140c: 83 28 60 08 sll %g1, 8, %g1
2041410: 84 11 00 02 or %g4, %g2, %g2
2041414: 84 10 80 03 or %g2, %g3, %g2
if (size < *length)
{
*length = size;
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
2041418: 80 90 80 01 orcc %g2, %g1, %g0
204141c: 12 80 00 0f bne 2041458 <rtems_rfs_symlink_read+0xf8> <== NEVER TAKEN
2041420: 90 10 00 1d mov %i5, %o0
{
memcpy (path, inode.node->data.name, *length);
2041424: 90 10 00 1a mov %i2, %o0
2041428: 40 00 24 f2 call 204a7f0 <memcpy>
204142c: 92 02 60 1c add %o1, 0x1c, %o1
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_close (fs, &inode);
2041430: 90 10 00 1d mov %i5, %o0
2041434: 7f ff fb da call 204039c <rtems_rfs_inode_close>
2041438: 92 07 bf c8 add %fp, -56, %o1
return rc;
}
204143c: 81 c7 e0 08 ret
2041440: 91 e8 00 08 restore %g0, %o0, %o0
{
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
2041444: 11 00 81 b7 sethi %hi(0x206dc00), %o0 <== NOT EXECUTED
2041448: 40 00 29 e2 call 204bbd0 <printf> <== NOT EXECUTED
204144c: 90 12 20 48 or %o0, 0x48, %o0 ! 206dc48 <__FUNCTION__.7603+0x2220><== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
2041450: 10 bf ff cd b 2041384 <rtems_rfs_symlink_read+0x24> <== NOT EXECUTED
2041454: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
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);
2041458: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
204145c: 7f ff e3 d4 call 203a3ac <rtems_rfs_block_map_open> <== NOT EXECUTED
2041460: 94 07 bf 78 add %fp, -136, %o2 <== NOT EXECUTED
2041464: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
if (rc > 0)
2041468: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
204146c: 04 80 00 06 ble 2041484 <rtems_rfs_symlink_read+0x124> <== NOT EXECUTED
2041470: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
2041474: 7f ff fb ca call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041478: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
return rc;
204147c: 81 c7 e0 08 ret <== NOT EXECUTED
2041480: 81 e8 00 00 restore <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
2041484: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
2041488: 94 10 20 00 clr %o2 <== NOT EXECUTED
204148c: 96 10 20 00 clr %o3 <== NOT EXECUTED
2041490: 7f ff e4 fa call 203a878 <rtems_rfs_block_map_seek> <== NOT EXECUTED
2041494: 98 07 bf fc add %fp, -4, %o4 <== NOT EXECUTED
if (rc > 0)
2041498: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
204149c: 04 80 00 07 ble 20414b8 <rtems_rfs_symlink_read+0x158> <== NOT EXECUTED
20414a0: d4 07 bf fc ld [ %fp + -4 ], %o2 <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, false);
if (rc > 0)
{
rtems_rfs_block_map_close (fs, &map);
20414a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20414a8: 7f ff e4 25 call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
20414ac: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
20414b0: 10 bf ff f1 b 2041474 <rtems_rfs_symlink_read+0x114> <== NOT EXECUTED
20414b4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20414b8: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
20414bc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
20414c0: c0 27 bf f8 clr [ %fp + -8 ] <== 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);
20414c4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20414c8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
20414cc: 7f ff e7 ca call 203b3f4 <rtems_rfs_buffer_handle_request><== NOT EXECUTED
20414d0: 96 10 20 00 clr %o3 <== NOT EXECUTED
if (rc > 0)
20414d4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20414d8: 14 bf ff f4 bg 20414a8 <rtems_rfs_symlink_read+0x148> <== NOT EXECUTED
20414dc: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
20414e0: c2 07 bf f8 ld [ %fp + -8 ], %g1 <== NOT EXECUTED
20414e4: d4 07 00 00 ld [ %i4 ], %o2 <== NOT EXECUTED
20414e8: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 <== NOT EXECUTED
20414ec: 40 00 24 c1 call 204a7f0 <memcpy> <== NOT EXECUTED
20414f0: 90 10 00 1a mov %i2, %o0 <== 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);
20414f4: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED
20414f8: 7f ff e7 44 call 203b208 <rtems_rfs_buffer_handle_release><== NOT EXECUTED
20414fc: 90 10 00 1d mov %i5, %o0 <== 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);
2041500: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
handle->dirty = false;
2041504: c0 2f bf f0 clrb [ %fp + -16 ] <== NOT EXECUTED
handle->bnum = 0;
2041508: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
handle->buffer = NULL;
204150c: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
2041510: 7f ff e4 0b call 203a53c <rtems_rfs_block_map_close> <== NOT EXECUTED
2041514: 92 07 bf 78 add %fp, -136, %o1 <== NOT EXECUTED
if (rc > 0)
2041518: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
204151c: 04 bf ff c6 ble 2041434 <rtems_rfs_symlink_read+0xd4> <== NOT EXECUTED
2041520: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
2041524: 7f ff fb 9e call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2041528: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
return rc;
204152c: 81 c7 e0 08 ret <== NOT EXECUTED
2041530: 81 e8 00 00 restore <== NOT EXECUTED
02026470 <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
2026470: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
2026474: 03 00 81 cd sethi %hi(0x2073400), %g1 <== NOT EXECUTED
2026478: c4 18 63 f8 ldd [ %g1 + 0x3f8 ], %g2 ! 20737f8 <rtems_rfs_trace_flags><== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
202647c: 98 28 80 18 andn %g2, %i0, %o4 <== NOT EXECUTED
2026480: 9a 28 c0 19 andn %g3, %i1, %o5 <== NOT EXECUTED
return state;
}
2026484: b0 10 00 02 mov %g2, %i0 <== 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;
2026488: d8 38 63 f8 std %o4, [ %g1 + 0x3f8 ] <== NOT EXECUTED
return state;
}
202648c: 81 c7 e0 08 ret <== NOT EXECUTED
2026490: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
0202644c <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
202644c: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
2026450: 03 00 81 cd sethi %hi(0x2073400), %g1 <== NOT EXECUTED
2026454: c4 18 63 f8 ldd [ %g1 + 0x3f8 ], %g2 ! 20737f8 <rtems_rfs_trace_flags><== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
2026458: 98 16 00 02 or %i0, %g2, %o4 <== NOT EXECUTED
202645c: 9a 16 40 03 or %i1, %g3, %o5 <== NOT EXECUTED
return state;
}
2026460: b0 10 00 02 mov %g2, %i0 <== 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;
2026464: d8 38 63 f8 std %o4, [ %g1 + 0x3f8 ] <== NOT EXECUTED
return state;
}
2026468: 81 c7 e0 08 ret <== NOT EXECUTED
202646c: 93 e8 00 03 restore %g0, %g3, %o1 <== NOT EXECUTED
02026494 <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
2026494: 9d e3 be f0 save %sp, -272, %sp <== NOT EXECUTED
const char* table[] =
2026498: 13 00 81 a1 sethi %hi(0x2068400), %o1 <== NOT EXECUTED
202649c: ba 07 bf 64 add %fp, -156, %i5 <== NOT EXECUTED
20264a0: 92 12 63 2c or %o1, 0x32c, %o1 <== NOT EXECUTED
20264a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
20264a8: 40 00 90 d2 call 204a7f0 <memcpy> <== NOT EXECUTED
20264ac: 94 10 20 9c mov 0x9c, %o2 <== NOT EXECUTED
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
20264b0: a0 10 00 19 mov %i1, %l0 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20264b4: 80 a6 20 01 cmp %i0, 1 <== NOT EXECUTED
20264b8: 04 80 00 49 ble 20265dc <rtems_rfs_trace_shell_command+0x148><== NOT EXECUTED
20264bc: 82 10 20 00 clr %g1 <== NOT EXECUTED
{
if (argv[arg][0] == '-')
20264c0: ec 06 60 04 ld [ %i1 + 4 ], %l6 <== NOT EXECUTED
20264c4: c2 4d 80 00 ldsb [ %l6 ], %g1 <== NOT EXECUTED
20264c8: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
20264cc: 02 80 00 86 be 20266e4 <rtems_rfs_trace_shell_command+0x250><== NOT EXECUTED
20264d0: 23 00 81 cd sethi %hi(0x2073400), %l1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
20264d4: 25 00 81 a1 sethi %hi(0x2068400), %l2 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
return 0;
default:
printf ("error: unknown option\n");
return 1;
20264d8: f4 1c 63 f8 ldd [ %l1 + 0x3f8 ], %i2 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
20264dc: 27 00 81 a1 sethi %hi(0x2068400), %l3 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
20264e0: 29 00 81 a1 sethi %hi(0x2068400), %l4 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20264e4: b8 10 20 01 mov 1, %i4 <== NOT EXECUTED
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
20264e8: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
20264ec: c0 27 bf 58 clr [ %fp + -168 ] <== NOT EXECUTED
20264f0: c0 27 bf 5c clr [ %fp + -164 ] <== NOT EXECUTED
"file-close",
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
20264f4: c0 27 bf 50 clr [ %fp + -176 ] <== NOT EXECUTED
20264f8: c0 27 bf 54 clr [ %fp + -172 ] <== NOT EXECUTED
20264fc: a2 14 63 f8 or %l1, 0x3f8, %l1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
2026500: a4 14 a0 b8 or %l2, 0xb8, %l2 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
2026504: a6 14 e0 c0 or %l3, 0xc0, %l3 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
2026508: a8 15 20 c8 or %l4, 0xc8, %l4 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
202650c: 10 80 00 12 b 2026554 <rtems_rfs_trace_shell_command+0xc0><== NOT EXECUTED
2026510: ae 10 20 01 mov 1, %l7 <== NOT EXECUTED
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
2026514: b2 10 20 00 clr %i1 <== NOT EXECUTED
}
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
2026518: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
202651c: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
2026520: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
2026524: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2026528: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
202652c: b8 07 20 01 inc %i4 <== NOT EXECUTED
2026530: 80 a7 00 18 cmp %i4, %i0 <== NOT EXECUTED
2026534: 02 80 00 29 be 20265d8 <rtems_rfs_trace_shell_command+0x144><== NOT EXECUTED
2026538: f4 3c 40 00 std %i2, [ %l1 ] <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
202653c: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
2026540: ec 04 00 01 ld [ %l0 + %g1 ], %l6 <== NOT EXECUTED
2026544: c2 4d 80 00 ldsb [ %l6 ], %g1 <== NOT EXECUTED
2026548: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
202654c: 22 80 00 67 be,a 20266e8 <rtems_rfs_trace_shell_command+0x254><== NOT EXECUTED
2026550: c2 4d a0 01 ldsb [ %l6 + 1 ], %g1 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
2026554: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2026558: 40 00 9d 4b call 204da84 <strcmp> <== NOT EXECUTED
202655c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
2026560: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026564: 22 80 00 02 be,a 202656c <rtems_rfs_trace_shell_command+0xd8><== NOT EXECUTED
2026568: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
202656c: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2026570: 40 00 9d 45 call 204da84 <strcmp> <== NOT EXECUTED
2026574: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2026578: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
202657c: 02 bf ff e6 be 2026514 <rtems_rfs_trace_shell_command+0x80><== NOT EXECUTED
2026580: c4 1f bf 50 ldd [ %fp + -176 ], %g2 <== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
2026584: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
2026588: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
202658c: 40 00 9d 3e call 204da84 <strcmp> <== NOT EXECUTED
2026590: aa 10 20 00 clr %l5 <== NOT EXECUTED
2026594: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026598: 12 80 00 16 bne 20265f0 <rtems_rfs_trace_shell_command+0x15c><== NOT EXECUTED
202659c: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
{
if (set)
20265a0: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
20265a4: 02 80 00 29 be 2026648 <rtems_rfs_trace_shell_command+0x1b4><== NOT EXECUTED
20265a8: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
20265ac: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20265b0: b8 07 20 01 inc %i4 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
20265b4: b4 38 a0 00 xnor %g2, 0, %i2 <== NOT EXECUTED
20265b8: b6 38 e0 00 xnor %g3, 0, %i3 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
20265bc: 05 3f ff ff sethi %hi(0xfffffc00), %g2 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
20265c0: f4 3c 40 00 std %i2, [ %l1 ] <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
20265c4: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
20265c8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
20265cc: 80 a7 00 18 cmp %i4, %i0 <== NOT EXECUTED
20265d0: 12 bf ff db bne 202653c <rtems_rfs_trace_shell_command+0xa8><== NOT EXECUTED
20265d4: c4 3f bf 50 std %g2, [ %fp + -176 ] <== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
20265d8: 82 10 20 00 clr %g1 <== NOT EXECUTED
}
20265dc: 81 c7 e0 08 ret <== NOT EXECUTED
20265e0: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
20265e4: 80 a5 60 27 cmp %l5, 0x27 <== NOT EXECUTED
20265e8: 02 80 00 11 be 202662c <rtems_rfs_trace_shell_command+0x198><== NOT EXECUTED
20265ec: 83 2d 60 02 sll %l5, 2, %g1 <== NOT EXECUTED
{
if (strcmp (argv[arg], table[t]) == 0)
20265f0: d2 07 40 01 ld [ %i5 + %g1 ], %o1 <== NOT EXECUTED
20265f4: 40 00 9d 24 call 204da84 <strcmp> <== NOT EXECUTED
20265f8: 90 10 00 16 mov %l6, %o0 <== NOT EXECUTED
20265fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026600: 32 bf ff f9 bne,a 20265e4 <rtems_rfs_trace_shell_command+0x150><== NOT EXECUTED
2026604: aa 05 60 01 inc %l5 <== NOT EXECUTED
{
if (set)
2026608: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED
202660c: 02 80 00 15 be 2026660 <rtems_rfs_trace_shell_command+0x1cc><== NOT EXECUTED
2026610: 80 8d 60 20 btst 0x20, %l5 <== NOT EXECUTED
set_value = 1ULL << t;
2026614: 12 80 00 2a bne 20266bc <rtems_rfs_trace_shell_command+0x228><== NOT EXECUTED
2026618: 86 10 20 00 clr %g3 <== NOT EXECUTED
202661c: 82 10 20 00 clr %g1 <== NOT EXECUTED
2026620: ab 2d c0 15 sll %l7, %l5, %l5 <== NOT EXECUTED
2026624: c2 27 bf 50 st %g1, [ %fp + -176 ] <== NOT EXECUTED
2026628: ea 27 bf 54 st %l5, [ %fp + -172 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
202662c: c4 1f bf 50 ldd [ %fp + -176 ], %g2 <== NOT EXECUTED
2026630: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
2026634: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
2026638: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
202663c: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
2026640: 10 bf ff bb b 202652c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
2026644: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
2026648: b4 10 20 00 clr %i2 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
202664c: 84 10 a3 ff or %g2, 0x3ff, %g2 <== NOT EXECUTED
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
2026650: b6 10 20 00 clr %i3 <== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
2026654: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
2026658: 10 bf ff b5 b 202652c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
202665c: c4 3f bf 58 std %g2, [ %fp + -168 ] <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
2026660: 12 80 00 0d bne 2026694 <rtems_rfs_trace_shell_command+0x200><== NOT EXECUTED
2026664: 86 10 20 00 clr %g3 <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2026668: c4 1f bf 50 ldd [ %fp + -176 ], %g2 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
202666c: 82 10 20 00 clr %g1 <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2026670: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
2026674: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
2026678: c2 27 bf 58 st %g1, [ %fp + -168 ] <== NOT EXECUTED
202667c: ab 2d c0 15 sll %l7, %l5, %l5 <== NOT EXECUTED
2026680: ea 27 bf 5c st %l5, [ %fp + -164 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2026684: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
2026688: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
202668c: 10 bf ff a8 b 202652c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
2026690: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
2026694: c6 27 bf 5c st %g3, [ %fp + -164 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
2026698: c4 1f bf 50 ldd [ %fp + -176 ], %g2 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
202669c: ab 2d c0 15 sll %l7, %l5, %l5 <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
20266a0: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
20266a4: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
else
clear_value = 1ULL << t;
20266a8: ea 27 bf 58 st %l5, [ %fp + -168 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
20266ac: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
20266b0: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
20266b4: 10 bf ff 9e b 202652c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
20266b8: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
{
if (strcmp (argv[arg], table[t]) == 0)
{
if (set)
set_value = 1ULL << t;
20266bc: ab 2d c0 15 sll %l7, %l5, %l5 <== NOT EXECUTED
20266c0: c6 27 bf 54 st %g3, [ %fp + -172 ] <== NOT EXECUTED
20266c4: ea 27 bf 50 st %l5, [ %fp + -176 ] <== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
20266c8: c4 1f bf 50 ldd [ %fp + -176 ], %g2 <== NOT EXECUTED
20266cc: b4 16 80 02 or %i2, %g2, %i2 <== NOT EXECUTED
20266d0: b6 16 c0 03 or %i3, %g3, %i3 <== NOT EXECUTED
20266d4: c4 1f bf 58 ldd [ %fp + -168 ], %g2 <== NOT EXECUTED
20266d8: b4 2e 80 02 andn %i2, %g2, %i2 <== NOT EXECUTED
20266dc: 10 bf ff 94 b 202652c <rtems_rfs_trace_shell_command+0x98><== NOT EXECUTED
20266e0: b6 2e c0 03 andn %i3, %g3, %i3 <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
20266e4: c2 4d a0 01 ldsb [ %l6 + 1 ], %g1 <== NOT EXECUTED
20266e8: 80 a0 60 68 cmp %g1, 0x68 <== NOT EXECUTED
20266ec: 02 80 00 0a be 2026714 <rtems_rfs_trace_shell_command+0x280><== NOT EXECUTED
20266f0: 80 a0 60 6c cmp %g1, 0x6c <== NOT EXECUTED
20266f4: 22 80 00 0f be,a 2026730 <rtems_rfs_trace_shell_command+0x29c><== NOT EXECUTED
20266f8: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
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]);
return 0;
default:
printf ("error: unknown option\n");
20266fc: 11 00 81 a1 sethi %hi(0x2068400), %o0 <== NOT EXECUTED
2026700: 40 00 95 cf call 204be3c <puts> <== NOT EXECUTED
2026704: 90 12 20 a0 or %o0, 0xa0, %o0 ! 20684a0 <rtems_rfs_rtems_eval_config+0xaf8><== NOT EXECUTED
return 1;
2026708: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
202670c: 81 c7 e0 08 ret <== NOT EXECUTED
2026710: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
2026714: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED
2026718: 11 00 81 a1 sethi %hi(0x2068400), %o0 <== NOT EXECUTED
202671c: 40 00 95 2d call 204bbd0 <printf> <== NOT EXECUTED
2026720: 90 12 20 48 or %o0, 0x48, %o0 ! 2068448 <rtems_rfs_rtems_eval_config+0xaa0><== NOT EXECUTED
return 0;
2026724: 82 10 20 00 clr %g1 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
2026728: 81 c7 e0 08 ret <== NOT EXECUTED
202672c: 91 e8 00 01 restore %g0, %g1, %o0 <== 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]);
2026730: 11 00 81 a1 sethi %hi(0x2068400), %o0 <== NOT EXECUTED
2026734: 39 00 81 a1 sethi %hi(0x2068400), %i4 <== NOT EXECUTED
2026738: 90 12 20 70 or %o0, 0x70, %o0 <== NOT EXECUTED
202673c: 40 00 95 25 call 204bbd0 <printf> <== NOT EXECUTED
2026740: b4 10 00 1e mov %fp, %i2 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
2026744: b8 17 20 98 or %i4, 0x98, %i4 <== NOT EXECUTED
2026748: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
202674c: 40 00 95 21 call 204bbd0 <printf> <== NOT EXECUTED
2026750: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2026754: ba 07 60 04 add %i5, 4, %i5 <== 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++)
2026758: 80 a7 40 1a cmp %i5, %i2 <== NOT EXECUTED
202675c: 32 bf ff fc bne,a 202674c <rtems_rfs_trace_shell_command+0x2b8><== NOT EXECUTED
2026760: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
2026764: 10 bf ff 9e b 20265dc <rtems_rfs_trace_shell_command+0x148><== NOT EXECUTED
2026768: 82 10 20 00 clr %g1 <== NOT EXECUTED
02040ca0 <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)
{
2040ca0: 9d e3 bf 50 save %sp, -176, %sp
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040ca4: 90 10 20 00 clr %o0
2040ca8: 13 00 80 00 sethi %hi(0x2000000), %o1
2040cac: 7f ff 95 e0 call 202642c <rtems_rfs_trace>
2040cb0: ba 10 00 18 mov %i0, %i5
2040cb4: 80 8a 20 ff btst 0xff, %o0
2040cb8: 12 80 00 5d bne 2040e2c <rtems_rfs_unlink+0x18c> <== NEVER TAKEN
2040cbc: 92 10 00 19 mov %i1, %o1
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
2040cc0: 90 10 00 1d mov %i5, %o0
2040cc4: 92 10 00 1a mov %i2, %o1
2040cc8: 94 07 bf d8 add %fp, -40, %o2
2040ccc: 7f ff fd 3d call 20401c0 <rtems_rfs_inode_open>
2040cd0: 96 10 20 01 mov 1, %o3
if (rc)
2040cd4: b0 92 20 00 orcc %o0, 0, %i0
2040cd8: 12 80 00 19 bne 2040d3c <rtems_rfs_unlink+0x9c> <== NEVER TAKEN
2040cdc: c2 07 bf e4 ld [ %fp + -28 ], %g1
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
2040ce0: 05 00 00 3c sethi %hi(0xf000), %g2
* @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);
2040ce4: c2 08 60 02 ldub [ %g1 + 2 ], %g1
2040ce8: 83 28 60 08 sll %g1, 8, %g1
2040cec: 82 08 40 02 and %g1, %g2, %g1
2040cf0: 05 00 00 10 sethi %hi(0x4000), %g2
2040cf4: 82 18 40 02 xor %g1, %g2, %g1
if (dir)
2040cf8: 80 a0 00 01 cmp %g0, %g1
2040cfc: a0 60 3f ff subx %g0, -1, %l0
2040d00: 80 a4 20 00 cmp %l0, 0
2040d04: 02 80 00 26 be 2040d9c <rtems_rfs_unlink+0xfc>
2040d08: 80 a7 20 00 cmp %i4, 0
{
switch (dir_mode)
2040d0c: 12 80 00 22 bne 2040d94 <rtems_rfs_unlink+0xf4> <== ALWAYS TAKEN
2040d10: 80 a7 20 01 cmp %i4, 1
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040d14: 90 10 20 00 clr %o0 <== NOT EXECUTED
2040d18: 7f ff 95 c5 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2040d1c: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2040d20: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2040d24: 12 80 00 6c bne 2040ed4 <rtems_rfs_unlink+0x234> <== NOT EXECUTED
2040d28: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
2040d2c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2040d30: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
2040d34: 7f ff fd 9a call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040d38: b0 10 20 15 mov 0x15, %i0 <== NOT EXECUTED
return EISDIR;
2040d3c: 81 c7 e0 08 ret
2040d40: 81 e8 00 00 restore
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
2040d44: 90 10 00 1d mov %i5, %o0
2040d48: 7f ff fd 95 call 204039c <rtems_rfs_inode_close>
2040d4c: 92 07 bf d8 add %fp, -40, %o1
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040d50: b0 92 20 00 orcc %o0, 0, %i0
2040d54: 04 bf ff fa ble 2040d3c <rtems_rfs_unlink+0x9c> <== ALWAYS TAKEN
2040d58: 90 10 20 00 clr %o0
2040d5c: 7f ff 95 b4 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2040d60: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2040d64: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2040d68: 02 80 00 46 be 2040e80 <rtems_rfs_unlink+0x1e0> <== NOT EXECUTED
2040d6c: 01 00 00 00 nop <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
2040d70: 40 00 35 2e call 204e228 <strerror> <== NOT EXECUTED
2040d74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040d78: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040d7c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2040d80: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040d84: 40 00 2b 93 call 204bbd0 <printf> <== NOT EXECUTED
2040d88: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 206dbe0 <__FUNCTION__.7603+0x21b8><== NOT EXECUTED
rc, strerror (rc));
return rc;
}
2040d8c: 81 c7 e0 08 ret <== NOT EXECUTED
2040d90: 81 e8 00 00 restore <== NOT EXECUTED
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
if (dir)
{
switch (dir_mode)
2040d94: 02 80 00 3d be 2040e88 <rtems_rfs_unlink+0x1e8> <== ALWAYS TAKEN
2040d98: 90 10 00 1d mov %i5, %o0
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
2040d9c: 90 10 00 1d mov %i5, %o0
2040da0: 92 10 00 19 mov %i1, %o1
2040da4: 94 07 bf b0 add %fp, -80, %o2
2040da8: 7f ff fd 06 call 20401c0 <rtems_rfs_inode_open>
2040dac: 96 10 20 01 mov 1, %o3
if (rc)
2040db0: b0 92 20 00 orcc %o0, 0, %i0
2040db4: 12 80 00 24 bne 2040e44 <rtems_rfs_unlink+0x1a4> <== NEVER TAKEN
2040db8: 90 10 20 00 clr %o0
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
2040dbc: 90 10 00 1d mov %i5, %o0
2040dc0: 92 07 bf b0 add %fp, -80, %o1
2040dc4: 94 10 00 1a mov %i2, %o2
2040dc8: 7f ff ed d0 call 203c508 <rtems_rfs_dir_del_entry>
2040dcc: 96 10 00 1b mov %i3, %o3
if (rc > 0)
2040dd0: b0 92 20 00 orcc %o0, 0, %i0
2040dd4: 04 80 00 44 ble 2040ee4 <rtems_rfs_unlink+0x244> <== ALWAYS TAKEN
2040dd8: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040ddc: 7f ff 95 94 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2040de0: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2040de4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2040de8: 22 80 00 0a be,a 2040e10 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
2040dec: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
2040df0: 40 00 35 0e call 204e228 <strerror> <== NOT EXECUTED
2040df4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040df8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040dfc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2040e00: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040e04: 40 00 2b 73 call 204bbd0 <printf> <== NOT EXECUTED
2040e08: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 206dae8 <__FUNCTION__.7603+0x20c0><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
2040e0c: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
2040e10: 7f ff fd 63 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040e14: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2040e18: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2040e1c: 7f ff fd 60 call 204039c <rtems_rfs_inode_close> <== NOT EXECUTED
2040e20: 92 07 bf d8 add %fp, -40, %o1 <== NOT EXECUTED
return rc;
2040e24: 81 c7 e0 08 ret <== NOT EXECUTED
2040e28: 81 e8 00 00 restore <== NOT EXECUTED
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
2040e2c: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040e30: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2040e34: 40 00 2b 67 call 204bbd0 <printf> <== NOT EXECUTED
2040e38: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
2040e3c: 10 bf ff a2 b 2040cc4 <rtems_rfs_unlink+0x24> <== NOT EXECUTED
2040e40: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
if (rc)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040e44: 7f ff 95 7a call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2040e48: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2040e4c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2040e50: 22 80 00 0a be,a 2040e78 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
2040e54: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
2040e58: 40 00 34 f4 call 204e228 <strerror> <== NOT EXECUTED
2040e5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040e60: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040e64: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2040e68: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040e6c: 40 00 2b 59 call 204bbd0 <printf> <== NOT EXECUTED
2040e70: 90 12 22 b8 or %o0, 0x2b8, %o0 ! 206dab8 <__FUNCTION__.7603+0x2090><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
2040e74: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2040e78: 7f ff fd 49 call 204039c <rtems_rfs_inode_close>
2040e7c: 92 07 bf d8 add %fp, -40, %o1
return rc;
2040e80: 81 c7 e0 08 ret
2040e84: 81 e8 00 00 restore
printf ("rtems-rfs: link is a directory\n");
rtems_rfs_inode_close (fs, &target_inode);
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
2040e88: 7f ff ef aa call 203cd30 <rtems_rfs_dir_empty>
2040e8c: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
2040e90: b0 92 20 00 orcc %o0, 0, %i0
2040e94: 04 bf ff c2 ble 2040d9c <rtems_rfs_unlink+0xfc>
2040e98: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040e9c: 7f ff 95 64 call 202642c <rtems_rfs_trace>
2040ea0: 13 00 80 00 sethi %hi(0x2000000), %o1
2040ea4: 80 8a 20 ff btst 0xff, %o0
2040ea8: 22 bf ff f4 be,a 2040e78 <rtems_rfs_unlink+0x1d8> <== ALWAYS TAKEN
2040eac: 90 10 00 1d mov %i5, %o0
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
2040eb0: 40 00 34 de call 204e228 <strerror> <== NOT EXECUTED
2040eb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040eb8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040ebc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2040ec0: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040ec4: 40 00 2b 43 call 204bbd0 <printf> <== NOT EXECUTED
2040ec8: 90 12 22 98 or %o0, 0x298, %o0 ! 206da98 <__FUNCTION__.7603+0x2070><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
2040ecc: 10 bf ff eb b 2040e78 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
2040ed0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
{
switch (dir_mode)
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link is a directory\n");
2040ed4: 40 00 2b da call 204be3c <puts> <== NOT EXECUTED
2040ed8: 90 12 22 78 or %o0, 0x278, %o0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
2040edc: 10 bf ff 95 b 2040d30 <rtems_rfs_unlink+0x90> <== NOT EXECUTED
2040ee0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
*/
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);
2040ee4: c2 07 bf e4 ld [ %fp + -28 ], %g1
if (links == 0xffff)
links = 0;
2040ee8: 05 3f ff c0 sethi %hi(0xffff0000), %g2
*/
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);
2040eec: f8 08 40 00 ldub [ %g1 ], %i4
2040ef0: c2 08 60 01 ldub [ %g1 + 1 ], %g1
2040ef4: b9 2f 20 08 sll %i4, 8, %i4
2040ef8: b8 17 00 01 or %i4, %g1, %i4
if (links == 0xffff)
2040efc: 83 2f 20 10 sll %i4, 0x10, %g1
2040f00: 83 30 60 10 srl %g1, 0x10, %g1
links = 0;
2040f04: 82 38 80 01 xnor %g2, %g1, %g1
2040f08: 80 a0 00 01 cmp %g0, %g1
2040f0c: 82 60 20 00 subx %g0, 0, %g1
2040f10: b8 0f 00 01 and %i4, %g1, %i4
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040f14: 13 00 80 00 sethi %hi(0x2000000), %o1
2040f18: 7f ff 95 45 call 202642c <rtems_rfs_trace>
2040f1c: b7 2f 20 10 sll %i4, 0x10, %i3
2040f20: 80 8a 20 ff btst 0xff, %o0
2040f24: 12 80 00 22 bne 2040fac <rtems_rfs_unlink+0x30c> <== NEVER TAKEN
2040f28: 92 10 00 1a mov %i2, %o1
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
if (links > 1)
2040f2c: b7 36 e0 10 srl %i3, 0x10, %i3
2040f30: 80 a6 e0 01 cmp %i3, 1
2040f34: 08 80 00 38 bleu 2041014 <rtems_rfs_unlink+0x374>
2040f38: c2 07 bf e4 ld [ %fp + -28 ], %g1
{
links--;
2040f3c: b8 07 3f ff add %i4, -1, %i4
* @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);
2040f40: 85 37 20 08 srl %i4, 8, %g2
2040f44: c4 28 40 00 stb %g2, [ %g1 ]
2040f48: c2 07 bf e4 ld [ %fp + -28 ], %g1
2040f4c: f8 28 60 01 stb %i4, [ %g1 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
2040f50: 82 10 20 01 mov 1, %g1
2040f54: c2 2f bf e8 stb %g1, [ %fp + -24 ]
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
2040f58: 90 07 bf b0 add %fp, -80, %o0
2040f5c: 92 10 20 01 mov 1, %o1
2040f60: 7f ff fd 6b call 204050c <rtems_rfs_inode_time_stamp_now>
2040f64: 94 10 20 01 mov 1, %o2
if (rc > 0)
2040f68: b0 92 20 00 orcc %o0, 0, %i0
2040f6c: 04 80 00 16 ble 2040fc4 <rtems_rfs_unlink+0x324> <== ALWAYS TAKEN
2040f70: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040f74: 7f ff 95 2e call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2040f78: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2040f7c: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2040f80: 22 bf ff a4 be,a 2040e10 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
2040f84: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
2040f88: 40 00 34 a8 call 204e228 <strerror> <== NOT EXECUTED
2040f8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040f90: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040f94: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2040f98: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040f9c: 40 00 2b 0d call 204bbd0 <printf> <== NOT EXECUTED
2040fa0: 90 12 23 70 or %o0, 0x370, %o0 ! 206db70 <__FUNCTION__.7603+0x2148><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
2040fa4: 10 bf ff 9b b 2040e10 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
2040fa8: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
2040fac: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2040fb0: 95 36 e0 10 srl %i3, 0x10, %o2 <== NOT EXECUTED
2040fb4: 40 00 2b 07 call 204bbd0 <printf> <== NOT EXECUTED
2040fb8: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED
if (links > 1)
2040fbc: 10 bf ff dd b 2040f30 <rtems_rfs_unlink+0x290> <== NOT EXECUTED
2040fc0: b7 36 e0 10 srl %i3, 0x10, %i3 <== 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);
2040fc4: 90 10 00 1d mov %i5, %o0
2040fc8: 7f ff fc f5 call 204039c <rtems_rfs_inode_close>
2040fcc: 92 07 bf b0 add %fp, -80, %o1
if (rc > 0)
2040fd0: b0 92 20 00 orcc %o0, 0, %i0
2040fd4: 04 bf ff 5c ble 2040d44 <rtems_rfs_unlink+0xa4> <== ALWAYS TAKEN
2040fd8: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
2040fdc: 7f ff 95 14 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2040fe0: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2040fe4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2040fe8: 22 bf ff a4 be,a 2040e78 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
2040fec: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
2040ff0: 40 00 34 8e call 204e228 <strerror> <== NOT EXECUTED
2040ff4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2040ff8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2040ffc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2041000: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2041004: 40 00 2a f3 call 204bbd0 <printf> <== NOT EXECUTED
2041008: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 206dba8 <__FUNCTION__.7603+0x2180><== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
204100c: 10 bf ff 9b b 2040e78 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
2041010: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
2041014: 90 10 00 1d mov %i5, %o0
2041018: 7f ff fd 07 call 2040434 <rtems_rfs_inode_delete>
204101c: 92 07 bf d8 add %fp, -40, %o1
if (rc > 0)
2041020: b0 92 20 00 orcc %o0, 0, %i0
2041024: 04 80 00 10 ble 2041064 <rtems_rfs_unlink+0x3c4> <== ALWAYS TAKEN
2041028: 90 10 20 00 clr %o0
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
204102c: 7f ff 95 00 call 202642c <rtems_rfs_trace> <== NOT EXECUTED
2041030: 13 00 80 00 sethi %hi(0x2000000), %o1 <== NOT EXECUTED
2041034: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
2041038: 22 bf ff 76 be,a 2040e10 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
204103c: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
2041040: 40 00 34 7a call 204e228 <strerror> <== NOT EXECUTED
2041044: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2041048: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
204104c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2041050: 11 00 81 b6 sethi %hi(0x206d800), %o0 <== NOT EXECUTED
2041054: 40 00 2a df call 204bbd0 <printf> <== NOT EXECUTED
2041058: 90 12 23 40 or %o0, 0x340, %o0 ! 206db40 <__FUNCTION__.7603+0x2118><== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
204105c: 10 bf ff 6d b 2040e10 <rtems_rfs_unlink+0x170> <== NOT EXECUTED
2041060: 92 07 bf b0 add %fp, -80, %o1 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
2041064: 80 a4 20 00 cmp %l0, 0
2041068: 02 bf ff bd be 2040f5c <rtems_rfs_unlink+0x2bc>
204106c: 90 07 bf b0 add %fp, -80, %o0
*/
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);
2041070: c4 07 bf bc ld [ %fp + -68 ], %g2
if (links == 0xffff)
2041074: 39 00 00 3f sethi %hi(0xfc00), %i4
*/
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);
2041078: c2 08 a0 01 ldub [ %g2 + 1 ], %g1
204107c: c6 08 80 00 ldub [ %g2 ], %g3
if (links == 0xffff)
2041080: b8 17 23 ff or %i4, 0x3ff, %i4
*/
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);
2041084: 87 28 e0 08 sll %g3, 8, %g3
2041088: 86 10 c0 01 or %g3, %g1, %g3
if (links == 0xffff)
204108c: 89 28 e0 10 sll %g3, 0x10, %g4
2041090: 89 31 20 10 srl %g4, 0x10, %g4
2041094: 80 a1 00 1c cmp %g4, %i4
2041098: 02 80 00 0c be 20410c8 <rtems_rfs_unlink+0x428> <== NEVER TAKEN
204109c: 82 10 00 03 mov %g3, %g1
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
20410a0: 80 a1 20 01 cmp %g4, 1
20410a4: 38 80 00 02 bgu,a 20410ac <rtems_rfs_unlink+0x40c>
20410a8: 82 00 ff ff add %g3, -1, %g1
* @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);
20410ac: 87 30 60 08 srl %g1, 8, %g3
20410b0: c6 28 80 00 stb %g3, [ %g2 ]
20410b4: c4 07 bf bc ld [ %fp + -68 ], %g2
20410b8: c2 28 a0 01 stb %g1, [ %g2 + 1 ]
rtems_rfs_buffer_mark_dirty (&handle->buffer);
20410bc: 82 10 20 01 mov 1, %g1
20410c0: 10 bf ff a6 b 2040f58 <rtems_rfs_unlink+0x2b8>
20410c4: c2 2f bf c0 stb %g1, [ %fp + -64 ]
rtems_rfs_inode_get_links (rtems_rfs_inode_handle* handle)
{
uint16_t links;
links = rtems_rfs_read_u16 (&handle->node->links);
if (links == 0xffff)
links = 0;
20410c8: 10 bf ff f9 b 20410ac <rtems_rfs_unlink+0x40c> <== NOT EXECUTED
20410cc: 82 10 20 00 clr %g1 <== NOT EXECUTED
02025fe4 <rtems_shell_debugrfs>:
}
int
rtems_shell_debugrfs (int argc, char *argv[])
{
2025fe4: 9d e3 be f0 save %sp, -272, %sp <== NOT EXECUTED
const rtems_rfs_shell_cmd table[] =
2025fe8: 13 00 81 a1 sethi %hi(0x2068400), %o1 <== NOT EXECUTED
2025fec: 90 07 bf 50 add %fp, -176, %o0 <== NOT EXECUTED
2025ff0: 92 12 60 08 or %o1, 8, %o1 <== NOT EXECUTED
2025ff4: 40 00 91 ff call 204a7f0 <memcpy> <== NOT EXECUTED
2025ff8: 94 10 20 3c mov 0x3c, %o2 <== NOT EXECUTED
};
int arg;
int t;
for (arg = 1; arg < argc; arg++)
2025ffc: 80 a6 20 01 cmp %i0, 1 <== NOT EXECUTED
2026000: 04 80 00 31 ble 20260c4 <rtems_shell_debugrfs+0xe0> <== NOT EXECUTED
2026004: ba 10 00 18 mov %i0, %i5 <== NOT EXECUTED
{
if (argv[arg][0] != '-')
2026008: f6 06 60 04 ld [ %i1 + 4 ], %i3 <== NOT EXECUTED
202600c: c2 4e c0 00 ldsb [ %i3 ], %g1 <== NOT EXECUTED
2026010: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
2026014: 02 80 00 33 be 20260e0 <rtems_shell_debugrfs+0xfc> <== NOT EXECUTED
2026018: 80 a6 20 02 cmp %i0, 2 <== NOT EXECUTED
printf ("error: unknown option: %s\n", argv[arg]);
return 1;
}
}
if ((argc - arg) < 2)
202601c: 22 80 00 2b be,a 20260c8 <rtems_shell_debugrfs+0xe4> <== NOT EXECUTED
2026020: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
rtems_rfs_get_fs (const char* path, rtems_rfs_file_system** fs)
{
struct statvfs sb;
int rc;
rc = statvfs (path, &sb);
2026024: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
2026028: 40 00 18 f7 call 202c404 <statvfs> <== NOT EXECUTED
202602c: 92 07 bf c8 add %fp, -56, %o1 <== NOT EXECUTED
if (rc < 0)
2026030: b8 92 20 00 orcc %o0, 0, %i4 <== NOT EXECUTED
2026034: 06 80 00 5e bl 20261ac <rtems_shell_debugrfs+0x1c8> <== NOT EXECUTED
2026038: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED
printf ("error: cannot statvfs path: %s: (%d) %s\n",
path, errno, strerror (errno));
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
202603c: 03 0a 02 48 sethi %hi(0x28092000), %g1 <== NOT EXECUTED
2026040: 82 10 60 01 or %g1, 1, %g1 ! 28092001 <RAM_END+0x25c92001><== NOT EXECUTED
2026044: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2026048: 12 80 00 53 bne 2026194 <rtems_shell_debugrfs+0x1b0> <== NOT EXECUTED
202604c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
* system data.
*/
{
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
2026050: 94 10 20 18 mov 0x18, %o2 <== NOT EXECUTED
2026054: 7f ff 92 5b call 200a9c0 <rtems_filesystem_eval_path_start><== NOT EXECUTED
2026058: 90 07 bf 8c add %fp, -116, %o0 <== NOT EXECUTED
rtems_filesystem_eval_path_start (&ctx, path, eval_flags);
*fs = rtems_rfs_rtems_pathloc_dev (currentloc);
202605c: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 <== NOT EXECUTED
rtems_filesystem_eval_path_cleanup (&ctx);
2026060: 90 07 bf 8c add %fp, -116, %o0 <== NOT EXECUTED
2026064: 7f ff 92 5d call 200a9d8 <rtems_filesystem_eval_path_cleanup><== NOT EXECUTED
2026068: e0 00 60 20 ld [ %g1 + 0x20 ], %l0 <== NOT EXECUTED
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
202606c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2026070: 12 80 00 13 bne 20260bc <rtems_shell_debugrfs+0xd8> <== NOT EXECUTED
2026074: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2026078: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED
202607c: b6 07 bf 50 add %fp, -176, %i3 <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
2026080: d2 06 c0 00 ld [ %i3 ], %o1 <== NOT EXECUTED
2026084: 40 00 9e 80 call 204da84 <strcmp> <== NOT EXECUTED
2026088: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
202608c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2026090: 02 80 00 37 be 202616c <rtems_shell_debugrfs+0x188> <== NOT EXECUTED
2026094: 83 2f 20 02 sll %i4, 2, %g1 <== NOT EXECUTED
else
{
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
2026098: b8 07 20 01 inc %i4 <== NOT EXECUTED
202609c: 80 a7 20 05 cmp %i4, 5 <== NOT EXECUTED
20260a0: 12 bf ff f8 bne 2026080 <rtems_shell_debugrfs+0x9c> <== NOT EXECUTED
20260a4: b6 06 e0 0c add %i3, 0xc, %i3 <== NOT EXECUTED
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
printf ("error: command not found: %s\n", argv[arg + 1]);
20260a8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
20260ac: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
}
}
return 1;
20260b0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
printf ("error: command not found: %s\n", argv[arg + 1]);
20260b4: 40 00 96 c7 call 204bbd0 <printf> <== NOT EXECUTED
20260b8: 90 12 21 98 or %o0, 0x198, %o0 <== NOT EXECUTED
}
}
return 1;
}
20260bc: 81 c7 e0 08 ret <== NOT EXECUTED
20260c0: 81 e8 00 00 restore <== NOT EXECUTED
return 1;
}
}
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
20260c4: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
20260c8: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return table[t].handler (fs, argc - 2, argv + 2);
printf ("error: command not found: %s\n", argv[arg + 1]);
}
}
return 1;
20260cc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
}
}
if ((argc - arg) < 2)
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
20260d0: 40 00 96 c0 call 204bbd0 <printf> <== NOT EXECUTED
20260d4: 90 12 21 00 or %o0, 0x100, %o0 <== NOT EXECUTED
20260d8: 81 c7 e0 08 ret <== NOT EXECUTED
20260dc: 81 e8 00 00 restore <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] != '-')
break;
switch (argv[arg][1])
20260e0: c2 4e e0 01 ldsb [ %i3 + 1 ], %g1 <== NOT EXECUTED
20260e4: 80 a0 60 68 cmp %g1, 0x68 <== NOT EXECUTED
20260e8: 02 80 00 0a be 2026110 <rtems_shell_debugrfs+0x12c> <== NOT EXECUTED
20260ec: 80 a0 60 6c cmp %g1, 0x6c <== NOT EXECUTED
20260f0: 02 80 00 0d be 2026124 <rtems_shell_debugrfs+0x140> <== NOT EXECUTED
20260f4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
printf ("%s: commands are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
return 0;
default:
printf ("error: unknown option: %s\n", argv[arg]);
20260f8: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return 1;
20260fc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
printf ("%s: commands are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
return 0;
default:
printf ("error: unknown option: %s\n", argv[arg]);
2026100: 40 00 96 b4 call 204bbd0 <printf> <== NOT EXECUTED
2026104: 90 12 20 e0 or %o0, 0xe0, %o0 <== NOT EXECUTED
return 1;
2026108: 81 c7 e0 08 ret <== NOT EXECUTED
202610c: 81 e8 00 00 restore <== NOT EXECUTED
break;
switch (argv[arg][1])
{
case 'h':
rtems_rfs_shell_usage (argv[0]);
2026110: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
2026114: 7f ff ff 9c call 2025f84 <rtems_rfs_shell_usage> <== NOT EXECUTED
2026118: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
202611c: 81 c7 e0 08 ret <== NOT EXECUTED
2026120: 81 e8 00 00 restore <== NOT EXECUTED
case 'l':
printf ("%s: commands are:\n", argv[0]);
2026124: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED
2026128: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
202612c: 39 00 81 a0 sethi %hi(0x2068000), %i4 <== NOT EXECUTED
2026130: 90 12 20 b8 or %o0, 0xb8, %o0 <== NOT EXECUTED
2026134: ba 07 bf 50 add %fp, -176, %i5 <== NOT EXECUTED
2026138: 40 00 96 a6 call 204bbd0 <printf> <== NOT EXECUTED
202613c: b2 07 bf 8c add %fp, -116, %i1 <== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
printf (" %s\t\t%s\n", table[t].name, table[t].help);
2026140: b8 17 20 d0 or %i4, 0xd0, %i4 <== NOT EXECUTED
2026144: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
2026148: d4 07 60 08 ld [ %i5 + 8 ], %o2 <== NOT EXECUTED
202614c: 40 00 96 a1 call 204bbd0 <printf> <== NOT EXECUTED
2026150: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
2026154: ba 07 60 0c add %i5, 0xc, %i5 <== NOT EXECUTED
case 'h':
rtems_rfs_shell_usage (argv[0]);
return 0;
case 'l':
printf ("%s: commands are:\n", argv[0]);
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
2026158: 80 a7 40 19 cmp %i5, %i1 <== NOT EXECUTED
202615c: 32 bf ff fb bne,a 2026148 <rtems_shell_debugrfs+0x164> <== NOT EXECUTED
2026160: d2 07 40 00 ld [ %i5 ], %o1 <== NOT EXECUTED
printf (" %s\t\t%s\n", table[t].name, table[t].help);
return 0;
2026164: 81 c7 e0 08 ret <== NOT EXECUTED
2026168: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
rtems_rfs_file_system* fs;
if (rtems_rfs_get_fs (argv[arg], &fs) == 0)
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
return table[t].handler (fs, argc - 2, argv + 2);
202616c: b9 2f 20 04 sll %i4, 4, %i4 <== NOT EXECUTED
2026170: 82 27 00 01 sub %i4, %g1, %g1 <== NOT EXECUTED
2026174: 82 07 80 01 add %fp, %g1, %g1 <== NOT EXECUTED
2026178: c2 00 7f 54 ld [ %g1 + -172 ], %g1 <== NOT EXECUTED
202617c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2026180: 92 07 7f fe add %i5, -2, %o1 <== NOT EXECUTED
2026184: 9f c0 40 00 call %g1 <== NOT EXECUTED
2026188: 94 06 60 08 add %i1, 8, %o2 <== NOT EXECUTED
202618c: 81 c7 e0 08 ret <== NOT EXECUTED
2026190: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
{
printf ("error: path '%s' is not on an RFS file system\n", path);
2026194: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return table[t].handler (fs, argc - 2, argv + 2);
printf ("error: command not found: %s\n", argv[arg + 1]);
}
}
return 1;
2026198: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
{
printf ("error: path '%s' is not on an RFS file system\n", path);
202619c: 40 00 96 8d call 204bbd0 <printf> <== NOT EXECUTED
20261a0: 90 12 21 68 or %o0, 0x168, %o0 <== NOT EXECUTED
20261a4: 81 c7 e0 08 ret <== NOT EXECUTED
20261a8: 81 e8 00 00 restore <== NOT EXECUTED
rc = statvfs (path, &sb);
if (rc < 0)
{
printf ("error: cannot statvfs path: %s: (%d) %s\n",
path, errno, strerror (errno));
20261ac: 40 00 84 50 call 20472ec <__errno> <== NOT EXECUTED
20261b0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
20261b4: 40 00 84 4e call 20472ec <__errno> <== NOT EXECUTED
20261b8: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED
int rc;
rc = statvfs (path, &sb);
if (rc < 0)
{
printf ("error: cannot statvfs path: %s: (%d) %s\n",
20261bc: 40 00 a0 1b call 204e228 <strerror> <== NOT EXECUTED
20261c0: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
20261c4: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
20261c8: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20261cc: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
20261d0: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
20261d4: 40 00 96 7f call 204bbd0 <printf> <== NOT EXECUTED
20261d8: 90 12 21 38 or %o0, 0x138, %o0 ! 2068138 <rtems_rfs_rtems_eval_config+0x790><== NOT EXECUTED
20261dc: 81 c7 e0 08 ret <== NOT EXECUTED
20261e0: 81 e8 00 00 restore <== NOT EXECUTED
020261e4 <rtems_shell_rfs_format>:
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
20261e4: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
20261e8: c0 27 bf e8 clr [ %fp + -24 ] <== NOT EXECUTED
20261ec: c0 27 bf ec clr [ %fp + -20 ] <== NOT EXECUTED
20261f0: c0 27 bf f0 clr [ %fp + -16 ] <== NOT EXECUTED
20261f4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
20261f8: c0 27 bf f8 clr [ %fp + -8 ] <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
20261fc: 80 a6 20 01 cmp %i0, 1 <== NOT EXECUTED
2026200: 04 80 00 6d ble 20263b4 <rtems_shell_rfs_format+0x1d0> <== NOT EXECUTED
2026204: c0 27 bf fc clr [ %fp + -4 ] <== NOT EXECUTED
2026208: ba 10 20 01 mov 1, %i5 <== NOT EXECUTED
202620c: b8 10 20 00 clr %i4 <== NOT EXECUTED
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
2026210: 37 00 80 93 sethi %hi(0x2024c00), %i3 <== NOT EXECUTED
}
config.group_inodes = strtoul (argv[arg], 0, 0);
break;
case 'I':
config.initialise_inodes = true;
2026214: 10 80 00 08 b 2026234 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
2026218: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
202621c: 12 80 00 55 bne 2026370 <rtems_shell_rfs_format+0x18c> <== NOT EXECUTED
2026220: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
2026224: ba 07 60 01 inc %i5 <== NOT EXECUTED
2026228: 80 a6 00 1d cmp %i0, %i5 <== NOT EXECUTED
202622c: 04 80 00 1d ble 20262a0 <rtems_shell_rfs_format+0xbc> <== NOT EXECUTED
2026230: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
{
if (argv[arg][0] == '-')
2026234: 83 2f 60 02 sll %i5, 2, %g1 <== NOT EXECUTED
2026238: d2 06 40 01 ld [ %i1 + %g1 ], %o1 <== NOT EXECUTED
202623c: c2 4a 40 00 ldsb [ %o1 ], %g1 <== NOT EXECUTED
2026240: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
2026244: 12 bf ff f6 bne 202621c <rtems_shell_rfs_format+0x38> <== NOT EXECUTED
2026248: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
{
switch (argv[arg][1])
202624c: c2 0a 60 01 ldub [ %o1 + 1 ], %g1 <== NOT EXECUTED
2026250: 82 00 7f b7 add %g1, -73, %g1 <== NOT EXECUTED
2026254: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED
2026258: 80 a0 60 2d cmp %g1, 0x2d <== NOT EXECUTED
202625c: 08 80 00 08 bleu 202627c <rtems_shell_rfs_format+0x98> <== NOT EXECUTED
2026260: 84 16 e3 ec or %i3, 0x3ec, %g2 <== NOT EXECUTED
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
2026264: 11 00 81 8b sethi %hi(0x2062c00), %o0 <== NOT EXECUTED
return 1;
2026268: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
202626c: 40 00 96 59 call 204bbd0 <printf> <== NOT EXECUTED
2026270: 90 12 21 00 or %o0, 0x100, %o0 <== NOT EXECUTED
return 1;
2026274: 81 c7 e0 08 ret <== NOT EXECUTED
2026278: 81 e8 00 00 restore <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
202627c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
2026280: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED
2026284: 81 c0 40 00 jmp %g1 <== NOT EXECUTED
2026288: 01 00 00 00 nop <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
202628c: ba 07 60 01 inc %i5 <== NOT EXECUTED
2026290: 80 a6 00 1d cmp %i0, %i5 <== NOT EXECUTED
2026294: 14 bf ff e8 bg 2026234 <rtems_shell_rfs_format+0x50> <== NOT EXECUTED
2026298: f4 2f bf fd stb %i2, [ %fp + -3 ] <== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
202629c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
20262a0: 02 80 00 45 be 20263b4 <rtems_shell_rfs_format+0x1d0> <== NOT EXECUTED
20262a4: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED
printf ("error: no driver name provided\n");
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
20262a8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
20262ac: 40 00 61 bf call 203e9a8 <rtems_rfs_format> <== NOT EXECUTED
20262b0: b0 10 20 00 clr %i0 <== NOT EXECUTED
20262b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20262b8: 06 80 00 34 bl 2026388 <rtems_shell_rfs_format+0x1a4> <== NOT EXECUTED
20262bc: 01 00 00 00 nop <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
20262c0: 81 c7 e0 08 ret <== NOT EXECUTED
20262c4: 81 e8 00 00 restore <== NOT EXECUTED
case 'v':
config.verbose = true;
break;
case 's':
arg++;
20262c8: ba 07 60 01 inc %i5 <== NOT EXECUTED
if (arg >= argc)
20262cc: 80 a6 00 1d cmp %i0, %i5 <== NOT EXECUTED
20262d0: 04 80 00 45 ble 20263e4 <rtems_shell_rfs_format+0x200> <== NOT EXECUTED
20262d4: 83 2f 60 02 sll %i5, 2, %g1 <== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
20262d8: d0 06 40 01 ld [ %i1 + %g1 ], %o0 <== NOT EXECUTED
20262dc: 92 10 20 00 clr %o1 <== NOT EXECUTED
20262e0: 40 00 a6 75 call 204fcb4 <strtoul> <== NOT EXECUTED
20262e4: 94 10 20 00 clr %o2 <== NOT EXECUTED
break;
20262e8: 10 bf ff cf b 2026224 <rtems_shell_rfs_format+0x40> <== NOT EXECUTED
20262ec: d0 27 bf e8 st %o0, [ %fp + -24 ] <== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
break;
case 'o':
arg++;
20262f0: ba 07 60 01 inc %i5 <== NOT EXECUTED
if (arg >= argc)
20262f4: 80 a6 00 1d cmp %i0, %i5 <== NOT EXECUTED
20262f8: 04 80 00 47 ble 2026414 <rtems_shell_rfs_format+0x230> <== NOT EXECUTED
20262fc: 83 2f 60 02 sll %i5, 2, %g1 <== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
2026300: d0 06 40 01 ld [ %i1 + %g1 ], %o0 <== NOT EXECUTED
2026304: 92 10 20 00 clr %o1 <== NOT EXECUTED
2026308: 40 00 a6 6b call 204fcb4 <strtoul> <== NOT EXECUTED
202630c: 94 10 20 00 clr %o2 <== NOT EXECUTED
break;
2026310: 10 bf ff c5 b 2026224 <rtems_shell_rfs_format+0x40> <== NOT EXECUTED
2026314: d0 27 bf f4 st %o0, [ %fp + -12 ] <== NOT EXECUTED
}
config.group_blocks = strtoul (argv[arg], 0, 0);
break;
case 'i':
arg++;
2026318: ba 07 60 01 inc %i5 <== NOT EXECUTED
if (arg >= argc)
202631c: 80 a6 00 1d cmp %i0, %i5 <== NOT EXECUTED
2026320: 04 80 00 37 ble 20263fc <rtems_shell_rfs_format+0x218> <== NOT EXECUTED
2026324: 83 2f 60 02 sll %i5, 2, %g1 <== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
2026328: d0 06 40 01 ld [ %i1 + %g1 ], %o0 <== NOT EXECUTED
202632c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2026330: 40 00 a6 61 call 204fcb4 <strtoul> <== NOT EXECUTED
2026334: 94 10 20 00 clr %o2 <== NOT EXECUTED
break;
2026338: 10 bf ff bb b 2026224 <rtems_shell_rfs_format+0x40> <== NOT EXECUTED
202633c: d0 27 bf f0 st %o0, [ %fp + -16 ] <== NOT EXECUTED
}
config.block_size = strtoul (argv[arg], 0, 0);
break;
case 'b':
arg++;
2026340: ba 07 60 01 inc %i5 <== NOT EXECUTED
if (arg >= argc)
2026344: 80 a6 00 1d cmp %i0, %i5 <== NOT EXECUTED
2026348: 04 80 00 21 ble 20263cc <rtems_shell_rfs_format+0x1e8> <== NOT EXECUTED
202634c: 83 2f 60 02 sll %i5, 2, %g1 <== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
2026350: d0 06 40 01 ld [ %i1 + %g1 ], %o0 <== NOT EXECUTED
2026354: 92 10 20 00 clr %o1 <== NOT EXECUTED
2026358: 40 00 a6 57 call 204fcb4 <strtoul> <== NOT EXECUTED
202635c: 94 10 20 00 clr %o2 <== NOT EXECUTED
break;
2026360: 10 bf ff b1 b 2026224 <rtems_shell_rfs_format+0x40> <== NOT EXECUTED
2026364: d0 27 bf ec st %o0, [ %fp + -20 ] <== NOT EXECUTED
config.group_inodes = strtoul (argv[arg], 0, 0);
break;
case 'I':
config.initialise_inodes = true;
break;
2026368: 10 bf ff af b 2026224 <rtems_shell_rfs_format+0x40> <== NOT EXECUTED
202636c: f4 2f bf fc stb %i2, [ %fp + -4 ] <== NOT EXECUTED
{
if (!driver)
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
2026370: 11 00 81 8b sethi %hi(0x2062c00), %o0 <== NOT EXECUTED
return 1;
2026374: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
{
if (!driver)
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
2026378: 40 00 96 16 call 204bbd0 <printf> <== NOT EXECUTED
202637c: 90 12 21 20 or %o0, 0x120, %o0 <== NOT EXECUTED
return 1;
2026380: 81 c7 e0 08 ret <== NOT EXECUTED
2026384: 81 e8 00 00 restore <== NOT EXECUTED
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
2026388: 40 00 83 d9 call 20472ec <__errno> <== NOT EXECUTED
202638c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
2026390: 40 00 9f a6 call 204e228 <strerror> <== NOT EXECUTED
2026394: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
2026398: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
202639c: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
20263a0: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
20263a4: 40 00 96 0b call 204bbd0 <printf> <== NOT EXECUTED
20263a8: 90 12 23 e8 or %o0, 0x3e8, %o0 ! 20683e8 <rtems_rfs_rtems_eval_config+0xa40><== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
20263ac: 81 c7 e0 08 ret <== NOT EXECUTED
20263b0: 81 e8 00 00 restore <== NOT EXECUTED
}
}
}
if (!driver) {
printf ("error: no driver name provided\n");
20263b4: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return 1;
20263b8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
}
}
}
if (!driver) {
printf ("error: no driver name provided\n");
20263bc: 40 00 96 a0 call 204be3c <puts> <== NOT EXECUTED
20263c0: 90 12 23 c8 or %o0, 0x3c8, %o0 <== NOT EXECUTED
return 1;
20263c4: 81 c7 e0 08 ret <== NOT EXECUTED
20263c8: 81 e8 00 00 restore <== NOT EXECUTED
case 'b':
arg++;
if (arg >= argc)
{
printf ("error: group block count needs an argument\n");
20263cc: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return 1;
20263d0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
case 'b':
arg++;
if (arg >= argc)
{
printf ("error: group block count needs an argument\n");
20263d4: 40 00 96 9a call 204be3c <puts> <== NOT EXECUTED
20263d8: 90 12 23 30 or %o0, 0x330, %o0 <== NOT EXECUTED
return 1;
20263dc: 81 c7 e0 08 ret <== NOT EXECUTED
20263e0: 81 e8 00 00 restore <== NOT EXECUTED
case 's':
arg++;
if (arg >= argc)
{
printf ("error: block size needs an argument\n");
20263e4: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return 1;
20263e8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
case 's':
arg++;
if (arg >= argc)
{
printf ("error: block size needs an argument\n");
20263ec: 40 00 96 94 call 204be3c <puts> <== NOT EXECUTED
20263f0: 90 12 23 08 or %o0, 0x308, %o0 <== NOT EXECUTED
return 1;
20263f4: 81 c7 e0 08 ret <== NOT EXECUTED
20263f8: 81 e8 00 00 restore <== NOT EXECUTED
case 'i':
arg++;
if (arg >= argc)
{
printf ("error: group inode count needs an argument\n");
20263fc: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return 1;
2026400: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
case 'i':
arg++;
if (arg >= argc)
{
printf ("error: group inode count needs an argument\n");
2026404: 40 00 96 8e call 204be3c <puts> <== NOT EXECUTED
2026408: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED
return 1;
202640c: 81 c7 e0 08 ret <== NOT EXECUTED
2026410: 81 e8 00 00 restore <== NOT EXECUTED
case 'o':
arg++;
if (arg >= argc)
{
printf ("error: inode percentage overhead needs an argument\n");
2026414: 11 00 81 a0 sethi %hi(0x2068000), %o0 <== NOT EXECUTED
return 1;
2026418: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
case 'o':
arg++;
if (arg >= argc)
{
printf ("error: inode percentage overhead needs an argument\n");
202641c: 40 00 96 88 call 204be3c <puts> <== NOT EXECUTED
2026420: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED
return 1;
2026424: 81 c7 e0 08 ret <== NOT EXECUTED
2026428: 81 e8 00 00 restore <== NOT EXECUTED
02016aa8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
2016aa8: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
2016aac: 80 a6 60 00 cmp %i1, 0
2016ab0: 12 80 00 04 bne 2016ac0 <rtems_signal_send+0x18>
2016ab4: 82 10 20 0a mov 0xa, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016ab8: 81 c7 e0 08 ret
2016abc: 91 e8 00 01 restore %g0, %g1, %o0
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2016ac0: 90 10 00 18 mov %i0, %o0
2016ac4: 40 00 13 47 call 201b7e0 <_Thread_Get>
2016ac8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2016acc: c2 07 bf fc ld [ %fp + -4 ], %g1
2016ad0: 80 a0 60 00 cmp %g1, 0
2016ad4: 12 80 00 20 bne 2016b54 <rtems_signal_send+0xac>
2016ad8: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2016adc: fa 02 21 50 ld [ %o0 + 0x150 ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2016ae0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2016ae4: 80 a0 60 00 cmp %g1, 0
2016ae8: 02 80 00 1e be 2016b60 <rtems_signal_send+0xb8>
2016aec: 01 00 00 00 nop
if ( asr->is_enabled ) {
2016af0: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
2016af4: 80 a0 60 00 cmp %g1, 0
2016af8: 02 80 00 1e be 2016b70 <rtems_signal_send+0xc8>
2016afc: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2016b00: 7f ff e2 2e call 200f3b8 <sparc_disable_interrupts>
2016b04: 01 00 00 00 nop
*signal_set |= signals;
2016b08: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2016b0c: b2 10 40 19 or %g1, %i1, %i1
2016b10: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
2016b14: 7f ff e2 2d call 200f3c8 <sparc_enable_interrupts>
2016b18: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2016b1c: 03 00 80 ed sethi %hi(0x203b400), %g1
2016b20: 82 10 60 80 or %g1, 0x80, %g1 ! 203b480 <_Per_CPU_Information>
2016b24: c4 00 60 08 ld [ %g1 + 8 ], %g2
2016b28: 80 a0 a0 00 cmp %g2, 0
2016b2c: 02 80 00 06 be 2016b44 <rtems_signal_send+0x9c>
2016b30: 01 00 00 00 nop
2016b34: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2016b38: 80 a7 00 02 cmp %i4, %g2
2016b3c: 02 80 00 15 be 2016b90 <rtems_signal_send+0xe8> <== ALWAYS TAKEN
2016b40: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2016b44: 40 00 13 1a call 201b7ac <_Thread_Enable_dispatch>
2016b48: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2016b4c: 10 bf ff db b 2016ab8 <rtems_signal_send+0x10>
2016b50: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
2016b54: 82 10 20 04 mov 4, %g1
}
2016b58: 81 c7 e0 08 ret
2016b5c: 91 e8 00 01 restore %g0, %g1, %o0
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2016b60: 40 00 13 13 call 201b7ac <_Thread_Enable_dispatch>
2016b64: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
2016b68: 10 bf ff d4 b 2016ab8 <rtems_signal_send+0x10>
2016b6c: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2016b70: 7f ff e2 12 call 200f3b8 <sparc_disable_interrupts>
2016b74: 01 00 00 00 nop
*signal_set |= signals;
2016b78: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2016b7c: b2 10 40 19 or %g1, %i1, %i1
2016b80: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
2016b84: 7f ff e2 11 call 200f3c8 <sparc_enable_interrupts>
2016b88: 01 00 00 00 nop
2016b8c: 30 bf ff ee b,a 2016b44 <rtems_signal_send+0x9c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
2016b90: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
2016b94: 30 bf ff ec b,a 2016b44 <rtems_signal_send+0x9c>
02007544 <rtems_stack_checker_begin_extension>:
Thread_Control *the_thread
)
{
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
2007544: c2 02 20 08 ld [ %o0 + 8 ], %g1
2007548: 80 a0 60 00 cmp %g1, 0
200754c: 02 80 00 0c be 200757c <rtems_stack_checker_begin_extension+0x38><== NEVER TAKEN
2007550: 05 00 81 cf sethi %hi(0x2073c00), %g2
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
2007554: c2 02 20 b4 ld [ %o0 + 0xb4 ], %g1
2007558: c6 00 a1 d4 ld [ %g2 + 0x1d4 ], %g3
200755c: 84 10 a1 d4 or %g2, 0x1d4, %g2
2007560: c6 20 60 08 st %g3, [ %g1 + 8 ]
2007564: c6 00 a0 04 ld [ %g2 + 4 ], %g3
2007568: c6 20 60 0c st %g3, [ %g1 + 0xc ]
200756c: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2007570: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
2007574: c4 00 a0 0c ld [ %g2 + 0xc ], %g2
2007578: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
200757c: 81 c3 e0 08 retl
0200748c <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
200748c: 9d e3 bf a0 save %sp, -96, %sp
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
2007490: 3b 00 81 c4 sethi %hi(0x2071000), %i5
2007494: c2 07 60 78 ld [ %i5 + 0x78 ], %g1 ! 2071078 <Stack_check_Initialized>
2007498: 80 a0 60 00 cmp %g1, 0
200749c: 12 80 00 22 bne 2007524 <rtems_stack_checker_create_extension+0x98>
20074a0: 80 a6 60 00 cmp %i1, 0
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
20074a4: 07 00 81 cf sethi %hi(0x2073c00), %g3
20074a8: 09 3f bb 7c sethi %hi(0xfeedf000), %g4
20074ac: 82 10 e1 d4 or %g3, 0x1d4, %g1
20074b0: 88 11 20 0d or %g4, 0xd, %g4
20074b4: c8 20 e1 d4 st %g4, [ %g3 + 0x1d4 ]
20074b8: 07 02 eb 43 sethi %hi(0xbad0c00), %g3
20074bc: 86 10 e1 06 or %g3, 0x106, %g3 ! bad0d06 <RAM_END+0x96d0d06>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
20074c0: 05 00 81 d0 sethi %hi(0x2074000), %g2
20074c4: d0 00 a1 a0 ld [ %g2 + 0x1a0 ], %o0 ! 20741a0 <_Per_CPU_Information>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
20074c8: c6 20 60 04 st %g3, [ %g1 + 4 ]
20074cc: 07 37 ab 7c sethi %hi(0xdeadf000), %g3
20074d0: 86 10 e0 0d or %g3, 0xd, %g3 ! deadf00d <RAM_END+0xdc6df00d>
20074d4: c6 20 60 08 st %g3, [ %g1 + 8 ]
20074d8: 07 18 03 43 sethi %hi(0x600d0c00), %g3
20074dc: 86 10 e1 06 or %g3, 0x106, %g3 ! 600d0d06 <RAM_END+0x5dcd0d06>
20074e0: c6 20 60 0c st %g3, [ %g1 + 0xc ]
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
20074e4: 80 a2 20 00 cmp %o0, 0
20074e8: 02 80 00 0c be 2007518 <rtems_stack_checker_create_extension+0x8c><== NEVER TAKEN
20074ec: 84 10 a1 a0 or %g2, 0x1a0, %g2
20074f0: d4 00 a0 04 ld [ %g2 + 4 ], %o2
20074f4: 80 a2 a0 00 cmp %o2, 0
20074f8: 02 80 00 08 be 2007518 <rtems_stack_checker_create_extension+0x8c><== NEVER TAKEN
20074fc: 03 00 81 cf sethi %hi(0x2073c00), %g1
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2007500: 84 10 61 e4 or %g1, 0x1e4, %g2 ! 2073de4 <Stack_check_Interrupt_stack>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
2007504: 94 22 80 08 sub %o2, %o0, %o2
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2007508: d0 20 a0 04 st %o0, [ %g2 + 4 ]
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
200750c: d4 20 61 e4 st %o2, [ %g1 + 0x1e4 ]
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2007510: 40 01 0d 44 call 204aa20 <memset>
2007514: 92 10 20 a5 mov 0xa5, %o1
}
#endif
Stack_check_Initialized = 1;
2007518: 82 10 20 01 mov 1, %g1
200751c: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
2007520: 80 a6 60 00 cmp %i1, 0
2007524: 02 80 00 06 be 200753c <rtems_stack_checker_create_extension+0xb0><== NEVER TAKEN
2007528: 01 00 00 00 nop
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
200752c: d0 06 60 b4 ld [ %i1 + 0xb4 ], %o0
2007530: d4 06 60 b0 ld [ %i1 + 0xb0 ], %o2
2007534: 40 01 0d 3b call 204aa20 <memset>
2007538: 92 10 20 a5 mov 0xa5, %o1
return true;
}
200753c: 81 c7 e0 08 ret
2007540: 91 e8 20 01 restore %g0, 1, %o0
02007698 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
2007698: 9d e3 bf a0 save %sp, -96, %sp
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
200769c: 39 00 81 d0 sethi %hi(0x2074000), %i4
20076a0: b8 17 21 a0 or %i4, 0x1a0, %i4 ! 20741a0 <_Per_CPU_Information>
20076a4: c2 07 20 0c ld [ %i4 + 0xc ], %g1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
20076a8: d0 00 60 b4 ld [ %g1 + 0xb4 ], %o0
20076ac: 80 a7 80 08 cmp %fp, %o0
20076b0: 0a 80 00 06 bcs 20076c8 <rtems_stack_checker_is_blown+0x30><== NEVER TAKEN
20076b4: ba 10 20 00 clr %i5
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
20076b8: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1
20076bc: 82 02 00 01 add %o0, %g1, %g1
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
20076c0: 80 a0 40 1e cmp %g1, %fp
20076c4: ba 60 3f ff subx %g0, -1, %i5
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
20076c8: 03 00 81 c4 sethi %hi(0x2071000), %g1
20076cc: c2 00 60 78 ld [ %g1 + 0x78 ], %g1 ! 2071078 <Stack_check_Initialized>
20076d0: 80 a0 60 00 cmp %g1, 0
20076d4: 02 80 00 09 be 20076f8 <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
20076d8: 92 10 20 01 mov 1, %o1
pattern_ok = (!memcmp(
20076dc: 90 02 20 08 add %o0, 8, %o0
20076e0: 94 10 20 10 mov 0x10, %o2
20076e4: 13 00 81 cf sethi %hi(0x2073c00), %o1
20076e8: 40 01 0c 14 call 204a738 <memcmp>
20076ec: 92 12 61 d4 or %o1, 0x1d4, %o1 ! 2073dd4 <Stack_check_Pattern>
20076f0: 80 a0 00 08 cmp %g0, %o0
20076f4: 92 60 3f ff subx %g0, -1, %o1
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
20076f8: 80 8f 60 ff btst 0xff, %i5
20076fc: 22 80 00 07 be,a 2007718 <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
2007700: 92 0a 60 ff and %o1, 0xff, %o1 <== NOT EXECUTED
2007704: 92 8a 60 ff andcc %o1, 0xff, %o1
2007708: 02 80 00 04 be 2007718 <rtems_stack_checker_is_blown+0x80><== NEVER TAKEN
200770c: b0 10 20 00 clr %i0
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
2007710: 81 c7 e0 08 ret
2007714: 81 e8 00 00 restore
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
2007718: 7f ff ff 9b call 2007584 <Stack_check_report_blown_task> <== NOT EXECUTED
200771c: d0 07 20 0c ld [ %i4 + 0xc ], %o0 <== NOT EXECUTED
02007724 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2007724: 9d e3 bf a0 save %sp, -96, %sp
if ( !print )
2007728: 80 a6 60 00 cmp %i1, 0
200772c: 02 80 00 14 be 200777c <rtems_stack_checker_report_usage_with_plugin+0x58><== NEVER TAKEN
2007730: 39 00 81 c4 sethi %hi(0x2071000), %i4
return;
print_context = context;
print_handler = print;
2007734: 3b 00 81 c4 sethi %hi(0x2071000), %i5
)
{
if ( !print )
return;
print_context = context;
2007738: f0 27 20 7c st %i0, [ %i4 + 0x7c ]
print_handler = print;
200773c: f2 27 60 80 st %i1, [ %i5 + 0x80 ]
(*print)( context, "Stack usage by thread\n");
2007740: 90 10 00 18 mov %i0, %o0
2007744: 13 00 81 8f sethi %hi(0x2063c00), %o1
2007748: 9f c6 40 00 call %i1
200774c: 92 12 62 a0 or %o1, 0x2a0, %o1 ! 2063ea0 <write_block_string.8456+0x6b8>
(*print)( context,
2007750: 90 10 00 18 mov %i0, %o0
2007754: 13 00 81 8f sethi %hi(0x2063c00), %o1
2007758: 9f c6 40 00 call %i1
200775c: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 2063eb8 <write_block_string.8456+0x6d0>
" 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 );
2007760: 11 00 80 1c sethi %hi(0x2007000), %o0
2007764: 40 00 1f 2f call 200f420 <rtems_iterate_over_all_threads>
2007768: 90 12 22 ec or %o0, 0x2ec, %o0 ! 20072ec <Stack_check_Dump_threads_usage>
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
200776c: 7f ff fe e0 call 20072ec <Stack_check_Dump_threads_usage>
2007770: 90 10 3f ff mov -1, %o0
#endif
print_context = NULL;
2007774: c0 27 20 7c clr [ %i4 + 0x7c ]
print_handler = NULL;
2007778: c0 27 60 80 clr [ %i5 + 0x80 ]
200777c: 81 c7 e0 08 ret
2007780: 81 e8 00 00 restore
0200762c <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
200762c: 9d e3 bf a0 save %sp, -96, %sp
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);
2007630: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
/*
* 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,
2007634: 13 00 81 cf sethi %hi(0x2073c00), %o1
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);
2007638: 90 00 60 08 add %g1, 8, %o0
/*
* 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,
200763c: 94 10 20 10 mov 0x10, %o2
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
2007640: 80 a7 80 01 cmp %fp, %g1
2007644: 0a 80 00 07 bcs 2007660 <rtems_stack_checker_switch_extension+0x34><== NEVER TAKEN
2007648: 92 12 61 d4 or %o1, 0x1d4, %o1
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
200764c: c4 06 20 b0 ld [ %i0 + 0xb0 ], %g2
2007650: 82 00 40 02 add %g1, %g2, %g1
2007654: 80 a7 80 01 cmp %fp, %g1
2007658: 08 80 00 09 bleu 200767c <rtems_stack_checker_switch_extension+0x50><== ALWAYS TAKEN
200765c: 01 00 00 00 nop
/*
* 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,
2007660: 40 01 0c 36 call 204a738 <memcmp> <== NOT EXECUTED
2007664: 01 00 00 00 nop <== NOT EXECUTED
2007668: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
200766c: 92 60 3f ff subx %g0, -1, %o1 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
2007670: 90 10 00 18 mov %i0, %o0
2007674: 7f ff ff c4 call 2007584 <Stack_check_report_blown_task>
2007678: 92 0a 60 01 and %o1, 1, %o1
/*
* 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,
200767c: 40 01 0c 2f call 204a738 <memcmp>
2007680: 01 00 00 00 nop
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
2007684: 80 a2 20 00 cmp %o0, 0
2007688: 12 bf ff fa bne 2007670 <rtems_stack_checker_switch_extension+0x44>
200768c: 92 10 20 00 clr %o1
2007690: 81 c7 e0 08 ret
2007694: 81 e8 00 00 restore
02021a94 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
2021a94: 9d e3 bf 98 save %sp, -104, %sp
2021a98: ba 10 00 18 mov %i0, %i5
long result;
char *end;
if ( !n )
2021a9c: 80 a6 60 00 cmp %i1, 0
2021aa0: 02 80 00 1f be 2021b1c <rtems_string_to_int+0x88>
2021aa4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
2021aa8: 40 00 96 11 call 20472ec <__errno>
2021aac: 01 00 00 00 nop
2021ab0: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtol( s, &end, base );
2021ab4: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
2021ab8: c0 26 40 00 clr [ %i1 ]
result = strtol( s, &end, base );
2021abc: 90 10 00 1d mov %i5, %o0
2021ac0: 40 00 b7 24 call 204f750 <strtol>
2021ac4: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
2021ac8: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
2021acc: 80 a6 a0 00 cmp %i2, 0
2021ad0: 02 80 00 03 be 2021adc <rtems_string_to_int+0x48>
2021ad4: b6 10 00 08 mov %o0, %i3
*endptr = end;
2021ad8: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
2021adc: 80 a7 40 01 cmp %i5, %g1
2021ae0: 02 80 00 0f be 2021b1c <rtems_string_to_int+0x88>
2021ae4: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021ae8: 40 00 96 01 call 20472ec <__errno>
2021aec: 01 00 00 00 nop
2021af0: c2 02 00 00 ld [ %o0 ], %g1
2021af4: 80 a0 60 22 cmp %g1, 0x22
2021af8: 02 80 00 05 be 2021b0c <rtems_string_to_int+0x78>
2021afc: 03 20 00 00 sethi %hi(0x80000000), %g1
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
2021b00: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
2021b04: 81 c7 e0 08 ret
2021b08: 91 e8 20 00 restore %g0, 0, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
2021b0c: 82 38 40 1b xnor %g1, %i3, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021b10: 80 a0 60 00 cmp %g1, 0
2021b14: 12 80 00 04 bne 2021b24 <rtems_string_to_int+0x90>
2021b18: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
2021b1c: 81 c7 e0 08 ret
2021b20: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021b24: 80 a6 e0 00 cmp %i3, 0
2021b28: 02 bf ff fd be 2021b1c <rtems_string_to_int+0x88> <== NEVER TAKEN
2021b2c: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
2021b30: 80 a6 c0 01 cmp %i3, %g1
2021b34: 32 bf ff f4 bne,a 2021b04 <rtems_string_to_int+0x70> <== NEVER TAKEN
2021b38: f6 26 40 00 st %i3, [ %i1 ] <== NOT EXECUTED
2021b3c: 30 bf ff f8 b,a 2021b1c <rtems_string_to_int+0x88>
0200e04c <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
200e04c: 9d e3 bf 98 save %sp, -104, %sp
200e050: ba 10 00 18 mov %i0, %i5
long result;
char *end;
if ( !n )
200e054: 80 a6 60 00 cmp %i1, 0
200e058: 02 80 00 1f be 200e0d4 <rtems_string_to_long+0x88>
200e05c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200e060: 40 00 09 37 call 201053c <__errno>
200e064: 01 00 00 00 nop
200e068: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtol( s, &end, base );
200e06c: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200e070: c0 26 40 00 clr [ %i1 ]
result = strtol( s, &end, base );
200e074: 90 10 00 1d mov %i5, %o0
200e078: 40 00 15 08 call 2013498 <strtol>
200e07c: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200e080: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
200e084: 80 a6 a0 00 cmp %i2, 0
200e088: 02 80 00 03 be 200e094 <rtems_string_to_long+0x48>
200e08c: b6 10 00 08 mov %o0, %i3
*endptr = end;
200e090: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200e094: 80 a7 40 01 cmp %i5, %g1
200e098: 02 80 00 0f be 200e0d4 <rtems_string_to_long+0x88>
200e09c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e0a0: 40 00 09 27 call 201053c <__errno>
200e0a4: 01 00 00 00 nop
200e0a8: c2 02 00 00 ld [ %o0 ], %g1
200e0ac: 80 a0 60 22 cmp %g1, 0x22
200e0b0: 02 80 00 05 be 200e0c4 <rtems_string_to_long+0x78>
200e0b4: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
200e0b8: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
200e0bc: 81 c7 e0 08 ret
200e0c0: 91 e8 20 00 restore %g0, 0, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200e0c4: 82 38 40 1b xnor %g1, %i3, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e0c8: 80 a0 60 00 cmp %g1, 0
200e0cc: 12 80 00 04 bne 200e0dc <rtems_string_to_long+0x90>
200e0d0: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
200e0d4: 81 c7 e0 08 ret
200e0d8: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e0dc: 80 a6 e0 00 cmp %i3, 0
200e0e0: 02 bf ff fd be 200e0d4 <rtems_string_to_long+0x88> <== NEVER TAKEN
200e0e4: 03 20 00 00 sethi %hi(0x80000000), %g1
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
200e0e8: 80 a6 c0 01 cmp %i3, %g1
200e0ec: 32 bf ff f4 bne,a 200e0bc <rtems_string_to_long+0x70> <== NEVER TAKEN
200e0f0: f6 26 40 00 st %i3, [ %i1 ] <== NOT EXECUTED
200e0f4: 30 bf ff f8 b,a 200e0d4 <rtems_string_to_long+0x88>
0200df74 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
200df74: 9d e3 bf 98 save %sp, -104, %sp
long long result;
char *end;
if ( !n )
200df78: 80 a6 60 00 cmp %i1, 0
200df7c: 02 80 00 1c be 200dfec <rtems_string_to_long_long+0x78>
200df80: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
errno = 0;
200df84: 40 00 09 6e call 201053c <__errno>
200df88: 01 00 00 00 nop
200df8c: c0 22 00 00 clr [ %o0 ]
*n = 0;
200df90: c0 26 40 00 clr [ %i1 ]
200df94: c0 26 60 04 clr [ %i1 + 4 ]
result = strtoll( s, &end, base );
200df98: 90 10 00 18 mov %i0, %o0
200df9c: 92 07 bf fc add %fp, -4, %o1
200dfa0: 40 00 15 47 call 20134bc <strtoll>
200dfa4: 94 10 00 1b mov %i3, %o2
if ( endptr )
*endptr = end;
200dfa8: c4 07 bf fc ld [ %fp + -4 ], %g2
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
200dfac: b8 10 00 08 mov %o0, %i4
if ( endptr )
200dfb0: 80 a6 a0 00 cmp %i2, 0
200dfb4: 02 80 00 03 be 200dfc0 <rtems_string_to_long_long+0x4c>
200dfb8: ba 10 00 09 mov %o1, %i5
*endptr = end;
200dfbc: c4 26 80 00 st %g2, [ %i2 ]
if ( end == s )
200dfc0: 80 a6 00 02 cmp %i0, %g2
200dfc4: 02 80 00 0a be 200dfec <rtems_string_to_long_long+0x78>
200dfc8: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200dfcc: 40 00 09 5c call 201053c <__errno>
200dfd0: 01 00 00 00 nop
200dfd4: c2 02 00 00 ld [ %o0 ], %g1
200dfd8: 80 a0 60 22 cmp %g1, 0x22
200dfdc: 02 80 00 06 be 200dff4 <rtems_string_to_long_long+0x80>
200dfe0: 05 1f ff ff sethi %hi(0x7ffffc00), %g2
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
200dfe4: f8 3e 40 00 std %i4, [ %i1 ]
return RTEMS_SUCCESSFUL;
200dfe8: 82 10 20 00 clr %g1
}
200dfec: 81 c7 e0 08 ret
200dff0: 91 e8 00 01 restore %g0, %g1, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
200dff4: 07 3f ff ff sethi %hi(0xfffffc00), %g3
200dff8: 84 10 a3 ff or %g2, 0x3ff, %g2
200dffc: 86 10 e3 ff or %g3, 0x3ff, %g3
200e000: 84 1f 00 02 xor %i4, %g2, %g2
200e004: 86 1f 40 03 xor %i5, %g3, %g3
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e008: 80 90 80 03 orcc %g2, %g3, %g0
200e00c: 12 80 00 04 bne 200e01c <rtems_string_to_long_long+0xa8>
200e010: 80 97 00 1d orcc %i4, %i5, %g0
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
200e014: 10 bf ff f6 b 200dfec <rtems_string_to_long_long+0x78>
200e018: 82 10 20 0a mov 0xa, %g1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e01c: 02 bf ff f4 be 200dfec <rtems_string_to_long_long+0x78> <== NEVER TAKEN
200e020: 82 10 20 0a mov 0xa, %g1
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
200e024: 03 20 00 00 sethi %hi(0x80000000), %g1
200e028: 80 a7 00 01 cmp %i4, %g1
200e02c: 32 bf ff ef bne,a 200dfe8 <rtems_string_to_long_long+0x74><== NEVER TAKEN
200e030: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
200e034: 80 a7 60 00 cmp %i5, 0
200e038: 22 bf ff ed be,a 200dfec <rtems_string_to_long_long+0x78><== ALWAYS TAKEN
200e03c: 82 10 20 0a mov 0xa, %g1
return RTEMS_INVALID_NUMBER;
*n = result;
200e040: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
200e044: 10 bf ff ea b 200dfec <rtems_string_to_long_long+0x78> <== NOT EXECUTED
200e048: 82 10 20 00 clr %g1 <== NOT EXECUTED
02021b50 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
2021b50: 9d e3 bf 98 save %sp, -104, %sp
2021b54: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
2021b58: 80 a6 60 00 cmp %i1, 0
2021b5c: 02 80 00 22 be 2021be4 <rtems_string_to_unsigned_char+0x94>
2021b60: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
2021b64: 40 00 95 e2 call 20472ec <__errno>
2021b68: 01 00 00 00 nop
2021b6c: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
2021b70: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
2021b74: c0 2e 40 00 clrb [ %i1 ]
result = strtoul( s, &end, base );
2021b78: 90 10 00 1d mov %i5, %o0
2021b7c: 40 00 b8 4e call 204fcb4 <strtoul>
2021b80: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
2021b84: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
2021b88: 80 a6 a0 00 cmp %i2, 0
2021b8c: 02 80 00 03 be 2021b98 <rtems_string_to_unsigned_char+0x48>
2021b90: b6 10 00 08 mov %o0, %i3
*endptr = end;
2021b94: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
2021b98: 80 a7 40 01 cmp %i5, %g1
2021b9c: 02 80 00 12 be 2021be4 <rtems_string_to_unsigned_char+0x94>
2021ba0: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021ba4: 40 00 95 d2 call 20472ec <__errno>
2021ba8: 01 00 00 00 nop
2021bac: c2 02 00 00 ld [ %o0 ], %g1
2021bb0: 80 a0 60 22 cmp %g1, 0x22
2021bb4: 02 80 00 0e be 2021bec <rtems_string_to_unsigned_char+0x9c>
2021bb8: 82 06 ff ff add %i3, -1, %g1
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
2021bbc: 80 a6 e0 ff cmp %i3, 0xff
2021bc0: 18 80 00 05 bgu 2021bd4 <rtems_string_to_unsigned_char+0x84>
2021bc4: 01 00 00 00 nop
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
2021bc8: f6 2e 40 00 stb %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
2021bcc: 81 c7 e0 08 ret
2021bd0: 91 e8 20 00 restore %g0, 0, %o0
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
2021bd4: 40 00 95 c6 call 20472ec <__errno>
2021bd8: b0 10 20 0a mov 0xa, %i0
2021bdc: 82 10 20 22 mov 0x22, %g1
2021be0: c2 22 00 00 st %g1, [ %o0 ]
return RTEMS_INVALID_NUMBER;
2021be4: 81 c7 e0 08 ret
2021be8: 81 e8 00 00 restore
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021bec: 80 a0 7f fd cmp %g1, -3
2021bf0: 08 bf ff f3 bleu 2021bbc <rtems_string_to_unsigned_char+0x6c><== NEVER TAKEN
2021bf4: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
2021bf8: 81 c7 e0 08 ret
2021bfc: 81 e8 00 00 restore
0200e1b8 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
200e1b8: 9d e3 bf 98 save %sp, -104, %sp
200e1bc: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
200e1c0: 80 a6 60 00 cmp %i1, 0
200e1c4: 02 80 00 1e be 200e23c <rtems_string_to_unsigned_int+0x84>
200e1c8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
200e1cc: 40 00 08 dc call 201053c <__errno>
200e1d0: 01 00 00 00 nop
200e1d4: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
200e1d8: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
200e1dc: c0 26 40 00 clr [ %i1 ]
result = strtoul( s, &end, base );
200e1e0: 90 10 00 1d mov %i5, %o0
200e1e4: 40 00 16 06 call 20139fc <strtoul>
200e1e8: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
200e1ec: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
200e1f0: 80 a6 a0 00 cmp %i2, 0
200e1f4: 02 80 00 03 be 200e200 <rtems_string_to_unsigned_int+0x48>
200e1f8: b6 10 00 08 mov %o0, %i3
*endptr = end;
200e1fc: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
200e200: 80 a7 40 01 cmp %i5, %g1
200e204: 02 80 00 0e be 200e23c <rtems_string_to_unsigned_int+0x84>
200e208: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e20c: 40 00 08 cc call 201053c <__errno>
200e210: 01 00 00 00 nop
200e214: c2 02 00 00 ld [ %o0 ], %g1
200e218: 80 a0 60 22 cmp %g1, 0x22
200e21c: 02 80 00 05 be 200e230 <rtems_string_to_unsigned_int+0x78>
200e220: 82 06 ff ff add %i3, -1, %g1
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
200e224: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
200e228: 81 c7 e0 08 ret
200e22c: 91 e8 20 00 restore %g0, 0, %o0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e230: 80 a0 7f fd cmp %g1, -3
200e234: 08 bf ff fc bleu 200e224 <rtems_string_to_unsigned_int+0x6c><== NEVER TAKEN
200e238: b0 10 20 0a mov 0xa, %i0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
200e23c: 81 c7 e0 08 ret
200e240: 81 e8 00 00 restore
02021c00 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
2021c00: 9d e3 bf 98 save %sp, -104, %sp
2021c04: ba 10 00 18 mov %i0, %i5
unsigned long result;
char *end;
if ( !n )
2021c08: 80 a6 60 00 cmp %i1, 0
2021c0c: 02 80 00 1e be 2021c84 <rtems_string_to_unsigned_long+0x84>
2021c10: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
errno = 0;
2021c14: 40 00 95 b6 call 20472ec <__errno>
2021c18: 01 00 00 00 nop
2021c1c: c0 22 00 00 clr [ %o0 ]
*n = 0;
result = strtoul( s, &end, base );
2021c20: 94 10 00 1b mov %i3, %o2
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
2021c24: c0 26 40 00 clr [ %i1 ]
result = strtoul( s, &end, base );
2021c28: 90 10 00 1d mov %i5, %o0
2021c2c: 40 00 b8 22 call 204fcb4 <strtoul>
2021c30: 92 07 bf fc add %fp, -4, %o1
if ( endptr )
*endptr = end;
2021c34: c2 07 bf fc ld [ %fp + -4 ], %g1
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
2021c38: 80 a6 a0 00 cmp %i2, 0
2021c3c: 02 80 00 03 be 2021c48 <rtems_string_to_unsigned_long+0x48>
2021c40: b6 10 00 08 mov %o0, %i3
*endptr = end;
2021c44: c2 26 80 00 st %g1, [ %i2 ]
if ( end == s )
2021c48: 80 a7 40 01 cmp %i5, %g1
2021c4c: 02 80 00 0e be 2021c84 <rtems_string_to_unsigned_long+0x84>
2021c50: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021c54: 40 00 95 a6 call 20472ec <__errno>
2021c58: 01 00 00 00 nop
2021c5c: c2 02 00 00 ld [ %o0 ], %g1
2021c60: 80 a0 60 22 cmp %g1, 0x22
2021c64: 02 80 00 05 be 2021c78 <rtems_string_to_unsigned_long+0x78>
2021c68: 82 06 ff ff add %i3, -1, %g1
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
2021c6c: f6 26 40 00 st %i3, [ %i1 ]
return RTEMS_SUCCESSFUL;
}
2021c70: 81 c7 e0 08 ret
2021c74: 91 e8 20 00 restore %g0, 0, %o0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
2021c78: 80 a0 7f fd cmp %g1, -3
2021c7c: 08 bf ff fc bleu 2021c6c <rtems_string_to_unsigned_long+0x6c><== NEVER TAKEN
2021c80: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
2021c84: 81 c7 e0 08 ret
2021c88: 81 e8 00 00 restore
0200e244 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
200e244: 9d e3 bf 98 save %sp, -104, %sp
unsigned long long result;
char *end;
if ( !n )
200e248: 80 a6 60 00 cmp %i1, 0
200e24c: 02 80 00 1c be 200e2bc <rtems_string_to_unsigned_long_long+0x78>
200e250: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
errno = 0;
200e254: 40 00 08 ba call 201053c <__errno>
200e258: 01 00 00 00 nop
200e25c: c0 22 00 00 clr [ %o0 ]
*n = 0;
200e260: c0 26 40 00 clr [ %i1 ]
200e264: c0 26 60 04 clr [ %i1 + 4 ]
result = strtoull( s, &end, base );
200e268: 90 10 00 18 mov %i0, %o0
200e26c: 92 07 bf fc add %fp, -4, %o1
200e270: 40 00 15 ec call 2013a20 <strtoull>
200e274: 94 10 00 1b mov %i3, %o2
if ( endptr )
*endptr = end;
200e278: c4 07 bf fc ld [ %fp + -4 ], %g2
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
200e27c: b8 10 00 08 mov %o0, %i4
if ( endptr )
200e280: 80 a6 a0 00 cmp %i2, 0
200e284: 02 80 00 03 be 200e290 <rtems_string_to_unsigned_long_long+0x4c>
200e288: ba 10 00 09 mov %o1, %i5
*endptr = end;
200e28c: c4 26 80 00 st %g2, [ %i2 ]
if ( end == s )
200e290: 80 a6 00 02 cmp %i0, %g2
200e294: 02 80 00 0a be 200e2bc <rtems_string_to_unsigned_long_long+0x78>
200e298: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e29c: 40 00 08 a8 call 201053c <__errno>
200e2a0: 01 00 00 00 nop
200e2a4: c2 02 00 00 ld [ %o0 ], %g1
200e2a8: 80 a0 60 22 cmp %g1, 0x22
200e2ac: 02 80 00 06 be 200e2c4 <rtems_string_to_unsigned_long_long+0x80>
200e2b0: 86 87 7f ff addcc %i5, -1, %g3
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200e2b4: f8 3e 40 00 std %i4, [ %i1 ]
return RTEMS_SUCCESSFUL;
200e2b8: 82 10 20 00 clr %g1
}
200e2bc: 81 c7 e0 08 ret
200e2c0: 91 e8 00 01 restore %g0, %g1, %o0
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
200e2c4: 84 47 3f ff addx %i4, -1, %g2
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
200e2c8: 80 a0 bf ff cmp %g2, -1
200e2cc: 12 bf ff fa bne 200e2b4 <rtems_string_to_unsigned_long_long+0x70><== NEVER TAKEN
200e2d0: 80 a0 ff fd cmp %g3, -3
200e2d4: 18 bf ff fa bgu 200e2bc <rtems_string_to_unsigned_long_long+0x78><== ALWAYS TAKEN
200e2d8: 82 10 20 0a mov 0xa, %g1
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
200e2dc: 10 bf ff f7 b 200e2b8 <rtems_string_to_unsigned_long_long+0x74><== NOT EXECUTED
200e2e0: f8 3e 40 00 std %i4, [ %i1 ] <== NOT EXECUTED
02003214 <rtems_tarfs_load>:
int rtems_tarfs_load(
const char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
2003214: 9d e3 bd d0 save %sp, -560, %sp
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 =
2003218: 94 10 20 18 mov 0x18, %o2
200321c: 92 10 00 18 mov %i0, %o1
2003220: 40 00 09 29 call 20056c4 <rtems_filesystem_eval_path_start>
2003224: 90 07 bf a8 add %fp, -88, %o0
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(
2003228: 92 07 bf c0 add %fp, -64, %o1
200322c: ba 10 00 08 mov %o0, %i5
2003230: 40 00 09 da call 2005998 <rtems_filesystem_location_copy_and_detach>
2003234: 90 07 bf e4 add %fp, -28, %o0
rtems_filesystem_eval_path_extract_currentloc( &ctx, &rootloc );
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (rootloc.ops != &IMFS_ops && rootloc.ops != &fifoIMFS_ops) {
2003238: c2 07 bf f8 ld [ %fp + -8 ], %g1
static inline void rtems_filesystem_eval_path_set_flags(
rtems_filesystem_eval_path_context_t *ctx,
int flags
)
{
ctx->flags = flags;
200323c: 84 10 20 60 mov 0x60, %g2
2003240: c4 27 bf b8 st %g2, [ %fp + -72 ]
2003244: 05 00 80 7e sethi %hi(0x201f800), %g2
2003248: 84 10 a0 58 or %g2, 0x58, %g2 ! 201f858 <IMFS_ops>
200324c: 80 a0 40 02 cmp %g1, %g2
2003250: 02 80 00 07 be 200326c <rtems_tarfs_load+0x58>
2003254: b8 10 00 18 mov %i0, %i4
2003258: 05 00 80 80 sethi %hi(0x2020000), %g2
200325c: 84 10 a1 c0 or %g2, 0x1c0, %g2 ! 20201c0 <fifoIMFS_ops>
2003260: 80 a0 40 02 cmp %g1, %g2
2003264: 12 80 00 46 bne 200337c <rtems_tarfs_load+0x168> <== ALWAYS TAKEN
2003268: b0 10 3f ff mov -1, %i0
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while ( rv == 0 ) {
if (offset + 512 > tar_size)
200326c: 80 a6 a1 ff cmp %i2, 0x1ff
2003270: 08 80 00 43 bleu 200337c <rtems_tarfs_load+0x168> <== NEVER TAKEN
2003274: b0 10 20 00 clr %i0
2003278: 82 10 22 00 mov 0x200, %g1
200327c: ae 10 20 00 clr %l7
2003280: c2 27 be 38 st %g1, [ %fp + -456 ]
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
2003284: 21 00 80 7e sethi %hi(0x201f800), %l0
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
2003288: 27 00 80 7f sethi %hi(0x201fc00), %l3
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
200328c: a0 14 20 e0 or %l0, 0xe0, %l0
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
2003290: ae 06 40 17 add %i1, %l7, %l7
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
2003294: 92 10 00 10 mov %l0, %o1
2003298: 90 05 e1 01 add %l7, 0x101, %o0
200329c: 94 10 20 05 mov 5, %o2
20032a0: 40 00 43 13 call 2013eec <strncmp>
20032a4: a4 10 22 00 mov 0x200, %l2
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
20032a8: b6 07 bf 40 add %fp, -192, %i3
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
20032ac: a6 14 e3 24 or %l3, 0x324, %l3
node = IMFS_create_node(
20032b0: 29 00 00 20 sethi %hi(0x8000), %l4
* - 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) {
strcpy(full_filename, mountpoint);
20032b4: a2 07 be 40 add %fp, -448, %l1
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
20032b8: 80 a2 20 00 cmp %o0, 0
20032bc: 12 80 00 2f bne 2003378 <rtems_tarfs_load+0x164> <== NEVER TAKEN
20032c0: aa 10 20 2f mov 0x2f, %l5
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
20032c4: 94 10 20 63 mov 0x63, %o2
20032c8: 92 10 00 17 mov %l7, %o1
20032cc: 40 00 43 5d call 2014040 <strncpy>
20032d0: 90 10 00 1b mov %i3, %o0
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
20032d4: c2 0d e0 9c ldub [ %l7 + 0x9c ], %g1
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
20032d8: 92 10 20 08 mov 8, %o1
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
20032dc: c2 2f be 3f stb %g1, [ %fp + -449 ]
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
20032e0: c0 2f bf a3 clrb [ %fp + -93 ]
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
20032e4: 40 00 23 e6 call 200c27c <_rtems_octal2ulong>
20032e8: 90 05 e0 64 add %l7, 0x64, %o0
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
20032ec: 92 10 20 0c mov 0xc, %o1
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);
20032f0: ac 10 00 08 mov %o0, %l6
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
20032f4: 40 00 23 e2 call 200c27c <_rtems_octal2ulong>
20032f8: 90 05 e0 7c add %l7, 0x7c, %o0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
20032fc: 92 10 20 08 mov 8, %o1
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);
2003300: b0 10 00 08 mov %o0, %i0
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
2003304: 40 00 23 de call 200c27c <_rtems_octal2ulong>
2003308: 90 05 e0 94 add %l7, 0x94, %o0
200330c: 82 10 00 08 mov %o0, %g1
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
2003310: 90 10 00 17 mov %l7, %o0
2003314: 40 00 25 2c call 200c7c4 <_rtems_tar_header_checksum>
2003318: c2 27 be 34 st %g1, [ %fp + -460 ]
200331c: c2 07 be 34 ld [ %fp + -460 ], %g1
2003320: 80 a2 00 01 cmp %o0, %g1
2003324: 12 80 00 15 bne 2003378 <rtems_tarfs_load+0x164> <== NEVER TAKEN
2003328: c2 0f be 3f ldub [ %fp + -449 ], %g1
* 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) {
200332c: 80 a0 60 35 cmp %g1, 0x35
2003330: 02 80 00 19 be 2003394 <rtems_tarfs_load+0x180>
2003334: 80 a0 60 30 cmp %g1, 0x30
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
}
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
2003338: 02 80 00 2b be 20033e4 <rtems_tarfs_load+0x1d0>
200333c: 01 00 00 00 nop
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while ( rv == 0 ) {
if (offset + 512 > tar_size)
2003340: c2 07 be 38 ld [ %fp + -456 ], %g1
2003344: a4 00 62 00 add %g1, 0x200, %l2
2003348: 80 a4 80 1a cmp %l2, %i2
200334c: 18 80 00 0b bgu 2003378 <rtems_tarfs_load+0x164> <== NEVER TAKEN
2003350: 92 10 00 10 mov %l0, %o1
2003354: ee 07 be 38 ld [ %fp + -456 ], %l7
2003358: e4 27 be 38 st %l2, [ %fp + -456 ]
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
200335c: ae 06 40 17 add %i1, %l7, %l7
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
2003360: 94 10 20 05 mov 5, %o2
2003364: 40 00 42 e2 call 2013eec <strncmp>
2003368: 90 05 e1 01 add %l7, 0x101, %o0
200336c: 80 a2 20 00 cmp %o0, 0
2003370: 02 bf ff d6 be 20032c8 <rtems_tarfs_load+0xb4>
2003374: 94 10 20 63 mov 0x63, %o2
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)
2003378: b0 10 20 00 clr %i0
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
rtems_filesystem_location_free( &rootloc );
200337c: 40 00 02 67 call 2003d18 <rtems_filesystem_location_free>
2003380: 90 07 bf e4 add %fp, -28, %o0
rtems_filesystem_eval_path_cleanup( &ctx );
2003384: 40 00 08 d6 call 20056dc <rtems_filesystem_eval_path_cleanup>
2003388: 90 07 bf a8 add %fp, -88, %o0
return rv;
}
200338c: 81 c7 e0 08 ret
2003390: 81 e8 00 00 restore
* - 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) {
strcpy(full_filename, mountpoint);
2003394: 92 10 00 1c mov %i4, %o1
2003398: 40 00 40 e0 call 2013718 <strcpy>
200339c: 90 10 00 11 mov %l1, %o0
if (full_filename[strlen(full_filename)-1] != '/')
20033a0: 40 00 42 a2 call 2013e28 <strlen>
20033a4: 90 10 00 11 mov %l1, %o0
20033a8: 82 07 80 08 add %fp, %o0, %g1
20033ac: c2 48 7e 3f ldsb [ %g1 + -449 ], %g1
20033b0: 80 a0 60 2f cmp %g1, 0x2f
20033b4: 02 80 00 05 be 20033c8 <rtems_tarfs_load+0x1b4> <== ALWAYS TAKEN
20033b8: 92 10 00 1b mov %i3, %o1
strcat(full_filename, "/");
20033bc: ea 2c 40 08 stb %l5, [ %l1 + %o0 ] <== NOT EXECUTED
20033c0: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED
20033c4: c0 2a 20 01 clrb [ %o0 + 1 ] <== NOT EXECUTED
strcat(full_filename, filename);
20033c8: 40 00 40 80 call 20135c8 <strcat>
20033cc: 90 10 00 11 mov %l1, %o0
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
20033d0: 90 10 00 11 mov %l1, %o0
20033d4: 40 00 04 86 call 20045ec <mkdir>
20033d8: 92 10 21 ff mov 0x1ff, %o1
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while ( rv == 0 ) {
if (offset + 512 > tar_size)
20033dc: 10 bf ff da b 2003344 <rtems_tarfs_load+0x130>
20033e0: c2 07 be 38 ld [ %fp + -456 ], %g1
}
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
rtems_filesystem_location_free( currentloc );
20033e4: 40 00 02 4d call 2003d18 <rtems_filesystem_location_free>
20033e8: 90 10 00 1d mov %i5, %o0
rtems_filesystem_location_clone( currentloc, &rootloc );
20033ec: 92 07 bf e4 add %fp, -28, %o1
20033f0: 40 00 01 7d call 20039e4 <rtems_filesystem_location_clone>
20033f4: 90 10 00 1d mov %i5, %o0
rtems_filesystem_eval_path_set_path(
20033f8: 40 00 42 8c call 2013e28 <strlen>
20033fc: 90 10 00 1b mov %i3, %o0
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
ctx->path = path;
2003400: f6 27 bf a8 st %i3, [ %fp + -88 ]
ctx->pathlen = pathlen;
2003404: d0 27 bf ac st %o0, [ %fp + -84 ]
&ctx,
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
2003408: 40 00 08 26 call 20054a0 <rtems_filesystem_eval_path_continue>
200340c: 90 07 bf a8 add %fp, -88, %o0
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
2003410: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2003414: 80 a0 40 13 cmp %g1, %l3
2003418: 02 80 00 0f be 2003454 <rtems_tarfs_load+0x240> <== NEVER TAKEN
200341c: d4 07 bf b0 ld [ %fp + -80 ], %o2
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
2003420: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
2003424: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
2003428: d6 07 bf b4 ld [ %fp + -76 ], %o3
200342c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1
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,
2003430: 98 0d a1 ff and %l6, 0x1ff, %o4
2003434: 90 10 00 1d mov %i5, %o0
2003438: 98 13 00 14 or %o4, %l4, %o4
200343c: 40 00 25 8a call 200ca64 <IMFS_create_node_with_control>
2003440: 9a 10 20 00 clr %o5
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
2003444: 82 06 40 12 add %i1, %l2, %g1
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;
2003448: c0 22 20 50 clr [ %o0 + 0x50 ]
200344c: f0 22 20 54 st %i0, [ %o0 + 0x54 ]
node->info.linearfile.direct = &tar_image[offset];
2003450: c2 22 20 58 st %g1, [ %o0 + 0x58 ]
}
nblocks = (((file_size) + 511) & ~511) / 512;
2003454: b0 06 21 ff add %i0, 0x1ff, %i0
offset += 512 * nblocks;
2003458: b0 0e 3e 00 and %i0, -512, %i0
200345c: b0 06 00 12 add %i0, %l2, %i0
2003460: 10 bf ff b8 b 2003340 <rtems_tarfs_load+0x12c>
2003464: f0 27 be 38 st %i0, [ %fp + -456 ]
0200f208 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200f208: 9d e3 bf a0 save %sp, -96, %sp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
200f20c: 80 a6 a0 00 cmp %i2, 0
200f210: 02 80 00 3b be 200f2fc <rtems_task_mode+0xf4>
200f214: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200f218: 21 00 80 75 sethi %hi(0x201d400), %l0
200f21c: a0 14 21 e0 or %l0, 0x1e0, %l0 ! 201d5e0 <_Per_CPU_Information>
200f220: fa 04 20 0c ld [ %l0 + 0xc ], %i5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f224: c4 0f 60 70 ldub [ %i5 + 0x70 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f228: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f22c: 80 a0 00 02 cmp %g0, %g2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200f230: f8 07 61 50 ld [ %i5 + 0x150 ], %i4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f234: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f238: 80 a0 60 00 cmp %g1, 0
200f23c: 12 80 00 40 bne 200f33c <rtems_task_mode+0x134>
200f240: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f244: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
200f248: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f24c: 7f ff f2 64 call 200bbdc <_CPU_ISR_Get_level>
200f250: a2 60 3f ff subx %g0, -1, %l1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f254: a3 2c 60 0a sll %l1, 0xa, %l1
200f258: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
200f25c: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f260: 80 8e 61 00 btst 0x100, %i1
200f264: 02 80 00 06 be 200f27c <rtems_task_mode+0x74>
200f268: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f26c: 82 0e 21 00 and %i0, 0x100, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
200f270: 80 a0 00 01 cmp %g0, %g1
200f274: 82 60 3f ff subx %g0, -1, %g1
200f278: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200f27c: 80 8e 62 00 btst 0x200, %i1
200f280: 12 80 00 21 bne 200f304 <rtems_task_mode+0xfc>
200f284: 80 8e 22 00 btst 0x200, %i0
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f288: 80 8e 60 0f btst 0xf, %i1
200f28c: 12 80 00 27 bne 200f328 <rtems_task_mode+0x120>
200f290: 01 00 00 00 nop
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f294: 80 8e 64 00 btst 0x400, %i1
200f298: 02 80 00 14 be 200f2e8 <rtems_task_mode+0xe0>
200f29c: 86 10 20 00 clr %g3
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f2a0: c4 0f 20 08 ldub [ %i4 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
200f2a4: b0 0e 24 00 and %i0, 0x400, %i0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
200f2a8: 80 a0 00 18 cmp %g0, %i0
200f2ac: 82 60 3f ff subx %g0, -1, %g1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f2b0: 80 a0 80 01 cmp %g2, %g1
200f2b4: 22 80 00 0e be,a 200f2ec <rtems_task_mode+0xe4>
200f2b8: 03 00 80 75 sethi %hi(0x201d400), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200f2bc: 7f ff cc ff call 20026b8 <sparc_disable_interrupts>
200f2c0: c2 2f 20 08 stb %g1, [ %i4 + 8 ]
_signals = information->signals_pending;
200f2c4: c4 07 20 18 ld [ %i4 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
200f2c8: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
information->signals_posted = _signals;
200f2cc: c4 27 20 14 st %g2, [ %i4 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200f2d0: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200f2d4: 7f ff cc fd call 20026c8 <sparc_enable_interrupts>
200f2d8: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200f2dc: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
200f2e0: 80 a0 00 01 cmp %g0, %g1
200f2e4: 86 40 20 00 addx %g0, 0, %g3
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
200f2e8: 03 00 80 75 sethi %hi(0x201d400), %g1
200f2ec: c4 00 61 08 ld [ %g1 + 0x108 ], %g2 ! 201d508 <_System_state_Current>
200f2f0: 80 a0 a0 03 cmp %g2, 3
200f2f4: 02 80 00 1f be 200f370 <rtems_task_mode+0x168>
200f2f8: 82 10 20 00 clr %g1
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
200f2fc: 81 c7 e0 08 ret
200f300: 91 e8 00 01 restore %g0, %g1, %o0
*/
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
200f304: 22 bf ff e1 be,a 200f288 <rtems_task_mode+0x80>
200f308: c0 27 60 78 clr [ %i5 + 0x78 ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f30c: 03 00 80 74 sethi %hi(0x201d000), %g1
200f310: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 201d314 <_Thread_Ticks_per_timeslice>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f314: 80 8e 60 0f btst 0xf, %i1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f318: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200f31c: 82 10 20 01 mov 1, %g1
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f320: 02 bf ff dd be 200f294 <rtems_task_mode+0x8c>
200f324: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
200f328: 90 0e 20 0f and %i0, 0xf, %o0
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200f32c: 7f ff cc e7 call 20026c8 <sparc_enable_interrupts>
200f330: 91 2a 20 08 sll %o0, 8, %o0
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f334: 10 bf ff d9 b 200f298 <rtems_task_mode+0x90>
200f338: 80 8e 64 00 btst 0x400, %i1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f33c: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
200f340: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f344: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f348: 7f ff f2 25 call 200bbdc <_CPU_ISR_Get_level>
200f34c: a2 60 3f ff subx %g0, -1, %l1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f350: a3 2c 60 0a sll %l1, 0xa, %l1
200f354: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
200f358: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f35c: 80 8e 61 00 btst 0x100, %i1
200f360: 02 bf ff c7 be 200f27c <rtems_task_mode+0x74>
200f364: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f368: 10 bf ff c2 b 200f270 <rtems_task_mode+0x68>
200f36c: 82 0e 21 00 and %i0, 0x100, %g1
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
200f370: 80 88 e0 ff btst 0xff, %g3
200f374: 12 80 00 0a bne 200f39c <rtems_task_mode+0x194>
200f378: c4 04 20 0c ld [ %l0 + 0xc ], %g2
200f37c: c6 04 20 10 ld [ %l0 + 0x10 ], %g3
200f380: 80 a0 80 03 cmp %g2, %g3
200f384: 02 bf ff de be 200f2fc <rtems_task_mode+0xf4>
200f388: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
200f38c: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
200f390: 80 a0 a0 00 cmp %g2, 0
200f394: 02 bf ff da be 200f2fc <rtems_task_mode+0xf4> <== NEVER TAKEN
200f398: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
200f39c: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
200f3a0: c2 2c 20 18 stb %g1, [ %l0 + 0x18 ]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
200f3a4: 7f ff ec a6 call 200a63c <_Thread_Dispatch>
200f3a8: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
200f3ac: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
200f3b0: 81 c7 e0 08 ret
200f3b4: 91 e8 00 01 restore %g0, %g1, %o0
0200c2e4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200c2e4: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200c2e8: 80 a6 60 00 cmp %i1, 0
200c2ec: 02 80 00 07 be 200c308 <rtems_task_set_priority+0x24>
200c2f0: 90 10 00 18 mov %i0, %o0
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 ) );
200c2f4: 03 00 80 82 sethi %hi(0x2020800), %g1
200c2f8: c2 08 61 64 ldub [ %g1 + 0x164 ], %g1 ! 2020964 <rtems_maximum_priority>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
200c2fc: 80 a6 40 01 cmp %i1, %g1
200c300: 18 80 00 1c bgu 200c370 <rtems_task_set_priority+0x8c>
200c304: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200c308: 80 a6 a0 00 cmp %i2, 0
200c30c: 02 80 00 19 be 200c370 <rtems_task_set_priority+0x8c>
200c310: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200c314: 40 00 0a 13 call 200eb60 <_Thread_Get>
200c318: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200c31c: c2 07 bf fc ld [ %fp + -4 ], %g1
200c320: 80 a0 60 00 cmp %g1, 0
200c324: 12 80 00 13 bne 200c370 <rtems_task_set_priority+0x8c>
200c328: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200c32c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200c330: 80 a6 60 00 cmp %i1, 0
200c334: 02 80 00 0d be 200c368 <rtems_task_set_priority+0x84>
200c338: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200c33c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200c340: 80 a0 60 00 cmp %g1, 0
200c344: 02 80 00 06 be 200c35c <rtems_task_set_priority+0x78>
200c348: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
200c34c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200c350: 80 a6 40 01 cmp %i1, %g1
200c354: 1a 80 00 05 bcc 200c368 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
200c358: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
200c35c: 92 10 00 19 mov %i1, %o1
200c360: 40 00 08 b6 call 200e638 <_Thread_Change_priority>
200c364: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200c368: 40 00 09 f1 call 200eb2c <_Thread_Enable_dispatch>
200c36c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
200c370: 81 c7 e0 08 ret
200c374: 81 e8 00 00 restore
0202da3c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
202da3c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
202da40: 80 a6 60 00 cmp %i1, 0
202da44: 02 80 00 1e be 202dabc <rtems_task_variable_delete+0x80>
202da48: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
202da4c: 90 10 00 18 mov %i0, %o0
202da50: 7f ff 8c 18 call 2010ab0 <_Thread_Get>
202da54: 92 07 bf fc add %fp, -4, %o1
switch (location) {
202da58: c2 07 bf fc ld [ %fp + -4 ], %g1
202da5c: 80 a0 60 00 cmp %g1, 0
202da60: 12 80 00 19 bne 202dac4 <rtems_task_variable_delete+0x88>
202da64: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
202da68: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
while (tvp) {
202da6c: 80 a0 60 00 cmp %g1, 0
202da70: 02 80 00 10 be 202dab0 <rtems_task_variable_delete+0x74>
202da74: 01 00 00 00 nop
if (tvp->ptr == ptr) {
202da78: c4 00 60 04 ld [ %g1 + 4 ], %g2
202da7c: 80 a0 80 19 cmp %g2, %i1
202da80: 32 80 00 09 bne,a 202daa4 <rtems_task_variable_delete+0x68>
202da84: d2 00 40 00 ld [ %g1 ], %o1
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
202da88: 10 80 00 18 b 202dae8 <rtems_task_variable_delete+0xac>
202da8c: c4 00 40 00 ld [ %g1 ], %g2
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
202da90: 80 a0 80 19 cmp %g2, %i1
202da94: 22 80 00 0e be,a 202dacc <rtems_task_variable_delete+0x90>
202da98: c4 02 40 00 ld [ %o1 ], %g2
202da9c: 82 10 00 09 mov %o1, %g1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
202daa0: d2 00 40 00 ld [ %g1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
202daa4: 80 a2 60 00 cmp %o1, 0
202daa8: 32 bf ff fa bne,a 202da90 <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
202daac: c4 02 60 04 ld [ %o1 + 4 ], %g2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
202dab0: 7f ff 8b f3 call 2010a7c <_Thread_Enable_dispatch>
202dab4: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
202dab8: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
202dabc: 81 c7 e0 08 ret
202dac0: 91 e8 00 01 restore %g0, %g1, %o0
202dac4: 81 c7 e0 08 ret
202dac8: 91 e8 00 01 restore %g0, %g1, %o0
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
202dacc: c4 20 40 00 st %g2, [ %g1 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
202dad0: 40 00 00 2d call 202db84 <_RTEMS_Tasks_Invoke_task_variable_dtor>
202dad4: 01 00 00 00 nop
_Thread_Enable_dispatch();
202dad8: 7f ff 8b e9 call 2010a7c <_Thread_Enable_dispatch>
202dadc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
202dae0: 10 bf ff f7 b 202dabc <rtems_task_variable_delete+0x80>
202dae4: 82 10 20 00 clr %g1 ! 0 <PROM_START>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
202dae8: 92 10 00 01 mov %g1, %o1
202daec: 10 bf ff f9 b 202dad0 <rtems_task_variable_delete+0x94>
202daf0: c4 22 21 5c st %g2, [ %o0 + 0x15c ]
0202daf4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
202daf4: 9d e3 bf 98 save %sp, -104, %sp
202daf8: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
202dafc: 80 a6 60 00 cmp %i1, 0
202db00: 02 80 00 1b be 202db6c <rtems_task_variable_get+0x78>
202db04: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !result )
202db08: 80 a6 a0 00 cmp %i2, 0
202db0c: 02 80 00 1c be 202db7c <rtems_task_variable_get+0x88>
202db10: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
202db14: 7f ff 8b e7 call 2010ab0 <_Thread_Get>
202db18: 92 07 bf fc add %fp, -4, %o1
switch (location) {
202db1c: c2 07 bf fc ld [ %fp + -4 ], %g1
202db20: 80 a0 60 00 cmp %g1, 0
202db24: 12 80 00 12 bne 202db6c <rtems_task_variable_get+0x78>
202db28: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
202db2c: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
while (tvp) {
202db30: 80 a0 60 00 cmp %g1, 0
202db34: 32 80 00 07 bne,a 202db50 <rtems_task_variable_get+0x5c>
202db38: c4 00 60 04 ld [ %g1 + 4 ], %g2
202db3c: 30 80 00 0e b,a 202db74 <rtems_task_variable_get+0x80>
202db40: 80 a0 60 00 cmp %g1, 0
202db44: 02 80 00 0c be 202db74 <rtems_task_variable_get+0x80> <== NEVER TAKEN
202db48: 01 00 00 00 nop
if (tvp->ptr == ptr) {
202db4c: c4 00 60 04 ld [ %g1 + 4 ], %g2
202db50: 80 a0 80 19 cmp %g2, %i1
202db54: 32 bf ff fb bne,a 202db40 <rtems_task_variable_get+0x4c>
202db58: c2 00 40 00 ld [ %g1 ], %g1
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
202db5c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
202db60: b0 10 20 00 clr %i0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
202db64: 7f ff 8b c6 call 2010a7c <_Thread_Enable_dispatch>
202db68: c2 26 80 00 st %g1, [ %i2 ]
return RTEMS_SUCCESSFUL;
202db6c: 81 c7 e0 08 ret
202db70: 81 e8 00 00 restore
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
202db74: 7f ff 8b c2 call 2010a7c <_Thread_Enable_dispatch>
202db78: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
202db7c: 81 c7 e0 08 ret
202db80: 81 e8 00 00 restore
02006748 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
2006748: 82 10 00 08 mov %o0, %g1
int baud_index;
switch (termios_baud) {
200674c: 80 a0 60 09 cmp %g1, 9
2006750: 02 80 00 2e be 2006808 <rtems_termios_baud_to_index+0xc0>
2006754: 90 10 20 09 mov 9, %o0
2006758: 80 a0 60 09 cmp %g1, 9
200675c: 08 80 00 1a bleu 20067c4 <rtems_termios_baud_to_index+0x7c>
2006760: 80 a0 60 04 cmp %g1, 4
2006764: 80 a0 60 0e cmp %g1, 0xe
2006768: 02 80 00 28 be 2006808 <rtems_termios_baud_to_index+0xc0>
200676c: 90 10 20 0e mov 0xe, %o0
2006770: 80 a0 60 0e cmp %g1, 0xe
2006774: 08 80 00 27 bleu 2006810 <rtems_termios_baud_to_index+0xc8>
2006778: 80 a0 60 0b cmp %g1, 0xb
200677c: 05 00 00 04 sethi %hi(0x1000), %g2
2006780: 86 10 a0 02 or %g2, 2, %g3 ! 1002 <PROM_START+0x1002>
2006784: 80 a0 40 03 cmp %g1, %g3
2006788: 02 80 00 20 be 2006808 <rtems_termios_baud_to_index+0xc0>
200678c: 90 10 20 11 mov 0x11, %o0
2006790: 80 a0 40 03 cmp %g1, %g3
2006794: 08 80 00 39 bleu 2006878 <rtems_termios_baud_to_index+0x130>
2006798: 80 a0 60 0f cmp %g1, 0xf
200679c: 86 10 a0 03 or %g2, 3, %g3
20067a0: 80 a0 40 03 cmp %g1, %g3
20067a4: 02 80 00 19 be 2006808 <rtems_termios_baud_to_index+0xc0>
20067a8: 90 10 20 12 mov 0x12, %o0
20067ac: 84 10 a0 04 or %g2, 4, %g2
20067b0: 80 a0 40 02 cmp %g1, %g2
20067b4: 02 80 00 15 be 2006808 <rtems_termios_baud_to_index+0xc0>
20067b8: 90 10 20 13 mov 0x13, %o0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
20067bc: 81 c3 e0 08 retl
20067c0: 90 10 3f ff mov -1, %o0
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
20067c4: 02 80 00 11 be 2006808 <rtems_termios_baud_to_index+0xc0>
20067c8: 90 10 20 04 mov 4, %o0
20067cc: 80 a0 60 04 cmp %g1, 4
20067d0: 08 80 00 1d bleu 2006844 <rtems_termios_baud_to_index+0xfc>
20067d4: 80 a0 60 01 cmp %g1, 1
20067d8: 80 a0 60 06 cmp %g1, 6
20067dc: 02 80 00 0b be 2006808 <rtems_termios_baud_to_index+0xc0>
20067e0: 90 10 20 06 mov 6, %o0
20067e4: 80 a0 60 06 cmp %g1, 6
20067e8: 0a 80 00 08 bcs 2006808 <rtems_termios_baud_to_index+0xc0>
20067ec: 90 10 20 05 mov 5, %o0
20067f0: 80 a0 60 07 cmp %g1, 7
20067f4: 02 80 00 05 be 2006808 <rtems_termios_baud_to_index+0xc0>
20067f8: 90 10 20 07 mov 7, %o0
20067fc: 80 a0 60 08 cmp %g1, 8
2006800: 12 bf ff ef bne 20067bc <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
2006804: 90 10 20 08 mov 8, %o0
2006808: 81 c3 e0 08 retl
200680c: 01 00 00 00 nop
2006810: 02 bf ff fe be 2006808 <rtems_termios_baud_to_index+0xc0>
2006814: 90 10 20 0b mov 0xb, %o0 ! b <PROM_START+0xb>
2006818: 80 a0 60 0b cmp %g1, 0xb
200681c: 0a bf ff fb bcs 2006808 <rtems_termios_baud_to_index+0xc0>
2006820: 90 10 20 0a mov 0xa, %o0
2006824: 80 a0 60 0c cmp %g1, 0xc
2006828: 02 bf ff f8 be 2006808 <rtems_termios_baud_to_index+0xc0>
200682c: 90 10 20 0c mov 0xc, %o0
2006830: 80 a0 60 0d cmp %g1, 0xd
2006834: 12 bf ff e2 bne 20067bc <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
2006838: 90 10 20 0d mov 0xd, %o0
200683c: 81 c3 e0 08 retl
2006840: 01 00 00 00 nop
2006844: 02 bf ff f1 be 2006808 <rtems_termios_baud_to_index+0xc0>
2006848: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
200684c: 80 a0 60 01 cmp %g1, 1
2006850: 0a bf ff ee bcs 2006808 <rtems_termios_baud_to_index+0xc0>
2006854: 90 10 20 00 clr %o0
2006858: 80 a0 60 02 cmp %g1, 2
200685c: 02 bf ff eb be 2006808 <rtems_termios_baud_to_index+0xc0>
2006860: 90 10 20 02 mov 2, %o0
2006864: 80 a0 60 03 cmp %g1, 3
2006868: 12 bf ff d5 bne 20067bc <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
200686c: 90 10 20 03 mov 3, %o0
2006870: 81 c3 e0 08 retl
2006874: 01 00 00 00 nop
2006878: 02 bf ff e4 be 2006808 <rtems_termios_baud_to_index+0xc0>
200687c: 90 10 20 0f mov 0xf, %o0 ! f <PROM_START+0xf>
2006880: 84 10 a0 01 or %g2, 1, %g2
2006884: 80 a0 40 02 cmp %g1, %g2
2006888: 12 bf ff cd bne 20067bc <rtems_termios_baud_to_index+0x74><== NEVER TAKEN
200688c: 90 10 20 10 mov 0x10, %o0
2006890: 81 c3 e0 08 retl
020059ec <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
20059ec: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
20059f0: 39 00 80 74 sethi %hi(0x201d000), %i4
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20059f4: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain(
20059f8: d0 07 22 80 ld [ %i4 + 0x280 ], %o0
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20059fc: fa 00 60 40 ld [ %g1 + 0x40 ], %i5
rtems_status_code sc;
sc = rtems_semaphore_obtain(
2005a00: 92 10 20 00 clr %o1
2005a04: 40 00 08 ca call 2007d2c <rtems_semaphore_obtain>
2005a08: 94 10 20 00 clr %o2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2005a0c: 80 a2 20 00 cmp %o0, 0
2005a10: 12 80 00 6f bne 2005bcc <rtems_termios_close+0x1e0> <== NEVER TAKEN
2005a14: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
2005a18: c2 07 60 08 ld [ %i5 + 8 ], %g1
2005a1c: 82 00 7f ff add %g1, -1, %g1
2005a20: 80 a0 60 00 cmp %g1, 0
2005a24: 12 80 00 39 bne 2005b08 <rtems_termios_close+0x11c>
2005a28: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2005a2c: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005a30: 03 00 80 73 sethi %hi(0x201cc00), %g1
2005a34: 85 28 a0 05 sll %g2, 5, %g2
2005a38: 82 10 62 cc or %g1, 0x2cc, %g1
2005a3c: 82 00 40 02 add %g1, %g2, %g1
2005a40: c2 00 60 04 ld [ %g1 + 4 ], %g1
2005a44: 80 a0 60 00 cmp %g1, 0
2005a48: 22 80 00 45 be,a 2005b5c <rtems_termios_close+0x170>
2005a4c: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2005a50: 9f c0 40 00 call %g1
2005a54: 90 10 00 1d mov %i5, %o0
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005a58: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2005a5c: 80 a0 60 02 cmp %g1, 2
2005a60: 22 80 00 50 be,a 2005ba0 <rtems_termios_close+0x1b4> <== NEVER TAKEN
2005a64: d0 07 60 c4 ld [ %i5 + 0xc4 ], %o0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
2005a68: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
2005a6c: 80 a0 60 00 cmp %g1, 0
2005a70: 22 80 00 07 be,a 2005a8c <rtems_termios_close+0xa0> <== ALWAYS TAKEN
2005a74: c2 07 40 00 ld [ %i5 ], %g1
(*tty->device.lastClose)(tty->major, tty->minor, arg);
2005a78: d0 07 60 0c ld [ %i5 + 0xc ], %o0 <== NOT EXECUTED
2005a7c: d2 07 60 10 ld [ %i5 + 0x10 ], %o1 <== NOT EXECUTED
2005a80: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005a84: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->forw == NULL) {
2005a88: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
2005a8c: 80 a0 60 00 cmp %g1, 0
2005a90: 02 80 00 2c be 2005b40 <rtems_termios_close+0x154>
2005a94: c4 07 60 04 ld [ %i5 + 4 ], %g2
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
2005a98: c4 20 60 04 st %g2, [ %g1 + 4 ]
2005a9c: c4 07 60 04 ld [ %i5 + 4 ], %g2
}
if (tty->back == NULL) {
2005aa0: 80 a0 a0 00 cmp %g2, 0
2005aa4: 22 80 00 22 be,a 2005b2c <rtems_termios_close+0x140> <== ALWAYS TAKEN
2005aa8: 05 00 80 74 sethi %hi(0x201d000), %g2
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
2005aac: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
2005ab0: 40 00 08 68 call 2007c50 <rtems_semaphore_delete>
2005ab4: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
rtems_semaphore_delete (tty->osem);
2005ab8: 40 00 08 66 call 2007c50 <rtems_semaphore_delete>
2005abc: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
2005ac0: 40 00 08 64 call 2007c50 <rtems_semaphore_delete>
2005ac4: d0 07 60 8c ld [ %i5 + 0x8c ], %o0
if ((tty->device.pollRead == NULL) ||
2005ac8: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
2005acc: 80 a0 60 00 cmp %g1, 0
2005ad0: 02 80 00 13 be 2005b1c <rtems_termios_close+0x130>
2005ad4: 01 00 00 00 nop
2005ad8: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2005adc: 80 a0 60 02 cmp %g1, 2
2005ae0: 02 80 00 0f be 2005b1c <rtems_termios_close+0x130>
2005ae4: 01 00 00 00 nop
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
2005ae8: 7f ff f7 55 call 200383c <free>
2005aec: d0 07 60 58 ld [ %i5 + 0x58 ], %o0
free (tty->rawOutBuf.theBuf);
2005af0: 7f ff f7 53 call 200383c <free>
2005af4: d0 07 60 7c ld [ %i5 + 0x7c ], %o0
free (tty->cbuf);
2005af8: 7f ff f7 51 call 200383c <free>
2005afc: d0 07 60 1c ld [ %i5 + 0x1c ], %o0
free (tty);
2005b00: 7f ff f7 4f call 200383c <free>
2005b04: 90 10 00 1d mov %i5, %o0
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2005b08: d0 07 22 80 ld [ %i4 + 0x280 ], %o0
2005b0c: 40 00 08 d2 call 2007e54 <rtems_semaphore_release>
2005b10: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2005b14: 81 c7 e0 08 ret
2005b18: 81 e8 00 00 restore
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
2005b1c: 40 00 08 4d call 2007c50 <rtems_semaphore_delete>
2005b20: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2005b24: 30 bf ff f1 b,a 2005ae8 <rtems_termios_close+0xfc>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
2005b28: 05 00 80 74 sethi %hi(0x201d000), %g2
if ( rtems_termios_ttyHead != NULL ) {
2005b2c: 80 a0 60 00 cmp %g1, 0
2005b30: 02 bf ff e0 be 2005ab0 <rtems_termios_close+0xc4>
2005b34: c2 20 a2 88 st %g1, [ %g2 + 0x288 ]
rtems_termios_ttyHead->back = NULL;
2005b38: 10 bf ff de b 2005ab0 <rtems_termios_close+0xc4>
2005b3c: c0 20 60 04 clr [ %g1 + 4 ]
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;
2005b40: 07 00 80 74 sethi %hi(0x201d000), %g3
if ( rtems_termios_ttyTail != NULL ) {
2005b44: 80 a0 a0 00 cmp %g2, 0
2005b48: 02 bf ff f8 be 2005b28 <rtems_termios_close+0x13c> <== ALWAYS TAKEN
2005b4c: c4 20 e2 84 st %g2, [ %g3 + 0x284 ]
rtems_termios_ttyTail->forw = NULL;
2005b50: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED
2005b54: 10 bf ff d6 b 2005aac <rtems_termios_close+0xc0> <== NOT EXECUTED
2005b58: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2005b5c: 92 10 20 00 clr %o1
2005b60: 40 00 08 73 call 2007d2c <rtems_semaphore_obtain>
2005b64: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL) {
2005b68: 80 a2 20 00 cmp %o0, 0
2005b6c: 12 80 00 18 bne 2005bcc <rtems_termios_close+0x1e0> <== NEVER TAKEN
2005b70: 01 00 00 00 nop
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2005b74: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2005b78: 80 a0 60 00 cmp %g1, 0
2005b7c: 12 80 00 16 bne 2005bd4 <rtems_termios_close+0x1e8>
2005b80: 01 00 00 00 nop
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);
2005b84: 40 00 08 b4 call 2007e54 <rtems_semaphore_release>
2005b88: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005b8c: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2005b90: 80 a0 60 02 cmp %g1, 2
2005b94: 32 bf ff b6 bne,a 2005a6c <rtems_termios_close+0x80>
2005b98: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
2005b9c: d0 07 60 c4 ld [ %i5 + 0xc4 ], %o0
2005ba0: 40 00 07 24 call 2007830 <rtems_event_send>
2005ba4: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
2005ba8: 80 a2 20 00 cmp %o0, 0
2005bac: 12 80 00 08 bne 2005bcc <rtems_termios_close+0x1e0> <== NEVER TAKEN
2005bb0: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
2005bb4: d0 07 60 c8 ld [ %i5 + 0xc8 ], %o0
2005bb8: 40 00 07 1e call 2007830 <rtems_event_send>
2005bbc: 92 10 20 01 mov 1, %o1
if (sc != RTEMS_SUCCESSFUL)
2005bc0: 80 a2 20 00 cmp %o0, 0
2005bc4: 22 bf ff aa be,a 2005a6c <rtems_termios_close+0x80> <== ALWAYS TAKEN
2005bc8: c2 07 60 9c ld [ %i5 + 0x9c ], %g1
rtems_fatal_error_occurred (sc);
2005bcc: 40 00 0a 1a call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
2005bd0: 01 00 00 00 nop <== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2005bd4: 7f ff fe 5d call 2005548 <drainOutput.part.0>
2005bd8: 90 10 00 1d mov %i5, %o0
2005bdc: 30 bf ff ea b,a 2005b84 <rtems_termios_close+0x198>
02007040 <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)
{
2007040: 9d e3 bf a0 save %sp, -96, %sp
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2007044: c4 06 20 90 ld [ %i0 + 0x90 ], %g2
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2007048: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
200704c: 84 00 80 19 add %g2, %i1, %g2
2007050: c4 26 20 90 st %g2, [ %i0 + 0x90 ]
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2007054: 80 a0 60 02 cmp %g1, 2
2007058: 02 80 00 10 be 2007098 <rtems_termios_dequeue_characters+0x58>
200705c: 90 10 00 18 mov %i0, %o0
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
2007060: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2007064: 80 a0 60 05 cmp %g1, 5
2007068: 02 80 00 04 be 2007078 <rtems_termios_dequeue_characters+0x38>
200706c: 03 00 80 73 sethi %hi(0x201cc00), %g1
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
2007070: 7f ff f8 9a call 20052d8 <rtems_termios_refill_transmitter>
2007074: 81 e8 00 00 restore
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2007078: c2 00 63 80 ld [ %g1 + 0x380 ], %g1
200707c: 80 a0 60 00 cmp %g1, 0
2007080: 02 80 00 04 be 2007090 <rtems_termios_dequeue_characters+0x50><== NEVER TAKEN
2007084: 01 00 00 00 nop
rtems_termios_linesw[tty->t_line].l_start(tty);
2007088: 9f c0 40 00 call %g1
200708c: 01 00 00 00 nop
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
2007090: 81 c7 e0 08 ret
2007094: 91 e8 20 00 restore %g0, 0, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
2007098: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
200709c: 40 00 01 e5 call 2007830 <rtems_event_send>
20070a0: 92 10 20 02 mov 2, %o1
if (sc != RTEMS_SUCCESSFUL)
20070a4: 80 a2 20 00 cmp %o0, 0
20070a8: 02 bf ff fa be 2007090 <rtems_termios_dequeue_characters+0x50><== ALWAYS TAKEN
20070ac: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
20070b0: 40 00 04 e1 call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
02006ca8 <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)
{
2006ca8: 9d e3 bf a0 save %sp, -96, %sp
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) {
2006cac: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
2006cb0: 39 00 80 73 sethi %hi(0x201cc00), %i4
2006cb4: 83 28 60 05 sll %g1, 5, %g1
2006cb8: b8 17 22 cc or %i4, 0x2cc, %i4
2006cbc: 82 07 00 01 add %i4, %g1, %g1
2006cc0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2006cc4: 80 a0 60 00 cmp %g1, 0
2006cc8: 02 80 00 27 be 2006d64 <rtems_termios_enqueue_raw_characters+0xbc>
2006ccc: ba 10 00 18 mov %i0, %i5
while (len--) {
2006cd0: 80 a6 a0 00 cmp %i2, 0
2006cd4: 22 80 00 10 be,a 2006d14 <rtems_termios_enqueue_raw_characters+0x6c><== NEVER TAKEN
2006cd8: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1 <== NOT EXECUTED
* 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)
2006cdc: b4 06 bf ff add %i2, -1, %i2
2006ce0: 10 80 00 06 b 2006cf8 <rtems_termios_enqueue_raw_characters+0x50>
2006ce4: b6 10 20 00 clr %i3
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--) {
2006ce8: b6 06 e0 01 inc %i3
2006cec: 83 28 60 05 sll %g1, 5, %g1
2006cf0: 82 07 00 01 add %i4, %g1, %g1
2006cf4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
2006cf8: d0 4e 40 1b ldsb [ %i1 + %i3 ], %o0
2006cfc: 9f c0 40 00 call %g1
2006d00: 92 10 00 1d mov %i5, %o1
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--) {
2006d04: 80 a6 c0 1a cmp %i3, %i2
2006d08: 32 bf ff f8 bne,a 2006ce8 <rtems_termios_enqueue_raw_characters+0x40>
2006d0c: c2 07 60 cc ld [ %i5 + 0xcc ], %g1
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2006d10: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1
2006d14: 80 a0 60 00 cmp %g1, 0
2006d18: 12 80 00 0b bne 2006d44 <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
2006d1c: b0 10 20 00 clr %i0
2006d20: c2 07 60 dc ld [ %i5 + 0xdc ], %g1
2006d24: 80 a0 60 00 cmp %g1, 0
2006d28: 02 80 00 0d be 2006d5c <rtems_termios_enqueue_raw_characters+0xb4>
2006d2c: 01 00 00 00 nop
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2006d30: d2 07 60 e0 ld [ %i5 + 0xe0 ], %o1
2006d34: 9f c0 40 00 call %g1
2006d38: 90 07 60 30 add %i5, 0x30, %o0
tty->tty_rcvwakeup = 1;
2006d3c: 82 10 20 01 mov 1, %g1
2006d40: c2 27 60 e4 st %g1, [ %i5 + 0xe4 ]
2006d44: 81 c7 e0 08 ret
2006d48: 81 e8 00 00 restore
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2006d4c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
}
}
}
}
tty->rawInBufDropped += dropped;
2006d50: 82 00 40 18 add %g1, %i0, %g1
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2006d54: 40 00 04 40 call 2007e54 <rtems_semaphore_release>
2006d58: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
return dropped;
}
2006d5c: 81 c7 e0 08 ret
2006d60: 81 e8 00 00 restore
* 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)
2006d64: b4 06 40 1a add %i1, %i2, %i2
2006d68: a0 10 20 00 clr %l0
2006d6c: b0 10 20 00 clr %i0
/*
* 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);
2006d70: a4 07 60 30 add %i5, 0x30, %l2
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;
(*tty->device.write)(tty->minor,
2006d74: a6 07 60 4a add %i5, 0x4a, %l3
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2006d78: 80 a6 40 1a cmp %i1, %i2
2006d7c: 22 bf ff f4 be,a 2006d4c <rtems_termios_enqueue_raw_characters+0xa4>
2006d80: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2006d84: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
}
return 0;
}
while (len--) {
c = *buf++;
2006d88: f8 0e 40 00 ldub [ %i1 ], %i4
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
2006d8c: 80 88 62 00 btst 0x200, %g1
2006d90: 02 80 00 0b be 2006dbc <rtems_termios_enqueue_raw_characters+0x114>
2006d94: b2 06 60 01 inc %i1
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
2006d98: c4 0f 60 4a ldub [ %i5 + 0x4a ], %g2
2006d9c: 83 2f 20 18 sll %i4, 0x18, %g1
2006da0: 83 38 60 18 sra %g1, 0x18, %g1
2006da4: 80 a0 40 02 cmp %g1, %g2
2006da8: 02 80 00 54 be 2006ef8 <rtems_termios_enqueue_raw_characters+0x250>
2006dac: c4 0f 60 49 ldub [ %i5 + 0x49 ], %g2
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
2006db0: 80 a0 40 02 cmp %g1, %g2
2006db4: 02 80 00 59 be 2006f18 <rtems_termios_enqueue_raw_characters+0x270><== NEVER TAKEN
2006db8: 01 00 00 00 nop
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
2006dbc: 80 8c 20 ff btst 0xff, %l0
2006dc0: 02 80 00 15 be 2006e14 <rtems_termios_enqueue_raw_characters+0x16c><== ALWAYS TAKEN
2006dc4: 01 00 00 00 nop
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
2006dc8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2006dcc: 82 08 60 30 and %g1, 0x30, %g1
2006dd0: 80 a0 60 20 cmp %g1, 0x20
2006dd4: 12 bf ff ea bne 2006d7c <rtems_termios_enqueue_raw_characters+0xd4><== ALWAYS TAKEN
2006dd8: 80 a6 40 1a cmp %i1, %i2
/* disable interrupts */
rtems_interrupt_disable(level);
2006ddc: 7f ff ee 37 call 20026b8 <sparc_disable_interrupts> <== NOT EXECUTED
2006de0: 01 00 00 00 nop <== NOT EXECUTED
2006de4: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
2006de8: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2006dec: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
2006df0: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
2006df4: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2006df8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006dfc: 12 80 00 4f bne 2006f38 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
2006e00: 01 00 00 00 nop <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2006e04: 7f ff ee 31 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
2006e08: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2006e0c: 10 bf ff dc b 2006d7c <rtems_termios_enqueue_raw_characters+0xd4><== NOT EXECUTED
2006e10: 80 a6 40 1a cmp %i1, %i2 <== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
2006e14: d0 07 60 60 ld [ %i5 + 0x60 ], %o0
2006e18: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
2006e1c: 40 00 46 ed call 20189d0 <.urem>
2006e20: 90 02 20 01 inc %o0
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
2006e24: 7f ff ee 25 call 20026b8 <sparc_disable_interrupts>
2006e28: b6 10 00 08 mov %o0, %i3
2006e2c: a2 10 00 08 mov %o0, %l1
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2006e30: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
2006e34: d0 07 60 64 ld [ %i5 + 0x64 ], %o0
% tty->rawInBuf.Size) > tty->highwater) &&
2006e38: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
}
} 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)
2006e3c: 90 22 00 01 sub %o0, %g1, %o0
% tty->rawInBuf.Size) > tty->highwater) &&
2006e40: 40 00 46 e4 call 20189d0 <.urem>
2006e44: 90 02 00 1b add %o0, %i3, %o0
}
} 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)
2006e48: c2 07 60 c0 ld [ %i5 + 0xc0 ], %g1
2006e4c: 80 a2 00 01 cmp %o0, %g1
2006e50: 08 80 00 13 bleu 2006e9c <rtems_termios_enqueue_raw_characters+0x1f4><== ALWAYS TAKEN
2006e54: 01 00 00 00 nop
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
2006e58: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== 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) &&
2006e5c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2006e60: 12 80 00 0f bne 2006e9c <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2006e64: 01 00 00 00 nop <== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
2006e68: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2006e6c: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
2006e70: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2006e74: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2006e78: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED
2006e7c: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
2006e80: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== 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))
2006e84: 02 80 00 35 be 2006f58 <rtems_termios_enqueue_raw_characters+0x2b0><== NOT EXECUTED
2006e88: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
2006e8c: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED
2006e90: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED
2006e94: 02 80 00 40 be 2006f94 <rtems_termios_enqueue_raw_characters+0x2ec><== NOT EXECUTED
2006e98: 01 00 00 00 nop <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2006e9c: 7f ff ee 0b call 20026c8 <sparc_enable_interrupts>
2006ea0: 90 10 00 11 mov %l1, %o0
if (newTail == tty->rawInBuf.Head) {
2006ea4: c2 07 60 5c ld [ %i5 + 0x5c ], %g1
2006ea8: 80 a0 40 1b cmp %g1, %i3
2006eac: 22 bf ff b3 be,a 2006d78 <rtems_termios_enqueue_raw_characters+0xd0><== NEVER TAKEN
2006eb0: b0 06 20 01 inc %i0 <== NOT EXECUTED
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
2006eb4: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
2006eb8: f8 28 40 1b stb %i4, [ %g1 + %i3 ]
tty->rawInBuf.Tail = newTail;
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2006ebc: c2 07 60 e4 ld [ %i5 + 0xe4 ], %g1
if (newTail == tty->rawInBuf.Head) {
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
2006ec0: f6 27 60 60 st %i3, [ %i5 + 0x60 ]
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
2006ec4: 80 a0 60 00 cmp %g1, 0
2006ec8: 12 bf ff ad bne 2006d7c <rtems_termios_enqueue_raw_characters+0xd4><== NEVER TAKEN
2006ecc: 80 a6 40 1a cmp %i1, %i2
2006ed0: c2 07 60 dc ld [ %i5 + 0xdc ], %g1
2006ed4: 80 a0 60 00 cmp %g1, 0
2006ed8: 02 bf ff a9 be 2006d7c <rtems_termios_enqueue_raw_characters+0xd4><== ALWAYS TAKEN
2006edc: 80 a6 40 1a cmp %i1, %i2
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2006ee0: d2 07 60 e0 ld [ %i5 + 0xe0 ], %o1 <== NOT EXECUTED
2006ee4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006ee8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2006eec: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2006ef0: 10 bf ff a2 b 2006d78 <rtems_termios_enqueue_raw_characters+0xd0><== NOT EXECUTED
2006ef4: c2 27 60 e4 st %g1, [ %i5 + 0xe4 ] <== NOT EXECUTED
/* 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]) {
2006ef8: 80 a0 40 02 cmp %g1, %g2
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2006efc: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
/* 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]) {
2006f00: 22 80 00 0b be,a 2006f2c <rtems_termios_enqueue_raw_characters+0x284><== NEVER TAKEN
2006f04: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
2006f08: 82 10 60 10 or %g1, 0x10, %g1
* 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)
2006f0c: a0 10 20 01 mov 1, %l0
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
2006f10: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
2006f14: 30 bf ff ad b,a 2006dc8 <rtems_termios_enqueue_raw_characters+0x120>
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
2006f18: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
* 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)
2006f1c: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
2006f20: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED
2006f24: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
2006f28: 30 bf ff a8 b,a 2006dc8 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
* 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)
2006f2c: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
/* 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]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2006f30: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
2006f34: 30 bf ff a5 b,a 2006dc8 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
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)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
2006f38: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== 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)(
2006f3c: d2 07 60 7c ld [ %i5 + 0x7c ], %o1 <== NOT EXECUTED
2006f40: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2006f44: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2006f48: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2006f4c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006f50: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2006f54: 30 bf ff ac b,a 2006e04 <rtems_termios_enqueue_raw_characters+0x15c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
2006f58: 12 80 00 06 bne 2006f70 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
2006f5c: 01 00 00 00 nop <== NOT EXECUTED
2006f60: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
2006f64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006f68: 12 bf ff cd bne 2006e9c <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2006f6c: 01 00 00 00 nop <== 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;
2006f70: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2006f74: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2006f78: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== 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;
2006f7c: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2006f80: 92 10 00 13 mov %l3, %o1 <== 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;
2006f84: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2006f88: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006f8c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2006f90: 30 bf ff c3 b,a 2006e9c <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2006f94: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2006f98: c2 07 60 ac ld [ %i5 + 0xac ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2006f9c: 84 10 a0 04 or %g2, 4, %g2 <== NOT EXECUTED
2006fa0: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2006fa4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006fa8: 02 bf ff bd be 2006e9c <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
2006fac: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
2006fb0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006fb4: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2006fb8: 30 bf ff b9 b,a 2006e9c <rtems_termios_enqueue_raw_characters+0x1f4><== NOT EXECUTED
02005c00 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
2005c00: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005c04: c2 06 00 00 ld [ %i0 ], %g1
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
2005c08: f6 06 20 08 ld [ %i0 + 8 ], %i3
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2005c0c: fa 00 60 40 ld [ %g1 + 0x40 ], %i5
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);
2005c10: 92 10 20 00 clr %o1
2005c14: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
2005c18: 94 10 20 00 clr %o2
2005c1c: 40 00 08 44 call 2007d2c <rtems_semaphore_obtain>
2005c20: c0 26 20 0c clr [ %i0 + 0xc ]
if (sc != RTEMS_SUCCESSFUL) {
2005c24: b8 92 20 00 orcc %o0, 0, %i4
2005c28: 12 80 00 19 bne 2005c8c <rtems_termios_ioctl+0x8c> <== NEVER TAKEN
2005c2c: 01 00 00 00 nop
return sc;
}
switch (args->command) {
2005c30: c2 06 20 04 ld [ %i0 + 4 ], %g1
2005c34: 80 a0 60 04 cmp %g1, 4
2005c38: 22 80 00 10 be,a 2005c78 <rtems_termios_ioctl+0x78>
2005c3c: c2 06 c0 00 ld [ %i3 ], %g1
2005c40: 18 80 00 15 bgu 2005c94 <rtems_termios_ioctl+0x94>
2005c44: 05 10 01 19 sethi %hi(0x40046400), %g2
2005c48: 80 a0 60 02 cmp %g1, 2
2005c4c: 22 80 00 29 be,a 2005cf0 <rtems_termios_ioctl+0xf0>
2005c50: d2 06 20 08 ld [ %i0 + 8 ], %o1
2005c54: 08 80 00 98 bleu 2005eb4 <rtems_termios_ioctl+0x2b4>
2005c58: 80 a0 60 01 cmp %g1, 1
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2005c5c: c2 07 60 b4 ld [ %i5 + 0xb4 ], %g1
2005c60: 80 a0 60 00 cmp %g1, 0
2005c64: 02 80 00 08 be 2005c84 <rtems_termios_ioctl+0x84> <== ALWAYS TAKEN
2005c68: 01 00 00 00 nop
2005c6c: 7f ff fe 37 call 2005548 <drainOutput.part.0> <== NOT EXECUTED
2005c70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2005c74: 30 80 00 04 b,a 2005c84 <rtems_termios_ioctl+0x84> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
2005c78: c2 27 60 dc st %g1, [ %i5 + 0xdc ]
2005c7c: c2 06 e0 04 ld [ %i3 + 4 ], %g1
2005c80: c2 27 60 e0 st %g1, [ %i5 + 0xe0 ]
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
2005c84: 40 00 08 74 call 2007e54 <rtems_semaphore_release>
2005c88: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
return sc;
}
2005c8c: 81 c7 e0 08 ret
2005c90: 91 e8 00 1c restore %g0, %i4, %o0
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
2005c94: 84 10 a2 7f or %g2, 0x27f, %g2
2005c98: 80 a0 40 02 cmp %g1, %g2
2005c9c: 02 80 00 7a be 2005e84 <rtems_termios_ioctl+0x284> <== NEVER TAKEN
2005ca0: 01 00 00 00 nop
2005ca4: 18 80 00 8b bgu 2005ed0 <rtems_termios_ioctl+0x2d0>
2005ca8: 05 10 01 1d sethi %hi(0x40047400), %g2
2005cac: 80 a0 60 05 cmp %g1, 5
2005cb0: 22 80 00 ac be,a 2005f60 <rtems_termios_ioctl+0x360>
2005cb4: c2 06 c0 00 ld [ %i3 ], %g1
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
2005cb8: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005cbc: 03 00 80 73 sethi %hi(0x201cc00), %g1
2005cc0: 85 28 a0 05 sll %g2, 5, %g2
2005cc4: 82 10 62 cc or %g1, 0x2cc, %g1
2005cc8: 82 00 40 02 add %g1, %g2, %g1
2005ccc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
2005cd0: 80 a0 60 00 cmp %g1, 0
2005cd4: 02 bf ff ec be 2005c84 <rtems_termios_ioctl+0x84>
2005cd8: b8 10 20 0a mov 0xa, %i4
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
2005cdc: 90 10 00 1d mov %i5, %o0
2005ce0: 9f c0 40 00 call %g1
2005ce4: 92 10 00 18 mov %i0, %o1
2005ce8: 10 bf ff e7 b 2005c84 <rtems_termios_ioctl+0x84>
2005cec: b8 10 00 08 mov %o0, %i4
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
2005cf0: b6 07 60 30 add %i5, 0x30, %i3
2005cf4: 94 10 20 24 mov 0x24, %o2
2005cf8: 40 00 28 fe call 20100f0 <memcpy>
2005cfc: 90 10 00 1b mov %i3, %o0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2005d00: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d04: 80 88 62 00 btst 0x200, %g1
2005d08: 02 80 00 19 be 2005d6c <rtems_termios_ioctl+0x16c>
2005d0c: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
2005d10: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
2005d14: 80 88 64 00 btst 0x400, %g1
2005d18: 12 80 00 15 bne 2005d6c <rtems_termios_ioctl+0x16c>
2005d1c: 01 00 00 00 nop
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
2005d20: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d24: 82 08 7d ef and %g1, -529, %g1
2005d28: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
2005d2c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d30: 80 88 60 20 btst 0x20, %g1
2005d34: 02 80 00 0e be 2005d6c <rtems_termios_ioctl+0x16c> <== ALWAYS TAKEN
2005d38: 01 00 00 00 nop
/* disable interrupts */
rtems_interrupt_disable(level);
2005d3c: 7f ff f2 5f call 20026b8 <sparc_disable_interrupts> <== NOT EXECUTED
2005d40: 01 00 00 00 nop <== NOT EXECUTED
2005d44: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
2005d48: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2005d4c: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
2005d50: 84 08 bf df and %g2, -33, %g2 <== NOT EXECUTED
2005d54: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2005d58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005d5c: 12 80 00 a4 bne 2005fec <rtems_termios_ioctl+0x3ec> <== NOT EXECUTED
2005d60: 01 00 00 00 nop <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2005d64: 7f ff f2 59 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
2005d68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
2005d6c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d70: 80 88 64 00 btst 0x400, %g1
2005d74: 02 80 00 0c be 2005da4 <rtems_termios_ioctl+0x1a4>
2005d78: 03 00 00 04 sethi %hi(0x1000), %g1
2005d7c: c4 07 60 30 ld [ %i5 + 0x30 ], %g2
2005d80: 80 88 80 01 btst %g2, %g1
2005d84: 12 80 00 08 bne 2005da4 <rtems_termios_ioctl+0x1a4> <== NEVER TAKEN
2005d88: 01 00 00 00 nop
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
2005d8c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d90: 82 08 7b ff and %g1, -1025, %g1
2005d94: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
2005d98: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005d9c: 82 08 7f fd and %g1, -3, %g1
2005da0: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
2005da4: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005da8: 80 88 61 00 btst 0x100, %g1
2005dac: 02 80 00 16 be 2005e04 <rtems_termios_ioctl+0x204> <== ALWAYS TAKEN
2005db0: c4 07 60 38 ld [ %i5 + 0x38 ], %g2
2005db4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2005db8: 06 80 00 82 bl 2005fc0 <rtems_termios_ioctl+0x3c0> <== NOT EXECUTED
2005dbc: 01 00 00 00 nop <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
2005dc0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2005dc4: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
2005dc8: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
2005dcc: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2005dd0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED
2005dd4: 02 80 00 09 be 2005df8 <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
2005dd8: 01 00 00 00 nop <== NOT EXECUTED
2005ddc: c2 07 60 b0 ld [ %i5 + 0xb0 ], %g1 <== NOT EXECUTED
2005de0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005de4: 02 80 00 05 be 2005df8 <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
2005de8: 01 00 00 00 nop <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2005dec: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005df0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2005df4: c4 07 60 38 ld [ %i5 + 0x38 ], %g2 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
2005df8: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2005dfc: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
2005e00: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== 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) {
2005e04: 80 a0 a0 00 cmp %g2, 0
2005e08: 06 80 00 6e bl 2005fc0 <rtems_termios_ioctl+0x3c0> <== NEVER TAKEN
2005e0c: 01 00 00 00 nop
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
2005e10: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2005e14: 05 00 00 04 sethi %hi(0x1000), %g2
2005e18: 80 88 40 02 btst %g1, %g2
2005e1c: 02 80 00 06 be 2005e34 <rtems_termios_ioctl+0x234>
2005e20: 80 88 64 00 btst 0x400, %g1
tty->flow_ctrl |= FL_MDXOF;
2005e24: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2
2005e28: 84 10 a4 00 or %g2, 0x400, %g2
2005e2c: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ]
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
2005e30: 80 88 64 00 btst 0x400, %g1
2005e34: 22 80 00 06 be,a 2005e4c <rtems_termios_ioctl+0x24c>
2005e38: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
tty->flow_ctrl |= FL_MDXON;
2005e3c: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005e40: 82 10 62 00 or %g1, 0x200, %g1
2005e44: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
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) {
2005e48: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
2005e4c: 80 88 60 02 btst 2, %g1
2005e50: 02 80 00 48 be 2005f70 <rtems_termios_ioctl+0x370>
2005e54: 01 00 00 00 nop
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2005e58: c0 27 60 6c clr [ %i5 + 0x6c ]
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
2005e5c: c0 27 60 70 clr [ %i5 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
2005e60: c0 27 60 74 clr [ %i5 + 0x74 ]
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
2005e64: c2 07 60 a8 ld [ %i5 + 0xa8 ], %g1
2005e68: 80 a0 60 00 cmp %g1, 0
2005e6c: 02 bf ff 86 be 2005c84 <rtems_termios_ioctl+0x84>
2005e70: 01 00 00 00 nop
(*tty->device.setAttributes)(tty->minor, &tty->termios);
2005e74: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
2005e78: 9f c0 40 00 call %g1
2005e7c: 92 10 00 1b mov %i3, %o1
2005e80: 30 bf ff 81 b,a 2005c84 <rtems_termios_ioctl+0x84>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
2005e84: c4 07 60 60 ld [ %i5 + 0x60 ], %g2 <== NOT EXECUTED
2005e88: c2 07 60 5c ld [ %i5 + 0x5c ], %g1 <== NOT EXECUTED
if ( rawnc < 0 )
2005e8c: 82 a0 80 01 subcc %g2, %g1, %g1 <== NOT EXECUTED
2005e90: 0c 80 00 49 bneg 2005fb4 <rtems_termios_ioctl+0x3b4> <== NOT EXECUTED
2005e94: 01 00 00 00 nop <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
2005e98: c8 07 60 20 ld [ %i5 + 0x20 ], %g4 <== NOT EXECUTED
2005e9c: c4 07 60 24 ld [ %i5 + 0x24 ], %g2 <== NOT EXECUTED
2005ea0: c6 06 20 08 ld [ %i0 + 8 ], %g3 <== NOT EXECUTED
2005ea4: 84 21 00 02 sub %g4, %g2, %g2 <== NOT EXECUTED
2005ea8: 82 00 80 01 add %g2, %g1, %g1 <== NOT EXECUTED
}
break;
2005eac: 10 bf ff 76 b 2005c84 <rtems_termios_ioctl+0x84> <== NOT EXECUTED
2005eb0: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
2005eb4: 32 bf ff 82 bne,a 2005cbc <rtems_termios_ioctl+0xbc> <== NEVER TAKEN
2005eb8: c4 07 60 cc ld [ %i5 + 0xcc ], %g2 <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
2005ebc: d0 06 20 08 ld [ %i0 + 8 ], %o0
2005ec0: 92 07 60 30 add %i5, 0x30, %o1
2005ec4: 40 00 28 8b call 20100f0 <memcpy>
2005ec8: 94 10 20 24 mov 0x24, %o2
break;
2005ecc: 30 bf ff 6e b,a 2005c84 <rtems_termios_ioctl+0x84>
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
switch (args->command) {
2005ed0: 84 10 a0 1a or %g2, 0x1a, %g2
2005ed4: 80 a0 40 02 cmp %g1, %g2
2005ed8: 02 80 00 1e be 2005f50 <rtems_termios_ioctl+0x350>
2005edc: 05 20 01 1d sethi %hi(0x80047400), %g2
2005ee0: 84 10 a0 1b or %g2, 0x1b, %g2 ! 8004741b <RAM_END+0x7dc4741b>
2005ee4: 80 a0 40 02 cmp %g1, %g2
2005ee8: 32 bf ff 75 bne,a 2005cbc <rtems_termios_ioctl+0xbc> <== NEVER TAKEN
2005eec: c4 07 60 cc ld [ %i5 + 0xcc ], %g2 <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
2005ef0: c2 07 60 cc ld [ %i5 + 0xcc ], %g1
2005ef4: 37 00 80 73 sethi %hi(0x201cc00), %i3
2005ef8: 83 28 60 05 sll %g1, 5, %g1
2005efc: b6 16 e2 cc or %i3, 0x2cc, %i3
2005f00: 82 06 c0 01 add %i3, %g1, %g1
2005f04: c2 00 60 04 ld [ %g1 + 4 ], %g1
2005f08: 80 a0 60 00 cmp %g1, 0
2005f0c: 22 80 00 06 be,a 2005f24 <rtems_termios_ioctl+0x324>
2005f10: c2 06 20 08 ld [ %i0 + 8 ], %g1
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
2005f14: 9f c0 40 00 call %g1
2005f18: 90 10 00 1d mov %i5, %o0
2005f1c: b8 10 00 08 mov %o0, %i4
}
tty->t_line=*(int*)(args->buffer);
2005f20: c2 06 20 08 ld [ %i0 + 8 ], %g1
2005f24: c4 00 40 00 ld [ %g1 ], %g2
tty->t_sc = NULL; /* ensure that no more valid data */
2005f28: c0 27 60 d0 clr [ %i5 + 0xd0 ]
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
2005f2c: 83 28 a0 05 sll %g2, 5, %g1
2005f30: c2 06 c0 01 ld [ %i3 + %g1 ], %g1
2005f34: 80 a0 60 00 cmp %g1, 0
2005f38: 02 bf ff 53 be 2005c84 <rtems_termios_ioctl+0x84>
2005f3c: c4 27 60 cc st %g2, [ %i5 + 0xcc ]
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
2005f40: 9f c0 40 00 call %g1
2005f44: 90 10 00 1d mov %i5, %o0
2005f48: 10 bf ff 4f b 2005c84 <rtems_termios_ioctl+0x84>
2005f4c: b8 10 00 08 mov %o0, %i4
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
2005f50: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
2005f54: c2 06 20 08 ld [ %i0 + 8 ], %g1
break;
2005f58: 10 bf ff 4b b 2005c84 <rtems_termios_ioctl+0x84>
2005f5c: c4 20 40 00 st %g2, [ %g1 ]
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
2005f60: c2 27 60 d4 st %g1, [ %i5 + 0xd4 ]
2005f64: c2 06 e0 04 ld [ %i3 + 4 ], %g1
break;
2005f68: 10 bf ff 47 b 2005c84 <rtems_termios_ioctl+0x84>
2005f6c: c2 27 60 d8 st %g1, [ %i5 + 0xd8 ]
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
2005f70: 40 00 05 a2 call 20075f8 <rtems_clock_get_ticks_per_second>
2005f74: f0 0f 60 46 ldub [ %i5 + 0x46 ], %i0
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] *
2005f78: 40 00 49 b0 call 2018638 <.umul>
2005f7c: 92 10 00 18 mov %i0, %o1
rtems_clock_get_ticks_per_second() / 10;
2005f80: 40 00 49 e8 call 2018720 <.udiv>
2005f84: 92 10 20 0a mov 0xa, %o1
if (tty->termios.c_cc[VTIME]) {
2005f88: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
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] *
2005f8c: d0 27 60 54 st %o0, [ %i5 + 0x54 ]
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
2005f90: 80 a0 60 00 cmp %g1, 0
2005f94: 02 80 00 10 be 2005fd4 <rtems_termios_ioctl+0x3d4>
2005f98: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
2005f9c: c0 27 60 6c clr [ %i5 + 0x6c ]
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2005fa0: 80 a0 60 00 cmp %g1, 0
2005fa4: 12 bf ff af bne 2005e60 <rtems_termios_ioctl+0x260>
2005fa8: d0 27 60 70 st %o0, [ %i5 + 0x70 ]
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
2005fac: 10 bf ff ae b 2005e64 <rtems_termios_ioctl+0x264>
2005fb0: d0 27 60 74 st %o0, [ %i5 + 0x74 ]
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
2005fb4: c4 07 60 64 ld [ %i5 + 0x64 ], %g2 <== NOT EXECUTED
2005fb8: 10 bf ff b8 b 2005e98 <rtems_termios_ioctl+0x298> <== NOT EXECUTED
2005fbc: 82 00 40 02 add %g1, %g2, %g1 <== 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) {
tty->flow_ctrl |= FL_MDRTS;
2005fc0: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2005fc4: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED
2005fc8: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
2005fcc: 10 bf ff 92 b 2005e14 <rtems_termios_ioctl+0x214> <== NOT EXECUTED
2005fd0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
2005fd4: 80 a0 60 00 cmp %g1, 0
2005fd8: 32 bf ff a1 bne,a 2005e5c <rtems_termios_ioctl+0x25c> <== NEVER TAKEN
2005fdc: c0 27 60 6c clr [ %i5 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
2005fe0: 82 10 20 01 mov 1, %g1
2005fe4: 10 bf ff a0 b 2005e64 <rtems_termios_ioctl+0x264>
2005fe8: c2 27 60 6c st %g1, [ %i5 + 0x6c ]
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)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2005fec: c4 07 60 84 ld [ %i5 + 0x84 ], %g2 <== 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)(
2005ff0: d2 07 60 7c ld [ %i5 + 0x7c ], %o1 <== NOT EXECUTED
2005ff4: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2005ff8: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2005ffc: 92 02 40 02 add %o1, %g2, %o1 <== NOT EXECUTED
2006000: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006004: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2006008: 30 bf ff 57 b,a 2005d64 <rtems_termios_ioctl+0x164> <== NOT EXECUTED
020055c4 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
20055c4: 9d e3 bf a0 save %sp, -96, %sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
20055c8: 39 00 80 74 sethi %hi(0x201d000), %i4
20055cc: d0 07 22 80 ld [ %i4 + 0x280 ], %o0 ! 201d280 <rtems_termios_ttyMutex>
20055d0: 92 10 20 00 clr %o1
20055d4: 40 00 09 d6 call 2007d2c <rtems_semaphore_obtain>
20055d8: 94 10 20 00 clr %o2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20055dc: ba 92 20 00 orcc %o0, 0, %i5
20055e0: 12 80 00 27 bne 200567c <rtems_termios_open+0xb8> <== NEVER TAKEN
20055e4: 25 00 80 74 sethi %hi(0x201d000), %l2
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
20055e8: e2 04 a2 88 ld [ %l2 + 0x288 ], %l1 ! 201d288 <rtems_termios_ttyHead>
20055ec: 80 a4 60 00 cmp %l1, 0
20055f0: 02 80 00 34 be 20056c0 <rtems_termios_open+0xfc>
20055f4: a0 10 00 11 mov %l1, %l0
if ((tty->major == major) && (tty->minor == minor))
20055f8: 10 80 00 06 b 2005610 <rtems_termios_open+0x4c>
20055fc: c2 04 20 0c ld [ %l0 + 0xc ], %g1
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) {
2005600: 80 a4 20 00 cmp %l0, 0
2005604: 02 80 00 30 be 20056c4 <rtems_termios_open+0x100> <== ALWAYS TAKEN
2005608: 90 10 20 01 mov 1, %o0
if ((tty->major == major) && (tty->minor == minor))
200560c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
2005610: 80 a0 40 18 cmp %g1, %i0
2005614: 32 bf ff fb bne,a 2005600 <rtems_termios_open+0x3c>
2005618: e0 04 00 00 ld [ %l0 ], %l0
200561c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2005620: 80 a0 40 19 cmp %g1, %i1
2005624: 32 bf ff f7 bne,a 2005600 <rtems_termios_open+0x3c> <== NEVER TAKEN
2005628: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
200562c: c4 06 80 00 ld [ %i2 ], %g2
if (!tty->refcount++) {
2005630: c2 04 20 08 ld [ %l0 + 8 ], %g1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
2005634: e0 20 a0 40 st %l0, [ %g2 + 0x40 ]
if (!tty->refcount++) {
2005638: 84 00 60 01 add %g1, 1, %g2
200563c: 80 a0 60 00 cmp %g1, 0
2005640: 12 80 00 0d bne 2005674 <rtems_termios_open+0xb0>
2005644: c4 24 20 08 st %g2, [ %l0 + 8 ]
if (tty->device.firstOpen)
2005648: c2 04 20 98 ld [ %l0 + 0x98 ], %g1
200564c: 80 a0 60 00 cmp %g1, 0
2005650: 02 80 00 05 be 2005664 <rtems_termios_open+0xa0>
2005654: 90 10 00 18 mov %i0, %o0
(*tty->device.firstOpen)(major, minor, arg);
2005658: 92 10 00 19 mov %i1, %o1
200565c: 9f c0 40 00 call %g1
2005660: 94 10 00 1a mov %i2, %o2
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005664: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
2005668: 80 a0 60 02 cmp %g1, 2
200566c: 22 80 00 06 be,a 2005684 <rtems_termios_open+0xc0>
2005670: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2005674: 40 00 09 f8 call 2007e54 <rtems_semaphore_release>
2005678: d0 07 22 80 ld [ %i4 + 0x280 ], %o0
return RTEMS_SUCCESSFUL;
}
200567c: 81 c7 e0 08 ret
2005680: 91 e8 00 1d restore %g0, %i5, %o0
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
2005684: 94 10 00 10 mov %l0, %o2
2005688: 13 00 80 1b sethi %hi(0x2006c00), %o1
200568c: 40 00 0a c1 call 2008190 <rtems_task_start>
2005690: 92 12 63 bc or %o1, 0x3bc, %o1 ! 2006fbc <rtems_termios_rxdaemon>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2005694: 80 a2 20 00 cmp %o0, 0
2005698: 12 80 00 ba bne 2005980 <rtems_termios_open+0x3bc> <== NEVER TAKEN
200569c: 94 10 00 10 mov %l0, %o2
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
20056a0: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0
20056a4: 13 00 80 15 sethi %hi(0x2005400), %o1
20056a8: 40 00 0a ba call 2008190 <rtems_task_start>
20056ac: 92 12 60 d8 or %o1, 0xd8, %o1 ! 20054d8 <rtems_termios_txdaemon>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
20056b0: 80 a2 20 00 cmp %o0, 0
20056b4: 02 bf ff f0 be 2005674 <rtems_termios_open+0xb0> <== ALWAYS TAKEN
20056b8: 01 00 00 00 nop
20056bc: 30 80 00 b1 b,a 2005980 <rtems_termios_open+0x3bc> <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
20056c0: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
20056c4: 7f ff f7 af call 2003580 <calloc>
20056c8: 92 10 20 e8 mov 0xe8, %o1
if (tty == NULL) {
20056cc: a0 92 20 00 orcc %o0, 0, %l0
20056d0: 02 80 00 9d be 2005944 <rtems_termios_open+0x380>
20056d4: 03 00 80 72 sethi %hi(0x201c800), %g1
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
20056d8: c2 00 60 54 ld [ %g1 + 0x54 ], %g1 ! 201c854 <rtems_termios_raw_input_size>
20056dc: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
20056e0: d0 04 20 64 ld [ %l0 + 0x64 ], %o0
20056e4: 7f ff f9 48 call 2003c04 <malloc>
20056e8: 01 00 00 00 nop
20056ec: d0 24 20 58 st %o0, [ %l0 + 0x58 ]
if (tty->rawInBuf.theBuf == NULL) {
20056f0: 80 a2 20 00 cmp %o0, 0
20056f4: 02 80 00 92 be 200593c <rtems_termios_open+0x378>
20056f8: a6 10 00 08 mov %o0, %l3
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
20056fc: 03 00 80 72 sethi %hi(0x201c800), %g1
2005700: c2 00 60 58 ld [ %g1 + 0x58 ], %g1 ! 201c858 <rtems_termios_raw_output_size>
2005704: c2 24 20 88 st %g1, [ %l0 + 0x88 ]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
2005708: d0 04 20 88 ld [ %l0 + 0x88 ], %o0
200570c: 7f ff f9 3e call 2003c04 <malloc>
2005710: 01 00 00 00 nop
2005714: d0 24 20 7c st %o0, [ %l0 + 0x7c ]
if (tty->rawOutBuf.theBuf == NULL) {
2005718: 80 a2 20 00 cmp %o0, 0
200571c: 02 80 00 86 be 2005934 <rtems_termios_open+0x370>
2005720: a8 10 00 08 mov %o0, %l4
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
2005724: 03 00 80 72 sethi %hi(0x201c800), %g1
2005728: 7f ff f9 37 call 2003c04 <malloc>
200572c: d0 00 60 5c ld [ %g1 + 0x5c ], %o0 ! 201c85c <rtems_termios_cbufsize>
if (tty->cbuf == NULL) {
2005730: 80 a2 20 00 cmp %o0, 0
2005734: 02 80 00 7e be 200592c <rtems_termios_open+0x368> <== NEVER TAKEN
2005738: d0 24 20 1c st %o0, [ %l0 + 0x1c ]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
200573c: c0 24 20 d4 clr [ %l0 + 0xd4 ]
tty->tty_snd.sw_arg = NULL;
2005740: c0 24 20 d8 clr [ %l0 + 0xd8 ]
tty->tty_rcv.sw_pfn = NULL;
2005744: c0 24 20 dc clr [ %l0 + 0xdc ]
tty->tty_rcv.sw_arg = NULL;
2005748: c0 24 20 e0 clr [ %l0 + 0xe0 ]
tty->tty_rcvwakeup = 0;
200574c: c0 24 20 e4 clr [ %l0 + 0xe4 ]
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2005750: e2 24 00 00 st %l1, [ %l0 ]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
2005754: 80 a4 60 00 cmp %l1, 0
2005758: 02 80 00 03 be 2005764 <rtems_termios_open+0x1a0>
200575c: c0 24 20 04 clr [ %l0 + 4 ]
rtems_termios_ttyHead->back = tty;
2005760: e0 24 60 04 st %l0, [ %l1 + 4 ]
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
2005764: 03 00 80 74 sethi %hi(0x201d000), %g1
2005768: c4 00 62 84 ld [ %g1 + 0x284 ], %g2 ! 201d284 <rtems_termios_ttyTail>
200576c: 80 a0 a0 00 cmp %g2, 0
2005770: 02 80 00 9d be 20059e4 <rtems_termios_open+0x420>
2005774: e0 24 a2 88 st %l0, [ %l2 + 0x288 ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'i', c),
2005778: 23 00 80 72 sethi %hi(0x201c800), %l1
200577c: d0 4c 60 60 ldsb [ %l1 + 0x60 ], %o0 ! 201c860 <c.6635>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2005780: 03 15 14 9a sethi %hi(0x54526800), %g1
2005784: 82 10 61 00 or %g1, 0x100, %g1 ! 54526900 <RAM_END+0x52126900>
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
2005788: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
tty->major = major;
200578c: f0 24 20 0c st %i0, [ %l0 + 0xc ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2005790: 92 10 20 01 mov 1, %o1
2005794: 94 10 20 54 mov 0x54, %o2
2005798: 90 12 00 01 or %o0, %g1, %o0
200579c: 96 10 20 00 clr %o3
20057a0: 40 00 08 bc call 2007a90 <rtems_semaphore_create>
20057a4: 98 04 20 14 add %l0, 0x14, %o4
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)
20057a8: 80 a2 20 00 cmp %o0, 0
20057ac: 12 80 00 75 bne 2005980 <rtems_termios_open+0x3bc>
20057b0: 03 15 14 9b sethi %hi(0x54526c00), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'o', c),
20057b4: d0 4c 60 60 ldsb [ %l1 + 0x60 ], %o0
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 (
20057b8: 82 10 63 00 or %g1, 0x300, %g1
20057bc: 92 10 20 01 mov 1, %o1
20057c0: 94 10 20 54 mov 0x54, %o2
20057c4: 90 12 00 01 or %o0, %g1, %o0
20057c8: 96 10 20 00 clr %o3
20057cc: 40 00 08 b1 call 2007a90 <rtems_semaphore_create>
20057d0: 98 04 20 18 add %l0, 0x18, %o4
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)
20057d4: 80 a2 20 00 cmp %o0, 0
20057d8: 12 80 00 6a bne 2005980 <rtems_termios_open+0x3bc>
20057dc: 03 15 14 9e sethi %hi(0x54527800), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
rtems_build_name ('T', 'R', 'x', c),
20057e0: d0 4c 60 60 ldsb [ %l1 + 0x60 ], %o0
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 (
20057e4: 92 10 20 00 clr %o1
20057e8: 90 12 00 01 or %o0, %g1, %o0
20057ec: 94 10 20 20 mov 0x20, %o2
20057f0: 96 10 20 00 clr %o3
20057f4: 40 00 08 a7 call 2007a90 <rtems_semaphore_create>
20057f8: 98 04 20 8c add %l0, 0x8c, %o4
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
20057fc: 80 a2 20 00 cmp %o0, 0
2005800: 12 80 00 60 bne 2005980 <rtems_termios_open+0x3bc>
2005804: 92 10 00 1b mov %i3, %o1
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
2005808: c0 24 20 94 clr [ %l0 + 0x94 ]
/*
* Set callbacks
*/
tty->device = *callbacks;
200580c: 90 04 20 98 add %l0, 0x98, %o0
2005810: 40 00 2a 38 call 20100f0 <memcpy>
2005814: 94 10 20 20 mov 0x20, %o2
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2005818: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
200581c: 80 a0 60 02 cmp %g1, 2
2005820: 02 80 00 5a be 2005988 <rtems_termios_open+0x3c4>
2005824: d0 4c 60 60 ldsb [ %l1 + 0x60 ], %o0
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
2005828: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200582c: 80 a0 60 00 cmp %g1, 0
2005830: 02 80 00 49 be 2005954 <rtems_termios_open+0x390>
2005834: d0 4c 60 60 ldsb [ %l1 + 0x60 ], %o0
2005838: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
200583c: 80 a0 60 02 cmp %g1, 2
2005840: 02 80 00 46 be 2005958 <rtems_termios_open+0x394>
2005844: 03 15 14 9c sethi %hi(0x54527000), %g1
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
2005848: c0 24 20 b8 clr [ %l0 + 0xb8 ]
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
200584c: c8 04 20 64 ld [ %l0 + 0x64 ], %g4
tty->highwater = tty->rawInBuf.Size * 3/4;
2005850: c4 04 20 64 ld [ %l0 + 0x64 ], %g2
/*
* Bump name characer
*/
if (c++ == 'z')
2005854: c2 0c 60 60 ldub [ %l1 + 0x60 ], %g1
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
2005858: b7 28 a0 01 sll %g2, 1, %i3
200585c: 84 06 c0 02 add %i3, %g2, %g2
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
2005860: 37 00 00 09 sethi %hi(0x2400), %i3
2005864: b6 16 e1 02 or %i3, 0x102, %i3 ! 2502 <PROM_START+0x2502>
2005868: f6 24 20 30 st %i3, [ %l0 + 0x30 ]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
200586c: 37 00 00 06 sethi %hi(0x1800), %i3
2005870: b6 16 e0 05 or %i3, 5, %i3 ! 1805 <PROM_START+0x1805>
2005874: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
2005878: b6 10 28 bd mov 0x8bd, %i3
200587c: f6 24 20 38 st %i3, [ %l0 + 0x38 ]
tty->termios.c_lflag =
2005880: 37 00 00 20 sethi %hi(0x8000), %i3
2005884: b6 16 e2 3b or %i3, 0x23b, %i3 ! 823b <PROM_START+0x823b>
2005888: f6 24 20 3c st %i3, [ %l0 + 0x3c ]
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
200588c: b6 10 20 03 mov 3, %i3
2005890: f6 2c 20 41 stb %i3, [ %l0 + 0x41 ]
tty->termios.c_cc[VQUIT] = '\034';
2005894: b6 10 20 1c mov 0x1c, %i3
2005898: f6 2c 20 42 stb %i3, [ %l0 + 0x42 ]
tty->termios.c_cc[VERASE] = '\177';
200589c: b6 10 20 7f mov 0x7f, %i3
20058a0: f6 2c 20 43 stb %i3, [ %l0 + 0x43 ]
tty->termios.c_cc[VKILL] = '\025';
20058a4: b6 10 20 15 mov 0x15, %i3
20058a8: f6 2c 20 44 stb %i3, [ %l0 + 0x44 ]
tty->termios.c_cc[VEOF] = '\004';
20058ac: b6 10 20 04 mov 4, %i3
20058b0: f6 2c 20 45 stb %i3, [ %l0 + 0x45 ]
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
20058b4: b6 10 20 11 mov 0x11, %i3
20058b8: f6 2c 20 49 stb %i3, [ %l0 + 0x49 ]
tty->termios.c_cc[VSTOP] = '\023';
20058bc: b6 10 20 13 mov 0x13, %i3
20058c0: f6 2c 20 4a stb %i3, [ %l0 + 0x4a ]
tty->termios.c_cc[VSUSP] = '\032';
20058c4: b6 10 20 1a mov 0x1a, %i3
20058c8: f6 2c 20 4b stb %i3, [ %l0 + 0x4b ]
tty->termios.c_cc[VREPRINT] = '\022';
20058cc: b6 10 20 12 mov 0x12, %i3
20058d0: f6 2c 20 4d stb %i3, [ %l0 + 0x4d ]
tty->termios.c_cc[VDISCARD] = '\017';
20058d4: b6 10 20 0f mov 0xf, %i3
20058d8: f6 2c 20 4e stb %i3, [ %l0 + 0x4e ]
tty->termios.c_cc[VWERASE] = '\027';
20058dc: b6 10 20 17 mov 0x17, %i3
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
20058e0: 86 00 60 01 add %g1, 1, %g3
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
20058e4: 89 31 20 01 srl %g4, 1, %g4
tty->highwater = tty->rawInBuf.Size * 3/4;
20058e8: 85 30 a0 02 srl %g2, 2, %g2
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
20058ec: f6 2c 20 4f stb %i3, [ %l0 + 0x4f ]
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
20058f0: c0 2c 20 4c clrb [ %l0 + 0x4c ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
20058f4: b6 10 20 16 mov 0x16, %i3
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
20058f8: c0 2c 20 51 clrb [ %l0 + 0x51 ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
20058fc: f6 2c 20 50 stb %i3, [ %l0 + 0x50 ]
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
2005900: c8 24 20 bc st %g4, [ %l0 + 0xbc ]
tty->highwater = tty->rawInBuf.Size * 3/4;
2005904: c4 24 20 c0 st %g2, [ %l0 + 0xc0 ]
/*
* Bump name characer
*/
if (c++ == 'z')
2005908: 83 28 60 18 sll %g1, 0x18, %g1
200590c: 83 38 60 18 sra %g1, 0x18, %g1
2005910: 80 a0 60 7a cmp %g1, 0x7a
2005914: 12 bf ff 46 bne 200562c <rtems_termios_open+0x68>
2005918: c6 2c 60 60 stb %g3, [ %l1 + 0x60 ]
c = 'a';
200591c: 84 10 20 61 mov 0x61, %g2
2005920: 03 00 80 72 sethi %hi(0x201c800), %g1
2005924: 10 bf ff 42 b 200562c <rtems_termios_open+0x68>
2005928: c4 28 60 60 stb %g2, [ %g1 + 0x60 ] ! 201c860 <c.6635>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
200592c: 7f ff f7 c4 call 200383c <free> <== NOT EXECUTED
2005930: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
2005934: 7f ff f7 c2 call 200383c <free>
2005938: 90 10 00 13 mov %l3, %o0
free(tty);
200593c: 7f ff f7 c0 call 200383c <free>
2005940: 90 10 00 10 mov %l0, %o0
rtems_semaphore_release (rtems_termios_ttyMutex);
2005944: d0 07 22 80 ld [ %i4 + 0x280 ], %o0
2005948: 40 00 09 43 call 2007e54 <rtems_semaphore_release>
200594c: ba 10 20 1a mov 0x1a, %i5
return RTEMS_NO_MEMORY;
2005950: 30 bf ff 4b b,a 200567c <rtems_termios_open+0xb8>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
2005954: 03 15 14 9c sethi %hi(0x54527000), %g1
2005958: 82 10 62 00 or %g1, 0x200, %g1 ! 54527200 <RAM_END+0x52127200>
200595c: 92 10 20 00 clr %o1
2005960: 94 10 20 24 mov 0x24, %o2
2005964: 90 12 00 01 or %o0, %g1, %o0
2005968: 96 10 20 00 clr %o3
200596c: 40 00 08 49 call 2007a90 <rtems_semaphore_create>
2005970: 98 04 20 68 add %l0, 0x68, %o4
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
2005974: 80 a2 20 00 cmp %o0, 0
2005978: 02 bf ff b4 be 2005848 <rtems_termios_open+0x284> <== ALWAYS TAKEN
200597c: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2005980: 40 00 0a ad call 2008434 <rtems_fatal_error_occurred>
2005984: 01 00 00 00 nop
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
2005988: 03 15 1e 15 sethi %hi(0x54785400), %g1
200598c: 92 10 20 0a mov 0xa, %o1
2005990: 90 12 00 01 or %o0, %g1, %o0
2005994: 94 10 24 00 mov 0x400, %o2
2005998: 96 10 25 00 mov 0x500, %o3
200599c: 98 10 20 00 clr %o4
20059a0: 40 00 09 58 call 2007f00 <rtems_task_create>
20059a4: 9a 04 20 c8 add %l0, 0xc8, %o5
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
20059a8: 80 a2 20 00 cmp %o0, 0
20059ac: 12 bf ff f5 bne 2005980 <rtems_termios_open+0x3bc> <== NEVER TAKEN
20059b0: 03 14 9e 15 sethi %hi(0x52785400), %g1
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
rtems_build_name ('R', 'x', 'T', c),
20059b4: d0 4c 60 60 ldsb [ %l1 + 0x60 ], %o0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
20059b8: 92 10 20 09 mov 9, %o1
20059bc: 90 12 00 01 or %o0, %g1, %o0
20059c0: 94 10 24 00 mov 0x400, %o2
20059c4: 96 10 25 00 mov 0x500, %o3
20059c8: 98 10 20 00 clr %o4
20059cc: 40 00 09 4d call 2007f00 <rtems_task_create>
20059d0: 9a 04 20 c4 add %l0, 0xc4, %o5
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
20059d4: 80 a2 20 00 cmp %o0, 0
20059d8: 22 bf ff 95 be,a 200582c <rtems_termios_open+0x268> <== ALWAYS TAKEN
20059dc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
20059e0: 30 bf ff e8 b,a 2005980 <rtems_termios_open+0x3bc> <== NOT EXECUTED
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
20059e4: 10 bf ff 65 b 2005778 <rtems_termios_open+0x1b4>
20059e8: e0 20 62 84 st %l0, [ %g1 + 0x284 ]
0200600c <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
200600c: 9d e3 bf a0 save %sp, -96, %sp
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
2006010: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1
2006014: 80 a0 60 00 cmp %g1, 0
2006018: 22 80 00 44 be,a 2006128 <rtems_termios_puts+0x11c>
200601c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
2006020: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0
while (len) {
2006024: 80 a6 60 00 cmp %i1, 0
2006028: 02 80 00 35 be 20060fc <rtems_termios_puts+0xf0> <== NEVER TAKEN
200602c: b6 10 20 02 mov 2, %i3
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;
2006030: a2 10 20 01 mov 1, %l1
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
2006034: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1
2006038: 40 00 4a 66 call 20189d0 <.urem>
200603c: 90 04 20 01 add %l0, 1, %o0
rtems_interrupt_disable (level);
2006040: 7f ff f1 9e call 20026b8 <sparc_disable_interrupts>
2006044: a0 10 00 08 mov %o0, %l0
2006048: ba 10 00 08 mov %o0, %i5
while (newHead == tty->rawOutBuf.Tail) {
200604c: f8 06 a0 84 ld [ %i2 + 0x84 ], %i4
2006050: 80 a7 00 10 cmp %i4, %l0
2006054: 32 80 00 14 bne,a 20060a4 <rtems_termios_puts+0x98>
2006058: c6 0e 00 00 ldub [ %i0 ], %g3
tty->rawOutBufState = rob_wait;
200605c: f6 26 a0 94 st %i3, [ %i2 + 0x94 ]
rtems_interrupt_enable (level);
2006060: 7f ff f1 9a call 20026c8 <sparc_enable_interrupts>
2006064: 90 10 00 1d mov %i5, %o0
sc = rtems_semaphore_obtain(
2006068: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0
200606c: 92 10 20 00 clr %o1
2006070: 40 00 07 2f call 2007d2c <rtems_semaphore_obtain>
2006074: 94 10 20 00 clr %o2
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2006078: 80 a2 20 00 cmp %o0, 0
200607c: 12 80 00 31 bne 2006140 <rtems_termios_puts+0x134> <== NEVER TAKEN
2006080: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2006084: 7f ff f1 8d call 20026b8 <sparc_disable_interrupts>
2006088: 01 00 00 00 nop
200608c: ba 10 00 08 mov %o0, %i5
* 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) {
2006090: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1
2006094: 80 a0 40 1c cmp %g1, %i4
2006098: 22 bf ff f2 be,a 2006060 <rtems_termios_puts+0x54> <== NEVER TAKEN
200609c: f6 26 a0 94 st %i3, [ %i2 + 0x94 ] <== NOT EXECUTED
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++;
20060a0: c6 0e 00 00 ldub [ %i0 ], %g3
20060a4: c2 06 a0 80 ld [ %i2 + 0x80 ], %g1
20060a8: c4 06 a0 7c ld [ %i2 + 0x7c ], %g2
20060ac: b0 06 20 01 inc %i0
20060b0: c6 28 80 01 stb %g3, [ %g2 + %g1 ]
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
20060b4: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
20060b8: e0 26 a0 80 st %l0, [ %i2 + 0x80 ]
if (tty->rawOutBufState == rob_idle) {
20060bc: 80 a0 60 00 cmp %g1, 0
20060c0: 12 80 00 0a bne 20060e8 <rtems_termios_puts+0xdc>
20060c4: 01 00 00 00 nop
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
20060c8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1
20060cc: 80 88 60 10 btst 0x10, %g1
20060d0: 02 80 00 0d be 2006104 <rtems_termios_puts+0xf8> <== ALWAYS TAKEN
20060d4: 01 00 00 00 nop
(*tty->device.write)(
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;
20060d8: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
20060dc: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
20060e0: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
20060e4: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED
}
rtems_interrupt_enable (level);
20060e8: 7f ff f1 78 call 20026c8 <sparc_enable_interrupts>
20060ec: 90 10 00 1d mov %i5, %o0
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
20060f0: b2 86 7f ff addcc %i1, -1, %i1
20060f4: 12 bf ff d0 bne 2006034 <rtems_termios_puts+0x28>
20060f8: 01 00 00 00 nop
20060fc: 81 c7 e0 08 ret
2006100: 81 e8 00 00 restore
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2006104: c4 06 a0 84 ld [ %i2 + 0x84 ], %g2
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)(
2006108: d2 06 a0 7c ld [ %i2 + 0x7c ], %o1
200610c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
2006110: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
2006114: 92 02 40 02 add %o1, %g2, %o1
2006118: 9f c0 40 00 call %g1
200611c: 94 10 20 01 mov 1, %o2
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;
2006120: 10 bf ff f2 b 20060e8 <rtems_termios_puts+0xdc>
2006124: e2 26 a0 94 st %l1, [ %i2 + 0x94 ]
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
2006128: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
200612c: 92 10 00 18 mov %i0, %o1
2006130: 9f c0 40 00 call %g1
2006134: 94 10 00 19 mov %i1, %o2
return;
2006138: 81 c7 e0 08 ret
200613c: 81 e8 00 00 restore
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2006140: 40 00 08 bd call 2008434 <rtems_fatal_error_occurred> <== NOT EXECUTED
0200689c <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
200689c: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20068a0: c2 06 00 00 ld [ %i0 ], %g1
uint32_t count = args->count;
20068a4: f4 06 20 14 ld [ %i0 + 0x14 ], %i2
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20068a8: fa 00 60 40 ld [ %g1 + 0x40 ], %i5
uint32_t count = args->count;
char *buffer = args->buffer;
20068ac: e4 06 20 10 ld [ %i0 + 0x10 ], %l2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20068b0: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
20068b4: 92 10 20 00 clr %o1
20068b8: 40 00 05 1d call 2007d2c <rtems_semaphore_obtain>
20068bc: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
20068c0: a0 92 20 00 orcc %o0, 0, %l0
20068c4: 12 80 00 10 bne 2006904 <rtems_termios_read+0x68> <== NEVER TAKEN
20068c8: 03 00 80 73 sethi %hi(0x201cc00), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
20068cc: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
20068d0: 85 28 a0 05 sll %g2, 5, %g2
20068d4: 82 10 62 cc or %g1, 0x2cc, %g1
20068d8: 82 00 40 02 add %g1, %g2, %g1
20068dc: c2 00 60 08 ld [ %g1 + 8 ], %g1
20068e0: 80 a0 60 00 cmp %g1, 0
20068e4: 02 80 00 0a be 200690c <rtems_termios_read+0x70>
20068e8: 90 10 00 1d mov %i5, %o0
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
20068ec: 9f c0 40 00 call %g1
20068f0: 92 10 00 18 mov %i0, %o1
20068f4: a0 10 00 08 mov %o0, %l0
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
20068f8: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
20068fc: 40 00 05 56 call 2007e54 <rtems_semaphore_release>
2006900: c0 27 60 e4 clr [ %i5 + 0xe4 ]
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
2006904: 81 c7 e0 08 ret
2006908: 91 e8 00 10 restore %g0, %l0, %o0
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
200690c: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
2006910: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2006914: 80 a0 80 01 cmp %g2, %g1
2006918: 22 80 00 20 be,a 2006998 <rtems_termios_read+0xfc> <== ALWAYS TAKEN
200691c: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2006920: 80 a6 a0 00 cmp %i2, 0
2006924: 22 80 00 15 be,a 2006978 <rtems_termios_read+0xdc> <== NEVER TAKEN
2006928: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
200692c: c2 07 60 24 ld [ %i5 + 0x24 ], %g1
2006930: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2006934: 80 a0 40 02 cmp %g1, %g2
2006938: 36 80 00 10 bge,a 2006978 <rtems_termios_read+0xdc>
200693c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006940: 10 80 00 06 b 2006958 <rtems_termios_read+0xbc>
2006944: a4 24 80 01 sub %l2, %g1, %l2
2006948: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
200694c: 80 a0 80 01 cmp %g2, %g1
2006950: 24 80 00 0a ble,a 2006978 <rtems_termios_read+0xdc>
2006954: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
*buffer++ = tty->cbuf[tty->cindex++];
2006958: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
200695c: b4 86 bf ff addcc %i2, -1, %i2
*buffer++ = tty->cbuf[tty->cindex++];
2006960: c4 08 80 01 ldub [ %g2 + %g1 ], %g2
2006964: c4 2c 80 01 stb %g2, [ %l2 + %g1 ]
2006968: 82 00 60 01 inc %g1
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
200696c: 12 bf ff f7 bne 2006948 <rtems_termios_read+0xac>
2006970: c2 27 60 24 st %g1, [ %i5 + 0x24 ]
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
2006974: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2006978: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
200697c: b4 20 40 1a sub %g1, %i2, %i2
2006980: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
tty->tty_rcvwakeup = 0;
2006984: c0 27 60 e4 clr [ %i5 + 0xe4 ]
rtems_semaphore_release (tty->isem);
2006988: 40 00 05 33 call 2007e54 <rtems_semaphore_release>
200698c: b0 10 00 10 mov %l0, %i0
return sc;
}
2006990: 81 c7 e0 08 ret
2006994: 81 e8 00 00 restore
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
2006998: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
200699c: c0 27 60 20 clr [ %i5 + 0x20 ]
20069a0: c0 27 60 24 clr [ %i5 + 0x24 ]
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
20069a4: 80 a0 60 00 cmp %g1, 0
20069a8: 02 80 00 06 be 20069c0 <rtems_termios_read+0x124>
20069ac: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
20069b0: c4 07 60 b4 ld [ %i5 + 0xb4 ], %g2
20069b4: 80 a0 a0 00 cmp %g2, 0
20069b8: 22 80 00 73 be,a 2006b84 <rtems_termios_read+0x2e8>
20069bc: c4 07 60 3c ld [ %i5 + 0x3c ], %g2
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
20069c0: f8 07 60 74 ld [ %i5 + 0x74 ], %i4
rtems_status_code sc;
int wait = 1;
20069c4: b6 10 20 01 mov 1, %i3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
20069c8: 23 00 80 72 sethi %hi(0x201c800), %l1
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
20069cc: a6 07 60 49 add %i5, 0x49, %l3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
20069d0: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
20069d4: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
20069d8: 80 a0 80 01 cmp %g2, %g1
20069dc: 02 80 00 51 be 2006b20 <rtems_termios_read+0x284>
20069e0: c2 04 60 5c ld [ %l1 + 0x5c ], %g1
20069e4: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
(tty->ccount < (CBUFSIZE-1))) {
20069e8: 82 00 7f ff add %g1, -1, %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
20069ec: 80 a0 80 01 cmp %g2, %g1
20069f0: 0a 80 00 14 bcs 2006a40 <rtems_termios_read+0x1a4> <== ALWAYS TAKEN
20069f4: b2 14 60 5c or %l1, 0x5c, %i1
}
/*
* Wait for characters
*/
if ( wait ) {
20069f8: 10 80 00 4b b 2006b24 <rtems_termios_read+0x288> <== NOT EXECUTED
20069fc: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
2006a00: 7f ff ff 62 call 2006788 <siproc>
2006a04: 01 00 00 00 nop
wait = 0;
2006a08: 80 a0 00 08 cmp %g0, %o0
2006a0c: 82 40 3f ff addx %g0, -1, %g1
2006a10: b6 0e c0 01 and %i3, %g1, %i3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2006a14: c4 07 60 5c ld [ %i5 + 0x5c ], %g2
2006a18: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2006a1c: 80 a0 80 01 cmp %g2, %g1
2006a20: 02 80 00 40 be 2006b20 <rtems_termios_read+0x284>
2006a24: f8 07 60 70 ld [ %i5 + 0x70 ], %i4
(tty->ccount < (CBUFSIZE-1))) {
2006a28: c2 06 40 00 ld [ %i1 ], %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2006a2c: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
(tty->ccount < (CBUFSIZE-1))) {
2006a30: 82 00 7f ff add %g1, -1, %g1
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2006a34: 80 a0 80 01 cmp %g2, %g1
2006a38: 1a 80 00 3b bcc 2006b24 <rtems_termios_read+0x288> <== NEVER TAKEN
2006a3c: 80 a6 e0 00 cmp %i3, 0
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
2006a40: d0 07 60 5c ld [ %i5 + 0x5c ], %o0
2006a44: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
2006a48: 40 00 47 e2 call 20189d0 <.urem>
2006a4c: 90 02 20 01 inc %o0
c = tty->rawInBuf.theBuf[newHead];
2006a50: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
2006a54: f8 08 40 08 ldub [ %g1 + %o0 ], %i4
tty->rawInBuf.Head = newHead;
2006a58: d0 27 60 5c st %o0, [ %i5 + 0x5c ]
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
2006a5c: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
2006a60: c4 07 60 64 ld [ %i5 + 0x64 ], %g2
% tty->rawInBuf.Size)
2006a64: d2 07 60 64 ld [ %i5 + 0x64 ], %o1
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)
2006a68: 82 00 80 01 add %g2, %g1, %g1
% tty->rawInBuf.Size)
2006a6c: 40 00 47 d9 call 20189d0 <.urem>
2006a70: 90 20 40 08 sub %g1, %o0, %o0
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)
2006a74: c2 07 60 bc ld [ %i5 + 0xbc ], %g1
2006a78: 80 a2 00 01 cmp %o0, %g1
2006a7c: 3a 80 00 18 bcc,a 2006adc <rtems_termios_read+0x240> <== NEVER TAKEN
2006a80: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
2006a84: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2006a88: 82 08 7f fe and %g1, -2, %g1
2006a8c: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ]
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
2006a90: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2006a94: 82 08 62 02 and %g1, 0x202, %g1
2006a98: 80 a0 62 02 cmp %g1, 0x202
2006a9c: 22 80 00 2c be,a 2006b4c <rtems_termios_read+0x2b0> <== NEVER TAKEN
2006aa0: c2 07 60 94 ld [ %i5 + 0x94 ], %g1 <== NOT EXECUTED
&& ((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);
} else if (tty->flow_ctrl & FL_MDRTS) {
2006aa4: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2006aa8: 80 88 61 00 btst 0x100, %g1
2006aac: 22 80 00 0c be,a 2006adc <rtems_termios_read+0x240> <== ALWAYS TAKEN
2006ab0: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
tty->flow_ctrl &= ~FL_IRTSOFF;
2006ab4: c4 07 60 b8 ld [ %i5 + 0xb8 ], %g2 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2006ab8: c2 07 60 b0 ld [ %i5 + 0xb0 ], %g1 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
2006abc: 84 08 bf fb and %g2, -5, %g2 <== NOT EXECUTED
2006ac0: c4 27 60 b8 st %g2, [ %i5 + 0xb8 ] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2006ac4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006ac8: 22 80 00 05 be,a 2006adc <rtems_termios_read+0x240> <== NOT EXECUTED
2006acc: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2006ad0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006ad4: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2006ad8: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
if (siproc (c, tty))
2006adc: 90 0f 20 ff and %i4, 0xff, %o0
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2006ae0: 80 88 60 02 btst 2, %g1
2006ae4: 12 bf ff c7 bne 2006a00 <rtems_termios_read+0x164> <== ALWAYS TAKEN
2006ae8: 92 10 00 1d mov %i5, %o1
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
2006aec: 7f ff ff 27 call 2006788 <siproc> <== NOT EXECUTED
2006af0: 01 00 00 00 nop <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
2006af4: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1 <== NOT EXECUTED
2006af8: c4 07 60 20 ld [ %i5 + 0x20 ], %g2 <== NOT EXECUTED
2006afc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2006b00: 06 bf ff c5 bl 2006a14 <rtems_termios_read+0x178> <== NOT EXECUTED
2006b04: 01 00 00 00 nop <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2006b08: c4 07 60 5c ld [ %i5 + 0x5c ], %g2 <== NOT EXECUTED
2006b0c: c2 07 60 60 ld [ %i5 + 0x60 ], %g1 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
2006b10: b6 10 20 00 clr %i3 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2006b14: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2006b18: 12 bf ff c4 bne 2006a28 <rtems_termios_read+0x18c> <== NOT EXECUTED
2006b1c: f8 07 60 70 ld [ %i5 + 0x70 ], %i4 <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
2006b20: 80 a6 e0 00 cmp %i3, 0
2006b24: 02 bf ff 80 be 2006924 <rtems_termios_read+0x88>
2006b28: 80 a6 a0 00 cmp %i2, 0
sc = rtems_semaphore_obtain(
2006b2c: d0 07 60 68 ld [ %i5 + 0x68 ], %o0
2006b30: d2 07 60 6c ld [ %i5 + 0x6c ], %o1
2006b34: 40 00 04 7e call 2007d2c <rtems_semaphore_obtain>
2006b38: 94 10 00 1c mov %i4, %o2
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
2006b3c: 80 a2 20 00 cmp %o0, 0
2006b40: 02 bf ff a4 be 20069d0 <rtems_termios_read+0x134> <== ALWAYS TAKEN
2006b44: 80 a6 a0 00 cmp %i2, 0
2006b48: 30 bf ff 77 b,a 2006924 <rtems_termios_read+0x88> <== NOT EXECUTED
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
2006b4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006b50: 22 80 00 07 be,a 2006b6c <rtems_termios_read+0x2d0> <== NOT EXECUTED
2006b54: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
2006b58: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
2006b5c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2006b60: 02 bf ff d1 be 2006aa4 <rtems_termios_read+0x208> <== NOT EXECUTED
2006b64: 01 00 00 00 nop <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
2006b68: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1 <== NOT EXECUTED
2006b6c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0 <== NOT EXECUTED
2006b70: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2006b74: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006b78: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2006b7c: 10 bf ff d8 b 2006adc <rtems_termios_read+0x240> <== NOT EXECUTED
2006b80: c2 07 60 3c ld [ %i5 + 0x3c ], %g1 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2006b84: 80 88 a0 02 btst 2, %g2
2006b88: 02 80 00 0e be 2006bc0 <rtems_termios_read+0x324>
2006b8c: 01 00 00 00 nop
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2006b90: 9f c0 40 00 call %g1
2006b94: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if (n < 0) {
2006b98: 80 a2 20 00 cmp %o0, 0
2006b9c: 06 80 00 3a bl 2006c84 <rtems_termios_read+0x3e8>
2006ba0: 90 0a 20 ff and %o0, 0xff, %o0
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
2006ba4: 7f ff fe f9 call 2006788 <siproc>
2006ba8: 92 10 00 1d mov %i5, %o1
2006bac: 80 a2 20 00 cmp %o0, 0
2006bb0: 12 bf ff 5d bne 2006924 <rtems_termios_read+0x88>
2006bb4: 80 a6 a0 00 cmp %i2, 0
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2006bb8: 10 bf ff f6 b 2006b90 <rtems_termios_read+0x2f4>
2006bbc: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
2006bc0: 40 00 02 96 call 2007618 <rtems_clock_get_ticks_since_boot>
2006bc4: 01 00 00 00 nop
2006bc8: b8 10 00 08 mov %o0, %i4
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2006bcc: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
2006bd0: 9f c0 40 00 call %g1
2006bd4: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if (n < 0) {
2006bd8: 80 a2 20 00 cmp %o0, 0
2006bdc: 06 80 00 10 bl 2006c1c <rtems_termios_read+0x380>
2006be0: 90 0a 20 ff and %o0, 0xff, %o0
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
2006be4: 7f ff fe e9 call 2006788 <siproc>
2006be8: 92 10 00 1d mov %i5, %o1
if (tty->ccount >= tty->termios.c_cc[VMIN])
2006bec: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
2006bf0: c4 07 60 20 ld [ %i5 + 0x20 ], %g2
2006bf4: 80 a0 80 01 cmp %g2, %g1
2006bf8: 16 bf ff 4a bge 2006920 <rtems_termios_read+0x84>
2006bfc: 80 a0 60 00 cmp %g1, 0
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2006c00: 22 bf ff f4 be,a 2006bd0 <rtems_termios_read+0x334> <== NEVER TAKEN
2006c04: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 <== NOT EXECUTED
2006c08: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
2006c0c: 80 a0 60 00 cmp %g1, 0
2006c10: 22 bf ff f0 be,a 2006bd0 <rtems_termios_read+0x334> <== NEVER TAKEN
2006c14: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1 <== NOT EXECUTED
2006c18: 30 bf ff ea b,a 2006bc0 <rtems_termios_read+0x324>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
2006c1c: c2 0f 60 47 ldub [ %i5 + 0x47 ], %g1
2006c20: 80 a0 60 00 cmp %g1, 0
2006c24: 02 80 00 0d be 2006c58 <rtems_termios_read+0x3bc>
2006c28: c2 0f 60 46 ldub [ %i5 + 0x46 ], %g1
if (tty->termios.c_cc[VTIME] && tty->ccount) {
2006c2c: 80 a0 60 00 cmp %g1, 0
2006c30: 02 80 00 06 be 2006c48 <rtems_termios_read+0x3ac> <== NEVER TAKEN
2006c34: 01 00 00 00 nop
2006c38: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
2006c3c: 80 a0 60 00 cmp %g1, 0
2006c40: 12 80 00 09 bne 2006c64 <rtems_termios_read+0x3c8>
2006c44: 01 00 00 00 nop
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
2006c48: 40 00 05 6d call 20081fc <rtems_task_wake_after>
2006c4c: 90 10 20 01 mov 1, %o0 ! 1 <PROM_START+0x1>
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
2006c50: 10 bf ff e0 b 2006bd0 <rtems_termios_read+0x334>
2006c54: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
2006c58: 80 a0 60 00 cmp %g1, 0
2006c5c: 02 bf ff 32 be 2006924 <rtems_termios_read+0x88> <== NEVER TAKEN
2006c60: 80 a6 a0 00 cmp %i2, 0
break;
now = rtems_clock_get_ticks_since_boot();
2006c64: 40 00 02 6d call 2007618 <rtems_clock_get_ticks_since_boot>
2006c68: 01 00 00 00 nop
if ((now - then) > tty->vtimeTicks) {
2006c6c: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
2006c70: 90 22 00 1c sub %o0, %i4, %o0
2006c74: 80 a2 00 01 cmp %o0, %g1
2006c78: 08 bf ff f4 bleu 2006c48 <rtems_termios_read+0x3ac>
2006c7c: 80 a6 a0 00 cmp %i2, 0
2006c80: 30 bf ff 29 b,a 2006924 <rtems_termios_read+0x88>
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
2006c84: 40 00 05 5e call 20081fc <rtems_task_wake_after>
2006c88: 90 10 20 01 mov 1, %o0
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2006c8c: 10 bf ff c1 b 2006b90 <rtems_termios_read+0x2f4>
2006c90: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
020052d8 <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)
{
20052d8: 9d e3 bf a0 save %sp, -96, %sp
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
20052dc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
20052e0: 82 08 64 03 and %g1, 0x403, %g1
20052e4: 80 a0 64 01 cmp %g1, 0x401
20052e8: 02 80 00 44 be 20053f8 <rtems_termios_refill_transmitter+0x120><== NEVER TAKEN
20052ec: ba 10 00 18 mov %i0, %i5
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
20052f0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1
20052f4: 82 08 60 03 and %g1, 3, %g1
20052f8: 80 a0 60 02 cmp %g1, 2
20052fc: 22 80 00 50 be,a 200543c <rtems_termios_refill_transmitter+0x164><== NEVER TAKEN
2005300: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2005304: c4 06 20 80 ld [ %i0 + 0x80 ], %g2
2005308: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
200530c: 80 a0 80 01 cmp %g2, %g1
2005310: 22 80 00 30 be,a 20053d0 <rtems_termios_refill_transmitter+0xf8>
2005314: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
2005318: 7f ff f4 e8 call 20026b8 <sparc_disable_interrupts>
200531c: 01 00 00 00 nop
len = tty->t_dqlen;
2005320: f8 06 20 90 ld [ %i0 + 0x90 ], %i4
tty->t_dqlen = 0;
2005324: c0 26 20 90 clr [ %i0 + 0x90 ]
rtems_interrupt_enable(level);
2005328: 7f ff f4 e8 call 20026c8 <sparc_enable_interrupts>
200532c: 01 00 00 00 nop
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
2005330: d0 06 20 84 ld [ %i0 + 0x84 ], %o0
2005334: d2 06 20 88 ld [ %i0 + 0x88 ], %o1
2005338: 40 00 4d a6 call 20189d0 <.urem>
200533c: 90 07 00 08 add %i4, %o0, %o0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
2005340: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
2005344: d0 27 60 84 st %o0, [ %i5 + 0x84 ]
if (tty->rawOutBufState == rob_wait) {
2005348: 80 a0 60 02 cmp %g1, 2
200534c: 02 80 00 55 be 20054a0 <rtems_termios_refill_transmitter+0x1c8>
2005350: b8 10 00 08 mov %o0, %i4
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
2005354: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
2005358: 80 a0 40 1c cmp %g1, %i4
200535c: 22 80 00 48 be,a 200547c <rtems_termios_refill_transmitter+0x1a4>
2005360: c2 07 60 d4 ld [ %i5 + 0xd4 ], %g1
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2005364: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005368: 82 08 62 10 and %g1, 0x210, %g1
200536c: 80 a0 62 10 cmp %g1, 0x210
2005370: 02 80 00 4f be 20054ac <rtems_termios_refill_transmitter+0x1d4><== NEVER TAKEN
2005374: 01 00 00 00 nop
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2005378: c2 07 60 80 ld [ %i5 + 0x80 ], %g1
200537c: 80 a7 00 01 cmp %i4, %g1
2005380: 18 80 00 1b bgu 20053ec <rtems_termios_refill_transmitter+0x114>
2005384: 01 00 00 00 nop
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
2005388: f0 07 60 80 ld [ %i5 + 0x80 ], %i0
200538c: b0 26 00 1c sub %i0, %i4, %i0
/* 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)) {
2005390: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1
2005394: 80 88 66 00 btst 0x600, %g1
2005398: 02 80 00 04 be 20053a8 <rtems_termios_refill_transmitter+0xd0>
200539c: 94 10 00 18 mov %i0, %o2
20053a0: 94 10 20 01 mov 1, %o2
nToSend = 1;
20053a4: b0 10 20 01 mov 1, %i0
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
20053a8: d2 07 60 7c ld [ %i5 + 0x7c ], %o1
20053ac: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1
20053b0: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
/* 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*/
20053b4: 84 10 20 01 mov 1, %g2
(*tty->device.write)(
20053b8: 92 02 40 1c add %o1, %i4, %o1
20053bc: 9f c0 40 00 call %g1
20053c0: c4 27 60 94 st %g2, [ %i5 + 0x94 ]
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
20053c4: f8 27 60 84 st %i4, [ %i5 + 0x84 ]
}
return nToSend;
}
20053c8: 81 c7 e0 08 ret
20053cc: 81 e8 00 00 restore
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
20053d0: 80 a0 60 02 cmp %g1, 2
20053d4: 12 bf ff fd bne 20053c8 <rtems_termios_refill_transmitter+0xf0><== ALWAYS TAKEN
20053d8: b0 10 20 00 clr %i0
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
20053dc: 40 00 0a 9e call 2007e54 <rtems_semaphore_release> <== NOT EXECUTED
20053e0: d0 07 60 8c ld [ %i5 + 0x8c ], %o0 <== NOT EXECUTED
20053e4: 81 c7 e0 08 ret <== NOT EXECUTED
20053e8: 81 e8 00 00 restore <== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
20053ec: f0 07 60 88 ld [ %i5 + 0x88 ], %i0
20053f0: 10 bf ff e8 b 2005390 <rtems_termios_refill_transmitter+0xb8>
20053f4: b0 26 00 1c sub %i0, %i4, %i0
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
20053f8: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
20053fc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2005400: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED
2005404: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005408: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
rtems_interrupt_disable(level);
200540c: 7f ff f4 ab call 20026b8 <sparc_disable_interrupts> <== NOT EXECUTED
2005410: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2005414: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2005418: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
200541c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2005420: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2005424: c4 27 60 90 st %g2, [ %i5 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005428: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
200542c: 7f ff f4 a7 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
2005430: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2005434: 81 c7 e0 08 ret <== NOT EXECUTED
2005438: 81 e8 00 00 restore <== NOT EXECUTED
* 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);
200543c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2005440: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED
2005444: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005448: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
rtems_interrupt_disable(level);
200544c: 7f ff f4 9b call 20026b8 <sparc_disable_interrupts> <== NOT EXECUTED
2005450: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
2005454: c4 06 20 90 ld [ %i0 + 0x90 ], %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005458: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
200545c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005460: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2005464: c4 27 60 90 st %g2, [ %i5 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2005468: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
200546c: 7f ff f4 97 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
2005470: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
2005474: 81 c7 e0 08 ret <== NOT EXECUTED
2005478: 81 e8 00 00 restore <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
200547c: c0 27 60 94 clr [ %i5 + 0x94 ]
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2005480: 80 a0 60 00 cmp %g1, 0
2005484: 02 bf ff d0 be 20053c4 <rtems_termios_refill_transmitter+0xec><== ALWAYS TAKEN
2005488: b0 10 20 00 clr %i0
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
200548c: d2 07 60 d8 ld [ %i5 + 0xd8 ], %o1 <== NOT EXECUTED
2005490: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005494: 90 07 60 30 add %i5, 0x30, %o0 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2005498: f8 27 60 84 st %i4, [ %i5 + 0x84 ] <== NOT EXECUTED
200549c: 30 bf ff f6 b,a 2005474 <rtems_termios_refill_transmitter+0x19c><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
20054a0: 40 00 0a 6d call 2007e54 <rtems_semaphore_release>
20054a4: d0 06 20 8c ld [ %i0 + 0x8c ], %o0
20054a8: 30 bf ff ab b,a 2005354 <rtems_termios_refill_transmitter+0x7c>
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
20054ac: 7f ff f4 83 call 20026b8 <sparc_disable_interrupts> <== NOT EXECUTED
20054b0: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
20054b4: c2 07 60 b8 ld [ %i5 + 0xb8 ], %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
20054b8: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
20054bc: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
20054c0: c4 27 60 94 st %g2, [ %i5 + 0x94 ] <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
20054c4: c2 27 60 b8 st %g1, [ %i5 + 0xb8 ] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
20054c8: 7f ff f4 80 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
20054cc: b0 10 20 00 clr %i0 <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
20054d0: f8 27 60 84 st %i4, [ %i5 + 0x84 ] <== NOT EXECUTED
20054d4: 30 bf ff e8 b,a 2005474 <rtems_termios_refill_transmitter+0x19c><== NOT EXECUTED
02006fbc <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
2006fbc: 9d e3 bf 98 save %sp, -104, %sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2006fc0: 10 80 00 08 b 2006fe0 <rtems_termios_rxdaemon+0x24>
2006fc4: 96 07 bf f8 add %fp, -8, %o3
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
2006fc8: 9f c0 40 00 call %g1
2006fcc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
if (c != EOF) {
2006fd0: 80 a2 3f ff cmp %o0, -1
2006fd4: 32 80 00 15 bne,a 2007028 <rtems_termios_rxdaemon+0x6c>
2006fd8: d0 2f bf ff stb %o0, [ %fp + -1 ]
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2006fdc: 96 07 bf f8 add %fp, -8, %o3
2006fe0: 92 10 20 02 mov 2, %o1
2006fe4: 94 10 20 00 clr %o2
2006fe8: 40 00 01 af call 20076a4 <rtems_event_receive>
2006fec: 90 10 20 03 mov 3, %o0
(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) {
2006ff0: c2 07 bf f8 ld [ %fp + -8 ], %g1
2006ff4: 80 88 60 01 btst 1, %g1
2006ff8: 22 bf ff f4 be,a 2006fc8 <rtems_termios_rxdaemon+0xc> <== ALWAYS TAKEN
2006ffc: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1
tty->rxTaskId = 0;
2007000: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2007004: 40 00 04 09 call 2008028 <rtems_task_delete> <== NOT EXECUTED
2007008: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
200700c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
2007010: 9f c0 40 00 call %g1 <== NOT EXECUTED
2007014: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
if (c != EOF) {
2007018: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
200701c: 22 bf ff f1 be,a 2006fe0 <rtems_termios_rxdaemon+0x24> <== NOT EXECUTED
2007020: 96 07 bf f8 add %fp, -8, %o3 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
2007024: d0 2f bf ff stb %o0, [ %fp + -1 ] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
2007028: 92 07 bf ff add %fp, -1, %o1
200702c: 90 10 00 18 mov %i0, %o0
2007030: 7f ff ff 1e call 2006ca8 <rtems_termios_enqueue_raw_characters>
2007034: 94 10 20 01 mov 1, %o2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2007038: 10 bf ff ea b 2006fe0 <rtems_termios_rxdaemon+0x24>
200703c: 96 07 bf f8 add %fp, -8, %o3
020054d8 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
20054d8: 9d e3 bf 98 save %sp, -104, %sp
20054dc: 3b 00 80 73 sethi %hi(0x201cc00), %i5
20054e0: 10 80 00 0c b 2005510 <rtems_termios_txdaemon+0x38>
20054e4: ba 17 62 cc or %i5, 0x2cc, %i5 ! 201cecc <rtems_termios_linesw>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
20054e8: 83 28 60 05 sll %g1, 5, %g1
20054ec: 82 07 40 01 add %i5, %g1, %g1
20054f0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
20054f4: 80 a0 60 00 cmp %g1, 0
20054f8: 02 80 00 04 be 2005508 <rtems_termios_txdaemon+0x30> <== ALWAYS TAKEN
20054fc: 90 10 00 18 mov %i0, %o0
rtems_termios_linesw[tty->t_line].l_start(tty);
2005500: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005504: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
2005508: 7f ff ff 74 call 20052d8 <rtems_termios_refill_transmitter>
200550c: 90 10 00 18 mov %i0, %o0
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
2005510: 92 10 20 02 mov 2, %o1
2005514: 94 10 20 00 clr %o2
2005518: 96 07 bf fc add %fp, -4, %o3
200551c: 40 00 08 62 call 20076a4 <rtems_event_receive>
2005520: 90 10 20 03 mov 3, %o0
(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) {
2005524: c2 07 bf fc ld [ %fp + -4 ], %g1
2005528: 80 88 60 01 btst 1, %g1
200552c: 22 bf ff ef be,a 20054e8 <rtems_termios_txdaemon+0x10> <== ALWAYS TAKEN
2005530: c2 06 20 cc ld [ %i0 + 0xcc ], %g1
tty->txTaskId = 0;
2005534: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2005538: 40 00 0a bc call 2008028 <rtems_task_delete> <== NOT EXECUTED
200553c: 90 10 20 00 clr %o0 <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2005540: 10 bf ff ea b 20054e8 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
2005544: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
020067d0 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
20067d0: 9d e3 bf a0 save %sp, -96, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20067d4: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20067d8: 92 10 20 00 clr %o1
rtems_status_code
rtems_termios_write (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
20067dc: fa 00 60 40 ld [ %g1 + 0x40 ], %i5
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20067e0: 94 10 20 00 clr %o2
20067e4: 40 00 05 52 call 2007d2c <rtems_semaphore_obtain>
20067e8: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
if (sc != RTEMS_SUCCESSFUL)
20067ec: b8 92 20 00 orcc %o0, 0, %i4
20067f0: 12 80 00 0f bne 200682c <rtems_termios_write+0x5c> <== NEVER TAKEN
20067f4: 03 00 80 73 sethi %hi(0x201cc00), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
20067f8: c4 07 60 cc ld [ %i5 + 0xcc ], %g2
20067fc: 85 28 a0 05 sll %g2, 5, %g2
2006800: 82 10 62 cc or %g1, 0x2cc, %g1
2006804: 82 00 40 02 add %g1, %g2, %g1
2006808: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200680c: 80 a0 60 00 cmp %g1, 0
2006810: 02 80 00 09 be 2006834 <rtems_termios_write+0x64>
2006814: 90 10 00 1d mov %i5, %o0
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
2006818: 9f c0 40 00 call %g1
200681c: 92 10 00 18 mov %i0, %o1
2006820: b8 10 00 08 mov %o0, %i4
rtems_semaphore_release (tty->osem);
2006824: 40 00 05 8c call 2007e54 <rtems_semaphore_release>
2006828: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
200682c: 81 c7 e0 08 ret
2006830: 91 e8 00 1c restore %g0, %i4, %o0
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) {
2006834: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
2006838: 80 88 60 01 btst 1, %g1
200683c: 22 80 00 14 be,a 200688c <rtems_termios_write+0xbc> <== NEVER TAKEN
2006840: d0 1e 20 10 ldd [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
2006844: f4 1e 20 10 ldd [ %i0 + 0x10 ], %i2
while (count--)
2006848: 80 a6 e0 00 cmp %i3, 0
200684c: 02 80 00 0a be 2006874 <rtems_termios_write+0xa4> <== NEVER TAKEN
2006850: 82 10 20 00 clr %g1
oproc (*buffer++, tty);
2006854: d0 0e 80 00 ldub [ %i2 ], %o0
2006858: 92 10 00 1d mov %i5, %o1
200685c: 7f ff fe 3c call 200614c <oproc>
2006860: 90 0a 20 ff and %o0, 0xff, %o0
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
2006864: b6 86 ff ff addcc %i3, -1, %i3
2006868: 12 bf ff fb bne 2006854 <rtems_termios_write+0x84>
200686c: b4 06 a0 01 inc %i2
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2006870: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
}
rtems_semaphore_release (tty->osem);
2006874: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2006878: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
}
rtems_semaphore_release (tty->osem);
200687c: 40 00 05 76 call 2007e54 <rtems_semaphore_release>
2006880: b0 10 00 1c mov %i4, %i0
return sc;
}
2006884: 81 c7 e0 08 ret
2006888: 81 e8 00 00 restore
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
200688c: 7f ff fd e0 call 200600c <rtems_termios_puts> <== NOT EXECUTED
2006890: 94 10 00 1d mov %i5, %o2 <== NOT EXECUTED
args->bytes_moved = args->count;
2006894: 10 bf ff f8 b 2006874 <rtems_termios_write+0xa4> <== NOT EXECUTED
2006898: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
0201752c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
201752c: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2017530: 11 00 80 ed sethi %hi(0x203b400), %o0
2017534: 92 10 00 18 mov %i0, %o1
2017538: 90 12 21 24 or %o0, 0x124, %o0
201753c: 40 00 0c 98 call 201a79c <_Objects_Get>
2017540: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2017544: c2 07 bf fc ld [ %fp + -4 ], %g1
2017548: 80 a0 60 00 cmp %g1, 0
201754c: 12 80 00 0c bne 201757c <rtems_timer_cancel+0x50>
2017550: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2017554: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2017558: 80 a0 60 04 cmp %g1, 4
201755c: 02 80 00 04 be 201756c <rtems_timer_cancel+0x40> <== NEVER TAKEN
2017560: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2017564: 40 00 15 04 call 201c974 <_Watchdog_Remove>
2017568: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
201756c: 40 00 10 90 call 201b7ac <_Thread_Enable_dispatch>
2017570: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2017574: 81 c7 e0 08 ret
2017578: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
201757c: 81 c7 e0 08 ret
2017580: 91 e8 20 04 restore %g0, 4, %o0
02017a70 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2017a70: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
2017a74: 03 00 80 ed sethi %hi(0x203b400), %g1
2017a78: fa 00 61 64 ld [ %g1 + 0x164 ], %i5 ! 203b564 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2017a7c: b8 10 00 18 mov %i0, %i4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
2017a80: 80 a7 60 00 cmp %i5, 0
2017a84: 02 80 00 3a be 2017b6c <rtems_timer_server_fire_when+0xfc>
2017a88: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
2017a8c: 03 00 80 ec sethi %hi(0x203b000), %g1
2017a90: c2 08 62 50 ldub [ %g1 + 0x250 ], %g1 ! 203b250 <_TOD_Is_set>
2017a94: 80 a0 60 00 cmp %g1, 0
2017a98: 02 80 00 35 be 2017b6c <rtems_timer_server_fire_when+0xfc><== NEVER TAKEN
2017a9c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
2017aa0: 80 a6 a0 00 cmp %i2, 0
2017aa4: 02 80 00 32 be 2017b6c <rtems_timer_server_fire_when+0xfc>
2017aa8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2017aac: 90 10 00 19 mov %i1, %o0
2017ab0: 7f ff f3 45 call 20147c4 <_TOD_Validate>
2017ab4: b0 10 20 14 mov 0x14, %i0
2017ab8: 80 8a 20 ff btst 0xff, %o0
2017abc: 02 80 00 2c be 2017b6c <rtems_timer_server_fire_when+0xfc>
2017ac0: 01 00 00 00 nop
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2017ac4: 7f ff f3 05 call 20146d8 <_TOD_To_seconds>
2017ac8: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
2017acc: 21 00 80 ec sethi %hi(0x203b000), %l0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2017ad0: b2 10 00 08 mov %o0, %i1
2017ad4: d0 1c 22 d0 ldd [ %l0 + 0x2d0 ], %o0
2017ad8: 94 10 20 00 clr %o2
2017adc: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017ae0: 40 00 4e 6a call 202b488 <__divdi3>
2017ae4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
if ( seconds <= _TOD_Seconds_since_epoch() )
2017ae8: 80 a6 40 09 cmp %i1, %o1
2017aec: 08 80 00 20 bleu 2017b6c <rtems_timer_server_fire_when+0xfc>
2017af0: 92 10 00 1c mov %i4, %o1
2017af4: 11 00 80 ed sethi %hi(0x203b400), %o0
2017af8: 94 07 bf fc add %fp, -4, %o2
2017afc: 40 00 0b 28 call 201a79c <_Objects_Get>
2017b00: 90 12 21 24 or %o0, 0x124, %o0
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2017b04: c2 07 bf fc ld [ %fp + -4 ], %g1
2017b08: 80 a0 60 00 cmp %g1, 0
2017b0c: 12 80 00 1a bne 2017b74 <rtems_timer_server_fire_when+0x104>
2017b10: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2017b14: 40 00 13 98 call 201c974 <_Watchdog_Remove>
2017b18: 90 02 20 10 add %o0, 0x10, %o0
2017b1c: d0 1c 22 d0 ldd [ %l0 + 0x2d0 ], %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
2017b20: 82 10 20 03 mov 3, %g1
2017b24: 94 10 20 00 clr %o2
2017b28: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2017b2c: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
the_watchdog->id = id;
2017b30: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
the_watchdog->user_data = user_data;
2017b34: f6 26 20 34 st %i3, [ %i0 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2017b38: c0 26 20 18 clr [ %i0 + 0x18 ]
2017b3c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017b40: 40 00 4e 52 call 202b488 <__divdi3>
2017b44: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_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 );
2017b48: c2 07 60 04 ld [ %i5 + 4 ], %g1
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();
2017b4c: b2 26 40 09 sub %i1, %o1, %i1
(*timer_server->schedule_operation)( timer_server, the_timer );
2017b50: 90 10 00 1d mov %i5, %o0
2017b54: 92 10 00 18 mov %i0, %o1
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();
2017b58: f2 26 20 1c st %i1, [ %i0 + 0x1c ]
(*timer_server->schedule_operation)( timer_server, the_timer );
2017b5c: 9f c0 40 00 call %g1
2017b60: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2017b64: 40 00 0f 12 call 201b7ac <_Thread_Enable_dispatch>
2017b68: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2017b6c: 81 c7 e0 08 ret
2017b70: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2017b74: 81 c7 e0 08 ret
2017b78: 91 e8 20 04 restore %g0, 4, %o0
020035ec <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
20035ec: 9d e3 bf a0 save %sp, -96, %sp
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
20035f0: 03 08 00 00 sethi %hi(0x20000000), %g1
20035f4: 80 8e 00 01 btst %i0, %g1
20035f8: 02 80 00 11 be 200363c <rtems_verror+0x50>
20035fc: b8 10 00 18 mov %i0, %i4
if (rtems_panic_in_progress++)
2003600: 05 00 80 74 sethi %hi(0x201d000), %g2
2003604: c6 00 a2 34 ld [ %g2 + 0x234 ], %g3 ! 201d234 <rtems_panic_in_progress>
2003608: 82 00 e0 01 add %g3, 1, %g1
200360c: 80 a0 e0 00 cmp %g3, 0
2003610: 02 80 00 08 be 2003630 <rtems_verror+0x44> <== ALWAYS TAKEN
2003614: c2 20 a2 34 st %g1, [ %g2 + 0x234 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2003618: 03 00 80 74 sethi %hi(0x201d000), %g1 <== NOT EXECUTED
200361c: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 ! 201d3b0 <_Thread_Dispatch_disable_level><== NOT EXECUTED
2003620: 86 00 e0 01 inc %g3 <== NOT EXECUTED
2003624: c6 20 63 b0 st %g3, [ %g1 + 0x3b0 ] <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
2003628: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1 <== NOT EXECUTED
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
RTEMS_COMPILER_MEMORY_BARRIER();
200362c: c2 00 a2 34 ld [ %g2 + 0x234 ], %g1 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2003630: 80 a0 60 02 cmp %g1, 2
2003634: 14 80 00 2f bg 20036f0 <rtems_verror+0x104> <== NEVER TAKEN
2003638: b0 10 20 00 clr %i0
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
200363c: 3b 00 80 72 sethi %hi(0x201c800), %i5
2003640: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1 ! 201c9a8 <_impure_ptr>
status = error_flag & ~RTEMS_ERROR_MASK;
2003644: 21 1c 00 00 sethi %hi(0x70000000), %l0
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2003648: d0 00 60 08 ld [ %g1 + 8 ], %o0
200364c: 40 00 31 5d call 200fbc0 <fflush>
2003650: b6 10 20 00 clr %i3
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2003654: 03 10 00 00 sethi %hi(0x40000000), %g1
2003658: 80 8f 00 01 btst %i4, %g1
200365c: 12 80 00 33 bne 2003728 <rtems_verror+0x13c>
2003660: a0 2f 00 10 andn %i4, %l0, %l0
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2003664: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
2003668: 92 10 00 19 mov %i1, %o1
200366c: d0 00 60 0c ld [ %g1 + 0xc ], %o0
2003670: 40 00 45 8b call 2014c9c <vfprintf>
2003674: 94 10 00 1a mov %i2, %o2
if (status)
2003678: 80 a4 20 00 cmp %l0, 0
200367c: 12 80 00 1f bne 20036f8 <rtems_verror+0x10c>
2003680: b0 10 00 08 mov %o0, %i0
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
2003684: 80 a6 e0 00 cmp %i3, 0
2003688: 02 80 00 12 be 20036d0 <rtems_verror+0xe4>
200368c: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
if ((local_errno > 0) && *strerror(local_errno))
2003690: 80 a6 e0 00 cmp %i3, 0
2003694: 04 80 00 09 ble 20036b8 <rtems_verror+0xcc>
2003698: 13 00 80 6b sethi %hi(0x201ac00), %o1
200369c: 40 00 35 c9 call 2010dc0 <strerror>
20036a0: 90 10 00 1b mov %i3, %o0
20036a4: c2 4a 00 00 ldsb [ %o0 ], %g1
20036a8: 80 a0 60 00 cmp %g1, 0
20036ac: 12 80 00 23 bne 2003738 <rtems_verror+0x14c> <== ALWAYS TAKEN
20036b0: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
20036b4: 13 00 80 6b sethi %hi(0x201ac00), %o1 <== NOT EXECUTED
20036b8: d0 00 60 0c ld [ %g1 + 0xc ], %o0
20036bc: 92 12 61 28 or %o1, 0x128, %o1
20036c0: 40 00 32 39 call 200ffa4 <fprintf>
20036c4: 94 10 00 1b mov %i3, %o2
20036c8: b0 06 00 08 add %i0, %o0, %i0
}
chars_written += fprintf(stderr, "\n");
20036cc: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
20036d0: 13 00 80 6a sethi %hi(0x201a800), %o1
20036d4: d0 00 60 0c ld [ %g1 + 0xc ], %o0
20036d8: 40 00 32 33 call 200ffa4 <fprintf>
20036dc: 92 12 63 60 or %o1, 0x360, %o1
(void) fflush(stderr);
20036e0: c2 07 61 a8 ld [ %i5 + 0x1a8 ], %g1
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
20036e4: b0 02 00 18 add %o0, %i0, %i0
(void) fflush(stderr);
20036e8: 40 00 31 36 call 200fbc0 <fflush>
20036ec: d0 00 60 0c ld [ %g1 + 0xc ], %o0
return chars_written;
}
20036f0: 81 c7 e0 08 ret
20036f4: 81 e8 00 00 restore
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
20036f8: 03 00 80 72 sethi %hi(0x201c800), %g1
20036fc: c2 00 61 a8 ld [ %g1 + 0x1a8 ], %g1 ! 201c9a8 <_impure_ptr>
2003700: 90 10 00 10 mov %l0, %o0
2003704: 7f ff ff b4 call 20035d4 <rtems_status_text>
2003708: f8 00 60 0c ld [ %g1 + 0xc ], %i4
200370c: 13 00 80 6b sethi %hi(0x201ac00), %o1
2003710: 94 10 00 08 mov %o0, %o2
2003714: 92 12 61 08 or %o1, 0x108, %o1
2003718: 40 00 32 23 call 200ffa4 <fprintf>
200371c: 90 10 00 1c mov %i4, %o0
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
2003720: 10 bf ff d9 b 2003684 <rtems_verror+0x98>
2003724: b0 06 00 08 add %i0, %o0, %i0
(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;
2003728: 40 00 30 16 call 200f780 <__errno>
200372c: 01 00 00 00 nop
2003730: 10 bf ff cd b 2003664 <rtems_verror+0x78>
2003734: f6 02 00 00 ld [ %o0 ], %i3
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
2003738: 90 10 00 1b mov %i3, %o0
200373c: 40 00 35 a1 call 2010dc0 <strerror>
2003740: f8 00 60 0c ld [ %g1 + 0xc ], %i4
2003744: 13 00 80 6b sethi %hi(0x201ac00), %o1
2003748: 94 10 00 08 mov %o0, %o2
200374c: 92 12 61 18 or %o1, 0x118, %o1
2003750: 40 00 32 15 call 200ffa4 <fprintf>
2003754: 90 10 00 1c mov %i4, %o0
2003758: 10 bf ff dd b 20036cc <rtems_verror+0xe0>
200375c: b0 06 00 08 add %i0, %o0, %i0
0202af08 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
202af08: 9d e3 bf a0 save %sp, -96, %sp
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
202af0c: 35 1f ff ff sethi %hi(0x7ffffc00), %i2
int sign = 0;
202af10: b6 10 20 00 clr %i3
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
202af14: b4 16 a3 ff or %i2, 0x3ff, %i2
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
202af18: b8 10 20 00 clr %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
202af1c: 23 00 81 c1 sethi %hi(0x2070400), %l1
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
202af20: 21 00 81 c1 sethi %hi(0x2070400), %l0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
202af24: c2 06 20 04 ld [ %i0 + 4 ], %g1
202af28: 82 00 7f ff add %g1, -1, %g1
202af2c: 80 a0 60 00 cmp %g1, 0
202af30: 06 80 00 24 bl 202afc0 <scanInt+0xb8> <== NEVER TAKEN
202af34: c2 26 20 04 st %g1, [ %i0 + 4 ]
202af38: c2 06 00 00 ld [ %i0 ], %g1
202af3c: fa 08 40 00 ldub [ %g1 ], %i5
202af40: 82 00 60 01 inc %g1
if (c == ':')
202af44: 80 a7 60 3a cmp %i5, 0x3a
202af48: 02 80 00 25 be 202afdc <scanInt+0xd4>
202af4c: c2 26 00 00 st %g1, [ %i0 ]
break;
if (sign == 0) {
202af50: 80 a6 e0 00 cmp %i3, 0
202af54: 12 80 00 06 bne 202af6c <scanInt+0x64>
202af58: c2 04 22 38 ld [ %l0 + 0x238 ], %g1
if (c == '-') {
202af5c: 80 a7 60 2d cmp %i5, 0x2d
202af60: 02 80 00 32 be 202b028 <scanInt+0x120>
202af64: b6 10 20 01 mov 1, %i3
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
202af68: c2 04 22 38 ld [ %l0 + 0x238 ], %g1
202af6c: 82 00 40 1d add %g1, %i5, %g1
202af70: c2 08 60 01 ldub [ %g1 + 1 ], %g1
202af74: 80 88 60 04 btst 4, %g1
202af78: 02 80 00 2f be 202b034 <scanInt+0x12c>
202af7c: 90 10 00 1a mov %i2, %o0
return 0;
d = c - '0';
if ((i > (limit / 10))
202af80: 40 00 d6 c7 call 2060a9c <.udiv>
202af84: 92 10 20 0a mov 0xa, %o1
202af88: 80 a7 00 08 cmp %i4, %o0
202af8c: 18 80 00 2a bgu 202b034 <scanInt+0x12c>
202af90: 01 00 00 00 nop
|| ((i == (limit / 10)) && (d > (limit % 10))))
202af94: 02 80 00 1c be 202b004 <scanInt+0xfc>
202af98: ba 07 7f d0 add %i5, -48, %i5
return 0;
i = i * 10 + d;
202af9c: 83 2f 20 01 sll %i4, 1, %g1
202afa0: b9 2f 20 03 sll %i4, 3, %i4
202afa4: b8 00 40 1c add %g1, %i4, %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
202afa8: c2 06 20 04 ld [ %i0 + 4 ], %g1
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
202afac: b8 07 40 1c add %i5, %i4, %i4
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
202afb0: 82 00 7f ff add %g1, -1, %g1
202afb4: 80 a0 60 00 cmp %g1, 0
202afb8: 16 bf ff e0 bge 202af38 <scanInt+0x30> <== ALWAYS TAKEN
202afbc: c2 26 20 04 st %g1, [ %i0 + 4 ]
202afc0: d0 04 62 48 ld [ %l1 + 0x248 ], %o0 <== NOT EXECUTED
202afc4: 40 00 87 3d call 204ccb8 <__srget_r> <== NOT EXECUTED
202afc8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
202afcc: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
if (c == ':')
202afd0: 80 a7 60 3a cmp %i5, 0x3a <== NOT EXECUTED
202afd4: 12 bf ff e0 bne 202af54 <scanInt+0x4c> <== NOT EXECUTED
202afd8: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
202afdc: 80 a6 e0 00 cmp %i3, 0
202afe0: 02 80 00 07 be 202affc <scanInt+0xf4> <== NEVER TAKEN
202afe4: b0 10 20 00 clr %i0
return 0;
*val = i * sign;
202afe8: 90 10 00 1b mov %i3, %o0
202afec: 92 10 00 1c mov %i4, %o1
202aff0: 7f ff 5f bc call 2002ee0 <.umul>
202aff4: b0 10 20 01 mov 1, %i0
202aff8: d0 26 40 00 st %o0, [ %i1 ]
return 1;
202affc: 81 c7 e0 08 ret
202b000: 81 e8 00 00 restore
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
202b004: 90 10 00 1a mov %i2, %o0
202b008: 40 00 d7 51 call 2060d4c <.urem>
202b00c: 92 10 20 0a mov 0xa, %o1
202b010: 80 a7 40 08 cmp %i5, %o0
202b014: 08 bf ff e3 bleu 202afa0 <scanInt+0x98> <== NEVER TAKEN
202b018: 83 2f 20 01 sll %i4, 1, %g1
return 0;
202b01c: b0 10 20 00 clr %i0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
202b020: 81 c7 e0 08 ret
202b024: 81 e8 00 00 restore
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
202b028: b4 06 a0 01 inc %i2
continue;
202b02c: 10 bf ff be b 202af24 <scanInt+0x1c>
202b030: b6 10 3f ff mov -1, %i3
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
202b034: 81 c7 e0 08 ret
202b038: 91 e8 20 00 restore %g0, 0, %o0
0202b03c <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
202b03c: 9d e3 bf a0 save %sp, -96, %sp
int c;
*name = *bufp;
202b040: c2 06 80 00 ld [ %i2 ], %g1
for (;;) {
c = getc(fp);
202b044: 3b 00 81 c1 sethi %hi(0x2070400), %i5
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
int c;
*name = *bufp;
202b048: 10 80 00 19 b 202b0ac <scanString+0x70>
202b04c: c2 26 40 00 st %g1, [ %i1 ]
for (;;) {
c = getc(fp);
202b050: c2 06 00 00 ld [ %i0 ], %g1
202b054: d0 08 40 00 ldub [ %g1 ], %o0
202b058: 82 00 60 01 inc %g1
if (c == ':') {
202b05c: 80 a2 20 3a cmp %o0, 0x3a
202b060: 02 80 00 1e be 202b0d8 <scanString+0x9c>
202b064: c2 26 00 00 st %g1, [ %i0 ]
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
202b068: 80 a2 20 0a cmp %o0, 0xa
202b06c: 02 80 00 28 be 202b10c <scanString+0xd0>
202b070: 80 a2 3f ff cmp %o0, -1
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
202b074: 02 80 00 2b be 202b120 <scanString+0xe4>
202b078: 01 00 00 00 nop
return 0;
if (*nleft < 2)
202b07c: c2 06 c0 00 ld [ %i3 ], %g1
202b080: 80 a0 60 01 cmp %g1, 1
202b084: 08 80 00 29 bleu 202b128 <scanString+0xec>
202b088: 01 00 00 00 nop
return 0;
**bufp = c;
202b08c: c2 06 80 00 ld [ %i2 ], %g1
202b090: d0 28 40 00 stb %o0, [ %g1 ]
++(*bufp);
202b094: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
202b098: c2 06 c0 00 ld [ %i3 ], %g1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
202b09c: 84 00 a0 01 inc %g2
202b0a0: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
202b0a4: 82 00 7f ff add %g1, -1, %g1
202b0a8: c2 26 c0 00 st %g1, [ %i3 ]
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
202b0ac: c2 06 20 04 ld [ %i0 + 4 ], %g1
202b0b0: 82 00 7f ff add %g1, -1, %g1
202b0b4: 80 a0 60 00 cmp %g1, 0
202b0b8: 16 bf ff e6 bge 202b050 <scanString+0x14>
202b0bc: c2 26 20 04 st %g1, [ %i0 + 4 ]
202b0c0: d0 07 62 48 ld [ %i5 + 0x248 ], %o0
202b0c4: 40 00 86 fd call 204ccb8 <__srget_r>
202b0c8: 92 10 00 18 mov %i0, %o1
if (c == ':') {
202b0cc: 80 a2 20 3a cmp %o0, 0x3a
202b0d0: 12 bf ff e7 bne 202b06c <scanString+0x30> <== ALWAYS TAKEN
202b0d4: 80 a2 20 0a cmp %o0, 0xa
if (nlFlag)
202b0d8: 80 a7 20 00 cmp %i4, 0
202b0dc: 12 80 00 0f bne 202b118 <scanString+0xdc>
202b0e0: b0 10 20 00 clr %i0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
202b0e4: c2 06 80 00 ld [ %i2 ], %g1
202b0e8: c0 28 40 00 clrb [ %g1 ]
++(*bufp);
202b0ec: c4 06 80 00 ld [ %i2 ], %g2
--(*nleft);
202b0f0: c2 06 c0 00 ld [ %i3 ], %g1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
202b0f4: 84 00 a0 01 inc %g2
202b0f8: c4 26 80 00 st %g2, [ %i2 ]
--(*nleft);
202b0fc: 82 00 7f ff add %g1, -1, %g1
202b100: c2 26 c0 00 st %g1, [ %i3 ]
return 1;
202b104: 81 c7 e0 08 ret
202b108: 91 e8 20 01 restore %g0, 1, %o0
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
202b10c: 80 a7 20 00 cmp %i4, 0
202b110: 12 bf ff f5 bne 202b0e4 <scanString+0xa8>
202b114: b0 10 20 00 clr %i0
202b118: 81 c7 e0 08 ret
202b11c: 81 e8 00 00 restore
return 0;
break;
}
if (c == EOF)
return 0;
202b120: 81 c7 e0 08 ret
202b124: 91 e8 20 00 restore %g0, 0, %o0
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
202b128: 81 c7 e0 08 ret
202b12c: 91 e8 20 00 restore %g0, 0, %o0
0202b130 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
202b130: 9d e3 bf 98 save %sp, -104, %sp
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
202b134: 98 10 20 00 clr %o4
202b138: 90 10 00 18 mov %i0, %o0
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
202b13c: ba 10 00 18 mov %i0, %i5
202b140: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
202b144: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
202b148: 92 10 00 19 mov %i1, %o1
202b14c: 94 07 a0 4c add %fp, 0x4c, %o2
202b150: 96 07 a0 50 add %fp, 0x50, %o3
202b154: 7f ff ff ba call 202b03c <scanString>
202b158: b0 10 20 00 clr %i0
202b15c: 80 a2 20 00 cmp %o0, 0
202b160: 12 80 00 04 bne 202b170 <scangr+0x40>
202b164: 90 10 00 1d mov %i5, %o0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
202b168: 81 c7 e0 08 ret
202b16c: 81 e8 00 00 restore
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
202b170: 92 06 60 04 add %i1, 4, %o1
202b174: 94 07 a0 4c add %fp, 0x4c, %o2
202b178: 96 07 a0 50 add %fp, 0x50, %o3
202b17c: 7f ff ff b0 call 202b03c <scanString>
202b180: 98 10 20 00 clr %o4
202b184: 80 a2 20 00 cmp %o0, 0
202b188: 02 bf ff f8 be 202b168 <scangr+0x38> <== NEVER TAKEN
202b18c: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &grgid)
202b190: 7f ff ff 5e call 202af08 <scanInt>
202b194: 92 07 bf f8 add %fp, -8, %o1
202b198: 80 a2 20 00 cmp %o0, 0
202b19c: 02 bf ff f3 be 202b168 <scangr+0x38> <== NEVER TAKEN
202b1a0: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
202b1a4: 92 07 bf fc add %fp, -4, %o1
202b1a8: 94 07 a0 4c add %fp, 0x4c, %o2
202b1ac: 96 07 a0 50 add %fp, 0x50, %o3
202b1b0: 7f ff ff a3 call 202b03c <scanString>
202b1b4: 98 10 20 01 mov 1, %o4
202b1b8: 80 a2 20 00 cmp %o0, 0
202b1bc: 02 bf ff eb be 202b168 <scangr+0x38> <== NEVER TAKEN
202b1c0: c2 07 bf f8 ld [ %fp + -8 ], %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b1c4: fa 07 bf fc ld [ %fp + -4 ], %i5
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;
202b1c8: c2 36 60 08 sth %g1, [ %i1 + 8 ]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b1cc: c6 0f 40 00 ldub [ %i5 ], %g3
202b1d0: 83 28 e0 18 sll %g3, 0x18, %g1
202b1d4: 80 a0 60 00 cmp %g1, 0
202b1d8: 02 80 00 10 be 202b218 <scangr+0xe8> <== NEVER TAKEN
202b1dc: 88 10 20 17 mov 0x17, %g4
202b1e0: 84 10 00 1d mov %i5, %g2
202b1e4: 88 10 20 01 mov 1, %g4
if(*cp == ',')
memcount++;
202b1e8: 84 00 a0 01 inc %g2
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b1ec: c6 08 80 00 ldub [ %g2 ], %g3
if(*cp == ',')
202b1f0: 83 38 60 18 sra %g1, 0x18, %g1
memcount++;
202b1f4: 82 18 60 2c xor %g1, 0x2c, %g1
202b1f8: 80 a0 00 01 cmp %g0, %g1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b1fc: 83 28 e0 18 sll %g3, 0x18, %g1
if(*cp == ',')
memcount++;
202b200: 88 61 3f ff subx %g4, -1, %g4
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b204: 80 a0 60 00 cmp %g1, 0
202b208: 32 bf ff f9 bne,a 202b1ec <scangr+0xbc>
202b20c: 84 00 a0 01 inc %g2
202b210: 89 29 20 02 sll %g4, 2, %g4
202b214: 88 01 20 13 add %g4, 0x13, %g4
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
202b218: c2 07 a0 50 ld [ %fp + 0x50 ], %g1
202b21c: 80 a0 40 04 cmp %g1, %g4
202b220: 0a bf ff d2 bcs 202b168 <scangr+0x38> <== NEVER TAKEN
202b224: b0 10 20 00 clr %i0
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
202b228: c2 07 a0 4c ld [ %fp + 0x4c ], %g1
202b22c: 82 00 60 0f add %g1, 0xf, %g1
202b230: 82 08 7f f0 and %g1, -16, %g1
202b234: c2 26 60 0c st %g1, [ %i1 + 0xc ]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
202b238: fa 20 40 00 st %i5, [ %g1 ]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b23c: c2 07 bf fc ld [ %fp + -4 ], %g1
202b240: c4 08 40 00 ldub [ %g1 ], %g2
202b244: 85 28 a0 18 sll %g2, 0x18, %g2
202b248: 80 a0 a0 00 cmp %g2, 0
202b24c: 02 80 00 15 be 202b2a0 <scangr+0x170> <== NEVER TAKEN
202b250: 86 10 20 04 mov 4, %g3
}
/*
* Extract a single group record from the database
*/
static int scangr(
202b254: 82 00 60 01 inc %g1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b258: 10 80 00 08 b 202b278 <scangr+0x148>
202b25c: 86 10 20 01 mov 1, %g3
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
202b260: 82 00 60 01 inc %g1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
202b264: c4 08 7f ff ldub [ %g1 + -1 ], %g2
202b268: 85 28 a0 18 sll %g2, 0x18, %g2
202b26c: 80 a0 a0 00 cmp %g2, 0
202b270: 22 80 00 0c be,a 202b2a0 <scangr+0x170>
202b274: 87 28 e0 02 sll %g3, 2, %g3
if(*cp == ',') {
202b278: 85 38 a0 18 sra %g2, 0x18, %g2
202b27c: 80 a0 a0 2c cmp %g2, 0x2c
202b280: 32 bf ff f9 bne,a 202b264 <scangr+0x134>
202b284: 82 00 60 01 inc %g1
*cp = '\0';
202b288: c0 28 7f ff clrb [ %g1 + -1 ]
grp->gr_mem[memcount++] = cp + 1;
202b28c: c8 06 60 0c ld [ %i1 + 0xc ], %g4
202b290: 85 28 e0 02 sll %g3, 2, %g2
202b294: 86 00 e0 01 inc %g3
202b298: 10 bf ff f2 b 202b260 <scangr+0x130>
202b29c: c2 21 00 02 st %g1, [ %g4 + %g2 ]
}
}
grp->gr_mem[memcount] = NULL;
202b2a0: c2 06 60 0c ld [ %i1 + 0xc ], %g1
202b2a4: c0 20 40 03 clr [ %g1 + %g3 ]
return 1;
}
202b2a8: 81 c7 e0 08 ret
202b2ac: 91 e8 20 01 restore %g0, 1, %o0
0202b2b0 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
202b2b0: 9d e3 bf 98 save %sp, -104, %sp
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
202b2b4: 98 10 20 00 clr %o4
202b2b8: 90 10 00 18 mov %i0, %o0
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
202b2bc: ba 10 00 18 mov %i0, %i5
202b2c0: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
202b2c4: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
202b2c8: 92 10 00 19 mov %i1, %o1
202b2cc: 94 07 a0 4c add %fp, 0x4c, %o2
202b2d0: 96 07 a0 50 add %fp, 0x50, %o3
202b2d4: 7f ff ff 5a call 202b03c <scanString>
202b2d8: b0 10 20 00 clr %i0
202b2dc: 80 a2 20 00 cmp %o0, 0
202b2e0: 12 80 00 04 bne 202b2f0 <scanpw+0x40>
202b2e4: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
202b2e8: 81 c7 e0 08 ret
202b2ec: 81 e8 00 00 restore
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
202b2f0: 92 06 60 04 add %i1, 4, %o1
202b2f4: 94 07 a0 4c add %fp, 0x4c, %o2
202b2f8: 96 07 a0 50 add %fp, 0x50, %o3
202b2fc: 7f ff ff 50 call 202b03c <scanString>
202b300: 98 10 20 00 clr %o4
202b304: 80 a2 20 00 cmp %o0, 0
202b308: 02 bf ff f8 be 202b2e8 <scanpw+0x38> <== NEVER TAKEN
202b30c: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &pwuid)
202b310: 7f ff fe fe call 202af08 <scanInt>
202b314: 92 07 bf f8 add %fp, -8, %o1
202b318: 80 a2 20 00 cmp %o0, 0
202b31c: 02 bf ff f3 be 202b2e8 <scanpw+0x38>
202b320: 90 10 00 1d mov %i5, %o0
|| !scanInt(fp, &pwgid)
202b324: 7f ff fe f9 call 202af08 <scanInt>
202b328: 92 07 bf fc add %fp, -4, %o1
202b32c: 80 a2 20 00 cmp %o0, 0
202b330: 02 bf ff ee be 202b2e8 <scanpw+0x38>
202b334: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
202b338: 92 06 60 0c add %i1, 0xc, %o1
202b33c: 94 07 a0 4c add %fp, 0x4c, %o2
202b340: 96 07 a0 50 add %fp, 0x50, %o3
202b344: 7f ff ff 3e call 202b03c <scanString>
202b348: 98 10 20 00 clr %o4
202b34c: 80 a2 20 00 cmp %o0, 0
202b350: 02 bf ff e6 be 202b2e8 <scanpw+0x38> <== NEVER TAKEN
202b354: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
202b358: 92 06 60 10 add %i1, 0x10, %o1
202b35c: 94 07 a0 4c add %fp, 0x4c, %o2
202b360: 96 07 a0 50 add %fp, 0x50, %o3
202b364: 7f ff ff 36 call 202b03c <scanString>
202b368: 98 10 20 00 clr %o4
202b36c: 80 a2 20 00 cmp %o0, 0
202b370: 02 bf ff de be 202b2e8 <scanpw+0x38> <== NEVER TAKEN
202b374: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
202b378: 92 06 60 14 add %i1, 0x14, %o1
202b37c: 94 07 a0 4c add %fp, 0x4c, %o2
202b380: 96 07 a0 50 add %fp, 0x50, %o3
202b384: 7f ff ff 2e call 202b03c <scanString>
202b388: 98 10 20 00 clr %o4
202b38c: 80 a2 20 00 cmp %o0, 0
202b390: 02 bf ff d6 be 202b2e8 <scanpw+0x38> <== NEVER TAKEN
202b394: 90 10 00 1d mov %i5, %o0
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
202b398: 92 06 60 18 add %i1, 0x18, %o1
202b39c: 94 07 a0 4c add %fp, 0x4c, %o2
202b3a0: 96 07 a0 50 add %fp, 0x50, %o3
202b3a4: 7f ff ff 26 call 202b03c <scanString>
202b3a8: 98 10 20 01 mov 1, %o4
202b3ac: 80 a2 20 00 cmp %o0, 0
202b3b0: 02 bf ff ce be 202b2e8 <scanpw+0x38>
202b3b4: c2 07 bf f8 ld [ %fp + -8 ], %g1
return 0;
pwd->pw_uid = pwuid;
202b3b8: c2 36 60 08 sth %g1, [ %i1 + 8 ]
pwd->pw_gid = pwgid;
202b3bc: c2 07 bf fc ld [ %fp + -4 ], %g1
202b3c0: c2 36 60 0a sth %g1, [ %i1 + 0xa ]
return 1;
}
202b3c4: 81 c7 e0 08 ret
202b3c8: 91 e8 20 01 restore %g0, 1, %o0
02006788 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
2006788: 9d e3 bf a0 save %sp, -96, %sp
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
200678c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
2006790: 80 88 6e 78 btst 0xe78, %g1
2006794: 32 80 00 04 bne,a 20067a4 <siproc+0x1c> <== ALWAYS TAKEN
2006798: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
200679c: 7f ff ff 82 call 20065a4 <iproc> <== NOT EXECUTED
20067a0: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20067a4: 94 10 20 00 clr %o2
20067a8: 40 00 05 61 call 2007d2c <rtems_semaphore_obtain>
20067ac: 92 10 20 00 clr %o1
i = iproc (c, tty);
20067b0: 90 10 00 18 mov %i0, %o0
20067b4: 7f ff ff 7c call 20065a4 <iproc>
20067b8: 92 10 00 19 mov %i1, %o1
20067bc: b0 10 00 08 mov %o0, %i0
rtems_semaphore_release (tty->osem);
20067c0: 40 00 05 a5 call 2007e54 <rtems_semaphore_release>
20067c4: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
}
else {
i = iproc (c, tty);
}
return i;
}
20067c8: 81 c7 e0 08 ret
20067cc: 81 e8 00 00 restore
020063e8 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
20063e8: 9d e3 bf a0 save %sp, -96, %sp
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
20063ec: c2 06 21 4c ld [ %i0 + 0x14c ], %g1
if ( this_reent ) {
20063f0: 80 a0 60 00 cmp %g1, 0
20063f4: 02 80 00 0c be 2006424 <sync_per_thread+0x3c> <== NEVER TAKEN
20063f8: 3b 00 80 7b sethi %hi(0x201ec00), %i5
current_reent = _Thread_Executing->libc_reent;
20063fc: ba 17 63 c0 or %i5, 0x3c0, %i5 ! 201efc0 <_Per_CPU_Information>
2006400: c4 07 60 0c ld [ %i5 + 0xc ], %g2
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
2006404: 13 00 80 19 sethi %hi(0x2006400), %o1
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
current_reent = _Thread_Executing->libc_reent;
2006408: f8 00 a1 4c ld [ %g2 + 0x14c ], %i4
_Thread_Executing->libc_reent = this_reent;
200640c: c2 20 a1 4c st %g1, [ %g2 + 0x14c ]
_fwalk (t->libc_reent, sync_wrapper);
2006410: d0 06 21 4c ld [ %i0 + 0x14c ], %o0
2006414: 40 00 2c e7 call 20117b0 <_fwalk>
2006418: 92 12 60 2c or %o1, 0x2c, %o1
_Thread_Executing->libc_reent = current_reent;
200641c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2006420: f8 20 61 4c st %i4, [ %g1 + 0x14c ]
2006424: 81 c7 e0 08 ret
2006428: 81 e8 00 00 restore
020166c8 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
20166c8: 9d e3 bf a0 save %sp, -96, %sp
switch (opt) {
20166cc: 80 a6 60 00 cmp %i1, 0
20166d0: 02 80 00 10 be 2016710 <tcsetattr+0x48>
20166d4: 80 a6 60 01 cmp %i1, 1
20166d8: 22 80 00 08 be,a 20166f8 <tcsetattr+0x30>
20166dc: 90 10 00 18 mov %i0, %o0
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
20166e0: 40 00 0e 51 call 201a024 <__errno>
20166e4: 01 00 00 00 nop
20166e8: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
20166ec: c2 22 00 00 st %g1, [ %o0 ]
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
20166f0: 81 c7 e0 08 ret
20166f4: 91 e8 3f ff restore %g0, -1, %o0
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
20166f8: 92 10 20 03 mov 3, %o1
20166fc: 40 00 0c f0 call 2019abc <ioctl>
2016700: 94 10 20 00 clr %o2
2016704: 80 a2 20 00 cmp %o0, 0
2016708: 06 bf ff fa bl 20166f0 <tcsetattr+0x28> <== NEVER TAKEN
201670c: 01 00 00 00 nop
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
2016710: 40 00 0c eb call 2019abc <ioctl>
2016714: 93 e8 20 02 restore %g0, 2, %o1
02007188 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
2007188: 9d e3 bf 88 save %sp, -120, %sp
for (; *fmt != '\0'; fmt++) {
200718c: c2 0e 00 00 ldub [ %i0 ], %g1
2007190: 83 28 60 18 sll %g1, 0x18, %g1
2007194: 80 a0 60 00 cmp %g1, 0
2007198: 02 80 00 7d be 200738c <vprintk+0x204> <== NEVER TAKEN
200719c: 29 00 80 72 sethi %hi(0x201c800), %l4
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
20071a0: a2 07 bf e8 add %fp, -24, %l1
20071a4: a6 07 bf e7 add %fp, -25, %l3
20071a8: 2d 00 80 6c sethi %hi(0x201b000), %l6
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
20071ac: 2f 00 80 6b sethi %hi(0x201ac00), %l7
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
20071b0: 91 38 60 18 sra %g1, 0x18, %o0
20071b4: 80 a2 20 25 cmp %o0, 0x25
20071b8: 12 80 00 8d bne 20073ec <vprintk+0x264>
20071bc: c2 05 20 40 ld [ %l4 + 0x40 ], %g1
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
20071c0: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
20071c4: 85 28 60 18 sll %g1, 0x18, %g2
20071c8: 87 38 a0 18 sra %g2, 0x18, %g3
20071cc: 80 a0 e0 30 cmp %g3, 0x30
20071d0: 22 80 00 96 be,a 2007428 <vprintk+0x2a0>
20071d4: c2 0e 20 02 ldub [ %i0 + 2 ], %g1
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
20071d8: b0 06 20 01 inc %i0
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
20071dc: aa 10 20 20 mov 0x20, %l5
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
20071e0: 87 38 a0 18 sra %g2, 0x18, %g3
20071e4: 80 a0 e0 2d cmp %g3, 0x2d
20071e8: 02 80 00 8b be 2007414 <vprintk+0x28c>
20071ec: a4 10 20 00 clr %l2
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
20071f0: 82 00 7f d0 add %g1, -48, %g1
20071f4: 82 08 60 ff and %g1, 0xff, %g1
20071f8: 80 a0 60 09 cmp %g1, 9
20071fc: 18 80 00 0f bgu 2007238 <vprintk+0xb0>
2007200: ba 10 20 00 clr %i5
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
2007204: b0 06 20 01 inc %i0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2007208: c2 0e 00 00 ldub [ %i0 ], %g1
width *= 10;
200720c: 87 2f 60 01 sll %i5, 1, %g3
width += ((unsigned) *fmt - '0');
2007210: 85 38 a0 18 sra %g2, 0x18, %g2
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
2007214: bb 2f 60 03 sll %i5, 3, %i5
2007218: ba 00 c0 1d add %g3, %i5, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
200721c: 86 00 7f d0 add %g1, -48, %g3
width *= 10;
width += ((unsigned) *fmt - '0');
2007220: ba 07 40 02 add %i5, %g2, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2007224: 86 08 e0 ff and %g3, 0xff, %g3
width *= 10;
width += ((unsigned) *fmt - '0');
2007228: ba 07 7f d0 add %i5, -48, %i5
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
200722c: 80 a0 e0 09 cmp %g3, 9
2007230: 08 bf ff f5 bleu 2007204 <vprintk+0x7c>
2007234: 85 28 60 18 sll %g1, 0x18, %g2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
2007238: 83 38 a0 18 sra %g2, 0x18, %g1
200723c: 80 a0 60 6c cmp %g1, 0x6c
2007240: 02 80 00 7e be 2007438 <vprintk+0x2b0>
2007244: 80 a0 60 63 cmp %g1, 0x63
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
2007248: 22 80 00 83 be,a 2007454 <vprintk+0x2cc>
200724c: d0 06 40 00 ld [ %i1 ], %o0
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
2007250: 80 a0 60 73 cmp %g1, 0x73
2007254: 02 80 00 8b be 2007480 <vprintk+0x2f8>
2007258: 80 a0 60 4f cmp %g1, 0x4f
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
200725c: 22 80 00 6c be,a 200740c <vprintk+0x284>
2007260: 82 10 20 00 clr %g1
2007264: 80 a0 60 6f cmp %g1, 0x6f
2007268: 22 80 00 69 be,a 200740c <vprintk+0x284>
200726c: 82 10 20 00 clr %g1
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
2007270: 80 a0 60 49 cmp %g1, 0x49
2007274: 22 80 00 06 be,a 200728c <vprintk+0x104>
2007278: 82 10 20 01 mov 1, %g1
200727c: 80 a0 60 69 cmp %g1, 0x69
2007280: 12 80 00 45 bne 2007394 <vprintk+0x20c>
2007284: 80 a0 60 44 cmp %g1, 0x44
c == 'd' || c == 'D' ) {
base = 10; sign = true;
2007288: 82 10 20 01 mov 1, %g1
200728c: a0 10 20 0a mov 0xa, %l0
} else {
BSP_output_char(c);
continue;
}
printNum(
2007290: f4 06 40 00 ld [ %i1 ], %i2
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
2007294: 80 88 60 ff btst 0xff, %g1
2007298: 02 80 00 05 be 20072ac <vprintk+0x124>
200729c: b2 06 60 04 add %i1, 4, %i1
20072a0: 80 a6 a0 00 cmp %i2, 0
20072a4: 06 80 00 bf bl 20075a0 <vprintk+0x418>
20072a8: c2 05 20 40 ld [ %l4 + 0x40 ], %g1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20072ac: 90 10 00 1a mov %i2, %o0
20072b0: 92 10 00 10 mov %l0, %o1
20072b4: 40 00 45 1b call 2018720 <.udiv>
20072b8: a4 10 00 10 mov %l0, %l2
20072bc: b8 92 20 00 orcc %o0, 0, %i4
20072c0: 12 80 00 06 bne 20072d8 <vprintk+0x150>
20072c4: b6 10 20 00 clr %i3
20072c8: 10 80 00 c4 b 20075d8 <vprintk+0x450>
20072cc: b8 10 00 1a mov %i2, %i4
20072d0: b4 10 00 1c mov %i4, %i2
20072d4: b8 10 00 08 mov %o0, %i4
toPrint[count++] = (char) (unsigned_num - (n * base));
20072d8: 92 10 00 1c mov %i4, %o1
20072dc: 40 00 44 d7 call 2018638 <.umul>
20072e0: 90 10 00 12 mov %l2, %o0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20072e4: 92 10 00 10 mov %l0, %o1
toPrint[count++] = (char) (unsigned_num - (n * base));
20072e8: b4 26 80 08 sub %i2, %o0, %i2
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20072ec: 90 10 00 1c mov %i4, %o0
20072f0: 40 00 45 0c call 2018720 <.udiv>
20072f4: f4 2c 40 1b stb %i2, [ %l1 + %i3 ]
20072f8: 80 a2 20 00 cmp %o0, 0
20072fc: 12 bf ff f5 bne 20072d0 <vprintk+0x148>
2007300: b6 06 e0 01 inc %i3
2007304: b4 06 e0 01 add %i3, 1, %i2
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
2007308: b6 07 80 1b add %fp, %i3, %i3
for (n=maxwidth ; n > count; n-- )
200730c: 80 a7 40 1a cmp %i5, %i2
2007310: 08 80 00 0b bleu 200733c <vprintk+0x1b4>
2007314: f8 2e ff e8 stb %i4, [ %i3 + -24 ]
2007318: b8 15 20 40 or %l4, 0x40, %i4
BSP_output_char(lead);
200731c: aa 0d 60 30 and %l5, 0x30, %l5
2007320: c2 07 00 00 ld [ %i4 ], %g1
2007324: 9f c0 40 00 call %g1
2007328: 90 10 00 15 mov %l5, %o0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
200732c: ba 07 7f ff add %i5, -1, %i5
2007330: 80 a7 40 1a cmp %i5, %i2
2007334: 38 bf ff fc bgu,a 2007324 <vprintk+0x19c>
2007338: c2 07 00 00 ld [ %i4 ], %g1
BSP_output_char(lead);
for (n = 0; n < count; n++) {
200733c: 80 a6 a0 00 cmp %i2, 0
2007340: 22 80 00 0f be,a 200737c <vprintk+0x1f4> <== NEVER TAKEN
2007344: c2 0e 20 01 ldub [ %i0 + 1 ], %g1 <== NOT EXECUTED
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2007348: ba 06 bf ff add %i2, -1, %i5
200734c: b8 15 20 40 or %l4, 0x40, %i4
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
2007350: ba 04 40 1d add %l1, %i5, %i5
2007354: b6 15 a3 28 or %l6, 0x328, %i3
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2007358: c4 4f 40 00 ldsb [ %i5 ], %g2
200735c: c2 07 00 00 ld [ %i4 ], %g1
2007360: d0 4e c0 02 ldsb [ %i3 + %g2 ], %o0
2007364: 9f c0 40 00 call %g1
2007368: ba 07 7f ff add %i5, -1, %i5
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
200736c: 80 a7 40 13 cmp %i5, %l3
2007370: 32 bf ff fb bne,a 200735c <vprintk+0x1d4>
2007374: c4 4f 40 00 ldsb [ %i5 ], %g2
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2007378: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
200737c: 83 28 60 18 sll %g1, 0x18, %g1
2007380: 80 a0 60 00 cmp %g1, 0
2007384: 12 bf ff 8b bne 20071b0 <vprintk+0x28>
2007388: b0 06 20 01 inc %i0
200738c: 81 c7 e0 08 ret
2007390: 81 e8 00 00 restore
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
2007394: 22 bf ff be be,a 200728c <vprintk+0x104>
2007398: 82 10 20 01 mov 1, %g1
200739c: 80 a0 60 64 cmp %g1, 0x64
20073a0: 22 bf ff bb be,a 200728c <vprintk+0x104>
20073a4: 82 10 20 01 mov 1, %g1
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
20073a8: 80 a0 60 55 cmp %g1, 0x55
20073ac: 22 80 00 8d be,a 20075e0 <vprintk+0x458>
20073b0: 82 10 20 00 clr %g1
20073b4: 80 a0 60 75 cmp %g1, 0x75
20073b8: 02 80 00 8a be 20075e0 <vprintk+0x458>
20073bc: 82 10 20 00 clr %g1
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
20073c0: 91 38 a0 18 sra %g2, 0x18, %o0
20073c4: 80 a2 20 58 cmp %o0, 0x58
20073c8: 02 80 00 88 be 20075e8 <vprintk+0x460>
20073cc: 01 00 00 00 nop
20073d0: 80 a2 20 78 cmp %o0, 0x78
20073d4: 02 bf ff af be 2007290 <vprintk+0x108>
20073d8: a0 10 20 10 mov 0x10, %l0
base = 16; sign = false;
} else if ( c == 'p' ) {
20073dc: 80 a2 20 70 cmp %o0, 0x70
20073e0: 02 bf ff ac be 2007290 <vprintk+0x108>
20073e4: 01 00 00 00 nop
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
20073e8: c2 05 20 40 ld [ %l4 + 0x40 ], %g1
20073ec: 9f c0 40 00 call %g1
20073f0: 01 00 00 00 nop
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
20073f4: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
20073f8: 83 28 60 18 sll %g1, 0x18, %g1
20073fc: 80 a0 60 00 cmp %g1, 0
2007400: 12 bf ff 6c bne 20071b0 <vprintk+0x28>
2007404: b0 06 20 01 inc %i0
2007408: 30 80 00 64 b,a 2007598 <vprintk+0x410>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
200740c: 10 bf ff a1 b 2007290 <vprintk+0x108>
2007410: a0 10 20 08 mov 8, %l0
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
2007414: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
2007418: a4 10 20 01 mov 1, %l2
fmt++;
200741c: b0 06 20 01 inc %i0
2007420: 10 bf ff 74 b 20071f0 <vprintk+0x68>
2007424: 85 28 60 18 sll %g1, 0x18, %g2
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
2007428: aa 10 20 30 mov 0x30, %l5
fmt++;
200742c: b0 06 20 02 add %i0, 2, %i0
2007430: 10 bf ff 6c b 20071e0 <vprintk+0x58>
2007434: 85 28 60 18 sll %g1, 0x18, %g2
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
2007438: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
200743c: 85 28 60 18 sll %g1, 0x18, %g2
}
if ( c == 'c' ) {
2007440: 83 38 a0 18 sra %g2, 0x18, %g1
2007444: 80 a0 60 63 cmp %g1, 0x63
2007448: 12 bf ff 82 bne 2007250 <vprintk+0xc8> <== ALWAYS TAKEN
200744c: b0 06 20 01 inc %i0
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
2007450: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
BSP_output_char(chr);
2007454: c2 05 20 40 ld [ %l4 + 0x40 ], %g1
2007458: 91 2a 20 18 sll %o0, 0x18, %o0
200745c: 9f c0 40 00 call %g1
2007460: 91 3a 20 18 sra %o0, 0x18, %o0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2007464: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
2007468: b2 06 60 04 add %i1, 4, %i1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
200746c: 83 28 60 18 sll %g1, 0x18, %g1
2007470: 80 a0 60 00 cmp %g1, 0
2007474: 12 bf ff 4f bne 20071b0 <vprintk+0x28>
2007478: b0 06 20 01 inc %i0
200747c: 30 80 00 47 b,a 2007598 <vprintk+0x410>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
2007480: f6 06 40 00 ld [ %i1 ], %i3
if ( str == NULL ) {
2007484: 80 a6 e0 00 cmp %i3, 0
2007488: 02 80 00 5a be 20075f0 <vprintk+0x468>
200748c: b2 06 60 04 add %i1, 4, %i1
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2007490: c2 4e c0 00 ldsb [ %i3 ], %g1
2007494: 80 a0 60 00 cmp %g1, 0
2007498: 02 80 00 08 be 20074b8 <vprintk+0x330>
200749c: b4 10 20 00 clr %i2
20074a0: 82 10 00 1b mov %i3, %g1
20074a4: 82 00 60 01 inc %g1
20074a8: c4 48 40 00 ldsb [ %g1 ], %g2
20074ac: 80 a0 a0 00 cmp %g2, 0
20074b0: 12 bf ff fd bne 20074a4 <vprintk+0x31c>
20074b4: b4 06 a0 01 inc %i2
;
/* leading spaces */
if ( !minus )
20074b8: a4 8c a0 ff andcc %l2, 0xff, %l2
20074bc: 12 80 00 0f bne 20074f8 <vprintk+0x370>
20074c0: 80 a7 60 00 cmp %i5, 0
for ( i=len ; i<width ; i++ )
20074c4: 80 a7 40 1a cmp %i5, %i2
20074c8: 08 80 00 0c bleu 20074f8 <vprintk+0x370>
20074cc: 80 a7 60 00 cmp %i5, 0
20074d0: a0 10 00 1a mov %i2, %l0
20074d4: b8 15 20 40 or %l4, 0x40, %i4
BSP_output_char(' ');
20074d8: c2 07 00 00 ld [ %i4 ], %g1
20074dc: 9f c0 40 00 call %g1
20074e0: 90 10 20 20 mov 0x20, %o0
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
20074e4: a0 04 20 01 inc %l0
20074e8: 80 a7 40 10 cmp %i5, %l0
20074ec: 38 bf ff fc bgu,a 20074dc <vprintk+0x354>
20074f0: c2 07 00 00 ld [ %i4 ], %g1
BSP_output_char(' ');
/* no width option */
if (width == 0) {
20074f4: 80 a7 60 00 cmp %i5, 0
20074f8: 32 80 00 07 bne,a 2007514 <vprintk+0x38c>
20074fc: d0 4e c0 00 ldsb [ %i3 ], %o0
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2007500: 80 a6 a0 00 cmp %i2, 0
2007504: 02 80 00 13 be 2007550 <vprintk+0x3c8>
2007508: 80 a4 a0 00 cmp %l2, 0
200750c: ba 10 00 1a mov %i2, %i5
2007510: d0 4e c0 00 ldsb [ %i3 ], %o0
2007514: 80 a2 20 00 cmp %o0, 0
2007518: 02 80 00 0d be 200754c <vprintk+0x3c4> <== NEVER TAKEN
200751c: c2 05 20 40 ld [ %l4 + 0x40 ], %g1
BSP_output_char(*str);
2007520: 9f c0 40 00 call %g1
2007524: b8 15 20 40 or %l4, 0x40, %i4
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2007528: 10 80 00 05 b 200753c <vprintk+0x3b4>
200752c: b6 06 e0 01 inc %i3
BSP_output_char(*str);
2007530: c2 07 00 00 ld [ %i4 ], %g1
2007534: 9f c0 40 00 call %g1
2007538: 01 00 00 00 nop
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
200753c: d0 4e c0 00 ldsb [ %i3 ], %o0
2007540: 80 a2 20 00 cmp %o0, 0
2007544: 12 bf ff fb bne 2007530 <vprintk+0x3a8>
2007548: b6 06 e0 01 inc %i3
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
200754c: 80 a4 a0 00 cmp %l2, 0
2007550: 22 bf ff 8b be,a 200737c <vprintk+0x1f4>
2007554: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
for ( i=len ; i<width ; i++ )
2007558: 80 a6 80 1d cmp %i2, %i5
200755c: 3a bf ff 88 bcc,a 200737c <vprintk+0x1f4>
2007560: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2007564: b8 15 20 40 or %l4, 0x40, %i4
BSP_output_char(' ');
2007568: c2 07 00 00 ld [ %i4 ], %g1
200756c: 9f c0 40 00 call %g1
2007570: 90 10 20 20 mov 0x20, %o0
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
2007574: b4 06 a0 01 inc %i2
2007578: 80 a6 80 1d cmp %i2, %i5
200757c: 2a bf ff fc bcs,a 200756c <vprintk+0x3e4>
2007580: c2 07 00 00 ld [ %i4 ], %g1
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
2007584: c2 0e 20 01 ldub [ %i0 + 1 ], %g1
2007588: 83 28 60 18 sll %g1, 0x18, %g1
200758c: 80 a0 60 00 cmp %g1, 0
2007590: 12 bf ff 08 bne 20071b0 <vprintk+0x28> <== ALWAYS TAKEN
2007594: b0 06 20 01 inc %i0
2007598: 81 c7 e0 08 ret
200759c: 81 e8 00 00 restore
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
20075a0: 9f c0 40 00 call %g1
20075a4: 90 10 20 2d mov 0x2d, %o0
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
20075a8: 80 a0 00 1d cmp %g0, %i5
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
20075ac: b4 20 00 1a neg %i2
if (maxwidth) maxwidth--;
20075b0: ba 67 60 00 subx %i5, 0, %i5
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
20075b4: 90 10 00 1a mov %i2, %o0
20075b8: 92 10 00 10 mov %l0, %o1
20075bc: 40 00 44 59 call 2018720 <.udiv>
20075c0: a4 10 00 10 mov %l0, %l2
20075c4: b8 92 20 00 orcc %o0, 0, %i4
20075c8: 12 bf ff 44 bne 20072d8 <vprintk+0x150> <== ALWAYS TAKEN
20075cc: b6 10 20 00 clr %i3
20075d0: b8 10 00 1a mov %i2, %i4 <== NOT EXECUTED
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
20075d4: b6 10 20 00 clr %i3 <== NOT EXECUTED
while ((n = unsigned_num / base) > 0) {
20075d8: 10 bf ff 4c b 2007308 <vprintk+0x180>
20075dc: b4 10 20 01 mov 1, %i2
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
20075e0: 10 bf ff 2c b 2007290 <vprintk+0x108>
20075e4: a0 10 20 0a mov 0xa, %l0
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
20075e8: 10 bf ff 2a b 2007290 <vprintk+0x108>
20075ec: a0 10 20 10 mov 0x10, %l0
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
20075f0: 10 bf ff a8 b 2007490 <vprintk+0x308>
20075f4: b6 15 e0 10 or %l7, 0x10, %i3
0201a2e4 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
201a2e4: 9d e3 bf a0 save %sp, -96, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201a2e8: 03 00 80 71 sethi %hi(0x201c400), %g1
201a2ec: c2 00 63 7c ld [ %g1 + 0x37c ], %g1 ! 201c77c <rtems_libio_number_iops>
201a2f0: 80 a6 00 01 cmp %i0, %g1
201a2f4: 1a 80 00 20 bcc 201a374 <write+0x90>
201a2f8: 03 00 80 74 sethi %hi(0x201d000), %g1
iop = rtems_libio_iop( fd );
201a2fc: fa 00 62 38 ld [ %g1 + 0x238 ], %i5 ! 201d238 <rtems_libio_iops>
201a300: 83 2e 20 03 sll %i0, 3, %g1
201a304: b1 2e 20 06 sll %i0, 6, %i0
201a308: b0 00 40 18 add %g1, %i0, %i0
201a30c: ba 07 40 18 add %i5, %i0, %i5
rtems_libio_check_is_open( iop );
201a310: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
201a314: 80 88 61 00 btst 0x100, %g1
201a318: 02 80 00 17 be 201a374 <write+0x90>
201a31c: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
201a320: 02 80 00 1b be 201a38c <write+0xa8> <== NEVER TAKEN
201a324: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201a328: 02 80 00 11 be 201a36c <write+0x88>
201a32c: b0 10 20 00 clr %i0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
201a330: 80 88 60 04 btst 4, %g1
201a334: 02 80 00 10 be 201a374 <write+0x90>
201a338: 90 10 00 1d mov %i5, %o0
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
201a33c: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
201a340: c2 00 60 0c ld [ %g1 + 0xc ], %g1
201a344: 92 10 00 19 mov %i1, %o1
201a348: 9f c0 40 00 call %g1
201a34c: 94 10 00 1a mov %i2, %o2
if ( rc > 0 )
201a350: b0 92 20 00 orcc %o0, 0, %i0
201a354: 04 80 00 06 ble 201a36c <write+0x88>
201a358: 85 3e 20 1f sra %i0, 0x1f, %g2
iop->offset += rc;
201a35c: d8 1f 60 10 ldd [ %i5 + 0x10 ], %o4
201a360: 86 83 40 18 addcc %o5, %i0, %g3
201a364: 84 43 00 02 addx %o4, %g2, %g2
201a368: c4 3f 60 10 std %g2, [ %i5 + 0x10 ]
return rc;
}
201a36c: 81 c7 e0 08 ret
201a370: 81 e8 00 00 restore
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 );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
201a374: 7f ff d5 03 call 200f780 <__errno>
201a378: b0 10 3f ff mov -1, %i0
201a37c: 82 10 20 09 mov 9, %g1
201a380: c2 22 00 00 st %g1, [ %o0 ]
201a384: 81 c7 e0 08 ret
201a388: 81 e8 00 00 restore
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
201a38c: 7f ff d4 fd call 200f780 <__errno> <== NOT EXECUTED
201a390: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
201a394: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
201a398: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201a39c: 81 c7 e0 08 ret <== NOT EXECUTED
201a3a0: 81 e8 00 00 restore <== NOT EXECUTED
02008734 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
2008734: 9d e3 bf a0 save %sp, -96, %sp
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
2008738: 03 00 80 74 sethi %hi(0x201d000), %g1
200873c: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 201d2ac <rtems_libio_number_iops>
2008740: 80 a6 00 01 cmp %i0, %g1
2008744: 1a 80 00 52 bcc 200888c <writev+0x158>
2008748: 03 00 80 77 sethi %hi(0x201dc00), %g1
iop = rtems_libio_iop( fd );
200874c: f6 00 61 68 ld [ %g1 + 0x168 ], %i3 ! 201dd68 <rtems_libio_iops>
2008750: 83 2e 20 03 sll %i0, 3, %g1
2008754: b1 2e 20 06 sll %i0, 6, %i0
2008758: b0 00 40 18 add %g1, %i0, %i0
200875c: b6 06 c0 18 add %i3, %i0, %i3
rtems_libio_check_is_open( iop );
2008760: c2 06 e0 18 ld [ %i3 + 0x18 ], %g1
2008764: 80 88 61 00 btst 0x100, %g1
2008768: 02 80 00 49 be 200888c <writev+0x158>
200876c: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2008770: 02 80 00 47 be 200888c <writev+0x158> <== NEVER TAKEN
2008774: 80 a6 60 00 cmp %i1, 0
/*
* Argument validation on IO vector
*/
if ( !iov )
2008778: 02 80 00 3f be 2008874 <writev+0x140>
200877c: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
2008780: 04 80 00 3d ble 2008874 <writev+0x140>
2008784: 80 a6 a4 00 cmp %i2, 0x400
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
2008788: 14 80 00 3b bg 2008874 <writev+0x140> <== NEVER TAKEN
200878c: b5 2e a0 03 sll %i2, 3, %i2
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
2008790: 82 10 20 00 clr %g1
2008794: ba 10 20 01 mov 1, %i5
2008798: 84 10 20 00 clr %g2
/*
* 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 )
200879c: c6 06 40 01 ld [ %i1 + %g1 ], %g3
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
20087a0: b8 06 40 01 add %i1, %g1, %i4
/*
* 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 )
20087a4: 80 a0 e0 00 cmp %g3, 0
20087a8: 02 80 00 33 be 2008874 <writev+0x140>
20087ac: 88 10 20 01 mov 1, %g4
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
20087b0: c6 07 20 04 ld [ %i4 + 4 ], %g3
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
20087b4: 82 00 60 08 add %g1, 8, %g1
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
20087b8: 80 a0 00 03 cmp %g0, %g3
20087bc: b8 40 3f ff addx %g0, -1, %i4
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
20087c0: 86 80 c0 02 addcc %g3, %g2, %g3
20087c4: 0c 80 00 2c bneg 2008874 <writev+0x140>
20087c8: ba 0f 40 1c and %i5, %i4, %i5
20087cc: 80 a0 80 03 cmp %g2, %g3
20087d0: 24 80 00 02 ble,a 20087d8 <writev+0xa4>
20087d4: 88 10 20 00 clr %g4
20087d8: 80 89 20 ff btst 0xff, %g4
20087dc: 12 80 00 26 bne 2008874 <writev+0x140>
20087e0: 80 a0 40 1a cmp %g1, %i2
* 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++ ) {
20087e4: 12 bf ff ee bne 200879c <writev+0x68>
20087e8: 84 10 00 03 mov %g3, %g2
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
20087ec: 80 8f 60 ff btst 0xff, %i5
20087f0: 12 80 00 1f bne 200886c <writev+0x138>
20087f4: b0 10 20 00 clr %i0
20087f8: 10 80 00 05 b 200880c <writev+0xd8>
20087fc: ba 10 20 00 clr %i5
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
2008800: 80 a7 40 1a cmp %i5, %i2
2008804: 02 80 00 26 be 200889c <writev+0x168>
2008808: 01 00 00 00 nop
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
200880c: b8 06 40 1d add %i1, %i5, %i4
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
2008810: d4 07 20 04 ld [ %i4 + 4 ], %o2
2008814: 80 a2 a0 00 cmp %o2, 0
2008818: 22 bf ff fa be,a 2008800 <writev+0xcc> <== NEVER TAKEN
200881c: ba 07 60 08 add %i5, 8, %i5 <== NOT EXECUTED
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
2008820: c2 06 e0 2c ld [ %i3 + 0x2c ], %g1
2008824: d2 06 40 1d ld [ %i1 + %i5 ], %o1
2008828: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200882c: 9f c0 40 00 call %g1
2008830: 90 10 00 1b mov %i3, %o0
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
2008834: 80 a2 20 00 cmp %o0, 0
2008838: 06 80 00 1b bl 20088a4 <writev+0x170> <== NEVER TAKEN
200883c: 01 00 00 00 nop
return -1;
if ( bytes > 0 ) {
2008840: 02 80 00 07 be 200885c <writev+0x128> <== NEVER TAKEN
2008844: a1 3a 20 1f sra %o0, 0x1f, %l0
iop->offset += bytes;
2008848: c4 1e e0 10 ldd [ %i3 + 0x10 ], %g2
200884c: 86 80 c0 08 addcc %g3, %o0, %g3
total += bytes;
2008850: b0 06 00 08 add %i0, %o0, %i0
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
2008854: 84 40 80 10 addx %g2, %l0, %g2
2008858: c4 3e e0 10 std %g2, [ %i3 + 0x10 ]
total += bytes;
}
if (bytes != iov[ v ].iov_len)
200885c: c2 07 20 04 ld [ %i4 + 4 ], %g1
2008860: 80 a2 00 01 cmp %o0, %g1
2008864: 02 bf ff e7 be 2008800 <writev+0xcc> <== ALWAYS TAKEN
2008868: ba 07 60 08 add %i5, 8, %i5
break;
}
return total;
}
200886c: 81 c7 e0 08 ret
2008870: 81 e8 00 00 restore
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
2008874: 40 00 1f 93 call 20106c0 <__errno>
2008878: b0 10 3f ff mov -1, %i0
200887c: 82 10 20 16 mov 0x16, %g1
2008880: c2 22 00 00 st %g1, [ %o0 ]
2008884: 81 c7 e0 08 ret
2008888: 81 e8 00 00 restore
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
200888c: 40 00 1f 8d call 20106c0 <__errno>
2008890: b0 10 3f ff mov -1, %i0
2008894: 82 10 20 09 mov 9, %g1
2008898: c2 22 00 00 st %g1, [ %o0 ]
200889c: 81 c7 e0 08 ret
20088a0: 81 e8 00 00 restore
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
20088a4: 81 c7 e0 08 ret <== NOT EXECUTED
20088a8: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED