RTEMS 4.11Annotated Report
Fri Dec 21 23:31:04 2012
000448f4 <IMFS_dump_directory>:
*/
static void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
448f4: 4e56 ffdc linkw %fp,#-36
448f8: 206e 0008 moveal %fp@(8),%a0
448fc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
44900: 262e 000c movel %fp@(12),%d3
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 ));
44904: 2808 movel %a0,%d4
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
IMFS_dump_directory( the_jnode, level + 1 );
44906: 2c03 movel %d3,%d6
44908: 0684 0000 0052 addil #82,%d4
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
4490e: 47f9 0005 01e2 lea 501e2 <fputs>,%a3
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
44914: 49f9 0005 008e lea 5008e <fprintf>,%a4
return;
}
puts("");
4491a: 4bf9 0005 19d8 lea 519d8 <puts>,%a5
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( IMFS_type( the_jnode ) ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
44920: 2a3c 0005 010c movel #327948,%d5
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
IMFS_dump_directory( the_jnode, level + 1 );
44926: 5286 addql #1,%d6
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
44928: 2468 004e moveal %a0@(78),%a2
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 );
4492c: 6000 00f6 braw 44a24 <IMFS_dump_directory+0x130>
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
44930: 2f28 0008 movel %a0@(8),%sp@-
!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++ )
44934: 5282 addql #1,%d2
fprintf(stdout, "...." );
44936: 4879 0006 03b9 pea 603b9 <map.6766+0x11>
4493c: 4e93 jsr %a3@
!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++ )
4493e: 508f addql #8,%sp
44940: 6002 bras 44944 <IMFS_dump_directory+0x50>
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 );
44942: 4282 clrl %d2
44944: 2079 0006 1c80 moveal 61c80 <_impure_ptr>,%a0
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
4494a: b682 cmpl %d2,%d3
4494c: 6ce2 bges 44930 <IMFS_dump_directory+0x3c>
IMFS_jnode_t *the_jnode
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
4494e: 2f28 0008 movel %a0@(8),%sp@-
44952: 486a 000c pea %a2@(12)
44956: 4e93 jsr %a3@
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
44958: 206a 004a moveal %a2@(74),%a0
switch( IMFS_type( the_jnode ) ) {
4495c: 508f addql #8,%sp
4495e: 7206 moveq #6,%d1
44960: 2010 movel %a0@,%d0
44962: 2079 0006 1c80 moveal 61c80 <_impure_ptr>,%a0
44968: b280 cmpl %d0,%d1
4496a: 6500 0086 bcsw 449f2 <IMFS_dump_directory+0xfe>
4496e: 303b 0a08 movew %pc@(44978 <IMFS_dump_directory+0x84>,%d0:l:2),%d0
44972: 48c0 extl %d0
44974: 4efb 0802 jmp %pc@(44978 <IMFS_dump_directory+0x84>,%d0:l)
44978: 000e .short 0x000e <== NOT EXECUTED
4497a: 001e .short 0x001e <== NOT EXECUTED
4497c: 005e .short 0x005e <== NOT EXECUTED
4497e: 005e .short 0x005e <== NOT EXECUTED
44980: 0048 .short 0x0048 <== NOT EXECUTED
44982: 002e .short 0x002e <== NOT EXECUTED
44984: 006a .short 0x006a <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
44986: 2f28 0008 movel %a0@(8),%sp@-
4498a: 2045 moveal %d5,%a0
4498c: 4878 002f pea 2f <OPER2+0x1b>
44990: 4e90 jsr %a0@
44992: 508f addql #8,%sp
44994: 6070 bras 44a06 <IMFS_dump_directory+0x112>
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
44996: 2f2a 0052 movel %a2@(82),%sp@-
4499a: 2f2a 004e movel %a2@(78),%sp@-
4499e: 4879 0006 03be pea 603be <map.6766+0x16>
449a4: 600e bras 449b4 <IMFS_dump_directory+0xc0>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
449a6: 2f2a 0056 movel %a2@(86),%sp@-
449aa: 2f2a 0052 movel %a2@(82),%sp@-
449ae: 4879 0006 03d1 pea 603d1 <map.6766+0x29>
449b4: 2f28 0008 movel %a0@(8),%sp@-
449b8: 4e94 jsr %a4@
449ba: 4fef 0010 lea %sp@(16),%sp
449be: 6046 bras 44a06 <IMFS_dump_directory+0x112>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
449c0: 2f2a 0052 movel %a2@(82),%sp@-
449c4: 4879 0006 03e0 pea 603e0 <map.6766+0x38>
449ca: 2f28 0008 movel %a0@(8),%sp@-
449ce: 4e94 jsr %a4@
449d0: 4fef 000c lea %sp@(12),%sp
449d4: 6030 bras 44a06 <IMFS_dump_directory+0x112>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
449d6: 2f28 0008 movel %a0@(8),%sp@-
449da: 4879 0006 03ec pea 603ec <map.6766+0x44>
449e0: 600a bras 449ec <IMFS_dump_directory+0xf8>
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
449e2: 2f28 0008 movel %a0@(8),%sp@-
449e6: 4879 0006 0400 pea 60400 <map.6766+0x58>
449ec: 4e93 jsr %a3@
449ee: 508f addql #8,%sp
449f0: 601e bras 44a10 <IMFS_dump_directory+0x11c>
return;
default:
fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) );
449f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
449f4: 4879 0006 0413 pea 60413 <map.6766+0x6b> <== NOT EXECUTED
449fa: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
449fe: 4e94 jsr %a4@ <== NOT EXECUTED
44a00: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44a04: 600a bras 44a10 <IMFS_dump_directory+0x11c> <== NOT EXECUTED
return;
}
puts("");
44a06: 4879 0006 0bfa pea 60bfa <rtems_termios_baud_table+0x10a>
44a0c: 4e95 jsr %a5@
44a0e: 588f addql #4,%sp
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
44a10: 206a 004a moveal %a2@(74),%a0
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 ) )
44a14: 4a90 tstl %a0@
44a16: 660a bnes 44a22 <IMFS_dump_directory+0x12e>
IMFS_dump_directory( the_jnode, level + 1 );
44a18: 2f06 movel %d6,%sp@-
44a1a: 2f0a movel %a2,%sp@-
44a1c: 4eba fed6 jsr %pc@(448f4 <IMFS_dump_directory>)
44a20: 508f addql #8,%sp
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 ) {
44a22: 2452 moveal %a2@,%a2
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 );
44a24: b88a cmpl %a2,%d4
44a26: 6600 ff1a bnew 44942 <IMFS_dump_directory+0x4e>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( IMFS_is_directory( the_jnode ) )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
44a2a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
44a30: 4e5e unlk %fp <== NOT EXECUTED
000498c2 <IMFS_eval_token>:
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(
498c2: 4280 clrl %d0
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
498c4: 4e56 ffe4 linkw %fp,#-28
498c8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
498cc: 266e 0008 moveal %fp@(8),%a3
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;
498d0: 286b 0020 moveal %a3@(32),%a4
bool access_ok = rtems_filesystem_eval_path_check_access(
498d4: 302c 003c movew %a4@(60),%d0
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
498d8: 2a6e 0010 moveal %fp@(16),%a5
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(
498dc: 2f00 movel %d0,%sp@-
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
498de: 242e 0014 movel %fp@(20),%d2
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(
498e2: 302c 003a movew %a4@(58),%d0
498e6: 2f00 movel %d0,%sp@-
498e8: 2f2c 002e movel %a4@(46),%sp@-
498ec: 4878 0001 pea 1 <ADD>
498f0: 2f0b movel %a3,%sp@-
498f2: 4eb9 0004 a45a jsr 4a45a <rtems_filesystem_eval_path_check_access>
dir->st_mode,
dir->st_uid,
dir->st_gid
);
if ( access_ok ) {
498f8: 4fef 0014 lea %sp@(20),%sp
498fc: 4a00 tstb %d0
498fe: 6604 bnes 49904 <IMFS_eval_token+0x42>
49900: 6000 013c braw 49a3e <IMFS_eval_token+0x17c>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
49904: 7001 moveq #1,%d0
49906: b082 cmpl %d2,%d0
49908: 6610 bnes 4991a <IMFS_eval_token+0x58>
4990a: 722e moveq #46,%d1
4990c: 1015 moveb %a5@,%d0
4990e: b380 eorl %d1,%d0
49910: 4a00 tstb %d0
49912: 57c0 seq %d0
49914: 49c0 extbl %d0
49916: 4480 negl %d0
49918: 6002 bras 4991c <IMFS_eval_token+0x5a>
4991a: 4280 clrl %d0
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
4991c: 0800 0000 btst #0,%d0
49920: 667c bnes 4999e <IMFS_eval_token+0xdc>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
49922: 7602 moveq #2,%d3
49924: b682 cmpl %d2,%d3
49926: 661a bnes 49942 <IMFS_eval_token+0x80>
49928: 722e moveq #46,%d1
4992a: 1015 moveb %a5@,%d0
4992c: 49c0 extbl %d0
4992e: b280 cmpl %d0,%d1
49930: 6610 bnes 49942 <IMFS_eval_token+0x80>
49932: 102d 0001 moveb %a5@(1),%d0
49936: b380 eorl %d1,%d0
49938: 4a00 tstb %d0
4993a: 57c0 seq %d0
4993c: 49c0 extbl %d0
4993e: 4480 negl %d0
49940: 6002 bras 49944 <IMFS_eval_token+0x82>
49942: 4280 clrl %d0
return dir;
} else {
if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) {
49944: 0800 0000 btst #0,%d0
49948: 6706 beqs 49950 <IMFS_eval_token+0x8e>
return dir->Parent;
4994a: 246c 0008 moveal %a4@(8),%a2
4994e: 6046 bras 49996 <IMFS_eval_token+0xd4>
} 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 );
49950: 260c movel %a4,%d3
49952: 0683 0000 0052 addil #82,%d3
while ( current != tail ) {
IMFS_jnode_t *entry = (IMFS_jnode_t *) current;
bool match = strncmp( entry->name, token, tokenlen ) == 0
49958: 283c 0004 d6ac movel #317100,%d4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4995e: 246c 004e moveal %a4@(78),%a2
49962: 602a bras 4998e <IMFS_eval_token+0xcc>
49964: 2f02 movel %d2,%sp@-
49966: 2044 moveal %d4,%a0
49968: 2f0d movel %a5,%sp@-
4996a: 486a 000c pea %a2@(12)
4996e: 4e90 jsr %a0@
49970: 4fef 000c lea %sp@(12),%sp
&& entry->name [tokenlen] == '\0';
49974: 4a80 tstl %d0
49976: 660c bnes 49984 <IMFS_eval_token+0xc2>
49978: 4a32 280c tstb %a2@(0000000c,%d2:l)
4997c: 57c0 seq %d0
4997e: 49c0 extbl %d0
49980: 4480 negl %d0
49982: 6002 bras 49986 <IMFS_eval_token+0xc4>
49984: 4280 clrl %d0
if ( match ) {
49986: 0800 0000 btst #0,%d0
4998a: 660a bnes 49996 <IMFS_eval_token+0xd4>
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
4998c: 2452 moveal %a2@,%a2
} 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 ) {
4998e: b68a cmpl %a2,%d3
49990: 66d2 bnes 49964 <IMFS_eval_token+0xa2>
49992: 6000 00ae braw 49a42 <IMFS_eval_token+0x180>
);
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
49996: 4a8a tstl %a2
49998: 6606 bnes 499a0 <IMFS_eval_token+0xde>
4999a: 6000 00a6 braw 49a42 <IMFS_eval_token+0x180>
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
4999e: 244c moveal %a4,%a2
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
499a0: 206a 004a moveal %a2@(74),%a0
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)) {
499a4: 7602 moveq #2,%d3
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
bool terminal = !rtems_filesystem_eval_path_has_path( ctx );
499a6: 4aab 0004 tstl %a3@(4)
499aa: 57c0 seq %d0
499ac: 2210 movel %a0@,%d1
499ae: 4480 negl %d0
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
499b0: 242b 0010 movel %a3@(16),%d2
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
499b4: 42ab 000c clrl %a3@(12)
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)) {
499b8: b681 cmpl %d1,%d3
499ba: 6610 bnes 499cc <IMFS_eval_token+0x10a>
499bc: 44c2 movew %d2,%ccr
499be: 6b06 bmis 499c6 <IMFS_eval_token+0x104>
499c0: 4a00 tstb %d0
499c2: 6600 0082 bnew 49a46 <IMFS_eval_token+0x184>
entry = entry->info.hard_link.link_node;
499c6: 246a 004e moveal %a2@(78),%a2
499ca: 607a bras 49a46 <IMFS_eval_token+0x184>
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
499cc: 7603 moveq #3,%d3
499ce: b681 cmpl %d1,%d3
499d0: 6628 bnes 499fa <IMFS_eval_token+0x138>
499d2: 0802 0004 btst #4,%d2
499d6: 6604 bnes 499dc <IMFS_eval_token+0x11a>
499d8: 4a00 tstb %d0
499da: 666a bnes 49a46 <IMFS_eval_token+0x184>
const char *target = entry->info.sym_link.name;
499dc: 242a 004e movel %a2@(78),%d2
rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) );
499e0: 2f02 movel %d2,%sp@-
499e2: 4eb9 0004 d690 jsr 4d690 <strlen>
499e8: 2e80 movel %d0,%sp@
499ea: 2f02 movel %d2,%sp@-
499ec: 2f0b movel %a3,%sp@-
499ee: 4eb9 0004 3c4a jsr 43c4a <rtems_filesystem_eval_path_recursive>
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)) {
499f4: 4fef 000c lea %sp@(12),%sp
499f8: 6044 bras 49a3e <IMFS_eval_token+0x17c>
IMFS_jnode_types_t type
)
{
rtems_filesystem_global_location_t **fs_root_ptr = NULL;
if ( type == IMFS_DIRECTORY ) {
499fa: 4a81 tstl %d1
499fc: 6648 bnes 49a46 <IMFS_eval_token+0x184>
if ( node->info.directory.mt_fs != NULL ) {
499fe: 222a 005a movel %a2@(90),%d1
49a02: 6742 beqs 49a46 <IMFS_eval_token+0x184>
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
49a04: 4280 clrl %d0
{
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;
49a06: 2401 movel %d1,%d2
49a08: 0682 0000 0024 addil #36,%d2
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
49a0e: 302a 003c movew %a2@(60),%d0
49a12: 2f00 movel %d0,%sp@-
49a14: 302a 003a movew %a2@(58),%d0
49a18: 2f00 movel %d0,%sp@-
49a1a: 2f2a 002e movel %a2@(46),%sp@-
49a1e: 4878 0001 pea 1 <ADD>
49a22: 2f0b movel %a3,%sp@-
49a24: 4eb9 0004 a45a jsr 4a45a <rtems_filesystem_eval_path_check_access>
RTEMS_FS_PERMS_EXEC,
entry->st_mode,
entry->st_uid,
entry->st_gid
);
if ( access_ok ) {
49a2a: 4fef 0014 lea %sp@(20),%sp
49a2e: 4a00 tstb %d0
49a30: 670c beqs 49a3e <IMFS_eval_token+0x17c> <== NEVER TAKEN
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
49a32: 2f02 movel %d2,%sp@-
49a34: 2f0b movel %a3,%sp@-
49a36: 4eb9 0004 3bd6 jsr 43bd6 <rtems_filesystem_eval_path_restart>
49a3c: 508f addql #8,%sp
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
49a3e: 7001 moveq #1,%d0
49a40: 602c bras 49a6e <IMFS_eval_token+0x1ac>
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
}
}
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
49a42: 7002 moveq #2,%d0
49a44: 6028 bras 49a6e <IMFS_eval_token+0x1ac>
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;
49a46: 206a 004a moveal %a2@(74),%a0
} else {
rtems_filesystem_global_location_t **fs_root_ptr =
IMFS_is_mount_point( entry, type );
if ( fs_root_ptr == NULL ) {
--dir->reference_count;
49a4a: 322c 0032 movew %a4@(50),%d1
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
49a4e: 0280 0000 00ff andil #255,%d0
} else {
rtems_filesystem_global_location_t **fs_root_ptr =
IMFS_is_mount_point( entry, type );
if ( fs_root_ptr == NULL ) {
--dir->reference_count;
49a54: 5381 subql #1,%d1
49a56: 3941 0032 movew %d1,%a4@(50)
++entry->reference_count;
49a5a: 322a 0032 movew %a2@(50),%d1
49a5e: 5281 addql #1,%d1
49a60: 3541 0032 movew %d1,%a2@(50)
currentloc->node_access = entry;
49a64: 274a 0020 movel %a2,%a3@(32)
49a68: 2768 0004 0028 movel %a0@(4),%a3@(40)
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
}
}
return status;
}
49a6e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
49a74: 4e5e unlk %fp <== NOT EXECUTED
00042b6c <IMFS_fifo_write>:
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42b6c: 4e56 fff8 linkw %fp,#-8
42b70: 206e 0008 moveal %fp@(8),%a0
42b74: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
42b76: 2468 0018 moveal %a0@(24),%a2
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42b7a: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
42b7c: 2f08 movel %a0,%sp@-
42b7e: 2f2e 0010 movel %fp@(16),%sp@-
42b82: 2f2e 000c movel %fp@(12),%sp@-
42b86: 2f2a 004e movel %a2@(78),%sp@-
42b8a: 4eb9 0004 be68 jsr 4be68 <pipe_write>
if (err > 0) {
42b90: 4fef 0010 lea %sp@(16),%sp
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
42b94: 2400 movel %d0,%d2
if (err > 0) {
42b96: 6f1c bles 42bb4 <IMFS_fifo_write+0x48>
IMFS_mtime_ctime_update(jnode);
42b98: 42a7 clrl %sp@-
42b9a: 486e fff8 pea %fp@(-8)
42b9e: 4eb9 0004 3b3c jsr 43b3c <gettimeofday>
42ba4: 202e fff8 movel %fp@(-8),%d0
42ba8: 508f addql #8,%sp
42baa: 2540 0042 movel %d0,%a2@(66)
42bae: 2540 0046 movel %d0,%a2@(70)
42bb2: 6012 bras 42bc6 <IMFS_fifo_write+0x5a>
}
IMFS_FIFO_RETURN(err);
42bb4: 4a80 tstl %d0
42bb6: 670e beqs 42bc6 <IMFS_fifo_write+0x5a> <== NEVER TAKEN
42bb8: 4eb9 0004 db38 jsr 4db38 <__errno>
42bbe: 4482 negl %d2
42bc0: 2040 moveal %d0,%a0
42bc2: 2082 movel %d2,%a0@
42bc4: 74ff moveq #-1,%d2
}
42bc6: 2002 movel %d2,%d0
42bc8: 242e fff0 movel %fp@(-16),%d2
42bcc: 246e fff4 moveal %fp@(-12),%a2
42bd0: 4e5e unlk %fp <== NOT EXECUTED
00049adc <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
)
{
49adc: 4e56 ffd4 linkw %fp,#-44
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
49ae0: 206e 0008 moveal %fp@(8),%a0
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
void IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
49ae4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
49ae8: 2668 0024 moveal %a0@(36),%a3
49aec: 4878 0018 pea 18 <OPER2+0x4>
49af0: 240e movel %fp,%d2
49af2: 0682 ffff ffe8 addil #-24,%d2
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
result = IMFS_rmnod( NULL, &loc );
49af8: 49f9 0004 25d0 lea 425d0 <IMFS_rmnod>,%a4
if ( result != 0 )
rtems_fatal_error_occurred( 0xdeadbeef );
IMFS_node_destroy( jnode );
49afe: 4bf9 0004 22b6 lea 422b6 <IMFS_node_destroy>,%a5
/*
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
loc = temp_mt_entry->mt_fs_root->location;
49b04: 2f0b movel %a3,%sp@-
49b06: 2f02 movel %d2,%sp@-
49b08: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
jnode = (IMFS_jnode_t *)loc.node_access;
49b0e: 246e fff0 moveal %fp@(-16),%a2
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
49b12: 4fef 000c lea %sp@(12),%sp
49b16: 42ab 0008 clrl %a3@(8)
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
result = IMFS_rmnod( NULL, &loc );
49b1a: 2642 moveal %d2,%a3
49b1c: 6002 bras 49b20 <IMFS_fsunmount+0x44>
if ( IMFS_is_directory( jnode ) ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
49b1e: 2440 moveal %d0,%a2
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
do {
next = jnode->Parent;
49b20: 242a 0008 movel %a2@(8),%d2
49b24: 206a 004a moveal %a2@(74),%a0
49b28: 2d68 0004 fff8 movel %a0@(4),%fp@(-8)
loc.node_access = (void *)jnode;
49b2e: 2d4a fff0 movel %a2,%fp@(-16)
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
49b32: 4a90 tstl %a0@
49b34: 660e bnes 49b44 <IMFS_fsunmount+0x68>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
49b36: 200a movel %a2,%d0
49b38: 0680 0000 0052 addil #82,%d0
49b3e: b0aa 004e cmpl %a2@(78),%d0
49b42: 6624 bnes 49b68 <IMFS_fsunmount+0x8c>
result = IMFS_rmnod( NULL, &loc );
49b44: 2f0b movel %a3,%sp@-
49b46: 42a7 clrl %sp@-
49b48: 4e94 jsr %a4@
if ( result != 0 )
49b4a: 508f addql #8,%sp
49b4c: 4a80 tstl %d0
49b4e: 670c beqs 49b5c <IMFS_fsunmount+0x80> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
49b50: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
49b56: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
IMFS_node_destroy( jnode );
49b5c: 2f0a movel %a2,%sp@-
49b5e: 4e95 jsr %a5@
jnode = next;
}
if ( jnode != NULL ) {
49b60: 588f addql #4,%sp
49b62: 4a82 tstl %d2
49b64: 671e beqs 49b84 <IMFS_fsunmount+0xa8>
49b66: 2442 moveal %d2,%a2
return node->control->imfs_type;
}
static inline bool IMFS_is_directory( const IMFS_jnode_t *node )
{
return node->control->imfs_type == IMFS_DIRECTORY;
49b68: 206a 004a moveal %a2@(74),%a0
if ( IMFS_is_directory( jnode ) ) {
49b6c: 4a90 tstl %a0@
49b6e: 66b0 bnes 49b20 <IMFS_fsunmount+0x44> <== NEVER TAKEN
49b70: 220a movel %a2,%d1
49b72: 0681 0000 0052 addil #82,%d1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
49b78: 202a 004e movel %a2@(78),%d0
if ( jnode_has_children( jnode ) )
49b7c: b280 cmpl %d0,%d1
49b7e: 67a0 beqs 49b20 <IMFS_fsunmount+0x44>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
49b80: 4a80 tstl %d0
49b82: 669a bnes 49b1e <IMFS_fsunmount+0x42> <== ALWAYS TAKEN
}
49b84: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5
49b8a: 4e5e unlk %fp
...
000421b4 <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]
)
{
421b4: 4e56 0000 linkw %fp,#0
421b8: 2f0b movel %a3,%sp@-
421ba: 266e 0008 moveal %fp@(8),%a3
421be: 2f0a movel %a2,%sp@-
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
421c0: 4878 0024 pea 24 <OPER2+0x10>
421c4: 4878 0001 pea 1 <ADD>
421c8: 4eb9 0004 2818 jsr 42818 <calloc>
if ( fs_info != NULL ) {
421ce: 508f addql #8,%sp
)
{
static int imfs_instance;
int rv = 0;
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
421d0: 2440 moveal %d0,%a2
if ( fs_info != NULL ) {
421d2: 4a80 tstl %d0
421d4: 6700 008a beqw 42260 <IMFS_initialize_support+0xac>
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
421d8: 2039 0005 d2e4 movel 5d2e4 <imfs_instance.6455>,%d0
421de: 2480 movel %d0,%a2@
memcpy(
421e0: 4878 001c pea 1c <OPER2+0x8>
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++;
421e4: 5280 addql #1,%d0
memcpy(
421e6: 2f2e 0010 movel %fp@(16),%sp@-
421ea: 486a 0008 pea %a2@(8)
IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) );
if ( fs_info != NULL ) {
IMFS_jnode_t *root_node;
fs_info->instance = imfs_instance++;
421ee: 23c0 0005 d2e4 movel %d0,5d2e4 <imfs_instance.6455>
memcpy(
421f4: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
fs_info->node_controls,
node_controls,
sizeof( fs_info->node_controls )
);
root_node = IMFS_allocate_node(
421fa: 42a7 clrl %sp@-
421fc: 4878 41ed pea 41ed <D_MAX_EXP+0x39ee>
42200: 42a7 clrl %sp@-
42202: 4879 0005 b5fe pea 5b5fe <rtems_termios_baud_table+0x10a>
42208: 2f2a 0008 movel %a2@(8),%sp@-
4220c: 2f0a movel %a2,%sp@-
4220e: 4eb9 0004 977c jsr 4977c <IMFS_allocate_node>
"",
0,
(S_IFDIR | 0755),
NULL
);
if ( root_node != NULL ) {
42214: 4fef 0024 lea %sp@(36),%sp
42218: 4a80 tstl %d0
4221a: 6736 beqs 42252 <IMFS_initialize_support+0x9e> <== NEVER TAKEN
mt_entry->fs_info = fs_info;
4221c: 274a 0008 movel %a2,%a3@(8)
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;
42220: 2440 moveal %d0,%a2
mt_entry->ops = op_table;
42222: 276e 000c 000c movel %fp@(12),%a3@(12)
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
42228: 223c 0005 b836 movel #374838,%d1
mt_entry->mt_fs_root->location.node_access = root_node;
4222e: 206b 0024 moveal %a3@(36),%a0
42232: 226a 004a moveal %a2@(74),%a1
NULL
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
42236: 2741 002a movel %d1,%a3@(42)
4223a: 2169 0004 0010 movel %a1@(4),%a0@(16)
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
42240: 7210 moveq #16,%d1
);
if ( root_node != NULL ) {
mt_entry->fs_info = fs_info;
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
mt_entry->mt_fs_root->location.node_access = root_node;
42242: 2140 0008 movel %d0,%a0@(8)
errno = ENOMEM;
rv = -1;
}
if ( rv == 0 ) {
IMFS_determine_bytes_per_block(
42246: 2039 0005 c44c movel 5c44c <imfs_rq_memfile_bytes_per_block>,%d0
4224c: 307c 0006 moveaw #6,%a0
42250: 601c bras 4226e <IMFS_initialize_support+0xba>
mt_entry->ops = op_table;
mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS;
mt_entry->mt_fs_root->location.node_access = root_node;
IMFS_Set_handlers( &mt_entry->mt_fs_root->location );
} else {
errno = ENOMEM;
42252: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
42258: 720c moveq #12,%d1 <== NOT EXECUTED
4225a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4225c: 2081 movel %d1,%a0@ <== NOT EXECUTED
4225e: 602c bras 4228c <IMFS_initialize_support+0xd8> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOMEM;
42260: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
42266: 2440 moveal %d0,%a2 <== NOT EXECUTED
42268: 700c moveq #12,%d0 <== NOT EXECUTED
4226a: 2480 movel %d0,%a2@ <== NOT EXECUTED
4226c: 601e bras 4228c <IMFS_initialize_support+0xd8> <== NOT EXECUTED
/*
* 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) {
4226e: b081 cmpl %d1,%d0
42270: 6710 beqs 42282 <IMFS_initialize_support+0xce>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
42272: 6d08 blts 4227c <IMFS_initialize_support+0xc8>
42274: 5388 subql #1,%a0
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
42276: d281 addl %d1,%d1
42278: 4a88 tstl %a0
4227a: 66f2 bnes 4226e <IMFS_initialize_support+0xba> <== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
4227c: 203c 0000 0080 movel #128,%d0
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
42282: 23c0 0005 d2e0 movel %d0,5d2e0 <imfs_memfile_bytes_per_block>
const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT]
)
{
static int imfs_instance;
int rv = 0;
42288: 4280 clrl %d0
4228a: 6002 bras 4228e <IMFS_initialize_support+0xda>
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
4228c: 70ff moveq #-1,%d0 <== NOT EXECUTED
IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
);
}
return rv;
}
4228e: 246e fff8 moveal %fp@(-8),%a2
42292: 266e fffc moveal %fp@(-4),%a3
42296: 4e5e unlk %fp <== NOT EXECUTED
00043910 <IMFS_make_generic_node>:
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
43910: 4e56 ff9c linkw %fp,#-100
int rv = 0;
mode &= ~rtems_filesystem_umask;
43914: 2079 0006 0378 moveal 60378 <rtems_current_user_env>,%a0
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
4391a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int rv = 0;
mode &= ~rtems_filesystem_umask;
4391e: 2428 0008 movel %a0@(8),%d2
43922: 4682 notl %d2
43924: c4ae 000c andl %fp@(12),%d2
const char *path,
mode_t mode,
const IMFS_node_control *node_control,
void *context
)
{
43928: 266e 0010 moveal %fp@(16),%a3
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
4392c: 2002 movel %d2,%d0
4392e: 0280 0000 f000 andil #61440,%d0
43934: 0c80 0000 2000 cmpil #8192,%d0
4393a: 6700 00da beqw 43a16 <IMFS_make_generic_node+0x106>
4393e: 620e bhis 4394e <IMFS_make_generic_node+0x3e> <== ALWAYS TAKEN
43940: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED
43946: 6600 00be bnew 43a06 <IMFS_make_generic_node+0xf6> <== NOT EXECUTED
4394a: 6000 00ca braw 43a16 <IMFS_make_generic_node+0x106> <== NOT EXECUTED
4394e: 0c80 0000 6000 cmpil #24576,%d0
43954: 6700 00c0 beqw 43a16 <IMFS_make_generic_node+0x106>
43958: 0c80 0000 8000 cmpil #32768,%d0
4395e: 6700 00b6 beqw 43a16 <IMFS_make_generic_node+0x106>
43962: 6000 00a2 braw 43a06 <IMFS_make_generic_node+0xf6>
if ( node_control->imfs_type == IMFS_GENERIC ) {
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK
| RTEMS_FS_MAKE
| RTEMS_FS_EXCLUSIVE;
const rtems_filesystem_location_info_t *currentloc =
43966: 4878 0078 pea 78 <DBL_MANT_DIG+0x43>
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
4396a: 260e movel %fp,%d3
4396c: 0683 ffff ffc8 addil #-56,%d3
if ( node_control->imfs_type == IMFS_GENERIC ) {
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK
| RTEMS_FS_MAKE
| RTEMS_FS_EXCLUSIVE;
const rtems_filesystem_location_info_t *currentloc =
43972: 2f2e 0008 movel %fp@(8),%sp@-
43976: 2f03 movel %d3,%sp@-
43978: 4eb9 0004 56de jsr 456de <rtems_filesystem_eval_path_start>
4397e: 2440 moveal %d0,%a2
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
if ( IMFS_is_imfs_instance( currentloc ) ) {
43980: 2f00 movel %d0,%sp@-
43982: 4eb9 0004 38be jsr 438be <IMFS_is_imfs_instance>
43988: 4fef 0010 lea %sp@(16),%sp
4398c: 4a00 tstb %d0
4398e: 6758 beqs 439e8 <IMFS_make_generic_node+0xd8>
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
new_node = IMFS_create_node_with_control(
43990: 486e ffb4 pea %fp@(-76)
if ( IMFS_is_imfs_instance( currentloc ) ) {
IMFS_types_union info;
IMFS_jnode_t *new_node;
info.generic.context = context;
43994: 2d6e 0014 ffb4 movel %fp@(20),%fp@(-76)
new_node = IMFS_create_node_with_control(
4399a: 2f02 movel %d2,%sp@-
4399c: 2f2e ffd4 movel %fp@(-44),%sp@-
439a0: 2f2e ffd0 movel %fp@(-48),%sp@-
439a4: 2f0b movel %a3,%sp@-
439a6: 2f0a movel %a2,%sp@-
439a8: 4eb9 0004 d8e0 jsr 4d8e0 <IMFS_create_node_with_control>
rtems_filesystem_eval_path_get_tokenlen( &ctx ),
mode,
&info
);
if ( new_node != NULL ) {
439ae: 4fef 0018 lea %sp@(24),%sp
439b2: 4a80 tstl %d0
439b4: 6740 beqs 439f6 <IMFS_make_generic_node+0xe6>
IMFS_jnode_t *parent = currentloc->node_access;
439b6: 246a 0008 moveal %a2@(8),%a2
IMFS_update_ctime( parent );
439ba: 240e movel %fp,%d2
439bc: 0682 ffff ffac addil #-84,%d2
439c2: 47f9 0004 42e4 lea 442e4 <gettimeofday>,%a3
439c8: 42a7 clrl %sp@-
439ca: 2f02 movel %d2,%sp@-
439cc: 4e93 jsr %a3@
439ce: 256e ffac 0046 movel %fp@(-84),%a2@(70)
IMFS_update_mtime( parent );
439d4: 42a7 clrl %sp@-
439d6: 2f02 movel %d2,%sp@-
439d8: 4282 clrl %d2
439da: 4e93 jsr %a3@
439dc: 256e ffac 0042 movel %fp@(-84),%a2@(66)
439e2: 4fef 0010 lea %sp@(16),%sp
439e6: 6010 bras 439f8 <IMFS_make_generic_node+0xe8>
} else {
rv = -1;
}
} else {
rtems_filesystem_eval_path_error( &ctx, ENOTSUP );
439e8: 4878 0086 pea 86 <DBL_MANT_DIG+0x51>
439ec: 2f03 movel %d3,%sp@-
439ee: 4eb9 0004 546e jsr 4546e <rtems_filesystem_eval_path_error>
439f4: 508f addql #8,%sp
rv = -1;
439f6: 74ff moveq #-1,%d2
}
rtems_filesystem_eval_path_cleanup( &ctx );
439f8: 486e ffc8 pea %fp@(-56)
439fc: 4eb9 0004 57d0 jsr 457d0 <rtems_filesystem_eval_path_cleanup>
43a02: 588f addql #4,%sp
43a04: 601a bras 43a20 <IMFS_make_generic_node+0x110>
} else {
errno = EINVAL;
43a06: 4eb9 0005 0554 jsr 50554 <__errno>
rv = -1;
43a0c: 74ff moveq #-1,%d2
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
} else {
errno = EINVAL;
43a0e: 2040 moveal %d0,%a0
43a10: 7016 moveq #22,%d0
43a12: 2080 movel %d0,%a0@
43a14: 600a bras 43a20 <IMFS_make_generic_node+0x110>
rv = -1;
break;
}
if ( rv == 0 ) {
if ( node_control->imfs_type == IMFS_GENERIC ) {
43a16: 7007 moveq #7,%d0
43a18: b093 cmpl %a3@,%d0
43a1a: 6700 ff4a beqw 43966 <IMFS_make_generic_node+0x56>
43a1e: 60e6 bras 43a06 <IMFS_make_generic_node+0xf6>
rv = -1;
}
}
return rv;
}
43a20: 2002 movel %d2,%d0
43a22: 4cee 0c0c ff9c moveml %fp@(-100),%d2-%d3/%a2-%a3
43a28: 4e5e unlk %fp <== NOT EXECUTED
0004b544 <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4b544: 4e56 0000 linkw %fp,#0
4b548: 2f0a movel %a2,%sp@-
4b54a: 2f02 movel %d2,%sp@-
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4b54c: 4878 0001 pea 1 <ADD>
if ( *block_entry_ptr )
return 0;
4b550: 4282 clrl %d2
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4b552: 2f2e 000c movel %fp@(12),%sp@-
4b556: 2f2e 0008 movel %fp@(8),%sp@-
4b55a: 4eb9 0004 b204 jsr 4b204 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
4b560: 4fef 000c lea %sp@(12),%sp
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4b564: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
4b566: 4a92 tstl %a2@
4b568: 6610 bnes 4b57a <IMFS_memfile_addblock+0x36>
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
4b56a: 4eb9 0004 b1e0 jsr 4b1e0 <memfile_alloc_block>
if ( !memory )
4b570: 4a80 tstl %d0
4b572: 6704 beqs 4b578 <IMFS_memfile_addblock+0x34> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
4b574: 2480 movel %d0,%a2@
return 0;
4b576: 6002 bras 4b57a <IMFS_memfile_addblock+0x36>
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
4b578: 7401 moveq #1,%d2 <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
4b57a: 2002 movel %d2,%d0
4b57c: 242e fff8 movel %fp@(-8),%d2
4b580: 246e fffc moveal %fp@(-4),%a2
4b584: 4e5e unlk %fp <== NOT EXECUTED
0004b6e4 <IMFS_memfile_extend>:
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b6e4: 4280 clrl %d0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
4b6e6: 4e56 ffc8 linkw %fp,#-56
4b6ea: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b6ee: 182e 000f moveb %fp@(15),%d4
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b6f2: 2a79 0005 d2e0 moveal 5d2e0 <imfs_memfile_bytes_per_block>,%a5
4b6f8: 2a0d movel %a5,%d5
4b6fa: e48d lsrl #2,%d5
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
4b6fc: 1d44 fff3 moveb %d4,%fp@(-13)
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b700: 2805 movel %d5,%d4
4b702: 5284 addql #1,%d4
4b704: 4c05 4800 mulsl %d5,%d4
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
4b708: 242e 0010 movel %fp@(16),%d2
4b70c: 262e 0014 movel %fp@(20),%d3
4b710: 246e 0008 moveal %fp@(8),%a2
IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b714: 5284 addql #1,%d4
4b716: 4c05 4800 mulsl %d5,%d4
4b71a: 2a0d movel %a5,%d5
4b71c: 5384 subql #1,%d4
4b71e: 4c05 4800 mulsl %d5,%d4
4b722: 2204 movel %d4,%d1
4b724: 2802 movel %d2,%d4
4b726: 2a03 movel %d3,%d5
4b728: 9a81 subl %d1,%d5
4b72a: 9980 subxl %d0,%d4
4b72c: 6d10 blts 4b73e <IMFS_memfile_extend+0x5a>
rtems_set_errno_and_return_minus_one( EFBIG );
4b72e: 4eb9 0004 c330 jsr 4c330 <__errno>
4b734: 721b moveq #27,%d1
4b736: 2040 moveal %d0,%a0
4b738: 2081 movel %d1,%a0@
4b73a: 6000 00c4 braw 4b800 <IMFS_memfile_extend+0x11c>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
4b73e: 282a 004e movel %a2@(78),%d4
4b742: 2a2a 0052 movel %a2@(82),%d5
4b746: 2002 movel %d2,%d0
4b748: 2203 movel %d3,%d1
4b74a: 9285 subl %d5,%d1
4b74c: 9184 subxl %d4,%d0
4b74e: 6f00 00e8 blew 4b838 <IMFS_memfile_extend+0x154>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b752: 49f9 0005 89ec lea 589ec <__divdi3>,%a4
4b758: 2e0d movel %a5,%d7
4b75a: 5bc6 smi %d6
4b75c: 49c6 extbl %d6
4b75e: 2f07 movel %d7,%sp@-
4b760: 2f06 movel %d6,%sp@-
4b762: 2f03 movel %d3,%sp@-
4b764: 2f02 movel %d2,%sp@-
4b766: 4e94 jsr %a4@
4b768: 4fef 0010 lea %sp@(16),%sp
4b76c: 2641 moveal %d1,%a3
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b76e: 2f07 movel %d7,%sp@-
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
block_p *block_ptr =
IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
memset( &(*block_ptr) [offset], 0, count);
4b770: 2e3c 0004 cbc0 movel #314304,%d7
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b776: 2f06 movel %d6,%sp@-
4b778: 2f05 movel %d5,%sp@-
4b77a: 2f04 movel %d4,%sp@-
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
4b77c: 2805 movel %d5,%d4
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
block_p *block_ptr =
4b77e: 2a3c 0004 b204 movel #307716,%d5
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b784: 4e94 jsr %a4@
4b786: 4fef 0010 lea %sp@(16),%sp
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
4b78a: 200d movel %a5,%d0
4b78c: 4c01 0800 mulsl %d1,%d0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b790: 2c01 movel %d1,%d6
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4b792: 2841 moveal %d1,%a4
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
4b794: 9880 subl %d0,%d4
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
4b796: 4bf9 0004 b544 lea 4b544 <IMFS_memfile_addblock>,%a5
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4b79c: 6068 bras 4b806 <IMFS_memfile_extend+0x122>
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
4b79e: 2f0c movel %a4,%sp@-
4b7a0: 2f0a movel %a2,%sp@-
4b7a2: 4e95 jsr %a5@
4b7a4: 508f addql #8,%sp
4b7a6: 4a80 tstl %d0
4b7a8: 6640 bnes 4b7ea <IMFS_memfile_extend+0x106> <== NEVER TAKEN
if ( zero_fill ) {
4b7aa: 4a2e fff3 tstb %fp@(-13)
4b7ae: 6754 beqs 4b804 <IMFS_memfile_extend+0x120>
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
block_p *block_ptr =
4b7b0: 42a7 clrl %sp@-
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
4b7b2: 2239 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d1
4b7b8: 9284 subl %d4,%d1
block_p *block_ptr =
4b7ba: 2045 moveal %d5,%a0
4b7bc: 2f0c movel %a4,%sp@-
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
4b7be: 2d41 fff4 movel %d1,%fp@(-12)
block_p *block_ptr =
4b7c2: 2f0a movel %a2,%sp@-
4b7c4: 4e90 jsr %a0@
IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
memset( &(*block_ptr) [offset], 0, count);
4b7c6: 2f2e fff4 movel %fp@(-12),%sp@-
4b7ca: 2040 moveal %d0,%a0
4b7cc: 42a7 clrl %sp@-
4b7ce: d890 addl %a0@,%d4
4b7d0: 2047 moveal %d7,%a0
4b7d2: 2f04 movel %d4,%sp@-
offset = 0;
4b7d4: 4284 clrl %d4
if ( zero_fill ) {
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
block_p *block_ptr =
IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
memset( &(*block_ptr) [offset], 0, count);
4b7d6: 4e90 jsr %a0@
4b7d8: 4fef 0018 lea %sp@(24),%sp
4b7dc: 6026 bras 4b804 <IMFS_memfile_extend+0x120>
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
4b7de: 2f0c movel %a4,%sp@- <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
4b7e0: 538c subql #1,%a4 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4b7e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b7e4: 4e93 jsr %a3@ <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
4b7e6: 508f addql #8,%sp <== NOT EXECUTED
4b7e8: 6006 bras 4b7f0 <IMFS_memfile_extend+0x10c> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4b7ea: 47f9 0004 b6bc lea 4b6bc <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
4b7f0: bc8c cmpl %a4,%d6 <== NOT EXECUTED
4b7f2: 63ea blss 4b7de <IMFS_memfile_extend+0xfa> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4b7f4: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
4b7fa: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b7fc: 701c moveq #28,%d0 <== NOT EXECUTED
4b7fe: 2080 movel %d0,%a0@ <== NOT EXECUTED
4b800: 70ff moveq #-1,%d0
4b802: 6036 bras 4b83a <IMFS_memfile_extend+0x156>
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4b804: 528c addql #1,%a4
4b806: b7cc cmpal %a4,%a3
4b808: 6494 bccs 4b79e <IMFS_memfile_extend+0xba>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
4b80a: 47f9 0004 2ae8 lea 42ae8 <gettimeofday>,%a3
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4b810: 2542 004e movel %d2,%a2@(78)
4b814: 2543 0052 movel %d3,%a2@(82)
IMFS_update_ctime(the_jnode);
4b818: 240e movel %fp,%d2
4b81a: 5182 subql #8,%d2
4b81c: 42a7 clrl %sp@-
4b81e: 2f02 movel %d2,%sp@-
4b820: 4e93 jsr %a3@
4b822: 256e fff8 0046 movel %fp@(-8),%a2@(70)
IMFS_update_mtime(the_jnode);
4b828: 42a7 clrl %sp@-
4b82a: 2f02 movel %d2,%sp@-
4b82c: 4e93 jsr %a3@
4b82e: 256e fff8 0042 movel %fp@(-8),%a2@(66)
return 0;
4b834: 4fef 0010 lea %sp@(16),%sp
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
return 0;
4b838: 4280 clrl %d0
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
4b83a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4b840: 4e5e unlk %fp <== NOT EXECUTED
0004b204 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4b204: 4e56 fff0 linkw %fp,#-16
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4b208: 2239 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d1
4b20e: e489 lsrl #2,%d1
4b210: 2001 movel %d1,%d0
4b212: 5380 subql #1,%d0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4b214: 48d7 041c moveml %d2-%d4/%a2,%sp@
4b218: 246e 0008 moveal %fp@(8),%a2
4b21c: 242e 000c movel %fp@(12),%d2
4b220: 206e 0010 moveal %fp@(16),%a0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4b224: b082 cmpl %d2,%d0
4b226: 6538 bcss 4b260 <IMFS_memfile_get_block_pointer+0x5c>
p = info->indirect;
4b228: 226a 0056 moveal %a2@(86),%a1
if ( malloc_it ) {
4b22c: 4a88 tstl %a0
4b22e: 6724 beqs 4b254 <IMFS_memfile_get_block_pointer+0x50>
if ( !p ) {
4b230: 4a89 tstl %a1
4b232: 6614 bnes 4b248 <IMFS_memfile_get_block_pointer+0x44>
p = memfile_alloc_block();
4b234: 4eb9 0004 b1e0 jsr 4b1e0 <memfile_alloc_block>
if ( !p )
4b23a: 4a80 tstl %d0
4b23c: 6606 bnes 4b244 <IMFS_memfile_get_block_pointer+0x40><== ALWAYS TAKEN
return 0;
4b23e: 91c8 subal %a0,%a0 <== NOT EXECUTED
4b240: 6000 00fc braw 4b33e <IMFS_memfile_get_block_pointer+0x13a><== NOT EXECUTED
info->indirect = p;
4b244: 2540 0056 movel %d0,%a2@(86)
}
return &info->indirect[ my_block ];
4b248: 206a 0056 moveal %a2@(86),%a0
4b24c: e58a lsll #2,%d2
4b24e: d1c2 addal %d2,%a0
4b250: 6000 00ec braw 4b33e <IMFS_memfile_get_block_pointer+0x13a>
}
if ( !p )
4b254: 4a89 tstl %a1
4b256: 67e6 beqs 4b23e <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
4b258: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0
4b25c: 6000 00e0 braw 4b33e <IMFS_memfile_get_block_pointer+0x13a>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4b260: 2001 movel %d1,%d0
4b262: 5280 addql #1,%d0
4b264: 4c01 0800 mulsl %d1,%d0
4b268: 2240 moveal %d0,%a1
4b26a: 5389 subql #1,%a1
4b26c: b3c2 cmpal %d2,%a1
4b26e: 653a bcss 4b2aa <IMFS_memfile_get_block_pointer+0xa6>
my_block -= FIRST_DOUBLY_INDIRECT;
4b270: 9481 subl %d1,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4b272: 202a 005a movel %a2@(90),%d0
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4b276: 4c41 2003 remul %d1,%d3,%d2
4b27a: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
4b27e: 4a88 tstl %a0
4b280: 671a beqs 4b29c <IMFS_memfile_get_block_pointer+0x98>
if ( !p ) {
4b282: 4a80 tstl %d0
4b284: 660e bnes 4b294 <IMFS_memfile_get_block_pointer+0x90>
p = memfile_alloc_block();
4b286: 4eb9 0004 b1e0 jsr 4b1e0 <memfile_alloc_block>
if ( !p )
4b28c: 4a80 tstl %d0
4b28e: 67ae beqs 4b23e <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
4b290: 2540 005a movel %d0,%a2@(90)
}
p1 = (block_p *)p[ doubly ];
4b294: 2040 moveal %d0,%a0
4b296: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2
4b29a: 6068 bras 4b304 <IMFS_memfile_get_block_pointer+0x100>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
4b29c: 4a80 tstl %d0
4b29e: 679e beqs 4b23e <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
4b2a0: 2240 moveal %d0,%a1
4b2a2: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
4b2a6: 6000 008c braw 4b334 <IMFS_memfile_get_block_pointer+0x130>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4b2aa: 2600 movel %d0,%d3
4b2ac: 5283 addql #1,%d3
4b2ae: 4c01 3800 mulsl %d1,%d3
4b2b2: 5383 subql #1,%d3
4b2b4: b682 cmpl %d2,%d3
4b2b6: 6586 bcss 4b23e <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
4b2b8: 9480 subl %d0,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4b2ba: 4c41 2003 remul %d1,%d3,%d2
4b2be: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
4b2c2: 202a 005e movel %a2@(94),%d0
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;
4b2c6: 4c41 2004 remul %d1,%d4,%d2
4b2ca: 4c41 2002 remul %d1,%d2,%d2
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
4b2ce: 4a88 tstl %a0
4b2d0: 674c beqs 4b31e <IMFS_memfile_get_block_pointer+0x11a>
if ( !p ) {
4b2d2: 4a80 tstl %d0
4b2d4: 6610 bnes 4b2e6 <IMFS_memfile_get_block_pointer+0xe2>
p = memfile_alloc_block();
4b2d6: 4eb9 0004 b1e0 jsr 4b1e0 <memfile_alloc_block>
if ( !p )
4b2dc: 4a80 tstl %d0
4b2de: 6700 ff5e beqw 4b23e <IMFS_memfile_get_block_pointer+0x3a>
return 0;
info->triply_indirect = p;
4b2e2: 2540 005e movel %d0,%a2@(94)
}
p1 = (block_p *) p[ triply ];
4b2e6: 2040 moveal %d0,%a0
4b2e8: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2
4b2ec: 2012 movel %a2@,%d0
if ( !p1 ) {
4b2ee: 660e bnes 4b2fe <IMFS_memfile_get_block_pointer+0xfa>
p1 = memfile_alloc_block();
4b2f0: 4eb9 0004 b1e0 jsr 4b1e0 <memfile_alloc_block>
if ( !p1 )
4b2f6: 4a80 tstl %d0
4b2f8: 6700 ff44 beqw 4b23e <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p[ triply ] = (block_p) p1;
4b2fc: 2480 movel %d0,%a2@
}
p2 = (block_p *)p1[ doubly ];
4b2fe: 2240 moveal %d0,%a1
4b300: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2
4b304: 2012 movel %a2@,%d0
if ( !p2 ) {
4b306: 660e bnes 4b316 <IMFS_memfile_get_block_pointer+0x112>
p2 = memfile_alloc_block();
4b308: 4eb9 0004 b1e0 jsr 4b1e0 <memfile_alloc_block>
if ( !p2 )
4b30e: 4a80 tstl %d0
4b310: 6700 ff2c beqw 4b23e <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p1[ doubly ] = (block_p) p2;
4b314: 2480 movel %d0,%a2@
}
return (block_p *)&p2[ singly ];
4b316: 2240 moveal %d0,%a1
4b318: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
4b31c: 6020 bras 4b33e <IMFS_memfile_get_block_pointer+0x13a>
}
if ( !p )
4b31e: 4a80 tstl %d0
4b320: 6700 ff1c beqw 4b23e <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p1 = (block_p *) p[ triply ];
4b324: 2240 moveal %d0,%a1
4b326: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p1 )
4b32a: 4a88 tstl %a0
4b32c: 6700 ff10 beqw 4b23e <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p2 = (block_p *)p1[ doubly ];
4b330: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0
if ( !p2 )
4b334: 4a88 tstl %a0
4b336: 6700 ff06 beqw 4b23e <IMFS_memfile_get_block_pointer+0x3a>
return 0;
return (block_p *)&p2[ singly ];
4b33a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4b33e: 2008 movel %a0,%d0
4b340: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4b346: 4e5e unlk %fp <== NOT EXECUTED
0004b34a <IMFS_memfile_read>:
* 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 ) {
4b34a: 7005 moveq #5,%d0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4b34c: 4e56 ffd0 linkw %fp,#-48
4b350: 226e 0018 moveal %fp@(24),%a1
4b354: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b358: 246e 0008 moveal %fp@(8),%a2
4b35c: 266e 0014 moveal %fp@(20),%a3
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
4b360: 206a 004a moveal %a2@(74),%a0
4b364: 242e 000c movel %fp@(12),%d2
4b368: 262e 0010 movel %fp@(16),%d3
* 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 ) {
4b36c: b090 cmpl %a0@,%d0
4b36e: 6654 bnes 4b3c4 <IMFS_memfile_read+0x7a>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
4b370: 2a49 moveal %a1,%a5
4b372: 99cc subal %a4,%a4
4b374: 282a 004e movel %a2@(78),%d4
4b378: 2a2a 0052 movel %a2@(82),%d5
my_length = length;
if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
4b37c: 206a 0056 moveal %a2@(86),%a0
if (my_length > (the_jnode->info.linearfile.size - start))
4b380: 2004 movel %d4,%d0
4b382: 2205 movel %d5,%d1
4b384: 2c0c movel %a4,%d6
4b386: 2e0d movel %a5,%d7
4b388: 9283 subl %d3,%d1
4b38a: 9182 subxl %d2,%d0
4b38c: 9e81 subl %d1,%d7
4b38e: 9d80 subxl %d0,%d6
4b390: 6f06 bles 4b398 <IMFS_memfile_read+0x4e> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
4b392: 2805 movel %d5,%d4
4b394: 9883 subl %d3,%d4
4b396: 6002 bras 4b39a <IMFS_memfile_read+0x50>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4b398: 2809 movel %a1,%d4 <== 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);
4b39a: 2f04 movel %d4,%sp@-
4b39c: 4870 3800 pea %a0@(00000000,%d3:l)
4b3a0: 2f0b movel %a3,%sp@-
4b3a2: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
IMFS_update_atime( the_jnode );
4b3a8: 42a7 clrl %sp@-
4b3aa: 486e fff8 pea %fp@(-8)
4b3ae: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4b3b4: 256e fff8 003e movel %fp@(-8),%a2@(62)
return my_length;
4b3ba: 2004 movel %d4,%d0
4b3bc: 4fef 0014 lea %sp@(20),%sp
4b3c0: 6000 012c braw 4b4ee <IMFS_memfile_read+0x1a4>
/*
* 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;
4b3c4: 2c09 movel %a1,%d6
4b3c6: dc83 addl %d3,%d6
if ( last_byte > the_jnode->info.file.size )
4b3c8: 2a06 movel %d6,%d5
4b3ca: 4284 clrl %d4
4b3cc: 202a 004e movel %a2@(78),%d0
4b3d0: 222a 0052 movel %a2@(82),%d1
4b3d4: 2c04 movel %d4,%d6
4b3d6: 2e05 movel %d5,%d7
4b3d8: 9e81 subl %d1,%d7
4b3da: 9d80 subxl %d0,%d6
4b3dc: 6f06 bles 4b3e4 <IMFS_memfile_read+0x9a>
my_length = the_jnode->info.file.size - start;
4b3de: 2c01 movel %d1,%d6
4b3e0: 9c83 subl %d3,%d6
4b3e2: 6002 bras 4b3e6 <IMFS_memfile_read+0x9c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4b3e4: 2c09 movel %a1,%d6
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4b3e6: 2879 0005 d2e0 moveal 5d2e0 <imfs_memfile_bytes_per_block>,%a4
4b3ec: 2a0c movel %a4,%d5
4b3ee: 5bc4 smi %d4
4b3f0: 49c4 extbl %d4
4b3f2: 2f05 movel %d5,%sp@-
4b3f4: 2f04 movel %d4,%sp@-
4b3f6: 2f03 movel %d3,%sp@-
4b3f8: 2f02 movel %d2,%sp@-
4b3fa: 4eb9 0005 8e4c jsr 58e4c <__moddi3>
4b400: 4fef 0010 lea %sp@(16),%sp
4b404: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b406: 2f05 movel %d5,%sp@-
4b408: 2f04 movel %d4,%sp@-
4b40a: 2f03 movel %d3,%sp@-
4b40c: 2f02 movel %d2,%sp@-
4b40e: 4eb9 0005 89ec jsr 589ec <__divdi3>
4b414: 4fef 0010 lea %sp@(16),%sp
4b418: 2601 movel %d1,%d3
if ( start_offset ) {
4b41a: 4a87 tstl %d7
4b41c: 673c beqs 4b45a <IMFS_memfile_read+0x110>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4b41e: 99c7 subal %d7,%a4
4b420: 2406 movel %d6,%d2
4b422: b9c6 cmpal %d6,%a4
4b424: 6402 bccs 4b428 <IMFS_memfile_read+0xde>
4b426: 240c movel %a4,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b428: 42a7 clrl %sp@-
4b42a: 2f03 movel %d3,%sp@-
4b42c: 2f0a movel %a2,%sp@-
4b42e: 4eb9 0004 b204 jsr 4b204 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b434: 4fef 000c lea %sp@(12),%sp
4b438: 4a80 tstl %d0
4b43a: 6700 00b0 beqw 4b4ec <IMFS_memfile_read+0x1a2>
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4b43e: 2f02 movel %d2,%sp@-
4b440: 2040 moveal %d0,%a0
4b442: de90 addl %a0@,%d7
dest += to_copy;
block++;
4b444: 5283 addql #1,%d3
my_length -= to_copy;
4b446: 9c82 subl %d2,%d6
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4b448: 2f07 movel %d7,%sp@-
4b44a: 2f0b movel %a3,%sp@-
dest += to_copy;
4b44c: d7c2 addal %d2,%a3
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 );
4b44e: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4b454: 4fef 000c lea %sp@(12),%sp
4b458: 6002 bras 4b45c <IMFS_memfile_read+0x112>
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
4b45a: 4282 clrl %d2
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
4b45c: 2839 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d4
* is considered an error. Read from an offset for more bytes than
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
4b462: 97c2 subal %d2,%a3
/*
* 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 );
4b464: 49f9 0004 b204 lea 4b204 <IMFS_memfile_get_block_pointer>,%a4
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4b46a: 4bf9 0004 cb50 lea 4cb50 <memcpy>,%a5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4b470: 6026 bras 4b498 <IMFS_memfile_read+0x14e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b472: 42a7 clrl %sp@-
4b474: 2f03 movel %d3,%sp@-
4b476: 2f0a movel %a2,%sp@-
4b478: 4e94 jsr %a4@
if ( !block_ptr )
4b47a: 4fef 000c lea %sp@(12),%sp
4b47e: 4a80 tstl %d0
4b480: 6602 bnes 4b484 <IMFS_memfile_read+0x13a> <== ALWAYS TAKEN
4b482: 6038 bras 4b4bc <IMFS_memfile_read+0x172> <== NOT EXECUTED
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4b484: 2040 moveal %d0,%a0
dest += to_copy;
block++;
4b486: 5283 addql #1,%d3
my_length -= to_copy;
4b488: 9c84 subl %d4,%d6
copied += to_copy;
4b48a: d484 addl %d4,%d2
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 );
4b48c: 2f04 movel %d4,%sp@-
4b48e: 2f10 movel %a0@,%sp@-
4b490: 2f05 movel %d5,%sp@-
4b492: 4e95 jsr %a5@
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4b494: 4fef 000c lea %sp@(12),%sp
* is considered an error. Read from an offset for more bytes than
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
4b498: 2a0b movel %a3,%d5
4b49a: da82 addl %d2,%d5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4b49c: bcb9 0005 d2e0 cmpl 5d2e0 <imfs_memfile_bytes_per_block>,%d6
4b4a2: 64ce bccs 4b472 <IMFS_memfile_read+0x128>
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
4b4a4: 4a86 tstl %d6
4b4a6: 672c beqs 4b4d4 <IMFS_memfile_read+0x18a>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b4a8: 42a7 clrl %sp@-
4b4aa: 2f03 movel %d3,%sp@-
4b4ac: 2f0a movel %a2,%sp@-
4b4ae: 4eb9 0004 b204 jsr 4b204 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b4b4: 4fef 000c lea %sp@(12),%sp
4b4b8: 4a80 tstl %d0
4b4ba: 6604 bnes 4b4c0 <IMFS_memfile_read+0x176> <== ALWAYS TAKEN
return copied;
4b4bc: 2002 movel %d2,%d0 <== NOT EXECUTED
4b4be: 602e bras 4b4ee <IMFS_memfile_read+0x1a4> <== NOT EXECUTED
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4b4c0: 2040 moveal %d0,%a0
copied += my_length;
4b4c2: d486 addl %d6,%d2
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4b4c4: 2f06 movel %d6,%sp@-
4b4c6: 2f10 movel %a0@,%sp@-
4b4c8: 2f05 movel %d5,%sp@-
4b4ca: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
copied += my_length;
4b4d0: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4b4d4: 42a7 clrl %sp@-
4b4d6: 486e fff8 pea %fp@(-8)
4b4da: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4b4e0: 256e fff8 003e movel %fp@(-8),%a2@(62)
return copied;
4b4e6: 2002 movel %d2,%d0
4b4e8: 508f addql #8,%sp
4b4ea: 6002 bras 4b4ee <IMFS_memfile_read+0x1a4>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4b4ec: 4280 clrl %d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4b4ee: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4b4f4: 4e5e unlk %fp <== NOT EXECUTED
0004b5e6 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4b5e6: 4e56 ffe4 linkw %fp,#-28
4b5ea: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%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;
4b5ee: 2439 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d2
4b5f4: e48a lsrl #2,%d2
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4b5f6: 246e 0008 moveal %fp@(8),%a2
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
4b5fa: 4aaa 0056 tstl %a2@(86)
4b5fe: 670c beqs 4b60c <IMFS_memfile_remove+0x26>
memfile_free_blocks_in_table( &info->indirect, to_free );
4b600: 2f02 movel %d2,%sp@-
4b602: 486a 0056 pea %a2@(86)
4b606: 4eba ff9a jsr %pc@(4b5a2 <memfile_free_blocks_in_table>)
4b60a: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4b60c: 4aaa 005a tstl %a2@(90)
4b610: 661c bnes 4b62e <IMFS_memfile_remove+0x48>
4b612: 6038 bras 4b64c <IMFS_memfile_remove+0x66>
* 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(
4b614: 2003 movel %d3,%d0
4b616: e588 lsll #2,%d0
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
4b618: 206a 005a moveal %a2@(90),%a0
4b61c: d1c0 addal %d0,%a0
4b61e: 4a90 tstl %a0@
4b620: 6708 beqs 4b62a <IMFS_memfile_remove+0x44> <== NEVER TAKEN
memfile_free_blocks_in_table(
4b622: 2f02 movel %d2,%sp@-
4b624: 2f08 movel %a0,%sp@-
4b626: 4e93 jsr %a3@
4b628: 508f addql #8,%sp
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++ ) {
4b62a: 5283 addql #1,%d3
4b62c: 6006 bras 4b634 <IMFS_memfile_remove+0x4e>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
4b62e: 4283 clrl %d3
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
4b630: 47fa ff70 lea %pc@(4b5a2 <memfile_free_blocks_in_table>),%a3
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++ ) {
4b634: 2039 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d0
4b63a: e488 lsrl #2,%d0
4b63c: b083 cmpl %d3,%d0
4b63e: 62d4 bhis 4b614 <IMFS_memfile_remove+0x2e>
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 );
4b640: 2f02 movel %d2,%sp@-
4b642: 486a 005a pea %a2@(90)
4b646: 4eba ff5a jsr %pc@(4b5a2 <memfile_free_blocks_in_table>)
4b64a: 508f addql #8,%sp
}
if ( info->triply_indirect ) {
4b64c: 4283 clrl %d3
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++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4b64e: 47fa ff52 lea %pc@(4b5a2 <memfile_free_blocks_in_table>),%a3
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
4b652: 4aaa 005e tstl %a2@(94)
4b656: 6640 bnes 4b698 <IMFS_memfile_remove+0xb2>
4b658: 6056 bras 4b6b0 <IMFS_memfile_remove+0xca>
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
4b65a: 2c03 movel %d3,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4b65c: 206a 005e moveal %a2@(94),%a0
* a significant difference in the performance of this routine.
*
* Regardless until the IMFS implementation is proven, it
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
4b660: e58e lsll #2,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4b662: 2a30 6800 movel %a0@(00000000,%d6:l),%d5
if ( !p ) /* ensure we have a valid pointer */
4b666: 673c beqs 4b6a4 <IMFS_memfile_remove+0xbe> <== NEVER TAKEN
4b668: 4284 clrl %d4
4b66a: 6012 bras 4b67e <IMFS_memfile_remove+0x98>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
4b66c: 2045 moveal %d5,%a0
4b66e: 5885 addql #4,%d5
4b670: 4a90 tstl %a0@
4b672: 6708 beqs 4b67c <IMFS_memfile_remove+0x96> <== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4b674: 2f02 movel %d2,%sp@-
4b676: 2f08 movel %a0,%sp@-
4b678: 4e93 jsr %a3@
4b67a: 508f addql #8,%sp
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++ ) {
4b67c: 5284 addql #1,%d4
4b67e: 2039 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d0
4b684: e488 lsrl #2,%d0
4b686: b084 cmpl %d4,%d0
4b688: 62e2 bhis 4b66c <IMFS_memfile_remove+0x86>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4b68a: 2f02 movel %d2,%sp@-
4b68c: dcaa 005e addl %a2@(94),%d6
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4b690: 5283 addql #1,%d3
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4b692: 2f06 movel %d6,%sp@-
4b694: 4e93 jsr %a3@
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4b696: 508f addql #8,%sp
4b698: 2039 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d0
4b69e: e488 lsrl #2,%d0
4b6a0: b083 cmpl %d3,%d0
4b6a2: 62b6 bhis 4b65a <IMFS_memfile_remove+0x74>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4b6a4: 2f02 movel %d2,%sp@-
4b6a6: 486a 005e pea %a2@(94)
4b6aa: 4eba fef6 jsr %pc@(4b5a2 <memfile_free_blocks_in_table>)
4b6ae: 508f addql #8,%sp
(block_p **)&info->triply_indirect, to_free );
}
return the_jnode;
}
4b6b0: 200a movel %a2,%d0
4b6b2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4b6b8: 4e5e unlk %fp <== NOT EXECUTED
0004b6bc <IMFS_memfile_remove_block>:
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4b6bc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b6c0: 42a7 clrl %sp@- <== NOT EXECUTED
4b6c2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4b6c6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4b6ca: 4eb9 0004 b204 jsr 4b204 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
IMFS_assert( block_ptr );
ptr = *block_ptr;
4b6d0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b6d2: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
4b6d4: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
4b6d6: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4b6d8: 4eb9 0004 b588 jsr 4b588 <memfile_free_block> <== NOT EXECUTED
return 1;
}
4b6de: 7001 moveq #1,%d0 <== NOT EXECUTED
4b6e0: 4e5e unlk %fp <== NOT EXECUTED
0004b844 <IMFS_memfile_write>:
* 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 ) {
4b844: 4280 clrl %d0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4b846: 4e56 ffd4 linkw %fp,#-44
/*
* 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;
4b84a: 206e 0010 moveal %fp@(16),%a0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4b84e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4b852: 2c2e 0018 movel %fp@(24),%d6
/*
* 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;
4b856: d1c6 addal %d6,%a0
if ( last_byte > the_jnode->info.file.size ) {
4b858: 2208 movel %a0,%d1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4b85a: 246e 0008 moveal %fp@(8),%a2
4b85e: 2e2e 0014 movel %fp@(20),%d7
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
4b862: 282a 004e movel %a2@(78),%d4
4b866: 2a2a 0052 movel %a2@(82),%d5
4b86a: 2400 movel %d0,%d2
4b86c: 2601 movel %d1,%d3
4b86e: 9685 subl %d5,%d3
4b870: 9584 subxl %d4,%d2
4b872: 6e44 bgts 4b8b8 <IMFS_memfile_write+0x74>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4b874: 2879 0005 d2e0 moveal 5d2e0 <imfs_memfile_bytes_per_block>,%a4
4b87a: 2a0c movel %a4,%d5
4b87c: 5bc4 smi %d4
4b87e: 49c4 extbl %d4
4b880: 2f05 movel %d5,%sp@-
4b882: 2f04 movel %d4,%sp@-
4b884: 2f2e 0010 movel %fp@(16),%sp@-
4b888: 2f2e 000c movel %fp@(12),%sp@-
4b88c: 4eb9 0005 8e4c jsr 58e4c <__moddi3>
4b892: 4fef 0010 lea %sp@(16),%sp
4b896: 2641 moveal %d1,%a3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b898: 2f05 movel %d5,%sp@-
4b89a: 2f04 movel %d4,%sp@-
4b89c: 2f2e 0010 movel %fp@(16),%sp@-
4b8a0: 2f2e 000c movel %fp@(12),%sp@-
4b8a4: 4eb9 0005 89ec jsr 589ec <__divdi3>
4b8aa: 4fef 0010 lea %sp@(16),%sp
4b8ae: 2601 movel %d1,%d3
if ( start_offset ) {
4b8b0: 4a8b tstl %a3
4b8b2: 6632 bnes 4b8e6 <IMFS_memfile_write+0xa2>
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
if ( status )
return status;
}
copied = 0;
4b8b4: 4282 clrl %d2
4b8b6: 6068 bras 4b920 <IMFS_memfile_write+0xdc>
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
bool zero_fill = start > the_jnode->info.file.size;
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
4b8b8: 2f08 movel %a0,%sp@-
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
bool zero_fill = start > the_jnode->info.file.size;
4b8ba: b8ae 000c cmpl %fp@(12),%d4
4b8be: 6608 bnes 4b8c8 <IMFS_memfile_write+0x84> <== NEVER TAKEN
4b8c0: baae 0010 cmpl %fp@(16),%d5
4b8c4: 55c4 scs %d4
4b8c6: 6002 bras 4b8ca <IMFS_memfile_write+0x86>
4b8c8: 5dc4 slt %d4 <== NOT EXECUTED
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
4b8ca: 2f00 movel %d0,%sp@-
* in memory file, then extend the length.
*/
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
bool zero_fill = start > the_jnode->info.file.size;
4b8cc: 49c4 extbl %d4
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
4b8ce: 4484 negl %d4
4b8d0: 2f04 movel %d4,%sp@-
4b8d2: 2f0a movel %a2,%sp@-
4b8d4: 4eb9 0004 b6e4 jsr 4b6e4 <IMFS_memfile_extend>
if ( status )
4b8da: 4fef 0010 lea %sp@(16),%sp
4b8de: 4a80 tstl %d0
4b8e0: 6792 beqs 4b874 <IMFS_memfile_write+0x30>
4b8e2: 6000 00d0 braw 4b9b4 <IMFS_memfile_write+0x170>
* 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;
4b8e6: 240c movel %a4,%d2
4b8e8: 948b subl %a3,%d2
4b8ea: bc82 cmpl %d2,%d6
4b8ec: 6402 bccs 4b8f0 <IMFS_memfile_write+0xac>
4b8ee: 2406 movel %d6,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b8f0: 42a7 clrl %sp@-
4b8f2: 2f03 movel %d3,%sp@-
4b8f4: 2f0a movel %a2,%sp@-
4b8f6: 4eb9 0004 b204 jsr 4b204 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b8fc: 4fef 000c lea %sp@(12),%sp
4b900: 4a80 tstl %d0
4b902: 6700 00aa beqw 4b9ae <IMFS_memfile_write+0x16a>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4b906: 2f02 movel %d2,%sp@-
4b908: 2040 moveal %d0,%a0
src += to_copy;
block++;
4b90a: 5283 addql #1,%d3
my_length -= to_copy;
4b90c: 9c82 subl %d2,%d6
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4b90e: 2f07 movel %d7,%sp@-
4b910: d7d0 addal %a0@,%a3
src += to_copy;
4b912: de82 addl %d2,%d7
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4b914: 2f0b movel %a3,%sp@-
4b916: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4b91c: 4fef 000c lea %sp@(12),%sp
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
4b920: 2839 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%d4
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
4b926: 9e82 subl %d2,%d7
* 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 );
4b928: 47f9 0004 b204 lea 4b204 <IMFS_memfile_get_block_pointer>,%a3
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4b92e: 49f9 0004 cb50 lea 4cb50 <memcpy>,%a4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4b934: 6024 bras 4b95a <IMFS_memfile_write+0x116>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b936: 42a7 clrl %sp@-
4b938: 2f03 movel %d3,%sp@-
4b93a: 2f0a movel %a2,%sp@-
4b93c: 4e93 jsr %a3@
if ( !block_ptr )
4b93e: 4fef 000c lea %sp@(12),%sp
4b942: 4a80 tstl %d0
4b944: 676c beqs 4b9b2 <IMFS_memfile_write+0x16e> <== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4b946: 2f04 movel %d4,%sp@-
4b948: 2040 moveal %d0,%a0
src += to_copy;
block++;
4b94a: 5283 addql #1,%d3
my_length -= to_copy;
4b94c: 9c84 subl %d4,%d6
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
4b94e: d484 addl %d4,%d2
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 );
4b950: 2f05 movel %d5,%sp@-
4b952: 2f10 movel %a0@,%sp@-
4b954: 4e94 jsr %a4@
* IMFS_memfile_write
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
4b956: 4fef 000c lea %sp@(12),%sp
4b95a: 2a07 movel %d7,%d5
4b95c: da82 addl %d2,%d5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4b95e: bcb9 0005 d2e0 cmpl 5d2e0 <imfs_memfile_bytes_per_block>,%d6
4b964: 64d0 bccs 4b936 <IMFS_memfile_write+0xf2>
* 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 ) {
4b966: 4a86 tstl %d6
4b968: 6728 beqs 4b992 <IMFS_memfile_write+0x14e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b96a: 42a7 clrl %sp@-
4b96c: 2f03 movel %d3,%sp@-
4b96e: 2f0a movel %a2,%sp@-
4b970: 4eb9 0004 b204 jsr 4b204 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b976: 4fef 000c lea %sp@(12),%sp
4b97a: 4a80 tstl %d0
4b97c: 6734 beqs 4b9b2 <IMFS_memfile_write+0x16e> <== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
4b97e: 2f06 movel %d6,%sp@-
4b980: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4b982: d486 addl %d6,%d2
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
4b984: 2f05 movel %d5,%sp@-
4b986: 2f10 movel %a0@,%sp@-
4b988: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
my_length = 0;
copied += to_copy;
4b98e: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4b992: 42a7 clrl %sp@-
4b994: 486e fff8 pea %fp@(-8)
4b998: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4b99e: 202e fff8 movel %fp@(-8),%d0
return copied;
4b9a2: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4b9a4: 2540 0042 movel %d0,%a2@(66)
4b9a8: 2540 0046 movel %d0,%a2@(70)
4b9ac: 6004 bras 4b9b2 <IMFS_memfile_write+0x16e>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4b9ae: 4280 clrl %d0 <== NOT EXECUTED
4b9b0: 6002 bras 4b9b4 <IMFS_memfile_write+0x170> <== NOT EXECUTED
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
4b9b2: 2002 movel %d2,%d0
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4b9b4: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4
4b9ba: 4e5e unlk %fp <== NOT EXECUTED
000423b0 <IMFS_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
423b0: 4e56 ffd8 linkw %fp,#-40
423b4: 226e 0018 moveal %fp@(24),%a1
423b8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
423bc: 242e 0014 movel %fp@(20),%d2
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
423c0: 2002 movel %d2,%d0
423c2: 0280 0000 f000 andil #61440,%d0
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
423c8: 246e 0008 moveal %fp@(8),%a2
423cc: 206e 001c moveal %fp@(28),%a0
dev_t dev,
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
423d0: 0c80 0000 4000 cmpil #16384,%d0
423d6: 672e beqs 42406 <IMFS_mknod+0x56>
*type = IMFS_DIRECTORY;
} else if ( S_ISREG( mode ) ) {
423d8: 0c80 0000 8000 cmpil #32768,%d0
423de: 672a beqs 4240a <IMFS_mknod+0x5a>
*type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
423e0: 0c80 0000 6000 cmpil #24576,%d0
423e6: 6708 beqs 423f0 <IMFS_mknod+0x40>
423e8: 0c80 0000 2000 cmpil #8192,%d0
423ee: 660c bnes 423fc <IMFS_mknod+0x4c>
*type = IMFS_DEVICE;
rtems_filesystem_split_dev_t(
423f0: 2d49 ffec movel %a1,%fp@(-20)
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;
423f4: 7201 moveq #1,%d1
rtems_filesystem_split_dev_t(
423f6: 2d48 fff0 movel %a0,%fp@(-16)
423fa: 6014 bras 42410 <IMFS_mknod+0x60>
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
423fc: 0c80 0000 1000 cmpil #4096,%d0
42402: 660c bnes 42410 <IMFS_mknod+0x60> <== NEVER TAKEN
42404: 6008 bras 4240e <IMFS_mknod+0x5e>
IMFS_jnode_types_t *type,
IMFS_types_union *info
)
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
42406: 4281 clrl %d1
42408: 6006 bras 42410 <IMFS_mknod+0x60>
} else if ( S_ISREG( mode ) ) {
*type = IMFS_MEMORY_FILE;
4240a: 7204 moveq #4,%d1
4240c: 6002 bras 42410 <IMFS_mknod+0x60>
dev,
info->device.major,
info->device.minor
);
} else if (S_ISFIFO( mode )) {
*type = IMFS_FIFO;
4240e: 7206 moveq #6,%d1
42410: 486e ffec pea %fp@(-20)
42414: 2f02 movel %d2,%sp@-
42416: 2f2e 0010 movel %fp@(16),%sp@-
4241a: 2f2e 000c movel %fp@(12),%sp@-
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
4241e: 206a 0014 moveal %a2@(20),%a0
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
42422: 2068 0008 moveal %a0@(8),%a0
42426: 2f30 1c08 movel %a0@(00000008,%d1:l:4),%sp@-
4242a: 2f0a movel %a2,%sp@-
4242c: 4eb9 0004 9844 jsr 49844 <IMFS_create_node_with_control>
IMFS_jnode_t *new_node;
get_type_and_info_by_mode_and_dev( mode, dev, &type, &info );
new_node = IMFS_create_node( parentloc, type, name, namelen, mode, &info );
if ( new_node != NULL ) {
42432: 4fef 0018 lea %sp@(24),%sp
42436: 4a80 tstl %d0
42438: 6732 beqs 4246c <IMFS_mknod+0xbc>
IMFS_jnode_t *parent = parentloc->node_access;
4243a: 246a 0008 moveal %a2@(8),%a2
IMFS_update_ctime( parent );
4243e: 240e movel %fp,%d2
42440: 0682 ffff ffe4 addil #-28,%d2
42446: 47f9 0004 2ae8 lea 42ae8 <gettimeofday>,%a3
4244c: 42a7 clrl %sp@-
4244e: 2f02 movel %d2,%sp@-
42450: 4e93 jsr %a3@
42452: 256e ffe4 0046 movel %fp@(-28),%a2@(70)
IMFS_update_mtime( parent );
42458: 42a7 clrl %sp@-
4245a: 2f02 movel %d2,%sp@-
4245c: 4e93 jsr %a3@
4245e: 256e ffe4 0042 movel %fp@(-28),%a2@(66)
42464: 4fef 0010 lea %sp@(16),%sp
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
42468: 4280 clrl %d0
4246a: 6002 bras 4246e <IMFS_mknod+0xbe>
IMFS_jnode_t *parent = parentloc->node_access;
IMFS_update_ctime( parent );
IMFS_update_mtime( parent );
} else {
rv = -1;
4246c: 70ff moveq #-1,%d0
}
return rv;
}
4246e: 4cee 0c04 ffd8 moveml %fp@(-40),%d2/%a2-%a3
42474: 4e5e unlk %fp <== NOT EXECUTED
00042478 <IMFS_mount>:
#endif
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
42478: 4e56 0000 linkw %fp,#0
4247c: 226e 0008 moveal %fp@(8),%a1
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
42480: 2069 0020 moveal %a1@(32),%a0
42484: 2068 0008 moveal %a0@(8),%a0
#endif
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
42488: 2f0a movel %a2,%sp@-
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
if ( IMFS_is_directory( node ) ) {
4248a: 2468 004a moveal %a0@(74),%a2
4248e: 4a92 tstl %a2@
42490: 661c bnes 424ae <IMFS_mount+0x36>
if ( node->info.directory.mt_fs == NULL ) {
42492: 4aa8 005a tstl %a0@(90)
42496: 6608 bnes 424a0 <IMFS_mount+0x28> <== NEVER TAKEN
node->info.directory.mt_fs = mt_entry;
42498: 2149 005a movel %a1,%a0@(90)
#include "imfs.h"
int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
4249c: 4280 clrl %d0
4249e: 601c bras 424bc <IMFS_mount+0x44>
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == NULL ) {
node->info.directory.mt_fs = mt_entry;
} else {
errno = EBUSY;
424a0: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
424a6: 7210 moveq #16,%d1 <== NOT EXECUTED
424a8: 2040 moveal %d0,%a0 <== NOT EXECUTED
424aa: 2081 movel %d1,%a0@ <== NOT EXECUTED
424ac: 600c bras 424ba <IMFS_mount+0x42> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
424ae: 4eb9 0004 c330 jsr 4c330 <__errno>
424b4: 2440 moveal %d0,%a2
424b6: 7014 moveq #20,%d0
424b8: 2480 movel %d0,%a2@
rv = -1;
424ba: 70ff moveq #-1,%d0
}
return rv;
}
424bc: 246e fffc moveal %fp@(-4),%a2
424c0: 4e5e unlk %fp <== NOT EXECUTED
00049c42 <IMFS_node_remove_directory>:
}
static IMFS_jnode_t *IMFS_node_remove_directory(
IMFS_jnode_t *node
)
{
49c42: 4e56 0000 linkw %fp,#0
49c46: 202e 0008 movel %fp@(8),%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
49c4a: 2200 movel %d0,%d1
49c4c: 0681 0000 0052 addil #82,%d1
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
49c52: 2040 moveal %d0,%a0
49c54: b2a8 004e cmpl %a0@(78),%d1
49c58: 670e beqs 49c68 <IMFS_node_remove_directory+0x26>
errno = ENOTEMPTY;
49c5a: 4eb9 0004 c330 jsr 4c330 <__errno>
49c60: 725a moveq #90,%d1
49c62: 2040 moveal %d0,%a0
49c64: 2081 movel %d1,%a0@
49c66: 6014 bras 49c7c <IMFS_node_remove_directory+0x3a>
node = NULL;
} else if ( IMFS_is_mount_point( node ) ) {
49c68: 2040 moveal %d0,%a0
49c6a: 4aa8 005a tstl %a0@(90)
49c6e: 670e beqs 49c7e <IMFS_node_remove_directory+0x3c><== ALWAYS TAKEN
errno = EBUSY;
49c70: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
49c76: 2040 moveal %d0,%a0 <== NOT EXECUTED
49c78: 7010 moveq #16,%d0 <== NOT EXECUTED
49c7a: 2080 movel %d0,%a0@ <== NOT EXECUTED
49c7c: 4280 clrl %d0
node = NULL;
}
return node;
}
49c7e: 4e5e unlk %fp
...
000424c4 <IMFS_node_type>:
{
const IMFS_jnode_t *node = loc->node_access;
IMFS_jnode_types_t imfs_type = IMFS_type( node );
rtems_filesystem_node_types_t type;
switch ( imfs_type ) {
424c4: 7202 moveq #2,%d1
#include "imfs.h"
rtems_filesystem_node_types_t IMFS_node_type(
const rtems_filesystem_location_info_t *loc
)
{
424c6: 4e56 0000 linkw %fp,#0
const IMFS_jnode_t *node = loc->node_access;
424ca: 206e 0008 moveal %fp@(8),%a0
424ce: 2068 0008 moveal %a0@(8),%a0
rtems_chain_extract_unprotected( &node->Node );
}
static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node )
{
return node->control->imfs_type;
424d2: 2268 004a moveal %a0@(74),%a1
424d6: 2011 movel %a1@,%d0
IMFS_jnode_types_t imfs_type = IMFS_type( node );
rtems_filesystem_node_types_t type;
switch ( imfs_type ) {
424d8: b280 cmpl %d0,%d1
424da: 670c beqs 424e8 <IMFS_node_type+0x24>
424dc: 123c 0005 moveb #5,%d1
424e0: b280 cmpl %d0,%d1
424e2: 660e bnes 424f2 <IMFS_node_type+0x2e> <== ALWAYS TAKEN
case IMFS_HARD_LINK:
type = IMFS_type( node->info.hard_link.link_node );
break;
case IMFS_LINEAR_FILE:
type = RTEMS_FILESYSTEM_MEMORY_FILE;
424e4: 7004 moveq #4,%d0 <== NOT EXECUTED
424e6: 600a bras 424f2 <IMFS_node_type+0x2e> <== NOT EXECUTED
type = imfs_type;
break;
}
return type;
}
424e8: 2068 004e moveal %a0@(78),%a0
424ec: 2068 004a moveal %a0@(74),%a0
424f0: 2010 movel %a0@,%d0
424f2: 4e5e unlk %fp
...
0004252c <IMFS_rename>:
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
4252c: 4e56 ffec linkw %fp,#-20
int rv = 0;
IMFS_jnode_t *node = oldloc->node_access;
42530: 206e 000c moveal %fp@(12),%a0
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
42534: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int rv = 0;
IMFS_jnode_t *node = oldloc->node_access;
42538: 2468 0008 moveal %a0@(8),%a2
IMFS_jnode_t *new_parent = newparentloc->node_access;
4253c: 206e 0010 moveal %fp@(16),%a0
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
42540: 242e 0018 movel %fp@(24),%d2
int rv = 0;
IMFS_jnode_t *node = oldloc->node_access;
IMFS_jnode_t *new_parent = newparentloc->node_access;
42544: 2668 0008 moveal %a0@(8),%a3
/*
* FIXME: Due to insufficient checks we can create inaccessible nodes with
* this operation.
*/
if ( node->Parent != NULL ) {
42548: 4aaa 0008 tstl %a2@(8)
4254c: 6768 beqs 425b6 <IMFS_rename+0x8a> <== NEVER TAKEN
if ( namelen < IMFS_NAME_MAX ) {
4254e: 701f moveq #31,%d0
42550: b082 cmpl %d2,%d0
42552: 6554 bcss 425a8 <IMFS_rename+0x7c> <== NEVER TAKEN
memcpy( node->name, name, namelen );
42554: 2f02 movel %d2,%sp@-
42556: 2f2e 0014 movel %fp@(20),%sp@-
4255a: 486a 000c pea %a2@(12)
4255e: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
node->name [namelen] = '\0';
42564: 4200 clrb %d0
42566: 1580 280c moveb %d0,%a2@(0000000c,%d2:l)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4256a: 2252 moveal %a2@,%a1
previous = the_node->previous;
4256c: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
42570: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
42574: 2089 movel %a1,%a0@
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
42576: 206b 0056 moveal %a3@(86),%a0
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
4257a: 43eb 0052 lea %a3@(82),%a1
static inline void IMFS_add_to_directory(
IMFS_jnode_t *dir,
IMFS_jnode_t *node
)
{
node->Parent = dir;
4257e: 254b 0008 movel %a3,%a2@(8)
42582: 2489 movel %a1,%a2@
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
42584: 274a 0056 movel %a2,%a3@(86)
old_last->next = the_node;
42588: 208a movel %a2,%a0@
the_node->previous = old_last;
4258a: 2548 0004 movel %a0,%a2@(4)
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
4258e: 42a7 clrl %sp@-
42590: 486e fff8 pea %fp@(-8)
42594: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4259a: 256e fff8 0046 movel %fp@(-8),%a2@(70)
425a0: 4fef 0014 lea %sp@(20),%sp
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
int rv = 0;
425a4: 4280 clrl %d0
425a6: 601c bras 425c4 <IMFS_rename+0x98>
IMFS_remove_from_directory( node );
IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
} else {
errno = ENAMETOOLONG;
425a8: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
425ae: 725b moveq #91,%d1 <== NOT EXECUTED
425b0: 2040 moveal %d0,%a0 <== NOT EXECUTED
425b2: 2081 movel %d1,%a0@ <== NOT EXECUTED
425b4: 600c bras 425c2 <IMFS_rename+0x96> <== NOT EXECUTED
rv = -1;
}
} else {
errno = EINVAL;
425b6: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
425bc: 2240 moveal %d0,%a1 <== NOT EXECUTED
425be: 7016 moveq #22,%d0 <== NOT EXECUTED
425c0: 2280 movel %d0,%a1@ <== NOT EXECUTED
rv = -1;
425c2: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
return rv;
}
425c4: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3
425ca: 4e5e unlk %fp
...
00049bac <IMFS_stat_device>:
static int IMFS_stat_device(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49bac: 4e56 0000 linkw %fp,#0
49bb0: 226e 0008 moveal %fp@(8),%a1
49bb4: 2f0a movel %a2,%sp@-
const IMFS_jnode_t *node = loc->node_access;
49bb6: 2469 0008 moveal %a1@(8),%a2
static int IMFS_stat_device(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49bba: 206e 000c moveal %fp@(12),%a0
const IMFS_jnode_t *node = loc->node_access;
const IMFS_device_t *io = &node->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
49bbe: 202a 0052 movel %a2@(82),%d0
49bc2: 216a 004e 0016 movel %a2@(78),%a0@(22)
return IMFS_stat( loc, buf );
}
49bc8: 245f moveal %sp@+,%a2
49bca: 4e5e unlk %fp
)
{
const IMFS_jnode_t *node = loc->node_access;
const IMFS_device_t *io = &node->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
49bcc: 2140 001a movel %d0,%a0@(26)
return IMFS_stat( loc, buf );
49bd0: 4ef9 0004 9de4 jmp 49de4 <IMFS_stat>
...
00049dac <IMFS_stat_file>:
static int IMFS_stat_file(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49dac: 4e56 0000 linkw %fp,#0
49db0: 226e 0008 moveal %fp@(8),%a1
49db4: 2f0a movel %a2,%sp@-
const IMFS_jnode_t *node = loc->node_access;
buf->st_size = node->info.file.size;
49db6: 2469 0008 moveal %a1@(8),%a2
static int IMFS_stat_file(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49dba: 206e 000c moveal %fp@(12),%a0
const IMFS_jnode_t *node = loc->node_access;
buf->st_size = node->info.file.size;
49dbe: 202a 004e movel %a2@(78),%d0
49dc2: 222a 0052 movel %a2@(82),%d1
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
49dc6: 45f9 0005 c44c lea 5c44c <imfs_rq_memfile_bytes_per_block>,%a2
49dcc: 2152 003e movel %a2@,%a0@(62)
return IMFS_stat( loc, buf );
}
49dd0: 245f moveal %sp@+,%a2
49dd2: 4e5e unlk %fp
struct stat *buf
)
{
const IMFS_jnode_t *node = loc->node_access;
buf->st_size = node->info.file.size;
49dd4: 2140 001e movel %d0,%a0@(30)
49dd8: 2141 0022 movel %d1,%a0@(34)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return IMFS_stat( loc, buf );
49ddc: 4ef9 0004 9de4 jmp 49de4 <IMFS_stat>
...
000426a8 <IMFS_unmount>:
#endif
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
426a8: 4e56 0000 linkw %fp,#0
426ac: 226e 0008 moveal %fp@(8),%a1
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
426b0: 2069 0020 moveal %a1@(32),%a0
426b4: 2068 0008 moveal %a0@(8),%a0
#endif
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
426b8: 2f0a movel %a2,%sp@-
int rv = 0;
IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
if ( IMFS_is_directory( node ) ) {
426ba: 2468 004a moveal %a0@(74),%a2
426be: 4a92 tstl %a2@
426c0: 661c bnes 426de <IMFS_unmount+0x36> <== NEVER TAKEN
if ( node->info.directory.mt_fs == mt_entry ) {
426c2: b3e8 005a cmpal %a0@(90),%a1
426c6: 6608 bnes 426d0 <IMFS_unmount+0x28> <== NEVER TAKEN
node->info.directory.mt_fs = NULL;
426c8: 42a8 005a clrl %a0@(90)
#include "imfs.h"
int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry )
{
int rv = 0;
426cc: 4280 clrl %d0
426ce: 601c bras 426ec <IMFS_unmount+0x44>
if ( IMFS_is_directory( node ) ) {
if ( node->info.directory.mt_fs == mt_entry ) {
node->info.directory.mt_fs = NULL;
} else {
errno = EINVAL;
426d0: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
426d6: 7216 moveq #22,%d1 <== NOT EXECUTED
426d8: 2040 moveal %d0,%a0 <== NOT EXECUTED
426da: 2081 movel %d1,%a0@ <== NOT EXECUTED
426dc: 600c bras 426ea <IMFS_unmount+0x42> <== NOT EXECUTED
rv = -1;
}
} else {
errno = ENOTDIR;
426de: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
426e4: 2440 moveal %d0,%a2 <== NOT EXECUTED
426e6: 7014 moveq #20,%d0 <== NOT EXECUTED
426e8: 2480 movel %d0,%a2@ <== NOT EXECUTED
rv = -1;
426ea: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
return rv;
}
426ec: 246e fffc moveal %fp@(-4),%a2
426f0: 4e5e unlk %fp <== NOT EXECUTED
00042ca0 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
const Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
42ca0: 4e56 fff0 linkw %fp,#-16
42ca4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
Heap_Control *heap = RTEMS_Malloc_Heap;
42ca8: 2639 0005 c40c movel 5c40c <RTEMS_Malloc_Heap>,%d3
if ( !rtems_configuration_get_unified_work_area() ) {
42cae: 4a39 0005 a7f5 tstb 5a7f5 <Configuration+0x31>
42cb4: 664a bnes 42d00 <RTEMS_Malloc_Initialize+0x60>
42cb6: 246e 0008 moveal %fp@(8),%a2
42cba: 4282 clrl %d2
42cbc: 47f9 0004 7304 lea 47304 <_Heap_Initialize>,%a3
42cc2: 601e bras 42ce2 <RTEMS_Malloc_Initialize+0x42>
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
size_t i;
for (i = 0; i < area_count; ++i) {
const Heap_Area *area = &areas [i];
uintptr_t space_available = (*init_or_extend)(
42cc4: 4878 0004 pea 4 <CONTEXT_ARG>
42cc8: 2f2a 0004 movel %a2@(4),%sp@-
42ccc: 2f12 movel %a2@,%sp@-
42cce: 2f03 movel %d3,%sp@-
42cd0: 4e93 jsr %a3@
area->begin,
area->size,
page_size
);
if ( space_available > 0 ) {
42cd2: 4fef 0010 lea %sp@(16),%sp
42cd6: 4a80 tstl %d0
42cd8: 6704 beqs 42cde <RTEMS_Malloc_Initialize+0x3e> <== NEVER TAKEN
init_or_extend = extend;
42cda: 266e 0010 moveal %fp@(16),%a3
if ( !rtems_configuration_get_unified_work_area() ) {
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
size_t i;
for (i = 0; i < area_count; ++i) {
42cde: 5282 addql #1,%d2
42ce0: 508a addql #8,%a2
42ce2: b4ae 000c cmpl %fp@(12),%d2
42ce6: 66dc bnes 42cc4 <RTEMS_Malloc_Initialize+0x24>
if ( space_available > 0 ) {
init_or_extend = extend;
}
}
if ( init_or_extend == _Heap_Initialize ) {
42ce8: b7fc 0004 7304 cmpal #291588,%a3
42cee: 6610 bnes 42d00 <RTEMS_Malloc_Initialize+0x60>
_Internal_error_Occurred(
42cf0: 4878 0017 pea 17 <OPER2+0x3>
42cf4: 4878 0001 pea 1 <ADD>
42cf8: 42a7 clrl %sp@-
42cfa: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred>
}
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
42d00: 2079 0005 cab4 moveal 5cab4 <rtems_malloc_statistics_helpers>,%a0
42d06: 4a88 tstl %a0
42d08: 6704 beqs 42d0e <RTEMS_Malloc_Initialize+0x6e>
(*rtems_malloc_statistics_helpers->initialize)();
42d0a: 2050 moveal %a0@,%a0
42d0c: 4e90 jsr %a0@
}
MSBUMP( space_available, _Protected_heap_Get_size( heap ) );
42d0e: 2439 0005 daf0 movel 5daf0 <rtems_malloc_statistics>,%d2
42d14: 2f03 movel %d3,%sp@-
42d16: 4eb9 0004 7d20 jsr 47d20 <_Protected_heap_Get_size>
42d1c: 588f addql #4,%sp
42d1e: d082 addl %d2,%d0
}
42d20: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
(*rtems_malloc_statistics_helpers->initialize)();
}
MSBUMP( space_available, _Protected_heap_Get_size( heap ) );
42d26: 23c0 0005 daf0 movel %d0,5daf0 <rtems_malloc_statistics>
}
42d2c: 4e5e unlk %fp <== NOT EXECUTED
0005c674 <Stack_check_Dump_threads_usage>:
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
5c674: 70ff moveq #-1,%d0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
5c676: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED
5c67a: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
5c67e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
5c682: b08a cmpl %a2,%d0 <== NOT EXECUTED
5c684: 6616 bnes 5c69c <Stack_check_Dump_threads_usage+0x28><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
5c686: 4ab9 0009 64fc tstl 964fc <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED
5c68c: 6700 00fe beqw 5c78c <Stack_check_Dump_threads_usage+0x118><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
5c690: 47f9 0009 64f8 lea 964f8 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED
the_thread = 0;
current = 0;
5c696: 4284 clrl %d4 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
5c698: 95ca subal %a2,%a2 <== NOT EXECUTED
5c69a: 6008 bras 5c6a4 <Stack_check_Dump_threads_usage+0x30><== NOT EXECUTED
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
5c69c: 282a 00ec movel %a2@(236),%d4 <== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
5c6a0: 47ea 00ac lea %a2@(172),%a3 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
5c6a4: 2613 movel %a3@,%d3 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
5c6a6: 70fc moveq #-4,%d0 <== NOT EXECUTED
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
5c6a8: 0683 ffff fff0 addil #-16,%d3 <== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
5c6ae: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
5c6b2: 2408 movel %a0,%d2 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
5c6b4: 41e8 0020 lea %a0@(32),%a0 <== NOT EXECUTED
{
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
5c6b8: 0682 0000 0010 addil #16,%d2 <== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
5c6be: c083 andl %d3,%d0 <== NOT EXECUTED
5c6c0: d088 addl %a0,%d0 <== NOT EXECUTED
5c6c2: 600c bras 5c6d0 <Stack_check_Dump_threads_usage+0x5c><== NOT EXECUTED
if (*base != U32_PATTERN)
5c6c4: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED
5c6ca: b290 cmpl %a0@,%d1 <== NOT EXECUTED
5c6cc: 6608 bnes 5c6d6 <Stack_check_Dump_threads_usage+0x62><== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
5c6ce: 5888 addql #4,%a0 <== NOT EXECUTED
5c6d0: b088 cmpl %a0,%d0 <== NOT EXECUTED
5c6d2: 62f0 bhis 5c6c4 <Stack_check_Dump_threads_usage+0x50><== NOT EXECUTED
5c6d4: 600a bras 5c6e0 <Stack_check_Dump_threads_usage+0x6c><== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
5c6d6: 4a88 tstl %a0 <== NOT EXECUTED
5c6d8: 6706 beqs 5c6e0 <Stack_check_Dump_threads_usage+0x6c><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
5c6da: d483 addl %d3,%d2 <== NOT EXECUTED
5c6dc: 9488 subl %a0,%d2 <== NOT EXECUTED
5c6de: 6002 bras 5c6e2 <Stack_check_Dump_threads_usage+0x6e><== NOT EXECUTED
else
used = 0;
5c6e0: 4282 clrl %d2 <== NOT EXECUTED
5c6e2: 2879 0009 55b8 moveal 955b8 <print_handler>,%a4 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
5c6e8: 4a8a tstl %a2 <== NOT EXECUTED
5c6ea: 672c beqs 5c718 <Stack_check_Dump_threads_usage+0xa4><== NOT EXECUTED
#endif
{
(*print_handler)(
5c6ec: 486e fffb pea %fp@(-5) <== NOT EXECUTED
5c6f0: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
5c6f4: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5c6f8: 4eb9 0004 c610 jsr 4c610 <rtems_object_get_name> <== NOT EXECUTED
5c6fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c700: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5c704: 4879 0008 cd80 pea 8cd80 <RTEMS_BDPART_MBR_MASTER_TYPE+0x2a7><== NOT EXECUTED
5c70a: 2f39 0009 55b4 movel 955b4 <print_context>,%sp@- <== NOT EXECUTED
5c710: 4e94 jsr %a4@ <== NOT EXECUTED
5c712: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
5c716: 6016 bras 5c72e <Stack_check_Dump_threads_usage+0xba><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
5c718: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
5c71c: 4879 0008 cd8d pea 8cd8d <RTEMS_BDPART_MBR_MASTER_TYPE+0x2b4><== NOT EXECUTED
5c722: 2f39 0009 55b4 movel 955b4 <print_context>,%sp@- <== NOT EXECUTED
5c728: 4e94 jsr %a4@ <== NOT EXECUTED
5c72a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
5c72e: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
5c732: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c734: 2f04 movel %d4,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
5c736: 2013 movel %a3@,%d0 <== NOT EXECUTED
5c738: 5380 subql #1,%d0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
5c73a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
5c73e: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5c740: 4879 0008 cd9b pea 8cd9b <RTEMS_BDPART_MBR_MASTER_TYPE+0x2c2><== NOT EXECUTED
5c746: 2f39 0009 55b4 movel 955b4 <print_context>,%sp@- <== NOT EXECUTED
5c74c: 2079 0009 55b8 moveal 955b8 <print_handler>,%a0 <== NOT EXECUTED
5c752: 4e90 jsr %a0@ <== NOT EXECUTED
5c754: 2079 0009 55b8 moveal 955b8 <print_handler>,%a0 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
5c75a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5c75e: 4ab9 0009 55b0 tstl 955b0 <Stack_check_Initialized> <== NOT EXECUTED
5c764: 6612 bnes 5c778 <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
5c766: 4879 0008 cdb9 pea 8cdb9 <RTEMS_BDPART_MBR_MASTER_TYPE+0x2e0><== NOT EXECUTED
5c76c: 2f39 0009 55b4 movel 955b4 <print_context>,%sp@- <== NOT EXECUTED
5c772: 4e90 jsr %a0@ <== NOT EXECUTED
5c774: 508f addql #8,%sp <== NOT EXECUTED
5c776: 6014 bras 5c78c <Stack_check_Dump_threads_usage+0x118><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
5c778: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c77a: 4879 0008 cdc6 pea 8cdc6 <RTEMS_BDPART_MBR_MASTER_TYPE+0x2ed><== NOT EXECUTED
5c780: 2f39 0009 55b4 movel 955b4 <print_context>,%sp@- <== NOT EXECUTED
5c786: 4e90 jsr %a0@ <== NOT EXECUTED
5c788: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
5c78c: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED
5c792: 4e5e unlk %fp <== NOT EXECUTED
0005c862 <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)
{
5c862: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
5c866: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED
5c86a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
5c86e: 47f9 0004 3564 lea 43564 <printk>,%a3 <== NOT EXECUTED
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
5c874: 286a 00b0 moveal %a2@(176),%a4 <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
5c878: 4879 0008 cdcc pea 8cdcc <RTEMS_BDPART_MBR_MASTER_TYPE+0x2f3><== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
5c87e: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
char name[32];
printk("BLOWN STACK!!!\n");
5c882: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
5c884: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c886: 4879 0008 cddc pea 8cddc <RTEMS_BDPART_MBR_MASTER_TYPE+0x303><== NOT EXECUTED
5c88c: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
5c88e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5c892: 4879 0008 cdf9 pea 8cdf9 <RTEMS_BDPART_MBR_MASTER_TYPE+0x320><== NOT EXECUTED
5c898: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
5c89a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
5c89e: 4879 0008 ce0b pea 8ce0b <RTEMS_BDPART_MBR_MASTER_TYPE+0x332><== NOT EXECUTED
5c8a4: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
5c8a6: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED
5c8aa: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5c8ae: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5c8b2: 4eb9 0004 c610 jsr 4c610 <rtems_object_get_name> <== NOT EXECUTED
5c8b8: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
5c8bc: 2e80 movel %d0,%sp@ <== NOT EXECUTED
5c8be: 4879 0008 ce1f pea 8ce1f <RTEMS_BDPART_MBR_MASTER_TYPE+0x346><== NOT EXECUTED
5c8c4: 4e93 jsr %a3@ <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
5c8c6: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
5c8ca: 202a 00ac movel %a2@(172),%d0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
5c8ce: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
5c8d2: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5c8d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c8d6: 4879 0008 ce35 pea 8ce35 <RTEMS_BDPART_MBR_MASTER_TYPE+0x35c><== NOT EXECUTED
5c8dc: 4e93 jsr %a3@ <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
5c8de: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5c8e2: 4a02 tstb %d2 <== NOT EXECUTED
5c8e4: 6618 bnes 5c8fe <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
printk(
5c8e6: 486c 0018 pea %a4@(24) <== NOT EXECUTED
5c8ea: 486c 0008 pea %a4@(8) <== NOT EXECUTED
5c8ee: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
5c8f2: 4879 0008 ce66 pea 8ce66 <RTEMS_BDPART_MBR_MASTER_TYPE+0x38d><== NOT EXECUTED
5c8f8: 4e93 jsr %a3@ <== NOT EXECUTED
5c8fa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal(
5c8fe: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
5c902: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
5c906: 4eb9 0004 67c4 jsr 467c4 <rtems_fatal> <== NOT EXECUTED
0004b61c <TOD_MICROSECONDS_TO_TICKS>:
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ticks = microseconds / microseconds_per_tick;
4b61c: 41f9 0005 f404 lea 5f404 <Configuration+0xc>,%a0
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
4b622: 4e56 0000 linkw %fp,#0
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ticks = microseconds / microseconds_per_tick;
4b626: 202e 0008 movel %fp@(8),%d0
4b62a: 4c50 0001 remul %a0@,%d1,%d0
4b62e: 4c50 0000 remul %a0@,%d0,%d0
if ( (microseconds % microseconds_per_tick) != 0 )
4b632: 4a81 tstl %d1
4b634: 6702 beqs 4b638 <TOD_MICROSECONDS_TO_TICKS+0x1c> <== ALWAYS TAKEN
ticks += 1;
4b636: 5280 addql #1,%d0 <== NOT EXECUTED
return ticks;
}
4b638: 4e5e unlk %fp <== NOT EXECUTED
0004775c <TOD_MILLISECONDS_TO_TICKS>:
#include <rtems/score/tod.h>
uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds
)
{
4775c: 4e56 0000 linkw %fp,#0
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
47760: 2039 0005 b664 movel 5b664 <Configuration+0xc>,%d0
#include <rtems/score/tod.h>
uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds
)
{
47766: 2f02 movel %d2,%sp@-
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
47768: 243c 0000 03e8 movel #1000,%d2
4776e: 4c42 0000 remul %d2,%d0,%d0
ticks = milliseconds / milliseconds_per_tick;
47772: 242e 0008 movel %fp@(8),%d2
47776: 4c40 2001 remul %d0,%d1,%d2
4777a: 4c40 2002 remul %d0,%d2,%d2
4777e: 2002 movel %d2,%d0
if ( (milliseconds % milliseconds_per_tick) != 0 )
47780: 4a81 tstl %d1
47782: 6702 beqs 47786 <TOD_MILLISECONDS_TO_TICKS+0x2a> <== ALWAYS TAKEN
ticks += 1;
47784: 5280 addql #1,%d0 <== NOT EXECUTED
return ticks;
}
47786: 241f movel %sp@+,%d2
47788: 4e5e unlk %fp <== NOT EXECUTED
00046c98 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
46c98: 4e56 0000 linkw %fp,#0
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
46c9c: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0
++level;
46ca2: 5280 addql #1,%d0
46ca4: 206e 0008 moveal %fp@(8),%a0
_Thread_Dispatch_disable_level = level;
46ca8: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level>
/* Dispatch is already disabled in SMP while lock is held. */
#if !defined(RTEMS_SMP)
_Thread_Disable_dispatch();
#endif
_CORE_mutex_Surrender(
46cae: 42a7 clrl %sp@-
46cb0: 2f28 0008 movel %a0@(8),%sp@-
46cb4: 4868 0010 pea %a0@(16)
46cb8: 4eb9 0004 6f4c jsr 46f4c <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
46cbe: 4fef 000c lea %sp@(12),%sp
}
46cc2: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
46cc4: 4ef9 0004 8678 jmp 48678 <_Thread_Enable_dispatch>
...
0004d1c0 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4d1c0: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d1c6: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4d1ca: 2279 0005 fd72 moveal 5fd72 <_Per_CPU_Information+0xe>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d1d0: 48d7 001c moveml %d2-%d4,%sp@
4d1d4: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4d1d8: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d1dc: 242e 000c movel %fp@(12),%d2
4d1e0: 262e 0014 movel %fp@(20),%d3
4d1e4: 282e 0018 movel %fp@(24),%d4
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4d1e8: 40c1 movew %sr,%d1
4d1ea: 8081 orl %d1,%d0
4d1ec: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4d1ee: 2028 0048 movel %a0@(72),%d0
4d1f2: 5280 addql #1,%d0
4d1f4: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4d1f8: 4aa8 0040 tstl %a0@(64)
4d1fc: 6626 bnes 4d224 <_CORE_barrier_Wait+0x64>
if ( the_barrier->number_of_waiting_threads ==
4d1fe: b0a8 0044 cmpl %a0@(68),%d0
4d202: 6620 bnes 4d224 <_CORE_barrier_Wait+0x64>
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
4d204: 7001 moveq #1,%d0
4d206: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4d20a: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d20c: 2d44 0010 movel %d4,%fp@(16)
4d210: 2d42 000c movel %d2,%fp@(12)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4d214: 4cd7 001c moveml %sp@,%d2-%d4
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d218: 2d48 0008 movel %a0,%fp@(8)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4d21c: 4e5e unlk %fp
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d21e: 4ef9 0004 d18c jmp 4d18c <_CORE_barrier_Release>
4d224: 7001 moveq #1,%d0
4d226: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4d22a: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
4d22e: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
4d232: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d234: 2d43 000c movel %d3,%fp@(12)
4d238: 203c 0004 a394 movel #304020,%d0
4d23e: 2d48 0008 movel %a0,%fp@(8)
}
4d242: 4cd7 001c moveml %sp@,%d2-%d4
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d246: 2d40 0010 movel %d0,%fp@(16)
}
4d24a: 4e5e unlk %fp
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d24c: 4ef9 0004 a0a4 jmp 4a0a4 <_Thread_queue_Enqueue_with_handler>
...
0004e6fc <_CORE_message_queue_Initialize>:
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
4e6fc: 7003 moveq #3,%d0
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
)
{
4e6fe: 4e56 ffe4 linkw %fp,#-28
4e702: 222e 0014 movel %fp@(20),%d1
4e706: 48d7 04fc moveml %d2-%d7/%a2,%sp@
4e70a: 246e 0008 moveal %fp@(8),%a2
4e70e: 282e 0010 movel %fp@(16),%d4
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
4e712: c081 andl %d1,%d0
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
4e714: 2544 0044 movel %d4,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
4e718: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
4e71c: 2541 004c movel %d1,%a2@(76)
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
4e720: 4a80 tstl %d0
4e722: 6712 beqs 4e736 <_CORE_message_queue_Initialize+0x3a>
allocated_message_size += sizeof(uintptr_t);
4e724: 2001 movel %d1,%d0
4e726: 5880 addql #4,%d0
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
4e728: 74fc moveq #-4,%d2
4e72a: c082 andl %d2,%d0
/*
* Check for an overflow. It can occur while increasing allocated_message_size
* to multiplicity of uintptr_t above.
*/
if (allocated_message_size < maximum_message_size)
4e72c: b280 cmpl %d0,%d1
4e72e: 6308 blss 4e738 <_CORE_message_queue_Initialize+0x3c>
return false;
4e730: 4200 clrb %d0
4e732: 6000 0086 braw 4e7ba <_CORE_message_queue_Initialize+0xbe>
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
4e736: 2001 movel %d1,%d0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
4e738: 2a00 movel %d0,%d5
4e73a: 0685 0000 0010 addil #16,%d5
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
4e740: 2f05 movel %d5,%sp@-
if ( x > SIZE_MAX )
4e742: 4286 clrl %d6
4e744: 7eff moveq #-1,%d7
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
4e746: 42a7 clrl %sp@-
4e748: 2f04 movel %d4,%sp@-
4e74a: 42a7 clrl %sp@-
4e74c: 4eb9 0006 0948 jsr 60948 <__muldi3>
4e752: 4fef 0010 lea %sp@(16),%sp
4e756: 2400 movel %d0,%d2
4e758: 2601 movel %d1,%d3
if ( x > SIZE_MAX )
4e75a: 9e83 subl %d3,%d7
4e75c: 9d82 subxl %d2,%d6
4e75e: 6dd0 blts 4e730 <_CORE_message_queue_Initialize+0x34>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
4e760: 2f01 movel %d1,%sp@-
4e762: 4eb9 0005 1050 jsr 51050 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
4e768: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4e76a: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4e76e: 67c0 beqs 4e730 <_CORE_message_queue_Initialize+0x34><== NEVER TAKEN
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
4e770: 2f05 movel %d5,%sp@-
4e772: 2f04 movel %d4,%sp@-
4e774: 2f00 movel %d0,%sp@-
4e776: 486a 0060 pea %a2@(96)
4e77a: 4eb9 0004 e6b8 jsr 4e6b8 <_Chain_Initialize>
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 );
4e780: 41ea 0054 lea %a2@(84),%a0
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
4e784: 7001 moveq #1,%d0
4e786: 2548 0050 movel %a0,%a2@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4e78a: 41ea 0050 lea %a2@(80),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4e78e: 42aa 0054 clrl %a2@(84)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4e792: 2548 0058 movel %a0,%a2@(88)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
4e796: 4878 0006 pea 6 <EXTENDSFDF>
4e79a: 206e 000c moveal %fp@(12),%a0
4e79e: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
4e7a2: b090 cmpl %a0@,%d0
4e7a4: 57c0 seq %d0
4e7a6: 49c0 extbl %d0
4e7a8: 4480 negl %d0
4e7aa: 2f00 movel %d0,%sp@-
4e7ac: 2f0a movel %a2,%sp@-
4e7ae: 4eb9 0005 0910 jsr 50910 <_Thread_queue_Initialize>
4e7b4: 4fef 0020 lea %sp@(32),%sp
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
4e7b8: 7001 moveq #1,%d0
}
4e7ba: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2
4e7c0: 4e5e unlk %fp <== NOT EXECUTED
00047084 <_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
)
{
47084: 4e56 0000 linkw %fp,#0
47088: 2f0a movel %a2,%sp@-
4708a: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
4708e: 2f0a movel %a2,%sp@-
47090: 4eb9 0004 895c jsr 4895c <_Thread_queue_Dequeue>
47096: 588f addql #4,%sp
47098: 4a80 tstl %d0
4709a: 6624 bnes 470c0 <_CORE_semaphore_Surrender+0x3c>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
4709c: 303c 0700 movew #1792,%d0
470a0: 40c1 movew %sr,%d1
470a2: 8081 orl %d1,%d0
470a4: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
470a6: 202a 0048 movel %a2@(72),%d0
470aa: b0aa 0040 cmpl %a2@(64),%d0
470ae: 640a bccs 470ba <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN
the_semaphore->count += 1;
470b0: 5280 addql #1,%d0
470b2: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
470b6: 4280 clrl %d0
470b8: 6002 bras 470bc <_CORE_semaphore_Surrender+0x38>
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
470ba: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
470bc: 46c1 movew %d1,%sr
470be: 6002 bras 470c2 <_CORE_semaphore_Surrender+0x3e>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
470c0: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
470c2: 246e fffc moveal %fp@(-4),%a2
470c6: 4e5e unlk %fp
...
00045ed8 <_Event_Surrender>:
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
_ISR_Disable( level );
45ed8: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
45ede: 4e56 ffe4 linkw %fp,#-28
45ee2: 206e 0010 moveal %fp@(16),%a0
45ee6: 48d7 04fc moveml %d2-%d7/%a2,%sp@
45eea: 246e 0008 moveal %fp@(8),%a2
45eee: 242e 000c movel %fp@(12),%d2
rtems_event_set pending_events;
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
45ef2: 282a 0030 movel %a2@(48),%d4
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
45ef6: 226e 0014 moveal %fp@(20),%a1
45efa: 2a2e 0018 movel %fp@(24),%d5
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
_ISR_Disable( level );
45efe: 40c1 movew %sr,%d1
45f00: 8081 orl %d1,%d0
45f02: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set the_new_events,
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
45f04: 8490 orl %a0@,%d2
45f06: 2082 movel %d2,%a0@
_Event_sets_Post( event_in, &event->pending_events );
pending_events = event->pending_events;
event_condition = the_thread->Wait.count;
45f08: 262a 0024 movel %a2@(36),%d3
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
45f0c: 2002 movel %d2,%d0
45f0e: c083 andl %d3,%d0
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
45f10: 6604 bnes 45f16 <_Event_Surrender+0x3e>
45f12: 6000 00aa braw 45fbe <_Event_Surrender+0xe6>
/*
* 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() &&
45f16: 4ab9 0005 dd68 tstl 5dd68 <_Per_CPU_Information+0x8>
45f1c: 6736 beqs 45f54 <_Event_Surrender+0x7c>
45f1e: b5f9 0005 dd6e cmpal 5dd6e <_Per_CPU_Information+0xe>,%a2
45f24: 662e bnes 45f54 <_Event_Surrender+0x7c>
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
45f26: 2c11 movel %a1@,%d6
/*
* 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 ) &&
45f28: 7e01 moveq #1,%d7
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
45f2a: 5386 subql #1,%d6
/*
* 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 ) &&
45f2c: be86 cmpl %d6,%d7
45f2e: 6524 bcss 45f54 <_Event_Surrender+0x7c> <== NEVER TAKEN
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
45f30: b680 cmpl %d0,%d3
45f32: 6708 beqs 45f3c <_Event_Surrender+0x64> <== NEVER TAKEN
45f34: 0804 0001 btst #1,%d4
45f38: 6700 0084 beqw 45fbe <_Event_Surrender+0xe6>
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) );
45f3c: 2600 movel %d0,%d3
45f3e: 4683 notl %d3
45f40: c682 andl %d2,%d3
45f42: 2083 movel %d3,%a0@
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
45f44: 206a 0028 moveal %a2@(40),%a0
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
45f48: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
45f4c: 2080 movel %d0,%a0@
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
45f4e: 7003 moveq #3,%d0
45f50: 2280 movel %d0,%a1@
45f52: 606a bras 45fbe <_Event_Surrender+0xe6>
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
45f54: caaa 0010 andl %a2@(16),%d5
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
45f58: 6764 beqs 45fbe <_Event_Surrender+0xe6>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
45f5a: b680 cmpl %d0,%d3
45f5c: 6706 beqs 45f64 <_Event_Surrender+0x8c>
45f5e: 0804 0001 btst #1,%d4
45f62: 675a beqs 45fbe <_Event_Surrender+0xe6> <== NEVER TAKEN
45f64: 2600 movel %d0,%d3
45f66: 4683 notl %d3
45f68: c682 andl %d2,%d3
45f6a: 2083 movel %d3,%a0@
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
45f6c: 206a 0028 moveal %a2@(40),%a0
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
45f70: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
45f74: 2080 movel %d0,%a0@
_ISR_Flash( level );
45f76: 203c 0000 0700 movel #1792,%d0
45f7c: 46c1 movew %d1,%sr
45f7e: 8081 orl %d1,%d0
45f80: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
45f82: 7002 moveq #2,%d0
45f84: b0aa 0050 cmpl %a2@(80),%d0
45f88: 6704 beqs 45f8e <_Event_Surrender+0xb6>
_ISR_Enable( level );
45f8a: 46c1 movew %d1,%sr
45f8c: 6014 bras 45fa2 <_Event_Surrender+0xca>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
45f8e: 7003 moveq #3,%d0
45f90: 2540 0050 movel %d0,%a2@(80)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
45f94: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
45f96: 486a 0048 pea %a2@(72)
45f9a: 4eb9 0004 923c jsr 4923c <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
45fa0: 588f addql #4,%sp
45fa2: 2d4a 0008 movel %a2,%fp@(8)
45fa6: 2e3c 1007 fff8 movel #268959736,%d7
45fac: 2d47 000c movel %d7,%fp@(12)
}
return;
}
}
_ISR_Enable( level );
}
45fb0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2
45fb6: 4e5e unlk %fp
45fb8: 4ef9 0004 8304 jmp 48304 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
45fbe: 46c1 movew %d1,%sr
}
45fc0: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2
45fc6: 4e5e unlk %fp
...
00045fcc <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
45fcc: 4e56 fffc linkw %fp,#-4
45fd0: 2f0a movel %a2,%sp@-
45fd2: 246e 000c moveal %fp@(12),%a2
45fd6: 2f02 movel %d2,%sp@-
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
45fd8: 486e fffc pea %fp@(-4)
45fdc: 2f2e 0008 movel %fp@(8),%sp@-
45fe0: 4eb9 0004 8698 jsr 48698 <_Thread_Get>
switch ( location ) {
45fe6: 508f addql #8,%sp
45fe8: 4aae fffc tstl %fp@(-4)
45fec: 664c bnes 4603a <_Event_Timeout+0x6e> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
45fee: 223c 0000 0700 movel #1792,%d1
45ff4: 40c2 movew %sr,%d2
45ff6: 8282 orl %d2,%d1
45ff8: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
45ffa: 2040 moveal %d0,%a0
45ffc: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
46000: b0b9 0005 dd6e cmpl 5dd6e <_Per_CPU_Information+0xe>,%d0
46006: 660a bnes 46012 <_Event_Timeout+0x46>
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
46008: 7201 moveq #1,%d1
4600a: b292 cmpl %a2@,%d1
4600c: 6604 bnes 46012 <_Event_Timeout+0x46>
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4600e: 7202 moveq #2,%d1
46010: 2481 movel %d1,%a2@
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46012: 7206 moveq #6,%d1
46014: 2040 moveal %d0,%a0
46016: 2141 0034 movel %d1,%a0@(52)
_ISR_Enable( level );
4601a: 46c2 movew %d2,%sr
4601c: 2f3c 1007 fff8 movel #268959736,%sp@-
46022: 2f00 movel %d0,%sp@-
46024: 4eb9 0004 8304 jsr 48304 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
--level;
_Thread_Dispatch_disable_level = level;
4602a: 508f addql #8,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
4602c: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0
--level;
46032: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
46034: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4603a: 242e fff4 movel %fp@(-12),%d2
4603e: 246e fff8 moveal %fp@(-8),%a2
46042: 4e5e unlk %fp
...
0004ad3c <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4ad3c: 4e56 ffe8 linkw %fp,#-24
4ad40: 206e 0008 moveal %fp@(8),%a0
4ad44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4ad48: 202e 000c movel %fp@(12),%d0
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
4ad4c: 6700 0154 beqw 4aea2 <_Heap_Free+0x166>
4ad50: 2240 moveal %d0,%a1
4ad52: 5189 subql #8,%a1
4ad54: 4c68 0001 0010 remul %a0@(16),%d1,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4ad5a: 2828 0020 movel %a0@(32),%d4
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4ad5e: 93c1 subal %d1,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4ad60: b889 cmpl %a1,%d4
4ad62: 620c bhis 4ad70 <_Heap_Free+0x34>
4ad64: b3e8 0024 cmpal %a0@(36),%a1
4ad68: 53c0 sls %d0
4ad6a: 49c0 extbl %d0
4ad6c: 4480 negl %d0
4ad6e: 6002 bras 4ad72 <_Heap_Free+0x36>
4ad70: 4280 clrl %d0
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
4ad72: 0800 0000 btst #0,%d0
4ad76: 6700 012e beqw 4aea6 <_Heap_Free+0x16a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4ad7a: 2629 0004 movel %a1@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4ad7e: 70fe moveq #-2,%d0
4ad80: c083 andl %d3,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4ad82: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4ad86: b88a cmpl %a2,%d4
4ad88: 620c bhis 4ad96 <_Heap_Free+0x5a> <== NEVER TAKEN
4ad8a: b5e8 0024 cmpal %a0@(36),%a2
4ad8e: 53c1 sls %d1
4ad90: 49c1 extbl %d1
4ad92: 4481 negl %d1
4ad94: 6002 bras 4ad98 <_Heap_Free+0x5c>
4ad96: 4281 clrl %d1 <== NOT EXECUTED
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
4ad98: 0801 0000 btst #0,%d1
4ad9c: 6700 0108 beqw 4aea6 <_Heap_Free+0x16a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4ada0: 242a 0004 movel %a2@(4),%d2
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
4ada4: 0802 0000 btst #0,%d2
4ada8: 6700 00fc beqw 4aea6 <_Heap_Free+0x16a>
- 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;
4adac: 72fe moveq #-2,%d1
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4adae: 2668 0024 moveal %a0@(36),%a3
4adb2: c481 andl %d1,%d2
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4adb4: b7ca cmpal %a2,%a3
4adb6: 670c beqs 4adc4 <_Heap_Free+0x88>
4adb8: 2232 2804 movel %a2@(00000004,%d2:l),%d1
4adbc: 7a01 moveq #1,%d5
4adbe: bb81 eorl %d5,%d1
4adc0: c285 andl %d5,%d1
4adc2: 6002 bras 4adc6 <_Heap_Free+0x8a>
4adc4: 4281 clrl %d1
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4adc6: 1a01 moveb %d1,%d5
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4adc8: 0803 0000 btst #0,%d3
4adcc: 6662 bnes 4ae30 <_Heap_Free+0xf4>
uintptr_t const prev_size = block->prev_size;
4adce: 2611 movel %a1@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4add0: 93c3 subal %d3,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4add2: b889 cmpl %a1,%d4
4add4: 620a bhis 4ade0 <_Heap_Free+0xa4> <== NEVER TAKEN
4add6: b3cb cmpal %a3,%a1
4add8: 53c1 sls %d1
4adda: 49c1 extbl %d1
4addc: 4481 negl %d1
4adde: 6002 bras 4ade2 <_Heap_Free+0xa6>
4ade0: 4281 clrl %d1 <== NOT EXECUTED
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
4ade2: 0801 0000 btst #0,%d1
4ade6: 6700 00be beqw 4aea6 <_Heap_Free+0x16a>
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;
4adea: 7201 moveq #1,%d1
4adec: c2a9 0004 andl %a1@(4),%d1
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) ) {
4adf0: 6700 00b4 beqw 4aea6 <_Heap_Free+0x16a>
4adf4: d680 addl %d0,%d3
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4adf6: 4a05 tstb %d5
4adf8: 6724 beqs 4ae1e <_Heap_Free+0xe2>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4adfa: 266a 0008 moveal %a2@(8),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
4adfe: d483 addl %d3,%d2
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae00: 7201 moveq #1,%d1
Heap_Block *prev = block->prev;
4ae02: 246a 000c moveal %a2@(12),%a2
prev->next = next;
4ae06: 254b 0008 movel %a3,%a2@(8)
4ae0a: 8282 orl %d2,%d1
next->prev = prev;
4ae0c: 274a 000c movel %a2,%a3@(12)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4ae10: 53a8 0038 subql #1,%a0@(56)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4ae14: 2382 2800 movel %d2,%a1@(00000000,%d2:l)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae18: 2341 0004 movel %d1,%a1@(4)
4ae1c: 6078 bras 4ae96 <_Heap_Free+0x15a>
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;
4ae1e: 7401 moveq #1,%d2
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae20: 7afe moveq #-2,%d5
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae22: 8483 orl %d3,%d2
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4ae24: 2483 movel %d3,%a2@
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;
4ae26: 2342 0004 movel %d2,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae2a: cbaa 0004 andl %d5,%a2@(4)
4ae2e: 6066 bras 4ae96 <_Heap_Free+0x15a>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4ae30: 4a01 tstb %d1
4ae32: 672a beqs 4ae5e <_Heap_Free+0x122>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4ae34: 266a 0008 moveal %a2@(8),%a3
uintptr_t const size = block_size + next_block_size;
4ae38: 2202 movel %d2,%d1
4ae3a: d280 addl %d0,%d1
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae3c: 7401 moveq #1,%d2
Heap_Block *prev = old_block->prev;
4ae3e: 246a 000c moveal %a2@(12),%a2
new_block->next = next;
4ae42: 234b 0008 movel %a3,%a1@(8)
4ae46: 8481 orl %d1,%d2
new_block->prev = prev;
4ae48: 234a 000c movel %a2,%a1@(12)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4ae4c: 2381 1800 movel %d1,%a1@(00000000,%d1:l)
next->prev = new_block;
4ae50: 2749 000c movel %a1,%a3@(12)
prev->next = new_block;
4ae54: 2549 0008 movel %a1,%a2@(8)
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;
4ae58: 2342 0004 movel %d2,%a1@(4)
4ae5c: 6038 bras 4ae96 <_Heap_Free+0x15a>
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;
4ae5e: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae60: 72fe moveq #-2,%d1
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;
4ae62: 8a80 orl %d0,%d5
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4ae64: 2668 0008 moveal %a0@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4ae68: 2348 000c movel %a0,%a1@(12)
4ae6c: 2345 0004 movel %d5,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae70: c3aa 0004 andl %d1,%a2@(4)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4ae74: 2228 0038 movel %a0@(56),%d1
4ae78: 5281 addql #1,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4ae7a: 234b 0008 movel %a3,%a1@(8)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
4ae7e: 2749 000c movel %a1,%a3@(12)
/* 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;
next_block->prev_size = block_size;
4ae82: 2480 movel %d0,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4ae84: 2149 0008 movel %a1,%a0@(8)
/* Statistics */
++stats->free_blocks;
4ae88: 2141 0038 movel %d1,%a0@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4ae8c: b2a8 003c cmpl %a0@(60),%d1
4ae90: 6304 blss 4ae96 <_Heap_Free+0x15a>
stats->max_free_blocks = stats->free_blocks;
4ae92: 2141 003c movel %d1,%a0@(60)
}
}
/* Statistics */
--stats->used_blocks;
4ae96: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4ae9a: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4ae9e: d1a8 0030 addl %d0,%a0@(48)
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
4aea2: 7001 moveq #1,%d0
4aea4: 6002 bras 4aea8 <_Heap_Free+0x16c>
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
4aea6: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4aea8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
4aeac: 4e5e unlk %fp <== NOT EXECUTED
00048f20 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
48f20: 4e56 ffe8 linkw %fp,#-24
48f24: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
48f28: 246e 0008 moveal %fp@(8),%a2
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
48f2c: 4282 clrl %d2
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
48f2e: 97cb subal %a3,%a3
* @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 );
48f30: 4bf9 0004 eda8 lea 4eda8 <_Heap_Allocate_aligned_with_boundary>,%a5
48f36: 286e 000c moveal %fp@(12),%a4
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
48f3a: 6026 bras 48f62 <_Heap_Greedy_allocate+0x42>
48f3c: 42a7 clrl %sp@-
48f3e: 42a7 clrl %sp@-
48f40: 2f1c movel %a4@+,%sp@-
48f42: 2f0a movel %a2,%sp@-
48f44: 4e95 jsr %a5@
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
48f46: 4fef 0010 lea %sp@(16),%sp
48f4a: 4a80 tstl %d0
48f4c: 6712 beqs 48f60 <_Heap_Greedy_allocate+0x40> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
48f4e: 2040 moveal %d0,%a0
48f50: 5188 subql #8,%a0
48f52: 4c6a 0001 0010 remul %a2@(16),%d1,%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
48f58: 91c1 subal %d1,%a0
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
48f5a: 214b 0008 movel %a3,%a0@(8)
48f5e: 2648 moveal %a0,%a3
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
48f60: 5282 addql #1,%d2
48f62: b4ae 0010 cmpl %fp@(16),%d2
48f66: 66d4 bnes 48f3c <_Heap_Greedy_allocate+0x1c>
48f68: 4282 clrl %d2
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
48f6a: 4bf9 0004 922e lea 4922e <_Heap_Block_allocate>,%a5
48f70: 6020 bras 48f92 <_Heap_Greedy_allocate+0x72>
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48f72: 70fe moveq #-2,%d0
48f74: c0ac 0004 andl %a4@(4),%d0
48f78: 2040 moveal %d0,%a0
48f7a: 4868 fff8 pea %a0@(-8)
48f7e: 486c 0008 pea %a4@(8)
48f82: 2f0c movel %a4,%sp@-
48f84: 2f0a movel %a2,%sp@-
48f86: 4e95 jsr %a5@
48f88: 4fef 0010 lea %sp@(16),%sp
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
48f8c: 2942 0008 movel %d2,%a4@(8)
48f90: 240c movel %a4,%d2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48f92: 286a 0008 moveal %a2@(8),%a4
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
48f96: b5cc cmpal %a4,%a2
48f98: 66d8 bnes 48f72 <_Heap_Greedy_allocate+0x52>
48f9a: 6012 bras 48fae <_Heap_Greedy_allocate+0x8e>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
48f9c: 262b 0008 movel %a3@(8),%d3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
48fa0: 486b 0008 pea %a3@(8)
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
48fa4: 2643 moveal %d3,%a3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
48fa6: 2f0a movel %a2,%sp@-
48fa8: 4e94 jsr %a4@
48faa: 508f addql #8,%sp
48fac: 6006 bras 48fb4 <_Heap_Greedy_allocate+0x94>
48fae: 49f9 0004 ef08 lea 4ef08 <_Heap_Free>,%a4
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
48fb4: 4a8b tstl %a3
48fb6: 66e4 bnes 48f9c <_Heap_Greedy_allocate+0x7c>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
48fb8: 2002 movel %d2,%d0
48fba: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
48fc0: 4e5e unlk %fp <== NOT EXECUTED
0004f48c <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
4f48c: 4e56 0000 linkw %fp,#0
4f490: 226e 0008 moveal %fp@(8),%a1
4f494: 2f0a movel %a2,%sp@-
Heap_Block *current = heap->first_block;
4f496: 2069 0020 moveal %a1@(32),%a0
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
4f49a: 2f02 movel %d2,%sp@-
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
4f49c: 2429 0024 movel %a1@(36),%d2
4f4a0: 602a bras 4f4cc <_Heap_Iterate+0x40>
4f4a2: 70fe moveq #-2,%d0
while ( !stop && current != end ) {
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
4f4a4: 7201 moveq #1,%d1
4f4a6: c0a8 0004 andl %a0@(4),%d0
4f4aa: 2f2e 0010 movel %fp@(16),%sp@-
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4f4ae: 45f0 0800 lea %a0@(00000000,%d0:l),%a2
4f4b2: c2aa 0004 andl %a2@(4),%d1
4f4b6: 2f01 movel %d1,%sp@-
4f4b8: 2f00 movel %d0,%sp@-
4f4ba: 2f08 movel %a0,%sp@-
4f4bc: 206e 000c moveal %fp@(12),%a0
4f4c0: 4e90 jsr %a0@
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
4f4c2: 4fef 0010 lea %sp@(16),%sp
4f4c6: 204a moveal %a2,%a0
4f4c8: 4a00 tstb %d0
4f4ca: 6604 bnes 4f4d0 <_Heap_Iterate+0x44> <== NEVER TAKEN
4f4cc: b488 cmpl %a0,%d2
4f4ce: 66d2 bnes 4f4a2 <_Heap_Iterate+0x16>
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
4f4d0: 242e fff8 movel %fp@(-8),%d2
4f4d4: 246e fffc moveal %fp@(-4),%a2
4f4d8: 4e5e unlk %fp <== NOT EXECUTED
0005a488 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5a488: 4e56 0000 linkw %fp,#0
5a48c: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5a490: 2040 moveal %d0,%a0
5a492: 5188 subql #8,%a0
5a494: 226e 0008 moveal %fp@(8),%a1
5a498: 2f02 movel %d2,%sp@-
5a49a: 2400 movel %d0,%d2
5a49c: 4c69 2001 0010 remul %a1@(16),%d1,%d2
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
5a4a2: 2429 0020 movel %a1@(32),%d2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5a4a6: 91c1 subal %d1,%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5a4a8: b488 cmpl %a0,%d2
5a4aa: 620c bhis 5a4b8 <_Heap_Size_of_alloc_area+0x30>
5a4ac: b1e9 0024 cmpal %a1@(36),%a0
5a4b0: 53c1 sls %d1
5a4b2: 49c1 extbl %d1
5a4b4: 4481 negl %d1
5a4b6: 6002 bras 5a4ba <_Heap_Size_of_alloc_area+0x32>
5a4b8: 4281 clrl %d1
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
5a4ba: 0801 0000 btst #0,%d1
5a4be: 673c beqs 5a4fc <_Heap_Size_of_alloc_area+0x74>
- 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;
5a4c0: 72fe moveq #-2,%d1
5a4c2: c2a8 0004 andl %a0@(4),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5a4c6: 41f0 1800 lea %a0@(00000000,%d1:l),%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5a4ca: b488 cmpl %a0,%d2
5a4cc: 620c bhis 5a4da <_Heap_Size_of_alloc_area+0x52> <== NEVER TAKEN
5a4ce: b1e9 0024 cmpal %a1@(36),%a0
5a4d2: 53c1 sls %d1
5a4d4: 49c1 extbl %d1
5a4d6: 4481 negl %d1
5a4d8: 6002 bras 5a4dc <_Heap_Size_of_alloc_area+0x54>
5a4da: 4281 clrl %d1 <== NOT EXECUTED
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5a4dc: 0801 0000 btst #0,%d1
5a4e0: 671a beqs 5a4fc <_Heap_Size_of_alloc_area+0x74> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5a4e2: 7201 moveq #1,%d1
5a4e4: c2a8 0004 andl %a0@(4),%d1
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
5a4e8: 6712 beqs 5a4fc <_Heap_Size_of_alloc_area+0x74> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5a4ea: 7204 moveq #4,%d1
5a4ec: 9280 subl %d0,%d1
5a4ee: 2001 movel %d1,%d0
5a4f0: d088 addl %a0,%d0
5a4f2: 226e 0010 moveal %fp@(16),%a1
5a4f6: 2280 movel %d0,%a1@
return true;
5a4f8: 7001 moveq #1,%d0
5a4fa: 6002 bras 5a4fe <_Heap_Size_of_alloc_area+0x76>
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
return false;
5a4fc: 4200 clrb %d0
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
5a4fe: 241f movel %sp@+,%d2
5a500: 4e5e unlk %fp <== NOT EXECUTED
00047d1a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
47d1a: 4e56 ffd0 linkw %fp,#-48
47d1e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47d22: 266e 0008 moveal %fp@(8),%a3
47d26: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
47d2a: 282b 0010 movel %a3@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
47d2e: 2a2b 0014 movel %a3@(20),%d5
Heap_Block *const first_block = heap->first_block;
47d32: 286b 0020 moveal %a3@(32),%a4
Heap_Block *const last_block = heap->last_block;
47d36: 2c2b 0024 movel %a3@(36),%d6
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
47d3a: 4a2e 0013 tstb %fp@(19)
47d3e: 6706 beqs 47d46 <_Heap_Walk+0x2c>
47d40: 45fa ff9a lea %pc@(47cdc <_Heap_Walk_print>),%a2
47d44: 6004 bras 47d4a <_Heap_Walk+0x30>
47d46: 45fa ff8c lea %pc@(47cd4 <_Heap_Walk_print_nothing>),%a2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
47d4a: 7003 moveq #3,%d0
47d4c: b0b9 0005 fe84 cmpl 5fe84 <_System_state_Current>,%d0
47d52: 6706 beqs 47d5a <_Heap_Walk+0x40>
return true;
47d54: 7001 moveq #1,%d0
47d56: 6000 02fc braw 48054 <_Heap_Walk+0x33a>
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)(
47d5a: 2f2b 000c movel %a3@(12),%sp@-
47d5e: 2f2b 0008 movel %a3@(8),%sp@-
47d62: 2f06 movel %d6,%sp@-
47d64: 2f0c movel %a4,%sp@-
47d66: 2f2b 001c movel %a3@(28),%sp@-
47d6a: 2f2b 0018 movel %a3@(24),%sp@-
47d6e: 2f05 movel %d5,%sp@-
47d70: 2f04 movel %d4,%sp@-
47d72: 4879 0005 c3e2 pea 5c3e2 <_Copyright_Notice+0x94>
47d78: 42a7 clrl %sp@-
47d7a: 2f02 movel %d2,%sp@-
47d7c: 4e92 jsr %a2@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
47d7e: 4fef 002c lea %sp@(44),%sp
47d82: 4a84 tstl %d4
47d84: 6608 bnes 47d8e <_Heap_Walk+0x74>
(*printer)( source, true, "page size is zero\n" );
47d86: 4879 0005 c473 pea 5c473 <_Copyright_Notice+0x125>
47d8c: 6076 bras 47e04 <_Heap_Walk+0xea>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
47d8e: 7003 moveq #3,%d0
47d90: c084 andl %d4,%d0
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
47d92: 670c beqs 47da0 <_Heap_Walk+0x86>
(*printer)(
47d94: 2f04 movel %d4,%sp@-
47d96: 4879 0005 c486 pea 5c486 <_Copyright_Notice+0x138>
47d9c: 6000 02a8 braw 48046 <_Heap_Walk+0x32c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47da0: 2205 movel %d5,%d1
47da2: 4c44 1000 remul %d4,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
47da6: 4a80 tstl %d0
47da8: 670c beqs 47db6 <_Heap_Walk+0x9c>
(*printer)(
47daa: 2f05 movel %d5,%sp@-
47dac: 4879 0005 c4a4 pea 5c4a4 <_Copyright_Notice+0x156>
47db2: 6000 0292 braw 48046 <_Heap_Walk+0x32c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
47db6: 200c movel %a4,%d0
47db8: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47dba: 4c44 0001 remul %d4,%d1,%d0
);
return false;
}
if (
47dbe: 4a81 tstl %d1
47dc0: 670c beqs 47dce <_Heap_Walk+0xb4>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
47dc2: 2f0c movel %a4,%sp@-
47dc4: 4879 0005 c4c8 pea 5c4c8 <_Copyright_Notice+0x17a>
47dca: 6000 027a braw 48046 <_Heap_Walk+0x32c>
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;
47dce: 7001 moveq #1,%d0
47dd0: c0ac 0004 andl %a4@(4),%d0
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
47dd4: 6608 bnes 47dde <_Heap_Walk+0xc4>
(*printer)(
47dd6: 4879 0005 c4f9 pea 5c4f9 <_Copyright_Notice+0x1ab>
47ddc: 6026 bras 47e04 <_Heap_Walk+0xea>
- 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;
47dde: 70fe moveq #-2,%d0
47de0: 2046 moveal %d6,%a0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47de2: 2a46 moveal %d6,%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47de4: c0a8 0004 andl %a0@(4),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47de8: dbc0 addal %d0,%a5
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;
47dea: 7001 moveq #1,%d0
47dec: c0ad 0004 andl %a5@(4),%d0
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
47df0: 6608 bnes 47dfa <_Heap_Walk+0xe0>
(*printer)(
47df2: 4879 0005 c527 pea 5c527 <_Copyright_Notice+0x1d9>
47df8: 600a bras 47e04 <_Heap_Walk+0xea>
);
return false;
}
if (
47dfa: b9cd cmpal %a5,%a4
47dfc: 6716 beqs 47e14 <_Heap_Walk+0xfa>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
47dfe: 4879 0005 c53c pea 5c53c <_Copyright_Notice+0x1ee>
47e04: 4878 0001 pea 1 <ADD>
47e08: 2f02 movel %d2,%sp@-
47e0a: 4e92 jsr %a2@
47e0c: 4fef 000c lea %sp@(12),%sp
47e10: 6000 0228 braw 4803a <_Heap_Walk+0x320>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
47e14: 222b 0010 movel %a3@(16),%d1
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
47e18: 224b moveal %a3,%a1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
47e1a: 206b 0008 moveal %a3@(8),%a0
47e1e: 6074 bras 47e94 <_Heap_Walk+0x17a>
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;
47e20: b1eb 0020 cmpal %a3@(32),%a0
47e24: 650c bcss 47e32 <_Heap_Walk+0x118>
47e26: b1eb 0024 cmpal %a3@(36),%a0
47e2a: 53c0 sls %d0
47e2c: 49c0 extbl %d0
47e2e: 4480 negl %d0
47e30: 6002 bras 47e34 <_Heap_Walk+0x11a>
47e32: 4280 clrl %d0
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
47e34: 0800 0000 btst #0,%d0
47e38: 660c bnes 47e46 <_Heap_Walk+0x12c>
(*printer)(
47e3a: 2f08 movel %a0,%sp@-
47e3c: 4879 0005 c56b pea 5c56b <_Copyright_Notice+0x21d>
47e42: 6000 0202 braw 48046 <_Heap_Walk+0x32c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
47e46: 2008 movel %a0,%d0
47e48: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47e4a: 4c41 0003 remul %d1,%d3,%d0
);
return false;
}
if (
47e4e: 4a83 tstl %d3
47e50: 670c beqs 47e5e <_Heap_Walk+0x144>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
47e52: 2f08 movel %a0,%sp@-
47e54: 4879 0005 c58b pea 5c58b <_Copyright_Notice+0x23d>
47e5a: 6000 01ea braw 48046 <_Heap_Walk+0x32c>
- 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;
47e5e: 70fe moveq #-2,%d0
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;
47e60: 7601 moveq #1,%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47e62: c0a8 0004 andl %a0@(4),%d0
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;
47e66: c6b0 0804 andl %a0@(00000004,%d0:l),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
47e6a: 670c beqs 47e78 <_Heap_Walk+0x15e>
(*printer)(
47e6c: 2f08 movel %a0,%sp@-
47e6e: 4879 0005 c5bb pea 5c5bb <_Copyright_Notice+0x26d>
47e74: 6000 01d0 braw 48046 <_Heap_Walk+0x32c>
);
return false;
}
if ( free_block->prev != prev_block ) {
47e78: 2028 000c movel %a0@(12),%d0
47e7c: b3c0 cmpal %d0,%a1
47e7e: 670e beqs 47e8e <_Heap_Walk+0x174>
(*printer)(
47e80: 2f00 movel %d0,%sp@-
47e82: 2f08 movel %a0,%sp@-
47e84: 4879 0005 c5d7 pea 5c5d7 <_Copyright_Notice+0x289>
47e8a: 6000 00aa braw 47f36 <_Heap_Walk+0x21c>
return false;
}
prev_block = free_block;
free_block = free_block->next;
47e8e: 2248 moveal %a0,%a1
47e90: 2068 0008 moveal %a0@(8),%a0
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
47e94: b7c8 cmpal %a0,%a3
47e96: 6688 bnes 47e20 <_Heap_Walk+0x106>
47e98: 284d moveal %a5,%a4
block = next_block;
} while ( block != first_block );
return true;
}
47e9a: 202c 0004 movel %a4@(4),%d0
47e9e: 7201 moveq #1,%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47ea0: 76fe moveq #-2,%d3
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;
47ea2: c280 andl %d0,%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47ea4: c680 andl %d0,%d3
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;
47ea6: 2d41 fffc movel %d1,%fp@(-4)
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;
47eaa: bc8c cmpl %a4,%d6
47eac: 56c1 sne %d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47eae: 2e03 movel %d3,%d7
47eb0: de8c addl %a4,%d7
47eb2: 2001 movel %d1,%d0
47eb4: 4480 negl %d0
47eb6: 1d40 fffb moveb %d0,%fp@(-5)
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;
47eba: beab 0020 cmpl %a3@(32),%d7
47ebe: 650c bcss 47ecc <_Heap_Walk+0x1b2> <== NEVER TAKEN
47ec0: beab 0024 cmpl %a3@(36),%d7
47ec4: 53c0 sls %d0
47ec6: 49c0 extbl %d0
47ec8: 4480 negl %d0
47eca: 6002 bras 47ece <_Heap_Walk+0x1b4>
47ecc: 4280 clrl %d0 <== NOT EXECUTED
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
47ece: 0800 0000 btst #0,%d0
47ed2: 660c bnes 47ee0 <_Heap_Walk+0x1c6>
(*printer)(
47ed4: 2f07 movel %d7,%sp@-
47ed6: 2f0c movel %a4,%sp@-
47ed8: 4879 0005 c609 pea 5c609 <_Copyright_Notice+0x2bb>
47ede: 6056 bras 47f36 <_Heap_Walk+0x21c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47ee0: 2203 movel %d3,%d1
47ee2: 4c44 1000 remul %d4,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
47ee6: 4a80 tstl %d0
47ee8: 6712 beqs 47efc <_Heap_Walk+0x1e2>
47eea: 4a2e fffb tstb %fp@(-5)
47eee: 6756 beqs 47f46 <_Heap_Walk+0x22c>
(*printer)(
47ef0: 2f03 movel %d3,%sp@-
47ef2: 2f0c movel %a4,%sp@-
47ef4: 4879 0005 c636 pea 5c636 <_Copyright_Notice+0x2e8>
47efa: 603a bras 47f36 <_Heap_Walk+0x21c>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
47efc: ba83 cmpl %d3,%d5
47efe: 6322 blss 47f22 <_Heap_Walk+0x208>
47f00: 4a2e fffb tstb %fp@(-5)
47f04: 6740 beqs 47f46 <_Heap_Walk+0x22c> <== NEVER TAKEN
(*printer)(
47f06: 2f05 movel %d5,%sp@-
47f08: 2f03 movel %d3,%sp@-
47f0a: 2f0c movel %a4,%sp@-
47f0c: 4879 0005 c664 pea 5c664 <_Copyright_Notice+0x316>
47f12: 4878 0001 pea 1 <ADD>
47f16: 2f02 movel %d2,%sp@-
47f18: 4e92 jsr %a2@
block,
block_size,
min_block_size
);
return false;
47f1a: 4fef 0018 lea %sp@(24),%sp
47f1e: 6000 011a braw 4803a <_Heap_Walk+0x320>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
47f22: b9c7 cmpal %d7,%a4
47f24: 6520 bcss 47f46 <_Heap_Walk+0x22c>
47f26: 4a2e fffb tstb %fp@(-5)
47f2a: 671a beqs 47f46 <_Heap_Walk+0x22c>
(*printer)(
47f2c: 2f07 movel %d7,%sp@-
47f2e: 2f0c movel %a4,%sp@-
47f30: 4879 0005 c68f pea 5c68f <_Copyright_Notice+0x341>
47f36: 4878 0001 pea 1 <ADD>
47f3a: 2f02 movel %d2,%sp@-
47f3c: 4e92 jsr %a2@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47f3e: 4fef 0014 lea %sp@(20),%sp
47f42: 6000 00f6 braw 4803a <_Heap_Walk+0x320>
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;
47f46: 7001 moveq #1,%d0
47f48: 2047 moveal %d7,%a0
47f4a: c0a8 0004 andl %a0@(4),%d0
}
if ( !_Heap_Is_prev_used( next_block ) ) {
47f4e: 6600 00ac bnew 47ffc <_Heap_Walk+0x2e2>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
47f52: 222b 0008 movel %a3@(8),%d1
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
47f56: 206c 0008 moveal %a4@(8),%a0
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)(
47f5a: b1eb 000c cmpal %a3@(12),%a0
47f5e: 6712 beqs 47f72 <_Heap_Walk+0x258>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
47f60: 43f9 0005 c28e lea 5c28e <rtems_termios_baud_table+0x10a>,%a1
47f66: b7c8 cmpal %a0,%a3
47f68: 660e bnes 47f78 <_Heap_Walk+0x25e>
47f6a: 43f9 0005 c3be lea 5c3be <_Copyright_Notice+0x70>,%a1
47f70: 6006 bras 47f78 <_Heap_Walk+0x25e>
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)(
47f72: 43f9 0005 c3af lea 5c3af <_Copyright_Notice+0x61>,%a1
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 ?
47f78: 202c 000c movel %a4@(12),%d0
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
47f7c: b280 cmpl %d0,%d1
47f7e: 6712 beqs 47f92 <_Heap_Walk+0x278>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
47f80: 223c 0005 c28e movel #377486,%d1
47f86: b7c0 cmpal %d0,%a3
47f88: 660e bnes 47f98 <_Heap_Walk+0x27e>
47f8a: 223c 0005 c3d8 movel #377816,%d1
47f90: 6006 bras 47f98 <_Heap_Walk+0x27e>
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)(
47f92: 223c 0005 c3c8 movel #377800,%d1
47f98: 2f09 movel %a1,%sp@-
47f9a: 2f08 movel %a0,%sp@-
47f9c: 2f01 movel %d1,%sp@-
47f9e: 2f00 movel %d0,%sp@-
47fa0: 2f03 movel %d3,%sp@-
47fa2: 2f0c movel %a4,%sp@-
47fa4: 4879 0005 c6c3 pea 5c6c3 <_Copyright_Notice+0x375>
47faa: 42a7 clrl %sp@-
47fac: 2f02 movel %d2,%sp@-
47fae: 4e92 jsr %a2@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
47fb0: 4fef 0024 lea %sp@(36),%sp
47fb4: 2047 moveal %d7,%a0
47fb6: 2010 movel %a0@,%d0
47fb8: b083 cmpl %d3,%d0
47fba: 671c beqs 47fd8 <_Heap_Walk+0x2be>
(*printer)(
47fbc: 2f07 movel %d7,%sp@-
47fbe: 2f00 movel %d0,%sp@-
47fc0: 2f03 movel %d3,%sp@-
47fc2: 2f0c movel %a4,%sp@-
47fc4: 4879 0005 c6f8 pea 5c6f8 <_Copyright_Notice+0x3aa>
47fca: 4878 0001 pea 1 <ADD>
47fce: 2f02 movel %d2,%sp@-
47fd0: 4e92 jsr %a2@
47fd2: 4fef 001c lea %sp@(28),%sp
47fd6: 6062 bras 4803a <_Heap_Walk+0x320>
);
return false;
}
if ( !prev_used ) {
47fd8: 4aae fffc tstl %fp@(-4)
47fdc: 660a bnes 47fe8 <_Heap_Walk+0x2ce>
(*printer)(
47fde: 2f0c movel %a4,%sp@-
47fe0: 4879 0005 c731 pea 5c731 <_Copyright_Notice+0x3e3>
47fe6: 605e bras 48046 <_Heap_Walk+0x32c>
47fe8: 206b 0008 moveal %a3@(8),%a0
47fec: 6008 bras 47ff6 <_Heap_Walk+0x2dc>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
47fee: b9c8 cmpal %a0,%a4
47ff0: 673c beqs 4802e <_Heap_Walk+0x314>
return true;
}
free_block = free_block->next;
47ff2: 2068 0008 moveal %a0@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
47ff6: b7c8 cmpal %a0,%a3
47ff8: 66f4 bnes 47fee <_Heap_Walk+0x2d4>
47ffa: 6042 bras 4803e <_Heap_Walk+0x324>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
47ffc: 4aae fffc tstl %fp@(-4)
48000: 6716 beqs 48018 <_Heap_Walk+0x2fe>
(*printer)(
48002: 2f03 movel %d3,%sp@-
48004: 2f0c movel %a4,%sp@-
48006: 4879 0005 c760 pea 5c760 <_Copyright_Notice+0x412>
4800c: 42a7 clrl %sp@-
4800e: 2f02 movel %d2,%sp@-
48010: 4e92 jsr %a2@
48012: 4fef 0014 lea %sp@(20),%sp
48016: 6016 bras 4802e <_Heap_Walk+0x314>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
48018: 2f14 movel %a4@,%sp@-
4801a: 2f03 movel %d3,%sp@-
4801c: 2f0c movel %a4,%sp@-
4801e: 4879 0005 c777 pea 5c777 <_Copyright_Notice+0x429>
48024: 42a7 clrl %sp@-
48026: 2f02 movel %d2,%sp@-
48028: 4e92 jsr %a2@
4802a: 4fef 0018 lea %sp@(24),%sp
4802e: 2847 moveal %d7,%a4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
48030: bbc7 cmpal %d7,%a5
48032: 6600 fe66 bnew 47e9a <_Heap_Walk+0x180>
48036: 6000 fd1c braw 47d54 <_Heap_Walk+0x3a>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
4803a: 4200 clrb %d0
4803c: 6016 bras 48054 <_Heap_Walk+0x33a>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4803e: 2f0c movel %a4,%sp@-
48040: 4879 0005 c79c pea 5c79c <_Copyright_Notice+0x44e>
48046: 4878 0001 pea 1 <ADD>
4804a: 2f02 movel %d2,%sp@-
4804c: 4e92 jsr %a2@
4804e: 4fef 0010 lea %sp@(16),%sp
48052: 60e6 bras 4803a <_Heap_Walk+0x320>
block = next_block;
} while ( block != first_block );
return true;
}
48054: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4805a: 4e5e unlk %fp
...
000474f8 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
474f8: 4e56 ffe8 linkw %fp,#-24
474fc: 48d7 001c moveml %d2-%d4,%sp@
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
47500: 4879 0004 900a pea 4900a <_User_extensions_Fatal_visitor>
47506: 262e 0008 movel %fp@(8),%d3
4750a: 486e fff6 pea %fp@(-10)
4750e: 242e 0010 movel %fp@(16),%d2
47512: 282e 000c movel %fp@(12),%d4
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
47516: 2d43 fff6 movel %d3,%fp@(-10)
4751a: 1d44 fffa moveb %d4,%fp@(-6)
4751e: 2d42 fffc movel %d2,%fp@(-4)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
47522: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47528: 7005 moveq #5,%d0 <== NOT EXECUTED
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
4752a: 23c3 0005 dd52 movel %d3,5dd52 <_Internal_errors_What_happened><== NOT EXECUTED
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47530: 263c 0000 0700 movel #1792,%d3 <== NOT EXECUTED
)
{
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47536: 13c4 0005 dd56 moveb %d4,5dd56 <_Internal_errors_What_happened+0x4><== NOT EXECUTED
_Internal_errors_What_happened.the_error = the_error;
4753c: 23c2 0005 dd58 movel %d2,5dd58 <_Internal_errors_What_happened+0x6><== NOT EXECUTED
47542: 23c0 0005 dd5c movel %d0,5dd5c <_System_state_Current> <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47548: 40c0 movew %sr,%d0 <== NOT EXECUTED
4754a: 8083 orl %d3,%d0 <== NOT EXECUTED
4754c: 46c0 movew %d0,%sr <== NOT EXECUTED
4754e: 2002 movel %d2,%d0 <== NOT EXECUTED
47550: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED
47556: 4ac8 halt <== NOT EXECUTED
47558: 508f addql #8,%sp <== NOT EXECUTED
4755a: 60fe bras 4755a <_Internal_error_Occurred+0x62> <== NOT EXECUTED
000475bc <_Objects_Allocate>:
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
475bc: 4e56 fff0 linkw %fp,#-16
475c0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
475c4: 246e 0008 moveal %fp@(8),%a2
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
475c8: 4aaa 0014 tstl %a2@(20)
475cc: 6604 bnes 475d2 <_Objects_Allocate+0x16> <== ALWAYS TAKEN
return NULL;
475ce: 4280 clrl %d0
475d0: 6066 bras 47638 <_Objects_Allocate+0x7c>
/*
* 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 );
475d2: 240a movel %a2,%d2
475d4: 0682 0000 001c addil #28,%d2
475da: 47f9 0004 6d04 lea 46d04 <_Chain_Get>,%a3
475e0: 2f02 movel %d2,%sp@-
475e2: 4e93 jsr %a3@
if ( information->auto_extend ) {
475e4: 588f addql #4,%sp
475e6: 4a2a 0010 tstb %a2@(16)
475ea: 674c beqs 47638 <_Objects_Allocate+0x7c>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
475ec: 4a80 tstl %d0
475ee: 6612 bnes 47602 <_Objects_Allocate+0x46>
_Objects_Extend_information( information );
475f0: 2f0a movel %a2,%sp@-
475f2: 4eb9 0004 7670 jsr 47670 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
475f8: 2f02 movel %d2,%sp@-
475fa: 4e93 jsr %a3@
}
if ( the_object ) {
475fc: 508f addql #8,%sp
475fe: 4a80 tstl %d0
47600: 67cc beqs 475ce <_Objects_Allocate+0x12>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47602: 2040 moveal %d0,%a0
47604: 242a 0006 movel %a2@(6),%d2
47608: 2228 0008 movel %a0@(8),%d1
4760c: 0282 0000 ffff andil #65535,%d2
47612: 0281 0000 ffff andil #65535,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47618: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
4761c: 9282 subl %d2,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
4761e: 4282 clrl %d2
47620: 342a 0012 movew %a2@(18),%d2
47624: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
47628: e589 lsll #2,%d1
4762a: d1c1 addal %d1,%a0
4762c: 5390 subql #1,%a0@
information->inactive--;
4762e: 322a 0028 movew %a2@(40),%d1
47632: 5381 subql #1,%d1
47634: 3541 0028 movew %d1,%a2@(40)
);
}
#endif
return the_object;
}
47638: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4763e: 4e5e unlk %fp
...
00047644 <_Objects_Close>:
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47644: 4e56 0000 linkw %fp,#0
47648: 226e 000c moveal %fp@(12),%a1
4764c: 206e 0008 moveal %fp@(8),%a0
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47650: 2029 0008 movel %a1@(8),%d0
47654: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47656: 2468 0018 moveal %a0@(24),%a2
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
4765a: 0280 0000 ffff andil #65535,%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47660: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
47664: 245f moveal %sp@+,%a2
47666: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47668: 4ef9 0004 7b74 jmp 47b74 <_Objects_Namespace_remove>
...
00047984 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
47984: 4e56 0000 linkw %fp,#0
47988: 2f03 movel %d3,%sp@-
4798a: 362e 000e movew %fp@(14),%d3
4798e: 2f02 movel %d2,%sp@-
47990: 242e 0008 movel %fp@(8),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47994: 4a43 tstw %d3
47996: 6604 bnes 4799c <_Objects_Get_information+0x18>
return NULL;
47998: 4280 clrl %d0
4799a: 6034 bras 479d0 <_Objects_Get_information+0x4c>
/*
* 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 );
4799c: 2f02 movel %d2,%sp@-
4799e: 4eb9 0004 aeb0 jsr 4aeb0 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
479a4: 588f addql #4,%sp
479a6: 4a80 tstl %d0
479a8: 67ee beqs 47998 <_Objects_Get_information+0x14>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
479aa: 0283 0000 ffff andil #65535,%d3
479b0: b083 cmpl %d3,%d0
479b2: 65e4 bcss 47998 <_Objects_Get_information+0x14>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
479b4: 41f9 0005 dbb2 lea 5dbb2 <_Objects_Information_table>,%a0
479ba: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0
479be: 4a88 tstl %a0
479c0: 67d6 beqs 47998 <_Objects_Get_information+0x14> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
479c2: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0
if ( !info )
479c6: 67d0 beqs 47998 <_Objects_Get_information+0x14> <== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
479c8: 2040 moveal %d0,%a0
479ca: 4a68 000e tstw %a0@(14)
479ce: 67c8 beqs 47998 <_Objects_Get_information+0x14>
return NULL;
#endif
return info;
}
479d0: 242e fff8 movel %fp@(-8),%d2
479d4: 262e fffc movel %fp@(-4),%d3
479d8: 4e5e unlk %fp <== NOT EXECUTED
00054af8 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
54af8: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
54afa: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
54afc: 4e56 0000 linkw %fp,#0
54b00: 206e 0008 moveal %fp@(8),%a0
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
54b04: 90a8 0006 subl %a0@(6),%d0
54b08: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
54b0c: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
54b10: 226e 0010 moveal %fp@(16),%a1
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
54b14: b081 cmpl %d1,%d0
54b16: 620e bhis 54b26 <_Objects_Get_no_protection+0x2e>
if ( (the_object = information->local_table[ index ]) != NULL ) {
54b18: 2068 0018 moveal %a0@(24),%a0
54b1c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
54b20: 6704 beqs 54b26 <_Objects_Get_no_protection+0x2e><== NEVER TAKEN
*location = OBJECTS_LOCAL;
54b22: 4291 clrl %a1@
return the_object;
54b24: 6006 bras 54b2c <_Objects_Get_no_protection+0x34>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
54b26: 7001 moveq #1,%d0
54b28: 2280 movel %d0,%a1@
return NULL;
54b2a: 4280 clrl %d0
}
54b2c: 4e5e unlk %fp <== NOT EXECUTED
0004afcc <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
4afcc: 4e56 fffc linkw %fp,#-4
4afd0: 222e 0008 movel %fp@(8),%d1
4afd4: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
4afd6: 4a81 tstl %d1
4afd8: 660a bnes 4afe4 <_Objects_Id_to_name+0x18>
4afda: 2079 0006 8e52 moveal 68e52 <_Per_CPU_Information+0xe>,%a0
4afe0: 2228 0008 movel %a0@(8),%d1
4afe4: 7418 moveq #24,%d2
4afe6: 2001 movel %d1,%d0
4afe8: e4a8 lsrl %d2,%d0
4afea: 143c 0007 moveb #7,%d2
4afee: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
4aff0: 143c 0002 moveb #2,%d2
4aff4: 2040 moveal %d0,%a0
4aff6: 5388 subql #1,%a0
4aff8: b488 cmpl %a0,%d2
4affa: 643a bccs 4b036 <_Objects_Id_to_name+0x6a>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
4affc: 7003 moveq #3,%d0
4affe: 6046 bras 4b046 <_Objects_Id_to_name+0x7a>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
4b000: 2001 movel %d1,%d0
4b002: 741b moveq #27,%d2
4b004: e4a8 lsrl %d2,%d0
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
4b006: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( !information )
4b00a: 67f0 beqs 4affc <_Objects_Id_to_name+0x30> <== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
4b00c: 486e fffc pea %fp@(-4)
4b010: 2f01 movel %d1,%sp@-
4b012: 2f00 movel %d0,%sp@-
4b014: 4eb9 0004 af6c jsr 4af6c <_Objects_Get>
if ( !the_object )
4b01a: 4fef 000c lea %sp@(12),%sp
4b01e: 4a80 tstl %d0
4b020: 67da beqs 4affc <_Objects_Id_to_name+0x30>
return OBJECTS_INVALID_ID;
*name = the_object->name;
4b022: 206e 000c moveal %fp@(12),%a0
4b026: 2240 moveal %d0,%a1
4b028: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
4b02c: 4eb9 0004 bc34 jsr 4bc34 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
4b032: 4280 clrl %d0
4b034: 6010 bras 4b046 <_Objects_Id_to_name+0x7a>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
4b036: 41f9 0006 8c5e lea 68c5e <_Objects_Information_table>,%a0
4b03c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
4b040: 4a88 tstl %a0
4b042: 66bc bnes 4b000 <_Objects_Id_to_name+0x34>
4b044: 60b6 bras 4affc <_Objects_Id_to_name+0x30>
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
4b046: 242e fff8 movel %fp@(-8),%d2
4b04a: 4e5e unlk %fp
...
00047b84 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
47b84: 4e56 fff4 linkw %fp,#-12
47b88: 226e 0008 moveal %fp@(8),%a1
47b8c: 48d7 040c moveml %d2-%d3/%a2,%sp@
47b90: 222e 000c movel %fp@(12),%d1
47b94: 202e 0010 movel %fp@(16),%d0
47b98: 246e 0014 moveal %fp@(20),%a2
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
47b9c: 4a8a tstl %a2
47b9e: 674a beqs 47bea <_Objects_Name_to_id_u32+0x66> <== NEVER TAKEN
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
47ba0: 4a81 tstl %d1
47ba2: 674a beqs 47bee <_Objects_Name_to_id_u32+0x6a>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
47ba4: 3429 000e movew %a1@(14),%d2
47ba8: 6744 beqs 47bee <_Objects_Name_to_id_u32+0x6a>
47baa: 4a80 tstl %d0
47bac: 672e beqs 47bdc <_Objects_Name_to_id_u32+0x58>
(node == OBJECTS_SEARCH_ALL_NODES ||
47bae: 0c80 7fff ffff cmpil #2147483647,%d0
47bb4: 6726 beqs 47bdc <_Objects_Name_to_id_u32+0x58>
node == OBJECTS_SEARCH_LOCAL_NODE ||
47bb6: 7601 moveq #1,%d3
47bb8: b680 cmpl %d0,%d3
47bba: 6720 beqs 47bdc <_Objects_Name_to_id_u32+0x58>
47bbc: 6030 bras 47bee <_Objects_Name_to_id_u32+0x6a>
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
47bbe: 2069 0018 moveal %a1@(24),%a0
47bc2: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !the_object )
47bc6: 4a88 tstl %a0
47bc8: 670e beqs 47bd8 <_Objects_Name_to_id_u32+0x54>
continue;
if ( name == the_object->name.name_u32 ) {
47bca: b2a8 000c cmpl %a0@(12),%d1
47bce: 6608 bnes 47bd8 <_Objects_Name_to_id_u32+0x54>
*id = the_object->id;
47bd0: 24a8 0008 movel %a0@(8),%a2@
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
47bd4: 4280 clrl %d0
47bd6: 6018 bras 47bf0 <_Objects_Name_to_id_u32+0x6c>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
47bd8: 5280 addql #1,%d0
47bda: 6008 bras 47be4 <_Objects_Name_to_id_u32+0x60>
search_local_node = false;
if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES ||
node == OBJECTS_SEARCH_LOCAL_NODE ||
47bdc: 7001 moveq #1,%d0
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
47bde: 0282 0000 ffff andil #65535,%d2
47be4: b480 cmpl %d0,%d2
47be6: 64d6 bccs 47bbe <_Objects_Name_to_id_u32+0x3a>
47be8: 6004 bras 47bee <_Objects_Name_to_id_u32+0x6a>
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
47bea: 7002 moveq #2,%d0
47bec: 6002 bras 47bf0 <_Objects_Name_to_id_u32+0x6c>
if ( name == 0 )
return OBJECTS_INVALID_NAME;
47bee: 7001 moveq #1,%d0
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
47bf0: 4cd7 040c moveml %sp@,%d2-%d3/%a2
47bf4: 4e5e unlk %fp <== NOT EXECUTED
00048796 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
48796: 4e56 ffec linkw %fp,#-20
4879a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4879e: 2a6e 0008 moveal %fp@(8),%a5
487a2: 246e 000c moveal %fp@(12),%a2
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
487a6: 4a8a tstl %a2
487a8: 6700 00fe beqw 488a8 <_RBTree_Extract_unprotected+0x112>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
487ac: b5ed 0008 cmpal %a5@(8),%a2
487b0: 6612 bnes 487c4 <_RBTree_Extract_unprotected+0x2e>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
487b2: 4878 0001 pea 1 <ADD>
487b6: 2f0a movel %a2,%sp@-
487b8: 4eb9 0004 8b28 jsr 48b28 <_RBTree_Next_unprotected>
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
487be: 508f addql #8,%sp
487c0: 2b40 0008 movel %d0,%a5@(8)
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
487c4: b5ed 000c cmpal %a5@(12),%a2
487c8: 6610 bnes 487da <_RBTree_Extract_unprotected+0x44>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
487ca: 42a7 clrl %sp@-
487cc: 2f0a movel %a2,%sp@-
487ce: 4eb9 0004 8b28 jsr 48b28 <_RBTree_Next_unprotected>
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
487d4: 508f addql #8,%sp
487d6: 2b40 000c movel %d0,%a5@(12)
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
487da: 266a 0004 moveal %a2@(4),%a3
487de: 4a8b tstl %a3
487e0: 6776 beqs 48858 <_RBTree_Extract_unprotected+0xc2>
487e2: 4aaa 0008 tstl %a2@(8)
487e6: 6604 bnes 487ec <_RBTree_Extract_unprotected+0x56>
487e8: 6078 bras 48862 <_RBTree_Extract_unprotected+0xcc>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
487ea: 2640 moveal %d0,%a3
487ec: 202b 0008 movel %a3@(8),%d0
487f0: 66f8 bnes 487ea <_RBTree_Extract_unprotected+0x54>
* 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];
487f2: 286b 0004 moveal %a3@(4),%a4
if(leaf) {
487f6: 4a8c tstl %a4
487f8: 6704 beqs 487fe <_RBTree_Extract_unprotected+0x68>
leaf->parent = target->parent;
487fa: 2893 movel %a3@,%a4@
487fc: 6008 bras 48806 <_RBTree_Extract_unprotected+0x70>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
487fe: 2f0b movel %a3,%sp@-
48800: 4eba fe60 jsr %pc@(48662 <_RBTree_Extract_validate_unprotected>)
48804: 588f addql #4,%sp
}
victim_color = target->color;
dir = target != target->parent->child[0];
48806: 2053 moveal %a3@,%a0
48808: b7e8 0004 cmpal %a0@(4),%a3
4880c: 56c1 sne %d1
target->parent->child[dir] = leaf;
4880e: 7401 moveq #1,%d2
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
48810: 49c1 extbl %d1
target->parent->child[dir] = leaf;
48812: 9481 subl %d1,%d2
48814: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
the_node->parent->child[dir] = target;
48818: 7401 moveq #1,%d2
victim_color = target->color;
dir = target != target->parent->child[0];
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
4881a: 2052 moveal %a2@,%a0
4881c: b5e8 0004 cmpal %a0@(4),%a2
48820: 56c1 sne %d1
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
48822: 202b 000c movel %a3@(12),%d0
dir = target != target->parent->child[0];
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
48826: 49c1 extbl %d1
the_node->parent->child[dir] = target;
48828: 9481 subl %d1,%d2
4882a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
4882e: 276a 0008 0008 movel %a2@(8),%a3@(8)
if (the_node->child[RBT_RIGHT])
48834: 206a 0008 moveal %a2@(8),%a0
48838: 4a88 tstl %a0
4883a: 6702 beqs 4883e <_RBTree_Extract_unprotected+0xa8><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
4883c: 208b movel %a3,%a0@
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
4883e: 276a 0004 0004 movel %a2@(4),%a3@(4)
if (the_node->child[RBT_LEFT])
48844: 206a 0004 moveal %a2@(4),%a0
48848: 4a88 tstl %a0
4884a: 6702 beqs 4884e <_RBTree_Extract_unprotected+0xb8>
the_node->child[RBT_LEFT]->parent = target;
4884c: 208b movel %a3,%a0@
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
4884e: 2692 movel %a2@,%a3@
target->color = the_node->color;
48850: 276a 000c 000c movel %a2@(12),%a3@(12)
48856: 602e bras 48886 <_RBTree_Extract_unprotected+0xf0>
* 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];
48858: 286a 0008 moveal %a2@(8),%a4
if( leaf ) {
4885c: 4a8c tstl %a4
4885e: 6604 bnes 48864 <_RBTree_Extract_unprotected+0xce>
48860: 6006 bras 48868 <_RBTree_Extract_unprotected+0xd2>
* 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]) {
48862: 284b moveal %a3,%a4
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
48864: 2892 movel %a2@,%a4@
48866: 6008 bras 48870 <_RBTree_Extract_unprotected+0xda>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
48868: 2f0a movel %a2,%sp@-
4886a: 4eba fdf6 jsr %pc@(48662 <_RBTree_Extract_validate_unprotected>)
4886e: 588f addql #4,%sp
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
48870: 2052 moveal %a2@,%a0
48872: b5e8 0004 cmpal %a0@(4),%a2
48876: 56c1 sne %d1
the_node->parent->child[dir] = leaf;
48878: 7401 moveq #1,%d2
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
4887a: 49c1 extbl %d1
the_node->parent->child[dir] = leaf;
4887c: 9481 subl %d1,%d2
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;
4887e: 202a 000c movel %a2@(12),%d0
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
the_node->parent->child[dir] = leaf;
48882: 218c 2c00 movel %a4,%a0@(00000000,%d2:l:4)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
48886: 4a80 tstl %d0
48888: 6608 bnes 48892 <_RBTree_Extract_unprotected+0xfc>
if (leaf) {
4888a: 4a8c tstl %a4
4888c: 6704 beqs 48892 <_RBTree_Extract_unprotected+0xfc>
leaf->color = RBT_BLACK; /* case 2 */
4888e: 42ac 000c clrl %a4@(12)
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
48892: 206d 0004 moveal %a5@(4),%a0
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
48896: 42aa 0008 clrl %a2@(8)
4889a: 42aa 0004 clrl %a2@(4)
4889e: 4292 clrl %a2@
488a0: 4a88 tstl %a0
488a2: 6704 beqs 488a8 <_RBTree_Extract_unprotected+0x112>
488a4: 42a8 000c clrl %a0@(12)
}
488a8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
488ae: 4e5e unlk %fp <== NOT EXECUTED
00049458 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
49458: 4e56 fff0 linkw %fp,#-16
4945c: 202e 001c movel %fp@(28),%d0
49460: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
49464: 246e 0008 moveal %fp@(8),%a2
49468: 242e 0014 movel %fp@(20),%d2
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
4946c: 4a8a tstl %a2
4946e: 6736 beqs 494a6 <_RBTree_Initialize+0x4e> <== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
49470: 4292 clrl %a2@
the_rbtree->root = NULL;
the_rbtree->first[0] = NULL;
the_rbtree->first[1] = NULL;
the_rbtree->compare_function = compare_function;
49472: 256e 000c 0010 movel %fp@(12),%a2@(16)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
49478: 262e 0010 movel %fp@(16),%d3
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
the_rbtree->root = NULL;
4947c: 42aa 0004 clrl %a2@(4)
while ( count-- ) {
_RBTree_Insert_unprotected(the_rbtree, next);
49480: 47f9 0004 9238 lea 49238 <_RBTree_Insert_unprotected>,%a3
the_rbtree->first[0] = NULL;
49486: 42aa 0008 clrl %a2@(8)
the_rbtree->first[1] = NULL;
4948a: 42aa 000c clrl %a2@(12)
the_rbtree->compare_function = compare_function;
the_rbtree->is_unique = is_unique;
4948e: 1540 0014 moveb %d0,%a2@(20)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
49492: 600e bras 494a2 <_RBTree_Initialize+0x4a>
_RBTree_Insert_unprotected(the_rbtree, next);
49494: 2f03 movel %d3,%sp@-
49496: 5382 subql #1,%d2
49498: 2f0a movel %a2,%sp@-
4949a: 4e93 jsr %a3@
4949c: 508f addql #8,%sp
#include <rtems/system.h>
#include <rtems/score/address.h>
#include <rtems/score/rbtree.h>
#include <rtems/score/isr.h>
void _RBTree_Initialize(
4949e: d6ae 0018 addl %fp@(24),%d3
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
494a2: 4a82 tstl %d2
494a4: 66ee bnes 49494 <_RBTree_Initialize+0x3c>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
494a6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
494ac: 4e5e unlk %fp <== NOT EXECUTED
0004893c <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
4893c: 4e56 ffec linkw %fp,#-20
48940: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
48944: 266e 0008 moveal %fp@(8),%a3
48948: 246e 000c moveal %fp@(12),%a2
if(!the_node) return (RBTree_Node*)-1;
4894c: 4a8a tstl %a2
4894e: 6700 013a beqw 48a8a <_RBTree_Insert_unprotected+0x14e>
RBTree_Node *iter_node = the_rbtree->root;
48952: 286b 0004 moveal %a3@(4),%a4
int compare_result;
if (!iter_node) { /* special case: first node inserted */
48956: 2a4c moveal %a4,%a5
48958: 4a8c tstl %a4
4895a: 6620 bnes 4897c <_RBTree_Insert_unprotected+0x40>
the_node->color = RBT_BLACK;
4895c: 42aa 000c clrl %a2@(12)
the_rbtree->root = the_node;
48960: 274a 0004 movel %a2,%a3@(4)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
48964: 274a 000c movel %a2,%a3@(12)
48968: 274a 0008 movel %a2,%a3@(8)
the_node->parent = (RBTree_Node *) the_rbtree;
4896c: 248b movel %a3,%a2@
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
4896e: 42aa 0008 clrl %a2@(8)
48972: 42aa 0004 clrl %a2@(4)
48976: 6000 0126 braw 48a9e <_RBTree_Insert_unprotected+0x162>
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
4897a: 2a4c moveal %a4,%a5
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);
4897c: 2f0c movel %a4,%sp@-
4897e: 2f0a movel %a2,%sp@-
48980: 206b 0010 moveal %a3@(16),%a0
48984: 4e90 jsr %a0@
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
48986: 508f addql #8,%sp
48988: 4a2b 0014 tstb %a3@(20)
4898c: 6706 beqs 48994 <_RBTree_Insert_unprotected+0x58>
4898e: 4a80 tstl %d0
48990: 6700 010c beqw 48a9e <_RBTree_Insert_unprotected+0x162>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
48994: 2400 movel %d0,%d2
48996: 4682 notl %d2
48998: d482 addl %d2,%d2
4899a: 9582 subxl %d2,%d2
4899c: 4482 negl %d2
if (!iter_node->child[dir]) {
4899e: 2002 movel %d2,%d0
489a0: 5280 addql #1,%d0
489a2: 2874 0c00 moveal %a4@(00000000,%d0:l:4),%a4
489a6: 4a8c tstl %a4
489a8: 66d0 bnes 4897a <_RBTree_Insert_unprotected+0x3e>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
489aa: 42aa 0008 clrl %a2@(8)
the_node->color = RBT_RED;
489ae: 7201 moveq #1,%d1
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
489b0: 42aa 0004 clrl %a2@(4)
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
489b4: 2b8a 0c00 movel %a2,%a5@(00000000,%d0:l:4)
the_node->parent = iter_node;
489b8: 248d movel %a5,%a2@
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
489ba: 2a42 moveal %d2,%a5
489bc: 548d addql #2,%a5
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;
489be: 2541 000c movel %d1,%a2@(12)
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
489c2: 2f33 dc00 movel %a3@(00000000,%a5:l:4),%sp@-
489c6: 2f0a movel %a2,%sp@-
489c8: 206b 0010 moveal %a3@(16),%a0
489cc: 4e90 jsr %a0@
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
489ce: 508f addql #8,%sp
489d0: 4a82 tstl %d2
489d2: 6608 bnes 489dc <_RBTree_Insert_unprotected+0xa0>
489d4: 4a80 tstl %d0
489d6: 6c00 0092 bgew 48a6a <_RBTree_Insert_unprotected+0x12e>
489da: 6006 bras 489e2 <_RBTree_Insert_unprotected+0xa6>
(dir && _RBTree_Is_greater(compare_result)) ) {
489dc: 4a80 tstl %d0
489de: 6f00 008a blew 48a6a <_RBTree_Insert_unprotected+0x12e>
the_rbtree->first[dir] = the_node;
489e2: 278a dc00 movel %a2,%a3@(00000000,%a5:l:4)
489e6: 6000 0082 braw 48a6a <_RBTree_Insert_unprotected+0x12e>
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
489ea: 4a8b tstl %a3
489ec: 671e beqs 48a0c <_RBTree_Insert_unprotected+0xd0><== NEVER TAKEN
if(!(the_node->parent->parent->parent)) return NULL;
489ee: 4a93 tstl %a3@
489f0: 671a beqs 48a0c <_RBTree_Insert_unprotected+0xd0><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
489f2: 226b 0004 moveal %a3@(4),%a1
489f6: b3c8 cmpal %a0,%a1
489f8: 6604 bnes 489fe <_RBTree_Insert_unprotected+0xc2>
return the_node->parent->child[RBT_RIGHT];
489fa: 226b 0008 moveal %a3@(8),%a1
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
489fe: 4a89 tstl %a1
48a00: 670c beqs 48a0e <_RBTree_Insert_unprotected+0xd2>
48a02: 7001 moveq #1,%d0
48a04: b0a9 000c cmpl %a1@(12),%d0
48a08: 6604 bnes 48a0e <_RBTree_Insert_unprotected+0xd2>
48a0a: 6006 bras 48a12 <_RBTree_Insert_unprotected+0xd6>
)
{
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;
48a0c: 93c9 subal %a1,%a1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
48a0e: 4280 clrl %d0
48a10: 6002 bras 48a14 <_RBTree_Insert_unprotected+0xd8>
48a12: 7001 moveq #1,%d0
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
48a14: 4a80 tstl %d0
48a16: 6710 beqs 48a28 <_RBTree_Insert_unprotected+0xec>
the_node->parent->color = RBT_BLACK;
48a18: 42a8 000c clrl %a0@(12)
u->color = RBT_BLACK;
g->color = RBT_RED;
48a1c: 7201 moveq #1,%d1
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;
48a1e: 42a9 000c clrl %a1@(12)
g->color = RBT_RED;
48a22: 2741 000c movel %d1,%a3@(12)
48a26: 603e bras 48a66 <_RBTree_Insert_unprotected+0x12a>
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
48a28: b1eb 0004 cmpal %a3@(4),%a0
48a2c: 56c0 sne %d0
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
48a2e: b5e8 0004 cmpal %a0@(4),%a2
48a32: 56c1 sne %d1
RBTree_Direction pdir = the_node->parent != g->child[0];
48a34: 49c0 extbl %d0
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
48a36: 2400 movel %d0,%d2
48a38: 49c1 extbl %d1
48a3a: 4482 negl %d2
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
48a3c: b081 cmpl %d1,%d0
48a3e: 670c beqs 48a4c <_RBTree_Insert_unprotected+0x110>
_RBTree_Rotate(the_node->parent, pdir);
48a40: 2f02 movel %d2,%sp@-
48a42: 2f08 movel %a0,%sp@-
48a44: 4e95 jsr %a5@
the_node = the_node->child[pdir];
48a46: 508f addql #8,%sp
48a48: 2472 2c04 moveal %a2@(00000004,%d2:l:4),%a2
}
the_node->parent->color = RBT_BLACK;
48a4c: 2052 moveal %a2@,%a0
g->color = RBT_RED;
48a4e: 7001 moveq #1,%d0
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
48a50: 7201 moveq #1,%d1
48a52: 9282 subl %d2,%d1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
48a54: 42a8 000c clrl %a0@(12)
g->color = RBT_RED;
48a58: 2740 000c movel %d0,%a3@(12)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
48a5c: 2f01 movel %d1,%sp@-
48a5e: 2f0b movel %a3,%sp@-
48a60: 264a moveal %a2,%a3
48a62: 4e95 jsr %a5@
48a64: 508f addql #8,%sp
48a66: 244b moveal %a3,%a2
48a68: 6004 bras 48a6e <_RBTree_Insert_unprotected+0x132>
48a6a: 4bfa fe74 lea %pc@(488e0 <_RBTree_Rotate>),%a5
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
48a6e: 2052 moveal %a2@,%a0
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
48a70: 2650 moveal %a0@,%a3
48a72: 4a8b tstl %a3
48a74: 661a bnes 48a90 <_RBTree_Insert_unprotected+0x154>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
48a76: 4280 clrl %d0
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
48a78: 0800 0000 btst #0,%d0
48a7c: 6600 ff6c bnew 489ea <_RBTree_Insert_unprotected+0xae>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
48a80: 4a8b tstl %a3
48a82: 661a bnes 48a9e <_RBTree_Insert_unprotected+0x162>
48a84: 42aa 000c clrl %a2@(12)
48a88: 6014 bras 48a9e <_RBTree_Insert_unprotected+0x162>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
48a8a: 387c ffff moveaw #-1,%a4
48a8e: 600e bras 48a9e <_RBTree_Insert_unprotected+0x162>
48a90: 7001 moveq #1,%d0
48a92: b0a8 000c cmpl %a0@(12),%d0
48a96: 57c0 seq %d0
48a98: 49c0 extbl %d0
48a9a: 4480 negl %d0
48a9c: 60da bras 48a78 <_RBTree_Insert_unprotected+0x13c>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
48a9e: 200c movel %a4,%d0
48aa0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
48aa6: 4e5e unlk %fp <== NOT EXECUTED
00048ad4 <_RBTree_Iterate_unprotected>:
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
48ad4: 7202 moveq #2,%d1
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
48ad6: 4e56 fff0 linkw %fp,#-16
48ada: 206e 0008 moveal %fp@(8),%a0
48ade: 48d7 041c moveml %d2-%d4/%a2,%sp@
48ae2: 262e 000c movel %fp@(12),%d3
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
48ae6: 57c0 seq %d0
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
48ae8: 45f9 0004 8b28 lea 48b28 <_RBTree_Next_unprotected>,%a2
48aee: 49c0 extbl %d0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
48af0: 9280 subl %d0,%d1
48af2: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2
48af6: 6020 bras 48b18 <_RBTree_Iterate_unprotected+0x44>
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 );
48af8: 2f2e 0014 movel %fp@(20),%sp@-
48afc: 206e 0010 moveal %fp@(16),%a0
48b00: 2f03 movel %d3,%sp@-
48b02: 2f02 movel %d2,%sp@-
48b04: 4e90 jsr %a0@
current = _RBTree_Next_unprotected( current, dir );
48b06: 2f03 movel %d3,%sp@-
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 );
48b08: 1800 moveb %d0,%d4
current = _RBTree_Next_unprotected( current, dir );
48b0a: 2f02 movel %d2,%sp@-
48b0c: 4e92 jsr %a2@
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
48b0e: 4fef 0014 lea %sp@(20),%sp
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
48b12: 2400 movel %d0,%d2
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
48b14: 4a04 tstb %d4
48b16: 6604 bnes 48b1c <_RBTree_Iterate_unprotected+0x48><== NEVER TAKEN
48b18: 4a82 tstl %d2
48b1a: 66dc bnes 48af8 <_RBTree_Iterate_unprotected+0x24>
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
48b1c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
48b22: 4e5e unlk %fp
...
00048606 <_RBTree_Rotate>:
*/
RTEMS_INLINE_ROUTINE void _RBTree_Rotate(
RBTree_Node *the_node,
RBTree_Direction dir
)
{
48606: 4e56 0000 linkw %fp,#0
4860a: 206e 0008 moveal %fp@(8),%a0
4860e: 2f0a movel %a2,%sp@-
48610: 202e 000c movel %fp@(12),%d0
48614: 2f02 movel %d2,%sp@-
RBTree_Node *c;
if (the_node == NULL) return;
48616: 4a88 tstl %a0
48618: 6740 beqs 4865a <_RBTree_Rotate+0x54> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
4861a: 4a80 tstl %d0
4861c: 57c1 seq %d1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
4861e: 7401 moveq #1,%d2
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
48620: 49c1 extbl %d1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
48622: 9481 subl %d1,%d2
48624: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1
48628: 4a89 tstl %a1
4862a: 672e beqs 4865a <_RBTree_Rotate+0x54> <== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
4862c: 5280 addql #1,%d0
4862e: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2
48632: 2192 2c00 movel %a2@,%a0@(00000000,%d2:l:4)
if (c->child[dir])
48636: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2
4863a: 4a8a tstl %a2
4863c: 6702 beqs 48640 <_RBTree_Rotate+0x3a>
c->child[dir]->parent = the_node;
4863e: 2488 movel %a0,%a2@
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
48640: 2450 moveal %a0@,%a2
48642: 7201 moveq #1,%d1
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;
48644: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
48648: b1ea 0004 cmpal %a2@(4),%a0
4864c: 56c0 sne %d0
c->parent = the_node->parent;
4864e: 228a movel %a2,%a1@
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
48650: 49c0 extbl %d0
48652: 9280 subl %d0,%d1
48654: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4)
c->parent = the_node->parent;
the_node->parent = c;
48658: 2089 movel %a1,%a0@
}
4865a: 241f movel %sp@+,%d2
4865c: 245f moveal %sp@+,%a2
4865e: 4e5e unlk %fp <== NOT EXECUTED
000485dc <_RBTree_Sibling>:
* exists, and NULL if not.
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
485dc: 4e56 0000 linkw %fp,#0
485e0: 226e 0008 moveal %fp@(8),%a1
if(!the_node) return NULL;
485e4: 4a89 tstl %a1
485e6: 6718 beqs 48600 <_RBTree_Sibling+0x24> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
485e8: 2051 moveal %a1@,%a0
485ea: 4a88 tstl %a0
485ec: 6712 beqs 48600 <_RBTree_Sibling+0x24> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
485ee: 4a90 tstl %a0@
485f0: 670e beqs 48600 <_RBTree_Sibling+0x24>
if(the_node == the_node->parent->child[RBT_LEFT])
485f2: 2028 0004 movel %a0@(4),%d0
485f6: b089 cmpl %a1,%d0
485f8: 6608 bnes 48602 <_RBTree_Sibling+0x26>
return the_node->parent->child[RBT_RIGHT];
485fa: 2028 0008 movel %a0@(8),%d0
485fe: 6002 bras 48602 <_RBTree_Sibling+0x26>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
48600: 4280 clrl %d0
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
else
return the_node->parent->child[RBT_LEFT];
}
48602: 4e5e unlk %fp <== NOT EXECUTED
00047028 <_RTEMS_signal_Post_switch_hook>:
#include <rtems/score/thread.h>
#include <rtems/score/apiext.h>
#include <rtems/rtems/tasks.h>
static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing )
{
47028: 4e56 ffec linkw %fp,#-20
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4702c: 206e 0008 moveal %fp@(8),%a0
#include <rtems/score/thread.h>
#include <rtems/score/apiext.h>
#include <rtems/rtems/tasks.h>
static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing )
{
47030: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
47034: 2468 00f8 moveal %a0@(248),%a2
if ( !api )
47038: 4a8a tstl %a2
4703a: 6754 beqs 47090 <_RTEMS_signal_Post_switch_hook+0x68><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4703c: 203c 0000 0700 movel #1792,%d0
47042: 40c1 movew %sr,%d1
47044: 8081 orl %d1,%d0
47046: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
47048: 262a 0012 movel %a2@(18),%d3
asr->signals_posted = 0;
4704c: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
47050: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
47052: 4a83 tstl %d3
47054: 673a beqs 47090 <_RTEMS_signal_Post_switch_hook+0x68>
return;
asr->nest_level += 1;
47056: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4705a: 240e movel %fp,%d2
4705c: 5982 subql #4,%d2
4705e: 47f9 0004 7434 lea 47434 <rtems_task_mode>,%a3
47064: 2f02 movel %d2,%sp@-
47066: 2f3c 0000 ffff movel #65535,%sp@-
4706c: 2f2a 000e movel %a2@(14),%sp@-
47070: 4e93 jsr %a3@
(*asr->handler)( signal_set );
47072: 2f03 movel %d3,%sp@-
47074: 206a 000a moveal %a2@(10),%a0
47078: 4e90 jsr %a0@
asr->nest_level -= 1;
4707a: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4707e: 2f02 movel %d2,%sp@-
47080: 2f3c 0000 ffff movel #65535,%sp@-
47086: 2f2e fffc movel %fp@(-4),%sp@-
4708a: 4e93 jsr %a3@
4708c: 4fef 001c lea %sp@(28),%sp
}
47090: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
47096: 4e5e unlk %fp <== NOT EXECUTED
00057ac0 <_Region_Process_queue>:
#include <rtems/score/apimutex.h>
void _Region_Process_queue(
Region_Control *the_region
)
{
57ac0: 4e56 ffe4 linkw %fp,#-28
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
57ac4: 2039 0007 6042 movel 76042 <_Thread_Dispatch_disable_level>,%d0
++level;
57aca: 5280 addql #1,%d0
57acc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
57ad0: 266e 0008 moveal %fp@(8),%a3
_Thread_Dispatch_disable_level = level;
57ad4: 23c0 0007 6042 movel %d0,76042 <_Thread_Dispatch_disable_level>
* NOTE: Be sure to disable dispatching before unlocking the mutex
* since we do not want to open a window where a context
* switch could occur.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
57ada: 2f39 0007 60c6 movel 760c6 <_RTEMS_Allocator_Mutex>,%sp@-
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
57ae0: 240b movel %a3,%d2
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
57ae2: 260b movel %a3,%d3
57ae4: 0682 0000 0010 addil #16,%d2
57aea: 4bf9 0005 8158 lea 58158 <_Thread_queue_First>,%a5
57af0: 0683 0000 0068 addil #104,%d3
if ( the_segment == NULL )
break;
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
57af6: 49f9 0005 8054 lea 58054 <_Thread_queue_Extract>,%a4
* NOTE: Be sure to disable dispatching before unlocking the mutex
* since we do not want to open a window where a context
* switch could occur.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
57afc: 4eb9 0005 315c jsr 5315c <_API_Mutex_Unlock>
57b02: 588f addql #4,%sp
57b04: 283c 0005 3b24 movel #342820,%d4
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
57b0a: 2f02 movel %d2,%sp@-
57b0c: 4e95 jsr %a5@
if ( the_thread == NULL )
57b0e: 588f addql #4,%sp
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
57b10: 2440 moveal %d0,%a2
if ( the_thread == NULL )
57b12: 4a80 tstl %d0
57b14: 672e beqs 57b44 <_Region_Process_queue+0x84>
57b16: 42a7 clrl %sp@-
57b18: 2044 moveal %d4,%a0
57b1a: 42a7 clrl %sp@-
57b1c: 2f2a 0024 movel %a2@(36),%sp@-
57b20: 2f03 movel %d3,%sp@-
57b22: 4e90 jsr %a0@
the_segment = (void **) _Region_Allocate_segment(
the_region,
the_thread->Wait.count
);
if ( the_segment == NULL )
57b24: 4fef 0010 lea %sp@(16),%sp
57b28: 4a80 tstl %d0
57b2a: 6718 beqs 57b44 <_Region_Process_queue+0x84>
break;
*(void **)the_thread->Wait.return_argument = the_segment;
57b2c: 206a 0028 moveal %a2@(40),%a0
57b30: 2080 movel %d0,%a0@
the_region->number_of_used_blocks += 1;
57b32: 52ab 0064 addql #1,%a3@(100)
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
57b36: 2f0a movel %a2,%sp@-
57b38: 2f02 movel %d2,%sp@-
57b3a: 4e94 jsr %a4@
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
57b3c: 508f addql #8,%sp
break;
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
57b3e: 42aa 0034 clrl %a2@(52)
}
57b42: 60c6 bras 57b0a <_Region_Process_queue+0x4a>
_Thread_Enable_dispatch();
}
57b44: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
57b4a: 4e5e unlk %fp
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
57b4c: 4ef9 0005 5774 jmp 55774 <_Thread_Enable_dispatch>
...
000484a4 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
484a4: 4e56 0000 linkw %fp,#0
484a8: 2f0a movel %a2,%sp@-
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
484aa: 4878 001c pea 1c <OPER2+0x8>
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
484ae: 246e 0008 moveal %fp@(8),%a2
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
484b2: 4eb9 0004 9b90 jsr 49b90 <_Workspace_Allocate>
if ( sched ) {
484b8: 588f addql #4,%sp
484ba: 4a80 tstl %d0
484bc: 6712 beqs 484d0 <_Scheduler_CBS_Allocate+0x2c> <== NEVER TAKEN
the_thread->scheduler_info = sched;
484be: 2540 0086 movel %d0,%a2@(134)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
484c2: 2040 moveal %d0,%a0
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
484c4: 7202 moveq #2,%d1
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
if ( sched ) {
the_thread->scheduler_info = sched;
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
484c6: 208a movel %a2,%a0@
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
484c8: 2141 0014 movel %d1,%a0@(20)
schinfo->cbs_server = NULL;
484cc: 42a8 0018 clrl %a0@(24)
}
return sched;
}
484d0: 246e fffc moveal %fp@(-4),%a2
484d4: 4e5e unlk %fp <== NOT EXECUTED
0004996c <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
4996c: 4e56 fffc linkw %fp,#-4
49970: 2f0a movel %a2,%sp@-
49972: 246e 0008 moveal %fp@(8),%a2
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;
49976: 202a 00a8 movel %a2@(168),%d0
if ( the_thread->real_priority != new_priority )
4997a: b0aa 0018 cmpl %a2@(24),%d0
4997e: 6704 beqs 49984 <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN
the_thread->real_priority = new_priority;
49980: 2540 0018 movel %d0,%a2@(24)
if ( the_thread->current_priority != new_priority )
49984: b0aa 0014 cmpl %a2@(20),%d0
49988: 6712 beqs 4999c <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
4998a: 4878 0001 pea 1 <ADD>
4998e: 2f00 movel %d0,%sp@-
49990: 2f0a movel %a2,%sp@-
49992: 4eb9 0004 9ec0 jsr 49ec0 <_Thread_Change_priority>
49998: 4fef 000c lea %sp@(12),%sp
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
4999c: 246a 0086 moveal %a2@(134),%a2
if ( sched_info->cbs_server->cbs_budget_overrun ) {
499a0: 206a 0018 moveal %a2@(24),%a0
499a4: 4aa8 000c tstl %a0@(12)
499a8: 671e beqs 499c8 <_Scheduler_CBS_Budget_callout+0x5c>
_Scheduler_CBS_Get_server_id(
499aa: 486e fffc pea %fp@(-4)
499ae: 2f10 movel %a0@,%sp@-
499b0: 4eb9 0004 9930 jsr 49930 <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
499b6: 206a 0018 moveal %a2@(24),%a0
499ba: 2f2e fffc movel %fp@(-4),%sp@-
499be: 2068 000c moveal %a0@(12),%a0
499c2: 4e90 jsr %a0@
499c4: 4fef 000c lea %sp@(12),%sp
}
}
499c8: 246e fff8 moveal %fp@(-8),%a2
499cc: 4e5e unlk %fp <== NOT EXECUTED
00049640 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
49640: 4e56 fff4 linkw %fp,#-12
49644: 48d7 1c00 moveml %a2-%a4,%sp@
49648: 246e 0008 moveal %fp@(8),%a2
4964c: 266e 0010 moveal %fp@(16),%a3
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
49650: 4aaa 0004 tstl %a2@(4)
49654: 6f3e bles 49694 <_Scheduler_CBS_Create_server+0x54>
49656: 4a92 tstl %a2@
49658: 6f3a bles 49694 <_Scheduler_CBS_Create_server+0x54>
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++ ) {
4965a: 2239 0005 f54c movel 5f54c <_Scheduler_CBS_Maximum_servers>,%d1
if ( !_Scheduler_CBS_Server_list[i] )
49660: 4280 clrl %d0
49662: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0
49668: 6006 bras 49670 <_Scheduler_CBS_Create_server+0x30>
4966a: 4a98 tstl %a0@+
4966c: 672e beqs 4969c <_Scheduler_CBS_Create_server+0x5c>
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++ ) {
4966e: 5280 addql #1,%d0
49670: b280 cmpl %d0,%d1
49672: 66f6 bnes 4966a <_Scheduler_CBS_Create_server+0x2a>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
49674: 70e6 moveq #-26,%d0
49676: 6050 bras 496c8 <_Scheduler_CBS_Create_server+0x88>
_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;
49678: 2012 movel %a2@,%d0
4967a: 222a 0004 movel %a2@(4),%d1
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
4967e: 216e 000c 000c movel %fp@(12),%a0@(12)
_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;
49684: 2140 0004 movel %d0,%a0@(4)
49688: 2141 0008 movel %d1,%a0@(8)
the_server->task_id = -1;
4968c: 70ff moveq #-1,%d0
4968e: 2080 movel %d0,%a0@
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
49690: 4280 clrl %d0
49692: 6034 bras 496c8 <_Scheduler_CBS_Create_server+0x88>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
49694: 70ee moveq #-18,%d0
49696: 6030 bras 496c8 <_Scheduler_CBS_Create_server+0x88>
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
49698: 70ef moveq #-17,%d0 <== NOT EXECUTED
4969a: 602c bras 496c8 <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
4969c: 2680 movel %d0,%a3@
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
4969e: 4878 0010 pea 10 <INVALID_OPERATION>
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
496a2: 2879 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a4
496a8: e588 lsll #2,%d0
496aa: d9c0 addal %d0,%a4
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
496ac: 4eb9 0004 b094 jsr 4b094 <_Workspace_Allocate>
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
496b2: 588f addql #4,%sp
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
496b4: 2880 movel %d0,%a4@
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
496b6: 2013 movel %a3@,%d0
496b8: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0
496be: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !the_server )
496c2: 4a88 tstl %a0
496c4: 66b2 bnes 49678 <_Scheduler_CBS_Create_server+0x38><== ALWAYS TAKEN
496c6: 60d0 bras 49698 <_Scheduler_CBS_Create_server+0x58><== NOT EXECUTED
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
496c8: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
496ce: 4e5e unlk %fp
...
0004974c <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
4974c: 4e56 fff0 linkw %fp,#-16
49750: 48d7 040c moveml %d2-%d3/%a2,%sp@
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
49754: 486e fffc pea %fp@(-4)
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
49758: 242e 000c movel %fp@(12),%d2
4975c: 262e 0008 movel %fp@(8),%d3
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
49760: 2f02 movel %d2,%sp@-
49762: 4eb9 0004 a330 jsr 4a330 <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
49768: 508f addql #8,%sp
{
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
4976a: 2440 moveal %d0,%a2
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
4976c: 4a80 tstl %d0
4976e: 6706 beqs 49776 <_Scheduler_CBS_Detach_thread+0x2a>
_Thread_Enable_dispatch();
49770: 4eb9 0004 a310 jsr 4a310 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
49776: b6b9 0005 f54c cmpl 5f54c <_Scheduler_CBS_Maximum_servers>,%d3
4977c: 643c bccs 497ba <_Scheduler_CBS_Detach_thread+0x6e>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
4977e: 4a8a tstl %a2
49780: 6738 beqs 497ba <_Scheduler_CBS_Detach_thread+0x6e>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
49782: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0
49788: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0
4978c: 4a88 tstl %a0
4978e: 6726 beqs 497b6 <_Scheduler_CBS_Detach_thread+0x6a>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
49790: b490 cmpl %a0@,%d2
49792: 6626 bnes 497ba <_Scheduler_CBS_Detach_thread+0x6e><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
49794: 70ff moveq #-1,%d0
49796: 2080 movel %d0,%a0@
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
49798: 206a 0086 moveal %a2@(134),%a0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
4979c: 4280 clrl %d0
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;
4979e: 42a8 0018 clrl %a0@(24)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
497a2: 256a 009c 0076 movel %a2@(156),%a2@(118)
the_thread->budget_callout = the_thread->Start.budget_callout;
497a8: 256a 00a0 007a movel %a2@(160),%a2@(122)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
497ae: 156a 009a 0070 moveb %a2@(154),%a2@(112)
497b4: 6006 bras 497bc <_Scheduler_CBS_Detach_thread+0x70>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
497b6: 70e7 moveq #-25,%d0
497b8: 6002 bras 497bc <_Scheduler_CBS_Detach_thread+0x70>
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
497ba: 70ee moveq #-18,%d0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
497bc: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
497c2: 4e5e unlk %fp
...
000499d0 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
499d0: 4e56 0000 linkw %fp,#0
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
499d4: 2039 0005 f54c movel 5f54c <_Scheduler_CBS_Maximum_servers>,%d0
499da: e588 lsll #2,%d0
499dc: 2f00 movel %d0,%sp@-
499de: 4eb9 0004 b094 jsr 4b094 <_Workspace_Allocate>
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
499e4: 588f addql #4,%sp
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
499e6: 23c0 0006 0f22 movel %d0,60f22 <_Scheduler_CBS_Server_list>
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
499ec: 671e beqs 49a0c <_Scheduler_CBS_Initialize+0x3c> <== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
499ee: 2239 0005 f54c movel 5f54c <_Scheduler_CBS_Maximum_servers>,%d1
499f4: 4280 clrl %d0
499f6: 600c bras 49a04 <_Scheduler_CBS_Initialize+0x34>
_Scheduler_CBS_Server_list[i] = NULL;
499f8: 2079 0006 0f22 moveal 60f22 <_Scheduler_CBS_Server_list>,%a0
499fe: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
49a02: 5280 addql #1,%d0
49a04: b280 cmpl %d0,%d1
49a06: 66f0 bnes 499f8 <_Scheduler_CBS_Initialize+0x28>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
49a08: 4280 clrl %d0
49a0a: 6002 bras 49a0e <_Scheduler_CBS_Initialize+0x3e>
{
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;
49a0c: 70ef moveq #-17,%d0 <== NOT EXECUTED
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
}
49a0e: 4e5e unlk %fp
...
000484d8 <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
484d8: 4e56 0000 linkw %fp,#0
484dc: 206e 0008 moveal %fp@(8),%a0
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;
484e0: 2268 0086 moveal %a0@(134),%a1
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
484e4: 202e 000c movel %fp@(12),%d0
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
484e8: 2269 0018 moveal %a1@(24),%a1
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
484ec: 6722 beqs 48510 <_Scheduler_CBS_Release_job+0x38>
/* Initializing or shifting deadline. */
if (serv_info)
484ee: 4a89 tstl %a1
484f0: 6710 beqs 48502 <_Scheduler_CBS_Release_job+0x2a>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
484f2: 2039 0005 f292 movel 5f292 <_Watchdog_Ticks_since_boot>,%d0
484f8: d0a9 0004 addl %a1@(4),%d0
484fc: 0880 001f bclr #31,%d0
48500: 6016 bras 48518 <_Scheduler_CBS_Release_job+0x40>
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
48502: 2239 0005 f292 movel 5f292 <_Watchdog_Ticks_since_boot>,%d1
48508: d081 addl %d1,%d0
4850a: 0880 001f bclr #31,%d0
4850e: 600e bras 4851e <_Scheduler_CBS_Release_job+0x46>
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
48510: 2028 00a8 movel %a0@(168),%d0
}
/* Budget replenishment for the next job. */
if (serv_info)
48514: 4a89 tstl %a1
48516: 6706 beqs 4851e <_Scheduler_CBS_Release_job+0x46><== NEVER TAKEN
the_thread->cpu_time_budget = serv_info->parameters.budget;
48518: 2169 0008 0072 movel %a1@(8),%a0@(114)
the_thread->real_priority = new_priority;
4851e: 2140 0018 movel %d0,%a0@(24)
_Thread_Change_priority(the_thread, new_priority, true);
48522: 4878 0001 pea 1 <ADD>
48526: 2f00 movel %d0,%sp@-
48528: 2f08 movel %a0,%sp@-
4852a: 4eb9 0004 893c jsr 4893c <_Thread_Change_priority>
48530: 4fef 000c lea %sp@(12),%sp
}
48534: 4e5e unlk %fp <== NOT EXECUTED
00048538 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
48538: 4e56 0000 linkw %fp,#0
4853c: 2f0a movel %a2,%sp@-
4853e: 246e 0008 moveal %fp@(8),%a2
48542: 2f02 movel %d2,%sp@-
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
48544: 2f0a movel %a2,%sp@-
48546: 4eb9 0004 8638 jsr 48638 <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
4854c: 206a 0086 moveal %a2@(134),%a0
* 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) {
48550: 588f addql #4,%sp
_Scheduler_EDF_Enqueue(the_thread);
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
48552: 2068 0018 moveal %a0@(24),%a0
* 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) {
48556: 4a88 tstl %a0
48558: 674c beqs 485a6 <_Scheduler_CBS_Unblock+0x6e>
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 -
4855a: 222a 0018 movel %a2@(24),%d1
4855e: 2401 movel %d1,%d2
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
48560: 43e8 0004 lea %a0@(4),%a1
*/
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 -
48564: 2039 0005 f292 movel 5f292 <_Watchdog_Ticks_since_boot>,%d0
4856a: 9480 subl %d0,%d2
4856c: 2002 movel %d2,%d0
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
4856e: 4c11 0800 mulsl %a1@,%d0
48572: 43ea 0072 lea %a2@(114),%a1
48576: 2428 0008 movel %a0@(8),%d2
4857a: 4c11 2800 mulsl %a1@,%d2
4857e: b480 cmpl %d0,%d2
48580: 6c24 bges 485a6 <_Scheduler_CBS_Unblock+0x6e>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
48582: 202a 00a8 movel %a2@(168),%d0
if ( the_thread->real_priority != new_priority )
48586: b081 cmpl %d1,%d0
48588: 6704 beqs 4858e <_Scheduler_CBS_Unblock+0x56>
the_thread->real_priority = new_priority;
4858a: 2540 0018 movel %d0,%a2@(24)
if ( the_thread->current_priority != new_priority )
4858e: b0aa 0014 cmpl %a2@(20),%d0
48592: 6712 beqs 485a6 <_Scheduler_CBS_Unblock+0x6e>
_Thread_Change_priority(the_thread, new_priority, true);
48594: 4878 0001 pea 1 <ADD>
48598: 2f00 movel %d0,%sp@-
4859a: 2f0a movel %a2,%sp@-
4859c: 4eb9 0004 893c jsr 4893c <_Thread_Change_priority>
485a2: 4fef 000c lea %sp@(12),%sp
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
485a6: 2079 0005 f32a moveal 5f32a <_Per_CPU_Information+0x12>,%a0
485ac: 2f28 0014 movel %a0@(20),%sp@-
485b0: 2f2a 0014 movel %a2@(20),%sp@-
485b4: 2079 0005 d990 moveal 5d990 <_Scheduler+0x30>,%a0
485ba: 4e90 jsr %a0@
485bc: 508f addql #8,%sp
485be: 4a80 tstl %d0
485c0: 6f20 bles 485e2 <_Scheduler_CBS_Unblock+0xaa>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
485c2: 2079 0005 f326 moveal 5f326 <_Per_CPU_Information+0xe>,%a0
* 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;
485c8: 23ca 0005 f32a movel %a2,5f32a <_Per_CPU_Information+0x12>
if ( _Thread_Executing->is_preemptible ||
485ce: 4a28 0070 tstb %a0@(112)
485d2: 6606 bnes 485da <_Scheduler_CBS_Unblock+0xa2>
485d4: 4aaa 0014 tstl %a2@(20)
485d8: 6608 bnes 485e2 <_Scheduler_CBS_Unblock+0xaa> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
485da: 7001 moveq #1,%d0
485dc: 13c0 0005 f324 moveb %d0,5f324 <_Per_CPU_Information+0xc>
}
}
485e2: 242e fff8 movel %fp@(-8),%d2
485e6: 246e fffc moveal %fp@(-4),%a2
485ea: 4e5e unlk %fp
...
000484a4 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
484a4: 4e56 0000 linkw %fp,#0
484a8: 2f0a movel %a2,%sp@-
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
484aa: 4878 0018 pea 18 <OPER2+0x4>
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
484ae: 246e 0008 moveal %fp@(8),%a2
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
484b2: 4eb9 0004 9b08 jsr 49b08 <_Workspace_Allocate>
if ( sched ) {
484b8: 588f addql #4,%sp
484ba: 4a80 tstl %d0
484bc: 670e beqs 484cc <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN
the_thread->scheduler_info = sched;
484be: 2540 0086 movel %d0,%a2@(134)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
484c2: 2040 moveal %d0,%a0
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
484c4: 7202 moveq #2,%d1
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
if ( sched ) {
the_thread->scheduler_info = sched;
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
484c6: 208a movel %a2,%a0@
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
484c8: 2141 0014 movel %d1,%a0@(20)
}
return sched;
}
484cc: 246e fffc moveal %fp@(-4),%a2
484d0: 4e5e unlk %fp <== NOT EXECUTED
00048694 <_Scheduler_EDF_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_EDF_Free(
Thread_Control *the_thread
)
{
48694: 4e56 0000 linkw %fp,#0
_Workspace_Free( the_thread->scheduler_info );
48698: 206e 0008 moveal %fp@(8),%a0
4869c: 2d68 0086 0008 movel %a0@(134),%fp@(8)
}
486a2: 4e5e unlk %fp
void _Scheduler_EDF_Free(
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
486a4: 4ef9 0004 9bac jmp 49bac <_Workspace_Free>
...
00048680 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
48680: 4e56 0000 linkw %fp,#0
48684: 2f0a movel %a2,%sp@-
48686: 246e 0008 moveal %fp@(8),%a2
_Scheduler_EDF_Enqueue(the_thread);
4868a: 2f0a movel %a2,%sp@-
4868c: 4eb9 0004 851c jsr 4851c <_Scheduler_EDF_Enqueue>
48692: 2f2a 0014 movel %a2@(20),%sp@-
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
48696: 2079 0005 f2aa moveal 5f2aa <_Per_CPU_Information+0x12>,%a0
4869c: 2f28 0014 movel %a0@(20),%sp@-
486a0: 2079 0005 d910 moveal 5d910 <_Scheduler+0x30>,%a0
486a6: 4e90 jsr %a0@
486a8: 4fef 000c lea %sp@(12),%sp
486ac: 4a80 tstl %d0
486ae: 6c20 bges 486d0 <_Scheduler_EDF_Unblock+0x50>
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
486b0: 2079 0005 f2a6 moveal 5f2a6 <_Per_CPU_Information+0xe>,%a0
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
486b6: 23ca 0005 f2aa movel %a2,5f2aa <_Per_CPU_Information+0x12>
if ( _Thread_Executing->is_preemptible ||
486bc: 4a28 0070 tstb %a0@(112)
486c0: 6606 bnes 486c8 <_Scheduler_EDF_Unblock+0x48>
486c2: 4aaa 0014 tstl %a2@(20)
486c6: 6608 bnes 486d0 <_Scheduler_EDF_Unblock+0x50> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
486c8: 7001 moveq #1,%d0
486ca: 13c0 0005 f2a4 moveb %d0,5f2a4 <_Per_CPU_Information+0xc>
}
}
486d0: 246e fffc moveal %fp@(-4),%a2
486d4: 4e5e unlk %fp <== NOT EXECUTED
00047d30 <_Scheduler_Handler_initialization>:
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
47d30: 4e56 0000 linkw %fp,#0
(*_Scheduler.Operations.initialize)();
}
47d34: 4e5e unlk %fp
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
(*_Scheduler.Operations.initialize)();
47d36: 2279 0005 c414 moveal 5c414 <_Scheduler+0x4>,%a1
47d3c: 4ed1 jmp %a1@
...
00047f08 <_Scheduler_priority_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
47f08: 4e56 0000 linkw %fp,#0
_Workspace_Free( the_thread->scheduler_info );
47f0c: 206e 0008 moveal %fp@(8),%a0
47f10: 2d68 0086 0008 movel %a0@(134),%fp@(8)
}
47f16: 4e5e unlk %fp
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
47f18: 4ef9 0004 9418 jmp 49418 <_Workspace_Free>
...
000482ac <_TOD_Set_with_timestamp>:
#include <rtems/score/watchdog.h>
void _TOD_Set_with_timestamp(
const Timestamp_Control *tod
)
{
482ac: 4e56 ffec linkw %fp,#-20
482b0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
482b4: 246e 0008 moveal %fp@(8),%a2
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
482b8: 47f9 0005 a434 lea 5a434 <__divdi3>,%a3
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
482be: 2412 movel %a2@,%d2
482c0: 262a 0004 movel %a2@(4),%d3
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
482c4: 2f3c 3b9a ca00 movel #1000000000,%sp@-
482ca: 42a7 clrl %sp@-
482cc: 2f03 movel %d3,%sp@-
482ce: 2f02 movel %d2,%sp@-
482d0: 4eb9 0005 a894 jsr 5a894 <__moddi3>
482d6: 4fef 0010 lea %sp@(16),%sp
482da: 2801 movel %d1,%d4
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
482dc: 2f3c 3b9a ca00 movel #1000000000,%sp@-
482e2: 42a7 clrl %sp@-
482e4: 2f03 movel %d3,%sp@-
482e6: 2f02 movel %d2,%sp@-
482e8: 4e93 jsr %a3@
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
482ea: 2039 0006 0036 movel 60036 <_Thread_Dispatch_disable_level>,%d0
++level;
482f0: 5280 addql #1,%d0
482f2: 4fef 0010 lea %sp@(16),%sp
482f6: 2401 movel %d1,%d2
_Thread_Dispatch_disable_level = level;
482f8: 23c0 0006 0036 movel %d0,60036 <_Thread_Dispatch_disable_level>
482fe: 2f3c 3b9a ca00 movel #1000000000,%sp@-
48304: 42a7 clrl %sp@-
48306: 2f39 0005 ffdc movel 5ffdc <_TOD+0x4>,%sp@-
4830c: 2f39 0005 ffd8 movel 5ffd8 <_TOD>,%sp@-
48312: 4e93 jsr %a3@
48314: 4fef 0010 lea %sp@(16),%sp
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds_now = _TOD_Seconds_since_epoch();
if ( seconds_next < seconds_now )
48318: b282 cmpl %d2,%d1
4831a: 630a blss 48326 <_TOD_Set_with_timestamp+0x7a>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
4831c: 9282 subl %d2,%d1
4831e: 2f01 movel %d1,%sp@-
48320: 4878 0001 pea 1 <ADD>
48324: 6006 bras 4832c <_TOD_Set_with_timestamp+0x80>
48326: 9481 subl %d1,%d2
48328: 2f02 movel %d2,%sp@-
4832a: 42a7 clrl %sp@-
4832c: 4879 0006 00c6 pea 600c6 <_Watchdog_Seconds_chain>
48332: 4eb9 0004 a4bc jsr 4a4bc <_Watchdog_Adjust>
48338: 4fef 000c lea %sp@(12),%sp
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now );
_TOD.now = *tod;
4833c: 2012 movel %a2@,%d0
4833e: 222a 0004 movel %a2@(4),%d1
_TOD.seconds_trigger = nanoseconds;
48342: 23c4 0005 ffe8 movel %d4,5ffe8 <_TOD+0x10>
if ( seconds_next < seconds_now )
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds_now - seconds_next );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now );
_TOD.now = *tod;
48348: 23c0 0005 ffd8 movel %d0,5ffd8 <_TOD>
4834e: 23c1 0005 ffdc movel %d1,5ffdc <_TOD+0x4>
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
48354: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now );
_TOD.now = *tod;
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
4835a: 7201 moveq #1,%d1
_TOD_Activate();
_Thread_Enable_dispatch();
}
4835c: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now );
_TOD.now = *tod;
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
4835e: 13c1 0005 ffec moveb %d1,5ffec <_TOD+0x14>
_TOD_Activate();
_Thread_Enable_dispatch();
48364: 4ef9 0004 994c jmp 4994c <_Thread_Enable_dispatch>
...
00046c20 <_TOD_Validate>:
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
46c20: 43f9 0005 c2ae lea 5c2ae <Configuration+0xc>,%a1
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46c26: 4e56 0000 linkw %fp,#0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
46c2a: 203c 000f 4240 movel #1000000,%d0
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46c30: 2f03 movel %d3,%sp@-
46c32: 206e 0008 moveal %fp@(8),%a0
46c36: 2f02 movel %d2,%sp@-
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
46c38: 4c51 0000 remul %a1@,%d0,%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
46c3c: 4a88 tstl %a0
46c3e: 6758 beqs 46c98 <_TOD_Validate+0x78> <== NEVER TAKEN
46c40: b0a8 0018 cmpl %a0@(24),%d0
46c44: 6352 blss 46c98 <_TOD_Validate+0x78>
(the_tod->ticks >= ticks_per_second) ||
46c46: 703b moveq #59,%d0
46c48: b0a8 0014 cmpl %a0@(20),%d0
46c4c: 654a bcss 46c98 <_TOD_Validate+0x78>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
46c4e: b0a8 0010 cmpl %a0@(16),%d0
46c52: 6544 bcss 46c98 <_TOD_Validate+0x78>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
46c54: 7217 moveq #23,%d1
46c56: b2a8 000c cmpl %a0@(12),%d1
46c5a: 653c bcss 46c98 <_TOD_Validate+0x78>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
46c5c: 2028 0004 movel %a0@(4),%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
46c60: 6736 beqs 46c98 <_TOD_Validate+0x78> <== NEVER TAKEN
(the_tod->month == 0) ||
46c62: 760c moveq #12,%d3
46c64: b680 cmpl %d0,%d3
46c66: 6530 bcss 46c98 <_TOD_Validate+0x78>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
46c68: 2410 movel %a0@,%d2
(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) ||
46c6a: 0c82 0000 07c3 cmpil #1987,%d2
46c70: 6326 blss 46c98 <_TOD_Validate+0x78>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
46c72: 2228 0008 movel %a0@(8),%d1
(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) ||
46c76: 6720 beqs 46c98 <_TOD_Validate+0x78> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
46c78: 163c 0003 moveb #3,%d3
46c7c: 41f9 0005 d638 lea 5d638 <_TOD_Days_per_month>,%a0
46c82: c483 andl %d3,%d2
46c84: 6606 bnes 46c8c <_TOD_Validate+0x6c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
46c86: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0
46c8a: 6004 bras 46c90 <_TOD_Validate+0x70>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
46c8c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( the_tod->day > days_in_month )
46c90: b081 cmpl %d1,%d0
46c92: 54c0 scc %d0
46c94: 4480 negl %d0
46c96: 6002 bras 46c9a <_TOD_Validate+0x7a>
(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;
46c98: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
46c9a: 241f movel %sp@+,%d2
46c9c: 261f movel %sp@+,%d3
46c9e: 4e5e unlk %fp
...
00048228 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48228: 4e56 fff0 linkw %fp,#-16
4822c: 48d7 041c moveml %d2-%d4/%a2,%sp@
48230: 246e 0008 moveal %fp@(8),%a2
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
48234: 282a 0010 movel %a2@(16),%d4
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48238: 242e 000c movel %fp@(12),%d2
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
4823c: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4823e: 162e 0013 moveb %fp@(19),%d3
/*
* 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 );
48242: 4eb9 0004 8e18 jsr 48e18 <_Thread_Set_transient>
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
48248: 588f addql #4,%sp
4824a: b4aa 0014 cmpl %a2@(20),%d2
4824e: 670c beqs 4825c <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
48250: 2f02 movel %d2,%sp@-
48252: 2f0a movel %a2,%sp@-
48254: 4eb9 0004 8dbc jsr 48dbc <_Thread_Set_priority>
4825a: 508f addql #8,%sp
_ISR_Disable( level );
4825c: 203c 0000 0700 movel #1792,%d0
48262: 40c2 movew %sr,%d2
48264: 8082 orl %d2,%d0
48266: 46c0 movew %d0,%sr
48268: 7204 moveq #4,%d1
/*
* 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;
4826a: 202a 0010 movel %a2@(16),%d0
4826e: c284 andl %d4,%d1
if ( state != STATES_TRANSIENT ) {
48270: 7804 moveq #4,%d4
48272: b880 cmpl %d0,%d4
48274: 672e beqs 482a4 <_Thread_Change_priority+0x7c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
48276: 4a81 tstl %d1
48278: 6608 bnes 48282 <_Thread_Change_priority+0x5a> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
4827a: 72fb moveq #-5,%d1
4827c: c280 andl %d0,%d1
4827e: 2541 0010 movel %d1,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
48282: 46c2 movew %d2,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
48284: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
4828a: 676c beqs 482f8 <_Thread_Change_priority+0xd0>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
4828c: 2d4a 000c movel %a2,%fp@(12)
48290: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48296: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4829c: 4e5e unlk %fp
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
4829e: 4ef9 0004 8d20 jmp 48d20 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
482a4: 4a81 tstl %d1
482a6: 661e bnes 482c6 <_Thread_Change_priority+0x9e> <== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
482a8: 42aa 0010 clrl %a2@(16)
if ( prepend_it )
482ac: 4a03 tstb %d3
482ae: 670a beqs 482ba <_Thread_Change_priority+0x92>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
482b0: 2f0a movel %a2,%sp@-
482b2: 2079 0005 c438 moveal 5c438 <_Scheduler+0x28>,%a0
482b8: 6008 bras 482c2 <_Thread_Change_priority+0x9a>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
482ba: 2079 0005 c434 moveal 5c434 <_Scheduler+0x24>,%a0
482c0: 2f0a movel %a2,%sp@-
482c2: 4e90 jsr %a0@
482c4: 588f addql #4,%sp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
482c6: 203c 0000 0700 movel #1792,%d0
482cc: 46c2 movew %d2,%sr
482ce: 8082 orl %d2,%d0
482d0: 46c0 movew %d0,%sr
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
482d2: 2079 0005 c418 moveal 5c418 <_Scheduler+0x8>,%a0
482d8: 4e90 jsr %a0@
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
482da: 2079 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a0
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
482e0: b1f9 0005 dd72 cmpal 5dd72 <_Per_CPU_Information+0x12>,%a0
482e6: 670e beqs 482f6 <_Thread_Change_priority+0xce>
482e8: 4a28 0070 tstb %a0@(112)
482ec: 6708 beqs 482f6 <_Thread_Change_priority+0xce>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
482ee: 7801 moveq #1,%d4
482f0: 13c4 0005 dd6c moveb %d4,5dd6c <_Per_CPU_Information+0xc>
_ISR_Enable( level );
482f6: 46c2 movew %d2,%sr
}
482f8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
482fe: 4e5e unlk %fp
...
000484d0 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
484d0: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
484d4: 486e fffc pea %fp@(-4)
484d8: 2f2e 0008 movel %fp@(8),%sp@-
484dc: 4eb9 0004 8698 jsr 48698 <_Thread_Get>
switch ( location ) {
484e2: 508f addql #8,%sp
484e4: 4aae fffc tstl %fp@(-4)
484e8: 661e bnes 48508 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
484ea: 2f3c 1000 0018 movel #268435480,%sp@-
484f0: 2f00 movel %d0,%sp@-
484f2: 4eb9 0004 8304 jsr 48304 <_Thread_Clear_state>
484f8: 508f addql #8,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
484fa: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0
--level;
48500: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
48502: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
48508: 4e5e unlk %fp <== NOT EXECUTED
0004850c <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
4850c: 4e56 ffd0 linkw %fp,#-48
48510: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
48514: 283c 0000 0700 movel #1792,%d4
4851a: 2204 movel %d4,%d1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
4851c: 2479 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a2
_ISR_Disable( level );
48522: 40c0 movew %sr,%d0
48524: 8280 orl %d0,%d1
48526: 46c1 movew %d1,%sr
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
48528: 240e movel %fp,%d2
4852a: 5182 subql #8,%d2
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
4852c: 2a3c 0004 70cc movel #291020,%d5
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
48532: 49f9 0004 9468 lea 49468 <_CPU_Context_switch>,%a4
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
48538: 4bf9 0004 95d0 lea 495d0 <_CPU_Context_restore_fp>,%a5
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4853e: 263c 0004 95ae movel #300462,%d3
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
48544: 6000 0104 braw 4864a <_Thread_Dispatch+0x13e>
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
48548: 7201 moveq #1,%d1
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
4854a: 4206 clrb %d6
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
4854c: 2679 0005 dd72 moveal 5dd72 <_Per_CPU_Information+0x12>,%a3
48552: 23c1 0005 dbf6 movel %d1,5dbf6 <_Thread_Dispatch_disable_level>
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
48558: 13c6 0005 dd6c moveb %d6,5dd6c <_Per_CPU_Information+0xc>
_Thread_Executing = heir;
4855e: 23cb 0005 dd6e movel %a3,5dd6e <_Per_CPU_Information+0xe>
/*
* 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 )
48564: b5cb cmpal %a3,%a2
48566: 6612 bnes 4857a <_Thread_Dispatch+0x6e>
48568: 42b9 0005 dbf6 clrl 5dbf6 <_Thread_Dispatch_disable_level>
post_switch:
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 0 );
#endif
_ISR_Enable( level );
4856e: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
48570: 2679 0005 dc6a moveal 5dc6a <_API_extensions_Post_switch_list>,%a3
48576: 6000 00ec braw 48664 <_Thread_Dispatch+0x158>
*/
#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 )
4857a: 7201 moveq #1,%d1
4857c: b2ab 0076 cmpl %a3@(118),%d1
48580: 660a bnes 4858c <_Thread_Dispatch+0x80>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
48582: 41f9 0005 dbae lea 5dbae <_Thread_Ticks_per_timeslice>,%a0
48588: 2750 0072 movel %a0@,%a3@(114)
_ISR_Enable( level );
4858c: 46c0 movew %d0,%sr
4858e: 4879 0005 dba0 pea 5dba0 <_TOD+0x8>
48594: 2245 moveal %d5,%a1
48596: 2f02 movel %d2,%sp@-
48598: 4e91 jsr %a1@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
4859a: 508f addql #8,%sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
4859c: 206e fff8 moveal %fp@(-8),%a0
485a0: 226e fffc moveal %fp@(-4),%a1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
485a4: 2008 movel %a0,%d0
485a6: 2209 movel %a1,%d1
485a8: 2c39 0005 dd7a movel 5dd7a <_Per_CPU_Information+0x1a>,%d6
485ae: 92b9 0005 dd7e subl 5dd7e <_Per_CPU_Information+0x1e>,%d1
485b4: 9186 subxl %d6,%d0
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
485b6: d3aa 0082 addl %d1,%a2@(130)
485ba: 2c2a 007e movel %a2@(126),%d6
485be: dd80 addxl %d0,%d6
485c0: 2546 007e movel %d6,%a2@(126)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
485c4: 23c8 0005 dd7a movel %a0,5dd7a <_Per_CPU_Information+0x1a>
485ca: 23c9 0005 dd7e movel %a1,5dd7e <_Per_CPU_Information+0x1e>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
485d0: 2079 0005 dc66 moveal 5dc66 <_Thread_libc_reent>,%a0
485d6: 4a88 tstl %a0
485d8: 6708 beqs 485e2 <_Thread_Dispatch+0xd6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
485da: 2550 00f4 movel %a0@,%a2@(244)
*_Thread_libc_reent = heir->libc_reent;
485de: 20ab 00f4 movel %a3@(244),%a0@
485e2: 2c39 0005 c538 movel 5c538 <_User_extensions_Switches_list>,%d6
485e8: 6012 bras 485fc <_Thread_Dispatch+0xf0>
while ( node != tail ) {
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
485ea: 2f0b movel %a3,%sp@-
485ec: 2246 moveal %d6,%a1
485ee: 2f0a movel %a2,%sp@-
485f0: 2069 0008 moveal %a1@(8),%a0
485f4: 4e90 jsr %a0@
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
485f6: 508f addql #8,%sp
485f8: 2046 moveal %d6,%a0
485fa: 2c10 movel %a0@,%d6
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
485fc: 0c86 0005 c53c cmpil #378172,%d6
48602: 66e6 bnes 485ea <_Thread_Dispatch+0xde>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
48604: 486b 00bc pea %a3@(188)
48608: 486a 00bc pea %a2@(188)
4860c: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4860e: 508f addql #8,%sp
48610: 4aaa 00f0 tstl %a2@(240)
48614: 6726 beqs 4863c <_Thread_Dispatch+0x130>
#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 );
48616: 2079 0005 dc62 moveal 5dc62 <_Thread_Allocated_fp>,%a0
4861c: b1ca cmpal %a2,%a0
4861e: 671c beqs 4863c <_Thread_Dispatch+0x130>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
48620: 4a88 tstl %a0
48622: 670a beqs 4862e <_Thread_Dispatch+0x122>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
48624: 4868 00f0 pea %a0@(240)
48628: 2243 moveal %d3,%a1
4862a: 4e91 jsr %a1@
4862c: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
4862e: 486a 00f0 pea %a2@(240)
48632: 4e95 jsr %a5@
_Thread_Allocated_fp = executing;
48634: 588f addql #4,%sp
48636: 23ca 0005 dc62 movel %a2,5dc62 <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
4863c: 2479 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a2
_ISR_Disable( level );
48642: 2204 movel %d4,%d1
48644: 40c0 movew %sr,%d0
48646: 8280 orl %d0,%d1
48648: 46c1 movew %d1,%sr
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
4864a: 1239 0005 dd6c moveb 5dd6c <_Per_CPU_Information+0xc>,%d1
48650: 6600 fef6 bnew 48548 <_Thread_Dispatch+0x3c>
48654: 6000 ff12 braw 48568 <_Thread_Dispatch+0x5c>
while ( node != tail ) {
const API_extensions_Post_switch_control *post_switch =
(const API_extensions_Post_switch_control *) node;
(*post_switch->hook)( executing );
48658: 2f0a movel %a2,%sp@-
4865a: 206b 0008 moveal %a3@(8),%a0
4865e: 4e90 jsr %a0@
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
48660: 2653 moveal %a3@,%a3
48662: 588f addql #4,%sp
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
48664: b7fc 0005 dc6e cmpal #384110,%a3
4866a: 66ec bnes 48658 <_Thread_Dispatch+0x14c>
4866c: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
48672: 4e5e unlk %fp
...
0004c1a4 <_Thread_Handler>:
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
4c1a4: 4e56 0000 linkw %fp,#0
4c1a8: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
4c1aa: 2479 0005 dd6e moveal 5dd6e <_Per_CPU_Information+0xe>,%a2
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
4c1b0: 2f02 movel %d2,%sp@-
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4c1b2: 222a 00a4 movel %a2@(164),%d1
_ISR_Set_level(level);
4c1b6: 40c0 movew %sr,%d0
4c1b8: e189 lsll #8,%d1
4c1ba: 0280 0000 f8ff andil #63743,%d0
4c1c0: 8081 orl %d1,%d0
4c1c2: 46c0 movew %d0,%sr
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
doneConstructors = true;
4c1c4: 7001 moveq #1,%d0
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
4c1c6: 1439 0005 d3f8 moveb 5d3f8 <doneConstructors.3716>,%d2
doneConstructors = true;
4c1cc: 13c0 0005 d3f8 moveb %d0,5d3f8 <doneConstructors.3716>
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4c1d2: 4aaa 00f0 tstl %a2@(240)
4c1d6: 6720 beqs 4c1f8 <_Thread_Handler+0x54>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
4c1d8: 2079 0005 dc62 moveal 5dc62 <_Thread_Allocated_fp>,%a0
4c1de: b1ca cmpal %a2,%a0
4c1e0: 6716 beqs 4c1f8 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4c1e2: 4a88 tstl %a0
4c1e4: 670c beqs 4c1f2 <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4c1e6: 4868 00f0 pea %a0@(240)
4c1ea: 4eb9 0004 95ae jsr 495ae <_CPU_Context_save_fp>
4c1f0: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4c1f2: 23ca 0005 dc62 movel %a2,5dc62 <_Thread_Allocated_fp>
);
}
static inline void _User_extensions_Thread_begin( Thread_Control *executing )
{
_User_extensions_Iterate(
4c1f8: 4879 0004 8fda pea 48fda <_User_extensions_Thread_begin_visitor>
4c1fe: 2f0a movel %a2,%sp@-
4c200: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate>
_User_extensions_Thread_begin( executing );
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4c206: 4eb9 0004 8678 jsr 48678 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
4c20c: 508f addql #8,%sp
4c20e: 4a02 tstb %d2
4c210: 6606 bnes 4c218 <_Thread_Handler+0x74>
INIT_NAME ();
4c212: 4eb9 0005 a598 jsr 5a598 <_init>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4c218: 4aaa 008e tstl %a2@(142)
4c21c: 6610 bnes 4c22e <_Thread_Handler+0x8a> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4c21e: 2f2a 0096 movel %a2@(150),%sp@-
4c222: 206a 008a moveal %a2@(138),%a0
4c226: 4e90 jsr %a0@
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4c228: 588f addql #4,%sp
4c22a: 2540 0028 movel %d0,%a2@(40)
}
}
static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
{
_User_extensions_Iterate(
4c22e: 4879 0004 8ff2 pea 48ff2 <_User_extensions_Thread_exitted_visitor>
4c234: 2f0a movel %a2,%sp@-
4c236: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate>
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
_Internal_error_Occurred(
4c23c: 4878 0005 pea 5 <COMPARE>
4c240: 4878 0001 pea 1 <ADD>
4c244: 42a7 clrl %sp@-
4c246: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred>
000488c8 <_Thread_Handler_initialization>:
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
488c8: 4e56 0000 linkw %fp,#0
uint32_t ticks_per_timeslice =
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
488cc: 2079 0005 a7e8 moveal 5a7e8 <Configuration+0x24>,%a0
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
488d2: 4ab9 0005 a7ec tstl 5a7ec <Configuration+0x28>
488d8: 6708 beqs 488e2 <_Thread_Handler_initialization+0x1a><== NEVER TAKEN
488da: 4ab9 0005 a7f0 tstl 5a7f0 <Configuration+0x2c>
488e0: 6610 bnes 488f2 <_Thread_Handler_initialization+0x2a>
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
488e2: 4878 000e pea e <OPER1+0x2>
488e6: 4878 0001 pea 1 <ADD>
488ea: 42a7 clrl %sp@-
488ec: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
488f2: 4a88 tstl %a0
488f4: 670a beqs 48900 <_Thread_Handler_initialization+0x38>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
488f6: 2f39 0005 a7c8 movel 5a7c8 <Configuration+0x4>,%sp@-
488fc: 4e90 jsr %a0@
488fe: 588f addql #4,%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
48900: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
_Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Maximum_extensions = maximum_extensions;
48904: 41f9 0005 a7cc lea 5a7cc <Configuration+0x8>,%a0
4890a: 23d0 0005 dc76 movel %a0@,5dc76 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
48910: 41f9 0005 a7d8 lea 5a7d8 <Configuration+0x14>,%a0
48916: 23d0 0005 dbae movel %a0@,5dbae <_Thread_Ticks_per_timeslice>
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
4891c: 4200 clrb %d0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
4891e: 42a7 clrl %sp@-
48920: 4878 0108 pea 108 <DBL_MANT_DIG+0xd3>
48924: 4878 0001 pea 1 <ADD>
48928: 4878 0001 pea 1 <ADD>
4892c: 4878 0001 pea 1 <ADD>
48930: 4879 0005 dce2 pea 5dce2 <_Thread_Internal_information>
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
48936: 13c0 0005 dd6c moveb %d0,5dd6c <_Per_CPU_Information+0xc>
_Thread_Executing = NULL;
4893c: 42b9 0005 dd6e clrl 5dd6e <_Per_CPU_Information+0xe>
_Thread_Heir = NULL;
48942: 42b9 0005 dd72 clrl 5dd72 <_Per_CPU_Information+0x12>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
48948: 42b9 0005 dc62 clrl 5dc62 <_Thread_Allocated_fp>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
4894e: 4eb9 0004 7a94 jsr 47a94 <_Objects_Initialize_information>
48954: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48958: 4e5e unlk %fp <== NOT EXECUTED
000493b8 <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
493b8: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
493ba: 4e56 0000 linkw %fp,#0
493be: 2f0a movel %a2,%sp@-
493c0: 246e 0008 moveal %fp@(8),%a2
493c4: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
493c8: 666e bnes 49438 <_Thread_Restart+0x80>
_Thread_Set_transient( the_thread );
493ca: 2f0a movel %a2,%sp@-
493cc: 4eb9 0004 94a0 jsr 494a0 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
493d2: 2f2e 0010 movel %fp@(16),%sp@-
493d6: 2f2e 000c movel %fp@(12),%sp@-
493da: 2f0a movel %a2,%sp@-
493dc: 4eb9 0004 b824 jsr 4b824 <_Thread_Reset>
_Thread_Load_environment( the_thread );
493e2: 2f0a movel %a2,%sp@-
493e4: 4eb9 0004 b560 jsr 4b560 <_Thread_Load_environment>
_Thread_Ready( the_thread );
493ea: 2f0a movel %a2,%sp@-
493ec: 4eb9 0004 b7f4 jsr 4b7f4 <_Thread_Ready>
);
}
static inline void _User_extensions_Thread_restart( Thread_Control *restarted )
{
_User_extensions_Iterate(
493f2: 4879 0004 964a pea 4964a <_User_extensions_Thread_restart_visitor>
493f8: 2f0a movel %a2,%sp@-
493fa: 4eb9 0004 96c2 jsr 496c2 <_User_extensions_Iterate>
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
49400: 4fef 0020 lea %sp@(32),%sp
_Thread_Restart_self();
return true;
49404: 7001 moveq #1,%d0
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
49406: b5f9 0005 e626 cmpal 5e626 <_Per_CPU_Information+0xe>,%a2
4940c: 662c bnes 4943a <_Thread_Restart+0x82>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
4940e: 4aaa 00f0 tstl %a2@(240)
49412: 670c beqs 49420 <_Thread_Restart+0x68>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49414: 486a 00f0 pea %a2@(240)
49418: 4eb9 0004 9c58 jsr 49c58 <_CPU_Context_restore_fp>
4941e: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49420: 2079 0005 e626 moveal 5e626 <_Per_CPU_Information+0xe>,%a0
49426: 41e8 00bc lea %a0@(188),%a0
4942a: 2f08 movel %a0,%sp@-
4942c: 4eb9 0004 9b06 jsr 49b06 <_CPU_Context_Restart_self>
49432: 588f addql #4,%sp <== NOT EXECUTED
_Thread_Restart_self();
return true;
49434: 7001 moveq #1,%d0 <== NOT EXECUTED
49436: 6002 bras 4943a <_Thread_Restart+0x82> <== NOT EXECUTED
}
return false;
49438: 4200 clrb %d0
}
4943a: 246e fffc moveal %fp@(-4),%a2
4943e: 4e5e unlk %fp
...
000481d8 <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
481d8: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
481da: 4e56 0000 linkw %fp,#0
481de: 202e 0010 movel %fp@(16),%d0
481e2: 2f0a movel %a2,%sp@-
481e4: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
481e8: 42aa 0044 clrl %a2@(68)
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
481ec: b2aa 0050 cmpl %a2@(80),%d1
481f0: 6618 bnes 4820a <_Thread_blocking_operation_Cancel+0x32>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
481f2: 123c 0003 moveb #3,%d1
481f6: 2541 0050 movel %d1,%a2@(80)
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
481fa: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
481fc: 486a 0048 pea %a2@(72)
48200: 4eb9 0004 923c jsr 4923c <_Watchdog_Remove>
48206: 588f addql #4,%sp
48208: 6002 bras 4820c <_Thread_blocking_operation_Cancel+0x34>
} else
_ISR_Enable( level );
4820a: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4820c: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
48210: 246e fffc moveal %fp@(-4),%a2
48214: 203c 1007 fff8 movel #268959736,%d0
4821a: 2d40 000c movel %d0,%fp@(12)
4821e: 4e5e unlk %fp
48220: 4ef9 0004 8304 jmp 48304 <_Thread_Clear_state>
...
0004b128 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4b128: 4e56 0000 linkw %fp,#0
4b12c: 226e 0008 moveal %fp@(8),%a1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4b130: 2069 0044 moveal %a1@(68),%a0
* 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.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
4b134: 2028 0030 movel %a0@(48),%d0
4b138: 671c beqs 4b156 <_Thread_queue_Process_timeout+0x2e>
4b13a: b3f9 0005 dd6e cmpal 5dd6e <_Per_CPU_Information+0xe>,%a1
4b140: 6614 bnes 4b156 <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
4b142: 7203 moveq #3,%d1
4b144: b280 cmpl %d0,%d1
4b146: 6720 beqs 4b168 <_Thread_queue_Process_timeout+0x40>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4b148: 7002 moveq #2,%d0
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4b14a: 2368 003c 0034 movel %a0@(60),%a1@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4b150: 2140 0030 movel %d0,%a0@(48)
4b154: 6012 bras 4b168 <_Thread_queue_Process_timeout+0x40>
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4b156: 2368 003c 0034 movel %a0@(60),%a1@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4b15c: 2f09 movel %a1,%sp@-
4b15e: 2f08 movel %a0,%sp@-
4b160: 4eb9 0004 b024 jsr 4b024 <_Thread_queue_Extract>
4b166: 508f addql #8,%sp
}
}
4b168: 4e5e unlk %fp <== NOT EXECUTED
00048d20 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
48d20: 4e56 fff0 linkw %fp,#-16
48d24: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
48d28: 246e 0008 moveal %fp@(8),%a2
48d2c: 266e 000c moveal %fp@(12),%a3
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
48d30: 4a8a tstl %a2
48d32: 6746 beqs 48d7a <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
48d34: 7001 moveq #1,%d0
48d36: b0aa 0034 cmpl %a2@(52),%d0
48d3a: 663e bnes 48d7a <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
48d3c: 303c 0700 movew #1792,%d0
48d40: 40c2 movew %sr,%d2
48d42: 8082 orl %d2,%d0
48d44: 46c0 movew %d0,%sr
48d46: 202b 0010 movel %a3@(16),%d0
48d4a: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
48d50: 6726 beqs 48d78 <_Thread_queue_Requeue+0x58> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
48d52: 7001 moveq #1,%d0
48d54: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
48d58: 4878 0001 pea 1 <ADD>
48d5c: 2f0b movel %a3,%sp@-
48d5e: 2f0a movel %a2,%sp@-
48d60: 4eb9 0004 b060 jsr 4b060 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
48d66: 486e fffc pea %fp@(-4)
48d6a: 2f0b movel %a3,%sp@-
48d6c: 2f0a movel %a2,%sp@-
48d6e: 4eb9 0004 8b2c jsr 48b2c <_Thread_queue_Enqueue_priority>
48d74: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
48d78: 46c2 movew %d2,%sr
}
}
48d7a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
48d80: 4e5e unlk %fp <== NOT EXECUTED
00048d84 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48d84: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48d88: 486e fffc pea %fp@(-4)
48d8c: 2f2e 0008 movel %fp@(8),%sp@-
48d90: 4eb9 0004 8698 jsr 48698 <_Thread_Get>
switch ( location ) {
48d96: 508f addql #8,%sp
48d98: 4aae fffc tstl %fp@(-4)
48d9c: 6618 bnes 48db6 <_Thread_queue_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
48d9e: 2f00 movel %d0,%sp@-
48da0: 4eb9 0004 b128 jsr 4b128 <_Thread_queue_Process_timeout>
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
--level;
_Thread_Dispatch_disable_level = level;
48da6: 588f addql #4,%sp
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
48da8: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0
--level;
48dae: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
48db0: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
48db6: 4e5e unlk %fp
...
000526b8 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
526b8: 4e56 ffc0 linkw %fp,#-64
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
526bc: 200e movel %fp,%d0
526be: 220e movel %fp,%d1
526c0: 41ee ffec lea %fp@(-20),%a0
526c4: 5181 subql #8,%d1
526c6: 0680 ffff ffe8 addil #-24,%d0
526cc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
526d0: 246e 0008 moveal %fp@(8),%a2
526d4: 240e movel %fp,%d2
526d6: 0682 ffff fff4 addil #-12,%d2
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
526dc: 280a movel %a2,%d4
/*
* 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 );
526de: 260a movel %a2,%d3
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
526e0: 0684 0000 0030 addil #48,%d4
/*
* 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 );
526e6: 0683 0000 0068 addil #104,%d3
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
526ec: 2c08 movel %a0,%d6
526ee: 2a01 movel %d1,%d5
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
526f0: 2d48 ffe8 movel %a0,%fp@(-24)
head->previous = NULL;
526f4: 42ae ffec clrl %fp@(-20)
tail->previous = head;
526f8: 2d40 fff0 movel %d0,%fp@(-16)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
526fc: 2d41 fff4 movel %d1,%fp@(-12)
head->previous = NULL;
52700: 42ae fff8 clrl %fp@(-8)
tail->previous = head;
52704: 2d42 fffc movel %d2,%fp@(-4)
{
/*
* 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;
52708: 41ee ffe8 lea %fp@(-24),%a0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5270c: 47f9 0005 6320 lea 56320 <_Watchdog_Adjust_to_chain>,%a3
52712: 4bf9 0006 618c lea 6618c <__divdi3>,%a5
{
/*
* 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;
52718: 2548 0078 movel %a0,%a2@(120)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
5271c: 2039 0007 6126 movel 76126 <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
52722: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
52726: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5272a: 9081 subl %d1,%d0
5272c: 2f02 movel %d2,%sp@-
5272e: 2f00 movel %d0,%sp@-
52730: 2f04 movel %d4,%sp@-
52732: 4e93 jsr %a3@
52734: 2f3c 3b9a ca00 movel #1000000000,%sp@-
5273a: 42a7 clrl %sp@-
5273c: 2f39 0007 5fe8 movel 75fe8 <_TOD+0x4>,%sp@-
52742: 2f39 0007 5fe4 movel 75fe4 <_TOD>,%sp@-
52748: 4e95 jsr %a5@
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
5274a: 202a 0074 movel %a2@(116),%d0
5274e: 2e01 movel %d1,%d7
/*
* 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 ) {
52750: 4fef 001c lea %sp@(28),%sp
52754: b081 cmpl %d1,%d0
52756: 640c bccs 52764 <_Timer_server_Body+0xac>
/*
* 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 );
52758: 2f02 movel %d2,%sp@-
5275a: 9280 subl %d0,%d1
5275c: 2f01 movel %d1,%sp@-
5275e: 2f03 movel %d3,%sp@-
52760: 4e93 jsr %a3@
52762: 6014 bras 52778 <_Timer_server_Body+0xc0>
} else if ( snapshot < last_snapshot ) {
52764: b081 cmpl %d1,%d0
52766: 6314 blss 5277c <_Timer_server_Body+0xc4>
/*
* 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 );
52768: 9081 subl %d1,%d0
5276a: 2f00 movel %d0,%sp@-
5276c: 4878 0001 pea 1 <ADD>
52770: 2f03 movel %d3,%sp@-
52772: 4eb9 0005 62a0 jsr 562a0 <_Watchdog_Adjust>
52778: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
5277c: 2547 0074 movel %d7,%a2@(116)
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
52780: 49f9 0005 63a4 lea 563a4 <_Watchdog_Insert>,%a4
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
52786: 2e3c 0005 31c8 movel #340424,%d7
5278c: 202a 0078 movel %a2@(120),%d0
52790: 2047 moveal %d7,%a0
52792: 2f00 movel %d0,%sp@-
52794: 4e90 jsr %a0@
if ( timer == NULL ) {
52796: 588f addql #4,%sp
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
52798: 2040 moveal %d0,%a0
if ( timer == NULL ) {
5279a: 4a80 tstl %d0
5279c: 6724 beqs 527c2 <_Timer_server_Body+0x10a>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5279e: 2028 0038 movel %a0@(56),%d0
527a2: 7201 moveq #1,%d1
527a4: b280 cmpl %d0,%d1
527a6: 6608 bnes 527b0 <_Timer_server_Body+0xf8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
527a8: 4868 0010 pea %a0@(16)
527ac: 2f04 movel %d4,%sp@-
527ae: 600c bras 527bc <_Timer_server_Body+0x104>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
527b0: 7203 moveq #3,%d1
527b2: b280 cmpl %d0,%d1
527b4: 66d6 bnes 5278c <_Timer_server_Body+0xd4> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
527b6: 4868 0010 pea %a0@(16)
527ba: 2f03 movel %d3,%sp@-
527bc: 4e94 jsr %a4@
527be: 508f addql #8,%sp
527c0: 60ca bras 5278c <_Timer_server_Body+0xd4>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
527c2: 203c 0000 0700 movel #1792,%d0
527c8: 40c1 movew %sr,%d1
527ca: 8081 orl %d1,%d0
527cc: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
527ce: bcae ffe8 cmpl %fp@(-24),%d6
527d2: 6614 bnes 527e8 <_Timer_server_Body+0x130> <== NEVER TAKEN
ts->insert_chain = NULL;
527d4: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
527d8: 46c1 movew %d1,%sr
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
527da: 2e3c 0000 0700 movel #1792,%d7
_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 ) ) {
527e0: baae fff4 cmpl %fp@(-12),%d5
527e4: 6608 bnes 527ee <_Timer_server_Body+0x136>
527e6: 603e bras 52826 <_Timer_server_Body+0x16e>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
527e8: 46c1 movew %d1,%sr <== NOT EXECUTED
527ea: 6000 ff30 braw 5271c <_Timer_server_Body+0x64> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
527ee: 2007 movel %d7,%d0
527f0: 40c1 movew %sr,%d1
527f2: 8081 orl %d1,%d0
527f4: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
527f6: 206e fff4 moveal %fp@(-12),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
527fa: ba88 cmpl %a0,%d5
527fc: 6722 beqs 52820 <_Timer_server_Body+0x168>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
527fe: 2250 moveal %a0@,%a1
head->next = new_first;
new_first->previous = head;
52800: 2342 0004 movel %d2,%a1@(4)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
52804: 42a8 0008 clrl %a0@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
52808: 2d49 fff4 movel %a1,%fp@(-12)
_ISR_Enable( level );
5280c: 46c1 movew %d1,%sr
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
5280e: 2f28 0024 movel %a0@(36),%sp@-
52812: 2f28 0020 movel %a0@(32),%sp@-
52816: 2068 001c moveal %a0@(28),%a0
5281a: 4e90 jsr %a0@
}
5281c: 508f addql #8,%sp
5281e: 60ce bras 527ee <_Timer_server_Body+0x136>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
52820: 46c1 movew %d1,%sr
52822: 6000 fee4 braw 52708 <_Timer_server_Body+0x50>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
52826: 4200 clrb %d0
52828: 1540 007c moveb %d0,%a2@(124)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
5282c: 2039 0007 6042 movel 76042 <_Thread_Dispatch_disable_level>,%d0
++level;
52832: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
52834: 23c0 0007 6042 movel %d0,76042 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
5283a: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
5283e: 47f9 0005 64c8 lea 564c8 <_Watchdog_Remove>,%a3
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
52844: 2f12 movel %a2@,%sp@-
52846: 4eb9 0005 5f5c jsr 55f5c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
5284c: 2f0a movel %a2,%sp@-
5284e: 4eba fda4 jsr %pc@(525f4 <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
52852: 2f0a movel %a2,%sp@-
52854: 4eba fdfe jsr %pc@(52654 <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
52858: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch>
ts->active = true;
5285e: 7201 moveq #1,%d1
52860: 1541 007c moveb %d1,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
52864: 486a 0008 pea %a2@(8)
52868: 4e93 jsr %a3@
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5286a: 486a 0040 pea %a2@(64)
5286e: 4e93 jsr %a3@
52870: 4fef 0018 lea %sp@(24),%sp
52874: 6000 fe92 braw 52708 <_Timer_server_Body+0x50>
00052878 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
52878: 4e56 fff0 linkw %fp,#-16
5287c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
52880: 246e 0008 moveal %fp@(8),%a2
52884: 266e 000c moveal %fp@(12),%a3
if ( ts->insert_chain == NULL ) {
52888: 202a 0078 movel %a2@(120),%d0
5288c: 6600 0112 bnew 529a0 <_Timer_server_Schedule_operation_method+0x128>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
52890: 2039 0007 6042 movel 76042 <_Thread_Dispatch_disable_level>,%d0
++level;
52896: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
52898: 23c0 0007 6042 movel %d0,76042 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5289e: 202b 0038 movel %a3@(56),%d0
528a2: 7201 moveq #1,%d1
528a4: b280 cmpl %d0,%d1
528a6: 6660 bnes 52908 <_Timer_server_Schedule_operation_method+0x90>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
528a8: 203c 0000 0700 movel #1792,%d0
528ae: 40c2 movew %sr,%d2
528b0: 8082 orl %d2,%d0
528b2: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
528b4: 2039 0007 6126 movel 76126 <_Watchdog_Ticks_since_boot>,%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
528ba: 43ea 0034 lea %a2@(52),%a1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
528be: 222a 003c movel %a2@(60),%d1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
528c2: 206a 0030 moveal %a2@(48),%a0
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
528c6: b3c8 cmpal %a0,%a1
528c8: 6716 beqs 528e0 <_Timer_server_Schedule_operation_method+0x68>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
528ca: 2240 moveal %d0,%a1
528cc: 93c1 subal %d1,%a1
delta_interval = first_watchdog->delta_interval;
528ce: 2228 0010 movel %a0@(16),%d1
if (delta_interval > delta) {
528d2: b3c1 cmpal %d1,%a1
528d4: 6404 bccs 528da <_Timer_server_Schedule_operation_method+0x62>
delta_interval -= delta;
528d6: 9289 subl %a1,%d1
528d8: 6002 bras 528dc <_Timer_server_Schedule_operation_method+0x64>
} else {
delta_interval = 0;
528da: 4281 clrl %d1
}
first_watchdog->delta_interval = delta_interval;
528dc: 2141 0010 movel %d1,%a0@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
528e0: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
528e4: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
528e6: 486b 0010 pea %a3@(16)
528ea: 486a 0030 pea %a2@(48)
528ee: 4eb9 0005 63a4 jsr 563a4 <_Watchdog_Insert>
if ( !ts->active ) {
528f4: 508f addql #8,%sp
528f6: 102a 007c moveb %a2@(124),%d0
528fa: 6600 0096 bnew 52992 <_Timer_server_Schedule_operation_method+0x11a>
_Timer_server_Reset_interval_system_watchdog( ts );
528fe: 2f0a movel %a2,%sp@-
52900: 4eba fcf2 jsr %pc@(525f4 <_Timer_server_Reset_interval_system_watchdog>)
52904: 6000 008a braw 52990 <_Timer_server_Schedule_operation_method+0x118>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
52908: 7203 moveq #3,%d1
5290a: b280 cmpl %d0,%d1
5290c: 6600 0084 bnew 52992 <_Timer_server_Schedule_operation_method+0x11a>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
52910: 203c 0000 0700 movel #1792,%d0
52916: 40c2 movew %sr,%d2
52918: 8082 orl %d2,%d0
5291a: 46c0 movew %d0,%sr
5291c: 2f3c 3b9a ca00 movel #1000000000,%sp@-
52922: 42a7 clrl %sp@-
52924: 2f39 0007 5fe8 movel 75fe8 <_TOD+0x4>,%sp@-
5292a: 2f39 0007 5fe4 movel 75fe4 <_TOD>,%sp@-
52930: 4eb9 0006 618c jsr 6618c <__divdi3>
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
52936: 226a 0074 moveal %a2@(116),%a1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
5293a: 200a movel %a2,%d0
5293c: 4fef 0010 lea %sp@(16),%sp
52940: 0680 0000 006c addil #108,%d0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
52946: 206a 0068 moveal %a2@(104),%a0
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
5294a: b088 cmpl %a0,%d0
5294c: 6720 beqs 5296e <_Timer_server_Schedule_operation_method+0xf6>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5294e: 2028 0010 movel %a0@(16),%d0
if ( snapshot > last_snapshot ) {
52952: b3c1 cmpal %d1,%a1
52954: 640c bccs 52962 <_Timer_server_Schedule_operation_method+0xea>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
52956: 2841 moveal %d1,%a4
52958: 99c9 subal %a1,%a4
if (delta_interval > delta) {
5295a: b9c0 cmpal %d0,%a4
5295c: 640a bccs 52968 <_Timer_server_Schedule_operation_method+0xf0><== NEVER TAKEN
delta_interval -= delta;
5295e: 908c subl %a4,%d0
52960: 6008 bras 5296a <_Timer_server_Schedule_operation_method+0xf2>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
52962: d089 addl %a1,%d0
delta_interval += delta;
52964: 9081 subl %d1,%d0
52966: 6002 bras 5296a <_Timer_server_Schedule_operation_method+0xf2>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
52968: 4280 clrl %d0 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5296a: 2140 0010 movel %d0,%a0@(16)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5296e: 2541 0074 movel %d1,%a2@(116)
_ISR_Enable( level );
52972: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
52974: 486b 0010 pea %a3@(16)
52978: 486a 0068 pea %a2@(104)
5297c: 4eb9 0005 63a4 jsr 563a4 <_Watchdog_Insert>
if ( !ts->active ) {
52982: 508f addql #8,%sp
52984: 102a 007c moveb %a2@(124),%d0
52988: 6608 bnes 52992 <_Timer_server_Schedule_operation_method+0x11a>
_Timer_server_Reset_tod_system_watchdog( ts );
5298a: 2f0a movel %a2,%sp@-
5298c: 4eba fcc6 jsr %pc@(52654 <_Timer_server_Reset_tod_system_watchdog>)
52990: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
52992: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
52998: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5299a: 4ef9 0005 5774 jmp 55774 <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
529a0: 246a 0078 moveal %a2@(120),%a2
529a4: 2d4b 000c movel %a3,%fp@(12)
529a8: 2d4a 0008 movel %a2,%fp@(8)
}
}
529ac: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
529b2: 4e5e unlk %fp
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
529b4: 4ef9 0005 3190 jmp 53190 <_Chain_Append>
0004a228 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
4a228: 4e56 ffec linkw %fp,#-20
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
4a22c: 206e 000c moveal %fp@(12),%a0
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
4a230: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4a234: 266e 0010 moveal %fp@(16),%a3
4a238: 246e 0014 moveal %fp@(20),%a2
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
4a23c: 2410 movel %a0@,%d2
4a23e: 2628 0004 movel %a0@(4),%d3
4a242: 2002 movel %d2,%d0
4a244: 8083 orl %d3,%d0
4a246: 6606 bnes 4a24e <_Timestamp64_Divide+0x26> <== ALWAYS TAKEN
*_ival_percentage = 0;
4a248: 4293 clrl %a3@ <== NOT EXECUTED
*_fval_percentage = 0;
4a24a: 4292 clrl %a2@ <== NOT EXECUTED
return;
4a24c: 605c bras 4a2aa <_Timestamp64_Divide+0x82> <== 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;
4a24e: 206e 0008 moveal %fp@(8),%a0
4a252: 49f9 0005 a434 lea 5a434 <__divdi3>,%a4
4a258: 2f3c 0001 86a0 movel #100000,%sp@-
4a25e: 42a7 clrl %sp@-
4a260: 2f28 0004 movel %a0@(4),%sp@-
4a264: 2f10 movel %a0@,%sp@-
4a266: 4eb9 0005 a384 jsr 5a384 <__muldi3>
4a26c: 4fef 0010 lea %sp@(16),%sp
4a270: 2f03 movel %d3,%sp@-
4a272: 2f02 movel %d2,%sp@-
4a274: 2f01 movel %d1,%sp@-
4a276: 2f00 movel %d0,%sp@-
4a278: 4e94 jsr %a4@
4a27a: 4fef 0010 lea %sp@(16),%sp
4a27e: 2400 movel %d0,%d2
*_ival_percentage = answer / 1000;
4a280: 4878 03e8 pea 3e8 <DBL_MANT_DIG+0x3b3>
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
4a284: 2601 movel %d1,%d3
*_ival_percentage = answer / 1000;
4a286: 42a7 clrl %sp@-
4a288: 2f01 movel %d1,%sp@-
4a28a: 2f02 movel %d2,%sp@-
4a28c: 4e94 jsr %a4@
4a28e: 4fef 0010 lea %sp@(16),%sp
4a292: 2681 movel %d1,%a3@
*_fval_percentage = answer % 1000;
4a294: 4878 03e8 pea 3e8 <DBL_MANT_DIG+0x3b3>
4a298: 42a7 clrl %sp@-
4a29a: 2f03 movel %d3,%sp@-
4a29c: 2f02 movel %d2,%sp@-
4a29e: 4eb9 0005 a894 jsr 5a894 <__moddi3>
4a2a4: 4fef 0010 lea %sp@(16),%sp
4a2a8: 2481 movel %d1,%a2@
}
4a2aa: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4a2b0: 4e5e unlk %fp <== NOT EXECUTED
000490e4 <_User_extensions_Handler_initialization>:
void _User_extensions_Handler_initialization(void)
{
490e4: 4e56 fffc linkw %fp,#-4
uint32_t number_of_initial_extensions =
490e8: 2039 0005 a804 movel 5a804 <Configuration+0x40>,%d0
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
490ee: 6724 beqs 49114 <_User_extensions_Handler_initialization+0x30><== NEVER TAKEN
User_extensions_Switch_control *initial_extension_switch_controls =
_Workspace_Allocate_or_fatal_error(
490f0: 2200 movel %d0,%d1
490f2: e988 lsll #4,%d0
490f4: e589 lsll #2,%d1
{
uint32_t number_of_initial_extensions =
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
User_extensions_Switch_control *initial_extension_switch_controls =
490f6: 9081 subl %d1,%d0
490f8: 2f00 movel %d0,%sp@-
490fa: 4eb9 0004 9432 jsr 49432 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
);
User_extensions_Switch_context ctx = { initial_extension_switch_controls };
49100: 204e moveal %fp,%a0
49102: 2100 movel %d0,%a0@-
_User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor );
49104: 487a ff9e pea %pc@(490a4 <_User_extensions_Switch_visitor>)
49108: 2f08 movel %a0,%sp@-
4910a: 4eb9 0004 903a jsr 4903a <_User_extensions_Iterate>
49110: 4fef 000c lea %sp@(12),%sp
}
}
49114: 4e5e unlk %fp <== NOT EXECUTED
0004a4bc <_Watchdog_Adjust>:
Watchdog_Interval units
)
{
ISR_Level level;
_ISR_Disable( level );
4a4bc: 327c 0700 moveaw #1792,%a1
4a4c0: 2209 movel %a1,%d1
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4a4c2: 4e56 ffec linkw %fp,#-20
4a4c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4a4ca: 246e 0008 moveal %fp@(8),%a2
4a4ce: 262e 000c movel %fp@(12),%d3
4a4d2: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4a4d6: 40c0 movew %sr,%d0
4a4d8: 8280 orl %d0,%d1
4a4da: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4a4dc: 264a moveal %a2,%a3
4a4de: 205b moveal %a3@+,%a0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4a4e0: b7c8 cmpal %a0,%a3
4a4e2: 674c beqs 4a530 <_Watchdog_Adjust+0x74>
switch ( direction ) {
4a4e4: 4a83 tstl %d3
4a4e6: 673c beqs 4a524 <_Watchdog_Adjust+0x68>
4a4e8: 7201 moveq #1,%d1
4a4ea: b283 cmpl %d3,%d1
4a4ec: 6642 bnes 4a530 <_Watchdog_Adjust+0x74> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4a4ee: d5a8 0010 addl %d2,%a0@(16)
break;
4a4f2: 603c bras 4a530 <_Watchdog_Adjust+0x74>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4a4f4: 2052 moveal %a2@,%a0
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
4a4f6: 2228 0010 movel %a0@(16),%d1
4a4fa: b282 cmpl %d2,%d1
4a4fc: 6308 blss 4a506 <_Watchdog_Adjust+0x4a>
_Watchdog_First( header )->delta_interval -= units;
4a4fe: 9282 subl %d2,%d1
4a500: 2141 0010 movel %d1,%a0@(16)
break;
4a504: 602a bras 4a530 <_Watchdog_Adjust+0x74>
} else {
units -= _Watchdog_First( header )->delta_interval;
4a506: 9481 subl %d1,%d2
_Watchdog_First( header )->delta_interval = 1;
4a508: 7201 moveq #1,%d1
4a50a: 2141 0010 movel %d1,%a0@(16)
_ISR_Enable( level );
4a50e: 46c0 movew %d0,%sr
_Watchdog_Tickle( header );
4a510: 2f0a movel %a2,%sp@-
4a512: 4e94 jsr %a4@
_ISR_Disable( level );
4a514: 2203 movel %d3,%d1
4a516: 40c0 movew %sr,%d0
4a518: 8280 orl %d0,%d1
4a51a: 46c1 movew %d1,%sr
if ( _Chain_Is_empty( header ) )
4a51c: 588f addql #4,%sp
4a51e: b7d2 cmpal %a2@,%a3
4a520: 660a bnes 4a52c <_Watchdog_Adjust+0x70>
4a522: 600c bras 4a530 <_Watchdog_Adjust+0x74>
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
4a524: 49f9 0004 a6dc lea 4a6dc <_Watchdog_Tickle>,%a4
_ISR_Disable( level );
4a52a: 2609 movel %a1,%d3
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4a52c: 4a82 tstl %d2
4a52e: 66c4 bnes 4a4f4 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
4a530: 46c0 movew %d0,%sr
}
4a532: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4a538: 4e5e unlk %fp <== NOT EXECUTED
0004923c <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4923c: 203c 0000 0700 movel #1792,%d0
#include <rtems/score/watchdog.h>
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49242: 4e56 0000 linkw %fp,#0
49246: 206e 0008 moveal %fp@(8),%a0
4924a: 2f0a movel %a2,%sp@-
4924c: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4924e: 40c1 movew %sr,%d1
49250: 8081 orl %d1,%d0
49252: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49254: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49258: 7401 moveq #1,%d2
4925a: b480 cmpl %d0,%d2
4925c: 670c beqs 4926a <_Watchdog_Remove+0x2e>
4925e: 6242 bhis 492a2 <_Watchdog_Remove+0x66>
49260: 143c 0003 moveb #3,%d2
49264: b480 cmpl %d0,%d2
49266: 653a bcss 492a2 <_Watchdog_Remove+0x66> <== NEVER TAKEN
49268: 6006 bras 49270 <_Watchdog_Remove+0x34>
/*
* 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;
4926a: 42a8 0008 clrl %a0@(8)
break;
4926e: 6032 bras 492a2 <_Watchdog_Remove+0x66>
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
49270: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49272: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49276: 4a91 tstl %a1@
49278: 6708 beqs 49282 <_Watchdog_Remove+0x46>
next_watchdog->delta_interval += the_watchdog->delta_interval;
4927a: 2428 0010 movel %a0@(16),%d2
4927e: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49282: 2479 0005 dcd6 moveal 5dcd6 <_Watchdog_Sync_count>,%a2
49288: 4a8a tstl %a2
4928a: 670c beqs 49298 <_Watchdog_Remove+0x5c>
_Watchdog_Sync_level = _ISR_Nest_level;
4928c: 45f9 0005 dd68 lea 5dd68 <_Per_CPU_Information+0x8>,%a2
49292: 23d2 0005 dc7e movel %a2@,5dc7e <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49298: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
4929c: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
492a0: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
492a2: 2439 0005 dcda movel 5dcda <_Watchdog_Ticks_since_boot>,%d2
492a8: 2142 0018 movel %d2,%a0@(24)
_ISR_Enable( level );
492ac: 46c1 movew %d1,%sr
return( previous_state );
}
492ae: 241f movel %sp@+,%d2
492b0: 245f moveal %sp@+,%a2
492b2: 4e5e unlk %fp
...
000492b8 <_Watchdog_Tickle>:
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
492b8: 203c 0000 0700 movel #1792,%d0
#include <rtems/score/watchdog.h>
void _Watchdog_Tickle(
Chain_Control *header
)
{
492be: 4e56 ffe8 linkw %fp,#-24
492c2: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
492c6: 286e 0008 moveal %fp@(8),%a4
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
492ca: 40c2 movew %sr,%d2
492cc: 8082 orl %d2,%d0
492ce: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
492d0: 264c moveal %a4,%a3
492d2: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
492d4: b7ca cmpal %a2,%a3
492d6: 674c beqs 49324 <_Watchdog_Tickle+0x6c>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
492d8: 202a 0010 movel %a2@(16),%d0
492dc: 6708 beqs 492e6 <_Watchdog_Tickle+0x2e>
the_watchdog->delta_interval--;
492de: 5380 subql #1,%d0
492e0: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
492e4: 663e bnes 49324 <_Watchdog_Tickle+0x6c>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
492e6: 4bf9 0004 923c lea 4923c <_Watchdog_Remove>,%a5
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
492ec: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
492f2: 2f0a movel %a2,%sp@-
492f4: 4e95 jsr %a5@
_ISR_Enable( level );
492f6: 46c2 movew %d2,%sr
switch( watchdog_state ) {
492f8: 7202 moveq #2,%d1
492fa: 588f addql #4,%sp
492fc: b280 cmpl %d0,%d1
492fe: 6610 bnes 49310 <_Watchdog_Tickle+0x58> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49300: 2f2a 0024 movel %a2@(36),%sp@-
49304: 2f2a 0020 movel %a2@(32),%sp@-
49308: 206a 001c moveal %a2@(28),%a0
4930c: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
4930e: 508f addql #8,%sp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49310: 2003 movel %d3,%d0
49312: 40c2 movew %sr,%d2
49314: 8082 orl %d2,%d0
49316: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
49318: 2454 moveal %a4@,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
4931a: b7ca cmpal %a2,%a3
4931c: 6706 beqs 49324 <_Watchdog_Tickle+0x6c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
4931e: 4aaa 0010 tstl %a2@(16)
49322: 67ce beqs 492f2 <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
49324: 46c2 movew %d2,%sr
}
49326: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4932c: 4e5e unlk %fp <== NOT EXECUTED
00049330 <_Workspace_Handler_initialization>:
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
49330: 4e56 ffe4 linkw %fp,#-28
49334: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
49338: 2a2e 0010 movel %fp@(16),%d5
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
4933c: 4a39 0005 a7f6 tstb 5a7f6 <Configuration+0x32>
49342: 6608 bnes 4934c <_Workspace_Handler_initialization+0x1c>
49344: 2439 0005 a7c8 movel 5a7c8 <Configuration+0x4>,%d2
4934a: 6002 bras 4934e <_Workspace_Handler_initialization+0x1e>
4934c: 4282 clrl %d2
4934e: d4b9 0005 a7c4 addl 5a7c4 <Configuration>,%d2
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
49354: 4284 clrl %d4
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
49356: 47f9 0004 7304 lea 47304 <_Heap_Initialize>,%a3
for (i = 0; i < area_count; ++i) {
Heap_Area *area = &areas [i];
if ( do_zero ) {
memset( area->begin, 0, area->size );
4935c: 49f9 0004 cbc0 lea 4cbc0 <memset>,%a4
49362: 246e 0008 moveal %fp@(8),%a2
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
49366: 6070 bras 493d8 <_Workspace_Handler_initialization+0xa8>
Heap_Area *area = &areas [i];
if ( do_zero ) {
49368: 4a39 0005 a7f4 tstb 5a7f4 <Configuration+0x30>
4936e: 670e beqs 4937e <_Workspace_Handler_initialization+0x4e>
memset( area->begin, 0, area->size );
49370: 2f2a 0004 movel %a2@(4),%sp@-
49374: 42a7 clrl %sp@-
49376: 2f12 movel %a2@,%sp@-
49378: 4e94 jsr %a4@
4937a: 4fef 000c lea %sp@(12),%sp
}
if ( area->size > overhead ) {
4937e: 262a 0004 movel %a2@(4),%d3
49382: 700e moveq #14,%d0
49384: b083 cmpl %d3,%d0
49386: 644c bccs 493d4 <_Workspace_Handler_initialization+0xa4>
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
49388: 4a39 0005 a7f5 tstb 5a7f5 <Configuration+0x31>
4938e: 661c bnes 493ac <_Workspace_Handler_initialization+0x7c>
size = area->size;
} else {
if ( remaining > 0 ) {
49390: 4a82 tstl %d2
49392: 6716 beqs 493aa <_Workspace_Handler_initialization+0x7a><== NEVER TAKEN
size = remaining < area->size - overhead ?
49394: 2003 movel %d3,%d0
49396: 0680 ffff fff2 addil #-14,%d0
remaining + overhead : area->size;
4939c: b082 cmpl %d2,%d0
4939e: 630c blss 493ac <_Workspace_Handler_initialization+0x7c><== NEVER TAKEN
493a0: 2602 movel %d2,%d3
493a2: 0683 0000 000e addil #14,%d3
493a8: 6002 bras 493ac <_Workspace_Handler_initialization+0x7c>
} else {
size = 0;
493aa: 4283 clrl %d3 <== NOT EXECUTED
}
}
space_available = (*init_or_extend)(
493ac: 4878 0004 pea 4 <CONTEXT_ARG>
493b0: 2f03 movel %d3,%sp@-
493b2: 2f12 movel %a2@,%sp@-
493b4: 4879 0005 dc06 pea 5dc06 <_Workspace_Area>
493ba: 4e93 jsr %a3@
);
area->begin = (char *) area->begin + size;
area->size -= size;
if ( space_available < remaining ) {
493bc: 4fef 0010 lea %sp@(16),%sp
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
493c0: d792 addl %d3,%a2@
area->size -= size;
493c2: 97aa 0004 subl %d3,%a2@(4)
if ( space_available < remaining ) {
493c6: b480 cmpl %d0,%d2
493c8: 6306 blss 493d0 <_Workspace_Handler_initialization+0xa0><== ALWAYS TAKEN
remaining -= space_available;
493ca: 9480 subl %d0,%d2 <== NOT EXECUTED
} else {
remaining = 0;
}
init_or_extend = extend;
493cc: 2645 moveal %d5,%a3 <== NOT EXECUTED
493ce: 6004 bras 493d4 <_Workspace_Handler_initialization+0xa4><== NOT EXECUTED
493d0: 2645 moveal %d5,%a3
area->size -= size;
if ( space_available < remaining ) {
remaining -= space_available;
} else {
remaining = 0;
493d2: 4282 clrl %d2
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
493d4: 5284 addql #1,%d4
493d6: 508a addql #8,%a2
493d8: b8ae 000c cmpl %fp@(12),%d4
493dc: 668a bnes 49368 <_Workspace_Handler_initialization+0x38>
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
493de: 4a82 tstl %d2
493e0: 6710 beqs 493f2 <_Workspace_Handler_initialization+0xc2>
_Internal_error_Occurred(
493e2: 4878 0002 pea 2 <DOUBLE_FLOAT>
493e6: 4878 0001 pea 1 <ADD>
493ea: 42a7 clrl %sp@-
493ec: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
}
493f2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
493f8: 4e5e unlk %fp <== NOT EXECUTED
000495d0 <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
495d0: 4e56 0000 linkw %fp,#0
495d4: 2f0b movel %a3,%sp@-
495d6: 266e 000c moveal %fp@(12),%a3
495da: 2f0a movel %a2,%sp@-
char *dup = _Workspace_Allocate(len + 1);
495dc: 486b 0001 pea %a3@(1)
495e0: 4eb9 0004 9564 jsr 49564 <_Workspace_Allocate>
if (dup != NULL) {
495e6: 588f addql #4,%sp
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
char *dup = _Workspace_Allocate(len + 1);
495e8: 2440 moveal %d0,%a2
if (dup != NULL) {
495ea: 4a80 tstl %d0
495ec: 6718 beqs 49606 <_Workspace_String_duplicate+0x36><== NEVER TAKEN
dup [len] = '\0';
495ee: 4200 clrb %d0
495f0: 1580 b800 moveb %d0,%a2@(00000000,%a3:l)
memcpy(dup, string, len);
495f4: 2f0b movel %a3,%sp@-
495f6: 2f2e 0008 movel %fp@(8),%sp@-
495fa: 2f0a movel %a2,%sp@-
495fc: 4eb9 0004 cdac jsr 4cdac <memcpy>
49602: 4fef 000c lea %sp@(12),%sp
}
return dup;
}
49606: 200a movel %a2,%d0
49608: 246e fff8 moveal %fp@(-8),%a2
4960c: 266e fffc moveal %fp@(-4),%a3
49610: 4e5e unlk %fp <== NOT EXECUTED
00045338 <__assert_func>:
const char *file,
int line,
const char *func,
const char *failedexpr
)
{
45338: 4e56 0000 linkw %fp,#0
4533c: 2f02 movel %d2,%sp@-
4533e: 242e 0010 movel %fp@(16),%d2
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
45342: 660a bnes 4534e <__assert_func+0x16>
45344: 203c 0005 e5e0 movel #386528,%d0
4534a: 2200 movel %d0,%d1
4534c: 6008 bras 45356 <__assert_func+0x1e>
4534e: 2002 movel %d2,%d0
45350: 223c 0005 df40 movel #384832,%d1
45356: 2f00 movel %d0,%sp@-
45358: 2f01 movel %d1,%sp@-
4535a: 2f2e 000c movel %fp@(12),%sp@-
4535e: 2f2e 0008 movel %fp@(8),%sp@-
45362: 2f2e 0014 movel %fp@(20),%sp@-
45366: 4879 0005 df4d pea 5df4d <IMFS_node_control_default+0x21>
4536c: 4eb9 0004 62f4 jsr 462f4 <printk>
file,
line,
(func) ? ", function: " : "",
(func) ? func : ""
);
rtems_fatal( RTEMS_FATAL_SOURCE_ASSERT, (rtems_fatal_code) func );
45372: 2f02 movel %d2,%sp@-
45374: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
45378: 4eb9 0004 9978 jsr 49978 <rtems_fatal>
...
00059fdc <__kill>:
#endif
int __kill( pid_t pid, int sig )
{
return 0;
}
59fdc: 4280 clrl %d0 <== NOT EXECUTED
return 0;
}
#endif
int __kill( pid_t pid, int sig )
{
59fde: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
59fe2: 4e5e unlk %fp <== NOT EXECUTED
...
00059e4c <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
59e4c: 4e56 0000 linkw %fp,#0
59e50: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
59e54: 2d6e 0010 000c movel %fp@(16),%fp@(12)
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
59e5a: 2d40 0008 movel %d0,%fp@(8)
return calloc( elements, size );
}
59e5e: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
59e60: 4ef9 0004 2818 jmp 42818 <calloc>
...
00043270 <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
43270: 4e56 0000 linkw %fp,#0
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(FINI_SYMBOL)
FINI_SYMBOL();
43274: 4eb9 0005 a5ac jsr 5a5ac <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
4327a: 4eb9 0004 320c jsr 4320c <libc_wrapup>
rtems_shutdown_executive(status);
43280: 2f2e 0008 movel %fp@(8),%sp@-
43284: 4eb9 0004 6964 jsr 46964 <rtems_shutdown_executive>
...
0004fd40 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
4fd40: 4e56 ffd8 linkw %fp,#-40
4fd44: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fd48: 2e0e movel %fp,%d7
uint32_t count,
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
4fd4a: 4284 clrl %d4
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fd4c: 5987 subql #4,%d7
4fd4e: 47f9 0004 fc8c lea 4fc8c <fat_buf_access>,%a3
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (sec_buf + ofs), c);
4fd54: 49f9 0005 7168 lea 57168 <memcpy>,%a4
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
4fd5a: 246e 0008 moveal %fp@(8),%a2
4fd5e: 262e 0014 movel %fp@(20),%d3
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
uint32_t ofs = offset;
4fd62: 2c2e 0010 movel %fp@(16),%d6
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
4fd66: 2a2e 000c movel %fp@(12),%d5
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
4fd6a: 603e bras 4fdaa <_fat_block_read+0x6a>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fd6c: 2f07 movel %d7,%sp@-
4fd6e: 4878 0001 pea 1 <ADD>
4fd72: 2f05 movel %d5,%sp@-
4fd74: 2f0a movel %a2,%sp@-
4fd76: 4e93 jsr %a3@
if (rc != RC_OK)
4fd78: 4fef 0010 lea %sp@(16),%sp
4fd7c: 4a80 tstl %d0
4fd7e: 6630 bnes 4fdb0 <_fat_block_read+0x70> <== NEVER TAKEN
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
4fd80: 4282 clrl %d2
4fd82: 3412 movew %a2@,%d2
4fd84: 9486 subl %d6,%d2
4fd86: b682 cmpl %d2,%d3
4fd88: 6402 bccs 4fd8c <_fat_block_read+0x4c> <== ALWAYS TAKEN
4fd8a: 2403 movel %d3,%d2 <== NOT EXECUTED
memcpy((buff + cmpltd), (sec_buf + ofs), c);
4fd8c: dcae fffc addl %fp@(-4),%d6
count -= c;
4fd90: 9682 subl %d2,%d3
cmpltd += c;
sec_num++;
4fd92: 5285 addql #1,%d5
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (sec_buf + ofs), c);
4fd94: 2f02 movel %d2,%sp@-
4fd96: 206e 0018 moveal %fp@(24),%a0
4fd9a: 2f06 movel %d6,%sp@-
4fd9c: 4870 4800 pea %a0@(00000000,%d4:l)
count -= c;
cmpltd += c;
sec_num++;
ofs = 0;
4fda0: 4286 clrl %d6
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (sec_buf + ofs), c);
count -= c;
cmpltd += c;
4fda2: d882 addl %d2,%d4
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (sec_buf + ofs), c);
4fda4: 4e94 jsr %a4@
count -= c;
cmpltd += c;
sec_num++;
ofs = 0;
4fda6: 4fef 000c lea %sp@(12),%sp
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
4fdaa: 4a83 tstl %d3
4fdac: 66be bnes 4fd6c <_fat_block_read+0x2c> <== NEVER TAKEN
4fdae: 6002 bras 4fdb2 <_fat_block_read+0x72>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
4fdb0: 78ff moveq #-1,%d4 <== NOT EXECUTED
cmpltd += c;
sec_num++;
ofs = 0;
}
return cmpltd;
}
4fdb2: 2004 movel %d4,%d0
4fdb4: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
4fdba: 4e5e unlk %fp <== NOT EXECUTED
00059ee0 <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
59ee0: 4e56 0000 linkw %fp,#0
free( ptr );
59ee4: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
59eea: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
59eec: 4ef9 0004 2a60 jmp 42a60 <free>
...
00042b8a <_gettimeofday>:
*/
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
42b8a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return gettimeofday( tp, tzp );
}
42b8e: 4e5e unlk %fp <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
42b90: 4ef9 0004 2ae8 jmp 42ae8 <gettimeofday> <== NOT EXECUTED
...
00059fb4 <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
59fb4: 4e56 0000 linkw %fp,#0
return isatty( fd );
59fb8: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
59fbe: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
59fc0: 4ef9 0005 a504 jmp 5a504 <isatty>
...
000428f4 <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *path1,
const char *path2
)
{
428f4: 4e56 0000 linkw %fp,#0
428f8: 202e 000c movel %fp@(12),%d0
return link( path1, path2 );
428fc: 2d6e 0010 000c movel %fp@(16),%fp@(12)
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *path1,
const char *path2
)
{
42902: 2d40 0008 movel %d0,%fp@(8)
return link( path1, path2 );
}
42906: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *path1,
const char *path2
)
{
return link( path1, path2 );
42908: 4ef9 0004 2870 jmp 42870 <link>
...
0005a064 <_lseek_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
off_t offset,
int whence
)
{
5a064: 4e56 0000 linkw %fp,#0
5a068: 202e 000c movel %fp@(12),%d0
5a06c: 2d40 0008 movel %d0,%fp@(8)
5a070: 202e 0010 movel %fp@(16),%d0
5a074: 222e 0014 movel %fp@(20),%d1
return lseek( fd, offset, whence );
5a078: 2d6e 0018 0014 movel %fp@(24),%fp@(20)
5a07e: 2d40 000c movel %d0,%fp@(12)
5a082: 2d41 0010 movel %d1,%fp@(16)
}
5a086: 4e5e unlk %fp
int fd,
off_t offset,
int whence
)
{
return lseek( fd, offset, whence );
5a088: 4ef9 0005 9fe8 jmp 59fe8 <lseek>
...
00042970 <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
42970: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
42974: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return _STAT_NAME( path, buf );
42978: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
4297e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
return _STAT_NAME( path, buf );
}
42982: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
42984: 4ef9 0004 2910 jmp 42910 <lstat> <== NOT EXECUTED
...
0005a090 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5a090: 4e56 0000 linkw %fp,#0
return malloc( size );
5a094: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5a09a: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5a09c: 4ef9 0004 2d30 jmp 42d30 <malloc>
...
00043708 <_open_r>:
struct _reent *ptr __attribute__((unused)),
const char *buf,
int oflag,
int mode
)
{
43708: 4e56 0000 linkw %fp,#0
4370c: 202e 000c movel %fp@(12),%d0
43710: 2d40 0008 movel %d0,%fp@(8)
43714: 202e 0010 movel %fp@(16),%d0
return open( buf, oflag, mode );
43718: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
struct _reent *ptr __attribute__((unused)),
const char *buf,
int oflag,
int mode
)
{
4371e: 2d40 000c movel %d0,%fp@(12)
return open( buf, oflag, mode );
}
43722: 4e5e unlk %fp
const char *buf,
int oflag,
int mode
)
{
return open( buf, oflag, mode );
43724: 4ef9 0004 3554 jmp 43554 <open>
...
0005a138 <_read_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
void *buf,
size_t nbytes
)
{
5a138: 4e56 0000 linkw %fp,#0
5a13c: 202e 000c movel %fp@(12),%d0
5a140: 2d40 0008 movel %d0,%fp@(8)
5a144: 202e 0010 movel %fp@(16),%d0
return read( fd, buf, nbytes );
5a148: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
struct _reent *ptr __attribute__((unused)),
int fd,
void *buf,
size_t nbytes
)
{
5a14e: 2d40 000c movel %d0,%fp@(12)
return read( fd, buf, nbytes );
}
5a152: 4e5e unlk %fp
int fd,
void *buf,
size_t nbytes
)
{
return read( fd, buf, nbytes );
5a154: 4ef9 0005 a0a4 jmp 5a0a4 <read>
...
0005a15c <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5a15c: 4e56 0000 linkw %fp,#0
5a160: 202e 000c movel %fp@(12),%d0
return realloc( ptr, size );
5a164: 2d6e 0010 000c movel %fp@(16),%fp@(12)
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5a16a: 2d40 0008 movel %d0,%fp@(8)
return realloc( ptr, size );
}
5a16e: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5a170: 4ef9 0005 a19c jmp 5a19c <realloc>
...
000437b0 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
437b0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
437b4: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return _STAT_NAME( path, buf );
437b8: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
437be: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
return _STAT_NAME( path, buf );
}
437c2: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
437c4: 4ef9 0004 3750 jmp 43750 <stat> <== NOT EXECUTED
...
0005a178 <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5a178: 4e56 0000 linkw %fp,#0
5a17c: 202e 000c movel %fp@(12),%d0
5a180: 2d40 0008 movel %d0,%fp@(8)
5a184: 202e 0010 movel %fp@(16),%d0
return write( fd, buf, nbytes );
5a188: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5a18e: 2d40 000c movel %d0,%fp@(12)
return write( fd, buf, nbytes );
}
5a192: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5a194: 4ef9 0005 a284 jmp 5a284 <write>
...
0004245c <chroot>:
#include <unistd.h>
#include <rtems/libio_.h>
int chroot( const char *path )
{
4245c: 4e56 ffac linkw %fp,#-84
42460: 2f0a movel %a2,%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(
42462: 4879 0005 b3a8 pea 5b3a8 <rtems_global_user_env>
eval_flags,
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
42468: 45ee ffb0 lea %fp@(-80),%a2
/*
* 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(
4246c: 4879 0005 b3ac pea 5b3ac <rtems_global_user_env+0x4>
42472: 4878 0019 pea 19 <OPER2+0x5>
42476: 2f2e 0008 movel %fp@(8),%sp@-
4247a: 486e ffc8 pea %fp@(-56)
4247e: 4eb9 0004 3750 jsr 43750 <rtems_filesystem_eval_path_start_with_root_and_current>
42484: 486e ffe0 pea %fp@(-32)
42488: 2f0a movel %a2,%sp@-
4248a: 4eb9 0004 3be4 jsr 43be4 <rtems_filesystem_location_copy_and_detach>
&rtems_global_user_env.root_directory,
&rtems_global_user_env.current_directory
);
rtems_filesystem_eval_path_extract_currentloc( &ctx, &loc );
new_current_loc = rtems_filesystem_location_transform_to_global( &loc );
42490: 2f0a movel %a2,%sp@-
42492: 4eb9 0004 3da4 jsr 43da4 <rtems_filesystem_location_transform_to_global>
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
42498: 4fef 0020 lea %sp@(32),%sp
4249c: 223c 0005 a514 movel #369940,%d1
424a2: 2040 moveal %d0,%a0
&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 );
424a4: 2d40 ffac movel %d0,%fp@(-84)
if ( !rtems_filesystem_global_location_is_null( new_current_loc ) ) {
424a8: b2a8 0010 cmpl %a0@(16),%d1
424ac: 6700 0084 beqw 42532 <chroot+0xd6>
rtems_filesystem_global_location_t *new_root_loc =
424b0: 486e ffac pea %fp@(-84)
424b4: 4eb9 0004 3d04 jsr 43d04 <rtems_filesystem_global_location_obtain>
424ba: 2440 moveal %d0,%a2
rtems_filesystem_global_location_obtain( &new_current_loc );
rtems_filesystem_node_types_t type =
(*new_root_loc->location.mt_entry->ops->node_type_h)(
424bc: 206a 0014 moveal %a2@(20),%a0
424c0: 2068 000c moveal %a0@(12),%a0
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 =
424c4: 2f00 movel %d0,%sp@-
424c6: 2068 0014 moveal %a0@(20),%a0
424ca: 4e90 jsr %a0@
(*new_root_loc->location.mt_entry->ops->node_type_h)(
&new_root_loc->location
);
if ( type == RTEMS_FILESYSTEM_DIRECTORY ) {
424cc: 508f addql #8,%sp
424ce: 4a80 tstl %d0
424d0: 6646 bnes 42518 <chroot+0xbc>
sc = rtems_libio_set_private_env();
424d2: 4eb9 0004 3108 jsr 43108 <rtems_libio_set_private_env>
if (sc == RTEMS_SUCCESSFUL) {
424d8: 4a80 tstl %d0
424da: 6628 bnes 42504 <chroot+0xa8>
rtems_filesystem_global_location_assign(
424dc: 2079 0005 b3a4 moveal 5b3a4 <rtems_current_user_env>,%a0
424e2: 5888 addql #4,%a0
424e4: 2f0a movel %a2,%sp@-
424e6: 45f9 0004 3cda lea 43cda <rtems_filesystem_global_location_assign>,%a2
424ec: 2f08 movel %a0,%sp@-
424ee: 4e92 jsr %a2@
&rtems_filesystem_root,
new_root_loc
);
rtems_filesystem_global_location_assign(
424f0: 2f2e ffac movel %fp@(-84),%sp@-
424f4: 2f39 0005 b3a4 movel 5b3a4 <rtems_current_user_env>,%sp@-
424fa: 4e92 jsr %a2@
424fc: 4fef 0010 lea %sp@(16),%sp
42500: 95ca subal %a2,%a2
42502: 6032 bras 42536 <chroot+0xda>
&rtems_filesystem_current,
new_current_loc
);
} else {
if (sc != RTEMS_UNSATISFIED) {
42504: 720d moveq #13,%d1
42506: b280 cmpl %d0,%d1
42508: 674a beqs 42554 <chroot+0xf8> <== NEVER TAKEN
errno = ENOMEM;
4250a: 4eb9 0004 8c20 jsr 48c20 <__errno>
42510: 720c moveq #12,%d1
42512: 2040 moveal %d0,%a0
42514: 2081 movel %d1,%a0@
42516: 603c bras 42554 <chroot+0xf8>
static inline void rtems_filesystem_location_error(
const rtems_filesystem_location_info_t *loc,
int eno
)
{
if ( !rtems_filesystem_location_is_null( loc ) ) {
42518: 203c 0005 a514 movel #369940,%d0
4251e: b0aa 0010 cmpl %a2@(16),%d0
42522: 6730 beqs 42554 <chroot+0xf8> <== NEVER TAKEN
errno = eno;
42524: 4eb9 0004 8c20 jsr 48c20 <__errno>
4252a: 2040 moveal %d0,%a0
4252c: 7014 moveq #20,%d0
4252e: 2080 movel %d0,%a0@
42530: 6022 bras 42554 <chroot+0xf8>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
}
} else {
rv = -1;
42532: 347c ffff moveaw #-1,%a2
}
rtems_filesystem_eval_path_cleanup( &ctx );
42536: 486e ffc8 pea %fp@(-56)
4253a: 4eb9 0004 3874 jsr 43874 <rtems_filesystem_eval_path_cleanup>
if ( rv != 0 ) {
42540: 588f addql #4,%sp
42542: 4a8a tstl %a2
42544: 671a beqs 42560 <chroot+0x104>
rtems_filesystem_global_location_release( new_current_loc );
42546: 2f2e ffac movel %fp@(-84),%sp@-
4254a: 4eb9 0004 3c8e jsr 43c8e <rtems_filesystem_global_location_release>
42550: 588f addql #4,%sp
42552: 600c bras 42560 <chroot+0x104>
rtems_filesystem_location_error( &new_root_loc->location, ENOTDIR );
rv = -1;
}
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_root_loc );
42554: 2f0a movel %a2,%sp@-
42556: 4eb9 0004 3c8e jsr 43c8e <rtems_filesystem_global_location_release>
4255c: 588f addql #4,%sp
4255e: 60d2 bras 42532 <chroot+0xd6>
if ( rv != 0 ) {
rtems_filesystem_global_location_release( new_current_loc );
}
return rv;
}
42560: 200a movel %a2,%d0
42562: 246e ffa8 moveal %fp@(-88),%a2
42566: 4e5e unlk %fp
...
00042842 <create_disk>:
dev_t dev,
const char *name,
rtems_disk_device **dd_ptr,
char **alloc_name_ptr
)
{
42842: 4e56 ffdc linkw %fp,#-36
42846: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4284a: 242e 0008 movel %fp@(8),%d2
4284e: 262e 000c movel %fp@(12),%d3
42852: 286e 0010 moveal %fp@(16),%a4
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
42856: 2c02 movel %d2,%d6
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.minor;
42858: 2a03 movel %d3,%d5
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
4285a: 2e39 0006 0b76 movel 60b76 <disktab_size>,%d7
42860: be86 cmpl %d6,%d7
42862: 6252 bhis 428b6 <create_disk+0x74>
rtems_disk_device_table *table = disktab;
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
42864: 2807 movel %d7,%d4
42866: d884 addl %d4,%d4
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
rtems_disk_device_table *table = disktab;
42868: 2039 0006 0b7a movel 60b7a <disktab>,%d0
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
if (major >= new_size) {
4286e: b886 cmpl %d6,%d4
42870: 6204 bhis 42876 <create_disk+0x34> <== NEVER TAKEN
new_size = major + 1;
42872: 2806 movel %d6,%d4
42874: 5284 addql #1,%d4
}
table = realloc(table, new_size * sizeof(*table));
42876: 2204 movel %d4,%d1
42878: e789 lsll #3,%d1
4287a: 2f01 movel %d1,%sp@-
4287c: 2f00 movel %d0,%sp@-
4287e: 4eb9 0004 4698 jsr 44698 <realloc>
if (table == NULL) {
42884: 508f addql #8,%sp
if (major >= new_size) {
new_size = major + 1;
}
table = realloc(table, new_size * sizeof(*table));
42886: 2640 moveal %d0,%a3
if (table == NULL) {
42888: 4a80 tstl %d0
4288a: 6700 010e beqw 4299a <create_disk+0x158>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
4288e: 2004 movel %d4,%d0 <== NOT EXECUTED
42890: 9087 subl %d7,%d0 <== NOT EXECUTED
42892: 2207 movel %d7,%d1 <== NOT EXECUTED
42894: e788 lsll #3,%d0 <== NOT EXECUTED
42896: e789 lsll #3,%d1 <== NOT EXECUTED
42898: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4289a: 42a7 clrl %sp@- <== NOT EXECUTED
4289c: 4873 1800 pea %a3@(00000000,%d1:l) <== NOT EXECUTED
428a0: 4eb9 0005 074c jsr 5074c <memset> <== NOT EXECUTED
disktab = table;
disktab_size = new_size;
428a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab = table;
428aa: 23cb 0006 0b7a movel %a3,60b7a <disktab> <== NOT EXECUTED
disktab_size = new_size;
428b0: 23c4 0006 0b76 movel %d4,60b76 <disktab_size> <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
428b6: 2479 0006 0b7a moveal 60b7a <disktab>,%a2
428bc: e78e lsll #3,%d6
428be: d5c6 addal %d6,%a2
428c0: 2012 movel %a2@,%d0
428c2: 6706 beqs 428ca <create_disk+0x88>
428c4: baaa 0004 cmpl %a2@(4),%d5
428c8: 654c bcss 42916 <create_disk+0xd4>
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
428ca: 2c2a 0004 movel %a2@(4),%d6
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
428ce: 6706 beqs 428d6 <create_disk+0x94>
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
428d0: 2806 movel %d6,%d4
428d2: d884 addl %d4,%d4
428d4: 6002 bras 428d8 <create_disk+0x96>
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) {
new_size = DISKTAB_INITIAL_SIZE;
428d6: 7808 moveq #8,%d4
} else {
new_size = 2 * old_size;
}
if (minor >= new_size) {
428d8: b885 cmpl %d5,%d4
428da: 6204 bhis 428e0 <create_disk+0x9e>
new_size = minor + 1;
428dc: 2805 movel %d5,%d4
428de: 5284 addql #1,%d4
}
table = realloc(table, new_size * sizeof(*table));
428e0: 2204 movel %d4,%d1
428e2: e589 lsll #2,%d1
428e4: 2f01 movel %d1,%sp@-
428e6: 2f00 movel %d0,%sp@-
428e8: 4eb9 0004 4698 jsr 44698 <realloc>
if (table == NULL) {
428ee: 508f addql #8,%sp
}
if (minor >= new_size) {
new_size = minor + 1;
}
table = realloc(table, new_size * sizeof(*table));
428f0: 2640 moveal %d0,%a3
if (table == NULL) {
428f2: 4a80 tstl %d0
428f4: 6700 00a4 beqw 4299a <create_disk+0x158>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
428f8: 2004 movel %d4,%d0
428fa: 9086 subl %d6,%d0
428fc: e588 lsll #2,%d0
428fe: 2f00 movel %d0,%sp@-
42900: 42a7 clrl %sp@-
42902: 4873 6c00 pea %a3@(00000000,%d6:l:4)
42906: 4eb9 0005 074c jsr 5074c <memset>
disktab [major].minor = table;
disktab [major].size = new_size;
4290c: 4fef 000c lea %sp@(12),%sp
if (table == NULL) {
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
disktab [major].minor = table;
42910: 248b movel %a3,%a2@
disktab [major].size = new_size;
42912: 2544 0004 movel %d4,%a2@(4)
}
return disktab [major].minor + minor;
42916: 2452 moveal %a2@,%a2
42918: e58d lsll #2,%d5
4291a: d5c5 addal %d5,%a2
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
4291c: 4a8a tstl %a2
4291e: 6602 bnes 42922 <create_disk+0xe0> <== ALWAYS TAKEN
42920: 6078 bras 4299a <create_disk+0x158> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
42922: 700c moveq #12,%d0
if (dd_entry == NULL) {
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
42924: 4a92 tstl %a2@
42926: 6674 bnes 4299c <create_disk+0x15a>
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
42928: 4878 0072 pea 72 <DBL_MANT_DIG+0x3d>
4292c: 4eb9 0004 3c84 jsr 43c84 <malloc>
if (dd == NULL) {
42932: 588f addql #4,%sp
if (*dd_entry != NULL) {
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
42934: 2800 movel %d0,%d4
if (dd == NULL) {
42936: 6762 beqs 4299a <create_disk+0x158> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
42938: 4a8c tstl %a4
4293a: 6730 beqs 4296c <create_disk+0x12a>
alloc_name = strdup(name);
4293c: 2f0c movel %a4,%sp@-
4293e: 4eb9 0005 0d30 jsr 50d30 <strdup>
if (alloc_name == NULL) {
42944: 588f addql #4,%sp
if (dd == NULL) {
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
alloc_name = strdup(name);
42946: 2c00 movel %d0,%d6
42948: 2a00 movel %d0,%d5
if (alloc_name == NULL) {
4294a: 6634 bnes 42980 <create_disk+0x13e> <== ALWAYS TAKEN
free(dd);
4294c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4294e: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
42954: 588f addql #4,%sp <== NOT EXECUTED
42956: 6042 bras 4299a <create_disk+0x158> <== NOT EXECUTED
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
42958: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4295a: 45f9 0004 3810 lea 43810 <free>,%a2 <== NOT EXECUTED
42960: 4e92 jsr %a2@ <== NOT EXECUTED
free(dd);
42962: 2f04 movel %d4,%sp@- <== NOT EXECUTED
42964: 4e92 jsr %a2@ <== NOT EXECUTED
return RTEMS_UNSATISFIED;
42966: 508f addql #8,%sp <== NOT EXECUTED
42968: 700d moveq #13,%d0 <== NOT EXECUTED
4296a: 6030 bras 4299c <create_disk+0x15a> <== NOT EXECUTED
char **alloc_name_ptr
)
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
4296c: 4285 clrl %d5
free(dd);
return RTEMS_UNSATISFIED;
}
}
*dd_entry = dd;
4296e: 2484 movel %d4,%a2@
*dd_ptr = dd;
42970: 206e 0014 moveal %fp@(20),%a0
*alloc_name_ptr = alloc_name;
return RTEMS_SUCCESSFUL;
42974: 4280 clrl %d0
return RTEMS_UNSATISFIED;
}
}
*dd_entry = dd;
*dd_ptr = dd;
42976: 2084 movel %d4,%a0@
*alloc_name_ptr = alloc_name;
42978: 206e 0018 moveal %fp@(24),%a0
4297c: 2085 movel %d5,%a0@
return RTEMS_SUCCESSFUL;
4297e: 601c bras 4299c <create_disk+0x15a>
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
42980: 2f03 movel %d3,%sp@-
42982: 2f02 movel %d2,%sp@-
42984: 4878 61ff pea 61ff <D_MAX_EXP+0x5a00>
42988: 2f00 movel %d0,%sp@-
4298a: 4eb9 0004 3df6 jsr 43df6 <mknod>
42990: 4fef 0010 lea %sp@(16),%sp
42994: 4a80 tstl %d0
42996: 6cd6 bges 4296e <create_disk+0x12c> <== ALWAYS TAKEN
42998: 60be bras 42958 <create_disk+0x116> <== NOT EXECUTED
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
return RTEMS_NO_MEMORY;
4299a: 701a moveq #26,%d0
*dd_entry = dd;
*dd_ptr = dd;
*alloc_name_ptr = alloc_name;
return RTEMS_SUCCESSFUL;
}
4299c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
429a2: 4e5e unlk %fp <== NOT EXECUTED
000439f0 <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)
439f0: 4e56 ffec linkw %fp,#-20
439f4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
439f8: 286e 000c moveal %fp@(12),%a4
if (new_part_desc == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
439fc: 4294 clrl %a4@
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
439fe: 4878 0028 pea 28 <OPER2+0x14>
43a02: 4878 0001 pea 1 <ADD>
* 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)
43a06: 266e 0008 moveal %fp@(8),%a3
return RTEMS_INTERNAL_ERROR;
}
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
43a0a: 4eb9 0004 4584 jsr 44584 <calloc>
43a10: 508f addql #8,%sp
43a12: 2440 moveal %d0,%a2
43a14: 4a80 tstl %d0
43a16: 677c beqs 43a94 <data_to_part_desc.part.1+0xa4> <== NEVER TAKEN
/* 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);
43a18: 4bfa fea6 lea %pc@(438c0 <m68k_swap_u32>),%a5
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
{
return RTEMS_NO_MEMORY;
}
part_desc->bootable = *(data + RTEMS_IDE_PARTITION_BOOTABLE_OFFSET);
43a1c: 1493 moveb %a3@,%a2@
part_desc->sys_type = *(data + RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET);
43a1e: 142b 0004 moveb %a3@(4),%d2
43a22: 1542 0001 moveb %d2,%a2@(1)
/* 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);
43a26: 2f2b 0008 movel %a3@(8),%sp@-
43a2a: 4e95 jsr %a5@
43a2c: 2540 0004 movel %d0,%a2@(4)
memcpy(&temp, data + RTEMS_IDE_PARTITION_SIZE_OFFSET, sizeof(uint32_t));
part_desc->size = LE_TO_CPU_U32(temp);
43a30: 2eab 000c movel %a3@(12),%sp@
43a34: 4e95 jsr %a5@
43a36: 588f addql #4,%sp
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43a38: 7205 moveq #5,%d1
/* 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);
43a3a: 2640 moveal %d0,%a3
43a3c: 2540 0008 movel %d0,%a2@(8)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43a40: 4280 clrl %d0
43a42: 1002 moveb %d2,%d0
43a44: b280 cmpl %d0,%d1
43a46: 670e beqs 43a56 <data_to_part_desc.part.1+0x66>
43a48: 7085 moveq #-123,%d0
43a4a: b580 eorl %d2,%d0
43a4c: 4a00 tstb %d0
43a4e: 57c1 seq %d1
43a50: 49c1 extbl %d1
43a52: 4481 negl %d1
43a54: 6002 bras 43a58 <data_to_part_desc.part.1+0x68>
43a56: 7201 moveq #1,%d1
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
43a58: 0801 0000 btst #0,%d1
43a5c: 6624 bnes 43a82 <data_to_part_desc.part.1+0x92>
DOS_P32MB_PARTITION,
FAT32_PARTITION ,FAT32_LBA_PARTITION,
FAT16_LBA_PARTITION
};
return (NULL != memchr(fat_part_types,type,sizeof(fat_part_types)));
43a5e: 4878 0006 pea 6 <EXTENDSFDF>
43a62: 0282 0000 00ff andil #255,%d2
43a68: 2f02 movel %d2,%sp@-
43a6a: 4879 0005 fa15 pea 5fa15 <fat_part_types.7627>
43a70: 4eb9 0005 16f0 jsr 516f0 <memchr>
43a76: 4fef 000c lea %sp@(12),%sp
* use partitions that are
* - extended
* or
* - FAT type and non-zero
*/
if (is_extended(part_desc->sys_type) ||
43a7a: 4a80 tstl %d0
43a7c: 6708 beqs 43a86 <data_to_part_desc.part.1+0x96>
((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) {
43a7e: 4a8b tstl %a3
43a80: 6704 beqs 43a86 <data_to_part_desc.part.1+0x96> <== NEVER TAKEN
*new_part_desc = part_desc;
43a82: 288a movel %a2,%a4@
43a84: 600a bras 43a90 <data_to_part_desc.part.1+0xa0>
}
else {
/* empty partition */
free(part_desc);
43a86: 2f0a movel %a2,%sp@-
43a88: 4eb9 0004 4844 jsr 44844 <free>
43a8e: 588f addql #4,%sp
}
return RTEMS_SUCCESSFUL;
43a90: 4280 clrl %d0
43a92: 6002 bras 43a96 <data_to_part_desc.part.1+0xa6>
*new_part_desc = NULL;
if ((part_desc = calloc(1, sizeof(rtems_part_desc_t))) == NULL)
{
return RTEMS_NO_MEMORY;
43a94: 701a moveq #26,%d0 <== NOT EXECUTED
else {
/* empty partition */
free(part_desc);
}
return RTEMS_SUCCESSFUL;
}
43a96: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
43a9c: 4e5e unlk %fp <== NOT EXECUTED
00042068 <devFS_Show>:
#endif
#include "devfs.h"
void devFS_Show(void)
{
42068: 4e56 ffe8 linkw %fp,#-24
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
if (rootloc->mt_entry->ops == &devFS_ops) {
4206c: 203c 0005 8a2e movel #363054,%d0
#include "devfs.h"
void devFS_Show(void)
{
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
42072: 2079 0005 9ddc moveal 59ddc <rtems_current_user_env>,%a0
if (rootloc->mt_entry->ops == &devFS_ops) {
42078: 2068 0004 moveal %a0@(4),%a0
4207c: 2068 0014 moveal %a0@(20),%a0
#endif
#include "devfs.h"
void devFS_Show(void)
{
42080: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
if (rootloc->mt_entry->ops == &devFS_ops) {
42084: b0a8 000c cmpl %a0@(12),%d0
42088: 6662 bnes 420ec <devFS_Show+0x84> <== NEVER TAKEN
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return (const devFS_data *) loc->mt_entry->immutable_fs_info;
4208a: 2068 0010 moveal %a0@(16),%a0
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) {
4208e: 4283 clrl %d3
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
42090: 47f9 0004 2fec lea 42fec <printk>,%a3
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
if (rootloc->mt_entry->ops == &devFS_ops) {
const devFS_data *data = devFS_get_data(rootloc);
size_t i = 0;
size_t n = data->count;
42096: 2828 0004 movel %a0@(4),%d4
4209a: 2450 moveal %a0@,%a2
devFS_node *nodes = data->nodes;
for (i = 0; i < n; ++i) {
4209c: 604a bras 420e8 <devFS_Show+0x80>
devFS_node *current = nodes + i;
if (current->name != NULL) {
4209e: 4a92 tstl %a2@
420a0: 6740 beqs 420e2 <devFS_Show+0x7a>
size_t j = 0;
size_t m = current->namelen;
420a2: 2a2a 0004 movel %a2@(4),%d5
printk("/");
420a6: 4879 0005 8a82 pea 58a82 <devFS_ops+0x54>
for (j = 0; j < m; ++j) {
420ac: 4282 clrl %d2
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
420ae: 4e93 jsr %a3@
for (j = 0; j < m; ++j) {
420b0: 588f addql #4,%sp
420b2: 6016 bras 420ca <devFS_Show+0x62>
printk("%c", current->name [j]);
420b4: 2052 moveal %a2@,%a0
420b6: 1030 2800 moveb %a0@(00000000,%d2:l),%d0
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
for (j = 0; j < m; ++j) {
420ba: 5282 addql #1,%d2
printk("%c", current->name [j]);
420bc: 49c0 extbl %d0
420be: 2f00 movel %d0,%sp@-
420c0: 4879 0005 8a84 pea 58a84 <devFS_ops+0x56>
420c6: 4e93 jsr %a3@
if (current->name != NULL) {
size_t j = 0;
size_t m = current->namelen;
printk("/");
for (j = 0; j < m; ++j) {
420c8: 508f addql #8,%sp
420ca: ba82 cmpl %d2,%d5
420cc: 66e6 bnes 420b4 <devFS_Show+0x4c>
printk("%c", current->name [j]);
}
printk(
420ce: 2f2a 000c movel %a2@(12),%sp@-
420d2: 2f2a 0008 movel %a2@(8),%sp@-
420d6: 4879 0005 8a87 pea 58a87 <devFS_ops+0x59>
420dc: 4e93 jsr %a3@
420de: 4fef 000c lea %sp@(12),%sp
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) {
420e2: 5283 addql #1,%d3
420e4: 45ea 0014 lea %a2@(20),%a2
420e8: b883 cmpl %d3,%d4
420ea: 66b2 bnes 4209e <devFS_Show+0x36>
(unsigned long) current->minor
);
}
}
}
}
420ec: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
420f2: 4e5e unlk %fp
...
0004acd8 <devFS_eval_path>:
}
void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
4acd8: 4e56 ffdc linkw %fp,#-36
4acdc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4ace0: 246e 0008 moveal %fp@(8),%a2
)
{
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
4ace4: 4282 clrl %d2
devFS_node *free_node = NULL;
4ace6: 97cb subal %a3,%a3
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
4ace8: 4284 clrl %d4
devFS_node *current = nodes + i;
if (current->name != NULL) {
if (
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
4acea: 4bf9 0004 d08c lea 4d08c <memcmp>,%a5
static inline const devFS_data *devFS_get_data(
const rtems_filesystem_location_info_t *loc
)
{
return (const devFS_data *) loc->mt_entry->immutable_fs_info;
4acf0: 206a 002c moveal %a2@(44),%a0
4acf4: 2068 0010 moveal %a0@(16),%a0
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
4acf8: 262a 0004 movel %a2@(4),%d3
4acfc: 2a12 movel %a2@,%d5
size_t pathlen,
devFS_node **free_node_ptr
)
{
size_t i = 0;
size_t n = data->count;
4acfe: 2c28 0004 movel %a0@(4),%d6
4ad02: 2850 moveal %a0@,%a4
4ad04: 6034 bras 4ad3a <devFS_eval_path+0x62>
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
devFS_node *current = nodes + i;
if (current->name != NULL) {
4ad06: 2214 movel %a4@,%d1
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
devFS_node *free_node = NULL;
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
devFS_node *current = nodes + i;
4ad08: 200c movel %a4,%d0
if (current->name != NULL) {
4ad0a: 4a81 tstl %d1
4ad0c: 671c beqs 4ad2a <devFS_eval_path+0x52>
if (
4ad0e: b6ac 0004 cmpl %a4@(4),%d3
4ad12: 6614 bnes 4ad28 <devFS_eval_path+0x50>
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
4ad14: 2f03 movel %d3,%sp@-
4ad16: 2f05 movel %d5,%sp@-
4ad18: 2f01 movel %d1,%sp@-
4ad1a: 4e95 jsr %a5@
4ad1c: 4fef 000c lea %sp@(12),%sp
4ad20: 4a80 tstl %d0
4ad22: 6702 beqs 4ad26 <devFS_eval_path+0x4e>
4ad24: 6002 bras 4ad28 <devFS_eval_path+0x50>
4ad26: 240c movel %a4,%d2
4ad28: 200b movel %a3,%d0
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) {
4ad2a: 5284 addql #1,%d4
4ad2c: 4a80 tstl %d0
4ad2e: 6704 beqs 4ad34 <devFS_eval_path+0x5c>
4ad30: 4a82 tstl %d2
4ad32: 660c bnes 4ad40 <devFS_eval_path+0x68>
4ad34: 49ec 0014 lea %a4@(20),%a4
4ad38: 2640 moveal %d0,%a3
4ad3a: bc84 cmpl %d4,%d6
4ad3c: 66c8 bnes 4ad06 <devFS_eval_path+0x2e>
4ad3e: 6002 bras 4ad42 <devFS_eval_path+0x6a>
4ad40: 2640 moveal %d0,%a3
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
4ad42: 202a 0010 movel %a2@(16),%d0
rtems_filesystem_eval_path_get_pathlen(ctx),
&free_node
);
int eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (node != NULL) {
4ad46: 4a82 tstl %d2
4ad48: 6712 beqs 4ad5c <devFS_eval_path+0x84>
if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) {
4ad4a: 0800 0006 btst #6,%d0
4ad4e: 6606 bnes 4ad56 <devFS_eval_path+0x7e>
currentloc->node_access = node;
4ad50: 2542 0020 movel %d2,%a2@(32)
4ad54: 6026 bras 4ad7c <devFS_eval_path+0xa4>
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
4ad56: 4878 0011 pea 11 <INVALID_OPERATION+0x1>
4ad5a: 6030 bras 4ad8c <devFS_eval_path+0xb4>
}
} else {
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
4ad5c: 0800 0005 btst #5,%d0
4ad60: 6726 beqs 4ad88 <devFS_eval_path+0xb0> <== NEVER TAKEN
if (free_node != NULL) {
4ad62: 4a8b tstl %a3
4ad64: 671c beqs 4ad82 <devFS_eval_path+0xaa>
free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO;
4ad66: 203c 0000 01ff movel #511,%d0
4ad6c: 2740 0010 movel %d0,%a3@(16)
currentloc->node_access = free_node;
4ad70: 254b 0020 movel %a3,%a2@(32)
rtems_filesystem_eval_path_context_t *ctx,
const char *token,
size_t tokenlen
)
{
ctx->token = token;
4ad74: 2545 0008 movel %d5,%a2@(8)
ctx->tokenlen = tokenlen;
4ad78: 2543 000c movel %d3,%a2@(12)
static inline void rtems_filesystem_eval_path_clear_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->pathlen = 0;
4ad7c: 42aa 0004 clrl %a2@(4)
4ad80: 6014 bras 4ad96 <devFS_eval_path+0xbe>
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);
4ad82: 4878 001c pea 1c <FLT_MANT_DIG+0x4>
4ad86: 6004 bras 4ad8c <devFS_eval_path+0xb4>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
4ad88: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4ad8c: 2f0a movel %a2,%sp@-
4ad8e: 4eb9 0004 4bda jsr 44bda <rtems_filesystem_eval_path_error>
4ad94: 508f addql #8,%sp
}
}
}
4ad96: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4ad9c: 4e5e unlk %fp <== NOT EXECUTED
00043984 <devFS_mknod>:
dev_t dev
)
{
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
43984: 7003 moveq #3,%d0
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
43986: 4e56 ffec linkw %fp,#-20
4398a: 48d7 043c moveml %d2-%d5/%a2,%sp@
4398e: 246e 000c moveal %fp@(12),%a2
43992: 242e 0010 movel %fp@(16),%d2
43996: 262e 0014 movel %fp@(20),%d3
4399a: 2a2e 0018 movel %fp@(24),%d5
4399e: 282e 001c movel %fp@(28),%d4
int rv = 0;
if (namelen != 3 || name [0] != 'd' || name [1] != 'e' || name [2] != 'v') {
439a2: b082 cmpl %d2,%d0
439a4: 6626 bnes 439cc <devFS_mknod+0x48>
439a6: 7264 moveq #100,%d1
439a8: 1012 moveb %a2@,%d0
439aa: 49c0 extbl %d0
439ac: b280 cmpl %d0,%d1
439ae: 661c bnes 439cc <devFS_mknod+0x48> <== NEVER TAKEN
439b0: 123c 0065 moveb #101,%d1
439b4: 102a 0001 moveb %a2@(1),%d0
439b8: 49c0 extbl %d0
439ba: b280 cmpl %d0,%d1
439bc: 660e bnes 439cc <devFS_mknod+0x48> <== NEVER TAKEN
439be: 123c 0076 moveb #118,%d1
439c2: 102a 0002 moveb %a2@(2),%d0
439c6: 49c0 extbl %d0
439c8: b280 cmpl %d0,%d1
439ca: 6762 beqs 43a2e <devFS_mknod+0xaa> <== ALWAYS TAKEN
if (S_ISBLK(mode) || S_ISCHR(mode)) {
439cc: 2003 movel %d3,%d0
439ce: 0280 0000 f000 andil #61440,%d0
439d4: 0c80 0000 6000 cmpil #24576,%d0
439da: 6708 beqs 439e4 <devFS_mknod+0x60>
439dc: 0c80 0000 2000 cmpil #8192,%d0
439e2: 665a bnes 43a3e <devFS_mknod+0xba>
char *dupname = malloc(namelen);
439e4: 2f02 movel %d2,%sp@-
439e6: 4eb9 0004 3f5c jsr 43f5c <malloc>
if (dupname != NULL) {
439ec: 588f addql #4,%sp
439ee: 4a80 tstl %d0
439f0: 672e beqs 43a20 <devFS_mknod+0x9c>
devFS_node *node = parentloc->node_access;
439f2: 206e 0008 moveal %fp@(8),%a0
439f6: 2068 0008 moveal %a0@(8),%a0
node->name = dupname;
439fa: 2080 movel %d0,%a0@
node->namelen = namelen;
439fc: 2142 0004 movel %d2,%a0@(4)
node->major = rtems_filesystem_dev_major_t(dev);
43a00: 2145 0008 movel %d5,%a0@(8)
node->minor = rtems_filesystem_dev_minor_t(dev);
43a04: 2144 000c movel %d4,%a0@(12)
node->mode = mode;
43a08: 2143 0010 movel %d3,%a0@(16)
memcpy(dupname, name, namelen);
43a0c: 2f02 movel %d2,%sp@-
43a0e: 2f0a movel %a2,%sp@-
43a10: 2f00 movel %d0,%sp@-
43a12: 4eb9 0004 d11c jsr 4d11c <memcpy>
43a18: 4fef 000c lea %sp@(12),%sp
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
43a1c: 4280 clrl %d0
43a1e: 602e bras 43a4e <devFS_mknod+0xca>
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;
43a20: 4eb9 0004 c2f0 jsr 4c2f0 <__errno>
43a26: 2040 moveal %d0,%a0
43a28: 700c moveq #12,%d0
43a2a: 2080 movel %d0,%a0@
43a2c: 601e bras 43a4c <devFS_mknod+0xc8>
size_t namelen,
mode_t mode,
dev_t dev
)
{
int rv = 0;
43a2e: 4280 clrl %d0
} else {
errno = ENOTSUP;
rv = -1;
}
} else {
if (!S_ISDIR(mode)) {
43a30: 0283 0000 f000 andil #61440,%d3
43a36: 0c83 0000 4000 cmpil #16384,%d3
43a3c: 6710 beqs 43a4e <devFS_mknod+0xca> <== ALWAYS TAKEN
errno = ENOTSUP;
43a3e: 4eb9 0004 c2f0 jsr 4c2f0 <__errno>
43a44: 2040 moveal %d0,%a0
43a46: 20bc 0000 0086 movel #134,%a0@
rv = -1;
43a4c: 70ff moveq #-1,%d0
}
}
return rv;
}
43a4e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
43a54: 4e5e unlk %fp <== NOT EXECUTED
000427e6 <disk_lock>:
*/
static volatile bool diskdevs_protected;
static rtems_status_code
disk_lock(void)
{
427e6: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_obtain(diskdevs_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
427ea: 42a7 clrl %sp@-
427ec: 42a7 clrl %sp@-
427ee: 2f39 0006 0b72 movel 60b72 <diskdevs_mutex>,%sp@-
427f4: 4eb9 0004 73a4 jsr 473a4 <rtems_semaphore_obtain>
if (sc == RTEMS_SUCCESSFUL) {
427fa: 4fef 000c lea %sp@(12),%sp
427fe: 4a80 tstl %d0
42800: 660c bnes 4280e <disk_lock+0x28> <== NEVER TAKEN
diskdevs_protected = true;
42802: 7001 moveq #1,%d0
42804: 13c0 0006 0b70 moveb %d0,60b70 <diskdevs_protected>
return RTEMS_SUCCESSFUL;
4280a: 4280 clrl %d0
4280c: 6002 bras 42810 <disk_lock+0x2a>
} else {
return RTEMS_NOT_CONFIGURED;
4280e: 7016 moveq #22,%d0 <== NOT EXECUTED
}
}
42810: 4e5e unlk %fp <== NOT EXECUTED
00042814 <disk_unlock>:
static void
disk_unlock(void)
{
42814: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
42818: 4200 clrb %d0
sc = rtems_semaphore_release(diskdevs_mutex);
4281a: 2f39 0006 0b72 movel 60b72 <diskdevs_mutex>,%sp@-
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
42820: 13c0 0006 0b70 moveb %d0,60b70 <diskdevs_protected>
sc = rtems_semaphore_release(diskdevs_mutex);
42826: 4eb9 0004 74ac jsr 474ac <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
4282c: 588f addql #4,%sp
4282e: 4a80 tstl %d0
42830: 670c beqs 4283e <disk_unlock+0x2a> <== ALWAYS TAKEN
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
42832: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
42838: 4eb9 0004 7a80 jsr 47a80 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
4283e: 4e5e unlk %fp <== NOT EXECUTED
0004434e <drainOutput.part.0>:
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
4434e: 307c 0700 moveaw #1792,%a0
44352: 2208 movel %a0,%d1
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
44354: 4e56 fff4 linkw %fp,#-12
44358: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4435c: 246e 0008 moveal %fp@(8),%a2
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
44360: 40c0 movew %sr,%d0
44362: 8280 orl %d0,%d1
44364: 46c1 movew %d1,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
44366: 47f9 0004 62c4 lea 462c4 <rtems_semaphore_obtain>,%a3
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
4436c: 2408 movel %a0,%d2
4436e: 602a bras 4439a <drainOutput.part.0+0x4c>
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
44370: 7202 moveq #2,%d1
44372: 2541 0094 movel %d1,%a2@(148)
rtems_interrupt_enable (level);
44376: 46c0 movew %d0,%sr
sc = rtems_semaphore_obtain(
44378: 42a7 clrl %sp@-
4437a: 42a7 clrl %sp@-
4437c: 2f2a 008c movel %a2@(140),%sp@-
44380: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44382: 4fef 000c lea %sp@(12),%sp
44386: 4a80 tstl %d0
44388: 6708 beqs 44392 <drainOutput.part.0+0x44> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
4438a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4438c: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
44392: 2202 movel %d2,%d1
44394: 40c0 movew %sr,%d0
44396: 8280 orl %d0,%d1
44398: 46c1 movew %d1,%sr
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
4439a: 206a 0084 moveal %a2@(132),%a0
4439e: 222a 0080 movel %a2@(128),%d1
443a2: b288 cmpl %a0,%d1
443a4: 66ca bnes 44370 <drainOutput.part.0+0x22>
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);
443a6: 46c0 movew %d0,%sr
}
}
443a8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
443ae: 4e5e unlk %fp <== NOT EXECUTED
00042f58 <dup2>:
*/
int dup2(
int fildes,
int fildes2
)
{
42f58: 4e56 ffa8 linkw %fp,#-88
42f5c: 48d7 041c moveml %d2-%d4/%a2,%sp@
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
42f60: 280e movel %fp,%d4
42f62: 0684 ffff ffba addil #-70,%d4
42f68: 45f9 0004 3538 lea 43538 <fstat>,%a2
42f6e: 2f04 movel %d4,%sp@-
*/
int dup2(
int fildes,
int fildes2
)
{
42f70: 242e 0008 movel %fp@(8),%d2
42f74: 262e 000c movel %fp@(12),%d3
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
42f78: 2f02 movel %d2,%sp@-
42f7a: 4e92 jsr %a2@
if ( status == -1 )
42f7c: 508f addql #8,%sp
42f7e: 72ff moveq #-1,%d1
42f80: b280 cmpl %d0,%d1
42f82: 6604 bnes 42f88 <dup2+0x30>
return -1;
42f84: 70ff moveq #-1,%d0
42f86: 601e bras 42fa6 <dup2+0x4e>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
42f88: 2f04 movel %d4,%sp@-
42f8a: 2f03 movel %d3,%sp@-
42f8c: 4e92 jsr %a2@
if ( status == -1 )
42f8e: 508f addql #8,%sp
42f90: 72ff moveq #-1,%d1
42f92: b280 cmpl %d0,%d1
42f94: 67ee beqs 42f84 <dup2+0x2c> <== NEVER TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
42f96: 2f03 movel %d3,%sp@-
42f98: 42a7 clrl %sp@-
42f9a: 2f02 movel %d2,%sp@-
42f9c: 4eb9 0004 31c4 jsr 431c4 <fcntl>
42fa2: 4fef 000c lea %sp@(12),%sp
}
42fa6: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2
42fac: 4e5e unlk %fp <== NOT EXECUTED
00044efe <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44efe: 4e56 ffec linkw %fp,#-20
44f02: 48d7 041c moveml %d2-%d4/%a2,%sp@
44f06: 246e 000c moveal %fp@(12),%a2
if ((tty->termios.c_lflag & ECHOCTL) &&
44f0a: 202a 003c movel %a2@(60),%d0
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44f0e: 242e 0008 movel %fp@(8),%d2
if ((tty->termios.c_lflag & ECHOCTL) &&
44f12: 0280 0000 0200 andil #512,%d0
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44f18: 1202 moveb %d2,%d1
if ((tty->termios.c_lflag & ECHOCTL) &&
44f1a: 4a80 tstl %d0
44f1c: 674e beqs 44f6c <echo+0x6e> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
44f1e: 4280 clrl %d0
44f20: 1002 moveb %d2,%d0
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
44f22: 7820 moveq #32,%d4
iscntrl(c) && (c != '\t') && (c != '\n')) {
44f24: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0
44f2a: 1630 0801 moveb %a0@(00000001,%d0:l),%d3
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
44f2e: c684 andl %d4,%d3
44f30: 4a03 tstb %d3
44f32: 6738 beqs 44f6c <echo+0x6e>
iscntrl(c) && (c != '\t') && (c != '\n')) {
44f34: 7609 moveq #9,%d3
44f36: b680 cmpl %d0,%d3
44f38: 6732 beqs 44f6c <echo+0x6e>
44f3a: 183c 000a moveb #10,%d4
44f3e: b880 cmpl %d0,%d4
44f40: 672a beqs 44f6c <echo+0x6e>
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44f42: 2f0a movel %a2,%sp@-
44f44: 4878 0002 pea 2 <DOUBLE_FLOAT>
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
44f48: 163c 0040 moveb #64,%d3
rtems_termios_puts (echobuf, 2, tty);
44f4c: 486e fffe pea %fp@(-2)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44f50: 705e moveq #94,%d0
echobuf[1] = c ^ 0x40;
44f52: b782 eorl %d3,%d2
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44f54: 1d40 fffe moveb %d0,%fp@(-2)
echobuf[1] = c ^ 0x40;
44f58: 1d42 ffff moveb %d2,%fp@(-1)
rtems_termios_puts (echobuf, 2, tty);
44f5c: 4eb9 0004 4cd4 jsr 44cd4 <rtems_termios_puts>
44f62: 4fef 000c lea %sp@(12),%sp
tty->column += 2;
44f66: 54aa 0028 addql #2,%a2@(40)
44f6a: 6010 bras 44f7c <echo+0x7e>
} else {
oproc (c, tty);
44f6c: 2f0a movel %a2,%sp@-
44f6e: 0281 0000 00ff andil #255,%d1
44f74: 2f01 movel %d1,%sp@-
44f76: 4eba fe4a jsr %pc@(44dc2 <oproc>)
44f7a: 508f addql #8,%sp
}
}
44f7c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
44f82: 4e5e unlk %fp <== NOT EXECUTED
0005e560 <endgrent>:
void endgrent(void)
{
5e560: 4e56 0000 linkw %fp,#0
if (group_fp != NULL)
5e564: 2039 0009 578c movel 9578c <group_fp>,%d0
5e56a: 670a beqs 5e576 <endgrent+0x16> <== NEVER TAKEN
fclose(group_fp);
5e56c: 2f00 movel %d0,%sp@-
5e56e: 4eb9 0006 db88 jsr 6db88 <fclose>
5e574: 588f addql #4,%sp
}
5e576: 4e5e unlk %fp
...
0005e41c <endpwent>:
void endpwent(void)
{
5e41c: 4e56 0000 linkw %fp,#0
if (passwd_fp != NULL)
5e420: 2039 0009 56b2 movel 956b2 <passwd_fp>,%d0
5e426: 670a beqs 5e432 <endpwent+0x16> <== NEVER TAKEN
fclose(passwd_fp);
5e428: 2f00 movel %d0,%sp@-
5e42a: 4eb9 0006 db88 jsr 6db88 <fclose>
5e430: 588f addql #4,%sp
}
5e432: 4e5e unlk %fp <== NOT EXECUTED
00044f86 <erase.part.2>:
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
44f86: 4e56 ffe4 linkw %fp,#-28
44f8a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
44f8e: 246e 0008 moveal %fp@(8),%a2
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);
44f92: 47f9 0004 4cd4 lea 44cd4 <rtems_termios_puts>,%a3
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
44f98: 262e 000c movel %fp@(12),%d3
44f9c: 6000 011e braw 450bc <erase.part.2+0x136>
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
44fa0: 5381 subql #1,%d1
44fa2: 206a 001c moveal %a2@(28),%a0
if (tty->termios.c_lflag & ECHO) {
44fa6: 202a 003c movel %a2@(60),%d0
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
44faa: 2541 0020 movel %d1,%a2@(32)
44fae: 1430 1800 moveb %a0@(00000000,%d1:l),%d2
if (tty->termios.c_lflag & ECHO) {
44fb2: 44c0 movew %d0,%ccr
44fb4: 6a00 0102 bplw 450b8 <erase.part.2+0x132>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
44fb8: 4a83 tstl %d3
44fba: 6620 bnes 44fdc <erase.part.2+0x56>
44fbc: 0800 0004 btst #4,%d0
44fc0: 661a bnes 44fdc <erase.part.2+0x56> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
44fc2: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
44fc6: 4280 clrl %d0 <== NOT EXECUTED
44fc8: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44fcc: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
44fd2: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44fd6: 4e5e unlk %fp <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
44fd8: 6000 ff24 braw 44efe <echo> <== NOT EXECUTED
44fdc: 2879 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a4
} else if (c == '\t') {
44fe2: 7809 moveq #9,%d4
44fe4: 0282 0000 00ff andil #255,%d2
44fea: b882 cmpl %d2,%d4
44fec: 665c bnes 4504a <erase.part.2+0xc4>
int col = tty->read_start_column;
44fee: 242a 002c movel %a2@(44),%d2
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
44ff2: 2248 moveal %a0,%a1
if (tty->termios.c_lflag & ECHOCTL)
44ff4: 0280 0000 0200 andil #512,%d0
44ffa: 6026 bras 45022 <erase.part.2+0x9c>
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
44ffc: 4284 clrl %d4
44ffe: 1819 moveb %a1@+,%d4
45000: 7a09 moveq #9,%d5
45002: ba84 cmpl %d4,%d5
45004: 6606 bnes 4500c <erase.part.2+0x86>
col = (col | 7) + 1;
45006: 7807 moveq #7,%d4
45008: 8484 orl %d4,%d2
4500a: 6014 bras 45020 <erase.part.2+0x9a>
} else if (iscntrl (c)) {
4500c: 7a20 moveq #32,%d5
4500e: 1834 4801 moveb %a4@(00000001,%d4:l),%d4
45012: c885 andl %d5,%d4
45014: 4a04 tstb %d4
45016: 6708 beqs 45020 <erase.part.2+0x9a> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
45018: 4a80 tstl %d0 <== NOT EXECUTED
4501a: 6706 beqs 45022 <erase.part.2+0x9c> <== NOT EXECUTED
col += 2;
4501c: 5482 addql #2,%d2 <== NOT EXECUTED
4501e: 6002 bras 45022 <erase.part.2+0x9c> <== NOT EXECUTED
} else {
col++;
45020: 5282 addql #1,%d2
* Erase a character or line
* FIXME: Needs support for WERASE and ECHOPRT.
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
45022: 2809 movel %a1,%d4
45024: 9888 subl %a0,%d4
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
45026: b284 cmpl %d4,%d1
45028: 66d2 bnes 44ffc <erase.part.2+0x76>
4502a: 6016 bras 45042 <erase.part.2+0xbc>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
4502c: 2f0a movel %a2,%sp@-
4502e: 4878 0001 pea 1 <ADD>
45032: 4879 0005 b5fd pea 5b5fd <rtems_termios_baud_table+0x109>
45038: 4e93 jsr %a3@
tty->column--;
4503a: 4fef 000c lea %sp@(12),%sp
4503e: 53aa 0028 subql #1,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
45042: b4aa 0028 cmpl %a2@(40),%d2
45046: 6de4 blts 4502c <erase.part.2+0xa6>
45048: 606e bras 450b8 <erase.part.2+0x132>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
4504a: 5282 addql #1,%d2
4504c: 7820 moveq #32,%d4
4504e: 1234 2800 moveb %a4@(00000000,%d2:l),%d1
45052: c284 andl %d4,%d1
45054: 4a01 tstb %d1
45056: 6724 beqs 4507c <erase.part.2+0xf6> <== ALWAYS TAKEN
45058: 0800 0009 btst #9,%d0 <== NOT EXECUTED
4505c: 671e beqs 4507c <erase.part.2+0xf6> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
4505e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45060: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
45064: 4879 0005 b5fb pea 5b5fb <rtems_termios_baud_table+0x107> <== NOT EXECUTED
4506a: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
4506c: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
45070: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
45074: 6706 beqs 4507c <erase.part.2+0xf6> <== NOT EXECUTED
tty->column--;
45076: 5380 subql #1,%d0 <== NOT EXECUTED
45078: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
4507c: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0
45082: 7a20 moveq #32,%d5
45084: 1030 2800 moveb %a0@(00000000,%d2:l),%d0
45088: c085 andl %d5,%d0
4508a: 4a00 tstb %d0
4508c: 670c beqs 4509a <erase.part.2+0x114> <== ALWAYS TAKEN
4508e: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED
45092: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED
45098: 671e beqs 450b8 <erase.part.2+0x132> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
4509a: 2f0a movel %a2,%sp@-
4509c: 4878 0003 pea 3 <DIVIDE>
450a0: 4879 0005 b5fb pea 5b5fb <rtems_termios_baud_table+0x107>
450a6: 4e93 jsr %a3@
if (tty->column)
450a8: 202a 0028 movel %a2@(40),%d0
450ac: 4fef 000c lea %sp@(12),%sp
450b0: 6706 beqs 450b8 <erase.part.2+0x132> <== NEVER TAKEN
tty->column--;
450b2: 5380 subql #1,%d0
450b4: 2540 0028 movel %d0,%a2@(40)
}
}
}
if (!lineFlag)
450b8: 4a83 tstl %d3
450ba: 6708 beqs 450c4 <erase.part.2+0x13e>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
450bc: 222a 0020 movel %a2@(32),%d1
450c0: 6600 fede bnew 44fa0 <erase.part.2+0x1a>
}
}
if (!lineFlag)
break;
}
}
450c4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
450ca: 4e5e unlk %fp <== NOT EXECUTED
0004fc8c <fat_buf_access>:
static inline uint32_t
fat_sector_num_to_block_num (const fat_fs_info_t *fs_info,
const uint32_t sector_number)
{
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4fc8c: 4281 clrl %d1
4fc8e: 4280 clrl %d0
int
fat_buf_access(fat_fs_info_t *fs_info,
const uint32_t sec_num,
const int op_type,
uint8_t **sec_buf)
{
4fc90: 4e56 fff0 linkw %fp,#-16
4fc94: 48d7 041c moveml %d2-%d4/%a2,%sp@
4fc98: 246e 0008 moveal %fp@(8),%a2
4fc9c: 122a 0002 moveb %a2@(2),%d1
4fca0: 102a 000c moveb %a2@(12),%d0
4fca4: 9081 subl %d1,%d0
4fca6: 242e 000c movel %fp@(12),%d2
4fcaa: 2802 movel %d2,%d4
4fcac: e0ac lsrl %d0,%d4
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4fcae: 2604 movel %d4,%d3
4fcb0: e1ab lsll %d0,%d3
4fcb2: 2003 movel %d3,%d0
fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info,
const uint32_t sector,
const uint32_t sector_offset)
{
return sector_offset +
((sector -
4fcb4: 2602 movel %d2,%d3
4fcb6: 9680 subl %d0,%d3
fat_block_num_to_sector_num (fs_info,
fat_sector_num_to_block_num (fs_info, sector)))
<< fs_info->vol.sec_log2);
4fcb8: e3ab lsll %d1,%d3
sec_num);
uint32_t blk_ofs = fat_sector_offset_to_block_offset (fs_info,
sec_num,
0);
if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num)
4fcba: 4a2a 007f tstb %a2@(127)
4fcbe: 6706 beqs 4fcc6 <fat_buf_access+0x3a>
4fcc0: b4aa 007a cmpl %a2@(122),%d2
4fcc4: 6760 beqs 4fd26 <fat_buf_access+0x9a>
{
fat_buf_release(fs_info);
4fcc6: 2f0a movel %a2,%sp@-
4fcc8: 4eb9 0004 faee jsr 4faee <fat_buf_release>
if (op_type == FAT_OP_TYPE_READ)
4fcce: 588f addql #4,%sp
4fcd0: 200a movel %a2,%d0
4fcd2: 0680 0000 0080 addil #128,%d0
4fcd8: 7201 moveq #1,%d1
4fcda: b2ae 0010 cmpl %fp@(16),%d1
4fcde: 6610 bnes 4fcf0 <fat_buf_access+0x64>
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
4fce0: 2f00 movel %d0,%sp@-
4fce2: 2f04 movel %d4,%sp@-
4fce4: 2f2a 005a movel %a2@(90),%sp@-
4fce8: 4eb9 0004 dfcc jsr 4dfcc <rtems_bdbuf_read>
4fcee: 600e bras 4fcfe <fat_buf_access+0x72>
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
4fcf0: 2f00 movel %d0,%sp@-
4fcf2: 2f04 movel %d4,%sp@-
4fcf4: 2f2a 005a movel %a2@(90),%sp@-
4fcf8: 4eb9 0004 df0e jsr 4df0e <rtems_bdbuf_get>
4fcfe: 4fef 000c lea %sp@(12),%sp
if (sc != RTEMS_SUCCESSFUL)
4fd02: 4a80 tstl %d0
4fd04: 6710 beqs 4fd16 <fat_buf_access+0x8a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
4fd06: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4fd0c: 7405 moveq #5,%d2 <== NOT EXECUTED
4fd0e: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fd10: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fd12: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fd14: 6020 bras 4fd36 <fat_buf_access+0xaa> <== NOT EXECUTED
fs_info->c.blk_num = sec_num;
4fd16: 2542 007a movel %d2,%a2@(122)
fs_info->c.modified = 0;
4fd1a: 4200 clrb %d0
fs_info->c.state = FAT_CACHE_ACTUAL;
4fd1c: 7201 moveq #1,%d1
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = sec_num;
fs_info->c.modified = 0;
4fd1e: 1540 007e moveb %d0,%a2@(126)
fs_info->c.state = FAT_CACHE_ACTUAL;
4fd22: 1541 007f moveb %d1,%a2@(127)
}
*sec_buf = &fs_info->c.buf->buffer[blk_ofs];
4fd26: 226a 0080 moveal %a2@(128),%a1
4fd2a: d6a9 001a addl %a1@(26),%d3
return RC_OK;
4fd2e: 4280 clrl %d0
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.blk_num = sec_num;
fs_info->c.modified = 0;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*sec_buf = &fs_info->c.buf->buffer[blk_ofs];
4fd30: 206e 0014 moveal %fp@(20),%a0
4fd34: 2083 movel %d3,%a0@
return RC_OK;
}
4fd36: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4fd3c: 4e5e unlk %fp <== NOT EXECUTED
0004faee <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
4faee: 4e56 ffd4 linkw %fp,#-44
4faf2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4faf6: 246e 0008 moveal %fp@(8),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (fs_info->c.state == FAT_CACHE_EMPTY)
4fafa: 4a2a 007f tstb %a2@(127)
4fafe: 6700 0180 beqw 4fc80 <fat_buf_release+0x192>
return RC_OK;
if (fs_info->c.modified)
4fb02: 4a2a 007e tstb %a2@(126)
4fb06: 6700 0152 beqw 4fc5a <fat_buf_release+0x16c>
{
uint32_t sec_num = fs_info->c.blk_num;
bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) &&
4fb0a: 4281 clrl %d1
4fb0c: 322a 0018 movew %a2@(24),%d1
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
if (fs_info->c.modified)
{
uint32_t sec_num = fs_info->c.blk_num;
4fb10: 202a 007a movel %a2@(122),%d0
bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) &&
4fb14: b280 cmpl %d0,%d1
4fb16: 620c bhis 4fb24 <fat_buf_release+0x36> <== NEVER TAKEN
4fb18: b0aa 001e cmpl %a2@(30),%d0
4fb1c: 55c1 scs %d1
4fb1e: 49c1 extbl %d1
4fb20: 4481 negl %d1
4fb22: 6002 bras 4fb26 <fat_buf_release+0x38>
4fb24: 4281 clrl %d1 <== NOT EXECUTED
4fb26: 7601 moveq #1,%d3
4fb28: c681 andl %d1,%d3
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
4fb2a: 182a 0002 moveb %a2@(2),%d4
4fb2e: 122a 000c moveb %a2@(12),%d1
uint32_t blk = fat_sector_num_to_block_num(fs_info, sec_num);
uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (sec_of_fat && !fs_info->vol.mirror)
4fb32: 4a03 tstb %d3
4fb34: 673c beqs 4fb72 <fat_buf_release+0x84>
4fb36: 4a2a 004e tstb %a2@(78)
4fb3a: 6636 bnes 4fb72 <fat_buf_release+0x84> <== NEVER TAKEN
4fb3c: 2400 movel %d0,%d2
memcpy(fs_info->sec_buf,
4fb3e: 4285 clrl %d5
4fb40: 0284 0000 00ff andil #255,%d4
4fb46: 0281 0000 00ff andil #255,%d1
fs_info->c.buf->buffer + blk_ofs,
4fb4c: 206a 0080 moveal %a2@(128),%a0
4fb50: 9284 subl %d4,%d1
4fb52: e2aa lsrl %d1,%d2
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4fb54: e3aa lsll %d1,%d2
uint32_t blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (sec_of_fat && !fs_info->vol.mirror)
memcpy(fs_info->sec_buf,
4fb56: 3a12 movew %a2@,%d5
fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info,
const uint32_t sector,
const uint32_t sector_offset)
{
return sector_offset +
((sector -
4fb58: 9082 subl %d2,%d0
fat_block_num_to_sector_num (fs_info,
fat_sector_num_to_block_num (fs_info, sector)))
<< fs_info->vol.sec_log2);
4fb5a: e9a8 lsll %d4,%d0
4fb5c: 2f05 movel %d5,%sp@-
4fb5e: d0a8 001a addl %a0@(26),%d0
4fb62: 2f00 movel %d0,%sp@-
4fb64: 2f2a 0084 movel %a2@(132),%sp@-
4fb68: 4eb9 0005 7168 jsr 57168 <memcpy>
4fb6e: 4fef 000c lea %sp@(12),%sp
fs_info->c.buf->buffer + blk_ofs,
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
4fb72: 2f2a 0080 movel %a2@(128),%sp@-
4fb76: 2a3c 0004 e1fa movel #319994,%d5
4fb7c: 2045 moveal %d5,%a0
4fb7e: 4e90 jsr %a0@
if (sc != RTEMS_SUCCESSFUL)
4fb80: 588f addql #4,%sp
4fb82: 4a80 tstl %d0
4fb84: 6704 beqs 4fb8a <fat_buf_release+0x9c> <== ALWAYS TAKEN
4fb86: 6000 00e2 braw 4fc6a <fat_buf_release+0x17c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
4fb8a: 4200 clrb %d0
4fb8c: 1540 007e moveb %d0,%a2@(126)
if (sec_of_fat && !fs_info->vol.mirror)
4fb90: 4a03 tstb %d3
4fb92: 6700 00e6 beqw 4fc7a <fat_buf_release+0x18c>
4fb96: 4a2a 004e tstb %a2@(78)
4fb9a: 6700 0094 beqw 4fc30 <fat_buf_release+0x142>
4fb9e: 6000 00da braw 4fc7a <fat_buf_release+0x18c> <== NOT EXECUTED
for (i = 1; i < fs_info->vol.fats; i++)
{
rtems_bdbuf_buffer *bd;
sec_num = fs_info->c.blk_num + fs_info->vol.fat_length * i,
4fba2: 41ea 001a lea %a2@(26),%a0
4fba6: 4c10 2800 mulsl %a0@,%d2
static inline uint32_t
fat_sector_num_to_block_num (const fat_fs_info_t *fs_info,
const uint32_t sector_number)
{
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4fbaa: 4286 clrl %d6
4fbac: 4280 clrl %d0
4fbae: 1c2a 0002 moveb %a2@(2),%d6
4fbb2: 102a 000c moveb %a2@(12),%d0
4fbb6: d4aa 007a addl %a2@(122),%d2
4fbba: 9086 subl %d6,%d0
4fbbc: 2202 movel %d2,%d1
4fbbe: e0a9 lsrl %d0,%d1
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4fbc0: 2e01 movel %d1,%d7
4fbc2: e1af lsll %d0,%d7
fat_sector_offset_to_block_offset (const fat_fs_info_t *fs_info,
const uint32_t sector,
const uint32_t sector_offset)
{
return sector_offset +
((sector -
4fbc4: 9487 subl %d7,%d2
fat_block_num_to_sector_num (fs_info,
fat_sector_num_to_block_num (fs_info, sector)))
<< fs_info->vol.sec_log2);
4fbc6: edaa lsll %d6,%d2
blk = fat_sector_num_to_block_num(fs_info, sec_num);
blk_ofs = fat_sector_offset_to_block_offset(fs_info,
sec_num,
0);
if (blk_ofs == 0
4fbc8: 661a bnes 4fbe4 <fat_buf_release+0xf6> <== ALWAYS TAKEN
&& fs_info->vol.bps == fs_info->vol.bytes_per_block)
4fbca: 4286 clrl %d6 <== NOT EXECUTED
4fbcc: 4280 clrl %d0 <== NOT EXECUTED
4fbce: 3c12 movew %a2@,%d6 <== NOT EXECUTED
4fbd0: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED
4fbd4: b086 cmpl %d6,%d0 <== NOT EXECUTED
4fbd6: 660c bnes 4fbe4 <fat_buf_release+0xf6> <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd);
4fbd8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4fbda: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4fbdc: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED
4fbe0: 4e94 jsr %a4@ <== NOT EXECUTED
4fbe2: 600a bras 4fbee <fat_buf_release+0x100> <== NOT EXECUTED
}
else
{
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd);
4fbe4: 2f04 movel %d4,%sp@-
4fbe6: 2f01 movel %d1,%sp@-
4fbe8: 2f2a 005a movel %a2@(90),%sp@-
4fbec: 4e93 jsr %a3@
4fbee: 4fef 000c lea %sp@(12),%sp
}
if ( sc != RTEMS_SUCCESSFUL)
4fbf2: 4a80 tstl %d0
4fbf4: 6702 beqs 4fbf8 <fat_buf_release+0x10a> <== ALWAYS TAKEN
4fbf6: 6026 bras 4fc1e <fat_buf_release+0x130> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps);
4fbf8: 4280 clrl %d0
4fbfa: 3012 movew %a2@,%d0
4fbfc: 206e fffc moveal %fp@(-4),%a0
4fc00: 2f00 movel %d0,%sp@-
4fc02: 2f2a 0084 movel %a2@(132),%sp@-
4fc06: d4a8 001a addl %a0@(26),%d2
4fc0a: 2f02 movel %d2,%sp@-
4fc0c: 4e95 jsr %a5@
sc = rtems_bdbuf_release_modified(bd);
4fc0e: 2f2e fffc movel %fp@(-4),%sp@-
4fc12: 2045 moveal %d5,%a0
4fc14: 4e90 jsr %a0@
if ( sc != RTEMS_SUCCESSFUL)
4fc16: 4fef 0010 lea %sp@(16),%sp
4fc1a: 4a80 tstl %d0
4fc1c: 670e beqs 4fc2c <fat_buf_release+0x13e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
4fc1e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4fc24: 720c moveq #12,%d1 <== NOT EXECUTED
4fc26: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fc28: 2081 movel %d1,%a0@ <== NOT EXECUTED
4fc2a: 604a bras 4fc76 <fat_buf_release+0x188> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
uint8_t i;
for (i = 1; i < fs_info->vol.fats; i++)
4fc2c: 5283 addql #1,%d3
4fc2e: 6018 bras 4fc48 <fat_buf_release+0x15a>
{
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd);
}
else
{
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd);
4fc30: 280e movel %fp,%d4
4fc32: 5984 subql #4,%d4
4fc34: 47f9 0004 dfcc lea 4dfcc <rtems_bdbuf_read>,%a3
0);
if (blk_ofs == 0
&& fs_info->vol.bps == fs_info->vol.bytes_per_block)
{
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd);
4fc3a: 49f9 0004 df0e lea 4df0e <rtems_bdbuf_get>,%a4
{
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd);
}
if ( sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(bd->buffer + blk_ofs, fs_info->sec_buf, fs_info->vol.bps);
4fc40: 4bf9 0005 7168 lea 57168 <memcpy>,%a5
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
4fc46: 7601 moveq #1,%d3
{
uint8_t i;
for (i = 1; i < fs_info->vol.fats; i++)
4fc48: 4280 clrl %d0
4fc4a: 102a 000d moveb %a2@(13),%d0
4fc4e: 4282 clrl %d2
4fc50: 1403 moveb %d3,%d2
4fc52: b082 cmpl %d2,%d0
4fc54: 6200 ff4c bhiw 4fba2 <fat_buf_release+0xb4>
4fc58: 6020 bras 4fc7a <fat_buf_release+0x18c>
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
4fc5a: 2f2a 0080 movel %a2@(128),%sp@-
4fc5e: 4eb9 0004 e158 jsr 4e158 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
4fc64: 588f addql #4,%sp
4fc66: 4a80 tstl %d0
4fc68: 6710 beqs 4fc7a <fat_buf_release+0x18c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
4fc6a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4fc70: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fc72: 7005 moveq #5,%d0 <== NOT EXECUTED
4fc74: 2080 movel %d0,%a0@ <== NOT EXECUTED
4fc76: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fc78: 6008 bras 4fc82 <fat_buf_release+0x194> <== NOT EXECUTED
}
fs_info->c.state = FAT_CACHE_EMPTY;
4fc7a: 4200 clrb %d0
4fc7c: 1540 007f moveb %d0,%a2@(127)
fat_buf_release(fat_fs_info_t *fs_info)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK;
4fc80: 4280 clrl %d0
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
}
fs_info->c.state = FAT_CACHE_EMPTY;
return RC_OK;
}
4fc82: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4fc88: 4e5e unlk %fp <== NOT EXECUTED
0004fa94 <fat_cluster_num_to_block_num>:
void *buff);
static inline uint32_t
fat_cluster_num_to_block_num (const fat_fs_info_t *fs_info,
uint32_t cln)
{
4fa94: 4e56 0000 linkw %fp,#0
4fa98: 206e 0008 moveal %fp@(8),%a0
4fa9c: 2f03 movel %d3,%sp@-
4fa9e: 202e 000c movel %fp@(12),%d0
4faa2: 2f02 movel %d2,%sp@-
4faa4: 4282 clrl %d2
4faa6: 1428 0002 moveb %a0@(2),%d2
uint32_t blk;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4faaa: 4a80 tstl %d0
4faac: 661c bnes 4faca <fat_cluster_num_to_block_num+0x36>
4faae: 7603 moveq #3,%d3
4fab0: 1228 000e moveb %a0@(14),%d1
4fab4: c283 andl %d3,%d1
4fab6: 4a01 tstb %d1
4fab8: 6710 beqs 4faca <fat_cluster_num_to_block_num+0x36><== NEVER TAKEN
static inline uint32_t
fat_sector_num_to_block_num (const fat_fs_info_t *fs_info,
const uint32_t sector_number)
{
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4faba: 4281 clrl %d1
4fabc: 1228 000c moveb %a0@(12),%d1
4fac0: 9282 subl %d2,%d1
4fac2: 2028 001e movel %a0@(30),%d0
4fac6: e2a8 lsrl %d1,%d0
4fac8: 601c bras 4fae6 <fat_cluster_num_to_block_num+0x52>
blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc);
else
{
cln -= FAT_RSRVD_CLN;
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4faca: 4283 clrl %d3
4facc: 4281 clrl %d1
4face: 1628 000c moveb %a0@(12),%d3
4fad2: 1228 0008 moveb %a0@(8),%d1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
blk = fat_sector_num_to_block_num(fs_info, fs_info->vol.rdir_loc);
else
{
cln -= FAT_RSRVD_CLN;
4fad6: 5580 subql #2,%d0
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4fad8: 9283 subl %d3,%d1
4fada: 9682 subl %d2,%d3
4fadc: e3a8 lsll %d1,%d0
4fade: 2228 0030 movel %a0@(48),%d1
4fae2: e6a9 lsrl %d3,%d1
blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec);
4fae4: d081 addl %d1,%d0
}
return blk;
}
4fae6: 241f movel %sp@+,%d2
4fae8: 261f movel %sp@+,%d3
4faea: 4e5e unlk %fp <== NOT EXECUTED
0004efa0 <fat_cluster_num_to_sector_num>:
static inline uint32_t
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
4efa0: 4e56 0000 linkw %fp,#0
4efa4: 206e 0008 moveal %fp@(8),%a0
4efa8: 202e 000c movel %fp@(12),%d0
4efac: 2f02 movel %d2,%sp@-
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4efae: 4a80 tstl %d0
4efb0: 6612 bnes 4efc4 <fat_cluster_num_to_sector_num+0x24><== NEVER TAKEN
4efb2: 7403 moveq #3,%d2
4efb4: 1228 000e moveb %a0@(14),%d1
4efb8: c282 andl %d2,%d1
4efba: 4a01 tstb %d1
4efbc: 6706 beqs 4efc4 <fat_cluster_num_to_sector_num+0x24><== NEVER TAKEN
return fs_info->vol.rdir_loc;
4efbe: 2028 001e movel %a0@(30),%d0
4efc2: 600e bras 4efd2 <fat_cluster_num_to_sector_num+0x32>
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
4efc4: 4281 clrl %d1 <== NOT EXECUTED
4efc6: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED
4efca: 5580 subql #2,%d0 <== NOT EXECUTED
4efcc: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4efce: d0a8 0030 addl %a0@(48),%d0 <== NOT EXECUTED
fs_info->vol.data_fsec);
}
4efd2: 241f movel %sp@+,%d2
4efd4: 4e5e unlk %fp <== NOT EXECUTED
0004fe54 <fat_cluster_set>:
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4fe54: 4280 clrl %d0 <== NOT EXECUTED
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
4fe56: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
4fe5a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
4fe5e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4fe62: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
4fe66: 2e2e 0010 movel %fp@(16),%d7 <== NOT EXECUTED
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4fe6a: 9087 subl %d7,%d0 <== NOT EXECUTED
4fe6c: 242e 0014 movel %fp@(20),%d2 <== NOT EXECUTED
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
4fe70: 162e 001b moveb %fp@(27),%d3 <== NOT EXECUTED
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4fe74: b082 cmpl %d2,%d0 <== NOT EXECUTED
4fe76: 6402 bccs 4fe7a <fat_cluster_set+0x26> <== NOT EXECUTED
4fe78: 2400 movel %d0,%d2 <== NOT EXECUTED
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
4fe7a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
4fe7e: 2a07 movel %d7,%d5 <== NOT EXECUTED
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ssize_t bytes_written = 0;
4fe80: 4286 clrl %d6 <== NOT EXECUTED
4fe82: 47ee fffc lea %fp@(-4),%a3 <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
if (RC_OK == rc)
{
memset(blk_buf + offset, pattern, bytes_to_write);
4fe86: 4bf9 0005 71d8 lea 571d8 <memset>,%a5 <== NOT EXECUTED
if (bytes_to_write == fs_info->vol.bytes_per_block)
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
4fe8c: 49f9 0004 fc8c lea 4fc8c <fat_buf_access>,%a4 <== NOT EXECUTED
const uint32_t count,
const uint8_t pattern)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
4fe92: 2f0a movel %a2,%sp@- <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
if (RC_OK == rc)
{
memset(blk_buf + offset, pattern, bytes_to_write);
4fe94: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED
const uint32_t count,
const uint8_t pattern)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
4fe9a: 4eba fbf8 jsr %pc@(4fa94 <fat_cluster_num_to_block_num>)<== NOT EXECUTED
4fe9e: 508f addql #8,%sp <== NOT EXECUTED
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
4fea0: 4281 clrl %d1 <== NOT EXECUTED
4fea2: 122a 000c moveb %a2@(12),%d1 <== NOT EXECUTED
4fea6: e2ad lsrl %d1,%d5 <== NOT EXECUTED
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4fea8: 2805 movel %d5,%d4 <== NOT EXECUTED
ssize_t bytes_written = 0;
ssize_t ret;
cur_blk += blocks_in_offset;
4feaa: da80 addl %d0,%d5 <== NOT EXECUTED
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4feac: e3ac lsll %d1,%d4 <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
if (RC_OK == rc)
{
memset(blk_buf + offset, pattern, bytes_to_write);
4feae: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4feb2: 9e84 subl %d4,%d7 <== NOT EXECUTED
4feb4: 6000 0082 braw 4ff38 <fat_cluster_set+0xe4> <== NOT EXECUTED
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
{
uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk));
4feb8: 4280 clrl %d0 <== NOT EXECUTED
4feba: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED
4febe: 2240 moveal %d0,%a1 <== NOT EXECUTED
4fec0: 9087 subl %d7,%d0 <== NOT EXECUTED
4fec2: 2600 movel %d0,%d3 <== NOT EXECUTED
4fec4: b480 cmpl %d0,%d2 <== NOT EXECUTED
4fec6: 6402 bccs 4feca <fat_cluster_set+0x76> <== NOT EXECUTED
4fec8: 2602 movel %d2,%d3 <== NOT EXECUTED
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
4feca: 2803 movel %d3,%d4 <== NOT EXECUTED
4fecc: b083 cmpl %d3,%d0 <== NOT EXECUTED
4fece: 6402 bccs 4fed2 <fat_cluster_set+0x7e> <== NOT EXECUTED
4fed0: 2800 movel %d0,%d4 <== NOT EXECUTED
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
4fed2: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED
4fed6: 102a 000c moveb %a2@(12),%d0 <== NOT EXECUTED
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
4feda: 4a84 tstl %d4 <== NOT EXECUTED
4fedc: 6768 beqs 4ff46 <fat_cluster_set+0xf2> <== NOT EXECUTED
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4fede: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
4fee4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
4feea: 9081 subl %d1,%d0 <== NOT EXECUTED
4feec: 2205 movel %d5,%d1 <== NOT EXECUTED
4feee: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4fef0: 2001 movel %d1,%d0 <== NOT EXECUTED
{
if (bytes_to_write == fs_info->vol.bytes_per_block)
4fef2: b3c4 cmpal %d4,%a1 <== NOT EXECUTED
4fef4: 6608 bnes 4fefe <fat_cluster_set+0xaa> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4fef6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fef8: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4fefc: 6006 bras 4ff04 <fat_cluster_set+0xb0> <== NOT EXECUTED
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
4fefe: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4ff00: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4ff04: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ff06: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ff08: 4e94 jsr %a4@ <== NOT EXECUTED
4ff0a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (RC_OK == rc)
4ff0e: 4a80 tstl %d0 <== NOT EXECUTED
4ff10: 661a bnes 4ff2c <fat_cluster_set+0xd8> <== NOT EXECUTED
{
memset(blk_buf + offset, pattern, bytes_to_write);
4ff12: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4ff14: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
4ff18: deae fffc addl %fp@(-4),%d7 <== NOT EXECUTED
4ff1c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4ff1e: 4e95 jsr %a5@ <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
4ff20: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ff24: 7001 moveq #1,%d0 <== NOT EXECUTED
4ff26: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED
4ff2a: 601a bras 4ff46 <fat_cluster_set+0xf2> <== NOT EXECUTED
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
4ff2c: b083 cmpl %d3,%d0 <== NOT EXECUTED
4ff2e: 6612 bnes 4ff42 <fat_cluster_set+0xee> <== NOT EXECUTED
rc = -1;
else
{
bytes_to_write -= ret;
4ff30: 9483 subl %d3,%d2 <== NOT EXECUTED
bytes_written += ret;
4ff32: dc83 addl %d3,%d6 <== NOT EXECUTED
++cur_blk;
4ff34: 5285 addql #1,%d5 <== NOT EXECUTED
4ff36: 4287 clrl %d7 <== NOT EXECUTED
ssize_t ret;
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
4ff38: 4a82 tstl %d2 <== NOT EXECUTED
4ff3a: 6600 ff7c bnew 4feb8 <fat_cluster_set+0x64> <== NOT EXECUTED
4ff3e: 2006 movel %d6,%d0 <== NOT EXECUTED
4ff40: 6008 bras 4ff4a <fat_cluster_set+0xf6> <== NOT EXECUTED
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
4ff42: 70ff moveq #-1,%d0 <== NOT EXECUTED
4ff44: 6004 bras 4ff4a <fat_cluster_set+0xf6> <== NOT EXECUTED
}
}
if (RC_OK != rc)
return rc;
else
return bytes_to_write;
4ff46: 2004 movel %d4,%d0 <== NOT EXECUTED
4ff48: 60e2 bras 4ff2c <fat_cluster_set+0xd8> <== NOT EXECUTED
}
if (RC_OK != rc)
return rc;
else
return bytes_written;
}
4ff4a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4ff50: 4e5e unlk %fp <== NOT EXECUTED
0004ff54 <fat_cluster_write>:
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4ff54: 4280 clrl %d0
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
4ff56: 4e56 ffd0 linkw %fp,#-48
4ff5a: 122e 001f moveb %fp@(31),%d1
4ff5e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4ff62: 246e 0008 moveal %fp@(8),%a2
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4ff66: 302a 0006 movew %a2@(6),%d0
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
4ff6a: 2e2e 0010 movel %fp@(16),%d7
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4ff6e: 9087 subl %d7,%d0
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
4ff70: 1d41 fffb moveb %d1,%fp@(-5)
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4ff74: 242e 0014 movel %fp@(20),%d2
4ff78: b082 cmpl %d2,%d0
4ff7a: 6402 bccs 4ff7e <fat_cluster_write+0x2a> <== ALWAYS TAKEN
4ff7c: 2400 movel %d0,%d2 <== NOT EXECUTED
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
4ff7e: 2f2e 000c movel %fp@(12),%sp@-
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
4ff82: 2c07 movel %d7,%d6
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ssize_t bytes_written = 0;
4ff84: 4285 clrl %d5
4ff86: 47ee fffc lea %fp@(-4),%a3
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
if (RC_OK == rc)
{
memcpy(blk_buf + offset, buf, bytes_to_write);
4ff8a: 4bf9 0005 7168 lea 57168 <memcpy>,%a5
if (0 < bytes_to_write)
{
if ( overwrite_block
|| (bytes_to_write == fs_info->vol.bytes_per_block))
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4ff90: 49f9 0004 fc8c lea 4fc8c <fat_buf_access>,%a4
const void *buff,
const bool overwrite_cluster)
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
4ff96: 2f0a movel %a2,%sp@-
4ff98: 4eba fafa jsr %pc@(4fa94 <fat_cluster_num_to_block_num>)
4ff9c: 508f addql #8,%sp
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
4ff9e: 4281 clrl %d1
4ffa0: 122a 000c moveb %a2@(12),%d1
4ffa4: e2ae lsrl %d1,%d6
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4ffa6: 2606 movel %d6,%d3
ssize_t bytes_written = 0;
uint8_t *buffer = (uint8_t*)buff;
ssize_t ret;
uint32_t c;
cur_blk += blocks_in_offset;
4ffa8: dc80 addl %d0,%d6
{
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4ffaa: e3ab lsll %d1,%d3
4ffac: 9e83 subl %d3,%d7
4ffae: 6000 008c braw 5003c <fat_cluster_write+0xe8>
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
{
c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk));
4ffb2: 4280 clrl %d0
4ffb4: 302a 000a movew %a2@(10),%d0
4ffb8: 2240 moveal %d0,%a1
4ffba: 9087 subl %d7,%d0
4ffbc: 2600 movel %d0,%d3
4ffbe: b480 cmpl %d0,%d2
4ffc0: 6402 bccs 4ffc4 <fat_cluster_write+0x70>
4ffc2: 2602 movel %d2,%d3
const uint32_t count,
const void *buf,
const bool overwrite_block)
{
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
4ffc4: 2803 movel %d3,%d4
4ffc6: b083 cmpl %d3,%d0
4ffc8: 6402 bccs 4ffcc <fat_cluster_write+0x78> <== ALWAYS TAKEN
4ffca: 2800 movel %d0,%d4 <== NOT EXECUTED
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
4ffcc: 122a 0002 moveb %a2@(2),%d1
4ffd0: 102a 000c moveb %a2@(12),%d0
int rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
uint8_t *blk_buf;
uint32_t sec_num = fat_block_num_to_sector_num(fs_info, start_blk);
if (0 < bytes_to_write)
4ffd4: 4a84 tstl %d4
4ffd6: 6772 beqs 5004a <fat_cluster_write+0xf6> <== NEVER TAKEN
static inline uint32_t
fat_block_num_to_sector_num (const fat_fs_info_t *fs_info,
const uint32_t block_number)
{
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4ffd8: 0281 0000 00ff andil #255,%d1
4ffde: 0280 0000 00ff andil #255,%d0
4ffe4: 9081 subl %d1,%d0
4ffe6: 2206 movel %d6,%d1
4ffe8: e1a9 lsll %d0,%d1
4ffea: 2001 movel %d1,%d0
{
if ( overwrite_block
4ffec: 4a2e fffb tstb %fp@(-5)
4fff0: 6604 bnes 4fff6 <fat_cluster_write+0xa2>
|| (bytes_to_write == fs_info->vol.bytes_per_block))
4fff2: b3c4 cmpal %d4,%a1
4fff4: 6608 bnes 4fffe <fat_cluster_write+0xaa>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4fff6: 2f0b movel %a3,%sp@-
4fff8: 4878 0002 pea 2 <DOUBLE_FLOAT>
4fffc: 6006 bras 50004 <fat_cluster_write+0xb0>
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
4fffe: 2f0b movel %a3,%sp@-
50000: 4878 0001 pea 1 <ADD>
50004: 2f00 movel %d0,%sp@-
50006: 2f0a movel %a2,%sp@-
50008: 4e94 jsr %a4@
5000a: 4fef 0010 lea %sp@(16),%sp
if (RC_OK == rc)
5000e: 4a80 tstl %d0
50010: 661e bnes 50030 <fat_cluster_write+0xdc> <== NEVER TAKEN
{
memcpy(blk_buf + offset, buf, bytes_to_write);
50012: 206e 0018 moveal %fp@(24),%a0
50016: deae fffc addl %fp@(-4),%d7
5001a: 2f04 movel %d4,%sp@-
5001c: 4870 5800 pea %a0@(00000000,%d5:l)
50020: 2f07 movel %d7,%sp@-
50022: 4e95 jsr %a5@
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
50024: 4fef 000c lea %sp@(12),%sp
50028: 7001 moveq #1,%d0
5002a: 1540 007e moveb %d0,%a2@(126)
5002e: 601a bras 5004a <fat_cluster_write+0xf6>
cur_blk,
ofs_blk,
c,
&buffer[bytes_written],
overwrite_cluster);
if (c != ret)
50030: b083 cmpl %d3,%d0
50032: 6612 bnes 50046 <fat_cluster_write+0xf2> <== NEVER TAKEN
rc = -1;
else
{
bytes_to_write -= ret;
50034: 9483 subl %d3,%d2
bytes_written += ret;
50036: da83 addl %d3,%d5
++cur_blk;
50038: 5286 addql #1,%d6
5003a: 4287 clrl %d7
uint32_t c;
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
5003c: 4a82 tstl %d2
5003e: 6600 ff72 bnew 4ffb2 <fat_cluster_write+0x5e>
50042: 2005 movel %d5,%d0
50044: 6008 bras 5004e <fat_cluster_write+0xfa>
cur_blk,
ofs_blk,
c,
&buffer[bytes_written],
overwrite_cluster);
if (c != ret)
50046: 70ff moveq #-1,%d0 <== NOT EXECUTED
50048: 6004 bras 5004e <fat_cluster_write+0xfa> <== NOT EXECUTED
}
}
if (RC_OK != rc)
return rc;
else
return bytes_to_write;
5004a: 2004 movel %d4,%d0
5004c: 60e2 bras 50030 <fat_cluster_write+0xdc>
}
if (RC_OK != rc)
return rc;
else
return bytes_written;
}
5004e: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
50054: 4e5e unlk %fp <== NOT EXECUTED
0004f462 <fat_file_close>:
/*
* 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)
4f462: 7201 moveq #1,%d1
int
fat_file_close(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4f464: 4e56 0000 linkw %fp,#0
4f468: 2f0a movel %a2,%sp@-
4f46a: 246e 000c moveal %fp@(12),%a2
4f46e: 2f02 movel %d2,%sp@-
4f470: 242e 0008 movel %fp@(8),%d2
/*
* if links_num field of fat-file descriptor is greater than 1
* decrement the count of links and return
*/
if (fat_fd->links_num > 1)
4f474: 202a 0008 movel %a2@(8),%d0
4f478: b280 cmpl %d0,%d1
4f47a: 640c bccs 4f488 <fat_file_close+0x26>
{
fat_fd->links_num--;
4f47c: 5380 subql #1,%d0
4f47e: 2540 0008 movel %d0,%a2@(8)
return rc;
4f482: 4280 clrl %d0
4f484: 6000 0094 braw 4f51a <fat_file_close+0xb8>
}
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
4f488: 102a 0030 moveb %a2@(48),%d0
4f48c: 0800 0000 btst #0,%d0
4f490: 674a beqs 4f4dc <fat_file_close+0x7a> <== ALWAYS TAKEN
{
rc = fat_file_truncate(fs_info, fat_fd, 0);
4f492: 42a7 clrl %sp@- <== NOT EXECUTED
4f494: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f496: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f498: 4eb9 0004 f376 jsr 4f376 <fat_file_truncate> <== NOT EXECUTED
if ( rc != RC_OK )
4f49e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f4a2: 4a80 tstl %d0 <== NOT EXECUTED
4f4a4: 6674 bnes 4f51a <fat_file_close+0xb8> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4f4a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f4a8: 4eb9 0005 2380 jsr 52380 <_Chain_Extract> <== NOT EXECUTED
return rc;
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
if ( fat_ino_is_unique(fs_info, fat_fd->ino) )
4f4ae: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4f4b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f4b4: 4eb9 0005 0abc jsr 50abc <fat_ino_is_unique> <== NOT EXECUTED
4f4ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f4be: 4a00 tstb %d0 <== NOT EXECUTED
4f4c0: 670e beqs 4f4d0 <fat_file_close+0x6e> <== NOT EXECUTED
fat_free_unique_ino(fs_info, fat_fd->ino);
4f4c2: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4f4c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f4c8: 4eb9 0005 0a8e jsr 50a8e <fat_free_unique_ino> <== NOT EXECUTED
4f4ce: 508f addql #8,%sp <== NOT EXECUTED
free(fat_fd);
4f4d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f4d2: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4f4d8: 588f addql #4,%sp <== NOT EXECUTED
4f4da: 602a bras 4f506 <fat_file_close+0xa4> <== NOT EXECUTED
}
else
{
if (fat_ino_is_unique(fs_info, fat_fd->ino))
4f4dc: 2f2a 000c movel %a2@(12),%sp@-
4f4e0: 2f02 movel %d2,%sp@-
4f4e2: 4eb9 0005 0abc jsr 50abc <fat_ino_is_unique>
4f4e8: 508f addql #8,%sp
4f4ea: 4a00 tstb %d0
4f4ec: 6706 beqs 4f4f4 <fat_file_close+0x92> <== ALWAYS TAKEN
{
fat_fd->links_num = 0;
4f4ee: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
4f4f2: 6012 bras 4f506 <fat_file_close+0xa4> <== NOT EXECUTED
4f4f4: 2f0a movel %a2,%sp@-
4f4f6: 4eb9 0005 2380 jsr 52380 <_Chain_Extract>
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
4f4fc: 2f0a movel %a2,%sp@-
4f4fe: 4eb9 0004 3f4c jsr 43f4c <free>
4f504: 508f addql #8,%sp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
4f506: 2d42 0008 movel %d2,%fp@(8)
return rc;
}
4f50a: 242e fff8 movel %fp@(-8),%d2
4f50e: 246e fffc moveal %fp@(-4),%a2
4f512: 4e5e unlk %fp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
4f514: 4ef9 0004 faee jmp 4faee <fat_buf_release>
return rc;
}
4f51a: 242e fff8 movel %fp@(-8),%d2
4f51e: 246e fffc moveal %fp@(-4),%a2
4f522: 4e5e unlk %fp <== NOT EXECUTED
0004f5bc <fat_file_extend>:
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
4f5bc: 4e56 ffcc linkw %fp,#-52
4f5c0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4f5c4: 262e 0014 movel %fp@(20),%d3
4f5c8: 286e 0018 moveal %fp@(24),%a4
4f5cc: 266e 000c moveal %fp@(12),%a3
uint32_t last_cl = 0;
uint32_t bytes_remain = 0;
uint32_t cls_added;
ssize_t bytes_written;
*a_length = new_length;
4f5d0: 2883 movel %d3,%a4@
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
4f5d2: 246e 0008 moveal %fp@(8),%a2
uint32_t cls_added;
ssize_t bytes_written;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
4f5d6: 202b 0018 movel %a3@(24),%d0
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
4f5da: 1e2e 0013 moveb %fp@(19),%d7
int rc = RC_OK;
uint32_t chain = 0;
4f5de: 42ae fff0 clrl %fp@(-16)
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
4f5e2: 42ae fff8 clrl %fp@(-8)
uint32_t cls_added;
ssize_t bytes_written;
*a_length = new_length;
if (new_length <= fat_fd->fat_file_size)
4f5e6: b083 cmpl %d3,%d0
4f5e8: 6506 bcss 4f5f0 <fat_file_extend+0x34>
return RC_OK;
4f5ea: 4282 clrl %d2
4f5ec: 6000 01a2 braw 4f790 <fat_file_extend+0x1d4>
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f5f0: 7201 moveq #1,%d1
4f5f2: b2ab 0020 cmpl %a3@(32),%d1
4f5f6: 6616 bnes 4f60e <fat_file_extend+0x52> <== ALWAYS TAKEN
4f5f8: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED
4f5fc: 6610 bnes 4f60e <fat_file_extend+0x52> <== NOT EXECUTED
4f5fe: 7403 moveq #3,%d2 <== NOT EXECUTED
4f600: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED
4f604: c282 andl %d2,%d1 <== NOT EXECUTED
4f606: 4a01 tstb %d1 <== NOT EXECUTED
4f608: 6704 beqs 4f60e <fat_file_extend+0x52> <== NOT EXECUTED
4f60a: 6000 00ac braw 4f6b8 <fat_file_extend+0xfc> <== 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))) &
4f60e: 4284 clrl %d4
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
4f610: 2a03 movel %d3,%d5
4f612: 9a80 subl %d0,%d5
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
4f614: 382a 0006 movew %a2@(6),%d4
4f618: 2204 movel %d4,%d1
4f61a: 5381 subql #1,%d1
4f61c: 2c01 movel %d1,%d6
4f61e: cc80 andl %d0,%d6
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 -
4f620: 9886 subl %d6,%d4
4f622: c881 andl %d1,%d4
(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)
4f624: b885 cmpl %d5,%d4
4f626: 6404 bccs 4f62c <fat_file_extend+0x70> <== NEVER TAKEN
bytes2add -= bytes_remain;
4f628: 9a84 subl %d4,%d5
4f62a: 6002 bras 4f62e <fat_file_extend+0x72>
else
bytes2add = 0;
4f62c: 4285 clrl %d5 <== NOT EXECUTED
if (zero_fill && bytes_remain > 0) {
4f62e: 4a07 tstb %d7
4f630: 6740 beqs 4f672 <fat_file_extend+0xb6> <== ALWAYS TAKEN
4f632: 4a84 tstl %d4 <== NOT EXECUTED
4f634: 673c beqs 4f672 <fat_file_extend+0xb6> <== NOT EXECUTED
uint32_t start = fat_fd->fat_file_size;
uint32_t cl_start = start >> fs_info->vol.bpc_log2;
uint32_t ofs = start & (fs_info->vol.bpc - 1);
uint32_t cur_cln;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f636: 486e fffc pea %fp@(-4) <== NOT EXECUTED
else
bytes2add = 0;
if (zero_fill && bytes_remain > 0) {
uint32_t start = fat_fd->fat_file_size;
uint32_t cl_start = start >> fs_info->vol.bpc_log2;
4f63a: 4281 clrl %d1 <== NOT EXECUTED
4f63c: 122a 0008 moveb %a2@(8),%d1 <== NOT EXECUTED
4f640: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
uint32_t ofs = start & (fs_info->vol.bpc - 1);
uint32_t cur_cln;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f642: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f644: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f646: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f648: 4eba f9dc jsr %pc@(4f026 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f64c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
uint32_t start = fat_fd->fat_file_size;
uint32_t cl_start = start >> fs_info->vol.bpc_log2;
uint32_t ofs = start & (fs_info->vol.bpc - 1);
uint32_t cur_cln;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f650: 2401 movel %d1,%d2 <== NOT EXECUTED
if (rc != RC_OK)
4f652: 6600 013c bnew 4f790 <fat_file_extend+0x1d4> <== NOT EXECUTED
return rc;
bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0);
4f656: 42a7 clrl %sp@- <== NOT EXECUTED
4f658: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f65a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f65c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4f660: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f662: 4eb9 0004 fe54 jsr 4fe54 <fat_cluster_set> <== NOT EXECUTED
if (bytes_remain != bytes_written)
4f668: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4f66c: b084 cmpl %d4,%d0 <== NOT EXECUTED
4f66e: 6702 beqs 4f672 <fat_file_extend+0xb6> <== NOT EXECUTED
4f670: 6052 bras 4f6c4 <fat_file_extend+0x108> <== NOT EXECUTED
/*
* if in last cluster allocated for the file there is enough room to
* handle extention (hence we don't need to add even one cluster to the
* file ) - return
*/
if (bytes2add == 0)
4f672: 4a85 tstl %d5
4f674: 6700 ff74 beqw 4f5ea <fat_file_extend+0x2e>
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
4f678: 4280 clrl %d0
4f67a: 102a 0008 moveb %a2@(8),%d0
4f67e: 2c05 movel %d5,%d6
4f680: 5386 subql #1,%d6
4f682: e0ae lsrl %d0,%d6
4f684: 5286 addql #1,%d6
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
4f686: 0287 0000 00ff andil #255,%d7
4f68c: 2f07 movel %d7,%sp@-
4f68e: 486e fff8 pea %fp@(-8)
4f692: 486e fffc pea %fp@(-4)
4f696: 2f06 movel %d6,%sp@-
4f698: 486e fff0 pea %fp@(-16)
4f69c: 2f0a movel %a2,%sp@-
4f69e: 4eb9 0005 53d8 jsr 553d8 <fat_scan_fat_for_free_clusters>
&cls_added, &last_cl, zero_fill);
/* this means that low level I/O error occured */
if (rc != RC_OK)
4f6a4: 4fef 0018 lea %sp@(24),%sp
if (bytes2add == 0)
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
4f6a8: 2400 movel %d0,%d2
&cls_added, &last_cl, zero_fill);
/* this means that low level I/O error occured */
if (rc != RC_OK)
4f6aa: 6600 00e4 bnew 4f790 <fat_file_extend+0x1d4>
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
4f6ae: 202e fffc movel %fp@(-4),%d0
4f6b2: 6616 bnes 4f6ca <fat_file_extend+0x10e> <== ALWAYS TAKEN
4f6b4: 4a84 tstl %d4 <== NOT EXECUTED
4f6b6: 6612 bnes 4f6ca <fat_file_extend+0x10e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
4f6b8: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4f6be: 721c moveq #28,%d1 <== NOT EXECUTED
4f6c0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f6c2: 2081 movel %d1,%a0@ <== NOT EXECUTED
4f6c4: 74ff moveq #-1,%d2 <== NOT EXECUTED
4f6c6: 6000 00c8 braw 4f790 <fat_file_extend+0x1d4> <== NOT EXECUTED
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
4f6ca: b086 cmpl %d6,%d0
4f6cc: 6718 beqs 4f6e6 <fat_file_extend+0x12a> <== ALWAYS TAKEN
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
4f6ce: 4281 clrl %d1 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
4f6d0: 9c80 subl %d0,%d6 <== NOT EXECUTED
4f6d2: 4280 clrl %d0 <== NOT EXECUTED
4f6d4: 102a 0008 moveb %a2@(8),%d0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
4f6d8: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
4f6dc: e1ae lsll %d0,%d6 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
4f6de: 5381 subql #1,%d1 <== NOT EXECUTED
4f6e0: ca81 andl %d1,%d5 <== NOT EXECUTED
4f6e2: 9685 subl %d5,%d3 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
4f6e4: 9686 subl %d6,%d3 <== NOT EXECUTED
}
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
4f6e6: 206b 0018 moveal %a3@(24),%a0
4f6ea: 4a88 tstl %a0
4f6ec: 6612 bnes 4f700 <fat_file_extend+0x144>
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
4f6ee: 202e fff0 movel %fp@(-16),%d0
fat_fd->map.file_cln = 0;
4f6f2: 42ab 0032 clrl %a3@(50)
}
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
4f6f6: 2740 001c movel %d0,%a3@(28)
4f6fa: 2740 0036 movel %d0,%a3@(54)
4f6fe: 6054 bras 4f754 <fat_file_extend+0x198>
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
4f700: 202b 003a movel %a3@(58),%d0
4f704: 72ff moveq #-1,%d1
4f706: b280 cmpl %d0,%d1
4f708: 6706 beqs 4f710 <fat_file_extend+0x154> <== NEVER TAKEN
{
old_last_cl = fat_fd->map.last_cln;
4f70a: 2d40 fff4 movel %d0,%fp@(-12)
4f70e: 6020 bras 4f730 <fat_file_extend+0x174>
}
else
{
rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM,
4f710: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
4f714: 4868 ffff pea %a0@(-1) <== NOT EXECUTED
4f718: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f71c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f71e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f720: 4eb9 0004 f526 jsr 4f526 <fat_file_ioctl> <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
4f726: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM,
4f72a: 2800 movel %d0,%d4 <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
4f72c: 6702 beqs 4f730 <fat_file_extend+0x174> <== NOT EXECUTED
4f72e: 6048 bras 4f778 <fat_file_extend+0x1bc> <== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
}
rc = fat_set_fat_cluster(fs_info, old_last_cl, chain);
4f730: 2f2e fff0 movel %fp@(-16),%sp@-
4f734: 2f2e fff4 movel %fp@(-12),%sp@-
4f738: 2f0a movel %a2,%sp@-
4f73a: 4eb9 0005 5100 jsr 55100 <fat_set_fat_cluster>
if ( rc != RC_OK )
4f740: 4fef 000c lea %sp@(12),%sp
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
}
rc = fat_set_fat_cluster(fs_info, old_last_cl, chain);
4f744: 2800 movel %d0,%d4
if ( rc != RC_OK )
4f746: 6702 beqs 4f74a <fat_file_extend+0x18e> <== ALWAYS TAKEN
4f748: 602e bras 4f778 <fat_file_extend+0x1bc> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
fat_buf_release(fs_info);
4f74a: 2f0a movel %a2,%sp@-
4f74c: 4eb9 0004 faee jsr 4faee <fat_buf_release>
4f752: 588f addql #4,%sp
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
4f754: 4aae fffc tstl %fp@(-4)
4f758: 6730 beqs 4f78a <fat_file_extend+0x1ce> <== NEVER TAKEN
{
fat_fd->map.last_cln = last_cl;
4f75a: 276e fff8 003a movel %fp@(-8),%a3@(58)
if (fat_fd->fat_file_type == FAT_DIRECTORY)
4f760: 4aab 0010 tstl %a3@(16)
4f764: 6624 bnes 4f78a <fat_file_extend+0x1ce> <== ALWAYS TAKEN
{
rc = fat_init_clusters_chain(fs_info, chain);
4f766: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
4f76a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f76c: 4eb9 0005 0984 jsr 50984 <fat_init_clusters_chain> <== NOT EXECUTED
if ( rc != RC_OK )
4f772: 508f addql #8,%sp <== NOT EXECUTED
if (cls_added != 0)
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
{
rc = fat_init_clusters_chain(fs_info, chain);
4f774: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
4f776: 6712 beqs 4f78a <fat_file_extend+0x1ce> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(fs_info, chain);
4f778: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
4f77c: 2404 movel %d4,%d2 <== NOT EXECUTED
4f77e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f780: 4eb9 0005 5334 jsr 55334 <fat_free_fat_clusters_chain> <== NOT EXECUTED
4f786: 508f addql #8,%sp <== NOT EXECUTED
4f788: 6006 bras 4f790 <fat_file_extend+0x1d4> <== NOT EXECUTED
return rc;
}
}
}
*a_length = new_length;
4f78a: 2883 movel %d3,%a4@
fat_fd->fat_file_size = new_length;
4f78c: 2743 0018 movel %d3,%a3@(24)
return RC_OK;
}
4f790: 2002 movel %d2,%d0
4f792: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4
4f798: 4e5e unlk %fp <== NOT EXECUTED
0004f526 <fat_file_ioctl>:
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
4f526: 7001 moveq #1,%d0
fat_file_ioctl(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
4f528: 4e56 fffc linkw %fp,#-4
4f52c: 226e 0008 moveal %fp@(8),%a1
4f530: 2f0a movel %a2,%sp@-
4f532: 206e 000c moveal %fp@(12),%a0
4f536: 2f02 movel %d2,%sp@-
int rc = RC_OK;
uint32_t cur_cln = 0;
4f538: 42ae fffc clrl %fp@(-4)
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
4f53c: b0ae 0010 cmpl %fp@(16),%d0
4f540: 6660 bnes 4f5a2 <fat_file_ioctl+0x7c> <== NEVER TAKEN
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
4f542: 202e 0014 movel %fp@(20),%d0
ret = va_arg(ap, uint32_t *);
4f546: 246e 0018 moveal %fp@(24),%a2
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
4f54a: b0a8 0018 cmpl %a0@(24),%d0
4f54e: 650e bcss 4f55e <fat_file_ioctl+0x38> <== ALWAYS TAKEN
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
4f550: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4f556: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f558: 7005 moveq #5,%d0 <== NOT EXECUTED
4f55a: 2080 movel %d0,%a0@ <== NOT EXECUTED
4f55c: 6050 bras 4f5ae <fat_file_ioctl+0x88> <== NOT EXECUTED
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f55e: 7201 moveq #1,%d1
4f560: b2a8 0020 cmpl %a0@(32),%d1
4f564: 6618 bnes 4f57e <fat_file_ioctl+0x58> <== NEVER TAKEN
4f566: 4aa8 0024 tstl %a0@(36)
4f56a: 6612 bnes 4f57e <fat_file_ioctl+0x58> <== NEVER TAKEN
4f56c: 7403 moveq #3,%d2
4f56e: 1229 000e moveb %a1@(14),%d1
4f572: c282 andl %d2,%d1
4f574: 4a01 tstb %d1
4f576: 6706 beqs 4f57e <fat_file_ioctl+0x58> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
4f578: 4292 clrl %a2@
rc = RC_OK;
4f57a: 4280 clrl %d0
break;
4f57c: 6032 bras 4f5b0 <fat_file_ioctl+0x8a>
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f57e: 486e fffc pea %fp@(-4) <== NOT EXECUTED
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
4f582: 4281 clrl %d1 <== NOT EXECUTED
4f584: 1229 0008 moveb %a1@(8),%d1 <== NOT EXECUTED
4f588: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f58a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f58c: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4f58e: 2f09 movel %a1,%sp@- <== NOT EXECUTED
4f590: 4eba fa94 jsr %pc@(4f026 <fat_file_lseek>) <== NOT EXECUTED
if ( rc != RC_OK )
4f594: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f598: 2001 movel %d1,%d0 <== NOT EXECUTED
if ( rc != RC_OK )
4f59a: 6614 bnes 4f5b0 <fat_file_ioctl+0x8a> <== NOT EXECUTED
break;
*ret = cur_cln;
4f59c: 24ae fffc movel %fp@(-4),%a2@ <== NOT EXECUTED
break;
4f5a0: 600e bras 4f5b0 <fat_file_ioctl+0x8a> <== NOT EXECUTED
default:
errno = EINVAL;
4f5a2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4f5a8: 7416 moveq #22,%d2 <== NOT EXECUTED
4f5aa: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f5ac: 2082 movel %d2,%a0@ <== NOT EXECUTED
rc = -1;
4f5ae: 70ff moveq #-1,%d0 <== NOT EXECUTED
break;
}
va_end(ap);
return rc;
}
4f5b0: 242e fff4 movel %fp@(-12),%d2
4f5b4: 246e fff8 moveal %fp@(-8),%a2
4f5b8: 4e5e unlk %fp <== NOT EXECUTED
0004f026 <fat_file_lseek>:
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
4f026: 4e56 ffe0 linkw %fp,#-32
4f02a: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4f02e: 246e 000c moveal %fp@(12),%a2
4f032: 262e 0010 movel %fp@(16),%d3
4f036: 266e 0014 moveal %fp@(20),%a3
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
4f03a: 202a 0032 movel %a2@(50),%d0
4f03e: b083 cmpl %d3,%d0
4f040: 6606 bnes 4f048 <fat_file_lseek+0x22>
*disk_cln = fat_fd->map.disk_cln;
4f042: 26aa 0036 movel %a2@(54),%a3@
4f046: 6056 bras 4f09e <fat_file_lseek+0x78>
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
4f048: b083 cmpl %d3,%d0
4f04a: 640c bccs 4f058 <fat_file_lseek+0x32> <== NEVER TAKEN
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
4f04c: 2a03 movel %d3,%d5
4f04e: 9a80 subl %d0,%d5
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
4f050: 2d6a 0036 fffc movel %a2@(54),%fp@(-4)
4f056: 6008 bras 4f060 <fat_file_lseek+0x3a>
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
4f058: 2a03 movel %d3,%d5 <== NOT EXECUTED
4f05a: 2d6a 001c fffc movel %a2@(28),%fp@(-4) <== NOT EXECUTED
}
/* skip over the clusters */
for (i = 0; i < count; i++)
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f060: 240e movel %fp,%d2
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
4f062: 4284 clrl %d4
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f064: 5982 subql #4,%d2
4f066: 49f9 0005 4f94 lea 54f94 <fat_get_fat_cluster>,%a4
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
4f06c: 601e bras 4f08c <fat_file_lseek+0x66>
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f06e: 2f02 movel %d2,%sp@-
4f070: 2f2e fffc movel %fp@(-4),%sp@-
4f074: 2f2e 0008 movel %fp@(8),%sp@-
4f078: 4e94 jsr %a4@
if ( rc != RC_OK )
4f07a: 4fef 000c lea %sp@(12),%sp
4f07e: 4a80 tstl %d0
4f080: 6708 beqs 4f08a <fat_file_lseek+0x64> <== ALWAYS TAKEN
return rc;
4f082: 2600 movel %d0,%d3 <== NOT EXECUTED
4f084: 5bc2 smi %d2 <== NOT EXECUTED
4f086: 49c2 extbl %d2 <== NOT EXECUTED
4f088: 6018 bras 4f0a2 <fat_file_lseek+0x7c> <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
4f08a: 5284 addql #1,%d4
4f08c: ba84 cmpl %d4,%d5
4f08e: 66de bnes 4f06e <fat_file_lseek+0x48>
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
4f090: 202e fffc movel %fp@(-4),%d0
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
4f094: 2543 0032 movel %d3,%a2@(50)
fat_fd->map.disk_cln = cur_cln;
4f098: 2540 0036 movel %d0,%a2@(54)
*disk_cln = cur_cln;
4f09c: 2680 movel %d0,%a3@
}
return RC_OK;
4f09e: 4282 clrl %d2
4f0a0: 4283 clrl %d3
}
4f0a2: 2002 movel %d2,%d0
4f0a4: 2203 movel %d3,%d1
4f0a6: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4
4f0ac: 4e5e unlk %fp <== NOT EXECUTED
0004f97c <fat_file_mark_removed>:
void
fat_file_mark_removed(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4f97c: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
4f980: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
4f984: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
uint32_t key = 0;
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
4f988: 486a 0020 pea %a2@(32) <== NOT EXECUTED
void
fat_file_mark_removed(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4f98c: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
uint32_t key = 0;
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
4f990: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f992: 4eba f644 jsr %pc@(4efd8 <fat_construct_key>) <== NOT EXECUTED
4f996: 508f addql #8,%sp <== NOT EXECUTED
4f998: 2400 movel %d0,%d2 <== NOT EXECUTED
4f99a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f99c: 4eb9 0005 2380 jsr 52380 <_Chain_Extract> <== NOT EXECUTED
*/
static inline void
_hash_insert(rtems_chain_control *hash, uint32_t key1, uint32_t key2,
fat_file_fd_t *el)
{
rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
4f9a2: 7001 moveq #1,%d0 <== NOT EXECUTED
4f9a4: c082 andl %d2,%d0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4f9a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f9a8: 2200 movel %d0,%d1 <== NOT EXECUTED
4f9aa: e988 lsll #4,%d0 <== NOT EXECUTED
4f9ac: e589 lsll #2,%d1 <== NOT EXECUTED
4f9ae: 9081 subl %d1,%d0 <== NOT EXECUTED
4f9b0: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED
4f9b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f9b6: 4eb9 0004 8700 jsr 48700 <_Chain_Append> <== NOT EXECUTED
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
_hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd);
fat_fd->flags |= FAT_FILE_REMOVED;
4f9bc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f9c0: 7201 moveq #1,%d1 <== NOT EXECUTED
4f9c2: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED
4f9c6: 8081 orl %d1,%d0 <== NOT EXECUTED
4f9c8: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED
}
4f9cc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
4f9d2: 4e5e unlk %fp <== NOT EXECUTED
0004f0b0 <fat_file_open>:
fat_file_open(
fat_fs_info_t *fs_info,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
4f0b0: 4e56 ffe0 linkw %fp,#-32
4f0b4: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4f0b8: 2a2e 000c movel %fp@(12),%d5
int rc = RC_OK;
fat_file_fd_t *lfat_fd = NULL;
uint32_t key = 0;
/* construct key */
key = fat_construct_key(fs_info, &dir_pos->sname);
4f0bc: 283c 0004 efd8 movel #323544,%d4
4f0c2: 2044 moveal %d4,%a0
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
4f0c4: 7601 moveq #1,%d3
int rc = RC_OK;
fat_file_fd_t *lfat_fd = NULL;
uint32_t key = 0;
/* construct key */
key = fat_construct_key(fs_info, &dir_pos->sname);
4f0c6: 2f05 movel %d5,%sp@-
fat_file_open(
fat_fs_info_t *fs_info,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
4f0c8: 266e 0008 moveal %fp@(8),%a3
int rc = RC_OK;
fat_file_fd_t *lfat_fd = NULL;
uint32_t key = 0;
/* construct key */
key = fat_construct_key(fs_info, &dir_pos->sname);
4f0cc: 2f0b movel %a3,%sp@-
fat_file_open(
fat_fs_info_t *fs_info,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
4f0ce: 286e 0010 moveal %fp@(16),%a4
int rc = RC_OK;
fat_file_fd_t *lfat_fd = NULL;
uint32_t key = 0;
/* construct key */
key = fat_construct_key(fs_info, &dir_pos->sname);
4f0d2: 4e90 jsr %a0@
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4f0d4: 2a6b 0062 moveal %a3@(98),%a5
4f0d8: 2400 movel %d0,%d2
4f0da: 508f addql #8,%sp
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
4f0dc: c680 andl %d0,%d3
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
4f0de: 2003 movel %d3,%d0
4f0e0: e98b lsll #4,%d3
4f0e2: e588 lsll #2,%d0
4f0e4: 9680 subl %d0,%d3
4f0e6: dbc3 addal %d3,%a5
4f0e8: 245d moveal %a5@+,%a2
4f0ea: 601c bras 4f108 <fat_file_open+0x58>
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
4f0ec: 486a 0020 pea %a2@(32)
4f0f0: 2044 moveal %d4,%a0
4f0f2: 2f0b movel %a3,%sp@-
4f0f4: 4e90 jsr %a0@
4f0f6: 508f addql #8,%sp
if ( (key1) == ck)
4f0f8: b082 cmpl %d2,%d0
4f0fa: 660a bnes 4f106 <fat_file_open+0x56> <== ALWAYS TAKEN
/* access "valid" hash table */
rc = _hash_search(fs_info, fs_info->vhash, key, 0, &lfat_fd);
if ( rc == RC_OK )
{
/* return pointer to fat_file_descriptor allocated before */
(*fat_fd) = lfat_fd;
4f0fc: 288a movel %a2,%a4@ <== NOT EXECUTED
lfat_fd->links_num++;
4f0fe: 52aa 0008 addql #1,%a2@(8) <== NOT EXECUTED
4f102: 6000 00d0 braw 4f1d4 <fat_file_open+0x124> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
4f106: 2452 moveal %a2@,%a2
)
{
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) ; )
4f108: bbca cmpal %a2,%a5
4f10a: 66e0 bnes 4f0ec <fat_file_open+0x3c>
4f10c: 6000 00ca braw 4f1d8 <fat_file_open+0x128>
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
4f110: 486a 0020 pea %a2@(32) <== NOT EXECUTED
4f114: 2044 moveal %d4,%a0 <== NOT EXECUTED
4f116: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f118: 4e90 jsr %a0@ <== NOT EXECUTED
4f11a: 508f addql #8,%sp <== NOT EXECUTED
if ( (key1) == ck)
4f11c: b082 cmpl %d2,%d0 <== NOT EXECUTED
4f11e: 660a bnes 4f12a <fat_file_open+0x7a> <== NOT EXECUTED
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
4f120: 4a82 tstl %d2 <== NOT EXECUTED
4f122: 6710 beqs 4f134 <fat_file_open+0x84> <== NOT EXECUTED
4f124: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
4f128: 670a beqs 4f134 <fat_file_open+0x84> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
4f12a: 2452 moveal %a2@,%a2 <== 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) ; )
4f12c: bbca cmpal %a2,%a5
4f12e: 66e0 bnes 4f110 <fat_file_open+0x60> <== NEVER TAKEN
return 0;
}
}
the_node = the_node->next;
}
return -1;
4f130: 78ff moveq #-1,%d4
4f132: 6002 bras 4f136 <fat_file_open+0x86>
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
{
*ret = (void *)the_node;
return 0;
4f134: 4284 clrl %d4 <== NOT EXECUTED
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
4f136: 4878 0042 pea 42 <DBL_MANT_DIG+0xd>
4f13a: 4eb9 0004 4410 jsr 44410 <malloc>
if ( lfat_fd == NULL )
4f140: 588f addql #4,%sp
}
/* access "removed-but-still-open" hash table */
rc = _hash_search(fs_info, fs_info->rhash, key, key, &lfat_fd);
lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t));
4f142: 2440 moveal %d0,%a2
4f144: 2880 movel %d0,%a4@
if ( lfat_fd == NULL )
4f146: 660e bnes 4f156 <fat_file_open+0xa6> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
4f148: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4f14e: 720c moveq #12,%d1 <== NOT EXECUTED
4f150: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f152: 2081 movel %d1,%a0@ <== NOT EXECUTED
4f154: 606a bras 4f1c0 <fat_file_open+0x110> <== NOT EXECUTED
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
4f156: 4878 0042 pea 42 <DBL_MANT_DIG+0xd>
4f15a: 42a7 clrl %sp@-
4f15c: 2f00 movel %d0,%sp@-
4f15e: 4eb9 0005 71d8 jsr 571d8 <memset>
lfat_fd->links_num = 1;
4f164: 7001 moveq #1,%d0
lfat_fd->flags &= ~FAT_FILE_REMOVED;
4f166: 72fe moveq #-2,%d1
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;
4f168: 2540 0008 movel %d0,%a2@(8)
lfat_fd->flags &= ~FAT_FILE_REMOVED;
4f16c: 102a 0030 moveb %a2@(48),%d0
4f170: c081 andl %d1,%d0
4f172: 1540 0030 moveb %d0,%a2@(48)
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
4f176: 70ff moveq #-1,%d0
4f178: 2540 003a movel %d0,%a2@(58)
lfat_fd->dir_pos = *dir_pos;
4f17c: 4878 0010 pea 10 <INVALID_OPERATION>
4f180: 2f05 movel %d5,%sp@-
4f182: 486a 0020 pea %a2@(32)
4f186: 4eb9 0005 7168 jsr 57168 <memcpy>
if ( rc != RC_OK )
4f18c: 4fef 0018 lea %sp@(24),%sp
4f190: 4a84 tstl %d4
4f192: 6706 beqs 4f19a <fat_file_open+0xea> <== NEVER TAKEN
lfat_fd->ino = key;
4f194: 2542 000c movel %d2,%a2@(12)
4f198: 602a bras 4f1c4 <fat_file_open+0x114>
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
4f19a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f19c: 4eb9 0005 09f6 jsr 509f6 <fat_get_unique_ino> <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
4f1a2: 588f addql #4,%sp <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
4f1a4: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
4f1a8: 661a bnes 4f1c4 <fat_file_open+0x114> <== NOT EXECUTED
{
free((*fat_fd));
4f1aa: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
4f1ac: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
/*
* XXX: kernel resource is unsufficient, but not the memory,
* but there is no suitable errno :(
*/
rtems_set_errno_and_return_minus_one( ENOMEM );
4f1b2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4f1b8: 588f addql #4,%sp <== NOT EXECUTED
4f1ba: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f1bc: 700c moveq #12,%d0 <== NOT EXECUTED
4f1be: 2080 movel %d0,%a0@ <== NOT EXECUTED
4f1c0: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f1c2: 6026 bras 4f1ea <fat_file_open+0x13a> <== 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 );
4f1c4: 2f0a movel %a2,%sp@-
4f1c6: d6ab 0062 addl %a3@(98),%d3
4f1ca: 2f03 movel %d3,%sp@-
4f1cc: 4eb9 0004 8700 jsr 48700 <_Chain_Append>
4f1d2: 508f addql #8,%sp
/*
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
4f1d4: 4280 clrl %d0
4f1d6: 6012 bras 4f1ea <fat_file_open+0x13a>
4f1d8: 2a6b 0066 moveal %a3@(102),%a5
4f1dc: dbc3 addal %d3,%a5
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
fat_file_fd_t *ffd = (fat_file_fd_t *)the_node;
uint32_t ck = fat_construct_key(fs_info, &ffd->dir_pos.sname);
4f1de: 283c 0004 efd8 movel #323544,%d4
4f1e4: 245d moveal %a5@+,%a2
4f1e6: 6000 ff44 braw 4f12c <fat_file_open+0x7c>
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
4f1ea: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
4f1f0: 4e5e unlk %fp <== NOT EXECUTED
0004f206 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
4f206: 4e56 ffd4 linkw %fp,#-44
4f20a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4f20e: 246e 0008 moveal %fp@(8),%a2
4f212: 266e 000c moveal %fp@(12),%a3
4f216: 282e 0010 movel %fp@(16),%d4
4f21a: 242e 0014 movel %fp@(20),%d2
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
4f21e: 42ae fffc clrl %fp@(-4)
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
4f222: 4a82 tstl %d2
4f224: 6700 013c beqw 4f362 <fat_file_read+0x15c>
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
4f228: 202b 0018 movel %a3@(24),%d0
4f22c: b084 cmpl %d4,%d0
4f22e: 6300 0132 blsw 4f362 <fat_file_read+0x15c>
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
4f232: b082 cmpl %d2,%d0
4f234: 6508 bcss 4f23e <fat_file_read+0x38> <== NEVER TAKEN
(start > fat_fd->fat_file_size - count))
4f236: 2200 movel %d0,%d1
4f238: 9282 subl %d2,%d1
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
4f23a: b284 cmpl %d4,%d1
4f23c: 6404 bccs 4f242 <fat_file_read+0x3c> <== ALWAYS TAKEN
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
4f23e: 2400 movel %d0,%d2 <== NOT EXECUTED
4f240: 9484 subl %d4,%d2 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f242: 7001 moveq #1,%d0
4f244: b0ab 0020 cmpl %a3@(32),%d0
4f248: 6652 bnes 4f29c <fat_file_read+0x96> <== NEVER TAKEN
4f24a: 4aab 0024 tstl %a3@(36)
4f24e: 664c bnes 4f29c <fat_file_read+0x96> <== NEVER TAKEN
4f250: 7203 moveq #3,%d1
4f252: 102a 000e moveb %a2@(14),%d0
4f256: c081 andl %d1,%d0
4f258: 4a00 tstb %d0
4f25a: 6740 beqs 4f29c <fat_file_read+0x96> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
4f25c: 2f2b 001c movel %a3@(28),%sp@-
4f260: 2f0a movel %a2,%sp@-
4f262: 4eba fd3c jsr %pc@(4efa0 <fat_cluster_num_to_sector_num>)
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f266: 588f addql #4,%sp
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
4f268: 4281 clrl %d1
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f26a: 2040 moveal %d0,%a0
4f26c: 2eae 0018 movel %fp@(24),%sp@
4f270: 2f02 movel %d2,%sp@-
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
byte = start & (fs_info->vol.bps - 1);
4f272: 3212 movew %a2@,%d1
4f274: 5381 subql #1,%d1
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f276: c284 andl %d4,%d1
4f278: 2f01 movel %d1,%sp@-
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
sec += (start >> fs_info->vol.sec_log2);
4f27a: 4281 clrl %d1
4f27c: 122a 0002 moveb %a2@(2),%d1
4f280: e2ac lsrl %d1,%d4
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f282: 4870 4800 pea %a0@(00000000,%d4:l)
4f286: 2f0a movel %a2,%sp@-
4f288: 4eb9 0004 fd40 jsr 4fd40 <_fat_block_read>
if ( ret < 0 )
4f28e: 4fef 0014 lea %sp@(20),%sp
4f292: 4a80 tstl %d0
4f294: 6c00 00d6 bgew 4f36c <fat_file_read+0x166>
4f298: 6000 00d0 braw 4f36a <fat_file_read+0x164> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
4f29c: 4280 clrl %d0 <== NOT EXECUTED
4f29e: 102a 0008 moveb %a2@(8),%d0 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f2a2: 2c0e movel %fp,%d6 <== NOT EXECUTED
4f2a4: 5986 subql #4,%d6 <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
4f2a6: 2604 movel %d4,%d3 <== NOT EXECUTED
4f2a8: e0ab lsrl %d0,%d3 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
4f2aa: 3a2a 0006 movew %a2@(6),%d5 <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f2ae: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f2b0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2b2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f2b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f2b6: 4eba fd6e jsr %pc@(4f026 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f2ba: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4f2be: 4a81 tstl %d1 <== NOT EXECUTED
4f2c0: 6600 00a4 bnew 4f366 <fat_file_read+0x160> <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
4f2c4: 99cc subal %a4,%a4 <== NOT EXECUTED
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
4f2c6: 4bfa fcd8 lea %pc@(4efa0 <fat_cluster_num_to_sector_num>),%a5<== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
4f2ca: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
4f2d0: 5385 subql #1,%d5 <== NOT EXECUTED
4f2d2: c885 andl %d5,%d4 <== NOT EXECUTED
4f2d4: 4285 clrl %d5 <== NOT EXECUTED
4f2d6: 2e04 movel %d4,%d7 <== NOT EXECUTED
4f2d8: 6068 bras 4f342 <fat_file_read+0x13c> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
4f2da: 4285 clrl %d5 <== NOT EXECUTED
4f2dc: 3a2a 0006 movew %a2@(6),%d5 <== NOT EXECUTED
4f2e0: 9a87 subl %d7,%d5 <== NOT EXECUTED
4f2e2: b485 cmpl %d5,%d2 <== NOT EXECUTED
4f2e4: 6402 bccs 4f2e8 <fat_file_read+0xe2> <== NOT EXECUTED
4f2e6: 2a02 movel %d2,%d5 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
4f2e8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4f2ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f2ee: 4e95 jsr %a5@ <== NOT EXECUTED
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f2f0: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
4f2f4: 508f addql #8,%sp <== NOT EXECUTED
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f2f6: 4870 c800 pea %a0@(00000000,%a4:l) <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
4f2fa: 4281 clrl %d1 <== NOT EXECUTED
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f2fc: 2f05 movel %d5,%sp@- <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
4f2fe: 3212 movew %a2@,%d1 <== NOT EXECUTED
4f300: 5381 subql #1,%d1 <== NOT EXECUTED
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f302: c287 andl %d7,%d1 <== NOT EXECUTED
4f304: 2f01 movel %d1,%sp@- <== NOT EXECUTED
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
4f306: 4281 clrl %d1 <== NOT EXECUTED
4f308: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED
4f30c: e2af lsrl %d1,%d7 <== NOT EXECUTED
4f30e: 2047 moveal %d7,%a0 <== NOT EXECUTED
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f310: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
4f314: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f316: 4eb9 0004 fd40 jsr 4fd40 <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
4f31c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4f320: 4a80 tstl %d0 <== NOT EXECUTED
4f322: 6d46 blts 4f36a <fat_file_read+0x164> <== NOT EXECUTED
return -1;
count -= c;
4f324: 9485 subl %d5,%d2 <== NOT EXECUTED
cmpltd += c;
4f326: d9c5 addal %d5,%a4 <== NOT EXECUTED
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
ofs = 0;
4f328: 4287 clrl %d7 <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f32a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
4f32c: 2a2e fffc movel %fp@(-4),%d5 <== NOT EXECUTED
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f330: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f332: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f334: 4eb9 0005 4f94 jsr 54f94 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
4f33a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f33e: 4a80 tstl %d0 <== NOT EXECUTED
4f340: 662a bnes 4f36c <fat_file_read+0x166> <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
4f342: 4a82 tstl %d2 <== NOT EXECUTED
4f344: 6694 bnes 4f2da <fat_file_read+0xd4> <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
4f346: 4282 clrl %d2 <== NOT EXECUTED
4f348: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED
4f34c: 41f4 48ff lea %a4@(ffffffff,%d4:l),%a0 <== NOT EXECUTED
fat_fd->map.disk_cln = save_cln;
4f350: 2745 0036 movel %d5,%a3@(54) <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
4f354: 2008 movel %a0,%d0 <== NOT EXECUTED
4f356: e4a8 lsrl %d2,%d0 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
4f358: d083 addl %d3,%d0 <== NOT EXECUTED
4f35a: 2740 0032 movel %d0,%a3@(50) <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
4f35e: 200c movel %a4,%d0 <== NOT EXECUTED
4f360: 600a bras 4f36c <fat_file_read+0x166> <== NOT EXECUTED
uint32_t byte = 0;
uint32_t c = 0;
/* it couldn't be removed - otherwise cache update will be broken */
if (count == 0)
return cmpltd;
4f362: 4280 clrl %d0 <== NOT EXECUTED
4f364: 6006 bras 4f36c <fat_file_read+0x166> <== NOT EXECUTED
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
4f366: 2001 movel %d1,%d0 <== NOT EXECUTED
4f368: 6002 bras 4f36c <fat_file_read+0x166> <== NOT EXECUTED
sec += (ofs >> fs_info->vol.sec_log2);
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
4f36a: 70ff moveq #-1,%d0 <== NOT EXECUTED
fat_fd->map.file_cln = cl_start +
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
}
4f36c: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4f372: 4e5e unlk %fp <== NOT EXECUTED
0004f9d6 <fat_file_size>:
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f9d6: 7001 moveq #1,%d0 <== NOT EXECUTED
int
fat_file_size(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4f9d8: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4f9dc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ <== NOT EXECUTED
4f9e0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4f9e4: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
4f9e8: 2d6a 001c fffc movel %a2@(28),%fp@(-4) <== NOT EXECUTED
uint32_t save_cln = 0;
/* Have we requested root dir size for FAT12/16? */
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f9ee: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED
4f9f2: 661a bnes 4fa0e <fat_file_size+0x38> <== NOT EXECUTED
4f9f4: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED
4f9f8: 6614 bnes 4fa0e <fat_file_size+0x38> <== NOT EXECUTED
4f9fa: 7203 moveq #3,%d1 <== NOT EXECUTED
4f9fc: 102b 000e moveb %a3@(14),%d0 <== NOT EXECUTED
4fa00: c081 andl %d1,%d0 <== NOT EXECUTED
4fa02: 4a00 tstb %d0 <== NOT EXECUTED
4fa04: 6708 beqs 4fa0e <fat_file_size+0x38> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
4fa06: 256b 0028 0018 movel %a3@(40),%a2@(24) <== NOT EXECUTED
4fa0c: 6042 bras 4fa50 <fat_file_size+0x7a> <== NOT EXECUTED
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4fa0e: 260e movel %fp,%d3 <== NOT EXECUTED
fat_file_fd_t *fat_fd
)
{
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
uint32_t save_cln = 0;
4fa10: 4280 clrl %d0 <== NOT EXECUTED
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4fa12: 5983 subql #4,%d3 <== NOT EXECUTED
4fa14: 49f9 0005 4f94 lea 54f94 <fat_get_fat_cluster>,%a4 <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
}
fat_fd->fat_file_size = 0;
4fa1a: 42aa 0018 clrl %a2@(24) <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
4fa1e: 601c bras 4fa3c <fat_file_size+0x66> <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4fa20: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fa22: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fa24: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fa26: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
4fa28: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fa2c: 4a80 tstl %d0 <== NOT EXECUTED
4fa2e: 6622 bnes 4fa52 <fat_file_size+0x7c> <== NOT EXECUTED
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
4fa30: 4280 clrl %d0 <== NOT EXECUTED
4fa32: 302b 0006 movew %a3@(6),%d0 <== NOT EXECUTED
4fa36: d1aa 0018 addl %d0,%a2@(24) <== NOT EXECUTED
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
save_cln = cur_cln;
4fa3a: 2002 movel %d2,%d0 <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
4fa3c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4fa40: 2202 movel %d2,%d1 <== NOT EXECUTED
4fa42: c2ab 0010 andl %a3@(16),%d1 <== NOT EXECUTED
4fa46: b2ab 0014 cmpl %a3@(20),%d1 <== NOT EXECUTED
4fa4a: 65d4 bcss 4fa20 <fat_file_size+0x4a> <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
4fa4c: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED
4fa50: 4280 clrl %d0 <== NOT EXECUTED
return rc;
}
4fa52: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED
4fa58: 4e5e unlk %fp <== NOT EXECUTED
0004f376 <fat_file_truncate>:
)
{
int rc = RC_OK;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
4f376: 70ff moveq #-1,%d0 <== NOT EXECUTED
fat_file_truncate(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
4f378: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4f37c: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
4f380: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
4f384: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rc = RC_OK;
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
4f388: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
fat_file_truncate(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
4f38c: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
uint32_t cur_cln = 0;
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
4f390: 202a 0018 movel %a2@(24),%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
int rc = RC_OK;
uint32_t cur_cln = 0;
4f394: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
uint32_t cl_start = 0;
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
if ( new_length >= fat_fd->fat_file_size )
4f398: b088 cmpl %a0,%d0 <== NOT EXECUTED
4f39a: 6206 bhis 4f3a2 <fat_file_truncate+0x2c> <== NOT EXECUTED
return rc;
4f39c: 4280 clrl %d0 <== NOT EXECUTED
4f39e: 6000 00b8 braw 4f458 <fat_file_truncate+0xe2> <== NOT EXECUTED
assert(fat_fd->fat_file_size);
4f3a2: 4a80 tstl %d0 <== NOT EXECUTED
4f3a4: 661c bnes 4f3c2 <fat_file_truncate+0x4c> <== NOT EXECUTED
4f3a6: 4879 0006 5dce pea 65dce <rtems_filesystem_handlers_default+0x2c><== NOT EXECUTED
4f3ac: 4879 0006 5e2c pea 65e2c <__FUNCTION__.7464> <== NOT EXECUTED
4f3b2: 4878 02d1 pea 2d1 <DBL_MANT_DIG+0x29c> <== NOT EXECUTED
4f3b6: 4879 0006 5de4 pea 65de4 <rtems_filesystem_handlers_default+0x42><== NOT EXECUTED
4f3bc: 4eb9 0005 1354 jsr 51354 <__assert_func> <== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
4f3c2: 4282 clrl %d2 <== NOT EXECUTED
4f3c4: 4281 clrl %d1 <== NOT EXECUTED
4f3c6: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED
4f3ca: 342b 0006 movew %a3@(6),%d2 <== NOT EXECUTED
4f3ce: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 <== NOT EXECUTED
4f3d2: 2408 movel %a0,%d2 <== NOT EXECUTED
4f3d4: e2aa lsrl %d1,%d2 <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
4f3d6: 2602 movel %d2,%d3 <== NOT EXECUTED
4f3d8: e3ab lsll %d1,%d3 <== NOT EXECUTED
4f3da: b083 cmpl %d3,%d0 <== NOT EXECUTED
4f3dc: 63be blss 4f39c <fat_file_truncate+0x26> <== NOT EXECUTED
return RC_OK;
if (cl_start != 0)
4f3de: 4a82 tstl %d2 <== NOT EXECUTED
4f3e0: 6618 bnes 4f3fa <fat_file_truncate+0x84> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
}
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f3e2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
4f3e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f3e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f3ea: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f3ec: 4eba fc38 jsr %pc@(4f026 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f3f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rc != RC_OK)
return rc;
}
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f3f4: 2001 movel %d1,%d0 <== NOT EXECUTED
if (rc != RC_OK)
4f3f6: 6660 bnes 4f458 <fat_file_truncate+0xe2> <== NOT EXECUTED
4f3f8: 601c bras 4f416 <fat_file_truncate+0xa0> <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
return RC_OK;
if (cl_start != 0)
{
rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln);
4f3fa: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f3fe: 2042 moveal %d2,%a0 <== NOT EXECUTED
4f400: 4868 ffff pea %a0@(-1) <== NOT EXECUTED
4f404: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f406: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f408: 4eba fc1c jsr %pc@(4f026 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f40c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
return RC_OK;
if (cl_start != 0)
{
rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln);
4f410: 2001 movel %d1,%d0 <== NOT EXECUTED
if (rc != RC_OK)
4f412: 67ce beqs 4f3e2 <fat_file_truncate+0x6c> <== NOT EXECUTED
4f414: 6042 bras 4f458 <fat_file_truncate+0xe2> <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
rc = fat_free_fat_clusters_chain(fs_info, cur_cln);
4f416: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
4f41a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f41c: 4eb9 0005 5334 jsr 55334 <fat_free_fat_clusters_chain> <== NOT EXECUTED
if (rc != RC_OK)
4f422: 508f addql #8,%sp <== NOT EXECUTED
4f424: 4a80 tstl %d0 <== NOT EXECUTED
4f426: 6630 bnes 4f458 <fat_file_truncate+0xe2> <== NOT EXECUTED
return rc;
if (cl_start != 0)
4f428: 4a82 tstl %d2 <== NOT EXECUTED
4f42a: 6700 ff70 beqw 4f39c <fat_file_truncate+0x26> <== NOT EXECUTED
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
4f42e: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4f432: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4f436: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f438: 4eb9 0005 5100 jsr 55100 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
4f43e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f442: 4a80 tstl %d0 <== NOT EXECUTED
4f444: 6612 bnes 4f458 <fat_file_truncate+0xe2> <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
4f446: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
4f44a: 5382 subql #1,%d2 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
4f44c: 2541 0036 movel %d1,%a2@(54) <== NOT EXECUTED
if (cl_start != 0)
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
if ( rc != RC_OK )
return rc;
fat_fd->map.file_cln = cl_start - 1;
4f450: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
4f454: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED
}
return RC_OK;
}
4f458: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4f45e: 4e5e unlk %fp <== NOT EXECUTED
0004f79c <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
4f79c: 4e56 ffc4 linkw %fp,#-60
4f7a0: 202e 0014 movel %fp@(20),%d0
4f7a4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4f7a8: 246e 000c moveal %fp@(12),%a2
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
bool zero_fill = start > fat_fd->fat_file_size;
uint32_t file_cln_initial = fat_fd->map.file_cln;
4f7ac: 2a2a 0032 movel %a2@(50),%d5
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
4f7b0: 266e 0008 moveal %fp@(8),%a3
4f7b4: 282e 0010 movel %fp@(16),%d4
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
bool zero_fill = start > fat_fd->fat_file_size;
4f7b8: 222a 0018 movel %a2@(24),%d1
{
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
4f7bc: 42ae fff8 clrl %fp@(-8)
bool zero_fill = start > fat_fd->fat_file_size;
uint32_t file_cln_initial = fat_fd->map.file_cln;
4f7c0: 2d45 fff0 movel %d5,%fp@(-16)
uint32_t cln;
if ( count == 0 )
4f7c4: 4a80 tstl %d0
4f7c6: 6700 0192 beqw 4f95a <fat_file_write+0x1be>
return cmpltd;
if (start >= fat_fd->size_limit)
4f7ca: 242a 0014 movel %a2@(20),%d2
4f7ce: b484 cmpl %d4,%d2
4f7d0: 6210 bhis 4f7e2 <fat_file_write+0x46> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EFBIG);
4f7d2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4f7d8: 741b moveq #27,%d2 <== NOT EXECUTED
4f7da: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f7dc: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f7de: 6000 0190 braw 4f970 <fat_file_write+0x1d4> <== NOT EXECUTED
if (count > fat_fd->size_limit - start)
4f7e2: 9484 subl %d4,%d2
4f7e4: b082 cmpl %d2,%d0
4f7e6: 6402 bccs 4f7ea <fat_file_write+0x4e> <== NEVER TAKEN
4f7e8: 2400 movel %d0,%d2
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
4f7ea: 486e fff8 pea %fp@(-8)
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
bool zero_fill = start > fat_fd->fat_file_size;
4f7ee: b284 cmpl %d4,%d1
4f7f0: 55c0 scs %d0
rtems_set_errno_and_return_minus_one(EFBIG);
if (count > fat_fd->size_limit - start)
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
4f7f2: 2602 movel %d2,%d3
4f7f4: d684 addl %d4,%d3
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
bool zero_fill = start > fat_fd->fat_file_size;
4f7f6: 49c0 extbl %d0
rtems_set_errno_and_return_minus_one(EFBIG);
if (count > fat_fd->size_limit - start)
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
4f7f8: 4480 negl %d0
4f7fa: 2f03 movel %d3,%sp@-
4f7fc: 2f00 movel %d0,%sp@-
4f7fe: 2f0a movel %a2,%sp@-
4f800: 2f0b movel %a3,%sp@-
4f802: 4eb9 0004 f5bc jsr 4f5bc <fat_file_extend>
if (RC_OK == rc)
4f808: 4fef 0014 lea %sp@(20),%sp
4f80c: 4a80 tstl %d0
4f80e: 6600 0162 bnew 4f972 <fat_file_write+0x1d6>
{
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
4f812: 202e fff8 movel %fp@(-8),%d0
4f816: b680 cmpl %d0,%d3
4f818: 6704 beqs 4f81e <fat_file_write+0x82> <== ALWAYS TAKEN
count = c - start;
4f81a: 2400 movel %d0,%d2 <== NOT EXECUTED
4f81c: 9484 subl %d4,%d2 <== NOT EXECUTED
*/
static bool
fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd,
const uint8_t volume_type)
{
return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16));
4f81e: 7201 moveq #1,%d1
*/
if (c != (start + count))
count = c - start;
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
4f820: 102b 000e moveb %a3@(14),%d0
*/
static bool
fat_is_fat12_or_fat16_root_dir (const fat_file_fd_t *fat_fd,
const uint8_t volume_type)
{
return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16));
4f824: b2aa 0020 cmpl %a2@(32),%d1
4f828: 6614 bnes 4f83e <fat_file_write+0xa2>
4f82a: 4aaa 0024 tstl %a2@(36)
4f82e: 660e bnes 4f83e <fat_file_write+0xa2> <== NEVER TAKEN
4f830: 7a03 moveq #3,%d5
4f832: c085 andl %d5,%d0
4f834: 4a00 tstb %d0
4f836: 56c0 sne %d0
4f838: 49c0 extbl %d0
4f83a: 4480 negl %d0
4f83c: 6002 bras 4f840 <fat_file_write+0xa4>
4f83e: 4280 clrl %d0
4f840: 4285 clrl %d5
4f842: 1a2b 0008 moveb %a3@(8),%d5
*/
if (c != (start + count))
count = c - start;
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
4f846: 0800 0000 btst #0,%d0
4f84a: 6732 beqs 4f87e <fat_file_write+0xe2>
{
cln = fat_fd->cln;
cln += (start >> fs_info->vol.bpc_log2);
byte = start & (fs_info->vol.bpc -1);
ret = fat_cluster_write(fs_info,
4f84c: 42a7 clrl %sp@-
4f84e: 2f2e 0018 movel %fp@(24),%sp@-
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
{
cln = fat_fd->cln;
cln += (start >> fs_info->vol.bpc_log2);
byte = start & (fs_info->vol.bpc -1);
4f852: 4280 clrl %d0
ret = fat_cluster_write(fs_info,
4f854: 2f02 movel %d2,%sp@-
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
{
cln = fat_fd->cln;
cln += (start >> fs_info->vol.bpc_log2);
byte = start & (fs_info->vol.bpc -1);
4f856: 302b 0006 movew %a3@(6),%d0
4f85a: 5380 subql #1,%d0
ret = fat_cluster_write(fs_info,
4f85c: c084 andl %d4,%d0
/* for the root directory of FAT12 and FAT16 we need this special handling */
if (fat_is_fat12_or_fat16_root_dir(fat_fd, fs_info->vol.type))
{
cln = fat_fd->cln;
cln += (start >> fs_info->vol.bpc_log2);
4f85e: eaac lsrl %d5,%d4
byte = start & (fs_info->vol.bpc -1);
ret = fat_cluster_write(fs_info,
4f860: 2f00 movel %d0,%sp@-
4f862: d8aa 001c addl %a2@(28),%d4
4f866: 2f04 movel %d4,%sp@-
4f868: 2f0b movel %a3,%sp@-
4f86a: 4eb9 0004 ff54 jsr 4ff54 <fat_cluster_write>
cln,
byte,
count,
buf,
false);
if (0 > ret)
4f870: 4fef 0018 lea %sp@(24),%sp
4f874: 4a80 tstl %d0
4f876: 6d00 00f8 bltw 4f970 <fat_file_write+0x1d4>
4f87a: 6000 00f6 braw 4f972 <fat_file_write+0x1d6>
const uint8_t *buf,
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
4f87e: 2e0e movel %fp,%d7
4f880: 5987 subql #4,%d7
4f882: 2047 moveal %d7,%a0
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
4f884: 2604 movel %d4,%d3
4f886: eaab lsrl %d5,%d3
const uint8_t *buf,
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
4f888: 4290 clrl %a0@
uint32_t file_cln_cnt;
ssize_t ret;
uint32_t c;
bool overwrite_cluster = false;
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
4f88a: 2f07 movel %d7,%sp@-
4f88c: 2f03 movel %d3,%sp@-
4f88e: 2f0a movel %a2,%sp@-
4f890: 2f0b movel %a3,%sp@-
4f892: 4eba f792 jsr %pc@(4f026 <fat_file_lseek>)
if (RC_OK == rc)
4f896: 4fef 0010 lea %sp@(16),%sp
uint32_t file_cln_cnt;
ssize_t ret;
uint32_t c;
bool overwrite_cluster = false;
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
4f89a: 2a41 moveal %d1,%a5
if (RC_OK == rc)
4f89c: 4a81 tstl %d1
4f89e: 6600 00b2 bnew 4f952 <fat_file_write+0x1b6>
{
file_cln_cnt = cur_cln - fat_fd->cln;
4f8a2: 222e fffc movel %fp@(-4),%d1
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
4f8a6: 2003 movel %d3,%d0
bool overwrite_cluster = false;
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
4f8a8: 92aa 001c subl %a2@(28),%d1
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
4f8ac: 2844 moveal %d4,%a4
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
4f8ae: 4284 clrl %d4
const uint32_t count,
const uint8_t *buf,
const uint32_t file_cln_initial)
{
int rc = RC_OK;
uint32_t cmpltd = 0;
4f8b0: 4286 clrl %d6
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
4f8b2: eba8 lsll %d5,%d0
uint32_t ofs_cln_save = ofs_cln;
uint32_t bytes_to_write = count;
uint32_t file_cln_cnt;
ssize_t ret;
uint32_t c;
bool overwrite_cluster = false;
4f8b4: 4205 clrb %d5
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
4f8b6: 2d41 ffec movel %d1,%fp@(-20)
int rc = RC_OK;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
uint32_t start_cln = start >> fs_info->vol.bpc_log2;
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
4f8ba: 99c0 subal %d0,%a4
4f8bc: 200c movel %a4,%d0
uint32_t ofs_cln_save = ofs_cln;
uint32_t bytes_to_write = count;
uint32_t file_cln_cnt;
ssize_t ret;
uint32_t c;
bool overwrite_cluster = false;
4f8be: 1d45 fff7 moveb %d5,%fp@(-9)
4f8c2: 6062 bras 4f926 <fat_file_write+0x18a>
{
file_cln_cnt = cur_cln - fat_fd->cln;
while ( (RC_OK == rc)
&& (bytes_to_write > 0))
{
c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln));
4f8c4: 4281 clrl %d1
4f8c6: 322b 0006 movew %a3@(6),%d1
4f8ca: 9280 subl %d0,%d1
4f8cc: b481 cmpl %d1,%d2
4f8ce: 6402 bccs 4f8d2 <fat_file_write+0x136>
4f8d0: 2202 movel %d2,%d1
if (file_cln_initial < file_cln_cnt)
4f8d2: 2e2e ffec movel %fp@(-20),%d7
4f8d6: beae fff0 cmpl %fp@(-16),%d7
4f8da: 6306 blss 4f8e2 <fat_file_write+0x146>
overwrite_cluster = true;
4f8dc: 7a01 moveq #1,%d5
4f8de: 1d45 fff7 moveb %d5,%fp@(-9)
ret = fat_cluster_write(fs_info,
4f8e2: 7a01 moveq #1,%d5
4f8e4: 1e2e fff7 moveb %fp@(-9),%d7
4f8e8: 206e 0018 moveal %fp@(24),%a0
4f8ec: ce85 andl %d5,%d7
4f8ee: 2f07 movel %d7,%sp@-
4f8f0: 4870 6800 pea %a0@(00000000,%d6:l)
4f8f4: 2f01 movel %d1,%sp@-
4f8f6: 2f00 movel %d0,%sp@-
4f8f8: 2f2e fffc movel %fp@(-4),%sp@-
4f8fc: 2f0b movel %a3,%sp@-
4f8fe: 4eb9 0004 ff54 jsr 4ff54 <fat_cluster_write>
cur_cln,
ofs_cln,
c,
&buf[cmpltd],
overwrite_cluster);
if (0 > ret)
4f904: 4fef 0018 lea %sp@(24),%sp
4f908: 4a80 tstl %d0
4f90a: 6c52 bges 4f95e <fat_file_write+0x1c2> <== ALWAYS TAKEN
4f90c: 601e bras 4f92c <fat_file_write+0x190> <== NOT EXECUTED
++file_cln_cnt;
bytes_to_write -= ret;
cmpltd += ret;
save_cln = cur_cln;
if (0 < bytes_to_write)
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f90e: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f912: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f914: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f916: 4eb9 0005 4f94 jsr 54f94 <fat_get_fat_cluster> <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
while ( (RC_OK == rc)
4f91c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f920: 4a80 tstl %d0 <== NOT EXECUTED
4f922: 660e bnes 4f932 <fat_file_write+0x196> <== NOT EXECUTED
4f924: 4280 clrl %d0
&& (bytes_to_write > 0))
4f926: 4a82 tstl %d2
4f928: 669a bnes 4f8c4 <fat_file_write+0x128>
4f92a: 6008 bras 4f934 <fat_file_write+0x198>
cur_cln,
ofs_cln,
c,
&buf[cmpltd],
overwrite_cluster);
if (0 > ret)
4f92c: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED
4f930: 6002 bras 4f934 <fat_file_write+0x198> <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
if (RC_OK == rc)
{
file_cln_cnt = cur_cln - fat_fd->cln;
while ( (RC_OK == rc)
4f932: 2a40 moveal %d0,%a5 <== NOT EXECUTED
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
4f934: 4282 clrl %d2
4f936: 142b 0008 moveb %a3@(8),%d2
4f93a: 49f4 68ff lea %a4@(ffffffff,%d6:l),%a4
fat_fd->map.disk_cln = save_cln;
4f93e: 2544 0036 movel %d4,%a2@(54)
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
4f942: 200c movel %a4,%d0
4f944: e4a8 lsrl %d2,%d0
}
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
4f946: d083 addl %d3,%d0
4f948: 2540 0032 movel %d0,%a2@(50)
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
}
if (RC_OK != rc)
4f94c: 4a8d tstl %a5
4f94e: 6602 bnes 4f952 <fat_file_write+0x1b6> <== NEVER TAKEN
return rc;
else
return cmpltd;
4f950: 2a46 moveal %d6,%a5
fat_fd,
start,
count,
buf,
file_cln_initial);
if (0 > ret)
4f952: 4a8d tstl %a5
4f954: 6d1a blts 4f970 <fat_file_write+0x1d4> <== NEVER TAKEN
rc = -1;
else
cmpltd = ret;
4f956: 200d movel %a5,%d0
4f958: 6018 bras 4f972 <fat_file_write+0x1d6>
uint32_t file_cln_initial = fat_fd->map.file_cln;
uint32_t cln;
if ( count == 0 )
return cmpltd;
4f95a: 4280 clrl %d0 <== NOT EXECUTED
4f95c: 6014 bras 4f972 <fat_file_write+0x1d6> <== NOT EXECUTED
if (RC_OK == rc)
{
++file_cln_cnt;
bytes_to_write -= ret;
cmpltd += ret;
save_cln = cur_cln;
4f95e: 282e fffc movel %fp@(-4),%d4
if (0 > ret)
rc = -1;
if (RC_OK == rc)
{
++file_cln_cnt;
4f962: 52ae ffec addql #1,%fp@(-20)
bytes_to_write -= ret;
4f966: 9480 subl %d0,%d2
cmpltd += ret;
4f968: dc80 addl %d0,%d6
save_cln = cur_cln;
if (0 < bytes_to_write)
4f96a: 4a82 tstl %d2
4f96c: 67b6 beqs 4f924 <fat_file_write+0x188> <== ALWAYS TAKEN
4f96e: 609e bras 4f90e <fat_file_write+0x172> <== NOT EXECUTED
start,
count,
buf,
file_cln_initial);
if (0 > ret)
rc = -1;
4f970: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
if (RC_OK != rc)
return rc;
else
return cmpltd;
}
4f972: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
4f978: 4e5e unlk %fp <== NOT EXECUTED
00055334 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
55334: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED
55338: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
5533c: 264e moveal %fp,%a3 <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
5533e: 4282 clrl %d2 <== NOT EXECUTED
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
55340: 4285 clrl %d5 <== NOT EXECUTED
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
55342: 49f9 0005 4f94 lea 54f94 <fat_get_fat_cluster>,%a4 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
55348: 4bf9 0005 5100 lea 55100 <fat_set_fat_cluster>,%a5 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
5534e: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
55352: 2606 movel %d6,%d3 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
55354: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
55358: 42a3 clrl %a3@- <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
5535a: 6044 bras 553a0 <fat_free_fat_clusters_chain+0x6c><== NOT EXECUTED
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
5535c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5535e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55360: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55362: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
55364: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
55368: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
5536a: 671c beqs 55388 <fat_free_fat_clusters_chain+0x54><== NOT EXECUTED
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5536c: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED
55370: 72ff moveq #-1,%d1 <== NOT EXECUTED
55372: b280 cmpl %d0,%d1 <== NOT EXECUTED
55374: 6706 beqs 5537c <fat_free_fat_clusters_chain+0x48><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
55376: d480 addl %d0,%d2 <== NOT EXECUTED
55378: 2542 003e movel %d2,%a2@(62) <== NOT EXECUTED
fat_buf_release(fs_info);
5537c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5537e: 4eb9 0004 faee jsr 4faee <fat_buf_release> <== NOT EXECUTED
55384: 588f addql #4,%sp <== NOT EXECUTED
55386: 6044 bras 553cc <fat_free_fat_clusters_chain+0x98><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
55388: 42a7 clrl %sp@- <== NOT EXECUTED
5538a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5538c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5538e: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
55390: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55394: 4a80 tstl %d0 <== NOT EXECUTED
55396: 6702 beqs 5539a <fat_free_fat_clusters_chain+0x66><== NOT EXECUTED
55398: 2a00 movel %d0,%d5 <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
cur_cln = next_cln;
5539a: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
if ( rc != RC_OK )
rc1 = rc;
freed_cls_cnt++;
5539e: 5282 addql #1,%d2 <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
553a0: 2003 movel %d3,%d0 <== NOT EXECUTED
553a2: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED
553a6: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED
553aa: 65b0 bcss 5535c <fat_free_fat_clusters_chain+0x28><== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
553ac: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED
553b0: 72ff moveq #-1,%d1 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
553b2: 2546 0046 movel %d6,%a2@(70) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
553b6: b280 cmpl %d0,%d1 <== NOT EXECUTED
553b8: 6706 beqs 553c0 <fat_free_fat_clusters_chain+0x8c><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
553ba: d480 addl %d0,%d2 <== NOT EXECUTED
553bc: 2542 003e movel %d2,%a2@(62) <== NOT EXECUTED
fat_buf_release(fs_info);
553c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
553c2: 2805 movel %d5,%d4 <== NOT EXECUTED
553c4: 4eb9 0004 faee jsr 4faee <fat_buf_release> <== NOT EXECUTED
553ca: 588f addql #4,%sp <== NOT EXECUTED
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
553cc: 2004 movel %d4,%d0 <== NOT EXECUTED
553ce: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED
553d4: 4e5e unlk %fp <== NOT EXECUTED
00050a8e <fat_free_unique_ino>:
void
fat_free_unique_ino(
fat_fs_info_t *fs_info,
uint32_t ino
)
{
50a8e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
50a92: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
50a96: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
50a9a: 90a9 0076 subl %a1@(118),%d0 <== NOT EXECUTED
50a9e: 2200 movel %d0,%d1 <== NOT EXECUTED
50aa0: e689 lsrl #3,%d1 <== NOT EXECUTED
50aa2: 2069 006a moveal %a1@(106),%a0 <== NOT EXECUTED
50aa6: d1c1 addal %d1,%a0 <== NOT EXECUTED
50aa8: 7207 moveq #7,%d1 <== NOT EXECUTED
50aaa: c280 andl %d0,%d1 <== NOT EXECUTED
50aac: 7001 moveq #1,%d0 <== NOT EXECUTED
50aae: e3a8 lsll %d1,%d0 <== NOT EXECUTED
50ab0: 1210 moveb %a0@,%d1 <== NOT EXECUTED
50ab2: 4680 notl %d0 <== NOT EXECUTED
50ab4: c081 andl %d1,%d0 <== NOT EXECUTED
50ab6: 1080 moveb %d0,%a0@ <== NOT EXECUTED
}
50ab8: 4e5e unlk %fp <== NOT EXECUTED
00054f94 <fat_get_fat_cluster>:
uint8_t *sec_buf;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
54f94: 7001 moveq #1,%d0
fat_get_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t *ret_val
)
{
54f96: 4e56 ffd8 linkw %fp,#-40
54f9a: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
54f9e: 266e 0008 moveal %fp@(8),%a3
54fa2: 242e 000c movel %fp@(12),%d2
54fa6: 246e 0010 moveal %fp@(16),%a2
uint8_t *sec_buf;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
54faa: b082 cmpl %d2,%d0
54fac: 6400 0134 bccw 550e2 <fat_get_fat_cluster+0x14e>
54fb0: 202b 0034 movel %a3@(52),%d0
54fb4: 5280 addql #1,%d0
54fb6: b082 cmpl %d2,%d0
54fb8: 6404 bccs 54fbe <fat_get_fat_cluster+0x2a> <== ALWAYS TAKEN
54fba: 6000 0126 braw 550e2 <fat_get_fat_cluster+0x14e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
54fbe: 7201 moveq #1,%d1
54fc0: 102b 000e moveb %a3@(14),%d0
54fc4: c280 andl %d0,%d1
54fc6: 4a01 tstb %d1
54fc8: 6708 beqs 54fd2 <fat_get_fat_cluster+0x3e> <== NEVER TAKEN
54fca: 2802 movel %d2,%d4
54fcc: e28c lsrl #1,%d4
54fce: d882 addl %d2,%d4
54fd0: 6010 bras 54fe2 <fat_get_fat_cluster+0x4e>
54fd2: 7602 moveq #2,%d3 <== NOT EXECUTED
54fd4: 2802 movel %d2,%d4 <== NOT EXECUTED
54fd6: c680 andl %d0,%d3 <== NOT EXECUTED
54fd8: 4a03 tstb %d3 <== NOT EXECUTED
54fda: 6704 beqs 54fe0 <fat_get_fat_cluster+0x4c> <== NOT EXECUTED
54fdc: d884 addl %d4,%d4 <== NOT EXECUTED
54fde: 6002 bras 54fe2 <fat_get_fat_cluster+0x4e> <== NOT EXECUTED
54fe0: e58c lsll #2,%d4 <== NOT EXECUTED
54fe2: 4283 clrl %d3
54fe4: 162b 0002 moveb %a3@(2),%d3
54fe8: e6ac lsrl %d3,%d4
54fea: d8ab 0050 addl %a3@(80),%d4
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
54fee: 4a01 tstb %d1
54ff0: 6708 beqs 54ffa <fat_get_fat_cluster+0x66> <== NEVER TAKEN
54ff2: 2a02 movel %d2,%d5
54ff4: e28d lsrl #1,%d5
54ff6: da82 addl %d2,%d5
54ff8: 6010 bras 5500a <fat_get_fat_cluster+0x76>
54ffa: 7202 moveq #2,%d1 <== NOT EXECUTED
54ffc: 2a02 movel %d2,%d5 <== NOT EXECUTED
54ffe: c081 andl %d1,%d0 <== NOT EXECUTED
55000: 4a00 tstb %d0 <== NOT EXECUTED
55002: 6704 beqs 55008 <fat_get_fat_cluster+0x74> <== NOT EXECUTED
55004: da85 addl %d5,%d5 <== NOT EXECUTED
55006: 6002 bras 5500a <fat_get_fat_cluster+0x76> <== NOT EXECUTED
55008: e58d lsll #2,%d5 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
5500a: 2c0e movel %fp,%d6
5500c: 5986 subql #4,%d6
5500e: 49f9 0004 fc8c lea 4fc8c <fat_buf_access>,%a4
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);
55014: 3e13 movew %a3@,%d7
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
55016: 2f06 movel %d6,%sp@-
55018: 4878 0001 pea 1 <ADD>
5501c: 2f04 movel %d4,%sp@-
5501e: 2f0b movel %a3,%sp@-
55020: 4e94 jsr %a4@
if (rc != RC_OK)
55022: 4fef 0010 lea %sp@(16),%sp
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
55026: 2600 movel %d0,%d3
if (rc != RC_OK)
55028: 6600 00ca bnew 550f4 <fat_get_fat_cluster+0x160>
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);
5502c: 4281 clrl %d1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
5502e: 7002 moveq #2,%d0
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);
55030: 3207 movew %d7,%d1
55032: 5381 subql #1,%d1
55034: c285 andl %d5,%d1
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
55036: 4285 clrl %d5
55038: 1a2b 000e moveb %a3@(14),%d5
5503c: b085 cmpl %d5,%d0
5503e: 6772 beqs 550b2 <fat_get_fat_cluster+0x11e> <== NEVER TAKEN
55040: 103c 0004 moveb #4,%d0
55044: b085 cmpl %d5,%d0
55046: 6700 0088 beqw 550d0 <fat_get_fat_cluster+0x13c>
5504a: 103c 0001 moveb #1,%d0
5504e: b085 cmpl %d5,%d0
55050: 6600 0090 bnew 550e2 <fat_get_fat_cluster+0x14e>
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*(sec_buf + ofs));
55054: 206e fffc moveal %fp@(-4),%a0
55058: 4285 clrl %d5
5505a: 1a30 1800 moveb %a0@(00000000,%d1:l),%d5
if ( ofs == (fs_info->vol.bps - 1) )
5505e: 4280 clrl %d0
55060: 3013 movew %a3@,%d0
case FAT_FAT12:
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*(sec_buf + ofs));
55062: 2485 movel %d5,%a2@
if ( ofs == (fs_info->vol.bps - 1) )
55064: 5380 subql #1,%d0
55066: b081 cmpl %d1,%d0
55068: 6626 bnes 55090 <fat_get_fat_cluster+0xfc> <== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
5506a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5506c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55070: 2044 moveal %d4,%a0 <== NOT EXECUTED
55072: 4868 0001 pea %a0@(1) <== NOT EXECUTED
55076: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55078: 4e94 jsr %a4@ <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
5507a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5507e: 4a80 tstl %d0 <== NOT EXECUTED
55080: 6670 bnes 550f2 <fat_get_fat_cluster+0x15e> <== NOT EXECUTED
return rc;
*ret_val |= *sec_buf << 8;
55082: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55086: 4280 clrl %d0 <== NOT EXECUTED
55088: 1010 moveb %a0@,%d0 <== NOT EXECUTED
5508a: e188 lsll #8,%d0 <== NOT EXECUTED
5508c: 8192 orl %d0,%a2@ <== NOT EXECUTED
5508e: 600c bras 5509c <fat_get_fat_cluster+0x108> <== NOT EXECUTED
}
else
{
*ret_val |= *(sec_buf + ofs + 1) << 8;
55090: 4280 clrl %d0
55092: 1030 1801 moveb %a0@(00000001,%d1:l),%d0
55096: e188 lsll #8,%d0
55098: 8085 orl %d5,%d0
5509a: 2480 movel %d0,%a2@
}
if ( FAT_CLUSTER_IS_ODD(cln) )
5509c: 0802 0000 btst #0,%d2
550a0: 6706 beqs 550a8 <fat_get_fat_cluster+0x114>
*ret_val = (*ret_val) >> FAT12_SHIFT;
550a2: 2012 movel %a2@,%d0
550a4: e888 lsrl #4,%d0
550a6: 6036 bras 550de <fat_get_fat_cluster+0x14a>
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
550a8: 203c 0000 0fff movel #4095,%d0
550ae: c192 andl %d0,%a2@
550b0: 6042 bras 550f4 <fat_get_fat_cluster+0x160>
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
550b2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
550b6: 3230 1800 movew %a0@(00000000,%d1:l),%d1 <== NOT EXECUTED
550ba: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
550c0: 2001 movel %d1,%d0 <== NOT EXECUTED
550c2: e089 lsrl #8,%d1 <== NOT EXECUTED
550c4: e188 lsll #8,%d0 <== NOT EXECUTED
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(sec_buf + ofs));
*ret_val = CF_LE_W(*ret_val);
550c6: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED
550cc: 8081 orl %d1,%d0 <== NOT EXECUTED
550ce: 600e bras 550de <fat_get_fat_cluster+0x14a> <== NOT EXECUTED
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(sec_buf + ofs));
550d0: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
*ret_val = CF_LE_L(*ret_val);
550d4: 2f30 1800 movel %a0@(00000000,%d1:l),%sp@- <== NOT EXECUTED
550d8: 4eba fe82 jsr %pc@(54f5c <m68k_swap_u32>) <== NOT EXECUTED
550dc: 588f addql #4,%sp <== NOT EXECUTED
550de: 2480 movel %d0,%a2@
break;
550e0: 6012 bras 550f4 <fat_get_fat_cluster+0x160>
default:
rtems_set_errno_and_return_minus_one(EIO);
550e2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
550e8: 76ff moveq #-1,%d3 <== NOT EXECUTED
550ea: 2040 moveal %d0,%a0 <== NOT EXECUTED
550ec: 7005 moveq #5,%d0 <== NOT EXECUTED
550ee: 2080 movel %d0,%a0@ <== NOT EXECUTED
550f0: 6002 bras 550f4 <fat_get_fat_cluster+0x160> <== NOT EXECUTED
*ret_val = (*(sec_buf + ofs));
if ( ofs == (fs_info->vol.bps - 1) )
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&sec_buf);
if (rc != RC_OK)
550f2: 2600 movel %d0,%d3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
550f4: 2003 movel %d3,%d0
550f6: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
550fc: 4e5e unlk %fp <== NOT EXECUTED
000509f6 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
509f6: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
509fa: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
509fe: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
50a02: 47f9 0004 4e24 lea 44e24 <realloc>,%a3 <== NOT EXECUTED
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
50a08: 6072 bras 50a7c <fat_get_unique_ino+0x86> <== NOT EXECUTED
{
for (j = 0; j < fs_info->uino_pool_size; j++)
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
50a0a: 222a 006e movel %a2@(110),%d1 <== NOT EXECUTED
50a0e: 2401 movel %d1,%d2 <== NOT EXECUTED
50a10: e68a lsrl #3,%d2 <== NOT EXECUTED
50a12: 7607 moveq #7,%d3 <== NOT EXECUTED
50a14: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED
50a18: d3c2 addal %d2,%a1 <== NOT EXECUTED
50a1a: 1411 moveb %a1@,%d2 <== NOT EXECUTED
50a1c: c681 andl %d1,%d3 <== NOT EXECUTED
50a1e: 1802 moveb %d2,%d4 <== NOT EXECUTED
50a20: 49c4 extbl %d4 <== NOT EXECUTED
50a22: 0704 btst %d3,%d4 <== NOT EXECUTED
50a24: 6612 bnes 50a38 <fat_get_unique_ino+0x42> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
50a26: 7001 moveq #1,%d0 <== NOT EXECUTED
50a28: e7a8 lsll %d3,%d0 <== NOT EXECUTED
50a2a: 8082 orl %d2,%d0 <== NOT EXECUTED
50a2c: 1280 moveb %d0,%a1@ <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
50a2e: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED
50a32: d0aa 0076 addl %a2@(118),%d0 <== NOT EXECUTED
50a36: 604c bras 50a84 <fat_get_unique_ino+0x8e> <== NOT EXECUTED
}
fs_info->index++;
50a38: 5281 addql #1,%d1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
50a3a: b1c1 cmpal %d1,%a0 <== NOT EXECUTED
50a3c: 6306 blss 50a44 <fat_get_unique_ino+0x4e> <== NOT EXECUTED
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
return (fs_info->uino_base + fs_info->index);
}
fs_info->index++;
50a3e: 2541 006e movel %d1,%a2@(110) <== NOT EXECUTED
50a42: 6004 bras 50a48 <fat_get_unique_ino+0x52> <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
50a44: 42aa 006e clrl %a2@(110) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
50a48: 5280 addql #1,%d0 <== NOT EXECUTED
50a4a: b1c0 cmpal %d0,%a0 <== NOT EXECUTED
50a4c: 66bc bnes 50a0a <fat_get_unique_ino+0x14> <== 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))
50a4e: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED
50a54: 92aa 0076 subl %a2@(118),%d1 <== NOT EXECUTED
50a58: d080 addl %d0,%d0 <== NOT EXECUTED
50a5a: b280 cmpl %d0,%d1 <== NOT EXECUTED
50a5c: 6204 bhis 50a62 <fat_get_unique_ino+0x6c> <== NOT EXECUTED
resrc_unsuff = true;
}
else
resrc_unsuff = true;
}
return 0;
50a5e: 4280 clrl %d0 <== NOT EXECUTED
50a60: 6022 bras 50a84 <fat_get_unique_ino+0x8e> <== NOT EXECUTED
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
50a62: 2540 0072 movel %d0,%a2@(114) <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
50a66: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50a68: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED
50a6c: 4e93 jsr %a3@ <== NOT EXECUTED
if (fs_info->uino != NULL)
50a6e: 508f addql #8,%sp <== NOT EXECUTED
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
{
fs_info->uino_pool_size <<= 1;
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
50a70: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED
if (fs_info->uino != NULL)
50a74: 67e8 beqs 50a5e <fat_get_unique_ino+0x68> <== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
50a76: 256a 0072 006e movel %a2@(114),%a2@(110) <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
50a7c: 206a 0072 moveal %a2@(114),%a0 <== NOT EXECUTED
50a80: 4280 clrl %d0 <== NOT EXECUTED
50a82: 60c6 bras 50a4a <fat_get_unique_ino+0x54> <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
50a84: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED
50a8a: 4e5e unlk %fp <== NOT EXECUTED
00050984 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
50984: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
50988: 48d7 3c00 moveml %a2-%a5,%sp@ <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
5098c: 264e moveal %fp,%a3 <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
5098e: 49f9 0004 fe54 lea 4fe54 <fat_cluster_set>,%a4 <== NOT EXECUTED
if ( ret != fs_info->vol.bpc )
{
return -1;
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
50994: 4bf9 0005 4f94 lea 54f94 <fat_get_fat_cluster>,%a5 <== NOT EXECUTED
uint32_t start_cln
)
{
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
5099a: 272e 000c movel %fp@(12),%a3@- <== NOT EXECUTED
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
5099e: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
509a2: 6032 bras 509d6 <fat_init_clusters_chain+0x52> <== NOT EXECUTED
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
509a4: 4281 clrl %d1 <== NOT EXECUTED
509a6: 42a7 clrl %sp@- <== NOT EXECUTED
509a8: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED
509ac: 2f01 movel %d1,%sp@- <== NOT EXECUTED
509ae: 42a7 clrl %sp@- <== NOT EXECUTED
509b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
509b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
509b4: 4e94 jsr %a4@ <== NOT EXECUTED
if ( ret != fs_info->vol.bpc )
509b6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
509ba: 4281 clrl %d1 <== NOT EXECUTED
509bc: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED
509c0: b280 cmpl %d0,%d1 <== NOT EXECUTED
509c2: 6626 bnes 509ea <fat_init_clusters_chain+0x66> <== NOT EXECUTED
{
return -1;
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
509c4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
509c6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
509ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED
509cc: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
509ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
509d2: 4a80 tstl %d0 <== NOT EXECUTED
509d4: 6616 bnes 509ec <fat_init_clusters_chain+0x68> <== NOT EXECUTED
{
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
509d6: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
509da: 2200 movel %d0,%d1 <== NOT EXECUTED
509dc: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED
509e0: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED
509e4: 65be bcss 509a4 <fat_init_clusters_chain+0x20> <== NOT EXECUTED
return rc;
}
}
return rc;
509e6: 4280 clrl %d0 <== NOT EXECUTED
509e8: 6002 bras 509ec <fat_init_clusters_chain+0x68> <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
if ( ret != fs_info->vol.bpc )
{
return -1;
509ea: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
return rc;
}
509ec: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED
509f2: 4e5e unlk %fp <== NOT EXECUTED
00050058 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
{
50058: 4e56 ff64 linkw %fp,#-156
5005c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(device, O_RDWR);
50060: 4878 0002 pea 2 <DOUBLE_FLOAT>
50064: 2f2e 000c movel %fp@(12),%sp@-
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
{
50068: 266e 0008 moveal %fp@(8),%a3
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;
5006c: 42ae ffaa clrl %fp@(-86)
vol->fd = open(device, O_RDWR);
50070: 4eb9 0004 4c34 jsr 44c34 <open>
if (vol->fd < 0)
50076: 508f addql #8,%sp
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(device, O_RDWR);
50078: 2740 0056 movel %d0,%a3@(86)
if (vol->fd < 0)
5007c: 6c10 bges 5008e <fat_init_volume_info+0x36> <== ALWAYS TAKEN
{
rtems_set_errno_and_return_minus_one(ENXIO);
5007e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
50084: 7606 moveq #6,%d3 <== NOT EXECUTED
50086: 2040 moveal %d0,%a0 <== NOT EXECUTED
50088: 2083 movel %d3,%a0@ <== NOT EXECUTED
5008a: 6000 06fc braw 50788 <fat_init_volume_info+0x730> <== NOT EXECUTED
}
rc = fstat(vol->fd, &stat_buf);
5008e: 486e ffba pea %fp@(-70)
50092: 2f00 movel %d0,%sp@-
50094: 4eb9 0004 3fd4 jsr 43fd4 <fstat>
if (rc != 0)
5009a: 508f addql #8,%sp
5009c: 4a80 tstl %d0
5009e: 6702 beqs 500a2 <fat_init_volume_info+0x4a> <== ALWAYS TAKEN
500a0: 6030 bras 500d2 <fat_init_volume_info+0x7a> <== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
500a2: 202e ffc6 movel %fp@(-58),%d0
500a6: 0280 0000 f000 andil #61440,%d0
500ac: 0c80 0000 6000 cmpil #24576,%d0
500b2: 6702 beqs 500b6 <fat_init_volume_info+0x5e> <== ALWAYS TAKEN
500b4: 601c bras 500d2 <fat_init_volume_info+0x7a> <== NOT EXECUTED
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
500b6: 486b 005a pea %a3@(90)
500ba: 2f3c 4004 4209 movel #1074020873,%sp@-
500c0: 2f2b 0056 movel %a3@(86),%sp@-
500c4: 4eb9 0005 1600 jsr 51600 <ioctl>
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* check that device is registred as block device and lock it */
rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd);
if (rc != 0) {
500ca: 4fef 000c lea %sp@(12),%sp
500ce: 4a80 tstl %d0
500d0: 671a beqs 500ec <fat_init_volume_info+0x94> <== ALWAYS TAKEN
close(vol->fd);
500d2: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
500d6: 7406 moveq #6,%d2 <== 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);
500d8: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
500de: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
500e4: 2040 moveal %d0,%a0 <== NOT EXECUTED
500e6: 2082 movel %d2,%a0@ <== NOT EXECUTED
500e8: 6000 05ac braw 50696 <fat_init_volume_info+0x63e> <== NOT EXECUTED
}
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dd, 0, &block);
500ec: 486e ffaa pea %fp@(-86)
500f0: 42a7 clrl %sp@-
500f2: 2f2b 005a movel %a3@(90),%sp@-
500f6: 4eb9 0004 dfcc jsr 4dfcc <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL)
500fc: 4fef 000c lea %sp@(12),%sp
50100: 4a80 tstl %d0
50102: 6704 beqs 50108 <fat_init_volume_info+0xb0> <== ALWAYS TAKEN
50104: 6000 00d6 braw 501dc <fat_init_volume_info+0x184> <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
50108: 206e ffaa moveal %fp@(-86),%a0
5010c: 2268 001a moveal %a0@(26),%a1
50110: 1229 000e moveb %a1@(14),%d1
50114: 1e29 0013 moveb %a1@(19),%d7
50118: 1829 000f moveb %a1@(15),%d4
5011c: 3441 moveaw %d1,%a2
5011e: 1229 0014 moveb %a1@(20),%d1
50122: 1d47 ff95 moveb %d7,%fp@(-107)
50126: 1e29 0016 moveb %a1@(22),%d7
5012a: 1d41 ff94 moveb %d1,%fp@(-108)
5012e: 1229 0017 moveb %a1@(23),%d1
50132: 1d47 ff93 moveb %d7,%fp@(-109)
50136: 1e29 0020 moveb %a1@(32),%d7
5013a: 1d41 ff92 moveb %d1,%fp@(-110)
5013e: 1229 0021 moveb %a1@(33),%d1
50142: 1d47 ff91 moveb %d7,%fp@(-111)
50146: 1e29 0022 moveb %a1@(34),%d7
5014a: 1d41 ff9c moveb %d1,%fp@(-100)
5014e: 1229 0023 moveb %a1@(35),%d1
50152: 1d47 ff9b moveb %d7,%fp@(-101)
50156: 1e29 0024 moveb %a1@(36),%d7
5015a: 1d41 ff99 moveb %d1,%fp@(-103)
5015e: 1229 0025 moveb %a1@(37),%d1
50162: 1a29 0011 moveb %a1@(17),%d5
50166: 1d47 ff9a moveb %d7,%fp@(-102)
5016a: 1e29 0026 moveb %a1@(38),%d7
5016e: 1d41 ffa2 moveb %d1,%fp@(-94)
50172: 1229 0027 moveb %a1@(39),%d1
50176: 1d44 ff90 moveb %d4,%fp@(-112)
5017a: 3845 moveaw %d5,%a4
5017c: 1029 000c moveb %a1@(12),%d0
50180: 1c29 000b moveb %a1@(11),%d6
50184: 1429 000d moveb %a1@(13),%d2
50188: 1829 0010 moveb %a1@(16),%d4
5018c: 1a29 0012 moveb %a1@(18),%d5
50190: 1d47 ff9d moveb %d7,%fp@(-99)
50194: 1d41 ff8f moveb %d1,%fp@(-113)
50198: 1e29 002c moveb %a1@(44),%d7
5019c: 1229 002d moveb %a1@(45),%d1
501a0: 1d47 ffa5 moveb %d7,%fp@(-91)
501a4: 1d41 ffa4 moveb %d1,%fp@(-92)
501a8: 1e29 002e moveb %a1@(46),%d7
501ac: 1229 002f moveb %a1@(47),%d1
501b0: 1d47 ffa3 moveb %d7,%fp@(-93)
501b4: 1d41 ffa1 moveb %d1,%fp@(-95)
501b8: 1e29 0030 moveb %a1@(48),%d7
501bc: 1229 0031 moveb %a1@(49),%d1
501c0: 1629 0028 moveb %a1@(40),%d3
sc = rtems_bdbuf_release( block);
501c4: 2f08 movel %a0,%sp@-
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
501c6: 3a40 moveaw %d0,%a5
501c8: 1d47 ffa7 moveb %d7,%fp@(-89)
501cc: 1d41 ffa6 moveb %d1,%fp@(-90)
sc = rtems_bdbuf_release( block);
501d0: 4eb9 0004 e158 jsr 4e158 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
501d6: 588f addql #4,%sp
501d8: 4a80 tstl %d0
501da: 671a beqs 501f6 <fat_init_volume_info+0x19e> <== ALWAYS TAKEN
{
close(vol->fd);
501dc: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
501e0: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
501e6: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
501ec: 7205 moveq #5,%d1 <== NOT EXECUTED
501ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
501f0: 2081 movel %d1,%a0@ <== NOT EXECUTED
501f2: 6000 04a2 braw 50696 <fat_init_volume_info+0x63e> <== NOT EXECUTED
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
501f6: 4280 clrl %d0
501f8: 320d movew %a5,%d1
501fa: 1001 moveb %d1,%d0
501fc: 4281 clrl %d1
501fe: 1206 moveb %d6,%d1
50200: e188 lsll #8,%d0
50202: 8081 orl %d1,%d0
50204: 3240 moveaw %d0,%a1
50206: 3680 movew %d0,%a3@
if ( (vol->bps != 512) &&
50208: 4280 clrl %d0
5020a: 3009 movew %a1,%d0
5020c: 0c80 0000 0200 cmpil #512,%d0
50212: 671c beqs 50230 <fat_init_volume_info+0x1d8> <== ALWAYS TAKEN
50214: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED
5021a: 6714 beqs 50230 <fat_init_volume_info+0x1d8> <== NOT EXECUTED
(vol->bps != 1024) &&
5021c: 0c80 0000 0800 cmpil #2048,%d0 <== NOT EXECUTED
50222: 670c beqs 50230 <fat_init_volume_info+0x1d8> <== NOT EXECUTED
(vol->bps != 2048) &&
50224: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED
5022a: 6704 beqs 50230 <fat_init_volume_info+0x1d8> <== NOT EXECUTED
5022c: 6000 0296 braw 504c4 <fat_init_volume_info+0x46c> <== NOT EXECUTED
(vol->bps != 4096))
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
50230: 7209 moveq #9,%d1
50232: 4200 clrb %d0
50234: 1740 0003 moveb %d0,%a3@(3)
50238: 4280 clrl %d0
5023a: 3009 movew %a1,%d0
5023c: e2a8 lsrl %d1,%d0
5023e: 600c bras 5024c <fat_init_volume_info+0x1f4>
i >>= 1, vol->sec_mul++);
50240: e280 asrl #1,%d0 <== NOT EXECUTED
50242: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED
50246: 5281 addql #1,%d1 <== NOT EXECUTED
50248: 1741 0003 moveb %d1,%a3@(3) <== NOT EXECUTED
(vol->bps != 4096))
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
5024c: 0800 0000 btst #0,%d0
50250: 67ee beqs 50240 <fat_init_volume_info+0x1e8> <== NEVER TAKEN
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
50252: 4280 clrl %d0
50254: 4206 clrb %d6
50256: 3009 movew %a1,%d0
50258: 1746 0002 moveb %d6,%a3@(2)
5025c: 2c00 movel %d0,%d6
5025e: 6008 bras 50268 <fat_init_volume_info+0x210>
i >>= 1, vol->sec_log2++);
50260: 5281 addql #1,%d1
50262: e286 asrl #1,%d6
50264: 1741 0002 moveb %d1,%a3@(2)
50268: 122b 0002 moveb %a3@(2),%d1
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
5026c: 0806 0000 btst #0,%d6
50270: 67ee beqs 50260 <fat_init_volume_info+0x208>
i >>= 1, vol->sec_log2++);
vol->bytes_per_block = vol->bps;
vol->bytes_per_block_log2 = vol->sec_log2;
vol->sectors_per_block = 1;
50272: 7e01 moveq #1,%d7
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
i >>= 1, vol->sec_log2++);
vol->bytes_per_block = vol->bps;
50274: 3749 000a movew %a1,%a3@(10)
vol->bytes_per_block_log2 = vol->sec_log2;
50278: 1741 000c moveb %d1,%a3@(12)
vol->sectors_per_block = 1;
5027c: 1747 0009 moveb %d7,%a3@(9)
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
50280: 1742 0004 moveb %d2,%a3@(4)
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
50284: 6604 bnes 5028a <fat_init_volume_info+0x232> <== ALWAYS TAKEN
50286: 6000 023c braw 504c4 <fat_init_volume_info+0x46c> <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
5028a: 4206 clrb %d6
5028c: 1746 0005 moveb %d6,%a3@(5)
50290: 4286 clrl %d6
50292: 1c02 moveb %d2,%d6
50294: 6010 bras 502a6 <fat_init_volume_info+0x24e>
i >>= 1, vol->spc_log2++);
50296: e286 asrl #1,%d6
50298: 1e2b 0005 moveb %a3@(5),%d7
5029c: 3a47 moveaw %d7,%a5
5029e: 528d addql #1,%a5
502a0: 3e0d movew %a5,%d7
502a2: 1747 0005 moveb %d7,%a3@(5)
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
502a6: 0806 0000 btst #0,%d6
502aa: 67ea beqs 50296 <fat_init_volume_info+0x23e>
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)
502ac: 4286 clrl %d6
502ae: 1c2b 0005 moveb %a3@(5),%d6
502b2: 2e00 movel %d0,%d7
502b4: edaf lsll %d6,%d7
502b6: 2c07 movel %d7,%d6
502b8: 3747 0006 movew %d7,%a3@(6)
502bc: 4287 clrl %d7
502be: 3e06 movew %d6,%d7
502c0: 2a47 moveal %d7,%a5
502c2: bbfc 0000 8000 cmpal #32768,%a5
502c8: 6304 blss 502ce <fat_init_volume_info+0x276> <== ALWAYS TAKEN
502ca: 6000 01f8 braw 504c4 <fat_init_volume_info+0x46c> <== NOT EXECUTED
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
502ce: 4207 clrb %d7
502d0: 0286 0000 ffff andil #65535,%d6
502d6: 1747 0008 moveb %d7,%a3@(8)
502da: 6010 bras 502ec <fat_init_volume_info+0x294>
i >>= 1, vol->bpc_log2++);
502dc: e286 asrl #1,%d6
502de: 1e2b 0008 moveb %a3@(8),%d7
502e2: 3a47 moveaw %d7,%a5
502e4: 528d addql #1,%a5
502e6: 3e0d movew %a5,%d7
502e8: 1747 0008 moveb %d7,%a3@(8)
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
502ec: 0806 0000 btst #0,%d6
502f0: 67ea beqs 502dc <fat_init_volume_info+0x284>
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);
502f2: 4286 clrl %d6
502f4: 1c2e ff90 moveb %fp@(-112),%d6
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
502f8: 2040 moveal %d0,%a0
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
502fa: 3e0a movew %a2,%d7
502fc: e18e lsll #8,%d6
}
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
502fe: 1744 000d moveb %d4,%a3@(13)
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
50302: 0287 0000 00ff andil #255,%d7
50308: 8c87 orl %d7,%d6
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
5030a: 4287 clrl %d7
5030c: 1e05 moveb %d5,%d7
5030e: 3a0c movew %a4,%d5
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);
50310: 3246 moveaw %d6,%a1
50312: 3746 0018 movew %d6,%a3@(24)
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
50316: e18f lsll #8,%d7
50318: 4286 clrl %d6
5031a: 1c05 moveb %d5,%d6
5031c: 8e86 orl %d6,%d7
5031e: 3747 0022 movew %d7,%a3@(34)
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
50322: eb8f lsll #5,%d7
50324: 41f0 78ff lea %a0@(ffffffff,%d7:l),%a0
50328: 2c08 movel %a0,%d6
5032a: 4c40 6806 remsl %d0,%d6,%d6
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
5032e: 4280 clrl %d0
50330: 1001 moveb %d1,%d0
50332: 2206 movel %d6,%d1
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
50334: 4287 clrl %d7
50336: 1e2e ff93 moveb %fp@(-109),%d7
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
5033a: e1a9 lsll %d0,%d1
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
5033c: 4280 clrl %d0
5033e: 102e ff92 moveb %fp@(-110),%d0
50342: e188 lsll #8,%d0
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)) /
50344: 2746 0024 movel %d6,%a3@(36)
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
50348: 8087 orl %d7,%d0
/* calculate the count of sectors occupied by the root directory */
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
5034a: 2741 0028 movel %d1,%a3@(40)
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
5034e: 4a40 tstw %d0
50350: 6708 beqs 5035a <fat_init_volume_info+0x302> <== NEVER TAKEN
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
50352: 0280 0000 ffff andil #65535,%d0
50358: 6026 bras 50380 <fat_init_volume_info+0x328>
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
5035a: 4280 clrl %d0 <== NOT EXECUTED
5035c: 4287 clrl %d7 <== NOT EXECUTED
5035e: 102e ffa2 moveb %fp@(-94),%d0 <== NOT EXECUTED
50362: 1e2e ff9d moveb %fp@(-99),%d7 <== NOT EXECUTED
50366: e188 lsll #8,%d0 <== NOT EXECUTED
50368: 4847 swap %d7 <== NOT EXECUTED
5036a: 4247 clrw %d7 <== NOT EXECUTED
5036c: 1a2e ff8f moveb %fp@(-113),%d5 <== NOT EXECUTED
50370: 8087 orl %d7,%d0 <== NOT EXECUTED
50372: 4287 clrl %d7 <== NOT EXECUTED
50374: 1e2e ff9a moveb %fp@(-102),%d7 <== NOT EXECUTED
50378: 8087 orl %d7,%d0 <== NOT EXECUTED
5037a: 7e18 moveq #24,%d7 <== NOT EXECUTED
5037c: efad lsll %d7,%d5 <== NOT EXECUTED
5037e: 8085 orl %d5,%d0 <== NOT EXECUTED
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
50380: 4281 clrl %d1
50382: 1204 moveb %d4,%d1
50384: 41eb 001a lea %a3@(26),%a0
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);
50388: 2740 001a movel %d0,%a3@(26)
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
5038c: 4c10 1800 mulsl %a0@,%d1
50390: 4280 clrl %d0
50392: 3009 movew %a1,%d0
50394: d280 addl %d0,%d1
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
50396: 4280 clrl %d0
50398: 102e ff94 moveb %fp@(-108),%d0
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 +
5039c: dc81 addl %d1,%d6
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
5039e: 2741 001e movel %d1,%a3@(30)
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
503a2: 4281 clrl %d1
503a4: 122e ff95 moveb %fp@(-107),%d1
503a8: e188 lsll #8,%d0
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 +
503aa: 2746 0030 movel %d6,%a3@(48)
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)
503ae: 8081 orl %d1,%d0
503b0: 4a40 tstw %d0
503b2: 6708 beqs 503bc <fat_init_volume_info+0x364> <== NEVER TAKEN
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
503b4: 0280 0000 ffff andil #65535,%d0
503ba: 6026 bras 503e2 <fat_init_volume_info+0x38a>
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
503bc: 4280 clrl %d0 <== NOT EXECUTED
503be: 4281 clrl %d1 <== NOT EXECUTED
503c0: 102e ff9c moveb %fp@(-100),%d0 <== NOT EXECUTED
503c4: 122e ff9b moveb %fp@(-101),%d1 <== NOT EXECUTED
503c8: 7818 moveq #24,%d4 <== NOT EXECUTED
503ca: 4841 swap %d1 <== NOT EXECUTED
503cc: 4241 clrw %d1 <== NOT EXECUTED
503ce: e188 lsll #8,%d0 <== NOT EXECUTED
503d0: 8081 orl %d1,%d0 <== NOT EXECUTED
503d2: 4281 clrl %d1 <== NOT EXECUTED
503d4: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED
503d8: 8081 orl %d1,%d0 <== NOT EXECUTED
503da: 122e ff99 moveb %fp@(-103),%d1 <== NOT EXECUTED
503de: e9a9 lsll %d4,%d1 <== NOT EXECUTED
503e0: 8081 orl %d1,%d0 <== NOT EXECUTED
503e2: 2740 002c movel %d0,%a3@(44)
data_secs = vol->tot_secs - vol->data_fsec;
503e6: 2a2b 002c movel %a3@(44),%d5
503ea: 9a86 subl %d6,%d5
503ec: 2c05 movel %d5,%d6
vol->data_cls = data_secs / vol->spc;
503ee: 0282 0000 00ff andil #255,%d2
503f4: 4c42 6006 remul %d2,%d6,%d6
503f8: 2746 0034 movel %d6,%a3@(52)
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
503fc: 0c86 0000 0ff4 cmpil #4084,%d6
50402: 621a bhis 5041e <fat_init_volume_info+0x3c6> <== NEVER TAKEN
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
50404: 2e3c 0000 0fff movel #4095,%d7
vol->eoc_val = FAT_FAT12_EOC;
5040a: 307c 0ff8 moveaw #4088,%a0
vol->data_cls = data_secs / vol->spc;
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
5040e: 7c01 moveq #1,%d6
vol->mask = FAT_FAT12_MASK;
50410: 2747 0010 movel %d7,%a3@(16)
vol->data_cls = data_secs / vol->spc;
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
50414: 1746 000e moveb %d6,%a3@(14)
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
50418: 2748 0014 movel %a0,%a3@(20)
5041c: 603e bras 5045c <fat_init_volume_info+0x404>
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
5041e: 0c86 0000 fff4 cmpil #65524,%d6 <== NOT EXECUTED
50424: 621c bhis 50442 <fat_init_volume_info+0x3ea> <== NOT EXECUTED
{
vol->type = FAT_FAT16;
vol->mask = FAT_FAT16_MASK;
50426: 223c 0000 ffff movel #65535,%d1 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
5042c: 243c 0000 fff8 movel #65528,%d2 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
50432: 7002 moveq #2,%d0 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
50434: 2741 0010 movel %d1,%a3@(16) <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
50438: 1740 000e moveb %d0,%a3@(14) <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
5043c: 2742 0014 movel %d2,%a3@(20) <== NOT EXECUTED
50440: 601a bras 5045c <fat_init_volume_info+0x404> <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
50442: 7804 moveq #4,%d4 <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
50444: 2a3c 0fff ffff movel #268435455,%d5 <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
5044a: 2c3c 0fff fff8 movel #268435448,%d6 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
50450: 1744 000e moveb %d4,%a3@(14) <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
50454: 2745 0010 movel %d5,%a3@(16) <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
50458: 2746 0014 movel %d6,%a3@(20) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
5045c: 4280 clrl %d0
5045e: 102b 000e moveb %a3@(14),%d0
50462: 7e04 moveq #4,%d7
50464: be80 cmpl %d0,%d7
50466: 6600 018c bnew 505f4 <fat_init_volume_info+0x59c>
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
5046a: 4280 clrl %d0 <== NOT EXECUTED
5046c: 4281 clrl %d1 <== NOT EXECUTED
5046e: 102e ffa4 moveb %fp@(-92),%d0 <== NOT EXECUTED
50472: 122e ffa3 moveb %fp@(-93),%d1 <== NOT EXECUTED
50476: e188 lsll #8,%d0 <== NOT EXECUTED
50478: 4841 swap %d1 <== NOT EXECUTED
5047a: 4241 clrw %d1 <== NOT EXECUTED
5047c: 182e ffa1 moveb %fp@(-95),%d4 <== NOT EXECUTED
50480: 8081 orl %d1,%d0 <== NOT EXECUTED
50482: 4281 clrl %d1 <== NOT EXECUTED
50484: 122e ffa5 moveb %fp@(-91),%d1 <== NOT EXECUTED
50488: 8081 orl %d1,%d0 <== NOT EXECUTED
5048a: 7218 moveq #24,%d1 <== NOT EXECUTED
5048c: e3ac lsll %d1,%d4 <== NOT EXECUTED
5048e: 8084 orl %d4,%d0 <== NOT EXECUTED
50490: 2740 0038 movel %d0,%a3@(56) <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
50494: 7080 moveq #-128,%d0 <== NOT EXECUTED
50496: c083 andl %d3,%d0 <== NOT EXECUTED
50498: 1740 004e moveb %d0,%a3@(78) <== NOT EXECUTED
if (vol->mirror)
5049c: 670a beqs 504a8 <fat_init_volume_info+0x450> <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
5049e: 740f moveq #15,%d2 <== NOT EXECUTED
504a0: c682 andl %d2,%d3 <== NOT EXECUTED
504a2: 1743 0054 moveb %d3,%a3@(84) <== NOT EXECUTED
504a6: 6006 bras 504ae <fat_init_volume_info+0x456> <== NOT EXECUTED
else
vol->afat = 0;
504a8: 4204 clrb %d4 <== NOT EXECUTED
504aa: 1744 0054 moveb %d4,%a3@(84) <== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
504ae: 4280 clrl %d0 <== NOT EXECUTED
504b0: 102e ffa6 moveb %fp@(-90),%d0 <== NOT EXECUTED
504b4: 4281 clrl %d1 <== NOT EXECUTED
504b6: 122e ffa7 moveb %fp@(-89),%d1 <== NOT EXECUTED
504ba: e188 lsll #8,%d0 <== NOT EXECUTED
504bc: 8081 orl %d1,%d0 <== NOT EXECUTED
504be: 3740 003c movew %d0,%a3@(60) <== NOT EXECUTED
if( vol->info_sec == 0 )
504c2: 661a bnes 504de <fat_init_volume_info+0x486> <== NOT EXECUTED
{
close(vol->fd);
504c4: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
504c8: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
504ce: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
504d4: 2040 moveal %d0,%a0 <== NOT EXECUTED
504d6: 7016 moveq #22,%d0 <== NOT EXECUTED
504d8: 2080 movel %d0,%a0@ <== NOT EXECUTED
504da: 6000 01ba braw 50696 <fat_init_volume_info+0x63e> <== NOT EXECUTED
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , 0,
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
504de: 260e movel %fp,%d3 <== NOT EXECUTED
504e0: 0683 ffff ffae addil #-82,%d3 <== NOT EXECUTED
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , 0,
504e6: 45f9 0004 fd40 lea 4fd40 <_fat_block_read>,%a2 <== NOT EXECUTED
504ec: 2f03 movel %d3,%sp@- <== NOT EXECUTED
504ee: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
504f2: 42a7 clrl %sp@- <== NOT EXECUTED
504f4: 3f00 movew %d0,%sp@- <== NOT EXECUTED
504f6: 4267 clrw %sp@- <== NOT EXECUTED
504f8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
504fa: 4e92 jsr %a2@ <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
504fc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50500: 4a80 tstl %d0 <== NOT EXECUTED
50502: 6c0e bges 50512 <fat_init_volume_info+0x4ba> <== NOT EXECUTED
{
close(vol->fd);
50504: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
50508: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
5050e: 6000 0186 braw 50696 <fat_init_volume_info+0x63e> <== NOT EXECUTED
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
50512: 4281 clrl %d1 <== NOT EXECUTED
50514: 4282 clrl %d2 <== NOT EXECUTED
50516: 122e ffaf moveb %fp@(-81),%d1 <== NOT EXECUTED
5051a: 142e ffb0 moveb %fp@(-80),%d2 <== NOT EXECUTED
5051e: 4280 clrl %d0 <== NOT EXECUTED
50520: 102e ffae moveb %fp@(-82),%d0 <== NOT EXECUTED
50524: 4842 swap %d2 <== NOT EXECUTED
50526: 4242 clrw %d2 <== NOT EXECUTED
50528: e189 lsll #8,%d1 <== NOT EXECUTED
5052a: 8282 orl %d2,%d1 <== NOT EXECUTED
5052c: 4282 clrl %d2 <== NOT EXECUTED
5052e: 142e ffb1 moveb %fp@(-79),%d2 <== NOT EXECUTED
50532: 8280 orl %d0,%d1 <== NOT EXECUTED
50534: 7018 moveq #24,%d0 <== NOT EXECUTED
50536: e1aa lsll %d0,%d2 <== NOT EXECUTED
50538: 8282 orl %d2,%d1 <== NOT EXECUTED
5053a: 0c81 4161 5252 cmpil #1096897106,%d1 <== NOT EXECUTED
50540: 6722 beqs 50564 <fat_init_volume_info+0x50c> <== NOT EXECUTED
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
50542: 2f0b movel %a3,%sp@- <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(fs_info);
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
50544: 7e16 moveq #22,%d7 <== NOT EXECUTED
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
50546: 4eb9 0004 faee jsr 4faee <fat_buf_release> <== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(fs_info);
close(vol->fd);
5054c: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
50550: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
50556: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
5055c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5055e: 2087 movel %d7,%a0@ <== NOT EXECUTED
50560: 6000 01ae braw 50710 <fat_init_volume_info+0x6b8> <== NOT EXECUTED
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
50564: 2f03 movel %d3,%sp@- <== NOT EXECUTED
50566: 4878 000c pea c <OPER1> <== NOT EXECUTED
5056a: 4280 clrl %d0 <== NOT EXECUTED
5056c: 4878 01e4 pea 1e4 <DBL_MANT_DIG+0x1af> <== NOT EXECUTED
50570: 302b 003c movew %a3@(60),%d0 <== NOT EXECUTED
50574: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50576: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50578: 4e92 jsr %a2@ <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
5057a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5057e: 4a80 tstl %d0 <== NOT EXECUTED
50580: 6c16 bges 50598 <fat_init_volume_info+0x540> <== NOT EXECUTED
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
50582: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50584: 4eb9 0004 faee jsr 4faee <fat_buf_release> <== NOT EXECUTED
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
{
_fat_block_release(fs_info);
close(vol->fd);
5058a: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
5058e: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
50594: 6000 017a braw 50710 <fat_init_volume_info+0x6b8> <== NOT EXECUTED
return -1;
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
50598: 4280 clrl %d0 <== NOT EXECUTED
5059a: 4281 clrl %d1 <== NOT EXECUTED
5059c: 102e ffb3 moveb %fp@(-77),%d0 <== NOT EXECUTED
505a0: 122e ffb4 moveb %fp@(-76),%d1 <== NOT EXECUTED
505a4: 7418 moveq #24,%d2 <== NOT EXECUTED
505a6: 4841 swap %d1 <== NOT EXECUTED
505a8: 4241 clrw %d1 <== NOT EXECUTED
505aa: e188 lsll #8,%d0 <== NOT EXECUTED
505ac: 8081 orl %d1,%d0 <== NOT EXECUTED
505ae: 4281 clrl %d1 <== NOT EXECUTED
505b0: 122e ffb2 moveb %fp@(-78),%d1 <== NOT EXECUTED
505b4: 8081 orl %d1,%d0 <== NOT EXECUTED
505b6: 122e ffb5 moveb %fp@(-75),%d1 <== NOT EXECUTED
505ba: e5a9 lsll %d2,%d1 <== NOT EXECUTED
505bc: 8081 orl %d1,%d0 <== NOT EXECUTED
vol->free_cls = vol->free_cls_in_fs_info;
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
505be: 4281 clrl %d1 <== NOT EXECUTED
505c0: 122e ffb8 moveb %fp@(-72),%d1 <== NOT EXECUTED
_fat_block_release(fs_info);
close(vol->fd);
return -1;
}
vol->free_cls_in_fs_info =
505c4: 2740 0042 movel %d0,%a3@(66) <== NOT EXECUTED
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->free_cls = vol->free_cls_in_fs_info;
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
505c8: 4841 swap %d1 <== NOT EXECUTED
505ca: 4241 clrw %d1 <== NOT EXECUTED
return -1;
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->free_cls = vol->free_cls_in_fs_info;
505cc: 2740 003e movel %d0,%a3@(62) <== NOT EXECUTED
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
505d0: 4280 clrl %d0 <== NOT EXECUTED
505d2: 102e ffb7 moveb %fp@(-73),%d0 <== NOT EXECUTED
505d6: e188 lsll #8,%d0 <== NOT EXECUTED
505d8: 8081 orl %d1,%d0 <== NOT EXECUTED
505da: 4281 clrl %d1 <== NOT EXECUTED
505dc: 122e ffb6 moveb %fp@(-74),%d1 <== NOT EXECUTED
505e0: 8081 orl %d1,%d0 <== NOT EXECUTED
505e2: 122e ffb9 moveb %fp@(-71),%d1 <== NOT EXECUTED
505e6: e5a9 lsll %d2,%d1 <== NOT EXECUTED
505e8: 8081 orl %d1,%d0 <== NOT EXECUTED
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
vol->free_cls = vol->free_cls_in_fs_info;
vol->next_cl_in_fs_info =
505ea: 2740 004a movel %d0,%a3@(74) <== NOT EXECUTED
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
vol->next_cl = vol->next_cl_in_fs_info;
505ee: 2740 0046 movel %d0,%a3@(70) <== NOT EXECUTED
505f2: 6018 bras 5060c <fat_init_volume_info+0x5b4> <== NOT EXECUTED
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = FAT_UNDEFINED_VALUE;
505f4: 7aff moveq #-1,%d5
}
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
505f6: 4204 clrb %d4
}
}
}
else
{
vol->rdir_cl = 0;
505f8: 42ab 0038 clrl %a3@(56)
vol->mirror = 0;
505fc: 1744 004e moveb %d4,%a3@(78)
vol->afat = 0;
50600: 1744 0054 moveb %d4,%a3@(84)
vol->free_cls = FAT_UNDEFINED_VALUE;
50604: 2745 003e movel %d5,%a3@(62)
vol->next_cl = FAT_UNDEFINED_VALUE;
50608: 2745 0046 movel %d5,%a3@(70)
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
5060c: 2f0b movel %a3,%sp@-
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
5060e: 45f9 0004 3c8c lea 43c8c <calloc>,%a2
* 0 on success, or -1 if error occured and errno set appropriately
*/
int
_fat_block_release(fat_fs_info_t *fs_info)
{
return fat_buf_release(fs_info);
50614: 4eb9 0004 faee jsr 4faee <fat_buf_release>
vol->next_cl = FAT_UNDEFINED_VALUE;
}
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
5061a: 4280 clrl %d0
5061c: 102b 0054 moveb %a3@(84),%d0
50620: 41eb 001a lea %a3@(26),%a0
50624: 4c10 0800 mulsl %a0@,%d0
50628: 4281 clrl %d1
5062a: 322b 0018 movew %a3@(24),%d1
5062e: d081 addl %d1,%d0
50630: 2740 0050 movel %d0,%a3@(80)
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
50634: 4878 000c pea c <OPER1>
50638: 4878 0002 pea 2 <DOUBLE_FLOAT>
5063c: 4e92 jsr %a2@
if ( fs_info->vhash == NULL )
5063e: 4fef 000c lea %sp@(12),%sp
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
50642: 2240 moveal %d0,%a1
50644: 2740 0062 movel %d0,%a3@(98)
if ( fs_info->vhash == NULL )
50648: 6736 beqs 50680 <fat_init_volume_info+0x628> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5064a: 41e9 0010 lea %a1@(16),%a0
5064e: 5880 addql #4,%d0
50650: 2348 000c movel %a0,%a1@(12)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50654: 41e9 000c lea %a1@(12),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
50658: 2280 movel %d0,%a1@
head->next = tail;
head->previous = NULL;
5065a: 42a9 0004 clrl %a1@(4)
tail->previous = head;
5065e: 2349 0008 movel %a1,%a1@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
50662: 42a9 0010 clrl %a1@(16)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50666: 2348 0014 movel %a0,%a1@(20)
}
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));
5066a: 4878 000c pea c <OPER1>
5066e: 4878 0002 pea 2 <DOUBLE_FLOAT>
50672: 4e92 jsr %a2@
if ( fs_info->rhash == NULL )
50674: 508f addql #8,%sp
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
50676: 2240 moveal %d0,%a1
50678: 2740 0066 movel %d0,%a3@(102)
if ( fs_info->rhash == NULL )
5067c: 661e bnes 5069c <fat_init_volume_info+0x644> <== ALWAYS TAKEN
5067e: 6070 bras 506f0 <fat_init_volume_info+0x698> <== 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);
50680: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
50684: 7c0c moveq #12,%d6 <== 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);
50686: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
5068c: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
50692: 2040 moveal %d0,%a0 <== NOT EXECUTED
50694: 2086 movel %d6,%a0@ <== NOT EXECUTED
50696: 588f addql #4,%sp <== NOT EXECUTED
50698: 6000 00ee braw 50788 <fat_init_volume_info+0x730> <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
5069c: 41e9 0010 lea %a1@(16),%a0
506a0: 5880 addql #4,%d0
506a2: 2348 000c movel %a0,%a1@(12)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
506a6: 41e9 000c lea %a1@(12),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
506aa: 2280 movel %d0,%a1@
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;
506ac: 203c 0000 0100 movel #256,%d0
head->next = tail;
head->previous = NULL;
506b2: 42a9 0004 clrl %a1@(4)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
506b6: 222b 002c movel %a3@(44),%d1
tail->previous = head;
506ba: 2349 0008 movel %a1,%a1@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
506be: 42a9 0010 clrl %a1@(16)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
506c2: 2348 0014 movel %a0,%a1@(20)
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;
506c6: 2740 0072 movel %d0,%a3@(114)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
506ca: 4280 clrl %d0
506cc: 102b 0003 moveb %a3@(3),%d0
506d0: e1a9 lsll %d0,%d1
fs_info->index = 0;
506d2: 42ab 006e clrl %a3@(110)
}
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;
506d6: e989 lsll #4,%d1
506d8: 2741 0076 movel %d1,%a3@(118)
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
506dc: 4878 0001 pea 1 <ADD>
506e0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
506e4: 4e92 jsr %a2@
if ( fs_info->uino == NULL )
506e6: 508f addql #8,%sp
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
506e8: 2740 006a movel %d0,%a3@(106)
if ( fs_info->uino == NULL )
506ec: 6654 bnes 50742 <fat_init_volume_info+0x6ea> <== ALWAYS TAKEN
506ee: 6024 bras 50714 <fat_init_volume_info+0x6bc> <== 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);
506f0: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
506f4: 7a0c moveq #12,%d5 <== 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);
506f6: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
free(fs_info->vhash);
506fc: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED
50700: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
50706: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
5070c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5070e: 2085 movel %d5,%a0@ <== NOT EXECUTED
50710: 508f addql #8,%sp <== NOT EXECUTED
50712: 6074 bras 50788 <fat_init_volume_info+0x730> <== 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);
50714: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
50718: 45f9 0004 3f4c lea 43f4c <free>,%a2 <== NOT EXECUTED
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
5071e: 780c moveq #12,%d4 <== 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);
50720: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
free(fs_info->vhash);
50726: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED
5072a: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->rhash);
5072c: 2f2b 0066 movel %a3@(102),%sp@- <== NOT EXECUTED
50730: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
50732: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
50738: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5073c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5073e: 2084 movel %d4,%a0@ <== NOT EXECUTED
50740: 6046 bras 50788 <fat_init_volume_info+0x730> <== NOT EXECUTED
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
50742: 4878 0001 pea 1 <ADD>
50746: 4280 clrl %d0
50748: 3013 movew %a3@,%d0
5074a: 2f00 movel %d0,%sp@-
5074c: 4e92 jsr %a2@
if (fs_info->sec_buf == NULL)
5074e: 508f addql #8,%sp
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));
50750: 2740 0084 movel %d0,%a3@(132)
if (fs_info->sec_buf == NULL)
50754: 6636 bnes 5078c <fat_init_volume_info+0x734> <== ALWAYS TAKEN
{
close(vol->fd);
50756: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
5075a: 45f9 0004 3f4c lea 43f4c <free>,%a2 <== NOT EXECUTED
free(fs_info->rhash);
free(fs_info->uino);
rtems_set_errno_and_return_minus_one( ENOMEM );
50760: 760c moveq #12,%d3 <== 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);
50762: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
free(fs_info->vhash);
50768: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED
5076c: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->rhash);
5076e: 2f2b 0066 movel %a3@(102),%sp@- <== NOT EXECUTED
50772: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->uino);
50774: 2f2b 006a movel %a3@(106),%sp@- <== NOT EXECUTED
50778: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
5077a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
50780: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
50784: 2040 moveal %d0,%a0 <== NOT EXECUTED
50786: 2083 movel %d3,%a0@ <== NOT EXECUTED
50788: 70ff moveq #-1,%d0 <== NOT EXECUTED
5078a: 6056 bras 507e2 <fat_init_volume_info+0x78a> <== NOT EXECUTED
return bytes_written;
}
static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num)
{
return (sec_num & (vol->spc - 1)) == 0;
5078c: 4280 clrl %d0
5078e: 102b 0004 moveb %a3@(4),%d0
50792: 5380 subql #1,%d0
50794: 2200 movel %d0,%d1
50796: c2ab 0030 andl %a3@(48),%d1
/*
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
5079a: 6704 beqs 507a0 <fat_init_volume_info+0x748> <== ALWAYS TAKEN
vol->bytes_per_block_log2 = vol->bpc_log2;
vol->sectors_per_block = vol->spc;
}
}
return RC_OK;
5079c: 4280 clrl %d0 <== NOT EXECUTED
5079e: 6042 bras 507e2 <fat_init_volume_info+0x78a> <== NOT EXECUTED
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
507a0: 4281 clrl %d1
507a2: 122b 000e moveb %a3@(14),%d1
507a6: 7404 moveq #4,%d2
507a8: b481 cmpl %d1,%d2
507aa: 6706 beqs 507b2 <fat_init_volume_info+0x75a> <== NEVER TAKEN
return bytes_written;
}
static bool is_cluster_aligned(const fat_vol_t *vol, uint32_t sec_num)
{
return (sec_num & (vol->spc - 1)) == 0;
507ac: c0ab 001e andl %a3@(30),%d0
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
507b0: 66ea bnes 5079c <fat_init_volume_info+0x744> <== NEVER TAKEN
{
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
507b2: 4878 0001 pea 1 <ADD>
507b6: 4280 clrl %d0
507b8: 302b 0006 movew %a3@(6),%d0
507bc: 2f00 movel %d0,%sp@-
507be: 2f2b 005a movel %a3@(90),%sp@-
507c2: 4eb9 0004 e506 jsr 4e506 <rtems_bdbuf_set_block_size>
if (sc == RTEMS_SUCCESSFUL)
507c8: 4fef 000c lea %sp@(12),%sp
507cc: 4a80 tstl %d0
507ce: 66cc bnes 5079c <fat_init_volume_info+0x744> <== NEVER TAKEN
{
vol->bytes_per_block = vol->bpc;
507d0: 376b 0006 000a movew %a3@(6),%a3@(10)
vol->bytes_per_block_log2 = vol->bpc_log2;
507d6: 176b 0008 000c moveb %a3@(8),%a3@(12)
vol->sectors_per_block = vol->spc;
507dc: 176b 0004 0009 moveb %a3@(4),%a3@(9)
}
}
return RC_OK;
}
507e2: 4cee 3cfc ff64 moveml %fp@(-156),%d2-%d7/%a2-%a5
507e8: 4e5e unlk %fp <== NOT EXECUTED
000553d8 <fat_scan_fat_for_free_clusters>:
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
553d8: 4e56 ffd0 linkw %fp,#-48
553dc: 122e 001f moveb %fp@(31),%d1
553e0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
553e4: 2a6e 0008 moveal %fp@(8),%a5
553e8: 246e 0014 moveal %fp@(20),%a2
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
553ec: 2a2d 0034 movel %a5@(52),%d5
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
553f0: 266e 000c moveal %fp@(12),%a3
553f4: 1d41 fffb moveb %d1,%fp@(-5)
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
553f8: 42ae fffc clrl %fp@(-4)
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
ssize_t bytes_written;
*cls_added = 0;
553fc: 4292 clrl %a2@
if (count == 0)
553fe: 4aae 0010 tstl %fp@(16)
55402: 6700 0166 beqw 5556a <fat_scan_fat_for_free_clusters+0x192>
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
55406: 2e2d 0046 movel %a5@(70),%d7
5540a: 70ff moveq #-1,%d0
5540c: b087 cmpl %d7,%d0
5540e: 6602 bnes 55412 <fat_scan_fat_for_free_clusters+0x3a>
uint32_t *last_cl,
bool zero_fill
)
{
int rc = RC_OK;
uint32_t cl4find = 2;
55410: 7e02 moveq #2,%d7
uint32_t next_cln = 0;
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
55412: 5485 addql #2,%d5
55414: 7802 moveq #2,%d4
55416: 4283 clrl %d3
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
55418: 49f9 0005 5100 lea 55100 <fat_set_fat_cluster>,%a4
5541e: 6000 00f6 braw 55516 <fat_scan_fat_for_free_clusters+0x13e>
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln);
55422: 486e fffc pea %fp@(-4)
55426: 2f07 movel %d7,%sp@-
55428: 2f0d movel %a5,%sp@-
5542a: 4eb9 0005 4f94 jsr 54f94 <fat_get_fat_cluster>
if ( rc != RC_OK )
55430: 4fef 000c lea %sp@(12),%sp
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln);
55434: 2400 movel %d0,%d2
if ( rc != RC_OK )
55436: 6716 beqs 5544e <fat_scan_fat_for_free_clusters+0x76><== ALWAYS TAKEN
{
if (*cls_added != 0)
55438: 4a92 tstl %a2@ <== NOT EXECUTED
5543a: 6700 0134 beqw 55570 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
5543e: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
55440: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55442: 4eb9 0005 5334 jsr 55334 <fat_free_fat_clusters_chain> <== NOT EXECUTED
55448: 508f addql #8,%sp <== NOT EXECUTED
5544a: 6000 0124 braw 55570 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
5544e: 4aae fffc tstl %fp@(-4)
55452: 6600 00b8 bnew 5550c <fat_scan_fat_for_free_clusters+0x134>
/*
* 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)
55456: 4a92 tstl %a2@
55458: 661e bnes 55478 <fat_scan_fat_for_free_clusters+0xa0><== NEVER TAKEN
{
*chain = cl4find;
5545a: 2687 movel %d7,%a3@
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
5545c: 4878 ffff pea ffffffff <LESS>
55460: 2f07 movel %d7,%sp@-
55462: 2f0d movel %a5,%sp@-
55464: 4e94 jsr %a4@
if ( rc != RC_OK )
55466: 4fef 000c lea %sp@(12),%sp
5546a: 4a80 tstl %d0
5546c: 6600 0100 bnew 5556e <fat_scan_fat_for_free_clusters+0x196>
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
if ( rc != RC_OK )
goto cleanup;
}
if (zero_fill)
55470: 4a2e fffb tstb %fp@(-5)
55474: 673a beqs 554b0 <fat_scan_fat_for_free_clusters+0xd8><== ALWAYS TAKEN
55476: 6048 bras 554c0 <fat_scan_fat_for_free_clusters+0xe8><== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
55478: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
5547c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5547e: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55480: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
55482: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
55486: 2c00 movel %d0,%d6 <== NOT EXECUTED
if ( rc != RC_OK )
55488: 6712 beqs 5549c <fat_scan_fat_for_free_clusters+0xc4><== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
5548a: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
5548c: 2406 movel %d6,%d2 <== NOT EXECUTED
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
5548e: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55490: 4eb9 0005 5334 jsr 55334 <fat_free_fat_clusters_chain> <== NOT EXECUTED
55496: 508f addql #8,%sp <== NOT EXECUTED
55498: 6000 00d6 braw 55570 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
5549c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5549e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
554a0: 2f0d movel %a5,%sp@- <== NOT EXECUTED
554a2: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
554a4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
return rc;
}
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
554a8: 2600 movel %d0,%d3 <== NOT EXECUTED
if ( rc != RC_OK )
554aa: 67c4 beqs 55470 <fat_scan_fat_for_free_clusters+0x98><== NOT EXECUTED
554ac: 6000 0096 braw 55544 <fat_scan_fat_for_free_clusters+0x16c><== NOT EXECUTED
goto cleanup;
}
}
save_cln = cl4find;
(*cls_added)++;
554b0: 2012 movel %a2@,%d0
554b2: 5280 addql #1,%d0
554b4: 2480 movel %d0,%a2@
/* have we satisfied request ? */
if (*cls_added == count)
554b6: b0ae 0010 cmpl %fp@(16),%d0
554ba: 672a beqs 554e6 <fat_scan_fat_for_free_clusters+0x10e><== ALWAYS TAKEN
554bc: 2607 movel %d7,%d3 <== NOT EXECUTED
554be: 604c bras 5550c <fat_scan_fat_for_free_clusters+0x134><== NOT EXECUTED
goto cleanup;
}
if (zero_fill)
{
bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0);
554c0: 4280 clrl %d0 <== NOT EXECUTED
if (fs_info->vol.bpc != bytes_written)
554c2: 4283 clrl %d3 <== NOT EXECUTED
goto cleanup;
}
if (zero_fill)
{
bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0);
554c4: 42a7 clrl %sp@- <== NOT EXECUTED
554c6: 302d 0006 movew %a5@(6),%d0 <== NOT EXECUTED
554ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED
554cc: 42a7 clrl %sp@- <== NOT EXECUTED
554ce: 2f07 movel %d7,%sp@- <== NOT EXECUTED
554d0: 2f0d movel %a5,%sp@- <== NOT EXECUTED
554d2: 4eb9 0004 fe54 jsr 4fe54 <fat_cluster_set> <== NOT EXECUTED
if (fs_info->vol.bpc != bytes_written)
554d8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
554dc: 362d 0006 movew %a5@(6),%d3 <== NOT EXECUTED
554e0: b083 cmpl %d3,%d0 <== NOT EXECUTED
554e2: 67cc beqs 554b0 <fat_scan_fat_for_free_clusters+0xd8><== NOT EXECUTED
554e4: 605c bras 55542 <fat_scan_fat_for_free_clusters+0x16a><== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
554e6: 202d 003e movel %a5@(62),%d0
554ea: 72ff moveq #-1,%d1
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
554ec: 2b47 0046 movel %d7,%a5@(70)
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
554f0: b280 cmpl %d0,%d1
554f2: 6706 beqs 554fa <fat_scan_fat_for_free_clusters+0x122><== ALWAYS TAKEN
fs_info->vol.free_cls -= (*cls_added);
554f4: 9092 subl %a2@,%d0 <== NOT EXECUTED
554f6: 2b40 003e movel %d0,%a5@(62) <== NOT EXECUTED
*last_cl = save_cln;
554fa: 206e 0018 moveal %fp@(24),%a0
554fe: 2087 movel %d7,%a0@
fat_buf_release(fs_info);
55500: 2f0d movel %a5,%sp@-
55502: 4eb9 0004 faee jsr 4faee <fat_buf_release>
55508: 588f addql #4,%sp
5550a: 6064 bras 55570 <fat_scan_fat_for_free_clusters+0x198>
return rc;
}
}
i++;
5550c: 5284 addql #1,%d4
cl4find++;
5550e: 5287 addql #1,%d7
if (cl4find >= data_cls_val)
55510: ba87 cmpl %d7,%d5
55512: 6202 bhis 55516 <fat_scan_fat_for_free_clusters+0x13e><== ALWAYS TAKEN
cl4find = 2;
55514: 7e02 moveq #2,%d7 <== 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)
55516: ba84 cmpl %d4,%d5
55518: 6200 ff08 bhiw 55422 <fat_scan_fat_for_free_clusters+0x4a>
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
5551c: 202d 003e movel %a5@(62),%d0 <== NOT EXECUTED
55520: 72ff moveq #-1,%d1 <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
55522: 2b43 0046 movel %d3,%a5@(70) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
55526: b280 cmpl %d0,%d1 <== NOT EXECUTED
55528: 6706 beqs 55530 <fat_scan_fat_for_free_clusters+0x158><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
5552a: 9092 subl %a2@,%d0 <== NOT EXECUTED
5552c: 2b40 003e movel %d0,%a5@(62) <== NOT EXECUTED
*last_cl = save_cln;
55530: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED
55534: 2083 movel %d3,%a0@ <== NOT EXECUTED
fat_buf_release(fs_info);
55536: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55538: 4eb9 0004 faee jsr 4faee <fat_buf_release> <== NOT EXECUTED
5553e: 588f addql #4,%sp <== NOT EXECUTED
55540: 6028 bras 5556a <fat_scan_fat_for_free_clusters+0x192><== NOT EXECUTED
if (zero_fill)
{
bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0);
if (fs_info->vol.bpc != bytes_written)
{
rc = -1;
55542: 76ff moveq #-1,%d3 <== NOT EXECUTED
return RC_OK;
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
55544: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
return rc;
55546: 2403 movel %d3,%d2 <== NOT EXECUTED
return RC_OK;
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
55548: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5554a: 4eb9 0005 5334 jsr 55334 <fat_free_fat_clusters_chain> <== NOT EXECUTED
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
55550: 42a7 clrl %sp@- <== NOT EXECUTED
55552: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55554: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55556: 4eb9 0005 5100 jsr 55100 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
5555c: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5555e: 4eb9 0004 faee jsr 4faee <fat_buf_release> <== NOT EXECUTED
55564: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
55568: 6006 bras 55570 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
ssize_t bytes_written;
*cls_added = 0;
if (count == 0)
return rc;
5556a: 4282 clrl %d2 <== NOT EXECUTED
5556c: 6002 bras 55570 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
* wouldn't work properly
*/
if (*cls_added == 0)
{
*chain = cl4find;
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
5556e: 2400 movel %d0,%d2 <== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
/* trying to save last allocated cluster for future use */
fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
fat_buf_release(fs_info);
return rc;
}
55570: 2002 movel %d2,%d0
55572: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
55578: 4e5e unlk %fp <== NOT EXECUTED
0004fdbe <fat_sector_write>:
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
4fdbe: 4e56 ffd8 linkw %fp,#-40
4fdc2: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4fdc6: 2e0e movel %fp,%d7
int rc = RC_OK;
ssize_t cmpltd = 0;
4fdc8: 4283 clrl %d3
4fdca: 5987 subql #4,%d7
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bytes_per_block)
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fdcc: 47f9 0004 fc8c lea 4fc8c <fat_buf_access>,%a3
if (rc != RC_OK)
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fdd2: 49f9 0005 7168 lea 57168 <memcpy>,%a4
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
4fdd8: 246e 0008 moveal %fp@(8),%a2
4fddc: 282e 0014 movel %fp@(20),%d4
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
uint32_t ofs = offset;
4fde0: 2c2e 0010 movel %fp@(16),%d6
uint32_t count,
const void *buff)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
4fde4: 2a2e 000c movel %fp@(12),%d5
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while(count > 0)
4fde8: 6056 bras 4fe40 <fat_sector_write+0x82>
{
c = MIN(count, (fs_info->vol.bps - ofs));
4fdea: 4282 clrl %d2
4fdec: 3412 movew %a2@,%d2
4fdee: 9486 subl %d6,%d2
4fdf0: b882 cmpl %d2,%d4
4fdf2: 6402 bccs 4fdf6 <fat_sector_write+0x38> <== NEVER TAKEN
4fdf4: 2404 movel %d4,%d2
if (c == fs_info->vol.bytes_per_block)
4fdf6: 4280 clrl %d0
4fdf8: 302a 000a movew %a2@(10),%d0
4fdfc: b082 cmpl %d2,%d0
4fdfe: 6608 bnes 4fe08 <fat_sector_write+0x4a> <== ALWAYS TAKEN
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
4fe00: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4fe02: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4fe06: 6006 bras 4fe0e <fat_sector_write+0x50> <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fe08: 2f07 movel %d7,%sp@-
4fe0a: 4878 0001 pea 1 <ADD>
4fe0e: 2f05 movel %d5,%sp@-
4fe10: 2f0a movel %a2,%sp@-
4fe12: 4e93 jsr %a3@
4fe14: 4fef 0010 lea %sp@(16),%sp
if (rc != RC_OK)
4fe18: 4a80 tstl %d0
4fe1a: 662a bnes 4fe46 <fat_sector_write+0x88> <== NEVER TAKEN
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fe1c: 206e 0018 moveal %fp@(24),%a0
4fe20: dcae fffc addl %fp@(-4),%d6
fat_buf_mark_modified(fs_info);
count -= c;
4fe24: 9882 subl %d2,%d4
cmpltd +=c;
sec_num++;
4fe26: 5285 addql #1,%d5
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fe28: 2f02 movel %d2,%sp@-
4fe2a: 4870 3800 pea %a0@(00000000,%d3:l)
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
4fe2e: d682 addl %d2,%d3
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fe30: 2f06 movel %d6,%sp@-
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
sec_num++;
ofs = 0;
4fe32: 4286 clrl %d6
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fe34: 4e94 jsr %a4@
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
sec_num++;
ofs = 0;
4fe36: 4fef 000c lea %sp@(12),%sp
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
4fe3a: 7001 moveq #1,%d0
4fe3c: 1540 007e moveb %d0,%a2@(126)
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while(count > 0)
4fe40: 4a84 tstl %d4
4fe42: 66a6 bnes 4fdea <fat_sector_write+0x2c>
4fe44: 6002 bras 4fe48 <fat_sector_write+0x8a>
if (c == fs_info->vol.bytes_per_block)
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
4fe46: 76ff moveq #-1,%d3 <== NOT EXECUTED
cmpltd +=c;
sec_num++;
ofs = 0;
}
return cmpltd;
}
4fe48: 2003 movel %d3,%d0
4fe4a: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
4fe50: 4e5e unlk %fp <== NOT EXECUTED
00055100 <fat_set_fat_cluster>:
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
uint8_t *sec_buf = NULL;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
55100: 7001 moveq #1,%d0
fat_set_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t in_val
)
{
55102: 4e56 ffd8 linkw %fp,#-40
55106: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
5510a: 246e 0008 moveal %fp@(8),%a2
5510e: 242e 000c movel %fp@(12),%d2
55112: 2a2e 0010 movel %fp@(16),%d5
int rc = RC_OK;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
uint8_t *sec_buf = NULL;
55116: 42ae fffc clrl %fp@(-4)
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
5511a: b082 cmpl %d2,%d0
5511c: 6400 01fc bccw 5531a <fat_set_fat_cluster+0x21a>
55120: 202a 0034 movel %a2@(52),%d0
55124: 5280 addql #1,%d0
55126: b082 cmpl %d2,%d0
55128: 6404 bccs 5512e <fat_set_fat_cluster+0x2e> <== ALWAYS TAKEN
5512a: 6000 01ee braw 5531a <fat_set_fat_cluster+0x21a> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
5512e: 7601 moveq #1,%d3
55130: 102a 000e moveb %a2@(14),%d0
55134: c680 andl %d0,%d3
55136: 4a03 tstb %d3
55138: 6708 beqs 55142 <fat_set_fat_cluster+0x42> <== NEVER TAKEN
5513a: 2202 movel %d2,%d1
5513c: e289 lsrl #1,%d1
5513e: d282 addl %d2,%d1
55140: 6012 bras 55154 <fat_set_fat_cluster+0x54>
55142: 7202 moveq #2,%d1 <== NOT EXECUTED
55144: c280 andl %d0,%d1 <== NOT EXECUTED
55146: 4a01 tstb %d1 <== NOT EXECUTED
55148: 6706 beqs 55150 <fat_set_fat_cluster+0x50> <== NOT EXECUTED
5514a: 2202 movel %d2,%d1 <== NOT EXECUTED
5514c: d281 addl %d1,%d1 <== NOT EXECUTED
5514e: 6004 bras 55154 <fat_set_fat_cluster+0x54> <== NOT EXECUTED
55150: 2202 movel %d2,%d1 <== NOT EXECUTED
55152: e589 lsll #2,%d1 <== NOT EXECUTED
55154: 4284 clrl %d4
55156: 182a 0002 moveb %a2@(2),%d4
5515a: e8a9 lsrl %d4,%d1
5515c: 2641 moveal %d1,%a3
5515e: d7ea 0050 addal %a2@(80),%a3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
55162: 4a03 tstb %d3
55164: 6708 beqs 5516e <fat_set_fat_cluster+0x6e> <== NEVER TAKEN
55166: 2e02 movel %d2,%d7
55168: e28f lsrl #1,%d7
5516a: de82 addl %d2,%d7
5516c: 6010 bras 5517e <fat_set_fat_cluster+0x7e>
5516e: 7202 moveq #2,%d1 <== NOT EXECUTED
55170: 2e02 movel %d2,%d7 <== NOT EXECUTED
55172: c081 andl %d1,%d0 <== NOT EXECUTED
55174: 4a00 tstb %d0 <== NOT EXECUTED
55176: 6704 beqs 5517c <fat_set_fat_cluster+0x7c> <== NOT EXECUTED
55178: de87 addl %d7,%d7 <== NOT EXECUTED
5517a: 6002 bras 5517e <fat_set_fat_cluster+0x7e> <== NOT EXECUTED
5517c: e58f lsll #2,%d7 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
5517e: 2c0e movel %fp,%d6
55180: 5986 subql #4,%d6
55182: 49f9 0004 fc8c lea 4fc8c <fat_buf_access>,%a4
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);
55188: 3612 movew %a2@,%d3
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
5518a: 2f06 movel %d6,%sp@-
5518c: 4878 0001 pea 1 <ADD>
55190: 2f0b movel %a3,%sp@-
55192: 2f0a movel %a2,%sp@-
55194: 4e94 jsr %a4@
if (rc != RC_OK)
55196: 4fef 0010 lea %sp@(16),%sp
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
5519a: 2800 movel %d0,%d4
if (rc != RC_OK)
5519c: 6600 018a bnew 55328 <fat_set_fat_cluster+0x228>
return rc;
switch ( fs_info->vol.type )
551a0: 4280 clrl %d0
551a2: 102a 000e moveb %a2@(14),%d0
551a6: 7202 moveq #2,%d1
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
551a8: 0283 0000 ffff andil #65535,%d3
551ae: 5383 subql #1,%d3
551b0: c687 andl %d7,%d3
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return rc;
switch ( fs_info->vol.type )
551b2: b280 cmpl %d0,%d1
551b4: 6700 011e beqw 552d4 <fat_set_fat_cluster+0x1d4>
551b8: 123c 0004 moveb #4,%d1
551bc: b280 cmpl %d0,%d1
551be: 6700 0132 beqw 552f2 <fat_set_fat_cluster+0x1f2>
551c2: 123c 0001 moveb #1,%d1
551c6: b280 cmpl %d0,%d1
551c8: 6600 0150 bnew 5531a <fat_set_fat_cluster+0x21a>
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
551cc: 0802 0000 btst #0,%d2
551d0: 677a beqs 5524c <fat_set_fat_cluster+0x14c> <== NEVER TAKEN
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*(sec_buf + ofs) &= 0x0F;
551d2: 206e fffc moveal %fp@(-4),%a0
551d6: d1c3 addal %d3,%a0
551d8: 123c 000f moveb #15,%d1
551dc: 1010 moveb %a0@,%d0
switch ( fs_info->vol.type )
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
551de: e98d lsll #4,%d5
*(sec_buf + ofs) &= 0x0F;
551e0: c081 andl %d1,%d0
551e2: 1080 moveb %d0,%a0@
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0);
551e4: 206e fffc moveal %fp@(-4),%a0
551e8: d1c3 addal %d3,%a0
551ea: 1010 moveb %a0@,%d0
551ec: 8085 orl %d5,%d0
551ee: 1080 moveb %d0,%a0@
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
551f0: 7001 moveq #1,%d0
551f2: 1540 007e moveb %d0,%a2@(126)
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
551f6: 4280 clrl %d0
551f8: 3012 movew %a2@,%d0
551fa: 5380 subql #1,%d0
551fc: b083 cmpl %d3,%d0
551fe: 6628 bnes 55228 <fat_set_fat_cluster+0x128> <== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
55200: 2f06 movel %d6,%sp@- <== NOT EXECUTED
55202: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55206: 486b 0001 pea %a3@(1) <== NOT EXECUTED
5520a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5520c: 4e94 jsr %a4@ <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
5520e: 4fef 0010 lea %sp@(16),%sp <== 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,
55212: 2800 movel %d0,%d4 <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
55214: 6600 0112 bnew 55328 <fat_set_fat_cluster+0x228> <== NOT EXECUTED
return rc;
*sec_buf &= 0x00;
55218: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
5521c: 4280 clrl %d0 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
&sec_buf);
if (rc != RC_OK)
return rc;
*sec_buf &= 0x00;
5521e: 4210 clrb %a0@ <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
55220: 3005 movew %d5,%d0 <== NOT EXECUTED
55222: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55226: 607e bras 552a6 <fat_set_fat_cluster+0x1a6> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0x00;
55228: 206e fffc moveal %fp@(-4),%a0
5522c: 5283 addql #1,%d3
5522e: 4201 clrb %d1
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
55230: 0285 0000 ffff andil #65535,%d5
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0x00;
55236: 1181 3800 moveb %d1,%a0@(00000000,%d3:l)
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
5523a: e08d lsrl #8,%d5
5523c: 206e fffc moveal %fp@(-4),%a0
55240: d1c3 addal %d3,%a0
55242: 1010 moveb %a0@,%d0
55244: 8a80 orl %d0,%d5
55246: 1085 moveb %d5,%a0@
55248: 6000 00de braw 55328 <fat_set_fat_cluster+0x228>
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*(sec_buf + ofs) &= 0x00;
5524c: 206e fffc moveal %fp@(-4),%a0
55250: 4201 clrb %d1
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
55252: 0285 0000 0fff andil #4095,%d5
*(sec_buf + ofs) &= 0x00;
55258: 1181 3800 moveb %d1,%a0@(00000000,%d3:l)
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
5525c: 3405 movew %d5,%d2
*(sec_buf + ofs) &= 0x00;
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF);
5525e: 206e fffc moveal %fp@(-4),%a0
55262: d1c3 addal %d3,%a0
55264: 1010 moveb %a0@,%d0
55266: 7201 moveq #1,%d1
55268: 8a80 orl %d0,%d5
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
5526a: 4280 clrl %d0
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*(sec_buf + ofs) &= 0x00;
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF);
5526c: 1085 moveb %d5,%a0@
5526e: 1541 007e moveb %d1,%a2@(126)
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
55272: 3012 movew %a2@,%d0
55274: 5380 subql #1,%d0
55276: b083 cmpl %d3,%d0
55278: 6636 bnes 552b0 <fat_set_fat_cluster+0x1b0> <== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
5527a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5527c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55280: 486b 0001 pea %a3@(1) <== NOT EXECUTED
55284: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55286: 4e94 jsr %a4@ <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
55288: 4fef 0010 lea %sp@(16),%sp <== 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,
5528c: 2800 movel %d0,%d4 <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
5528e: 6600 0098 bnew 55328 <fat_set_fat_cluster+0x228> <== NOT EXECUTED
return rc;
*sec_buf &= 0xF0;
55292: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55296: 72f0 moveq #-16,%d1 <== NOT EXECUTED
55298: 1010 moveb %a0@,%d0 <== NOT EXECUTED
5529a: c081 andl %d1,%d0 <== NOT EXECUTED
5529c: 1080 moveb %d0,%a0@ <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
5529e: 4280 clrl %d0 <== NOT EXECUTED
552a0: 3002 movew %d2,%d0 <== NOT EXECUTED
552a2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
552a6: e088 lsrl #8,%d0 <== NOT EXECUTED
552a8: 1210 moveb %a0@,%d1 <== NOT EXECUTED
552aa: 8081 orl %d1,%d0 <== NOT EXECUTED
552ac: 1080 moveb %d0,%a0@ <== NOT EXECUTED
552ae: 603a bras 552ea <fat_set_fat_cluster+0x1ea> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0xF0;
552b0: 206e fffc moveal %fp@(-4),%a0
552b4: 5283 addql #1,%d3
552b6: d1c3 addal %d3,%a0
552b8: 72f0 moveq #-16,%d1
552ba: 1010 moveb %a0@,%d0
552bc: c081 andl %d1,%d0
552be: 1080 moveb %d0,%a0@
*(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8);
552c0: 4280 clrl %d0
552c2: 206e fffc moveal %fp@(-4),%a0
552c6: d1c3 addal %d3,%a0
552c8: 3002 movew %d2,%d0
552ca: 1210 moveb %a0@,%d1
552cc: e088 lsrl #8,%d0
552ce: 8081 orl %d1,%d0
552d0: 1080 moveb %d0,%a0@
552d2: 6054 bras 55328 <fat_set_fat_cluster+0x228>
}
}
break;
case FAT_FAT16:
*((uint16_t *)(sec_buf + ofs)) =
552d4: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
break;
}
return RC_OK;
}
552d8: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
552de: 2205 movel %d5,%d1 <== NOT EXECUTED
552e0: e089 lsrl #8,%d1 <== NOT EXECUTED
552e2: e18d lsll #8,%d5 <== NOT EXECUTED
552e4: 8285 orl %d5,%d1 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(sec_buf + ofs)) =
552e6: 3181 3800 movew %d1,%a0@(00000000,%d3:l) <== NOT EXECUTED
552ea: 7001 moveq #1,%d0 <== NOT EXECUTED
552ec: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED
552f0: 6036 bras 55328 <fat_set_fat_cluster+0x228> <== 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));
552f2: 0285 0fff ffff andil #268435455,%d5 <== NOT EXECUTED
552f8: 2f05 movel %d5,%sp@- <== NOT EXECUTED
552fa: 4eba fc60 jsr %pc@(54f5c <m68k_swap_u32>) <== NOT EXECUTED
*((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000);
552fe: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55302: d1c3 addal %d3,%a0 <== NOT EXECUTED
(uint16_t )(CT_LE_W(in_val));
fat_buf_mark_modified(fs_info);
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
55304: 588f addql #4,%sp <== NOT EXECUTED
*((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000);
55306: 2210 movel %a0@,%d1 <== NOT EXECUTED
55308: 0281 0000 00f0 andil #240,%d1 <== NOT EXECUTED
*((uint32_t *)(sec_buf + ofs)) |= fat32_clv;
5530e: 8081 orl %d1,%d0 <== NOT EXECUTED
55310: 7201 moveq #1,%d1 <== NOT EXECUTED
55312: 2080 movel %d0,%a0@ <== NOT EXECUTED
55314: 1541 007e moveb %d1,%a2@(126) <== NOT EXECUTED
55318: 600e bras 55328 <fat_set_fat_cluster+0x228> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
5531a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
55320: 78ff moveq #-1,%d4 <== NOT EXECUTED
55322: 7205 moveq #5,%d1 <== NOT EXECUTED
55324: 2040 moveal %d0,%a0 <== NOT EXECUTED
55326: 2081 movel %d1,%a0@ <== NOT EXECUTED
break;
}
return RC_OK;
}
55328: 2004 movel %d4,%d0
5532a: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
55330: 4e5e unlk %fp <== NOT EXECUTED
000508bc <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(fat_fs_info_t *fs_info)
{
508bc: 4e56 ffe8 linkw %fp,#-24
508c0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
508c4: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
int i = 0;
rc = fat_sync(fs_info);
508c8: 2f0a movel %a2,%sp@-
508ca: 4eb9 0005 07ec jsr 507ec <fat_sync>
if ( rc != RC_OK )
508d0: 588f addql #4,%sp
fat_shutdown_drive(fat_fs_info_t *fs_info)
{
int rc = RC_OK;
int i = 0;
rc = fat_sync(fs_info);
508d2: 2400 movel %d0,%d2
if ( rc != RC_OK )
508d4: 6702 beqs 508d8 <fat_shutdown_drive+0x1c> <== ALWAYS TAKEN
rc = -1;
508d6: 74ff moveq #-1,%d2 <== NOT EXECUTED
508d8: 97cb subal %a3,%a3
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
508da: 49f9 0004 8738 lea 48738 <_Chain_Get>,%a4
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
508e0: 4bf9 0004 3f4c lea 43f4c <free>,%a5
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
508e6: 262a 0062 movel %a2@(98),%d3
508ea: d68b addl %a3,%d3
while ( (node = rtems_chain_get(the_chain)) != NULL )
508ec: 6006 bras 508f4 <fat_shutdown_drive+0x38>
free(node);
508ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED
508f0: 4e95 jsr %a5@ <== NOT EXECUTED
508f2: 588f addql #4,%sp <== NOT EXECUTED
508f4: 2f03 movel %d3,%sp@-
508f6: 4e94 jsr %a4@
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 )
508f8: 588f addql #4,%sp
508fa: 4a80 tstl %d0
508fc: 66f0 bnes 508ee <fat_shutdown_drive+0x32> <== NEVER TAKEN
508fe: 47eb 000c lea %a3@(12),%a3
rc = fat_sync(fs_info);
if ( rc != RC_OK )
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
50902: 103c 0018 moveb #24,%d0
50906: b08b cmpl %a3,%d0
50908: 66dc bnes 508e6 <fat_shutdown_drive+0x2a>
5090a: 97cb subal %a3,%a3
5090c: 49f9 0004 8738 lea 48738 <_Chain_Get>,%a4
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
50912: 4bf9 0004 3f4c lea 43f4c <free>,%a5
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
50918: 262a 0066 movel %a2@(102),%d3
5091c: d68b addl %a3,%d3
while ( (node = rtems_chain_get(the_chain)) != NULL )
5091e: 6006 bras 50926 <fat_shutdown_drive+0x6a>
free(node);
50920: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50922: 4e95 jsr %a5@ <== NOT EXECUTED
50924: 588f addql #4,%sp <== NOT EXECUTED
50926: 2f03 movel %d3,%sp@-
50928: 4e94 jsr %a4@
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 )
5092a: 588f addql #4,%sp
5092c: 4a80 tstl %d0
5092e: 66f0 bnes 50920 <fat_shutdown_drive+0x64> <== NEVER TAKEN
50930: 47eb 000c lea %a3@(12),%a3
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
50934: 103c 0018 moveb #24,%d0
50938: b08b cmpl %a3,%d0
5093a: 66dc bnes 50918 <fat_shutdown_drive+0x5c>
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
5093c: 2f2a 0062 movel %a2@(98),%sp@-
50940: 47f9 0004 3f4c lea 43f4c <free>,%a3
50946: 4e93 jsr %a3@
free(fs_info->rhash);
50948: 2f2a 0066 movel %a2@(102),%sp@-
5094c: 4e93 jsr %a3@
free(fs_info->uino);
5094e: 2f2a 006a movel %a2@(106),%sp@-
50952: 4e93 jsr %a3@
free(fs_info->sec_buf);
50954: 2f2a 0084 movel %a2@(132),%sp@-
50958: 4e93 jsr %a3@
close(fs_info->vol.fd);
5095a: 2f2a 0056 movel %a2@(86),%sp@-
5095e: 4eb9 0004 3cd8 jsr 43cd8 <close>
if (rc)
50964: 4fef 0014 lea %sp@(20),%sp
50968: 4a82 tstl %d2
5096a: 670c beqs 50978 <fat_shutdown_drive+0xbc> <== ALWAYS TAKEN
errno = EIO;
5096c: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
50972: 2040 moveal %d0,%a0 <== NOT EXECUTED
50974: 7005 moveq #5,%d0 <== NOT EXECUTED
50976: 2080 movel %d0,%a0@ <== NOT EXECUTED
return rc;
}
50978: 2002 movel %d2,%d0
5097a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
50980: 4e5e unlk %fp <== NOT EXECUTED
000507ec <fat_sync>:
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
if (fs_info->vol.type == FAT_FAT32)
507ec: 4280 clrl %d0
507ee: 7204 moveq #4,%d1
return RC_OK;
}
int
fat_sync(fat_fs_info_t *fs_info)
{
507f0: 4e56 fff0 linkw %fp,#-16
507f4: 48d7 040c moveml %d2-%d3/%a2,%sp@
507f8: 246e 0008 moveal %fp@(8),%a2
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
if (fs_info->vol.type == FAT_FAT32)
507fc: 102a 000e moveb %a2@(14),%d0
50800: b280 cmpl %d0,%d1
50802: 6706 beqs 5080a <fat_sync+0x1e> <== NEVER TAKEN
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
50804: 4282 clrl %d2
50806: 6000 0084 braw 5088c <fat_sync+0xa0>
if (fs_info->vol.type == FAT_FAT32)
{
uint32_t free_count = fs_info->vol.free_cls;
5080a: 262a 003e movel %a2@(62),%d3 <== NOT EXECUTED
uint32_t next_free = fs_info->vol.next_cl;
5080e: 242a 0046 movel %a2@(70),%d2 <== NOT EXECUTED
if (free_count != fs_info->vol.free_cls_in_fs_info)
50812: b6aa 0042 cmpl %a2@(66),%d3 <== NOT EXECUTED
50816: 6730 beqs 50848 <fat_sync+0x5c> <== NOT EXECUTED
{
uint32_t le_free_count = CT_LE_L(free_count);
50818: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5081a: 4eba f240 jsr %pc@(4fa5c <m68k_swap_u32>) <== NOT EXECUTED
5081e: 204e moveal %fp,%a0 <== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
50820: 2543 0042 movel %d3,%a2@(66) <== NOT EXECUTED
uint32_t free_count = fs_info->vol.free_cls;
uint32_t next_free = fs_info->vol.next_cl;
if (free_count != fs_info->vol.free_cls_in_fs_info)
{
uint32_t le_free_count = CT_LE_L(free_count);
50824: 2100 movel %d0,%a0@- <== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
ret1 = fat_sector_write(fs_info,
50826: 4280 clrl %d0 <== NOT EXECUTED
50828: 2e88 movel %a0,%sp@ <== NOT EXECUTED
5082a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5082e: 4878 01e8 pea 1e8 <DBL_MANT_DIG+0x1b3> <== NOT EXECUTED
50832: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED
50836: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50838: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5083a: 4eb9 0004 fdbe jsr 4fdbe <fat_sector_write> <== NOT EXECUTED
50840: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50844: 2600 movel %d0,%d3 <== NOT EXECUTED
50846: 6002 bras 5084a <fat_sync+0x5e> <== NOT EXECUTED
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
static int
fat_fat32_update_fsinfo_sector(fat_fs_info_t *fs_info)
{
ssize_t ret1 = 0, ret2 = 0;
50848: 4283 clrl %d3 <== NOT EXECUTED
FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET,
sizeof(le_free_count),
&le_free_count);
}
if (next_free != fs_info->vol.next_cl_in_fs_info)
5084a: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED
5084e: 6758 beqs 508a8 <fat_sync+0xbc> <== NOT EXECUTED
{
uint32_t le_next_free = CT_LE_L(next_free);
50850: 2f02 movel %d2,%sp@- <== NOT EXECUTED
50852: 4eba f208 jsr %pc@(4fa5c <m68k_swap_u32>) <== NOT EXECUTED
50856: 204e moveal %fp,%a0 <== NOT EXECUTED
fs_info->vol.next_cl_in_fs_info = next_free;
50858: 2542 004a movel %d2,%a2@(74) <== NOT EXECUTED
&le_free_count);
}
if (next_free != fs_info->vol.next_cl_in_fs_info)
{
uint32_t le_next_free = CT_LE_L(next_free);
5085c: 2100 movel %d0,%a0@- <== NOT EXECUTED
fs_info->vol.next_cl_in_fs_info = next_free;
ret2 = fat_sector_write(fs_info,
5085e: 4280 clrl %d0 <== NOT EXECUTED
50860: 2e88 movel %a0,%sp@ <== NOT EXECUTED
50862: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
50866: 4878 01ec pea 1ec <DBL_MANT_DIG+0x1b7> <== NOT EXECUTED
5086a: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED
5086e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50870: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50872: 4eb9 0004 fdbe jsr 4fdbe <fat_sector_write> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
50878: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5087c: 4a83 tstl %d3 <== NOT EXECUTED
5087e: 6c04 bges 50884 <fat_sync+0x98> <== NOT EXECUTED
{
int rc = RC_OK;
rc = fat_fat32_update_fsinfo_sector(fs_info);
if ( rc != RC_OK )
rc = -1;
50880: 74ff moveq #-1,%d2 <== NOT EXECUTED
50882: 6008 bras 5088c <fat_sync+0xa0> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
50884: 4a80 tstl %d0 <== NOT EXECUTED
50886: 6c00 ff7c bgew 50804 <fat_sync+0x18> <== NOT EXECUTED
5088a: 60f4 bras 50880 <fat_sync+0x94> <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(fs_info);
if ( rc != RC_OK )
rc = -1;
fat_buf_release(fs_info);
5088c: 2f0a movel %a2,%sp@-
5088e: 4eb9 0004 faee jsr 4faee <fat_buf_release>
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
50894: 2f2a 005a movel %a2@(90),%sp@-
50898: 4eb9 0004 e346 jsr 4e346 <rtems_bdbuf_syncdev>
5089e: 508f addql #8,%sp
508a0: 4a80 tstl %d0
508a2: 670c beqs 508b0 <fat_sync+0xc4> <== ALWAYS TAKEN
rc = -1;
508a4: 74ff moveq #-1,%d2 <== NOT EXECUTED
508a6: 6008 bras 508b0 <fat_sync+0xc4> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
508a8: 4a83 tstl %d3 <== NOT EXECUTED
508aa: 6c00 ff58 bgew 50804 <fat_sync+0x18> <== NOT EXECUTED
508ae: 60d0 bras 50880 <fat_sync+0x94> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
rc = -1;
return rc;
}
508b0: 2002 movel %d2,%d0
508b2: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
508b8: 4e5e unlk %fp <== NOT EXECUTED
0006a0e8 <fchdir>:
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
6a0e8: 4e56 ff94 linkw %fp,#-108
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
st.st_uid = 0;
6a0ec: 4241 clrw %d1
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
6a0ee: 202e 0008 movel %fp@(8),%d0
6a0f2: 48d7 040c moveml %d2-%d3/%a2,%sp@
int rv = 0;
rtems_libio_t *iop;
struct stat st;
rtems_filesystem_location_info_t loc;
st.st_mode = 0;
6a0f6: 42ae ffc6 clrl %fp@(-58)
st.st_uid = 0;
6a0fa: 3d41 ffcc movew %d1,%fp@(-52)
st.st_gid = 0;
6a0fe: 3d41 ffce movew %d1,%fp@(-50)
rtems_libio_check_fd( fd );
6a102: b0b9 0009 156c cmpl 9156c <rtems_libio_number_iops>,%d0
6a108: 6502 bcss 6a10c <fchdir+0x24>
6a10a: 601c bras 6a128 <fchdir+0x40>
iop = rtems_libio_iop( fd );
6a10c: 2200 movel %d0,%d1
6a10e: ed88 lsll #6,%d0
6a110: e989 lsll #4,%d1
6a112: 2479 0009 6118 moveal 96118 <rtems_libio_iops>,%a2
6a118: 9081 subl %d1,%d0
6a11a: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
6a11c: 202a 000c movel %a2@(12),%d0
6a120: 0280 0000 0100 andil #256,%d0
6a126: 6612 bnes 6a13a <fchdir+0x52>
6a128: 4eb9 0006 da4c jsr 6da4c <__errno>
6a12e: 74ff moveq #-1,%d2
6a130: 7209 moveq #9,%d1
6a132: 2040 moveal %d0,%a0
6a134: 2081 movel %d1,%a0@
6a136: 6000 0096 braw 6a1ce <fchdir+0xe6>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
6a13a: 206a 0024 moveal %a2@(36),%a0
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
6a13e: 260a movel %a2,%d3
6a140: 0683 0000 0010 addil #16,%d3
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
6a146: 2268 000c moveal %a0@(12),%a1
6a14a: 2f08 movel %a0,%sp@-
6a14c: 2051 moveal %a1@,%a0
6a14e: 4e90 jsr %a0@
6a150: 206a 0020 moveal %a2@(32),%a0
6a154: 486e ffba pea %fp@(-70)
6a158: 2f03 movel %d3,%sp@-
6a15a: 2068 0018 moveal %a0@(24),%a0
6a15e: 4e90 jsr %a0@
if ( rv == 0 ) {
6a160: 4fef 000c lea %sp@(12),%sp
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, &st );
6a164: 2400 movel %d0,%d2
if ( rv == 0 ) {
6a166: 6642 bnes 6a1aa <fchdir+0xc2> <== NEVER TAKEN
bool access_ok = rtems_filesystem_check_access(
6a168: 4280 clrl %d0
6a16a: 302e ffce movew %fp@(-50),%d0
6a16e: 2f00 movel %d0,%sp@-
6a170: 302e ffcc movew %fp@(-52),%d0
6a174: 2f00 movel %d0,%sp@-
6a176: 2f2e ffc6 movel %fp@(-58),%sp@-
6a17a: 4878 0001 pea 1 <ADD>
6a17e: 4eb9 0004 c1e4 jsr 4c1e4 <rtems_filesystem_check_access>
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
6a184: 4fef 0010 lea %sp@(16),%sp
6a188: 4a00 tstb %d0
6a18a: 6710 beqs 6a19c <fchdir+0xb4>
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
6a18c: 2f03 movel %d3,%sp@-
6a18e: 486e ffa2 pea %fp@(-94)
6a192: 4eb9 0004 bc3c jsr 4bc3c <rtems_filesystem_location_clone>
6a198: 508f addql #8,%sp
6a19a: 600e bras 6a1aa <fchdir+0xc2>
} else {
errno = EACCES;
6a19c: 4eb9 0006 da4c jsr 6da4c <__errno>
rv = -1;
6a1a2: 74ff moveq #-1,%d2
);
if ( access_ok ) {
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
} else {
errno = EACCES;
6a1a4: 2040 moveal %d0,%a0
6a1a6: 700d moveq #13,%d0
6a1a8: 2080 movel %d0,%a0@
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
6a1aa: 206a 0024 moveal %a2@(36),%a0
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
6a1ae: 2268 000c moveal %a0@(12),%a1
6a1b2: 2f08 movel %a0,%sp@-
6a1b4: 2069 0004 moveal %a1@(4),%a0
6a1b8: 4e90 jsr %a0@
rv = -1;
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
6a1ba: 588f addql #4,%sp
6a1bc: 4a82 tstl %d2
6a1be: 660e bnes 6a1ce <fchdir+0xe6>
rv = rtems_filesystem_chdir( &loc );
6a1c0: 486e ffa2 pea %fp@(-94)
6a1c4: 4eb9 0005 d7f4 jsr 5d7f4 <rtems_filesystem_chdir>
6a1ca: 588f addql #4,%sp
6a1cc: 2400 movel %d0,%d2
}
return rv;
}
6a1ce: 2002 movel %d2,%d0
6a1d0: 4cee 040c ff94 moveml %fp@(-108),%d2-%d3/%a2
6a1d6: 4e5e unlk %fp
...
0005db00 <fchmod>:
/**
* POSIX 1003.1b 5.6.4 - Change File Modes
*/
int fchmod( int fd, mode_t mode )
{
5db00: 4e56 fffc linkw %fp,#-4
5db04: 202e 0008 movel %fp@(8),%d0
5db08: 2f0a movel %a2,%sp@-
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5db0a: b0b9 0009 156c cmpl 9156c <rtems_libio_number_iops>,%d0
5db10: 6502 bcss 5db14 <fchmod+0x14>
5db12: 601c bras 5db30 <fchmod+0x30>
iop = rtems_libio_iop( fd );
5db14: 2200 movel %d0,%d1
5db16: ed88 lsll #6,%d0
5db18: e989 lsll #4,%d1
5db1a: 2479 0009 6118 moveal 96118 <rtems_libio_iops>,%a2
5db20: 9081 subl %d1,%d0
5db22: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
5db24: 202a 000c movel %a2@(12),%d0
5db28: 0280 0000 0100 andil #256,%d0
5db2e: 660e bnes 5db3e <fchmod+0x3e>
5db30: 4eb9 0006 da4c jsr 6da4c <__errno>
5db36: 7209 moveq #9,%d1
5db38: 2040 moveal %d0,%a0
5db3a: 2081 movel %d1,%a0@
5db3c: 6054 bras 5db92 <fchmod+0x92>
if (iop->pathinfo.mt_entry->writeable) {
5db3e: 206a 0024 moveal %a2@(36),%a0
5db42: 4a28 0029 tstb %a0@(41)
5db46: 673e beqs 5db86 <fchmod+0x86> <== NEVER TAKEN
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
5db48: 2268 000c moveal %a0@(12),%a1
5db4c: 2f08 movel %a0,%sp@-
5db4e: 2051 moveal %a1@,%a0
5db50: 4e90 jsr %a0@
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
5db52: 206a 0024 moveal %a2@(36),%a0
5db56: 2068 000c moveal %a0@(12),%a0
5db5a: 2f2e 000c movel %fp@(12),%sp@-
5db5e: 486a 0010 pea %a2@(16)
5db62: 2068 0020 moveal %a0@(32),%a0
5db66: 4e90 jsr %a0@
errno = EROFS;
rv = -1;
}
return rv;
}
5db68: 206a 0024 moveal %a2@(36),%a0
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
5db6c: 2268 000c moveal %a0@(12),%a1
5db70: 2f08 movel %a0,%sp@-
5db72: 2069 0004 moveal %a1@(4),%a0
5db76: 2d40 fffc movel %d0,%fp@(-4)
5db7a: 4e90 jsr %a0@
5db7c: 202e fffc movel %fp@(-4),%d0
5db80: 4fef 0010 lea %sp@(16),%sp
5db84: 600e bras 5db94 <fchmod+0x94>
if (iop->pathinfo.mt_entry->writeable) {
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
5db86: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5db8c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5db8e: 701e moveq #30,%d0 <== NOT EXECUTED
5db90: 2080 movel %d0,%a0@ <== NOT EXECUTED
rv = -1;
5db92: 70ff moveq #-1,%d0
}
return rv;
}
5db94: 246e fff8 moveal %fp@(-8),%a2
5db98: 4e5e unlk %fp <== NOT EXECUTED
0005db9c <fchown>:
/**
* POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
*/
int fchown( int fd, uid_t owner, gid_t group )
{
5db9c: 4e56 fff0 linkw %fp,#-16
5dba0: 202e 0008 movel %fp@(8),%d0
5dba4: 48d7 040c moveml %d2-%d3/%a2,%sp@
5dba8: 342e 000e movew %fp@(14),%d2
5dbac: 362e 0012 movew %fp@(18),%d3
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5dbb0: b0b9 0009 156c cmpl 9156c <rtems_libio_number_iops>,%d0
5dbb6: 6502 bcss 5dbba <fchown+0x1e>
5dbb8: 601c bras 5dbd6 <fchown+0x3a>
iop = rtems_libio_iop( fd );
5dbba: 2200 movel %d0,%d1
5dbbc: ed88 lsll #6,%d0
5dbbe: e989 lsll #4,%d1
5dbc0: 2479 0009 6118 moveal 96118 <rtems_libio_iops>,%a2
5dbc6: 9081 subl %d1,%d0
5dbc8: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
5dbca: 202a 000c movel %a2@(12),%d0
5dbce: 0280 0000 0100 andil #256,%d0
5dbd4: 660e bnes 5dbe4 <fchown+0x48>
5dbd6: 4eb9 0006 da4c jsr 6da4c <__errno>
5dbdc: 7209 moveq #9,%d1
5dbde: 2040 moveal %d0,%a0
5dbe0: 2081 movel %d1,%a0@
5dbe2: 6058 bras 5dc3c <fchown+0xa0>
if (iop->pathinfo.mt_entry->writeable) {
5dbe4: 206a 0024 moveal %a2@(36),%a0
5dbe8: 4a28 0029 tstb %a0@(41)
5dbec: 6742 beqs 5dc30 <fchown+0x94> <== NEVER TAKEN
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
5dbee: 2268 000c moveal %a0@(12),%a1
5dbf2: 2f08 movel %a0,%sp@-
5dbf4: 2051 moveal %a1@,%a0
5dbf6: 4e90 jsr %a0@
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
5dbf8: 206a 0024 moveal %a2@(36),%a0
5dbfc: 2068 000c moveal %a0@(12),%a0
5dc00: 3f03 movew %d3,%sp@-
5dc02: 4267 clrw %sp@-
5dc04: 3f02 movew %d2,%sp@-
5dc06: 4267 clrw %sp@-
5dc08: 486a 0010 pea %a2@(16)
5dc0c: 2068 0024 moveal %a0@(36),%a0
5dc10: 4e90 jsr %a0@
errno = EROFS;
rv = -1;
}
return rv;
}
5dc12: 206a 0024 moveal %a2@(36),%a0
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
5dc16: 2268 000c moveal %a0@(12),%a1
5dc1a: 2f08 movel %a0,%sp@-
5dc1c: 2069 0004 moveal %a1@(4),%a0
5dc20: 2d40 fffc movel %d0,%fp@(-4)
5dc24: 4e90 jsr %a0@
5dc26: 202e fffc movel %fp@(-4),%d0
5dc2a: 4fef 0014 lea %sp@(20),%sp
5dc2e: 600e bras 5dc3e <fchown+0xa2>
owner,
group
);
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
5dc30: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5dc36: 2040 moveal %d0,%a0 <== NOT EXECUTED
5dc38: 701e moveq #30,%d0 <== NOT EXECUTED
5dc3a: 2080 movel %d0,%a0@ <== NOT EXECUTED
rv = -1;
5dc3c: 70ff moveq #-1,%d0
}
return rv;
}
5dc3e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
5dc44: 4e5e unlk %fp <== NOT EXECUTED
00069820 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
69820: 4e56 ffec linkw %fp,#-20
69824: 202e 0008 movel %fp@(8),%d0
69828: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
6982c: 262e 000c movel %fp@(12),%d3
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
69830: b0b9 0006 ed48 cmpl 6ed48 <rtems_libio_number_iops>,%d0
69836: 6502 bcss 6983a <fcntl+0x1a>
69838: 601a bras 69854 <fcntl+0x34>
iop = rtems_libio_iop( fd );
6983a: 2200 movel %d0,%d1
6983c: ed88 lsll #6,%d0
6983e: e989 lsll #4,%d1
69840: 2479 0008 0534 moveal 80534 <rtems_libio_iops>,%a2
69846: 9081 subl %d1,%d0
69848: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
6984a: 242a 000c movel %a2@(12),%d2
6984e: 0802 0008 btst #8,%d2
69852: 6610 bnes 69864 <fcntl+0x44>
69854: 4eb9 0005 b09c jsr 5b09c <__errno>
6985a: 7209 moveq #9,%d1
6985c: 2040 moveal %d0,%a0
6985e: 2081 movel %d1,%a0@
69860: 6000 0152 braw 699b4 <fcntl+0x194>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
69864: 7009 moveq #9,%d0
69866: b083 cmpl %d3,%d0
69868: 6500 011a bcsw 69984 <fcntl+0x164>
6986c: 303b 3a08 movew %pc@(69876 <fcntl+0x56>,%d3:l:2),%d0
69870: 48c0 extl %d0
69872: 4efb 0802 jmp %pc@(69876 <fcntl+0x56>,%d0:l)
69876: 0014 .short 0x0014 <== NOT EXECUTED
69878: 00a8 00b4 00ca oril #11796682,%d0 <== NOT EXECUTED
6987e: 00d8 .short 0x00d8 <== NOT EXECUTED
69880: 00fe .short 0x00fe <== NOT EXECUTED
69882: 00fe .short 0x00fe <== NOT EXECUTED
69884: 00fe .short 0x00fe <== NOT EXECUTED
69886: 00fe .short 0x00fe <== NOT EXECUTED
69888: 00fe .short 0x00fe <== NOT EXECUTED
/*
* FIXME: We ignore the start value fd2 for the file descriptor search. This
* is not POSIX conform.
*/
rtems_libio_t *diop = rtems_libio_allocate();
6988a: 4eb9 0004 66b0 jsr 466b0 <rtems_libio_allocate>
69890: 2640 moveal %d0,%a3
if (diop != NULL) {
69892: 4a80 tstl %d0
69894: 6700 011e beqw 699b4 <fcntl+0x194>
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
69898: 2f2a 000c movel %a2@(12),%sp@-
6989c: 4eb9 0004 6660 jsr 46660 <rtems_libio_to_fcntl_flags>
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
698a2: 282b 000c movel %a3@(12),%d4
rtems_libio_t *diop = rtems_libio_allocate();
if (diop != NULL) {
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
oflag &= ~O_CREAT;
698a6: 2400 movel %d0,%d2
698a8: 0882 0009 bclr #9,%d2
diop->flags |= rtems_libio_fcntl_flags( oflag );
698ac: 2f02 movel %d2,%sp@-
698ae: 4eb9 0004 6620 jsr 46620 <rtems_libio_fcntl_flags>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
698b4: 206a 0024 moveal %a2@(36),%a0
if (diop != NULL) {
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
698b8: 8084 orl %d4,%d0
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->lock_h)( mt_entry );
698ba: 2268 000c moveal %a0@(12),%a1
698be: 2740 000c movel %d0,%a3@(12)
698c2: 2f08 movel %a0,%sp@-
698c4: 2051 moveal %a1@,%a0
698c6: 4e90 jsr %a0@
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
698c8: 486a 0010 pea %a2@(16)
698cc: 486b 0010 pea %a3@(16)
698d0: 4eb9 0005 30e0 jsr 530e0 <rtems_filesystem_location_clone>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
698d6: 206a 0024 moveal %a2@(36),%a0
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
(*mt_entry->ops->unlock_h)( mt_entry );
698da: 2268 000c moveal %a0@(12),%a1
698de: 2f08 movel %a0,%sp@-
698e0: 2069 0004 moveal %a1@(4),%a0
698e4: 4e90 jsr %a0@
/*
* 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 );
698e6: 206b 0020 moveal %a3@(32),%a0
698ea: 42a7 clrl %sp@-
698ec: 2f02 movel %d2,%sp@-
698ee: 42a7 clrl %sp@-
698f0: 2f0b movel %a3,%sp@-
698f2: 2050 moveal %a0@,%a0
698f4: 4e90 jsr %a0@
if ( rv == 0 ) {
698f6: 4fef 0028 lea %sp@(40),%sp
/*
* 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 );
698fa: 2400 movel %d0,%d2
if ( rv == 0 ) {
698fc: 6616 bnes 69914 <fcntl+0xf4> <== NEVER TAKEN
rv = diop - rtems_libio_iops;
698fe: 240b movel %a3,%d2
69900: 94b9 0008 0534 subl 80534 <rtems_libio_iops>,%d2
69906: 203c aaaa aaab movel #-1431655765,%d0
6990c: e882 asrl #4,%d2
6990e: 4c00 2800 mulsl %d0,%d2
69912: 607e bras 69992 <fcntl+0x172>
} else {
rtems_libio_free( diop );
69914: 2f0b movel %a3,%sp@- <== NOT EXECUTED
69916: 4eb9 0004 6710 jsr 46710 <rtems_libio_free> <== NOT EXECUTED
6991c: 602c bras 6994a <fcntl+0x12a> <== NOT EXECUTED
fd2 = va_arg( ap, int );
ret = duplicate_iop( iop, fd2 );
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
6991e: 700b moveq #11,%d0
69920: e0aa lsrl %d0,%d2
69922: 103c 0001 moveb #1,%d0
69926: c480 andl %d0,%d2
69928: 606c bras 69996 <fcntl+0x176>
* 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 ) )
6992a: 4aae 0010 tstl %fp@(16)
6992e: 6706 beqs 69936 <fcntl+0x116>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
69930: 08c2 000b bset #11,%d2
69934: 6004 bras 6993a <fcntl+0x11a>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
69936: 0882 000b bclr #11,%d2
6993a: 2542 000c movel %d2,%a2@(12)
6993e: 6030 bras 69970 <fcntl+0x150>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
69940: 2f02 movel %d2,%sp@-
69942: 4eb9 0004 6660 jsr 46660 <rtems_libio_to_fcntl_flags>
69948: 2400 movel %d0,%d2
6994a: 588f addql #4,%sp
6994c: 6044 bras 69992 <fcntl+0x172>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
6994e: 2f2e 0010 movel %fp@(16),%sp@-
69952: 4eb9 0004 6620 jsr 46620 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
69958: 222a 000c movel %a2@(12),%d1
6995c: 588f addql #4,%sp
6995e: 0280 0000 0201 andil #513,%d0
69964: 0281 ffff fdfe andil #-514,%d1
6996a: 8081 orl %d1,%d0
6996c: 2540 000c movel %d0,%a2@(12)
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
69970: 4282 clrl %d2
69972: 6022 bras 69996 <fcntl+0x176>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
69974: 4eb9 0005 b09c jsr 5b09c <__errno>
6997a: 2040 moveal %d0,%a0
6997c: 20bc 0000 0086 movel #134,%a0@
69982: 6030 bras 699b4 <fcntl+0x194>
ret = -1;
break;
default:
errno = EINVAL;
69984: 4eb9 0005 b09c jsr 5b09c <__errno>
6998a: 2040 moveal %d0,%a0
6998c: 7016 moveq #22,%d0
6998e: 2080 movel %d0,%a0@
69990: 6022 bras 699b4 <fcntl+0x194>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
69992: 4a82 tstl %d2
69994: 6d20 blts 699b6 <fcntl+0x196> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
69996: 206a 0020 moveal %a2@(32),%a0
6999a: 2f03 movel %d3,%sp@-
6999c: 2f0a movel %a2,%sp@-
6999e: 2068 0028 moveal %a0@(40),%a0
699a2: 4e90 jsr %a0@
if (err) {
699a4: 508f addql #8,%sp
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
699a6: 2600 movel %d0,%d3
if (err) {
699a8: 670c beqs 699b6 <fcntl+0x196> <== ALWAYS TAKEN
errno = err;
699aa: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
699b0: 2040 moveal %d0,%a0 <== NOT EXECUTED
699b2: 2083 movel %d3,%a0@ <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
699b4: 74ff moveq #-1,%d2
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
699b6: 2002 movel %d2,%d0
699b8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
699be: 4e5e unlk %fp <== NOT EXECUTED
0004b968 <fifo_open>:
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4b968: 4e56 ffdc linkw %fp,#-36
4b96c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4b970: 266e 0008 moveal %fp@(8),%a3
4b974: 286e 000c moveal %fp@(12),%a4
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4b978: 4ab9 0005 f3f8 tstl 5f3f8 <pipe_semaphore>
4b97e: 671c beqs 4b99c <fifo_open+0x34>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4b980: 42a7 clrl %sp@-
4b982: 42a7 clrl %sp@-
4b984: 2f39 0005 f3f8 movel 5f3f8 <pipe_semaphore>,%sp@-
4b98a: 4eb9 0004 78b8 jsr 478b8 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
4b990: 4fef 000c lea %sp@(12),%sp
4b994: 4a80 tstl %d0
4b996: 6700 0340 beqw 4bcd8 <fifo_open+0x370>
4b99a: 6054 bras 4b9f0 <fifo_open+0x88> <== NOT EXECUTED
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4b99c: 42a7 clrl %sp@-
4b99e: 42a7 clrl %sp@-
4b9a0: 2f39 0005 faf0 movel 5faf0 <rtems_libio_semaphore>,%sp@-
4b9a6: 4eb9 0004 78b8 jsr 478b8 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
4b9ac: 4fef 000c lea %sp@(12),%sp
4b9b0: 4ab9 0005 f3f8 tstl 5f3f8 <pipe_semaphore>
4b9b6: 6624 bnes 4b9dc <fifo_open+0x74> <== NEVER TAKEN
sc = rtems_semaphore_create(
4b9b8: 4879 0005 f3f8 pea 5f3f8 <pipe_semaphore>
4b9be: 42a7 clrl %sp@-
4b9c0: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4b9c4: 4878 0001 pea 1 <ADD>
4b9c8: 2f3c 5049 5045 movel #1346981957,%sp@-
4b9ce: 4eb9 0004 767c jsr 4767c <rtems_semaphore_create>
4b9d4: 4fef 0014 lea %sp@(20),%sp
4b9d8: 2400 movel %d0,%d2
4b9da: 6002 bras 4b9de <fifo_open+0x76>
free(pipe);
}
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
4b9dc: 4282 clrl %d2 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b9de: 2f39 0005 faf0 movel 5faf0 <rtems_libio_semaphore>,%sp@-
4b9e4: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4b9ea: 588f addql #4,%sp
4b9ec: 4a82 tstl %d2
4b9ee: 6790 beqs 4b980 <fifo_open+0x18>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
4b9f0: 74f4 moveq #-12,%d2
4b9f2: 6000 0302 braw 4bcf6 <fifo_open+0x38e>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4b9f6: 4878 0034 pea 34 <OPER2+0x20>
4b9fa: 4bf9 0004 3ea0 lea 43ea0 <malloc>,%a5
4ba00: 4e95 jsr %a5@
if (pipe == NULL)
4ba02: 588f addql #4,%sp
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4ba04: 2440 moveal %d0,%a2
if (pipe == NULL)
4ba06: 4a80 tstl %d0
4ba08: 6700 02da beqw 4bce4 <fifo_open+0x37c>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4ba0c: 4878 0034 pea 34 <OPER2+0x20>
4ba10: 42a7 clrl %sp@-
4ba12: 2f00 movel %d0,%sp@-
4ba14: 4eb9 0004 eb20 jsr 4eb20 <memset>
pipe->Size = PIPE_BUF;
4ba1a: 203c 0000 0200 movel #512,%d0
4ba20: 2540 0004 movel %d0,%a2@(4)
pipe->Buffer = malloc(pipe->Size);
4ba24: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4ba28: 4e95 jsr %a5@
if (! pipe->Buffer)
4ba2a: 4fef 0010 lea %sp@(16),%sp
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4ba2e: 2480 movel %d0,%a2@
if (! pipe->Buffer)
4ba30: 6700 00b2 beqw 4bae4 <fifo_open+0x17c>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4ba34: 486a 002c pea %a2@(44)
4ba38: 4bf9 0004 c9f8 lea 4c9f8 <rtems_barrier_create>,%a5
rtems_build_name ('P', 'I', 'r', c),
4ba3e: 1039 0005 e538 moveb 5e538 <c.6147>,%d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4ba44: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'r', c),
4ba46: 49c0 extbl %d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4ba48: 42a7 clrl %sp@-
4ba4a: 0080 5049 7200 oril #1346990592,%d0
4ba50: 2f00 movel %d0,%sp@-
4ba52: 4e95 jsr %a5@
4ba54: 4fef 0010 lea %sp@(16),%sp
4ba58: 4a80 tstl %d0
4ba5a: 667e bnes 4bada <fifo_open+0x172>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4ba5c: 486a 0030 pea %a2@(48)
rtems_build_name ('P', 'I', 'w', c),
4ba60: 1039 0005 e538 moveb 5e538 <c.6147>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4ba66: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'w', c),
4ba68: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4ba6a: 42a7 clrl %sp@-
4ba6c: 0080 5049 7700 oril #1346991872,%d0
4ba72: 2f00 movel %d0,%sp@-
4ba74: 4e95 jsr %a5@
4ba76: 4fef 0010 lea %sp@(16),%sp
4ba7a: 4a80 tstl %d0
4ba7c: 6650 bnes 4bace <fifo_open+0x166>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4ba7e: 486a 0028 pea %a2@(40)
rtems_build_name ('P', 'I', 's', c), 1,
4ba82: 1039 0005 e538 moveb 5e538 <c.6147>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4ba88: 42a7 clrl %sp@-
4ba8a: 4878 0010 pea 10 <INVALID_OPERATION>
rtems_build_name ('P', 'I', 's', c), 1,
4ba8e: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4ba90: 4878 0001 pea 1 <ADD>
4ba94: 0080 5049 7300 oril #1346990848,%d0
4ba9a: 2f00 movel %d0,%sp@-
4ba9c: 4eb9 0004 767c jsr 4767c <rtems_semaphore_create>
4baa2: 4fef 0014 lea %sp@(20),%sp
4baa6: 4a80 tstl %d0
4baa8: 6618 bnes 4bac2 <fifo_open+0x15a>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4baaa: 747a moveq #122,%d2
4baac: 1039 0005 e538 moveb 5e538 <c.6147>,%d0
4bab2: 1200 moveb %d0,%d1
4bab4: 49c1 extbl %d1
4bab6: b481 cmpl %d1,%d2
4bab8: 6600 0230 bnew 4bcea <fifo_open+0x382>
c = 'a';
4babc: 7061 moveq #97,%d0
4babe: 6000 022c braw 4bcec <fifo_open+0x384>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4bac2: 2f2a 0030 movel %a2@(48),%sp@-
4bac6: 4eb9 0004 cab0 jsr 4cab0 <rtems_barrier_delete>
4bacc: 588f addql #4,%sp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
4bace: 2f2a 002c movel %a2@(44),%sp@-
4bad2: 4eb9 0004 cab0 jsr 4cab0 <rtems_barrier_delete>
4bad8: 588f addql #4,%sp
err_rbar:
free(pipe->Buffer);
4bada: 2f12 movel %a2@,%sp@-
4badc: 4eb9 0004 3ab4 jsr 43ab4 <free>
4bae2: 588f addql #4,%sp
err_buf:
free(pipe);
4bae4: 2f0a movel %a2,%sp@-
4bae6: 4eb9 0004 3ab4 jsr 43ab4 <free>
4baec: 588f addql #4,%sp
4baee: 6000 01f4 braw 4bce4 <fifo_open+0x37c>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4baf2: 42a7 clrl %sp@-
4baf4: 42a7 clrl %sp@-
4baf6: 2f2a 0028 movel %a2@(40),%sp@-
4bafa: 4eb9 0004 78b8 jsr 478b8 <rtems_semaphore_obtain>
4bb00: 4fef 000c lea %sp@(12),%sp
4bb04: 4a80 tstl %d0
4bb06: 6604 bnes 4bb0c <fifo_open+0x1a4> <== NEVER TAKEN
4bb08: 4282 clrl %d2
4bb0a: 6002 bras 4bb0e <fifo_open+0x1a6>
err = -EINTR;
4bb0c: 74fc moveq #-4,%d2 <== NOT EXECUTED
if (*pipep == NULL) {
4bb0e: 4a93 tstl %a3@
4bb10: 6610 bnes 4bb22 <fifo_open+0x1ba>
if (err)
4bb12: 4a82 tstl %d2
4bb14: 670a beqs 4bb20 <fifo_open+0x1b8> <== ALWAYS TAKEN
pipe_free(pipe);
4bb16: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bb18: 4eba fd72 jsr %pc@(4b88c <pipe_free>) <== NOT EXECUTED
4bb1c: 588f addql #4,%sp <== NOT EXECUTED
4bb1e: 6002 bras 4bb22 <fifo_open+0x1ba> <== NOT EXECUTED
else
*pipep = pipe;
4bb20: 268a movel %a2,%a3@
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
4bb22: 2f39 0005 f3f8 movel 5f3f8 <pipe_semaphore>,%sp@-
4bb28: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4bb2e: 588f addql #4,%sp
4bb30: 4a82 tstl %d2
4bb32: 6600 01c2 bnew 4bcf6 <fifo_open+0x38e>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4bb36: 7006 moveq #6,%d0
4bb38: 7204 moveq #4,%d1
4bb3a: c0ac 000c andl %a4@(12),%d0
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4bb3e: 2453 moveal %a3@,%a2
switch (LIBIO_ACCMODE(iop)) {
4bb40: b280 cmpl %d0,%d1
4bb42: 6700 009c beqw 4bbe0 <fifo_open+0x278>
4bb46: 123c 0006 moveb #6,%d1
4bb4a: b280 cmpl %d0,%d1
4bb4c: 6700 0124 beqw 4bc72 <fifo_open+0x30a>
4bb50: 123c 0002 moveb #2,%d1
4bb54: b280 cmpl %d0,%d1
4bb56: 6600 0162 bnew 4bcba <fifo_open+0x352>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4bb5a: 202a 0010 movel %a2@(16),%d0
4bb5e: 2040 moveal %d0,%a0
4bb60: 5288 addql #1,%a0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4bb62: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4bb66: 2548 0010 movel %a0,%a2@(16)
4bb6a: 4a80 tstl %d0
4bb6c: 6610 bnes 4bb7e <fifo_open+0x216> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
4bb6e: 486e fffc pea %fp@(-4)
4bb72: 2f2a 0030 movel %a2@(48),%sp@-
4bb76: 4eb9 0004 cb4c jsr 4cb4c <rtems_barrier_release>
4bb7c: 508f addql #8,%sp
if (pipe->Writers == 0) {
4bb7e: 4aaa 0014 tstl %a2@(20)
4bb82: 6600 0136 bnew 4bcba <fifo_open+0x352>
/* Not an error */
if (LIBIO_NODELAY(iop))
4bb86: 7001 moveq #1,%d0
4bb88: c0ac 000c andl %a4@(12),%d0
4bb8c: 6600 012c bnew 4bcba <fifo_open+0x352>
break;
prevCounter = pipe->writerCounter;
4bb90: 262a 0024 movel %a2@(36),%d3
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4bb94: 4bf9 0004 79c0 lea 479c0 <rtems_semaphore_release>,%a5
if (! PIPE_READWAIT(pipe))
4bb9a: 283c 0004 cbb0 movel #314288,%d4
goto out_error;
if (! PIPE_LOCK(pipe))
4bba0: 2a3c 0004 78b8 movel #293048,%d5
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4bba6: 2f2a 0028 movel %a2@(40),%sp@-
4bbaa: 4e95 jsr %a5@
if (! PIPE_READWAIT(pipe))
4bbac: 2044 moveal %d4,%a0
4bbae: 42a7 clrl %sp@-
4bbb0: 2f2a 002c movel %a2@(44),%sp@-
4bbb4: 4e90 jsr %a0@
4bbb6: 4fef 000c lea %sp@(12),%sp
4bbba: 4a80 tstl %d0
4bbbc: 6600 010a bnew 4bcc8 <fifo_open+0x360>
goto out_error;
if (! PIPE_LOCK(pipe))
4bbc0: 42a7 clrl %sp@-
4bbc2: 2045 moveal %d5,%a0
4bbc4: 42a7 clrl %sp@-
4bbc6: 2f2a 0028 movel %a2@(40),%sp@-
4bbca: 4e90 jsr %a0@
4bbcc: 4fef 000c lea %sp@(12),%sp
4bbd0: 4a80 tstl %d0
4bbd2: 6600 00f4 bnew 4bcc8 <fifo_open+0x360>
goto out_error;
} while (prevCounter == pipe->writerCounter);
4bbd6: b6aa 0024 cmpl %a2@(36),%d3
4bbda: 67ca beqs 4bba6 <fifo_open+0x23e> <== NEVER TAKEN
4bbdc: 6000 00dc braw 4bcba <fifo_open+0x352>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4bbe0: 202a 0014 movel %a2@(20),%d0
4bbe4: 2200 movel %d0,%d1
4bbe6: 5281 addql #1,%d1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4bbe8: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4bbec: 2541 0014 movel %d1,%a2@(20)
4bbf0: 4a80 tstl %d0
4bbf2: 6610 bnes 4bc04 <fifo_open+0x29c> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4bbf4: 486e fffc pea %fp@(-4)
4bbf8: 2f2a 002c movel %a2@(44),%sp@-
4bbfc: 4eb9 0004 cb4c jsr 4cb4c <rtems_barrier_release>
4bc02: 508f addql #8,%sp
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4bc04: 4aaa 0010 tstl %a2@(16)
4bc08: 6600 00b0 bnew 4bcba <fifo_open+0x352>
4bc0c: 7001 moveq #1,%d0
4bc0e: c0ac 000c andl %a4@(12),%d0
4bc12: 6712 beqs 4bc26 <fifo_open+0x2be>
PIPE_UNLOCK(pipe);
4bc14: 2f2a 0028 movel %a2@(40),%sp@-
err = -ENXIO;
4bc18: 74fa moveq #-6,%d2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4bc1a: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
4bc20: 588f addql #4,%sp
4bc22: 6000 00a6 braw 4bcca <fifo_open+0x362>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4bc26: 2a6a 0020 moveal %a2@(32),%a5
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4bc2a: 263c 0004 79c0 movel #293312,%d3
if (! PIPE_WRITEWAIT(pipe))
4bc30: 283c 0004 cbb0 movel #314288,%d4
goto out_error;
if (! PIPE_LOCK(pipe))
4bc36: 2a3c 0004 78b8 movel #293048,%d5
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4bc3c: 2f2a 0028 movel %a2@(40),%sp@-
4bc40: 2043 moveal %d3,%a0
4bc42: 4e90 jsr %a0@
if (! PIPE_WRITEWAIT(pipe))
4bc44: 2044 moveal %d4,%a0
4bc46: 42a7 clrl %sp@-
4bc48: 2f2a 0030 movel %a2@(48),%sp@-
4bc4c: 4e90 jsr %a0@
4bc4e: 4fef 000c lea %sp@(12),%sp
4bc52: 4a80 tstl %d0
4bc54: 6672 bnes 4bcc8 <fifo_open+0x360> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
4bc56: 42a7 clrl %sp@-
4bc58: 2045 moveal %d5,%a0
4bc5a: 42a7 clrl %sp@-
4bc5c: 2f2a 0028 movel %a2@(40),%sp@-
4bc60: 4e90 jsr %a0@
4bc62: 4fef 000c lea %sp@(12),%sp
4bc66: 4a80 tstl %d0
4bc68: 665e bnes 4bcc8 <fifo_open+0x360> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
4bc6a: bbea 0020 cmpal %a2@(32),%a5
4bc6e: 67cc beqs 4bc3c <fifo_open+0x2d4> <== NEVER TAKEN
4bc70: 6048 bras 4bcba <fifo_open+0x352>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4bc72: 202a 0010 movel %a2@(16),%d0
4bc76: 2200 movel %d0,%d1
4bc78: 5281 addql #1,%d1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4bc7a: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4bc7e: 2541 0010 movel %d1,%a2@(16)
4bc82: 4a80 tstl %d0
4bc84: 6610 bnes 4bc96 <fifo_open+0x32e> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
4bc86: 486e fffc pea %fp@(-4)
4bc8a: 2f2a 0030 movel %a2@(48),%sp@-
4bc8e: 4eb9 0004 cb4c jsr 4cb4c <rtems_barrier_release>
4bc94: 508f addql #8,%sp
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4bc96: 202a 0014 movel %a2@(20),%d0
4bc9a: 2040 moveal %d0,%a0
4bc9c: 5288 addql #1,%a0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4bc9e: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4bca2: 2548 0014 movel %a0,%a2@(20)
4bca6: 4a80 tstl %d0
4bca8: 6610 bnes 4bcba <fifo_open+0x352> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4bcaa: 486e fffc pea %fp@(-4)
4bcae: 2f2a 002c movel %a2@(44),%sp@-
4bcb2: 4eb9 0004 cb4c jsr 4cb4c <rtems_barrier_release>
4bcb8: 508f addql #8,%sp
break;
}
PIPE_UNLOCK(pipe);
4bcba: 2f2a 0028 movel %a2@(40),%sp@-
4bcbe: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
return 0;
4bcc4: 588f addql #4,%sp
4bcc6: 602e bras 4bcf6 <fifo_open+0x38e>
/* Not an error */
if (LIBIO_NODELAY(iop))
break;
prevCounter = pipe->writerCounter;
err = -EINTR;
4bcc8: 74fc moveq #-4,%d2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4bcca: 2f0c movel %a4,%sp@-
4bccc: 2f0b movel %a3,%sp@-
4bcce: 4eb9 0004 b8d4 jsr 4b8d4 <pipe_release>
return err;
4bcd4: 508f addql #8,%sp
4bcd6: 601e bras 4bcf6 <fifo_open+0x38e>
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
4bcd8: 2453 moveal %a3@,%a2
if (pipe == NULL) {
4bcda: 4a8a tstl %a2
4bcdc: 6600 fe14 bnew 4baf2 <fifo_open+0x18a>
4bce0: 6000 fd14 braw 4b9f6 <fifo_open+0x8e>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
4bce4: 74f4 moveq #-12,%d2
4bce6: 6000 fe3a braw 4bb22 <fifo_open+0x1ba>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4bcea: 5280 addql #1,%d0
4bcec: 13c0 0005 e538 moveb %d0,5e538 <c.6147>
4bcf2: 6000 fdfe braw 4baf2 <fifo_open+0x18a>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4bcf6: 2002 movel %d2,%d0
4bcf8: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5
4bcfe: 4e5e unlk %fp <== NOT EXECUTED
0004754c <fpathconf>:
*/
long fpathconf(
int fd,
int name
)
{
4754c: 4e56 0000 linkw %fp,#0
47550: 202e 0008 movel %fp@(8),%d0
47554: 222e 000c movel %fp@(12),%d1
47558: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
const rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
4755a: b0b9 0005 b394 cmpl 5b394 <rtems_libio_number_iops>,%d0
47560: 6502 bcss 47564 <fpathconf+0x18> <== NEVER TAKEN
47562: 601c bras 47580 <fpathconf+0x34>
iop = rtems_libio_iop(fd);
47564: 2400 movel %d0,%d2 <== NOT EXECUTED
47566: ed88 lsll #6,%d0 <== NOT EXECUTED
47568: e98a lsll #4,%d2 <== NOT EXECUTED
4756a: 2079 0005 c38c moveal 5c38c <rtems_libio_iops>,%a0 <== NOT EXECUTED
47570: 9082 subl %d2,%d0 <== NOT EXECUTED
47572: d1c0 addal %d0,%a0 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
47574: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED
47578: 0280 0000 0100 andil #256,%d0 <== NOT EXECUTED
4757e: 6610 bnes 47590 <fpathconf+0x44> <== NOT EXECUTED
47580: 4eb9 0004 8c20 jsr 48c20 <__errno>
47586: 7209 moveq #9,%d1
47588: 2040 moveal %d0,%a0
4758a: 2081 movel %d1,%a0@
4758c: 6000 0084 braw 47612 <fpathconf+0xc6>
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
47590: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED
switch ( name ) {
47594: 700b moveq #11,%d0 <== NOT EXECUTED
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
47596: 2068 002a moveal %a0@(42),%a0 <== NOT EXECUTED
switch ( name ) {
4759a: b081 cmpl %d1,%d0 <== NOT EXECUTED
4759c: 6568 bcss 47606 <fpathconf+0xba> <== NOT EXECUTED
4759e: 303b 1a08 movew %pc@(475a8 <fpathconf+0x5c>,%d1:l:2),%d0<== NOT EXECUTED
475a2: 48c0 extl %d0 <== NOT EXECUTED
475a4: 4efb 0802 jmp %pc@(475a8 <fpathconf+0x5c>,%d0:l) <== NOT EXECUTED
475a8: 0018 .short 0x0018 <== NOT EXECUTED
475aa: 001c .short 0x001c <== NOT EXECUTED
475ac: 0022 .short 0x0022 <== NOT EXECUTED
475ae: 0028 .short 0x0028 <== NOT EXECUTED
475b0: 002e .short 0x002e <== NOT EXECUTED
475b2: 0034 .short 0x0034 <== NOT EXECUTED
475b4: 003a .short 0x003a <== NOT EXECUTED
475b6: 0040 .short 0x0040 <== NOT EXECUTED
475b8: 0046 .short 0x0046 <== NOT EXECUTED
475ba: 004c .short 0x004c <== NOT EXECUTED
475bc: 0052 .short 0x0052 <== NOT EXECUTED
475be: 0058 .short 0x0058 <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
475c0: 2010 movel %a0@,%d0 <== NOT EXECUTED
break;
475c2: 6050 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
475c4: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED
break;
475c8: 604a bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
475ca: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
break;
475ce: 6044 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_NAME_MAX:
return_value = the_limits->name_max;
475d0: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED
break;
475d4: 603e bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_PATH_MAX:
return_value = the_limits->path_max;
475d6: 2028 0010 movel %a0@(16),%d0 <== NOT EXECUTED
break;
475da: 6038 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
475dc: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED
break;
475e0: 6032 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
475e2: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED
break;
475e6: 602c bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
475e8: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED
break;
475ec: 6026 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
475ee: 2028 002c movel %a0@(44),%d0 <== NOT EXECUTED
break;
475f2: 6020 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
475f4: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED
break;
475f8: 601a bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
475fa: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED
break;
475fe: 6014 bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
47600: 2028 0028 movel %a0@(40),%d0 <== NOT EXECUTED
break;
47604: 600e bras 47614 <fpathconf+0xc8> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47606: 4eb9 0004 8c20 jsr 48c20 <__errno> <== NOT EXECUTED
4760c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4760e: 7016 moveq #22,%d0 <== NOT EXECUTED
47610: 2080 movel %d0,%a0@ <== NOT EXECUTED
47612: 70ff moveq #-1,%d0
break;
}
return return_value;
}
47614: 242e fffc movel %fp@(-4),%d2
47618: 4e5e unlk %fp <== NOT EXECUTED
00042a60 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
42a60: 4e56 0000 linkw %fp,#0
MSBUMP(free_calls, 1);
42a64: 52b9 0005 dafc addql #1,5dafc <rtems_malloc_statistics+0xc>
#include <stdlib.h>
void free(
void *ptr
)
{
42a6a: 2f02 movel %d2,%sp@-
42a6c: 242e 0008 movel %fp@(8),%d2
MSBUMP(free_calls, 1);
if ( !ptr )
42a70: 676c beqs 42ade <free+0x7e>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42a72: 7003 moveq #3,%d0
42a74: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0
42a7a: 661a bnes 42a96 <free+0x36> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
42a7c: 4eb9 0004 2c30 jsr 42c30 <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42a82: 4a00 tstb %d0
42a84: 6610 bnes 42a96 <free+0x36>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42a86: 2d42 0008 movel %d2,%fp@(8)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42a8a: 242e fffc movel %fp@(-4),%d2
42a8e: 4e5e unlk %fp
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42a90: 4ef9 0004 2c84 jmp 42c84 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
42a96: 2079 0005 cab4 moveal 5cab4 <rtems_malloc_statistics_helpers>,%a0
42a9c: 4a88 tstl %a0
42a9e: 670a beqs 42aaa <free+0x4a>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
42aa0: 2f02 movel %d2,%sp@-
42aa2: 2068 0008 moveal %a0@(8),%a0
42aa6: 4e90 jsr %a0@
42aa8: 588f addql #4,%sp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
42aaa: 2f02 movel %d2,%sp@-
42aac: 2f39 0005 c40c movel 5c40c <RTEMS_Malloc_Heap>,%sp@-
42ab2: 4eb9 0004 7ce8 jsr 47ce8 <_Protected_heap_Free>
42ab8: 508f addql #8,%sp
42aba: 4a00 tstb %d0
42abc: 6620 bnes 42ade <free+0x7e>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
42abe: 2079 0005 c40c moveal 5c40c <RTEMS_Malloc_Heap>,%a0
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
42ac4: 2f28 001c movel %a0@(28),%sp@-
42ac8: 2f28 0018 movel %a0@(24),%sp@-
42acc: 2f02 movel %d2,%sp@-
42ace: 4879 0005 b414 pea 5b414 <rtems_status_assoc+0x168>
42ad4: 4eb9 0004 372c jsr 4372c <printk>
42ada: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42ade: 242e fffc movel %fp@(-4),%d2
42ae2: 4e5e unlk %fp
...
00059ef4 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
59ef4: 4e56 0000 linkw %fp,#0
59ef8: 202e 0008 movel %fp@(8),%d0
59efc: 2f0a movel %a2,%sp@-
59efe: 2f02 movel %d2,%sp@-
59f00: 242e 000c movel %fp@(12),%d2
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
59f04: 660e bnes 59f14 <fstat+0x20> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
59f06: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
59f0c: 720e moveq #14,%d1 <== NOT EXECUTED
59f0e: 2040 moveal %d0,%a0 <== NOT EXECUTED
59f10: 2081 movel %d1,%a0@ <== NOT EXECUTED
59f12: 6064 bras 59f78 <fstat+0x84> <== NOT EXECUTED
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
59f14: b0b9 0005 c450 cmpl 5c450 <rtems_libio_number_iops>,%d0
59f1a: 641c bccs 59f38 <fstat+0x44>
59f1c: 2200 movel %d0,%d1
59f1e: ed88 lsll #6,%d0
59f20: e989 lsll #4,%d1
59f22: 2479 0005 dae4 moveal 5dae4 <rtems_libio_iops>,%a2
59f28: 9081 subl %d1,%d0
59f2a: d5c0 addal %d0,%a2
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
59f2c: 202a 000c movel %a2@(12),%d0
59f30: 0280 0000 0100 andil #256,%d0
59f36: 660e bnes 59f46 <fstat+0x52>
59f38: 4eb9 0004 c330 jsr 4c330 <__errno>
59f3e: 2040 moveal %d0,%a0
59f40: 7009 moveq #9,%d0
59f42: 2080 movel %d0,%a0@
59f44: 6032 bras 59f78 <fstat+0x84>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
59f46: 4878 0046 pea 46 <DBL_MANT_DIG+0x11>
59f4a: 42a7 clrl %sp@-
59f4c: 2f02 movel %d2,%sp@-
59f4e: 4eb9 0004 cbc0 jsr 4cbc0 <memset>
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
59f54: 206a 0020 moveal %a2@(32),%a0
59f58: 45ea 0010 lea %a2@(16),%a2
59f5c: 4fef 000c lea %sp@(12),%sp
59f60: 2d42 000c movel %d2,%fp@(12)
}
59f64: 242e fff8 movel %fp@(-8),%d2
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
59f68: 2d4a 0008 movel %a2,%fp@(8)
}
59f6c: 246e fffc moveal %fp@(-4),%a2
59f70: 4e5e unlk %fp
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
59f72: 2268 0018 moveal %a0@(24),%a1
59f76: 4ed1 jmp %a1@
}
59f78: 242e fff8 movel %fp@(-8),%d2
59f7c: 70ff moveq #-1,%d0
59f7e: 246e fffc moveal %fp@(-4),%a2
59f82: 4e5e unlk %fp <== NOT EXECUTED
00042734 <get_disk_entry>:
}
}
static rtems_disk_device *
get_disk_entry(dev_t dev, bool lookup_only)
{
42734: 4e56 0000 linkw %fp,#0
42738: 202e 000c movel %fp@(12),%d0
4273c: 2f03 movel %d3,%sp@-
4273e: 162e 0013 moveb %fp@(19),%d3
42742: 2f02 movel %d2,%sp@-
42744: 242e 0008 movel %fp@(8),%d2
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major < disktab_size && disktab != NULL) {
42748: b4b9 0006 0b76 cmpl 60b76 <disktab_size>,%d2
4274e: 6432 bccs 42782 <get_disk_entry+0x4e> <== NEVER TAKEN
42750: 2239 0006 0b7a movel 60b7a <disktab>,%d1
42756: 672a beqs 42782 <get_disk_entry+0x4e> <== NEVER TAKEN
rtems_disk_device_table *dtab = disktab + major;
42758: 2041 moveal %d1,%a0
4275a: e78a lsll #3,%d2
4275c: d1c2 addal %d2,%a0
if (minor < dtab->size && dtab->minor != NULL) {
4275e: b0a8 0004 cmpl %a0@(4),%d0
42762: 641e bccs 42782 <get_disk_entry+0x4e> <== NEVER TAKEN
42764: 2050 moveal %a0@,%a0
42766: 4a88 tstl %a0
42768: 6718 beqs 42782 <get_disk_entry+0x4e> <== NEVER TAKEN
rtems_disk_device *dd = dtab->minor [minor];
4276a: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if (dd != NULL && !lookup_only) {
4276e: 4a88 tstl %a0
42770: 6712 beqs 42784 <get_disk_entry+0x50>
42772: 4a03 tstb %d3
42774: 660e bnes 42784 <get_disk_entry+0x50>
if (!dd->deleted) {
42776: 4a28 0040 tstb %a0@(64)
4277a: 6606 bnes 42782 <get_disk_entry+0x4e>
++dd->uses;
4277c: 52a8 0014 addql #1,%a0@(20)
42780: 6002 bras 42784 <get_disk_entry+0x50>
return dd;
}
}
return NULL;
42782: 91c8 subal %a0,%a0
}
42784: 241f movel %sp@+,%d2
42786: 2008 movel %a0,%d0
42788: 261f movel %sp@+,%d3
4278a: 4e5e unlk %fp <== NOT EXECUTED
000438f8 <get_sector.part.0>:
* NOTES:
* get_sector() operates with device via bdbuf library,
* and does not support devices with sector size other than 512 bytes
*/
static rtems_status_code
get_sector(int fd,
438f8: 4e56 0000 linkw %fp,#0
438fc: 2f0a movel %a2,%sp@-
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
438fe: 4878 0204 pea 204 <DBL_MANT_DIG+0x1cf>
43902: 4eb9 0004 4e0c jsr 44e0c <malloc>
if (s == NULL)
43908: 588f addql #4,%sp
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
4390a: 2440 moveal %d0,%a2
if (s == NULL)
4390c: 4a80 tstl %d0
4390e: 673a beqs 4394a <get_sector.part.0+0x52> <== NEVER TAKEN
{
return RTEMS_NO_MEMORY;
}
n = read(fd, s->data, RTEMS_IDE_SECTOR_SIZE);
43910: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
43914: 486a 0004 pea %a2@(4)
43918: 2f2e 0008 movel %fp@(8),%sp@-
4391c: 4eb9 0004 5820 jsr 45820 <read>
if (n != RTEMS_IDE_SECTOR_SIZE)
43922: 4fef 000c lea %sp@(12),%sp
43926: 0c80 0000 0200 cmpil #512,%d0
4392c: 670e beqs 4393c <get_sector.part.0+0x44> <== ALWAYS TAKEN
{
free(s);
4392e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43930: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
43936: 588f addql #4,%sp <== NOT EXECUTED
return RTEMS_IO_ERROR;
43938: 701b moveq #27,%d0 <== NOT EXECUTED
4393a: 6010 bras 4394c <get_sector.part.0+0x54> <== NOT EXECUTED
}
s->sector_num = sector_num;
4393c: 24ae 000c movel %fp@(12),%a2@
*sector = s;
return RTEMS_SUCCESSFUL;
43940: 4280 clrl %d0
return RTEMS_IO_ERROR;
}
s->sector_num = sector_num;
*sector = s;
43942: 206e 0010 moveal %fp@(16),%a0
43946: 208a movel %a2,%a0@
43948: 6002 bras 4394c <get_sector.part.0+0x54>
}
s = (rtems_sector_data_t *) malloc(sizeof(rtems_sector_data_t) + RTEMS_IDE_SECTOR_SIZE);
if (s == NULL)
{
return RTEMS_NO_MEMORY;
4394a: 701a moveq #26,%d0 <== NOT EXECUTED
s->sector_num = sector_num;
*sector = s;
return RTEMS_SUCCESSFUL;
}
4394c: 246e fffc moveal %fp@(-4),%a2
43950: 4e5e unlk %fp <== NOT EXECUTED
000699f8 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
699f8: 4e56 fff4 linkw %fp,#-12
699fc: 202e 0008 movel %fp@(8),%d0
69a00: 48d7 040c moveml %d2-%d3/%a2,%sp@
69a04: 242e 000c movel %fp@(12),%d2
69a08: 262e 0010 movel %fp@(16),%d3
rtems_filesystem_node_types_t type;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
69a0c: b0b9 0006 ed48 cmpl 6ed48 <rtems_libio_number_iops>,%d0
69a12: 6412 bccs 69a26 <getdents+0x2e> <== NEVER TAKEN
69a14: 2200 movel %d0,%d1
69a16: ed88 lsll #6,%d0
69a18: e989 lsll #4,%d1
69a1a: 2479 0008 0534 moveal 80534 <rtems_libio_iops>,%a2
69a20: 9081 subl %d1,%d0
69a22: d5c0 addal %d0,%a2
69a24: 6002 bras 69a28 <getdents+0x30>
69a26: 95ca subal %a2,%a2 <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
69a28: 486a 0010 pea %a2@(16)
69a2c: 4eb9 0004 80d4 jsr 480d4 <rtems_filesystem_node_type>
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
69a32: 588f addql #4,%sp
69a34: 4a80 tstl %d0
69a36: 661e bnes 69a56 <getdents+0x5e>
/*
* 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 );
69a38: 206a 0020 moveal %a2@(32),%a0
69a3c: 2d43 0010 movel %d3,%fp@(16)
69a40: 2d42 000c movel %d2,%fp@(12)
69a44: 2d4a 0008 movel %a2,%fp@(8)
69a48: 2268 0008 moveal %a0@(8),%a1
}
69a4c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
69a52: 4e5e unlk %fp
/*
* 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 );
69a54: 4ed1 jmp %a1@
/*
* 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 );
69a56: 4eb9 0005 b09c jsr 5b09c <__errno>
69a5c: 2040 moveal %d0,%a0
69a5e: 7014 moveq #20,%d0
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
69a60: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
/*
* 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 );
69a66: 2080 movel %d0,%a0@
/*
* 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 );
}
69a68: 70ff moveq #-1,%d0
69a6a: 4e5e unlk %fp
...
00042ae8 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
42ae8: 4e56 ffe8 linkw %fp,#-24
42aec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
42af0: 246e 0008 moveal %fp@(8),%a2
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp )
42af4: 4a8a tstl %a2
42af6: 6610 bnes 42b08 <gettimeofday+0x20> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
42af8: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
42afe: 2040 moveal %d0,%a0 <== NOT EXECUTED
42b00: 700e moveq #14,%d0 <== NOT EXECUTED
42b02: 2080 movel %d0,%a0@ <== NOT EXECUTED
42b04: 70ff moveq #-1,%d0 <== NOT EXECUTED
42b06: 605e bras 42b66 <gettimeofday+0x7e> <== NOT EXECUTED
)
{
Timestamp_Control snapshot_as_timestamp;
Timestamp_Control *snapshot_as_timestamp_ptr;
snapshot_as_timestamp_ptr =
42b08: 4879 0005 db98 pea 5db98 <_TOD>
static inline void _Timestamp64_implementation_To_timeval(
const Timestamp64_Control *_timestamp,
struct timeval *_timeval
)
{
_timeval->tv_sec = (time_t) (*_timestamp / 1000000000U);
42b0e: 47f9 0005 89ec lea 589ec <__divdi3>,%a3
42b14: 486e fff8 pea %fp@(-8)
42b18: 4eb9 0004 70cc jsr 470cc <_TOD_Get_with_nanoseconds>
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
}
42b1e: 2040 moveal %d0,%a0
42b20: 2410 movel %a0@,%d2
42b22: 2628 0004 movel %a0@(4),%d3
42b26: 2f3c 3b9a ca00 movel #1000000000,%sp@-
42b2c: 42a7 clrl %sp@-
42b2e: 2f03 movel %d3,%sp@-
42b30: 2f02 movel %d2,%sp@-
42b32: 4e93 jsr %a3@
42b34: 4fef 0010 lea %sp@(16),%sp
42b38: 2481 movel %d1,%a2@
_timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U);
42b3a: 2f3c 3b9a ca00 movel #1000000000,%sp@-
42b40: 42a7 clrl %sp@-
42b42: 2f03 movel %d3,%sp@-
42b44: 2f02 movel %d2,%sp@-
42b46: 4eb9 0005 8e4c jsr 58e4c <__moddi3>
42b4c: 4fef 0010 lea %sp@(16),%sp
42b50: 4878 03e8 pea 3e8 <DBL_MANT_DIG+0x3b3>
42b54: 42a7 clrl %sp@-
42b56: 2f01 movel %d1,%sp@-
42b58: 2f00 movel %d0,%sp@-
42b5a: 4e93 jsr %a3@
42b5c: 4fef 0018 lea %sp@(24),%sp
* 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;
42b60: 4280 clrl %d0
42b62: 2541 0004 movel %d1,%a2@(4)
}
42b66: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
42b6c: 4e5e unlk %fp <== NOT EXECUTED
0005e0a6 <init_etc_passwd_group>:
/**
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
5e0a6: 4e56 0000 linkw %fp,#0
5e0aa: 2f0a movel %a2,%sp@-
5e0ac: 2f02 movel %d2,%sp@-
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
5e0ae: 4a39 0009 55cc tstb 955cc <etc_passwd_initted.6902>
5e0b4: 6600 00c4 bnew 5e17a <init_etc_passwd_group+0xd4>
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
5e0b8: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
5e0bc: 45f9 0006 e426 lea 6e426 <fopen>,%a2
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
5e0c2: 4879 0008 d186 pea 8d186 <RTEMS_BDPART_MBR_MASTER_TYPE+0x6ad>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
5e0c8: 7001 moveq #1,%d0
5e0ca: 13c0 0009 55cc moveb %d0,955cc <etc_passwd_initted.6902>
mkdir("/etc", 0777);
5e0d0: 4eb9 0004 2c14 jsr 42c14 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
5e0d6: 4879 0008 99c1 pea 899c1 <rtems_bdpart_shell_usage+0x313>
5e0dc: 4879 0008 d18b pea 8d18b <RTEMS_BDPART_MBR_MASTER_TYPE+0x6b2>
5e0e2: 4e92 jsr %a2@
5e0e4: 4fef 0010 lea %sp@(16),%sp
5e0e8: 4a80 tstl %d0
5e0ea: 670c beqs 5e0f8 <init_etc_passwd_group+0x52>
fclose(fp);
5e0ec: 2f00 movel %d0,%sp@-
5e0ee: 4eb9 0006 db88 jsr 6db88 <fclose>
5e0f4: 588f addql #4,%sp
5e0f6: 602e bras 5e126 <init_etc_passwd_group+0x80>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
5e0f8: 4879 0008 99be pea 899be <rtems_bdpart_shell_usage+0x310>
5e0fe: 4879 0008 d18b pea 8d18b <RTEMS_BDPART_MBR_MASTER_TYPE+0x6b2>
5e104: 4e92 jsr %a2@
5e106: 508f addql #8,%sp
5e108: 2400 movel %d0,%d2
5e10a: 671a beqs 5e126 <init_etc_passwd_group+0x80> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
5e10c: 2f00 movel %d0,%sp@-
5e10e: 4879 0008 d197 pea 8d197 <RTEMS_BDPART_MBR_MASTER_TYPE+0x6be>
5e114: 4eb9 0006 e5b6 jsr 6e5b6 <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
5e11a: 2f02 movel %d2,%sp@-
5e11c: 4eb9 0006 db88 jsr 6db88 <fclose>
5e122: 4fef 000c lea %sp@(12),%sp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
5e126: 4879 0008 99c1 pea 899c1 <rtems_bdpart_shell_usage+0x313>
5e12c: 45f9 0006 e426 lea 6e426 <fopen>,%a2
5e132: 4879 0008 d1fe pea 8d1fe <RTEMS_BDPART_MBR_MASTER_TYPE+0x725>
5e138: 4e92 jsr %a2@
5e13a: 508f addql #8,%sp
5e13c: 4a80 tstl %d0
5e13e: 670c beqs 5e14c <init_etc_passwd_group+0xa6>
fclose(fp);
5e140: 2f00 movel %d0,%sp@-
5e142: 4eb9 0006 db88 jsr 6db88 <fclose>
5e148: 588f addql #4,%sp
5e14a: 602e bras 5e17a <init_etc_passwd_group+0xd4>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
5e14c: 4879 0008 99be pea 899be <rtems_bdpart_shell_usage+0x310>
5e152: 4879 0008 d1fe pea 8d1fe <RTEMS_BDPART_MBR_MASTER_TYPE+0x725>
5e158: 4e92 jsr %a2@
5e15a: 508f addql #8,%sp
5e15c: 2400 movel %d0,%d2
5e15e: 671a beqs 5e17a <init_etc_passwd_group+0xd4> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
5e160: 2f00 movel %d0,%sp@-
5e162: 4879 0008 d209 pea 8d209 <RTEMS_BDPART_MBR_MASTER_TYPE+0x730>
5e168: 4eb9 0006 e5b6 jsr 6e5b6 <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
5e16e: 2f02 movel %d2,%sp@-
5e170: 4eb9 0006 db88 jsr 6db88 <fclose>
5e176: 4fef 000c lea %sp@(12),%sp
}
}
5e17a: 242e fff8 movel %fp@(-8),%d2
5e17e: 246e fffc moveal %fp@(-4),%a2
5e182: 4e5e unlk %fp <== NOT EXECUTED
000450ce <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
450ce: 4e56 fff0 linkw %fp,#-16
450d2: 222e 0008 movel %fp@(8),%d1
450d6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
450da: 246e 000c moveal %fp@(12),%a2
if (tty->termios.c_iflag & ISTRIP)
450de: 202a 0030 movel %a2@(48),%d0
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
450e2: 1401 moveb %d1,%d2
if (tty->termios.c_iflag & ISTRIP)
450e4: 0800 0005 btst #5,%d0
450e8: 6704 beqs 450ee <iproc+0x20> <== ALWAYS TAKEN
c &= 0x7f;
450ea: 747f moveq #127,%d2 <== NOT EXECUTED
450ec: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
450ee: 0800 0009 btst #9,%d0
450f2: 6722 beqs 45116 <iproc+0x48>
c = tolower (c);
450f4: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0
450fa: 7603 moveq #3,%d3
450fc: 0282 0000 00ff andil #255,%d2
45102: 1230 2801 moveb %a0@(00000001,%d2:l),%d1
45106: c283 andl %d3,%d1
45108: 163c 0001 moveb #1,%d3
4510c: b681 cmpl %d1,%d3
4510e: 6606 bnes 45116 <iproc+0x48>
45110: 0682 0000 0020 addil #32,%d2
if (c == '\r') {
45116: 4281 clrl %d1
45118: 1202 moveb %d2,%d1
4511a: 760d moveq #13,%d3
4511c: b681 cmpl %d1,%d3
4511e: 6612 bnes 45132 <iproc+0x64>
if (tty->termios.c_iflag & IGNCR)
45120: 4a00 tstb %d0
45122: 6c04 bges 45128 <iproc+0x5a> <== ALWAYS TAKEN
45124: 6000 0144 braw 4526a <iproc+0x19c> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
45128: 0800 0008 btst #8,%d0
4512c: 671a beqs 45148 <iproc+0x7a> <== NEVER TAKEN
c = '\n';
4512e: 740a moveq #10,%d2
45130: 6016 bras 45148 <iproc+0x7a>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
45132: 760a moveq #10,%d3
45134: b681 cmpl %d1,%d3
45136: 660a bnes 45142 <iproc+0x74>
45138: 0800 0006 btst #6,%d0
4513c: 670a beqs 45148 <iproc+0x7a> <== ALWAYS TAKEN
c = '\r';
4513e: 740d moveq #13,%d2 <== NOT EXECUTED
45140: 6006 bras 45148 <iproc+0x7a> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
45142: 4a02 tstb %d2
45144: 6700 00ee beqw 45234 <iproc+0x166>
45148: 222a 003c movel %a2@(60),%d1
4514c: 0801 0001 btst #1,%d1
45150: 6700 00e2 beqw 45234 <iproc+0x166>
if (c == tty->termios.c_cc[VERASE]) {
45154: 4283 clrl %d3
45156: 162a 0043 moveb %a2@(67),%d3
4515a: 4280 clrl %d0
4515c: 1002 moveb %d2,%d0
4515e: b680 cmpl %d0,%d3
45160: 660c bnes 4516e <iproc+0xa0>
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
45162: 4aaa 0020 tstl %a2@(32)
45166: 6700 0102 beqw 4526a <iproc+0x19c>
4516a: 42a7 clrl %sp@-
4516c: 604c bras 451ba <iproc+0xec>
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
4516e: 4283 clrl %d3
45170: 162a 0044 moveb %a2@(68),%d3
45174: b680 cmpl %d0,%d3
45176: 664e bnes 451c6 <iproc+0xf8>
* FIXME: Some of the tests should check for IEXTEN, too.
*/
static void
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
45178: 4aaa 0020 tstl %a2@(32)
4517c: 6700 00ec beqw 4526a <iproc+0x19c>
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
45180: 44c1 movew %d1,%ccr
45182: 6b08 bmis 4518c <iproc+0xbe> <== ALWAYS TAKEN
tty->ccount = 0;
45184: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
45188: 6000 00e0 braw 4526a <iproc+0x19c> <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
4518c: 0801 0004 btst #4,%d1
45190: 6624 bnes 451b6 <iproc+0xe8> <== ALWAYS TAKEN
tty->ccount = 0;
45192: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
45196: 47fa fd66 lea %pc@(44efe <echo>),%a3 <== NOT EXECUTED
4519a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4519c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4519e: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
451a0: 508f addql #8,%sp <== NOT EXECUTED
451a2: 7020 moveq #32,%d0 <== NOT EXECUTED
451a4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED
451a8: 6700 00c0 beqw 4526a <iproc+0x19c> <== NOT EXECUTED
echo ('\n', tty);
451ac: 2f0a movel %a2,%sp@- <== NOT EXECUTED
451ae: 4878 000a pea a <LASTO> <== NOT EXECUTED
451b2: 4e93 jsr %a3@ <== NOT EXECUTED
451b4: 600a bras 451c0 <iproc+0xf2> <== NOT EXECUTED
451b6: 4878 0001 pea 1 <ADD>
451ba: 2f0a movel %a2,%sp@-
451bc: 4eba fdc8 jsr %pc@(44f86 <erase.part.2>)
451c0: 508f addql #8,%sp
451c2: 6000 00a6 braw 4526a <iproc+0x19c>
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
451c6: 4283 clrl %d3
451c8: 162a 0045 moveb %a2@(69),%d3
451cc: b680 cmpl %d0,%d3
451ce: 6700 009e beqw 4526e <iproc+0x1a0>
return 1;
} else if (c == '\n') {
451d2: 760a moveq #10,%d3
451d4: b680 cmpl %d0,%d3
451d6: 6622 bnes 451fa <iproc+0x12c>
if (tty->termios.c_lflag & (ECHO | ECHONL))
451d8: 7048 moveq #72,%d0
451da: c280 andl %d0,%d1
451dc: 670c beqs 451ea <iproc+0x11c> <== NEVER TAKEN
echo (c, tty);
451de: 2f0a movel %a2,%sp@-
451e0: 4878 000a pea a <LASTO>
451e4: 4eba fd18 jsr %pc@(44efe <echo>)
451e8: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
451ea: 202a 0020 movel %a2@(32),%d0
451ee: 206a 001c moveal %a2@(28),%a0
451f2: 720a moveq #10,%d1
451f4: 1181 0800 moveb %d1,%a0@(00000000,%d0:l)
451f8: 6032 bras 4522c <iproc+0x15e>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
451fa: 4283 clrl %d3
451fc: 162a 004c moveb %a2@(76),%d3
45200: b680 cmpl %d0,%d3
45202: 670a beqs 4520e <iproc+0x140> <== NEVER TAKEN
45204: 4283 clrl %d3
45206: 162a 0051 moveb %a2@(81),%d3
4520a: b680 cmpl %d0,%d3
4520c: 6626 bnes 45234 <iproc+0x166> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
4520e: 44c1 movew %d1,%ccr <== NOT EXECUTED
45210: 6a0e bpls 45220 <iproc+0x152> <== NOT EXECUTED
echo (c, tty);
45212: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45214: 4280 clrl %d0 <== NOT EXECUTED
45216: 1002 moveb %d2,%d0 <== NOT EXECUTED
45218: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4521a: 4eba fce2 jsr %pc@(44efe <echo>) <== NOT EXECUTED
4521e: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
45220: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED
45224: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
45228: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) <== NOT EXECUTED
4522c: 5280 addql #1,%d0
4522e: 2540 0020 movel %d0,%a2@(32)
45232: 603a bras 4526e <iproc+0x1a0>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
45234: 2039 0005 c494 movel 5c494 <rtems_termios_cbufsize>,%d0
4523a: 5380 subql #1,%d0
4523c: b0aa 0020 cmpl %a2@(32),%d0
45240: 6328 blss 4526a <iproc+0x19c> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
45242: 7008 moveq #8,%d0
45244: c0aa 003c andl %a2@(60),%d0
45248: 670e beqs 45258 <iproc+0x18a> <== NEVER TAKEN
echo (c, tty);
4524a: 2f0a movel %a2,%sp@-
4524c: 4280 clrl %d0
4524e: 1002 moveb %d2,%d0
45250: 2f00 movel %d0,%sp@-
45252: 4eba fcaa jsr %pc@(44efe <echo>)
45256: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
45258: 202a 0020 movel %a2@(32),%d0
4525c: 206a 001c moveal %a2@(28),%a0
45260: 1182 0800 moveb %d2,%a0@(00000000,%d0:l)
45264: 5280 addql #1,%d0
45266: 2540 0020 movel %d0,%a2@(32)
}
return 0;
4526a: 4280 clrl %d0
4526c: 6002 bras 45270 <iproc+0x1a2>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
4526e: 7001 moveq #1,%d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
45270: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
45276: 4e5e unlk %fp <== NOT EXECUTED
00059fc8 <kill>:
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
return 0;
}
59fc8: 4280 clrl %d0 <== NOT EXECUTED
* These are directly supported (and completely correct) in the posix api.
*/
#if !defined(RTEMS_POSIX_API)
int kill( pid_t pid, int sig )
{
59fca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
59fce: 4e5e unlk %fp <== NOT EXECUTED
0004320c <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
4320c: 7003 moveq #3,%d0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
4320e: 4e56 0000 linkw %fp,#0
43212: 2f0a movel %a2,%sp@-
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
43214: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0
4321a: 664c bnes 43268 <libc_wrapup+0x5c> <== NEVER TAKEN
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
4321c: 2479 0005 bbba moveal 5bbba <_global_impure_ptr>,%a2
43222: b5f9 0005 c5c0 cmpal 5c5c0 <_impure_ptr>,%a2
43228: 6710 beqs 4323a <libc_wrapup+0x2e>
_wrapup_reent(_global_impure_ptr);
4322a: 2f0a movel %a2,%sp@-
4322c: 4eb9 0004 cd7e jsr 4cd7e <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
43232: 588f addql #4,%sp
43234: 23ca 0005 c5c0 movel %a2,5c5c0 <_impure_ptr>
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
4323a: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
43240: 45f9 0004 c46c lea 4c46c <fclose>,%a2
43246: 2f28 0004 movel %a0@(4),%sp@-
4324a: 4e92 jsr %a2@
fclose (stdout);
4324c: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
43252: 2f28 0008 movel %a0@(8),%sp@-
43256: 4e92 jsr %a2@
fclose (stderr);
43258: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
4325e: 2f28 000c movel %a0@(12),%sp@-
43262: 4e92 jsr %a2@
43264: 4fef 000c lea %sp@(12),%sp
}
43268: 246e fffc moveal %fp@(-4),%a2
4326c: 4e5e unlk %fp <== NOT EXECUTED
00042d30 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
42d30: 4e56 0000 linkw %fp,#0
void *return_this;
MSBUMP(malloc_calls, 1);
42d34: 52b9 0005 daf4 addql #1,5daf4 <rtems_malloc_statistics+0x4>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
42d3a: 2f03 movel %d3,%sp@-
42d3c: 262e 0008 movel %fp@(8),%d3
42d40: 2f02 movel %d2,%sp@-
MSBUMP(malloc_calls, 1);
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
42d42: 4eb9 0004 2c4e jsr 42c4e <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
42d48: 4a83 tstl %d3
42d4a: 6604 bnes 42d50 <malloc+0x20>
return (void *) 0;
42d4c: 4282 clrl %d2
42d4e: 607c bras 42dcc <malloc+0x9c>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42d50: 7003 moveq #3,%d0
42d52: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0
42d58: 671c beqs 42d76 <malloc+0x46>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
42d5a: 42a7 clrl %sp@-
42d5c: 42a7 clrl %sp@-
42d5e: 2f03 movel %d3,%sp@-
42d60: 2f39 0005 c40c movel 5c40c <RTEMS_Malloc_Heap>,%sp@-
42d66: 4eb9 0004 7ca8 jsr 47ca8 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
42d6c: 4fef 0010 lea %sp@(16),%sp
42d70: 2400 movel %d0,%d2
42d72: 6632 bnes 42da6 <malloc+0x76>
42d74: 600c bras 42d82 <malloc+0x52>
/*
* 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() )
42d76: 4eb9 0004 2c30 jsr 42c30 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42d7c: 4a00 tstb %d0
42d7e: 66da bnes 42d5a <malloc+0x2a> <== ALWAYS TAKEN
42d80: 60ca bras 42d4c <malloc+0x1c> <== NOT EXECUTED
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size );
42d82: 2f03 movel %d3,%sp@-
42d84: 2f39 0005 c40c movel 5c40c <RTEMS_Malloc_Heap>,%sp@-
42d8a: 2079 0005 a80c moveal 5a80c <rtems_malloc_extend_handler>,%a0
42d90: 4e90 jsr %a0@
if ( !return_this ) {
42d92: 508f addql #8,%sp
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
return_this = (*rtems_malloc_extend_handler)( RTEMS_Malloc_Heap, size );
42d94: 2400 movel %d0,%d2
if ( !return_this ) {
42d96: 660e bnes 42da6 <malloc+0x76> <== NEVER TAKEN
errno = ENOMEM;
42d98: 4eb9 0004 c330 jsr 4c330 <__errno>
42d9e: 2040 moveal %d0,%a0
42da0: 700c moveq #12,%d0
42da2: 2080 movel %d0,%a0@
return (void *) 0;
42da4: 6026 bras 42dcc <malloc+0x9c>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
42da6: 2079 0005 cab0 moveal 5cab0 <rtems_malloc_dirty_helper>,%a0
42dac: 4a88 tstl %a0
42dae: 6708 beqs 42db8 <malloc+0x88>
(*rtems_malloc_dirty_helper)( return_this, size );
42db0: 2f03 movel %d3,%sp@-
42db2: 2f02 movel %d2,%sp@-
42db4: 4e90 jsr %a0@
42db6: 508f addql #8,%sp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
42db8: 2079 0005 cab4 moveal 5cab4 <rtems_malloc_statistics_helpers>,%a0
42dbe: 4a88 tstl %a0
42dc0: 670a beqs 42dcc <malloc+0x9c>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
42dc2: 2f02 movel %d2,%sp@-
42dc4: 2068 0004 moveal %a0@(4),%a0
42dc8: 4e90 jsr %a0@
42dca: 588f addql #4,%sp
return return_this;
}
42dcc: 2002 movel %d2,%d0
42dce: 242e fff8 movel %fp@(-8),%d2
42dd2: 262e fffc movel %fp@(-4),%d3
42dd6: 4e5e unlk %fp
...
0004b1e0 <memfile_alloc_block>:
* Allocate a block for an in-memory file.
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
4b1e0: 4e56 0000 linkw %fp,#0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
4b1e4: 2f39 0005 d2e0 movel 5d2e0 <imfs_memfile_bytes_per_block>,%sp@-
4b1ea: 4878 0001 pea 1 <ADD>
4b1ee: 4eb9 0004 2818 jsr 42818 <calloc>
if ( memory )
4b1f4: 508f addql #8,%sp
4b1f6: 4a80 tstl %d0
4b1f8: 6706 beqs 4b200 <memfile_alloc_block+0x20> <== NEVER TAKEN
memfile_blocks_allocated++;
4b1fa: 52b9 0005 d3f4 addql #1,5d3f4 <memfile_blocks_allocated>
return memory;
}
4b200: 4e5e unlk %fp <== NOT EXECUTED
0004ba28 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
4ba28: 7004 moveq #4,%d0
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
4ba2a: 4e56 0000 linkw %fp,#0
4ba2e: 226e 0008 moveal %fp@(8),%a1
4ba32: 2f03 movel %d3,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4ba34: 2069 0018 moveal %a1@(24),%a0
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
4ba38: c0a9 000c andl %a1@(12),%d0
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
4ba3c: 2f02 movel %d2,%sp@-
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
4ba3e: 4a80 tstl %d0
4ba40: 6604 bnes 4ba46 <memfile_open+0x1e>
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
return 0;
4ba42: 4280 clrl %d0
4ba44: 6054 bras 4ba9a <memfile_open+0x72>
4ba46: 2268 004a moveal %a0@(74),%a1
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
4ba4a: 7005 moveq #5,%d0
4ba4c: b091 cmpl %a1@,%d0
4ba4e: 66f2 bnes 4ba42 <memfile_open+0x1a> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
4ba50: 2028 0052 movel %a0@(82),%d0 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->control = &IMFS_node_control_memfile;
4ba54: 243c 0005 b956 movel #375126,%d2 <== NOT EXECUTED
4ba5a: 2142 004a movel %d2,%a0@(74) <== NOT EXECUTED
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
4ba5e: 2228 0056 movel %a0@(86),%d1 <== NOT EXECUTED
the_jnode->control = &IMFS_node_control_memfile;
the_jnode->info.file.size = 0;
4ba62: 4282 clrl %d2 <== NOT EXECUTED
4ba64: 4283 clrl %d3 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
4ba66: 42a8 0056 clrl %a0@(86) <== NOT EXECUTED
&& (IMFS_type( the_jnode ) == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->control = &IMFS_node_control_memfile;
the_jnode->info.file.size = 0;
4ba6a: 2142 004e movel %d2,%a0@(78) <== NOT EXECUTED
4ba6e: 2143 0052 movel %d3,%a0@(82) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
4ba72: 42a8 005a clrl %a0@(90) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4ba76: 42a8 005e clrl %a0@(94) <== NOT EXECUTED
if ((count != 0)
4ba7a: 4a80 tstl %d0 <== NOT EXECUTED
4ba7c: 67c4 beqs 4ba42 <memfile_open+0x1a> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4ba7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
return -1;
4ba80: 76ff moveq #-1,%d3 <== 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))
4ba82: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4ba84: 42a7 clrl %sp@- <== NOT EXECUTED
4ba86: 42a7 clrl %sp@- <== NOT EXECUTED
4ba88: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4ba8a: 4eb9 0004 b844 jsr 4b844 <IMFS_memfile_write> <== NOT EXECUTED
4ba90: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
return -1;
4ba94: b680 cmpl %d0,%d3 <== NOT EXECUTED
4ba96: 57c0 seq %d0 <== NOT EXECUTED
4ba98: 49c0 extbl %d0 <== NOT EXECUTED
}
return 0;
}
4ba9a: 242e fff8 movel %fp@(-8),%d2
4ba9e: 262e fffc movel %fp@(-4),%d3
4baa2: 4e5e unlk %fp <== NOT EXECUTED
00042f18 <mount>:
const void *data
)
{
int rv = 0;
if (
42f18: 7001 moveq #1,%d0
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
42f1a: 4e56 ff84 linkw %fp,#-124
42f1e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42f22: 262e 0008 movel %fp@(8),%d3
42f26: 242e 000c movel %fp@(12),%d2
42f2a: 2a2e 0010 movel %fp@(16),%d5
int rv = 0;
if (
42f2e: b0ae 0014 cmpl %fp@(20),%d0
42f32: 6500 02a2 bcsw 431d6 <mount+0x2be>
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
42f36: 2f05 movel %d5,%sp@-
42f38: 4eb9 0004 a288 jsr 4a288 <rtems_filesystem_get_mount_handler>
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
42f3e: 588f addql #4,%sp
if (
options == RTEMS_FILESYSTEM_READ_ONLY
|| options == RTEMS_FILESYSTEM_READ_WRITE
) {
rtems_filesystem_fsmount_me_t fsmount_me_h =
42f40: 2840 moveal %d0,%a4
rtems_filesystem_get_mount_handler( filesystemtype );
if ( fsmount_me_h != NULL ) {
42f42: 4a80 tstl %d0
42f44: 6700 0282 beqw 431c8 <mount+0x2b0>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
42f48: 283c 0005 b44c movel #373836,%d4
42f4e: 4a82 tstl %d2
42f50: 6702 beqs 42f54 <mount+0x3c>
42f52: 2802 movel %d2,%d4
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
42f54: 2f05 movel %d5,%sp@-
42f56: 47f9 0004 d690 lea 4d690 <strlen>,%a3
42f5c: 4e93 jsr %a3@
42f5e: 588f addql #4,%sp
42f60: 2e00 movel %d0,%d7
42f62: 2440 moveal %d0,%a2
42f64: 5287 addql #1,%d7
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
42f66: 4a83 tstl %d3
42f68: 670c beqs 42f76 <mount+0x5e>
42f6a: 2f03 movel %d3,%sp@-
42f6c: 4e93 jsr %a3@
42f6e: 588f addql #4,%sp
42f70: 2640 moveal %d0,%a3
42f72: 528b addql #1,%a3
42f74: 6002 bras 42f78 <mount+0x60>
42f76: 97cb subal %a3,%a3
size_t target_size = strlen( target ) + 1;
42f78: 2f04 movel %d4,%sp@-
42f7a: 4eb9 0004 d690 jsr 4d690 <strlen>
42f80: 588f addql #4,%sp
42f82: 2a40 moveal %d0,%a5
42f84: 528d addql #1,%a5
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size
42f86: 41f2 b863 lea %a2@(00000063,%a3:l),%a0
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
42f8a: 4870 d800 pea %a0@(00000000,%a5:l)
42f8e: 4878 0001 pea 1 <ADD>
42f92: 4eb9 0004 2818 jsr 42818 <calloc>
if ( mt_entry != NULL ) {
42f98: 508f addql #8,%sp
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
+ sizeof( rtems_filesystem_global_location_t );
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
42f9a: 2440 moveal %d0,%a2
if ( mt_entry != NULL ) {
42f9c: 4a80 tstl %d0
42f9e: 6700 0250 beqw 431f0 <mount+0x2d8>
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 );
42fa2: 2f07 movel %d7,%sp@-
if ( mt_entry != NULL ) {
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 );
42fa4: 2200 movel %d0,%d1
42fa6: 0681 0000 0062 addil #98,%d1
+ 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 =
42fac: 2c00 movel %d0,%d6
42fae: 0686 0000 003e addil #62,%d6
(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 );
42fb4: 2f05 movel %d5,%sp@-
42fb6: 2a3c 0004 cb50 movel #314192,%d5
42fbc: 2045 moveal %d5,%a0
42fbe: 2f01 movel %d1,%sp@-
42fc0: 2d41 ffac movel %d1,%fp@(-84)
42fc4: 4e90 jsr %a0@
mt_entry->type = str;
42fc6: 222e ffac movel %fp@(-84),%d1
str += filesystemtype_size;
if ( source_or_null != NULL ) {
42fca: 4fef 000c lea %sp@(12),%sp
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
str += filesystemtype_size;
42fce: de81 addl %d1,%d7
(rtems_filesystem_global_location_t *)
((char *) mt_entry + sizeof( *mt_entry ));
char *str = (char *) mt_fs_root + sizeof( *mt_fs_root );
memcpy( str, filesystemtype, filesystemtype_size );
mt_entry->type = str;
42fd0: 2541 0032 movel %d1,%a2@(50)
str += filesystemtype_size;
if ( source_or_null != NULL ) {
42fd4: 4a83 tstl %d3
42fd6: 6714 beqs 42fec <mount+0xd4>
memcpy( str, source_or_null, source_size );
42fd8: 2f0b movel %a3,%sp@-
42fda: 2245 moveal %d5,%a1
42fdc: 2f03 movel %d3,%sp@-
42fde: 2f07 movel %d7,%sp@-
42fe0: 4e91 jsr %a1@
mt_entry->dev = str;
str += source_size;
42fe2: 4fef 000c lea %sp@(12),%sp
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
memcpy( str, source_or_null, source_size );
mt_entry->dev = str;
42fe6: 2547 0036 movel %d7,%a2@(54)
str += source_size;
42fea: de8b addl %a3,%d7
}
memcpy( str, target, target_size );
42fec: 2f0d movel %a5,%sp@-
42fee: 2f04 movel %d4,%sp@-
42ff0: 2f07 movel %d7,%sp@-
42ff2: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
42ff8: 7001 moveq #1,%d0
mt_entry->mt_fs_root = mt_fs_root;
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
42ffa: 41f9 0005 b44e lea 5b44e <rtems_filesystem_default_pathconf>,%a0
memcpy( str, target, target_size );
mt_entry->target = str;
str += target_size;
mt_entry->mounted = true;
43000: 1540 0028 moveb %d0,%a2@(40)
mt_entry->mt_fs_root = mt_fs_root;
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
mt_fs_root->location.mt_entry = mt_entry;
mt_fs_root->reference_count = 1;
43004: 7001 moveq #1,%d0
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;
43006: 2548 002a movel %a0,%a2@(42)
mt_fs_root->location.mt_entry = mt_entry;
mt_fs_root->reference_count = 1;
4300a: 2540 0056 movel %d0,%a2@(86)
mt_entry->dev = str;
str += source_size;
}
memcpy( str, target, target_size );
mt_entry->target = str;
4300e: 2547 002e movel %d7,%a2@(46)
str += target_size;
mt_entry->mounted = true;
mt_entry->mt_fs_root = mt_fs_root;
43012: 2546 0024 movel %d6,%a2@(36)
mt_entry->pathconf_limits_and_options = &rtems_filesystem_default_pathconf;
mt_fs_root->location.mt_entry = mt_entry;
43016: 254a 0052 movel %a2,%a2@(82)
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
_Chain_Initialize( the_chain, starting_address, number_nodes, node_size );
4301a: 4878 0024 pea 24 <OPER2+0x10>
4301e: 4878 0001 pea 1 <ADD>
43022: 2f06 movel %d6,%sp@-
43024: 486a 0014 pea %a2@(20)
43028: 4eb9 0004 6d38 jsr 46d38 <_Chain_Initialize>
filesystemtype,
&target_length
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
4302e: 7001 moveq #1,%d0
43030: c0ae 0014 andl %fp@(20),%d0
43034: 1540 0029 moveb %d0,%a2@(41)
rv = (*fsmount_me_h)( mt_entry, data );
43038: 2f2e 0018 movel %fp@(24),%sp@-
4303c: 2f0a movel %a2,%sp@-
4303e: 4e94 jsr %a4@
if ( rv == 0 ) {
43040: 4fef 0024 lea %sp@(36),%sp
);
if ( mt_entry != NULL ) {
mt_entry->writeable = options == RTEMS_FILESYSTEM_READ_WRITE;
rv = (*fsmount_me_h)( mt_entry, data );
43044: 2600 movel %d0,%d3
if ( rv == 0 ) {
43046: 6600 019c bnew 431e4 <mount+0x2cc>
if ( target != NULL ) {
4304a: 4a82 tstl %d2
4304c: 6700 00d4 beqw 43122 <mount+0x20a>
{
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 =
43050: 4878 001f pea 1f <OPER2+0xb>
43054: 2f02 movel %d2,%sp@-
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
43056: 240e movel %fp,%d2
43058: 0682 ffff ffc8 addil #-56,%d2
{
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 =
4305e: 2f02 movel %d2,%sp@-
43060: 4eb9 0004 3a7a jsr 43a7a <rtems_filesystem_eval_path_start>
static inline bool rtems_filesystem_location_is_instance_root(
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
43066: 2240 moveal %d0,%a1
43068: 2069 0014 moveal %a1@(20),%a0
return (*mt_entry->ops->are_nodes_equal_h)(
4306c: 2268 000c moveal %a0@(12),%a1
43070: 2f28 0024 movel %a0@(36),%sp@-
43074: 2f00 movel %d0,%sp@-
43076: 2069 0010 moveal %a1@(16),%a0
4307a: 4e90 jsr %a0@
rtems_filesystem_eval_path_start( &ctx, target, eval_flags );
if ( !rtems_filesystem_location_is_instance_root( currentloc ) ) {
4307c: 4fef 0014 lea %sp@(20),%sp
43080: 4a00 tstb %d0
43082: 667e bnes 43102 <mount+0x1ea>
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(
43084: 486e ffe0 pea %fp@(-32)
rtems_filesystem_location_info_t targetloc;
rtems_filesystem_global_location_t *mt_point_node;
rtems_filesystem_eval_path_extract_currentloc( &ctx, &targetloc );
43088: 0682 ffff ffe8 addil #-24,%d2
4308e: 2f02 movel %d2,%sp@-
43090: 4eb9 0004 3ea0 jsr 43ea0 <rtems_filesystem_location_copy_and_detach>
mt_point_node = rtems_filesystem_location_transform_to_global( &targetloc );
43096: 2f02 movel %d2,%sp@-
43098: 4eb9 0004 4060 jsr 44060 <rtems_filesystem_location_transform_to_global>
4309e: 2640 moveal %d0,%a3
mt_entry->mt_point_node = mt_point_node;
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
430a0: 206b 0014 moveal %a3@(20),%a0
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;
430a4: 2540 0020 movel %d0,%a2@(32)
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
430a8: 2068 000c moveal %a0@(12),%a0
430ac: 2f0a movel %a2,%sp@-
430ae: 2068 0030 moveal %a0@(48),%a0
430b2: 4e90 jsr %a0@
if ( rv == 0 ) {
430b4: 4fef 0010 lea %sp@(16),%sp
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;
rv = (*mt_point_node->location.mt_entry->ops->mount_h)( mt_entry );
430b8: 2600 movel %d0,%d3
if ( rv == 0 ) {
430ba: 663a bnes 430f6 <mount+0x1de>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
430bc: 42a7 clrl %sp@-
430be: 42a7 clrl %sp@-
430c0: 2f39 0005 daec movel 5daec <rtems_libio_semaphore>,%sp@-
430c6: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
430cc: 2079 0005 c484 moveal 5c484 <rtems_filesystem_mount_table+0x8>,%a0
the_node->next = tail;
430d2: 24bc 0005 c480 movel #377984,%a2@
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
430d8: 2548 0004 movel %a0,%a2@(4)
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
430dc: 208a movel %a2,%a0@
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
430de: 2f39 0005 daec movel 5daec <rtems_libio_semaphore>,%sp@-
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
430e4: 23ca 0005 c484 movel %a2,5c484 <rtems_filesystem_mount_table+0x8>
430ea: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
430f0: 4fef 0010 lea %sp@(16),%sp
430f4: 601c bras 43112 <mount+0x1fa>
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
430f6: 2f0b movel %a3,%sp@-
430f8: 4eb9 0004 3f4a jsr 43f4a <rtems_filesystem_global_location_release>
430fe: 588f addql #4,%sp
43100: 6010 bras 43112 <mount+0x1fa>
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
43102: 4878 0010 pea 10 <INVALID_OPERATION>
rv = -1;
43106: 76ff moveq #-1,%d3
rtems_filesystem_mt_unlock();
} else {
rtems_filesystem_global_location_release( mt_point_node );
}
} else {
rtems_filesystem_eval_path_error( &ctx, EBUSY );
43108: 2f02 movel %d2,%sp@-
4310a: 4eb9 0004 380a jsr 4380a <rtems_filesystem_eval_path_error>
43110: 508f addql #8,%sp
rv = -1;
}
rtems_filesystem_eval_path_cleanup( &ctx );
43112: 486e ffc8 pea %fp@(-56)
43116: 4eb9 0004 3b6c jsr 43b6c <rtems_filesystem_eval_path_cleanup>
4311c: 588f addql #4,%sp
4311e: 6000 0094 braw 431b4 <mount+0x29c>
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
43122: 42a7 clrl %sp@-
43124: 42a7 clrl %sp@-
43126: 2f39 0005 daec movel 5daec <rtems_libio_semaphore>,%sp@-
4312c: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
)
{
int rv = 0;
rtems_filesystem_mt_lock();
if ( rtems_chain_is_empty( &rtems_filesystem_mount_table ) ) {
43132: 4fef 000c lea %sp@(12),%sp
43136: 203c 0005 c480 movel #377984,%d0
4313c: b0b9 0005 c47c cmpl 5c47c <rtems_filesystem_mount_table>,%d0
43142: 6616 bnes 4315a <mount+0x242> <== NEVER TAKEN
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
43144: 2079 0005 c484 moveal 5c484 <rtems_filesystem_mount_table+0x8>,%a0
the_node->next = tail;
4314a: 2480 movel %d0,%a2@
tail->previous = the_node;
4314c: 23ca 0005 c484 movel %a2,5c484 <rtems_filesystem_mount_table+0x8>
old_last->next = the_node;
43152: 208a movel %a2,%a0@
the_node->previous = old_last;
43154: 2548 0004 movel %a0,%a2@(4)
43158: 600e bras 43168 <mount+0x250>
rtems_chain_append_unprotected(
&rtems_filesystem_mount_table,
&mt_entry->mt_node
);
} else {
errno = EINVAL;
4315a: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
43160: 7616 moveq #22,%d3 <== NOT EXECUTED
43162: 2040 moveal %d0,%a0 <== NOT EXECUTED
43164: 2083 movel %d3,%a0@ <== NOT EXECUTED
rv = -1;
43166: 76ff moveq #-1,%d3 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
43168: 2f39 0005 daec movel 5daec <rtems_libio_semaphore>,%sp@-
4316e: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
43174: 588f addql #4,%sp
43176: 4a83 tstl %d3
43178: 663a bnes 431b4 <mount+0x29c> <== NEVER TAKEN
rtems_filesystem_global_location_t *new_fs_root =
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
4317a: 45ea 0024 lea %a2@(36),%a2
rv = -1;
}
rtems_filesystem_mt_unlock();
if ( rv == 0 ) {
rtems_filesystem_global_location_t *new_fs_root =
4317e: 47f9 0004 3fc0 lea 43fc0 <rtems_filesystem_global_location_obtain>,%a3
43184: 2f0a movel %a2,%sp@-
43186: 4e93 jsr %a3@
43188: 2400 movel %d0,%d2
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_t *new_fs_current =
4318a: 2f0a movel %a2,%sp@-
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
4318c: 45f9 0004 3f96 lea 43f96 <rtems_filesystem_global_location_assign>,%a2
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 =
43192: 4e93 jsr %a3@
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
43194: 2279 0005 c49c moveal 5c49c <rtems_current_user_env>,%a1
4319a: 5889 addql #4,%a1
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 =
4319c: 2800 movel %d0,%d4
rtems_filesystem_global_location_obtain( &mt_entry->mt_fs_root );
rtems_filesystem_global_location_assign(
4319e: 2f02 movel %d2,%sp@-
431a0: 2f09 movel %a1,%sp@-
431a2: 4e92 jsr %a2@
&rtems_filesystem_root,
new_fs_root
);
rtems_filesystem_global_location_assign(
431a4: 2f04 movel %d4,%sp@-
431a6: 2f39 0005 c49c movel 5c49c <rtems_current_user_env>,%sp@-
431ac: 4e92 jsr %a2@
431ae: 4fef 0018 lea %sp@(24),%sp
431b2: 604a bras 431fe <mount+0x2e6>
rv = register_subordinate_file_system( mt_entry, target );
} else {
rv = register_root_file_system( mt_entry );
}
if ( rv != 0 ) {
431b4: 4a83 tstl %d3
431b6: 6746 beqs 431fe <mount+0x2e6>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
431b8: 206a 000c moveal %a2@(12),%a0
431bc: 2f0a movel %a2,%sp@-
431be: 2068 003c moveal %a0@(60),%a0
431c2: 4e90 jsr %a0@
431c4: 588f addql #4,%sp
431c6: 601c bras 431e4 <mount+0x2cc>
} else {
errno = ENOMEM;
rv = -1;
}
} else {
errno = EINVAL;
431c8: 4eb9 0004 c330 jsr 4c330 <__errno>
431ce: 7416 moveq #22,%d2
431d0: 2040 moveal %d0,%a0
431d2: 2082 movel %d2,%a0@
431d4: 6026 bras 431fc <mount+0x2e4>
rv = -1;
}
} else {
errno = EINVAL;
431d6: 4eb9 0004 c330 jsr 4c330 <__errno>
431dc: 7216 moveq #22,%d1
431de: 2240 moveal %d0,%a1
431e0: 2281 movel %d1,%a1@
431e2: 6018 bras 431fc <mount+0x2e4>
(*mt_entry->ops->fsunmount_me_h)( mt_entry );
}
}
if ( rv != 0 ) {
free( mt_entry );
431e4: 2f0a movel %a2,%sp@-
431e6: 4eb9 0004 2a60 jsr 42a60 <free>
431ec: 588f addql #4,%sp
431ee: 600e bras 431fe <mount+0x2e6>
}
} else {
errno = ENOMEM;
431f0: 4eb9 0004 c330 jsr 4c330 <__errno>
431f6: 2040 moveal %d0,%a0
431f8: 700c moveq #12,%d0
431fa: 2080 movel %d0,%a0@
rv = -1;
431fc: 76ff moveq #-1,%d3
errno = EINVAL;
rv = -1;
}
return rv;
}
431fe: 2003 movel %d3,%d0
43200: 4cee 3cfc ff84 moveml %fp@(-124),%d2-%d7/%a2-%a5
43206: 4e5e unlk %fp
...
00046af8 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
46af8: 4e56 ffec linkw %fp,#-20
46afc: 48d7 007c moveml %d2-%d6,%sp@
46b00: 262e 0008 movel %fp@(8),%d3
46b04: 242e 000c movel %fp@(12),%d2
46b08: 282e 0010 movel %fp@(16),%d4
46b0c: 2a2e 0014 movel %fp@(20),%d5
46b10: 2c2e 0018 movel %fp@(24),%d6
int rv = -1;
if (target != NULL) {
46b14: 4a82 tstl %d2
46b16: 6734 beqs 46b4c <mount_and_make_target_path+0x54>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
46b18: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
46b1c: 2f02 movel %d2,%sp@-
46b1e: 4eb9 0004 75e4 jsr 475e4 <rtems_mkdir>
if (rv == 0) {
46b24: 508f addql #8,%sp
46b26: 4a80 tstl %d0
46b28: 6630 bnes 46b5a <mount_and_make_target_path+0x62><== NEVER TAKEN
rv = mount(
46b2a: 2d46 0018 movel %d6,%fp@(24)
46b2e: 2d45 0014 movel %d5,%fp@(20)
46b32: 2d44 0010 movel %d4,%fp@(16)
46b36: 2d42 000c movel %d2,%fp@(12)
46b3a: 2d43 0008 movel %d3,%fp@(8)
} else {
errno = EINVAL;
}
return rv;
}
46b3e: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
46b44: 4e5e unlk %fp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
46b46: 4ef9 0004 6b64 jmp 46b64 <mount>
options,
data
);
}
} else {
errno = EINVAL;
46b4c: 4eb9 0005 b09c jsr 5b09c <__errno>
46b52: 2040 moveal %d0,%a0
46b54: 7016 moveq #22,%d0
46b56: 2080 movel %d0,%a0@
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
46b58: 70ff moveq #-1,%d0
} else {
errno = EINVAL;
}
return rv;
}
46b5a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
46b60: 4e5e unlk %fp <== NOT EXECUTED
00053514 <msdos_creat_node>:
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
53514: 72ff moveq #-1,%d1
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
53516: 4e56 ff40 linkw %fp,#-192
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
5351a: 4240 clrw %d0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
5351c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
53520: 266e 0008 moveal %fp@(8),%a3
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
53524: 2c0e movel %fp,%d6
53526: 0686 ffff ff80 addil #-128,%d6
5352c: 2a3c 0005 71d8 movel #356824,%d5
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;
53532: 206b 0014 moveal %a3@(20),%a0
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
53536: 262b 0008 movel %a3@(8),%d3
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;
5353a: 2468 0008 moveal %a0@(8),%a2
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5353e: 4878 0020 pea 20 <OPER2+0xc>
53542: 2045 moveal %d5,%a0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
53544: 286e 000c moveal %fp@(12),%a4
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
53548: 42a7 clrl %sp@-
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
5354a: 2e2e 0010 movel %fp@(16),%d7
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5354e: 2f06 movel %d6,%sp@-
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
53550: 242e 0014 movel %fp@(20),%d2
53554: 2d41 ff78 movel %d1,%fp@(-136)
53558: 2a6e 001c moveal %fp@(28),%a5
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5355c: 2d41 ff7c movel %d1,%fp@(-132)
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
time_t time_ret = 0;
uint16_t time_val = 0;
53560: 3d40 ff68 movew %d0,%fp@(-152)
{
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
53564: 42ae ff6c clrl %fp@(-148)
time_t time_ret = 0;
uint16_t time_val = 0;
uint16_t date = 0;
53568: 3d40 ff6a movew %d0,%fp@(-150)
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
5356c: 42ae ff70 clrl %fp@(-144)
dir_pos->sname.ofs = 0;
53570: 42ae ff74 clrl %fp@(-140)
uint32_t sec = 0;
uint32_t byte = 0;
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
53574: 4e90 jsr %a0@
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
53576: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
5357a: 2045 moveal %d5,%a0
5357c: 42a7 clrl %sp@-
5357e: 486e ffc0 pea %fp@(-64)
53582: 4e90 jsr %a0@
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
53584: 4fef 0018 lea %sp@(24),%sp
53588: 0c82 0000 0104 cmpil #260,%d2
5358e: 6f0e bles 5359e <msdos_creat_node+0x8a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
53590: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
53596: 725b moveq #91,%d1 <== NOT EXECUTED
53598: 2040 moveal %d0,%a0 <== NOT EXECUTED
5359a: 2081 movel %d1,%a0@ <== NOT EXECUTED
5359c: 6024 bras 535c2 <msdos_creat_node+0xae> <== NOT EXECUTED
}
name_type = msdos_long_to_short (name, name_len,
5359e: 4878 000b pea b <LASTO+0x1>
535a2: 2f06 movel %d6,%sp@-
535a4: 2f02 movel %d2,%sp@-
535a6: 2f07 movel %d7,%sp@-
535a8: 4eb9 0005 3a64 jsr 53a64 <msdos_long_to_short>
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
535ae: 4fef 0010 lea %sp@(16),%sp
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
name_type = msdos_long_to_short (name, name_len,
535b2: 2a00 movel %d0,%d5
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
535b4: 6612 bnes 535c8 <msdos_creat_node+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EINVAL);
535b6: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
535bc: 2040 moveal %d0,%a0 <== NOT EXECUTED
535be: 7016 moveq #22,%d0 <== NOT EXECUTED
535c0: 2080 movel %d0,%a0@ <== NOT EXECUTED
535c2: 74ff moveq #-1,%d2 <== NOT EXECUTED
535c4: 6000 02cc braw 53892 <msdos_creat_node+0x37e> <== NOT EXECUTED
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
/* set up last write date and time */
time_ret = time(NULL);
535c8: 42a7 clrl %sp@-
if (name_type == MSDOS_NAME_INVALID) {
rtems_set_errno_and_return_minus_one(EINVAL);
}
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
535ca: 4200 clrb %d0
535cc: 1d40 ff8c moveb %d0,%fp@(-116)
/* set up last write date and time */
time_ret = time(NULL);
535d0: 4eb9 0005 aab4 jsr 5aab4 <time>
if ( time_ret == -1 )
535d6: 588f addql #4,%sp
535d8: 72ff moveq #-1,%d1
535da: b280 cmpl %d0,%d1
535dc: 6602 bnes 535e0 <msdos_creat_node+0xcc> <== ALWAYS TAKEN
535de: 60e2 bras 535c2 <msdos_creat_node+0xae> <== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
535e0: 486e ff68 pea %fp@(-152)
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
535e4: 4286 clrl %d6
535e6: 486e ff6a pea %fp@(-150)
535ea: 2f00 movel %d0,%sp@-
535ec: 4eb9 0005 5ad4 jsr 55ad4 <msdos_date_unix2dos>
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
535f2: 4fef 000c lea %sp@(12),%sp
535f6: 4281 clrl %d1
535f8: 322e ff68 movew %fp@(-152),%d1
535fc: 3c2e ff6a movew %fp@(-150),%d6
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
53600: 42ae ff9c clrl %fp@(-100)
53604: 2001 movel %d1,%d0
53606: e089 lsrl #8,%d1
53608: e188 lsll #8,%d0
5360a: 8081 orl %d1,%d0
5360c: 2206 movel %d6,%d1
5360e: e08e lsrl #8,%d6
53610: e189 lsll #8,%d1
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);
53612: 3d40 ff8e movew %d0,%fp@(-114)
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
53616: 3d40 ff96 movew %d0,%fp@(-106)
5361a: 8286 orl %d6,%d1
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);
5361c: 3d41 ff90 movew %d1,%fp@(-112)
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
53620: 3d41 ff98 movew %d1,%fp@(-104)
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
53624: 3d41 ff92 movew %d1,%fp@(-110)
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
53628: 4a8c tstl %a4
5362a: 660a bnes 53636 <msdos_creat_node+0x122> <== ALWAYS TAKEN
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
5362c: 7810 moveq #16,%d4 <== NOT EXECUTED
5362e: 102e ff8b moveb %fp@(-117),%d0 <== NOT EXECUTED
53632: 6000 009a braw 536ce <msdos_creat_node+0x1ba> <== NOT EXECUTED
}
else if (type == MSDOS_HARD_LINK) {
53636: 7002 moveq #2,%d0
53638: b08c cmpl %a4,%d0
5363a: 6600 008c bnew 536c8 <msdos_creat_node+0x1b4>
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
5363e: 222d 0020 movel %a5@(32),%d1 <== NOT EXECUTED
fat_cluster_num_to_sector_num(
const fat_fs_info_t *fs_info,
uint32_t cln
)
{
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
53642: 6612 bnes 53656 <msdos_creat_node+0x142> <== NOT EXECUTED
53644: 7803 moveq #3,%d4 <== NOT EXECUTED
53646: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
5364a: c084 andl %d4,%d0 <== NOT EXECUTED
5364c: 4a00 tstb %d0 <== NOT EXECUTED
5364e: 6706 beqs 53656 <msdos_creat_node+0x142> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
53650: 222a 001e movel %a2@(30),%d1 <== NOT EXECUTED
53654: 600e bras 53664 <msdos_creat_node+0x150> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53656: 4280 clrl %d0 <== NOT EXECUTED
53658: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED
5365c: 5581 subql #2,%d1 <== NOT EXECUTED
5365e: e1a9 lsll %d0,%d1 <== NOT EXECUTED
53660: d2aa 0030 addl %a2@(48),%d1 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
53664: 202d 0024 movel %a5@(36),%d0 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
53668: 486e ffa0 pea %fp@(-96) <== NOT EXECUTED
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
5366c: 4284 clrl %d4 <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
5366e: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
53672: 2041 moveal %d1,%a0 <== NOT EXECUTED
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
53674: 3812 movew %a2@,%d4 <== NOT EXECUTED
53676: 5384 subql #1,%d4 <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
53678: c880 andl %d0,%d4 <== NOT EXECUTED
5367a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
5367c: 4284 clrl %d4 <== NOT EXECUTED
5367e: 182a 0002 moveb %a2@(2),%d4 <== NOT EXECUTED
53682: e8a8 lsrl %d4,%d0 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(&fs_info->fat,
53684: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
53688: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5368a: 4eb9 0004 fd40 jsr 4fd40 <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
53690: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
53694: 4a80 tstl %d0 <== NOT EXECUTED
53696: 6d00 ff2a bltw 535c2 <msdos_creat_node+0xae> <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
5369a: 7220 moveq #32,%d1 <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
5369c: 2d6e ffbc ff9c movel %fp@(-68),%fp@(-100) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
536a2: 102e ffab moveb %fp@(-85),%d0 <== 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);
536a6: 1d6e ffad ff8d moveb %fp@(-83),%fp@(-115) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
536ac: 3d6e ffae ff8e movew %fp@(-82),%fp@(-114) <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
536b2: 3d6e ffb0 ff90 movew %fp@(-80),%fp@(-112) <== NOT EXECUTED
/*
* copy/set "file size", "first cluster"
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
536b8: 3d6e ffba ff9a movew %fp@(-70),%fp@(-102) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
536be: 3d6e ffb4 ff94 movew %fp@(-76),%fp@(-108) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(link_node);
/*
* set "archive bit" due to changes
*/
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
536c4: 8081 orl %d1,%d0 <== NOT EXECUTED
536c6: 6008 bras 536d0 <msdos_creat_node+0x1bc> <== NOT EXECUTED
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
536c8: 7820 moveq #32,%d4
536ca: 102e ff8b moveb %fp@(-117),%d0
536ce: 8084 orl %d4,%d0
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
name_type, &dir_pos, short_node);
536d0: 280e movel %fp,%d4
536d2: 0684 ffff ff80 addil #-128,%d4
/*
* 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,
536d8: 2c0e movel %fp,%d6
536da: 0686 ffff ff70 addil #-144,%d6
536e0: 2f04 movel %d4,%sp@-
* 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;
536e2: 1d40 ff8b moveb %d0,%fp@(-117)
/*
* 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,
536e6: 2f06 movel %d6,%sp@-
536e8: 2f05 movel %d5,%sp@-
536ea: 2f02 movel %d2,%sp@-
536ec: 2f07 movel %d7,%sp@-
536ee: 4878 0001 pea 1 <ADD>
536f2: 2f0b movel %a3,%sp@-
536f4: 4eb9 0005 4b04 jsr 54b04 <msdos_get_name_node>
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
536fa: 4fef 001c lea %sp@(28),%sp
/*
* 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,
536fe: 2400 movel %d0,%d2
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
53700: 6600 0190 bnew 53892 <msdos_creat_node+0x37e>
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
53704: 4a8c tstl %a4
53706: 6600 018a bnew 53892 <msdos_creat_node+0x37e>
{
/* open new directory as fat-file */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
5370a: 486e ff6c pea %fp@(-148) <== NOT EXECUTED
5370e: 2f06 movel %d6,%sp@- <== NOT EXECUTED
53710: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53712: 4eb9 0004 f0b0 jsr 4f0b0 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
53718: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
* to do
*/
if (type == MSDOS_DIRECTORY)
{
/* open new directory as fat-file */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
5371c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5371e: 6600 015c bnew 5387c <msdos_creat_node+0x368> <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
53722: 2a6e ff6c moveal %fp@(-148),%a5 <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
53726: 2a0e movel %fp,%d5 <== NOT EXECUTED
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
53728: 207c 0020 0000 moveal #2097152,%a0 <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
5372e: 0685 ffff ffc0 addil #-64,%d5 <== NOT EXECUTED
53734: 49f9 0005 7168 lea 57168 <memcpy>,%a4 <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
5373a: 240e movel %fp,%d2 <== NOT EXECUTED
5373c: 0682 ffff ffe0 addil #-32,%d2 <== NOT EXECUTED
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
53742: 2b48 0014 movel %a0,%a5@(20) <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
53746: 42ad 0018 clrl %a5@(24) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
5374a: 42ad 0010 clrl %a5@(16) <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
5374e: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
53752: 2f04 movel %d4,%sp@- <== NOT EXECUTED
53754: 2f05 movel %d5,%sp@- <== NOT EXECUTED
53756: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
53758: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5375c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5375e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
53760: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
53762: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
53766: 2f39 0006 6106 movel 66106 <MSDOS_DOT_NAME>,%sp@- <== NOT EXECUTED
5376c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5376e: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
53770: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
53774: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
53778: 2f39 0006 6102 movel 66102 <MSDOS_DOTDOT_NAME>,%sp@- <== NOT EXECUTED
5377e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
53780: 4e94 jsr %a4@ <== 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)) &&
53782: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
53786: 7001 moveq #1,%d0 <== NOT EXECUTED
53788: 2043 moveal %d3,%a0 <== NOT EXECUTED
5378a: b0a8 0020 cmpl %a0@(32),%d0 <== NOT EXECUTED
5378e: 661e bnes 537ae <msdos_creat_node+0x29a> <== NOT EXECUTED
53790: 4aa8 0024 tstl %a0@(36) <== NOT EXECUTED
53794: 6618 bnes 537ae <msdos_creat_node+0x29a> <== NOT EXECUTED
53796: 7204 moveq #4,%d1 <== NOT EXECUTED
53798: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
5379c: c081 andl %d1,%d0 <== NOT EXECUTED
5379e: 4a00 tstb %d0 <== NOT EXECUTED
537a0: 670c beqs 537ae <msdos_creat_node+0x29a> <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
537a2: 4244 clrw %d4 <== NOT EXECUTED
537a4: 3d44 fffa movew %d4,%fp@(-6) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
537a8: 3d44 fff4 movew %d4,%fp@(-12) <== NOT EXECUTED
537ac: 602a bras 537d8 <msdos_creat_node+0x2c4> <== NOT EXECUTED
}
else
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
537ae: 2043 moveal %d3,%a0 <== NOT EXECUTED
537b0: 2228 001c movel %a0@(28),%d1 <== 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);
return rc;
}
537b4: 2401 movel %d1,%d2 <== NOT EXECUTED
537b6: 0282 0000 ffff andil #65535,%d2 <== NOT EXECUTED
537bc: 4241 clrw %d1 <== NOT EXECUTED
537be: 4841 swap %d1 <== NOT EXECUTED
537c0: 2002 movel %d2,%d0 <== NOT EXECUTED
537c2: e088 lsrl #8,%d0 <== NOT EXECUTED
537c4: e18a lsll #8,%d2 <== NOT EXECUTED
537c6: 8082 orl %d2,%d0 <== NOT EXECUTED
*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)) =
537c8: 3d40 fffa movew %d0,%fp@(-6) <== NOT EXECUTED
537cc: 2001 movel %d1,%d0 <== NOT EXECUTED
537ce: e088 lsrl #8,%d0 <== NOT EXECUTED
537d0: e189 lsll #8,%d1 <== NOT EXECUTED
537d2: 8081 orl %d1,%d0 <== NOT EXECUTED
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
537d4: 3d40 fff4 movew %d0,%fp@(-12) <== NOT EXECUTED
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
537d8: 240e movel %fp,%d2 <== NOT EXECUTED
537da: 0682 ffff ffc0 addil #-64,%d2 <== NOT EXECUTED
/*
* write dot and dotdot entries to new fat-file: currently fat-file
* correspondes to a new node is zero length, so it will be extended
* by one cluster and entries will be written
*/
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
537e0: 49f9 0004 f79c lea 4f79c <fat_file_write>,%a4 <== NOT EXECUTED
537e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
537e8: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> <== NOT EXECUTED
537ec: 42a7 clrl %sp@- <== NOT EXECUTED
537ee: 2f0d movel %a5,%sp@- <== NOT EXECUTED
537f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
537f2: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
537f4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
537f8: 4a80 tstl %d0 <== NOT EXECUTED
537fa: 6d70 blts 5386c <msdos_creat_node+0x358> <== NOT EXECUTED
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
537fc: 4280 clrl %d0 <== NOT EXECUTED
537fe: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED
53802: 206e ff6c moveal %fp@(-148),%a0 <== NOT EXECUTED
53806: d1a8 0018 addl %d0,%a0@(24) <== NOT EXECUTED
/* 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));
5380a: 2028 001c movel %a0@(28),%d0 <== 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);
return rc;
}
5380e: 2600 movel %d0,%d3 <== NOT EXECUTED
53810: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
53816: 2f02 movel %d2,%sp@- <== NOT EXECUTED
53818: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5381c: 2203 movel %d3,%d1 <== NOT EXECUTED
5381e: e089 lsrl #8,%d1 <== NOT EXECUTED
53820: e18b lsll #8,%d3 <== 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);
return rc;
}
53822: 4240 clrw %d0 <== NOT EXECUTED
53824: 4840 swap %d0 <== NOT EXECUTED
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
53826: 42a7 clrl %sp@- <== NOT EXECUTED
53828: 8283 orl %d3,%d1 <== NOT EXECUTED
5382a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
/* 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)) =
5382c: 3d41 ffda movew %d1,%fp@(-38) <== NOT EXECUTED
53830: 2200 movel %d0,%d1 <== NOT EXECUTED
53832: e089 lsrl #8,%d1 <== NOT EXECUTED
53834: e188 lsll #8,%d0 <== NOT EXECUTED
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
53836: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53838: 8280 orl %d0,%d1 <== NOT EXECUTED
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)) =
5383a: 3d41 ffd4 movew %d1,%fp@(-44) <== NOT EXECUTED
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
/* rewrite dot entry */
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
5383e: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
53840: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
53844: 4a80 tstl %d0 <== NOT EXECUTED
53846: 6d24 blts 5386c <msdos_creat_node+0x358> <== NOT EXECUTED
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);
53848: 2f2e ff6c movel %fp@(-148),%sp@- <== NOT EXECUTED
5384c: 2f2b 0014 movel %a3@(20),%sp@- <== NOT EXECUTED
53850: 4eb9 0005 3cf4 jsr 53cf4 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
53856: 508f addql #8,%sp <== NOT EXECUTED
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);
53858: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5385a: 6612 bnes 5386e <msdos_creat_node+0x35a> <== NOT EXECUTED
goto error;
fat_file_close(&fs_info->fat, fat_fd);
5385c: 2f2e ff6c movel %fp@(-148),%sp@- <== NOT EXECUTED
53860: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53862: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
53868: 508f addql #8,%sp <== NOT EXECUTED
5386a: 6026 bras 53892 <msdos_creat_node+0x37e> <== NOT EXECUTED
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
{
rc = -1;
5386c: 74ff moveq #-1,%d2 <== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
}
return RC_OK;
error:
fat_file_close(&fs_info->fat, fat_fd);
5386e: 2f2e ff6c movel %fp@(-148),%sp@- <== NOT EXECUTED
53872: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53874: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
5387a: 508f addql #8,%sp <== 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);
5387c: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED
53880: 486e ff70 pea %fp@(-144) <== NOT EXECUTED
53884: 2f2b 0014 movel %a3@(20),%sp@- <== NOT EXECUTED
53888: 4eb9 0005 3e16 jsr 53e16 <msdos_set_first_char4file_name> <== NOT EXECUTED
5388e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return rc;
}
53892: 2002 movel %d2,%d0
53894: 4cee 3cfc ff40 moveml %fp@(-192),%d2-%d7/%a2-%a5
5389a: 4e5e unlk %fp
...
00055bd0 <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)
{
55bd0: 4e56 ffec linkw %fp,#-20
55bd4: 222e 0008 movel %fp@(8),%d1
55bd8: 48d7 043c moveml %d2-%d5/%a2,%sp@
55bdc: 262e 000c movel %fp@(12),%d3
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;
55be0: 2003 movel %d3,%d0
55be2: 740b moveq #11,%d2
55be4: 2a3c 0000 0708 movel #1800,%d5
55bea: 0280 0000 f800 andil #63488,%d0
55bf0: e4a8 lsrl %d2,%d0
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
55bf2: 2403 movel %d3,%d2
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
55bf4: 4c05 0800 mulsl %d5,%d0
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
55bf8: 0282 0000 07e0 andil #2016,%d2
55bfe: ea8a lsrl #5,%d2
55c00: 2802 movel %d2,%d4
55c02: eb8a lsll #5,%d2
55c04: d884 addl %d4,%d4
55c06: 9484 subl %d4,%d2
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
55c08: d082 addl %d2,%d0
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)
55c0a: 741f moveq #31,%d2
55c0c: c682 andl %d2,%d3
+ ((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) {
55c0e: 4282 clrl %d2
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;
55c10: d083 addl %d3,%d0
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
55c12: 3439 0006 7cfc movew 67cfc <lastdosdate>,%d2
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)
55c18: d080 addl %d0,%d0
+ ((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) {
55c1a: b282 cmpl %d2,%d1
55c1c: 6700 008a beqw 55ca8 <msdos_date_dos2unix+0xd8>
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
55c20: 2601 movel %d1,%d3
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
55c22: 91c8 subal %a0,%a0
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
55c24: 4282 clrl %d2
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
55c26: 0283 0000 fe00 andil #65024,%d3
55c2c: 3a3c 0009 movew #9,%d5
/*
* If the year, month, and day from the last conversion are the
* same then use the saved value.
*/
if (lastdosdate != dd) {
lastdosdate = dd;
55c30: 33c1 0006 7cfc movew %d1,67cfc <lastdosdate>
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
55c36: eaab lsrl %d5,%d3
for (y = 0; y < year; y++)
55c38: 6012 bras 55c4c <msdos_date_dos2unix+0x7c>
days += y & 0x03 ? 365 : 366;
55c3a: 4a84 tstl %d4
55c3c: 57c4 seq %d4
55c3e: 2a3c 0000 016d movel #365,%d5
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
55c44: 5282 addql #1,%d2
days += y & 0x03 ? 365 : 366;
55c46: 49c4 extbl %d4
55c48: 9a84 subl %d4,%d5
55c4a: d1c5 addal %d5,%a0
55c4c: 7803 moveq #3,%d4
55c4e: c882 andl %d2,%d4
*/
if (lastdosdate != dd) {
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
55c50: b682 cmpl %d2,%d3
55c52: 66e6 bnes 55c3a <msdos_date_dos2unix+0x6a>
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
55c54: 4a84 tstl %d4
55c56: 6708 beqs 55c60 <msdos_date_dos2unix+0x90> <== ALWAYS TAKEN
55c58: 45f9 0006 6ddc lea 66ddc <regyear>,%a2 <== NOT EXECUTED
55c5e: 6006 bras 55c66 <msdos_date_dos2unix+0x96> <== NOT EXECUTED
55c60: 45f9 0006 6df4 lea 66df4 <leapyear>,%a2
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
55c66: 2401 movel %d1,%d2
55c68: 0282 0000 01e0 andil #480,%d2
55c6e: ea8a lsrl #5,%d2
if (month == 0) {
55c70: 6604 bnes 55c76 <msdos_date_dos2unix+0xa6> <== ALWAYS TAKEN
month = 1;
55c72: 143c 0001 moveb #1,%d2 <== NOT EXECUTED
}
for (m = 0; m < month - 1; m++)
55c76: 93c9 subal %a1,%a1
55c78: 5382 subql #1,%d2
55c7a: 6008 bras 55c84 <msdos_date_dos2unix+0xb4>
days += months[m];
55c7c: 4283 clrl %d3 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
55c7e: 5289 addql #1,%a1 <== NOT EXECUTED
days += months[m];
55c80: 361a movew %a2@+,%d3 <== NOT EXECUTED
55c82: d1c3 addal %d3,%a0 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
55c84: b489 cmpl %a1,%d2
55c86: 62f4 bhis 55c7c <msdos_date_dos2unix+0xac> <== NEVER TAKEN
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
55c88: 741f moveq #31,%d2
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
55c8a: 2a3c 0001 5180 movel #86400,%d5
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
55c90: c282 andl %d2,%d1
55c92: 41f0 18ff lea %a0@(ffffffff,%d1:l),%a0
55c96: 2208 movel %a0,%d1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
55c98: 4c05 1800 mulsl %d5,%d1
55c9c: 0681 12ce a600 addil #315532800,%d1
55ca2: 23c1 0006 7cfe movel %d1,67cfe <lastseconds>
}
return seconds + lastseconds;
}
55ca8: d0b9 0006 7cfe addl 67cfe <lastseconds>,%d0
55cae: 4cd7 043c moveml %sp@,%d2-%d5/%a2
55cb2: 4e5e unlk %fp <== NOT EXECUTED
00055ad4 <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)
{
55ad4: 4e56 fff0 linkw %fp,#-16
55ad8: 202e 0008 movel %fp@(8),%d0
55adc: 48d7 003c moveml %d2-%d5,%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) {
55ae0: b0b9 0006 7cf0 cmpl 67cf0 <lasttime>,%d0
55ae6: 6700 00cc beqw 55bb4 <msdos_date_unix2dos+0xe0>
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
55aea: 723c moveq #60,%d1
55aec: 2600 movel %d0,%d3
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
55aee: 2a3c 0000 0e10 movel #3600,%d5
* skip the computations and use the saved result.
*/
if (lasttime != t) {
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
55af4: 4c41 3004 remul %d1,%d4,%d3
55af8: 4c41 3003 remul %d1,%d3,%d3
/*
* 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;
55afc: 23c0 0006 7cf0 movel %d0,67cf0 <lasttime>
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
55b02: 4c41 3002 remul %d1,%d2,%d3
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
55b06: 2600 movel %d0,%d3
55b08: 4c45 3003 remul %d5,%d3,%d3
55b0c: 3a3c 0018 movew #24,%d5
* 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)
55b10: eb8a lsll #5,%d2
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
55b12: 4c45 3001 remul %d5,%d1,%d3
* 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)
55b16: 760b moveq #11,%d3
55b18: e7a9 lsll %d3,%d1
55b1a: 2604 movel %d4,%d3
55b1c: e28b lsrl #1,%d3
55b1e: d481 addl %d1,%d2
55b20: 2202 movel %d2,%d1
55b22: d283 addl %d3,%d1
/*
* 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);
55b24: 283c 0001 5180 movel #86400,%d4
* 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)
55b2a: 33c1 0006 7cf4 movew %d1,67cf4 <lastdtime>
/*
* 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);
55b30: 4c44 0000 remul %d4,%d0,%d0
if (days != lastday) {
55b34: b0b9 0006 7cf6 cmpl 67cf6 <lastday>,%d0
55b3a: 6778 beqs 55bb4 <msdos_date_unix2dos+0xe0> <== NEVER TAKEN
lastday = days;
55b3c: 23c0 0006 7cf6 movel %d0,67cf6 <lastday>
for (year = 1970;; year++) {
55b42: 223c 0000 07b2 movel #1970,%d1
inc = year & 0x03 ? 365 : 366;
55b48: 7603 moveq #3,%d3
55b4a: 2a3c 0000 016d movel #365,%d5
55b50: c681 andl %d1,%d3
55b52: 57c2 seq %d2
55b54: 49c2 extbl %d2
55b56: 9a82 subl %d2,%d5
if (days < inc)
55b58: ba80 cmpl %d0,%d5
55b5a: 6206 bhis 55b62 <msdos_date_unix2dos+0x8e>
break;
days -= inc;
55b5c: 9085 subl %d5,%d0
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
55b5e: 5281 addql #1,%d1
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
55b60: 60e6 bras 55b48 <msdos_date_unix2dos+0x74>
months = year & 0x03 ? regyear : leapyear;
55b62: 4a83 tstl %d3
55b64: 6708 beqs 55b6e <msdos_date_unix2dos+0x9a> <== ALWAYS TAKEN
55b66: 43f9 0006 6ddc lea 66ddc <regyear>,%a1 <== NOT EXECUTED
55b6c: 6006 bras 55b74 <msdos_date_unix2dos+0xa0> <== NOT EXECUTED
55b6e: 43f9 0006 6df4 lea 66df4 <leapyear>,%a1
for (month = 0; month < 12; month++) {
55b74: 91c8 subal %a0,%a0
if (days < months[month])
55b76: 4282 clrl %d2
55b78: 3419 movew %a1@+,%d2
55b7a: b480 cmpl %d0,%d2
55b7c: 620a bhis 55b88 <msdos_date_unix2dos+0xb4> <== ALWAYS TAKEN
break;
days -= months[month];
55b7e: 9082 subl %d2,%d0 <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
55b80: 5288 addql #1,%a0 <== NOT EXECUTED
55b82: 740c moveq #12,%d2 <== NOT EXECUTED
55b84: b488 cmpl %a0,%d2 <== NOT EXECUTED
55b86: 66ee bnes 55b76 <msdos_date_unix2dos+0xa2> <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
55b88: 2408 movel %a0,%d2
55b8a: 5282 addql #1,%d2
55b8c: 2240 moveal %d0,%a1
55b8e: eb8a lsll #5,%d2
55b90: 41f1 2801 lea %a1@(00000001,%d2:l),%a0
55b94: 33c8 0006 7cfa movew %a0,67cfa <lastddate>
* 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)
55b9a: 0c81 0000 07bc cmpil #1980,%d1
55ba0: 6312 blss 55bb4 <msdos_date_unix2dos+0xe0> <== NEVER TAKEN
lastddate += (year - 1980) <<
55ba2: 0681 ffff f844 addil #-1980,%d1
55ba8: 7009 moveq #9,%d0
55baa: e1a9 lsll %d0,%d1
55bac: d288 addl %a0,%d1
55bae: 33c1 0006 7cfa movew %d1,67cfa <lastddate>
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
55bb4: 206e 0010 moveal %fp@(16),%a0
55bb8: 30b9 0006 7cf4 movew 67cf4 <lastdtime>,%a0@
*ddp = lastddate;
55bbe: 206e 000c moveal %fp@(12),%a0
}
55bc2: 4cd7 003c moveml %sp@,%d2-%d5
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
*ddp = lastddate;
55bc6: 30b9 0006 7cfa movew 67cfa <lastddate>,%a0@
}
55bcc: 4e5e unlk %fp <== NOT EXECUTED
00053f28 <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
)
{
53f28: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53f2c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
53f30: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED
53f34: 286e 0010 moveal %fp@(16),%a4 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0, i = 0;
53f38: 4283 clrl %d3 <== NOT EXECUTED
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
53f3a: 2a3c 0004 f206 movel #324102,%d5 <== NOT EXECUTED
*/
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,
53f40: 4bf9 0005 8504 lea 58504 <strncmp>,%a5 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53f46: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
53f4a: 4214 clrb %a4@ <== NOT EXECUTED
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
53f4c: 6000 009a braw 53fe8 <msdos_dir_is_empty+0xc0> <== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
53f50: 721f moveq #31,%d1 <== NOT EXECUTED
53f52: b280 cmpl %d0,%d1 <== NOT EXECUTED
53f54: 6c00 00bc bgew 54012 <msdos_dir_is_empty+0xea> <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
53f58: 4281 clrl %d1 <== NOT EXECUTED
53f5a: 3212 movew %a2@,%d1 <== NOT EXECUTED
53f5c: b280 cmpl %d0,%d1 <== NOT EXECUTED
53f5e: 677e beqs 53fde <msdos_dir_is_empty+0xb6> <== NOT EXECUTED
53f60: 4879 0006 6069 pea 66069 <msdos_file_handlers+0x45> <== NOT EXECUTED
53f66: 4879 0006 610a pea 6610a <__FUNCTION__.7640> <== NOT EXECUTED
53f6c: 4878 0365 pea 365 <DBL_MANT_DIG+0x330> <== NOT EXECUTED
53f70: 4879 0006 6085 pea 66085 <msdos_file_handlers+0x61> <== NOT EXECUTED
53f76: 4eb9 0005 1354 jsr 51354 <__assert_func> <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
53f7c: 266a 0094 moveal %a2@(148),%a3 <== NOT EXECUTED
53f80: d7c2 addal %d2,%a3 <== NOT EXECUTED
* 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)) ==
53f82: 4280 clrl %d0 <== NOT EXECUTED
53f84: 1813 moveb %a3@,%d4 <== NOT EXECUTED
53f86: 1004 moveb %d4,%d0 <== NOT EXECUTED
53f88: 0c80 0000 00e5 cmpil #229,%d0 <== NOT EXECUTED
53f8e: 673c beqs 53fcc <msdos_dir_is_empty+0xa4> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
53f90: 723f moveq #63,%d1 <== NOT EXECUTED
53f92: 102b 000b moveb %a3@(11),%d0 <== NOT EXECUTED
53f96: c081 andl %d1,%d0 <== NOT EXECUTED
53f98: 123c 000f moveb #15,%d1 <== NOT EXECUTED
53f9c: b280 cmpl %d0,%d1 <== NOT EXECUTED
53f9e: 672c beqs 53fcc <msdos_dir_is_empty+0xa4> <== NOT EXECUTED
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
53fa0: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
53fa4: 4879 0006 60cf pea 660cf <msdos_file_handlers+0xab> <== NOT EXECUTED
53faa: 2f0b movel %a3,%sp@- <== NOT EXECUTED
53fac: 4e95 jsr %a5@ <== NOT EXECUTED
53fae: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
* be valid.
*/
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
MSDOS_ATTR_LFN) ||
53fb2: 4a80 tstl %d0 <== NOT EXECUTED
53fb4: 6716 beqs 53fcc <msdos_dir_is_empty+0xa4> <== NOT EXECUTED
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
MSDOS_SHORT_NAME_LEN) == 0) ||
(strncmp(MSDOS_DIR_NAME((entry)),
53fb6: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
53fba: 4879 0006 60db pea 660db <msdos_file_handlers+0xb7> <== NOT EXECUTED
53fc0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
53fc2: 4e95 jsr %a5@ <== NOT EXECUTED
53fc4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
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) ||
53fc8: 4a80 tstl %d0 <== NOT EXECUTED
53fca: 6608 bnes 53fd4 <msdos_dir_is_empty+0xac> <== NOT EXECUTED
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)
53fcc: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED
53fd2: 600e bras 53fe2 <msdos_dir_is_empty+0xba> <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
53fd4: 4a04 tstb %d4 <== NOT EXECUTED
53fd6: 663e bnes 54016 <msdos_dir_is_empty+0xee> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
53fd8: 18bc 0001 moveb #1,%a4@ <== NOT EXECUTED
53fdc: 6038 bras 54016 <msdos_dir_is_empty+0xee> <== NOT EXECUTED
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
assert(ret == fs_info->fat.vol.bps);
53fde: 4282 clrl %d2 <== NOT EXECUTED
/* have to look at the DIR_NAME as "raw" 8-bit data */
for (i = 0;
i < fs_info->fat.vol.bps;
53fe0: 2c00 movel %d0,%d6 <== 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;
53fe2: bc82 cmpl %d2,%d6 <== NOT EXECUTED
53fe4: 6296 bhis 53f7c <msdos_dir_is_empty+0x54> <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
53fe6: 5283 addql #1,%d3 <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
53fe8: 4280 clrl %d0 <== NOT EXECUTED
53fea: 2045 moveal %d5,%a0 <== NOT EXECUTED
53fec: 3012 movew %a2@,%d0 <== NOT EXECUTED
53fee: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
53ff2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
53ff4: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED
53ff8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
53ffa: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
53ffe: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54000: 4e90 jsr %a0@ <== NOT EXECUTED
54002: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54006: 4a80 tstl %d0 <== NOT EXECUTED
54008: 6600 ff46 bnew 53f50 <msdos_dir_is_empty+0x28> <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
5400c: 18bc 0001 moveb #1,%a4@ <== NOT EXECUTED
return RC_OK;
54010: 6006 bras 54018 <msdos_dir_is_empty+0xf0> <== NOT EXECUTED
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
return -1;
54012: 70ff moveq #-1,%d0 <== NOT EXECUTED
54014: 6002 bras 54018 <msdos_dir_is_empty+0xf0> <== NOT EXECUTED
}
/*
* Short file name entries mean not empty.
*/
return RC_OK;
54016: 4280 clrl %d0 <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
54018: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
5401e: 4e5e unlk %fp <== NOT EXECUTED
00055dc0 <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)
{
55dc0: 4e56 fe84 linkw %fp,#-380 <== NOT EXECUTED
55dc4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
55dc8: 2a6e 0008 moveal %fp@(8),%a5 <== 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 :
55dcc: 7a01 moveq #1,%d5 <== 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;
55dce: 206d 0024 moveal %a5@(36),%a0 <== NOT EXECUTED
55dd2: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
55dd6: 206d 0018 moveal %a5@(24),%a0 <== 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);
55dda: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== 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)
{
55dde: 242e 0010 movel %fp@(16),%d2 <== 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);
55de2: 42a7 clrl %sp@- <== NOT EXECUTED
55de4: 2f2d 0008 movel %a5@(8),%sp@- <== NOT EXECUTED
55de8: 2f2d 0004 movel %a5@(4),%sp@- <== NOT EXECUTED
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;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
55dec: 2d48 fed0 movel %a0,%fp@(-304) <== NOT EXECUTED
fat_file_fd_t *tmp_fat_fd = NULL;
55df0: 42ae fed8 clrl %fp@(-296) <== 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;
55df4: 42ae fedc clrl %fp@(-292) <== 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);
55df8: 4eb9 0004 1100 jsr 41100 <__divdi3> <== NOT EXECUTED
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
55dfe: 206e fed0 moveal %fp@(-304),%a0 <== 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);
55e02: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
55e06: 2d41 fec8 movel %d1,%fp@(-312) <== NOT EXECUTED
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
55e0a: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED
55e10: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
55e14: 2002 movel %d2,%d0 <== NOT EXECUTED
55e16: e18a lsll #8,%d2 <== NOT EXECUTED
55e18: e988 lsll #4,%d0 <== NOT EXECUTED
55e1a: d082 addl %d2,%d0 <== NOT EXECUTED
55e1c: 2d40 feb2 movel %d0,%fp@(-334) <== 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 :
55e20: baa8 0020 cmpl %a0@(32),%d5 <== NOT EXECUTED
55e24: 661e bnes 55e44 <msdos_dir_read+0x84> <== NOT EXECUTED
* optimization: we know that root directory for FAT12/16 volumes is
* sequential set of sectors and any cluster is sequential set of sectors
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
55e26: 4aa8 0024 tstl %a0@(36) <== NOT EXECUTED
55e2a: 6618 bnes 55e44 <msdos_dir_read+0x84> <== NOT EXECUTED
55e2c: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
55e30: 323c 0003 movew #3,%d1 <== NOT EXECUTED
55e34: c081 andl %d1,%d0 <== NOT EXECUTED
55e36: 4a00 tstb %d0 <== NOT EXECUTED
55e38: 670a beqs 55e44 <msdos_dir_read+0x84> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
55e3a: 2a28 0018 movel %a0@(24),%d5 <== NOT EXECUTED
55e3e: 2d45 fec2 movel %d5,%fp@(-318) <== NOT EXECUTED
55e42: 600a bras 55e4e <msdos_dir_read+0x8e> <== NOT EXECUTED
55e44: 4286 clrl %d6 <== NOT EXECUTED
55e46: 3c2a 0006 movew %a2@(6),%d6 <== NOT EXECUTED
55e4a: 2d46 fec2 movel %d6,%fp@(-318) <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
55e4e: 42a7 clrl %sp@- <== NOT EXECUTED
55e50: 42a7 clrl %sp@- <== NOT EXECUTED
55e52: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
55e56: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
55e5c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55e60: 4a80 tstl %d0 <== NOT EXECUTED
55e62: 6700 034c beqw 561b0 <msdos_dir_read+0x3f0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
55e66: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
55e6c: 7205 moveq #5,%d1 <== NOT EXECUTED
55e6e: 2040 moveal %d0,%a0 <== NOT EXECUTED
55e70: 2081 movel %d1,%a0@ <== NOT EXECUTED
55e72: 603e bras 55eb2 <msdos_dir_read+0xf2> <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(&fs_info->fat, fat_fd, (j * bts2rd),
55e74: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
55e78: 2f2e fec2 movel %fp@(-318),%sp@- <== NOT EXECUTED
55e7c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55e7e: 2f2e fed0 movel %fp@(-304),%sp@- <== NOT EXECUTED
55e82: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55e84: 4eb9 0004 f206 jsr 4f206 <fat_file_read> <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
55e8a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
55e8e: 721f moveq #31,%d1 <== NOT EXECUTED
* fat-file is already opened by open call, so read it
* Always read directory fat-file from the beggining because of MSDOS
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(&fs_info->fat, fat_fd, (j * bts2rd),
55e90: 2d40 feba movel %d0,%fp@(-326) <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
55e94: b280 cmpl %d0,%d1 <== NOT EXECUTED
55e96: 6d00 0308 bltw 561a0 <msdos_dir_read+0x3e0> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
55e9a: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
55e9e: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
55ea4: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
55eaa: 588f addql #4,%sp <== NOT EXECUTED
55eac: 2040 moveal %d0,%a0 <== NOT EXECUTED
55eae: 7005 moveq #5,%d0 <== NOT EXECUTED
55eb0: 2080 movel %d0,%a0@ <== NOT EXECUTED
55eb2: 7cff moveq #-1,%d6 <== NOT EXECUTED
55eb4: 6000 0374 braw 5622a <msdos_dir_read+0x46a> <== NOT EXECUTED
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
55eb8: 266a 0094 moveal %a2@(148),%a3 <== NOT EXECUTED
55ebc: d7c3 addal %d3,%a3 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
55ebe: 1013 moveb %a3@,%d0 <== NOT EXECUTED
55ec0: 6604 bnes 55ec6 <msdos_dir_read+0x106> <== NOT EXECUTED
55ec2: 6000 030e braw 561d2 <msdos_dir_read+0x412> <== 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)
55ec6: 4281 clrl %d1 <== NOT EXECUTED
55ec8: 1200 moveb %d0,%d1 <== NOT EXECUTED
55eca: 0c81 0000 00e5 cmpil #229,%d1 <== NOT EXECUTED
55ed0: 6700 02c6 beqw 56198 <msdos_dir_read+0x3d8> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
55ed4: 7c08 moveq #8,%d6 <== NOT EXECUTED
55ed6: 122b 000b moveb %a3@(11),%d1 <== NOT EXECUTED
55eda: cc81 andl %d1,%d6 <== NOT EXECUTED
55edc: 4a06 tstb %d6 <== NOT EXECUTED
55ede: 670e beqs 55eee <msdos_dir_read+0x12e> <== NOT EXECUTED
55ee0: 7c3f moveq #63,%d6 <== NOT EXECUTED
55ee2: cc81 andl %d1,%d6 <== NOT EXECUTED
55ee4: 2046 moveal %d6,%a0 <== NOT EXECUTED
55ee6: 7c0f moveq #15,%d6 <== NOT EXECUTED
55ee8: bc88 cmpl %a0,%d6 <== NOT EXECUTED
55eea: 6600 02ac bnew 56198 <msdos_dir_read+0x3d8> <== 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) ==
55eee: 7c3f moveq #63,%d6 <== NOT EXECUTED
55ef0: c286 andl %d6,%d1 <== NOT EXECUTED
55ef2: 1c3c 000f moveb #15,%d6 <== NOT EXECUTED
55ef6: bc81 cmpl %d1,%d6 <== NOT EXECUTED
55ef8: 6600 00a2 bnew 55f9c <msdos_dir_read+0x1dc> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
55efc: 72ff moveq #-1,%d1 <== NOT EXECUTED
55efe: b285 cmpl %d5,%d1 <== NOT EXECUTED
55f00: 6630 bnes 55f32 <msdos_dir_read+0x172> <== NOT EXECUTED
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
55f02: 7240 moveq #64,%d1 <== NOT EXECUTED
55f04: c280 andl %d0,%d1 <== NOT EXECUTED
55f06: 4a01 tstb %d1 <== NOT EXECUTED
55f08: 6700 028e beqw 56198 <msdos_dir_read+0x3d8> <== 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) &
55f0c: 783f moveq #63,%d4 <== 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)
55f0e: 2a03 movel %d3,%d5 <== NOT EXECUTED
55f10: da87 addl %d7,%d5 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
55f12: ea8d lsrl #5,%d5 <== 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);
55f14: 1c2b 000d moveb %a3@(13),%d6 <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
55f18: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== 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) &
55f1c: c880 andl %d0,%d4 <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
55f1e: 42a7 clrl %sp@- <== NOT EXECUTED
55f20: 2f2e fed4 movel %fp@(-300),%sp@- <== 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);
55f24: 1d46 fec7 moveb %d6,%fp@(-313) <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
55f28: 4eb9 0005 71d8 jsr 571d8 <memset> <== NOT EXECUTED
55f2e: 4fef 000c lea %sp@(12),%sp <== 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) &
55f32: 723f moveq #63,%d1 <== NOT EXECUTED
55f34: 1013 moveb %a3@,%d0 <== NOT EXECUTED
55f36: c081 andl %d1,%d0 <== NOT EXECUTED
55f38: b084 cmpl %d4,%d0 <== NOT EXECUTED
55f3a: 6600 025a bnew 56196 <msdos_dir_read+0x3d6> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
55f3e: 4281 clrl %d1 <== NOT EXECUTED
55f40: 4280 clrl %d0 <== NOT EXECUTED
55f42: 122e fec7 moveb %fp@(-313),%d1 <== NOT EXECUTED
55f46: 102b 000d moveb %a3@(13),%d0 <== NOT EXECUTED
55f4a: b081 cmpl %d1,%d0 <== NOT EXECUTED
55f4c: 6600 0248 bnew 56196 <msdos_dir_read+0x3d6> <== 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--;
55f50: 5384 subql #1,%d4 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
55f52: 700d moveq #13,%d0 <== NOT EXECUTED
55f54: 4c04 0800 mulsl %d4,%d0 <== 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)
55f58: 43ee fef0 lea %fp@(-272),%a1 <== 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;
55f5c: 528b addql #1,%a3 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
55f5e: 91c8 subal %a0,%a0 <== 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)
55f60: d3c0 addal %d0,%a1 <== 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))
55f62: 2208 movel %a0,%d1 <== NOT EXECUTED
55f64: d280 addl %d0,%d1 <== NOT EXECUTED
55f66: 0c81 0000 00fe cmpil #254,%d1 <== NOT EXECUTED
55f6c: 6200 0220 bhiw 5618e <msdos_dir_read+0x3ce> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
55f70: 1193 9810 moveb %a3@,%a0@(00000010,%a1:l) <== NOT EXECUTED
if (*p == '\0')
55f74: 6700 0218 beqw 5618e <msdos_dir_read+0x3ce> <== NOT EXECUTED
break;
switch (q)
55f78: 7c04 moveq #4,%d6 <== NOT EXECUTED
55f7a: bc88 cmpl %a0,%d6 <== NOT EXECUTED
55f7c: 6708 beqs 55f86 <msdos_dir_read+0x1c6> <== NOT EXECUTED
55f7e: 720a moveq #10,%d1 <== NOT EXECUTED
55f80: b288 cmpl %a0,%d1 <== NOT EXECUTED
55f82: 660a bnes 55f8e <msdos_dir_read+0x1ce> <== NOT EXECUTED
55f84: 6004 bras 55f8a <msdos_dir_read+0x1ca> <== NOT EXECUTED
{
case 4:
p += 5;
55f86: 5a8b addql #5,%a3 <== NOT EXECUTED
break;
55f88: 6006 bras 55f90 <msdos_dir_read+0x1d0> <== NOT EXECUTED
case 10:
p += 4;
55f8a: 588b addql #4,%a3 <== NOT EXECUTED
break;
55f8c: 6002 bras 55f90 <msdos_dir_read+0x1d0> <== NOT EXECUTED
default:
p += 2;
55f8e: 548b addql #2,%a3 <== 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++)
55f90: 5288 addql #1,%a0 <== NOT EXECUTED
55f92: 7c0d moveq #13,%d6 <== NOT EXECUTED
55f94: bc88 cmpl %a0,%d6 <== NOT EXECUTED
55f96: 66ca bnes 55f62 <msdos_dir_read+0x1a2> <== NOT EXECUTED
55f98: 6000 01f4 braw 5618e <msdos_dir_read+0x3ce> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
55f9c: 4aae fec8 tstl %fp@(-312) <== NOT EXECUTED
55fa0: 6708 beqs 55faa <msdos_dir_read+0x1ea> <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
55fa2: 53ae fec8 subql #1,%fp@(-312) <== NOT EXECUTED
55fa6: 6000 01ee braw 56196 <msdos_dir_read+0x3d6> <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
55faa: 486e fedc pea %fp@(-292) <== NOT EXECUTED
55fae: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55fb0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55fb4: 2f2e fed0 movel %fp@(-304),%sp@- <== NOT EXECUTED
55fb8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55fba: 4eb9 0004 f526 jsr 4f526 <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
55fc0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
* unfortunately there is no method to extract ino except to
* open fat-file descriptor :( ... so, open it
*/
/* get number of cluster we are working with */
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
55fc4: 2c00 movel %d0,%d6 <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
55fc6: 6704 beqs 55fcc <msdos_dir_read+0x20c> <== NOT EXECUTED
55fc8: 6000 01b8 braw 56182 <msdos_dir_read+0x3c2> <== NOT EXECUTED
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
55fcc: 486e fed8 pea %fp@(-296) <== 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;
55fd0: 70ff moveq #-1,%d0 <== NOT EXECUTED
55fd2: 486e fee0 pea %fp@(-288) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
55fd6: 2d6e fedc fee0 movel %fp@(-292),%fp@(-288) <== NOT EXECUTED
dir_pos.sname.ofs = i;
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
55fdc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55fde: 2d40 fee8 movel %d0,%fp@(-280) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
55fe2: 2d40 feec movel %d0,%fp@(-276) <== NOT EXECUTED
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
55fe6: 2d43 fee4 movel %d3,%fp@(-284) <== NOT EXECUTED
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
55fea: 4eb9 0004 f0b0 jsr 4f0b0 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
55ff0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
55ff4: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc != RC_OK)
55ff6: 6704 beqs 55ffc <msdos_dir_read+0x23c> <== NOT EXECUTED
55ff8: 6000 0188 braw 56182 <msdos_dir_read+0x3c2> <== NOT EXECUTED
/* fill in dirent structure */
/* XXX: from what and in what d_off should be computed ?! */
tmp_dirent.d_off = start + cmpltd;
tmp_dirent.d_reclen = sizeof(struct dirent);
tmp_dirent.d_ino = tmp_fat_fd->ino;
55ffc: 206e fed8 moveal %fp@(-296),%a0 <== 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)
56000: 7cff moveq #-1,%d6 <== 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);
56002: 323c 0110 movew #272,%d1 <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
56006: 2d68 000c fef0 movel %a0@(12),%fp@(-272) <== 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);
5600c: 3d41 fefc movew %d1,%fp@(-260) <== 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;
56010: 2d42 fef8 movel %d2,%fp@(-264) <== NOT EXECUTED
56014: 42ae fef4 clrl %fp@(-268) <== 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)
56018: bc85 cmpl %d5,%d6 <== NOT EXECUTED
5601a: 6700 01c6 beqw 561e2 <msdos_dir_read+0x422> <== 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)
5601e: 43eb 000b lea %a3@(11),%a1 <== NOT EXECUTED
56022: 204b moveal %a3,%a0 <== NOT EXECUTED
56024: 4200 clrb %d0 <== 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;
56026: 0800 0000 btst #0,%d0 <== NOT EXECUTED
5602a: 6704 beqs 56030 <msdos_dir_read+0x270> <== NOT EXECUTED
5602c: 7280 moveq #-128,%d1 <== NOT EXECUTED
5602e: 6002 bras 56032 <msdos_dir_read+0x272> <== NOT EXECUTED
56030: 4201 clrb %d1 <== NOT EXECUTED
56032: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56038: 1c18 moveb %a0@+,%d6 <== NOT EXECUTED
5603a: e288 lsrl #1,%d0 <== NOT EXECUTED
5603c: d086 addl %d6,%d0 <== NOT EXECUTED
5603e: d081 addl %d1,%d0 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
56040: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
56042: 66e2 bnes 56026 <msdos_dir_read+0x266> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
56044: 4a84 tstl %d4 <== NOT EXECUTED
56046: 6600 019a bnew 561e2 <msdos_dir_read+0x422> <== NOT EXECUTED
5604a: 4281 clrl %d1 <== NOT EXECUTED
5604c: 122e fec7 moveb %fp@(-313),%d1 <== NOT EXECUTED
56050: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56056: b081 cmpl %d1,%d0 <== NOT EXECUTED
56058: 6600 0188 bnew 561e2 <msdos_dir_read+0x422> <== NOT EXECUTED
5605c: 6000 0192 braw 561f0 <msdos_dir_read+0x430> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
56060: b7c8 cmpal %a0,%a3 <== NOT EXECUTED
56062: 6710 beqs 56074 <msdos_dir_read+0x2b4> <== 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)
56064: 2248 moveal %a0,%a1 <== NOT EXECUTED
56066: 93cb subal %a3,%a1 <== 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) &&
56068: 7220 moveq #32,%d1 <== NOT EXECUTED
5606a: 1020 moveb %a0@-,%d0 <== NOT EXECUTED
5606c: 49c0 extbl %d0 <== NOT EXECUTED
5606e: b280 cmpl %d0,%d1 <== NOT EXECUTED
56070: 67ee beqs 56060 <msdos_dir_read+0x2a0> <== NOT EXECUTED
56072: 6002 bras 56076 <msdos_dir_read+0x2b6> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
56074: 93c9 subal %a1,%a1 <== 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(
56076: 206e fed4 moveal %fp@(-300),%a0 <== 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)
5607a: 2c08 movel %a0,%d6 <== NOT EXECUTED
5607c: dc89 addl %a1,%d6 <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
5607e: 2a39 0006 6e0c movel 66e0c <__ctype_ptr__>,%d5 <== NOT EXECUTED
56084: 2d4b feae movel %a3,%fp@(-338) <== 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)
56088: 2d46 febe movel %d6,%fp@(-322) <== NOT EXECUTED
5608c: 6028 bras 560b6 <msdos_dir_read+0x2f6> <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
5608e: 286e feae moveal %fp@(-338),%a4 <== NOT EXECUTED
56092: 4280 clrl %d0 <== NOT EXECUTED
56094: 101c moveb %a4@+,%d0 <== NOT EXECUTED
56096: 52ae feae addql #1,%fp@(-338) <== NOT EXECUTED
5609a: 2845 moveal %d5,%a4 <== NOT EXECUTED
5609c: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 <== NOT EXECUTED
560a0: 1c01 moveb %d1,%d6 <== NOT EXECUTED
560a2: 7203 moveq #3,%d1 <== NOT EXECUTED
560a4: cc81 andl %d1,%d6 <== NOT EXECUTED
560a6: 123c 0001 moveb #1,%d1 <== NOT EXECUTED
560aa: b286 cmpl %d6,%d1 <== NOT EXECUTED
560ac: 6606 bnes 560b4 <msdos_dir_read+0x2f4> <== NOT EXECUTED
560ae: 0680 0000 0020 addil #32,%d0 <== NOT EXECUTED
560b4: 10c0 moveb %d0,%a0@+ <== 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)
560b6: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED
560ba: 9088 subl %a0,%d0 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
560bc: 4a80 tstl %d0 <== NOT EXECUTED
560be: 6ece bgts 5608e <msdos_dir_read+0x2ce> <== 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) &&
560c0: 7a20 moveq #32,%d5 <== NOT EXECUTED
560c2: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED
560c6: 49c0 extbl %d0 <== NOT EXECUTED
560c8: ba80 cmpl %d0,%d5 <== NOT EXECUTED
560ca: 6600 0138 bnew 56204 <msdos_dir_read+0x444> <== NOT EXECUTED
560ce: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
560d2: 49c0 extbl %d0 <== NOT EXECUTED
560d4: ba80 cmpl %d0,%d5 <== NOT EXECUTED
560d6: 6600 0130 bnew 56208 <msdos_dir_read+0x448> <== NOT EXECUTED
560da: 102b 0008 moveb %a3@(8),%d0 <== NOT EXECUTED
560de: 49c0 extbl %d0 <== NOT EXECUTED
560e0: ba80 cmpl %d0,%d5 <== NOT EXECUTED
560e2: 6746 beqs 5612a <msdos_dir_read+0x36a> <== NOT EXECUTED
560e4: 7001 moveq #1,%d0 <== NOT EXECUTED
560e6: 6000 0122 braw 5620a <msdos_dir_read+0x44a> <== NOT EXECUTED
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
560ea: 286e fecc moveal %fp@(-308),%a4 <== NOT EXECUTED
560ee: 4281 clrl %d1 <== NOT EXECUTED
560f0: 121c moveb %a4@+,%d1 <== NOT EXECUTED
560f2: 7a03 moveq #3,%d5 <== NOT EXECUTED
560f4: 52ae fecc addql #1,%fp@(-308) <== NOT EXECUTED
560f8: 1c31 1801 moveb %a1@(00000001,%d1:l),%d6 <== NOT EXECUTED
560fc: cc85 andl %d5,%d6 <== NOT EXECUTED
560fe: 1a3c 0001 moveb #1,%d5 <== NOT EXECUTED
56102: ba86 cmpl %d6,%d5 <== NOT EXECUTED
56104: 6606 bnes 5610c <msdos_dir_read+0x34c> <== NOT EXECUTED
56106: 0681 0000 0020 addil #32,%d1 <== NOT EXECUTED
5610c: 16c1 moveb %d1,%a3@+ <== 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)
5610e: 222e febe movel %fp@(-322),%d1 <== NOT EXECUTED
56112: 928b subl %a3,%d1 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
56114: 4a81 tstl %d1 <== NOT EXECUTED
56116: 6ed2 bgts 560ea <msdos_dir_read+0x32a> <== 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)
56118: 2200 movel %d0,%d1 <== NOT EXECUTED
5611a: 4681 notl %d1 <== NOT EXECUTED
5611c: d281 addl %d1,%d1 <== NOT EXECUTED
5611e: 9381 subxl %d1,%d1 <== NOT EXECUTED
56120: 226e feae moveal %fp@(-338),%a1 <== NOT EXECUTED
56124: c081 andl %d1,%d0 <== NOT EXECUTED
56126: d1c0 addal %d0,%a0 <== NOT EXECUTED
56128: d3c0 addal %d0,%a1 <== 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(
5612a: 7aff moveq #-1,%d5 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
5612c: 4210 clrb %a0@ <== 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(
5612e: 3d49 fefe movew %a1,%fp@(-258) <== NOT EXECUTED
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
56132: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED
56136: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
5613a: 486e fef0 pea %fp@(-272) <== NOT EXECUTED
5613e: 4870 2800 pea %a0@(00000000,%d2:l) <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
56142: 0682 0000 0110 addil #272,%d2 <== NOT EXECUTED
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
56148: 4eb9 0005 7168 jsr 57168 <memcpy> <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
5614e: 4280 clrl %d0 <== NOT EXECUTED
56150: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED
56156: d3ad 0008 addl %d1,%a5@(8) <== NOT EXECUTED
5615a: 2c2d 0004 movel %a5@(4),%d6 <== NOT EXECUTED
5615e: dd80 addxl %d0,%d6 <== NOT EXECUTED
56160: 2b46 0004 movel %d6,%a5@(4) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
56164: 203c ffff fef0 movel #-272,%d0 <== NOT EXECUTED
5616a: d1ae feb2 addl %d0,%fp@(-334) <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
5616e: 2f2e fed8 movel %fp@(-296),%sp@- <== NOT EXECUTED
56172: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56174: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
5617a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
/* inode number extracted, close fat-file */
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
5617e: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc != RC_OK)
56180: 670c beqs 5618e <msdos_dir_read+0x3ce> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
56182: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
56186: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
5618c: 6050 bras 561de <msdos_dir_read+0x41e> <== NOT EXECUTED
return rc;
}
}
if (count <= 0)
5618e: 4aae feb2 tstl %fp@(-334) <== NOT EXECUTED
56192: 6604 bnes 56198 <msdos_dir_read+0x3d8> <== NOT EXECUTED
56194: 6014 bras 561aa <msdos_dir_read+0x3ea> <== NOT EXECUTED
*/
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
lfn_start = FAT_FILE_SHORT_NAME;
56196: 7aff moveq #-1,%d5 <== 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)
56198: 0683 0000 0020 addil #32,%d3 <== NOT EXECUTED
5619e: 6002 bras 561a2 <msdos_dir_read+0x3e2> <== NOT EXECUTED
* directories feature :( - we should count elements currently
* present in the directory because there may be holes :)
*/
ret = fat_file_read(&fs_info->fat, fat_fd, (j * bts2rd),
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
561a0: 4283 clrl %d3 <== 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)
561a2: b6ae feba cmpl %fp@(-326),%d3 <== NOT EXECUTED
561a6: 6500 fd10 bcsw 55eb8 <msdos_dir_read+0xf8> <== NOT EXECUTED
561aa: deae fec2 addl %fp@(-318),%d7 <== NOT EXECUTED
561ae: 601a bras 561ca <msdos_dir_read+0x40a> <== 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(
561b0: 41ee fef0 lea %fp@(-272),%a0 <== NOT EXECUTED
561b4: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
561b8: 4287 clrl %d7 <== NOT EXECUTED
561ba: 4284 clrl %d4 <== NOT EXECUTED
561bc: 7aff moveq #-1,%d5 <== NOT EXECUTED
561be: 4282 clrl %d2 <== NOT EXECUTED
561c0: 4201 clrb %d1 <== 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(
561c2: 2d48 fed4 movel %a0,%fp@(-300) <== NOT EXECUTED
fat_fd->fat_file_size :
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
561c6: 1d41 fec7 moveb %d1,%fp@(-313) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
561ca: 4aae feb2 tstl %fp@(-334) <== NOT EXECUTED
561ce: 6600 fca4 bnew 55e74 <msdos_dir_read+0xb4> <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
561d2: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
return cmpltd;
561d6: 2c02 movel %d2,%d6 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
561d8: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
561de: 588f addql #4,%sp <== NOT EXECUTED
561e0: 6048 bras 5622a <msdos_dir_read+0x46a> <== 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)
561e2: 49eb 0008 lea %a3@(8),%a4 <== NOT EXECUTED
561e6: 204c moveal %a4,%a0 <== NOT EXECUTED
561e8: 2d4c fecc movel %a4,%fp@(-308) <== NOT EXECUTED
561ec: 6000 fe76 braw 56064 <msdos_dir_read+0x2a4> <== 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);
561f0: 2f2e fed4 movel %fp@(-300),%sp@- <== NOT EXECUTED
561f4: 4eb9 0005 84e8 jsr 584e8 <strlen> <== NOT EXECUTED
561fa: 588f addql #4,%sp <== NOT EXECUTED
561fc: 3d40 fefe movew %d0,%fp@(-258) <== NOT EXECUTED
56200: 6000 ff30 braw 56132 <msdos_dir_read+0x372> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
56204: 7003 moveq #3,%d0 <== NOT EXECUTED
56206: 6002 bras 5620a <msdos_dir_read+0x44a> <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
56208: 7002 moveq #2,%d0 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
5620a: 10fc 002e moveb #46,%a0@+ <== NOT EXECUTED
len += i + 1; /* extension + dot */
5620e: 43f1 0801 lea %a1@(00000001,%d0:l),%a1 <== 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)
56212: 49f0 0800 lea %a0@(00000000,%d0:l),%a4 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
56216: 2648 moveal %a0,%a3 <== NOT EXECUTED
len += i + 1; /* extension + dot */
56218: 2d49 feae movel %a1,%fp@(-338) <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
5621c: 2279 0006 6e0c moveal 66e0c <__ctype_ptr__>,%a1 <== 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)
56222: 2d4c febe movel %a4,%fp@(-322) <== NOT EXECUTED
56226: 6000 fee6 braw 5610e <msdos_dir_read+0x34e> <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
5622a: 2006 movel %d6,%d0 <== NOT EXECUTED
5622c: 4cee 3cfc fe84 moveml %fp@(-380),%d2-%d7/%a2-%a5 <== NOT EXECUTED
56232: 4e5e unlk %fp <== NOT EXECUTED
00056236 <msdos_dir_stat>:
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56236: 4e56 fff4 linkw %fp,#-12
5623a: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
5623e: 2268 0014 moveal %a0@(20),%a1
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56242: 48d7 1c00 moveml %a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
56246: 2669 0008 moveal %a1@(8),%a3
fat_file_fd_t *fat_fd = loc->node_access;
5624a: 2868 0008 moveal %a0@(8),%a4
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5624e: 42a7 clrl %sp@-
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56250: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56254: 42a7 clrl %sp@-
56256: 2f2b 0090 movel %a3@(144),%sp@-
5625a: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
56260: 4fef 000c lea %sp@(12),%sp
56264: 4a80 tstl %d0
56266: 6710 beqs 56278 <msdos_dir_stat+0x42> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
56268: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
5626e: 2040 moveal %d0,%a0 <== NOT EXECUTED
56270: 7005 moveq #5,%d0 <== NOT EXECUTED
56272: 2080 movel %d0,%a0@ <== NOT EXECUTED
56274: 70ff moveq #-1,%d0 <== NOT EXECUTED
56276: 605c bras 562d4 <msdos_dir_stat+0x9e> <== NOT EXECUTED
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
56278: 206b 005a moveal %a3@(90),%a0
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
5627c: 2010 movel %a0@,%d0
5627e: 2228 0004 movel %a0@(4),%d1
buf->st_ino = fat_fd->ino;
56282: 256c 000c 0008 movel %a4@(12),%a2@(8)
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);
56288: 2480 movel %d0,%a2@
5628a: 2541 0004 movel %d1,%a2@(4)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
5628e: 223c 0000 41ff movel #16895,%d1
56294: 2541 000c movel %d1,%a2@(12)
buf->st_rdev = 0ll;
56298: 4280 clrl %d0
5629a: 4281 clrl %d1
5629c: 2540 0016 movel %d0,%a2@(22)
562a0: 2541 001a movel %d1,%a2@(26)
buf->st_size = fat_fd->fat_file_size;
562a4: 202c 0018 movel %a4@(24),%d0
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
562a8: 7209 moveq #9,%d1
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
562aa: 2540 0022 movel %d0,%a2@(34)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
562ae: e2a8 lsrl %d1,%d0
562b0: 2540 0042 movel %d0,%a2@(66)
buf->st_blksize = fs_info->fat.vol.bps;
562b4: 4280 clrl %d0
562b6: 3013 movew %a3@,%d0
buf->st_mtime = fat_fd->mtime;
562b8: 256c 003e 002e movel %a4@(62),%a2@(46)
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
562be: 42aa 001e clrl %a2@(30)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
562c2: 2540 003e movel %d0,%a2@(62)
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
562c6: 2f2b 0090 movel %a3@(144),%sp@-
562ca: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return RC_OK;
562d0: 588f addql #4,%sp
562d2: 4280 clrl %d0
}
562d4: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
562da: 4e5e unlk %fp
...
000538b8 <msdos_eval_token>:
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
538b8: 7001 moveq #1,%d0
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
538ba: 4e56 0000 linkw %fp,#0
538be: 206e 0010 moveal %fp@(16),%a0
538c2: 2f0a movel %a2,%sp@-
538c4: 246e 0008 moveal %fp@(8),%a2
538c8: 222e 0014 movel %fp@(20),%d1
538cc: 2f02 movel %d2,%sp@-
538ce: b081 cmpl %d1,%d0
538d0: 6610 bnes 538e2 <msdos_eval_token+0x2a> <== ALWAYS TAKEN
538d2: 742e moveq #46,%d2 <== NOT EXECUTED
538d4: 1010 moveb %a0@,%d0 <== NOT EXECUTED
538d6: b580 eorl %d2,%d0 <== NOT EXECUTED
538d8: 4a00 tstb %d0 <== NOT EXECUTED
538da: 57c0 seq %d0 <== NOT EXECUTED
538dc: 49c0 extbl %d0 <== NOT EXECUTED
538de: 4480 negl %d0 <== NOT EXECUTED
538e0: 6002 bras 538e4 <msdos_eval_token+0x2c> <== NOT EXECUTED
538e2: 4280 clrl %d0
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
538e4: 0800 0000 btst #0,%d0
538e8: 6708 beqs 538f2 <msdos_eval_token+0x3a> <== ALWAYS TAKEN
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
538ea: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
538ee: 4280 clrl %d0 <== NOT EXECUTED
538f0: 6060 bras 53952 <msdos_eval_token+0x9a> <== NOT EXECUTED
} else {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc(ctx);
int rc = msdos_find_name(currentloc, token, tokenlen);
538f2: 2f01 movel %d1,%sp@-
538f4: 2f08 movel %a0,%sp@-
538f6: 486a 0018 pea %a2@(24)
538fa: 4eb9 0005 4bd4 jsr 54bd4 <msdos_find_name>
if (rc == RC_OK) {
53900: 4fef 000c lea %sp@(12),%sp
53904: 4a80 tstl %d0
53906: 6630 bnes 53938 <msdos_eval_token+0x80>
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
53908: 206a 002c moveal %a2@(44),%a0
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
5390c: 226a 0020 moveal %a2@(32),%a1
* None
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
53910: 2068 0008 moveal %a0@(8),%a0
53914: 42aa 000c clrl %a2@(12)
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
53918: 4aa9 0010 tstl %a1@(16)
5391c: 6608 bnes 53926 <msdos_eval_token+0x6e> <== ALWAYS TAKEN
loc->handlers = fs_info->directory_handlers;
5391e: 2568 0088 0028 movel %a0@(136),%a2@(40) <== NOT EXECUTED
53924: 6006 bras 5392c <msdos_eval_token+0x74> <== NOT EXECUTED
else
loc->handlers = fs_info->file_handlers;
53926: 2568 008c 0028 movel %a0@(140),%a2@(40)
int rc = msdos_find_name(currentloc, token, tokenlen);
if (rc == RC_OK) {
rtems_filesystem_eval_path_clear_token(ctx);
msdos_set_handlers(currentloc);
if (rtems_filesystem_eval_path_has_path(ctx)) {
5392c: 4aaa 0004 tstl %a2@(4)
53930: 57c0 seq %d0
53932: 49c0 extbl %d0
53934: 4480 negl %d0
53936: 601a bras 53952 <msdos_eval_token+0x9a>
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else if (rc == MSDOS_NAME_NOT_FOUND_ERR) {
53938: 0c80 0000 7d01 cmpil #32001,%d0
5393e: 6710 beqs 53950 <msdos_eval_token+0x98> <== ALWAYS TAKEN
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
} else {
rtems_filesystem_eval_path_error(ctx, 0);
53940: 42a7 clrl %sp@- <== NOT EXECUTED
53942: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53944: 4eb9 0004 4fd2 jsr 44fd2 <rtems_filesystem_eval_path_error><== NOT EXECUTED
5394a: 508f addql #8,%sp <== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
5394c: 7001 moveq #1,%d0 <== NOT EXECUTED
5394e: 6002 bras 53952 <msdos_eval_token+0x9a> <== NOT EXECUTED
msdos_set_handlers(currentloc);
if (rtems_filesystem_eval_path_has_path(ctx)) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else if (rc == MSDOS_NAME_NOT_FOUND_ERR) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
53950: 7002 moveq #2,%d0
rtems_filesystem_eval_path_error(ctx, 0);
}
}
return status;
}
53952: 242e fff8 movel %fp@(-8),%d2
53956: 246e fffc moveal %fp@(-4),%a2
5395a: 4e5e unlk %fp <== NOT EXECUTED
0005633c <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)
{
5633c: 4e56 0000 linkw %fp,#0
56340: 2f0b movel %a3,%sp@-
56342: 266e 0008 moveal %fp@(8),%a3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
56346: 206b 0024 moveal %a3@(36),%a0
* RC_OK, if file closed successfully, or -1 if error occured (errno set
* appropriately)
*/
int
msdos_file_close(rtems_libio_t *iop)
{
5634a: 2f0a movel %a2,%sp@-
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5634c: 2468 0008 moveal %a0@(8),%a2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56350: 42a7 clrl %sp@-
56352: 42a7 clrl %sp@-
56354: 2f2a 0090 movel %a2@(144),%sp@-
56358: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5635e: 4fef 000c lea %sp@(12),%sp
56362: 4a80 tstl %d0
56364: 6712 beqs 56378 <msdos_file_close+0x3c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
56366: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
5636c: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED
56370: 2040 moveal %d0,%a0 <== NOT EXECUTED
56372: 7005 moveq #5,%d0 <== NOT EXECUTED
56374: 2080 movel %d0,%a0@ <== NOT EXECUTED
56376: 6014 bras 5638c <msdos_file_close+0x50> <== NOT EXECUTED
rc = msdos_file_update(iop);
56378: 2f0b movel %a3,%sp@-
5637a: 4eba ff64 jsr %pc@(562e0 <msdos_file_update>)
rtems_semaphore_release(fs_info->vol_sema);
5637e: 2f2a 0090 movel %a2@(144),%sp@-
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);
rc = msdos_file_update(iop);
56382: 2640 moveal %d0,%a3
rtems_semaphore_release(fs_info->vol_sema);
56384: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return rc;
5638a: 508f addql #8,%sp
}
5638c: 200b movel %a3,%d0
5638e: 246e fff8 moveal %fp@(-8),%a2
56392: 266e fffc moveal %fp@(-4),%a3
56396: 4e5e unlk %fp <== NOT EXECUTED
000565a2 <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)
{
565a2: 4e56 ffd8 linkw %fp,#-40
565a6: 226e 0008 moveal %fp@(8),%a1
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
565aa: 2069 0024 moveal %a1@(36),%a0
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
565ae: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
565b2: 2468 0008 moveal %a0@(8),%a2
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
565b6: 2669 0018 moveal %a1@(24),%a3
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
565ba: 42a7 clrl %sp@-
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
565bc: 242e 000c movel %fp@(12),%d2
565c0: 262e 0010 movel %fp@(16),%d3
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
565c4: 42a7 clrl %sp@-
565c6: 2f2a 0090 movel %a2@(144),%sp@-
565ca: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
565d0: 4fef 000c lea %sp@(12),%sp
565d4: 4a80 tstl %d0
565d6: 6712 beqs 565ea <msdos_file_ftruncate+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
565d8: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
565de: 7405 moveq #5,%d2 <== NOT EXECUTED
565e0: 7cff moveq #-1,%d6 <== NOT EXECUTED
565e2: 2040 moveal %d0,%a0 <== NOT EXECUTED
565e4: 2082 movel %d2,%a0@ <== NOT EXECUTED
565e6: 6000 0088 braw 56670 <msdos_file_ftruncate+0xce> <== NOT EXECUTED
old_length = fat_fd->fat_file_size;
565ea: 286b 0018 moveal %a3@(24),%a4
if (length < old_length) {
565ee: 4286 clrl %d6
565f0: 2e0c movel %a4,%d7
565f2: 2002 movel %d2,%d0
565f4: 2203 movel %d3,%d1
565f6: 9287 subl %d7,%d1
565f8: 9186 subxl %d6,%d0
565fa: 6c14 bges 56610 <msdos_file_ftruncate+0x6e> <== ALWAYS TAKEN
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
565fc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
565fe: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56600: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56602: 4eb9 0004 f376 jsr 4f376 <fat_file_truncate> <== NOT EXECUTED
56608: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5660c: 2c00 movel %d0,%d6 <== NOT EXECUTED
5660e: 604c bras 5665c <msdos_file_ftruncate+0xba> <== NOT EXECUTED
} else {
uint32_t new_length;
rc = fat_file_extend(&fs_info->fat,
56610: 486e fffc pea %fp@(-4)
56614: 2f03 movel %d3,%sp@-
56616: 4878 0001 pea 1 <ADD>
5661a: 2f0b movel %a3,%sp@-
5661c: 2f0a movel %a2,%sp@-
5661e: 4eb9 0004 f5bc jsr 4f5bc <fat_file_extend>
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
56624: 4fef 0014 lea %sp@(20),%sp
if (length < old_length) {
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
} else {
uint32_t new_length;
rc = fat_file_extend(&fs_info->fat,
56628: 2c00 movel %d0,%d6
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
5662a: 6630 bnes 5665c <msdos_file_ftruncate+0xba> <== NEVER TAKEN
5662c: 2a2e fffc movel %fp@(-4),%d5
56630: 4284 clrl %d4
56632: 2002 movel %d2,%d0
56634: 2203 movel %d3,%d1
56636: 9285 subl %d5,%d1
56638: 9184 subxl %d4,%d0
5663a: 6724 beqs 56660 <msdos_file_ftruncate+0xbe> <== ALWAYS TAKEN
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
5663c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
errno = ENOSPC;
rc = -1;
5663e: 7cff moveq #-1,%d6 <== NOT EXECUTED
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
56640: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56642: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56644: 4eb9 0004 f376 jsr 4f376 <fat_file_truncate> <== NOT EXECUTED
errno = ENOSPC;
5664a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
56650: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56654: 721c moveq #28,%d1 <== NOT EXECUTED
56656: 2040 moveal %d0,%a0 <== NOT EXECUTED
56658: 2081 movel %d1,%a0@ <== NOT EXECUTED
5665a: 6008 bras 56664 <msdos_file_ftruncate+0xc2> <== NOT EXECUTED
rc = -1;
}
}
if (rc == RC_OK) {
5665c: 4a86 tstl %d6 <== NOT EXECUTED
5665e: 6604 bnes 56664 <msdos_file_ftruncate+0xc2> <== NOT EXECUTED
fat_fd->fat_file_size = length;
56660: 2743 0018 movel %d3,%a3@(24)
}
rtems_semaphore_release(fs_info->vol_sema);
56664: 2f2a 0090 movel %a2@(144),%sp@-
56668: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return rc;
5666e: 588f addql #4,%sp
}
56670: 2006 movel %d6,%d0
56672: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
56678: 4e5e unlk %fp <== NOT EXECUTED
0005639a <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)
{
5639a: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
5639e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
563a2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
563a6: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
563aa: 242a 0018 movel %a2@(24),%d2 <== NOT EXECUTED
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;
563ae: 2668 0008 moveal %a0@(8),%a3 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
563b2: 42a7 clrl %sp@- <== NOT EXECUTED
563b4: 42a7 clrl %sp@- <== NOT EXECUTED
563b6: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
563ba: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
563c0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
563c4: 4a80 tstl %d0 <== NOT EXECUTED
563c6: 6710 beqs 563d8 <msdos_file_read+0x3e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
563c8: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
563ce: 78ff moveq #-1,%d4 <== NOT EXECUTED
563d0: 7205 moveq #5,%d1 <== NOT EXECUTED
563d2: 2040 moveal %d0,%a0 <== NOT EXECUTED
563d4: 2081 movel %d1,%a0@ <== NOT EXECUTED
563d6: 603e bras 56416 <msdos_file_read+0x7c> <== NOT EXECUTED
ret = fat_file_read(&fs_info->fat, fat_fd, iop->offset, count,
563d8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
563dc: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
563e0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
563e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
563e6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
563e8: 4eb9 0004 f206 jsr 4f206 <fat_file_read> <== NOT EXECUTED
buffer);
if (ret > 0)
563ee: 4fef 0014 lea %sp@(20),%sp <== 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);
ret = fat_file_read(&fs_info->fat, fat_fd, iop->offset, count,
563f2: 2800 movel %d0,%d4 <== NOT EXECUTED
buffer);
if (ret > 0)
563f4: 6f14 bles 5640a <msdos_file_read+0x70> <== NOT EXECUTED
iop->offset += ret;
563f6: 2600 movel %d0,%d3 <== NOT EXECUTED
563f8: 5bc2 smi %d2 <== NOT EXECUTED
563fa: 49c2 extbl %d2 <== NOT EXECUTED
563fc: d7aa 0008 addl %d3,%a2@(8) <== NOT EXECUTED
56400: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
56404: d182 addxl %d2,%d0 <== NOT EXECUTED
56406: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
5640a: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
5640e: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return ret;
56414: 588f addql #4,%sp <== NOT EXECUTED
}
56416: 2004 movel %d4,%d0 <== NOT EXECUTED
56418: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED
5641e: 4e5e unlk %fp <== NOT EXECUTED
000564e8 <msdos_file_stat>:
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
564e8: 4e56 fff0 linkw %fp,#-16
564ec: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
564f0: 2268 0014 moveal %a0@(20),%a1
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
564f4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
564f8: 2669 0008 moveal %a1@(8),%a3
fat_file_fd_t *fat_fd = loc->node_access;
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
564fc: 4282 clrl %d2
struct stat *buf
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
564fe: 2868 0008 moveal %a0@(8),%a4
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
56502: 342b 0006 movew %a3@(6),%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56506: 42a7 clrl %sp@-
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56508: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
5650c: 5382 subql #1,%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5650e: 42a7 clrl %sp@-
56510: 2f2b 0090 movel %a3@(144),%sp@-
56514: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5651a: 4fef 000c lea %sp@(12),%sp
5651e: 4a80 tstl %d0
56520: 6710 beqs 56532 <msdos_file_stat+0x4a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
56522: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
56528: 2040 moveal %d0,%a0 <== NOT EXECUTED
5652a: 7005 moveq #5,%d0 <== NOT EXECUTED
5652c: 2080 movel %d0,%a0@ <== NOT EXECUTED
5652e: 70ff moveq #-1,%d0 <== NOT EXECUTED
56530: 6066 bras 56598 <msdos_file_stat+0xb0> <== NOT EXECUTED
56532: 206b 005a moveal %a3@(90),%a0
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
56536: 2010 movel %a0@,%d0
56538: 2228 0004 movel %a0@(4),%d1
buf->st_ino = fat_fd->ino;
5653c: 256c 000c 0008 movel %a4@(12),%a2@(8)
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);
56542: 2480 movel %d0,%a2@
56544: 2541 0004 movel %d1,%a2@(4)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
56548: 223c 0000 81ff movel #33279,%d1
5654e: 2541 000c movel %d1,%a2@(12)
buf->st_rdev = 0ll;
56552: 4280 clrl %d0
56554: 4281 clrl %d1
56556: 2540 0016 movel %d0,%a2@(22)
5655a: 2541 001a movel %d1,%a2@(26)
buf->st_size = fat_fd->fat_file_size;
5655e: 222c 0018 movel %a4@(24),%d1
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
56562: 2002 movel %d2,%d0
56564: d481 addl %d1,%d2
56566: 4680 notl %d0
56568: c082 andl %d2,%d0
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
5656a: 2541 0022 movel %d1,%a2@(34)
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
>> FAT_SECTOR512_BITS;
5656e: 7209 moveq #9,%d1
56570: e2a8 lsrl %d1,%d0
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
56572: 2540 0042 movel %d0,%a2@(66)
>> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bpc;
56576: 4280 clrl %d0
56578: 302b 0006 movew %a3@(6),%d0
buf->st_mtime = fat_fd->mtime;
5657c: 256c 003e 002e movel %a4@(62),%a2@(46)
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
56582: 42aa 001e clrl %a2@(30)
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
>> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bpc;
56586: 2540 003e movel %d0,%a2@(62)
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
5658a: 2f2b 0090 movel %a3@(144),%sp@-
5658e: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return RC_OK;
56594: 588f addql #4,%sp
56596: 4280 clrl %d0
}
56598: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
5659e: 4e5e unlk %fp <== NOT EXECUTED
0005667c <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
5667c: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
56680: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
56684: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
56688: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
5668c: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56690: 42a7 clrl %sp@- <== NOT EXECUTED
56692: 42a7 clrl %sp@- <== NOT EXECUTED
56694: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
56698: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
5669e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
566a2: 4a80 tstl %d0 <== NOT EXECUTED
566a4: 6710 beqs 566b6 <msdos_file_sync+0x3a> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
566a6: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
566ac: 74ff moveq #-1,%d2 <== NOT EXECUTED
566ae: 2040 moveal %d0,%a0 <== NOT EXECUTED
566b0: 7005 moveq #5,%d0 <== NOT EXECUTED
566b2: 2080 movel %d0,%a0@ <== NOT EXECUTED
566b4: 602e bras 566e4 <msdos_file_sync+0x68> <== NOT EXECUTED
rc = msdos_file_update(iop);
566b6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
566b8: 4eba fc26 jsr %pc@(562e0 <msdos_file_update>) <== NOT EXECUTED
if (rc != RC_OK)
566bc: 588f addql #4,%sp <== 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);
rc = msdos_file_update(iop);
566be: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
566c0: 670e beqs 566d0 <msdos_file_sync+0x54> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
566c2: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
566c6: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
566cc: 588f addql #4,%sp <== NOT EXECUTED
566ce: 6014 bras 566e4 <msdos_file_sync+0x68> <== NOT EXECUTED
}
rc = fat_sync(&fs_info->fat);
566d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
566d2: 4eb9 0005 07ec jsr 507ec <fat_sync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
566d8: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
566dc: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
566e2: 508f addql #8,%sp <== NOT EXECUTED
}
566e4: 2002 movel %d2,%d0 <== NOT EXECUTED
566e6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
566ec: 4e5e unlk %fp <== NOT EXECUTED
000562e0 <msdos_file_update>:
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
562e0: 4e56 0000 linkw %fp,#0
562e4: 2f0b movel %a3,%sp@-
562e6: 2f0a movel %a2,%sp@-
562e8: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
562ec: 266a 0018 moveal %a2@(24),%a3
/*
* 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))
562f0: 102b 0030 moveb %a3@(48),%d0
562f4: 0800 0000 btst #0,%d0
562f8: 6634 bnes 5632e <msdos_file_update+0x4e> <== NEVER TAKEN
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
562fa: 2f0b movel %a3,%sp@-
562fc: 2f2a 0024 movel %a2@(36),%sp@-
56300: 4eb9 0005 3cf4 jsr 53cf4 <msdos_set_first_cluster_num>
if (rc != RC_OK)
56306: 508f addql #8,%sp
56308: 4a80 tstl %d0
5630a: 6624 bnes 56330 <msdos_file_update+0x50> <== NEVER TAKEN
{
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
5630c: 2f0b movel %a3,%sp@-
5630e: 2f2a 0024 movel %a2@(36),%sp@-
56312: 4eb9 0005 3da6 jsr 53da6 <msdos_set_file_size>
if (rc != RC_OK)
56318: 508f addql #8,%sp
5631a: 4a80 tstl %d0
5631c: 6612 bnes 56330 <msdos_file_update+0x50> <== NEVER TAKEN
{
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
5631e: 2f0b movel %a3,%sp@-
56320: 2f2a 0024 movel %a2@(36),%sp@-
56324: 4eb9 0005 3c1c jsr 53c1c <msdos_set_dir_wrt_time_and_date>
5632a: 508f addql #8,%sp
5632c: 6002 bras 56330 <msdos_file_update+0x50>
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
int rc = RC_OK;
5632e: 4280 clrl %d0 <== NOT EXECUTED
return rc;
}
}
return rc;
}
56330: 246e fff8 moveal %fp@(-8),%a2
56334: 266e fffc moveal %fp@(-4),%a3
56338: 4e5e unlk %fp <== NOT EXECUTED
00056422 <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)
{
56422: 4e56 ffe0 linkw %fp,#-32
56426: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
5642a: 246e 0008 moveal %fp@(8),%a2
ssize_t ret = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
5642e: 206a 0024 moveal %a2@(36),%a0
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
56432: 286a 0018 moveal %a2@(24),%a4
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;
56436: 2668 0008 moveal %a0@(8),%a3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5643a: 42a7 clrl %sp@-
5643c: 42a7 clrl %sp@-
5643e: 2f2b 0090 movel %a3@(144),%sp@-
56442: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
56448: 4fef 000c lea %sp@(12),%sp
5644c: 4a80 tstl %d0
5644e: 670e beqs 5645e <msdos_file_write+0x3c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
56450: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
56456: 7405 moveq #5,%d2 <== NOT EXECUTED
56458: 2040 moveal %d0,%a0 <== NOT EXECUTED
5645a: 2082 movel %d2,%a0@ <== NOT EXECUTED
5645c: 6042 bras 564a0 <msdos_file_write+0x7e> <== NOT EXECUTED
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
5645e: 202a 000c movel %a2@(12),%d0
56462: 0280 0000 0200 andil #512,%d0
56468: 670c beqs 56476 <msdos_file_write+0x54> <== ALWAYS TAKEN
iop->offset = fat_fd->fat_file_size;
5646a: 202c 0018 movel %a4@(24),%d0 <== NOT EXECUTED
5646e: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
56472: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
56476: 2f2e 000c movel %fp@(12),%sp@-
5647a: 2f2e 0010 movel %fp@(16),%sp@-
5647e: 2f2a 0008 movel %a2@(8),%sp@-
56482: 2f0c movel %a4,%sp@-
56484: 2f0b movel %a3,%sp@-
56486: 4eb9 0004 f79c jsr 4f79c <fat_file_write>
buffer);
if (ret < 0)
5648c: 4fef 0014 lea %sp@(20),%sp
rtems_set_errno_and_return_minus_one(EIO);
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
iop->offset = fat_fd->fat_file_size;
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
56490: 2c00 movel %d0,%d6
buffer);
if (ret < 0)
56492: 6c10 bges 564a4 <msdos_file_write+0x82> <== ALWAYS TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
56494: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
56498: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return -1;
5649e: 588f addql #4,%sp <== NOT EXECUTED
564a0: 7cff moveq #-1,%d6 <== NOT EXECUTED
564a2: 6038 bras 564dc <msdos_file_write+0xba> <== NOT EXECUTED
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
if (iop->offset > fat_fd->fat_file_size)
564a4: 2a2c 0018 movel %a4@(24),%d5
564a8: 4284 clrl %d4
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
564aa: 2600 movel %d0,%d3
564ac: 5bc2 smi %d2
564ae: 49c2 extbl %d2
564b0: 222a 0004 movel %a2@(4),%d1
564b4: d6aa 0008 addl %a2@(8),%d3
564b8: d581 addxl %d1,%d2
if (iop->offset > fat_fd->fat_file_size)
564ba: 2002 movel %d2,%d0
564bc: 2203 movel %d3,%d1
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
564be: 2542 0004 movel %d2,%a2@(4)
564c2: 2543 0008 movel %d3,%a2@(8)
if (iop->offset > fat_fd->fat_file_size)
564c6: 9285 subl %d5,%d1
564c8: 9184 subxl %d4,%d0
564ca: 6f04 bles 564d0 <msdos_file_write+0xae> <== ALWAYS TAKEN
fat_fd->fat_file_size = iop->offset;
564cc: 2943 0018 movel %d3,%a4@(24) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
564d0: 2f2b 0090 movel %a3@(144),%sp@-
564d4: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return ret;
564da: 588f addql #4,%sp
}
564dc: 2006 movel %d6,%d0
564de: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
564e4: 4e5e unlk %fp <== NOT EXECUTED
00055cb6 <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
55cb6: 4281 clrl %d1
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
{
55cb8: 4e56 fff0 linkw %fp,#-16
55cbc: 226e 0008 moveal %fp@(8),%a1
55cc0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
55cc4: 202e 000c movel %fp@(12),%d0
55cc8: 206e 0010 moveal %fp@(16),%a0
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
55ccc: 760b moveq #11,%d3
dn[i] = ' ';
55cce: 7420 moveq #32,%d2
55cd0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l)
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
55cd4: 5281 addql #1,%d1
55cd6: b681 cmpl %d1,%d3
55cd8: 66f2 bnes 55ccc <msdos_filename_unix2dos+0x16>
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
55cda: 742e moveq #46,%d2
55cdc: 1211 moveb %a1@,%d1
55cde: 49c1 extbl %d1
55ce0: b481 cmpl %d1,%d2
55ce2: 661c bnes 55d00 <msdos_filename_unix2dos+0x4a> <== ALWAYS TAKEN
55ce4: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
55ce8: b680 cmpl %d0,%d3 <== NOT EXECUTED
55cea: 6608 bnes 55cf4 <msdos_filename_unix2dos+0x3e> <== NOT EXECUTED
dn[0] = '.';
55cec: 10bc 002e moveb #46,%a0@ <== NOT EXECUTED
return 0;
55cf0: 6000 00c4 braw 55db6 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
55cf4: 742e moveq #46,%d2 <== NOT EXECUTED
55cf6: 1229 0001 moveb %a1@(1),%d1 <== NOT EXECUTED
55cfa: 49c1 extbl %d1 <== NOT EXECUTED
55cfc: b481 cmpl %d1,%d2 <== NOT EXECUTED
55cfe: 6704 beqs 55d04 <msdos_filename_unix2dos+0x4e> <== NOT EXECUTED
55d00: 2209 movel %a1,%d1
55d02: 6016 bras 55d1a <msdos_filename_unix2dos+0x64>
55d04: 7602 moveq #2,%d3 <== NOT EXECUTED
55d06: b680 cmpl %d0,%d3 <== NOT EXECUTED
55d08: 66f6 bnes 55d00 <msdos_filename_unix2dos+0x4a> <== NOT EXECUTED
dn[0] = '.';
dn[1] = '.';
55d0a: 702e moveq #46,%d0 <== NOT EXECUTED
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
dn[0] = '.';
55d0c: 10bc 002e moveb #46,%a0@ <== NOT EXECUTED
dn[1] = '.';
55d10: 1140 0001 moveb %d0,%a0@(1) <== NOT EXECUTED
return 0;
55d14: 6000 00a0 braw 55db6 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
unlen--;
55d18: 5380 subql #1,%d0 <== NOT EXECUTED
55d1a: 2241 moveal %d1,%a1
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
55d1c: 4a80 tstl %d0
55d1e: 660c bnes 55d2c <msdos_filename_unix2dos+0x76> <== ALWAYS TAKEN
55d20: 2409 movel %a1,%d2
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
55d22: 93c9 subal %a1,%a1
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
55d24: 45f9 0006 6164 lea 66164 <msdos_map>,%a2
55d2a: 6024 bras 55d50 <msdos_filename_unix2dos+0x9a>
55d2c: 5281 addql #1,%d1
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
55d2e: 762e moveq #46,%d3
55d30: 1411 moveb %a1@,%d2
55d32: 49c2 extbl %d2
55d34: b682 cmpl %d2,%d3
55d36: 67e0 beqs 55d18 <msdos_filename_unix2dos+0x62> <== NEVER TAKEN
55d38: 60e6 bras 55d20 <msdos_filename_unix2dos+0x6a>
* of string, a '.', or 8 characters. Whichever happens first stops
* us. This forms the name portion of the dos filename. Fold to
* upper case.
*/
for (i = 0; i <= 7 && unlen && (c = *un) && c != '.'; i++) {
if (msdos_map[c] == 0)
55d3a: 1632 3800 moveb %a2@(00000000,%d3:l),%d3
55d3e: 673c beqs 55d7c <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
break;
dn[i] = msdos_map[c];
un++;
55d40: 2642 moveal %d2,%a3
unlen--;
55d42: 5380 subql #1,%d0
* 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++) {
55d44: 7208 moveq #8,%d1
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
55d46: 1183 9800 moveb %d3,%a0@(00000000,%a1:l)
* 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++) {
55d4a: 5289 addql #1,%a1
55d4c: b289 cmpl %a1,%d1
55d4e: 672c beqs 55d7c <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
55d50: 2642 moveal %d2,%a3
55d52: 4a80 tstl %d0
55d54: 6726 beqs 55d7c <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
55d56: 5282 addql #1,%d2
55d58: 1613 moveb %a3@,%d3
55d5a: 6720 beqs 55d7c <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
55d5c: 722e moveq #46,%d1
55d5e: 0283 0000 00ff andil #255,%d3
55d64: b283 cmpl %d3,%d1
55d66: 66d2 bnes 55d3a <msdos_filename_unix2dos+0x84>
55d68: 6012 bras 55d7c <msdos_filename_unix2dos+0xc6>
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
55d6a: 2241 moveal %d1,%a1
unlen--;
55d6c: 5380 subql #1,%d0
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
55d6e: 762e moveq #46,%d3
55d70: 0282 0000 00ff andil #255,%d2
55d76: b682 cmpl %d2,%d3
55d78: 6604 bnes 55d7e <msdos_filename_unix2dos+0xc8> <== NEVER TAKEN
55d7a: 600e bras 55d8a <msdos_filename_unix2dos+0xd4>
55d7c: 220b movel %a3,%d1
55d7e: 2241 moveal %d1,%a1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
55d80: 4a80 tstl %d0
55d82: 6706 beqs 55d8a <msdos_filename_unix2dos+0xd4> <== NEVER TAKEN
55d84: 5281 addql #1,%d1
55d86: 1411 moveb %a1@,%d2
55d88: 66e0 bnes 55d6a <msdos_filename_unix2dos+0xb4> <== ALWAYS TAKEN
/*
* Convert a unix filename to a DOS filename. Return -1 if wrong name is
* supplied.
*/
int
msdos_filename_unix2dos(const char *un, int unlen, char *dn)
55d8a: 5088 addql #8,%a0
55d8c: 4281 clrl %d1
* Copy in the extension part of the name, if any. Force to upper
* case. Note that the extension is allowed to contain '.'s.
* Filenames in this form are probably inaccessable under dos.
*/
for (i = 8; i <= 10 && unlen && (c = *un); i++) {
if (msdos_map[c] == 0)
55d8e: 45f9 0006 6164 lea 66164 <msdos_map>,%a2
55d94: 6016 bras 55dac <msdos_filename_unix2dos+0xf6>
55d96: 0282 0000 00ff andil #255,%d2
55d9c: 1432 2800 moveb %a2@(00000000,%d2:l),%d2
55da0: 6714 beqs 55db6 <msdos_filename_unix2dos+0x100> <== NEVER TAKEN
55da2: 5281 addql #1,%d1
break;
dn[i] = msdos_map[c];
55da4: 10c2 moveb %d2,%a0@+
/*
* 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++) {
55da6: 7403 moveq #3,%d2
55da8: b481 cmpl %d1,%d2
55daa: 670a beqs 55db6 <msdos_filename_unix2dos+0x100>
55dac: b081 cmpl %d1,%d0
55dae: 6706 beqs 55db6 <msdos_filename_unix2dos+0x100> <== NEVER TAKEN
55db0: 1431 1800 moveb %a1@(00000000,%d1:l),%d2
55db4: 66e0 bnes 55d96 <msdos_filename_unix2dos+0xe0> <== ALWAYS TAKEN
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
55db6: 4280 clrl %d0
55db8: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3
55dbc: 4e5e unlk %fp <== NOT EXECUTED
00054bd4 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
54bd4: 4e56 ffb4 linkw %fp,#-76
54bd8: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
54bdc: 286e 0008 moveal %fp@(8),%a4
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);
54be0: 240e movel %fp,%d2
54be2: 0682 ffff ffe0 addil #-32,%d2
/*
* 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,
54be8: 260e movel %fp,%d3
54bea: 0683 ffff ffd0 addil #-48,%d3
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
54bf0: 206c 0014 moveal %a4@(20),%a0
54bf4: 2468 0008 moveal %a0@(8),%a2
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);
54bf8: 4878 0020 pea 20 <OPER2+0xc>
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
54bfc: 266e 000c moveal %fp@(12),%a3
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);
54c00: 42a7 clrl %sp@-
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
54c02: 282e 0010 movel %fp@(16),%d4
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);
54c06: 2f02 movel %d2,%sp@-
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;
54c08: 42ae ffcc clrl %fp@(-52)
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);
54c0c: 4eb9 0005 71d8 jsr 571d8 <memset>
name_type = msdos_long_to_short (name,
54c12: 4878 000b pea b <LASTO+0x1>
54c16: 2f02 movel %d2,%sp@-
54c18: 2f04 movel %d4,%sp@-
54c1a: 2f0b movel %a3,%sp@-
54c1c: 4eb9 0005 3a64 jsr 53a64 <msdos_long_to_short>
/*
* find the node which correspondes to the name in the directory pointed by
* 'parent_loc'
*/
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
54c22: 2f02 movel %d2,%sp@-
54c24: 2f03 movel %d3,%sp@-
54c26: 2f00 movel %d0,%sp@-
54c28: 2f04 movel %d4,%sp@-
54c2a: 2f0b movel %a3,%sp@-
54c2c: 42a7 clrl %sp@-
54c2e: 2f0c movel %a4,%sp@-
54c30: 4eb9 0005 4b04 jsr 54b04 <msdos_get_name_node>
&dir_pos, node_entry);
if (rc != RC_OK)
54c36: 4fef 0038 lea %sp@(56),%sp
/*
* 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,
54c3a: 2400 movel %d0,%d2
&dir_pos, node_entry);
if (rc != RC_OK)
54c3c: 6600 0160 bnew 54d9e <msdos_find_name+0x1ca>
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
54c40: 7208 moveq #8,%d1
54c42: 102e ffeb moveb %fp@(-21),%d0
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
54c46: 343c 7d01 movew #32001,%d2
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) ||
54c4a: c280 andl %d0,%d1
54c4c: 4a01 tstb %d1
54c4e: 6600 014e bnew 54d9e <msdos_find_name+0x1ca>
54c52: 723f moveq #63,%d1
54c54: c081 andl %d1,%d0
54c56: 123c 000f moveb #15,%d1
54c5a: b280 cmpl %d0,%d1
54c5c: 6700 0140 beqw 54d9e <msdos_find_name+0x1ca>
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
54c60: 486e ffcc pea %fp@(-52)
54c64: 2f03 movel %d3,%sp@-
54c66: 2f0a movel %a2,%sp@-
54c68: 4eb9 0004 f0b0 jsr 4f0b0 <fat_file_open>
if (rc != RC_OK)
54c6e: 4fef 000c lea %sp@(12),%sp
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
/* open fat-file corresponded to the found node */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
54c72: 2400 movel %d0,%d2
if (rc != RC_OK)
54c74: 6600 0128 bnew 54d9e <msdos_find_name+0x1ca>
return rc;
fat_fd->dir_pos = dir_pos;
54c78: 4878 0010 pea 10 <INVALID_OPERATION>
54c7c: 266e ffcc moveal %fp@(-52),%a3
54c80: 2f03 movel %d3,%sp@-
54c82: 486b 0020 pea %a3@(32)
54c86: 4eb9 0005 7168 jsr 57168 <memcpy>
* 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)
54c8c: 4fef 000c lea %sp@(12),%sp
54c90: 7001 moveq #1,%d0
54c92: b0ab 0008 cmpl %a3@(8),%d0
54c96: 6600 00e0 bnew 54d78 <msdos_find_name+0x1a4>
54c9a: 4281 clrl %d1
54c9c: 4282 clrl %d2
54c9e: 322e fff4 movew %fp@(-12),%d1
54ca2: 342e fffa movew %fp@(-6),%d2
54ca6: 2001 movel %d1,%d0
54ca8: e089 lsrl #8,%d1
54caa: e188 lsll #8,%d0
54cac: 8081 orl %d1,%d0
54cae: 2202 movel %d2,%d1
54cb0: e08a lsrl #8,%d2
54cb2: e189 lsll #8,%d1
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
54cb4: 4840 swap %d0
54cb6: 4240 clrw %d0
54cb8: 8282 orl %d2,%d1
54cba: 0281 0000 ffff andil #65535,%d1
54cc0: 8081 orl %d1,%d0
54cc2: 4281 clrl %d1
54cc4: 322e fff6 movew %fp@(-10),%d1
54cc8: 2740 001c movel %d0,%a3@(28)
54ccc: 2001 movel %d1,%d0
54cce: e089 lsrl #8,%d1
54cd0: e188 lsll #8,%d0
54cd2: 8081 orl %d1,%d0
54cd4: 4281 clrl %d1
54cd6: 322e fff8 movew %fp@(-8),%d1
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));
54cda: 3f00 movew %d0,%sp@-
54cdc: 2001 movel %d1,%d0
54cde: e089 lsrl #8,%d1
54ce0: e188 lsll #8,%d0
54ce2: 4267 clrw %sp@-
54ce4: 8081 orl %d1,%d0
54ce6: 3f00 movew %d0,%sp@-
54ce8: 4267 clrw %sp@-
54cea: 4eb9 0005 5bd0 jsr 55bd0 <msdos_date_dos2unix>
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
54cf0: 508f addql #8,%sp
54cf2: 7210 moveq #16,%d1
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
time_val = *MSDOS_DIR_WRITE_TIME(node_entry);
date = *MSDOS_DIR_WRITE_DATE(node_entry);
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
54cf4: 2740 003e movel %d0,%a3@(62)
54cf8: 266e ffcc moveal %fp@(-52),%a3
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
54cfc: 102e ffeb moveb %fp@(-21),%d0
54d00: c081 andl %d1,%d0
54d02: 4a00 tstb %d0
54d04: 672a beqs 54d30 <msdos_find_name+0x15c> <== ALWAYS TAKEN
{
fat_fd->fat_file_type = FAT_DIRECTORY;
54d06: 42ab 0010 clrl %a3@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
54d0a: 7020 moveq #32,%d0 <== NOT EXECUTED
54d0c: 4840 swap %d0 <== NOT EXECUTED
54d0e: 2740 0014 movel %d0,%a3@(20) <== NOT EXECUTED
rc = fat_file_size(&fs_info->fat, fat_fd);
54d12: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54d14: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54d16: 4eb9 0004 f9d6 jsr 4f9d6 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
54d1c: 508f addql #8,%sp <== NOT EXECUTED
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
rc = fat_file_size(&fs_info->fat, fat_fd);
54d1e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
54d20: 6728 beqs 54d4a <msdos_find_name+0x176> <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
54d22: 2f2e ffcc movel %fp@(-52),%sp@- <== NOT EXECUTED
54d26: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54d28: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
54d2e: 6064 bras 54d94 <msdos_find_name+0x1c0> <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
54d30: 2f2e fffc movel %fp@(-4),%sp@-
54d34: 4eba ecbe jsr %pc@(539f4 <m68k_swap_u32>)
54d38: 588f addql #4,%sp
fat_fd->fat_file_type = FAT_FILE;
54d3a: 7204 moveq #4,%d1
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
54d3c: 2740 0018 movel %d0,%a3@(24)
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
54d40: 70ff moveq #-1,%d0
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
fat_fd->fat_file_type = FAT_FILE;
54d42: 2741 0010 movel %d1,%a3@(16)
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
54d46: 2740 0014 movel %d0,%a3@(20)
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
54d4a: 206e ffcc moveal %fp@(-52),%a0
fat_fd->map.disk_cln = fat_fd->cln;
54d4e: 2028 001c movel %a0@(28),%d0
if ((fat_fd->fat_file_size != 0) &&
54d52: 2228 0018 movel %a0@(24),%d1
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;
54d56: 42a8 0032 clrl %a0@(50)
fat_fd->map.disk_cln = fat_fd->cln;
54d5a: 2140 0036 movel %d0,%a0@(54)
if ((fat_fd->fat_file_size != 0) &&
54d5e: 4a81 tstl %d1
54d60: 6710 beqs 54d72 <msdos_find_name+0x19e> <== ALWAYS TAKEN
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
54d62: 4282 clrl %d2 <== NOT EXECUTED
54d64: 342a 0006 movew %a2@(6),%d2 <== NOT EXECUTED
/* 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) &&
54d68: b481 cmpl %d1,%d2 <== NOT EXECUTED
54d6a: 6506 bcss 54d72 <msdos_find_name+0x19e> <== NOT EXECUTED
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
54d6c: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED
54d70: 6006 bras 54d78 <msdos_find_name+0x1a4> <== NOT EXECUTED
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
54d72: 72ff moveq #-1,%d1
54d74: 2141 003a movel %d1,%a0@(58)
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(&fs_info->fat, parent_loc->node_access);
54d78: 2f2c 0008 movel %a4@(8),%sp@-
54d7c: 47f9 0004 f462 lea 4f462 <fat_file_close>,%a3
54d82: 2f0a movel %a2,%sp@-
54d84: 4e93 jsr %a3@
if (rc != RC_OK)
54d86: 508f addql #8,%sp
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(&fs_info->fat, parent_loc->node_access);
54d88: 2400 movel %d0,%d2
if (rc != RC_OK)
54d8a: 670c beqs 54d98 <msdos_find_name+0x1c4> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
54d8c: 2f2e ffcc movel %fp@(-52),%sp@- <== NOT EXECUTED
54d90: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54d92: 4e93 jsr %a3@ <== NOT EXECUTED
54d94: 508f addql #8,%sp <== NOT EXECUTED
54d96: 6006 bras 54d9e <msdos_find_name+0x1ca> <== NOT EXECUTED
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
54d98: 296e ffcc 0008 movel %fp@(-52),%a4@(8)
return rc;
}
54d9e: 2002 movel %d2,%d0
54da0: 4cee 1c1c ffb4 moveml %fp@(-76),%d2-%d4/%a2-%a4
54da6: 4e5e unlk %fp <== NOT EXECUTED
00054022 <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
)
{
54022: 4e56 ff9c linkw %fp,#-100
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54026: 206e 0008 moveal %fp@(8),%a0
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5402a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
5402e: 122e 0013 moveb %fp@(19),%d1
54032: 266e 0020 moveal %fp@(32),%a3
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54036: 2468 0008 moveal %a0@(8),%a2
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5403a: 1d41 fff0 moveb %d1,%fp@(-16)
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
assert(name_len > 0);
5403e: 4aae 0018 tstl %fp@(24)
54042: 6e14 bgts 54058 <msdos_find_name_in_fat_file+0x36><== ALWAYS TAKEN
54044: 4879 0006 60e7 pea 660e7 <msdos_file_handlers+0xc3> <== NOT EXECUTED
5404a: 4879 0006 611d pea 6611d <__FUNCTION__.7675> <== NOT EXECUTED
54050: 4878 03c9 pea 3c9 <DBL_MANT_DIG+0x394> <== NOT EXECUTED
54054: 6000 00b0 braw 54106 <msdos_find_name_in_fat_file+0xe4><== 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;
54058: 74ff moveq #-1,%d2
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
5405a: 4293 clrl %a3@
dir_pos->sname.ofs = 0;
5405c: 42ab 0004 clrl %a3@(4)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
54060: 2742 0008 movel %d2,%a3@(8)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
54064: 2742 000c movel %d2,%a3@(12)
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
54068: 2d42 fffc movel %d2,%fp@(-4)
5406c: 2d42 fff8 movel %d2,%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))
54070: 4a2e fff0 tstb %fp@(-16)
54074: 6708 beqs 5407e <msdos_find_name_in_fat_file+0x5c>
54076: 7801 moveq #1,%d4
54078: b8ae 001c cmpl %fp@(28),%d4
5407c: 6714 beqs 54092 <msdos_find_name_in_fat_file+0x70><== ALWAYS TAKEN
lfn_entries = 0;
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
5407e: 2a6e 0018 moveal %fp@(24),%a5
54082: 4bed 000c lea %a5@(12),%a5
* test this make this test always fail, ie add "0 &&".
*/
if (create_node && (name_type == MSDOS_NAME_SHORT))
lfn_entries = 0;
else
lfn_entries =
54086: 2a0d movel %a5,%d5
54088: 7c0d moveq #13,%d6
5408a: 4c46 5805 remsl %d6,%d5,%d5
5408e: 2a45 moveal %d5,%a5
54090: 6002 bras 54094 <msdos_find_name_in_fat_file+0x72>
*
* 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))
lfn_entries = 0;
54092: 9bcd subal %a5,%a5
else
lfn_entries =
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
54094: 206e 000c moveal %fp@(12),%a0
54098: 7001 moveq #1,%d0
5409a: b0a8 0020 cmpl %a0@(32),%d0
5409e: 6618 bnes 540b8 <msdos_find_name_in_fat_file+0x96><== NEVER TAKEN
540a0: 4aa8 0024 tstl %a0@(36)
540a4: 6612 bnes 540b8 <msdos_find_name_in_fat_file+0x96><== NEVER TAKEN
540a6: 7203 moveq #3,%d1
540a8: 102a 000e moveb %a2@(14),%d0
540ac: c081 andl %d1,%d0
540ae: 4a00 tstb %d0
540b0: 6706 beqs 540b8 <msdos_find_name_in_fat_file+0x96><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
540b2: 2428 0018 movel %a0@(24),%d2
540b6: 6006 bras 540be <msdos_find_name_in_fat_file+0x9c>
else
bts2rd = fs_info->fat.vol.bpc;
540b8: 4282 clrl %d2 <== NOT EXECUTED
540ba: 342a 0006 movew %a2@(6),%d2 <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
540be: 41ed 0001 lea %a5@(1),%a0
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;
540c2: 4283 clrl %d3
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;
540c4: 4285 clrl %d5
char *name_dir_entry
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t dir_offset = 0;
540c6: 4287 clrl %d7
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;
540c8: 4204 clrb %d4
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;
540ca: 4206 clrb %d6
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(&fs_info->fat, fat_fd, (dir_offset * bts2rd),
540cc: 42ae ffe4 clrl %fp@(-28)
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;
540d0: 1d44 ffd6 moveb %d4,%fp@(-42)
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;
540d4: 42ae ffe8 clrl %fp@(-24)
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;
540d8: 1d46 ffdb moveb %d6,%fp@(-37)
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
540dc: 42ae ffec clrl %fp@(-20)
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
540e0: 2d48 ffce movel %a0,%fp@(-50)
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(&fs_info->fat, fat_fd, (dir_offset * bts2rd),
540e4: 6000 02c0 braw 543a6 <msdos_find_name_in_fat_file+0x384>
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)
540e8: 721f moveq #31,%d1
540ea: b280 cmpl %d0,%d1
540ec: 6d04 blts 540f2 <msdos_find_name_in_fat_file+0xd0><== ALWAYS TAKEN
540ee: 6000 0628 braw 54718 <msdos_find_name_in_fat_file+0x6f6><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
540f2: b480 cmpl %d0,%d2
540f4: 671c beqs 54112 <msdos_find_name_in_fat_file+0xf0><== ALWAYS TAKEN
540f6: 4879 0006 60f4 pea 660f4 <msdos_file_handlers+0xd0> <== NOT EXECUTED
540fc: 4879 0006 611d pea 6611d <__FUNCTION__.7675> <== NOT EXECUTED
54102: 4878 03f9 pea 3f9 <DBL_MANT_DIG+0x3c4> <== NOT EXECUTED
54106: 4879 0006 6085 pea 66085 <msdos_file_handlers+0x61> <== NOT EXECUTED
5410c: 4eb9 0005 1354 jsr 51354 <__assert_func> <== NOT EXECUTED
54112: 286a 0094 moveal %a2@(148),%a4
/* 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;
54116: 4284 clrl %d4
/*
* See if the entry is empty or the remainder of the directory is
* empty ? Localise to make the code read better.
*/
bool entry_empty = (*MSDOS_DIR_ENTRY_TYPE(entry) ==
54118: 1014 moveb %a4@,%d0
5411a: 3040 moveaw %d0,%a0
* 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)
5411c: 4a83 tstl %d3
5411e: 6608 bnes 54128 <msdos_find_name_in_fat_file+0x106><== NEVER TAKEN
54120: 2d44 ffe8 movel %d4,%fp@(-24)
54124: 2d47 ffec movel %d7,%fp@(-20)
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
54128: 3208 movew %a0,%d1
5412a: 4a01 tstb %d1
5412c: 6626 bnes 54154 <msdos_find_name_in_fat_file+0x132>
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
5412e: 4a2e fff0 tstb %fp@(-16)
54132: 660a bnes 5413e <msdos_find_name_in_fat_file+0x11c>
return MSDOS_NAME_NOT_FOUND_ERR;
54134: 263c 0000 7d01 movel #32001,%d3
5413a: 6000 0614 braw 54750 <msdos_find_name_in_fat_file+0x72e>
* 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)
5413e: 4a2e ffd6 tstb %fp@(-42)
54142: 6600 028a bnew 543ce <msdos_find_name_in_fat_file+0x3ac>
(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;
54146: 2002 movel %d2,%d0
54148: ea88 lsrl #5,%d0
* 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);
5414a: d680 addl %d0,%d3
5414c: ea8c lsrl #5,%d4
* 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 +=
5414e: 9684 subl %d4,%d3
54150: 6000 027c braw 543ce <msdos_find_name_in_fat_file+0x3ac>
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
54154: 4281 clrl %d1
54156: 3008 movew %a0,%d0
54158: 1200 moveb %d0,%d1
5415a: 0c81 0000 00e5 cmpil #229,%d1
54160: 6616 bnes 54178 <msdos_find_name_in_fat_file+0x156><== ALWAYS TAKEN
{
if (create_node)
54162: 4a2e fff0 tstb %fp@(-16) <== NOT EXECUTED
54166: 6700 0228 beqw 54390 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
5416a: 5283 addql #1,%d3 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
5416c: b6ae ffce cmpl %fp@(-50),%d3 <== NOT EXECUTED
54170: 6600 021e bnew 54390 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
54174: 6000 0210 braw 54386 <msdos_find_name_in_fat_file+0x364><== NOT EXECUTED
* 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)
54178: 4a2e fff0 tstb %fp@(-16)
5417c: 670c beqs 5418a <msdos_find_name_in_fat_file+0x168><== ALWAYS TAKEN
5417e: 4a2e ffd6 tstb %fp@(-42) <== NOT EXECUTED
54182: 6606 bnes 5418a <msdos_find_name_in_fat_file+0x168><== NOT EXECUTED
{
empty_space_entry = 0;
empty_space_count = 0;
54184: 4283 clrl %d3 <== NOT EXECUTED
* If empty space has not been found we need to start the
* count again.
*/
if (create_node && !empty_space_found)
{
empty_space_entry = 0;
54186: 42ae ffe8 clrl %fp@(-24) <== 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) ==
5418a: 703f moveq #63,%d0
5418c: 122c 000b moveb %a4@(11),%d1
54190: c280 andl %d0,%d1
54192: 103c 000f moveb #15,%d0
54196: b081 cmpl %d1,%d0
54198: 6600 0106 bnew 542a0 <msdos_find_name_in_fat_file+0x27e>
#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)
5419c: 72ff moveq #-1,%d1 <== NOT EXECUTED
5419e: b2ae fff8 cmpl %fp@(-8),%d1 <== NOT EXECUTED
541a2: 662c bnes 541d0 <msdos_find_name_in_fat_file+0x1ae><== NOT EXECUTED
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
541a4: 7240 moveq #64,%d1 <== NOT EXECUTED
541a6: 2c08 movel %a0,%d6 <== NOT EXECUTED
541a8: c286 andl %d6,%d1 <== NOT EXECUTED
541aa: 4a01 tstb %d1 <== NOT EXECUTED
541ac: 6700 01e0 beqw 5438e <msdos_find_name_in_fat_file+0x36c><== NOT EXECUTED
* 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) &
541b0: 2008 movel %a0,%d0 <== NOT EXECUTED
541b2: 723f moveq #63,%d1 <== NOT EXECUTED
541b4: c081 andl %d1,%d0 <== NOT EXECUTED
541b6: b08d cmpl %a5,%d0 <== NOT EXECUTED
541b8: 6600 01d4 bnew 5438e <msdos_find_name_in_fat_file+0x36c><== NOT EXECUTED
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
541bc: 2d47 fff8 movel %d7,%fp@(-8) <== NOT EXECUTED
lfn_start.ofs = dir_entry;
541c0: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
541c4: 1a2c 000d moveb %a4@(13),%d5 <== NOT EXECUTED
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_matched = false;
541c8: 4206 clrb %d6 <== NOT EXECUTED
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
lfn_start.ofs = dir_entry;
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
541ca: 1d45 ffdb moveb %d5,%fp@(-37) <== NOT EXECUTED
541ce: 2a0d movel %a5,%d5 <== 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_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
541d0: 723f moveq #63,%d1 <== NOT EXECUTED
541d2: 1014 moveb %a4@,%d0 <== NOT EXECUTED
541d4: c081 andl %d1,%d0 <== NOT EXECUTED
541d6: b085 cmpl %d5,%d0 <== NOT EXECUTED
541d8: 6610 bnes 541ea <msdos_find_name_in_fat_file+0x1c8><== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
541da: 4281 clrl %d1 <== NOT EXECUTED
541dc: 4280 clrl %d0 <== NOT EXECUTED
541de: 122e ffdb moveb %fp@(-37),%d1 <== NOT EXECUTED
541e2: 102c 000d moveb %a4@(13),%d0 <== NOT EXECUTED
541e6: b081 cmpl %d1,%d0 <== NOT EXECUTED
541e8: 670a beqs 541f4 <msdos_find_name_in_fat_file+0x1d2><== NOT EXECUTED
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
541ea: 70ff moveq #-1,%d0 <== NOT EXECUTED
541ec: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
continue;
541f0: 6000 019e braw 54390 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
}
lfn_entry--;
541f4: 2005 movel %d5,%d0 <== NOT EXECUTED
541f6: 5380 subql #1,%d0 <== NOT EXECUTED
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
541f8: 720d moveq #13,%d1 <== NOT EXECUTED
541fa: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
541fe: 41ec 0001 lea %a4@(1),%a0 <== NOT EXECUTED
54202: 226e 0014 moveal %fp@(20),%a1 <== NOT EXECUTED
54206: d3c1 addal %d1,%a1 <== NOT EXECUTED
54208: 2d48 ffdc movel %a0,%fp@(-36) <== NOT EXECUTED
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
5420c: 91c8 subal %a0,%a0 <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
5420e: 2d49 ffd2 movel %a1,%fp@(-46) <== NOT EXECUTED
{
#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')
54212: 226e ffdc moveal %fp@(-36),%a1 <== NOT EXECUTED
54216: 1c11 moveb %a1@,%d6 <== NOT EXECUTED
54218: 6610 bnes 5422a <msdos_find_name_in_fat_file+0x208><== NOT EXECUTED
/*
* 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) &&
5421a: bbc5 cmpal %d5,%a5 <== NOT EXECUTED
5421c: 6664 bnes 54282 <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
((o + i) != name_len))
5421e: 41f0 1800 lea %a0@(00000000,%d1:l),%a0 <== NOT EXECUTED
/*
* 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) &&
54222: b1ee 0018 cmpal %fp@(24),%a0 <== NOT EXECUTED
54226: 675a beqs 54282 <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
54228: 6028 bras 54252 <msdos_find_name_in_fat_file+0x230><== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
5422a: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 <== NOT EXECUTED
5422e: 2d49 ffe0 movel %a1,%fp@(-32) <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
54232: 226e 0018 moveal %fp@(24),%a1 <== NOT EXECUTED
54236: b3ee ffe0 cmpal %fp@(-32),%a1 <== NOT EXECUTED
5423a: 6f16 bles 54252 <msdos_find_name_in_fat_file+0x230><== NOT EXECUTED
5423c: 49c6 extbl %d6 <== NOT EXECUTED
5423e: 226e ffd2 moveal %fp@(-46),%a1 <== NOT EXECUTED
54242: 2d46 ffc6 movel %d6,%fp@(-58) <== NOT EXECUTED
54246: 1c31 8800 moveb %a1@(00000000,%a0:l),%d6 <== NOT EXECUTED
5424a: 49c6 extbl %d6 <== NOT EXECUTED
5424c: bcae ffc6 cmpl %fp@(-58),%d6 <== NOT EXECUTED
54250: 6708 beqs 5425a <msdos_find_name_in_fat_file+0x238><== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
54252: 72ff moveq #-1,%d1 <== NOT EXECUTED
54254: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED
break;
54258: 6028 bras 54282 <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
}
switch (i)
5425a: 7c04 moveq #4,%d6 <== NOT EXECUTED
5425c: bc88 cmpl %a0,%d6 <== NOT EXECUTED
5425e: 670a beqs 5426a <msdos_find_name_in_fat_file+0x248><== NOT EXECUTED
54260: 1c3c 000a moveb #10,%d6 <== NOT EXECUTED
54264: bc88 cmpl %a0,%d6 <== NOT EXECUTED
54266: 660e bnes 54276 <msdos_find_name_in_fat_file+0x254><== NOT EXECUTED
54268: 6006 bras 54270 <msdos_find_name_in_fat_file+0x24e><== NOT EXECUTED
{
case 4:
p += 5;
5426a: 5aae ffdc addql #5,%fp@(-36) <== NOT EXECUTED
break;
5426e: 600a bras 5427a <msdos_find_name_in_fat_file+0x258><== NOT EXECUTED
case 10:
p += 4;
54270: 58ae ffdc addql #4,%fp@(-36) <== NOT EXECUTED
break;
54274: 6004 bras 5427a <msdos_find_name_in_fat_file+0x258><== NOT EXECUTED
default:
p += 2;
54276: 54ae ffdc addql #2,%fp@(-36) <== NOT EXECUTED
p = entry + 1;
#if MSDOS_FIND_PRINT
printf ("MSFS:[5] lfne:%i\n", lfn_entry);
#endif
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
5427a: 5288 addql #1,%a0 <== NOT EXECUTED
5427c: 7c0d moveq #13,%d6 <== NOT EXECUTED
5427e: bc88 cmpl %a0,%d6 <== NOT EXECUTED
54280: 6690 bnes 54212 <msdos_find_name_in_fat_file+0x1f0><== NOT EXECUTED
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
54282: 4a80 tstl %d0 <== NOT EXECUTED
54284: 660e bnes 54294 <msdos_find_name_in_fat_file+0x272><== NOT EXECUTED
54286: 72ff moveq #-1,%d1 <== NOT EXECUTED
54288: b2ae fff8 cmpl %fp@(-8),%d1 <== NOT EXECUTED
5428c: 56c6 sne %d6 <== NOT EXECUTED
5428e: 49c6 extbl %d6 <== NOT EXECUTED
54290: 4486 negl %d6 <== NOT EXECUTED
54292: 6002 bras 54296 <msdos_find_name_in_fat_file+0x274><== NOT EXECUTED
54294: 4286 clrl %d6 <== NOT EXECUTED
54296: 7a01 moveq #1,%d5 <== NOT EXECUTED
54298: cc85 andl %d5,%d6 <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
5429a: 2a00 movel %d0,%d5 <== NOT EXECUTED
5429c: 6000 00f2 braw 54390 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
* 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)
542a0: 4a06 tstb %d6
542a2: 6700 049e beqw 54742 <msdos_find_name_in_fat_file+0x720>
* 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(
542a6: 43ec 000b lea %a4@(11),%a1 <== NOT EXECUTED
/* 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;
542aa: 204c moveal %a4,%a0 <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
542ac: 4200 clrb %d0 <== NOT EXECUTED
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;
542ae: 0800 0000 btst #0,%d0 <== NOT EXECUTED
542b2: 6704 beqs 542b8 <msdos_find_name_in_fat_file+0x296><== NOT EXECUTED
542b4: 7280 moveq #-128,%d1 <== NOT EXECUTED
542b6: 6002 bras 542ba <msdos_find_name_in_fat_file+0x298><== NOT EXECUTED
542b8: 4201 clrb %d1 <== NOT EXECUTED
542ba: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
542c0: 1c18 moveb %a0@+,%d6 <== NOT EXECUTED
542c2: e288 lsrl #1,%d0 <== NOT EXECUTED
542c4: d086 addl %d6,%d0 <== NOT EXECUTED
542c6: d081 addl %d1,%d0 <== NOT EXECUTED
{
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++)
542c8: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
542ca: 66e2 bnes 542ae <msdos_find_name_in_fat_file+0x28c><== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
542cc: 4a85 tstl %d5 <== NOT EXECUTED
542ce: 6600 0472 bnew 54742 <msdos_find_name_in_fat_file+0x720><== NOT EXECUTED
542d2: 4281 clrl %d1 <== NOT EXECUTED
542d4: 122e ffdb moveb %fp@(-37),%d1 <== NOT EXECUTED
542d8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
542de: b081 cmpl %d1,%d0 <== NOT EXECUTED
542e0: 6600 0460 bnew 54742 <msdos_find_name_in_fat_file+0x720><== NOT EXECUTED
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
542e4: 2f0b movel %a3,%sp@-
542e6: 2f2e ffe4 movel %fp@(-28),%sp@-
542ea: 4878 0001 pea 1 <ADD>
542ee: 4bf9 0004 f526 lea 4f526 <fat_file_ioctl>,%a5
542f4: 2f2e 000c movel %fp@(12),%sp@-
542f8: 2f0a movel %a2,%sp@-
542fa: 4e95 jsr %a5@
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
542fc: 4fef 0014 lea %sp@(20),%sp
#endif
/*
* We get the entry we looked for - fill the position
* structure and the 32 bytes of the short entry
*/
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
54300: 2600 movel %d0,%d3
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
54302: 6726 beqs 5432a <msdos_find_name_in_fat_file+0x308><== ALWAYS TAKEN
54304: 6000 044a braw 54750 <msdos_find_name_in_fat_file+0x72e><== NOT EXECUTED
* match a long file name against a short file name because
* a long file name that generates a matching short file
* name is not a long file name.
*/
if (lfn_matched ||
((name_type == MSDOS_NAME_SHORT) &&
54308: 7cff moveq #-1,%d6
5430a: bcae fff8 cmpl %fp@(-8),%d6
5430e: 666e bnes 5437e <msdos_find_name_in_fat_file+0x35c><== NEVER TAKEN
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
54310: 4878 000b pea b <LASTO+0x1>
54314: 2f2e 0024 movel %fp@(36),%sp@-
54318: 2f0c movel %a4,%sp@-
5431a: 4eb9 0005 70d8 jsr 570d8 <memcmp>
54320: 4fef 000c lea %sp@(12),%sp
* 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) &&
54324: 4a80 tstl %d0
54326: 6656 bnes 5437e <msdos_find_name_in_fat_file+0x35c><== NEVER TAKEN
54328: 60ba bras 542e4 <msdos_find_name_in_fat_file+0x2c2>
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
5432a: 202e fff8 movel %fp@(-8),%d0
5432e: 72ff moveq #-1,%d1
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
54330: 2744 0004 movel %d4,%a3@(4)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
54334: b280 cmpl %d0,%d1
54336: 6624 bnes 5435c <msdos_find_name_in_fat_file+0x33a><== NEVER TAKEN
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
54338: 276e fff8 0008 movel %fp@(-8),%a3@(8)
dir_pos->lname.ofs = lfn_start.ofs;
5433e: 276e fffc 000c movel %fp@(-4),%a3@(12)
memcpy(name_dir_entry, entry,
54344: 4878 0020 pea 20 <OPER2+0xc>
54348: 2f0c movel %a4,%sp@-
5434a: 2f2e 0024 movel %fp@(36),%sp@-
5434e: 4eb9 0005 7168 jsr 57168 <memcpy>
54354: 4fef 000c lea %sp@(12),%sp
54358: 6000 03f6 braw 54750 <msdos_find_name_in_fat_file+0x72e>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
5435c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
54360: 4c00 2800 mulsl %d0,%d2 <== NOT EXECUTED
54364: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54366: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5436a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5436e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54370: 4e95 jsr %a5@ <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
54372: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54376: 4a80 tstl %d0 <== NOT EXECUTED
54378: 6600 03c0 bnew 5473a <msdos_find_name_in_fat_file+0x718><== NOT EXECUTED
5437c: 60ba bras 54338 <msdos_find_name_in_fat_file+0x316><== NOT EXECUTED
memcpy(name_dir_entry, entry,
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
5437e: 7cff moveq #-1,%d6 <== NOT EXECUTED
54380: 2d46 fff8 movel %d6,%fp@(-8) <== NOT EXECUTED
54384: 6008 bras 5438e <msdos_find_name_in_fat_file+0x36c><== NOT EXECUTED
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
empty_space_found = true;
54386: 7201 moveq #1,%d1 <== NOT EXECUTED
54388: 1d41 ffd6 moveb %d1,%fp@(-42) <== NOT EXECUTED
5438c: 6002 bras 54390 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
* If we are not already processing a LFN see if this is
* the first entry of a LFN ?
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_matched = false;
5438e: 4206 clrb %d6 <== NOT EXECUTED
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)
54390: 0684 0000 0020 addil #32,%d4 <== NOT EXECUTED
54396: 49ec 0020 lea %a4@(32),%a4 <== 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;
5439a: b484 cmpl %d4,%d2 <== NOT EXECUTED
5439c: 6200 fd7a bhiw 54118 <msdos_find_name_in_fat_file+0xf6><== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
543a0: 5287 addql #1,%d7 <== NOT EXECUTED
543a2: d5ae ffe4 addl %d2,%fp@(-28) <== NOT EXECUTED
/*
* Scan the directory seeing if the file is present. While
* doing this see if a suitable location can be found to
* create the entry if the name is not found.
*/
while ((ret = fat_file_read(&fs_info->fat, fat_fd, (dir_offset * bts2rd),
543a6: 2f2a 0094 movel %a2@(148),%sp@-
543aa: 2f02 movel %d2,%sp@-
543ac: 2f2e ffe4 movel %fp@(-28),%sp@-
543b0: 2f2e 000c movel %fp@(12),%sp@-
543b4: 2f0a movel %a2,%sp@-
543b6: 4eb9 0004 f206 jsr 4f206 <fat_file_read>
543bc: 4fef 0014 lea %sp@(20),%sp
543c0: 4a80 tstl %d0
543c2: 6600 fd24 bnew 540e8 <msdos_find_name_in_fat_file+0xc6>
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
543c6: 4a2e fff0 tstb %fp@(-16) <== NOT EXECUTED
543ca: 6700 fd68 beqw 54134 <msdos_find_name_in_fat_file+0x112><== NOT EXECUTED
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
543ce: 7802 moveq #2,%d4
543d0: b8ae 001c cmpl %fp@(28),%d4
543d4: 6600 0088 bnew 5445e <msdos_find_name_in_fat_file+0x43c>
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
543d8: 202e ffec movel %fp@(-20),%d0 <== NOT EXECUTED
543dc: 4c02 0800 mulsl %d2,%d0 <== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
543e0: 7220 moveq #32,%d1 <== NOT EXECUTED
543e2: 226e 0024 moveal %fp@(36),%a1 <== NOT EXECUTED
* in this directory.
*/
lfn_checksum = 0;
if (name_type == MSDOS_NAME_LONG)
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
543e6: d0ae ffe8 addl %fp@(-24),%d0 <== NOT EXECUTED
543ea: ea88 lsrl #5,%d0 <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
543ec: 41f5 0801 lea %a5@(00000001,%d0:l),%a0 <== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
543f0: 1011 moveb %a1@,%d0 <== NOT EXECUTED
*/
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;
543f2: 2808 movel %a0,%d4 <== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
543f4: 49c0 extbl %d0 <== NOT EXECUTED
543f6: b280 cmpl %d0,%d1 <== NOT EXECUTED
543f8: 660a bnes 54404 <msdos_find_name_in_fat_file+0x3e2><== NOT EXECUTED
*c = '_';
543fa: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
543fe: 10bc 005f moveb #95,%a0@ <== NOT EXECUTED
54402: 6006 bras 5440a <msdos_find_name_in_fat_file+0x3e8><== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
54404: 722e moveq #46,%d1 <== NOT EXECUTED
54406: b280 cmpl %d0,%d1 <== NOT EXECUTED
54408: 67f0 beqs 543fa <msdos_find_name_in_fat_file+0x3d8><== NOT EXECUTED
5440a: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
5440e: 7220 moveq #32,%d1 <== NOT EXECUTED
54410: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED
54414: 49c0 extbl %d0 <== NOT EXECUTED
54416: b280 cmpl %d0,%d1 <== NOT EXECUTED
54418: 660c bnes 54426 <msdos_find_name_in_fat_file+0x404><== NOT EXECUTED
*c = '_';
5441a: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
5441e: 7a5f moveq #95,%d5 <== NOT EXECUTED
54420: 1145 0001 moveb %d5,%a0@(1) <== NOT EXECUTED
54424: 6006 bras 5442c <msdos_find_name_in_fat_file+0x40a><== NOT EXECUTED
{
static const char* hex = "0123456789ABCDEF";
char* c = MSDOS_DIR_NAME(sfn);
int i;
for (i = 0; i < 2; i++, c++)
if ((*c == ' ') || (*c == '.'))
54426: 722e moveq #46,%d1 <== NOT EXECUTED
54428: b280 cmpl %d0,%d1 <== NOT EXECUTED
5442a: 67ee beqs 5441a <msdos_find_name_in_fat_file+0x3f8><== NOT EXECUTED
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++)
5442c: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54430: 700c moveq #12,%d0 <== NOT EXECUTED
54432: 5488 addql #2,%a0 <== NOT EXECUTED
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
54434: 43f9 0006 5a56 lea 65a56 <null_ops+0x54>,%a1 <== NOT EXECUTED
5443a: 2204 movel %d4,%d1 <== NOT EXECUTED
5443c: e0a1 asrl %d0,%d1 <== NOT EXECUTED
5443e: 7a0f moveq #15,%d5 <== NOT EXECUTED
54440: 5980 subql #4,%d0 <== NOT EXECUTED
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++)
54442: 7cfc moveq #-4,%d6 <== NOT EXECUTED
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
54444: c285 andl %d5,%d1 <== NOT EXECUTED
54446: 10f1 1800 moveb %a1@(00000000,%d1:l),%a0@+ <== NOT EXECUTED
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++)
5444a: bc80 cmpl %d0,%d6 <== NOT EXECUTED
5444c: 66ec bnes 5443a <msdos_find_name_in_fat_file+0x418><== NOT EXECUTED
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
5444e: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54452: 707e moveq #126,%d0 <== NOT EXECUTED
54454: 1140 0006 moveb %d0,%a0@(6) <== NOT EXECUTED
*c++ = '1';
54458: 7031 moveq #49,%d0 <== NOT EXECUTED
5445a: 1140 0007 moveb %d0,%a0@(7) <== NOT EXECUTED
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)
5445e: 4a8d tstl %a5
54460: 673a beqs 5449c <msdos_find_name_in_fat_file+0x47a><== ALWAYS TAKEN
* 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(
54462: 226e 0024 moveal %fp@(36),%a1 <== NOT EXECUTED
54466: 43e9 000b lea %a1@(11),%a1 <== NOT EXECUTED
5446a: 4201 clrb %d1 <== NOT EXECUTED
5446c: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54470: 1d41 fff3 moveb %d1,%fp@(-13) <== NOT EXECUTED
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 =
54474: 182e fff3 moveb %fp@(-13),%d4 <== NOT EXECUTED
54478: 0804 0000 btst #0,%d4 <== NOT EXECUTED
5447c: 6704 beqs 54482 <msdos_find_name_in_fat_file+0x460><== NOT EXECUTED
5447e: 7280 moveq #-128,%d1 <== NOT EXECUTED
54480: 6002 bras 54484 <msdos_find_name_in_fat_file+0x462><== NOT EXECUTED
54482: 4201 clrb %d1 <== NOT EXECUTED
54484: 4280 clrl %d0 <== NOT EXECUTED
54486: 102e fff3 moveb %fp@(-13),%d0 <== NOT EXECUTED
5448a: e288 lsrl #1,%d0 <== NOT EXECUTED
5448c: 1818 moveb %a0@+,%d4 <== NOT EXECUTED
5448e: d084 addl %d4,%d0 <== NOT EXECUTED
54490: d081 addl %d1,%d0 <== NOT EXECUTED
54492: 1d40 fff3 moveb %d0,%fp@(-13) <== NOT EXECUTED
if (lfn_entries)
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
54496: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
54498: 66da bnes 54474 <msdos_find_name_in_fat_file+0x452><== NOT EXECUTED
5449a: 6006 bras 544a2 <msdos_find_name_in_fat_file+0x480><== NOT EXECUTED
* If a long file name calculate the checksum of the short file name
* data to place in each long file name entry. First set the short
* file name to the slot of the SFN entry. This will mean no clashes
* in this directory.
*/
lfn_checksum = 0;
5449c: 4206 clrb %d6
5449e: 1d46 fff3 moveb %d6,%fp@(-13)
* 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)
544a2: 4a83 tstl %d3
544a4: 670a beqs 544b0 <msdos_find_name_in_fat_file+0x48e><== NEVER TAKEN
uint32_t empty_space_offset = 0;
uint32_t empty_space_entry = 0;
uint32_t empty_space_count = 0;
bool empty_space_found = false;
uint32_t entries_per_block;
bool read_cluster = false;
544a6: beae ffec cmpl %fp@(-20),%d7
544aa: 56c0 sne %d0
544ac: 4480 negl %d0
544ae: 600a bras 544ba <msdos_find_name_in_fat_file+0x498>
* 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)
544b0: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED
{
read_cluster = true;
544b4: 7001 moveq #1,%d0 <== NOT EXECUTED
empty_space_offset = dir_offset;
empty_space_entry = 0;
544b6: 42ae ffe8 clrl %fp@(-24) <== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
544ba: 72ff moveq #-1,%d1
* 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(
544bc: 780d moveq #13,%d4
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
544be: 41ed 0001 lea %a5@(1),%a0
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
544c2: 4285 clrl %d5
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
544c4: 2d41 fffc movel %d1,%fp@(-4)
544c8: 262e ffec movel %fp@(-20),%d3
544cc: 4c02 3800 mulsl %d2,%d3
544d0: 2d41 fff8 movel %d1,%fp@(-8)
* 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(
544d4: 220d movel %a5,%d1
544d6: 4c04 1800 mulsl %d4,%d1
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
544da: 2d48 ffe4 movel %a0,%fp@(-28)
* 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(
544de: d2ae 0014 addl %fp@(20),%d1
544e2: 2d41 ffdc movel %d1,%fp@(-36)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
544e6: 6000 0248 braw 54730 <msdos_find_name_in_fat_file+0x70e>
{
int length = 0;
if (read_cluster)
544ea: 4a00 tstb %d0
544ec: 6700 009a beqw 54588 <msdos_find_name_in_fat_file+0x566>
{
uint32_t new_length;
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.1] eso:%li\n", empty_space_offset);
#endif
ret = fat_file_read(&fs_info->fat, fat_fd,
544f0: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
544f4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
544f6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
544f8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
544fc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
544fe: 4eb9 0004 f206 jsr 4f206 <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
54504: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54508: b480 cmpl %d0,%d2 <== NOT EXECUTED
5450a: 677c beqs 54588 <msdos_find_name_in_fat_file+0x566><== NOT EXECUTED
{
if (ret != FAT_EOF)
5450c: 4a80 tstl %d0 <== NOT EXECUTED
5450e: 670e beqs 5451e <msdos_find_name_in_fat_file+0x4fc><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
54510: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
54516: 7405 moveq #5,%d2 <== NOT EXECUTED
54518: 2240 moveal %d0,%a1 <== NOT EXECUTED
5451a: 2282 movel %d2,%a1@ <== NOT EXECUTED
5451c: 6064 bras 54582 <msdos_find_name_in_fat_file+0x560><== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.2] extending file:%li\n", empty_space_offset);
#endif
ret = fat_file_extend (&fs_info->fat, fat_fd, false,
5451e: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
54522: 2f03 movel %d3,%sp@- <== NOT EXECUTED
54524: 42a7 clrl %sp@- <== NOT EXECUTED
54526: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5452a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5452c: 4eb9 0004 f5bc jsr 4f5bc <fat_file_extend> <== NOT EXECUTED
empty_space_offset * bts2rd, &new_length);
if (ret != RC_OK)
54532: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54536: 4a80 tstl %d0 <== NOT EXECUTED
54538: 6600 0200 bnew 5473a <msdos_find_name_in_fat_file+0x718><== 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))
5453c: b6ae fff4 cmpl %fp@(-12),%d3 <== NOT EXECUTED
54540: 6702 beqs 54544 <msdos_find_name_in_fat_file+0x522><== NOT EXECUTED
54542: 6032 bras 54576 <msdos_find_name_in_fat_file+0x554><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
54544: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54546: 42a7 clrl %sp@- <== NOT EXECUTED
54548: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
5454c: 4eb9 0005 71d8 jsr 571d8 <memset> <== NOT EXECUTED
ret = fat_file_write(&fs_info->fat, fat_fd,
54552: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
54556: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54558: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5455a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5455e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54560: 4eb9 0004 f79c jsr 4f79c <fat_file_write> <== NOT EXECUTED
empty_space_offset * bts2rd,
bts2rd, fs_info->cl_buf);
#if MSDOS_FIND_PRINT
printf ("MSFS:[9.4] clear write: %d\n", ret);
#endif
if (ret == -1)
54566: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
5456a: 72ff moveq #-1,%d1 <== NOT EXECUTED
5456c: b280 cmpl %d0,%d1 <== NOT EXECUTED
5456e: 6700 01ca beqw 5473a <msdos_find_name_in_fat_file+0x718><== NOT EXECUTED
return ret;
else if (ret != bts2rd)
54572: b480 cmpl %d0,%d2 <== NOT EXECUTED
54574: 6712 beqs 54588 <msdos_find_name_in_fat_file+0x566><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
54576: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
5457c: 7205 moveq #5,%d1 <== NOT EXECUTED
5457e: 2040 moveal %d0,%a0 <== NOT EXECUTED
54580: 2081 movel %d1,%a0@ <== NOT EXECUTED
54582: 70ff moveq #-1,%d0 <== NOT EXECUTED
54584: 6000 01b4 braw 5473a <msdos_find_name_in_fat_file+0x718><== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
54588: 2805 movel %d5,%d4
5458a: 700d moveq #13,%d0
5458c: 4c00 5800 mulsl %d0,%d5
54590: 5284 addql #1,%d4
54592: 4287 clrl %d7
54594: 4286 clrl %d6
54596: 202e ffdc movel %fp@(-36),%d0
5459a: 9085 subl %d5,%d0
5459c: 0680 ffff fff3 addil #-13,%d0
545a2: 2d40 ffd6 movel %d0,%fp@(-42)
545a6: 6000 0130 braw 546d8 <msdos_find_name_in_fat_file+0x6b6>
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;
545aa: 286a 0094 moveal %a2@(148),%a4
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
545ae: 0686 0000 0020 addil #32,%d6
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;
545b4: d9c1 addal %d1,%a4
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
545b6: 2a04 movel %d4,%d5
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
545b8: b8ae ffe4 cmpl %fp@(-28),%d4
545bc: 6600 0082 bnew 54640 <msdos_find_name_in_fat_file+0x61e>
{
/* get current cluster number */
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
545c0: 2f0b movel %a3,%sp@-
545c2: 283c 0004 f526 movel #324902,%d4
545c8: 2f03 movel %d3,%sp@-
545ca: 4878 0001 pea 1 <ADD>
545ce: 2044 moveal %d4,%a0
545d0: 2f2e 000c movel %fp@(12),%sp@-
545d4: 2d41 ffca movel %d1,%fp@(-54)
545d8: 2f0a movel %a2,%sp@-
545da: 4e90 jsr %a0@
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
545dc: 222e ffca movel %fp@(-54),%d1
545e0: 4fef 0014 lea %sp@(20),%sp
545e4: 4a80 tstl %d0
545e6: 6600 0152 bnew 5473a <msdos_find_name_in_fat_file+0x718>
return rc;
dir_pos->sname.ofs = dir_entry;
545ea: 2741 0004 movel %d1,%a3@(4)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
545ee: 202e fff8 movel %fp@(-8),%d0
545f2: 72ff moveq #-1,%d1
545f4: b280 cmpl %d0,%d1
545f6: 6624 bnes 5461c <msdos_find_name_in_fat_file+0x5fa><== NEVER TAKEN
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
545f8: 276e fff8 0008 movel %fp@(-8),%a3@(8)
dir_pos->lname.ofs = lfn_start.ofs;
545fe: 276e fffc 000c movel %fp@(-4),%a3@(12)
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
54604: 4878 0020 pea 20 <OPER2+0xc>
54608: 2f2e 0024 movel %fp@(36),%sp@-
5460c: 2f0c movel %a4,%sp@-
5460e: 4eb9 0005 7168 jsr 57168 <memcpy>
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
54614: 4fef 000c lea %sp@(12),%sp
54618: 6000 00ce braw 546e8 <msdos_find_name_in_fat_file+0x6c6>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
5461c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
54620: 4c02 0800 mulsl %d2,%d0 <== NOT EXECUTED
54624: 2044 moveal %d4,%a0 <== NOT EXECUTED
54626: 2f00 movel %d0,%sp@- <== NOT EXECUTED
54628: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5462c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54630: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54632: 4e90 jsr %a0@ <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
54634: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54638: 4a80 tstl %d0 <== NOT EXECUTED
5463a: 67bc beqs 545f8 <msdos_find_name_in_fat_file+0x5d6><== NOT EXECUTED
5463c: 6000 00fc braw 5473a <msdos_find_name_in_fat_file+0x718><== NOT EXECUTED
* This is a long file name and we need to write
* a long file name entry. See if this is the
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
54640: 70ff moveq #-1,%d0 <== NOT EXECUTED
54642: b0ae fff8 cmpl %fp@(-8),%d0 <== NOT EXECUTED
54646: 660c bnes 54654 <msdos_find_name_in_fat_file+0x632><== NOT EXECUTED
{
lfn_start.cln = empty_space_offset;
54648: 2a2e ffec movel %fp@(-20),%d5 <== NOT EXECUTED
lfn_start.ofs = dir_entry;
5464c: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
* first entry written and if so remember the
* the location of the long file name.
*/
if (lfn_start.cln == FAT_FILE_SHORT_NAME)
{
lfn_start.cln = empty_space_offset;
54650: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
54654: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
54658: 42a7 clrl %sp@- <== NOT EXECUTED
5465a: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5465c: 4eb9 0005 71d8 jsr 571d8 <memset> <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
54662: 226e ffd6 moveal %fp@(-42),%a1 <== NOT EXECUTED
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
p = entry + 1;
54666: 41ec 0001 lea %a4@(1),%a0 <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
5466a: d3c7 addal %d7,%a1 <== NOT EXECUTED
5466c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*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++)
54670: 4280 clrl %d0 <== NOT EXECUTED
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
54672: 122e fff3 moveb %fp@(-13),%d1 <== NOT EXECUTED
54676: 1941 000d moveb %d1,%a4@(13) <== NOT EXECUTED
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
char fill = 0;
5467a: 4201 clrb %d1 <== NOT EXECUTED
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)
5467c: 1a11 moveb %a1@,%d5 <== NOT EXECUTED
5467e: 6706 beqs 54686 <msdos_find_name_in_fat_file+0x664><== NOT EXECUTED
{
*p = *n;
n++;
54680: 5289 addql #1,%a1 <== NOT EXECUTED
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
{
*p = *n;
54682: 1085 moveb %d5,%a0@ <== NOT EXECUTED
54684: 6008 bras 5468e <msdos_find_name_in_fat_file+0x66c><== NOT EXECUTED
n++;
}
else
{
p [0] = fill;
54686: 1081 moveb %d1,%a0@ <== NOT EXECUTED
p [1] = fill;
54688: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
fill = 0xff;
5468c: 50c1 st %d1 <== NOT EXECUTED
}
switch (i)
5468e: 7a04 moveq #4,%d5 <== NOT EXECUTED
54690: ba80 cmpl %d0,%d5 <== NOT EXECUTED
54692: 670a beqs 5469e <msdos_find_name_in_fat_file+0x67c><== NOT EXECUTED
54694: 1a3c 000a moveb #10,%d5 <== NOT EXECUTED
54698: ba80 cmpl %d0,%d5 <== NOT EXECUTED
5469a: 660a bnes 546a6 <msdos_find_name_in_fat_file+0x684><== NOT EXECUTED
5469c: 6004 bras 546a2 <msdos_find_name_in_fat_file+0x680><== NOT EXECUTED
{
case 4:
p += 5;
5469e: 5a88 addql #5,%a0 <== NOT EXECUTED
break;
546a0: 6006 bras 546a8 <msdos_find_name_in_fat_file+0x686><== NOT EXECUTED
case 10:
p += 4;
546a2: 5888 addql #4,%a0 <== NOT EXECUTED
break;
546a4: 6002 bras 546a8 <msdos_find_name_in_fat_file+0x686><== NOT EXECUTED
default:
p += 2;
546a6: 5488 addql #2,%a0 <== NOT EXECUTED
*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++)
546a8: 5280 addql #1,%d0 <== NOT EXECUTED
546aa: 7a0d moveq #13,%d5 <== NOT EXECUTED
546ac: ba80 cmpl %d0,%d5 <== NOT EXECUTED
546ae: 66cc bnes 5467c <msdos_find_name_in_fat_file+0x65a><== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
546b0: 202e ffe4 movel %fp@(-28),%d0 <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
546b4: 7201 moveq #1,%d1 <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
546b6: 9084 subl %d4,%d0 <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
546b8: b284 cmpl %d4,%d1 <== NOT EXECUTED
546ba: 6702 beqs 546be <msdos_find_name_in_fat_file+0x69c><== NOT EXECUTED
546bc: 6004 bras 546c2 <msdos_find_name_in_fat_file+0x6a0><== NOT EXECUTED
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
546be: 7a40 moveq #64,%d5 <== NOT EXECUTED
546c0: 8085 orl %d5,%d0 <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
546c2: 720f moveq #15,%d1 <== NOT EXECUTED
546c4: 5284 addql #1,%d4 <== NOT EXECUTED
546c6: 0687 ffff fff3 addil #-13,%d7 <== NOT EXECUTED
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
546cc: 1880 moveb %d0,%a4@ <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
546ce: 102c 000b moveb %a4@(11),%d0 <== NOT EXECUTED
546d2: 8081 orl %d1,%d0 <== NOT EXECUTED
546d4: 1940 000b moveb %d0,%a4@(11) <== NOT EXECUTED
* RC_OK on success, or error code if error occured (errno set
* appropriately)
*
*/
#define MSDOS_FIND_PRINT 0
int msdos_find_name_in_fat_file(
546d8: 222e ffe8 movel %fp@(-24),%d1
546dc: 2a04 movel %d4,%d5
546de: d286 addl %d6,%d1
546e0: 5385 subql #1,%d5
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
546e2: b481 cmpl %d1,%d2
546e4: 6200 fec4 bhiw 545aa <msdos_find_name_in_fat_file+0x588>
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
}
ret = fat_file_write(&fs_info->fat, fat_fd,
546e8: 282e ffe8 movel %fp@(-24),%d4
546ec: d8aa 0094 addl %a2@(148),%d4
546f0: 2f04 movel %d4,%sp@-
546f2: 206e ffe8 moveal %fp@(-24),%a0
546f6: 2f06 movel %d6,%sp@-
546f8: 4870 3800 pea %a0@(00000000,%d3:l)
546fc: 2f2e 000c movel %fp@(12),%sp@-
54700: 2f0a movel %a2,%sp@-
54702: 4eb9 0004 f79c jsr 4f79c <fat_file_write>
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
54708: 4fef 0014 lea %sp@(20),%sp
5470c: 72ff moveq #-1,%d1
5470e: b280 cmpl %d0,%d1
54710: 672c beqs 5473e <msdos_find_name_in_fat_file+0x71c><== NEVER TAKEN
54712: d682 addl %d2,%d3
return ret;
else if (ret != length)
54714: bc80 cmpl %d0,%d6
54716: 670e beqs 54726 <msdos_find_name_in_fat_file+0x704><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
54718: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
5471e: 2040 moveal %d0,%a0 <== NOT EXECUTED
54720: 7005 moveq #5,%d0 <== NOT EXECUTED
54722: 2080 movel %d0,%a0@ <== NOT EXECUTED
54724: 6018 bras 5473e <msdos_find_name_in_fat_file+0x71c><== NOT EXECUTED
empty_space_offset++;
54726: 52ae ffec addql #1,%fp@(-20)
empty_space_entry = 0;
read_cluster = true;
5472a: 7001 moveq #1,%d0
return ret;
else if (ret != length)
rtems_set_errno_and_return_minus_one(EIO);
empty_space_offset++;
empty_space_entry = 0;
5472c: 42ae ffe8 clrl %fp@(-24)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
54730: ba8d cmpl %a5,%d5
54732: 6f00 fdb6 blew 544ea <msdos_find_name_in_fat_file+0x4c8>
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
54736: 4283 clrl %d3
54738: 6016 bras 54750 <msdos_find_name_in_fat_file+0x72e>
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
{
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
5473a: 2600 movel %d0,%d3 <== NOT EXECUTED
5473c: 6012 bras 54750 <msdos_find_name_in_fat_file+0x72e><== NOT EXECUTED
}
ret = fat_file_write(&fs_info->fat, fat_fd,
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
5473e: 76ff moveq #-1,%d3 <== NOT EXECUTED
54740: 600e bras 54750 <msdos_find_name_in_fat_file+0x72e><== 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 ||
54742: 7001 moveq #1,%d0
54744: b0ae 001c cmpl %fp@(28),%d0
54748: 6600 fc34 bnew 5437e <msdos_find_name_in_fat_file+0x35c>
5474c: 6000 fbba braw 54308 <msdos_find_name_in_fat_file+0x2e6>
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
54750: 2003 movel %d3,%d0
54752: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
54758: 4e5e unlk %fp <== NOT EXECUTED
0005475c <msdos_find_node_by_cluster_num_in_fat_file>:
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) &&
5475c: 7001 moveq #1,%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
5475e: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54762: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
54766: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED
5476a: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
5476e: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54772: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
54776: b0ac 0020 cmpl %a4@(32),%d0 <== NOT EXECUTED
5477a: 6622 bnes 5479e <msdos_find_node_by_cluster_num_in_fat_file+0x42><== NOT EXECUTED
5477c: 4aac 0024 tstl %a4@(36) <== NOT EXECUTED
54780: 661c bnes 5479e <msdos_find_node_by_cluster_num_in_fat_file+0x42><== NOT EXECUTED
54782: 7203 moveq #3,%d1 <== NOT EXECUTED
54784: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
54788: c081 andl %d1,%d0 <== NOT EXECUTED
5478a: 4a00 tstb %d0 <== NOT EXECUTED
5478c: 6710 beqs 5479e <msdos_find_node_by_cluster_num_in_fat_file+0x42><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
5478e: 242c 0018 movel %a4@(24),%d2 <== NOT EXECUTED
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
54792: 4283 clrl %d3 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * bts2rd, bts2rd,
54794: 2a3c 0004 f206 movel #324102,%d5 <== NOT EXECUTED
5479a: 6000 00de braw 5487a <msdos_find_node_by_cluster_num_in_fat_file+0x11e><== NOT EXECUTED
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
5479e: 4282 clrl %d2 <== NOT EXECUTED
547a0: 342a 0006 movew %a2@(6),%d2 <== NOT EXECUTED
547a4: 60ec bras 54792 <msdos_find_node_by_cluster_num_in_fat_file+0x36><== NOT EXECUTED
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * bts2rd, bts2rd,
fs_info->cl_buf)) != FAT_EOF)
{
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
547a6: 721f moveq #31,%d1 <== NOT EXECUTED
547a8: b280 cmpl %d0,%d1 <== NOT EXECUTED
547aa: 6d14 blts 547c0 <msdos_find_node_by_cluster_num_in_fat_file+0x64><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
547ac: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
547b2: 7605 moveq #5,%d3 <== NOT EXECUTED
547b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
547b6: 347c ffff moveaw #-1,%a2 <== NOT EXECUTED
547ba: 2083 movel %d3,%a0@ <== NOT EXECUTED
547bc: 6000 00da braw 54898 <msdos_find_node_by_cluster_num_in_fat_file+0x13c><== NOT EXECUTED
assert(ret == bts2rd);
547c0: b480 cmpl %d0,%d2 <== NOT EXECUTED
547c2: 671c beqs 547e0 <msdos_find_node_by_cluster_num_in_fat_file+0x84><== NOT EXECUTED
547c4: 4879 0006 60f4 pea 660f4 <msdos_file_handlers+0xd0> <== NOT EXECUTED
547ca: 4879 0006 6139 pea 66139 <__FUNCTION__.7743> <== NOT EXECUTED
547d0: 4878 064e pea 64e <DBL_MAX_EXP+0x24d> <== NOT EXECUTED
547d4: 4879 0006 6085 pea 66085 <msdos_file_handlers+0x61> <== NOT EXECUTED
547da: 4eb9 0005 1354 jsr 51354 <__assert_func> <== NOT EXECUTED
547e0: 266a 0094 moveal %a2@(148),%a3 <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
547e4: 4284 clrl %d4 <== NOT EXECUTED
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
547e6: 1013 moveb %a3@,%d0 <== NOT EXECUTED
547e8: 6700 00aa beqw 54894 <msdos_find_node_by_cluster_num_in_fat_file+0x138><== NOT EXECUTED
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)) ==
547ec: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
547f2: 0c80 0000 00e5 cmpil #229,%d0 <== NOT EXECUTED
547f8: 676e beqs 54868 <msdos_find_node_by_cluster_num_in_fat_file+0x10c><== NOT EXECUTED
547fa: 4281 clrl %d1 <== NOT EXECUTED
547fc: 4286 clrl %d6 <== NOT EXECUTED
547fe: 322b 0014 movew %a3@(20),%d1 <== NOT EXECUTED
54802: 3c2b 001a movew %a3@(26),%d6 <== NOT EXECUTED
54806: 2001 movel %d1,%d0 <== NOT EXECUTED
54808: e089 lsrl #8,%d1 <== NOT EXECUTED
5480a: e188 lsll #8,%d0 <== NOT EXECUTED
5480c: 8081 orl %d1,%d0 <== NOT EXECUTED
5480e: 2206 movel %d6,%d1 <== NOT EXECUTED
54810: e08e lsrl #8,%d6 <== NOT EXECUTED
54812: e189 lsll #8,%d1 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
54814: 4840 swap %d0 <== NOT EXECUTED
54816: 4240 clrw %d0 <== NOT EXECUTED
54818: 8286 orl %d6,%d1 <== NOT EXECUTED
5481a: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
54820: 8081 orl %d1,%d0 <== NOT EXECUTED
54822: b0ae 0010 cmpl %fp@(16),%d0 <== NOT EXECUTED
54826: 6640 bnes 54868 <msdos_find_node_by_cluster_num_in_fat_file+0x10c><== NOT EXECUTED
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
54828: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5482a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5482c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
54830: 2f0c movel %a4,%sp@- <== NOT EXECUTED
54832: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54834: 4eb9 0004 f526 jsr 4f526 <fat_file_ioctl> <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
5483a: 4fef 0014 lea %sp@(20),%sp <== 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(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
5483e: 2440 moveal %d0,%a2 <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
54840: 4a80 tstl %d0 <== NOT EXECUTED
54842: 6654 bnes 54898 <msdos_find_node_by_cluster_num_in_fat_file+0x13c><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
54844: 70ff moveq #-1,%d0 <== NOT EXECUTED
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = i;
54846: 2b44 0004 movel %d4,%a5@(4) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
5484a: 2b40 0008 movel %d0,%a5@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5484e: 2b40 000c movel %d0,%a5@(12) <== NOT EXECUTED
memcpy(dir_entry, entry,
54852: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
54856: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54858: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
5485c: 4eb9 0005 7168 jsr 57168 <memcpy> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
54862: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
54866: 6030 bras 54898 <msdos_find_node_by_cluster_num_in_fat_file+0x13c><== NOT EXECUTED
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)
54868: 0684 0000 0020 addil #32,%d4 <== NOT EXECUTED
5486e: 47eb 0020 lea %a3@(32),%a3 <== NOT EXECUTED
54872: b484 cmpl %d4,%d2 <== NOT EXECUTED
54874: 6200 ff70 bhiw 547e6 <msdos_find_node_by_cluster_num_in_fat_file+0x8a><== NOT EXECUTED
54878: d682 addl %d2,%d3 <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * bts2rd, bts2rd,
5487a: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
5487e: 2045 moveal %d5,%a0 <== NOT EXECUTED
54880: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54882: 2f03 movel %d3,%sp@- <== NOT EXECUTED
54884: 2f0c movel %a4,%sp@- <== NOT EXECUTED
54886: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54888: 4e90 jsr %a0@ <== NOT EXECUTED
5488a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5488e: 4a80 tstl %d0 <== NOT EXECUTED
54890: 6600 ff14 bnew 547a6 <msdos_find_node_by_cluster_num_in_fat_file+0x4a><== 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;
54894: 347c 7d01 moveaw #32001,%a2 <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
54898: 200a movel %a2,%d0 <== NOT EXECUTED
5489a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
548a0: 4e5e unlk %fp <== NOT EXECUTED
0004b256 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b256: 4e56 fd20 linkw %fp,#-736
4b25a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
4b25e: 4879 0006 5c1f pea 65c1f <_CPU_m68k_BFFFO_table+0x140>
4b264: 47fa fdd6 lea %pc@(4b03c <msdos_format_printf>),%a3
4b268: 4878 0002 pea 2 <DOUBLE_FLOAT>
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b26c: 246e 000c moveal %fp@(12),%a2
4b270: 2c2e 0008 movel %fp@(8),%d6
msdos_format_param_t fmt_params;
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
4b274: 2f0a movel %a2,%sp@-
4b276: 4e93 jsr %a3@
fd = open(devname, O_RDWR);
4b278: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b27c: 2f06 movel %d6,%sp@-
4b27e: 4eb9 0004 4c34 jsr 44c34 <open>
if (fd == -1) {
4b284: 4fef 0014 lea %sp@(20),%sp
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
fd = open(devname, O_RDWR);
4b288: 2600 movel %d0,%d3
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
char tmp_sec[FAT_TOTAL_MBR_SIZE];
struct stat stat_buf;
int ret_val = 0;
4b28a: 70ff moveq #-1,%d0
4b28c: b083 cmpl %d3,%d0
4b28e: 57c2 seq %d2
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b290: 2f06 movel %d6,%sp@-
4b292: 4879 0006 5c2c pea 65c2c <_CPU_m68k_BFFFO_table+0x14d>
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
char tmp_sec[FAT_TOTAL_MBR_SIZE];
struct stat stat_buf;
int ret_val = 0;
4b298: 49c2 extbl %d2
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b29a: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b29e: 2f0a movel %a2,%sp@-
4b2a0: 4e93 jsr %a3@
"stat check: %s\n", devname);
if (ret_val == 0) {
4b2a2: 4fef 0010 lea %sp@(16),%sp
4b2a6: 4a82 tstl %d2
4b2a8: 6612 bnes 4b2bc <msdos_format+0x66> <== NEVER TAKEN
ret_val = fstat(fd, &stat_buf);
4b2aa: 486e fd6a pea %fp@(-662)
4b2ae: 2f03 movel %d3,%sp@-
4b2b0: 4eb9 0004 3fd4 jsr 43fd4 <fstat>
4b2b6: 508f addql #8,%sp
4b2b8: 2400 movel %d0,%d2
4b2ba: 6002 bras 4b2be <msdos_format+0x68>
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"stat check: %s\n", devname);
if (ret_val == 0) {
4b2bc: 74ff moveq #-1,%d2 <== NOT EXECUTED
ret_val = fstat(fd, &stat_buf);
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4b2be: 2f06 movel %d6,%sp@-
4b2c0: 4879 0006 5c3c pea 65c3c <_CPU_m68k_BFFFO_table+0x15d>
4b2c6: 49fa fd74 lea %pc@(4b03c <msdos_format_printf>),%a4
4b2ca: 4878 0001 pea 1 <ADD>
4b2ce: 2f0a movel %a2,%sp@-
4b2d0: 4e94 jsr %a4@
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
4b2d2: 4fef 0010 lea %sp@(16),%sp
4b2d6: 4a82 tstl %d2
4b2d8: 6600 0b78 bnew 4be52 <msdos_format+0xbfc>
4b2dc: 202e fd76 movel %fp@(-650),%d0
4b2e0: 0280 0000 f000 andil #61440,%d0
4b2e6: 0c80 0000 6000 cmpil #24576,%d0
4b2ec: 6700 0ad0 beqw 4bdbe <msdos_format+0xb68>
errno = ENOTTY;
4b2f0: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4b2f6: 7e19 moveq #25,%d7 <== NOT EXECUTED
4b2f8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b2fa: 2087 movel %d7,%a0@ <== NOT EXECUTED
4b2fc: 6000 0b82 braw 4be80 <msdos_format+0xc2a> <== NOT EXECUTED
static inline int rtems_disk_fd_get_block_count(
int fd,
rtems_blkdev_bnum *block_count
)
{
return ioctl(fd, RTEMS_BLKIO_GETSIZE, block_count);
4b300: 486b 0004 pea %a3@(4)
4b304: 2f3c 4004 4205 movel #1074020869,%sp@-
4b30a: 2f03 movel %d3,%sp@-
4b30c: 4e95 jsr %a5@
ret_val = rtems_disk_fd_get_media_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_count(fd, &fmt_params->totl_sector_cnt);
}
if (ret_val == 0) {
4b30e: 4fef 000c lea %sp@(12),%sp
4b312: 2400 movel %d0,%d2
4b314: 6600 0412 bnew 4b728 <msdos_format+0x4d2>
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
4b318: 222e fdb4 movel %fp@(-588),%d1
4b31c: 2401 movel %d1,%d2
4b31e: 4284 clrl %d4
4b320: 202e fdb0 movel %fp@(-592),%d0
4b324: 4c00 2800 mulsl %d0,%d2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b328: 2f02 movel %d2,%sp@-
}
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;
4b32a: 2a02 movel %d2,%d5
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b32c: 2f04 movel %d4,%sp@-
4b32e: 2f01 movel %d1,%sp@-
4b330: 2f00 movel %d0,%sp@-
4b332: 4879 0006 5c4b pea 65c4b <_CPU_m68k_BFFFO_table+0x16c>
4b338: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b33c: 2f0a movel %a2,%sp@-
4b33e: 4e94 jsr %a4@
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
4b340: 4fef 001c lea %sp@(28),%sp
4b344: 4a8a tstl %a2
4b346: 6706 beqs 4b34e <msdos_format+0xf8> <== NEVER TAKEN
(rqdata->fat_num == 0)) {
4b348: 202a 000c movel %a2@(12),%d0
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
4b34c: 6604 bnes 4b352 <msdos_format+0xfc>
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
4b34e: 7002 moveq #2,%d0
4b350: 6006 bras 4b358 <msdos_format+0x102>
}
else if (rqdata->fat_num <= 6) {
4b352: 7206 moveq #6,%d1
4b354: b280 cmpl %d0,%d1
4b356: 6508 bcss 4b360 <msdos_format+0x10a> <== NEVER TAKEN
fmt_params->fat_num = rqdata->fat_num;
4b358: 1d40 fde0 moveb %d0,%fp@(-544)
4b35c: 6000 0a92 braw 4bdf0 <msdos_format+0xb9a>
}
else {
errno = EINVAL;
4b360: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4b366: 7c16 moveq #22,%d6 <== NOT EXECUTED
ret_val = -1;
4b368: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
else if (rqdata->fat_num <= 6) {
fmt_params->fat_num = rqdata->fat_num;
}
else {
errno = EINVAL;
4b36a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b36c: 2086 movel %d6,%a0@ <== NOT EXECUTED
4b36e: 6000 03b8 braw 4b728 <msdos_format+0x4d2> <== NOT EXECUTED
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
4b372: 202a 0008 movel %a2@(8),%d0
4b376: 6608 bnes 4b380 <msdos_format+0x12a>
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
4b378: 7220 moveq #32,%d1
/*
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
4b37a: 103c 0008 moveb #8,%d0
4b37e: 6002 bras 4b382 <msdos_format+0x12c>
uint32_t fat16_sect_per_clust = 32;
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
4b380: 2200 movel %d0,%d1
fat12_sect_per_clust = rqdata->sectors_per_cluster;
fat16_sect_per_clust = rqdata->sectors_per_cluster;
}
if (fmt_params->totl_sector_cnt < FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
4b382: 243c 0000 0ff5 movel #4085,%d2
4b388: 4c02 0800 mulsl %d2,%d0
4b38c: 206e fdb4 moveal %fp@(-588),%a0
4b390: b088 cmpl %a0,%d0
4b392: 630e blss 4b3a2 <msdos_format+0x14c> <== NEVER TAKEN
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b394: 7e02 moveq #2,%d7
fat12_sect_per_clust = rqdata->sectors_per_cluster;
fat16_sect_per_clust = rqdata->sectors_per_cluster;
}
if (fmt_params->totl_sector_cnt < FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
fmt_params->fattype = FAT_FAT12;
4b396: 7c01 moveq #1,%d6
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b398: 2d47 fdbc movel %d7,%fp@(-580)
fat12_sect_per_clust = rqdata->sectors_per_cluster;
fat16_sect_per_clust = rqdata->sectors_per_cluster;
}
if (fmt_params->totl_sector_cnt < FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
fmt_params->fattype = FAT_FAT12;
4b39c: 1d46 fde2 moveb %d6,%fp@(-542)
4b3a0: 6054 bras 4b3f6 <msdos_format+0x1a0>
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt < FAT_FAT16_MAX_CLN * fat16_sect_per_clust) {
4b3a2: 203c 0000 fff5 movel #65525,%d0 <== NOT EXECUTED
4b3a8: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
4b3ac: b288 cmpl %a0,%d1 <== NOT EXECUTED
4b3ae: 630e blss 4b3be <msdos_format+0x168> <== NOT EXECUTED
fmt_params->fattype = FAT_FAT16;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b3b0: 7402 moveq #2,%d2 <== NOT EXECUTED
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt < FAT_FAT16_MAX_CLN * fat16_sect_per_clust) {
fmt_params->fattype = FAT_FAT16;
4b3b2: 7202 moveq #2,%d1 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b3b4: 2d42 fdbc movel %d2,%fp@(-580) <== NOT EXECUTED
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
}
else if (fmt_params->totl_sector_cnt < FAT_FAT16_MAX_CLN * fat16_sect_per_clust) {
fmt_params->fattype = FAT_FAT16;
4b3b8: 1d41 fde2 moveb %d1,%fp@(-542) <== NOT EXECUTED
4b3bc: 6038 bras 4b3f6 <msdos_format+0x1a0> <== 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;
4b3be: 7c1e moveq #30,%d6 <== NOT EXECUTED
4b3c0: 4280 clrl %d0 <== NOT EXECUTED
4b3c2: 223c 4000 0000 movel #1073741824,%d1 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
4b3c8: 7e04 moveq #4,%d7 <== 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;
4b3ca: d285 addl %d5,%d1 <== NOT EXECUTED
4b3cc: d184 addxl %d4,%d0 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
4b3ce: 1d47 fde2 moveb %d7,%fp@(-542) <== 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;
4b3d2: 2400 movel %d0,%d2 <== NOT EXECUTED
4b3d4: 2001 movel %d1,%d0 <== NOT EXECUTED
4b3d6: eca8 lsrl %d6,%d0 <== 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)
4b3d8: 1c3c 0001 moveb #1,%d6 <== 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;
4b3dc: e58a lsll #2,%d2 <== NOT EXECUTED
4b3de: 8480 orl %d0,%d2 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
4b3e0: 701f moveq #31,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4b3e2: 2206 movel %d6,%d1 <== NOT EXECUTED
4b3e4: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b3e6: c282 andl %d2,%d1 <== NOT EXECUTED
4b3e8: 6604 bnes 4b3ee <msdos_format+0x198> <== NOT EXECUTED
#define ONE_GB (1024L * 1024L * 1024L)
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
int b;
fmt_params->fattype = FAT_FAT32;
/* scale with the size of disk... */
for (b = 31; b > 0; b--)
4b3ea: 5380 subql #1,%d0 <== NOT EXECUTED
4b3ec: 66f4 bnes 4b3e2 <msdos_format+0x18c> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
4b3ee: 7201 moveq #1,%d1 <== NOT EXECUTED
4b3f0: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b3f2: 2d41 fdbc movel %d1,%fp@(-580) <== NOT EXECUTED
/*
* compute formatting parameters
*/
if (ret_val == 0) {
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
4b3f6: 2e0e movel %fp,%d7
4b3f8: 0687 ffff fdb0 addil #-592,%d7
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
}
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
4b3fe: 49fa fdf2 lea %pc@(4b1f2 <msdos_set_sectors_per_cluster_from_request>),%a4
/* 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;
4b402: 7c1e moveq #30,%d6
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
}
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
4b404: 2f07 movel %d7,%sp@-
4b406: 2f0a movel %a2,%sp@-
4b408: 4e94 jsr %a4@
/* 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;
4b40a: 508f addql #8,%sp
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
}
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
4b40c: 2400 movel %d0,%d2
/* 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;
4b40e: 4280 clrl %d0
4b410: 0685 4000 0000 addil #1073741824,%d5
4b416: d980 addxl %d0,%d4
4b418: 2204 movel %d4,%d1
4b41a: 2005 movel %d5,%d0
4b41c: eca8 lsrl %d6,%d0
4b41e: e589 lsll #2,%d1
4b420: 4204 clrb %d4
4b422: 2d41 fd5e movel %d1,%fp@(-674)
4b426: 50c1 st %d1
4b428: 81ae fd5e orl %d0,%fp@(-674)
4b42c: 1d44 fd65 moveb %d4,%fp@(-667)
4b430: 1d41 fd4d moveb %d1,%fp@(-691)
4b434: 6000 02d6 braw 4b70c <msdos_format+0x4b6>
&& fmt_params->fattype != fat_type
&& fmt_params->totl_sector_cnt > 0 ) {
/*
* Skip aligning structures or d align them
*/
if (ret_val == 0 && rqdata != NULL)
4b438: 4a8a tstl %a2
4b43a: 6706 beqs 4b442 <msdos_format+0x1ec> <== NEVER TAKEN
fmt_params->skip_alignment = rqdata->skip_alignment;
4b43c: 1d6a 0016 fdfe moveb %a2@(22),%fp@(-514)
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b442: 2f2e fdbc movel %fp@(-580),%sp@-
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
4b446: 7c04 moveq #4,%d6
*/
if (ret_val == 0 && rqdata != NULL)
fmt_params->skip_alignment = rqdata->skip_alignment;
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b448: 4879 0006 5c86 pea 65c86 <_CPU_m68k_BFFFO_table+0x1a7>
4b44e: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b452: 2f0a movel %a2,%sp@-
4b454: 4eba fbe6 jsr %pc@(4b03c <msdos_format_printf>)
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
4b458: 4fef 0010 lea %sp@(16),%sp
4b45c: 4280 clrl %d0
4b45e: 1a2e fde2 moveb %fp@(-542),%d5
4b462: 1d45 fd4d moveb %d5,%fp@(-691)
4b466: 1005 moveb %d5,%d0
4b468: bc80 cmpl %d0,%d6
4b46a: 6618 bnes 4b484 <msdos_format+0x22e> <== ALWAYS TAKEN
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
4b46c: 7e20 moveq #32,%d7 <== 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;
4b46e: 7006 moveq #6,%d0 <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4b470: 7201 moveq #1,%d1 <== 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;
4b472: 2d47 fdb8 movel %d7,%fp@(-584) <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
4b476: 42ae fdc8 clrl %fp@(-568) <== NOT EXECUTED
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
4b47a: 2d40 fdd8 movel %d0,%fp@(-552) <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4b47e: 2d41 fddc movel %d1,%fp@(-548) <== NOT EXECUTED
4b482: 6050 bras 4b4d4 <msdos_format+0x27e> <== NOT EXECUTED
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
4b484: 7801 moveq #1,%d4
4b486: 2d44 fdb8 movel %d4,%fp@(-584)
/* 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) &&
4b48a: 4a8a tstl %a2
4b48c: 670c beqs 4b49a <msdos_format+0x244> <== NEVER TAKEN
(rqdata->files_per_root_dir > 0)) {
4b48e: 202a 0010 movel %a2@(16),%d0
/* 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) &&
4b492: 6706 beqs 4b49a <msdos_format+0x244>
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
4b494: 2d40 fdc8 movel %d0,%fp@(-568)
4b498: 601e bras 4b4b8 <msdos_format+0x262>
}
else {
if (fmt_params->fattype == FAT_FAT16) {
4b49a: 4280 clrl %d0
4b49c: 102e fd4d moveb %fp@(-691),%d0
4b4a0: 7a02 moveq #2,%d5
4b4a2: ba80 cmpl %d0,%d5
4b4a4: 660c bnes 4b4b2 <msdos_format+0x25c> <== ALWAYS TAKEN
fmt_params->files_per_root_dir = 512;
4b4a6: 2c3c 0000 0200 movel #512,%d6 <== NOT EXECUTED
4b4ac: 2d46 fdc8 movel %d6,%fp@(-568) <== NOT EXECUTED
4b4b0: 6006 bras 4b4b8 <msdos_format+0x262> <== NOT EXECUTED
}
else {
fmt_params->files_per_root_dir = 64;
4b4b2: 7e40 moveq #64,%d7
4b4b4: 2d47 fdc8 movel %d7,%fp@(-568)
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4b4b8: 202e fdb0 movel %fp@(-592),%d0
4b4bc: d080 addl %d0,%d0
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
4b4be: 222e fdc8 movel %fp@(-568),%d1
(2*fmt_params->bytes_per_sector/
4b4c2: ea88 lsrl #5,%d0
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
4b4c4: 5381 subql #1,%d1
4b4c6: d280 addl %d0,%d1
(2*fmt_params->bytes_per_sector/
FAT_DIRENTRY_SIZE-1));
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
4b4c8: 2a01 movel %d1,%d5
4b4ca: 4c40 5004 remul %d0,%d4,%d5
4b4ce: 9284 subl %d4,%d1
4b4d0: 2d41 fdc8 movel %d1,%fp@(-568)
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
4b4d4: 2e2e fdc8 movel %fp@(-568),%d7
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
4b4d8: 4284 clrl %d4
4b4da: 182e fd4d moveb %fp@(-691),%d4
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4b4de: 2a3c 0000 8000 movel #32768,%d5
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
4b4e4: 2044 moveal %d4,%a0
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
4b4e6: 202e fdb0 movel %fp@(-592),%d0
4b4ea: 2840 moveal %d0,%a4
4b4ec: 538c subql #1,%a4
(2*fmt_params->bytes_per_sector
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
4b4ee: eb8f lsll #5,%d7
fmt_params->totl_sector_cnt,
fmt_params->rsvd_sector_cnt,
fmt_params->root_dir_sectors,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment,
4b4f0: 1c2e fdfe moveb %fp@(-514),%d6
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
4b4f4: 266e fdb8 moveal %fp@(-584),%a3
/FAT_DIRENTRY_SIZE));
}
fmt_params->root_dir_sectors =
(((fmt_params->files_per_root_dir * FAT_DIRENTRY_SIZE)
+ fmt_params->bytes_per_sector - 1)
4b4f8: de8c addl %a4,%d7
/ fmt_params->bytes_per_sector);
4b4fa: 4c40 7007 remul %d0,%d7,%d7
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
4b4fe: 222e fdbc movel %fp@(-580),%d1
}
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);
4b502: 2d47 fd48 movel %d7,%fp@(-696)
fmt_params->totl_sector_cnt,
fmt_params->rsvd_sector_cnt,
fmt_params->root_dir_sectors,
fmt_params->fat_num,
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment,
4b506: 1d46 fd67 moveb %d6,%fp@(-665)
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 =
4b50a: 2d47 fdcc movel %d7,%fp@(-564)
if (ret_val == 0) {
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
4b50e: 2e2e fdb4 movel %fp@(-588),%d7
4b512: 2d47 fd52 movel %d7,%fp@(-686)
fmt_params->bytes_per_sector,
fmt_params->totl_sector_cnt,
fmt_params->rsvd_sector_cnt,
fmt_params->root_dir_sectors,
fmt_params->fat_num,
4b516: 1c2e fde0 moveb %fp@(-544),%d6
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4b51a: 4c40 5005 remul %d0,%d5,%d5
4b51e: 6002 bras 4b522 <msdos_format+0x2cc>
sectors_per_cluster /= 2;
4b520: e289 lsrl #1,%d1 <== NOT EXECUTED
uint32_t fatdata_sect_cnt;
uint32_t fat_sectors_cnt;
/*
* ensure, that maximum cluster size (32KByte) is not exceeded
*/
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
4b522: b285 cmpl %d5,%d1
4b524: 62fa bhis 4b520 <msdos_format+0x2ca> <== NEVER TAKEN
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b526: 2a6e fd48 moveal %fp@(-696),%a5
4b52a: 43eb ffff lea %a3@(-1),%a1
4b52e: 538d subql #1,%a5
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
4b530: 0286 0000 00ff andil #255,%d6
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b536: 2d49 fd4e movel %a1,%fp@(-690)
4b53a: 2d4d fd56 movel %a5,%fp@(-682)
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
4b53e: 2d46 fd5a movel %d6,%fp@(-678)
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4b542: 4a2e fd67 tstb %fp@(-665)
4b546: 660e bnes 4b556 <msdos_format+0x300>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b548: 2a2e fd4e movel %fp@(-690),%d5
4b54c: 2801 movel %d1,%d4
4b54e: da81 addl %d1,%d5
4b550: 4484 negl %d4
4b552: c885 andl %d5,%d4
4b554: 6002 bras 4b558 <msdos_format+0x302>
else
return sectors;
4b556: 280b movel %a3,%d4
* compute number of data clusters for current data:
* - compute cluster count for data AND fat
* - compute storage size for FAT
* - subtract from total cluster count
*/
fatdata_sect_cnt = total_sector_cnt
4b558: 2c2e fd52 movel %fp@(-686),%d6
4b55c: 9c84 subl %d4,%d6
- loc_align_object (rsvd_sector_cnt, sectors_per_cluster, skip_alignment);
if (fattype == FAT_FAT12) {
4b55e: 7801 moveq #1,%d4
4b560: b888 cmpl %a0,%d4
4b562: 662e bnes 4b592 <msdos_format+0x33c> <== NEVER TAKEN
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4b564: 4a2e fd67 tstb %fp@(-665)
4b568: 6610 bnes 4b57a <msdos_format+0x324>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b56a: 226e fd56 moveal %fp@(-682),%a1
4b56e: 2a01 movel %d1,%d5
4b570: d3c1 addal %d1,%a1
4b572: 4485 negl %d5
4b574: 2e09 movel %a1,%d7
4b576: ca87 andl %d7,%d5
4b578: 6004 bras 4b57e <msdos_format+0x328>
else
return sectors;
4b57a: 2a2e fd48 movel %fp@(-696),%d5
* - subtract from total cluster count
*/
fatdata_sect_cnt = total_sector_cnt
- loc_align_object (rsvd_sector_cnt, sectors_per_cluster, skip_alignment);
if (fattype == FAT_FAT12) {
fatdata_sect_cnt = fatdata_sect_cnt
4b57e: 2806 movel %d6,%d4
4b580: 9885 subl %d5,%d4
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
4b582: 4c41 4004 remul %d1,%d4,%d4
fat_capacity = fatdata_cluster_cnt * 3 / 2;
4b586: 2244 moveal %d4,%a1
4b588: 43f1 4a00 lea %a1@(00000000,%d4:l:2),%a1
4b58c: 2a09 movel %a1,%d5
4b58e: e28d lsrl #1,%d5
4b590: 6038 bras 4b5ca <msdos_format+0x374>
}
else if (fattype == FAT_FAT16) {
4b592: 7802 moveq #2,%d4 <== NOT EXECUTED
4b594: b888 cmpl %a0,%d4 <== NOT EXECUTED
4b596: 6628 bnes 4b5c0 <msdos_format+0x36a> <== NOT EXECUTED
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4b598: 4a2e fd67 tstb %fp@(-665) <== NOT EXECUTED
4b59c: 6610 bnes 4b5ae <msdos_format+0x358> <== NOT EXECUTED
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b59e: 226e fd56 moveal %fp@(-682),%a1 <== NOT EXECUTED
4b5a2: 2a01 movel %d1,%d5 <== NOT EXECUTED
4b5a4: d3c1 addal %d1,%a1 <== NOT EXECUTED
4b5a6: 4485 negl %d5 <== NOT EXECUTED
4b5a8: 2e09 movel %a1,%d7 <== NOT EXECUTED
4b5aa: ca87 andl %d7,%d5 <== NOT EXECUTED
4b5ac: 6004 bras 4b5b2 <msdos_format+0x35c> <== NOT EXECUTED
else
return sectors;
4b5ae: 2a2e fd48 movel %fp@(-696),%d5 <== NOT EXECUTED
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
fatdata_sect_cnt = fatdata_sect_cnt
4b5b2: 2806 movel %d6,%d4 <== NOT EXECUTED
4b5b4: 9885 subl %d5,%d4 <== NOT EXECUTED
- loc_align_object (root_dir_sector_cnt, sectors_per_cluster, skip_alignment);
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
4b5b6: 4c41 4004 remul %d1,%d4,%d4 <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 2;
4b5ba: 2a04 movel %d4,%d5 <== NOT EXECUTED
4b5bc: da85 addl %d5,%d5 <== NOT EXECUTED
4b5be: 600a bras 4b5ca <msdos_format+0x374> <== NOT EXECUTED
}
else { /* FAT32 */
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
4b5c0: 2806 movel %d6,%d4 <== NOT EXECUTED
4b5c2: 4c41 4004 remul %d1,%d4,%d4 <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 4;
4b5c6: 2a04 movel %d4,%d5 <== NOT EXECUTED
4b5c8: e58d lsll #2,%d5 <== NOT EXECUTED
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4b5ca: da8c addl %a4,%d5
else { /* FAT32 */
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
4b5cc: 4c40 5005 remul %d0,%d5,%d5
+ (bytes_per_sector - 1))
/ bytes_per_sector);
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
4b5d0: 2e2e fd5a movel %fp@(-678),%d7
4b5d4: 4c07 5800 mulsl %d7,%d5
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4b5d8: 4a2e fd67 tstb %fp@(-665)
4b5dc: 660e bnes 4b5ec <msdos_format+0x396>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b5de: 2241 moveal %d1,%a1
4b5e0: 2c01 movel %d1,%d6
4b5e2: 4486 negl %d6
4b5e4: 43f1 58ff lea %a1@(ffffffff,%d5:l),%a1
4b5e8: 2a09 movel %a1,%d5
4b5ea: ca86 andl %d6,%d5
sectors_per_cluster,
skip_alignment);
*data_cluster_cnt = (fatdata_cluster_cnt -
((fat_sectors_cnt
+ (sectors_per_cluster - 1))
4b5ec: 2a41 moveal %d1,%a5
4b5ee: 43f5 58ff lea %a5@(ffffffff,%d5:l),%a1
/ sectors_per_cluster));
4b5f2: 2c09 movel %a1,%d6
4b5f4: 4c41 6006 remul %d1,%d6,%d6
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
sectors_per_cluster,
skip_alignment);
*data_cluster_cnt = (fatdata_cluster_cnt -
4b5f8: 9886 subl %d6,%d4
4b5fa: 2244 moveal %d4,%a1
+ (sectors_per_cluster - 1))
/ sectors_per_cluster));
/*
* data cluster count too big? Then make clusters bigger
*/
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
4b5fc: 7801 moveq #1,%d4
4b5fe: b888 cmpl %a0,%d4
4b600: 660a bnes 4b60c <msdos_format+0x3b6> <== NEVER TAKEN
4b602: b3fc 0000 0ff5 cmpal #4085,%a1
4b608: 6210 bhis 4b61a <msdos_format+0x3c4> <== NEVER TAKEN
4b60a: 6018 bras 4b624 <msdos_format+0x3ce>
4b60c: 7c02 moveq #2,%d6 <== NOT EXECUTED
4b60e: bc88 cmpl %a0,%d6 <== NOT EXECUTED
4b610: 6622 bnes 4b634 <msdos_format+0x3de> <== NOT EXECUTED
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
4b612: b3fc 0000 fff5 cmpal #65525,%a1 <== NOT EXECUTED
4b618: 631a blss 4b634 <msdos_format+0x3de> <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if (fattype == FAT_FAT12) {
4b61a: 7e01 moveq #1,%d7 <== NOT EXECUTED
/*
* data cluster count too big? Then make clusters bigger
*/
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
4b61c: d281 addl %d1,%d1 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if (fattype == FAT_FAT12) {
4b61e: 4204 clrb %d4 <== NOT EXECUTED
4b620: be88 cmpl %a0,%d7 <== NOT EXECUTED
4b622: 6612 bnes 4b636 <msdos_format+0x3e0> <== NOT EXECUTED
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
4b624: 2c01 movel %d1,%d6
4b626: 4c00 6800 mulsl %d0,%d6
4b62a: 0c86 0000 1000 cmpil #4096,%d6
4b630: 6218 bhis 4b64a <msdos_format+0x3f4> <== NEVER TAKEN
4b632: 6010 bras 4b644 <msdos_format+0x3ee>
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
}
else {
finished = true;
4b634: 7801 moveq #1,%d4 <== NOT EXECUTED
*/
if (fattype == FAT_FAT12) {
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
finished = true;
}
} else if ((sectors_per_cluster * bytes_per_sector)
4b636: 2e01 movel %d1,%d7 <== NOT EXECUTED
4b638: 4c00 7800 mulsl %d0,%d7 <== NOT EXECUTED
4b63c: 0c87 0000 8000 cmpil #32768,%d7 <== NOT EXECUTED
4b642: 6206 bhis 4b64a <msdos_format+0x3f4> <== NOT EXECUTED
> MS_BYTES_PER_CLUSTER_LIMIT) {
finished = true;
}
} while (!finished);
4b644: 4a04 tstb %d4
4b646: 6700 fefa beqw 4b542 <msdos_format+0x2ec>
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
4b64a: 2c2e fd5a movel %fp@(-678),%d6
4b64e: 4c46 5005 remul %d6,%d5,%d5
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment,
§ors_per_cluster_adj,
&fmt_params->sectors_per_fat,
&data_clusters_cnt);
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4b652: 2d41 fdbc movel %d1,%fp@(-580)
finished = true;
}
} while (!finished);
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
4b656: 2d45 fdc0 movel %d5,%fp@(-576)
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
4b65a: b3fc 0000 0ff4 cmpal #4084,%a1
4b660: 6210 bhis 4b672 <msdos_format+0x41c> <== NEVER TAKEN
static uint8_t
msdos_get_fat_type( const uint32_t bytes_per_sector,
const uint32_t sectors_per_cluster,
const uint32_t number_of_clusters )
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
4b662: 283c 0000 1001 movel #4097,%d4
4b668: 4c40 4004 remul %d0,%d4,%d4
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
4b66c: b881 cmpl %d1,%d4
4b66e: 650e bcss 4b67e <msdos_format+0x428> <== NEVER TAKEN
4b670: 601e bras 4b690 <msdos_format+0x43a>
fattype = FAT_FAT12;
}
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
4b672: b3fc 0000 fff4 cmpal #65524,%a1 <== NOT EXECUTED
4b678: 6304 blss 4b67e <msdos_format+0x428> <== NOT EXECUTED
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
4b67a: 7004 moveq #4,%d0 <== NOT EXECUTED
4b67c: 6014 bras 4b692 <msdos_format+0x43c> <== NOT EXECUTED
const uint32_t sectors_per_cluster,
const uint32_t number_of_clusters )
{
uint32_t ms_sectors_per_cluster_limit_FAT12 =
( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
uint32_t ms_sectors_per_cluster_limit_FAT16 =
4b67e: 2e3c 0000 8001 movel #32769,%d7 <== NOT EXECUTED
4b684: 4c40 7007 remul %d0,%d7,%d7 <== NOT EXECUTED
if ( number_of_clusters < FAT_FAT12_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
fattype = FAT_FAT12;
}
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT16 ) {
4b688: be81 cmpl %d1,%d7 <== NOT EXECUTED
4b68a: 65ee bcss 4b67a <msdos_format+0x424> <== NOT EXECUTED
fattype = FAT_FAT16;
4b68c: 7002 moveq #2,%d0 <== NOT EXECUTED
4b68e: 6002 bras 4b692 <msdos_format+0x43c> <== NOT EXECUTED
( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
uint8_t fattype = FAT_FAT32;
if ( number_of_clusters < FAT_FAT12_MAX_CLN
&& sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
fattype = FAT_FAT12;
4b690: 7001 moveq #1,%d0
fmt_params->fattype = msdos_get_fat_type(
fmt_params->bytes_per_sector,
fmt_params->sectors_per_cluster,
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
4b692: 4284 clrl %d4
4b694: 182e fd4d moveb %fp@(-691),%d4
4b698: 4281 clrl %d1
4b69a: 1200 moveb %d0,%d1
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
fat_type = fmt_params->fattype;
/* Correct the FAT type according to the new data cluster count */
if ( ret_val == 0 ) {
fmt_params->fattype = msdos_get_fat_type(
4b69c: 1d40 fde2 moveb %d0,%fp@(-542)
fmt_params->bytes_per_sector,
fmt_params->sectors_per_cluster,
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
4b6a0: b284 cmpl %d4,%d1
4b6a2: 673e beqs 4b6e2 <msdos_format+0x48c> <== ALWAYS TAKEN
msdos_set_default_sectors_per_cluster_for_fattype(
msdos_format_param_t *fmt_params,
const uint64_t total_size )
{
if ( fmt_params->fattype == FAT_FAT12
|| fmt_params->fattype == FAT_FAT16 ) {
4b6a4: 5380 subql #1,%d0 <== NOT EXECUTED
static void
msdos_set_default_sectors_per_cluster_for_fattype(
msdos_format_param_t *fmt_params,
const uint64_t total_size )
{
if ( fmt_params->fattype == FAT_FAT12
4b6a6: 7201 moveq #1,%d1 <== NOT EXECUTED
4b6a8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
4b6ae: b280 cmpl %d0,%d1 <== NOT EXECUTED
4b6b0: 6508 bcss 4b6ba <msdos_format+0x464> <== NOT EXECUTED
|| fmt_params->fattype == FAT_FAT16 ) {
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b6b2: 7402 moveq #2,%d2 <== NOT EXECUTED
4b6b4: 2d42 fdbc movel %d2,%fp@(-580) <== NOT EXECUTED
4b6b8: 601a bras 4b6d4 <msdos_format+0x47e> <== NOT EXECUTED
static void
msdos_set_default_sectors_per_cluster_for_fattype(
msdos_format_param_t *fmt_params,
const uint64_t total_size )
{
if ( fmt_params->fattype == FAT_FAT12
4b6ba: 701f moveq #31,%d0 <== NOT EXECUTED
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
int b;
/* scale with the size of disk... */
for ( b = 31; b > 0; b-- ) {
if ( (gigs & ( 1 << b) ) != 0 )
4b6bc: 7401 moveq #1,%d2 <== NOT EXECUTED
4b6be: 2202 movel %d2,%d1 <== NOT EXECUTED
4b6c0: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b6c2: c2ae fd5e andl %fp@(-674),%d1 <== NOT EXECUTED
4b6c6: 6604 bnes 4b6cc <msdos_format+0x476> <== NOT EXECUTED
else {
#define ONE_GB ( 1024L * 1024L * 1024L )
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
int b;
/* scale with the size of disk... */
for ( b = 31; b > 0; b-- ) {
4b6c8: 5380 subql #1,%d0 <== NOT EXECUTED
4b6ca: 66f2 bnes 4b6be <msdos_format+0x468> <== NOT EXECUTED
if ( (gigs & ( 1 << b) ) != 0 )
break;
}
fmt_params->sectors_per_cluster = 1 << b;
4b6cc: 7201 moveq #1,%d1 <== NOT EXECUTED
4b6ce: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b6d0: 2d41 fdbc movel %d1,%fp@(-580) <== NOT EXECUTED
data_clusters_cnt );
/* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
msdos_set_default_sectors_per_cluster_for_fattype( fmt_params,
total_size );
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata,
4b6d4: 486e fdb0 pea %fp@(-592) <== NOT EXECUTED
4b6d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b6da: 4eba fb16 jsr %pc@(4b1f2 <msdos_set_sectors_per_cluster_from_request>)<== NOT EXECUTED
4b6de: 508f addql #8,%sp <== NOT EXECUTED
4b6e0: 2400 movel %d0,%d2 <== NOT EXECUTED
fmt_params );
}
}
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
4b6e2: 4281 clrl %d1
4b6e4: 4280 clrl %d0
4b6e6: 122e fd4d moveb %fp@(-691),%d1
4b6ea: 102e fde2 moveb %fp@(-542),%d0
4b6ee: b081 cmpl %d1,%d0
4b6f0: 6710 beqs 4b702 <msdos_format+0x4ac> <== ALWAYS TAKEN
4b6f2: 4280 clrl %d0 <== NOT EXECUTED
4b6f4: 102e fd65 moveb %fp@(-667),%d0 <== NOT EXECUTED
4b6f8: 7801 moveq #1,%d4 <== NOT EXECUTED
4b6fa: b880 cmpl %d0,%d4 <== NOT EXECUTED
4b6fc: 6404 bccs 4b702 <msdos_format+0x4ac> <== NOT EXECUTED
--fmt_params->totl_sector_cnt;
4b6fe: 53ae fdb4 subql #1,%fp@(-588) <== NOT EXECUTED
}
}
++iteration_cnt;
4b702: 1a2e fd65 moveb %fp@(-667),%d5
4b706: 5285 addql #1,%d5
4b708: 1d45 fd65 moveb %d5,%fp@(-667)
if (ret_val == 0) {
data_clusters_cnt =
fmt_params->totl_sector_cnt / fmt_params->sectors_per_cluster;
}
while( ret_val == 0
4b70c: 4a82 tstl %d2
4b70e: 6618 bnes 4b728 <msdos_format+0x4d2> <== NEVER TAKEN
&& fmt_params->fattype != fat_type
4b710: 4280 clrl %d0
4b712: 4286 clrl %d6
4b714: 102e fde2 moveb %fp@(-542),%d0
4b718: 1c2e fd4d moveb %fp@(-691),%d6
4b71c: bc80 cmpl %d0,%d6
4b71e: 6708 beqs 4b728 <msdos_format+0x4d2>
&& fmt_params->totl_sector_cnt > 0 ) {
4b720: 4aae fdb4 tstl %fp@(-588)
4b724: 6600 fd12 bnew 4b438 <msdos_format+0x1e2>
}
++iteration_cnt;
}
}
if ( fmt_params->totl_sector_cnt == 0 )
4b728: 4aae fdb4 tstl %fp@(-588)
4b72c: 6610 bnes 4b73e <msdos_format+0x4e8> <== ALWAYS TAKEN
{
errno = EINVAL;
4b72e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4b734: 7a16 moveq #22,%d5 <== NOT EXECUTED
4b736: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b738: 2085 movel %d5,%a0@ <== NOT EXECUTED
4b73a: 6000 00a2 braw 4b7de <msdos_format+0x588> <== NOT EXECUTED
ret_val = -1;
}
if (0 == ret_val)
4b73e: 4a82 tstl %d2
4b740: 6600 00ac bnew 4b7ee <msdos_format+0x598>
{
if (FAT_FAT32 != fmt_params->fattype)
4b744: 4280 clrl %d0
4b746: 102e fde2 moveb %fp@(-542),%d0
4b74a: 7804 moveq #4,%d4
4b74c: 222e fdbc movel %fp@(-580),%d1
4b750: b880 cmpl %d0,%d4
4b752: 6726 beqs 4b77a <msdos_format+0x524> <== NEVER TAKEN
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
4b754: 202e fdcc movel %fp@(-564),%d0
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4b758: 4a2e fdfe tstb %fp@(-514)
4b75c: 660e bnes 4b76c <msdos_format+0x516>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b75e: 2040 moveal %d0,%a0
4b760: 2801 movel %d1,%d4
4b762: 4484 negl %d4
4b764: 41f0 18ff lea %a0@(ffffffff,%d1:l),%a0
4b768: 2008 movel %a0,%d0
4b76a: c084 andl %d4,%d0
if (FAT_FAT32 != fmt_params->fattype)
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment)
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
4b76c: 282e fdb0 movel %fp@(-592),%d4
4b770: ea8c lsrl #5,%d4
4b772: 4c04 0800 mulsl %d4,%d0
4b776: 2d40 fdc8 movel %d0,%fp@(-568)
}
fmt_params->rsvd_sector_cnt = loc_align_object (fmt_params->rsvd_sector_cnt,
4b77a: 202e fdb8 movel %fp@(-584),%d0
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4b77e: 4a2e fdfe tstb %fp@(-514)
4b782: 660c bnes 4b790 <msdos_format+0x53a>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b784: 2240 moveal %d0,%a1
4b786: 43f1 18ff lea %a1@(ffffffff,%d1:l),%a1
4b78a: 4481 negl %d1
4b78c: 2009 movel %a1,%d0
4b78e: c081 andl %d1,%d0
fmt_params->sectors_per_cluster,
fmt_params->skip_alignment)
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
}
fmt_params->rsvd_sector_cnt = loc_align_object (fmt_params->rsvd_sector_cnt,
4b790: 2d40 fdb8 movel %d0,%fp@(-584)
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
4b794: 4a8a tstl %a2
4b796: 6750 beqs 4b7e8 <msdos_format+0x592> <== NEVER TAKEN
(rqdata->media != 0)) {
4b798: 182a 0014 moveb %a2@(20),%d4
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
4b79c: 674a beqs 4b7e8 <msdos_format+0x592> <== ALWAYS TAKEN
(rqdata->media != 0)) {
const char valid_media_codes[] =
4b79e: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
4b7a2: 2a0e movel %fp,%d5 <== NOT EXECUTED
4b7a4: 4879 0006 5d05 pea 65d05 <_CPU_m68k_BFFFO_table+0x226> <== NOT EXECUTED
4b7aa: 0685 ffff fe00 addil #-512,%d5 <== NOT EXECUTED
4b7b0: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b7b2: 4eb9 0005 7168 jsr 57168 <memcpy> <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
4b7b8: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
4b7bc: 4280 clrl %d0 <== NOT EXECUTED
4b7be: 1004 moveb %d4,%d0 <== NOT EXECUTED
4b7c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4b7c2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b7c4: 4eb9 0005 6fe0 jsr 56fe0 <memchr> <== NOT EXECUTED
4b7ca: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4b7ce: 4a80 tstl %d0 <== NOT EXECUTED
4b7d0: 6610 bnes 4b7e2 <msdos_format+0x58c> <== NOT EXECUTED
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
4b7d2: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4b7d8: 7816 moveq #22,%d4 <== NOT EXECUTED
4b7da: 2a40 moveal %d0,%a5 <== NOT EXECUTED
4b7dc: 2a84 movel %d4,%a5@ <== NOT EXECUTED
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
4b7de: 74ff moveq #-1,%d2 <== NOT EXECUTED
4b7e0: 600c bras 4b7ee <msdos_format+0x598> <== NOT EXECUTED
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
4b7e2: 1d44 fde1 moveb %d4,%fp@(-543) <== NOT EXECUTED
4b7e6: 6006 bras 4b7ee <msdos_format+0x598> <== NOT EXECUTED
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
4b7e8: 70f8 moveq #-8,%d0
4b7ea: 1d40 fde1 moveb %d0,%fp@(-543)
4b7ee: 4280 clrl %d0
4b7f0: 102e fde0 moveb %fp@(-544),%d0
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
4b7f4: 222e fdcc movel %fp@(-564),%d1
4b7f8: 6716 beqs 4b810 <msdos_format+0x5ba> <== NEVER TAKEN
fmt_params->root_dir_start_sec =
fmt_params->rsvd_sector_cnt
+ (fmt_params-> fat_num*fmt_params->sectors_per_fat);
4b7fa: 41ee fdc0 lea %fp@(-576),%a0
4b7fe: 4c10 0800 mulsl %a0@,%d0
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
4b802: 2d41 fdd4 movel %d1,%fp@(-556)
* 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);
4b806: d0ae fdb8 addl %fp@(-584),%d0
4b80a: 2d40 fdd0 movel %d0,%fp@(-560)
4b80e: 6016 bras 4b826 <msdos_format+0x5d0>
/*
* 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);
4b810: 43ee fdc0 lea %fp@(-576),%a1 <== NOT EXECUTED
4b814: 4c11 0800 mulsl %a1@,%d0 <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
4b818: 2d6e fdbc fdd4 movel %fp@(-580),%fp@(-556) <== 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);
4b81e: d0ae fdb8 addl %fp@(-584),%d0 <== NOT EXECUTED
4b822: 2d40 fdd0 movel %d0,%fp@(-560) <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
4b826: 4a82 tstl %d2
4b828: 6600 0628 bnew 4be52 <msdos_format+0xbfc>
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
4b82c: 4a8a tstl %a2
4b82e: 6706 beqs 4b836 <msdos_format+0x5e0> <== NEVER TAKEN
(rqdata->OEMName != NULL)) {
4b830: 2052 moveal %a2@,%a0
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) &&
4b832: 4a88 tstl %a0
4b834: 6606 bnes 4b83c <msdos_format+0x5e6>
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
4b836: 41f9 0006 5c07 lea 65c07 <_CPU_m68k_BFFFO_table+0x128>,%a0
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b83c: 2879 0006 6e0c moveal 66e0c <__ctype_ptr__>,%a4
4b842: 7009 moveq #9,%d0
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
4b844: 43ee fde3 lea %fp@(-541),%a1
4b848: 6028 bras 4b872 <msdos_format+0x61c>
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b84a: 4281 clrl %d1
4b84c: 47e9 0001 lea %a1@(1),%a3
4b850: 1410 moveb %a0@,%d2
4b852: 1202 moveb %d2,%d1
4b854: 1234 1801 moveb %a4@(00000001,%d1:l),%d1
4b858: 49c1 extbl %d1
4b85a: 0281 0000 0097 andil #151,%d1
4b860: 6708 beqs 4b86a <msdos_format+0x614>
*to++ = *from++;
4b862: 5288 addql #1,%a0
4b864: 1282 moveb %d2,%a1@
4b866: 224b moveal %a3,%a1
4b868: 6006 bras 4b870 <msdos_format+0x61a>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
4b86a: 12bc 0020 moveb #32,%a1@
4b86e: 224b moveal %a3,%a1
}
*to = '\0';
4b870: 4213 clrb %a3@
4b872: 5380 subql #1,%d0
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
4b874: 66d4 bnes 4b84a <msdos_format+0x5f4>
4b876: 6000 05a2 braw 4be1a <msdos_format+0xbc4>
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
4b87a: 206a 0004 moveal %a2@(4),%a0
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) &&
4b87e: 4a88 tstl %a0
4b880: 6708 beqs 4b88a <msdos_format+0x634>
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
4b882: 7001 moveq #1,%d0
4b884: 1d40 fdf8 moveb %d0,%fp@(-520)
4b888: 6006 bras 4b890 <msdos_format+0x63a>
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
4b88a: 41f9 0006 59d5 lea 659d5 <rtems_termios_baud_table+0x101>,%a0
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b890: 2879 0006 6e0c moveal 66e0c <__ctype_ptr__>,%a4
4b896: 700c moveq #12,%d0
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
4b898: 43ee fdec lea %fp@(-532),%a1
4b89c: 6028 bras 4b8c6 <msdos_format+0x670>
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b89e: 4281 clrl %d1
4b8a0: 47e9 0001 lea %a1@(1),%a3
4b8a4: 1410 moveb %a0@,%d2
4b8a6: 1202 moveb %d2,%d1
4b8a8: 1234 1801 moveb %a4@(00000001,%d1:l),%d1
4b8ac: 49c1 extbl %d1
4b8ae: 0281 0000 0097 andil #151,%d1
4b8b4: 6708 beqs 4b8be <msdos_format+0x668>
*to++ = *from++;
4b8b6: 5288 addql #1,%a0
4b8b8: 1282 moveb %d2,%a1@
4b8ba: 224b moveal %a3,%a1
4b8bc: 6006 bras 4b8c4 <msdos_format+0x66e>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
4b8be: 12bc 0020 moveb #32,%a1@
4b8c2: 224b moveal %a3,%a1
}
*to = '\0';
4b8c4: 4213 clrb %a3@
4b8c6: 5380 subql #1,%d0
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
4b8c8: 66d4 bnes 4b89e <msdos_format+0x648>
4b8ca: 6000 0558 braw 4be24 <msdos_format+0xbce>
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
4b8ce: 202e fe00 movel %fp@(-512),%d0 <== NOT EXECUTED
4b8d2: d080 addl %d0,%d0 <== NOT EXECUTED
4b8d4: 6006 bras 4b8dc <msdos_format+0x686> <== NOT EXECUTED
}
else {
*volid_ptr = rand();
4b8d6: 4eb9 0005 78d8 jsr 578d8 <rand>
4b8dc: 2d40 fdfa movel %d0,%fp@(-518)
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
4b8e0: 4a8a tstl %a2
4b8e2: 6632 bnes 4b916 <msdos_format+0x6c0> <== ALWAYS TAKEN
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b8e4: 4879 0006 5c9f pea 65c9f <_CPU_m68k_BFFFO_table+0x1c0>
4b8ea: 47fa f750 lea %pc@(4b03c <msdos_format_printf>),%a3
4b8ee: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b8f2: 2f0a movel %a2,%sp@-
4b8f4: 4e93 jsr %a3@
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
4b8f6: 242e fdb0 movel %fp@(-592),%d2
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4b8fa: 42a7 clrl %sp@-
4b8fc: 42a7 clrl %sp@-
4b8fe: 42a7 clrl %sp@-
4b900: 2f03 movel %d3,%sp@-
4b902: 4eb9 0005 165c jsr 5165c <lseek>
4b908: 4fef 001c lea %sp@(28),%sp
4b90c: 4a80 tstl %d0
4b90e: 6a00 052a bplw 4be3a <msdos_format+0xbe4>
4b912: 6000 056c braw 4be80 <msdos_format+0xc2a> <== NOT EXECUTED
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
4b916: 4a2a 0015 tstb %a2@(21)
4b91a: 66c8 bnes 4b8e4 <msdos_format+0x68e>
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
4b91c: 4878 ffe5 pea ffffffe5 <DBL_MIN_EXP+0x3e2>
4b920: 2f2e fdb0 movel %fp@(-592),%sp@-
4b924: 2f2e fdb4 movel %fp@(-588),%sp@-
4b928: 42a7 clrl %sp@-
4b92a: 2f03 movel %d3,%sp@-
4b92c: 2f0a movel %a2,%sp@-
4b92e: 4eba f7b8 jsr %pc@(4b0e8 <msdos_format_fill_sectors>)
}
/*
* create master boot record
*/
if (ret_val == 0) {
4b932: 4fef 0018 lea %sp@(24),%sp
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
4b936: 2400 movel %d0,%d2
}
/*
* create master boot record
*/
if (ret_val == 0) {
4b938: 6600 0518 bnew 4be52 <msdos_format+0xbfc>
4b93c: 60a6 bras 4b8e4 <msdos_format+0x68e>
{
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) {
4b93e: 2802 movel %d2,%d4
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
uint32_t total_sectors_num32 = 0;
4b940: 4282 clrl %d2
* 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);
4b942: 4878 01be pea 1be <DBL_MANT_DIG+0x189>
fmt_params.bytes_per_sector,
tmp_sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"generate MRB sector\n");
ret_val = msdos_format_gen_mbr(tmp_sec,&fmt_params);
4b946: 47ee fe00 lea %fp@(-512),%a3
* 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);
4b94a: 49f9 0005 71d8 lea 571d8 <memset>,%a4
4b950: 42a7 clrl %sp@-
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
4b952: 7a02 moveq #2,%d5
* 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);
4b954: 2f0b movel %a3,%sp@-
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... */
4b956: 50c6 st %d6
* 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);
4b958: 4e94 jsr %a4@
* 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);
4b95a: 202e fdb0 movel %fp@(-592),%d0
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
4b95e: 43ee fdb0 lea %fp@(-592),%a1
4b962: 43e9 0033 lea %a1@(51),%a1
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4b966: 41eb 0003 lea %a3@(3),%a0
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) {
4b96a: 4fef 000c lea %sp@(12),%sp
* 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,
4b96e: 4241 clrw %d1
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... */
4b970: 7e06 moveq #6,%d7
* 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,
4b972: 3d41 fffe movew %d1,%fp@(-2)
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);
4b976: 7218 moveq #24,%d1
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4b978: 2091 movel %a1@,%a0@
4b97a: 2769 0004 0007 movel %a1@(4),%a3@(7)
fmt_params->OEMName,
FAT_BR_OEMNAME_SIZE);
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
4b980: 1d40 fe0b moveb %d0,%fp@(-501)
4b984: e088 lsrl #8,%d0
4b986: 1d40 fe0c moveb %d0,%fp@(-500)
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
4b98a: 202e fdb8 movel %fp@(-584),%d0
4b98e: 1d40 fe0e moveb %d0,%fp@(-498)
4b992: e088 lsrl #8,%d0
4b994: 1d40 fe0f moveb %d0,%fp@(-497)
/* 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);
4b998: 202e fdc8 movel %fp@(-568),%d0
4b99c: 1d40 fe11 moveb %d0,%fp@(-495)
4b9a0: e088 lsrl #8,%d0
4b9a2: 1d40 fe12 moveb %d0,%fp@(-494)
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... */
4b9a6: 7001 moveq #1,%d0
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4b9a8: 1d42 fe20 moveb %d2,%fp@(-480)
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
4b9ac: 1d44 fe13 moveb %d4,%fp@(-493)
4b9b0: e08c lsrl #8,%d4
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... */
4b9b2: 1d40 fe1c moveb %d0,%fp@(-484)
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4b9b6: 2002 movel %d2,%d0
4b9b8: e088 lsrl #8,%d0
4b9ba: 1d40 fe21 moveb %d0,%fp@(-479)
4b9be: 2002 movel %d2,%d0
4b9c0: e2aa lsrl %d1,%d2
4b9c2: 4240 clrw %d0
4b9c4: 4840 swap %d0
4b9c6: 1d42 fe23 moveb %d2,%fp@(-477)
if (fmt_params->fattype != FAT_FAT32) {
4b9ca: 4282 clrl %d2
4b9cc: 142e fde2 moveb %fp@(-542),%d2
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
4b9d0: 1d44 fe14 moveb %d4,%fp@(-492)
*/
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);
4b9d4: 1d6e fdbf fe0d moveb %fp@(-577),%fp@(-499)
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 */
4b9da: 1d45 fe10 moveb %d5,%fp@(-496)
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);
4b9de: 1d6e fde1 fe15 moveb %fp@(-543),%fp@(-491)
4b9e4: 222e fdc0 movel %fp@(-576),%d1
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) {
4b9e8: 7804 moveq #4,%d4
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... */
4b9ea: 1d46 fe18 moveb %d6,%fp@(-488)
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
4b9ee: 1d47 fe1a moveb %d7,%fp@(-486)
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4b9f2: 1d40 fe22 moveb %d0,%fp@(-478)
if (fmt_params->fattype != FAT_FAT32) {
4b9f6: b882 cmpl %d2,%d4
4b9f8: 6766 beqs 4ba60 <msdos_format+0x80a> <== NEVER TAKEN
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 */
4b9fa: 202e fdfa movel %fp@(-518),%d0
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4b9fe: 4878 000b pea b <LASTO+0x1>
if (fmt_params->fattype != FAT_FAT32) {
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4ba02: 7c18 moveq #24,%d6
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4ba04: 486e fdec pea %fp@(-532)
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4ba08: 7e01 moveq #1,%d7
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4ba0a: 486b 002b pea %a3@(43)
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);
4ba0e: 1d41 fe16 moveb %d1,%fp@(-490)
4ba12: e089 lsrl #8,%d1
4ba14: 1d41 fe17 moveb %d1,%fp@(-489)
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 */
4ba18: 2200 movel %d0,%d1
4ba1a: e089 lsrl #8,%d1
4ba1c: 1d41 fe28 moveb %d1,%fp@(-472)
4ba20: 2200 movel %d0,%d1
4ba22: 1d40 fe27 moveb %d0,%fp@(-473)
4ba26: 4241 clrw %d1
4ba28: 4841 swap %d1
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);
4ba2a: 7a29 moveq #41,%d5
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4ba2c: eca8 lsrl %d6,%d0
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);
4ba2e: 1d45 fe26 moveb %d5,%fp@(-474)
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4ba32: 1d41 fe29 moveb %d1,%fp@(-471)
4ba36: 1d40 fe2a moveb %d0,%fp@(-470)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4ba3a: 4eb9 0005 7168 jsr 57168 <memcpy>
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4ba40: 4fef 000c lea %sp@(12),%sp
4ba44: 41f9 0006 5c16 lea 65c16 <_CPU_m68k_BFFFO_table+0x137>,%a0
4ba4a: be82 cmpl %d2,%d7
4ba4c: 6606 bnes 4ba54 <msdos_format+0x7fe> <== NEVER TAKEN
4ba4e: 41f9 0006 5c0d lea 65c0d <_CPU_m68k_BFFFO_table+0x12e>,%a0
4ba54: 2d50 fe36 movel %a0@,%fp@(-458)
4ba58: 2d68 0004 fe3a movel %a0@(4),%fp@(-454)
4ba5e: 606e bras 4bace <msdos_format+0x878>
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4ba60: 2001 movel %d1,%d0 <== NOT EXECUTED
4ba62: e088 lsrl #8,%d0 <== 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 */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
4ba64: 4878 000c pea c <OPER1> <== 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),
4ba68: 2a3c 3220 2020 movel #840966176,%d5 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4ba6e: 1d40 fe25 moveb %d0,%fp@(-475) <== NOT EXECUTED
4ba72: 2001 movel %d1,%d0 <== NOT EXECUTED
4ba74: 4240 clrw %d0 <== NOT EXECUTED
4ba76: 4840 swap %d0 <== NOT EXECUTED
4ba78: 1d41 fe24 moveb %d1,%fp@(-476) <== 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 */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
4ba7c: 42a7 clrl %sp@- <== NOT EXECUTED
4ba7e: 486b 0034 pea %a3@(52) <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4ba82: 1d40 fe26 moveb %d0,%fp@(-474) <== NOT EXECUTED
4ba86: 7018 moveq #24,%d0 <== NOT EXECUTED
4ba88: e0a9 lsrl %d0,%d1 <== 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 */
4ba8a: 202e fdd8 movel %fp@(-552),%d0 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4ba8e: 1d41 fe27 moveb %d1,%fp@(-473) <== 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 */
4ba92: 7202 moveq #2,%d1 <== NOT EXECUTED
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 */
4ba94: 1d40 fe32 moveb %d0,%fp@(-462) <== NOT EXECUTED
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
4ba98: 7401 moveq #1,%d2 <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
4ba9a: e088 lsrl #8,%d0 <== NOT EXECUTED
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
4ba9c: 1d41 fe2c moveb %d1,%fp@(-468) <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
4baa0: 1d42 fe30 moveb %d2,%fp@(-464) <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
4baa4: 1d40 fe33 moveb %d0,%fp@(-461) <== NOT EXECUTED
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);
4baa8: 7829 moveq #41,%d4 <== 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 */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
4baaa: 4e94 jsr %a4@ <== 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);
4baac: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
4bab0: 42a7 clrl %sp@- <== NOT EXECUTED
4bab2: 486b 0047 pea %a3@(71) <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4bab6: 47eb 0052 lea %a3@(82),%a3 <== 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);
4baba: 1d44 fe42 moveb %d4,%fp@(-446) <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
4babe: 4e94 jsr %a4@ <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4bac0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4bac4: 26bc 4641 5433 movel #1178686515,%a3@ <== NOT EXECUTED
4baca: 2745 0004 movel %d5,%a3@(4) <== NOT EXECUTED
/*
* 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,
4bace: 4879 0006 5cb0 pea 65cb0 <_CPU_m68k_BFFFO_table+0x1d1>
4bad4: 49fa f566 lea %pc@(4b03c <msdos_format_printf>),%a4
4bad8: 4878 0002 pea 2 <DOUBLE_FLOAT>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
0,
fmt_params.bytes_per_sector,
tmp_sec);
4badc: 280e movel %fp,%d4
4bade: 0684 ffff fe00 addil #-512,%d4
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bae4: 47fa f59c lea %pc@(4b082 <msdos_format_write_sec>),%a3
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
4bae8: 70eb moveq #-21,%d0
FAT_SET_VAL8(mbr,1,0x3c);
4baea: 723c moveq #60,%d1
FAT_SET_VAL8(mbr,2,0x90);
4baec: 7490 moveq #-112,%d2
/*
* 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,
4baee: 2f0a movel %a2,%sp@-
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4baf0: 7c55 moveq #85,%d6
4baf2: 7eaa moveq #-86,%d7
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
4baf4: 1d40 fe00 moveb %d0,%fp@(-512)
FAT_SET_VAL8(mbr,1,0x3c);
4baf8: 1d41 fe01 moveb %d1,%fp@(-511)
FAT_SET_VAL8(mbr,2,0x90);
4bafc: 1d42 fe02 moveb %d2,%fp@(-510)
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4bb00: 1d46 fffe moveb %d6,%fp@(-2)
4bb04: 1d47 ffff moveb %d7,%fp@(-1)
/*
* 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,
4bb08: 4e94 jsr %a4@
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bb0a: 2f04 movel %d4,%sp@-
4bb0c: 2f2e fdb0 movel %fp@(-592),%sp@-
4bb10: 42a7 clrl %sp@-
4bb12: 2f03 movel %d3,%sp@-
4bb14: 4e93 jsr %a3@
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4bb16: 4fef 001c lea %sp@(28),%sp
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bb1a: 2400 movel %d0,%d2
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4bb1c: 6600 0334 bnew 4be52 <msdos_format+0xbfc>
4bb20: 4aae fdd8 tstl %fp@(-552)
4bb24: 660a bnes 4bb30 <msdos_format+0x8da> <== NEVER TAKEN
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
4bb26: 242e fddc movel %fp@(-548),%d2
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4bb2a: 6700 00b0 beqw 4bbdc <msdos_format+0x986>
4bb2e: 6028 bras 4bb58 <msdos_format+0x902> <== NOT EXECUTED
if ((ret_val == 0) &&
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4bb30: 4879 0006 5cc2 pea 65cc2 <_CPU_m68k_BFFFO_table+0x1e3> <== NOT EXECUTED
4bb36: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4bb3a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bb3c: 4e94 jsr %a4@ <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bb3e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4bb40: 2f2e fdb0 movel %fp@(-592),%sp@- <== NOT EXECUTED
4bb44: 2f2e fdd8 movel %fp@(-552),%sp@- <== NOT EXECUTED
4bb48: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4bb4a: 4e93 jsr %a3@ <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4bb4c: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bb50: 2400 movel %d0,%d2 <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4bb52: 67d2 beqs 4bb26 <msdos_format+0x8d0> <== NOT EXECUTED
4bb54: 6000 02fc braw 4be52 <msdos_format+0xbfc> <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bb58: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> <== NOT EXECUTED
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_gen_fsinfo(tmp_sec);
4bb5c: 280e movel %fp,%d4 <== NOT EXECUTED
4bb5e: 0684 ffff fe00 addil #-512,%d4 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bb64: 42a7 clrl %sp@- <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb66: 7a52 moveq #82,%d5 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bb68: 2f04 movel %d4,%sp@- <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb6a: 7c61 moveq #97,%d6 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bb6c: 4eb9 0005 71d8 jsr 571d8 <memset> <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb72: 1d45 fe00 moveb %d5,%fp@(-512) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4bb76: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4bb78: 2f2e fdb0 movel %fp@(-592),%sp@- <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb7c: 1d45 fe01 moveb %d5,%fp@(-511) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4bb80: 2f02 movel %d2,%sp@- <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb82: 1d46 fe02 moveb %d6,%fp@(-510) <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4bb86: 1d46 ffe7 moveb %d6,%fp@(-25) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
4bb8a: 50c6 st %d6 <== NOT EXECUTED
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4bb8c: 7072 moveq #114,%d0 <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4bb8e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb90: 7e41 moveq #65,%d7 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
4bb92: 7255 moveq #85,%d1 <== NOT EXECUTED
4bb94: 7aaa moveq #-86,%d5 <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bb96: 1d47 fe03 moveb %d7,%fp@(-509) <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4bb9a: 1d40 ffe4 moveb %d0,%fp@(-28) <== NOT EXECUTED
4bb9e: 1d40 ffe5 moveb %d0,%fp@(-27) <== NOT EXECUTED
4bba2: 1d47 ffe6 moveb %d7,%fp@(-26) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
4bba6: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED
4bbaa: 1d45 ffff moveb %d5,%fp@(-1) <== NOT EXECUTED
/*
* write "empty" values for free cluster count and next cluster number
*/
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO,
4bbae: 1d46 ffe8 moveb %d6,%fp@(-24) <== NOT EXECUTED
4bbb2: 1d46 ffe9 moveb %d6,%fp@(-23) <== NOT EXECUTED
4bbb6: 1d46 ffea moveb %d6,%fp@(-22) <== NOT EXECUTED
4bbba: 1d46 ffeb moveb %d6,%fp@(-21) <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
4bbbe: 1d46 ffec moveb %d6,%fp@(-20) <== NOT EXECUTED
4bbc2: 1d46 ffed moveb %d6,%fp@(-19) <== NOT EXECUTED
4bbc6: 1d46 ffee moveb %d6,%fp@(-18) <== NOT EXECUTED
4bbca: 1d46 ffef moveb %d6,%fp@(-17) <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4bbce: 4eba f4b2 jsr %pc@(4b082 <msdos_format_write_sec>) <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
4bbd2: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
4bbd6: 2400 movel %d0,%d2 <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
4bbd8: 6600 0278 bnew 4be52 <msdos_format+0xbfc> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
(rqdata,
4bbdc: 4280 clrl %d0
4bbde: 102e fde0 moveb %fp@(-544),%d0
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4bbe2: 47fa f504 lea %pc@(4b0e8 <msdos_format_fill_sectors>),%a3
4bbe6: 42a7 clrl %sp@-
4bbe8: 2e2e fdc0 movel %fp@(-576),%d7
4bbec: 4c00 7800 mulsl %d0,%d7
4bbf0: 2f2e fdb0 movel %fp@(-592),%sp@-
4bbf4: 2f07 movel %d7,%sp@-
4bbf6: 2f2e fdb8 movel %fp@(-584),%sp@-
4bbfa: 2f03 movel %d3,%sp@-
4bbfc: 2f0a movel %a2,%sp@-
4bbfe: 4e93 jsr %a3@
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
4bc00: 4fef 0018 lea %sp@(24),%sp
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4bc04: 2400 movel %d0,%d2
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
4bc06: 6600 024a bnew 4be52 <msdos_format+0xbfc>
ret_val = msdos_format_fill_sectors
4bc0a: 42a7 clrl %sp@-
4bc0c: 2f2e fdb0 movel %fp@(-592),%sp@-
4bc10: 2f2e fdd4 movel %fp@(-556),%sp@-
4bc14: 2f2e fdd0 movel %fp@(-560),%sp@-
4bc18: 2f03 movel %d3,%sp@-
4bc1a: 2f0a movel %a2,%sp@-
4bc1c: 4e93 jsr %a3@
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
4bc1e: 4fef 0018 lea %sp@(24),%sp
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
ret_val = msdos_format_fill_sectors
4bc22: 2400 movel %d0,%d2
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
4bc24: 6600 022c bnew 4be52 <msdos_format+0xbfc>
4bc28: 4a2e fdf8 tstb %fp@(-520)
4bc2c: 6630 bnes 4bc5e <msdos_format+0xa08>
uint32_t start_sector;
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
4bc2e: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4bc32: 42a7 clrl %sp@-
4bc34: 486e fe00 pea %fp@(-512)
4bc38: 4eb9 0005 71d8 jsr 571d8 <memset>
switch(fmt_params.fattype) {
4bc3e: 4fef 000c lea %sp@(12),%sp
4bc42: 4280 clrl %d0
4bc44: 102e fde2 moveb %fp@(-542),%d0
4bc48: 7202 moveq #2,%d1
4bc4a: b280 cmpl %d0,%d1
4bc4c: 676c beqs 4bcba <msdos_format+0xa64> <== NEVER TAKEN
4bc4e: 7804 moveq #4,%d4
4bc50: b880 cmpl %d0,%d4
4bc52: 677e beqs 4bcd2 <msdos_format+0xa7c> <== NEVER TAKEN
4bc54: 7a01 moveq #1,%d5
4bc56: ba80 cmpl %d0,%d5
4bc58: 6600 00a2 bnew 4bcfc <msdos_format+0xaa6>
4bc5c: 6048 bras 4bca6 <msdos_format+0xa50>
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
4bc5e: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4bc62: 280e movel %fp,%d4
4bc64: 0684 ffff fe00 addil #-512,%d4
4bc6a: 42a7 clrl %sp@-
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
4bc6c: 7c08 moveq #8,%d6
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
memset(tmp_sec,0,sizeof(tmp_sec));
4bc6e: 2f04 movel %d4,%sp@-
4bc70: 4eb9 0005 71d8 jsr 571d8 <memset>
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
4bc76: 4878 000b pea b <LASTO+0x1>
4bc7a: 486e fdec pea %fp@(-532)
4bc7e: 2f04 movel %d4,%sp@-
4bc80: 4eb9 0005 7168 jsr 57168 <memcpy>
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
4bc86: 1d46 fe0b moveb %d6,%fp@(-501)
ret_val = msdos_format_write_sec
4bc8a: 2f04 movel %d4,%sp@-
4bc8c: 2f2e fdb0 movel %fp@(-592),%sp@-
4bc90: 2f2e fdd0 movel %fp@(-560),%sp@-
4bc94: 2f03 movel %d3,%sp@-
4bc96: 4eba f3ea jsr %pc@(4b082 <msdos_format_write_sec>)
/*
* write FAT entry 0 as (0xffffff00|Media_type)EOC,
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
if (ret_val == 0) {
4bc9a: 4fef 0028 lea %sp@(40),%sp
4bc9e: 4a80 tstl %d0
4bca0: 6600 01b2 bnew 4be54 <msdos_format+0xbfe>
4bca4: 6088 bras 4bc2e <msdos_format+0x9d8>
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)));
4bca6: 7e8f moveq #-113,%d7
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
4bca8: 50c0 st %d0
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));
4bcaa: 1d6e fde1 fe00 moveb %fp@(-543),%fp@(-512)
/* 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)));
4bcb0: 1d47 fe01 moveb %d7,%fp@(-511)
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
4bcb4: 1d40 fe02 moveb %d0,%fp@(-510)
break;
4bcb8: 6050 bras 4bd0a <msdos_format+0xab4>
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);
4bcba: 50c1 st %d1 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
4bcbc: 78f8 moveq #-8,%d4 <== 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);
4bcbe: 1d6e fde1 fe00 moveb %fp@(-543),%fp@(-512) <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
4bcc4: 1d41 fe01 moveb %d1,%fp@(-511) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
4bcc8: 1d44 fe02 moveb %d4,%fp@(-510) <== NOT EXECUTED
4bccc: 1d41 fe03 moveb %d1,%fp@(-509) <== NOT EXECUTED
break;
4bcd0: 6038 bras 4bd0a <msdos_format+0xab4> <== NOT EXECUTED
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
4bcd2: 50c5 st %d5 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
4bcd4: 7cf8 moveq #-8,%d6 <== NOT EXECUTED
4bcd6: 7e0f moveq #15,%d7 <== 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);
4bcd8: 1d6e fde1 fe00 moveb %fp@(-543),%fp@(-512) <== NOT EXECUTED
4bcde: 1d45 fe01 moveb %d5,%fp@(-511) <== NOT EXECUTED
4bce2: 1d45 fe02 moveb %d5,%fp@(-510) <== NOT EXECUTED
4bce6: 1d45 fe03 moveb %d5,%fp@(-509) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
4bcea: 1d46 fe04 moveb %d6,%fp@(-508) <== NOT EXECUTED
4bcee: 1d45 fe05 moveb %d5,%fp@(-507) <== NOT EXECUTED
4bcf2: 1d45 fe06 moveb %d5,%fp@(-506) <== NOT EXECUTED
4bcf6: 1d47 fe07 moveb %d7,%fp@(-505) <== NOT EXECUTED
break;
4bcfa: 600e bras 4bd0a <msdos_format+0xab4> <== NOT EXECUTED
default:
ret_val = -1;
errno = EINVAL;
4bcfc: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4bd02: 7416 moveq #22,%d2 <== NOT EXECUTED
4bd04: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bd06: 2082 movel %d2,%a0@ <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
4bd08: 74ff moveq #-1,%d2 <== NOT EXECUTED
errno = EINVAL;
}
if (fmt_params.fattype == FAT_FAT32) {
4bd0a: 4280 clrl %d0
4bd0c: 102e fde2 moveb %fp@(-542),%d0
4bd10: 7204 moveq #4,%d1
4bd12: b280 cmpl %d0,%d1
4bd14: 6616 bnes 4bd2c <msdos_format+0xad6> <== ALWAYS TAKEN
/*
* only first valid cluster (cluster number 2) belongs
* to root directory, and is end of chain
* mark this in every copy of the FAT
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
4bd16: 50c5 st %d5 <== NOT EXECUTED
4bd18: 78f8 moveq #-8,%d4 <== NOT EXECUTED
4bd1a: 7c0f moveq #15,%d6 <== NOT EXECUTED
4bd1c: 1d44 fe08 moveb %d4,%fp@(-504) <== NOT EXECUTED
4bd20: 1d45 fe09 moveb %d5,%fp@(-503) <== NOT EXECUTED
4bd24: 1d45 fe0a moveb %d5,%fp@(-502) <== NOT EXECUTED
4bd28: 1d46 fe0b moveb %d6,%fp@(-501) <== NOT EXECUTED
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
4bd2c: 202e fdbc movel %fp@(-580),%d0
4bd30: 282e fdb8 movel %fp@(-584),%d4
static uint32_t
loc_align_object (const uint32_t sectors,
const uint32_t clustersize,
const bool skip_alignment)
{
if (! skip_alignment)
4bd34: 4a2e fdfe tstb %fp@(-514)
4bd38: 660c bnes 4bd46 <msdos_format+0xaf0>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4bd3a: 2040 moveal %d0,%a0
4bd3c: 4480 negl %d0
4bd3e: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0
4bd42: 2808 movel %a0,%d4
4bd44: c880 andl %d0,%d4
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
4bd46: 2002 movel %d2,%d0
ret_val = msdos_format_write_sec
(fd,
start_sector
+ (i * fmt_params.sectors_per_fat),
fmt_params.bytes_per_sector,
tmp_sec);
4bd48: 2a0e movel %fp,%d5
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
4bd4a: 4282 clrl %d2
ret_val = msdos_format_write_sec
(fd,
start_sector
+ (i * fmt_params.sectors_per_fat),
fmt_params.bytes_per_sector,
tmp_sec);
4bd4c: 0685 ffff fe00 addil #-512,%d5
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
4bd52: 47fa f32e lea %pc@(4b082 <msdos_format_write_sec>),%a3
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
4bd56: 601e bras 4bd76 <msdos_format+0xb20>
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
(fd,
start_sector
+ (i * fmt_params.sectors_per_fat),
4bd58: 202e fdc0 movel %fp@(-576),%d0
4bd5c: 4c02 0800 mulsl %d2,%d0
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
4bd60: 5282 addql #1,%d2
ret_val = msdos_format_write_sec
4bd62: 2f05 movel %d5,%sp@-
4bd64: 2f2e fdb0 movel %fp@(-592),%sp@-
4bd68: 2240 moveal %d0,%a1
4bd6a: 4871 4800 pea %a1@(00000000,%d4:l)
4bd6e: 2f03 movel %d3,%sp@-
4bd70: 4e93 jsr %a3@
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
4bd72: 4fef 0010 lea %sp@(16),%sp
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
4bd76: 4281 clrl %d1
4bd78: 122e fde0 moveb %fp@(-544),%d1
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
4bd7c: b282 cmpl %d2,%d1
4bd7e: 6f08 bles 4bd88 <msdos_format+0xb32>
(i < fmt_params.fat_num) && (ret_val == 0);
4bd80: 4a80 tstl %d0
4bd82: 67d4 beqs 4bd58 <msdos_format+0xb02> <== ALWAYS TAKEN
4bd84: 6000 00ce braw 4be54 <msdos_format+0xbfe> <== NOT EXECUTED
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
4bd88: 2400 movel %d0,%d2
fmt_params.bytes_per_sector,
tmp_sec);
}
}
if (ret_val == 0 && rqdata != NULL && rqdata->sync_device) {
4bd8a: 661c bnes 4bda8 <msdos_format+0xb52> <== NEVER TAKEN
4bd8c: 4a8a tstl %a2
4bd8e: 6718 beqs 4bda8 <msdos_format+0xb52> <== NEVER TAKEN
4bd90: 4a2a 0017 tstb %a2@(23)
4bd94: 6712 beqs 4bda8 <msdos_format+0xb52>
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
}
static inline int rtems_disk_fd_sync(int fd)
{
return ioctl(fd, RTEMS_BLKIO_SYNCDEV);
4bd96: 2f3c 2000 4206 movel #536887814,%sp@-
4bd9c: 2f03 movel %d3,%sp@-
4bd9e: 4eb9 0005 1600 jsr 51600 <ioctl>
4bda4: 508f addql #8,%sp
4bda6: 2400 movel %d0,%d2
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4bda8: 70ff moveq #-1,%d0
4bdaa: b083 cmpl %d3,%d0
4bdac: 6700 00d6 beqw 4be84 <msdos_format+0xc2e>
close(fd);
4bdb0: 2f03 movel %d3,%sp@-
4bdb2: 4eb9 0004 3cd8 jsr 43cd8 <close>
4bdb8: 588f addql #4,%sp
4bdba: 6000 00c8 braw 4be84 <msdos_format+0xc2e>
uint64_t total_size = 0;
uint32_t data_clusters_cnt;
uint8_t iteration_cnt = 0;
uint8_t fat_type = UINT8_MAX;
memset(fmt_params,0,sizeof(*fmt_params));
4bdbe: 4878 0050 pea 50 <DBL_MANT_DIG+0x1b>
/*
* compute formatting parameters
*/
if (ret_val == 0) {
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
4bdc2: 47ee fdb0 lea %fp@(-592),%a3
static inline int rtems_disk_fd_get_media_block_size(
int fd,
uint32_t *media_block_size
)
{
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
4bdc6: 4bf9 0005 1600 lea 51600 <ioctl>,%a5
uint64_t total_size = 0;
uint32_t data_clusters_cnt;
uint8_t iteration_cnt = 0;
uint8_t fat_type = UINT8_MAX;
memset(fmt_params,0,sizeof(*fmt_params));
4bdcc: 42a7 clrl %sp@-
4bdce: 2f0b movel %a3,%sp@-
4bdd0: 4eb9 0005 71d8 jsr 571d8 <memset>
4bdd6: 2f0b movel %a3,%sp@-
4bdd8: 2f3c 4004 4202 movel #1074020866,%sp@-
4bdde: 2f03 movel %d3,%sp@-
4bde0: 4e95 jsr %a5@
* At least one thing we don't have to magically guess...
*/
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_media_block_size(fd, &fmt_params->bytes_per_sector);
}
if (ret_val == 0) {
4bde2: 4fef 0018 lea %sp@(24),%sp
4bde6: 2400 movel %d0,%d2
4bde8: 6600 f93e bnew 4b728 <msdos_format+0x4d2>
4bdec: 6000 f512 braw 4b300 <msdos_format+0xaa>
ret_val = -1;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4bdf0: 4280 clrl %d0
4bdf2: 102e fde0 moveb %fp@(-544),%d0
4bdf6: 2f00 movel %d0,%sp@-
4bdf8: 4879 0006 5cdc pea 65cdc <_CPU_m68k_BFFFO_table+0x1fd>
4bdfe: 4878 0002 pea 2 <DOUBLE_FLOAT>
4be02: 2f0a movel %a2,%sp@-
4be04: 4eba f236 jsr %pc@(4b03c <msdos_format_printf>)
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
4be08: 4fef 0010 lea %sp@(16),%sp
4be0c: 4a8a tstl %a2
4be0e: 6600 f562 bnew 4b372 <msdos_format+0x11c>
* limiting values for disk size, fat type, sectors per cluster
* NOTE: maximum sect_per_clust is arbitrarily choosen with values that
* are a compromise concerning capacity and efficency
*/
uint32_t fat12_sect_per_clust = 8;
uint32_t fat16_sect_per_clust = 32;
4be12: 7220 moveq #32,%d1 <== 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
*/
uint32_t fat12_sect_per_clust = 8;
4be14: 7008 moveq #8,%d0 <== NOT EXECUTED
4be16: 6000 f56a braw 4b382 <msdos_format+0x12c> <== NOT EXECUTED
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
int cnt;
from = ""; /* default: make "from" point to empty string */
if ((rqdata != NULL) &&
4be1a: 4a8a tstl %a2
4be1c: 6600 fa5c bnew 4b87a <msdos_format+0x624>
4be20: 6000 fa68 braw 4b88a <msdos_format+0x634> <== NOT EXECUTED
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
4be24: 486e fe00 pea %fp@(-512)
4be28: 4eb9 0005 1da4 jsr 51da4 <rtems_clock_get_tod_timeval>
if (rc == RTEMS_SUCCESSFUL) {
4be2e: 588f addql #4,%sp
4be30: 4a80 tstl %d0
4be32: 6700 fa9a beqw 4b8ce <msdos_format+0x678>
4be36: 6000 fa9e braw 4b8d6 <msdos_format+0x680>
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)) {
4be3a: 2f02 movel %d2,%sp@-
4be3c: 486e fe00 pea %fp@(-512)
4be40: 2f03 movel %d3,%sp@-
4be42: 4eb9 0005 1930 jsr 51930 <read>
4be48: 4fef 000c lea %sp@(12),%sp
4be4c: 4a80 tstl %d0
4be4e: 6c0a bges 4be5a <msdos_format+0xc04> <== ALWAYS TAKEN
4be50: 602e bras 4be80 <msdos_format+0xc2a> <== NOT EXECUTED
}
}
if ( fmt_params->totl_sector_cnt == 0 )
{
errno = EINVAL;
ret_val = -1;
4be52: 2002 movel %d2,%d0 <== NOT EXECUTED
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
fmt_params.sectors_per_cluster,
fmt_params.skip_alignment);
for (i = 0;
4be54: 2400 movel %d0,%d2 <== NOT EXECUTED
4be56: 6000 ff50 braw 4bda8 <msdos_format+0xb52> <== NOT EXECUTED
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,
4be5a: 4879 0006 5cf0 pea 65cf0 <_CPU_m68k_BFFFO_table+0x211>
4be60: 4878 0002 pea 2 <DOUBLE_FLOAT>
4be64: 2f0a movel %a2,%sp@-
4be66: 4e93 jsr %a3@
{
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) {
4be68: 242e fdb4 movel %fp@(-588),%d2
4be6c: 4fef 000c lea %sp@(12),%sp
4be70: 0c82 0000 ffff cmpil #65535,%d2
4be76: 6300 fac6 blsw 4b93e <msdos_format+0x6e8>
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
4be7a: 4284 clrl %d4 <== NOT EXECUTED
4be7c: 6000 fac4 braw 4b942 <msdos_format+0x6ec> <== NOT EXECUTED
}
}
if ( fmt_params->totl_sector_cnt == 0 )
{
errno = EINVAL;
ret_val = -1;
4be80: 74ff moveq #-1,%d2 <== NOT EXECUTED
4be82: 60ce bras 4be52 <msdos_format+0xbfc> <== NOT EXECUTED
if (fd != -1) {
close(fd);
}
return ret_val;
}
4be84: 2002 movel %d2,%d0
4be86: 4cee 3cfc fd20 moveml %fp@(-736),%d2-%d7/%a2-%a5
4be8c: 4e5e unlk %fp <== NOT EXECUTED
0004b0e8 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b0e8: 4e56 ffd8 linkw %fp,#-40
4b0ec: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b0f0: 246e 0018 moveal %fp@(24),%a2
4b0f4: 2a2e 0008 movel %fp@(8),%d5
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4b0f8: 2f0a movel %a2,%sp@-
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b0fa: 242e 0010 movel %fp@(16),%d2
4b0fe: 162e 001f moveb %fp@(31),%d3
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4b102: 4eb9 0004 4410 jsr 44410 <malloc>
if (fill_buffer == NULL) {
4b108: 588f addql #4,%sp
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4b10a: 2800 movel %d0,%d4
if (fill_buffer == NULL) {
4b10c: 6610 bnes 4b11e <msdos_format_fill_sectors+0x36> <== ALWAYS TAKEN
errno = ENOMEM;
4b10e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
ret_val = -1;
4b114: 76ff moveq #-1,%d3 <== NOT EXECUTED
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
if (fill_buffer == NULL) {
errno = ENOMEM;
4b116: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b118: 700c moveq #12,%d0 <== NOT EXECUTED
4b11a: 2080 movel %d0,%a0@ <== NOT EXECUTED
4b11c: 6014 bras 4b132 <msdos_format_fill_sectors+0x4a> <== NOT EXECUTED
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4b11e: 2f0a movel %a2,%sp@-
4b120: 49c3 extbl %d3
4b122: 2f03 movel %d3,%sp@-
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
4b124: 4283 clrl %d3
if (fill_buffer == NULL) {
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4b126: 2f00 movel %d0,%sp@-
4b128: 4eb9 0005 71d8 jsr 571d8 <memset>
4b12e: 4fef 000c lea %sp@(12),%sp
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b132: 4879 0006 5bdf pea 65bdf <_CPU_m68k_BFFFO_table+0x100>
4b138: 49fa ff02 lea %pc@(4b03c <msdos_format_printf>),%a4
4b13c: 4878 0002 pea 2 <DOUBLE_FLOAT>
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
4b140: 7cff moveq #-1,%d6
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);
4b142: 4bfa ff3e lea %pc@(4b082 <msdos_format_write_sec>),%a5
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b146: 2f05 movel %d5,%sp@-
4b148: 4e94 jsr %a4@
4b14a: 2e2e 0014 movel %fp@(20),%d7
4b14e: 7064 moveq #100,%d0
4b150: 4c00 7800 mulsl %d0,%d7
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4b154: 4fef 000c lea %sp@(12),%sp
}
/*=========================================================================* \
| Function: |
\*-------------------------------------------------------------------------*/
static int msdos_format_fill_sectors
4b158: 266e 0014 moveal %fp@(20),%a3
4b15c: d7c2 addal %d2,%a3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4b15e: 6042 bras 4b1a2 <msdos_format_fill_sectors+0xba>
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
4b160: 222e 0014 movel %fp@(20),%d1
4b164: 2607 movel %d7,%d3
4b166: 4c41 3003 remul %d1,%d3,%d3
if (percent != last_percent) {
4b16a: bc83 cmpl %d3,%d6
4b16c: 671a beqs 4b188 <msdos_format_fill_sectors+0xa0>
if ((percent & 1) == 0)
4b16e: 0803 0000 btst #0,%d3
4b172: 6612 bnes 4b186 <msdos_format_fill_sectors+0x9e>
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
4b174: 4879 0006 5feb pea 65feb <IMFS_memfile_handlers+0x79>
4b17a: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b17e: 2f05 movel %d5,%sp@-
4b180: 4e94 jsr %a4@
4b182: 4fef 000c lea %sp@(12),%sp
*/
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
if (percent != last_percent) {
if ((percent & 1) == 0)
4b186: 2c03 movel %d3,%d6
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);
4b188: 2f04 movel %d4,%sp@-
4b18a: 0687 ffff ff9c addil #-100,%d7
4b190: 2f0a movel %a2,%sp@-
4b192: 2f02 movel %d2,%sp@-
4b194: 2f2e 000c movel %fp@(12),%sp@-
start_sector++;
4b198: 5282 addql #1,%d2
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);
4b19a: 4e95 jsr %a5@
4b19c: 4fef 0010 lea %sp@(16),%sp
4b1a0: 2600 movel %d0,%d3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4b1a2: 4a83 tstl %d3
4b1a4: 6604 bnes 4b1aa <msdos_format_fill_sectors+0xc2> <== NEVER TAKEN
4b1a6: b7c2 cmpal %d2,%a3
4b1a8: 66b6 bnes 4b160 <msdos_format_fill_sectors+0x78>
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");
4b1aa: 4879 0006 4ede pea 64ede <Configuration_Initial_Extensions+0x286>
4b1b0: 45fa fe8a lea %pc@(4b03c <msdos_format_printf>),%a2
4b1b4: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b1b8: 2f05 movel %d5,%sp@-
4b1ba: 4e92 jsr %a2@
if (ret_val)
4b1bc: 4fef 000c lea %sp@(12),%sp
4b1c0: 4a83 tstl %d3
4b1c2: 6714 beqs 4b1d8 <msdos_format_fill_sectors+0xf0> <== ALWAYS TAKEN
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4b1c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b1c6: 4879 0006 5bea pea 65bea <_CPU_m68k_BFFFO_table+0x10b> <== NOT EXECUTED
4b1cc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4b1d0: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b1d2: 4e92 jsr %a2@ <== NOT EXECUTED
4b1d4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
4b1d8: 4a84 tstl %d4
4b1da: 670a beqs 4b1e6 <msdos_format_fill_sectors+0xfe> <== NEVER TAKEN
free(fill_buffer);
4b1dc: 2f04 movel %d4,%sp@-
4b1de: 4eb9 0004 3f4c jsr 43f4c <free>
4b1e4: 588f addql #4,%sp
fill_buffer = NULL;
}
return ret_val;
}
4b1e6: 2003 movel %d3,%d0
4b1e8: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
4b1ee: 4e5e unlk %fp <== NOT EXECUTED
0004b03c <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
4b03c: 4e56 0000 linkw %fp,#0
4b040: 206e 0008 moveal %fp@(8),%a0
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
4b044: 4a88 tstl %a0
4b046: 6736 beqs 4b07e <msdos_format_printf+0x42> <== NEVER TAKEN
4b048: 202e 000c movel %fp@(12),%d0
4b04c: b0a8 0018 cmpl %a0@(24),%d0
4b050: 6e2c bgts 4b07e <msdos_format_printf+0x42> <== ALWAYS TAKEN
{
vfprintf (stdout, format, args);
4b052: 486e 0014 pea %fp@(20) <== NOT EXECUTED
4b056: 2079 0006 6e10 moveal 66e10 <_impure_ptr>,%a0 <== NOT EXECUTED
4b05c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4b060: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4b064: 4eb9 0005 e158 jsr 5e158 <vfprintf> <== NOT EXECUTED
fflush (stdout);
4b06a: 2079 0006 6e10 moveal 66e10 <_impure_ptr>,%a0 <== NOT EXECUTED
4b070: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4b074: 4eb9 0005 6b3e jsr 56b3e <fflush> <== NOT EXECUTED
4b07a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
va_end (args);
}
4b07e: 4e5e unlk %fp <== NOT EXECUTED
0004b082 <msdos_format_write_sec>:
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4b082: 4280 clrl %d0
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b084: 4e56 0000 linkw %fp,#0
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4b088: 222e 000c movel %fp@(12),%d1
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b08c: 2f03 movel %d3,%sp@-
4b08e: 262e 0010 movel %fp@(16),%d3
4b092: 2f02 movel %d2,%sp@-
4b094: 242e 0008 movel %fp@(8),%d2
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4b098: 42a7 clrl %sp@-
4b09a: 2f03 movel %d3,%sp@-
4b09c: 42a7 clrl %sp@-
4b09e: 2f01 movel %d1,%sp@-
4b0a0: 2f00 movel %d0,%sp@-
4b0a2: 4eb9 0004 1098 jsr 41098 <__muldi3>
4b0a8: 4fef 000c lea %sp@(12),%sp
4b0ac: 2e81 movel %d1,%sp@
4b0ae: 2f00 movel %d0,%sp@-
4b0b0: 2f02 movel %d2,%sp@-
4b0b2: 4eb9 0005 165c jsr 5165c <lseek>
4b0b8: 4fef 0010 lea %sp@(16),%sp
4b0bc: 4a80 tstl %d0
4b0be: 6a04 bpls 4b0c4 <msdos_format_write_sec+0x42> <== ALWAYS TAKEN
4b0c0: 70ff moveq #-1,%d0 <== NOT EXECUTED
4b0c2: 6018 bras 4b0dc <msdos_format_write_sec+0x5a> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
4b0c4: 2f03 movel %d3,%sp@-
4b0c6: 2f2e 0014 movel %fp@(20),%sp@-
4b0ca: 2f02 movel %d2,%sp@-
4b0cc: 4eb9 0004 7604 jsr 47604 <write>
4b0d2: 4fef 000c lea %sp@(12),%sp
4b0d6: 4a80 tstl %d0
4b0d8: 5dc0 slt %d0
4b0da: 49c0 extbl %d0
ret_val = -1;
}
}
return ret_val;
}
4b0dc: 242e fff8 movel %fp@(-8),%d2
4b0e0: 262e fffc movel %fp@(-4),%d3
4b0e4: 4e5e unlk %fp <== NOT EXECUTED
000548a4 <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
)
{
548a4: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED
548a8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED
548ac: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
548b0: 246c 0008 moveal %a4@(8),%a2 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
548b4: 486e ffbc pea %fp@(-68) <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
548b8: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
548bc: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
548be: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
548c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
char *dir_entry
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
548c4: 42ae ffbc clrl %fp@(-68) <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
548c8: 4eb9 0004 f0b0 jsr 4f0b0 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
548ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
548d2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
548d4: 6600 0222 bnew 54af8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x254><== NOT EXECUTED
return rc;
fat_fd->cln = cln;
548d8: 206e ffbc moveal %fp@(-68),%a0 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
548dc: 7020 moveq #32,%d0 <== NOT EXECUTED
548de: 4840 swap %d0 <== NOT EXECUTED
*/
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
if (rc != RC_OK)
return rc;
fat_fd->cln = cln;
548e0: 2143 001c movel %d3,%a0@(28) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
548e4: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
548e8: 2140 0014 movel %d0,%a0@(20) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
548ec: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
548f0: 2143 0036 movel %d3,%a0@(54) <== NOT EXECUTED
rc = fat_file_size(&fs_info->fat, fat_fd);
548f4: 2f08 movel %a0,%sp@- <== NOT EXECUTED
548f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
548f8: 4eb9 0004 f9d6 jsr 4f9d6 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
548fe: 508f addql #8,%sp <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(&fs_info->fat, fat_fd);
54900: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
54902: 6704 beqs 54908 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x64><== NOT EXECUTED
54904: 6000 0184 braw 54a8a <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1e6><== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
54908: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5490c: 240e movel %fp,%d2 <== NOT EXECUTED
5490e: 0682 ffff ffc0 addil #-64,%d2 <== NOT EXECUTED
54914: 283c 0005 71d8 movel #356824,%d4 <== NOT EXECUTED
5491a: 2044 moveal %d4,%a0 <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5491c: 263c 0005 3a64 movel #342628,%d3 <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
54922: 4bf9 0005 4022 lea 54022 <msdos_find_name_in_fat_file>,%a5 <== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find "." node in opened directory */
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
54928: 42a7 clrl %sp@- <== NOT EXECUTED
5492a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5492c: 4e90 jsr %a0@ <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
5492e: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
54932: 2043 moveal %d3,%a0 <== NOT EXECUTED
54934: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54936: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5493a: 4879 0006 5feb pea 65feb <IMFS_memfile_handlers+0x79> <== NOT EXECUTED
54940: 4e90 jsr %a0@ <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
54942: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54944: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54946: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5494a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5494e: 4879 0006 5feb pea 65feb <IMFS_memfile_handlers+0x79> <== NOT EXECUTED
54954: 42a7 clrl %sp@- <== NOT EXECUTED
54956: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
5495a: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5495c: 4e95 jsr %a5@ <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
5495e: 4fef 003c lea %sp@(60),%sp <== NOT EXECUTED
}
/* 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);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
54962: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
54964: 6704 beqs 5496a <msdos_get_dotdot_dir_info_cluster_num_and_offset+0xc6><== NOT EXECUTED
54966: 6000 0122 braw 54a8a <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1e6><== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* find ".." node in opened directory */
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
5496a: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5496e: 240e movel %fp,%d2 <== NOT EXECUTED
54970: 0682 ffff ffe0 addil #-32,%d2 <== NOT EXECUTED
54976: 2044 moveal %d4,%a0 <== NOT EXECUTED
54978: 42a7 clrl %sp@- <== NOT EXECUTED
5497a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5497c: 4e90 jsr %a0@ <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
5497e: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
54982: 2043 moveal %d3,%a0 <== NOT EXECUTED
54984: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54986: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
5498a: 4879 0006 5fea pea 65fea <IMFS_memfile_handlers+0x78> <== NOT EXECUTED
54990: 4e90 jsr %a0@ <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
54992: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54994: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54996: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5499a: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
5499e: 4879 0006 5fea pea 65fea <IMFS_memfile_handlers+0x78> <== NOT EXECUTED
549a4: 42a7 clrl %sp@- <== NOT EXECUTED
549a6: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
549aa: 2f0c movel %a4,%sp@- <== NOT EXECUTED
549ac: 4e95 jsr %a5@ <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
549ae: 4fef 003c lea %sp@(60),%sp <== NOT EXECUTED
}
/* 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);
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
549b2: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
549b4: 6704 beqs 549ba <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x116><== NOT EXECUTED
549b6: 6000 00d2 braw 54a8a <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1e6><== NOT EXECUTED
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
549ba: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
549be: 362e ffda movew %fp@(-38),%d3 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
549c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
549c4: 382e ffd4 movew %fp@(-44),%d4 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
549c8: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
if ( rc != RC_OK )
549ce: 508f addql #8,%sp <== NOT EXECUTED
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
549d0: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( rc != RC_OK )
549d2: 6600 0124 bnew 54af8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x254><== NOT EXECUTED
549d6: 4281 clrl %d1 <== NOT EXECUTED
549d8: 4282 clrl %d2 <== NOT EXECUTED
549da: 322e fff4 movew %fp@(-12),%d1 <== NOT EXECUTED
549de: 342e fffa movew %fp@(-6),%d2 <== NOT EXECUTED
549e2: 2001 movel %d1,%d0 <== NOT EXECUTED
549e4: e089 lsrl #8,%d1 <== NOT EXECUTED
549e6: e188 lsll #8,%d0 <== NOT EXECUTED
549e8: 8081 orl %d1,%d0 <== NOT EXECUTED
549ea: 2202 movel %d2,%d1 <== NOT EXECUTED
549ec: e08a lsrl #8,%d2 <== NOT EXECUTED
549ee: e189 lsll #8,%d1 <== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
549f0: 4840 swap %d0 <== NOT EXECUTED
549f2: 4240 clrw %d0 <== NOT EXECUTED
549f4: 8282 orl %d2,%d1 <== NOT EXECUTED
549f6: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
549fc: 8081 orl %d1,%d0 <== NOT EXECUTED
549fe: 6612 bnes 54a12 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x16e><== 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;
54a00: 70ff moveq #-1,%d0 <== NOT EXECUTED
54a02: 2740 0008 movel %d0,%a3@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
54a06: 2740 000c movel %d0,%a3@(12) <== 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;
54a0a: 7001 moveq #1,%d0 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
54a0c: 42ab 0004 clrl %a3@(4) <== NOT EXECUTED
54a10: 2680 movel %d0,%a3@ <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
54a12: 486e ffbc pea %fp@(-68) <== NOT EXECUTED
54a16: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54a1a: 4eb9 0004 f0b0 jsr 4f0b0 <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
54a20: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
54a24: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
54a26: 6600 00d0 bnew 54af8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x254><== NOT EXECUTED
54a2a: 4281 clrl %d1 <== NOT EXECUTED
54a2c: 4282 clrl %d2 <== NOT EXECUTED
54a2e: 322e fff4 movew %fp@(-12),%d1 <== NOT EXECUTED
54a32: 342e fffa movew %fp@(-6),%d2 <== NOT EXECUTED
54a36: 206e ffbc moveal %fp@(-68),%a0 <== NOT EXECUTED
54a3a: 2001 movel %d1,%d0 <== NOT EXECUTED
54a3c: e089 lsrl #8,%d1 <== NOT EXECUTED
54a3e: e188 lsll #8,%d0 <== NOT EXECUTED
54a40: 8081 orl %d1,%d0 <== NOT EXECUTED
54a42: 2202 movel %d2,%d1 <== NOT EXECUTED
54a44: e08a lsrl #8,%d2 <== NOT EXECUTED
54a46: e189 lsll #8,%d1 <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
54a48: 4840 swap %d0 <== NOT EXECUTED
54a4a: 4240 clrw %d0 <== NOT EXECUTED
54a4c: 8282 orl %d2,%d1 <== NOT EXECUTED
54a4e: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
54a54: 8081 orl %d1,%d0 <== NOT EXECUTED
54a56: 6608 bnes 54a60 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1bc><== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
54a58: 216a 0038 001c movel %a2@(56),%a0@(28) <== NOT EXECUTED
54a5e: 6004 bras 54a64 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1c0><== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
54a60: 2140 001c movel %d0,%a0@(28) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
54a64: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
54a68: 7020 moveq #32,%d0 <== NOT EXECUTED
54a6a: 4840 swap %d0 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
54a6c: 2168 001c 0036 movel %a0@(28),%a0@(54) <== NOT EXECUTED
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;
54a72: 2140 0014 movel %d0,%a0@(20) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
54a76: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(&fs_info->fat, fat_fd);
54a7a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
54a7c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54a7e: 4eb9 0004 f9d6 jsr 4f9d6 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
54a84: 508f addql #8,%sp <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(&fs_info->fat, fat_fd);
54a86: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
54a88: 670e beqs 54a98 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1f4><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
54a8a: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
54a8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54a90: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
54a96: 605e bras 54af6 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x252><== NOT EXECUTED
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,
54a98: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
54a9c: 0284 0000 ffff andil #65535,%d4 <== NOT EXECUTED
54aa2: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED
54aa8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54aaa: 2004 movel %d4,%d0 <== NOT EXECUTED
54aac: 2203 movel %d3,%d1 <== NOT EXECUTED
54aae: e08c lsrl #8,%d4 <== NOT EXECUTED
54ab0: e08b lsrl #8,%d3 <== NOT EXECUTED
54ab2: e188 lsll #8,%d0 <== NOT EXECUTED
54ab4: e189 lsll #8,%d1 <== NOT EXECUTED
54ab6: 8084 orl %d4,%d0 <== NOT EXECUTED
54ab8: 8283 orl %d3,%d1 <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
54aba: 4840 swap %d0 <== NOT EXECUTED
54abc: 4240 clrw %d0 <== NOT EXECUTED
54abe: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
54ac4: 8081 orl %d1,%d0 <== NOT EXECUTED
54ac6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
54ac8: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
54acc: 2f0c movel %a4,%sp@- <== NOT EXECUTED
54ace: 4eb9 0005 475c jsr 5475c <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
54ad4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54ad8: 41f9 0004 f462 lea 4f462 <fat_file_close>,%a0 <== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
/* in this directory find slot with specified cluster num */
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
54ade: 2400 movel %d0,%d2 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
54ae0: 670a beqs 54aec <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x248><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
54ae2: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
54ae6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54ae8: 4e90 jsr %a0@ <== NOT EXECUTED
54aea: 600a bras 54af6 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x252><== NOT EXECUTED
return rc;
}
rc = fat_file_close(&fs_info->fat, fat_fd);
54aec: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
54af0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54af2: 4e90 jsr %a0@ <== NOT EXECUTED
54af4: 2400 movel %d0,%d2 <== NOT EXECUTED
54af6: 508f addql #8,%sp <== NOT EXECUTED
return rc;
}
54af8: 2002 movel %d2,%d0 <== NOT EXECUTED
54afa: 4cee 3c1c ffa0 moveml %fp@(-96),%d2-%d4/%a2-%a5 <== NOT EXECUTED
54b00: 4e5e unlk %fp <== NOT EXECUTED
00054b04 <msdos_get_name_node>:
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,
54b04: 4280 clrl %d0
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
54b06: 4e56 ffe8 linkw %fp,#-24
54b0a: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
54b0e: 266e 0020 moveal %fp@(32),%a3
54b12: 246e 001c moveal %fp@(28),%a2
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,
54b16: 2f0b movel %a3,%sp@-
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
54b18: 282e 0010 movel %fp@(16),%d4
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,
54b1c: 2f0a movel %a2,%sp@-
54b1e: 2f2e 0018 movel %fp@(24),%sp@-
54b22: 2f2e 0014 movel %fp@(20),%sp@-
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
54b26: 286e 0008 moveal %fp@(8),%a4
54b2a: 142e 000f moveb %fp@(15),%d2
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,
54b2e: 2f04 movel %d4,%sp@-
54b30: 1002 moveb %d2,%d0
54b32: 2f00 movel %d0,%sp@-
54b34: 2f2c 0008 movel %a4@(8),%sp@-
54b38: 2f2c 0014 movel %a4@(20),%sp@-
54b3c: 4eb9 0005 4022 jsr 54022 <msdos_find_name_in_fat_file>
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
54b42: 4fef 0020 lea %sp@(32),%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,
54b46: 2600 movel %d0,%d3
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
54b48: 667e bnes 54bc8 <msdos_get_name_node+0xc4>
54b4a: 6078 bras 54bc4 <msdos_get_name_node+0xc0>
* Really, we should return cluster num and offset not of ".." slot, but
* slot which correspondes to real directory name.
*/
if (rc == RC_OK)
{
if (strncmp(name, "..", 2) == 0)
54b4c: 4878 0002 pea 2 <DOUBLE_FLOAT>
54b50: 4879 0006 5fea pea 65fea <IMFS_memfile_handlers+0x78>
54b56: 2f04 movel %d4,%sp@-
54b58: 4eb9 0005 8504 jsr 58504 <strncmp>
54b5e: 4fef 000c lea %sp@(12),%sp
54b62: 4a80 tstl %d0
54b64: 6662 bnes 54bc8 <msdos_get_name_node+0xc4> <== ALWAYS TAKEN
54b66: 4280 clrl %d0 <== NOT EXECUTED
54b68: 302b 0014 movew %a3@(20),%d0 <== NOT EXECUTED
54b6c: 2200 movel %d0,%d1 <== NOT EXECUTED
54b6e: e088 lsrl #8,%d0 <== NOT EXECUTED
54b70: e189 lsll #8,%d1 <== NOT EXECUTED
54b72: 8280 orl %d0,%d1 <== NOT EXECUTED
54b74: 4280 clrl %d0 <== NOT EXECUTED
54b76: 302b 001a movew %a3@(26),%d0 <== NOT EXECUTED
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
54b7a: 4841 swap %d1 <== NOT EXECUTED
54b7c: 4241 clrw %d1 <== NOT EXECUTED
54b7e: 2400 movel %d0,%d2 <== NOT EXECUTED
54b80: e088 lsrl #8,%d0 <== NOT EXECUTED
54b82: e18a lsll #8,%d2 <== NOT EXECUTED
54b84: 8480 orl %d0,%d2 <== NOT EXECUTED
54b86: 0282 0000 ffff andil #65535,%d2 <== NOT EXECUTED
54b8c: 8282 orl %d2,%d1 <== NOT EXECUTED
/* are we right under root dir ? */
if (dotdot_cln == 0)
54b8e: 6614 bnes 54ba4 <msdos_get_name_node+0xa0> <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
54b90: 70ff moveq #-1,%d0 <== NOT EXECUTED
/*
* 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;
54b92: 7201 moveq #1,%d1 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
54b94: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
54b98: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
54b9c: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
54ba0: 2481 movel %d1,%a2@ <== NOT EXECUTED
54ba2: 6024 bras 54bc8 <msdos_get_name_node+0xc4> <== NOT EXECUTED
}
else
{
rc =
54ba4: 2d4b 0014 movel %a3,%fp@(20) <== NOT EXECUTED
54ba8: 2d4a 0010 movel %a2,%fp@(16) <== NOT EXECUTED
54bac: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED
54bb0: 2d6c 0014 0008 movel %a4@(20),%fp@(8) <== NOT EXECUTED
}
}
}
}
return rc;
}
54bb6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED
54bbc: 4e5e unlk %fp <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
54bbe: 4ef9 0005 48a4 jmp 548a4 <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
create_node, name, name_len, name_type,
dir_pos, name_dir_entry);
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
return rc;
if (!create_node)
54bc4: 4a02 tstb %d2
54bc6: 6784 beqs 54b4c <msdos_get_name_node+0x48>
}
}
}
}
return rc;
}
54bc8: 2003 movel %d3,%d0
54bca: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
54bd0: 4e5e unlk %fp <== NOT EXECUTED
0004bf28 <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
)
{
4bf28: 4e56 ffd8 linkw %fp,#-40
4bf2c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%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));
4bf30: 4878 0098 pea 98 <DBL_MANT_DIG+0x63>
4bf34: 4878 0001 pea 1 <ADD>
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
)
{
4bf38: 266e 0008 moveal %fp@(8),%a3
4bf3c: 262e 0014 movel %fp@(20),%d3
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
4bf40: 42ae ffec clrl %fp@(-20)
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
4bf44: 4eb9 0004 3c8c jsr 43c8c <calloc>
if (!fs_info)
4bf4a: 508f addql #8,%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));
4bf4c: 2440 moveal %d0,%a2
if (!fs_info)
4bf4e: 4a80 tstl %d0
4bf50: 6610 bnes 4bf62 <msdos_initialize_support+0x3a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
4bf52: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4bf58: 740c moveq #12,%d2 <== NOT EXECUTED
4bf5a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bf5c: 2082 movel %d2,%a0@ <== NOT EXECUTED
4bf5e: 6000 0126 braw 4c086 <msdos_initialize_support+0x15e> <== NOT EXECUTED
temp_mt_entry->fs_info = fs_info;
4bf62: 2740 0008 movel %d0,%a3@(8)
rc = fat_init_volume_info(&fs_info->fat, temp_mt_entry->dev);
4bf66: 2f2b 0036 movel %a3@(54),%sp@-
4bf6a: 2f00 movel %d0,%sp@-
4bf6c: 4eb9 0005 0058 jsr 50058 <fat_init_volume_info>
if (rc != RC_OK)
4bf72: 508f addql #8,%sp
if (!fs_info)
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
rc = fat_init_volume_info(&fs_info->fat, temp_mt_entry->dev);
4bf74: 2400 movel %d0,%d2
if (rc != RC_OK)
4bf76: 670e beqs 4bf86 <msdos_initialize_support+0x5e> <== ALWAYS TAKEN
{
free(fs_info);
4bf78: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bf7a: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4bf80: 588f addql #4,%sp <== NOT EXECUTED
4bf82: 6000 0170 braw 4c0f4 <msdos_initialize_support+0x1cc> <== NOT EXECUTED
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
4bf86: 486e ffec pea %fp@(-20)
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
4bf8a: 70ff moveq #-1,%d0
4bf8c: 486e fff0 pea %fp@(-16)
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
4bf90: 256e 0010 008c movel %fp@(16),%a2@(140)
4bf96: 2d40 fff8 movel %d0,%fp@(-8)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
4bf9a: 2d40 fffc movel %d0,%fp@(-4)
/*
* 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;
4bf9e: 7001 moveq #1,%d0
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
4bfa0: 2f0a movel %a2,%sp@-
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
fs_info->directory_handlers = directory_handlers;
4bfa2: 2543 0088 movel %d3,%a2@(136)
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
4bfa6: 42ae fff4 clrl %fp@(-12)
/*
* 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;
4bfaa: 2d40 fff0 movel %d0,%fp@(-16)
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
4bfae: 4eb9 0004 f0b0 jsr 4f0b0 <fat_file_open>
if (rc != RC_OK)
4bfb4: 4fef 000c lea %sp@(12),%sp
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
4bfb8: 2400 movel %d0,%d2
if (rc != RC_OK)
4bfba: 6716 beqs 4bfd2 <msdos_initialize_support+0xaa> <== ALWAYS TAKEN
{
fat_shutdown_drive(&fs_info->fat);
4bfbc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bfbe: 4eb9 0005 08bc jsr 508bc <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4bfc4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bfc6: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4bfcc: 508f addql #8,%sp <== NOT EXECUTED
4bfce: 6000 0124 braw 4c0f4 <msdos_initialize_support+0x1cc> <== NOT EXECUTED
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4bfd2: 206e ffec moveal %fp@(-20),%a0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
4bfd6: 7020 moveq #32,%d0
4bfd8: 4840 swap %d0
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4bfda: 42a8 0010 clrl %a0@(16)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
4bfde: 2140 0014 movel %d0,%a0@(20)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
4bfe2: 202a 0038 movel %a2@(56),%d0
fat_fd->map.file_cln = 0;
4bfe6: 42a8 0032 clrl %a0@(50)
}
/* 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;
4bfea: 2140 001c movel %d0,%a0@(28)
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
4bfee: 2140 0036 movel %d0,%a0@(54)
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
4bff2: 6616 bnes 4c00a <msdos_initialize_support+0xe2> <== NEVER TAKEN
{
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) ?
fs_info->fat.vol.bpc :
4bff4: 4280 clrl %d0
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
4bff6: 222a 0028 movel %a2@(40),%d1
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
fs_info->fat.vol.bpc :
4bffa: 302a 0006 movew %a2@(6),%d0
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
4bffe: 2141 0018 movel %d1,%a0@(24)
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
4c002: b280 cmpl %d0,%d1
4c004: 6340 blss 4c046 <msdos_initialize_support+0x11e> <== NEVER TAKEN
4c006: 2001 movel %d1,%d0
4c008: 603c bras 4c046 <msdos_initialize_support+0x11e>
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(&fs_info->fat, fat_fd);
4c00a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4c00c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c00e: 4eb9 0004 f9d6 jsr 4f9d6 <fat_file_size> <== NOT EXECUTED
if ( rc != RC_OK )
4c014: 508f addql #8,%sp <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(&fs_info->fat, fat_fd);
4c016: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
4c018: 6726 beqs 4c040 <msdos_initialize_support+0x118> <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
4c01a: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
free(fs_info);
4c01e: 2404 movel %d4,%d2 <== NOT EXECUTED
else
{
rc = fat_file_size(&fs_info->fat, fat_fd);
if ( rc != RC_OK )
{
fat_file_close(&fs_info->fat, fat_fd);
4c020: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c022: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
4c028: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c02a: 4eb9 0005 08bc jsr 508bc <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4c030: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c032: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4c038: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c03c: 6000 00b6 braw 4c0f4 <msdos_initialize_support+0x1cc> <== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
4c040: 4280 clrl %d0 <== NOT EXECUTED
4c042: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
4c046: 4878 0001 pea 1 <ADD>
4c04a: 2f00 movel %d0,%sp@-
4c04c: 4eb9 0004 3c8c jsr 43c8c <calloc>
if (fs_info->cl_buf == NULL)
4c052: 508f addql #8,%sp
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
4c054: 2540 0094 movel %d0,%a2@(148)
if (fs_info->cl_buf == NULL)
4c058: 6630 bnes 4c08a <msdos_initialize_support+0x162> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
4c05a: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
4c05e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c060: 4eb9 0004 f462 jsr 4f462 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
4c066: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c068: 4eb9 0005 08bc jsr 508bc <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4c06e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c070: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
4c076: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4c07c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c080: 720c moveq #12,%d1 <== NOT EXECUTED
4c082: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c084: 2081 movel %d1,%a0@ <== NOT EXECUTED
4c086: 74ff moveq #-1,%d2
4c088: 606a bras 4c0f4 <msdos_initialize_support+0x1cc>
}
sc = rtems_semaphore_create(3,
4c08a: 486a 0090 pea %a2@(144)
4c08e: 42a7 clrl %sp@-
4c090: 4878 0010 pea 10 <INVALID_OPERATION>
4c094: 4878 0001 pea 1 <ADD>
4c098: 4878 0003 pea 3 <DIVIDE>
4c09c: 4eb9 0004 7a80 jsr 47a80 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
4c0a2: 4fef 0014 lea %sp@(20),%sp
4c0a6: 4a80 tstl %d0
4c0a8: 6736 beqs 4c0e0 <msdos_initialize_support+0x1b8>
{
fat_file_close(&fs_info->fat, fat_fd);
4c0aa: 2f2e ffec movel %fp@(-20),%sp@-
fat_shutdown_drive(&fs_info->fat);
free(fs_info->cl_buf);
4c0ae: 47f9 0004 3f4c lea 43f4c <free>,%a3
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
{
fat_file_close(&fs_info->fat, fat_fd);
4c0b4: 2f0a movel %a2,%sp@-
4c0b6: 4eb9 0004 f462 jsr 4f462 <fat_file_close>
fat_shutdown_drive(&fs_info->fat);
4c0bc: 2f0a movel %a2,%sp@-
4c0be: 4eb9 0005 08bc jsr 508bc <fat_shutdown_drive>
free(fs_info->cl_buf);
4c0c4: 2f2a 0094 movel %a2@(148),%sp@-
4c0c8: 4e93 jsr %a3@
free(fs_info);
4c0ca: 2f0a movel %a2,%sp@-
4c0cc: 4e93 jsr %a3@
rtems_set_errno_and_return_minus_one( EIO );
4c0ce: 4eb9 0005 67c0 jsr 567c0 <__errno>
4c0d4: 4fef 0014 lea %sp@(20),%sp
4c0d8: 2040 moveal %d0,%a0
4c0da: 7005 moveq #5,%d0
4c0dc: 2080 movel %d0,%a0@
4c0de: 60a6 bras 4c086 <msdos_initialize_support+0x15e>
}
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
4c0e0: 206b 0024 moveal %a3@(36),%a0
4c0e4: 216e ffec 0008 movel %fp@(-20),%a0@(8)
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
4c0ea: 2143 0010 movel %d3,%a0@(16)
temp_mt_entry->ops = op_table;
4c0ee: 276e 000c 000c movel %fp@(12),%a3@(12)
return rc;
}
4c0f4: 2002 movel %d2,%d0
4c0f6: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3
4c0fc: 4e5e unlk %fp <== NOT EXECUTED
0004bef6 <msdos_lock>:
.rename_h = msdos_rename,
.statvfs_h = rtems_filesystem_default_statvfs
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
4bef6: 4e56 0000 linkw %fp,#0
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
fs_info->vol_sema,
4befa: 206e 0008 moveal %fp@(8),%a0
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
4befe: 42a7 clrl %sp@-
4bf00: 42a7 clrl %sp@-
fs_info->vol_sema,
4bf02: 2068 0008 moveal %a0@(8),%a0
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_obtain(
4bf06: 2f28 0090 movel %a0@(144),%sp@-
4bf0a: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
fs_info->vol_sema,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if (sc != RTEMS_SUCCESSFUL) {
4bf10: 4fef 000c lea %sp@(12),%sp
4bf14: 4a80 tstl %d0
4bf16: 670c beqs 4bf24 <msdos_lock+0x2e> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
4bf18: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4bf1e: 4eb9 0004 8420 jsr 48420 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
4bf24: 4e5e unlk %fp <== NOT EXECUTED
00053a64 <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)
{
53a64: 4e56 ffd0 linkw %fp,#-48
53a68: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
53a6c: 2f2e 0014 movel %fp@(20),%sp@-
53a70: 4878 0020 pea 20 <OPER2+0xc>
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
53a74: 266e 0010 moveal %fp@(16),%a3
53a78: 246e 0008 moveal %fp@(8),%a2
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
53a7c: 2f0b movel %a3,%sp@-
*
*/
#define MSDOS_L2S_PRINT 0
msdos_name_type_t
msdos_long_to_short(const char *lfn, int lfn_len, char* sfn, int sfn_len)
{
53a7e: 262e 000c movel %fp@(12),%d3
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
53a82: 4eb9 0005 71d8 jsr 571d8 <memset>
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
53a88: 4fef 000c lea %sp@(12),%sp
53a8c: 722e moveq #46,%d1
53a8e: 1012 moveb %a2@,%d0
53a90: 49c0 extbl %d0
53a92: b280 cmpl %d0,%d1
53a94: 6666 bnes 53afc <msdos_long_to_short+0x98> <== ALWAYS TAKEN
53a96: 7401 moveq #1,%d2 <== NOT EXECUTED
53a98: b483 cmpl %d3,%d2 <== NOT EXECUTED
53a9a: 6608 bnes 53aa4 <msdos_long_to_short+0x40> <== NOT EXECUTED
{
sfn[0] = '.';
53a9c: 16bc 002e moveb #46,%a3@ <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[1]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
53aa0: 6000 016e braw 53c10 <msdos_long_to_short+0x1ac> <== NOT EXECUTED
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
53aa4: 7e2e moveq #46,%d7 <== NOT EXECUTED
53aa6: 102a 0001 moveb %a2@(1),%d0 <== NOT EXECUTED
53aaa: 49c0 extbl %d0 <== NOT EXECUTED
53aac: be80 cmpl %d0,%d7 <== NOT EXECUTED
53aae: 664c bnes 53afc <msdos_long_to_short+0x98> <== NOT EXECUTED
53ab0: 7002 moveq #2,%d0 <== NOT EXECUTED
53ab2: b083 cmpl %d3,%d0 <== NOT EXECUTED
53ab4: 6646 bnes 53afc <msdos_long_to_short+0x98> <== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
53ab6: 7401 moveq #1,%d2 <== NOT EXECUTED
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
{
sfn[0] = sfn[1] = '.';
53ab8: 722e moveq #46,%d1 <== NOT EXECUTED
53aba: 16bc 002e moveb #46,%a3@ <== NOT EXECUTED
53abe: 1741 0001 moveb %d1,%a3@(1) <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
53ac2: 6000 014c braw 53c10 <msdos_long_to_short+0x1ac> <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
53ac6: 7420 moveq #32,%d2
53ac8: 1232 0800 moveb %a2@(00000000,%d0:l),%d1
53acc: 49c1 extbl %d1
53ace: b481 cmpl %d1,%d2
53ad0: 6726 beqs 53af8 <msdos_long_to_short+0x94> <== NEVER TAKEN
53ad2: 7e2e moveq #46,%d7
53ad4: be81 cmpl %d1,%d7
53ad6: 6720 beqs 53af8 <msdos_long_to_short+0x94> <== NEVER TAKEN
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
53ad8: 2a79 0006 6e0c moveal 66e0c <__ctype_ptr__>,%a5
53ade: 4282 clrl %d2
53ae0: 7aff moveq #-1,%d5
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
53ae2: 49f9 0005 7d94 lea 57d94 <strchr>,%a4
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
53ae8: 4201 clrb %d1
53aea: 4207 clrb %d7
53aec: 1d41 fff9 moveb %d1,%fp@(-7)
53af0: 1d47 ffff moveb %d7,%fp@(-1)
53af4: 6000 00c6 braw 53bbc <msdos_long_to_short+0x158>
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
53af8: 5280 addql #1,%d0 <== NOT EXECUTED
53afa: 6002 bras 53afe <msdos_long_to_short+0x9a> <== 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))
53afc: 4280 clrl %d0
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
53afe: b680 cmpl %d0,%d3
53b00: 6ec4 bgts 53ac6 <msdos_long_to_short+0x62> <== ALWAYS TAKEN
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
53b02: 66d4 bnes 53ad8 <msdos_long_to_short+0x74> <== NOT EXECUTED
53b04: 6000 00d8 braw 53bde <msdos_long_to_short+0x17a> <== NOT EXECUTED
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
53b08: 1c04 moveb %d4,%d6
53b0a: 49c6 extbl %d6
53b0c: 2f06 movel %d6,%sp@-
53b0e: 4879 0006 6050 pea 66050 <msdos_file_handlers+0x2c>
53b14: 4e94 jsr %a4@
53b16: 508f addql #8,%sp
53b18: 4a80 tstl %d0
53b1a: 6600 00ca bnew 53be6 <msdos_long_to_short+0x182>
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
53b1e: 103c 002e moveb #46,%d0
53b22: b980 eorl %d4,%d0
53b24: 4a00 tstb %d0
53b26: 57c1 seq %d1
53b28: 4481 negl %d1
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
53b2a: 4a01 tstb %d1
53b2c: 6600 00d8 bnew 53c06 <msdos_long_to_short+0x1a2>
53b30: 4280 clrl %d0
53b32: 1004 moveb %d4,%d0
53b34: 7e07 moveq #7,%d7
53b36: 1035 0801 moveb %a5@(00000001,%d0:l),%d0
53b3a: 3040 moveaw %d0,%a0
53b3c: 2008 movel %a0,%d0
53b3e: c087 andl %d7,%d0
53b40: 4a00 tstb %d0
53b42: 6600 00b6 bnew 53bfa <msdos_long_to_short+0x196>
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
53b46: 2f06 movel %d6,%sp@- <== NOT EXECUTED
53b48: 4879 0006 6058 pea 66058 <msdos_file_handlers+0x34> <== NOT EXECUTED
53b4e: 2d41 fffa movel %d1,%fp@(-6) <== NOT EXECUTED
53b52: 4e94 jsr %a4@ <== NOT EXECUTED
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
53b54: 222e fffa movel %fp@(-6),%d1 <== NOT EXECUTED
{
if (strchr(" +,;=[]", ch) != NULL)
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
53b58: 508f addql #8,%sp <== NOT EXECUTED
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: c:%02x type:%d\n", *name, type);
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
53b5a: 4a80 tstl %d0 <== NOT EXECUTED
53b5c: 6600 009c bnew 53bfa <msdos_long_to_short+0x196> <== NOT EXECUTED
53b60: 607c bras 53bde <msdos_long_to_short+0x17a> <== NOT EXECUTED
return type;
if (dot_at >= 0)
{
if (is_dot || ((count - dot_at) > 3))
53b62: 2002 movel %d2,%d0
53b64: 9085 subl %d5,%d0
53b66: 7203 moveq #3,%d1
53b68: b280 cmpl %d0,%d1
53b6a: 6c12 bges 53b7e <msdos_long_to_short+0x11a> <== ALWAYS TAKEN
53b6c: 6078 bras 53be6 <msdos_long_to_short+0x182> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
53b6e: 7e08 moveq #8,%d7
53b70: be82 cmpl %d2,%d7
53b72: 6606 bnes 53b7a <msdos_long_to_short+0x116> <== ALWAYS TAKEN
53b74: 4a01 tstb %d1 <== NOT EXECUTED
53b76: 662c bnes 53ba4 <msdos_long_to_short+0x140> <== NOT EXECUTED
53b78: 606c bras 53be6 <msdos_long_to_short+0x182> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
53b7a: 4a01 tstb %d1
53b7c: 662a bnes 53ba8 <msdos_long_to_short+0x144>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
53b7e: 2004 movel %d4,%d0
53b80: 0680 ffff ffbf addil #-65,%d0
53b86: 7219 moveq #25,%d1
53b88: 0280 0000 00ff andil #255,%d0
53b8e: b280 cmpl %d0,%d1
53b90: 641a bccs 53bac <msdos_long_to_short+0x148> <== NEVER TAKEN
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
53b92: 0684 ffff ff9f addil #-97,%d4
53b98: 0284 0000 00ff andil #255,%d4
53b9e: b284 cmpl %d4,%d1
53ba0: 6412 bccs 53bb4 <msdos_long_to_short+0x150> <== ALWAYS TAKEN
53ba2: 6016 bras 53bba <msdos_long_to_short+0x156> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
53ba4: 7a08 moveq #8,%d5 <== NOT EXECUTED
53ba6: 6012 bras 53bba <msdos_long_to_short+0x156> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
53ba8: 2a02 movel %d2,%d5
53baa: 600e bras 53bba <msdos_long_to_short+0x156>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
53bac: 7e01 moveq #1,%d7 <== NOT EXECUTED
53bae: 1d47 fff9 moveb %d7,%fp@(-7) <== NOT EXECUTED
53bb2: 6006 bras 53bba <msdos_long_to_short+0x156> <== NOT EXECUTED
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
53bb4: 7201 moveq #1,%d1
53bb6: 1d41 ffff moveb %d1,%fp@(-1)
count++;
53bba: 5282 addql #1,%d2
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
53bbc: 1832 2800 moveb %a2@(00000000,%d2:l),%d4
53bc0: 6706 beqs 53bc8 <msdos_long_to_short+0x164>
53bc2: b682 cmpl %d2,%d3
53bc4: 6e00 ff42 bgtw 53b08 <msdos_long_to_short+0xa4>
count++;
name++;
}
if (lowercase && uppercase)
53bc8: 4a2e ffff tstb %fp@(-1)
53bcc: 6714 beqs 53be2 <msdos_long_to_short+0x17e> <== NEVER TAKEN
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
53bce: 4a2e fff9 tstb %fp@(-7)
53bd2: 56c2 sne %d2
53bd4: 7e01 moveq #1,%d7
53bd6: 49c2 extbl %d2
53bd8: 9e82 subl %d2,%d7
53bda: 2407 movel %d7,%d2
53bdc: 600a bras 53be8 <msdos_long_to_short+0x184>
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;
53bde: 4282 clrl %d2 <== NOT EXECUTED
53be0: 602e bras 53c10 <msdos_long_to_short+0x1ac> <== NOT EXECUTED
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
53be2: 7401 moveq #1,%d2 <== NOT EXECUTED
53be4: 6002 bras 53be8 <msdos_long_to_short+0x184> <== NOT EXECUTED
{
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: LONG[1]: is_dot:%d, at:%d cnt\n",
is_dot, dot_at, count);
#endif
return MSDOS_NAME_LONG;
53be6: 7402 moveq #2,%d2 <== NOT EXECUTED
printf ("MSDOS_L2S: INVALID[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_INVALID;
}
msdos_filename_unix2dos (lfn, lfn_len, sfn);
53be8: 2f0b movel %a3,%sp@-
53bea: 2f03 movel %d3,%sp@-
53bec: 2f0a movel %a2,%sp@-
53bee: 4eb9 0005 5cb6 jsr 55cb6 <msdos_filename_unix2dos>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
53bf4: 4fef 000c lea %sp@(12),%sp
53bf8: 6016 bras 53c10 <msdos_long_to_short+0x1ac>
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
53bfa: 70ff moveq #-1,%d0
53bfc: b085 cmpl %d5,%d0
53bfe: 6600 ff62 bnew 53b62 <msdos_long_to_short+0xfe>
53c02: 6000 ff6a braw 53b6e <msdos_long_to_short+0x10a>
53c06: 7eff moveq #-1,%d7
53c08: be85 cmpl %d5,%d7
53c0a: 66da bnes 53be6 <msdos_long_to_short+0x182> <== NEVER TAKEN
53c0c: 6000 ff60 braw 53b6e <msdos_long_to_short+0x10a>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
53c10: 2002 movel %d2,%d0
53c12: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
53c18: 4e5e unlk %fp <== NOT EXECUTED
0004c100 <msdos_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
4c100: 4e56 0000 linkw %fp,#0
4c104: 222e 0014 movel %fp@(20),%d1
4c108: 2f03 movel %d3,%sp@-
4c10a: 206e 0008 moveal %fp@(8),%a0
4c10e: 2f02 movel %d2,%sp@-
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
4c110: 2401 movel %d1,%d2
4c112: 0282 0000 f000 andil #61440,%d2
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
4c118: 226e 000c moveal %fp@(12),%a1
4c11c: 262e 0010 movel %fp@(16),%d3
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
4c120: 0c82 0000 4000 cmpil #16384,%d2
4c126: 670c beqs 4c134 <msdos_mknod+0x34> <== NEVER TAKEN
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
4c128: 7004 moveq #4,%d0
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
4c12a: 0c82 0000 8000 cmpil #32768,%d2
4c130: 6704 beqs 4c136 <msdos_mknod+0x36> <== ALWAYS TAKEN
4c132: 602a bras 4c15e <msdos_mknod+0x5e> <== NOT EXECUTED
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
4c134: 4280 clrl %d0 <== NOT EXECUTED
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
4c136: 2d43 0014 movel %d3,%fp@(20)
return rc;
}
4c13a: 242e fff8 movel %fp@(-8),%d2
4c13e: 262e fffc movel %fp@(-4),%d3
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
4c142: 42ae 001c clrl %fp@(28)
4c146: 2d41 0018 movel %d1,%fp@(24)
4c14a: 2d49 0010 movel %a1,%fp@(16)
4c14e: 2d40 000c movel %d0,%fp@(12)
4c152: 2d48 0008 movel %a0,%fp@(8)
return rc;
}
4c156: 4e5e unlk %fp
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
4c158: 4ef9 0005 3514 jmp 53514 <msdos_creat_node>
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4c15e: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
4c164: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4c168: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c16a: 7016 moveq #22,%d0 <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
4c16c: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
4c170: 4e5e unlk %fp <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4c172: 2080 movel %d0,%a0@ <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
4c174: 70ff moveq #-1,%d0 <== NOT EXECUTED
0004c18c <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
)
{
4c18c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4c190: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c192: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4c196: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
4c198: 242a 0008 movel %a2@(8),%d2 <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
4c19c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c19e: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4c1a4: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
4c1a8: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4c1ac: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4c1b0: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4c1b4: 4eb9 0005 3514 jsr 53514 <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
4c1ba: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4c1be: 4a80 tstl %d0 <== NOT EXECUTED
4c1c0: 6628 bnes 4c1ea <msdos_rename+0x5e> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4c1c2: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED
4c1c8: 103c ffe5 moveb #-27,%d0 <== NOT EXECUTED
4c1cc: 2d42 000c movel %d2,%fp@(12) <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
4c1d0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4c1d4: 2d40 0010 movel %d0,%fp@(16) <== NOT EXECUTED
4c1d8: 2d6a 0014 0008 movel %a2@(20),%fp@(8) <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
4c1de: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4c1e2: 4e5e unlk %fp <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4c1e4: 4ef9 0005 3e16 jmp 53e16 <msdos_set_first_char4file_name> <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
4c1ea: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
4c1ee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4c1f2: 4e5e unlk %fp <== NOT EXECUTED
...
0004c1f8 <msdos_rmnod>:
#include "msdos.h"
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
4c1f8: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
4c1fc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
4c200: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
4c204: 226b 0014 moveal %a3@(20),%a1 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
4c208: 246b 0008 moveal %a3@(8),%a2 <== NOT EXECUTED
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
4c20c: 2429 0008 movel %a1@(8),%d2 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
if (fat_fd->fat_file_type == MSDOS_DIRECTORY)
4c210: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED
4c214: 6644 bnes 4c25a <msdos_rmnod+0x62> <== NOT EXECUTED
{
bool is_empty = false;
4c216: 204e moveal %fp,%a0 <== NOT EXECUTED
4c218: 4220 clrb %a0@- <== NOT EXECUTED
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
4c21a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4c21c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c21e: 2f09 movel %a1,%sp@- <== NOT EXECUTED
4c220: 4eb9 0005 3f28 jsr 53f28 <msdos_dir_is_empty> <== NOT EXECUTED
if (rc != RC_OK)
4c226: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4c22a: 4a80 tstl %d0 <== NOT EXECUTED
4c22c: 665a bnes 4c288 <msdos_rmnod+0x90> <== NOT EXECUTED
{
return rc;
}
if (!is_empty)
4c22e: 4a2e ffff tstb %fp@(-1) <== NOT EXECUTED
4c232: 660e bnes 4c242 <msdos_rmnod+0x4a> <== NOT EXECUTED
{
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
4c234: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4c23a: 725a moveq #90,%d1 <== NOT EXECUTED
4c23c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c23e: 2081 movel %d1,%a0@ <== NOT EXECUTED
4c240: 6014 bras 4c256 <msdos_rmnod+0x5e> <== NOT EXECUTED
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
4c242: 7001 moveq #1,%d0 <== NOT EXECUTED
4c244: b0aa 0008 cmpl %a2@(8),%d0 <== NOT EXECUTED
4c248: 6410 bccs 4c25a <msdos_rmnod+0x62> <== NOT EXECUTED
{
rtems_set_errno_and_return_minus_one(EBUSY);
4c24a: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4c250: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c252: 7010 moveq #16,%d0 <== NOT EXECUTED
4c254: 2080 movel %d0,%a0@ <== NOT EXECUTED
4c256: 70ff moveq #-1,%d0 <== NOT EXECUTED
4c258: 602e bras 4c288 <msdos_rmnod+0x90> <== NOT EXECUTED
* not used - mount() not implemenetd yet.
*/
}
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
4c25a: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED
4c25e: 486a 0020 pea %a2@(32) <== NOT EXECUTED
4c262: 2f2b 0014 movel %a3@(20),%sp@- <== NOT EXECUTED
4c266: 4eb9 0005 3e16 jsr 53e16 <msdos_set_first_char4file_name> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
4c26c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4c270: 4a80 tstl %d0 <== NOT EXECUTED
4c272: 6614 bnes 4c288 <msdos_rmnod+0x90> <== NOT EXECUTED
{
return rc;
}
fat_file_mark_removed(&fs_info->fat, fat_fd);
4c274: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c276: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
4c27a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c27c: 4eb9 0004 f97c jsr 4f97c <fat_file_mark_removed> <== NOT EXECUTED
return rc;
4c282: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
4c286: 508f addql #8,%sp <== NOT EXECUTED
}
4c288: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED
4c28e: 4e5e unlk %fp <== NOT EXECUTED
...
00053c1c <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
)
{
53c1c: 4e56 ffe0 linkw %fp,#-32
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53c20: 206e 0008 moveal %fp@(8),%a0
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
53c24: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53c28: 2468 0008 moveal %a0@(8),%a2
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
53c2c: 49ee fffc lea %fp@(-4),%a4
53c30: 260e movel %fp,%d3
53c32: 5583 subql #2,%d3
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
53c34: 4282 clrl %d2
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
53c36: 2f0c movel %a4,%sp@-
int
msdos_set_dir_wrt_time_and_date(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
53c38: 266e 000c moveal %fp@(12),%a3
uint16_t time_val;
uint16_t date;
uint32_t sec = 0;
uint32_t byte = 0;
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
53c3c: 2f03 movel %d3,%sp@-
53c3e: 2f2b 003e movel %a3@(62),%sp@-
53c42: 4eb9 0005 5ad4 jsr 55ad4 <msdos_date_unix2dos>
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
53c48: 2f2b 0020 movel %a3@(32),%sp@-
53c4c: 2f0a movel %a2,%sp@-
53c4e: 4eba fddc jsr %pc@(53a2c <fat_cluster_num_to_sector_num>)
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
53c52: 222b 0024 movel %a3@(36),%d1
53c56: 142a 0002 moveb %a2@(2),%d2
53c5a: 2801 movel %d1,%d4
53c5c: e4ac lsrl %d2,%d4
53c5e: 2404 movel %d4,%d2
53c60: d480 addl %d0,%d2
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
53c62: 4280 clrl %d0
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
53c64: 508f addql #8,%sp
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
53c66: 4284 clrl %d4
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);
53c68: 3012 movew %a2@,%d0
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
53c6a: 2f0c movel %a4,%sp@-
53c6c: 4878 0002 pea 2 <DOUBLE_FLOAT>
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
53c70: 2640 moveal %d0,%a3
53c72: 538b subql #1,%a3
53c74: 200b movel %a3,%d0
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
53c76: 49f9 0004 fdbe lea 4fdbe <fat_sector_write>,%a4
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
53c7c: c081 andl %d1,%d0
53c7e: 4281 clrl %d1
53c80: 2640 moveal %d0,%a3
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
53c82: 486b 0016 pea %a3@(22)
53c86: 322e fffc movew %fp@(-4),%d1
53c8a: 2f02 movel %d2,%sp@-
53c8c: 2001 movel %d1,%d0
53c8e: e089 lsrl #8,%d1
53c90: e188 lsll #8,%d0
53c92: 2f0a movel %a2,%sp@-
53c94: 8081 orl %d1,%d0
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
53c96: 3d40 fffc movew %d0,%fp@(-4)
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
53c9a: 4e94 jsr %a4@
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
53c9c: 4fef 001c lea %sp@(28),%sp
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
53ca0: 2a00 movel %d0,%d5
2, (char *)(&time_val));
date = CT_LE_W(date);
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
53ca2: 2e83 movel %d3,%sp@
53ca4: 4878 0002 pea 2 <DOUBLE_FLOAT>
53ca8: 486b 0018 pea %a3@(24)
53cac: 382e fffe movew %fp@(-2),%d4
53cb0: 2f02 movel %d2,%sp@-
53cb2: 2204 movel %d4,%d1
53cb4: e08c lsrl #8,%d4
53cb6: e189 lsll #8,%d1
53cb8: 2f0a movel %a2,%sp@-
53cba: 8284 orl %d4,%d1
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
2, (char *)(&time_val));
date = CT_LE_W(date);
53cbc: 3d41 fffe movew %d1,%fp@(-2)
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
53cc0: 4e94 jsr %a4@
53cc2: 2800 movel %d0,%d4
2, (char *)(&date));
ret3 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
53cc4: 2f03 movel %d3,%sp@-
53cc6: 4878 0002 pea 2 <DOUBLE_FLOAT>
53cca: 486b 0012 pea %a3@(18)
53cce: 2f02 movel %d2,%sp@-
53cd0: 2f0a movel %a2,%sp@-
53cd2: 4e94 jsr %a4@
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
53cd4: 4fef 0028 lea %sp@(40),%sp
53cd8: 4a85 tstl %d5
53cda: 6c04 bges 53ce0 <msdos_set_dir_wrt_time_and_date+0xc4><== ALWAYS TAKEN
return -1;
53cdc: 70ff moveq #-1,%d0 <== NOT EXECUTED
53cde: 600a bras 53cea <msdos_set_dir_wrt_time_and_date+0xce><== NOT EXECUTED
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
2, (char *)(&date));
ret3 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
53ce0: 4a84 tstl %d4
53ce2: 6df8 blts 53cdc <msdos_set_dir_wrt_time_and_date+0xc0><== NEVER TAKEN
53ce4: 4a80 tstl %d0
53ce6: 6df4 blts 53cdc <msdos_set_dir_wrt_time_and_date+0xc0><== NEVER TAKEN
return -1;
return RC_OK;
53ce8: 4280 clrl %d0
}
53cea: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4
53cf0: 4e5e unlk %fp <== NOT EXECUTED
00053e16 <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
)
{
53e16: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
53e1a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53e1e: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
53e22: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
53e26: 2228 000c movel %a0@(12),%d1 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
53e2a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53e2e: 2469 0008 moveal %a1@(8),%a2 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
53e32: 2410 movel %a0@,%d2 <== NOT EXECUTED
53e34: 2828 0004 movel %a0@(4),%d4 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
53e38: 1d6e 0013 fff6 moveb %fp@(19),%fp@(-10) <== NOT EXECUTED
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;
53e3e: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
53e42: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
53e46: b4aa 0038 cmpl %a2@(56),%d2 <== NOT EXECUTED
53e4a: 6612 bnes 53e5e <msdos_set_first_char4file_name+0x48><== NOT EXECUTED
53e4c: 7203 moveq #3,%d1 <== NOT EXECUTED
53e4e: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
53e52: c081 andl %d1,%d0 <== NOT EXECUTED
53e54: 4a00 tstb %d0 <== NOT EXECUTED
53e56: 6706 beqs 53e5e <msdos_set_first_char4file_name+0x48><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
dir_block_size = fs_info->fat.vol.rdir_size;
53e58: 262a 0028 movel %a2@(40),%d3 <== NOT EXECUTED
53e5c: 6006 bras 53e64 <msdos_set_first_char4file_name+0x4e><== NOT EXECUTED
else
dir_block_size = fs_info->fat.vol.bpc;
53e5e: 4283 clrl %d3 <== NOT EXECUTED
53e60: 362a 0006 movew %a2@(6),%d3 <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
53e64: 7eff moveq #-1,%d7 <== NOT EXECUTED
53e66: bea8 0008 cmpl %a0@(8),%d7 <== NOT EXECUTED
53e6a: 660e bnes 53e7a <msdos_set_first_char4file_name+0x64><== NOT EXECUTED
start = dir_pos->sname;
53e6c: 2010 movel %a0@,%d0 <== NOT EXECUTED
53e6e: 2228 0004 movel %a0@(4),%d1 <== NOT EXECUTED
53e72: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
53e76: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
1, &fchar);
53e7a: 2a0e movel %fp,%d5 <== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(&fs_info->fat, start.cln, &start.cln);
53e7c: 2c0e movel %fp,%d6 <== NOT EXECUTED
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
53e7e: 47fa fbac lea %pc@(53a2c <fat_cluster_num_to_sector_num>),%a3<== NOT EXECUTED
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
1, &fchar);
53e82: 0685 ffff fff6 addil #-10,%d5 <== NOT EXECUTED
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
53e88: 49f9 0004 fdbe lea 4fdbe <fat_sector_write>,%a4 <== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(&fs_info->fat, start.cln, &start.cln);
53e8e: 5186 subql #8,%d6 <== NOT EXECUTED
53e90: 4bf9 0005 4f94 lea 54f94 <fat_get_fat_cluster>,%a5 <== NOT EXECUTED
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
53e96: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
53e9a: 4287 clrl %d7 <== NOT EXECUTED
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
53e9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53e9e: 4e93 jsr %a3@ <== NOT EXECUTED
53ea0: 508f addql #8,%sp <== NOT EXECUTED
(start.ofs >> fs_info->fat.vol.sec_log2));
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
53ea2: 2040 moveal %d0,%a0 <== NOT EXECUTED
53ea4: 2f05 movel %d5,%sp@- <== NOT EXECUTED
53ea6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
53eaa: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
53eae: 3e12 movew %a2@,%d7 <== NOT EXECUTED
53eb0: 5387 subql #1,%d7 <== NOT EXECUTED
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
53eb2: ce81 andl %d1,%d7 <== NOT EXECUTED
53eb4: 2f07 movel %d7,%sp@- <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(&fs_info->fat, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
53eb6: 4287 clrl %d7 <== NOT EXECUTED
53eb8: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED
53ebc: eea9 lsrl %d7,%d1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
53ebe: 4870 1800 pea %a0@(00000000,%d1:l) <== NOT EXECUTED
53ec2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53ec4: 4e94 jsr %a4@ <== NOT EXECUTED
1, &fchar);
if (ret < 0)
53ec6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
53eca: 4a80 tstl %d0 <== NOT EXECUTED
53ecc: 6d4e blts 53f1c <msdos_set_first_char4file_name+0x106><== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
53ece: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
53ed2: b480 cmpl %d0,%d2 <== NOT EXECUTED
53ed4: 660a bnes 53ee0 <msdos_set_first_char4file_name+0xca><== NOT EXECUTED
53ed6: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED
53eda: 6604 bnes 53ee0 <msdos_set_first_char4file_name+0xca><== NOT EXECUTED
return rc;
start.ofs = 0;
}
}
return RC_OK;
53edc: 4280 clrl %d0 <== NOT EXECUTED
53ede: 603e bras 53f1e <msdos_set_first_char4file_name+0x108><== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
53ee0: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
53ee4: 0681 0000 0020 addil #32,%d1 <== NOT EXECUTED
53eea: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
if (start.ofs >= dir_block_size)
53eee: b681 cmpl %d1,%d3 <== NOT EXECUTED
53ef0: 62a4 bhis 53e96 <msdos_set_first_char4file_name+0x80><== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
53ef2: b4aa 0038 cmpl %a2@(56),%d2 <== NOT EXECUTED
53ef6: 660c bnes 53f04 <msdos_set_first_char4file_name+0xee><== NOT EXECUTED
53ef8: 7e03 moveq #3,%d7 <== NOT EXECUTED
53efa: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED
53efe: c287 andl %d7,%d1 <== NOT EXECUTED
53f00: 4a01 tstb %d1 <== NOT EXECUTED
53f02: 66d8 bnes 53edc <msdos_set_first_char4file_name+0xc6><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
break;
rc = fat_get_fat_cluster(&fs_info->fat, start.cln, &start.cln);
53f04: 2f06 movel %d6,%sp@- <== NOT EXECUTED
53f06: 2f00 movel %d0,%sp@- <== NOT EXECUTED
53f08: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53f0a: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
53f0c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
53f10: 4a80 tstl %d0 <== NOT EXECUTED
53f12: 660a bnes 53f1e <msdos_set_first_char4file_name+0x108><== NOT EXECUTED
return rc;
start.ofs = 0;
53f14: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
53f18: 6000 ff7c braw 53e96 <msdos_set_first_char4file_name+0x80><== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
1, &fchar);
if (ret < 0)
return -1;
53f1c: 70ff moveq #-1,%d0 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
53f1e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
53f24: 4e5e unlk %fp <== NOT EXECUTED
00053cf4 <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
)
{
53cf4: 4e56 ffe4 linkw %fp,#-28
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;
53cf8: 4240 clrw %d0
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53cfa: 206e 0008 moveal %fp@(8),%a0
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
53cfe: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
53d02: 266e 000c moveal %fp@(12),%a3
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
53d06: 4282 clrl %d2
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
53d08: 2468 0008 moveal %a0@(8),%a2
uint32_t new_cln = fat_fd->cln;
53d0c: 262b 001c movel %a3@(28),%d3
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
53d10: 2f2b 0020 movel %a3@(32),%sp@-
)
{
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;
53d14: 3d40 fffc movew %d0,%fp@(-4)
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
53d18: 2f0a movel %a2,%sp@-
{
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;
53d1a: 3d40 fffe movew %d0,%fp@(-2)
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
53d1e: 4eba fd0c jsr %pc@(53a2c <fat_cluster_num_to_sector_num>)
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
53d22: 222b 0024 movel %a3@(36),%d1
53d26: 142a 0002 moveb %a2@(2),%d2
53d2a: 2801 movel %d1,%d4
53d2c: e4ac lsrl %d2,%d4
/*
* calculate input for fat_sector_write: convert (cluster num, offset) to
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
53d2e: 508f addql #8,%sp
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
53d30: d880 addl %d0,%d4
rc = fat_sync(&fs_info->fat);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
53d32: 2003 movel %d3,%d0
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
53d34: 47f9 0004 fdbe lea 4fdbe <fat_sector_write>,%a3
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
53d3a: 3412 movew %a2@,%d2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
53d3c: 486e fffc pea %fp@(-4)
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
53d40: 5382 subql #1,%d2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
53d42: 4878 0002 pea 2 <DOUBLE_FLOAT>
* (sector num, new offset)
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
53d46: c481 andl %d1,%d2
rc = fat_sync(&fs_info->fat);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
53d48: 0280 0000 ffff andil #65535,%d0
53d4e: 4243 clrw %d3
53d50: 4843 swap %d3
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
53d52: 2042 moveal %d2,%a0
53d54: 4868 001a pea %a0@(26)
53d58: 2200 movel %d0,%d1
53d5a: e089 lsrl #8,%d1
53d5c: e188 lsll #8,%d0
53d5e: 2f04 movel %d4,%sp@-
53d60: 8280 orl %d0,%d1
53d62: 2f0a movel %a2,%sp@-
sec = fat_cluster_num_to_sector_num(&fs_info->fat, fat_fd->dir_pos.sname.cln);
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
53d64: 3d41 fffc movew %d1,%fp@(-4)
ret1 = fat_sector_write(&fs_info->fat, sec,
53d68: 4e93 jsr %a3@
53d6a: 2203 movel %d3,%d1
53d6c: e089 lsrl #8,%d1
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
53d6e: 204e moveal %fp,%a0
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
/* byte from points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
53d70: 2a00 movel %d0,%d5
53d72: e18b lsll #8,%d3
53d74: 8283 orl %d3,%d1
byte + MSDOS_FIRST_CLUSTER_LOW_OFFSET, 2,
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
53d76: 3101 movew %d1,%a0@-
ret2 = fat_sector_write(&fs_info->fat, sec,
53d78: 2f08 movel %a0,%sp@-
53d7a: 4878 0002 pea 2 <DOUBLE_FLOAT>
53d7e: 2042 moveal %d2,%a0
53d80: 4868 0014 pea %a0@(20)
53d84: 2f04 movel %d4,%sp@-
53d86: 2f0a movel %a2,%sp@-
53d88: 4e93 jsr %a3@
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
53d8a: 4fef 0028 lea %sp@(40),%sp
53d8e: 4a85 tstl %d5
53d90: 6c04 bges 53d96 <msdos_set_first_cluster_num+0xa2><== ALWAYS TAKEN
return -1;
53d92: 70ff moveq #-1,%d0 <== NOT EXECUTED
53d94: 6006 bras 53d9c <msdos_set_first_cluster_num+0xa8><== NOT EXECUTED
(char *)(&le_cl_low));
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
ret2 = fat_sector_write(&fs_info->fat, sec,
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
53d96: 4a80 tstl %d0
53d98: 6df8 blts 53d92 <msdos_set_first_cluster_num+0x9e><== NEVER TAKEN
return -1;
return RC_OK;
53d9a: 4280 clrl %d0
}
53d9c: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3
53da2: 4e5e unlk %fp <== NOT EXECUTED
0004b1f2 <msdos_set_sectors_per_cluster_from_request>:
static int
msdos_set_sectors_per_cluster_from_request(
const msdos_format_request_param_t *rqdata,
msdos_format_param_t *fmt_params )
{
4b1f2: 4e56 0000 linkw %fp,#0
4b1f6: 226e 0008 moveal %fp@(8),%a1
4b1fa: 2f03 movel %d3,%sp@-
4b1fc: 206e 000c moveal %fp@(12),%a0
4b200: 2f02 movel %d2,%sp@-
int ret_val = -1;
uint32_t onebit;
if ( rqdata != NULL && rqdata->sectors_per_cluster > 0 ) {
4b202: 4a89 tstl %a1
4b204: 670a beqs 4b210 <msdos_set_sectors_per_cluster_from_request+0x1e><== NEVER TAKEN
4b206: 2029 0008 movel %a1@(8),%d0
4b20a: 6704 beqs 4b210 <msdos_set_sectors_per_cluster_from_request+0x1e>
fmt_params->sectors_per_cluster = rqdata->sectors_per_cluster;
4b20c: 2140 000c movel %d0,%a0@(12)
static int
msdos_set_sectors_per_cluster_from_request(
const msdos_format_request_param_t *rqdata,
msdos_format_param_t *fmt_params )
{
4b210: 223c 0000 0080 movel #128,%d1
4b216: 74ff moveq #-1,%d2
* 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 ) {
4b218: b2a8 000c cmpl %a0@(12),%d1
4b21c: 6216 bhis 4b234 <msdos_set_sectors_per_cluster_from_request+0x42>
fmt_params->sectors_per_cluster = onebit;
4b21e: 2141 000c movel %d1,%a0@(12)
if ( fmt_params->sectors_per_cluster
<= 32768L / fmt_params->bytes_per_sector ) {
4b222: 203c 0000 8000 movel #32768,%d0
4b228: 4c50 0000 remul %a0@,%d0,%d0
* 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
4b22c: b081 cmpl %d1,%d0
4b22e: 6504 bcss 4b234 <msdos_set_sectors_per_cluster_from_request+0x42><== NEVER TAKEN
<= 32768L / fmt_params->bytes_per_sector ) {
/* value is small enough so this value is ok */
onebit = 1;
4b230: 7201 moveq #1,%d1
ret_val = 0;
4b232: 4282 clrl %d2
* 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 ) {
4b234: e289 lsrl #1,%d1
4b236: 66e0 bnes 4b218 <msdos_set_sectors_per_cluster_from_request+0x26>
ret_val = 0;
}
}
}
if (ret_val != 0) {
4b238: 4a82 tstl %d2
4b23a: 670c beqs 4b248 <msdos_set_sectors_per_cluster_from_request+0x56><== ALWAYS TAKEN
errno = EINVAL;
4b23c: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4b242: 7216 moveq #22,%d1 <== NOT EXECUTED
4b244: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b246: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
return ret_val;
}
4b248: 2002 movel %d2,%d0
4b24a: 242e fff8 movel %fp@(-8),%d2
4b24e: 262e fffc movel %fp@(-4),%d3
4b252: 4e5e unlk %fp <== NOT EXECUTED
0005399c <msdos_shut_down>:
* temp_mt_entry - mount table entry
*
*/
void
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
5399c: 4e56 0000 linkw %fp,#0
539a0: 2f0b movel %a3,%sp@-
539a2: 266e 0008 moveal %fp@(8),%a3
539a6: 2f0a movel %a2,%sp@-
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
539a8: 246b 0008 moveal %a3@(8),%a2
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root->location.node_access;
539ac: 206b 0024 moveal %a3@(36),%a0
/* close fat-file which correspondes to root directory */
fat_file_close(&fs_info->fat, fat_fd);
539b0: 2f28 0008 movel %a0@(8),%sp@-
539b4: 2f0a movel %a2,%sp@-
539b6: 4eb9 0004 f462 jsr 4f462 <fat_file_close>
fat_shutdown_drive(&fs_info->fat);
539bc: 2f0a movel %a2,%sp@-
539be: 4eb9 0005 08bc jsr 508bc <fat_shutdown_drive>
rtems_semaphore_delete(fs_info->vol_sema);
539c4: 2f2a 0090 movel %a2@(144),%sp@-
539c8: 4eb9 0004 7c20 jsr 47c20 <rtems_semaphore_delete>
free(fs_info->cl_buf);
539ce: 2f2a 0094 movel %a2@(148),%sp@-
539d2: 4eb9 0004 3f4c jsr 43f4c <free>
free(temp_mt_entry->fs_info);
539d8: 2d6b 0008 0008 movel %a3@(8),%fp@(8)
539de: 4fef 0014 lea %sp@(20),%sp
}
539e2: 246e fff8 moveal %fp@(-8),%a2
539e6: 266e fffc moveal %fp@(-4),%a3
539ea: 4e5e unlk %fp
fat_shutdown_drive(&fs_info->fat);
rtems_semaphore_delete(fs_info->vol_sema);
free(fs_info->cl_buf);
free(temp_mt_entry->fs_info);
539ec: 4ef9 0004 3f4c jmp 43f4c <free>
...
00054daa <msdos_sync>:
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
54daa: 4e56 0000 linkw %fp,#0
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
54dae: 206e 0008 moveal %fp@(8),%a0
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
54db2: 2f0a movel %a2,%sp@-
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
54db4: 2068 0024 moveal %a0@(36),%a0
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
54db8: 2f02 movel %d2,%sp@-
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
54dba: 2468 0008 moveal %a0@(8),%a2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
54dbe: 42a7 clrl %sp@-
54dc0: 42a7 clrl %sp@-
54dc2: 2f2a 0090 movel %a2@(144),%sp@-
54dc6: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
54dcc: 4fef 000c lea %sp@(12),%sp
54dd0: 4a80 tstl %d0
54dd2: 6710 beqs 54de4 <msdos_sync+0x3a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
54dd4: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
54dda: 7405 moveq #5,%d2 <== NOT EXECUTED
54ddc: 2040 moveal %d0,%a0 <== NOT EXECUTED
54dde: 2082 movel %d2,%a0@ <== NOT EXECUTED
54de0: 74ff moveq #-1,%d2 <== NOT EXECUTED
54de2: 6016 bras 54dfa <msdos_sync+0x50> <== NOT EXECUTED
rc = fat_sync(&fs_info->fat);
54de4: 2f0a movel %a2,%sp@-
54de6: 4eb9 0005 07ec jsr 507ec <fat_sync>
rtems_semaphore_release(fs_info->vol_sema);
54dec: 2f2a 0090 movel %a2@(144),%sp@-
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);
rc = fat_sync(&fs_info->fat);
54df0: 2400 movel %d0,%d2
rtems_semaphore_release(fs_info->vol_sema);
54df2: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return rc;
54df8: 508f addql #8,%sp
}
54dfa: 2002 movel %d2,%d0
54dfc: 242e fff8 movel %fp@(-8),%d2
54e00: 246e fffc moveal %fp@(-4),%a2
54e04: 4e5e unlk %fp <== NOT EXECUTED
0004beca <msdos_unlock>:
rtems_fatal_error_occurred(0xdeadbeef);
}
}
void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
4beca: 4e56 0000 linkw %fp,#0
msdos_fs_info_t *fs_info = mt_entry->fs_info;
rtems_status_code sc = rtems_semaphore_release(fs_info->vol_sema);
4bece: 206e 0008 moveal %fp@(8),%a0
4bed2: 2068 0008 moveal %a0@(8),%a0
4bed6: 2f28 0090 movel %a0@(144),%sp@-
4beda: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
4bee0: 588f addql #4,%sp
4bee2: 4a80 tstl %d0
4bee4: 670c beqs 4bef2 <msdos_unlock+0x28> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
4bee6: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4beec: 4eb9 0004 8420 jsr 48420 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
4bef2: 4e5e unlk %fp <== NOT EXECUTED
00043486 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
43486: 4e56 fff4 linkw %fp,#-12
4348a: 48d7 040c moveml %d2-%d3/%a2,%sp@
4348e: 262e 0008 movel %fp@(8),%d3
43492: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
43496: b5c3 cmpal %d3,%a2
43498: 6608 bnes 434a2 <newlib_delete_hook+0x1c>
ptr = _REENT;
4349a: 2439 0005 c5c0 movel 5c5c0 <_impure_ptr>,%d2
434a0: 6004 bras 434a6 <newlib_delete_hook+0x20>
} else {
ptr = deleted_task->libc_reent;
434a2: 242a 00f4 movel %a2@(244),%d2
}
if (ptr && ptr != _global_impure_ptr) {
434a6: 4a82 tstl %d2
434a8: 6722 beqs 434cc <newlib_delete_hook+0x46> <== NEVER TAKEN
434aa: b4b9 0005 bbba cmpl 5bbba <_global_impure_ptr>,%d2
434b0: 671a beqs 434cc <newlib_delete_hook+0x46>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
434b2: 4879 0004 3294 pea 43294 <newlib_free_buffers>
434b8: 2f02 movel %d2,%sp@-
434ba: 4eb9 0004 ca80 jsr 4ca80 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
434c0: 2f02 movel %d2,%sp@-
434c2: 4eb9 0004 9418 jsr 49418 <_Workspace_Free>
434c8: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
434cc: 42aa 00f4 clrl %a2@(244)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
434d0: b5c3 cmpal %d3,%a2
434d2: 6606 bnes 434da <newlib_delete_hook+0x54>
_REENT = 0;
434d4: 42b9 0005 c5c0 clrl 5c5c0 <_impure_ptr>
}
}
434da: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
434e0: 4e5e unlk %fp <== NOT EXECUTED
00043294 <newlib_free_buffers>:
* task.
*/
int newlib_free_buffers(
FILE *fp
)
{
43294: 4e56 0000 linkw %fp,#0
43298: 2f0a movel %a2,%sp@-
4329a: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
4329e: 2f0a movel %a2,%sp@-
432a0: 4eb9 0004 c6e4 jsr 4c6e4 <fileno>
432a6: 588f addql #4,%sp
432a8: 7202 moveq #2,%d1
432aa: b280 cmpl %d0,%d1
432ac: 652c bcss 432da <newlib_free_buffers+0x46> <== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
432ae: 302a 000c movew %a2@(12),%d0
432b2: 0280 0000 0080 andil #128,%d0
432b8: 4a40 tstw %d0
432ba: 6728 beqs 432e4 <newlib_free_buffers+0x50> <== ALWAYS TAKEN
free( fp->_bf._base );
432bc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
432c0: 4eb9 0004 2a60 jsr 42a60 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
432c6: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
432ca: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
432ce: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
432d0: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
432d4: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
432d8: 6008 bras 432e2 <newlib_free_buffers+0x4e> <== NOT EXECUTED
}
break;
default:
fclose(fp);
432da: 2f0a movel %a2,%sp@- <== NOT EXECUTED
432dc: 4eb9 0004 c46c jsr 4c46c <fclose> <== NOT EXECUTED
432e2: 588f addql #4,%sp <== NOT EXECUTED
}
return 0;
}
432e4: 246e fffc moveal %fp@(-4),%a2
432e8: 4280 clrl %d0
432ea: 4e5e unlk %fp <== NOT EXECUTED
00041430 <notify>:
void
notify (s)
char *s;
{
41430: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
printf ("%s test appears to be inconsistent...\n", s);
41434: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
41438: 4879 0006 83b2 pea 683b2 <Configuration_Initial_Extensions+0x33e><== NOT EXECUTED
4143e: 4eb9 0005 b2ac jsr 5b2ac <printf> <== NOT EXECUTED
printf (" PLEASE NOTIFY KARPINKSI!\n");
41444: 508f addql #8,%sp <== NOT EXECUTED
41446: 203c 0006 83d9 movel #426969,%d0 <== NOT EXECUTED
4144c: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
41450: 4e5e unlk %fp <== NOT EXECUTED
void
notify (s)
char *s;
{
printf ("%s test appears to be inconsistent...\n", s);
printf (" PLEASE NOTIFY KARPINKSI!\n");
41452: 4ef9 0005 b3ac jmp 5b3ac <puts> <== NOT EXECUTED
00045a22 <null_op_fsmount_me>:
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
return -1;
}
45a22: 70ff moveq #-1,%d0 <== NOT EXECUTED
static int null_op_fsmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
45a24: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return -1;
}
45a28: 4e5e unlk %fp <== NOT EXECUTED
00045a36 <null_op_fsunmount_me>:
static void null_op_fsunmount_me(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
45a36: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* Do nothing */
}
45a3a: 4e5e unlk %fp <== NOT EXECUTED
000459f0 <null_op_link>:
const char *name,
size_t namelen
)
{
return -1;
}
459f0: 70ff moveq #-1,%d0 <== NOT EXECUTED
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
const char *name,
size_t namelen
)
{
459f2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return -1;
}
459f6: 4e5e unlk %fp <== NOT EXECUTED
00045a18 <null_op_mount>:
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
return -1;
}
45a18: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
static int null_op_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
45a1a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return -1;
}
45a1e: 4e5e unlk %fp <== NOT EXECUTED
00045a52 <null_op_readlink>:
char *buf,
size_t bufsize
)
{
return -1;
}
45a52: 70ff moveq #-1,%d0 <== NOT EXECUTED
static ssize_t null_op_readlink(
const rtems_filesystem_location_info_t *loc,
char *buf,
size_t bufsize
)
{
45a54: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return -1;
}
45a58: 4e5e unlk %fp <== NOT EXECUTED
00045a5c <null_op_rename>:
const char *name,
size_t namelen
)
{
return -1;
}
45a5c: 70ff moveq #-1,%d0 <== NOT EXECUTED
const rtems_filesystem_location_info_t *oldloc,
const rtems_filesystem_location_info_t *newparentloc,
const char *name,
size_t namelen
)
{
45a5e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return -1;
}
45a62: 4e5e unlk %fp <== NOT EXECUTED
000459e6 <null_op_rmnod>:
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *loc
)
{
return -1;
}
459e6: 70ff moveq #-1,%d0 <== NOT EXECUTED
static int null_op_rmnod(
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *loc
)
{
459e8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return -1;
}
459ec: 4e5e unlk %fp <== NOT EXECUTED
00044dc2 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
44dc2: 4e56 fff0 linkw %fp,#-16
44dc6: 48d7 040c moveml %d2-%d3/%a2,%sp@
44dca: 246e 000c moveal %fp@(12),%a2
44dce: 242e 0008 movel %fp@(8),%d2
int i;
if (tty->termios.c_oflag & OPOST) {
44dd2: 202a 0034 movel %a2@(52),%d0
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
44dd6: 1d42 fffe moveb %d2,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
44dda: 0800 0000 btst #0,%d0
44dde: 6700 0100 beqw 44ee0 <oproc+0x11e>
switch (c) {
44de2: 4281 clrl %d1
44de4: 1202 moveb %d2,%d1
44de6: 7609 moveq #9,%d3
44de8: b681 cmpl %d1,%d3
44dea: 6776 beqs 44e62 <oproc+0xa0>
44dec: 650e bcss 44dfc <oproc+0x3a> <== ALWAYS TAKEN
44dee: 163c 0008 moveb #8,%d3 <== NOT EXECUTED
44df2: b681 cmpl %d1,%d3 <== NOT EXECUTED
44df4: 6600 00a6 bnew 44e9c <oproc+0xda> <== NOT EXECUTED
44df8: 6000 0094 braw 44e8e <oproc+0xcc> <== NOT EXECUTED
44dfc: 760a moveq #10,%d3
44dfe: b681 cmpl %d1,%d3
44e00: 670c beqs 44e0e <oproc+0x4c>
44e02: 163c 000d moveb #13,%d3
44e06: b681 cmpl %d1,%d3
44e08: 6600 0092 bnew 44e9c <oproc+0xda>
44e0c: 602e bras 44e3c <oproc+0x7a> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
44e0e: 0800 0005 btst #5,%d0
44e12: 6704 beqs 44e18 <oproc+0x56> <== ALWAYS TAKEN
tty->column = 0;
44e14: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
44e18: 44c0 movew %d0,%ccr
44e1a: 6600 00c4 bnew 44ee0 <oproc+0x11e>
rtems_termios_puts ("\r", 1, tty);
44e1e: 2f0a movel %a2,%sp@-
44e20: 4878 0001 pea 1 <ADD>
44e24: 4879 0005 b5f0 pea 5b5f0 <rtems_termios_baud_table+0xfc>
44e2a: 4eb9 0004 4cd4 jsr 44cd4 <rtems_termios_puts>
tty->column = 0;
44e30: 4fef 000c lea %sp@(12),%sp
44e34: 42aa 0028 clrl %a2@(40)
44e38: 6000 00a6 braw 44ee0 <oproc+0x11e>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
44e3c: 0800 0004 btst #4,%d0 <== NOT EXECUTED
44e40: 6708 beqs 44e4a <oproc+0x88> <== NOT EXECUTED
44e42: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED
44e46: 6700 00ac beqw 44ef4 <oproc+0x132> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
44e4a: 44c0 movew %d0,%ccr <== NOT EXECUTED
44e4c: 6a0e bpls 44e5c <oproc+0x9a> <== NOT EXECUTED
c = '\n';
44e4e: 720a moveq #10,%d1 <== NOT EXECUTED
44e50: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
44e54: 0800 0005 btst #5,%d0 <== NOT EXECUTED
44e58: 6700 0086 beqw 44ee0 <oproc+0x11e> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
44e5c: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
break;
44e60: 607e bras 44ee0 <oproc+0x11e> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
44e62: 242a 0028 movel %a2@(40),%d2
44e66: 7207 moveq #7,%d1
44e68: 7608 moveq #8,%d3
44e6a: c282 andl %d2,%d1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44e6c: 0280 0000 1800 andil #6144,%d0
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44e72: 9681 subl %d1,%d3
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
44e74: d483 addl %d3,%d2
44e76: 2542 0028 movel %d2,%a2@(40)
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44e7a: 0c80 0000 1800 cmpil #6144,%d0
44e80: 665e bnes 44ee0 <oproc+0x11e> <== NEVER TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
44e82: 2f0a movel %a2,%sp@-
44e84: 2f03 movel %d3,%sp@-
44e86: 4879 0005 b5f2 pea 5b5f2 <rtems_termios_baud_table+0xfe>
44e8c: 605c bras 44eea <oproc+0x128>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
44e8e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
44e92: 6f4c bles 44ee0 <oproc+0x11e> <== NOT EXECUTED
tty->column--;
44e94: 5380 subql #1,%d0 <== NOT EXECUTED
44e96: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
44e9a: 6044 bras 44ee0 <oproc+0x11e> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
44e9c: 0800 0001 btst #1,%d0
44ea0: 6722 beqs 44ec4 <oproc+0x102> <== ALWAYS TAKEN
c = toupper(c);
44ea2: 4280 clrl %d0 <== NOT EXECUTED
44ea4: 1002 moveb %d2,%d0 <== NOT EXECUTED
44ea6: 7403 moveq #3,%d2 <== NOT EXECUTED
44ea8: 7602 moveq #2,%d3 <== NOT EXECUTED
44eaa: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0 <== NOT EXECUTED
44eb0: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
44eb4: c282 andl %d2,%d1 <== NOT EXECUTED
44eb6: b681 cmpl %d1,%d3 <== NOT EXECUTED
44eb8: 6606 bnes 44ec0 <oproc+0xfe> <== NOT EXECUTED
44eba: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED
44ec0: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (!iscntrl(c))
44ec4: 4280 clrl %d0
44ec6: 102e fffe moveb %fp@(-2),%d0
44eca: 7220 moveq #32,%d1
44ecc: 2079 0005 c5bc moveal 5c5bc <__ctype_ptr__>,%a0
44ed2: 1030 0801 moveb %a0@(00000001,%d0:l),%d0
44ed6: c081 andl %d1,%d0
44ed8: 4a00 tstb %d0
44eda: 6604 bnes 44ee0 <oproc+0x11e> <== NEVER TAKEN
tty->column++;
44edc: 52aa 0028 addql #1,%a2@(40)
break;
}
}
rtems_termios_puts (&c, 1, tty);
44ee0: 2f0a movel %a2,%sp@-
44ee2: 4878 0001 pea 1 <ADD>
44ee6: 486e fffe pea %fp@(-2)
44eea: 4eb9 0004 4cd4 jsr 44cd4 <rtems_termios_puts>
44ef0: 4fef 000c lea %sp@(12),%sp
}
44ef4: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
44efa: 4e5e unlk %fp <== NOT EXECUTED
00043954 <partition_free>:
* RETURNS:
* N/A
*/
static void
partition_free(rtems_part_desc_t *part_desc)
{
43954: 4e56 fff4 linkw %fp,#-12
43958: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4395c: 246e 0008 moveal %fp@(8),%a2
int part_num;
if (part_desc == NULL)
43960: 4a8a tstl %a2
43962: 674e beqs 439b2 <partition_free+0x5e>
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43964: 4281 clrl %d1
43966: 7405 moveq #5,%d2
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
43968: 102a 0001 moveb %a2@(1),%d0
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
4396c: 1200 moveb %d0,%d1
4396e: b481 cmpl %d1,%d2
43970: 670e beqs 43980 <partition_free+0x2c> <== NEVER TAKEN
43972: 7285 moveq #-123,%d1
43974: b380 eorl %d1,%d0
43976: 4a00 tstb %d0
43978: 57c0 seq %d0
4397a: 49c0 extbl %d0
4397c: 4480 negl %d0
4397e: 6002 bras 43982 <partition_free+0x2e>
43980: 7001 moveq #1,%d0 <== NOT EXECUTED
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
43982: 0800 0000 btst #0,%d0
43986: 6612 bnes 4399a <partition_free+0x46> <== NEVER TAKEN
{
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
43988: 2d4a 0008 movel %a2,%fp@(8)
}
4398c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
43992: 4e5e unlk %fp
{
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
43994: 4ef9 0004 4844 jmp 44844 <free>
int part_num;
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
4399a: 4282 clrl %d2 <== 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]);
4399c: 47fa ffb6 lea %pc@(43954 <partition_free>),%a3 <== NOT EXECUTED
439a0: 2f32 2818 movel %a2@(00000018,%d2:l),%sp@- <== NOT EXECUTED
439a4: 5882 addql #4,%d2 <== NOT EXECUTED
439a6: 4e93 jsr %a3@ <== NOT EXECUTED
if (part_desc == NULL)
return;
if (is_extended(part_desc->sys_type))
{
for (part_num = 0;
439a8: 588f addql #4,%sp <== NOT EXECUTED
439aa: 7010 moveq #16,%d0 <== NOT EXECUTED
439ac: b082 cmpl %d2,%d0 <== NOT EXECUTED
439ae: 66f0 bnes 439a0 <partition_free+0x4c> <== NOT EXECUTED
439b0: 60d6 bras 43988 <partition_free+0x34> <== NOT EXECUTED
partition_free(part_desc->sub_part[part_num]);
}
}
free(part_desc);
}
439b2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
439b8: 4e5e unlk %fp <== NOT EXECUTED
00043c12 <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)
{
43c12: 4e56 ff90 linkw %fp,#-112
43c16: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
43c1a: 42a7 clrl %sp@-
* 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)
{
43c1c: 242e 0008 movel %fp@(8),%d2
43c20: 246e 000c moveal %fp@(12),%a2
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
43c24: 2f02 movel %d2,%sp@-
43c26: 4eb9 0004 5630 jsr 45630 <open>
if (fd < 0)
43c2c: 508f addql #8,%sp
{
struct stat dev_stat;
rtems_status_code rc;
int fd;
fd = open(dev_name, O_RDONLY);
43c2e: 2600 movel %d0,%d3
if (fd < 0)
43c30: 6d00 01b2 bltw 43de4 <partition_table_get+0x1d2>
{
return RTEMS_INTERNAL_ERROR;
}
rc = fstat(fd, &dev_stat);
43c34: 486e ffba pea %fp@(-70)
43c38: 2f00 movel %d0,%sp@-
43c3a: 4eb9 0004 48cc jsr 448cc <fstat>
if (rc != RTEMS_SUCCESSFUL)
43c40: 508f addql #8,%sp
43c42: 4a80 tstl %d0
43c44: 670e beqs 43c54 <partition_table_get+0x42> <== ALWAYS TAKEN
{
close(fd);
43c46: 2f03 movel %d3,%sp@- <== NOT EXECUTED
43c48: 4eb9 0004 45d0 jsr 445d0 <close> <== NOT EXECUTED
43c4e: 588f addql #4,%sp <== NOT EXECUTED
43c50: 6000 0192 braw 43de4 <partition_table_get+0x1d2> <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
43c54: 4878 000f pea f <FPTRAP>
43c58: 2f02 movel %d2,%sp@-
43c5a: 486a 0008 pea %a2@(8)
43c5e: 4eb9 0005 2668 jsr 52668 <strncpy>
disk_desc->dev = dev_stat.st_rdev;
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
43c64: 4fef 000c lea %sp@(12),%sp
close(fd);
return RTEMS_INTERNAL_ERROR;
}
strncpy (disk_desc->dev_name, dev_name, 15);
disk_desc->dev = dev_stat.st_rdev;
43c68: 202e ffd0 movel %fp@(-48),%d0
43c6c: 222e ffd4 movel %fp@(-44),%d1
43c70: 2480 movel %d0,%a2@
43c72: 2541 0004 movel %d1,%a2@(4)
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
43c76: 222e fff8 movel %fp@(-8),%d1
43c7a: 203c 0000 0200 movel #512,%d0
43c80: 4a81 tstl %d1
43c82: 6702 beqs 43c86 <partition_table_get+0x74> <== ALWAYS TAKEN
43c84: 2001 movel %d1,%d0 <== NOT EXECUTED
43c86: 2540 0018 movel %d0,%a2@(24)
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
43c8a: 741b moveq #27,%d2
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
43c8c: 42a7 clrl %sp@-
43c8e: 42a7 clrl %sp@-
43c90: 42a7 clrl %sp@-
*/
static rtems_status_code
read_mbr(int fd, rtems_disk_desc_t *disk_desc)
{
int part_num;
rtems_sector_data_t *sector = NULL;
43c92: 42ae ffb2 clrl %fp@(-78)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
43c96: 2f03 movel %d3,%sp@-
43c98: 4eb9 0004 4c64 jsr 44c64 <lseek>
if (new_off != off) {
43c9e: 4fef 0010 lea %sp@(16),%sp
43ca2: 2800 movel %d0,%d4
43ca4: 8881 orl %d1,%d4
43ca6: 6614 bnes 43cbc <partition_table_get+0xaa> <== NEVER TAKEN
43ca8: 486e ffb2 pea %fp@(-78)
43cac: 42a7 clrl %sp@-
43cae: 2f03 movel %d3,%sp@-
43cb0: 4eba fc46 jsr %pc@(438f8 <get_sector.part.0>)
uint8_t *data;
rtems_status_code rc;
/* get MBR sector */
rc = get_sector(fd, 0, §or);
if (rc != RTEMS_SUCCESSFUL)
43cb4: 4fef 000c lea %sp@(12),%sp
43cb8: 2400 movel %d0,%d2
43cba: 670c beqs 43cc8 <partition_table_get+0xb6> <== ALWAYS TAKEN
{
if (sector)
43cbc: 202e ffb2 movel %fp@(-78),%d0 <== NOT EXECUTED
43cc0: 6700 0116 beqw 43dd8 <partition_table_get+0x1c6> <== NOT EXECUTED
free(sector);
43cc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43cc6: 6066 bras 43d2e <partition_table_get+0x11c> <== NOT EXECUTED
return rc;
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
43cc8: 206e ffb2 moveal %fp@(-78),%a0
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) &&
43ccc: 4280 clrl %d0
43cce: 1028 0202 moveb %a0@(514),%d0
43cd2: 7a55 moveq #85,%d5
43cd4: ba80 cmpl %d0,%d5
43cd6: 6612 bnes 43cea <partition_table_get+0xd8> <== NEVER TAKEN
43cd8: 72aa moveq #-86,%d1
43cda: 1028 0203 moveb %a0@(515),%d0
43cde: b380 eorl %d1,%d0
43ce0: 4a00 tstb %d0
43ce2: 57c0 seq %d0
43ce4: 49c0 extbl %d0
43ce6: 4480 negl %d0
43ce8: 6002 bras 43cec <partition_table_get+0xda>
43cea: 4280 clrl %d0 <== NOT EXECUTED
free(sector);
return rc;
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
43cec: 0800 0000 btst #0,%d0
43cf0: 6610 bnes 43d02 <partition_table_get+0xf0> <== ALWAYS TAKEN
{
free(sector);
43cf2: 2f08 movel %a0,%sp@- <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
43cf4: 7419 moveq #25,%d2 <== NOT EXECUTED
}
/* check if the partition table structure is MS-DOS style */
if (!msdos_signature_check(sector))
{
free(sector);
43cf6: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
43cfc: 588f addql #4,%sp <== NOT EXECUTED
43cfe: 6000 00d8 braw 43dd8 <partition_table_get+0x1c6> <== NOT EXECUTED
return RTEMS_INTERNAL_ERROR;
}
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
43d02: 2a08 movel %a0,%d5
43d04: 0685 0000 01c2 addil #450,%d5
43d0a: 264a moveal %a2,%a3
for (part_num = 0;
43d0c: 4284 clrl %d4
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
{
rc = data_to_part_desc(data, &part_desc);
43d0e: 49ee ffb6 lea %fp@(-74),%a4
43d12: 4bfa fcdc lea %pc@(439f0 <data_to_part_desc.part.1>),%a5
* RETURNS:
* RTEMS_SUCCESSFUL if success,
* RTEMS_INTERNAL_ERROR otherwise
*/
static rtems_status_code
partition_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
43d16: 2004 movel %d4,%d0
43d18: 2045 moveal %d5,%a0
43d1a: e988 lsll #4,%d0
43d1c: 2f0c movel %a4,%sp@-
43d1e: 4870 0800 pea %a0@(00000000,%d0:l)
43d22: 4e95 jsr %a5@
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)
43d24: 508f addql #8,%sp
43d26: 2400 movel %d0,%d2
43d28: 6710 beqs 43d3a <partition_table_get+0x128> <== ALWAYS TAKEN
{
free(sector);
43d2a: 2f2e ffb2 movel %fp@(-78),%sp@- <== NOT EXECUTED
43d2e: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
43d34: 588f addql #4,%sp <== NOT EXECUTED
43d36: 6000 00a0 braw 43dd8 <partition_table_get+0x1c6> <== NOT EXECUTED
return rc;
}
if (part_desc != NULL)
43d3a: 206e ffb6 moveal %fp@(-74),%a0
43d3e: 4a88 tstl %a0
43d40: 6720 beqs 43d62 <partition_table_get+0x150> <== NEVER TAKEN
* RETURNS:
* RTEMS_SUCCESSFUL if success,
* RTEMS_INTERNAL_ERROR otherwise
*/
static rtems_status_code
partition_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
43d42: 2004 movel %d4,%d0
43d44: 5280 addql #1,%d0
return rc;
}
if (part_desc != NULL)
{
part_desc->log_id = part_num + 1;
43d46: 1140 0002 moveb %d0,%a0@(2)
part_desc->disk_desc = disk_desc;
part_desc->end = part_desc->start + part_desc->size - 1;
43d4a: 2028 0004 movel %a0@(4),%d0
43d4e: d0a8 0008 addl %a0@(8),%d0
43d52: 5380 subql #1,%d0
}
if (part_desc != NULL)
{
part_desc->log_id = part_num + 1;
part_desc->disk_desc = disk_desc;
43d54: 214a 0010 movel %a2,%a0@(16)
part_desc->end = part_desc->start + part_desc->size - 1;
43d58: 2140 000c movel %d0,%a0@(12)
disk_desc->partitions[part_num] = part_desc;
43d5c: 2748 0028 movel %a0,%a3@(40)
43d60: 6004 bras 43d66 <partition_table_get+0x154>
}
else
{
disk_desc->partitions[part_num] = NULL;
43d62: 42ab 0028 clrl %a3@(40) <== NOT EXECUTED
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
for (part_num = 0;
part_num < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
part_num++)
43d66: 5284 addql #1,%d4
43d68: 588b addql #4,%a3
/* read and process 4 primary partition descriptors */
data = sector->data + RTEMS_IDE_PARTITION_TABLE_OFFSET;
for (part_num = 0;
43d6a: 7004 moveq #4,%d0
43d6c: b084 cmpl %d4,%d0
43d6e: 66a6 bnes 43d16 <partition_table_get+0x104>
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
43d70: 2f2e ffb2 movel %fp@(-78),%sp@-
43d74: 47f9 0004 4844 lea 44844 <free>,%a3
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
43d7a: 4284 clrl %d4
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
43d7c: 4e93 jsr %a3@
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
43d7e: 588f addql #4,%sp
43d80: 7204 moveq #4,%d1
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);
43d82: 49fa fd1c lea %pc@(43aa0 <read_extended_partition>),%a4
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
disk_desc->last_log_id = RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER;
43d86: 2541 0024 movel %d1,%a2@(36)
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];
43d8a: 2072 4828 moveal %a2@(00000028,%d4:l),%a0
43d8e: 2d48 ffb6 movel %a0,%fp@(-74)
if (part_desc != NULL && is_extended(part_desc->sys_type))
43d92: 673c beqs 43dd0 <partition_table_get+0x1be> <== NEVER TAKEN
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43d94: 4281 clrl %d1
43d96: 7a05 moveq #5,%d5
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))
43d98: 1028 0001 moveb %a0@(1),%d0
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43d9c: 1200 moveb %d0,%d1
43d9e: ba81 cmpl %d1,%d5
43da0: 670e beqs 43db0 <partition_table_get+0x19e>
43da2: 7285 moveq #-123,%d1
43da4: b380 eorl %d1,%d0
43da6: 4a00 tstb %d0
43da8: 57c0 seq %d0
43daa: 49c0 extbl %d0
43dac: 4480 negl %d0
43dae: 6002 bras 43db2 <partition_table_get+0x1a0>
43db0: 7001 moveq #1,%d0
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))
43db2: 0800 0000 btst #0,%d0
43db6: 6718 beqs 43dd0 <partition_table_get+0x1be>
{
read_extended_partition(fd, part_desc->start, part_desc);
43db8: 2f08 movel %a0,%sp@-
43dba: 2f28 0004 movel %a0@(4),%sp@-
43dbe: 2f03 movel %d3,%sp@-
43dc0: 4e94 jsr %a4@
free(part_desc);
43dc2: 2f2e ffb6 movel %fp@(-74),%sp@-
43dc6: 4e93 jsr %a3@
disk_desc->partitions[part_num] = NULL;
43dc8: 4fef 0010 lea %sp@(16),%sp
43dcc: 42b2 4828 clrl %a2@(00000028,%d4:l)
43dd0: 5884 addql #4,%d4
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;
43dd2: 7a10 moveq #16,%d5
43dd4: ba84 cmpl %d4,%d5
43dd6: 66b2 bnes 43d8a <partition_table_get+0x178>
disk_desc->sector_size = (dev_stat.st_blksize) ? dev_stat.st_blksize :
RTEMS_IDE_SECTOR_SIZE;
rc = read_mbr(fd, disk_desc);
close(fd);
43dd8: 2f03 movel %d3,%sp@-
43dda: 4eb9 0004 45d0 jsr 445d0 <close>
43de0: 588f addql #4,%sp
43de2: 6002 bras 43de6 <partition_table_get+0x1d4>
int fd;
fd = open(dev_name, O_RDONLY);
if (fd < 0)
{
return RTEMS_INTERNAL_ERROR;
43de4: 7419 moveq #25,%d2 <== NOT EXECUTED
rc = read_mbr(fd, disk_desc);
close(fd);
return rc;
}
43de6: 2002 movel %d2,%d0
43de8: 4cee 3c3c ff90 moveml %fp@(-112),%d2-%d5/%a2-%a5
43dee: 4e5e unlk %fp <== NOT EXECUTED
00043028 <pathconf>:
*/
long pathconf(
const char *path,
int name
)
{
43028: 4e56 0000 linkw %fp,#0
4302c: 2f03 movel %d3,%sp@-
4302e: 2f02 movel %d2,%sp@-
int status;
int fd;
fd = open( path, O_RDONLY );
43030: 42a7 clrl %sp@-
43032: 2f2e 0008 movel %fp@(8),%sp@-
43036: 4eb9 0004 2e50 jsr 42e50 <open>
if ( fd == -1 )
4303c: 508f addql #8,%sp
)
{
int status;
int fd;
fd = open( path, O_RDONLY );
4303e: 2400 movel %d0,%d2
if ( fd == -1 )
43040: 70ff moveq #-1,%d0
43042: b082 cmpl %d2,%d0
43044: 671c beqs 43062 <pathconf+0x3a> <== ALWAYS TAKEN
return -1;
status = fpathconf( fd, name );
43046: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4304a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4304c: 4eb9 0004 754c jsr 4754c <fpathconf> <== NOT EXECUTED
43052: 2600 movel %d0,%d3 <== NOT EXECUTED
(void) close( fd );
43054: 2f02 movel %d2,%sp@- <== NOT EXECUTED
43056: 4eb9 0004 74d4 jsr 474d4 <close> <== NOT EXECUTED
return status;
4305c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
43060: 6002 bras 43064 <pathconf+0x3c> <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
43062: 76ff moveq #-1,%d3
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
43064: 2003 movel %d3,%d0
43066: 242e fff8 movel %fp@(-8),%d2
4306a: 262e fffc movel %fp@(-4),%d3
4306e: 4e5e unlk %fp
...
0004ad54 <pipe_create>:
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
4ad54: 4e56 ffe4 linkw %fp,#-28
4ad58: 48d7 040c moveml %d2-%d3/%a2,%sp@
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4ad5c: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
4ad60: 4879 0005 cbbb pea 5cbbb <_CPU_m68k_BFFFO_table+0x100>
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
4ad66: 246e 0008 moveal %fp@(8),%a2
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4ad6a: 4eb9 0004 c08c jsr 4c08c <rtems_mkdir>
4ad70: 508f addql #8,%sp
4ad72: 4a80 tstl %d0
4ad74: 6600 00ea bnew 4ae60 <pipe_create+0x10c>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ad78: 4878 000a pea a <LASTO>
4ad7c: 260e movel %fp,%d3
4ad7e: 4879 0005 cbc0 pea 5cbc0 <_CPU_m68k_BFFFO_table+0x105>
4ad84: 0683 ffff fff1 addil #-15,%d3
4ad8a: 2f03 movel %d3,%sp@-
4ad8c: 4eb9 0004 dd10 jsr 4dd10 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ad92: 3039 0005 e5f8 movew 5e5f8 <rtems_pipe_no>,%d0
4ad98: 2200 movel %d0,%d1
4ad9a: 5281 addql #1,%d1
4ad9c: 3f00 movew %d0,%sp@-
4ad9e: 33c1 0005 e5f8 movew %d1,5e5f8 <rtems_pipe_no>
4ada4: 4267 clrw %sp@-
4ada6: 4879 0005 cbcb pea 5cbcb <_CPU_m68k_BFFFO_table+0x110>
4adac: 486e fffb pea %fp@(-5)
4adb0: 4eb9 0004 e170 jsr 4e170 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4adb6: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b>
4adba: 2f03 movel %d3,%sp@-
4adbc: 4eb9 0004 be40 jsr 4be40 <mkfifo>
4adc2: 4fef 0020 lea %sp@(32),%sp
4adc6: 4a80 tstl %d0
4adc8: 670a beqs 4add4 <pipe_create+0x80> <== ALWAYS TAKEN
if (errno != EEXIST){
4adca: 4eb9 0004 d4f0 jsr 4d4f0 <__errno> <== NOT EXECUTED
4add0: 6000 008e braw 4ae60 <pipe_create+0x10c> <== NOT EXECUTED
return -1;
/* sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); */
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
4add4: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
4add8: 2f03 movel %d3,%sp@-
4adda: 4eb9 0004 3f30 jsr 43f30 <open>
if (filsdes[0] < 0) {
4ade0: 508f addql #8,%sp
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);
4ade2: 2480 movel %d0,%a2@
if (filsdes[0] < 0) {
4ade4: 6c0e bges 4adf4 <pipe_create+0xa0>
err = errno;
4ade6: 4eb9 0004 d4f0 jsr 4d4f0 <__errno>
4adec: 2040 moveal %d0,%a0
4adee: 2410 movel %a0@,%d2
/* 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);
4adf0: 2f03 movel %d3,%sp@-
4adf2: 6054 bras 4ae48 <pipe_create+0xf4>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4adf4: b0b9 0005 d640 cmpl 5d640 <rtems_libio_number_iops>,%d0
4adfa: 6412 bccs 4ae0e <pipe_create+0xba> <== NEVER TAKEN
4adfc: 2200 movel %d0,%d1
4adfe: ed88 lsll #6,%d0
4ae00: e989 lsll #4,%d1
4ae02: 2079 0005 ecec moveal 5ecec <rtems_libio_iops>,%a0
4ae08: 9081 subl %d1,%d0
4ae0a: d1c0 addal %d0,%a0
4ae0c: 6002 bras 4ae10 <pipe_create+0xbc>
4ae0e: 91c8 subal %a0,%a0 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4ae10: 70fe moveq #-2,%d0
4ae12: c1a8 000c andl %d0,%a0@(12)
filsdes[1] = open(fifopath, O_WRONLY);
4ae16: 4878 0001 pea 1 <ADD>
4ae1a: 486e fff1 pea %fp@(-15)
4ae1e: 4eb9 0004 3f30 jsr 43f30 <open>
if (filsdes[1] < 0) {
4ae24: 508f addql #8,%sp
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
4ae26: 2540 0004 movel %d0,%a2@(4)
if (filsdes[1] < 0) {
4ae2a: 6c16 bges 4ae42 <pipe_create+0xee>
err = errno;
4ae2c: 4eb9 0004 d4f0 jsr 4d4f0 <__errno>
4ae32: 2040 moveal %d0,%a0
4ae34: 2410 movel %a0@,%d2
close(filsdes[0]);
4ae36: 2f12 movel %a2@,%sp@-
4ae38: 4eb9 0004 3080 jsr 43080 <close>
4ae3e: 588f addql #4,%sp
4ae40: 6002 bras 4ae44 <pipe_create+0xf0>
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
4ae42: 4282 clrl %d2
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4ae44: 486e fff1 pea %fp@(-15)
4ae48: 4eb9 0004 6734 jsr 46734 <unlink>
4ae4e: 588f addql #4,%sp
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
4ae50: 4280 clrl %d0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
4ae52: 4a82 tstl %d2
4ae54: 670c beqs 4ae62 <pipe_create+0x10e>
rtems_set_errno_and_return_minus_one(err);
4ae56: 4eb9 0004 d4f0 jsr 4d4f0 <__errno>
4ae5c: 2040 moveal %d0,%a0
4ae5e: 2082 movel %d2,%a0@
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
4ae60: 70ff moveq #-1,%d0
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4ae62: 4cee 040c ffe4 moveml %fp@(-28),%d2-%d3/%a2
4ae68: 4e5e unlk %fp <== NOT EXECUTED
0004bfe4 <pipe_ioctl>:
pipe_control_t *pipe,
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4bfe4: 4e56 0000 linkw %fp,#0
if (cmd == FIONREAD) {
4bfe8: 203c 4004 667f movel #1074030207,%d0
pipe_control_t *pipe,
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4bfee: 2f0b movel %a3,%sp@-
4bff0: 266e 0010 moveal %fp@(16),%a3
4bff4: 2f0a movel %a2,%sp@-
4bff6: 246e 0008 moveal %fp@(8),%a2
if (cmd == FIONREAD) {
4bffa: b0ae 000c cmpl %fp@(12),%d0
4bffe: 662e bnes 4c02e <pipe_ioctl+0x4a>
if (buffer == NULL)
4c000: 4a8b tstl %a3
4c002: 672e beqs 4c032 <pipe_ioctl+0x4e>
return -EFAULT;
if (! PIPE_LOCK(pipe))
4c004: 42a7 clrl %sp@-
4c006: 42a7 clrl %sp@-
4c008: 2f2a 0028 movel %a2@(40),%sp@-
4c00c: 4eb9 0004 78b8 jsr 478b8 <rtems_semaphore_obtain>
4c012: 4fef 000c lea %sp@(12),%sp
4c016: 4a80 tstl %d0
4c018: 661c bnes 4c036 <pipe_ioctl+0x52> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4c01a: 26aa 000c movel %a2@(12),%a3@
PIPE_UNLOCK(pipe);
4c01e: 2f2a 0028 movel %a2@(40),%sp@-
4c022: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
return 0;
4c028: 588f addql #4,%sp
4c02a: 4280 clrl %d0
4c02c: 600a bras 4c038 <pipe_ioctl+0x54>
}
return -EINVAL;
4c02e: 70ea moveq #-22,%d0
4c030: 6006 bras 4c038 <pipe_ioctl+0x54>
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
4c032: 70f2 moveq #-14,%d0
4c034: 6002 bras 4c038 <pipe_ioctl+0x54>
if (! PIPE_LOCK(pipe))
return -EINTR;
4c036: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4c038: 246e fff8 moveal %fp@(-8),%a2
4c03c: 266e fffc moveal %fp@(-4),%a3
4c040: 4e5e unlk %fp <== NOT EXECUTED
0004bd02 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4bd02: 4e56 ffd4 linkw %fp,#-44
4bd06: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bd0a: 42a7 clrl %sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4bd0c: 266e 0008 moveal %fp@(8),%a3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bd10: 45f9 0004 78b8 lea 478b8 <rtems_semaphore_obtain>,%a2
4bd16: 42a7 clrl %sp@-
4bd18: 2f2b 0028 movel %a3@(40),%sp@-
4bd1c: 4e92 jsr %a2@
4bd1e: 4fef 000c lea %sp@(12),%sp
4bd22: 4a80 tstl %d0
4bd24: 6600 0130 bnew 4be56 <pipe_read+0x154>
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4bd28: 280a movel %a2,%d4
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4bd2a: 2a0e movel %fp,%d5
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bd2c: 4282 clrl %d2
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4bd2e: 49f9 0004 79c0 lea 479c0 <rtems_semaphore_release>,%a4
if (! PIPE_READWAIT(pipe))
4bd34: 4bf9 0004 cbb0 lea 4cbb0 <rtems_barrier_wait>,%a5
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);
4bd3a: 45f9 0004 e9bc lea 4e9bc <memcpy>,%a2
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4bd40: 5985 subql #4,%d5
4bd42: 2c3c 0004 cb4c movel #314188,%d6
4bd48: 6000 00e8 braw 4be32 <pipe_read+0x130>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4bd4c: 4aab 0014 tstl %a3@(20)
4bd50: 6606 bnes 4bd58 <pipe_read+0x56>
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bd52: 4283 clrl %d3
4bd54: 6000 00ea braw 4be40 <pipe_read+0x13e>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4bd58: 206e 0014 moveal %fp@(20),%a0
4bd5c: 7001 moveq #1,%d0
4bd5e: c0a8 000c andl %a0@(12),%d0
4bd62: 6600 00da bnew 4be3e <pipe_read+0x13c>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4bd66: 52ab 0018 addql #1,%a3@(24)
PIPE_UNLOCK(pipe);
4bd6a: 2f2b 0028 movel %a3@(40),%sp@-
4bd6e: 4e94 jsr %a4@
if (! PIPE_READWAIT(pipe))
4bd70: 42a7 clrl %sp@-
4bd72: 2f2b 002c movel %a3@(44),%sp@-
4bd76: 4e95 jsr %a5@
4bd78: 4fef 000c lea %sp@(12),%sp
4bd7c: 4a80 tstl %d0
4bd7e: 6604 bnes 4bd84 <pipe_read+0x82> <== NEVER TAKEN
4bd80: 4283 clrl %d3
4bd82: 6002 bras 4bd86 <pipe_read+0x84>
ret = -EINTR;
4bd84: 76fc moveq #-4,%d3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
4bd86: 42a7 clrl %sp@-
4bd88: 2044 moveal %d4,%a0
4bd8a: 42a7 clrl %sp@-
4bd8c: 2f2b 0028 movel %a3@(40),%sp@-
4bd90: 4e90 jsr %a0@
4bd92: 4fef 000c lea %sp@(12),%sp
4bd96: 4a80 tstl %d0
4bd98: 6600 00b4 bnew 4be4e <pipe_read+0x14c>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4bd9c: 53ab 0018 subql #1,%a3@(24)
if (ret != 0)
4bda0: 4a83 tstl %d3
4bda2: 6600 009c bnew 4be40 <pipe_read+0x13e>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4bda6: 262b 000c movel %a3@(12),%d3
4bdaa: 67a0 beqs 4bd4c <pipe_read+0x4a>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4bdac: 202e 0010 movel %fp@(16),%d0
4bdb0: 9082 subl %d2,%d0
4bdb2: b083 cmpl %d3,%d0
4bdb4: 6402 bccs 4bdb8 <pipe_read+0xb6>
4bdb6: 2600 movel %d0,%d3
chunk1 = pipe->Size - pipe->Start;
4bdb8: 226b 0008 moveal %a3@(8),%a1
4bdbc: 2e2b 0004 movel %a3@(4),%d7
4bdc0: 9e89 subl %a1,%d7
4bdc2: d3d3 addal %a3@,%a1
4bdc4: 202e 000c movel %fp@(12),%d0
4bdc8: d082 addl %d2,%d0
if (chunk > chunk1) {
4bdca: be83 cmpl %d3,%d7
4bdcc: 6c24 bges 4bdf2 <pipe_read+0xf0>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4bdce: 2f07 movel %d7,%sp@-
4bdd0: 2f09 movel %a1,%sp@-
4bdd2: 2f00 movel %d0,%sp@-
4bdd4: 4e92 jsr %a2@
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4bdd6: 206e 000c moveal %fp@(12),%a0
4bdda: 2203 movel %d3,%d1
4bddc: 9287 subl %d7,%d1
4bdde: 2002 movel %d2,%d0
4bde0: d087 addl %d7,%d0
4bde2: 2f01 movel %d1,%sp@-
4bde4: 2f13 movel %a3@,%sp@-
4bde6: 4870 0800 pea %a0@(00000000,%d0:l)
4bdea: 4e92 jsr %a2@
4bdec: 4fef 0018 lea %sp@(24),%sp
4bdf0: 600c bras 4bdfe <pipe_read+0xfc>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4bdf2: 2f03 movel %d3,%sp@-
4bdf4: 2f09 movel %a1,%sp@-
4bdf6: 2f00 movel %d0,%sp@-
4bdf8: 4e92 jsr %a2@
4bdfa: 4fef 000c lea %sp@(12),%sp
pipe->Start += chunk;
4bdfe: 2003 movel %d3,%d0
4be00: d0ab 0008 addl %a3@(8),%d0
pipe->Start %= pipe->Size;
4be04: 4c6b 0001 0004 remul %a3@(4),%d1,%d0
pipe->Length -= chunk;
4be0a: 202b 000c movel %a3@(12),%d0
4be0e: 9083 subl %d3,%d0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4be10: 2741 0008 movel %d1,%a3@(8)
pipe->Length -= chunk;
4be14: 2740 000c movel %d0,%a3@(12)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4be18: 6604 bnes 4be1e <pipe_read+0x11c>
pipe->Start = 0;
4be1a: 42ab 0008 clrl %a3@(8)
if (pipe->waitingWriters > 0)
4be1e: 4aab 001c tstl %a3@(28)
4be22: 670c beqs 4be30 <pipe_read+0x12e>
PIPE_WAKEUPWRITERS(pipe);
4be24: 2f05 movel %d5,%sp@-
4be26: 2f2b 0030 movel %a3@(48),%sp@-
4be2a: 2046 moveal %d6,%a0
4be2c: 4e90 jsr %a0@
4be2e: 508f addql #8,%sp
read += chunk;
4be30: d483 addl %d3,%d2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4be32: b4ae 0010 cmpl %fp@(16),%d2
4be36: 6500 ff6e bcsw 4bda6 <pipe_read+0xa4>
4be3a: 6000 ff16 braw 4bd52 <pipe_read+0x50>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4be3e: 76f5 moveq #-11,%d3
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4be40: 2f2b 0028 movel %a3@(40),%sp@-
4be44: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
4be4a: 588f addql #4,%sp
4be4c: 6002 bras 4be50 <pipe_read+0x14e>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
4be4e: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4be50: 4a82 tstl %d2
4be52: 6e08 bgts 4be5c <pipe_read+0x15a>
4be54: 6004 bras 4be5a <pipe_read+0x158>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4be56: 74fc moveq #-4,%d2 <== NOT EXECUTED
4be58: 6002 bras 4be5c <pipe_read+0x15a> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
4be5a: 2403 movel %d3,%d2
}
4be5c: 2002 movel %d2,%d0
4be5e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4be64: 4e5e unlk %fp <== NOT EXECUTED
0004b8d4 <pipe_release>:
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4b8d4: 4e56 fff0 linkw %fp,#-16
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4b8d8: 206e 000c moveal %fp@(12),%a0
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4b8dc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4b8e0: 266e 0008 moveal %fp@(8),%a3
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4b8e4: 7406 moveq #6,%d2
4b8e6: 2028 000c movel %a0@(12),%d0
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
4b8ea: 2453 moveal %a3@,%a2
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4b8ec: c480 andl %d0,%d2
if (mode & LIBIO_FLAGS_READ)
4b8ee: 0800 0001 btst #1,%d0
4b8f2: 6704 beqs 4b8f8 <pipe_release+0x24>
pipe->Readers --;
4b8f4: 53aa 0010 subql #1,%a2@(16)
if (mode & LIBIO_FLAGS_WRITE)
4b8f8: 44c0 movew %d0,%ccr
4b8fa: 6604 bnes 4b900 <pipe_release+0x2c>
pipe->Writers --;
4b8fc: 53aa 0014 subql #1,%a2@(20)
PIPE_UNLOCK(pipe);
4b900: 2f2a 0028 movel %a2@(40),%sp@-
4b904: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
4b90a: 588f addql #4,%sp
4b90c: 4aaa 0010 tstl %a2@(16)
4b910: 6622 bnes 4b934 <pipe_release+0x60> <== NEVER TAKEN
4b912: 4aaa 0014 tstl %a2@(20)
4b916: 660c bnes 4b924 <pipe_release+0x50>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
4b918: 2f0a movel %a2,%sp@-
4b91a: 4eba ff70 jsr %pc@(4b88c <pipe_free>)
*pipep = NULL;
4b91e: 588f addql #4,%sp
4b920: 4293 clrl %a3@
4b922: 602c bras 4b950 <pipe_release+0x7c>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4b924: 7004 moveq #4,%d0
4b926: b082 cmpl %d2,%d0
4b928: 670a beqs 4b934 <pipe_release+0x60> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4b92a: 486e fffc pea %fp@(-4)
4b92e: 2f2a 0030 movel %a2@(48),%sp@-
4b932: 6014 bras 4b948 <pipe_release+0x74>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
4b934: 4aaa 0014 tstl %a2@(20)
4b938: 6616 bnes 4b950 <pipe_release+0x7c> <== NEVER TAKEN
4b93a: 7002 moveq #2,%d0
4b93c: b082 cmpl %d2,%d0
4b93e: 6710 beqs 4b950 <pipe_release+0x7c> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4b940: 486e fffc pea %fp@(-4)
4b944: 2f2a 002c movel %a2@(44),%sp@-
4b948: 4eb9 0004 cb4c jsr 4cb4c <rtems_barrier_release>
4b94e: 508f addql #8,%sp
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
4b950: 2f39 0005 f3f8 movel 5f3f8 <pipe_semaphore>,%sp@-
4b956: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
4b95c: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4b95e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
4b964: 4e5e unlk %fp <== NOT EXECUTED
0004be68 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4be68: 4e56 ffd4 linkw %fp,#-44
4be6c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4be70: 246e 0008 moveal %fp@(8),%a2
4be74: 282e 0010 movel %fp@(16),%d4
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4be78: 6700 0154 beqw 4bfce <pipe_write+0x166>
return 0;
if (! PIPE_LOCK(pipe))
4be7c: 42a7 clrl %sp@-
4be7e: 42a7 clrl %sp@-
4be80: 2f2a 0028 movel %a2@(40),%sp@-
4be84: 4eb9 0004 78b8 jsr 478b8 <rtems_semaphore_obtain>
4be8a: 4fef 000c lea %sp@(12),%sp
4be8e: 4a80 tstl %d0
4be90: 6600 0140 bnew 4bfd2 <pipe_write+0x16a>
return -EINTR;
if (pipe->Readers == 0) {
4be94: 4aaa 0010 tstl %a2@(16)
4be98: 6700 0112 beqw 4bfac <pipe_write+0x144>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4be9c: b8aa 0004 cmpl %a2@(4),%d4
4bea0: 6204 bhis 4bea6 <pipe_write+0x3e> <== NEVER TAKEN
4bea2: 2e04 movel %d4,%d7
4bea4: 6002 bras 4bea8 <pipe_write+0x40>
4bea6: 7e01 moveq #1,%d7 <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4bea8: 2a0e movel %fp,%d5
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
4beaa: 4282 clrl %d2
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4beac: 49f9 0004 79c0 lea 479c0 <rtems_semaphore_release>,%a4
if (! PIPE_WRITEWAIT(pipe))
4beb2: 4bf9 0004 cbb0 lea 4cbb0 <rtems_barrier_wait>,%a5
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);
4beb8: 47f9 0004 e9bc lea 4e9bc <memcpy>,%a3
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4bebe: 5985 subql #4,%d5
4bec0: 2c3c 0004 cb4c movel #314188,%d6
4bec6: 6000 00da braw 4bfa2 <pipe_write+0x13a>
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
4beca: 206e 0014 moveal %fp@(20),%a0
4bece: 7001 moveq #1,%d0
4bed0: c0a8 000c andl %a0@(12),%d0
4bed4: 6600 00dc bnew 4bfb2 <pipe_write+0x14a>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4bed8: 52aa 001c addql #1,%a2@(28)
PIPE_UNLOCK(pipe);
4bedc: 2f2a 0028 movel %a2@(40),%sp@-
4bee0: 4e94 jsr %a4@
if (! PIPE_WRITEWAIT(pipe))
4bee2: 42a7 clrl %sp@-
4bee4: 2f2a 0030 movel %a2@(48),%sp@-
4bee8: 4e95 jsr %a5@
4beea: 4fef 000c lea %sp@(12),%sp
4beee: 4a80 tstl %d0
4bef0: 6604 bnes 4bef6 <pipe_write+0x8e> <== NEVER TAKEN
4bef2: 4283 clrl %d3
4bef4: 6002 bras 4bef8 <pipe_write+0x90>
ret = -EINTR;
4bef6: 76fc moveq #-4,%d3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
4bef8: 42a7 clrl %sp@-
4befa: 42a7 clrl %sp@-
4befc: 2f2a 0028 movel %a2@(40),%sp@-
4bf00: 4eb9 0004 78b8 jsr 478b8 <rtems_semaphore_obtain>
4bf06: 4fef 000c lea %sp@(12),%sp
4bf0a: 4a80 tstl %d0
4bf0c: 6600 00b8 bnew 4bfc6 <pipe_write+0x15e>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4bf10: 53aa 001c subql #1,%a2@(28)
if (ret != 0)
4bf14: 4a83 tstl %d3
4bf16: 6600 00a0 bnew 4bfb8 <pipe_write+0x150>
goto out_locked;
if (pipe->Readers == 0) {
4bf1a: 4aaa 0010 tstl %a2@(16)
4bf1e: 6700 0096 beqw 4bfb6 <pipe_write+0x14e>
/* 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) {
4bf22: 202a 0004 movel %a2@(4),%d0
4bf26: 2600 movel %d0,%d3
4bf28: 222a 000c movel %a2@(12),%d1
4bf2c: 9681 subl %d1,%d3
4bf2e: be83 cmpl %d3,%d7
4bf30: 6298 bhis 4beca <pipe_write+0x62>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4bf32: 2044 moveal %d4,%a0
4bf34: 91c2 subal %d2,%a0
4bf36: b1c3 cmpal %d3,%a0
4bf38: 6402 bccs 4bf3c <pipe_write+0xd4>
4bf3a: 2608 movel %a0,%d3
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4bf3c: 2e01 movel %d1,%d7
4bf3e: deaa 0008 addl %a2@(8),%d7
4bf42: 4c40 7001 remul %d0,%d1,%d7
4bf46: 2e00 movel %d0,%d7
4bf48: 9e81 subl %d1,%d7
4bf4a: 2012 movel %a2@,%d0
4bf4c: d081 addl %d1,%d0
4bf4e: 222e 000c movel %fp@(12),%d1
4bf52: d282 addl %d2,%d1
if (chunk > chunk1) {
4bf54: be83 cmpl %d3,%d7
4bf56: 6c24 bges 4bf7c <pipe_write+0x114>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4bf58: 2f07 movel %d7,%sp@-
4bf5a: 2f01 movel %d1,%sp@-
4bf5c: 2f00 movel %d0,%sp@-
4bf5e: 4e93 jsr %a3@
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4bf60: 206e 000c moveal %fp@(12),%a0
4bf64: 2203 movel %d3,%d1
4bf66: 9287 subl %d7,%d1
4bf68: 2007 movel %d7,%d0
4bf6a: d082 addl %d2,%d0
4bf6c: 2f01 movel %d1,%sp@-
4bf6e: 4870 0800 pea %a0@(00000000,%d0:l)
4bf72: 2f12 movel %a2@,%sp@-
4bf74: 4e93 jsr %a3@
4bf76: 4fef 0018 lea %sp@(24),%sp
4bf7a: 600c bras 4bf88 <pipe_write+0x120>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4bf7c: 2f03 movel %d3,%sp@-
4bf7e: 2f01 movel %d1,%sp@-
4bf80: 2f00 movel %d0,%sp@-
4bf82: 4e93 jsr %a3@
4bf84: 4fef 000c lea %sp@(12),%sp
pipe->Length += chunk;
4bf88: d7aa 000c addl %d3,%a2@(12)
if (pipe->waitingReaders > 0)
4bf8c: 4aaa 0018 tstl %a2@(24)
4bf90: 670c beqs 4bf9e <pipe_write+0x136>
PIPE_WAKEUPREADERS(pipe);
4bf92: 2f05 movel %d5,%sp@-
4bf94: 2f2a 002c movel %a2@(44),%sp@-
4bf98: 2046 moveal %d6,%a0
4bf9a: 4e90 jsr %a0@
4bf9c: 508f addql #8,%sp
written += chunk;
4bf9e: d483 addl %d3,%d2
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
4bfa0: 7e01 moveq #1,%d7
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4bfa2: b882 cmpl %d2,%d4
4bfa4: 6200 ff7c bhiw 4bf22 <pipe_write+0xba>
4bfa8: 4283 clrl %d3
4bfaa: 600c bras 4bfb8 <pipe_write+0x150>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4bfac: 76e0 moveq #-32,%d3
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
4bfae: 4282 clrl %d2
4bfb0: 6006 bras 4bfb8 <pipe_write+0x150>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4bfb2: 76f5 moveq #-11,%d3
4bfb4: 6002 bras 4bfb8 <pipe_write+0x150>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
4bfb6: 76e0 moveq #-32,%d3 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4bfb8: 2f2a 0028 movel %a2@(40),%sp@-
4bfbc: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_release>
4bfc2: 588f addql #4,%sp
4bfc4: 6002 bras 4bfc8 <pipe_write+0x160>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
4bfc6: 76fc moveq #-4,%d3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4bfc8: 4a82 tstl %d2
4bfca: 6e0c bgts 4bfd8 <pipe_write+0x170>
4bfcc: 6008 bras 4bfd6 <pipe_write+0x16e>
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
4bfce: 4282 clrl %d2 <== NOT EXECUTED
4bfd0: 6006 bras 4bfd8 <pipe_write+0x170> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
4bfd2: 74fc moveq #-4,%d2 <== NOT EXECUTED
4bfd4: 6002 bras 4bfd8 <pipe_write+0x170> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
return written;
return ret;
4bfd6: 2403 movel %d3,%d2
}
4bfd8: 2002 movel %d2,%d0
4bfda: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4bfe0: 4e5e unlk %fp <== NOT EXECUTED
00046d20 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
46d20: 4e56 0000 linkw %fp,#0
46d24: 202e 000c movel %fp@(12),%d0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
46d28: 2200 movel %d0,%d1
46d2a: 5381 subql #1,%d1
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
46d2c: 52b9 0006 34f4 addql #1,634f4 <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
46d32: c280 andl %d0,%d1
46d34: 6610 bnes 46d46 <posix_memalign+0x26> <== NEVER TAKEN
46d36: 123c 0003 moveb #3,%d1
46d3a: b280 cmpl %d0,%d1
46d3c: 6408 bccs 46d46 <posix_memalign+0x26>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
46d3e: 4e5e unlk %fp
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
46d40: 4ef9 0004 6ed0 jmp 46ed0 <rtems_memalign>
}
46d46: 7016 moveq #22,%d0
46d48: 4e5e unlk %fp <== NOT EXECUTED
0004a930 <ramdisk_allocate>:
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
4a930: 4e56 ffec linkw %fp,#-20
4a934: 48d7 043c moveml %d2-%d5/%a2,%sp@
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4a938: 4878 0010 pea 10 <INVALID_OPERATION>
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
4a93c: 242e 0008 movel %fp@(8),%d2
4a940: 282e 000c movel %fp@(12),%d4
4a944: 262e 0010 movel %fp@(16),%d3
4a948: 1a2e 0017 moveb %fp@(23),%d5
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4a94c: 4eb9 0004 3c84 jsr 43c84 <malloc>
if (rd == NULL) {
4a952: 588f addql #4,%sp
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4a954: 2440 moveal %d0,%a2
if (rd == NULL) {
4a956: 4a80 tstl %d0
4a958: 6740 beqs 4a99a <ramdisk_allocate+0x6a> <== NEVER TAKEN
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
4a95a: 4200 clrb %d0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
4a95c: 4a82 tstl %d2
4a95e: 6622 bnes 4a982 <ramdisk_allocate+0x52>
area_begin = calloc(media_block_count, media_block_size);
4a960: 2f04 movel %d4,%sp@-
4a962: 2f03 movel %d3,%sp@-
4a964: 4eb9 0004 3550 jsr 43550 <calloc>
if (area_begin == NULL) {
4a96a: 508f addql #8,%sp
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(media_block_count, media_block_size);
4a96c: 2400 movel %d0,%d2
if (area_begin == NULL) {
free(rd);
return NULL;
}
rd->malloced = true;
4a96e: 7001 moveq #1,%d0
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(media_block_count, media_block_size);
if (area_begin == NULL) {
4a970: 4a82 tstl %d2
4a972: 660e bnes 4a982 <ramdisk_allocate+0x52> <== ALWAYS TAKEN
free(rd);
4a974: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return NULL;
4a976: 95ca subal %a2,%a2 <== NOT EXECUTED
}
if (area_begin == NULL) {
area_begin = calloc(media_block_count, media_block_size);
if (area_begin == NULL) {
free(rd);
4a978: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
return NULL;
4a97e: 588f addql #4,%sp <== NOT EXECUTED
4a980: 6018 bras 4a99a <ramdisk_allocate+0x6a> <== NOT EXECUTED
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = media_block_size;
4a982: 2484 movel %d4,%a2@
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
4a984: 1540 000d moveb %d0,%a2@(13)
}
rd->block_size = media_block_size;
rd->block_num = media_block_count;
4a988: 2543 0004 movel %d3,%a2@(4)
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
4a98c: 7001 moveq #1,%d0
rd->malloced = false;
}
rd->block_size = media_block_size;
rd->block_num = media_block_count;
rd->area = area_begin;
rd->trace = trace;
4a98e: 1545 000e moveb %d5,%a2@(14)
} else {
rd->malloced = false;
}
rd->block_size = media_block_size;
rd->block_num = media_block_count;
rd->area = area_begin;
4a992: 2542 0008 movel %d2,%a2@(8)
rd->trace = trace;
rd->initialized = true;
4a996: 1540 000c moveb %d0,%a2@(12)
return rd;
}
4a99a: 200a movel %a2,%d0
4a99c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4a9a2: 4e5e unlk %fp <== NOT EXECUTED
0004a9a6 <ramdisk_free>:
void ramdisk_free(ramdisk *rd)
{
4a9a6: 4e56 0000 linkw %fp,#0
4a9aa: 2f0a movel %a2,%sp@-
4a9ac: 246e 0008 moveal %fp@(8),%a2
if (rd != NULL) {
4a9b0: 4a8a tstl %a2
4a9b2: 6722 beqs 4a9d6 <ramdisk_free+0x30> <== NEVER TAKEN
if (rd->malloced) {
4a9b4: 4a2a 000d tstb %a2@(13)
4a9b8: 670c beqs 4a9c6 <ramdisk_free+0x20>
free(rd->area);
4a9ba: 2f2a 0008 movel %a2@(8),%sp@-
4a9be: 4eb9 0004 3810 jsr 43810 <free>
4a9c4: 588f addql #4,%sp
}
free(rd);
4a9c6: 2d4a 0008 movel %a2,%fp@(8)
}
}
4a9ca: 246e fffc moveal %fp@(-4),%a2
4a9ce: 4e5e unlk %fp
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
4a9d0: 4ef9 0004 3810 jmp 43810 <free>
}
}
4a9d6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4a9da: 4e5e unlk %fp <== NOT EXECUTED
...
0004b8dc <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
4b8dc: 4e56 ffcc linkw %fp,#-52
4b8e0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%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();
4b8e4: 4eb9 0004 379c jsr 4379c <rtems_disk_io_initialize>
if (rc != RTEMS_SUCCESSFUL)
4b8ea: 4a80 tstl %d0
4b8ec: 6600 00ea bnew 4b9d8 <ramdisk_initialize+0xfc>
* 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));
4b8f0: 4878 0010 pea 10 <INVALID_OPERATION>
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";
4b8f4: 2a0e movel %fp,%d5
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
rtems_device_minor_number i;
rtems_ramdisk_config *c = rtems_ramdisk_configuration;
4b8f6: 47f9 0006 0fcc lea 60fcc <rtems_ramdisk_configuration>,%a3
* 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++)
4b8fc: 4284 clrl %d4
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
4b8fe: 0685 ffff fff7 addil #-9,%d5
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
4b904: 4bf9 0004 3594 lea 43594 <rtems_disk_create_phys>,%a5
* 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));
4b90a: 2f39 0006 0fc8 movel 60fc8 <rtems_ramdisk_configuration_size>,%sp@-
4b910: 4eb9 0004 4584 jsr 44584 <calloc>
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
4b916: 508f addql #8,%sp
* 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));
4b918: 2440 moveal %d0,%a2
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/ramdisk.h>
rtems_device_driver
ramdisk_initialize(
4b91a: 49ea 000c lea %a2@(12),%a4
* the life of the system. RTEMS has no "de-initialize" driver call
* so there is no corresponding free(r). Coverity is correct that
* it is never freed but this is not a problem.
*/
r = calloc(rtems_ramdisk_configuration_size, sizeof(struct ramdisk));
r->trace = false;
4b91e: 4200 clrb %d0
4b920: 1540 000e moveb %d0,%a2@(14)
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
4b924: 6000 00a6 braw 4b9cc <ramdisk_initialize+0xf0>
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
4b928: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1>
4b92c: 2604 movel %d4,%d3
4b92e: 4879 0006 0397 pea 60397 <_CPU_m68k_BFFFO_table+0x100>
4b934: 242e 0008 movel %fp@(8),%d2
4b938: 2f05 movel %d5,%sp@-
4b93a: 4eb9 0005 1878 jsr 51878 <memcpy>
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
4b940: 2c13 movel %a3@,%d6
r->block_num = c->block_num;
if (c->location == NULL)
4b942: 4fef 000c lea %sp@(12),%sp
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
4b946: 2e2b 0004 movel %a3@(4),%d7
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;
4b94a: 1d44 ffff moveb %d4,%fp@(-1)
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
4b94e: 202b 0008 movel %a3@(8),%d0
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;
4b952: 2486 movel %d6,%a2@
r->block_num = c->block_num;
4b954: 2547 0004 movel %d7,%a2@(4)
if (c->location == NULL)
4b958: 4a80 tstl %d0
4b95a: 6624 bnes 4b980 <ramdisk_initialize+0xa4> <== NEVER TAKEN
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
4b95c: 2007 movel %d7,%d0
4b95e: 4c06 0800 mulsl %d6,%d0
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
{
r->malloced = true;
4b962: 7201 moveq #1,%d1
4b964: 1941 0001 moveb %d1,%a4@(1)
r->area = malloc(r->block_size * r->block_num);
4b968: 2f00 movel %d0,%sp@-
4b96a: 4eb9 0004 4e0c jsr 44e0c <malloc>
if (r->area == NULL) /* No enough memory for this disk */
4b970: 588f addql #4,%sp
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);
4b972: 2540 0008 movel %d0,%a2@(8)
if (r->area == NULL) /* No enough memory for this disk */
4b976: 6602 bnes 4b97a <ramdisk_initialize+0x9e> <== ALWAYS TAKEN
4b978: 6042 bras 4b9bc <ramdisk_initialize+0xe0> <== NOT EXECUTED
r->initialized = false;
continue;
}
else
{
r->initialized = true;
4b97a: 18bc 0001 moveb #1,%a4@
4b97e: 600e bras 4b98e <ramdisk_initialize+0xb2>
}
}
else
{
r->malloced = false;
4b980: 4201 clrb %d1 <== NOT EXECUTED
r->initialized = true;
4b982: 18bc 0001 moveb #1,%a4@ <== NOT EXECUTED
r->initialized = true;
}
}
else
{
r->malloced = false;
4b986: 1941 0001 moveb %d1,%a4@(1) <== NOT EXECUTED
r->initialized = true;
r->area = c->location;
4b98a: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
4b98e: 2f05 movel %d5,%sp@-
4b990: 2f0a movel %a2,%sp@-
4b992: 4879 0004 b9e4 pea 4b9e4 <ramdisk_ioctl>
4b998: 2f07 movel %d7,%sp@-
4b99a: 2f06 movel %d6,%sp@-
4b99c: 2f03 movel %d3,%sp@-
4b99e: 2f02 movel %d2,%sp@-
4b9a0: 4e95 jsr %a5@
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
4b9a2: 4fef 001c lea %sp@(28),%sp
4b9a6: 4a80 tstl %d0
4b9a8: 6714 beqs 4b9be <ramdisk_initialize+0xe2> <== ALWAYS TAKEN
{
if (r->malloced)
4b9aa: 4a2c 0001 tstb %a4@(1) <== NOT EXECUTED
4b9ae: 670c beqs 4b9bc <ramdisk_initialize+0xe0> <== NOT EXECUTED
{
free(r->area);
4b9b0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4b9b4: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
4b9ba: 588f addql #4,%sp <== NOT EXECUTED
}
r->initialized = false;
4b9bc: 4214 clrb %a4@ <== 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++)
4b9be: 5284 addql #1,%d4
4b9c0: 47eb 000c lea %a3@(12),%a3
4b9c4: 45ea 0010 lea %a2@(16),%a2
4b9c8: 49ec 0010 lea %a4@(16),%a4
4b9cc: b8b9 0006 0fc8 cmpl 60fc8 <rtems_ramdisk_configuration_size>,%d4
4b9d2: 6500 ff54 bcsw 4b928 <ramdisk_initialize+0x4c>
free(r->area);
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
4b9d6: 4280 clrl %d0
}
4b9d8: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4b9de: 4e5e unlk %fp
...
0004a9e0 <ramdisk_register>:
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4a9e0: 4e56 ffe8 linkw %fp,#-24
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
4a9e4: 204e moveal %fp,%a0
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4a9e6: 48d7 007c moveml %d2-%d6,%sp@
4a9ea: 2a2e 0008 movel %fp@(8),%d5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
4a9ee: 42a0 clrl %a0@-
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4a9f0: 2c2e 000c movel %fp@(12),%d6
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);
4a9f4: 2f08 movel %a0,%sp@-
4a9f6: 4879 0005 f13c pea 5f13c <ramdisk_ops>
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4a9fc: 142e 0013 moveb %fp@(19),%d2
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);
4aa00: 42a7 clrl %sp@-
4aa02: 4eb9 0004 7b5c jsr 47b5c <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
4aa08: 4fef 000c lea %sp@(12),%sp
4aa0c: 4a80 tstl %d0
4aa0e: 6676 bnes 4aa86 <ramdisk_register+0xa6> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
4aa10: 0282 0000 00ff andil #255,%d2
4aa16: 2f02 movel %d2,%sp@-
4aa18: 2f06 movel %d6,%sp@-
4aa1a: 2f05 movel %d5,%sp@-
4aa1c: 42a7 clrl %sp@-
4aa1e: 4eb9 0004 a930 jsr 4a930 <ramdisk_allocate>
if (rd == NULL) {
4aa24: 4fef 0010 lea %sp@(16),%sp
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
4aa28: 2800 movel %d0,%d4
if (rd == NULL) {
4aa2a: 660e bnes 4aa3a <ramdisk_register+0x5a> <== ALWAYS TAKEN
rtems_io_unregister_driver(major);
4aa2c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4aa30: 4eb9 0004 7c94 jsr 47c94 <rtems_io_unregister_driver> <== NOT EXECUTED
4aa36: 588f addql #4,%sp <== NOT EXECUTED
4aa38: 604c bras 4aa86 <ramdisk_register+0xa6> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
4aa3a: 2f2e 0014 movel %fp@(20),%sp@-
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
4aa3e: 4283 clrl %d3
4aa40: 242e fffc movel %fp@(-4),%d2
4aa44: 2f00 movel %d0,%sp@-
4aa46: 4879 0004 a830 pea 4a830 <ramdisk_ioctl>
4aa4c: 2f06 movel %d6,%sp@-
4aa4e: 2f05 movel %d5,%sp@-
4aa50: 2f03 movel %d3,%sp@-
4aa52: 2f02 movel %d2,%sp@-
4aa54: 4eb9 0004 2b7c jsr 42b7c <rtems_disk_create_phys>
media_block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
4aa5a: 4fef 001c lea %sp@(28),%sp
4aa5e: 4a80 tstl %d0
4aa60: 6716 beqs 4aa78 <ramdisk_register+0x98> <== ALWAYS TAKEN
ramdisk_free(rd);
4aa62: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4aa64: 4eb9 0004 a9a6 jsr 4a9a6 <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
4aa6a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4aa6e: 4eb9 0004 7c94 jsr 47c94 <rtems_io_unregister_driver> <== NOT EXECUTED
4aa74: 508f addql #8,%sp <== NOT EXECUTED
4aa76: 600e bras 4aa86 <ramdisk_register+0xa6> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
4aa78: 206e 0018 moveal %fp@(24),%a0
return RTEMS_SUCCESSFUL;
4aa7c: 4280 clrl %d0
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
4aa7e: 2082 movel %d2,%a0@
4aa80: 2143 0004 movel %d3,%a0@(4)
4aa84: 6002 bras 4aa88 <ramdisk_register+0xa8>
ramdisk *rd = NULL;
dev_t dev = 0;
sc = rtems_io_register_driver(0, &ramdisk_ops, &major);
if (sc != RTEMS_SUCCESSFUL) {
return RTEMS_UNSATISFIED;
4aa86: 700d moveq #13,%d0 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
4aa88: 4cee 007c ffe8 moveml %fp@(-24),%d2-%d6
4aa8e: 4e5e unlk %fp
...
0005a0a4 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5a0a4: 4e56 0000 linkw %fp,#0
5a0a8: 202e 0008 movel %fp@(8),%d0
5a0ac: 2f0a movel %a2,%sp@-
5a0ae: 222e 000c movel %fp@(12),%d1
5a0b2: 226e 0010 moveal %fp@(16),%a1
5a0b6: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5a0b8: b0b9 0005 c450 cmpl 5c450 <rtems_libio_number_iops>,%d0
5a0be: 6502 bcss 5a0c2 <read+0x1e>
5a0c0: 6038 bras 5a0fa <read+0x56>
iop = rtems_libio_iop( fd );
5a0c2: 2400 movel %d0,%d2
5a0c4: ed88 lsll #6,%d0
5a0c6: e98a lsll #4,%d2
5a0c8: 2079 0005 dae4 moveal 5dae4 <rtems_libio_iops>,%a0
5a0ce: 9082 subl %d2,%d0
5a0d0: d1c0 addal %d0,%a0
rtems_libio_check_is_open( iop );
5a0d2: 2028 000c movel %a0@(12),%d0
5a0d6: 0800 0008 btst #8,%d0
5a0da: 6602 bnes 5a0de <read+0x3a>
5a0dc: 601c bras 5a0fa <read+0x56>
rtems_libio_check_buffer( buffer );
5a0de: 4a81 tstl %d1
5a0e0: 660e bnes 5a0f0 <read+0x4c> <== ALWAYS TAKEN
5a0e2: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
5a0e8: 7216 moveq #22,%d1 <== NOT EXECUTED
5a0ea: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a0ec: 2081 movel %d1,%a0@ <== NOT EXECUTED
5a0ee: 6016 bras 5a106 <read+0x62> <== NOT EXECUTED
rtems_libio_check_count( count );
5a0f0: 4a89 tstl %a1
5a0f2: 6736 beqs 5a12a <read+0x86>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
5a0f4: 0800 0001 btst #1,%d0
5a0f8: 6610 bnes 5a10a <read+0x66>
5a0fa: 4eb9 0004 c330 jsr 4c330 <__errno>
5a100: 2040 moveal %d0,%a0
5a102: 7009 moveq #9,%d0
5a104: 2080 movel %d0,%a0@
5a106: 70ff moveq #-1,%d0
5a108: 6022 bras 5a12c <read+0x88>
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5a10a: 2468 0020 moveal %a0@(32),%a2
5a10e: 2d49 0010 movel %a1,%fp@(16)
}
5a112: 242e fff8 movel %fp@(-8),%d2
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5a116: 2d41 000c movel %d1,%fp@(12)
5a11a: 2d48 0008 movel %a0,%fp@(8)
5a11e: 226a 0008 moveal %a2@(8),%a1
}
5a122: 246e fffc moveal %fp@(-4),%a2
5a126: 4e5e unlk %fp
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5a128: 4ed1 jmp %a1@
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 );
5a12a: 4280 clrl %d0
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
5a12c: 242e fff8 movel %fp@(-8),%d2
5a130: 246e fffc moveal %fp@(-4),%a2
5a134: 4e5e unlk %fp <== NOT EXECUTED
00043aa0 <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)
{
43aa0: 4e56 ffd0 linkw %fp,#-48
43aa4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
43aa8: 2c2e 0008 movel %fp@(8),%d6
43aac: 246e 0010 moveal %fp@(16),%a2
int i;
rtems_sector_data_t *sector = NULL;
43ab0: 42ae fff8 clrl %fp@(-8)
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))
43ab4: 4a8a tstl %a2
43ab6: 6700 014c beqw 43c04 <read_extended_partition+0x164>
43aba: 4aaa 0010 tstl %a2@(16)
43abe: 6700 0144 beqw 43c04 <read_extended_partition+0x164>
{
return RTEMS_INTERNAL_ERROR;
}
/* get start sector of current extended partition */
here = ext_part->start;
43ac2: 2a2a 0004 movel %a2@(4),%d5
if (sector == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
43ac6: 7209 moveq #9,%d1
43ac8: 2005 movel %d5,%d0
43aca: 4282 clrl %d2
new_off = lseek(fd, off, SEEK_SET);
if (new_off != off) {
return RTEMS_IO_ERROR;
43acc: 781b moveq #27,%d4
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
new_off = lseek(fd, off, SEEK_SET);
43ace: 42a7 clrl %sp@-
if (sector == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
43ad0: e3a8 lsll %d1,%d0
new_off = lseek(fd, off, SEEK_SET);
43ad2: 2f00 movel %d0,%sp@-
if (sector == NULL)
{
return RTEMS_INTERNAL_ERROR;
}
off = sector_num * RTEMS_IDE_SECTOR_SIZE;
43ad4: 2600 movel %d0,%d3
new_off = lseek(fd, off, SEEK_SET);
43ad6: 2f02 movel %d2,%sp@-
43ad8: 2f06 movel %d6,%sp@-
43ada: 4eb9 0004 4c64 jsr 44c64 <lseek>
if (new_off != off) {
43ae0: 4fef 0010 lea %sp@(16),%sp
43ae4: 9283 subl %d3,%d1
43ae6: 9182 subxl %d2,%d0
43ae8: 6614 bnes 43afe <read_extended_partition+0x5e> <== NEVER TAKEN
43aea: 486e fff8 pea %fp@(-8)
43aee: 2f05 movel %d5,%sp@-
43af0: 2f06 movel %d6,%sp@-
43af2: 4eba fe04 jsr %pc@(438f8 <get_sector.part.0>)
here = ext_part->start;
/* get first extended partition sector */
rc = get_sector(fd, here, §or);
if (rc != RTEMS_SUCCESSFUL)
43af6: 4fef 000c lea %sp@(12),%sp
43afa: 2800 movel %d0,%d4
43afc: 670e beqs 43b0c <read_extended_partition+0x6c> <== ALWAYS TAKEN
{
if (sector)
43afe: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
43b02: 6700 0102 beqw 43c06 <read_extended_partition+0x166> <== NOT EXECUTED
free(sector);
43b06: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43b08: 6000 00f0 braw 43bfa <read_extended_partition+0x15a> <== NOT EXECUTED
return rc;
}
if (!msdos_signature_check(sector))
43b0c: 2a6e fff8 moveal %fp@(-8),%a5
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) &&
43b10: 4280 clrl %d0
43b12: 102d 0202 moveb %a5@(514),%d0
43b16: 7e55 moveq #85,%d7
43b18: be80 cmpl %d0,%d7
43b1a: 6612 bnes 43b2e <read_extended_partition+0x8e> <== NEVER TAKEN
43b1c: 72aa moveq #-86,%d1
43b1e: 102d 0203 moveb %a5@(515),%d0
43b22: b380 eorl %d1,%d0
43b24: 4a00 tstb %d0
43b26: 57c0 seq %d0
43b28: 49c0 extbl %d0
43b2a: 4480 negl %d0
43b2c: 6002 bras 43b30 <read_extended_partition+0x90>
43b2e: 4280 clrl %d0 <== NOT EXECUTED
if (sector)
free(sector);
return rc;
}
if (!msdos_signature_check(sector))
43b30: 0800 0000 btst #0,%d0
43b34: 660e bnes 43b44 <read_extended_partition+0xa4> <== ALWAYS TAKEN
{
free(sector);
43b36: 2f0d movel %a5,%sp@- <== NOT EXECUTED
43b38: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
43b3e: 588f addql #4,%sp <== NOT EXECUTED
43b40: 6000 00c2 braw 43c04 <read_extended_partition+0x164> <== NOT EXECUTED
for (i = 0; i < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER; i++)
{
/* if data_to_part_desc fails skip this partition
* and parse the next one
*/
rc = data_to_part_desc(data, &new_part_desc);
43b44: 260e movel %fp,%d3
* 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)
43b46: 4bed 01d2 lea %a5@(466),%a5
43b4a: 4282 clrl %d2
for (i = 0; i < RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER; i++)
{
/* if data_to_part_desc fails skip this partition
* and parse the next one
*/
rc = data_to_part_desc(data, &new_part_desc);
43b4c: 5983 subql #4,%d3
43b4e: 47fa fea0 lea %pc@(439f0 <data_to_part_desc.part.1>),%a3
if (is_extended(new_part_desc->sys_type))
{
new_part_desc->log_id = EMPTY_PARTITION;
new_part_desc->start += start;
read_extended_partition(fd, start, new_part_desc);
43b52: 49fa ff4c lea %pc@(43aa0 <read_extended_partition>),%a4
43b56: 2f03 movel %d3,%sp@-
43b58: 486d fff0 pea %a5@(-16)
43b5c: 4e93 jsr %a3@
{
/* 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)
43b5e: 508f addql #8,%sp
43b60: 2800 movel %d0,%d4
43b62: 6704 beqs 43b68 <read_extended_partition+0xc8> <== ALWAYS TAKEN
43b64: 6000 0090 braw 43bf6 <read_extended_partition+0x156> <== NOT EXECUTED
{
free(sector);
return rc;
}
if (new_part_desc == NULL)
43b68: 206e fffc moveal %fp@(-4),%a0
43b6c: 4a88 tstl %a0
43b6e: 6778 beqs 43be8 <read_extended_partition+0x148>
{
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
43b70: 2588 2818 movel %a0,%a2@(00000018,%d2:l)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43b74: 4281 clrl %d1
43b76: 7e05 moveq #5,%d7
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;
43b78: 226a 0010 moveal %a2@(16),%a1
if (is_extended(new_part_desc->sys_type))
43b7c: 1028 0001 moveb %a0@(1),%d0
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
continue;
}
ext_part->sub_part[i] = new_part_desc;
new_part_desc->ext_part = ext_part;
43b80: 214a 0014 movel %a2,%a0@(20)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43b84: 1200 moveb %d0,%d1
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;
43b86: 2149 0010 movel %a1,%a0@(16)
* true if partition type is extended, false otherwise
*/
static bool
is_extended(uint8_t type)
{
return ((type == EXTENDED_PARTITION) || (type == LINUX_EXTENDED));
43b8a: be81 cmpl %d1,%d7
43b8c: 670e beqs 43b9c <read_extended_partition+0xfc>
43b8e: 7285 moveq #-123,%d1
43b90: b380 eorl %d1,%d0
43b92: 4a00 tstb %d0
43b94: 57c0 seq %d0
43b96: 49c0 extbl %d0
43b98: 4480 negl %d0
43b9a: 6002 bras 43b9e <read_extended_partition+0xfe>
43b9c: 7001 moveq #1,%d0
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))
43b9e: 0800 0000 btst #0,%d0
43ba2: 671c beqs 43bc0 <read_extended_partition+0x120>
{
new_part_desc->log_id = EMPTY_PARTITION;
43ba4: 4207 clrb %d7
43ba6: 1147 0002 moveb %d7,%a0@(2)
new_part_desc->start += start;
43baa: 2e2e 000c movel %fp@(12),%d7
43bae: dfa8 0004 addl %d7,%a0@(4)
read_extended_partition(fd, start, new_part_desc);
43bb2: 2f08 movel %a0,%sp@-
43bb4: 2f07 movel %d7,%sp@-
43bb6: 2f06 movel %d6,%sp@-
43bb8: 4e94 jsr %a4@
43bba: 4fef 000c lea %sp@(12),%sp
43bbe: 6028 bras 43be8 <read_extended_partition+0x148>
}
else
{
rtems_disk_desc_t *disk_desc = new_part_desc->disk_desc;
disk_desc->partitions[disk_desc->last_log_id] = new_part_desc;
43bc0: 2029 0024 movel %a1@(36),%d0
43bc4: 2388 0c28 movel %a0,%a1@(00000028,%d0:l:4)
new_part_desc->log_id = ++disk_desc->last_log_id;
43bc8: 5280 addql #1,%d0
new_part_desc->start += here;
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
43bca: 2228 0008 movel %a0@(8),%d1
43bce: 5381 subql #1,%d1
}
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;
43bd0: 2340 0024 movel %d0,%a1@(36)
43bd4: 1140 0002 moveb %d0,%a0@(2)
new_part_desc->start += here;
43bd8: 2005 movel %d5,%d0
43bda: d0a8 0004 addl %a0@(4),%d0
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
43bde: d280 addl %d0,%d1
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;
43be0: 2140 0004 movel %d0,%a0@(4)
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
43be4: 2141 000c movel %d1,%a0@(12)
43be8: 4bed 0010 lea %a5@(16),%a5
43bec: 5882 addql #4,%d2
/* 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++)
43bee: 7010 moveq #16,%d0
43bf0: b082 cmpl %d2,%d0
43bf2: 6600 ff62 bnew 43b56 <read_extended_partition+0xb6>
new_part_desc->end = new_part_desc->start + new_part_desc->size - 1;
}
data += RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE;
}
free(sector);
43bf6: 2f2e fff8 movel %fp@(-8),%sp@-
43bfa: 4eb9 0004 4844 jsr 44844 <free>
43c00: 588f addql #4,%sp
43c02: 6002 bras 43c06 <read_extended_partition+0x166>
rtems_part_desc_t *new_part_desc;
rtems_status_code rc;
if ((ext_part == NULL) || (ext_part->disk_desc == NULL))
{
return RTEMS_INTERNAL_ERROR;
43c04: 7819 moveq #25,%d4 <== NOT EXECUTED
}
free(sector);
return RTEMS_SUCCESSFUL;
}
43c06: 2004 movel %d4,%d0
43c08: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
43c0e: 4e5e unlk %fp <== NOT EXECUTED
00044230 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
44230: 4e56 ffe8 linkw %fp,#-24
44234: 222e 0008 movel %fp@(8),%d1
44238: 202e 000c movel %fp@(12),%d0
4423c: 226e 0010 moveal %fp@(16),%a1
44240: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
44244: b2b9 0005 cc60 cmpl 5cc60 <rtems_libio_number_iops>,%d1
4424a: 6502 bcss 4424e <readv+0x1e>
4424c: 6022 bras 44270 <readv+0x40>
iop = rtems_libio_iop( fd );
4424e: 2401 movel %d1,%d2
44250: ed89 lsll #6,%d1
44252: e98a lsll #4,%d2
44254: 2679 0005 e2f4 moveal 5e2f4 <rtems_libio_iops>,%a3
4425a: 9282 subl %d2,%d1
4425c: d7c1 addal %d1,%a3
rtems_libio_check_is_open( iop );
4425e: 222b 000c movel %a3@(12),%d1
44262: 0801 0008 btst #8,%d1
44266: 6602 bnes 4426a <readv+0x3a>
44268: 6006 bras 44270 <readv+0x40>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
4426a: 0801 0001 btst #1,%d1
4426e: 6610 bnes 44280 <readv+0x50> <== ALWAYS TAKEN
44270: 4eb9 0004 cdf4 jsr 4cdf4 <__errno>
44276: 7209 moveq #9,%d1
44278: 2040 moveal %d0,%a0
4427a: 2081 movel %d1,%a0@
4427c: 6000 0090 braw 4430e <readv+0xde>
/*
* Argument validation on IO vector
*/
if ( !iov )
44280: 4a80 tstl %d0
44282: 6602 bnes 44286 <readv+0x56>
44284: 6030 bras 442b6 <readv+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
44286: 4a89 tstl %a1
44288: 6e02 bgts 4428c <readv+0x5c>
4428a: 602a bras 442b6 <readv+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
4428c: b3fc 0000 0400 cmpal #1024,%a1
44292: 6f02 bles 44296 <readv+0x66> <== ALWAYS TAKEN
44294: 6020 bras 442b6 <readv+0x86> <== NOT EXECUTED
44296: 2440 moveal %d0,%a2
44298: 2040 moveal %d0,%a0
4429a: 4281 clrl %d1
4429c: 4283 clrl %d3
4429e: 7401 moveq #1,%d2
442a0: 6002 bras 442a4 <readv+0x74>
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
442a2: 2605 movel %d5,%d3
/*
* 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 )
442a4: 4a90 tstl %a0@
442a6: 6602 bnes 442aa <readv+0x7a>
442a8: 600c bras 442b6 <readv+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
442aa: 2828 0004 movel %a0@(4),%d4
442ae: 2a04 movel %d4,%d5
442b0: da83 addl %d3,%d5
if ( total < old )
442b2: b685 cmpl %d5,%d3
442b4: 6f0e bles 442c4 <readv+0x94>
rtems_set_errno_and_return_minus_one( EINVAL );
442b6: 4eb9 0004 cdf4 jsr 4cdf4 <__errno>
442bc: 2040 moveal %d0,%a0
442be: 7016 moveq #22,%d0
442c0: 2080 movel %d0,%a0@
442c2: 604a bras 4430e <readv+0xde>
if ( iov[v].iov_len )
all_zeros = false;
442c4: 4a84 tstl %d4
442c6: 57c3 seq %d3
* 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++ ) {
442c8: 5281 addql #1,%d1
442ca: 5088 addql #8,%a0
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
442cc: c483 andl %d3,%d2
* 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++ ) {
442ce: b3c1 cmpal %d1,%a1
442d0: 66d0 bnes 442a2 <readv+0x72>
/*
* 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 ) {
442d2: 4a02 tstb %d2
442d4: 6634 bnes 4430a <readv+0xda>
*
* OpenGroup URL:
*
* http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
*/
ssize_t readv(
442d6: 2600 movel %d0,%d3
442d8: 4282 clrl %d2
442da: e789 lsll #3,%d1
442dc: d681 addl %d1,%d3
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
442de: 206b 0020 moveal %a3@(32),%a0
442e2: 2f2a 0004 movel %a2@(4),%sp@-
442e6: 2f12 movel %a2@,%sp@-
442e8: 2f0b movel %a3,%sp@-
442ea: 2068 0008 moveal %a0@(8),%a0
442ee: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
442f0: 4fef 000c lea %sp@(12),%sp
442f4: 4a80 tstl %d0
442f6: 6d16 blts 4430e <readv+0xde> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
442f8: 6702 beqs 442fc <readv+0xcc> <== NEVER TAKEN
total += bytes;
442fa: d480 addl %d0,%d2
}
if (bytes != iov[ v ].iov_len)
442fc: b0aa 0004 cmpl %a2@(4),%d0
44300: 660e bnes 44310 <readv+0xe0> <== NEVER TAKEN
44302: 508a addql #8,%a2
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44304: b68a cmpl %a2,%d3
44306: 66d6 bnes 442de <readv+0xae>
44308: 6006 bras 44310 <readv+0xe0>
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
return 0;
4430a: 4282 clrl %d2
4430c: 6002 bras 44310 <readv+0xe0>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
4430e: 74ff moveq #-1,%d2
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44310: 2002 movel %d2,%d0
44312: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
44318: 4e5e unlk %fp <== NOT EXECUTED
0005a19c <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5a19c: 7003 moveq #3,%d0
void *realloc(
void *ptr,
size_t size
)
{
5a19e: 4e56 fff0 linkw %fp,#-16
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
5a1a2: 52b9 0005 db00 addql #1,5db00 <rtems_malloc_statistics+0x10>
void *realloc(
void *ptr,
size_t size
)
{
5a1a8: 48d7 001c moveml %d2-%d4,%sp@
5a1ac: 242e 0008 movel %fp@(8),%d2
5a1b0: 262e 000c movel %fp@(12),%d3
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5a1b4: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0
5a1ba: 660c bnes 5a1c8 <realloc+0x2c>
* 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 )
5a1bc: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0
5a1c2: 6700 00a6 beqw 5a26a <realloc+0xce>
5a1c6: 604c bras 5a214 <realloc+0x78> <== NOT EXECUTED
}
/*
* Continue with realloc().
*/
if ( !ptr )
5a1c8: 4a82 tstl %d2
5a1ca: 6612 bnes 5a1de <realloc+0x42>
return malloc( size );
5a1cc: 2d43 0008 movel %d3,%fp@(8)
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5a1d0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5a1d6: 4e5e unlk %fp
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5a1d8: 4ef9 0004 2d30 jmp 42d30 <malloc>
if ( !size ) {
5a1de: 4a83 tstl %d3
5a1e0: 660c bnes 5a1ee <realloc+0x52> <== ALWAYS TAKEN
free( ptr );
5a1e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a1e4: 4eb9 0004 2a60 jsr 42a60 <free> <== NOT EXECUTED
5a1ea: 588f addql #4,%sp <== NOT EXECUTED
5a1ec: 6026 bras 5a214 <realloc+0x78> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5a1ee: 486e fffc pea %fp@(-4)
5a1f2: 2f02 movel %d2,%sp@-
5a1f4: 2f39 0005 c40c movel 5c40c <RTEMS_Malloc_Heap>,%sp@-
5a1fa: 4eb9 0005 a318 jsr 5a318 <_Protected_heap_Get_block_size>
5a200: 4fef 000c lea %sp@(12),%sp
5a204: 4a00 tstb %d0
5a206: 6610 bnes 5a218 <realloc+0x7c>
errno = EINVAL;
5a208: 4eb9 0004 c330 jsr 4c330 <__errno>
5a20e: 2040 moveal %d0,%a0
5a210: 7016 moveq #22,%d0
5a212: 2080 movel %d0,%a0@
return (void *) 0;
5a214: 4282 clrl %d2
5a216: 605e bras 5a276 <realloc+0xda>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
5a218: 2f03 movel %d3,%sp@-
5a21a: 2f02 movel %d2,%sp@-
5a21c: 2f39 0005 c40c movel 5c40c <RTEMS_Malloc_Heap>,%sp@-
5a222: 4eb9 0005 a354 jsr 5a354 <_Protected_heap_Resize_block>
5a228: 4fef 000c lea %sp@(12),%sp
5a22c: 4a00 tstb %d0
5a22e: 6646 bnes 5a276 <realloc+0xda>
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
5a230: 2f03 movel %d3,%sp@-
5a232: 4eb9 0004 2d30 jsr 42d30 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5a238: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5a23a: 53b9 0005 daf4 subql #1,5daf4 <rtems_malloc_statistics+0x4>
* 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 );
5a240: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5a242: 67d0 beqs 5a214 <realloc+0x78>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5a244: 202e fffc movel %fp@(-4),%d0
5a248: b083 cmpl %d3,%d0
5a24a: 6402 bccs 5a24e <realloc+0xb2> <== NEVER TAKEN
5a24c: 2600 movel %d0,%d3
5a24e: 2f03 movel %d3,%sp@-
5a250: 2f02 movel %d2,%sp@-
5a252: 2f04 movel %d4,%sp@-
5a254: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
free( ptr );
5a25a: 2f02 movel %d2,%sp@-
5a25c: 2404 movel %d4,%d2
5a25e: 4eb9 0004 2a60 jsr 42a60 <free>
5a264: 4fef 0010 lea %sp@(16),%sp
5a268: 600c bras 5a276 <realloc+0xda>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
5a26a: 4ab9 0005 dd68 tstl 5dd68 <_Per_CPU_Information+0x8>
5a270: 6700 ff56 beqw 5a1c8 <realloc+0x2c>
5a274: 609e bras 5a214 <realloc+0x78> <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5a276: 2002 movel %d2,%d0
5a278: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5a27e: 4e5e unlk %fp
...
00042fe0 <rtems_assoc_name_by_local_bitfield>:
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
42fe0: 4e56 ffec linkw %fp,#-20
42fe4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
42fe8: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
42fec: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
42fee: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
42ff0: 49f9 0004 303c lea 4303c <rtems_assoc_name_by_local>,%a4
42ff6: 47f9 0004 d9bc lea 4d9bc <strcat>,%a3
char *buffer
)
{
uint32_t b;
*buffer = 0;
42ffc: 4212 clrb %a2@
for (b = 1; b; b <<= 1) {
if (b & value) {
42ffe: 202e 000c movel %fp@(12),%d0
43002: c082 andl %d2,%d0
43004: 6722 beqs 43028 <rtems_assoc_name_by_local_bitfield+0x48>
if (*buffer)
43006: 4a12 tstb %a2@
43008: 670c beqs 43016 <rtems_assoc_name_by_local_bitfield+0x36>
strcat(buffer, " ");
4300a: 4879 0005 c4e9 pea 5c4e9 <rtems_termios_baud_table+0x105>
43010: 2f0a movel %a2,%sp@-
43012: 4e93 jsr %a3@
43014: 508f addql #8,%sp
strcat(buffer, rtems_assoc_name_by_local(ap, b));
43016: 2f02 movel %d2,%sp@-
43018: 2f2e 0008 movel %fp@(8),%sp@-
4301c: 4e94 jsr %a4@
4301e: 2f00 movel %d0,%sp@-
43020: 2f0a movel %a2,%sp@-
43022: 4e93 jsr %a3@
43024: 4fef 0010 lea %sp@(16),%sp
43028: 5383 subql #1,%d3
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
4302a: d482 addl %d2,%d2
4302c: 4a83 tstl %d3
4302e: 66ce bnes 42ffe <rtems_assoc_name_by_local_bitfield+0x1e><== NEVER TAKEN
strcat(buffer, rtems_assoc_name_by_local(ap, b));
}
}
return buffer;
}
43030: 200a movel %a2,%d0
43032: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
43038: 4e5e unlk %fp <== NOT EXECUTED
0004cab0 <rtems_barrier_delete>:
#include <rtems/score/threadq.h>
rtems_status_code rtems_barrier_delete(
rtems_id id
)
{
4cab0: 4e56 fffc linkw %fp,#-4
4cab4: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
4cab6: 486e fffc pea %fp@(-4)
4caba: 2f2e 0008 movel %fp@(8),%sp@-
4cabe: 4879 0005 fdac pea 5fdac <_Barrier_Information>
4cac4: 4eb9 0004 90b8 jsr 490b8 <_Objects_Get>
Barrier_Control *the_barrier;
Objects_Locations location;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
4caca: 4fef 000c lea %sp@(12),%sp
4cace: 2440 moveal %d0,%a2
4cad0: 4aae fffc tstl %fp@(-4)
4cad4: 663a bnes 4cb10 <rtems_barrier_delete+0x60> <== NEVER TAKEN
case OBJECTS_LOCAL:
_CORE_barrier_Flush(
4cad6: 4878 0002 pea 2 <DOUBLE_FLOAT>
4cada: 42a7 clrl %sp@-
4cadc: 486a 0014 pea %a2@(20)
4cae0: 4eb9 0004 a2a0 jsr 4a2a0 <_Thread_queue_Flush>
&the_barrier->Barrier,
NULL,
CORE_BARRIER_WAS_DELETED
);
_Objects_Close( &_Barrier_Information, &the_barrier->Object );
4cae6: 2f0a movel %a2,%sp@-
4cae8: 4879 0005 fdac pea 5fdac <_Barrier_Information>
4caee: 4eb9 0004 8cc8 jsr 48cc8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Barrier_Free (
Barrier_Control *the_barrier
)
{
_Objects_Free( &_Barrier_Information, &the_barrier->Object );
4caf4: 2f0a movel %a2,%sp@-
4caf6: 4879 0005 fdac pea 5fdac <_Barrier_Information>
4cafc: 4eb9 0004 8f50 jsr 48f50 <_Objects_Free>
_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
4cb02: 4eb9 0004 9c88 jsr 49c88 <_Thread_Enable_dispatch>
4cb08: 4fef 001c lea %sp@(28),%sp
return RTEMS_SUCCESSFUL;
4cb0c: 4280 clrl %d0
4cb0e: 6002 bras 4cb12 <rtems_barrier_delete+0x62>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4cb10: 7004 moveq #4,%d0
}
4cb12: 246e fff8 moveal %fp@(-8),%a2
4cb16: 4e5e unlk %fp
...
0004b0e6 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
4b0e6: 4e56 0000 linkw %fp,#0
4b0ea: 2f0a movel %a2,%sp@-
4b0ec: 246e 0008 moveal %fp@(8),%a2
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
4b0f0: 4a39 0006 0cc2 tstb 60cc2 <bdbuf_cache+0x2e>
4b0f6: 6734 beqs 4b12c <rtems_bdbuf_add_to_modified_list_after_access+0x46><== ALWAYS TAKEN
4b0f8: 202a 0012 movel %a2@(18),%d0 <== NOT EXECUTED
4b0fc: b0b9 0006 0cc8 cmpl 60cc8 <bdbuf_cache+0x34>,%d0 <== NOT EXECUTED
4b102: 6628 bnes 4b12c <rtems_bdbuf_add_to_modified_list_after_access+0x46><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
4b104: 4eba fa38 jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
* Lock the cache's sync. A single task can nest calls.
*/
static void
rtems_bdbuf_lock_sync (void)
{
rtems_bdbuf_lock (bdbuf_cache.sync_lock, RTEMS_BDBUF_FATAL_SYNC_LOCK);
4b108: 4878 0019 pea 19 <OPER2+0x5> <== NOT EXECUTED
4b10c: 2f39 0006 0cbe movel 60cbe <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED
4b112: 4eba f9b8 jsr %pc@(4aacc <rtems_bdbuf_lock>) <== NOT EXECUTED
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
rtems_bdbuf_unlock (bdbuf_cache.sync_lock,
4b116: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED
4b11a: 2f39 0006 0cbe movel 60cbe <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED
4b120: 4eba f9fc jsr %pc@(4ab1e <rtems_bdbuf_unlock>) <== NOT EXECUTED
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
rtems_bdbuf_lock_cache ();
4b124: 4eba f9cc jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>) <== NOT EXECUTED
4b128: 4fef 0010 lea %sp@(16),%sp <== 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
4b12c: 202a 001e movel %a2@(30),%d0
4b130: 7203 moveq #3,%d1
4b132: b280 cmpl %d0,%d1
4b134: 6708 beqs 4b13e <rtems_bdbuf_add_to_modified_list_after_access+0x58>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
4b136: 123c 0005 moveb #5,%d1
4b13a: b280 cmpl %d0,%d1
4b13c: 660a bnes 4b148 <rtems_bdbuf_add_to_modified_list_after_access+0x62>
bd->hold_timer = bdbuf_config.swap_block_hold;
4b13e: 41f9 0005 e162 lea 5e162 <rtems_bdbuf_configuration+0x10>,%a0
4b144: 2550 002a movel %a0@,%a2@(42)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b148: 7007 moveq #7,%d0
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4b14a: 2079 0006 0ce4 moveal 60ce4 <bdbuf_cache+0x50>,%a0
4b150: 2540 001e movel %d0,%a2@(30)
the_node->next = tail;
4b154: 24bc 0006 0ce0 movel #396512,%a2@
tail->previous = the_node;
4b15a: 23ca 0006 0ce4 movel %a2,60ce4 <bdbuf_cache+0x50>
old_last->next = the_node;
4b160: 208a movel %a2,%a0@
the_node->previous = old_last;
4b162: 2548 0004 movel %a0,%a2@(4)
bd->hold_timer = bdbuf_config.swap_block_hold;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
4b166: 4aaa 0022 tstl %a2@(34)
4b16a: 6714 beqs 4b180 <rtems_bdbuf_add_to_modified_list_after_access+0x9a>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
4b16c: 246e fffc moveal %fp@(-4),%a2
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4b170: 223c 0006 0cf4 movel #396532,%d1
4b176: 2d41 0008 movel %d1,%fp@(8)
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
4b17a: 4e5e unlk %fp
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_MODIFIED);
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4b17c: 6000 fbb2 braw 4ad30 <rtems_bdbuf_wake>
else if (rtems_bdbuf_has_buffer_waiters ())
4b180: 4ab9 0006 0d04 tstl 60d04 <bdbuf_cache+0x70>
4b186: 670a beqs 4b192 <rtems_bdbuf_add_to_modified_list_after_access+0xac>
rtems_bdbuf_wake_swapper ();
}
4b188: 246e fffc moveal %fp@(-4),%a2
4b18c: 4e5e unlk %fp
rtems_chain_append_unprotected (&bdbuf_cache.modified, &bd->link);
if (bd->waiters)
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
4b18e: 6000 f9c6 braw 4ab56 <rtems_bdbuf_wake_swapper>
}
4b192: 246e fffc moveal %fp@(-4),%a2
4b196: 4e5e unlk %fp <== NOT EXECUTED
0004abd8 <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)
{
4abd8: 4e56 0000 linkw %fp,#0
4abdc: 2f0a movel %a2,%sp@-
4abde: 246e 0008 moveal %fp@(8),%a2
4abe2: 2f02 movel %d2,%sp@-
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
4abe4: 5292 addql #1,%a2@
* 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 ();
4abe6: 4eba ff94 jsr %pc@(4ab7c <rtems_bdbuf_disable_preemption>)
4abea: 2400 movel %d0,%d2
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
4abec: 4eba ff50 jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
4abf0: 42a7 clrl %sp@-
4abf2: 42a7 clrl %sp@-
4abf4: 2f2a 0004 movel %a2@(4),%sp@-
4abf8: 4eb9 0004 73a4 jsr 473a4 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
4abfe: 4fef 000c lea %sp@(12),%sp
4ac02: 7206 moveq #6,%d1
4ac04: b280 cmpl %d0,%d1
4ac06: 6606 bnes 4ac0e <rtems_bdbuf_anonymous_wait+0x36><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAIT_TO);
4ac08: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
4ac0c: 600a bras 4ac18 <rtems_bdbuf_anonymous_wait+0x40><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
4ac0e: 720d moveq #13,%d1
4ac10: b280 cmpl %d0,%d1
4ac12: 6708 beqs 4ac1c <rtems_bdbuf_anonymous_wait+0x44><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAIT_2);
4ac14: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4ac18: 4eba fea0 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4ac1c: 4eba fed4 jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
rtems_bdbuf_restore_preemption (prev_mode);
4ac20: 2f02 movel %d2,%sp@-
4ac22: 4eba ff88 jsr %pc@(4abac <rtems_bdbuf_restore_preemption>)
--waiters->count;
}
4ac26: 242e fff8 movel %fp@(-8),%d2
rtems_bdbuf_lock_cache ();
rtems_bdbuf_restore_preemption (prev_mode);
--waiters->count;
4ac2a: 5392 subql #1,%a2@
4ac2c: 588f addql #4,%sp
}
4ac2e: 246e fffc moveal %fp@(-4),%a2
4ac32: 4e5e unlk %fp <== NOT EXECUTED
0004ad58 <rtems_bdbuf_create_task.constprop.14>:
return NULL;
}
static rtems_status_code
rtems_bdbuf_create_task(
4ad58: 4e56 fff4 linkw %fp,#-12
4ad5c: 206e 0008 moveal %fp@(8),%a0
4ad60: 48d7 040c moveml %d2-%d3/%a2,%sp@
4ad64: 202e 000c movel %fp@(12),%d0
4ad68: 242e 0010 movel %fp@(16),%d2
4ad6c: 262e 0014 movel %fp@(20),%d3
4ad70: 246e 0018 moveal %fp@(24),%a2
rtems_task_argument arg,
rtems_id *id
)
{
rtems_status_code sc;
size_t stack_size = bdbuf_config.task_stack_size ?
4ad74: 2239 0005 e16e movel 5e16e <rtems_bdbuf_configuration+0x1c>,%d1
bdbuf_config.task_stack_size : RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT;
4ad7a: 6604 bnes 4ad80 <rtems_bdbuf_create_task.constprop.14+0x28><== ALWAYS TAKEN
4ad7c: 323c 1000 movew #4096,%d1 <== NOT EXECUTED
priority = priority != 0 ? priority : default_priority;
4ad80: 4a80 tstl %d0
4ad82: 6604 bnes 4ad88 <rtems_bdbuf_create_task.constprop.14+0x30><== ALWAYS TAKEN
4ad84: 103c 000f moveb #15,%d0 <== NOT EXECUTED
sc = rtems_task_create (name,
4ad88: 2f0a movel %a2,%sp@-
4ad8a: 42a7 clrl %sp@-
4ad8c: 4878 0400 pea 400 <D_BIAS+0x2>
4ad90: 2f01 movel %d1,%sp@-
4ad92: 2f00 movel %d0,%sp@-
4ad94: 2f08 movel %a0,%sp@-
4ad96: 4eb9 0004 75a8 jsr 475a8 <rtems_task_create>
stack_size,
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
id);
if (sc == RTEMS_SUCCESSFUL)
4ad9c: 4fef 0018 lea %sp@(24),%sp
4ada0: 4a80 tstl %d0
4ada2: 661a bnes 4adbe <rtems_bdbuf_create_task.constprop.14+0x66><== NEVER TAKEN
sc = rtems_task_start (*id, entry, arg);
4ada4: 2d43 0010 movel %d3,%fp@(16)
4ada8: 2d42 000c movel %d2,%fp@(12)
4adac: 2d52 0008 movel %a2@,%fp@(8)
return sc;
}
4adb0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4adb6: 4e5e unlk %fp
RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR,
RTEMS_LOCAL | RTEMS_NO_FLOATING_POINT,
id);
if (sc == RTEMS_SUCCESSFUL)
sc = rtems_task_start (*id, entry, arg);
4adb8: 4ef9 0004 77e8 jmp 477e8 <rtems_task_start>
return sc;
}
4adbe: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
4adc4: 4e5e unlk %fp <== NOT EXECUTED
0004ab7c <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
4ab7c: 4e56 fffc linkw %fp,#-4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
4ab80: 204e moveal %fp,%a0
4ab82: 42a0 clrl %a0@-
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
4ab84: 2f08 movel %a0,%sp@-
4ab86: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
4ab8a: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
4ab8e: 4eb9 0004 e1b0 jsr 4e1b0 <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
4ab94: 4fef 000c lea %sp@(12),%sp
4ab98: 4a80 tstl %d0
4ab9a: 6708 beqs 4aba4 <rtems_bdbuf_disable_preemption+0x28><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_PREEMPT_DIS);
4ab9c: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4aba0: 4eba ff18 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
return prev_mode;
}
4aba4: 202e fffc movel %fp@(-4),%d0
4aba8: 4e5e unlk %fp <== NOT EXECUTED
0004bd3c <rtems_bdbuf_execute_read_request>:
/*
* 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) +
4bd3c: 72fe moveq #-2,%d1
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
4bd3e: 41fa fa66 lea %pc@(4b7a6 <rtems_bdbuf_transfer_done>),%a0
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
4bd42: 4e56 ffdc linkw %fp,#-36
4bd46: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4bd4a: 282e 0010 movel %fp@(16),%d4
/*
* 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) +
4bd4e: 2004 movel %d4,%d0
{
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
uint32_t block_size = dd->block_size;
uint32_t transfer_index = 1;
4bd50: 7601 moveq #1,%d3
while (transfer_index < transfer_count)
{
media_block += media_blocks_per_block;
bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
4bd52: 4bfa f77c lea %pc@(4b4d0 <rtems_bdbuf_get_buffer_for_read_ahead>),%a5
/*
* 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) +
4bd56: e988 lsll #4,%d0
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
4bd58: 266e 000c moveal %fp@(12),%a3
/*
* 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) +
4bd5c: 0680 0000 001c addil #28,%d0
4bd62: 9fc0 subal %d0,%sp
4bd64: 45ef 0001 lea %sp@(1),%a2
4bd68: 200a movel %a2,%d0
static rtems_status_code
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
4bd6a: 286e 0008 moveal %fp@(8),%a4
/*
* 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) +
4bd6e: c081 andl %d1,%d0
rtems_bdbuf_execute_read_request (rtems_disk_device *dd,
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
4bd70: 242b 0016 movel %a3@(22),%d2
/*
* 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) +
4bd74: 2440 moveal %d0,%a2
uint32_t transfer_count)
{
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
uint32_t block_size = dd->block_size;
4bd76: 2a2c 0024 movel %a4@(36),%d5
rtems_bdbuf_buffer *bd,
uint32_t transfer_count)
{
rtems_blkdev_request *req = NULL;
rtems_blkdev_bnum media_block = bd->block;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
4bd7a: 2c2c 002c movel %a4@(44),%d6
#define bdbuf_alloc(size) __builtin_alloca (size)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
4bd7e: 4292 clrl %a2@
req->done = rtems_bdbuf_transfer_done;
4bd80: 2548 0004 movel %a0,%a2@(4)
req->io_task = rtems_task_self ();
4bd84: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_task_self>
req->bufnum = 0;
4bd8a: 42aa 0010 clrl %a2@(16)
req = bdbuf_alloc (sizeof (rtems_blkdev_request) +
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
req->io_task = rtems_task_self ();
4bd8e: 2540 0014 movel %d0,%a2@(20)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4bd92: 7009 moveq #9,%d0
4bd94: 2740 001e movel %d0,%a3@(30)
req->io_task = rtems_task_self ();
req->bufnum = 0;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [0].user = bd;
4bd98: 254b 0024 movel %a3,%a2@(36)
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
4bd9c: 256b 001a 0020 movel %a3@(26),%a2@(32)
4bda2: 264a moveal %a2,%a3
req->bufnum = 0;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
4bda4: 2542 0018 movel %d2,%a2@(24)
req->bufs [0].length = block_size;
4bda8: 2545 001c movel %d5,%a2@(28)
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
while (transfer_index < transfer_count)
4bdac: 6042 bras 4bdf0 <rtems_bdbuf_execute_read_request+0xb4>
{
media_block += media_blocks_per_block;
4bdae: d486 addl %d6,%d2
4bdb0: 47eb 0010 lea %a3@(16),%a3
bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
4bdb4: 2f02 movel %d2,%sp@-
4bdb6: 2f0c movel %a4,%sp@-
4bdb8: 4e95 jsr %a5@
if (bd == NULL)
4bdba: 508f addql #8,%sp
4bdbc: 4a80 tstl %d0
4bdbe: 6612 bnes 4bdd2 <rtems_bdbuf_execute_read_request+0x96><== ALWAYS TAKEN
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
}
req->bufnum = transfer_index;
4bdc0: 2543 0010 movel %d3,%a2@(16)
return rtems_bdbuf_execute_transfer_request (dd, req, true);
4bdc4: 4878 0001 pea 1 <ADD>
4bdc8: 2f0a movel %a2,%sp@-
4bdca: 2f0c movel %a4,%sp@-
4bdcc: 4eba f9fe jsr %pc@(4b7cc <rtems_bdbuf_execute_transfer_request>)
4bdd0: 6024 bras 4bdf6 <rtems_bdbuf_execute_read_request+0xba>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4bdd2: 2040 moveal %d0,%a0
4bdd4: 7209 moveq #9,%d1
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
4bdd6: 5283 addql #1,%d3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4bdd8: 2141 001e movel %d1,%a0@(30)
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
req->bufs [transfer_index].block = media_block;
req->bufs [transfer_index].length = block_size;
req->bufs [transfer_index].buffer = bd->buffer;
4bddc: 41e8 001a lea %a0@(26),%a0
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
4bde0: 2740 0024 movel %d0,%a3@(36)
req->bufs [transfer_index].block = media_block;
4bde4: 2742 0018 movel %d2,%a3@(24)
req->bufs [transfer_index].length = block_size;
4bde8: 2745 001c movel %d5,%a3@(28)
req->bufs [transfer_index].buffer = bd->buffer;
4bdec: 2750 0020 movel %a0@,%a3@(32)
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
while (transfer_index < transfer_count)
4bdf0: b883 cmpl %d3,%d4
4bdf2: 62ba bhis 4bdae <rtems_bdbuf_execute_read_request+0x72>
4bdf4: 60ca bras 4bdc0 <rtems_bdbuf_execute_read_request+0x84>
}
req->bufnum = transfer_index;
return rtems_bdbuf_execute_transfer_request (dd, req, true);
}
4bdf6: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4bdfc: 4e5e unlk %fp <== NOT EXECUTED
0004aaba <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_fatal_code error)
{
4aaba: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_fatal (RTEMS_FATAL_SOURCE_BDBUF, error);
4aabe: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4aac2: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
4aac6: 4eb9 0004 7a6c jsr 47a6c <rtems_fatal> <== NOT EXECUTED
0004ab08 <rtems_bdbuf_fatal_with_state>:
}
static void
rtems_bdbuf_fatal_with_state (rtems_bdbuf_buf_state state,
rtems_bdbuf_fatal_code error)
{
4ab08: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4ab0c: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED
rtems_bdbuf_fatal ((((uint32_t) state) << 16) | error);
4ab10: 4840 swap %d0 <== NOT EXECUTED
4ab12: 4240 clrw %d0 <== NOT EXECUTED
4ab14: 80ae 000c orl %fp@(12),%d0 <== NOT EXECUTED
4ab18: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ab1a: 4eba ff9e jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
0004c37a <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
4c37a: 4e56 ffe8 linkw %fp,#-24
4c37e: 48d7 047c moveml %d2-%d6/%a2,%sp@
4c382: 246e 0008 moveal %fp@(8),%a2
4c386: 2c2e 000c movel %fp@(12),%d6
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block;
rtems_bdbuf_lock_cache ();
4c38a: 4eba e766 jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
4c38e: bcaa 0028 cmpl %a2@(40),%d6
4c392: 6400 008a bccw 4c41e <rtems_bdbuf_get+0xa4>
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
4c396: 202a 0030 movel %a2@(48),%d0
4c39a: 6d06 blts 4c3a2 <rtems_bdbuf_get+0x28> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
4c39c: 2206 movel %d6,%d1
4c39e: e1a9 lsll %d0,%d1
4c3a0: 6030 bras 4c3d2 <rtems_bdbuf_get+0x58>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
4c3a2: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED
4c3a6: 4284 clrl %d4 <== NOT EXECUTED
4c3a8: 4282 clrl %d2 <== NOT EXECUTED
4c3aa: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4c3ac: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4c3ae: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4c3b0: 42a7 clrl %sp@- <== NOT EXECUTED
4c3b2: 4eb9 0005 c4c8 jsr 5c4c8 <__muldi3> <== NOT EXECUTED
4c3b8: 262a 0020 movel %a2@(32),%d3 <== NOT EXECUTED
4c3bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c3c0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c3c2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c3c4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4c3c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c3c8: 4eb9 0005 cdc4 jsr 5cdc4 <__udivdi3> <== NOT EXECUTED
4c3ce: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
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);
4c3d2: d2aa 0018 addl %a2@(24),%d1
4c3d6: 2f01 movel %d1,%sp@-
4c3d8: 2f0a movel %a2,%sp@-
4c3da: 4eba f142 jsr %pc@(4b51e <rtems_bdbuf_get_buffer_for_access>)
switch (bd->state)
4c3de: 508f addql #8,%sp
4c3e0: 7202 moveq #2,%d1
*/
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);
4c3e2: 2440 moveal %d0,%a2
switch (bd->state)
4c3e4: 202a 001e movel %a2@(30),%d0
4c3e8: b280 cmpl %d0,%d1
4c3ea: 6712 beqs 4c3fe <rtems_bdbuf_get+0x84>
4c3ec: 123c 0007 moveb #7,%d1
4c3f0: b280 cmpl %d0,%d1
4c3f2: 6718 beqs 4c40c <rtems_bdbuf_get+0x92>
4c3f4: 123c 0001 moveb #1,%d1
4c3f8: b280 cmpl %d0,%d1
4c3fa: 6618 bnes 4c414 <rtems_bdbuf_get+0x9a> <== NEVER TAKEN
4c3fc: 6004 bras 4c402 <rtems_bdbuf_get+0x88>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c3fe: 7003 moveq #3,%d0
4c400: 600c bras 4c40e <rtems_bdbuf_get+0x94>
4c402: 7205 moveq #5,%d1
4c404: 2541 001e movel %d1,%a2@(30)
4c408: 4282 clrl %d2
4c40a: 6016 bras 4c422 <rtems_bdbuf_get+0xa8>
4c40c: 7004 moveq #4,%d0
4c40e: 2540 001e movel %d0,%a2@(30)
4c412: 60f4 bras 4c408 <rtems_bdbuf_get+0x8e>
* record of this so just gets the block to fill.
*/
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_2);
4c414: 4878 000f pea f <FPTRAP> <== NOT EXECUTED
4c418: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c41a: 4eba e6ec jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
4c41e: 7404 moveq #4,%d2 <== NOT EXECUTED
rtems_bdbuf_get (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
4c420: 95ca subal %a2,%a2 <== NOT EXECUTED
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
}
rtems_bdbuf_unlock_cache ();
4c422: 4eba e71a jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
*bd_ptr = bd;
4c426: 206e 0010 moveal %fp@(16),%a0
return sc;
}
4c42a: 2002 movel %d2,%d0
}
}
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
4c42c: 208a movel %a2,%a0@
return sc;
}
4c42e: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
4c434: 4e5e unlk %fp <== NOT EXECUTED
0004b51e <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
4b51e: 4e56 ffdc linkw %fp,#-36
4b522: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4b526: 266e 0008 moveal %fp@(8),%a3
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
4b52a: 2c3c 0004 acf0 movel #306416,%d6
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);
4b530: 49fa f704 lea %pc@(4ac36 <rtems_bdbuf_wait>),%a4
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract_unprotected (&bd->link);
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
4b534: 4bfa f620 lea %pc@(4ab56 <rtems_bdbuf_wake_swapper>),%a5
{
if (bd->group->bds_per_group != dd->bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b538: 2a3c 0004 b19a movel #307610,%d5
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b53e: 283c 0004 b0bc movel #307388,%d4
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
4b544: 242e 000c movel %fp@(12),%d2
{
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);
4b548: 263c 0004 ad30 movel #306480,%d3
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
4b54e: 2f02 movel %d2,%sp@-
4b550: 2046 moveal %d6,%a0
4b552: 2f0b movel %a3,%sp@-
4b554: 2f39 0006 0ccc movel 60ccc <bdbuf_cache+0x38>,%sp@-
4b55a: 4e90 jsr %a0@
4b55c: 4fef 000c lea %sp@(12),%sp
4b560: 2440 moveal %d0,%a2
if (bd != NULL)
4b562: 4a80 tstl %d0
4b564: 6700 00a2 beqw 4b608 <rtems_bdbuf_get_buffer_for_access+0xea>
{
if (bd->group->bds_per_group != dd->bds_per_group)
4b568: 206a 0026 moveal %a2@(38),%a0
4b56c: 202b 0034 movel %a3@(52),%d0
4b570: b0a8 0008 cmpl %a0@(8),%d0
4b574: 6700 00b4 beqw 4b62a <rtems_bdbuf_get_buffer_for_access+0x10c>
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4b578: 202a 001e movel %a2@(30),%d0
4b57c: 720a moveq #10,%d1
4b57e: b280 cmpl %d0,%d1
4b580: 657e bcss 4b600 <rtems_bdbuf_get_buffer_for_access+0xe2><== NEVER TAKEN
4b582: 303b 0a08 movew %pc@(4b58c <rtems_bdbuf_get_buffer_for_access+0x6e>,%d0:l:2),%d0
4b586: 48c0 extl %d0
4b588: 4efb 0802 jmp %pc@(4b58c <rtems_bdbuf_get_buffer_for_access+0x6e>,%d0:l)
4b58c: 0104 btst %d0,%d4 <== NOT EXECUTED
4b58e: 0044 .short 0x0044 <== NOT EXECUTED
4b590: 0044 .short 0x0044 <== NOT EXECUTED
4b592: 005c .short 0x005c <== NOT EXECUTED
4b594: 005c .short 0x005c <== NOT EXECUTED
4b596: 005c .short 0x005c <== NOT EXECUTED
4b598: 005c .short 0x005c <== NOT EXECUTED
4b59a: 0016 .short 0x0016 <== NOT EXECUTED
4b59c: 0064 .short 0x0064 <== NOT EXECUTED
4b59e: 0064 .short 0x0064 <== NOT EXECUTED
4b5a0: 0064 .short 0x0064 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b5a2: 7008 moveq #8,%d0 <== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4b5a4: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED
4b5a8: 2540 001e movel %d0,%a2@(30) <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4b5ac: 2252 moveal %a2@,%a1 <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
4b5ae: 2348 0004 movel %a0,%a1@(4) <== NOT EXECUTED
previous->next = next;
4b5b2: 2089 movel %a1,%a0@ <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4b5b4: 2079 0006 0cf0 moveal 60cf0 <bdbuf_cache+0x5c>,%a0 <== NOT EXECUTED
the_node->next = tail;
4b5ba: 24bc 0006 0cec movel #396524,%a2@ <== NOT EXECUTED
tail->previous = the_node;
4b5c0: 23ca 0006 0cf0 movel %a2,60cf0 <bdbuf_cache+0x5c> <== NOT EXECUTED
old_last->next = the_node;
4b5c6: 208a movel %a2,%a0@ <== NOT EXECUTED
the_node->previous = old_last;
4b5c8: 2548 0004 movel %a0,%a2@(4) <== NOT EXECUTED
rtems_bdbuf_request_sync_for_modified_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_extract_unprotected (&bd->link);
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
rtems_bdbuf_wake_swapper ();
4b5cc: 4e95 jsr %a5@ <== NOT EXECUTED
4b5ce: 60a8 bras 4b578 <rtems_bdbuf_get_buffer_for_access+0x5a><== NOT EXECUTED
case RTEMS_BDBUF_STATE_MODIFIED:
rtems_bdbuf_request_sync_for_modified_buffer (bd);
break;
case RTEMS_BDBUF_STATE_CACHED:
case RTEMS_BDBUF_STATE_EMPTY:
if (bd->waiters == 0)
4b5d0: 4aaa 0022 tstl %a2@(34)
4b5d4: 6700 00ba beqw 4b690 <rtems_bdbuf_get_buffer_for_access+0x172>
* It is essential that we wait here without a special wait count and
* without the group in use. Otherwise we could trigger a wait ping
* pong with another recycle waiter. The state of the buffer is
* arbitrary afterwards.
*/
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
4b5d8: 4879 0006 0d04 pea 60d04 <bdbuf_cache+0x70>
4b5de: 4eba f5f8 jsr %pc@(4abd8 <rtems_bdbuf_anonymous_wait>)
4b5e2: 588f addql #4,%sp
4b5e4: 6000 ff68 braw 4b54e <rtems_bdbuf_get_buffer_for_access+0x30>
}
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);
4b5e8: 4879 0006 0cf4 pea 60cf4 <bdbuf_cache+0x60>
4b5ee: 6006 bras 4b5f6 <rtems_bdbuf_get_buffer_for_access+0xd8>
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);
4b5f0: 4879 0006 0cfc pea 60cfc <bdbuf_cache+0x68> <== NOT EXECUTED
4b5f6: 2f0a movel %a2,%sp@-
4b5f8: 4e94 jsr %a4@
4b5fa: 508f addql #8,%sp
4b5fc: 6000 ff7a braw 4b578 <rtems_bdbuf_get_buffer_for_access+0x5a>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_8);
4b600: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
4b604: 6000 0084 braw 4b68a <rtems_bdbuf_get_buffer_for_access+0x16c><== NOT EXECUTED
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
4b608: 2f02 movel %d2,%sp@-
4b60a: 2f0b movel %a3,%sp@-
4b60c: 4eba fbca jsr %pc@(4b1d8 <rtems_bdbuf_get_buffer_from_lru_list>)
if (bd == NULL)
4b610: 508f addql #8,%sp
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
4b612: 2440 moveal %d0,%a2
if (bd == NULL)
4b614: 4a80 tstl %d0
4b616: 6612 bnes 4b62a <rtems_bdbuf_get_buffer_for_access+0x10c>
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
4b618: 223c 0006 0ce0 movel #396512,%d1
4b61e: b2b9 0006 0cdc cmpl 60cdc <bdbuf_cache+0x48>,%d1
4b624: 67b2 beqs 4b5d8 <rtems_bdbuf_get_buffer_for_access+0xba>
rtems_bdbuf_wake_swapper ();
4b626: 4e95 jsr %a5@
4b628: 60ae bras 4b5d8 <rtems_bdbuf_get_buffer_for_access+0xba>
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);
4b62a: 47fa f60a lea %pc@(4ac36 <rtems_bdbuf_wait>),%a3
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4b62e: 202a 001e movel %a2@(30),%d0
4b632: 2200 movel %d0,%d1
4b634: 5381 subql #1,%d1
4b636: 7409 moveq #9,%d2
4b638: b481 cmpl %d1,%d2
4b63a: 654a bcss 4b686 <rtems_bdbuf_get_buffer_for_access+0x168><== NEVER TAKEN
4b63c: 303b 1a08 movew %pc@(4b646 <rtems_bdbuf_get_buffer_for_access+0x128>,%d1:l:2),%d0
4b640: 48c0 extl %d0
4b642: 4efb 0802 jmp %pc@(4b646 <rtems_bdbuf_get_buffer_for_access+0x128>,%d0:l)
4b646: 0068 .short 0x0068 <== NOT EXECUTED
4b648: 001c .short 0x001c <== NOT EXECUTED
4b64a: 002a .short 0x002a <== NOT EXECUTED
4b64c: 002a .short 0x002a <== NOT EXECUTED
4b64e: 002a .short 0x002a <== NOT EXECUTED
4b650: 002a .short 0x002a <== NOT EXECUTED
4b652: 0014 .short 0x0014 <== NOT EXECUTED
4b654: 0032 .short 0x0032 <== NOT EXECUTED
4b656: 0032 .short 0x0032 <== NOT EXECUTED
4b658: 0032 .short 0x0032 <== NOT EXECUTED
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4b65a: 206a 0026 moveal %a2@(38),%a0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4b65e: 53a8 000c subql #1,%a0@(12)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4b662: 2252 moveal %a2@,%a1
previous = the_node->previous;
4b664: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4b668: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4b66c: 2089 movel %a1,%a0@
4b66e: 603e bras 4b6ae <rtems_bdbuf_get_buffer_for_access+0x190>
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);
4b670: 4879 0006 0cf4 pea 60cf4 <bdbuf_cache+0x60>
4b676: 6006 bras 4b67e <rtems_bdbuf_get_buffer_for_access+0x160>
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);
4b678: 4879 0006 0cfc pea 60cfc <bdbuf_cache+0x68>
4b67e: 2f0a movel %a2,%sp@-
4b680: 4e93 jsr %a3@
4b682: 508f addql #8,%sp
4b684: 60a8 bras 4b62e <rtems_bdbuf_get_buffer_for_access+0x110>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_7);
4b686: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED
4b68a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4b68c: 4eba f47a jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
{
if (bd->group->bds_per_group != dd->bds_per_group)
{
if (rtems_bdbuf_wait_for_recycle (bd))
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b690: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b692: 2045 moveal %d5,%a0 <== NOT EXECUTED
4b694: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b696: 2044 moveal %d4,%a0 <== NOT EXECUTED
4b698: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b69a: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4b69c: 4879 0006 0d04 pea 60d04 <bdbuf_cache+0x70> <== NOT EXECUTED
4b6a2: 2043 moveal %d3,%a0 <== NOT EXECUTED
4b6a4: 4e90 jsr %a0@ <== NOT EXECUTED
4b6a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4b6aa: 6000 fea2 braw 4b54e <rtems_bdbuf_get_buffer_for_access+0x30><== NOT EXECUTED
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4b6ae: 206a 0026 moveal %a2@(38),%a0
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
4b6b2: 200a movel %a2,%d0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4b6b4: 52a8 000c addql #1,%a0@(12)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
4b6b8: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4b6be: 4e5e unlk %fp <== NOT EXECUTED
0004b4d0 <rtems_bdbuf_get_buffer_for_read_ahead>:
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_read_ahead (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
4b4d0: 4e56 0000 linkw %fp,#0
4b4d4: 2f03 movel %d3,%sp@-
4b4d6: 262e 000c movel %fp@(12),%d3
4b4da: 2f02 movel %d2,%sp@-
4b4dc: 242e 0008 movel %fp@(8),%d2
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
4b4e0: 2f03 movel %d3,%sp@-
4b4e2: 2f02 movel %d2,%sp@-
4b4e4: 2f39 0006 0ccc movel 60ccc <bdbuf_cache+0x38>,%sp@-
4b4ea: 4eba f804 jsr %pc@(4acf0 <rtems_bdbuf_avl_search.isra.1>)
4b4ee: 4fef 000c lea %sp@(12),%sp
if (bd == NULL)
4b4f2: 4a80 tstl %d0
4b4f4: 661a bnes 4b510 <rtems_bdbuf_get_buffer_for_read_ahead+0x40><== NEVER TAKEN
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
4b4f6: 2f03 movel %d3,%sp@-
4b4f8: 2f02 movel %d2,%sp@-
4b4fa: 4eba fcdc jsr %pc@(4b1d8 <rtems_bdbuf_get_buffer_from_lru_list>)
if (bd != NULL)
4b4fe: 508f addql #8,%sp
4b500: 4a80 tstl %d0
4b502: 670e beqs 4b512 <rtems_bdbuf_get_buffer_for_read_ahead+0x42><== NEVER TAKEN
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4b504: 2240 moveal %d0,%a1
4b506: 2069 0026 moveal %a1@(38),%a0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4b50a: 52a8 000c addql #1,%a0@(12)
4b50e: 6002 bras 4b512 <rtems_bdbuf_get_buffer_for_read_ahead+0x42>
else
/*
* The buffer is in the cache. So it is already available or in use, and
* thus no need for a read ahead.
*/
bd = NULL;
4b510: 4280 clrl %d0 <== NOT EXECUTED
return bd;
}
4b512: 242e fff8 movel %fp@(-8),%d2
4b516: 262e fffc movel %fp@(-4),%d3
4b51a: 4e5e unlk %fp <== NOT EXECUTED
0004b1d8 <rtems_bdbuf_get_buffer_from_lru_list>:
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_from_lru_list (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
4b1d8: 4e56 ff58 linkw %fp,#-168
4b1dc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b1e0: 286e 0008 moveal %fp@(8),%a4
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b1e4: 4bfa ffb4 lea %pc@(4b19a <rtems_bdbuf_remove_from_tree_and_lru_list>),%a5
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b1e8: 2a3c 0004 b0bc movel #307388,%d5
if (b > 1)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4b1ee: 2c3c 0004 ad30 movel #306480,%d6
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4b1f4: 2679 0006 0cd0 moveal 60cd0 <bdbuf_cache+0x3c>,%a3
rtems_bdbuf_get_buffer_from_lru_list (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
4b1fa: 6000 02bc braw 4b4b8 <rtems_bdbuf_get_buffer_from_lru_list+0x2e0>
bd->group->bds_per_group, dd->bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
4b1fe: 4aab 0022 tstl %a3@(34)
4b202: 6600 02b2 bnew 4b4b6 <rtems_bdbuf_get_buffer_from_lru_list+0x2de>
{
if (bd->group->bds_per_group == dd->bds_per_group)
4b206: 246b 0026 moveal %a3@(38),%a2
4b20a: 262c 0034 movel %a4@(52),%d3
4b20e: 202a 0008 movel %a2@(8),%d0
4b212: b680 cmpl %d0,%d3
4b214: 660e bnes 4b224 <rtems_bdbuf_get_buffer_from_lru_list+0x4c>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b216: 2f0b movel %a3,%sp@-
4b218: 4eba ff80 jsr %pc@(4b19a <rtems_bdbuf_remove_from_tree_and_lru_list>)
4b21c: 588f addql #4,%sp
4b21e: 224b moveal %a3,%a1
4b220: 6000 0082 braw 4b2a4 <rtems_bdbuf_get_buffer_from_lru_list+0xcc>
empty_bd = bd;
}
else if (bd->group->users == 0)
4b224: 4aaa 000c tstl %a2@(12)
4b228: 6600 028c bnew 4b4b6 <rtems_bdbuf_get_buffer_from_lru_list+0x2de>
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;
4b22c: 2839 0006 0cb2 movel 60cb2 <bdbuf_cache+0x1e>,%d4
for (b = 0, bd = group->bdbuf;
4b232: 4282 clrl %d2
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;
4b234: 4c40 4004 remul %d0,%d4,%d4
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b238: 7036 moveq #54,%d0
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;
4b23a: 2e2a 0010 movel %a2@(16),%d7
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b23e: 4c00 4800 mulsl %d0,%d4
4b242: 600a bras 4b24e <rtems_bdbuf_get_buffer_from_lru_list+0x76>
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b244: 2f07 movel %d7,%sp@-
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b246: 5282 addql #1,%d2
4b248: de84 addl %d4,%d7
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b24a: 4e95 jsr %a5@
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b24c: 588f addql #4,%sp
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;
4b24e: b4aa 0008 cmpl %a2@(8),%d2
4b252: 65f0 bcss 4b244 <rtems_bdbuf_get_buffer_from_lru_list+0x6c>
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;
4b254: 2239 0006 0cb2 movel 60cb2 <bdbuf_cache+0x1e>,%d1
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4b25a: 7436 moveq #54,%d2
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;
4b25c: 4c43 1001 remul %d3,%d1,%d1
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
group->bds_per_group = new_bds_per_group;
4b260: 2543 0008 movel %d3,%a2@(8)
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4b264: 2e2a 0010 movel %a2@(16),%d7
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;
4b268: 2601 movel %d1,%d3
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4b26a: 4c02 3800 mulsl %d2,%d3
4b26e: 143c 0001 moveb #1,%d2
4b272: de83 addl %d3,%d7
4b274: 600c bras 4b282 <rtems_bdbuf_get_buffer_from_lru_list+0xaa>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b276: 2f07 movel %d7,%sp@-
4b278: 2045 moveal %d5,%a0
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b27a: 5282 addql #1,%d2
4b27c: de83 addl %d3,%d7
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b27e: 4e90 jsr %a0@
group->bds_per_group = new_bds_per_group;
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b280: 588f addql #4,%sp
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;
4b282: b4aa 0008 cmpl %a2@(8),%d2
4b286: 65ee bcss 4b276 <rtems_bdbuf_get_buffer_from_lru_list+0x9e>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
4b288: 7001 moveq #1,%d0
4b28a: b082 cmpl %d2,%d0
4b28c: 640c bccs 4b29a <rtems_bdbuf_get_buffer_from_lru_list+0xc2>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4b28e: 4879 0006 0d04 pea 60d04 <bdbuf_cache+0x70>
4b294: 2046 moveal %d6,%a0
4b296: 4e90 jsr %a0@
4b298: 588f addql #4,%sp
return group->bdbuf;
4b29a: 226a 0010 moveal %a2@(16),%a1
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, dd->bds_per_group);
}
if (empty_bd != NULL)
4b29e: 4a89 tstl %a1
4b2a0: 6700 0214 beqw 4b4b6 <rtems_bdbuf_get_buffer_from_lru_list+0x2de>
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
4b2a4: 202e 000c movel %fp@(12),%d0
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;
4b2a8: 220e movel %fp,%d1
4b2aa: 0681 ffff ff80 addil #-128,%d1
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
4b2b0: 234c 0012 movel %a4,%a1@(18)
bd->block = block;
bd->avl.left = NULL;
4b2b4: 42a9 0008 clrl %a1@(8)
bd->avl.right = NULL;
4b2b8: 42a9 000c clrl %a1@(12)
rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
4b2bc: 2079 0006 0ccc moveal 60ccc <bdbuf_cache+0x38>,%a0
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
bd->dd = dd ;
bd->block = block;
4b2c2: 2340 0016 movel %d0,%a1@(22)
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
4b2c6: 42a9 0022 clrl %a1@(34)
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
4b2ca: 4a88 tstl %a0
4b2cc: 665a bnes 4b328 <rtems_bdbuf_get_buffer_from_lru_list+0x150>
{
*root = node;
4b2ce: 23c9 0006 0ccc movel %a1,60ccc <bdbuf_cache+0x38>
node->avl.left = NULL;
node->avl.right = NULL;
node->avl.bal = 0;
4b2d4: 4201 clrb %d1
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
4b2d6: 42a9 0008 clrl %a1@(8)
node->avl.right = NULL;
node->avl.bal = 0;
4b2da: 1341 0011 moveb %d1,%a1@(17)
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
node->avl.right = NULL;
4b2de: 42a9 000c clrl %a1@(12)
4b2e2: 6000 01ca braw 4b4ae <rtems_bdbuf_get_buffer_from_lru_list+0x2d6>
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
4b2e6: b9c0 cmpal %d0,%a4
4b2e8: 6626 bnes 4b310 <rtems_bdbuf_get_buffer_from_lru_list+0x138><== NEVER TAKEN
4b2ea: 2028 0016 movel %a0@(22),%d0
4b2ee: b0ae 000c cmpl %fp@(12),%d0
4b2f2: 6414 bccs 4b308 <rtems_bdbuf_get_buffer_from_lru_list+0x130>
{
p->avl.cache = 1;
q = p->avl.right;
4b2f4: 2028 000c movel %a0@(12),%d0
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
|| ((p->dd == dd) && (p->block < block)))
{
p->avl.cache = 1;
4b2f8: 7401 moveq #1,%d2
4b2fa: 1142 0010 moveb %d2,%a0@(16)
q = p->avl.right;
if (q == NULL)
4b2fe: 4a80 tstl %d0
4b300: 6622 bnes 4b324 <rtems_bdbuf_get_buffer_from_lru_list+0x14c>
{
q = node;
p->avl.right = q = node;
4b302: 2149 000c movel %a1,%a0@(12)
4b306: 602e bras 4b336 <rtems_bdbuf_get_buffer_from_lru_list+0x15e>
break;
}
}
else if ((p->dd != dd) || (p->block != block))
4b308: b0ae 000c cmpl %fp@(12),%d0
4b30c: 6700 0198 beqw 4b4a6 <rtems_bdbuf_get_buffer_from_lru_list+0x2ce>
{
p->avl.cache = -1;
q = p->avl.left;
4b310: 2028 0008 movel %a0@(8),%d0
break;
}
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
4b314: 50c3 st %d3
4b316: 1143 0010 moveb %d3,%a0@(16)
q = p->avl.left;
if (q == NULL)
4b31a: 4a80 tstl %d0
4b31c: 6606 bnes 4b324 <rtems_bdbuf_get_buffer_from_lru_list+0x14c>
{
q = node;
p->avl.left = q;
4b31e: 2149 0008 movel %a1,%a0@(8)
4b322: 6012 bras 4b336 <rtems_bdbuf_get_buffer_from_lru_list+0x15e>
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
4b324: 220a movel %a2,%d1
4b326: 2040 moveal %d0,%a0
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4b328: 2441 moveal %d1,%a2
if (((uintptr_t) p->dd < (uintptr_t) dd)
4b32a: 2028 0012 movel %a0@(18),%d0
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4b32e: 24c8 movel %a0,%a2@+
if (((uintptr_t) p->dd < (uintptr_t) dd)
4b330: b9c0 cmpal %d0,%a4
4b332: 62c0 bhis 4b2f4 <rtems_bdbuf_get_buffer_from_lru_list+0x11c><== NEVER TAKEN
4b334: 60b0 bras 4b2e6 <rtems_bdbuf_get_buffer_from_lru_list+0x10e>
4b336: 2841 moveal %d1,%a4
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
4b338: 220e movel %fp,%d1
4b33a: 0681 ffff ff80 addil #-128,%d1
p = q;
}
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
4b340: 4200 clrb %d0
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4b342: 42a9 000c clrl %a1@(12)
q->avl.bal = 0;
4b346: 1340 0011 moveb %d0,%a1@(17)
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4b34a: 42a9 0008 clrl %a1@(8)
4b34e: 6002 bras 4b352 <rtems_bdbuf_get_buffer_from_lru_list+0x17a>
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
4b350: 204a moveal %a2,%a0
{
if (p->avl.cache == -1)
4b352: 76ff moveq #-1,%d3
4b354: 1428 0010 moveb %a0@(16),%d2
4b358: 1028 0011 moveb %a0@(17),%d0
4b35c: 49c2 extbl %d2
4b35e: b682 cmpl %d2,%d3
4b360: 6600 0086 bnew 4b3e8 <rtems_bdbuf_get_buffer_from_lru_list+0x210>
{
switch (p->avl.bal)
4b364: 4a00 tstb %d0
4b366: 671c beqs 4b384 <rtems_bdbuf_get_buffer_from_lru_list+0x1ac>
4b368: 49c0 extbl %d0
4b36a: 7401 moveq #1,%d2
4b36c: b480 cmpl %d0,%d2
4b36e: 6708 beqs 4b378 <rtems_bdbuf_get_buffer_from_lru_list+0x1a0>
4b370: b680 cmpl %d0,%d3
4b372: 6600 00fe bnew 4b472 <rtems_bdbuf_get_buffer_from_lru_list+0x29a>
4b376: 6016 bras 4b38e <rtems_bdbuf_get_buffer_from_lru_list+0x1b6>
{
case 1:
p->avl.bal = 0;
4b378: 4203 clrb %d3
modified = false;
4b37a: 4200 clrb %d0
if (p->avl.cache == -1)
{
switch (p->avl.bal)
{
case 1:
p->avl.bal = 0;
4b37c: 1143 0011 moveb %d3,%a0@(17)
4b380: 6000 00f2 braw 4b474 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
modified = false;
break;
case 0:
p->avl.bal = -1;
4b384: 50c0 st %d0
4b386: 1140 0011 moveb %d0,%a0@(17)
4b38a: 6000 00e6 braw 4b472 <rtems_bdbuf_get_buffer_from_lru_list+0x29a>
break;
case -1:
p1 = p->avl.left;
4b38e: 2668 0008 moveal %a0@(8),%a3
if (p1->avl.bal == -1) /* simple LL-turn */
4b392: 74ff moveq #-1,%d2
4b394: 102b 0011 moveb %a3@(17),%d0
4b398: 49c0 extbl %d0
4b39a: b480 cmpl %d0,%d2
4b39c: 6612 bnes 4b3b0 <rtems_bdbuf_get_buffer_from_lru_list+0x1d8>
{
p->avl.left = p1->avl.right;
4b39e: 216b 000c 0008 movel %a3@(12),%a0@(8)
p1->avl.right = p;
p->avl.bal = 0;
4b3a4: 4203 clrb %d3
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
4b3a6: 2748 000c movel %a0,%a3@(12)
p->avl.bal = 0;
4b3aa: 1143 0011 moveb %d3,%a0@(17)
4b3ae: 607a bras 4b42a <rtems_bdbuf_get_buffer_from_lru_list+0x252>
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
4b3b0: 246b 000c moveal %a3@(12),%a2
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;
4b3b4: 74ff moveq #-1,%d2
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4b3b6: 7601 moveq #1,%d3
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;
4b3b8: 102a 0011 moveb %a2@(17),%d0
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
4b3bc: 276a 0008 000c movel %a2@(8),%a3@(12)
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;
4b3c2: 49c0 extbl %d0
4b3c4: b480 cmpl %d0,%d2
4b3c6: 56c0 sne %d0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
4b3c8: 254b 0008 movel %a3,%a2@(8)
p->avl.left = p2->avl.right;
4b3cc: 216a 000c 0008 movel %a2@(12),%a0@(8)
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = +1; else p->avl.bal = 0;
4b3d2: 5280 addql #1,%d0
4b3d4: 1140 0011 moveb %d0,%a0@(17)
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
4b3d8: 2548 000c movel %a0,%a2@(12)
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;
4b3dc: 102a 0011 moveb %a2@(17),%d0
4b3e0: 49c0 extbl %d0
4b3e2: b680 cmpl %d0,%d3
4b3e4: 57c0 seq %d0
4b3e6: 607c bras 4b464 <rtems_bdbuf_get_buffer_from_lru_list+0x28c>
break;
}
}
else
{
switch (p->avl.bal)
4b3e8: 4a00 tstb %d0
4b3ea: 6716 beqs 4b402 <rtems_bdbuf_get_buffer_from_lru_list+0x22a>
4b3ec: 49c0 extbl %d0
4b3ee: 7401 moveq #1,%d2
4b3f0: b480 cmpl %d0,%d2
4b3f2: 6716 beqs 4b40a <rtems_bdbuf_get_buffer_from_lru_list+0x232>
4b3f4: 76ff moveq #-1,%d3
4b3f6: b680 cmpl %d0,%d3
4b3f8: 6678 bnes 4b472 <rtems_bdbuf_get_buffer_from_lru_list+0x29a><== NEVER TAKEN
{
case -1:
p->avl.bal = 0;
4b3fa: 4200 clrb %d0
4b3fc: 1140 0011 moveb %d0,%a0@(17)
4b400: 6072 bras 4b474 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
modified = false;
break;
case 0:
p->avl.bal = 1;
4b402: 7401 moveq #1,%d2
4b404: 1142 0011 moveb %d2,%a0@(17)
4b408: 6068 bras 4b472 <rtems_bdbuf_get_buffer_from_lru_list+0x29a>
break;
case 1:
p1 = p->avl.right;
4b40a: 2668 000c moveal %a0@(12),%a3
if (p1->avl.bal == 1) /* simple RR-turn */
4b40e: 7601 moveq #1,%d3
4b410: 102b 0011 moveb %a3@(17),%d0
4b414: 49c0 extbl %d0
4b416: b680 cmpl %d0,%d3
4b418: 6614 bnes 4b42e <rtems_bdbuf_get_buffer_from_lru_list+0x256><== NEVER TAKEN
{
p->avl.right = p1->avl.left;
4b41a: 216b 0008 000c movel %a3@(8),%a0@(12)
p1->avl.left = p;
p->avl.bal = 0;
4b420: 4200 clrb %d0
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
4b422: 2748 0008 movel %a0,%a3@(8)
p->avl.bal = 0;
4b426: 1140 0011 moveb %d0,%a0@(17)
4b42a: 244b moveal %a3,%a2
4b42c: 603a bras 4b468 <rtems_bdbuf_get_buffer_from_lru_list+0x290>
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
4b42e: 246b 0008 moveal %a3@(8),%a2 <== NOT EXECUTED
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;
4b432: 7401 moveq #1,%d2 <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
4b434: 76ff moveq #-1,%d3 <== NOT EXECUTED
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;
4b436: 102a 0011 moveb %a2@(17),%d0 <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
4b43a: 276a 000c 0008 movel %a2@(12),%a3@(8) <== NOT EXECUTED
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;
4b440: 49c0 extbl %d0 <== NOT EXECUTED
4b442: b480 cmpl %d0,%d2 <== NOT EXECUTED
4b444: 57c0 seq %d0 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
4b446: 254b 000c movel %a3,%a2@(12) <== NOT EXECUTED
p->avl.right = p2->avl.left;
4b44a: 216a 0008 000c movel %a2@(8),%a0@(12) <== NOT EXECUTED
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4b450: 1140 0011 moveb %d0,%a0@(17) <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
4b454: 2548 0008 movel %a0,%a2@(8) <== 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;
4b458: 102a 0011 moveb %a2@(17),%d0 <== NOT EXECUTED
4b45c: 49c0 extbl %d0 <== NOT EXECUTED
4b45e: b680 cmpl %d0,%d3 <== NOT EXECUTED
4b460: 56c0 sne %d0 <== NOT EXECUTED
4b462: 5280 addql #1,%d0 <== NOT EXECUTED
4b464: 1740 0011 moveb %d0,%a3@(17)
p = p2;
}
p->avl.bal = 0;
4b468: 204a moveal %a2,%a0
4b46a: 4200 clrb %d0
4b46c: 1540 0011 moveb %d0,%a2@(17)
4b470: 6002 bras 4b474 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
break;
}
}
else
{
switch (p->avl.bal)
4b472: 7001 moveq #1,%d0
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
4b474: b28c cmpl %a4,%d1
4b476: 641c bccs 4b494 <rtems_bdbuf_get_buffer_from_lru_list+0x2bc>
{
p = *--buf_prev;
4b478: 246c fffc moveal %a4@(-4),%a2
if (p->avl.cache == -1)
4b47c: 76ff moveq #-1,%d3
4b47e: 142a 0010 moveb %a2@(16),%d2
4b482: 49c2 extbl %d2
4b484: b682 cmpl %d2,%d3
4b486: 6606 bnes 4b48e <rtems_bdbuf_get_buffer_from_lru_list+0x2b6>
{
p->avl.left = q;
4b488: 2548 0008 movel %a0,%a2@(8)
4b48c: 600e bras 4b49c <rtems_bdbuf_get_buffer_from_lru_list+0x2c4>
}
else
{
p->avl.right = q;
4b48e: 2548 000c movel %a0,%a2@(12)
4b492: 6008 bras 4b49c <rtems_bdbuf_get_buffer_from_lru_list+0x2c4>
}
}
else
{
*root = p;
4b494: 23c8 0006 0ccc movel %a0,60ccc <bdbuf_cache+0x38>
4b49a: 6012 bras 4b4ae <rtems_bdbuf_get_buffer_from_lru_list+0x2d6>
4b49c: 598c subql #4,%a4
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
4b49e: 4a00 tstb %d0
4b4a0: 6600 feae bnew 4b350 <rtems_bdbuf_get_buffer_from_lru_list+0x178>
4b4a4: 6008 bras 4b4ae <rtems_bdbuf_get_buffer_from_lru_list+0x2d6>
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
if (rtems_bdbuf_avl_insert (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RECYCLE);
4b4a6: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
4b4aa: 4eba f60e jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b4ae: 7001 moveq #1,%d0
4b4b0: 2340 001e movel %d0,%a1@(30)
4b4b4: 600e bras 4b4c4 <rtems_bdbuf_get_buffer_from_lru_list+0x2ec>
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4b4b6: 2653 moveal %a3@,%a3
rtems_bdbuf_get_buffer_from_lru_list (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
4b4b8: b7fc 0006 0cd4 cmpal #396500,%a3
4b4be: 6600 fd3e bnew 4b1fe <rtems_bdbuf_get_buffer_from_lru_list+0x26>
}
node = rtems_chain_next (node);
}
return NULL;
4b4c2: 93c9 subal %a1,%a1
}
4b4c4: 2009 movel %a1,%d0
4b4c6: 4cee 3cfc ff58 moveml %fp@(-168),%d2-%d7/%a2-%a5
4b4cc: 4e5e unlk %fp <== NOT EXECUTED
0004bfbe <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
4bfbe: 4e56 ffd8 linkw %fp,#-40
4bfc2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
4bfc6: 4ab9 0006 169c tstl 6169c <_Per_CPU_Information+0x8>
4bfcc: 6600 039c bnew 4c36a <rtems_bdbuf_init+0x3ac>
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
4bfd0: 2439 0005 e176 movel 5e176 <rtems_bdbuf_configuration+0x24>,%d2
4bfd6: 2839 0005 e17a movel 5e17a <rtems_bdbuf_configuration+0x28>,%d4
4bfdc: 4c42 4000 remul %d2,%d0,%d4
4bfe0: 4c42 4004 remul %d2,%d4,%d4
4bfe4: 4a80 tstl %d0
4bfe6: 6600 0386 bnew 4c36e <rtems_bdbuf_init+0x3b0>
/*
* 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 ();
4bfea: 4eba eb90 jsr %pc@(4ab7c <rtems_bdbuf_disable_preemption>)
4bfee: 2600 movel %d0,%d3
if (bdbuf_cache.initialised)
4bff0: 4a39 0006 0d25 tstb 60d25 <bdbuf_cache+0x91>
4bff6: 670e beqs 4c006 <rtems_bdbuf_init+0x48> <== ALWAYS TAKEN
{
rtems_bdbuf_restore_preemption (prev_mode);
4bff8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bffa: 4eba ebb0 jsr %pc@(4abac <rtems_bdbuf_restore_preemption>)<== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
4bffe: 588f addql #4,%sp <== NOT EXECUTED
4c000: 700c moveq #12,%d0 <== NOT EXECUTED
4c002: 6000 036c braw 4c370 <rtems_bdbuf_init+0x3b2> <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
4c006: 4878 0092 pea 92 <DBL_MANT_DIG+0x5d>
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
4c00a: 2c3c 0006 0c9a movel #396442,%d6
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c010: 2e3c 0006 0cd4 movel #396500,%d7
4c016: 42a7 clrl %sp@-
4c018: 4879 0006 0c94 pea 60c94 <bdbuf_cache>
rtems_chain_initialize_empty (&bdbuf_cache.read_ahead_chain);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4c01e: 45f9 0004 7168 lea 47168 <rtems_semaphore_create>,%a2
{
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
4c024: 4eb9 0005 074c jsr 5074c <memset>
bdbuf_cache.initialised = true;
4c02a: 7001 moveq #1,%d0
rtems_bdbuf_restore_preemption (prev_mode);
4c02c: 2f03 movel %d3,%sp@-
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
4c02e: 13c0 0006 0d25 moveb %d0,60d25 <bdbuf_cache+0x91>
rtems_bdbuf_restore_preemption (prev_mode);
4c034: 4eba eb76 jsr %pc@(4abac <rtems_bdbuf_restore_preemption>)
rtems_chain_initialize_empty (&bdbuf_cache.read_ahead_chain);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4c038: 4879 0006 0cba pea 60cba <bdbuf_cache+0x26>
4c03e: 223c 0006 0c9e movel #396446,%d1
head->previous = NULL;
tail->previous = head;
4c044: 203c 0006 0cd0 movel #396496,%d0
4c04a: 42a7 clrl %sp@-
4c04c: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4c050: 4878 0001 pea 1 <ADD>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c054: 23c1 0006 0c9a movel %d1,60c9a <bdbuf_cache+0x6>
4c05a: 223c 0006 0ce0 movel #396512,%d1
head->previous = NULL;
tail->previous = head;
4c060: 23c6 0006 0ca2 movel %d6,60ca2 <bdbuf_cache+0xe>
4c066: 2c3c 0006 0cdc movel #396508,%d6
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c06c: 23c7 0006 0cd0 movel %d7,60cd0 <bdbuf_cache+0x3c>
4c072: 2e3c 0006 0cec movel #396524,%d7
head->previous = NULL;
tail->previous = head;
4c078: 23c0 0006 0cd8 movel %d0,60cd8 <bdbuf_cache+0x44>
4c07e: 203c 0006 0ce8 movel #396520,%d0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c084: 23c1 0006 0cdc movel %d1,60cdc <bdbuf_cache+0x48>
head->previous = NULL;
tail->previous = head;
4c08a: 23c6 0006 0ce4 movel %d6,60ce4 <bdbuf_cache+0x50>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c090: 223c 0006 0d1c movel #396572,%d1
head->previous = NULL;
tail->previous = head;
4c096: 2c3c 0006 0d18 movel #396568,%d6
4c09c: 2f3c 4244 436c movel #1111769964,%sp@-
*/
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;
4c0a2: 42b9 0006 0cc8 clrl 60cc8 <bdbuf_cache+0x34>
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4c0a8: 42b9 0006 0c9e clrl 60c9e <bdbuf_cache+0xa>
4c0ae: 42b9 0006 0cd4 clrl 60cd4 <bdbuf_cache+0x40>
4c0b4: 42b9 0006 0ce0 clrl 60ce0 <bdbuf_cache+0x4c>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c0ba: 23c7 0006 0ce8 movel %d7,60ce8 <bdbuf_cache+0x54>
head->previous = NULL;
4c0c0: 42b9 0006 0cec clrl 60cec <bdbuf_cache+0x58>
tail->previous = head;
4c0c6: 23c0 0006 0cf0 movel %d0,60cf0 <bdbuf_cache+0x5c>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c0cc: 23c1 0006 0d18 movel %d1,60d18 <bdbuf_cache+0x84>
head->previous = NULL;
4c0d2: 42b9 0006 0d1c clrl 60d1c <bdbuf_cache+0x88>
tail->previous = head;
4c0d8: 23c6 0006 0d20 movel %d6,60d20 <bdbuf_cache+0x8c>
rtems_chain_initialize_empty (&bdbuf_cache.read_ahead_chain);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
4c0de: 4e92 jsr %a2@
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
4c0e0: 4fef 0024 lea %sp@(36),%sp
4c0e4: 4a80 tstl %d0
4c0e6: 6600 01f4 bnew 4c2dc <rtems_bdbuf_init+0x31e>
goto error;
rtems_bdbuf_lock_cache ();
4c0ea: 4eba ea06 jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
4c0ee: 4879 0006 0cbe pea 60cbe <bdbuf_cache+0x2a>
4c0f4: 42a7 clrl %sp@-
4c0f6: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4c0fa: 4878 0001 pea 1 <ADD>
4c0fe: 2f3c 4244 4373 movel #1111769971,%sp@-
4c104: 4e92 jsr %a2@
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
4c106: 4fef 0014 lea %sp@(20),%sp
4c10a: 4a80 tstl %d0
4c10c: 6600 01ce bnew 4c2dc <rtems_bdbuf_init+0x31e>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
4c110: 4879 0006 0cf8 pea 60cf8 <bdbuf_cache+0x64>
4c116: 42a7 clrl %sp@-
4c118: 4878 0024 pea 24 <OPER2+0x10>
4c11c: 42a7 clrl %sp@-
4c11e: 2f3c 4244 4361 movel #1111769953,%sp@-
4c124: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4c126: 4fef 0014 lea %sp@(20),%sp
4c12a: 4a80 tstl %d0
4c12c: 6600 01ae bnew 4c2dc <rtems_bdbuf_init+0x31e>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
4c130: 4879 0006 0d00 pea 60d00 <bdbuf_cache+0x6c>
4c136: 42a7 clrl %sp@-
4c138: 4878 0024 pea 24 <OPER2+0x10>
4c13c: 42a7 clrl %sp@-
4c13e: 2f3c 4244 4374 movel #1111769972,%sp@-
4c144: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4c146: 4fef 0014 lea %sp@(20),%sp
4c14a: 4a80 tstl %d0
4c14c: 6600 018e bnew 4c2dc <rtems_bdbuf_init+0x31e>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
4c150: 4879 0006 0d08 pea 60d08 <bdbuf_cache+0x74>
4c156: 42a7 clrl %sp@-
4c158: 4878 0024 pea 24 <OPER2+0x10>
4c15c: 42a7 clrl %sp@-
4c15e: 2f3c 4244 4362 movel #1111769954,%sp@-
4c164: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4c166: 4fef 0014 lea %sp@(20),%sp
4c16a: 4a80 tstl %d0
4c16c: 6600 016e bnew 4c2dc <rtems_bdbuf_init+0x31e>
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
4c170: 2639 0005 e172 movel 5e172 <rtems_bdbuf_configuration+0x20>,%d3
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4c176: 45f9 0004 3550 lea 43550 <calloc>,%a2
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
4c17c: 4c42 3003 remul %d2,%d3,%d3
bdbuf_cache.max_bds_per_group =
4c180: 23c4 0006 0cb2 movel %d4,60cb2 <bdbuf_cache+0x1e>
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
4c186: 2e03 movel %d3,%d7
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4c188: 2f03 movel %d3,%sp@-
4c18a: 4878 0036 pea 36 <DBL_MANT_DIG+0x1>
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 =
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
4c18e: 4c44 7007 remul %d4,%d7,%d7
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
4c192: 23c3 0006 0cae movel %d3,60cae <bdbuf_cache+0x1a>
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 =
4c198: 23c7 0006 0d0c movel %d7,60d0c <bdbuf_cache+0x78>
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4c19e: 4e92 jsr %a2@
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
4c1a0: 508f addql #8,%sp
bdbuf_cache.buffer_min_count / bdbuf_cache.max_bds_per_group;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4c1a2: 23c0 0006 0ca6 movel %d0,60ca6 <bdbuf_cache+0x12>
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
4c1a8: 6700 0132 beqw 4c2dc <rtems_bdbuf_init+0x31e>
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
4c1ac: 2f07 movel %d7,%sp@-
4c1ae: 4878 0014 pea 14 <OPER2>
4c1b2: 4e92 jsr %a2@
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
4c1b4: 508f addql #8,%sp
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
4c1b6: 23c0 0006 0d10 movel %d0,60d10 <bdbuf_cache+0x7c>
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
4c1bc: 6700 011e beqw 4c2dc <rtems_bdbuf_init+0x31e>
* 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,
4c1c0: 4c02 3800 mulsl %d2,%d3
4c1c4: 2f03 movel %d3,%sp@-
4c1c6: 4878 0020 pea 20 <OPER2+0xc>
4c1ca: 4879 0006 0caa pea 60caa <bdbuf_cache+0x16>
4c1d0: 4eb9 0004 dba8 jsr 4dba8 <rtems_memalign>
4c1d6: 4fef 000c lea %sp@(12),%sp
4c1da: 4a80 tstl %d0
4c1dc: 6600 00fe bnew 4c2dc <rtems_bdbuf_init+0x31e>
bd->group = group;
bd->buffer = buffer;
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4c1e0: 2a39 0006 0cb2 movel 60cb2 <bdbuf_cache+0x1e>,%d5
(bdbuf_cache.max_bds_per_group - 1))
4c1e6: 2a45 moveal %d5,%a5
4c1e8: 538d subql #1,%a5
/*
* 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,
4c1ea: 2279 0006 0d10 moveal 60d10 <bdbuf_cache+0x7c>,%a1
4c1f0: 2609 movel %a1,%d3
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
4c1f2: 2239 0006 0ca6 movel 60ca6 <bdbuf_cache+0x12>,%d1
4c1f8: 2041 moveal %d1,%a0
4c1fa: 2839 0006 0caa movel 60caa <bdbuf_cache+0x16>,%d4
b < bdbuf_cache.buffer_min_count;
4c200: 2879 0006 0cae moveal 60cae <bdbuf_cache+0x1a>,%a4
/*
* 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,
4c206: 603c bras 4c244 <rtems_bdbuf_init+0x286>
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;
4c208: 42a8 0012 clrl %a0@(18)
bd->group = group;
bd->buffer = buffer;
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4c20c: 2c00 movel %d0,%d6
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;
4c20e: 2143 0026 movel %d3,%a0@(38)
bd->buffer = buffer;
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4c212: 4c45 6007 remul %d5,%d7,%d6
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dd = BDBUF_INVALID_DEV;
bd->group = group;
bd->buffer = buffer;
4c216: 2144 001a movel %d4,%a0@(26)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4c21a: 2479 0006 0cd8 moveal 60cd8 <bdbuf_cache+0x44>,%a2
the_node->next = tail;
4c220: 20bc 0006 0cd4 movel #396500,%a0@
tail->previous = the_node;
4c226: 23c8 0006 0cd8 movel %a0,60cd8 <bdbuf_cache+0x44>
old_last->next = the_node;
4c22c: 2488 movel %a0,%a2@
the_node->previous = old_last;
4c22e: 214a 0004 movel %a2,%a0@(4)
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4c232: bbc7 cmpal %d7,%a5
4c234: 6606 bnes 4c23c <rtems_bdbuf_init+0x27e>
(bdbuf_cache.max_bds_per_group - 1))
group++;
4c236: 0683 0000 0014 addil #20,%d3
* 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)
4c23c: 5280 addql #1,%d0
4c23e: 41e8 0036 lea %a0@(54),%a0
4c242: d882 addl %d2,%d4
/*
* 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,
4c244: b9c0 cmpal %d0,%a4
4c246: 66c0 bnes 4c208 <rtems_bdbuf_init+0x24a>
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
4c248: 2439 0006 0cb2 movel 60cb2 <bdbuf_cache+0x1e>,%d2
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
4c24e: 7636 moveq #54,%d3
4c250: 4c02 3800 mulsl %d2,%d3
4c254: 4280 clrl %d0
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
4c256: 2079 0006 0d0c moveal 60d0c <bdbuf_cache+0x78>,%a0
4c25c: 6010 bras 4c26e <rtems_bdbuf_init+0x2b0>
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
4c25e: 2341 0010 movel %d1,%a1@(16)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
4c262: 5280 addql #1,%d0
group++,
bd += bdbuf_cache.max_bds_per_group)
4c264: d283 addl %d3,%d1
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
4c266: 2342 0008 movel %d2,%a1@(8)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
4c26a: 43e9 0014 lea %a1@(20),%a1
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
4c26e: b1c0 cmpal %d0,%a0
4c270: 66ec bnes 4c25e <rtems_bdbuf_init+0x2a0>
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
4c272: 4879 0006 0c94 pea 60c94 <bdbuf_cache>
4c278: 45fa eade lea %pc@(4ad58 <rtems_bdbuf_create_task.constprop.14>),%a2
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
4c27c: 7001 moveq #1,%d0
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
4c27e: 42a7 clrl %sp@-
4c280: 487a f770 pea %pc@(4b9f2 <rtems_bdbuf_swapout_task>)
4c284: 2f39 0005 e15a movel 5e15a <rtems_bdbuf_configuration+0x8>,%sp@-
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
4c28a: 13c0 0006 0c98 moveb %d0,60c98 <bdbuf_cache+0x4>
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
4c290: 2f3c 4253 5750 movel #1112758096,%sp@-
4c296: 4e92 jsr %a2@
bdbuf_config.swapout_priority,
RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT,
rtems_bdbuf_swapout_task,
0,
&bdbuf_cache.swapout);
if (sc != RTEMS_SUCCESSFUL)
4c298: 4fef 0014 lea %sp@(20),%sp
4c29c: 4a80 tstl %d0
4c29e: 663c bnes 4c2dc <rtems_bdbuf_init+0x31e> <== NEVER TAKEN
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
4c2a0: 4ab9 0005 e152 tstl 5e152 <rtems_bdbuf_configuration>
4c2a6: 660a bnes 4c2b2 <rtems_bdbuf_init+0x2f4>
&bdbuf_cache.read_ahead_task);
if (sc != RTEMS_SUCCESSFUL)
goto error;
}
rtems_bdbuf_unlock_cache ();
4c2a8: 4eba e894 jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c2ac: 4280 clrl %d0
4c2ae: 6000 00c0 braw 4c370 <rtems_bdbuf_init+0x3b2>
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
4c2b2: 4879 0006 0d14 pea 60d14 <bdbuf_cache+0x80>
if (sc != RTEMS_SUCCESSFUL)
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
4c2b8: 7201 moveq #1,%d1
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
4c2ba: 42a7 clrl %sp@-
4c2bc: 487a fb42 pea %pc@(4be00 <rtems_bdbuf_read_ahead_task>)
4c2c0: 2f39 0005 e17e movel 5e17e <rtems_bdbuf_configuration+0x2c>,%sp@-
if (sc != RTEMS_SUCCESSFUL)
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
4c2c6: 13c1 0006 0d24 moveb %d1,60d24 <bdbuf_cache+0x90>
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
4c2cc: 2f3c 4252 4441 movel #1112687681,%sp@-
4c2d2: 4e92 jsr %a2@
bdbuf_config.read_ahead_priority,
RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT,
rtems_bdbuf_read_ahead_task,
0,
&bdbuf_cache.read_ahead_task);
if (sc != RTEMS_SUCCESSFUL)
4c2d4: 4fef 0014 lea %sp@(20),%sp
4c2d8: 4a80 tstl %d0
4c2da: 67cc beqs 4c2a8 <rtems_bdbuf_init+0x2ea> <== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.read_ahead_task != 0)
4c2dc: 2039 0006 0d14 movel 60d14 <bdbuf_cache+0x80>,%d0 <== NOT EXECUTED
4c2e2: 670a beqs 4c2ee <rtems_bdbuf_init+0x330> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.read_ahead_task);
4c2e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c2e6: 4eb9 0004 76d4 jsr 476d4 <rtems_task_delete> <== NOT EXECUTED
4c2ec: 588f addql #4,%sp <== NOT EXECUTED
if (bdbuf_cache.swapout != 0)
4c2ee: 2039 0006 0c94 movel 60c94 <bdbuf_cache>,%d0 <== NOT EXECUTED
4c2f4: 670a beqs 4c300 <rtems_bdbuf_init+0x342> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
4c2f6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c2f8: 4eb9 0004 76d4 jsr 476d4 <rtems_task_delete> <== NOT EXECUTED
4c2fe: 588f addql #4,%sp <== NOT EXECUTED
free (bdbuf_cache.buffers);
4c300: 2f39 0006 0caa movel 60caa <bdbuf_cache+0x16>,%sp@- <== NOT EXECUTED
4c306: 45f9 0004 3810 lea 43810 <free>,%a2 <== NOT EXECUTED
4c30c: 4e92 jsr %a2@ <== NOT EXECUTED
free (bdbuf_cache.groups);
4c30e: 2f39 0006 0d10 movel 60d10 <bdbuf_cache+0x7c>,%sp@- <== NOT EXECUTED
4c314: 4e92 jsr %a2@ <== NOT EXECUTED
free (bdbuf_cache.bds);
4c316: 2f39 0006 0ca6 movel 60ca6 <bdbuf_cache+0x12>,%sp@- <== NOT EXECUTED
4c31c: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
4c31e: 2f39 0006 0d08 movel 60d08 <bdbuf_cache+0x74>,%sp@- <== NOT EXECUTED
4c324: 45f9 0004 7308 lea 47308 <rtems_semaphore_delete>,%a2 <== NOT EXECUTED
4c32a: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
4c32c: 2f39 0006 0cf8 movel 60cf8 <bdbuf_cache+0x64>,%sp@- <== NOT EXECUTED
4c332: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
4c334: 2f39 0006 0d00 movel 60d00 <bdbuf_cache+0x6c>,%sp@- <== NOT EXECUTED
4c33a: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
4c33c: 2f39 0006 0cbe movel 60cbe <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED
4c342: 4e92 jsr %a2@ <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
4c344: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4c348: 4ab9 0006 0cba tstl 60cba <bdbuf_cache+0x26> <== NOT EXECUTED
4c34e: 670e beqs 4c35e <rtems_bdbuf_init+0x3a0> <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
4c350: 4eba e7ec jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
4c354: 2f39 0006 0cba movel 60cba <bdbuf_cache+0x26>,%sp@- <== NOT EXECUTED
4c35a: 4e92 jsr %a2@ <== NOT EXECUTED
4c35c: 588f addql #4,%sp <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
4c35e: 700d moveq #13,%d0 <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
4c360: 4206 clrb %d6 <== NOT EXECUTED
4c362: 13c6 0006 0d25 moveb %d6,60d25 <bdbuf_cache+0x91> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
4c368: 6006 bras 4c370 <rtems_bdbuf_init+0x3b2> <== NOT EXECUTED
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
return RTEMS_CALLED_FROM_ISR;
4c36a: 7012 moveq #18,%d0 <== NOT EXECUTED
4c36c: 6002 bras 4c370 <rtems_bdbuf_init+0x3b2> <== NOT EXECUTED
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
return RTEMS_INVALID_NUMBER;
4c36e: 700a moveq #10,%d0 <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
4c370: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
4c376: 4e5e unlk %fp <== NOT EXECUTED
0004aacc <rtems_bdbuf_lock>:
* @param lock The mutex to lock.
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_lock (rtems_id lock, uint32_t fatal_error_code)
{
4aacc: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_semaphore_obtain (lock,
4aad0: 42a7 clrl %sp@-
4aad2: 42a7 clrl %sp@-
4aad4: 2f2e 0008 movel %fp@(8),%sp@-
4aad8: 4eb9 0004 73a4 jsr 473a4 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4aade: 4fef 000c lea %sp@(12),%sp
4aae2: 4a80 tstl %d0
4aae4: 6708 beqs 4aaee <rtems_bdbuf_lock+0x22> <== ALWAYS TAKEN
rtems_bdbuf_fatal (fatal_error_code);
4aae6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4aaea: 4eba ffce jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4aaee: 4e5e unlk %fp <== NOT EXECUTED
0004c80a <rtems_bdbuf_purge_dev>:
}
}
void
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
4c80a: 4e56 ff5c linkw %fp,#-164
4c80e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c812: 240e movel %fp,%d2
4c814: 0682 ffff ff74 addil #-140,%d2
4c81a: 2002 movel %d2,%d0
4c81c: 5880 addql #4,%d0
static void
rtems_bdbuf_gather_for_purge (rtems_chain_control *purge_list,
const rtems_disk_device *dd)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
4c81e: 47ee ff80 lea %fp@(-128),%a3
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);
4c822: 4bfa e50c lea %pc@(4ad30 <rtems_bdbuf_wake>),%a5
}
}
void
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
4c826: 286e 0008 moveal %fp@(8),%a4
4c82a: 2d40 ff74 movel %d0,%fp@(-140)
head->previous = NULL;
4c82e: 42ae ff78 clrl %fp@(-136)
tail->previous = head;
4c832: 2d42 ff7c movel %d2,%fp@(-132)
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
4c836: 4eba e2ba jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
}
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
4c83a: 2f0c movel %a4,%sp@-
4c83c: 4eba f6f4 jsr %pc@(4bf32 <rtems_bdbuf_read_ahead_cancel>)
rtems_bdbuf_gather_for_purge (rtems_chain_control *purge_list,
const rtems_disk_device *dd)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
4c840: 2479 0006 0ccc moveal 60ccc <bdbuf_cache+0x38>,%a2
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4c846: 72ff moveq #-1,%d1
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
4c848: 588f addql #4,%sp
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4c84a: 2941 006a movel %d1,%a4@(106)
{
rtems_bdbuf_buffer *stack [RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
4c84e: 42ae ff80 clrl %fp@(-128)
4c852: 6000 00ba braw 4c90e <rtems_bdbuf_purge_dev+0x104>
while (cur != NULL)
{
if (cur->dd == dd)
4c856: b9ea 0012 cmpal %a2@(18),%a4
4c85a: 6600 007e bnew 4c8da <rtems_bdbuf_purge_dev+0xd0>
{
switch (cur->state)
4c85e: 700a moveq #10,%d0
4c860: b0aa 001e cmpl %a2@(30),%d0
4c864: 6500 006c bcsw 4c8d2 <rtems_bdbuf_purge_dev+0xc8>
4c868: 202a 001e movel %a2@(30),%d0
4c86c: d080 addl %d0,%d0
4c86e: 303b 0808 movew %pc@(4c878 <rtems_bdbuf_purge_dev+0x6e>,%d0:l),%d0
4c872: 48c0 extl %d0
4c874: 4efb 0802 jmp %pc@(4c878 <rtems_bdbuf_purge_dev+0x6e>,%d0:l)
4c878: 0062 .short 0x0062 <== NOT EXECUTED
4c87a: 0062 .short 0x0062 <== NOT EXECUTED
4c87c: 0028 .short 0x0028 <== NOT EXECUTED
4c87e: 0052 .short 0x0052 <== NOT EXECUTED
4c880: 0052 .short 0x0052 <== NOT EXECUTED
4c882: 0052 .short 0x0052 <== NOT EXECUTED
4c884: 0062 .short 0x0062 <== NOT EXECUTED
4c886: 0020 .short 0x0020 <== NOT EXECUTED
4c888: 0016 .short 0x0016 <== NOT EXECUTED
4c88a: 004a .short 0x004a <== NOT EXECUTED
4c88c: 0062 .short 0x0062 <== NOT EXECUTED
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);
4c88e: 4879 0006 0cfc pea 60cfc <bdbuf_cache+0x68>
4c894: 4e95 jsr %a5@
4c896: 588f addql #4,%sp
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4c898: 206a 0026 moveal %a2@(38),%a0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c89c: 53a8 000c subql #1,%a0@(12)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4c8a0: 206a 0004 moveal %a2@(4),%a0
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
4c8a4: 2202 movel %d2,%d1
4c8a6: 5881 addql #4,%d1
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4c8a8: 2252 moveal %a2@,%a1
previous = the_node->previous;
next->previous = previous;
4c8aa: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4c8ae: 2089 movel %a1,%a0@
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4c8b0: 206e ff7c moveal %fp@(-132),%a0
the_node->next = tail;
4c8b4: 2481 movel %d1,%a2@
tail->previous = the_node;
4c8b6: 2d4a ff7c movel %a2,%fp@(-132)
old_last->next = the_node;
4c8ba: 208a movel %a2,%a0@
the_node->previous = old_last;
4c8bc: 2548 0004 movel %a0,%a2@(4)
4c8c0: 6018 bras 4c8da <rtems_bdbuf_purge_dev+0xd0>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c8c2: 700a moveq #10,%d0
4c8c4: 2540 001e movel %d0,%a2@(30)
4c8c8: 6010 bras 4c8da <rtems_bdbuf_purge_dev+0xd0>
4c8ca: 7206 moveq #6,%d1
4c8cc: 2541 001e movel %d1,%a2@(30)
4c8d0: 6008 bras 4c8da <rtems_bdbuf_purge_dev+0xd0>
case RTEMS_BDBUF_STATE_ACCESS_EMPTY:
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_set_state (cur, RTEMS_BDBUF_STATE_ACCESS_PURGED);
break;
default:
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_STATE_11);
4c8d2: 4878 0017 pea 17 <OPER2+0x3> <== NOT EXECUTED
4c8d6: 4eba e1e2 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
}
if (cur->avl.left != NULL)
4c8da: 206a 0008 moveal %a2@(8),%a0
4c8de: 4a88 tstl %a0
4c8e0: 6702 beqs 4c8e4 <rtems_bdbuf_purge_dev+0xda>
4c8e2: 6008 bras 4c8ec <rtems_bdbuf_purge_dev+0xe2>
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
4c8e4: 206a 000c moveal %a2@(12),%a0
4c8e8: 4a88 tstl %a0
4c8ea: 670c beqs 4c8f8 <rtems_bdbuf_purge_dev+0xee>
{
/* Right */
++prev;
*prev = cur;
4c8ec: 274a 0004 movel %a2,%a3@(4)
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
4c8f0: 588b addql #4,%a3
4c8f2: 6018 bras 4c90c <rtems_bdbuf_purge_dev+0x102>
while (*prev != NULL
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
{
/* Up */
cur = *prev;
--prev;
4c8f4: 598b subql #4,%a3
4c8f6: 2448 moveal %a0,%a2
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL
4c8f8: 2053 moveal %a3@,%a0
4c8fa: 4a88 tstl %a0
4c8fc: 670e beqs 4c90c <rtems_bdbuf_purge_dev+0x102>
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
4c8fe: 2028 000c movel %a0@(12),%d0
4c902: b08a cmpl %a2,%d0
4c904: 67ee beqs 4c8f4 <rtems_bdbuf_purge_dev+0xea>
4c906: 4a80 tstl %d0
4c908: 67ea beqs 4c8f4 <rtems_bdbuf_purge_dev+0xea>
cur = *prev;
--prev;
}
if (*prev != NULL)
/* Right */
cur = (*prev)->avl.right;
4c90a: 2040 moveal %d0,%a0
4c90c: 2448 moveal %a0,%a2
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
4c90e: 4a8a tstl %a2
4c910: 6600 ff44 bnew 4c856 <rtems_bdbuf_purge_dev+0x4c>
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_read_ahead_reset (dd);
rtems_bdbuf_gather_for_purge (&purge_list, dd);
rtems_bdbuf_purge_list (&purge_list);
4c914: 49ee ff74 lea %fp@(-140),%a4
4c918: 47fa e17a lea %pc@(4aa94 <_Chain_Get_unprotected>),%a3
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c91c: 4bfa e4aa lea %pc@(4adc8 <rtems_bdbuf_remove_from_tree>),%a5
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4c920: 263c 0004 b0bc movel #307388,%d3
}
static void
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
4c926: 4202 clrb %d2
4c928: 601e bras 4c948 <rtems_bdbuf_purge_dev+0x13e>
while ((node = rtems_chain_get_unprotected (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
4c92a: 202a 0022 movel %a2@(34),%d0
4c92e: 6602 bnes 4c932 <rtems_bdbuf_purge_dev+0x128>
wake_buffer_waiters = true;
4c930: 7401 moveq #1,%d2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c932: 7201 moveq #1,%d1
4c934: 2541 001e movel %d1,%a2@(30)
static void
rtems_bdbuf_discard_buffer (rtems_bdbuf_buffer *bd)
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
4c938: 4a80 tstl %d0
4c93a: 660c bnes 4c948 <rtems_bdbuf_purge_dev+0x13e>
{
rtems_bdbuf_remove_from_tree (bd);
4c93c: 2f0a movel %a2,%sp@-
4c93e: 4e95 jsr %a5@
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4c940: 2043 moveal %d3,%a0
4c942: 2f0a movel %a2,%sp@-
4c944: 4e90 jsr %a0@
4c946: 508f addql #8,%sp
4c948: 2f0c movel %a4,%sp@-
4c94a: 4e93 jsr %a3@
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
rtems_chain_node *node = NULL;
while ((node = rtems_chain_get_unprotected (purge_list)) != NULL)
4c94c: 588f addql #4,%sp
4c94e: 2440 moveal %d0,%a2
4c950: 4a80 tstl %d0
4c952: 66d6 bnes 4c92a <rtems_bdbuf_purge_dev+0x120>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
4c954: 4a02 tstb %d2
4c956: 670c beqs 4c964 <rtems_bdbuf_purge_dev+0x15a>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c958: 4879 0006 0d04 pea 60d04 <bdbuf_cache+0x70>
4c95e: 4eba e3d0 jsr %pc@(4ad30 <rtems_bdbuf_wake>)
4c962: 588f addql #4,%sp
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
rtems_bdbuf_read_ahead_reset (dd);
rtems_bdbuf_gather_for_purge (&purge_list, dd);
rtems_bdbuf_purge_list (&purge_list);
rtems_bdbuf_unlock_cache ();
4c964: 4eba e1d8 jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
}
4c968: 4cee 3c0c ff5c moveml %fp@(-164),%d2-%d3/%a2-%a5
4c96e: 4e5e unlk %fp <== NOT EXECUTED
0004c438 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
4c438: 4e56 ffe4 linkw %fp,#-28
4c43c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
4c440: 246e 0008 moveal %fp@(8),%a2
4c444: 2c2e 000c movel %fp@(12),%d6
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block;
rtems_bdbuf_lock_cache ();
4c448: 4eba e6a8 jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
4c44c: bcaa 0028 cmpl %a2@(40),%d6
4c450: 6400 0158 bccw 4c5aa <rtems_bdbuf_read+0x172>
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
4c454: 202a 0030 movel %a2@(48),%d0
4c458: 6d06 blts 4c460 <rtems_bdbuf_read+0x28> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
4c45a: 2206 movel %d6,%d1
4c45c: e1a9 lsll %d0,%d1
4c45e: 6030 bras 4c490 <rtems_bdbuf_read+0x58>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
4c460: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED
4c464: 4284 clrl %d4 <== NOT EXECUTED
4c466: 4282 clrl %d2 <== NOT EXECUTED
4c468: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4c46a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4c46c: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4c46e: 42a7 clrl %sp@- <== NOT EXECUTED
4c470: 4eb9 0005 c4c8 jsr 5c4c8 <__muldi3> <== NOT EXECUTED
4c476: 262a 0020 movel %a2@(32),%d3 <== NOT EXECUTED
4c47a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c47e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c480: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c482: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4c484: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c486: 4eb9 0005 cdc4 jsr 5cdc4 <__udivdi3> <== NOT EXECUTED
4c48c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dd->dev);
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
4c490: d2aa 0018 addl %a2@(24),%d1
4c494: 2f01 movel %d1,%sp@-
4c496: 2f0a movel %a2,%sp@-
4c498: 4eba f084 jsr %pc@(4b51e <rtems_bdbuf_get_buffer_for_access>)
switch (bd->state)
4c49c: 508f addql #8,%sp
4c49e: 7202 moveq #2,%d1
{
if (rtems_bdbuf_tracer)
printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n",
media_block + dd->start, block, (unsigned) dd->dev);
bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
4c4a0: 2640 moveal %d0,%a3
switch (bd->state)
4c4a2: 202b 001e movel %a3@(30),%d0
4c4a6: b280 cmpl %d0,%d1
4c4a8: 6712 beqs 4c4bc <rtems_bdbuf_read+0x84>
4c4aa: 123c 0007 moveb #7,%d1
4c4ae: b280 cmpl %d0,%d1
4c4b0: 6716 beqs 4c4c8 <rtems_bdbuf_read+0x90>
4c4b2: 123c 0001 moveb #1,%d1
4c4b6: b280 cmpl %d0,%d1
4c4b8: 666e bnes 4c528 <rtems_bdbuf_read+0xf0> <== NEVER TAKEN
4c4ba: 601a bras 4c4d6 <rtems_bdbuf_read+0x9e>
{
case RTEMS_BDBUF_STATE_CACHED:
++dd->stats.read_hits;
4c4bc: 52aa 0042 addql #1,%a2@(66)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c4c0: 7003 moveq #3,%d0
4c4c2: 2740 001e movel %d0,%a3@(30)
4c4c6: 600a bras 4c4d2 <rtems_bdbuf_read+0x9a>
case RTEMS_BDBUF_STATE_CACHED:
++dd->stats.read_hits;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_CACHED);
break;
case RTEMS_BDBUF_STATE_MODIFIED:
++dd->stats.read_hits;
4c4c8: 52aa 0042 addql #1,%a2@(66)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c4cc: 7204 moveq #4,%d1
4c4ce: 2741 001e movel %d1,%a3@(30)
4c4d2: 4282 clrl %d2
4c4d4: 605e bras 4c534 <rtems_bdbuf_read+0xfc>
case RTEMS_BDBUF_STATE_MODIFIED:
++dd->stats.read_hits;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
++dd->stats.read_misses;
4c4d6: 52aa 0046 addql #1,%a2@(70)
static void
rtems_bdbuf_set_read_ahead_trigger (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
if (dd->read_ahead.trigger != block)
4c4da: bcaa 006a cmpl %a2@(106),%d6
4c4de: 6718 beqs 4c4f8 <rtems_bdbuf_read+0xc0>
{
rtems_bdbuf_read_ahead_cancel (dd);
4c4e0: 2f0a movel %a2,%sp@-
4c4e2: 4eba fa4e jsr %pc@(4bf32 <rtems_bdbuf_read_ahead_cancel>)
dd->read_ahead.trigger = block + 1;
dd->read_ahead.next = block + 2;
4c4e6: 588f addql #4,%sp
rtems_blkdev_bnum block)
{
if (dd->read_ahead.trigger != block)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = block + 1;
4c4e8: 2006 movel %d6,%d0
dd->read_ahead.next = block + 2;
4c4ea: 2206 movel %d6,%d1
rtems_blkdev_bnum block)
{
if (dd->read_ahead.trigger != block)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = block + 1;
4c4ec: 5280 addql #1,%d0
dd->read_ahead.next = block + 2;
4c4ee: 5481 addql #2,%d1
rtems_blkdev_bnum block)
{
if (dd->read_ahead.trigger != block)
{
rtems_bdbuf_read_ahead_cancel (dd);
dd->read_ahead.trigger = block + 1;
4c4f0: 2540 006a movel %d0,%a2@(106)
dd->read_ahead.next = block + 2;
4c4f4: 2541 006e movel %d1,%a2@(110)
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
++dd->stats.read_misses;
rtems_bdbuf_set_read_ahead_trigger (dd, block);
sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
4c4f8: 4878 0001 pea 1 <ADD>
4c4fc: 2f0b movel %a3,%sp@-
4c4fe: 2f0a movel %a2,%sp@-
4c500: 4eba f83a jsr %pc@(4bd3c <rtems_bdbuf_execute_read_request>)
if (sc == RTEMS_SUCCESSFUL)
4c504: 4fef 000c lea %sp@(12),%sp
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_ACCESS_MODIFIED);
break;
case RTEMS_BDBUF_STATE_EMPTY:
++dd->stats.read_misses;
rtems_bdbuf_set_read_ahead_trigger (dd, block);
sc = rtems_bdbuf_execute_read_request (dd, bd, 1);
4c508: 2400 movel %d0,%d2
if (sc == RTEMS_SUCCESSFUL)
4c50a: 6626 bnes 4c532 <rtems_bdbuf_read+0xfa>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c50c: 7003 moveq #3,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4c50e: 206b 0004 moveal %a3@(4),%a0
4c512: 2740 001e movel %d0,%a3@(30)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4c516: 2253 moveal %a3@,%a1
previous = the_node->previous;
next->previous = previous;
4c518: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4c51c: 2089 movel %a1,%a0@
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4c51e: 206b 0026 moveal %a3@(38),%a0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4c522: 52a8 000c addql #1,%a0@(12)
4c526: 600c bras 4c534 <rtems_bdbuf_read+0xfc>
{
bd = NULL;
}
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4);
4c528: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
4c52c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c52e: 4eba e5d8 jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
rtems_chain_extract_unprotected (&bd->link);
rtems_bdbuf_group_obtain (bd);
}
else
{
bd = NULL;
4c532: 97cb subal %a3,%a3
static void
rtems_bdbuf_check_read_ahead_trigger (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
if (bdbuf_cache.read_ahead_task != 0
4c534: 2239 0006 0d14 movel 60d14 <bdbuf_cache+0x80>,%d1
4c53a: 6772 beqs 4c5ae <rtems_bdbuf_read+0x176>
&& dd->read_ahead.trigger == block
4c53c: bcaa 006a cmpl %a2@(106),%d6
4c540: 666c bnes 4c5ae <rtems_bdbuf_read+0x176>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
4c542: 4aaa 0062 tstl %a2@(98)
4c546: 660c bnes 4c554 <rtems_bdbuf_read+0x11c> <== NEVER TAKEN
4c548: 4aaa 0066 tstl %a2@(102)
4c54c: 57c0 seq %d0
4c54e: 49c0 extbl %d0
4c550: 4480 negl %d0
4c552: 6002 bras 4c556 <rtems_bdbuf_read+0x11e>
4c554: 4280 clrl %d0 <== NOT EXECUTED
&& !rtems_bdbuf_is_read_ahead_active (dd))
4c556: 0800 0000 btst #0,%d0
4c55a: 6752 beqs 4c5ae <rtems_bdbuf_read+0x176> <== NEVER TAKEN
{
rtems_status_code sc;
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
if (rtems_chain_is_empty (chain))
4c55c: 203c 0006 0d1c movel #396572,%d0
4c562: b0b9 0006 0d18 cmpl 60d18 <bdbuf_cache+0x84>,%d0
4c568: 661a bnes 4c584 <rtems_bdbuf_read+0x14c> <== NEVER TAKEN
{
sc = rtems_event_send (bdbuf_cache.read_ahead_task,
4c56a: 4878 0002 pea 2 <DOUBLE_FLOAT>
4c56e: 2f01 movel %d1,%sp@-
4c570: 4eb9 0004 6f6c jsr 46f6c <rtems_event_send>
RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
if (sc != RTEMS_SUCCESSFUL)
4c576: 508f addql #8,%sp
4c578: 4a80 tstl %d0
4c57a: 6708 beqs 4c584 <rtems_bdbuf_read+0x14c> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP);
4c57c: 4878 0007 pea 7 <TRUNCDFSF> <== NOT EXECUTED
4c580: 4eba e538 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4c584: 2079 0006 0d20 moveal 60d20 <bdbuf_cache+0x8c>,%a0
}
rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
4c58a: 200a movel %a2,%d0
4c58c: 0680 0000 0062 addil #98,%d0
the_node->next = tail;
4c592: 223c 0006 0d1c movel #396572,%d1
tail->previous = the_node;
4c598: 23c0 0006 0d20 movel %d0,60d20 <bdbuf_cache+0x8c>
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
4c59e: 2541 0062 movel %d1,%a2@(98)
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
4c5a2: 2548 0066 movel %a0,%a2@(102)
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
4c5a6: 2080 movel %d0,%a0@
4c5a8: 6004 bras 4c5ae <rtems_bdbuf_read+0x176>
rtems_bdbuf_read (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *bd = NULL;
4c5aa: 97cb subal %a3,%a3 <== NOT EXECUTED
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
4c5ac: 7404 moveq #4,%d2 <== NOT EXECUTED
}
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
4c5ae: 4eba e58e jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
*bd_ptr = bd;
4c5b2: 206e 0010 moveal %fp@(16),%a0
return sc;
}
4c5b6: 2002 movel %d2,%d0
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
4c5b8: 208b movel %a3,%a0@
return sc;
}
4c5ba: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4c5c0: 4e5e unlk %fp <== NOT EXECUTED
0004bf32 <rtems_bdbuf_read_ahead_cancel>:
return !rtems_chain_is_node_off_chain (&dd->read_ahead.node);
}
static void
rtems_bdbuf_read_ahead_cancel (rtems_disk_device *dd)
{
4bf32: 4e56 0000 linkw %fp,#0
4bf36: 206e 0008 moveal %fp@(8),%a0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
4bf3a: 2268 0062 moveal %a0@(98),%a1
4bf3e: 2f0a movel %a2,%sp@-
4bf40: 4a89 tstl %a1
4bf42: 660c bnes 4bf50 <rtems_bdbuf_read_ahead_cancel+0x1e><== NEVER TAKEN
4bf44: 4aa8 0066 tstl %a0@(102)
4bf48: 57c0 seq %d0
4bf4a: 49c0 extbl %d0
4bf4c: 4480 negl %d0
4bf4e: 6002 bras 4bf52 <rtems_bdbuf_read_ahead_cancel+0x20>
4bf50: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_bdbuf_is_read_ahead_active (dd))
4bf52: 0800 0000 btst #0,%d0
4bf56: 6612 bnes 4bf6a <rtems_bdbuf_read_ahead_cancel+0x38><== ALWAYS TAKEN
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4bf58: 2468 0066 moveal %a0@(102),%a2 <== NOT EXECUTED
next->previous = previous;
4bf5c: 234a 0004 movel %a2,%a1@(4) <== NOT EXECUTED
previous->next = next;
4bf60: 2489 movel %a1,%a2@ <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
4bf62: 42a8 0066 clrl %a0@(102) <== NOT EXECUTED
4bf66: 42a8 0062 clrl %a0@(98) <== NOT EXECUTED
{
rtems_chain_extract_unprotected (&dd->read_ahead.node);
rtems_chain_set_off_chain (&dd->read_ahead.node);
}
}
4bf6a: 245f moveal %sp@+,%a2
4bf6c: 4e5e unlk %fp <== NOT EXECUTED
0004be00 <rtems_bdbuf_read_ahead_task>:
return sc;
}
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
4be00: 4e56 ffc8 linkw %fp,#-56
4be04: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
{
uint32_t transfer_count = dd->block_count - block;
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
4be08: 2639 0005 e152 movel 5e152 <rtems_bdbuf_configuration>,%d3
if (transfer_count >= max_transfer_count)
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
4be0e: 2a03 movel %d3,%d5
while (bdbuf_cache.read_ahead_enabled)
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
4be10: 47fa ee58 lea %pc@(4ac6a <rtems_bdbuf_wait_for_event>),%a3
rtems_bdbuf_lock_cache ();
4be14: 49fa ecdc lea %pc@(4aaf2 <rtems_bdbuf_lock_cache>),%a4
4be18: 4bfa ec7a lea %pc@(4aa94 <_Chain_Get_unprotected>),%a5
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
4be1c: e28d lsrl #1,%d5
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
while (bdbuf_cache.read_ahead_enabled)
4be1e: 6000 00f6 braw 4bf16 <rtems_bdbuf_read_ahead_task+0x116>
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
4be22: 4878 0002 pea 2 <DOUBLE_FLOAT>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
4be26: 2c3c 0005 cdc4 movel #380356,%d6
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
{
rtems_bdbuf_buffer *bd =
4be2c: 2e3c 0004 b4d0 movel #308432,%d7
while (bdbuf_cache.read_ahead_enabled)
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
4be32: 4e93 jsr %a3@
rtems_bdbuf_lock_cache ();
4be34: 4e94 jsr %a4@
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
4be36: 588f addql #4,%sp
4be38: 6000 00c6 braw 4bf00 <rtems_bdbuf_read_ahead_task+0x100>
{
rtems_disk_device *dd = (rtems_disk_device *)
((char *) node - offsetof (rtems_disk_device, read_ahead.node));
rtems_blkdev_bnum block = dd->read_ahead.next;
4be3c: 242a 000c movel %a2@(12),%d2
rtems_blkdev_bnum block,
rtems_blkdev_bnum *media_block_ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (block < dd->block_count)
4be40: b4aa ffc6 cmpl %a2@(-58),%d2
4be44: 645a bccs 4bea0 <rtems_bdbuf_read_ahead_task+0xa0>
}
static rtems_blkdev_bnum
rtems_bdbuf_media_block (const rtems_disk_device *dd, rtems_blkdev_bnum block)
{
if (dd->block_to_media_block_shift >= 0)
4be46: 202a ffce movel %a2@(-50),%d0
4be4a: 6d06 blts 4be52 <rtems_bdbuf_read_ahead_task+0x52><== NEVER TAKEN
return block << dd->block_to_media_block_shift;
4be4c: 2202 movel %d2,%d1
4be4e: e1a9 lsll %d0,%d1
4be50: 6046 bras 4be98 <rtems_bdbuf_read_ahead_task+0x98>
/*
* Change the block number for the block size to the block number for the media
* block size. We have to use 64bit maths. There is no short cut here.
*/
return (rtems_blkdev_bnum)
((((uint64_t) block) * dd->block_size) / dd->media_block_size);
4be52: 202a ffc2 movel %a2@(-62),%d0 <== NOT EXECUTED
4be56: 91c8 subal %a0,%a0 <== NOT EXECUTED
4be58: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4be5a: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
4be5e: 42a7 clrl %sp@- <== NOT EXECUTED
4be60: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4be64: 2d48 fff8 movel %a0,%fp@(-8) <== NOT EXECUTED
4be68: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
4be6c: 4eb9 0005 c4c8 jsr 5c4c8 <__muldi3> <== NOT EXECUTED
4be72: 206a ffbe moveal %a2@(-66),%a0 <== NOT EXECUTED
4be76: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4be7a: 2d48 fff4 movel %a0,%fp@(-12) <== NOT EXECUTED
4be7e: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
4be82: 91c8 subal %a0,%a0 <== NOT EXECUTED
4be84: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED
4be88: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
4be8c: 2046 moveal %d6,%a0 <== NOT EXECUTED
4be8e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4be90: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4be92: 4e90 jsr %a0@ <== NOT EXECUTED
4be94: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
/*
* Compute the media block number. Drivers work with media block number not
* the block number a BD may have as this depends on the block size set by
* the user.
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
4be98: d2aa ffb6 addl %a2@(-74),%d1
4be9c: 4280 clrl %d0
4be9e: 6004 bras 4bea4 <rtems_bdbuf_read_ahead_task+0xa4>
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
{
rtems_disk_device *dd = (rtems_disk_device *)
((char *) node - offsetof (rtems_disk_device, read_ahead.node));
rtems_blkdev_bnum block = dd->read_ahead.next;
rtems_blkdev_bnum media_block = 0;
4bea0: 4281 clrl %d1
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
4bea2: 7004 moveq #4,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
4bea4: 42aa 0004 clrl %a2@(4)
4bea8: 4292 clrl %a2@
rtems_status_code sc =
rtems_bdbuf_get_media_block (dd, block, &media_block);
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
4beaa: 4a80 tstl %d0
4beac: 664c bnes 4befa <rtems_bdbuf_read_ahead_task+0xfa>
{
rtems_bdbuf_buffer *bd =
4beae: 2f01 movel %d1,%sp@-
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
rtems_bdbuf_lock_cache ();
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
{
rtems_disk_device *dd = (rtems_disk_device *)
4beb0: 280a movel %a2,%d4
4beb2: 0684 ffff ff9e addil #-98,%d4
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
{
rtems_bdbuf_buffer *bd =
4beb8: 2047 moveal %d7,%a0
4beba: 2f04 movel %d4,%sp@-
4bebc: 4e90 jsr %a0@
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
4bebe: 508f addql #8,%sp
4bec0: 4a80 tstl %d0
4bec2: 673c beqs 4bf00 <rtems_bdbuf_read_ahead_task+0x100><== NEVER TAKEN
{
uint32_t transfer_count = dd->block_count - block;
4bec4: 222a ffc6 movel %a2@(-58),%d1
4bec8: 9282 subl %d2,%d1
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
4beca: b681 cmpl %d1,%d3
4becc: 6212 bhis 4bee0 <rtems_bdbuf_read_ahead_task+0xe0>
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
4bece: 2205 movel %d5,%d1
4bed0: d282 addl %d2,%d1
dd->read_ahead.next = block + transfer_count;
4bed2: d483 addl %d3,%d2
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
4bed4: 2541 0008 movel %d1,%a2@(8)
dd->read_ahead.next = block + transfer_count;
4bed8: 2203 movel %d3,%d1
4beda: 2542 000c movel %d2,%a2@(12)
4bede: 6006 bras 4bee6 <rtems_bdbuf_read_ahead_task+0xe6>
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4bee0: 74ff moveq #-1,%d2
4bee2: 2542 0008 movel %d2,%a2@(8)
}
++dd->stats.read_ahead_transfers;
4bee6: 52aa ffe8 addql #1,%a2@(-24)
rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
4beea: 2f01 movel %d1,%sp@-
4beec: 2f00 movel %d0,%sp@-
4beee: 2f04 movel %d4,%sp@-
4bef0: 4eba fe4a jsr %pc@(4bd3c <rtems_bdbuf_execute_read_request>)
4bef4: 4fef 000c lea %sp@(12),%sp
4bef8: 6006 bras 4bf00 <rtems_bdbuf_read_ahead_task+0x100>
}
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4befa: 70ff moveq #-1,%d0
4befc: 2540 0008 movel %d0,%a2@(8)
4bf00: 4879 0006 0d18 pea 60d18 <bdbuf_cache+0x84>
4bf06: 4e95 jsr %a5@
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
rtems_bdbuf_lock_cache ();
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
4bf08: 588f addql #4,%sp
4bf0a: 2440 moveal %d0,%a2
4bf0c: 4a80 tstl %d0
4bf0e: 6600 ff2c bnew 4be3c <rtems_bdbuf_read_ahead_task+0x3c>
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
}
}
rtems_bdbuf_unlock_cache ();
4bf12: 4eba ec2a jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
while (bdbuf_cache.read_ahead_enabled)
4bf16: 4a39 0006 0d24 tstb 60d24 <bdbuf_cache+0x90>
4bf1c: 6600 ff04 bnew 4be22 <rtems_bdbuf_read_ahead_task+0x22>
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
4bf20: 42ae 0008 clrl %fp@(8) <== NOT EXECUTED
}
4bf24: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4bf2a: 4e5e unlk %fp <== NOT EXECUTED
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
4bf2c: 4ef9 0004 76d4 jmp 476d4 <rtems_task_delete> <== NOT EXECUTED
0004c5c4 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
4c5c4: 4e56 0000 linkw %fp,#0
4c5c8: 2f0a movel %a2,%sp@-
4c5ca: 246e 0008 moveal %fp@(8),%a2
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
4c5ce: 4a8a tstl %a2
4c5d0: 6700 008a beqw 4c65c <rtems_bdbuf_release+0x98>
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
4c5d4: 4eba e51c jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4c5d8: 202a 001e movel %a2@(30),%d0
4c5dc: 7204 moveq #4,%d1
4c5de: b280 cmpl %d0,%d1
4c5e0: 6760 beqs 4c642 <rtems_bdbuf_release+0x7e>
4c5e2: 650a bcss 4c5ee <rtems_bdbuf_release+0x2a>
4c5e4: 123c 0003 moveb #3,%d1
4c5e8: b280 cmpl %d0,%d1
4c5ea: 665e bnes 4c64a <rtems_bdbuf_release+0x86> <== NEVER TAKEN
4c5ec: 6008 bras 4c5f6 <rtems_bdbuf_release+0x32>
4c5ee: 7206 moveq #6,%d1
4c5f0: b280 cmpl %d0,%d1
4c5f2: 6556 bcss 4c64a <rtems_bdbuf_release+0x86> <== NEVER TAKEN
4c5f4: 6042 bras 4c638 <rtems_bdbuf_release+0x74>
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4c5f6: 206a 0026 moveal %a2@(38),%a0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c5fa: 53a8 000c subql #1,%a0@(12)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c5fe: 7002 moveq #2,%d0
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4c600: 2079 0006 0cd8 moveal 60cd8 <bdbuf_cache+0x44>,%a0
4c606: 2540 001e movel %d0,%a2@(30)
the_node->next = tail;
4c60a: 24bc 0006 0cd4 movel #396500,%a2@
tail->previous = the_node;
4c610: 23ca 0006 0cd8 movel %a2,60cd8 <bdbuf_cache+0x44>
old_last->next = the_node;
4c616: 208a movel %a2,%a0@
the_node->previous = old_last;
4c618: 2548 0004 movel %a0,%a2@(4)
4c61c: 41fa e712 lea %pc@(4ad30 <rtems_bdbuf_wake>),%a0
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)
4c620: 4aaa 0022 tstl %a2@(34)
4c624: 6708 beqs 4c62e <rtems_bdbuf_release+0x6a>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c626: 4879 0006 0cf4 pea 60cf4 <bdbuf_cache+0x60>
4c62c: 6006 bras 4c634 <rtems_bdbuf_release+0x70>
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c62e: 4879 0006 0d04 pea 60d04 <bdbuf_cache+0x70>
4c634: 4e90 jsr %a0@
4c636: 6006 bras 4c63e <rtems_bdbuf_release+0x7a>
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);
4c638: 2f0a movel %a2,%sp@-
4c63a: 4eba f934 jsr %pc@(4bf70 <rtems_bdbuf_discard_buffer_after_access>)
break;
4c63e: 588f addql #4,%sp
4c640: 6012 bras 4c654 <rtems_bdbuf_release+0x90>
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
4c642: 2f0a movel %a2,%sp@-
4c644: 4eba eaa0 jsr %pc@(4b0e6 <rtems_bdbuf_add_to_modified_list_after_access>)
4c648: 60f4 bras 4c63e <rtems_bdbuf_release+0x7a>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0);
4c64a: 4878 000e pea e <OPER1+0x2> <== NOT EXECUTED
4c64e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c650: 4eba e4b6 jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4c654: 4eba e4e8 jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c658: 4280 clrl %d0
4c65a: 6002 bras 4c65e <rtems_bdbuf_release+0x9a>
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
4c65c: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4c65e: 246e fffc moveal %fp@(-4),%a2
4c662: 4e5e unlk %fp <== NOT EXECUTED
0004c666 <rtems_bdbuf_release_modified>:
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
4c666: 4e56 0000 linkw %fp,#0
4c66a: 2f0a movel %a2,%sp@-
4c66c: 246e 0008 moveal %fp@(8),%a2
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
4c670: 4a8a tstl %a2
4c672: 6744 beqs 4c6b8 <rtems_bdbuf_release_modified+0x52><== NEVER TAKEN
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
4c674: 4eba e47c jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4c678: 202a 001e movel %a2@(30),%d0
4c67c: 7203 moveq #3,%d1
4c67e: b280 cmpl %d0,%d1
4c680: 6224 bhis 4c6a6 <rtems_bdbuf_release_modified+0x40><== NEVER TAKEN
4c682: 123c 0005 moveb #5,%d1
4c686: b280 cmpl %d0,%d1
4c688: 640a bccs 4c694 <rtems_bdbuf_release_modified+0x2e>
4c68a: 123c 0006 moveb #6,%d1
4c68e: b280 cmpl %d0,%d1
4c690: 6614 bnes 4c6a6 <rtems_bdbuf_release_modified+0x40><== NEVER TAKEN
4c692: 6008 bras 4c69c <rtems_bdbuf_release_modified+0x36>
{
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);
4c694: 2f0a movel %a2,%sp@-
4c696: 4eba ea4e jsr %pc@(4b0e6 <rtems_bdbuf_add_to_modified_list_after_access>)
4c69a: 6006 bras 4c6a2 <rtems_bdbuf_release_modified+0x3c>
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
4c69c: 2f0a movel %a2,%sp@-
4c69e: 4eba f8d0 jsr %pc@(4bf70 <rtems_bdbuf_discard_buffer_after_access>)
break;
4c6a2: 588f addql #4,%sp
4c6a4: 600a bras 4c6b0 <rtems_bdbuf_release_modified+0x4a>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6);
4c6a6: 4878 0012 pea 12 <INVALID_OPERATION+0x2> <== NOT EXECUTED
4c6aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c6ac: 4eba e45a jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4c6b0: 4eba e48c jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c6b4: 4280 clrl %d0
4c6b6: 6002 bras 4c6ba <rtems_bdbuf_release_modified+0x54>
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
4c6b8: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4c6ba: 246e fffc moveal %fp@(-4),%a2
4c6be: 4e5e unlk %fp <== NOT EXECUTED
0004adc8 <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
4adc8: 4e56 ff64 linkw %fp,#-156
4adcc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
4add0: 2a6e 0008 moveal %fp@(8),%a5
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));
4add4: 47ee ff80 lea %fp@(-128),%a3
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
4add8: 242d 0012 movel %a5@(18),%d2
rtems_blkdev_bnum block = node->block;
4addc: 262d 0016 movel %a5@(22),%d3
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));
4ade0: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
const rtems_bdbuf_buffer* node)
{
const rtems_disk_device *dd = node->dd;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
4ade4: 2479 0006 0ccc moveal 60ccc <bdbuf_cache+0x38>,%a2
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));
4adea: 42a7 clrl %sp@-
4adec: 2f0b movel %a3,%sp@-
4adee: 4eb9 0005 074c jsr 5074c <memset>
4adf4: 4fef 000c lea %sp@(12),%sp
4adf8: 6030 bras 4ae2a <rtems_bdbuf_remove_from_tree+0x62>
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
4adfa: 202a 0012 movel %a2@(18),%d0
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
4adfe: 26ca movel %a2,%a3@+
if (((uintptr_t) p->dd < (uintptr_t) dd)
4ae00: b480 cmpl %d0,%d2
4ae02: 620a bhis 4ae0e <rtems_bdbuf_remove_from_tree+0x46><== NEVER TAKEN
|| ((p->dd == dd) && (p->block < block)))
4ae04: 661a bnes 4ae20 <rtems_bdbuf_remove_from_tree+0x58><== NEVER TAKEN
4ae06: 202a 0016 movel %a2@(22),%d0
4ae0a: b680 cmpl %d0,%d3
4ae0c: 630c blss 4ae1a <rtems_bdbuf_remove_from_tree+0x52>
{
p->avl.cache = 1;
4ae0e: 7001 moveq #1,%d0
4ae10: 1540 0010 moveb %d0,%a2@(16)
p = p->avl.right;
4ae14: 246a 000c moveal %a2@(12),%a2
4ae18: 6010 bras 4ae2a <rtems_bdbuf_remove_from_tree+0x62>
}
else if ((p->dd != dd) || (p->block != block))
4ae1a: b680 cmpl %d0,%d3
4ae1c: 6700 0254 beqw 4b072 <rtems_bdbuf_remove_from_tree+0x2aa>
{
p->avl.cache = -1;
4ae20: 50c1 st %d1
4ae22: 1541 0010 moveb %d1,%a2@(16)
p = p->avl.left;
4ae26: 246a 0008 moveal %a2@(8),%a2
4ae2a: 280b movel %a3,%d4
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
4ae2c: 4a8a tstl %a2
4ae2e: 66ca bnes 4adfa <rtems_bdbuf_remove_from_tree+0x32><== ALWAYS TAKEN
4ae30: 6000 0234 braw 4b066 <rtems_bdbuf_remove_from_tree+0x29e><== NOT EXECUTED
q = p;
buf_prev--;
if (buf_prev > buf_stack)
{
p = *(buf_prev - 1);
4ae34: 242b fff8 movel %a3@(-8),%d2
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
4ae38: 206a 000c moveal %a2@(12),%a0
4ae3c: 4a88 tstl %a0
4ae3e: 6610 bnes 4ae50 <rtems_bdbuf_remove_from_tree+0x88>
{
r = q->avl.left;
4ae40: 206a 0008 moveal %a2@(8),%a0
if (r != NULL)
4ae44: 4a88 tstl %a0
4ae46: 676c beqs 4aeb4 <rtems_bdbuf_remove_from_tree+0xec>
{
r->avl.bal = 0;
4ae48: 4203 clrb %d3
4ae4a: 1143 0011 moveb %d3,%a0@(17)
4ae4e: 6064 bras 4aeb4 <rtems_bdbuf_remove_from_tree+0xec>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
4ae50: 4aa8 0008 tstl %a0@(8)
4ae54: 6708 beqs 4ae5e <rtems_bdbuf_remove_from_tree+0x96>
4ae56: 2248 moveal %a0,%a1
4ae58: 2008 movel %a0,%d0
4ae5a: 280b movel %a3,%d4
4ae5c: 602a bras 4ae88 <rtems_bdbuf_remove_from_tree+0xc0>
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
*buf_prev++ = q = r;
4ae5e: 2748 fffc movel %a0,%a3@(-4)
4ae62: 280b movel %a3,%d4
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
4ae64: 216a 0008 0008 movel %a2@(8),%a0@(8)
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
4ae6a: 7001 moveq #1,%d0
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
4ae6c: 116a 0011 0011 moveb %a2@(17),%a0@(17)
r->avl.cache = 1;
4ae72: 1140 0010 moveb %d0,%a0@(16)
4ae76: 603c bras 4aeb4 <rtems_bdbuf_remove_from_tree+0xec>
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4ae78: 2844 moveal %d4,%a4
4ae7a: 5884 addql #4,%d4
s = r->avl.left;
r->avl.cache = -1;
4ae7c: 50c0 st %d0
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4ae7e: 28c9 movel %a1,%a4@+
s = r->avl.left;
r->avl.cache = -1;
4ae80: 1340 0010 moveb %d0,%a1@(16)
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
4ae84: 2009 movel %a1,%d0
4ae86: 2241 moveal %d1,%a1
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4ae88: 2229 0008 movel %a1@(8),%d1
4ae8c: 66ea bnes 4ae78 <rtems_bdbuf_remove_from_tree+0xb0>
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
4ae8e: 2840 moveal %d0,%a4
4ae90: 4be9 000c lea %a1@(12),%a5
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
4ae94: 236a 0008 0008 movel %a2@(8),%a1@(8)
r->avl.left = s->avl.right;
4ae9a: 2955 0008 movel %a5@,%a4@(8)
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
4ae9e: 7001 moveq #1,%d0
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
4aea0: 136a 0011 0011 moveb %a2@(17),%a1@(17)
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
4aea6: 2348 000c movel %a0,%a1@(12)
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
*t = q = s;
4aeaa: 2049 moveal %a1,%a0
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
4aeac: 1340 0010 moveb %d0,%a1@(16)
*t = q = s;
4aeb0: 2749 fffc movel %a1,%a3@(-4)
}
}
if (p != NULL)
4aeb4: 4a82 tstl %d2
4aeb6: 672a beqs 4aee2 <rtems_bdbuf_remove_from_tree+0x11a>
{
if (p->avl.cache == -1)
4aeb8: 2242 moveal %d2,%a1
4aeba: 72ff moveq #-1,%d1
4aebc: 1029 0010 moveb %a1@(16),%d0
4aec0: 49c0 extbl %d0
4aec2: b280 cmpl %d0,%d1
4aec4: 6614 bnes 4aeda <rtems_bdbuf_remove_from_tree+0x112>
{
p->avl.left = q;
4aec6: 2348 0008 movel %a0,%a1@(8)
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
4aeca: 200e movel %fp,%d0
4aecc: 0680 ffff ff80 addil #-128,%d0
4aed2: b084 cmpl %d4,%d0
4aed4: 6514 bcss 4aeea <rtems_bdbuf_remove_from_tree+0x122>
4aed6: 6000 01ae braw 4b086 <rtems_bdbuf_remove_from_tree+0x2be>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
4aeda: 2242 moveal %d2,%a1
4aedc: 2348 000c movel %a0,%a1@(12)
4aee0: 60e8 bras 4aeca <rtems_bdbuf_remove_from_tree+0x102>
}
}
else
{
*root = q;
4aee2: 23c8 0006 0ccc movel %a0,60ccc <bdbuf_cache+0x38>
4aee8: 60e0 bras 4aeca <rtems_bdbuf_remove_from_tree+0x102>
4aeea: 2844 moveal %d4,%a4
default:
break;
}
}
if (buf_prev > buf_stack)
4aeec: 2200 movel %d0,%d1
while (modified)
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
4aeee: 206c fffc moveal %a4@(-4),%a0
else
{
break;
}
if (p->avl.cache == -1)
4aef2: 76ff moveq #-1,%d3
4aef4: 1428 0010 moveb %a0@(16),%d2
4aef8: 1028 0011 moveb %a0@(17),%d0
4aefc: 49c2 extbl %d2
4aefe: b682 cmpl %d2,%d3
4af00: 6600 0092 bnew 4af94 <rtems_bdbuf_remove_from_tree+0x1cc>
{
/* rebalance left branch */
switch (p->avl.bal)
4af04: 4a00 tstb %d0
4af06: 6718 beqs 4af20 <rtems_bdbuf_remove_from_tree+0x158>
4af08: 49c0 extbl %d0
4af0a: 7401 moveq #1,%d2
4af0c: b480 cmpl %d0,%d2
4af0e: 671a beqs 4af2a <rtems_bdbuf_remove_from_tree+0x162>
4af10: b680 cmpl %d0,%d3
4af12: 6600 011a bnew 4b02e <rtems_bdbuf_remove_from_tree+0x266>
{
case -1:
p->avl.bal = 0;
4af16: 4203 clrb %d3
4af18: 1143 0011 moveb %d3,%a0@(17)
4af1c: 6000 0110 braw 4b02e <rtems_bdbuf_remove_from_tree+0x266>
break;
case 0:
p->avl.bal = 1;
4af20: 7001 moveq #1,%d0
4af22: 1140 0011 moveb %d0,%a0@(17)
4af26: 6000 0090 braw 4afb8 <rtems_bdbuf_remove_from_tree+0x1f0>
modified = false;
break;
case +1:
p1 = p->avl.right;
4af2a: 2268 000c moveal %a0@(12),%a1
if (p1->avl.bal >= 0) /* simple RR-turn */
4af2e: 1029 0011 moveb %a1@(17),%d0
4af32: 6d26 blts 4af5a <rtems_bdbuf_remove_from_tree+0x192>
{
p->avl.right = p1->avl.left;
4af34: 2169 0008 000c movel %a1@(8),%a0@(12)
p1->avl.left = p;
4af3a: 2348 0008 movel %a0,%a1@(8)
if (p1->avl.bal == 0)
4af3e: 4a00 tstb %d0
4af40: 660a bnes 4af4c <rtems_bdbuf_remove_from_tree+0x184>
{
p1->avl.bal = -1;
4af42: 50c2 st %d2
4af44: 1342 0011 moveb %d2,%a1@(17)
4af48: 6000 0090 braw 4afda <rtems_bdbuf_remove_from_tree+0x212>
modified = false;
}
else
{
p->avl.bal = 0;
4af4c: 4203 clrb %d3
4af4e: 1143 0011 moveb %d3,%a0@(17)
p1->avl.bal = 0;
4af52: 1343 0011 moveb %d3,%a1@(17)
4af56: 6000 0090 braw 4afe8 <rtems_bdbuf_remove_from_tree+0x220>
}
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
4af5a: 2469 0008 moveal %a1@(8),%a2
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;
4af5e: 7401 moveq #1,%d2
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
4af60: 76ff moveq #-1,%d3
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;
4af62: 102a 0011 moveb %a2@(17),%d0
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
4af66: 236a 000c 0008 movel %a2@(12),%a1@(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;
4af6c: 49c0 extbl %d0
4af6e: b480 cmpl %d0,%d2
4af70: 57c0 seq %d0
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
4af72: 2549 000c movel %a1,%a2@(12)
p->avl.right = p2->avl.left;
4af76: 216a 0008 000c movel %a2@(8),%a0@(12)
p2->avl.left = p;
if (p2->avl.bal == +1) p->avl.bal = -1; else p->avl.bal = 0;
4af7c: 1140 0011 moveb %d0,%a0@(17)
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
p2->avl.left = p;
4af80: 2548 0008 movel %a0,%a2@(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;
4af84: 102a 0011 moveb %a2@(17),%d0
4af88: 49c0 extbl %d0
4af8a: b680 cmpl %d0,%d3
4af8c: 56c0 sne %d0
4af8e: 5280 addql #1,%d0
4af90: 6000 0090 braw 4b022 <rtems_bdbuf_remove_from_tree+0x25a>
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
4af94: 4a00 tstb %d0
4af96: 671a beqs 4afb2 <rtems_bdbuf_remove_from_tree+0x1ea>
4af98: 49c0 extbl %d0
4af9a: 7401 moveq #1,%d2
4af9c: b480 cmpl %d0,%d2
4af9e: 670a beqs 4afaa <rtems_bdbuf_remove_from_tree+0x1e2>
4afa0: 76ff moveq #-1,%d3
4afa2: b680 cmpl %d0,%d3
4afa4: 6600 0088 bnew 4b02e <rtems_bdbuf_remove_from_tree+0x266>
4afa8: 6012 bras 4afbc <rtems_bdbuf_remove_from_tree+0x1f4>
{
case +1:
p->avl.bal = 0;
4afaa: 4200 clrb %d0
4afac: 1140 0011 moveb %d0,%a0@(17)
4afb0: 607c bras 4b02e <rtems_bdbuf_remove_from_tree+0x266>
break;
case 0:
p->avl.bal = -1;
4afb2: 50c2 st %d2
4afb4: 1142 0011 moveb %d2,%a0@(17)
modified = false;
4afb8: 4200 clrb %d0
4afba: 6074 bras 4b030 <rtems_bdbuf_remove_from_tree+0x268>
break;
case -1:
p1 = p->avl.left;
4afbc: 2268 0008 moveal %a0@(8),%a1
if (p1->avl.bal <= 0) /* simple LL-turn */
4afc0: 1029 0011 moveb %a1@(17),%d0
4afc4: 6e26 bgts 4afec <rtems_bdbuf_remove_from_tree+0x224>
{
p->avl.left = p1->avl.right;
4afc6: 2169 000c 0008 movel %a1@(12),%a0@(8)
p1->avl.right = p;
4afcc: 2348 000c movel %a0,%a1@(12)
if (p1->avl.bal == 0)
4afd0: 4a00 tstb %d0
4afd2: 660a bnes 4afde <rtems_bdbuf_remove_from_tree+0x216><== NEVER TAKEN
{
p1->avl.bal = 1;
4afd4: 7601 moveq #1,%d3
4afd6: 1343 0011 moveb %d3,%a1@(17)
4afda: 2049 moveal %a1,%a0
4afdc: 6052 bras 4b030 <rtems_bdbuf_remove_from_tree+0x268>
modified = false;
}
else
{
p->avl.bal = 0;
4afde: 4200 clrb %d0 <== NOT EXECUTED
4afe0: 1140 0011 moveb %d0,%a0@(17) <== NOT EXECUTED
p1->avl.bal = 0;
4afe4: 1340 0011 moveb %d0,%a1@(17) <== NOT EXECUTED
4afe8: 2049 moveal %a1,%a0
4afea: 6042 bras 4b02e <rtems_bdbuf_remove_from_tree+0x266>
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
4afec: 2469 000c moveal %a1@(12),%a2
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;
4aff0: 74ff moveq #-1,%d2
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4aff2: 7601 moveq #1,%d3
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;
4aff4: 102a 0011 moveb %a2@(17),%d0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
4aff8: 236a 0008 000c movel %a2@(8),%a1@(12)
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;
4affe: 49c0 extbl %d0
4b000: b480 cmpl %d0,%d2
4b002: 56c0 sne %d0
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
4b004: 2549 0008 movel %a1,%a2@(8)
p->avl.left = p2->avl.right;
4b008: 216a 000c 0008 movel %a2@(12),%a0@(8)
p2->avl.right = p;
if (p2->avl.bal == -1) p->avl.bal = 1; else p->avl.bal = 0;
4b00e: 5280 addql #1,%d0
4b010: 1140 0011 moveb %d0,%a0@(17)
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
p2->avl.right = p;
4b014: 2548 000c movel %a0,%a2@(12)
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;
4b018: 102a 0011 moveb %a2@(17),%d0
4b01c: 49c0 extbl %d0
4b01e: b680 cmpl %d0,%d3
4b020: 57c0 seq %d0
p = p2;
p2->avl.bal = 0;
4b022: 204a moveal %a2,%a0
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;
4b024: 1340 0011 moveb %d0,%a1@(17)
p = p2;
p2->avl.bal = 0;
4b028: 4200 clrb %d0
4b02a: 1540 0011 moveb %d0,%a2@(17)
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
4b02e: 7001 moveq #1,%d0
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
4b030: 43ec fffc lea %a4@(-4),%a1
default:
break;
}
}
if (buf_prev > buf_stack)
4b034: b289 cmpl %a1,%d1
4b036: 641c bccs 4b054 <rtems_bdbuf_remove_from_tree+0x28c>
{
q = *(buf_prev - 1);
4b038: 226c fff8 moveal %a4@(-8),%a1
if (q->avl.cache == -1)
4b03c: 76ff moveq #-1,%d3
4b03e: 1429 0010 moveb %a1@(16),%d2
4b042: 49c2 extbl %d2
4b044: b682 cmpl %d2,%d3
4b046: 6606 bnes 4b04e <rtems_bdbuf_remove_from_tree+0x286>
{
q->avl.left = p;
4b048: 2348 0008 movel %a0,%a1@(8)
4b04c: 600e bras 4b05c <rtems_bdbuf_remove_from_tree+0x294>
}
else
{
q->avl.right = p;
4b04e: 2348 000c movel %a0,%a1@(12)
4b052: 6008 bras 4b05c <rtems_bdbuf_remove_from_tree+0x294>
}
}
else
{
*root = p;
4b054: 23c8 0006 0ccc movel %a0,60ccc <bdbuf_cache+0x38>
4b05a: 602a bras 4b086 <rtems_bdbuf_remove_from_tree+0x2be>
4b05c: 598c subql #4,%a4
*root = q;
}
modified = true;
while (modified)
4b05e: 4a00 tstb %d0
4b060: 6600 fe8c bnew 4aeee <rtems_bdbuf_remove_from_tree+0x126>
4b064: 6020 bras 4b086 <rtems_bdbuf_remove_from_tree+0x2be>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_TREE_RM);
4b066: 4878 001b pea 1b <OPER2+0x7> <== NOT EXECUTED
4b06a: 2f2d 001e movel %a5@(30),%sp@- <== NOT EXECUTED
4b06e: 4eba fa98 jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
4b072: 200e movel %fp,%d0
4b074: 0680 ffff ff80 addil #-128,%d0
4b07a: b084 cmpl %d4,%d0
4b07c: 6500 fdb6 bcsw 4ae34 <rtems_bdbuf_remove_from_tree+0x6c>
{
p = *(buf_prev - 1);
}
else
{
p = NULL;
4b080: 4282 clrl %d2
4b082: 6000 fdb4 braw 4ae38 <rtems_bdbuf_remove_from_tree+0x70>
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
if (rtems_bdbuf_avl_remove (&bdbuf_cache.tree, bd) != 0)
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_TREE_RM);
}
4b086: 4cee 3c1c ff64 moveml %fp@(-156),%d2-%d4/%a2-%a5
4b08c: 4e5e unlk %fp <== NOT EXECUTED
0004b19a <rtems_bdbuf_remove_from_tree_and_lru_list>:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_TREE_RM);
}
static void
rtems_bdbuf_remove_from_tree_and_lru_list (rtems_bdbuf_buffer *bd)
{
4b19a: 4e56 0000 linkw %fp,#0
4b19e: 2f0a movel %a2,%sp@-
4b1a0: 246e 0008 moveal %fp@(8),%a2
switch (bd->state)
4b1a4: 202a 001e movel %a2@(30),%d0
4b1a8: 671a beqs 4b1c4 <rtems_bdbuf_remove_from_tree_and_lru_list+0x2a>
4b1aa: 7202 moveq #2,%d1
4b1ac: b280 cmpl %d0,%d1
4b1ae: 660a bnes 4b1ba <rtems_bdbuf_remove_from_tree_and_lru_list+0x20><== NEVER TAKEN
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
4b1b0: 2f0a movel %a2,%sp@-
4b1b2: 4eba fc14 jsr %pc@(4adc8 <rtems_bdbuf_remove_from_tree>)
break;
4b1b6: 588f addql #4,%sp
4b1b8: 600a bras 4b1c4 <rtems_bdbuf_remove_from_tree_and_lru_list+0x2a>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_10);
4b1ba: 4878 0016 pea 16 <OPER2+0x2> <== NOT EXECUTED
4b1be: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4b1c0: 4eba f946 jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4b1c4: 2252 moveal %a2@,%a1
previous = the_node->previous;
4b1c6: 206a 0004 moveal %a2@(4),%a0
}
rtems_chain_extract_unprotected (&bd->link);
}
4b1ca: 246e fffc moveal %fp@(-4),%a2
4b1ce: 4e5e unlk %fp
next->previous = previous;
4b1d0: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4b1d4: 2089 movel %a1,%a0@ <== NOT EXECUTED
0004ca5e <rtems_bdbuf_reset_device_stats>:
}
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
4ca5e: 4e56 0000 linkw %fp,#0
4ca62: 2f0a movel %a2,%sp@-
4ca64: 246e 0008 moveal %fp@(8),%a2
rtems_bdbuf_lock_cache ();
4ca68: 4eba e088 jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
memset (&dd->stats, 0, sizeof(dd->stats));
4ca6c: 4878 0020 pea 20 <OPER2+0xc>
4ca70: 42a7 clrl %sp@-
4ca72: 486a 0042 pea %a2@(66)
4ca76: 4eb9 0005 074c jsr 5074c <memset>
rtems_bdbuf_unlock_cache ();
}
4ca7c: 246e fffc moveal %fp@(-4),%a2
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
4ca80: 4fef 000c lea %sp@(12),%sp
}
4ca84: 4e5e unlk %fp
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
4ca86: 6000 e0b6 braw 4ab3e <rtems_bdbuf_unlock_cache>
...
0004abac <rtems_bdbuf_restore_preemption>:
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
4abac: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
4abb0: 486e 0008 pea %fp@(8)
4abb4: 2f3c 0000 ffff movel #65535,%sp@-
4abba: 2f2e 0008 movel %fp@(8),%sp@-
4abbe: 4eb9 0004 e1b0 jsr 4e1b0 <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
4abc4: 4fef 000c lea %sp@(12),%sp
4abc8: 4a80 tstl %d0
4abca: 6708 beqs 4abd4 <rtems_bdbuf_restore_preemption+0x28><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_PREEMPT_RST);
4abcc: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED
4abd0: 4eba fee8 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4abd4: 4e5e unlk %fp <== NOT EXECUTED
0004c972 <rtems_bdbuf_set_block_size>:
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd,
uint32_t block_size,
bool sync)
{
4c972: 4e56 ffe8 linkw %fp,#-24
4c976: 48d7 047c moveml %d2-%d6/%a2,%sp@
4c97a: 246e 0008 moveal %fp@(8),%a2
4c97e: 242e 000c movel %fp@(12),%d2
/*
* We do not care about the synchronization status since we will purge the
* device later.
*/
if (sync)
4c982: 4a2e 0013 tstb %fp@(19)
4c986: 670a beqs 4c992 <rtems_bdbuf_set_block_size+0x20>
rtems_bdbuf_syncdev (dd);
4c988: 2f0a movel %a2,%sp@-
4c98a: 4eb9 0004 c7b2 jsr 4c7b2 <rtems_bdbuf_syncdev>
4c990: 588f addql #4,%sp
rtems_bdbuf_lock_cache ();
4c992: 4eba e15e jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
if (block_size > 0)
4c996: 4a82 tstl %d2
4c998: 677c beqs 4ca16 <rtems_bdbuf_set_block_size+0xa4>
rtems_bdbuf_bds_per_group (size_t size)
{
size_t bufs_per_size;
size_t bds_per_size;
if (size > bdbuf_config.buffer_max)
4c99a: b4b9 0005 e17a cmpl 5e17a <rtems_bdbuf_configuration+0x28>,%d2
4c9a0: 6274 bhis 4ca16 <rtems_bdbuf_set_block_size+0xa4><== NEVER TAKEN
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
4c9a2: 2002 movel %d2,%d0
4c9a4: 5380 subql #1,%d0
4c9a6: 41f9 0005 e176 lea 5e176 <rtems_bdbuf_configuration+0x24>,%a0
4c9ac: 4c50 0000 remul %a0@,%d0,%d0
4c9b0: 2200 movel %d0,%d1
4c9b2: 5281 addql #1,%d1
for (bds_per_size = 1;
4c9b4: 7001 moveq #1,%d0
4c9b6: 6002 bras 4c9ba <rtems_bdbuf_set_block_size+0x48>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
4c9b8: d080 addl %d0,%d0
if (size > bdbuf_config.buffer_max)
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
for (bds_per_size = 1;
4c9ba: b280 cmpl %d0,%d1
4c9bc: 62fa bhis 4c9b8 <rtems_bdbuf_set_block_size+0x46>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
4c9be: 2839 0006 0cb2 movel 60cb2 <bdbuf_cache+0x1e>,%d4
4c9c4: 4c40 4004 remul %d0,%d4,%d4
if (block_size > 0)
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
4c9c8: 674c beqs 4ca16 <rtems_bdbuf_set_block_size+0xa4><== NEVER TAKEN
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
4c9ca: 262a 0020 movel %a2@(32),%d3
4c9ce: 2202 movel %d2,%d1
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
4c9d0: 7c01 moveq #1,%d6
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
4c9d2: 4c43 1001 remul %d3,%d1,%d1
{
size_t bds_per_group = rtems_bdbuf_bds_per_group (block_size);
if (bds_per_group != 0)
{
int block_to_media_block_shift = 0;
4c9d6: 4280 clrl %d0
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
4c9d8: 6002 bras 4c9dc <rtems_bdbuf_set_block_size+0x6a>
{
++block_to_media_block_shift;
4c9da: 5280 addql #1,%d0
{
int block_to_media_block_shift = 0;
uint32_t media_blocks_per_block = block_size / dd->media_block_size;
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
4c9dc: 2a06 movel %d6,%d5
4c9de: e1ad lsll %d0,%d5
4c9e0: b285 cmpl %d5,%d1
4c9e2: 62f6 bhis 4c9da <rtems_bdbuf_set_block_size+0x68>
{
++block_to_media_block_shift;
}
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
4c9e4: e1ab lsll %d0,%d3
4c9e6: b483 cmpl %d3,%d2
4c9e8: 6702 beqs 4c9ec <rtems_bdbuf_set_block_size+0x7a><== ALWAYS TAKEN
block_to_media_block_shift = -1;
4c9ea: 70ff moveq #-1,%d0 <== NOT EXECUTED
dd->block_size = block_size;
dd->block_count = dd->size / media_blocks_per_block;
4c9ec: 262a 001c movel %a2@(28),%d3
}
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
block_to_media_block_shift = -1;
dd->block_size = block_size;
4c9f0: 2542 0024 movel %d2,%a2@(36)
dd->block_count = dd->size / media_blocks_per_block;
4c9f4: 4c41 3003 remul %d1,%d3,%d3
dd->media_blocks_per_block = media_blocks_per_block;
4c9f8: 2541 002c movel %d1,%a2@(44)
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd,
uint32_t block_size,
bool sync)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
4c9fc: 4282 clrl %d2
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
block_to_media_block_shift = -1;
dd->block_size = block_size;
dd->block_count = dd->size / media_blocks_per_block;
4c9fe: 2543 0028 movel %d3,%a2@(40)
dd->media_blocks_per_block = media_blocks_per_block;
dd->block_to_media_block_shift = block_to_media_block_shift;
4ca02: 2540 0030 movel %d0,%a2@(48)
dd->bds_per_group = bds_per_group;
4ca06: 2544 0034 movel %d4,%a2@(52)
rtems_bdbuf_purge_dev (dd);
4ca0a: 2f0a movel %a2,%sp@-
4ca0c: 4eb9 0004 c80a jsr 4c80a <rtems_bdbuf_purge_dev>
4ca12: 588f addql #4,%sp
4ca14: 6002 bras 4ca18 <rtems_bdbuf_set_block_size+0xa6>
sc = RTEMS_INVALID_NUMBER;
}
}
else
{
sc = RTEMS_INVALID_NUMBER;
4ca16: 740a moveq #10,%d2
}
rtems_bdbuf_unlock_cache ();
4ca18: 4eba e124 jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
return sc;
}
4ca1c: 2002 movel %d2,%d0
4ca1e: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
4ca24: 4e5e unlk %fp <== NOT EXECUTED
0004b6c2 <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
4b6c2: 4e56 ffe0 linkw %fp,#-32
4b6c6: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4b6ca: 2a6e 000c moveal %fp@(12),%a5
4b6ce: 286e 0008 moveal %fp@(8),%a4
4b6d2: 266e 0010 moveal %fp@(16),%a3
4b6d6: 262e 001c movel %fp@(28),%d3
4b6da: 205d moveal %a5@+,%a0
4b6dc: 142e 0017 moveb %fp@(23),%d2
4b6e0: 1a2e 001b moveb %fp@(27),%d5
if (!rtems_chain_is_empty (chain))
4b6e4: bbc8 cmpal %a0,%a5
4b6e6: 6700 00b6 beqw 4b79e <rtems_bdbuf_swapout_modified_processing+0xdc>
node = node->next;
/*
* A sync active with no valid dev means sync all.
*/
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
4b6ea: 4a02 tstb %d2
4b6ec: 6708 beqs 4b6f6 <rtems_bdbuf_swapout_modified_processing+0x34>
4b6ee: 4a94 tstl %a4@
4b6f0: 57c1 seq %d1
4b6f2: 4481 negl %d1
4b6f4: 6002 bras 4b6f8 <rtems_bdbuf_swapout_modified_processing+0x36>
sync_all = true;
else
sync_all = false;
4b6f6: 4201 clrb %d1
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
4b6f8: 2839 0006 0d04 movel 60d04 <bdbuf_cache+0x70>,%d4
* 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))
4b6fe: 4a01 tstb %d1
4b700: 6610 bnes 4b712 <rtems_bdbuf_swapout_modified_processing+0x50>
4b702: 4a02 tstb %d2
4b704: 6708 beqs 4b70e <rtems_bdbuf_swapout_modified_processing+0x4c>
4b706: 2028 0012 movel %a0@(18),%d0
4b70a: b094 cmpl %a4@,%d0
4b70c: 6704 beqs 4b712 <rtems_bdbuf_swapout_modified_processing+0x50>
|| rtems_bdbuf_has_buffer_waiters ())
4b70e: 4a84 tstl %d4
4b710: 6704 beqs 4b716 <rtems_bdbuf_swapout_modified_processing+0x54>
bd->hold_timer = 0;
4b712: 42a8 002a clrl %a0@(42)
if (bd->hold_timer)
4b716: 2028 002a movel %a0@(42),%d0
4b71a: 671e beqs 4b73a <rtems_bdbuf_swapout_modified_processing+0x78>
{
if (update_timers)
4b71c: 4a05 tstb %d5
4b71e: 6710 beqs 4b730 <rtems_bdbuf_swapout_modified_processing+0x6e>
{
if (bd->hold_timer > timer_delta)
4b720: b680 cmpl %d0,%d3
4b722: 6408 bccs 4b72c <rtems_bdbuf_swapout_modified_processing+0x6a>
bd->hold_timer -= timer_delta;
4b724: 9083 subl %d3,%d0
4b726: 2140 002a movel %d0,%a0@(42)
4b72a: 6004 bras 4b730 <rtems_bdbuf_swapout_modified_processing+0x6e>
else
bd->hold_timer = 0;
4b72c: 42a8 002a clrl %a0@(42)
}
if (bd->hold_timer)
4b730: 4aa8 002a tstl %a0@(42)
4b734: 6704 beqs 4b73a <rtems_bdbuf_swapout_modified_processing+0x78>
{
node = node->next;
4b736: 2050 moveal %a0@,%a0
continue;
4b738: 604c bras 4b786 <rtems_bdbuf_swapout_modified_processing+0xc4>
/*
* 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)
4b73a: 4a94 tstl %a4@
4b73c: 6604 bnes 4b742 <rtems_bdbuf_swapout_modified_processing+0x80>
*dd_ptr = bd->dd;
4b73e: 28a8 0012 movel %a0@(18),%a4@
4b742: 2450 moveal %a0@,%a2
if (bd->dd == *dd_ptr)
4b744: 2254 moveal %a4@,%a1
4b746: b3e8 0012 cmpal %a0@(18),%a1
4b74a: 6638 bnes 4b784 <rtems_bdbuf_swapout_modified_processing+0xc2><== NEVER TAKEN
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b74c: 7009 moveq #9,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4b74e: 2268 0004 moveal %a0@(4),%a1
4b752: 2140 001e movel %d0,%a0@(30)
next->previous = previous;
4b756: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
4b75a: 228a movel %a2,%a1@
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
4b75c: 226b 0008 moveal %a3@(8),%a1
4b760: 601c bras 4b77e <rtems_bdbuf_swapout_modified_processing+0xbc>
while (node && !rtems_chain_is_head (transfer, tnode))
{
rtems_bdbuf_buffer* tbd = (rtems_bdbuf_buffer*) tnode;
if (bd->block > tbd->block)
4b762: 2029 0016 movel %a1@(22),%d0
4b766: b0a8 0016 cmpl %a0@(22),%d0
4b76a: 640e bccs 4b77a <rtems_bdbuf_swapout_modified_processing+0xb8>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4b76c: 2011 movel %a1@,%d0
after_node->next = the_node;
4b76e: 2288 movel %a0,%a1@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4b770: 2149 0004 movel %a1,%a0@(4)
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
4b774: 2240 moveal %d0,%a1
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
4b776: 2080 movel %d0,%a0@
4b778: 601e bras 4b798 <rtems_bdbuf_swapout_modified_processing+0xd6>
{
rtems_chain_insert_unprotected (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
4b77a: 2269 0004 moveal %a1@(4),%a1
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
4b77e: b7c9 cmpal %a1,%a3
4b780: 66e0 bnes 4b762 <rtems_bdbuf_swapout_modified_processing+0xa0>
4b782: 600a bras 4b78e <rtems_bdbuf_swapout_modified_processing+0xcc>
node = next_node;
}
else
{
node = node->next;
4b784: 204a moveal %a2,%a0
if (sync_active && (*dd_ptr == BDBUF_INVALID_DEV))
sync_all = true;
else
sync_all = false;
while (!rtems_chain_is_tail (chain, node))
4b786: bbc8 cmpal %a0,%a5
4b788: 6600 ff74 bnew 4b6fe <rtems_bdbuf_swapout_modified_processing+0x3c>
4b78c: 6010 bras 4b79e <rtems_bdbuf_swapout_modified_processing+0xdc>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4b78e: 2253 moveal %a3@,%a1
after_node->next = the_node;
4b790: 2688 movel %a0,%a3@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4b792: 214b 0004 movel %a3,%a0@(4)
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
4b796: 2089 movel %a1,%a0@
before_node->previous = the_node;
4b798: 2348 0004 movel %a0,%a1@(4)
4b79c: 60e6 bras 4b784 <rtems_bdbuf_swapout_modified_processing+0xc2>
{
node = node->next;
}
}
}
}
4b79e: 4cd7 3c3c moveml %sp@,%d2-%d5/%a2-%a5
4b7a2: 4e5e unlk %fp <== NOT EXECUTED
0004b9f2 <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
4b9f2: 4e56 ffb8 linkw %fp,#-72
4b9f6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
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 ();
4b9fa: 45fa f2a8 lea %pc@(4aca4 <rtems_bdbuf_swapout_writereq_alloc>),%a2
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
4b9fe: 4284 clrl %d4
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
4ba00: 47f9 0004 3c84 lea 43c84 <malloc>,%a3
if (!worker)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_NOMEM);
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4ba06: 284a moveal %a2,%a4
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
4ba08: 4bfa f34e lea %pc@(4ad58 <rtems_bdbuf_create_task.constprop.14>),%a5
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 ();
4ba0c: 4e92 jsr %a2@
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4ba0e: 2439 0005 e15e movel 5e15e <rtems_bdbuf_configuration+0xc>,%d2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4ba14: 41ee ffee lea %fp@(-18),%a0
4ba18: 223c 0000 03e8 movel #1000,%d1
4ba1e: 4c01 2800 mulsl %d1,%d2
4ba22: 2d48 ffea movel %a0,%fp@(-22)
head->previous = NULL;
tail->previous = head;
4ba26: 41ee ffea lea %fp@(-22),%a0
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 ();
4ba2a: 2d40 fffc movel %d0,%fp@(-4)
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
transfer.syncing = false;
4ba2e: 4200 clrb %d0
4ba30: 2d48 fff2 movel %a0,%fp@(-14)
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4ba34: 41f9 0005 e116 lea 5e116 <Configuration+0xc>,%a0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4ba3a: 42ae ffee clrl %fp@(-18)
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
transfer.syncing = false;
4ba3e: 1d40 fffa moveb %d0,%fp@(-6)
const uint32_t period_in_msecs = bdbuf_config.swapout_period;
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
4ba42: 42ae fff6 clrl %fp@(-10)
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4ba46: 4c50 2002 remul %a0@,%d2,%d2
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
4ba4a: 4eba f0a6 jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
4ba4e: 6000 0086 braw 4bad6 <rtems_bdbuf_swapout_task+0xe4>
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
4ba52: 4878 0024 pea 24 <OPER2+0x10> <== NOT EXECUTED
4ba56: 4e93 jsr %a3@ <== NOT EXECUTED
if (!worker)
4ba58: 588f addql #4,%sp <== NOT EXECUTED
for (w = 0; w < bdbuf_config.swapout_workers; w++)
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
4ba5a: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (!worker)
4ba5c: 4a80 tstl %d0 <== NOT EXECUTED
4ba5e: 6606 bnes 4ba66 <rtems_bdbuf_swapout_task+0x74> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_NOMEM);
4ba60: 4878 000a pea a <LASTO> <== NOT EXECUTED
4ba64: 606a bras 4bad0 <rtems_bdbuf_swapout_task+0xde> <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4ba66: 2079 0006 0ca2 moveal 60ca2 <bdbuf_cache+0xe>,%a0 <== NOT EXECUTED
the_node->next = tail;
4ba6c: 24bc 0006 0c9e movel #396446,%a2@ <== NOT EXECUTED
tail->previous = the_node;
4ba72: 23c0 0006 0ca2 movel %d0,60ca2 <bdbuf_cache+0xe> <== NOT EXECUTED
old_last->next = the_node;
4ba78: 2080 movel %d0,%a0@ <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
4ba7a: 7001 moveq #1,%d0 <== NOT EXECUTED
the_node->previous = old_last;
4ba7c: 2548 0004 movel %a0,%a2@(4) <== NOT EXECUTED
4ba80: 1540 000c moveb %d0,%a2@(12) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4ba84: 4e94 jsr %a4@ <== 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 );
4ba86: 41ea 0012 lea %a2@(18),%a0 <== NOT EXECUTED
4ba8a: 2548 000e movel %a0,%a2@(14) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4ba8e: 41ea 000e lea %a2@(14),%a0 <== NOT EXECUTED
4ba92: 2540 0020 movel %d0,%a2@(32) <== 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)
4ba96: 2004 movel %d4,%d0 <== NOT EXECUTED
4ba98: 0680 0000 0061 addil #97,%d0 <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4ba9e: 42aa 0012 clrl %a2@(18) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
4baa2: 0080 4244 6f00 oril #1111781120,%d0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4baa8: 2548 0016 movel %a0,%a2@(22) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
4baac: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
4bab0: 486a 0008 pea %a2@(8) <== NOT EXECUTED
4bab4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bab6: 487a 01f4 pea %pc@(4bcac <rtems_bdbuf_swapout_worker_task>)<== NOT EXECUTED
4baba: 2f39 0005 e16a movel 5e16a <rtems_bdbuf_configuration+0x18>,%sp@-<== NOT EXECUTED
4bac0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bac2: 4e95 jsr %a5@ <== NOT EXECUTED
bdbuf_config.swapout_worker_priority,
RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT,
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker,
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
4bac4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4bac8: 4a80 tstl %d0 <== NOT EXECUTED
4baca: 6708 beqs 4bad4 <rtems_bdbuf_swapout_task+0xe2> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
4bacc: 4878 000d pea d <OPER1+0x1> <== NOT EXECUTED
4bad0: 4eba efe8 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
4bad4: 5284 addql #1,%d4 <== NOT EXECUTED
4bad6: b8b9 0005 e166 cmpl 5e166 <rtems_bdbuf_configuration+0x14>,%d4
4badc: 6500 ff74 bcsw 4ba52 <rtems_bdbuf_swapout_task+0x60>
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
}
rtems_bdbuf_unlock_cache ();
4bae0: 4bfa f05c lea %pc@(4ab3e <rtems_bdbuf_unlock_cache>),%a5
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4bae4: 2c0e movel %fp,%d6
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
4bae6: 47fa f00a lea %pc@(4aaf2 <rtems_bdbuf_lock_cache>),%a3
4baea: 2a3c 0004 aa94 movel #305812,%d5
/*
* 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,
4baf0: 49fa fbd0 lea %pc@(4b6c2 <rtems_bdbuf_swapout_modified_processing>),%a4
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4baf4: 0686 ffff ffe6 addil #-26,%d6
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
}
rtems_bdbuf_unlock_cache ();
4bafa: 4e95 jsr %a5@
4bafc: 6000 013a braw 4bc38 <rtems_bdbuf_swapout_task+0x246>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
4bb00: 7801 moveq #1,%d4
if (sc != RTEMS_SUCCESSFUL)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_2);
}
else
{
rtems_bdbuf_swapout_write (transfer);
4bb02: 2e3c 0004 b8e6 movel #309478,%d7
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
4bb08: 4e93 jsr %a3@
* 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)
4bb0a: 4a39 0006 0cc2 tstb 60cc2 <bdbuf_cache+0x2e>
4bb10: 6708 beqs 4bb1a <rtems_bdbuf_swapout_task+0x128>
worker = NULL;
4bb12: 4280 clrl %d0
/*
* 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,
4bb14: 45ee ffea lea %fp@(-22),%a2
4bb18: 6016 bras 4bb30 <rtems_bdbuf_swapout_task+0x13e>
4bb1a: 4879 0006 0c9a pea 60c9a <bdbuf_cache+0x6>
4bb20: 2045 moveal %d5,%a0
4bb22: 4e90 jsr %a0@
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get_unprotected (&bdbuf_cache.swapout_workers);
if (worker)
4bb24: 588f addql #4,%sp
4bb26: 4a80 tstl %d0
4bb28: 67e8 beqs 4bb12 <rtems_bdbuf_swapout_task+0x120> <== ALWAYS TAKEN
transfer = &worker->transfer;
4bb2a: 2440 moveal %d0,%a2 <== NOT EXECUTED
4bb2c: 45ea 000e lea %a2@(14),%a2 <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
4bb30: 220a movel %a2,%d1
4bb32: 5881 addql #4,%d1
4bb34: 2481 movel %d1,%a2@
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
4bb36: 1239 0006 0cc2 moveb 60cc2 <bdbuf_cache+0x2e>,%d1
head->next = tail;
head->previous = NULL;
4bb3c: 42aa 0004 clrl %a2@(4)
4bb40: 1541 0010 moveb %d1,%a2@(16)
tail->previous = head;
4bb44: 254a 0008 movel %a2,%a2@(8)
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
4bb48: 42aa 000c clrl %a2@(12)
/*
* 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)
4bb4c: 4a01 tstb %d1
4bb4e: 670a beqs 4bb5a <rtems_bdbuf_swapout_task+0x168>
transfer->dd = bdbuf_cache.sync_device;
4bb50: 41f9 0006 0cc8 lea 60cc8 <bdbuf_cache+0x34>,%a0
4bb56: 2550 000c movel %a0@,%a2@(12)
/*
* 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,
4bb5a: 2f39 0005 e15e movel 5e15e <rtems_bdbuf_configuration+0xc>,%sp@-
4bb60: 260a movel %a2,%d3
4bb62: 0683 0000 000c addil #12,%d3
4bb68: 42a7 clrl %sp@-
4bb6a: 4878 0001 pea 1 <ADD>
4bb6e: 2f0a movel %a2,%sp@-
4bb70: 4879 0006 0ce8 pea 60ce8 <bdbuf_cache+0x54>
4bb76: 2d40 ffe0 movel %d0,%fp@(-32)
4bb7a: 2f03 movel %d3,%sp@-
4bb7c: 4e94 jsr %a4@
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
4bb7e: 2f39 0005 e15e movel 5e15e <rtems_bdbuf_configuration+0xc>,%sp@-
4bb84: 7201 moveq #1,%d1
4bb86: c284 andl %d4,%d1
4bb88: 4284 clrl %d4
4bb8a: 1839 0006 0cc2 moveb 60cc2 <bdbuf_cache+0x2e>,%d4
4bb90: 2f01 movel %d1,%sp@-
4bb92: 2f04 movel %d4,%sp@-
4bb94: 2f0a movel %a2,%sp@-
4bb96: 4879 0006 0cdc pea 60cdc <bdbuf_cache+0x48>
4bb9c: 2f03 movel %d3,%sp@-
4bb9e: 4e94 jsr %a4@
/*
* 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 ();
4bba0: 4fef 0030 lea %sp@(48),%sp
4bba4: 4e95 jsr %a5@
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
4bba6: 202e ffe0 movel %fp@(-32),%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4bbaa: 220a movel %a2,%d1
4bbac: 5881 addql #4,%d1
4bbae: b292 cmpl %a2@,%d1
4bbb0: 672c beqs 4bbde <rtems_bdbuf_swapout_task+0x1ec>
{
if (worker)
4bbb2: 4a80 tstl %d0
4bbb4: 671e beqs 4bbd4 <rtems_bdbuf_swapout_task+0x1e2> <== ALWAYS TAKEN
{
rtems_status_code sc = rtems_event_send (worker->id,
4bbb6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4bbba: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bbbc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4bbc0: 4eb9 0004 6f6c jsr 46f6c <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
4bbc6: 508f addql #8,%sp <== NOT EXECUTED
4bbc8: 4a80 tstl %d0 <== NOT EXECUTED
4bbca: 6716 beqs 4bbe2 <rtems_bdbuf_swapout_task+0x1f0> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_2);
4bbcc: 4878 000c pea c <OPER1> <== NOT EXECUTED
4bbd0: 6000 fefe braw 4bad0 <rtems_bdbuf_swapout_task+0xde> <== NOT EXECUTED
}
else
{
rtems_bdbuf_swapout_write (transfer);
4bbd4: 2f0a movel %a2,%sp@-
4bbd6: 2047 moveal %d7,%a0
4bbd8: 4e90 jsr %a0@
4bbda: 588f addql #4,%sp
4bbdc: 6004 bras 4bbe2 <rtems_bdbuf_swapout_task+0x1f0>
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;
4bbde: 4200 clrb %d0
4bbe0: 6002 bras 4bbe4 <rtems_bdbuf_swapout_task+0x1f2>
else
{
rtems_bdbuf_swapout_write (transfer);
}
transfered_buffers = true;
4bbe2: 7001 moveq #1,%d0
4bbe4: 4204 clrb %d4
}
if (bdbuf_cache.sync_active && !transfered_buffers)
4bbe6: 4a39 0006 0cc2 tstb 60cc2 <bdbuf_cache+0x2e>
4bbec: 6734 beqs 4bc22 <rtems_bdbuf_swapout_task+0x230>
4bbee: 4a00 tstb %d0
4bbf0: 6600 ff16 bnew 4bb08 <rtems_bdbuf_swapout_task+0x116>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
4bbf4: 4e93 jsr %a3@
sync_requester = bdbuf_cache.sync_requester;
4bbf6: 2839 0006 0cc4 movel 60cc4 <bdbuf_cache+0x30>,%d4
bdbuf_cache.sync_active = false;
4bbfc: 4200 clrb %d0
bdbuf_cache.sync_requester = 0;
4bbfe: 42b9 0006 0cc4 clrl 60cc4 <bdbuf_cache+0x30>
if (bdbuf_cache.sync_active && !transfered_buffers)
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
sync_requester = bdbuf_cache.sync_requester;
bdbuf_cache.sync_active = false;
4bc04: 13c0 0006 0cc2 moveb %d0,60cc2 <bdbuf_cache+0x2e>
bdbuf_cache.sync_requester = 0;
rtems_bdbuf_unlock_cache ();
4bc0a: 4e95 jsr %a5@
if (sync_requester)
4bc0c: 4a84 tstl %d4
4bc0e: 6778 beqs 4bc88 <rtems_bdbuf_swapout_task+0x296> <== NEVER TAKEN
4bc10: 2f3c 8000 0000 movel #-2147483648,%sp@-
4bc16: 2f04 movel %d4,%sp@-
4bc18: 4eb9 0004 7558 jsr 47558 <rtems_event_system_send>
4bc1e: 508f addql #8,%sp
4bc20: 6066 bras 4bc88 <rtems_bdbuf_swapout_task+0x296>
/*
* 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,
4bc22: 4a00 tstb %d0
4bc24: 6762 beqs 4bc88 <rtems_bdbuf_swapout_task+0x296>
4bc26: 6000 fee0 braw 4bb08 <rtems_bdbuf_swapout_task+0x116>
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
4bc2a: 7206 moveq #6,%d1
4bc2c: b280 cmpl %d0,%d1
4bc2e: 6708 beqs 4bc38 <rtems_bdbuf_swapout_task+0x246> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SWAPOUT_RE);
4bc30: 4878 0018 pea 18 <OPER2+0x4> <== NOT EXECUTED
4bc34: 6000 fe9a braw 4bad0 <rtems_bdbuf_swapout_task+0xde> <== NOT EXECUTED
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
4bc38: 4a39 0006 0c98 tstb 60c98 <bdbuf_cache+0x4>
4bc3e: 6600 fec0 bnew 4bb00 <rtems_bdbuf_swapout_task+0x10e>
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
4bc42: 4eba eeae jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4bc46: 2479 0006 0c9a moveal 60c9a <bdbuf_cache+0x6>,%a2 <== 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;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
4bc4c: 47f9 0004 6f6c lea 46f6c <rtems_event_send>,%a3 <== NOT EXECUTED
4bc52: 6014 bras 4bc68 <rtems_bdbuf_swapout_task+0x276> <== 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;
4bc54: 4200 clrb %d0 <== NOT EXECUTED
4bc56: 1540 000c moveb %d0,%a2@(12) <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
4bc5a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4bc5e: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4bc62: 4e93 jsr %a3@ <== NOT EXECUTED
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
rtems_bdbuf_lock_cache ();
memset (&dd->stats, 0, sizeof(dd->stats));
rtems_bdbuf_unlock_cache ();
}
4bc64: 2452 moveal %a2@,%a2 <== NOT EXECUTED
4bc66: 508f addql #8,%sp <== 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))
4bc68: b5fc 0006 0c9e cmpal #396446,%a2 <== NOT EXECUTED
4bc6e: 66e4 bnes 4bc54 <rtems_bdbuf_swapout_task+0x262> <== NOT EXECUTED
worker->enabled = false;
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
4bc70: 4eba eecc jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
4bc74: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4bc78: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
4bc7e: 42a7 clrl %sp@- <== NOT EXECUTED
4bc80: 4eb9 0004 76d4 jsr 476d4 <rtems_task_delete> <== NOT EXECUTED
4bc86: 601a bras 4bca2 <rtems_bdbuf_swapout_task+0x2b0> <== NOT EXECUTED
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4bc88: 2f06 movel %d6,%sp@-
4bc8a: 2f02 movel %d2,%sp@-
4bc8c: 42a7 clrl %sp@-
4bc8e: 4878 0004 pea 4 <CONTEXT_ARG>
4bc92: 4eb9 0004 6e00 jsr 46e00 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
4bc98: 4fef 0010 lea %sp@(16),%sp
4bc9c: 4a80 tstl %d0
4bc9e: 668a bnes 4bc2a <rtems_bdbuf_swapout_task+0x238>
4bca0: 6096 bras 4bc38 <rtems_bdbuf_swapout_task+0x246>
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
rtems_task_delete (RTEMS_SELF);
}
4bca2: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4bca8: 4e5e unlk %fp <== NOT EXECUTED
0004bcac <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)
{
4bcac: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4bcb0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED
4bcb4: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
4bcb8: 240a movel %a2,%d2 <== NOT EXECUTED
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) arg;
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
4bcba: 47fa efae lea %pc@(4ac6a <rtems_bdbuf_wait_for_event>),%a3<== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
4bcbe: 0682 0000 000e addil #14,%d2 <== NOT EXECUTED
4bcc4: 49fa fc20 lea %pc@(4b8e6 <rtems_bdbuf_swapout_write>),%a4<== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4bcc8: 4bfa ee28 lea %pc@(4aaf2 <rtems_bdbuf_lock_cache>),%a5<== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
4bccc: 263c 0004 ab3e movel #305982,%d3 <== 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)
4bcd2: 603e bras 4bd12 <rtems_bdbuf_swapout_worker_task+0x66><== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
4bcd4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4bcd8: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
4bcda: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4bcdc: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4bcde: 4e95 jsr %a5@ <== 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 );
4bce0: 41ea 0012 lea %a2@(18),%a0 <== NOT EXECUTED
4bce4: 2548 000e movel %a0,%a2@(14) <== NOT EXECUTED
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4bce8: 2079 0006 0ca2 moveal 60ca2 <bdbuf_cache+0xe>,%a0 <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
4bcee: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
the_node->next = tail;
4bcf2: 24bc 0006 0c9e movel #396446,%a2@ <== NOT EXECUTED
tail->previous = the_node;
4bcf8: 23ca 0006 0ca2 movel %a2,60ca2 <bdbuf_cache+0xe> <== NOT EXECUTED
old_last->next = the_node;
4bcfe: 208a movel %a2,%a0@ <== NOT EXECUTED
the_node->previous = old_last;
4bd00: 2548 0004 movel %a0,%a2@(4) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
4bd04: 2043 moveal %d3,%a0 <== NOT EXECUTED
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4bd06: 42aa 0012 clrl %a2@(18) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4bd0a: 2542 0016 movel %d2,%a2@(22) <== NOT EXECUTED
4bd0e: 4e90 jsr %a0@ <== NOT EXECUTED
4bd10: 508f addql #8,%sp <== 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)
4bd12: 4a2a 000c tstb %a2@(12) <== NOT EXECUTED
4bd16: 66bc bnes 4bcd4 <rtems_bdbuf_swapout_worker_task+0x28><== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
4bd18: 2f2a 0020 movel %a2@(32),%sp@- <== NOT EXECUTED
4bd1c: 47f9 0004 3810 lea 43810 <free>,%a3 <== NOT EXECUTED
4bd22: 4e93 jsr %a3@ <== NOT EXECUTED
free (worker);
4bd24: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bd26: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
4bd28: 508f addql #8,%sp <== NOT EXECUTED
4bd2a: 42ae 0008 clrl %fp@(8) <== NOT EXECUTED
}
4bd2e: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 <== NOT EXECUTED
4bd34: 4e5e unlk %fp <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
4bd36: 4ef9 0004 76d4 jmp 476d4 <rtems_task_delete> <== NOT EXECUTED
0004b8e6 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
4b8e6: 4e56 ffdc linkw %fp,#-36
4b8ea: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4b8ee: 246e 0008 moveal %fp@(8),%a2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4b8f2: 260a movel %a2,%d3
4b8f4: 5883 addql #4,%d3
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))
4b8f6: b692 cmpl %a2@,%d3
4b8f8: 6700 00ee beqw 4b9e8 <rtems_bdbuf_swapout_write+0x102>
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
rtems_disk_device *dd = transfer->dd;
4b8fc: 266a 000c moveal %a2@(12),%a3
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
bool need_continuous_blocks =
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
4b900: 7a01 moveq #1,%d5
* 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;
4b902: 700c moveq #12,%d0
{
/*
* The last block number used when the driver only supports
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
4b904: 4282 clrl %d2
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get_unprotected(
rtems_chain_control *the_chain
)
{
return _Chain_Get_unprotected( the_chain );
4b906: 2c3c 0004 aa94 movel #305812,%d6
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
4b90c: 4bfa febe lea %pc@(4b7cc <rtems_bdbuf_execute_transfer_request>),%a5
uint32_t last_block = 0;
rtems_disk_device *dd = transfer->dd;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
bool need_continuous_blocks =
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
4b910: 206b 0008 moveal %a3@(8),%a0
4b914: caa8 000c andl %a0@(12),%d5
* continuous blocks in a single request.
*/
uint32_t last_block = 0;
rtems_disk_device *dd = transfer->dd;
uint32_t media_blocks_per_block = dd->media_blocks_per_block;
4b918: 282b 002c movel %a3@(44),%d4
* 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;
4b91c: 206a 0012 moveal %a2@(18),%a0
4b920: 2140 000c movel %d0,%a0@(12)
transfer->write_req->bufnum = 0;
4b924: 42a8 0010 clrl %a0@(16)
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
4b928: 6000 008a braw 4b9b4 <rtems_bdbuf_swapout_write+0xce>
4b92c: 286a 0012 moveal %a2@(18),%a4
if (rtems_bdbuf_tracer)
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
need_continuous_blocks ? "MULTI" : "SCAT");
if (need_continuous_blocks && transfer->write_req->bufnum &&
4b930: 4a85 tstl %d5
4b932: 6722 beqs 4b956 <rtems_bdbuf_swapout_write+0x70>
4b934: 4aac 0010 tstl %a4@(16)
4b938: 671c beqs 4b956 <rtems_bdbuf_swapout_write+0x70>
bd->block != last_block + media_blocks_per_block)
4b93a: 2202 movel %d2,%d1
4b93c: d284 addl %d4,%d1
if (rtems_bdbuf_tracer)
printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
bd->block, transfer->write_req->bufnum,
need_continuous_blocks ? "MULTI" : "SCAT");
if (need_continuous_blocks && transfer->write_req->bufnum &&
4b93e: b2a8 0016 cmpl %a0@(22),%d1
4b942: 6712 beqs 4b956 <rtems_bdbuf_swapout_write+0x70>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4b944: 2252 moveal %a2@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4b946: 214a 0004 movel %a2,%a0@(4)
bd->block != last_block + media_blocks_per_block)
{
rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
write = true;
4b94a: 7001 moveq #1,%d0
before_node = after_node->next;
after_node->next = the_node;
4b94c: 2488 movel %a0,%a2@
the_node->next = before_node;
before_node->previous = the_node;
4b94e: 2348 0004 movel %a0,%a1@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
4b952: 2089 movel %a1,%a0@
4b954: 602a bras 4b980 <rtems_bdbuf_swapout_write+0x9a>
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4b956: 222c 0010 movel %a4@(16),%d1
4b95a: 2401 movel %d1,%d2
transfer->write_req->bufnum++;
4b95c: 5281 addql #1,%d1
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4b95e: e98a lsll #4,%d2
transfer->write_req->bufnum++;
4b960: 2941 0010 movel %d1,%a4@(16)
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4b964: 43f4 2818 lea %a4@(00000018,%d2:l),%a1
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
4b968: 2428 0016 movel %a0@(22),%d2
buf->length = dd->block_size;
4b96c: 236b 0024 0004 movel %a3@(36),%a1@(4)
buf->buffer = bd->buffer;
4b972: 2368 001a 0008 movel %a0@(26),%a1@(8)
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
{
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
bool write = false;
4b978: 4200 clrb %d0
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
4b97a: 2348 000c movel %a0,%a1@(12)
buf->block = bd->block;
4b97e: 2282 movel %d2,%a1@
/*
* 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) ||
4b980: b692 cmpl %a2@,%d3
4b982: 6714 beqs 4b998 <rtems_bdbuf_swapout_write+0xb2>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
4b984: 206a 0012 moveal %a2@(18),%a0
/*
* 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) ||
4b988: 2239 0005 e156 movel 5e156 <rtems_bdbuf_configuration+0x4>,%d1
4b98e: b2a8 0010 cmpl %a0@(16),%d1
4b992: 6304 blss 4b998 <rtems_bdbuf_swapout_write+0xb2>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
4b994: 4a00 tstb %d0
4b996: 671c beqs 4b9b4 <rtems_bdbuf_swapout_write+0xce>
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
4b998: 42a7 clrl %sp@-
4b99a: 2f2a 0012 movel %a2@(18),%sp@-
4b99e: 2f0b movel %a3,%sp@-
4b9a0: 4e95 jsr %a5@
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4b9a2: 206a 0012 moveal %a2@(18),%a0
4b9a6: 700c moveq #12,%d0
transfer->write_req->bufnum = 0;
4b9a8: 4fef 000c lea %sp@(12),%sp
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4b9ac: 2140 000c movel %d0,%a0@(12)
transfer->write_req->bufnum = 0;
4b9b0: 42a8 0010 clrl %a0@(16)
4b9b4: 2f0a movel %a2,%sp@-
4b9b6: 2046 moveal %d6,%a0
4b9b8: 4e90 jsr %a0@
* trouble waiting to happen.
*/
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
4b9ba: 588f addql #4,%sp
4b9bc: 2040 moveal %d0,%a0
4b9be: 4a80 tstl %d0
4b9c0: 6600 ff6a bnew 4b92c <rtems_bdbuf_swapout_write+0x46>
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
4b9c4: 4a2a 0010 tstb %a2@(16)
4b9c8: 671e beqs 4b9e8 <rtems_bdbuf_swapout_write+0x102>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
4b9ca: 206b 0008 moveal %a3@(8),%a0
4b9ce: 7002 moveq #2,%d0
4b9d0: c0a8 000c andl %a0@(12),%d0
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
4b9d4: 6712 beqs 4b9e8 <rtems_bdbuf_swapout_write+0x102><== ALWAYS TAKEN
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
4b9d6: 42a7 clrl %sp@- <== NOT EXECUTED
4b9d8: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4b9dc: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4b9de: 206b 0038 moveal %a3@(56),%a0 <== NOT EXECUTED
4b9e2: 4e90 jsr %a0@ <== NOT EXECUTED
4b9e4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
4b9e8: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4b9ee: 4e5e unlk %fp <== NOT EXECUTED
0004aca4 <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
4aca4: 4e56 0000 linkw %fp,#0
* 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)));
4aca8: 2039 0005 e156 movel 5e156 <rtems_bdbuf_configuration+0x4>,%d0
4acae: e988 lsll #4,%d0
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
4acb0: 2f0a movel %a2,%sp@-
* @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 =
4acb2: 2040 moveal %d0,%a0
4acb4: 4868 0018 pea %a0@(24)
4acb8: 4eb9 0004 3c84 jsr 43c84 <malloc>
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
4acbe: 588f addql #4,%sp
* @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 =
4acc0: 2440 moveal %d0,%a2
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
4acc2: 4a80 tstl %d0
4acc4: 6608 bnes 4acce <rtems_bdbuf_swapout_writereq_alloc+0x2a><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_REQ_NOMEM);
4acc6: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
4acca: 4eba fdee jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
4acce: 7001 moveq #1,%d0
4acd0: 2480 movel %d0,%a2@
write_req->done = rtems_bdbuf_transfer_done;
4acd2: 203c 0004 b7a6 movel #309158,%d0
4acd8: 2540 0004 movel %d0,%a2@(4)
write_req->io_task = rtems_task_self ();
4acdc: 4eb9 0004 e2e0 jsr 4e2e0 <rtems_task_self>
4ace2: 2540 0014 movel %d0,%a2@(20)
return write_req;
}
4ace6: 200a movel %a2,%d0
4ace8: 246e fffc moveal %fp@(-4),%a2
4acec: 4e5e unlk %fp <== NOT EXECUTED
0004c6c2 <rtems_bdbuf_sync>:
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
4c6c2: 4e56 fff4 linkw %fp,#-12
4c6c6: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4c6ca: 246e 0008 moveal %fp@(8),%a2
}
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
4c6ce: 4a8a tstl %a2
4c6d0: 6700 00d4 beqw 4c7a6 <rtems_bdbuf_sync+0xe4>
if (rtems_bdbuf_tracer)
{
printf ("bdbuf:%s: %" PRIu32 "\n", kind, bd->block);
rtems_bdbuf_show_users (kind, bd);
}
rtems_bdbuf_lock_cache();
4c6d4: 4eba e41c jsr %pc@(4aaf2 <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4c6d8: 202a 001e movel %a2@(30),%d0
4c6dc: 7203 moveq #3,%d1
4c6de: b280 cmpl %d0,%d1
4c6e0: 6200 00b2 bhiw 4c794 <rtems_bdbuf_sync+0xd2>
4c6e4: 7405 moveq #5,%d2
4c6e6: b480 cmpl %d0,%d2
4c6e8: 640e bccs 4c6f8 <rtems_bdbuf_sync+0x36>
4c6ea: 123c 0006 moveb #6,%d1
4c6ee: b280 cmpl %d0,%d1
4c6f0: 6600 00a2 bnew 4c794 <rtems_bdbuf_sync+0xd2>
4c6f4: 6000 0094 braw 4c78a <rtems_bdbuf_sync+0xc8>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c6f8: 7408 moveq #8,%d2
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4c6fa: 2079 0006 0cf0 moveal 60cf0 <bdbuf_cache+0x5c>,%a0
4c700: 2542 001e movel %d2,%a2@(30)
the_node->next = tail;
4c704: 24bc 0006 0cec movel #396524,%a2@
tail->previous = the_node;
4c70a: 23ca 0006 0cf0 movel %a2,60cf0 <bdbuf_cache+0x5c>
old_last->next = the_node;
4c710: 208a movel %a2,%a0@
the_node->previous = old_last;
4c712: 2548 0004 movel %a0,%a2@(4)
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append_unprotected (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
4c716: 4aaa 0022 tstl %a2@(34)
4c71a: 670c beqs 4c728 <rtems_bdbuf_sync+0x66>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c71c: 4879 0006 0cf4 pea 60cf4 <bdbuf_cache+0x60>
4c722: 4eba e60c jsr %pc@(4ad30 <rtems_bdbuf_wake>)
4c726: 588f addql #4,%sp
rtems_bdbuf_wake_swapper ();
4c728: 4eba e42c jsr %pc@(4ab56 <rtems_bdbuf_wake_swapper>)
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4c72c: 47fa e508 lea %pc@(4ac36 <rtems_bdbuf_wait>),%a3
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4c730: 202a 001e movel %a2@(30),%d0
4c734: 7201 moveq #1,%d1
4c736: b280 cmpl %d0,%d1
4c738: 621c bhis 4c756 <rtems_bdbuf_sync+0x94> <== NEVER TAKEN
4c73a: 7407 moveq #7,%d2
4c73c: b480 cmpl %d0,%d2
4c73e: 641c bccs 4c75c <rtems_bdbuf_sync+0x9a>
4c740: 123c 000a moveb #10,%d1
4c744: b280 cmpl %d0,%d1
4c746: 650e bcss 4c756 <rtems_bdbuf_sync+0x94> <== NEVER TAKEN
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
return;
case RTEMS_BDBUF_STATE_SYNC:
case RTEMS_BDBUF_STATE_TRANSFER:
case RTEMS_BDBUF_STATE_TRANSFER_PURGED:
rtems_bdbuf_wait (bd, &bdbuf_cache.transfer_waiters);
4c748: 4879 0006 0cfc pea 60cfc <bdbuf_cache+0x68>
4c74e: 2f0a movel %a2,%sp@-
4c750: 4e93 jsr %a3@
4c752: 508f addql #8,%sp
4c754: 60da bras 4c730 <rtems_bdbuf_sync+0x6e>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9);
4c756: 4878 0015 pea 15 <OPER2+0x1> <== NOT EXECUTED
4c75a: 603c bras 4c798 <rtems_bdbuf_sync+0xd6> <== NOT EXECUTED
rtems_bdbuf_wait_for_sync_done (bd);
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
4c75c: 4aaa 0022 tstl %a2@(34)
4c760: 663c bnes 4c79e <rtems_bdbuf_sync+0xdc>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
4c762: 2200 movel %d0,%d1
4c764: 5381 subql #1,%d1
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
4c766: 7401 moveq #1,%d2
4c768: b481 cmpl %d1,%d2
4c76a: 6532 bcss 4c79e <rtems_bdbuf_sync+0xdc> <== NEVER TAKEN
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
4c76c: b480 cmpl %d0,%d2
4c76e: 660e bnes 4c77e <rtems_bdbuf_sync+0xbc>
{
rtems_bdbuf_remove_from_tree (bd);
4c770: 2f0a movel %a2,%sp@-
4c772: 4eba e654 jsr %pc@(4adc8 <rtems_bdbuf_remove_from_tree>)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4c776: 2f0a movel %a2,%sp@-
4c778: 4eba e942 jsr %pc@(4b0bc <rtems_bdbuf_make_free_and_add_to_lru_list>)
4c77c: 508f addql #8,%sp
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c77e: 4879 0006 0d04 pea 60d04 <bdbuf_cache+0x70>
4c784: 4eba e5aa jsr %pc@(4ad30 <rtems_bdbuf_wake>)
4c788: 6006 bras 4c790 <rtems_bdbuf_sync+0xce>
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);
4c78a: 2f0a movel %a2,%sp@-
4c78c: 4eba f7e2 jsr %pc@(4bf70 <rtems_bdbuf_discard_buffer_after_access>)
break;
4c790: 588f addql #4,%sp
4c792: 600a bras 4c79e <rtems_bdbuf_sync+0xdc>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5);
4c794: 4878 0011 pea 11 <INVALID_OPERATION+0x1> <== NOT EXECUTED
4c798: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c79a: 4eba e36c jsr %pc@(4ab08 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4c79e: 4eba e39e jsr %pc@(4ab3e <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c7a2: 4280 clrl %d0
4c7a4: 6002 bras 4c7a8 <rtems_bdbuf_sync+0xe6>
static rtems_status_code
rtems_bdbuf_check_bd_and_lock_cache (rtems_bdbuf_buffer *bd, const char *kind)
{
if (bd == NULL)
return RTEMS_INVALID_ADDRESS;
4c7a6: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4c7a8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4c7ae: 4e5e unlk %fp <== NOT EXECUTED
0004ab1e <rtems_bdbuf_unlock>:
* @param lock The mutex to unlock.
* @param fatal_error_code The error code if the call fails.
*/
static void
rtems_bdbuf_unlock (rtems_id lock, uint32_t fatal_error_code)
{
4ab1e: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_semaphore_release (lock);
4ab22: 2f2e 0008 movel %fp@(8),%sp@-
4ab26: 4eb9 0004 74ac jsr 474ac <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
4ab2c: 588f addql #4,%sp
4ab2e: 4a80 tstl %d0
4ab30: 6708 beqs 4ab3a <rtems_bdbuf_unlock+0x1c> <== ALWAYS TAKEN
rtems_bdbuf_fatal (fatal_error_code);
4ab32: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4ab36: 4eba ff82 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4ab3a: 4e5e unlk %fp <== NOT EXECUTED
0004ac6a <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
4ac6a: 4e56 fffc linkw %fp,#-4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
4ac6e: 204e moveal %fp,%a0
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
4ac70: 2f02 movel %d2,%sp@-
4ac72: 242e 0008 movel %fp@(8),%d2
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
4ac76: 42a0 clrl %a0@-
sc = rtems_event_receive (event,
4ac78: 2f08 movel %a0,%sp@-
4ac7a: 42a7 clrl %sp@-
4ac7c: 42a7 clrl %sp@-
4ac7e: 2f02 movel %d2,%sp@-
4ac80: 4eb9 0004 6e00 jsr 46e00 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
4ac86: 4fef 0010 lea %sp@(16),%sp
4ac8a: 4a80 tstl %d0
4ac8c: 6606 bnes 4ac94 <rtems_bdbuf_wait_for_event+0x2a><== NEVER TAKEN
4ac8e: b4ae fffc cmpl %fp@(-4),%d2
4ac92: 6708 beqs 4ac9c <rtems_bdbuf_wait_for_event+0x32><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_EVNT);
4ac94: 4878 001c pea 1c <OPER2+0x8> <== NOT EXECUTED
4ac98: 4eba fe20 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4ac9c: 242e fff8 movel %fp@(-8),%d2
4aca0: 4e5e unlk %fp <== NOT EXECUTED
0004b090 <rtems_bdbuf_wait_for_transient_event>:
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_EVNT);
}
static void
rtems_bdbuf_wait_for_transient_event (void)
{
4b090: 4e56 fffc linkw %fp,#-4
rtems_interval ticks
)
{
rtems_event_set event_out;
return rtems_event_system_receive(
4b094: 486e fffc pea %fp@(-4)
4b098: 42a7 clrl %sp@-
4b09a: 42a7 clrl %sp@-
4b09c: 2f3c 8000 0000 movel #-2147483648,%sp@-
4b0a2: 4eb9 0004 e13c jsr 4e13c <rtems_event_system_receive>
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_event_transient_receive (RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4b0a8: 4fef 0010 lea %sp@(16),%sp
4b0ac: 4a80 tstl %d0
4b0ae: 6708 beqs 4b0b8 <rtems_bdbuf_wait_for_transient_event+0x28><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_TRANS_EVNT);
4b0b0: 4878 001d pea 1d <OPER2+0x9> <== NOT EXECUTED
4b0b4: 4eba fa04 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4b0b8: 4e5e unlk %fp <== NOT EXECUTED
0004ad30 <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)
{
4ad30: 4e56 0000 linkw %fp,#0
4ad34: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
4ad38: 4a90 tstl %a0@
4ad3a: 6718 beqs 4ad54 <rtems_bdbuf_wake+0x24>
{
sc = rtems_semaphore_flush (waiters->sema);
4ad3c: 2f28 0004 movel %a0@(4),%sp@-
4ad40: 4eb9 0004 e0a0 jsr 4e0a0 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
4ad46: 588f addql #4,%sp
4ad48: 4a80 tstl %d0
4ad4a: 6708 beqs 4ad54 <rtems_bdbuf_wake+0x24> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAKE);
4ad4c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4ad50: 4eba fd68 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
}
4ad54: 4e5e unlk %fp <== NOT EXECUTED
0004ab56 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
4ab56: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
4ab5a: 4878 0004 pea 4 <CONTEXT_ARG>
4ab5e: 2f39 0006 0c94 movel 60c94 <bdbuf_cache>,%sp@-
4ab64: 4eb9 0004 6f6c jsr 46f6c <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
4ab6a: 508f addql #8,%sp
4ab6c: 4a80 tstl %d0
4ab6e: 6708 beqs 4ab78 <rtems_bdbuf_wake_swapper+0x22> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);
4ab70: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
4ab74: 4eba ff44 jsr %pc@(4aaba <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4ab78: 4e5e unlk %fp <== NOT EXECUTED
000422b0 <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
422b0: 4e56 ffcc linkw %fp,#-52
422b4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
422b8: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
422bc: 4284 clrl %d4
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
422be: 266e 0010 moveal %fp@(16),%a3
422c2: 286e 0014 moveal %fp@(20),%a4
422c6: 262e 0018 movel %fp@(24),%d3
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
422ca: 4a8a tstl %a2
422cc: 6708 beqs 422d6 <rtems_bdpart_create+0x26> <== NEVER TAKEN
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
422ce: 4a92 tstl %a2@
422d0: 6604 bnes 422d6 <rtems_bdpart_create+0x26> <== NEVER TAKEN
&& format->mbr.dos_compatibility;
422d2: 182a 0008 moveb %a2@(8),%d4
const unsigned *dist,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
422d6: 7001 moveq #1,%d0
422d8: c880 andl %d0,%d4
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
422da: 42ae fffc clrl %fp@(-4)
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
422de: 4a04 tstb %d4
422e0: 6704 beqs 422e6 <rtems_bdpart_create+0x36> <== NEVER TAKEN
422e2: 743f moveq #63,%d2
422e4: 6002 bras 422e8 <rtems_bdpart_create+0x38>
422e6: 7401 moveq #1,%d2 <== 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) {
422e8: 4a83 tstl %d3
422ea: 6700 0102 beqw 423ee <rtems_bdpart_create+0x13e>
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
422ee: 4a8a tstl %a2
422f0: 6700 0100 beqw 423f2 <rtems_bdpart_create+0x142>
422f4: 4a8b tstl %a3
422f6: 6700 00fa beqw 423f2 <rtems_bdpart_create+0x142>
422fa: 4a8c tstl %a4
422fc: 6700 00f4 beqw 423f2 <rtems_bdpart_create+0x142>
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, NULL, NULL, &disk_end);
42300: 486e fffc pea %fp@(-4)
42304: 42a7 clrl %sp@-
42306: 42a7 clrl %sp@-
42308: 2f2e 0008 movel %fp@(8),%sp@-
4230c: 4eb9 0004 26d2 jsr 426d2 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
42312: 4fef 0010 lea %sp@(16),%sp
42316: 4a80 tstl %d0
42318: 6600 00e2 bnew 423fc <rtems_bdpart_create+0x14c>
4231c: 224c moveal %a4,%a1
4231e: 4281 clrl %d1
42320: 91c8 subal %a0,%a0
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
42322: 2c19 movel %a1@+,%d6
42324: 2a06 movel %d6,%d5
42326: da88 addl %a0,%d5
if (dist_sum < prev_sum) {
42328: b1c5 cmpal %d5,%a0
4232a: 6306 blss 42332 <rtems_bdpart_create+0x82> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
4232c: 700a moveq #10,%d0 <== NOT EXECUTED
4232e: 6000 00cc braw 423fc <rtems_bdpart_create+0x14c> <== NOT EXECUTED
}
if (dist [i] == 0) {
42332: 4a86 tstl %d6
42334: 67f6 beqs 4232c <rtems_bdpart_create+0x7c> <== NEVER TAKEN
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
42336: 5281 addql #1,%d1
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
42338: 2045 moveal %d5,%a0
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
4233a: b681 cmpl %d1,%d3
4233c: 66e4 bnes 42322 <rtems_bdpart_create+0x72>
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
4233e: 4a92 tstl %a2@
42340: 6600 00b4 bnew 423f6 <rtems_bdpart_create+0x146>
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
42344: 4a04 tstb %d4
42346: 6710 beqs 42358 <rtems_bdpart_create+0xa8> <== NEVER TAKEN
disk_end -= (disk_end % record_space);
42348: 222e fffc movel %fp@(-4),%d1
4234c: 2e01 movel %d1,%d7
4234e: 4c42 7006 remul %d2,%d6,%d7
42352: 9286 subl %d6,%d1
42354: 2d41 fffc movel %d1,%fp@(-4)
/*
* In case we need an extended partition and logical partitions we have to
* account for the space of each EBR.
*/
if (count > 4) {
42358: 7204 moveq #4,%d1
4235a: b283 cmpl %d3,%d1
4235c: 640c bccs 4236a <rtems_bdpart_create+0xba> <== NEVER TAKEN
overhead += (count - 3) * record_space;
4235e: 2203 movel %d3,%d1
42360: 5781 subql #3,%d1
42362: 4c02 1800 mulsl %d2,%d1
42366: d282 addl %d2,%d1
42368: 6002 bras 4236c <rtems_bdpart_create+0xbc>
/*
* We need at least space for the MBR and the compatibility space for the
* first primary partition.
*/
overhead += record_space;
4236a: 2202 movel %d2,%d1 <== NOT EXECUTED
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
4236c: 4a04 tstb %d4
4236e: 670a beqs 4237a <rtems_bdpart_create+0xca> <== NEVER TAKEN
overhead += (count - 1) * record_space;
42370: 2803 movel %d3,%d4
42372: 5384 subql #1,%d4
42374: 4c02 4800 mulsl %d2,%d4
42378: d284 addl %d4,%d1
}
/* Check disk space */
if ((overhead + count) > disk_end) {
4237a: 2041 moveal %d1,%a0
4237c: d1c3 addal %d3,%a0
4237e: 246e fffc moveal %fp@(-4),%a2
42382: b5c8 cmpal %a0,%a2
42384: 6574 bcss 423fa <rtems_bdpart_create+0x14a> <== NEVER TAKEN
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
42386: 280a movel %a2,%d4
42388: 9881 subl %d1,%d4
4238a: 224b moveal %a3,%a1
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
}
/* Begin of first primary partition */
pos = record_space;
4238c: 2202 movel %d2,%d1
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
4238e: 91c8 subal %a0,%a0
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
42390: 2d44 fff4 movel %d4,%fp@(-12)
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
42394: 2e1c movel %a4@+,%d7
42396: 282e fff4 movel %fp@(-12),%d4
4239a: 4c07 4800 mulsl %d7,%d4
if (s < free_space || s < dist [i]) {
4239e: b8ae fff4 cmpl %fp@(-12),%d4
423a2: 6588 bcss 4232c <rtems_bdpart_create+0x7c> <== NEVER TAKEN
423a4: be84 cmpl %d4,%d7
423a6: 6284 bhis 4232c <rtems_bdpart_create+0x7c> <== NEVER TAKEN
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
423a8: 4c45 4004 remul %d5,%d4,%d4
/* Ensure that the partition is not empty */
if (s == 0) {
423ac: 6604 bnes 423b2 <rtems_bdpart_create+0x102> <== ALWAYS TAKEN
s = 1;
423ae: 183c 0001 moveb #1,%d4 <== NOT EXECUTED
}
/* Align partition upwards */
s += record_space - (s % record_space);
423b2: 2c04 movel %d4,%d6
423b4: d882 addl %d2,%d4
423b6: 4c42 6007 remul %d2,%d7,%d6
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
423ba: 7c04 moveq #4,%d6
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
423bc: 9887 subl %d7,%d4
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
423be: bc83 cmpl %d3,%d6
423c0: 6408 bccs 423ca <rtems_bdpart_create+0x11a> <== NEVER TAKEN
423c2: 7e02 moveq #2,%d7
423c4: be88 cmpl %a0,%d7
423c6: 6402 bccs 423ca <rtems_bdpart_create+0x11a>
pos += record_space;
423c8: d282 addl %d2,%d1
}
/* Partition begin and end */
p->begin = pos;
423ca: 2281 movel %d1,%a1@
pos += s;
423cc: d284 addl %d4,%d1
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
423ce: 5288 addql #1,%a0
}
/* Partition begin and end */
p->begin = pos;
pos += s;
p->end = pos;
423d0: 2341 0004 movel %d1,%a1@(4)
423d4: 43e9 0030 lea %a1@(48),%a1
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
423d8: b688 cmpl %a0,%d3
423da: 66b8 bnes 42394 <rtems_bdpart_create+0xe4>
pos += s;
p->end = pos;
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
423dc: 2208 movel %a0,%d1
423de: 5381 subql #1,%d1
423e0: 2401 movel %d1,%d2
423e2: ed89 lsll #6,%d1
423e4: e98a lsll #4,%d2
423e6: 9282 subl %d2,%d1
423e8: 278a 1804 movel %a2,%a3@(00000004,%d1:l)
423ec: 600e bras 423fc <rtems_bdpart_create+0x14c>
size_t i = 0;
/* Check if we have something to do */
if (count == 0) {
/* Nothing to do */
return RTEMS_SUCCESSFUL;
423ee: 4280 clrl %d0 <== NOT EXECUTED
423f0: 600a bras 423fc <rtems_bdpart_create+0x14c> <== NOT EXECUTED
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
return RTEMS_INVALID_ADDRESS;
423f2: 7009 moveq #9,%d0 <== NOT EXECUTED
423f4: 6006 bras 423fc <rtems_bdpart_create+0x14c> <== NOT EXECUTED
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
return RTEMS_NOT_IMPLEMENTED;
423f6: 7018 moveq #24,%d0 <== NOT EXECUTED
423f8: 6002 bras 423fc <rtems_bdpart_create+0x14c> <== NOT EXECUTED
overhead += (count - 1) * record_space;
}
/* Check disk space */
if ((overhead + count) > disk_end) {
return RTEMS_IO_ERROR;
423fa: 701b moveq #27,%d0 <== NOT EXECUTED
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
return RTEMS_SUCCESSFUL;
}
423fc: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
42402: 4e5e unlk %fp
...
00042408 <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
42408: 4e56 ffa8 linkw %fp,#-88
4240c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
size_t i = 0;
printf(
42410: 4879 0005 f877 pea 5f877 <map.6766+0x41>
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
42416: 2a0e movel %fp,%d5
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
42418: 240e movel %fp,%d2
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
4241a: 4283 clrl %d3
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
4241c: 0685 ffff ffcb addil #-53,%d5
42422: 47f9 0004 26a4 lea 426a4 <rtems_bdpart_to_mbr_partition_type>,%a3
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
42428: 0682 ffff ffcc addil #-52,%d2
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
4242e: 49f9 0004 bc06 lea 4bc06 <uuid_unparse_lower>,%a4
break;
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
42434: 4bf9 0005 1cc8 lea 51cc8 <snprintf>,%a5
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
size_t i = 0;
printf(
4243a: 4eb9 0005 1a38 jsr 51a38 <puts>
42440: 246e 0008 moveal %fp@(8),%a2
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
42444: 588f addql #4,%sp
42446: 6000 00c6 braw 4250e <rtems_bdpart_dump+0x106>
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
4244a: 2f05 movel %d5,%sp@-
4244c: 280a movel %a2,%d4
4244e: 5084 addql #8,%d4
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
42450: 4200 clrb %d0
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
42452: 2f04 movel %d4,%sp@-
for (i = 0; i < count; ++i) {
const rtems_bdpart_partition *p = pt + i;
const char *type = NULL;
char type_buffer [52];
uint8_t type_mbr = 0;
42454: 1d40 ffcb moveb %d0,%fp@(-53)
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
42458: 4e93 jsr %a3@
4245a: 508f addql #8,%sp
4245c: 4a00 tstb %d0
4245e: 677e beqs 424de <rtems_bdpart_dump+0xd6> <== NEVER TAKEN
switch (type_mbr) {
42460: 4280 clrl %d0
42462: 780b moveq #11,%d4
42464: 122e ffcb moveb %fp@(-53),%d1
42468: 1001 moveb %d1,%d0
4246a: b880 cmpl %d0,%d4
4246c: 673c beqs 424aa <rtems_bdpart_dump+0xa2> <== ALWAYS TAKEN
4246e: 6512 bcss 42482 <rtems_bdpart_dump+0x7a> <== NOT EXECUTED
42470: 183c 0001 moveb #1,%d4 <== NOT EXECUTED
42474: b880 cmpl %d0,%d4 <== NOT EXECUTED
42476: 6722 beqs 4249a <rtems_bdpart_dump+0x92> <== NOT EXECUTED
42478: 183c 0004 moveb #4,%d4 <== NOT EXECUTED
4247c: b880 cmpl %d0,%d4 <== NOT EXECUTED
4247e: 6642 bnes 424c2 <rtems_bdpart_dump+0xba> <== NOT EXECUTED
42480: 6068 bras 424ea <rtems_bdpart_dump+0xe2> <== NOT EXECUTED
42482: 780e moveq #14,%d4 <== NOT EXECUTED
42484: b880 cmpl %d0,%d4 <== NOT EXECUTED
42486: 671a beqs 424a2 <rtems_bdpart_dump+0x9a> <== NOT EXECUTED
42488: 0c80 0000 00da cmpil #218,%d0 <== NOT EXECUTED
4248e: 672a beqs 424ba <rtems_bdpart_dump+0xb2> <== NOT EXECUTED
42490: 183c 000c moveb #12,%d4 <== NOT EXECUTED
42494: b880 cmpl %d0,%d4 <== NOT EXECUTED
42496: 662a bnes 424c2 <rtems_bdpart_dump+0xba> <== NOT EXECUTED
42498: 6018 bras 424b2 <rtems_bdpart_dump+0xaa> <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
4249a: 203c 0005 f84e movel #391246,%d0 <== NOT EXECUTED
424a0: 604e bras 424f0 <rtems_bdpart_dump+0xe8> <== NOT EXECUTED
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
break;
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
424a2: 203c 0005 f86c movel #391276,%d0 <== NOT EXECUTED
break;
424a8: 6046 bras 424f0 <rtems_bdpart_dump+0xe8> <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
424aa: 203c 0005 f865 movel #391269,%d0
break;
424b0: 603e bras 424f0 <rtems_bdpart_dump+0xe8>
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
424b2: 203c 0005 f85a movel #391258,%d0 <== NOT EXECUTED
break;
424b8: 6036 bras 424f0 <rtems_bdpart_dump+0xe8> <== NOT EXECUTED
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
424ba: 203c 0005 f855 movel #391253,%d0 <== NOT EXECUTED
break;
424c0: 602e bras 424f0 <rtems_bdpart_dump+0xe8> <== NOT EXECUTED
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
424c2: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
424c8: 2f01 movel %d1,%sp@- <== NOT EXECUTED
424ca: 4879 0005 f9b7 pea 5f9b7 <map.6766+0x181> <== NOT EXECUTED
424d0: 4878 0034 pea 34 <OPER2+0x20> <== NOT EXECUTED
424d4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
424d6: 4e95 jsr %a5@ <== NOT EXECUTED
type = type_buffer;
break;
424d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
424dc: 6008 bras 424e6 <rtems_bdpart_dump+0xde> <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
424de: 2f02 movel %d2,%sp@- <== NOT EXECUTED
424e0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
424e2: 4e94 jsr %a4@ <== NOT EXECUTED
424e4: 508f addql #8,%sp <== NOT EXECUTED
type = type_buffer;
break;
}
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
424e6: 2002 movel %d2,%d0 <== NOT EXECUTED
424e8: 6006 bras 424f0 <rtems_bdpart_dump+0xe8> <== NOT EXECUTED
switch (type_mbr) {
case RTEMS_BDPART_MBR_FAT_12:
type = "FAT 12";
break;
case RTEMS_BDPART_MBR_FAT_16:
type = "FAT 16";
424ea: 203c 0005 f847 movel #391239,%d0 <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
424f0: 2f00 movel %d0,%sp@-
424f2: 2f2a 0004 movel %a2@(4),%sp@-
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
424f6: 5283 addql #1,%d3
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
424f8: 2f12 movel %a2@,%sp@-
424fa: 45ea 0030 lea %a2@(48),%a2
424fe: 4879 0005 f9be pea 5f9be <map.6766+0x188>
42504: 4eb9 0005 1974 jsr 51974 <printf>
4250a: 4fef 0010 lea %sp@(16),%sp
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
4250e: b6ae 000c cmpl %fp@(12),%d3
42512: 6600 ff36 bnew 4244a <rtems_bdpart_dump+0x42>
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
42516: 4879 0005 f967 pea 5f967 <map.6766+0x131>
4251c: 4eb9 0005 1a38 jsr 51a38 <puts>
42522: 588f addql #4,%sp
}
42524: 4cee 3c3c ffa8 moveml %fp@(-88),%d2-%d5/%a2-%a5
4252a: 4e5e unlk %fp
...
000426d2 <rtems_bdpart_get_disk_data>:
const char *disk_name,
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
426d2: 4e56 ffec linkw %fp,#-20
426d6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
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);
426da: 4878 0002 pea 2 <DOUBLE_FLOAT>
426de: 2f2e 0008 movel %fp@(8),%sp@-
const char *disk_name,
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
426e2: 246e 000c moveal %fp@(12),%a2
426e6: 266e 0010 moveal %fp@(16),%a3
rtems_status_code sc = RTEMS_SUCCESSFUL;
int rv = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
426ea: 42ae fffc clrl %fp@(-4)
rtems_blkdev_bnum disk_begin = 0;
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
426ee: 4eb9 0004 5630 jsr 45630 <open>
if (fd < 0) {
426f4: 508f addql #8,%sp
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);
426f6: 2600 movel %d0,%d3
if (fd < 0) {
426f8: 6d56 blts 42750 <rtems_bdpart_get_disk_data+0x7e><== NEVER TAKEN
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
426fa: 486e fffc pea %fp@(-4)
426fe: 2f3c 4004 4209 movel #1074020873,%sp@-
42704: 2f00 movel %d0,%sp@-
42706: 4eb9 0004 4a28 jsr 44a28 <ioctl>
goto error;
}
/* Get disk handle */
rv = rtems_disk_fd_get_disk_device( fd, &dd);
if (rv != 0) {
4270c: 4fef 000c lea %sp@(12),%sp
42710: 4a80 tstl %d0
42712: 663c bnes 42750 <rtems_bdpart_get_disk_data+0x7e><== NEVER TAKEN
sc = RTEMS_INVALID_NAME;
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
42714: 206e fffc moveal %fp@(-4),%a0
*disk_end = dd->size;
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
42718: 223c 0000 01ff movel #511,%d1
sc = RTEMS_INVALID_NAME;
goto error;
}
/* Get disk begin, end and block size */
disk_begin = dd->start;
4271e: 2028 0018 movel %a0@(24),%d0
*disk_end = dd->size;
42722: 226e 0014 moveal %fp@(20),%a1
42726: 22a8 001c movel %a0@(28),%a1@
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
4272a: b2a8 0024 cmpl %a0@(36),%d1
4272e: 6424 bccs 42754 <rtems_bdpart_get_disk_data+0x82><== NEVER TAKEN
sc = RTEMS_IO_ERROR;
goto error;
}
/* Check that we have do not have a logical disk */
if (disk_begin != 0) {
42730: 4a80 tstl %d0
42732: 6620 bnes 42754 <rtems_bdpart_get_disk_data+0x82><== NEVER TAKEN
42734: 6022 bras 42758 <rtems_bdpart_get_disk_data+0x86>
goto error;
}
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
42736: 4a8b tstl %a3
42738: 6708 beqs 42742 <rtems_bdpart_get_disk_data+0x70><== NEVER TAKEN
*fd_ptr = fd;
4273a: 2483 movel %d3,%a2@
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
4273c: 4282 clrl %d2
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
*fd_ptr = fd;
*dd_ptr = dd;
4273e: 2688 movel %a0,%a3@
42740: 601c bras 4275e <rtems_bdpart_get_disk_data+0x8c>
int *fd_ptr,
rtems_disk_device **dd_ptr,
rtems_blkdev_bnum *disk_end
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
42742: 4282 clrl %d2
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
*fd_ptr = fd;
*dd_ptr = dd;
} else {
close( fd);
42744: 2f03 movel %d3,%sp@-
42746: 4eb9 0004 45d0 jsr 445d0 <close>
4274c: 588f addql #4,%sp
4274e: 600e bras 4275e <rtems_bdpart_get_disk_data+0x8c>
rtems_blkdev_bnum block_size = 0;
/* Open device file */
fd = open( disk_name, O_RDWR);
if (fd < 0) {
sc = RTEMS_INVALID_NAME;
42750: 7403 moveq #3,%d2 <== NOT EXECUTED
42752: 60f0 bras 42744 <rtems_bdpart_get_disk_data+0x72><== NOT EXECUTED
*disk_end = dd->size;
block_size = dd->block_size;
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
sc = RTEMS_IO_ERROR;
42754: 741b moveq #27,%d2 <== NOT EXECUTED
42756: 60ec bras 42744 <rtems_bdpart_get_disk_data+0x72><== NOT EXECUTED
goto error;
}
error:
if (sc == RTEMS_SUCCESSFUL && fd_ptr != NULL && dd_ptr != NULL) {
42758: 4a8a tstl %a2
4275a: 66da bnes 42736 <rtems_bdpart_get_disk_data+0x64>
4275c: 60e4 bras 42742 <rtems_bdpart_get_disk_data+0x70>
} else {
close( fd);
}
return sc;
}
4275e: 2002 movel %d2,%d0
42760: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
42766: 4e5e unlk %fp <== NOT EXECUTED
0005b8a4 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5b8a4: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED
5b8a8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5b8ac: 4878 002f pea 2f <OPER2+0x1b> <== 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);
5b8b0: 49f9 0007 3bd0 lea 73bd0 <strlen>,%a4 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5b8b6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5b8ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5b8bc: 2c2e 0014 movel %fp@(20),%d6 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5b8c0: 4eb9 0007 4a6c jsr 74a6c <strrchr> <== NOT EXECUTED
5b8c6: 508f addql #8,%sp <== NOT EXECUTED
5b8c8: 2800 movel %d0,%d4 <== 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);
5b8ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5b8cc: 4e94 jsr %a4@ <== NOT EXECUTED
5b8ce: 2640 moveal %d0,%a3 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
5b8d0: 2e86 movel %d6,%sp@ <== NOT EXECUTED
5b8d2: 4e94 jsr %a4@ <== NOT EXECUTED
5b8d4: 588f addql #4,%sp <== NOT EXECUTED
5b8d6: 2600 movel %d0,%d3 <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
5b8d8: 486b 0004 pea %a3@(4) <== NOT EXECUTED
5b8dc: 4eb9 0004 2b68 jsr 42b68 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
5b8e2: 588f addql #4,%sp <== NOT EXECUTED
size_t disk_name_size = strlen( disk_name);
size_t mount_base_size = strlen( mount_base);
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
5b8e4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (logical_disk_name == NULL) {
5b8e6: 6700 0106 beqw 5b9ee <rtems_bdpart_mount+0x14a> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
5b8ea: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5b8ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5b8ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5b8f0: 4eb9 0007 3d7c jsr 73d7c <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
5b8f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5b8fa: 4a84 tstl %d4 <== NOT EXECUTED
5b8fc: 670c beqs 5b90a <rtems_bdpart_mount+0x66> <== NOT EXECUTED
disk_file_name += 1;
5b8fe: 5284 addql #1,%d4 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
5b900: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5b902: 4e94 jsr %a4@ <== NOT EXECUTED
5b904: 588f addql #4,%sp <== NOT EXECUTED
5b906: 2a00 movel %d0,%d5 <== NOT EXECUTED
5b908: 6004 bras 5b90e <rtems_bdpart_mount+0x6a> <== NOT EXECUTED
} else {
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
5b90a: 2a0b movel %a3,%d5 <== 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;
5b90c: 280a movel %a2,%d4 <== NOT EXECUTED
disk_file_name_size = disk_name_size;
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
5b90e: 2a45 moveal %d5,%a5 <== NOT EXECUTED
5b910: dbc3 addal %d3,%a5 <== NOT EXECUTED
5b912: 486d 0005 pea %a5@(5) <== NOT EXECUTED
5b916: 4eb9 0004 2b68 jsr 42b68 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
5b91c: 588f addql #4,%sp <== 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);
5b91e: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (mount_point == NULL) {
5b920: 4a80 tstl %d0 <== NOT EXECUTED
5b922: 6700 00ae beqw 5b9d2 <rtems_bdpart_mount+0x12e> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5b926: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5b928: 49f9 0007 3d7c lea 73d7c <strncpy>,%a4 <== NOT EXECUTED
5b92e: 2f06 movel %d6,%sp@- <== NOT EXECUTED
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;
5b930: 47f3 2800 lea %a3@(00000000,%d2:l),%a3 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
5b934: 2c3c 0004 2d50 movel #273744,%d6 <== NOT EXECUTED
"msdos",
0,
NULL
);
if (rv != 0) {
rmdir( mount_point);
5b93a: 2e3c 0005 ec50 movel #388176,%d7 <== NOT EXECUTED
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5b940: 2f00 movel %d0,%sp@- <== NOT EXECUTED
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;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
5b942: 4bf2 d801 lea %a2@(00000001,%a5:l),%a5 <== NOT EXECUTED
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5b946: 4e94 jsr %a4@ <== NOT EXECUTED
mount_point [mount_base_size] = '/';
5b948: 702f moveq #47,%d0 <== NOT EXECUTED
5b94a: 1580 3800 moveb %d0,%a2@(00000000,%d3:l) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5b94e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
5b950: 2a3c 0005 ecf8 movel #388344,%d5 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5b956: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5b958: 4872 3801 pea %a2@(00000001,%d3:l) <== NOT EXECUTED
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5b95c: 283c 0007 2f94 movel #470932,%d4 <== 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) {
5b962: 4283 clrl %d3 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5b964: 4e94 jsr %a4@ <== 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) {
5b966: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5b96a: 605c bras 5b9c8 <rtems_bdpart_mount+0x124> <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5b96c: 5283 addql #1,%d3 <== NOT EXECUTED
5b96e: 2044 moveal %d4,%a0 <== NOT EXECUTED
5b970: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5b972: 4879 0008 e2f6 pea 8e2f6 <e2a_32V+0x2a3> <== NOT EXECUTED
5b978: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5b97c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5b97e: 4e90 jsr %a0@ <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
5b980: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5b984: 7203 moveq #3,%d1 <== NOT EXECUTED
5b986: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b988: 6d4c blts 5b9d6 <rtems_bdpart_mount+0x132> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
5b98a: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5b98e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5b990: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5b992: 4e94 jsr %a4@ <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
5b994: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> <== NOT EXECUTED
5b998: 2045 moveal %d5,%a0 <== NOT EXECUTED
5b99a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5b99c: 4e90 jsr %a0@ <== NOT EXECUTED
if (rv != 0) {
5b99e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5b9a2: 4a80 tstl %d0 <== NOT EXECUTED
5b9a4: 6634 bnes 5b9da <rtems_bdpart_mount+0x136> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
5b9a6: 42a7 clrl %sp@- <== NOT EXECUTED
5b9a8: 2046 moveal %d6,%a0 <== NOT EXECUTED
5b9aa: 42a7 clrl %sp@- <== NOT EXECUTED
5b9ac: 4879 0008 cad3 pea 8cad3 <rtems_rtc_shell_usage+0x199f> <== NOT EXECUTED
5b9b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5b9b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5b9b6: 4e90 jsr %a0@ <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
5b9b8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5b9bc: 4a80 tstl %d0 <== NOT EXECUTED
5b9be: 6708 beqs 5b9c8 <rtems_bdpart_mount+0x124> <== NOT EXECUTED
rmdir( mount_point);
5b9c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5b9c2: 2047 moveal %d7,%a0 <== NOT EXECUTED
5b9c4: 4e90 jsr %a0@ <== NOT EXECUTED
5b9c6: 588f addql #4,%sp <== 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) {
5b9c8: b6ae 0010 cmpl %fp@(16),%d3 <== NOT EXECUTED
5b9cc: 669e bnes 5b96c <rtems_bdpart_mount+0xc8> <== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
5b9ce: 4283 clrl %d3 <== NOT EXECUTED
5b9d0: 600a bras 5b9dc <rtems_bdpart_mount+0x138> <== NOT EXECUTED
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
5b9d2: 761a moveq #26,%d3 <== NOT EXECUTED
5b9d4: 6006 bras 5b9dc <rtems_bdpart_mount+0x138> <== 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;
5b9d6: 7603 moveq #3,%d3 <== NOT EXECUTED
5b9d8: 6002 bras 5b9dc <rtems_bdpart_mount+0x138> <== 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;
5b9da: 761b moveq #27,%d3 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
5b9dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5b9de: 47f9 0004 2898 lea 42898 <free>,%a3 <== NOT EXECUTED
5b9e4: 4e93 jsr %a3@ <== NOT EXECUTED
free( mount_point);
5b9e6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5b9e8: 4e93 jsr %a3@ <== NOT EXECUTED
return esc;
5b9ea: 508f addql #8,%sp <== NOT EXECUTED
5b9ec: 6002 bras 5b9f0 <rtems_bdpart_mount+0x14c> <== 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;
5b9ee: 761a moveq #26,%d3 <== NOT EXECUTED
free( logical_disk_name);
free( mount_point);
return esc;
}
5b9f0: 2003 movel %d3,%d0 <== NOT EXECUTED
5b9f2: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5b9f8: 4e5e unlk %fp <== NOT EXECUTED
00042b78 <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
42b78: 4e56 0000 linkw %fp,#0
42b7c: 2f0a movel %a2,%sp@-
42b7e: 246e 0010 moveal %fp@(16),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
42b82: 2012 movel %a2@,%d0
static rtems_status_code rtems_bdpart_new_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
42b84: 2f02 movel %d2,%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
42b86: 4a80 tstl %d0
42b88: 661a bnes 42ba4 <rtems_bdpart_new_record+0x2c>
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( dd, index, block);
42b8a: 2f0a movel %a2,%sp@-
42b8c: 2f2e 000c movel %fp@(12),%sp@-
42b90: 2f2e 0008 movel %fp@(8),%sp@-
42b94: 4eb9 0004 d604 jsr 4d604 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL) {
42b9a: 4fef 000c lea %sp@(12),%sp
return sc;
}
}
/* Read the new record block (this accounts for disk block sizes > 512) */
sc = rtems_bdbuf_read( dd, index, block);
42b9e: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
42ba0: 6712 beqs 42bb4 <rtems_bdpart_new_record+0x3c> <== ALWAYS TAKEN
42ba2: 6046 bras 42bea <rtems_bdpart_new_record+0x72> <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_sync( *block);
42ba4: 2f00 movel %d0,%sp@-
42ba6: 4eb9 0004 d88e jsr 4d88e <rtems_bdbuf_sync>
if (sc != RTEMS_SUCCESSFUL) {
42bac: 588f addql #4,%sp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_sync( *block);
42bae: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
42bb0: 67d8 beqs 42b8a <rtems_bdpart_new_record+0x12> <== ALWAYS TAKEN
42bb2: 6036 bras 42bea <rtems_bdpart_new_record+0x72> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
42bb4: 2052 moveal %a2@,%a0
42bb6: 4a88 tstl %a0
42bb8: 672e beqs 42be8 <rtems_bdpart_new_record+0x70> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
42bba: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
42bbe: 42a7 clrl %sp@-
42bc0: 2f28 001a movel %a0@(26),%sp@-
42bc4: 4eb9 0005 18e8 jsr 518e8 <memset>
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
42bca: 2052 moveal %a2@,%a0
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
42bcc: 4fef 000c lea %sp@(12),%sp
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
42bd0: 2068 001a moveal %a0@(26),%a0
42bd4: 7055 moveq #85,%d0
42bd6: 1140 01fe moveb %d0,%a0@(510)
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
42bda: 70aa moveq #-86,%d0
42bdc: 2052 moveal %a2@,%a0
42bde: 2068 001a moveal %a0@(26),%a0
42be2: 1140 01ff moveb %d0,%a0@(511)
42be6: 6002 bras 42bea <rtems_bdpart_new_record+0x72>
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
42be8: 7409 moveq #9,%d2 <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
42bea: 2002 movel %d2,%d0
42bec: 242e fff8 movel %fp@(-8),%d2
42bf0: 246e fffc moveal %fp@(-4),%a2
42bf4: 4e5e unlk %fp <== NOT EXECUTED
0004276a <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
4276a: 4e56 ffc0 linkw %fp,#-64
4276e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42772: 282e 0010 movel %fp@(16),%d4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
rtems_bdpart_partition *p = pt - 1;
42776: 2044 moveal %d4,%a0
42778: 41e8 ffd0 lea %a0@(-48),%a0
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
4277c: 266e 000c moveal %fp@(12),%a3
42780: 246e 0014 moveal %fp@(20),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
42784: 42ae ffe8 clrl %fp@(-24)
rtems_bdpart_partition *p = pt - 1;
42788: 2d48 ffec movel %a0,%fp@(-20)
const rtems_bdpart_partition *p_end = pt + (count != NULL ? *count : 0);
4278c: 4a8a tstl %a2
4278e: 670c beqs 4279c <rtems_bdpart_read+0x32> <== NEVER TAKEN
42790: 2612 movel %a2@,%d3
42792: 2003 movel %d3,%d0
42794: ed8b lsll #6,%d3
42796: e988 lsll #4,%d0
42798: 9680 subl %d0,%d3
4279a: 6002 bras 4279e <rtems_bdpart_read+0x34>
4279c: 4283 clrl %d3 <== NOT EXECUTED
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;
4279e: 70ff moveq #-1,%d0
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 */
427a0: 42ae fff0 clrl %fp@(-16)
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
427a4: 42ae fff4 clrl %fp@(-12)
size_t i = 0;
const uint8_t *data = NULL;
int fd = -1;
427a8: 2d40 fff8 movel %d0,%fp@(-8)
rtems_disk_device *dd = NULL;
427ac: 42ae fffc clrl %fp@(-4)
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
427b0: 4a8b tstl %a3
427b2: 6700 01cc beqw 42980 <rtems_bdpart_read+0x216>
427b6: 4a84 tstl %d4
427b8: 6700 01c6 beqw 42980 <rtems_bdpart_read+0x216>
427bc: 4a8a tstl %a2
427be: 6700 01c0 beqw 42980 <rtems_bdpart_read+0x216>
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
427c2: 4292 clrl %a2@
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
427c4: 486e fff4 pea %fp@(-12)
427c8: 486e fffc pea %fp@(-4)
427cc: 486e fff8 pea %fp@(-8)
427d0: 2f2e 0008 movel %fp@(8),%sp@-
427d4: 4eb9 0004 26d2 jsr 426d2 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
427da: 4fef 0010 lea %sp@(16),%sp
427de: 4a80 tstl %d0
427e0: 6600 01a4 bnew 42986 <rtems_bdpart_read+0x21c>
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( dd, 0, &block);
427e4: 486e ffe8 pea %fp@(-24)
427e8: 42a7 clrl %sp@-
427ea: 2f2e fffc movel %fp@(-4),%sp@-
427ee: 4eba fd66 jsr %pc@(42556 <rtems_bdpart_read_record>)
if (sc != RTEMS_SUCCESSFUL) {
427f2: 4fef 000c lea %sp@(12),%sp
427f6: 4a80 tstl %d0
427f8: 6600 0162 bnew 4295c <rtems_bdpart_read+0x1f2>
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
427fc: 206e ffe8 moveal %fp@(-24),%a0
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
42800: 2e0e movel %fp,%d7
42802: 0687 ffff fff0 addil #-16,%d7
{
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);
42808: 2a04 movel %d4,%d5
4280a: da83 addl %d3,%d5
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
4280c: 2c0e movel %fp,%d6
4280e: 0686 ffff ffec addil #-20,%d6
42814: 49fa fde4 lea %pc@(425fa <rtems_bdpart_read_mbr_partition>),%a4
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
42818: 2a68 001a moveal %a0@(26),%a5
4281c: 260d movel %a5,%d3
4281e: 0683 0000 01be addil #446,%d3
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
42824: 2f07 movel %d7,%sp@-
42826: 2f05 movel %d5,%sp@-
42828: 2f06 movel %d6,%sp@-
4282a: 2f03 movel %d3,%sp@-
4282c: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
4282e: 4fef 0010 lea %sp@(16),%sp
42832: 4a80 tstl %d0
42834: 6600 0126 bnew 4295c <rtems_bdpart_read+0x1f2>
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
}
42838: 206e ffec moveal %fp@(-20),%a0
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) {
4283c: 4280 clrl %d0
4283e: 1028 0008 moveb %a0@(8),%d0
42842: 0c80 0000 00ee cmpil #238,%d0
42848: 6700 010e beqw 42958 <rtems_bdpart_read+0x1ee>
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
4284c: 206e ffe8 moveal %fp@(-24),%a0
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
42850: 4bed 01ee lea %a5@(494),%a5
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
42854: 4293 clrl %a3@
format->mbr.disk_id = rtems_uint32_from_little_endian(
42856: 2068 001a moveal %a0@(26),%a0
4285a: 41e8 01b8 lea %a0@(440),%a0
4285e: 2f08 movel %a0,%sp@-
42860: 4eba fcce jsr %pc@(42530 <rtems_uint32_from_little_endian>)
42864: 588f addql #4,%sp
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
42866: 7201 moveq #1,%d1
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
42868: 2740 0004 movel %d0,%a3@(4)
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
4286c: 1741 0008 moveb %d1,%a3@(8)
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
42870: 2f07 movel %d7,%sp@-
);
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;
42872: 0683 0000 0010 addil #16,%d3
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
42878: 2f05 movel %d5,%sp@-
4287a: 2f06 movel %d6,%sp@-
4287c: 2f03 movel %d3,%sp@-
4287e: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
42880: 4fef 0010 lea %sp@(16),%sp
42884: 4a80 tstl %d0
42886: 6600 00d4 bnew 4295c <rtems_bdpart_read+0x1f2>
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) {
4288a: bbc3 cmpal %d3,%a5
4288c: 66e2 bnes 42870 <rtems_bdpart_read+0x106>
ebr = ep_begin;
while (ebr != 0) {
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( dd, ebr, &block);
4288e: 2c0e movel %fp,%d6
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
42890: 2e0e movel %fp,%d7
ebr = ep_begin;
while (ebr != 0) {
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( dd, ebr, &block);
42892: 0686 ffff ffe8 addil #-24,%d6
42898: 47fa fcbc lea %pc@(42556 <rtems_bdpart_read_record>),%a3
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
4289c: 0687 ffff ffec addil #-20,%d7
428a2: 49fa fd56 lea %pc@(425fa <rtems_bdpart_read_mbr_partition>),%a4
== RTEMS_BDPART_MBR_SIGNATURE_1;
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
428a6: 4bfa fc88 lea %pc@(42530 <rtems_uint32_from_little_endian>),%a5
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
428aa: 262e fff0 movel %fp@(-16),%d3
while (ebr != 0) {
428ae: 6000 0088 braw 42938 <rtems_bdpart_read+0x1ce>
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( dd, ebr, &block);
428b2: 2f06 movel %d6,%sp@-
428b4: 2f03 movel %d3,%sp@-
428b6: 2f2e fffc movel %fp@(-4),%sp@-
428ba: 4e93 jsr %a3@
if (sc != RTEMS_SUCCESSFUL) {
428bc: 4fef 000c lea %sp@(12),%sp
428c0: 4a80 tstl %d0
428c2: 6600 0098 bnew 4295c <rtems_bdpart_read+0x1f2>
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
428c6: 42a7 clrl %sp@-
428c8: 206e ffe8 moveal %fp@(-24),%a0
428cc: 2f05 movel %d5,%sp@-
428ce: 2f07 movel %d7,%sp@-
428d0: 2068 001a moveal %a0@(26),%a0
428d4: 41e8 01be lea %a0@(446),%a0
428d8: 2f08 movel %a0,%sp@-
428da: 4e94 jsr %a4@
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
428dc: 4fef 0010 lea %sp@(16),%sp
428e0: 4a80 tstl %d0
428e2: 6678 bnes 4295c <rtems_bdpart_read+0x1f2> <== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
428e4: 206e ffec moveal %fp@(-20),%a0
428e8: 2003 movel %d3,%d0
428ea: 2210 movel %a0@,%d1
428ec: d081 addl %d1,%d0
if (tmp > p->begin) {
428ee: b280 cmpl %d0,%d1
428f0: 6504 bcss 428f6 <rtems_bdpart_read+0x18c> <== ALWAYS TAKEN
p->begin = tmp;
} else {
esc = RTEMS_IO_ERROR;
428f2: 741b moveq #27,%d2 <== NOT EXECUTED
428f4: 6068 bras 4295e <rtems_bdpart_read+0x1f4> <== NOT EXECUTED
}
/* Adjust partition begin */
tmp = p->begin + ebr;
if (tmp > p->begin) {
p->begin = tmp;
428f6: 2080 movel %d0,%a0@
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
428f8: 2028 0004 movel %a0@(4),%d0
428fc: d680 addl %d0,%d3
if (tmp > p->end) {
428fe: b083 cmpl %d3,%d0
42900: 64f0 bccs 428f2 <rtems_bdpart_read+0x188> <== NEVER TAKEN
p->end = tmp;
42902: 2143 0004 movel %d3,%a0@(4)
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
42906: 206e ffe8 moveal %fp@(-24),%a0
4290a: 2428 001a movel %a0@(26),%d2
== RTEMS_BDPART_MBR_SIGNATURE_1;
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
4290e: 2042 moveal %d2,%a0
42910: 4868 01d6 pea %a0@(470)
42914: 4e95 jsr %a5@
42916: 588f addql #4,%sp
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
42918: 2042 moveal %d2,%a0
== RTEMS_BDPART_MBR_SIGNATURE_1;
}
static rtems_blkdev_bnum rtems_bdpart_next_ebr( const uint8_t *data)
{
rtems_blkdev_bnum begin =
4291a: 2600 movel %d0,%d3
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
4291c: 4280 clrl %d0
4291e: 1028 01d2 moveb %a0@(466),%d0
42922: 7205 moveq #5,%d1
42924: b280 cmpl %d0,%d1
42926: 6616 bnes 4293e <rtems_bdpart_read+0x1d4>
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_1
);
if (ebr != 0) {
42928: 4a83 tstl %d3
4292a: 6712 beqs 4293e <rtems_bdpart_read+0x1d4> <== NEVER TAKEN
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
4292c: 2003 movel %d3,%d0
4292e: d0ae fff0 addl %fp@(-16),%d0
if (tmp > ebr) {
42932: b680 cmpl %d0,%d3
42934: 64bc bccs 428f2 <rtems_bdpart_read+0x188> <== NEVER TAKEN
42936: 2600 movel %d0,%d3
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
42938: 4a83 tstl %d3
4293a: 6600 ff76 bnew 428b2 <rtems_bdpart_read+0x148>
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
4293e: 202e ffec movel %fp@(-20),%d0
42942: 9084 subl %d4,%d0
42944: e880 asrl #4,%d0
42946: 223c aaaa aaab movel #-1431655765,%d1
4294c: 4c01 0800 mulsl %d1,%d0
rtems_bdpart_partition *pt,
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
42950: 4282 clrl %d2
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
42952: 5280 addql #1,%d0
42954: 2480 movel %d0,%a2@
42956: 6006 bras 4295e <rtems_bdpart_read+0x1f4>
goto cleanup;
}
/* Determine if we have a MBR or GPT format */
if (rtems_bdpart_mbr_partition_type( p->type) == RTEMS_BDPART_MBR_GPT) {
esc = RTEMS_NOT_IMPLEMENTED;
42958: 7418 moveq #24,%d2 <== NOT EXECUTED
4295a: 6002 bras 4295e <rtems_bdpart_read+0x1f4> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
4295c: 2400 movel %d0,%d2 <== NOT EXECUTED
/* Return partition count */
*count = (size_t) (p - pt + 1);
cleanup:
if (fd >= 0) {
4295e: 202e fff8 movel %fp@(-8),%d0
42962: 6d0a blts 4296e <rtems_bdpart_read+0x204> <== NEVER TAKEN
close( fd);
42964: 2f00 movel %d0,%sp@-
42966: 4eb9 0004 45d0 jsr 445d0 <close>
4296c: 588f addql #4,%sp
}
if (block != NULL) {
4296e: 202e ffe8 movel %fp@(-24),%d0
42972: 6710 beqs 42984 <rtems_bdpart_read+0x21a> <== NEVER TAKEN
rtems_bdbuf_release( block);
42974: 2f00 movel %d0,%sp@-
42976: 4eb9 0004 d790 jsr 4d790 <rtems_bdbuf_release>
4297c: 588f addql #4,%sp
4297e: 6004 bras 42984 <rtems_bdpart_read+0x21a>
int fd = -1;
rtems_disk_device *dd = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
return RTEMS_INVALID_ADDRESS;
42980: 7009 moveq #9,%d0 <== NOT EXECUTED
42982: 6002 bras 42986 <rtems_bdpart_read+0x21c> <== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_release( block);
}
return esc;
42984: 2002 movel %d2,%d0
}
42986: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5
4298c: 4e5e unlk %fp <== NOT EXECUTED
000425fa <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
425fa: 4e56 ffe8 linkw %fp,#-24
425fe: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
42602: 246e 0008 moveal %fp@(8),%a2
rtems_blkdev_bnum begin =
42606: 486a 0008 pea %a2@(8)
4260a: 4bfa ff24 lea %pc@(42530 <rtems_uint32_from_little_endian>),%a5
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
4260e: 266e 000c moveal %fp@(12),%a3
rtems_blkdev_bnum begin =
42612: 4e95 jsr %a5@
42614: 588f addql #4,%sp
42616: 2400 movel %d0,%d2
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
42618: 486a 000c pea %a2@(12)
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
4261c: 286e 0014 moveal %fp@(20),%a4
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
42620: 4e95 jsr %a5@
42622: 588f addql #4,%sp
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];
42624: 162a 0004 moveb %a2@(4),%d3
if (type == RTEMS_BDPART_MBR_EMPTY) {
42628: 676e beqs 42698 <rtems_bdpart_read_mbr_partition+0x9e><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
4262a: 2213 movel %a3@,%d1
4262c: b2ae 0010 cmpl %fp@(16),%d1
42630: 675e beqs 42690 <rtems_bdpart_read_mbr_partition+0x96><== NEVER TAKEN
{
rtems_blkdev_bnum begin =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
rtems_blkdev_bnum size =
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
42632: 2a40 moveal %d0,%a5
42634: dbc2 addal %d2,%a5
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
42636: bbc2 cmpal %d2,%a5
42638: 635a blss 42694 <rtems_bdpart_read_mbr_partition+0x9a><== NEVER TAKEN
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
4263a: 7005 moveq #5,%d0
4263c: 0283 0000 00ff andil #255,%d3
42642: b083 cmpl %d3,%d0
42644: 660a bnes 42650 <rtems_bdpart_read_mbr_partition+0x56>
if (ep_begin != NULL) {
42646: 4a8c tstl %a4
42648: 674e beqs 42698 <rtems_bdpart_read_mbr_partition+0x9e><== NEVER TAKEN
*ep_begin = begin;
4264a: 2882 movel %d2,%a4@
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
4264c: 4200 clrb %d0
4264e: 604a bras 4269a <rtems_bdpart_read_mbr_partition+0xa0>
if (ep_begin != NULL) {
*ep_begin = begin;
}
} else {
/* Increment partition index */
++(*p);
42650: 2001 movel %d1,%d0
42652: 0680 0000 0030 addil #48,%d0
42658: 2680 movel %d0,%a3@
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
4265a: 4878 0030 pea 30 <OPER2+0x1c>
4265e: 42a7 clrl %sp@-
42660: 2f00 movel %d0,%sp@-
42662: 4eb9 0005 18e8 jsr 518e8 <memset>
/* Set values */
(*p)->begin = begin;
42668: 2053 moveal %a3@,%a0
4266a: 2082 movel %d2,%a0@
(*p)->end = end;
4266c: 214d 0004 movel %a5,%a0@(4)
rtems_bdpart_to_partition_type( type, (*p)->type);
42670: 4868 0008 pea %a0@(8)
42674: 2f03 movel %d3,%sp@-
42676: 4eb9 0004 25d4 jsr 425d4 <rtems_bdpart_to_partition_type>
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
4267c: 2053 moveal %a3@,%a0
4267e: 4280 clrl %d0
42680: 1012 moveb %a2@,%d0
42682: 4fef 0014 lea %sp@(20),%sp
42686: 42a8 0028 clrl %a0@(40)
4268a: 2140 002c movel %d0,%a0@(44)
4268e: 6008 bras 42698 <rtems_bdpart_read_mbr_partition+0x9e>
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
42690: 7005 moveq #5,%d0 <== NOT EXECUTED
42692: 6006 bras 4269a <rtems_bdpart_read_mbr_partition+0xa0><== NOT EXECUTED
} else if (begin >= end) {
return RTEMS_IO_ERROR;
42694: 701b moveq #27,%d0 <== NOT EXECUTED
42696: 6002 bras 4269a <rtems_bdpart_read_mbr_partition+0xa0><== NOT EXECUTED
rtems_uint32_from_little_endian( data + RTEMS_BDPART_MBR_OFFSET_SIZE);
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
42698: 4280 clrl %d0
rtems_bdpart_to_partition_type( type, (*p)->type);
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
}
return RTEMS_SUCCESSFUL;
}
4269a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
426a0: 4e5e unlk %fp <== NOT EXECUTED
00042556 <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
42556: 4e56 0000 linkw %fp,#0
4255a: 2f0a movel %a2,%sp@-
4255c: 246e 0010 moveal %fp@(16),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
42560: 2012 movel %a2@,%d0
static rtems_status_code rtems_bdpart_read_record(
rtems_disk_device *dd,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
42562: 2f02 movel %d2,%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
42564: 4a80 tstl %d0
42566: 661a bnes 42582 <rtems_bdpart_read_record+0x2c>
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( dd, index, block);
42568: 2f0a movel %a2,%sp@-
4256a: 2f2e 000c movel %fp@(12),%sp@-
4256e: 2f2e 0008 movel %fp@(8),%sp@-
42572: 4eb9 0004 d604 jsr 4d604 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL) {
42578: 4fef 000c lea %sp@(12),%sp
4257c: 4a80 tstl %d0
4257e: 6712 beqs 42592 <rtems_bdpart_read_record+0x3c> <== ALWAYS TAKEN
42580: 6046 bras 425c8 <rtems_bdpart_read_record+0x72> <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
sc = rtems_bdbuf_release( *block);
42582: 2f00 movel %d0,%sp@-
42584: 4eb9 0004 d790 jsr 4d790 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL) {
4258a: 588f addql #4,%sp
4258c: 4a80 tstl %d0
4258e: 67d8 beqs 42568 <rtems_bdpart_read_record+0x12> <== ALWAYS TAKEN
42590: 6036 bras 425c8 <rtems_bdpart_read_record+0x72> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
42592: 2052 moveal %a2@,%a0
42594: 4a88 tstl %a0
42596: 672e beqs 425c6 <rtems_bdpart_read_record+0x70> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
42598: 2068 001a moveal %a0@(26),%a0
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]
4259c: 4281 clrl %d1
4259e: 1228 01fe moveb %a0@(510),%d1
425a2: 7455 moveq #85,%d2
425a4: b481 cmpl %d1,%d2
425a6: 6612 bnes 425ba <rtems_bdpart_read_record+0x64> <== NEVER TAKEN
425a8: 74aa moveq #-86,%d2
425aa: 1228 01ff moveb %a0@(511),%d1
425ae: b581 eorl %d2,%d1
425b0: 4a01 tstb %d1
425b2: 57c1 seq %d1
425b4: 49c1 extbl %d1
425b6: 4481 negl %d1
425b8: 6002 bras 425bc <rtems_bdpart_read_record+0x66>
425ba: 4281 clrl %d1 <== NOT EXECUTED
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
425bc: 0801 0000 btst #0,%d1
425c0: 6606 bnes 425c8 <rtems_bdpart_read_record+0x72> <== ALWAYS TAKEN
return RTEMS_IO_ERROR;
425c2: 701b moveq #27,%d0 <== NOT EXECUTED
425c4: 6002 bras 425c8 <rtems_bdpart_read_record+0x72> <== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
425c6: 7009 moveq #9,%d0 <== NOT EXECUTED
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
425c8: 242e fff8 movel %fp@(-8),%d2
425cc: 246e fffc moveal %fp@(-4),%a2
425d0: 4e5e unlk %fp <== NOT EXECUTED
00042990 <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
42990: 4e56 ffc0 linkw %fp,#-64
42994: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42998: 282e 0008 movel %fp@(8),%d4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
4299c: 42ae fff4 clrl %fp@(-12)
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);
429a0: 2f04 movel %d4,%sp@-
429a2: 4eb9 0005 2550 jsr 52550 <strlen>
429a8: 588f addql #4,%sp
429aa: 2840 moveal %d0,%a4
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
429ac: 486e fff4 pea %fp@(-12)
dev_t logical_disk = 0;
char *logical_disk_name = NULL;
char *logical_disk_marker = NULL;
size_t disk_name_size = strlen( disk_name);
size_t i = 0;
int fd = -1;
429b0: 70ff moveq #-1,%d0
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
429b2: 486e fffc pea %fp@(-4)
429b6: 486e fff8 pea %fp@(-8)
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;
429ba: 2d40 fff8 movel %d0,%fp@(-8)
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
429be: 2f04 movel %d4,%sp@-
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;
rtems_disk_device *dd = NULL;
429c0: 42ae fffc clrl %fp@(-4)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
429c4: 4eb9 0004 26d2 jsr 426d2 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
429ca: 4fef 0010 lea %sp@(16),%sp
429ce: 4a80 tstl %d0
429d0: 6600 00ce bnew 42aa0 <rtems_bdpart_register+0x110>
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
429d4: 206e fffc moveal %fp@(-4),%a0
429d8: 2410 movel %a0@,%d2
429da: 2628 0004 movel %a0@(4),%d3
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
429de: 2f2e fff8 movel %fp@(-8),%sp@-
429e2: 4eb9 0004 45d0 jsr 445d0 <close>
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
429e8: 486c 0004 pea %a4@(4)
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
429ec: 2d42 fff0 movel %d2,%fp@(-16)
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.minor;
429f0: 2d43 ffec movel %d3,%fp@(-20)
429f4: 4eb9 0004 4e0c jsr 44e0c <malloc>
if (logical_disk_name == NULL) {
429fa: 508f addql #8,%sp
/* 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);
429fc: 2c00 movel %d0,%d6
if (logical_disk_name == NULL) {
429fe: 6700 009e beqw 42a9e <rtems_bdpart_register+0x10e>
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
42a02: 2f0c movel %a4,%sp@-
logical_disk_marker = logical_disk_name + disk_name_size;
42a04: 2e06 movel %d6,%d7
42a06: de8c addl %a4,%d7
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
42a08: 347c 0001 moveaw #1,%a2
/* 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);
42a0c: 49f9 0005 1cc8 lea 51cc8 <snprintf>,%a4
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
42a12: 4bf9 0004 34d2 lea 434d2 <rtems_disk_create_log>,%a5
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (logical_disk_name == NULL) {
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
42a18: 2f04 movel %d4,%sp@-
42a1a: 2f00 movel %d0,%sp@-
42a1c: 4eb9 0005 2668 jsr 52668 <strncpy>
#include <string.h>
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_register(
42a22: 222e 0010 movel %fp@(16),%d1
42a26: 5281 addql #1,%d1
}
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) {
42a28: 4fef 000c lea %sp@(12),%sp
42a2c: 266e 000c moveal %fp@(12),%a3
#include <string.h>
#include <rtems.h>
#include <rtems/bdpart.h>
rtems_status_code rtems_bdpart_register(
42a30: 2d41 ffe8 movel %d1,%fp@(-24)
}
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) {
42a34: 604a bras 42a80 <rtems_bdpart_register+0xf0>
/* 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);
42a36: 2f0a movel %a2,%sp@-
42a38: 4879 0005 f9e4 pea 5f9e4 <RTEMS_BDPART_MBR_MASTER_TYPE+0x10>
42a3e: 4878 0004 pea 4 <CONTEXT_ARG>
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
42a42: 2a2e ffec movel %fp@(-20),%d5
42a46: da8a addl %a2,%d5
42a48: 2f07 movel %d7,%sp@-
42a4a: 282e fff0 movel %fp@(-16),%d4
42a4e: 4e94 jsr %a4@
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
42a50: 4fef 0010 lea %sp@(16),%sp
42a54: 7203 moveq #3,%d1
42a56: b280 cmpl %d0,%d1
42a58: 6d30 blts 42a8a <rtems_bdpart_register+0xfa> <== NEVER TAKEN
/* Create logical disk */
sc = rtems_disk_create_log(
logical_disk,
disk,
p->begin,
p->end - p->begin,
42a5a: 2013 movel %a3@,%d0
42a5c: 528a addql #1,%a2
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
42a5e: 2f06 movel %d6,%sp@-
42a60: 222b 0004 movel %a3@(4),%d1
42a64: 9280 subl %d0,%d1
42a66: 47eb 0030 lea %a3@(48),%a3
42a6a: 2f01 movel %d1,%sp@-
42a6c: 2f00 movel %d0,%sp@-
42a6e: 2f03 movel %d3,%sp@-
42a70: 2f02 movel %d2,%sp@-
42a72: 2f05 movel %d5,%sp@-
42a74: 2f04 movel %d4,%sp@-
42a76: 4e95 jsr %a5@
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
42a78: 4fef 001c lea %sp@(28),%sp
42a7c: 4a80 tstl %d0
42a7e: 660e bnes 42a8e <rtems_bdpart_register+0xfe> <== NEVER TAKEN
}
strncpy( logical_disk_name, disk_name, disk_name_size);
logical_disk_marker = logical_disk_name + disk_name_size;
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
42a80: b5ee ffe8 cmpal %fp@(-24),%a2
42a84: 66b0 bnes 42a36 <rtems_bdpart_register+0xa6>
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
42a86: 4282 clrl %d2
42a88: 6006 bras 42a90 <rtems_bdpart_register+0x100>
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
42a8a: 7403 moveq #3,%d2 <== NOT EXECUTED
42a8c: 6002 bras 42a90 <rtems_bdpart_register+0x100> <== NOT EXECUTED
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
42a8e: 2400 movel %d0,%d2 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
42a90: 2f06 movel %d6,%sp@-
42a92: 4eb9 0004 4844 jsr 44844 <free>
42a98: 588f addql #4,%sp
return esc;
42a9a: 2002 movel %d2,%d0
42a9c: 6002 bras 42aa0 <rtems_bdpart_register+0x110>
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) {
return RTEMS_NO_MEMORY;
42a9e: 701a moveq #26,%d0 <== NOT EXECUTED
cleanup:
free( logical_disk_name);
return esc;
}
42aa0: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5
42aa6: 4e5e unlk %fp <== NOT EXECUTED
00042aaa <rtems_bdpart_register_from_disk>:
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;
42aaa: 7010 moveq #16,%d0
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
42aac: 4e56 fce8 linkw %fp,#-792
42ab0: 2f03 movel %d3,%sp@-
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
42ab2: 260e movel %fp,%d3
42ab4: 0683 ffff fd00 addil #-768,%d3
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
42aba: 2f02 movel %d2,%sp@-
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
42abc: 486e fce8 pea %fp@(-792)
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
42ac0: 242e 0008 movel %fp@(8),%d2
rtems_bdpart_format format;
rtems_bdpart_partition pt [RTEMS_BDPART_PARTITION_NUMBER_HINT];
size_t count = RTEMS_BDPART_PARTITION_NUMBER_HINT;
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
42ac4: 2f03 movel %d3,%sp@-
42ac6: 486e fcec pea %fp@(-788)
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;
42aca: 2d40 fce8 movel %d0,%fp@(-792)
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
42ace: 2f02 movel %d2,%sp@-
42ad0: 4eb9 0004 276a jsr 4276a <rtems_bdpart_read>
if (sc != RTEMS_SUCCESSFUL) {
42ad6: 4fef 0010 lea %sp@(16),%sp
42ada: 4a80 tstl %d0
42adc: 6612 bnes 42af0 <rtems_bdpart_register_from_disk+0x46><== NEVER TAKEN
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
42ade: 2f2e fce8 movel %fp@(-792),%sp@-
42ae2: 2f03 movel %d3,%sp@-
42ae4: 2f02 movel %d2,%sp@-
42ae6: 4eb9 0004 2990 jsr 42990 <rtems_bdpart_register>
42aec: 4fef 000c lea %sp@(12),%sp
}
42af0: 242e fce0 movel %fp@(-800),%d2
42af4: 262e fce4 movel %fp@(-796),%d3
42af8: 4e5e unlk %fp <== NOT EXECUTED
0005b9fc <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5b9fc: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED
5ba00: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5ba04: 4878 002f pea 2f <OPER2+0x1b> <== 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);
5ba08: 45f9 0007 3bd0 lea 73bd0 <strlen>,%a2 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5ba0e: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5ba12: 2f03 movel %d3,%sp@- <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5ba14: 2a2e 0014 movel %fp@(20),%d5 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5ba18: 4eb9 0007 4a6c jsr 74a6c <strrchr> <== NOT EXECUTED
5ba1e: 508f addql #8,%sp <== NOT EXECUTED
5ba20: 2640 moveal %d0,%a3 <== 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);
5ba22: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5ba24: 4e92 jsr %a2@ <== NOT EXECUTED
5ba26: 2800 movel %d0,%d4 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
5ba28: 2e85 movel %d5,%sp@ <== NOT EXECUTED
5ba2a: 4e92 jsr %a2@ <== NOT EXECUTED
5ba2c: 588f addql #4,%sp <== NOT EXECUTED
5ba2e: 2400 movel %d0,%d2 <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
5ba30: 4a8b tstl %a3 <== NOT EXECUTED
5ba32: 670c beqs 5ba40 <rtems_bdpart_unmount+0x44> <== NOT EXECUTED
disk_file_name += 1;
5ba34: 260b movel %a3,%d3 <== NOT EXECUTED
5ba36: 5283 addql #1,%d3 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
5ba38: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5ba3a: 4e92 jsr %a2@ <== NOT EXECUTED
5ba3c: 588f addql #4,%sp <== NOT EXECUTED
5ba3e: 2800 movel %d0,%d4 <== 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);
5ba40: 2644 moveal %d4,%a3 <== NOT EXECUTED
5ba42: d7c2 addal %d2,%a3 <== NOT EXECUTED
5ba44: 486b 0005 pea %a3@(5) <== NOT EXECUTED
5ba48: 4eb9 0004 2b68 jsr 42b68 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
5ba4e: 588f addql #4,%sp <== 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);
5ba50: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (mount_point == NULL) {
5ba52: 4a80 tstl %d0 <== NOT EXECUTED
5ba54: 6778 beqs 5bace <rtems_bdpart_unmount+0xd2> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5ba56: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ba58: 49f9 0007 3d7c lea 73d7c <strncpy>,%a4 <== NOT EXECUTED
5ba5e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
5ba60: 4bf9 0005 f2f4 lea 5f2f4 <unmount>,%a5 <== NOT EXECUTED
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5ba66: 2f00 movel %d0,%sp@- <== NOT EXECUTED
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
5ba68: 47f2 b801 lea %a2@(00000001,%a3:l),%a3 <== NOT EXECUTED
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5ba6c: 4e94 jsr %a4@ <== NOT EXECUTED
mount_point [mount_base_size] = '/';
5ba6e: 702f moveq #47,%d0 <== NOT EXECUTED
5ba70: 1580 2800 moveb %d0,%a2@(00000000,%d2:l) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5ba74: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5ba76: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5ba78: 4872 2801 pea %a2@(00000001,%d2:l) <== NOT EXECUTED
/* Unmount */
rv = unmount( mount_point);
if (rv == 0) {
/* Remove mount point */
rv = rmdir( mount_point);
5ba7c: 263c 0005 ec50 movel #388176,%d3 <== 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) {
5ba82: 4282 clrl %d2 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5ba84: 4e94 jsr %a4@ <== 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) {
5ba86: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5ba8a: 49f9 0007 2f94 lea 72f94 <snprintf>,%a4 <== 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) {
5ba90: 6032 bras 5bac4 <rtems_bdpart_unmount+0xc8> <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5ba92: 5282 addql #1,%d2 <== NOT EXECUTED
5ba94: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ba96: 4879 0008 e2f6 pea 8e2f6 <e2a_32V+0x2a3> <== NOT EXECUTED
5ba9c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5baa0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5baa2: 4e94 jsr %a4@ <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
5baa4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5baa8: 7203 moveq #3,%d1 <== NOT EXECUTED
5baaa: b280 cmpl %d0,%d1 <== NOT EXECUTED
5baac: 6d24 blts 5bad2 <rtems_bdpart_unmount+0xd6> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
5baae: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5bab0: 4e95 jsr %a5@ <== NOT EXECUTED
if (rv == 0) {
5bab2: 588f addql #4,%sp <== NOT EXECUTED
5bab4: 4a80 tstl %d0 <== NOT EXECUTED
5bab6: 660c bnes 5bac4 <rtems_bdpart_unmount+0xc8> <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
5bab8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5baba: 2043 moveal %d3,%a0 <== NOT EXECUTED
5babc: 4e90 jsr %a0@ <== NOT EXECUTED
if (rv != 0) {
5babe: 588f addql #4,%sp <== NOT EXECUTED
5bac0: 4a80 tstl %d0 <== NOT EXECUTED
5bac2: 6612 bnes 5bad6 <rtems_bdpart_unmount+0xda> <== 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) {
5bac4: b4ae 0010 cmpl %fp@(16),%d2 <== NOT EXECUTED
5bac8: 66c8 bnes 5ba92 <rtems_bdpart_unmount+0x96> <== NOT EXECUTED
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
rtems_status_code esc = RTEMS_SUCCESSFUL;
5baca: 4282 clrl %d2 <== NOT EXECUTED
5bacc: 600a bras 5bad8 <rtems_bdpart_unmount+0xdc> <== NOT EXECUTED
}
/* Create mount point base */
mount_point = malloc( mount_base_size + 1 + disk_file_name_size + RTEMS_BDPART_NUMBER_SIZE);
if (mount_point == NULL) {
esc = RTEMS_NO_MEMORY;
5bace: 741a moveq #26,%d2 <== NOT EXECUTED
5bad0: 6006 bras 5bad8 <rtems_bdpart_unmount+0xdc> <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
5bad2: 7403 moveq #3,%d2 <== NOT EXECUTED
5bad4: 6002 bras 5bad8 <rtems_bdpart_unmount+0xdc> <== NOT EXECUTED
rv = unmount( mount_point);
if (rv == 0) {
/* Remove mount point */
rv = rmdir( mount_point);
if (rv != 0) {
esc = RTEMS_IO_ERROR;
5bad6: 741b moveq #27,%d2 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
5bad8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5bada: 4eb9 0004 2898 jsr 42898 <free> <== NOT EXECUTED
return esc;
}
5bae0: 2002 movel %d2,%d0 <== NOT EXECUTED
5bae2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED
5bae8: 4e5e unlk %fp <== NOT EXECUTED
00042afc <rtems_bdpart_unregister>:
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;
42afc: 70ff moveq #-1,%d0
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
42afe: 4e56 ffe0 linkw %fp,#-32
42b02: 48d7 043c moveml %d2-%d5/%a2,%sp@
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
42b06: 486e fff4 pea %fp@(-12)
42b0a: 486e fffc pea %fp@(-4)
42b0e: 486e fff8 pea %fp@(-8)
42b12: 2f2e 0008 movel %fp@(8),%sp@-
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_blkdev_bnum disk_end = 0;
42b16: 42ae fff4 clrl %fp@(-12)
dev_t disk = 0;
dev_t logical_disk = 0;
size_t i = 0;
int fd = -1;
42b1a: 2d40 fff8 movel %d0,%fp@(-8)
rtems_disk_device *dd = NULL;
42b1e: 42ae fffc clrl %fp@(-4)
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
42b22: 4eb9 0004 26d2 jsr 426d2 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
42b28: 4fef 0010 lea %sp@(16),%sp
size_t i = 0;
int fd = -1;
rtems_disk_device *dd = NULL;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
42b2c: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL) {
42b2e: 663a bnes 42b6a <rtems_bdpart_unregister+0x6e> <== NEVER TAKEN
42b30: 206e fffc moveal %fp@(-4),%a0
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
42b34: 45f9 0004 33be lea 433be <rtems_disk_delete>,%a2
42b3a: 2428 0004 movel %a0@(4),%d2
42b3e: 2a10 movel %a0@,%d5
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
disk = rtems_disk_get_device_identifier( dd);
close( fd);
42b40: 2f2e fff8 movel %fp@(-8),%sp@-
42b44: 4eb9 0004 45d0 jsr 445d0 <close>
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
}
rtems_status_code rtems_bdpart_unregister(
42b4a: 282e 0010 movel %fp@(16),%d4
/* 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) {
42b4e: 588f addql #4,%sp
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
}
rtems_status_code rtems_bdpart_unregister(
42b50: d882 addl %d2,%d4
/* 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) {
42b52: 600e bras 42b62 <rtems_bdpart_unregister+0x66>
/* New minor number */
++minor;
42b54: 5282 addql #1,%d2
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
42b56: 2f02 movel %d2,%sp@-
42b58: 2f05 movel %d5,%sp@-
42b5a: 4e92 jsr %a2@
if (sc != RTEMS_SUCCESSFUL) {
42b5c: 508f addql #8,%sp
42b5e: 4a80 tstl %d0
42b60: 6606 bnes 42b68 <rtems_bdpart_unregister+0x6c> <== NEVER TAKEN
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
42b62: b882 cmpl %d2,%d4
42b64: 66ee bnes 42b54 <rtems_bdpart_unregister+0x58>
42b66: 6002 bras 42b6a <rtems_bdpart_unregister+0x6e>
/* Get the device identifier */
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Delete logical disk */
sc = rtems_disk_delete( logical_disk);
42b68: 2600 movel %d0,%d3 <== NOT EXECUTED
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
42b6a: 2003 movel %d3,%d0
42b6c: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
42b72: 4e5e unlk %fp
...
00042c4a <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
42c4a: 4e56 ffc4 linkw %fp,#-60
42c4e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42c52: 266e 000c moveal %fp@(12),%a3
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;
42c56: 4282 clrl %d2
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
42c58: 2a6e 0010 moveal %fp@(16),%a5
42c5c: 282e 0014 movel %fp@(20),%d4
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;
42c60: 4a8b tstl %a3
42c62: 6708 beqs 42c6c <rtems_bdpart_write+0x22> <== NEVER TAKEN
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
42c64: 4a93 tstl %a3@
42c66: 6604 bnes 42c6c <rtems_bdpart_write+0x22> <== NEVER TAKEN
&& format->mbr.dos_compatibility;
42c68: 142b 0008 moveb %a3@(8),%d2
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
42c6c: 7001 moveq #1,%d0
42c6e: c480 andl %d0,%d2
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_bdbuf_buffer *block = NULL;
42c70: 42ae fff0 clrl %fp@(-16)
rtems_blkdev_bnum disk_end = 0;
42c74: 42ae fff4 clrl %fp@(-12)
rtems_blkdev_bnum record_space =
42c78: 4a02 tstb %d2
42c7a: 6704 beqs 42c80 <rtems_bdpart_write+0x36> <== NEVER TAKEN
42c7c: 7a3f moveq #63,%d5
42c7e: 6002 bras 42c82 <rtems_bdpart_write+0x38>
42c80: 7a01 moveq #1,%d5 <== 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;
42c82: 72ff moveq #-1,%d1
rtems_disk_device *dd = NULL;
42c84: 42ae fffc clrl %fp@(-4)
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;
42c88: 2d41 fff8 movel %d1,%fp@(-8)
rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
42c8c: 4a84 tstl %d4
42c8e: 6700 0278 beqw 42f08 <rtems_bdpart_write+0x2be>
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
42c92: 4a8b tstl %a3
42c94: 6700 0276 beqw 42f0c <rtems_bdpart_write+0x2c2>
42c98: 4a8d tstl %a5
42c9a: 6700 0270 beqw 42f0c <rtems_bdpart_write+0x2c2>
return RTEMS_INVALID_ADDRESS;
}
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &fd, &dd, &disk_end);
42c9e: 486e fff4 pea %fp@(-12)
42ca2: 486e fffc pea %fp@(-4)
42ca6: 486e fff8 pea %fp@(-8)
42caa: 2f2e 0008 movel %fp@(8),%sp@-
42cae: 4eb9 0004 26d2 jsr 426d2 <rtems_bdpart_get_disk_data>
if (sc != RTEMS_SUCCESSFUL) {
42cb4: 4fef 0010 lea %sp@(16),%sp
42cb8: 4a80 tstl %d0
42cba: 6600 0256 bnew 42f12 <rtems_bdpart_write+0x2c8>
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
42cbe: 4a02 tstb %d2
42cc0: 6710 beqs 42cd2 <rtems_bdpart_write+0x88> <== NEVER TAKEN
disk_end -= (disk_end % record_space);
42cc2: 202e fff4 movel %fp@(-12),%d0
42cc6: 2600 movel %d0,%d3
42cc8: 4c45 3001 remul %d5,%d1,%d3
42ccc: 9081 subl %d1,%d0
42cce: 2d40 fff4 movel %d0,%fp@(-12)
/* 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) {
42cd2: 226e fff4 moveal %fp@(-12),%a1
42cd6: 284d moveal %a5,%a4
42cd8: 204d moveal %a5,%a0
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
42cda: 4280 clrl %d0
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) {
42cdc: 2210 movel %a0@,%d1
42cde: b3c1 cmpal %d1,%a1
42ce0: 6300 01fa blsw 42edc <rtems_bdpart_write+0x292>
42ce4: 2628 0004 movel %a0@(4),%d3
42ce8: b3c3 cmpal %d3,%a1
42cea: 6500 01f0 bcsw 42edc <rtems_bdpart_write+0x292>
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
42cee: b681 cmpl %d1,%d3
42cf0: 6300 01ea blsw 42edc <rtems_bdpart_write+0x292>
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
42cf4: 4a80 tstl %d0
42cf6: 6708 beqs 42d00 <rtems_bdpart_write+0xb6>
42cf8: b2a8 ffd4 cmpl %a0@(-44),%d1
42cfc: 6500 01de bcsw 42edc <rtems_bdpart_write+0x292>
if (dos_compatibility) {
disk_end -= (disk_end % record_space);
}
/* Check that we have a consistent partition table */
for (i = 0; i < count; ++i) {
42d00: 5280 addql #1,%d0
42d02: 41e8 0030 lea %a0@(48),%a0
42d06: b880 cmpl %d0,%d4
42d08: 66d2 bnes 42cdc <rtems_bdpart_write+0x92>
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
42d0a: 4a93 tstl %a3@
42d0c: 6600 01ca bnew 42ed8 <rtems_bdpart_write+0x28e>
* 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;
42d10: 7c04 moveq #4,%d6
42d12: bc84 cmpl %d4,%d6
42d14: 6404 bccs 42d1a <rtems_bdpart_write+0xd0> <== NEVER TAKEN
42d16: 7603 moveq #3,%d3
42d18: 6002 bras 42d1c <rtems_bdpart_write+0xd2>
42d1a: 2604 movel %d4,%d3 <== NOT EXECUTED
/*
* Check that the first primary partition starts at head one and sector one
* under the virtual one head and 63 sectors geometry if necessary.
*/
if (dos_compatibility && pt [0].begin != RTEMS_BDPART_MBR_CYLINDER_SIZE) {
42d1c: 4a02 tstb %d2
42d1e: 6614 bnes 42d34 <rtems_bdpart_write+0xea> <== ALWAYS TAKEN
* 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) {
42d20: 2203 movel %d3,%d1
42d22: 2003 movel %d3,%d0
42d24: e989 lsll #4,%d1
42d26: ed88 lsll #6,%d0
42d28: 9081 subl %d1,%d0
42d2a: 45f5 0800 lea %a5@(00000000,%d0:l),%a2
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
42d2e: 2003 movel %d3,%d0
42d30: 220a movel %a2,%d1
42d32: 6020 bras 42d54 <rtems_bdpart_write+0x10a>
/*
* 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) {
42d34: 7e3f moveq #63,%d7
42d36: be95 cmpl %a5@,%d7
42d38: 6600 01a2 bnew 42edc <rtems_bdpart_write+0x292>
42d3c: 60e2 bras 42d20 <rtems_bdpart_write+0xd6>
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
42d3e: 2041 moveal %d1,%a0
42d40: 0681 0000 0030 addil #48,%d1
* 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) {
42d46: 2250 moveal %a0@,%a1
42d48: 93e8 ffd4 subal %a0@(-44),%a1
42d4c: ba89 cmpl %a1,%d5
42d4e: 6200 018c bhiw 42edc <rtems_bdpart_write+0x292>
* 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) {
42d52: 5280 addql #1,%d0
42d54: b880 cmpl %d0,%d4
42d56: 62e6 bhis 42d3e <rtems_bdpart_write+0xf4>
42d58: 4282 clrl %d2
uint8_t type = 0;
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
42d5a: 486e ffef pea %fp@(-17)
42d5e: 486d 0008 pea %a5@(8)
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
42d62: 4200 clrb %d0
42d64: 1d40 ffef moveb %d0,%fp@(-17)
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
42d68: 4eb9 0004 26a4 jsr 426a4 <rtems_bdpart_to_mbr_partition_type>
42d6e: 508f addql #8,%sp
42d70: 4a00 tstb %d0
42d72: 6722 beqs 42d96 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
42d74: 4bed 0030 lea %a5@(48),%a5
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
42d78: 4280 clrl %d0
42d7a: 223c 0000 00ff movel #255,%d1
42d80: 2c2d fff8 movel %a5@(-8),%d6
42d84: 2e2d fffc movel %a5@(-4),%d7
42d88: 9e81 subl %d1,%d7
42d8a: 9d80 subxl %d0,%d6
42d8c: 6208 bhis 42d96 <rtems_bdpart_write+0x14c> <== NEVER TAKEN
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
42d8e: 5282 addql #1,%d2
42d90: b882 cmpl %d2,%d4
42d92: 66c6 bnes 42d5a <rtems_bdpart_write+0x110>
42d94: 6006 bras 42d9c <rtems_bdpart_write+0x152>
42d96: 7404 moveq #4,%d2 <== NOT EXECUTED
42d98: 6000 014c braw 42ee6 <rtems_bdpart_write+0x29c> <== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( dd, 0, &block);
42d9c: 486e fff0 pea %fp@(-16)
42da0: 42a7 clrl %sp@-
42da2: 2f2e fffc movel %fp@(-4),%sp@-
42da6: 4eba fdd0 jsr %pc@(42b78 <rtems_bdpart_new_record>)
if (sc != RTEMS_SUCCESSFUL) {
42daa: 4fef 000c lea %sp@(12),%sp
42dae: 4a80 tstl %d0
42db0: 6600 0132 bnew 42ee4 <rtems_bdpart_write+0x29a>
}
/* Write disk ID */
rtems_uint32_to_little_endian(
format->mbr.disk_id,
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
42db4: 206e fff0 moveal %fp@(-16),%a0
42db8: 2228 001a movel %a0@(26),%d1
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
42dbc: 2041 moveal %d1,%a0
42dbe: 41e8 01b8 lea %a0@(440),%a0
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
42dc2: 0681 0000 01bc addil #444,%d1
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
42dc8: 202b 0004 movel %a3@(4),%d0
data [i] = (uint8_t) value;
42dcc: 10c0 moveb %d0,%a0@+
value >>= 8;
42dce: e088 lsrl #8,%d0
static inline void rtems_uint32_to_little_endian( uint32_t value, uint8_t *data)
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
42dd0: b288 cmpl %a0,%d1
42dd2: 66f8 bnes 42dcc <rtems_bdpart_write+0x182>
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;
42dd4: 206e fff0 moveal %fp@(-16),%a0
for (i = 0; i < ppc; ++i) {
42dd8: 4282 clrl %d2
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
42dda: 4bfa fe1c lea %pc@(42bf8 <rtems_bdpart_write_mbr_partition>),%a5
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;
42dde: 2c28 001a movel %a0@(26),%d6
42de2: 0686 0000 01be addil #446,%d6
42de8: 2646 moveal %d6,%a3
for (i = 0; i < ppc; ++i) {
42dea: 602c bras 42e18 <rtems_bdpart_write+0x1ce>
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
42dec: 4281 clrl %d1
42dee: 122c 002f moveb %a4@(47),%d1
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) {
42df2: 5282 addql #1,%d2
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
data,
p->begin,
p->end - p->begin,
42df4: 2014 movel %a4@,%d0
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(
42df6: 2f01 movel %d1,%sp@-
42df8: 122c 0008 moveb %a4@(8),%d1
42dfc: 2f01 movel %d1,%sp@-
42dfe: 222c 0004 movel %a4@(4),%d1
42e02: 9280 subl %d0,%d1
42e04: 49ec 0030 lea %a4@(48),%a4
42e08: 2f01 movel %d1,%sp@-
42e0a: 2f00 movel %d0,%sp@-
42e0c: 2f0b movel %a3,%sp@-
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
);
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
42e0e: 47eb 0010 lea %a3@(16),%a3
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(
42e12: 4e95 jsr %a5@
42e14: 4fef 0014 lea %sp@(20),%sp
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) {
42e18: b682 cmpl %d2,%d3
42e1a: 66d0 bnes 42dec <rtems_bdpart_write+0x1a2>
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
42e1c: 2003 movel %d3,%d0
42e1e: e988 lsll #4,%d0
42e20: dc80 addl %d0,%d6
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
42e22: b883 cmpl %d3,%d4
42e24: 6700 00ba beqw 42ee0 <rtems_bdpart_write+0x296>
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
42e28: 2852 moveal %a2@,%a4
42e2a: 99c5 subal %d5,%a4
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
42e2c: 4bfa fdca lea %pc@(42bf8 <rtems_bdpart_write_mbr_partition>),%a5
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
42e30: 240e movel %fp,%d2
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
42e32: 2643 moveal %d3,%a3
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
42e34: 0682 ffff fff0 addil #-16,%d2
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
42e3a: 42a7 clrl %sp@-
42e3c: 4878 0005 pea 5 <COMPARE>
42e40: 2e2e fff4 movel %fp@(-12),%d7
42e44: 9e8c subl %a4,%d7
42e46: 2f07 movel %d7,%sp@-
42e48: 2f0c movel %a4,%sp@-
42e4a: 2f06 movel %d6,%sp@-
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
42e4c: 2c3c 0004 2b78 movel #273272,%d6
/* Begin of extended partition */
rtems_blkdev_bnum ep_begin = pt [ppc].begin - record_space;
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
42e52: 4e95 jsr %a5@
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
42e54: 4fef 0014 lea %sp@(20),%sp
42e58: 6078 bras 42ed2 <rtems_bdpart_write+0x288>
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
42e5a: b68b cmpl %a3,%d3
42e5c: 642a bccs 42e88 <rtems_bdpart_write+0x23e>
rtems_blkdev_bnum begin = p->begin - record_space;
42e5e: 2012 movel %a2@,%d0
42e60: 9085 subl %d5,%d0
rtems_bdpart_write_mbr_partition(
42e62: 42a7 clrl %sp@-
42e64: 4878 0005 pea 5 <COMPARE>
42e68: 222e fff4 movel %fp@(-12),%d1
42e6c: 9280 subl %d0,%d1
42e6e: 908c subl %a4,%d0
42e70: 2f01 movel %d1,%sp@-
42e72: 206e fff0 moveal %fp@(-16),%a0
42e76: 2f00 movel %d0,%sp@-
42e78: 2068 001a moveal %a0@(26),%a0
42e7c: 41e8 01ce lea %a0@(462),%a0
42e80: 2f08 movel %a0,%sp@-
42e82: 4e95 jsr %a5@
42e84: 4fef 0014 lea %sp@(20),%sp
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
42e88: 2f02 movel %d2,%sp@-
42e8a: 2e12 movel %a2@,%d7
42e8c: 9e85 subl %d5,%d7
42e8e: 2046 moveal %d6,%a0
42e90: 2f07 movel %d7,%sp@-
42e92: 2f2e fffc movel %fp@(-4),%sp@-
42e96: 4e90 jsr %a0@
if (sc != RTEMS_SUCCESSFUL) {
42e98: 4fef 000c lea %sp@(12),%sp
42e9c: 4a80 tstl %d0
42e9e: 6644 bnes 42ee4 <rtems_bdpart_write+0x29a> <== NEVER TAKEN
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
42ea0: 4280 clrl %d0
42ea2: 102a 002f moveb %a2@(47),%d0
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
42ea6: 528b addql #1,%a3
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
42ea8: 2f00 movel %d0,%sp@-
42eaa: 102a 0008 moveb %a2@(8),%d0
42eae: 2f00 movel %d0,%sp@-
42eb0: 202a 0004 movel %a2@(4),%d0
42eb4: 9092 subl %a2@,%d0
42eb6: 45ea 0030 lea %a2@(48),%a2
42eba: 2f00 movel %d0,%sp@-
42ebc: 206e fff0 moveal %fp@(-16),%a0
42ec0: 2f05 movel %d5,%sp@-
42ec2: 2068 001a moveal %a0@(26),%a0
42ec6: 41e8 01be lea %a0@(446),%a0
42eca: 2f08 movel %a0,%sp@-
42ecc: 4e95 jsr %a5@
42ece: 4fef 0014 lea %sp@(20),%sp
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
42ed2: b88b cmpl %a3,%d4
42ed4: 6284 bhis 42e5a <rtems_bdpart_write+0x210>
42ed6: 6008 bras 42ee0 <rtems_bdpart_write+0x296>
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
esc = RTEMS_NOT_IMPLEMENTED;
42ed8: 7418 moveq #24,%d2 <== NOT EXECUTED
42eda: 600a bras 42ee6 <rtems_bdpart_write+0x29c> <== NOT EXECUTED
* 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;
42edc: 740a moveq #10,%d2 <== NOT EXECUTED
42ede: 6006 bras 42ee6 <rtems_bdpart_write+0x29c> <== NOT EXECUTED
const rtems_bdpart_partition *pt,
size_t count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
42ee0: 4282 clrl %d2
42ee2: 6002 bras 42ee6 <rtems_bdpart_write+0x29c>
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( dd, ebr, &block);
if (sc != RTEMS_SUCCESSFUL) {
42ee4: 2400 movel %d0,%d2 <== NOT EXECUTED
}
}
cleanup:
if (fd >= 0) {
42ee6: 202e fff8 movel %fp@(-8),%d0
42eea: 6d0a blts 42ef6 <rtems_bdpart_write+0x2ac> <== NEVER TAKEN
close( fd);
42eec: 2f00 movel %d0,%sp@-
42eee: 4eb9 0004 45d0 jsr 445d0 <close>
42ef4: 588f addql #4,%sp
}
if (block != NULL) {
42ef6: 202e fff0 movel %fp@(-16),%d0
42efa: 6714 beqs 42f10 <rtems_bdpart_write+0x2c6> <== NEVER TAKEN
rtems_bdbuf_sync( block);
42efc: 2f00 movel %d0,%sp@-
42efe: 4eb9 0004 d88e jsr 4d88e <rtems_bdbuf_sync>
42f04: 588f addql #4,%sp
42f06: 6008 bras 42f10 <rtems_bdpart_write+0x2c6>
rtems_disk_device *dd = NULL;
/* Check if we have something to do */
if (count == 0) {
/* Nothing to do */
return RTEMS_SUCCESSFUL;
42f08: 4280 clrl %d0 <== NOT EXECUTED
42f0a: 6006 bras 42f12 <rtems_bdpart_write+0x2c8> <== NOT EXECUTED
}
/* Check parameter */
if (format == NULL || pt == NULL) {
return RTEMS_INVALID_ADDRESS;
42f0c: 7009 moveq #9,%d0 <== NOT EXECUTED
42f0e: 6002 bras 42f12 <rtems_bdpart_write+0x2c8> <== NOT EXECUTED
if (block != NULL) {
rtems_bdbuf_sync( block);
}
return esc;
42f10: 2002 movel %d2,%d0
}
42f12: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
42f18: 4e5e unlk %fp <== NOT EXECUTED
0004cd68 <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)
{
4cd68: 4e56 0000 linkw %fp,#0
4cd6c: 2f0a movel %a2,%sp@-
4cd6e: 246e 0010 moveal %fp@(16),%a2
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
4cd72: 2052 moveal %a2@,%a0
if (args->command != RTEMS_BLKIO_REQUEST)
4cd74: 202a 0004 movel %a2@(4),%d0
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;
4cd78: 2068 002c moveal %a0@(44),%a0
if (args->command != RTEMS_BLKIO_REQUEST)
4cd7c: 0c80 c018 4201 cmpil #-1072152063,%d0
4cd82: 6718 beqs 4cd9c <rtems_blkdev_generic_ioctl+0x34><== NEVER TAKEN
{
args->ioctl_return = dd->ioctl(dd,
4cd84: 2f2a 0008 movel %a2@(8),%sp@-
4cd88: 2f00 movel %d0,%sp@-
4cd8a: 2f08 movel %a0,%sp@-
4cd8c: 2068 0038 moveal %a0@(56),%a0
4cd90: 4e90 jsr %a0@
4cd92: 4fef 000c lea %sp@(12),%sp
4cd96: 2540 000c movel %d0,%a2@(12)
4cd9a: 6006 bras 4cda2 <rtems_blkdev_generic_ioctl+0x3a>
{
/*
* It is not allowed to directly access the driver circumventing the
* cache.
*/
args->ioctl_return = -1;
4cd9c: 70ff moveq #-1,%d0 <== NOT EXECUTED
4cd9e: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
4cda2: 246e fffc moveal %fp@(-4),%a2
4cda6: 4280 clrl %d0
4cda8: 4e5e unlk %fp <== NOT EXECUTED
0004cd1a <rtems_blkdev_generic_open>:
rtems_device_driver
rtems_blkdev_generic_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void * arg)
{
4cd1a: 4e56 0000 linkw %fp,#0
rtems_libio_open_close_args_t *oc = arg;
rtems_libio_t *iop = oc->iop;
4cd1e: 206e 0010 moveal %fp@(16),%a0
rtems_device_driver
rtems_blkdev_generic_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void * arg)
{
4cd22: 2f0a movel %a2,%sp@-
rtems_libio_open_close_args_t *oc = arg;
rtems_libio_t *iop = oc->iop;
4cd24: 2450 moveal %a0@,%a2
4cd26: 222e 000c movel %fp@(12),%d1
4cd2a: 202e 0008 movel %fp@(8),%d0
dev_t dev = rtems_filesystem_make_dev_t(major, minor);
rtems_disk_device *dd = rtems_disk_obtain(dev);
4cd2e: 2f01 movel %d1,%sp@-
4cd30: 2f00 movel %d0,%sp@-
4cd32: 4eb9 0004 2c24 jsr 42c24 <rtems_disk_obtain>
iop->data1 = dd;
if (dd != NULL)
4cd38: 508f addql #8,%sp
rtems_libio_open_close_args_t *oc = arg;
rtems_libio_t *iop = oc->iop;
dev_t dev = rtems_filesystem_make_dev_t(major, minor);
rtems_disk_device *dd = rtems_disk_obtain(dev);
iop->data1 = dd;
4cd3a: 2540 002c movel %d0,%a2@(44)
if (dd != NULL)
4cd3e: 6704 beqs 4cd44 <rtems_blkdev_generic_open+0x2a> <== NEVER TAKEN
return RTEMS_SUCCESSFUL;
4cd40: 4280 clrl %d0
4cd42: 6002 bras 4cd46 <rtems_blkdev_generic_open+0x2c>
else
return RTEMS_UNSATISFIED;
4cd44: 700d moveq #13,%d0 <== NOT EXECUTED
}
4cd46: 246e fffc moveal %fp@(-4),%a2
4cd4a: 4e5e unlk %fp <== NOT EXECUTED
0004cb7c <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)
{
4cb7c: 4e56 ffd0 linkw %fp,#-48
4cb80: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4cb84: 246e 0010 moveal %fp@(16),%a2
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);
4cb88: 4282 clrl %d2
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cb8a: 4bf9 0004 c438 lea 4c438 <rtems_bdbuf_read>,%a5
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;
4cb90: 2052 moveal %a2@,%a0
4cb92: 2668 002c moveal %a0@(44),%a3
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
4cb96: 2e2a 000c movel %a2@(12),%d7
{
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;
4cb9a: 286b 0024 moveal %a3@(36),%a4
char *buf = args->buffer;
uint32_t count = args->count;
4cb9e: 2c2a 0010 movel %a2@(16),%d6
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4cba2: 282a 0004 movel %a2@(4),%d4
4cba6: 2a2a 0008 movel %a2@(8),%d5
4cbaa: 2f0c movel %a4,%sp@-
4cbac: 2f02 movel %d2,%sp@-
4cbae: 2f05 movel %d5,%sp@-
4cbb0: 2f04 movel %d4,%sp@-
4cbb2: 4eb9 0005 c578 jsr 5c578 <__divdi3>
4cbb8: 4fef 0010 lea %sp@(16),%sp
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cbbc: 2f0c movel %a4,%sp@-
4cbbe: 2f02 movel %d2,%sp@-
4cbc0: 2f05 movel %d5,%sp@-
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);
4cbc2: 2d41 fff8 movel %d1,%fp@(-8)
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cbc6: 2f04 movel %d4,%sp@-
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cbc8: 280e movel %fp,%d4
4cbca: 5984 subql #4,%d4
rtems_disk_device *dd = iop->data1;
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cbcc: 4eb9 0005 c9d8 jsr 5c9d8 <__moddi3>
4cbd2: 4fef 0010 lea %sp@(16),%sp
4cbd6: 2601 movel %d1,%d3
args->bytes_moved = 0;
4cbd8: 42aa 0018 clrl %a2@(24)
while (count > 0)
4cbdc: 604c bras 4cc2a <rtems_blkdev_generic_read+0xae>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cbde: 2f04 movel %d4,%sp@-
4cbe0: 2f00 movel %d0,%sp@-
4cbe2: 2f0b movel %a3,%sp@-
4cbe4: 4e95 jsr %a5@
if (rc != RTEMS_SUCCESSFUL)
4cbe6: 4fef 000c lea %sp@(12),%sp
4cbea: 4a80 tstl %d0
4cbec: 6648 bnes 4cc36 <rtems_blkdev_generic_read+0xba> <== NEVER TAKEN
break;
copy = block_size - blkofs;
4cbee: 2a0c movel %a4,%d5
4cbf0: 9a83 subl %d3,%d5
4cbf2: bc85 cmpl %d5,%d6
4cbf4: 6402 bccs 4cbf8 <rtems_blkdev_generic_read+0x7c> <== ALWAYS TAKEN
4cbf6: 2a06 movel %d6,%d5 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4cbf8: 206e fffc moveal %fp@(-4),%a0
4cbfc: 5282 addql #1,%d2
4cbfe: 2f05 movel %d5,%sp@-
4cc00: d6a8 001a addl %a0@(26),%d3
4cc04: 2f03 movel %d3,%sp@-
4cc06: 2f07 movel %d7,%sp@-
4cc08: 4eb9 0005 06dc jsr 506dc <memcpy>
rc = rtems_bdbuf_release(diskbuf);
4cc0e: 2f2e fffc movel %fp@(-4),%sp@-
4cc12: 4eb9 0004 c5c4 jsr 4c5c4 <rtems_bdbuf_release>
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
4cc18: 4fef 0010 lea %sp@(16),%sp
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
4cc1c: dbaa 0018 addl %d5,%a2@(24)
if (rc != RTEMS_SUCCESSFUL)
4cc20: 4a80 tstl %d0
4cc22: 6612 bnes 4cc36 <rtems_blkdev_generic_read+0xba> <== NEVER TAKEN
break;
count -= copy;
4cc24: 9c85 subl %d5,%d6
buf += copy;
4cc26: de85 addl %d5,%d7
blkofs = 0;
4cc28: 4283 clrl %d3
/* rtems_blkdev_generic_read --
* Generic block device read primitive. Implemented using block device
* buffer management primitives.
*/
rtems_device_driver
rtems_blkdev_generic_read(
4cc2a: 202e fff8 movel %fp@(-8),%d0
4cc2e: d082 addl %d2,%d0
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)
4cc30: 4a86 tstl %d6
4cc32: 66aa bnes 4cbde <rtems_blkdev_generic_read+0x62>
4cc34: 4280 clrl %d0
blkofs = 0;
block++;
}
return rc;
}
4cc36: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4cc3c: 4e5e unlk %fp <== NOT EXECUTED
0004cc40 <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)
{
4cc40: 4e56 ffd0 linkw %fp,#-48
4cc44: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4cc48: 246e 0010 moveal %fp@(16),%a2
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);
4cc4c: 4282 clrl %d2
4cc4e: 260e movel %fp,%d3
4cc50: 5983 subql #4,%d3
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
rc = rtems_bdbuf_get(dd, block, &diskbuf);
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cc52: 4bf9 0004 c438 lea 4c438 <rtems_bdbuf_read>,%a5
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;
4cc58: 2052 moveal %a2@,%a0
4cc5a: 2668 002c moveal %a0@(44),%a3
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
4cc5e: 2e2a 000c movel %a2@(12),%d7
{
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;
4cc62: 286b 0024 moveal %a3@(36),%a4
char *buf = args->buffer;
uint32_t count = args->count;
4cc66: 2c2a 0010 movel %a2@(16),%d6
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4cc6a: 282a 0004 movel %a2@(4),%d4
4cc6e: 2a2a 0008 movel %a2@(8),%d5
4cc72: 2f0c movel %a4,%sp@-
4cc74: 2f02 movel %d2,%sp@-
4cc76: 2f05 movel %d5,%sp@-
4cc78: 2f04 movel %d4,%sp@-
4cc7a: 4eb9 0005 c578 jsr 5c578 <__divdi3>
4cc80: 4fef 0010 lea %sp@(16),%sp
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cc84: 2f0c movel %a4,%sp@-
4cc86: 2f02 movel %d2,%sp@-
4cc88: 2f05 movel %d5,%sp@-
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);
4cc8a: 2d41 fff8 movel %d1,%fp@(-8)
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cc8e: 2f04 movel %d4,%sp@-
4cc90: 4eb9 0005 c9d8 jsr 5c9d8 <__moddi3>
4cc96: 4fef 0010 lea %sp@(16),%sp
4cc9a: 2801 movel %d1,%d4
args->bytes_moved = 0;
4cc9c: 42aa 0018 clrl %a2@(24)
while (count > 0)
4cca0: 6062 bras 4cd04 <rtems_blkdev_generic_write+0xc4>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
4cca2: 4a84 tstl %d4
4cca4: 6612 bnes 4ccb8 <rtems_blkdev_generic_write+0x78><== NEVER TAKEN
4cca6: b9c6 cmpal %d6,%a4
4cca8: 620e bhis 4ccb8 <rtems_blkdev_generic_write+0x78><== NEVER TAKEN
rc = rtems_bdbuf_get(dd, block, &diskbuf);
4ccaa: 2f03 movel %d3,%sp@-
4ccac: 2f00 movel %d0,%sp@-
4ccae: 2f0b movel %a3,%sp@-
4ccb0: 4eb9 0004 c37a jsr 4c37a <rtems_bdbuf_get>
4ccb6: 6008 bras 4ccc0 <rtems_blkdev_generic_write+0x80>
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4ccb8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ccba: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ccbc: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4ccbe: 4e95 jsr %a5@ <== NOT EXECUTED
4ccc0: 4fef 000c lea %sp@(12),%sp
if (rc != RTEMS_SUCCESSFUL)
4ccc4: 4a80 tstl %d0
4ccc6: 6648 bnes 4cd10 <rtems_blkdev_generic_write+0xd0><== NEVER TAKEN
break;
copy = block_size - blkofs;
4ccc8: 2a0c movel %a4,%d5
4ccca: 9a84 subl %d4,%d5
4cccc: bc85 cmpl %d5,%d6
4ccce: 6402 bccs 4ccd2 <rtems_blkdev_generic_write+0x92><== ALWAYS TAKEN
4ccd0: 2a06 movel %d6,%d5 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
4ccd2: 2f05 movel %d5,%sp@-
4ccd4: 226e fffc moveal %fp@(-4),%a1
4ccd8: 5282 addql #1,%d2
4ccda: 2f07 movel %d7,%sp@-
4ccdc: d8a9 001a addl %a1@(26),%d4
4cce0: 2f04 movel %d4,%sp@-
4cce2: 4eb9 0005 06dc jsr 506dc <memcpy>
args->bytes_moved += copy;
4cce8: dbaa 0018 addl %d5,%a2@(24)
rc = rtems_bdbuf_release_modified(diskbuf);
4ccec: 2f2e fffc movel %fp@(-4),%sp@-
4ccf0: 4eb9 0004 c666 jsr 4c666 <rtems_bdbuf_release_modified>
if (rc != RTEMS_SUCCESSFUL)
4ccf6: 4fef 0010 lea %sp@(16),%sp
4ccfa: 4a80 tstl %d0
4ccfc: 6612 bnes 4cd10 <rtems_blkdev_generic_write+0xd0><== NEVER TAKEN
break;
count -= copy;
4ccfe: 9c85 subl %d5,%d6
buf += copy;
4cd00: de85 addl %d5,%d7
blkofs = 0;
4cd02: 4284 clrl %d4
/* rtems_blkdev_generic_write --
* Generic block device write primitive. Implemented using block device
* buffer management primitives.
*/
rtems_device_driver
rtems_blkdev_generic_write(
4cd04: 202e fff8 movel %fp@(-8),%d0
4cd08: d082 addl %d2,%d0
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)
4cd0a: 4a86 tstl %d6
4cd0c: 6694 bnes 4cca2 <rtems_blkdev_generic_write+0x62>
4cd0e: 4280 clrl %d0
blkofs = 0;
block++;
}
return rc;
}
4cd10: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4cd16: 4e5e unlk %fp <== NOT EXECUTED
00042ae0 <rtems_blkdev_imfs_fsync_or_fdatasync>:
}
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
42ae0: 4e56 0000 linkw %fp,#0
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
42ae4: 206e 0008 moveal %fp@(8),%a0
42ae8: 2068 0018 moveal %a0@(24),%a0
)
{
int rv = 0;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
42aec: 2f28 004e movel %a0@(78),%sp@-
42af0: 4eb9 0004 d302 jsr 4d302 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
42af6: 588f addql #4,%sp
static int rtems_blkdev_imfs_fsync_or_fdatasync(
rtems_libio_t *iop
)
{
int rv = 0;
42af8: 4281 clrl %d1
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rtems_status_code sc = rtems_bdbuf_syncdev(dd);
if (sc != RTEMS_SUCCESSFUL) {
42afa: 4a80 tstl %d0
42afc: 670e beqs 42b0c <rtems_blkdev_imfs_fsync_or_fdatasync+0x2c><== ALWAYS TAKEN
errno = EIO;
42afe: 4eb9 0005 0554 jsr 50554 <__errno> <== NOT EXECUTED
42b04: 72ff moveq #-1,%d1 <== NOT EXECUTED
42b06: 2040 moveal %d0,%a0 <== NOT EXECUTED
42b08: 7005 moveq #5,%d0 <== NOT EXECUTED
42b0a: 2080 movel %d0,%a0@ <== NOT EXECUTED
rv = -1;
}
return rv;
}
42b0c: 2001 movel %d1,%d0
42b0e: 4e5e unlk %fp <== NOT EXECUTED
00042b12 <rtems_blkdev_imfs_ioctl>:
static int rtems_blkdev_imfs_ioctl(
rtems_libio_t *iop,
uint32_t request,
void *buffer
)
{
42b12: 4e56 0000 linkw %fp,#0
42b16: 206e 0008 moveal %fp@(8),%a0
42b1a: 202e 000c movel %fp@(12),%d0
int rv = 0;
if (request != RTEMS_BLKIO_REQUEST) {
42b1e: 0c80 c018 4201 cmpil #-1072152063,%d0
42b24: 6714 beqs 42b3a <rtems_blkdev_imfs_ioctl+0x28> <== NEVER TAKEN
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
42b26: 2068 0018 moveal %a0@(24),%a0
42b2a: 2068 004e moveal %a0@(78),%a0
if (request != RTEMS_BLKIO_REQUEST) {
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rv = (*dd->ioctl)(dd, request, buffer);
42b2e: 2d48 0008 movel %a0,%fp@(8)
errno = EINVAL;
rv = -1;
}
return rv;
}
42b32: 4e5e unlk %fp
if (request != RTEMS_BLKIO_REQUEST) {
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
rv = (*dd->ioctl)(dd, request, buffer);
42b34: 2268 0038 moveal %a0@(56),%a1
42b38: 4ed1 jmp %a1@
} else {
/*
* It is not allowed to directly access the driver circumventing the cache.
*/
errno = EINVAL;
42b3a: 4eb9 0005 0554 jsr 50554 <__errno> <== NOT EXECUTED
42b40: 7216 moveq #22,%d1 <== NOT EXECUTED
42b42: 2040 moveal %d0,%a0 <== NOT EXECUTED
rv = -1;
}
return rv;
}
42b44: 70ff moveq #-1,%d0 <== NOT EXECUTED
42b46: 4e5e unlk %fp <== NOT EXECUTED
rv = (*dd->ioctl)(dd, request, buffer);
} else {
/*
* It is not allowed to directly access the driver circumventing the cache.
*/
errno = EINVAL;
42b48: 2081 movel %d1,%a0@ <== NOT EXECUTED
rv = -1;
}
return rv;
}
00042962 <rtems_blkdev_imfs_read>:
static ssize_t rtems_blkdev_imfs_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
42962: 4e56 ffc8 linkw %fp,#-56
42966: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4296a: 246e 0008 moveal %fp@(8),%a2
if (copy > remaining) {
copy = remaining;
}
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
4296e: 4bf9 0005 0e04 lea 50e04 <memcpy>,%a5
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
42974: 206a 0018 moveal %a2@(24),%a0
42978: 2668 004e moveal %a0@(78),%a3
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
4297c: 2e2b 0024 movel %a3@(36),%d7
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
42980: 2a07 movel %d7,%d5
42982: 5bc4 smi %d4
42984: 49c4 extbl %d4
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
42986: 242a 0004 movel %a2@(4),%d2
4298a: 262a 0008 movel %a2@(8),%d3
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
4298e: 2f05 movel %d5,%sp@-
42990: 2f04 movel %d4,%sp@-
42992: 2f03 movel %d3,%sp@-
42994: 2f02 movel %d2,%sp@-
42996: 4eb9 0005 cd4c jsr 5cd4c <__divdi3>
4299c: 4fef 0010 lea %sp@(16),%sp
429a0: 2c01 movel %d1,%d6
ssize_t block_offset = (ssize_t) (offset % block_size);
429a2: 2f05 movel %d5,%sp@-
429a4: 2f04 movel %d4,%sp@-
char *dst = buffer;
while (remaining > 0) {
rtems_bdbuf_buffer *bd;
rtems_status_code sc = rtems_bdbuf_read(dd, block, &bd);
429a6: 280e movel %fp,%d4
429a8: 5984 subql #4,%d4
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);
ssize_t block_offset = (ssize_t) (offset % block_size);
429aa: 2f03 movel %d3,%sp@-
429ac: 2f02 movel %d2,%sp@-
429ae: 4eb9 0005 d1ac jsr 5d1ac <__moddi3>
char *dst = buffer;
429b4: 262e 000c movel %fp@(12),%d3
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);
ssize_t block_offset = (ssize_t) (offset % block_size);
429b8: 4fef 0010 lea %sp@(16),%sp
)
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
429bc: 242e 0010 movel %fp@(16),%d2
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) {
429c0: 604e bras 42a10 <rtems_blkdev_imfs_read+0xae>
rtems_bdbuf_buffer *bd;
rtems_status_code sc = rtems_bdbuf_read(dd, block, &bd);
429c2: 2f04 movel %d4,%sp@-
429c4: 2f06 movel %d6,%sp@-
429c6: 2d41 fff0 movel %d1,%fp@(-16)
429ca: 2f0b movel %a3,%sp@-
429cc: 4eb9 0004 cf88 jsr 4cf88 <rtems_bdbuf_read>
if (sc == RTEMS_SUCCESSFUL) {
429d2: 222e fff0 movel %fp@(-16),%d1
429d6: 4fef 000c lea %sp@(12),%sp
429da: 4a80 tstl %d0
429dc: 6662 bnes 42a40 <rtems_blkdev_imfs_read+0xde> <== NEVER TAKEN
ssize_t copy = block_size - block_offset;
429de: 2a07 movel %d7,%d5
429e0: 9a81 subl %d1,%d5
429e2: b485 cmpl %d5,%d2
429e4: 6c02 bges 429e8 <rtems_blkdev_imfs_read+0x86>
429e6: 2a02 movel %d2,%d5
if (copy > remaining) {
copy = remaining;
}
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
429e8: 286e fffc moveal %fp@(-4),%a4
429ec: 2f05 movel %d5,%sp@-
429ee: d2ac 001a addl %a4@(26),%d1
429f2: 2f01 movel %d1,%sp@-
429f4: 2f03 movel %d3,%sp@-
429f6: 4e95 jsr %a5@
sc = rtems_bdbuf_release(bd);
429f8: 2f0c movel %a4,%sp@-
429fa: 4eb9 0004 d114 jsr 4d114 <rtems_bdbuf_release>
if (sc == RTEMS_SUCCESSFUL) {
42a00: 4fef 0010 lea %sp@(16),%sp
42a04: 4a80 tstl %d0
42a06: 6638 bnes 42a40 <rtems_blkdev_imfs_read+0xde> <== NEVER TAKEN
block_offset = 0;
remaining -= copy;
42a08: 9485 subl %d5,%d2
dst += copy;
42a0a: d685 addl %d5,%d3
++block;
42a0c: 5286 addql #1,%d6
memcpy(dst, (char *) bd->buffer + block_offset, (size_t) copy);
sc = rtems_bdbuf_release(bd);
if (sc == RTEMS_SUCCESSFUL) {
block_offset = 0;
42a0e: 4281 clrl %d1
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) {
42a10: 4a82 tstl %d2
42a12: 6eae bgts 429c2 <rtems_blkdev_imfs_read+0x60>
} else {
remaining = -1;
}
}
if (remaining >= 0) {
42a14: 662a bnes 42a40 <rtems_blkdev_imfs_read+0xde> <== NEVER TAKEN
iop->offset += count;
42a16: 202e 0010 movel %fp@(16),%d0
42a1a: 91c8 subal %a0,%a0
42a1c: 2d40 fff8 movel %d0,%fp@(-8)
42a20: 2d48 fff4 movel %a0,%fp@(-12)
42a24: 202e fff4 movel %fp@(-12),%d0
42a28: 222e fff8 movel %fp@(-8),%d1
42a2c: d3aa 0008 addl %d1,%a2@(8)
42a30: 242a 0004 movel %a2@(4),%d2
42a34: d580 addxl %d0,%d2
42a36: 2542 0004 movel %d2,%a2@(4)
rv = (ssize_t) count;
42a3a: 202e 0010 movel %fp@(16),%d0
42a3e: 600e bras 42a4e <rtems_blkdev_imfs_read+0xec>
} else {
errno = EIO;
42a40: 4eb9 0005 0554 jsr 50554 <__errno> <== NOT EXECUTED
42a46: 7205 moveq #5,%d1 <== NOT EXECUTED
42a48: 2040 moveal %d0,%a0 <== NOT EXECUTED
rv = -1;
42a4a: 70ff moveq #-1,%d0 <== NOT EXECUTED
if (remaining >= 0) {
iop->offset += count;
rv = (ssize_t) count;
} else {
errno = EIO;
42a4c: 2081 movel %d1,%a0@ <== NOT EXECUTED
rv = -1;
}
return rv;
}
42a4e: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
42a54: 4e5e unlk %fp <== NOT EXECUTED
0004285a <rtems_blkdev_imfs_write>:
static ssize_t rtems_blkdev_imfs_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4285a: 4e56 ffcc linkw %fp,#-52
4285e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42862: 246e 0008 moveal %fp@(8),%a2
if (copy > remaining) {
copy = remaining;
}
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
42866: 4bf9 0005 0e04 lea 50e04 <memcpy>,%a5
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
4286c: 206a 0018 moveal %a2@(24),%a0
42870: 2668 004e moveal %a0@(78),%a3
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
42874: 2e2b 0024 movel %a3@(36),%d7
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
42878: 2a07 movel %d7,%d5
4287a: 5bc4 smi %d4
4287c: 49c4 extbl %d4
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
off_t offset = iop->offset;
4287e: 242a 0004 movel %a2@(4),%d2
42882: 262a 0008 movel %a2@(8),%d3
ssize_t block_size = (ssize_t) rtems_disk_get_block_size(dd);
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (offset / block_size);
42886: 2f05 movel %d5,%sp@-
42888: 2f04 movel %d4,%sp@-
4288a: 2f03 movel %d3,%sp@-
4288c: 2f02 movel %d2,%sp@-
4288e: 4eb9 0005 cd4c jsr 5cd4c <__divdi3>
42894: 4fef 0010 lea %sp@(16),%sp
42898: 2c01 movel %d1,%d6
ssize_t block_offset = (ssize_t) (offset % block_size);
4289a: 2f05 movel %d5,%sp@-
4289c: 2f04 movel %d4,%sp@-
4289e: 280e movel %fp,%d4
428a0: 5984 subql #4,%d4
428a2: 2f03 movel %d3,%sp@-
428a4: 2f02 movel %d2,%sp@-
428a6: 4eb9 0005 d1ac jsr 5d1ac <__moddi3>
const char *src = buffer;
428ac: 262e 000c movel %fp@(12),%d3
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);
ssize_t block_offset = (ssize_t) (offset % block_size);
428b0: 4fef 0010 lea %sp@(16),%sp
428b4: 2a01 movel %d1,%d5
)
{
int rv;
rtems_blkdev_imfs_context *ctx = IMFS_generic_get_context_by_iop(iop);
rtems_disk_device *dd = &ctx->dd;
ssize_t remaining = (ssize_t) count;
428b6: 242e 0010 movel %fp@(16),%d2
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) {
428ba: 605e bras 4291a <rtems_blkdev_imfs_write+0xc0>
rtems_status_code sc;
rtems_bdbuf_buffer *bd;
if (block_offset == 0 && remaining >= block_size) {
428bc: 4a85 tstl %d5
428be: 6612 bnes 428d2 <rtems_blkdev_imfs_write+0x78>
428c0: be82 cmpl %d2,%d7
428c2: 6e0e bgts 428d2 <rtems_blkdev_imfs_write+0x78>
sc = rtems_bdbuf_get(dd, block, &bd);
428c4: 2f04 movel %d4,%sp@-
428c6: 2f06 movel %d6,%sp@-
428c8: 2f0b movel %a3,%sp@-
428ca: 4eb9 0004 ceca jsr 4ceca <rtems_bdbuf_get>
428d0: 600c bras 428de <rtems_blkdev_imfs_write+0x84>
} else {
sc = rtems_bdbuf_read(dd, block, &bd);
428d2: 2f04 movel %d4,%sp@-
428d4: 2f06 movel %d6,%sp@-
428d6: 2f0b movel %a3,%sp@-
428d8: 4eb9 0004 cf88 jsr 4cf88 <rtems_bdbuf_read>
428de: 4fef 000c lea %sp@(12),%sp
}
if (sc == RTEMS_SUCCESSFUL) {
428e2: 4a80 tstl %d0
428e4: 6664 bnes 4294a <rtems_blkdev_imfs_write+0xf0> <== NEVER TAKEN
ssize_t copy = block_size - block_offset;
428e6: 2847 moveal %d7,%a4
428e8: 99c5 subal %d5,%a4
428ea: b48c cmpl %a4,%d2
428ec: 6c02 bges 428f0 <rtems_blkdev_imfs_write+0x96>
428ee: 2842 moveal %d2,%a4
if (copy > remaining) {
copy = remaining;
}
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
428f0: 2f0c movel %a4,%sp@-
428f2: 226e fffc moveal %fp@(-4),%a1
428f6: 2f03 movel %d3,%sp@-
428f8: daa9 001a addl %a1@(26),%d5
428fc: 2f05 movel %d5,%sp@-
428fe: 4e95 jsr %a5@
sc = rtems_bdbuf_release_modified(bd);
42900: 2f2e fffc movel %fp@(-4),%sp@-
42904: 4eb9 0004 d1b6 jsr 4d1b6 <rtems_bdbuf_release_modified>
if (sc == RTEMS_SUCCESSFUL) {
4290a: 4fef 0010 lea %sp@(16),%sp
4290e: 4a80 tstl %d0
42910: 6638 bnes 4294a <rtems_blkdev_imfs_write+0xf0> <== NEVER TAKEN
block_offset = 0;
remaining -= copy;
42912: 948c subl %a4,%d2
src += copy;
42914: d68c addl %a4,%d3
++block;
42916: 5286 addql #1,%d6
memcpy((char *) bd->buffer + block_offset, src, (size_t) copy);
sc = rtems_bdbuf_release_modified(bd);
if (sc == RTEMS_SUCCESSFUL) {
block_offset = 0;
42918: 4285 clrl %d5
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) {
4291a: 4a82 tstl %d2
4291c: 6e9e bgts 428bc <rtems_blkdev_imfs_write+0x62>
} else {
remaining = -1;
}
}
if (remaining >= 0) {
4291e: 662a bnes 4294a <rtems_blkdev_imfs_write+0xf0> <== NEVER TAKEN
iop->offset += count;
42920: 202e 0010 movel %fp@(16),%d0
42924: 91c8 subal %a0,%a0
42926: 2d40 fff8 movel %d0,%fp@(-8)
4292a: 2d48 fff4 movel %a0,%fp@(-12)
4292e: 202e fff4 movel %fp@(-12),%d0
42932: 222e fff8 movel %fp@(-8),%d1
42936: d3aa 0008 addl %d1,%a2@(8)
4293a: 242a 0004 movel %a2@(4),%d2
4293e: d580 addxl %d0,%d2
42940: 2542 0004 movel %d2,%a2@(4)
rv = (ssize_t) count;
42944: 202e 0010 movel %fp@(16),%d0
42948: 600e bras 42958 <rtems_blkdev_imfs_write+0xfe>
} else {
errno = EIO;
4294a: 4eb9 0005 0554 jsr 50554 <__errno> <== NOT EXECUTED
42950: 2040 moveal %d0,%a0 <== NOT EXECUTED
42952: 7005 moveq #5,%d0 <== NOT EXECUTED
42954: 2080 movel %d0,%a0@ <== NOT EXECUTED
rv = -1;
42956: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
return rv;
}
42958: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4295e: 4e5e unlk %fp <== NOT EXECUTED
0004ca8c <rtems_blkdev_ioctl>:
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
4ca8c: 4e56 0000 linkw %fp,#0
4ca90: 206e 0008 moveal %fp@(8),%a0
4ca94: 202e 000c movel %fp@(12),%d0
4ca98: 226e 0010 moveal %fp@(16),%a1
rtems_status_code sc;
int rc = 0;
switch (req)
4ca9c: 0c80 4004 4203 cmpil #1074020867,%d0
4caa2: 675e beqs 4cb02 <rtems_blkdev_ioctl+0x76>
4caa4: 622e bhis 4cad4 <rtems_blkdev_ioctl+0x48>
4caa6: 0c80 2000 420a cmpil #536887818,%d0
4caac: 6700 0094 beqw 4cb42 <rtems_blkdev_ioctl+0xb6>
4cab0: 620c bhis 4cabe <rtems_blkdev_ioctl+0x32>
4cab2: 0c80 2000 4206 cmpil #536887814,%d0
4cab8: 6600 00ae bnew 4cb68 <rtems_blkdev_ioctl+0xdc>
4cabc: 6064 bras 4cb22 <rtems_blkdev_ioctl+0x96>
4cabe: 0c80 2000 420c cmpil #536887820,%d0
4cac4: 6700 0094 beqw 4cb5a <rtems_blkdev_ioctl+0xce>
4cac8: 0c80 4004 4202 cmpil #1074020866,%d0
4cace: 6600 0098 bnew 4cb68 <rtems_blkdev_ioctl+0xdc>
4cad2: 6028 bras 4cafc <rtems_blkdev_ioctl+0x70>
4cad4: 0c80 4004 4209 cmpil #1074020873,%d0
4cada: 6762 beqs 4cb3e <rtems_blkdev_ioctl+0xb2>
4cadc: 620c bhis 4caea <rtems_blkdev_ioctl+0x5e>
4cade: 0c80 4004 4205 cmpil #1074020869,%d0
4cae4: 6600 0082 bnew 4cb68 <rtems_blkdev_ioctl+0xdc>
4cae8: 6032 bras 4cb1c <rtems_blkdev_ioctl+0x90>
4caea: 0c80 4004 420b cmpil #1074020875,%d0
4caf0: 675a beqs 4cb4c <rtems_blkdev_ioctl+0xc0>
4caf2: 0c80 8004 4204 cmpil #-2147204604,%d0
4caf8: 666e bnes 4cb68 <rtems_blkdev_ioctl+0xdc> <== NEVER TAKEN
4cafa: 600c bras 4cb08 <rtems_blkdev_ioctl+0x7c>
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*(uint32_t *) argp = dd->media_block_size;
4cafc: 22a8 0020 movel %a0@(32),%a1@
4cb00: 6062 bras 4cb64 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_GETBLKSIZE:
*(uint32_t *) argp = dd->block_size;
4cb02: 22a8 0024 movel %a0@(36),%a1@
4cb06: 605c bras 4cb64 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_SETBLKSIZE:
sc = rtems_bdbuf_set_block_size(dd, *(uint32_t *) argp, true);
4cb08: 4878 0001 pea 1 <ADD>
4cb0c: 2f11 movel %a1@,%sp@-
4cb0e: 2f08 movel %a0,%sp@-
4cb10: 4eb9 0004 c972 jsr 4c972 <rtems_bdbuf_set_block_size>
if (sc != RTEMS_SUCCESSFUL) {
4cb16: 4fef 000c lea %sp@(12),%sp
4cb1a: 6010 bras 4cb2c <rtems_blkdev_ioctl+0xa0>
rc = -1;
}
break;
case RTEMS_BLKIO_GETSIZE:
*(rtems_blkdev_bnum *) argp = dd->size;
4cb1c: 22a8 001c movel %a0@(28),%a1@
4cb20: 6042 bras 4cb64 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_SYNCDEV:
sc = rtems_bdbuf_syncdev(dd);
4cb22: 2f08 movel %a0,%sp@-
4cb24: 4eb9 0004 c7b2 jsr 4c7b2 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
4cb2a: 588f addql #4,%sp
4cb2c: 4a80 tstl %d0
4cb2e: 6734 beqs 4cb64 <rtems_blkdev_ioctl+0xd8> <== ALWAYS TAKEN
errno = EIO;
4cb30: 4eb9 0004 febc jsr 4febc <__errno> <== NOT EXECUTED
4cb36: 7205 moveq #5,%d1 <== NOT EXECUTED
4cb38: 2040 moveal %d0,%a0 <== NOT EXECUTED
4cb3a: 2081 movel %d1,%a0@ <== NOT EXECUTED
4cb3c: 6036 bras 4cb74 <rtems_blkdev_ioctl+0xe8> <== NOT EXECUTED
rc = -1;
}
break;
case RTEMS_BLKIO_GETDISKDEV:
*(rtems_disk_device **) argp = dd;
4cb3e: 2288 movel %a0,%a1@
4cb40: 6022 bras 4cb64 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_PURGEDEV:
rtems_bdbuf_purge_dev(dd);
4cb42: 2f08 movel %a0,%sp@-
4cb44: 4eb9 0004 c80a jsr 4c80a <rtems_bdbuf_purge_dev>
4cb4a: 6016 bras 4cb62 <rtems_blkdev_ioctl+0xd6>
break;
case RTEMS_BLKIO_GETDEVSTATS:
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
4cb4c: 2f09 movel %a1,%sp@-
4cb4e: 2f08 movel %a0,%sp@-
4cb50: 4eb9 0004 ca28 jsr 4ca28 <rtems_bdbuf_get_device_stats>
break;
4cb56: 508f addql #8,%sp
4cb58: 600a bras 4cb64 <rtems_blkdev_ioctl+0xd8>
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
4cb5a: 2f08 movel %a0,%sp@-
4cb5c: 4eb9 0004 ca5e jsr 4ca5e <rtems_bdbuf_reset_device_stats>
break;
4cb62: 588f addql #4,%sp
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
rtems_status_code sc;
int rc = 0;
4cb64: 4280 clrl %d0
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
break;
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
break;
4cb66: 600e bras 4cb76 <rtems_blkdev_ioctl+0xea>
default:
errno = EINVAL;
4cb68: 4eb9 0004 febc jsr 4febc <__errno>
4cb6e: 2040 moveal %d0,%a0
4cb70: 7016 moveq #22,%d0
4cb72: 2080 movel %d0,%a0@
rc = -1;
4cb74: 70ff moveq #-1,%d0
break;
}
return rc;
}
4cb76: 4e5e unlk %fp
...
0005c4d8 <rtems_blkstats>:
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
5c4d8: 4e56 ff8c linkw %fp,#-116 <== NOT EXECUTED
5c4dc: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
int fd = open(device, O_RDONLY);
5c4e0: 42a7 clrl %sp@- <== NOT EXECUTED
5c4e2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
5c4e6: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
5c4ea: 182e 0013 moveb %fp@(19),%d4 <== NOT EXECUTED
int fd = open(device, O_RDONLY);
5c4ee: 4eb9 0004 338c jsr 4338c <open> <== NOT EXECUTED
if (fd >= 0) {
5c4f4: 508f addql #8,%sp <== NOT EXECUTED
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
int fd = open(device, O_RDONLY);
5c4f6: 2600 movel %d0,%d3 <== NOT EXECUTED
if (fd >= 0) {
5c4f8: 6d00 010c bltw 5c606 <rtems_blkstats+0x12e> <== NOT EXECUTED
struct stat st;
int rv;
rv = fstat(fd, &st);
5c4fc: 486e ffba pea %fp@(-70) <== NOT EXECUTED
5c500: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c502: 4eb9 0005 dc48 jsr 5dc48 <fstat> <== NOT EXECUTED
if (rv == 0) {
5c508: 508f addql #8,%sp <== NOT EXECUTED
5c50a: 4a80 tstl %d0 <== NOT EXECUTED
5c50c: 6600 00ac bnew 5c5ba <rtems_blkstats+0xe2> <== NOT EXECUTED
if (S_ISBLK(st.st_mode)) {
5c510: 202e ffc6 movel %fp@(-58),%d0 <== NOT EXECUTED
5c514: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5c51a: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
5c520: 6600 0086 bnew 5c5a8 <rtems_blkstats+0xd0> <== NOT EXECUTED
if (reset) {
5c524: 4a04 tstb %d4 <== NOT EXECUTED
5c526: 6730 beqs 5c558 <rtems_blkstats+0x80> <== NOT EXECUTED
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
}
static inline int rtems_disk_fd_reset_device_stats(int fd)
{
return ioctl(fd, RTEMS_BLKIO_RESETDEVSTATS);
5c528: 2f3c 2000 420c movel #536887820,%sp@- <== NOT EXECUTED
5c52e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c530: 4eb9 0005 e590 jsr 5e590 <ioctl> <== NOT EXECUTED
rv = rtems_disk_fd_reset_device_stats(fd);
if (rv != 0) {
5c536: 508f addql #8,%sp <== NOT EXECUTED
5c538: 4a80 tstl %d0 <== NOT EXECUTED
5c53a: 6700 00a2 beqw 5c5de <rtems_blkstats+0x106> <== NOT EXECUTED
fprintf(output, "error: reset stats: %s\n", strerror(errno));
5c53e: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5c544: 2040 moveal %d0,%a0 <== NOT EXECUTED
5c546: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5c548: 4eb9 0007 3b4c jsr 73b4c <strerror> <== NOT EXECUTED
5c54e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c550: 4879 0008 cae9 pea 8cae9 <RTEMS_BDPART_MBR_MASTER_TYPE+0x10><== NOT EXECUTED
5c556: 607a bras 5c5d2 <rtems_blkstats+0xfa> <== NOT EXECUTED
}
} else {
rtems_blkdev_stats stats;
rv = rtems_disk_fd_get_device_stats(fd, &stats);
5c558: 280e movel %fp,%d4 <== NOT EXECUTED
5c55a: 0684 ffff ff9a addil #-102,%d4 <== NOT EXECUTED
static inline int rtems_disk_fd_get_device_stats(
int fd,
rtems_blkdev_stats *stats
)
{
return ioctl(fd, RTEMS_BLKIO_GETDEVSTATS, stats);
5c560: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5c562: 2f3c 4004 420b movel #1074020875,%sp@- <== NOT EXECUTED
5c568: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c56a: 4eb9 0005 e590 jsr 5e590 <ioctl> <== NOT EXECUTED
if (rv == 0) {
5c570: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5c574: 4a80 tstl %d0 <== NOT EXECUTED
5c576: 6616 bnes 5c58e <rtems_blkstats+0xb6> <== NOT EXECUTED
rtems_blkdev_print_stats(
5c578: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c57a: 4879 0006 e462 pea 6e462 <fprintf> <== NOT EXECUTED
5c580: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5c582: 4eb9 0005 c634 jsr 5c634 <rtems_blkdev_print_stats> <== NOT EXECUTED
5c588: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5c58c: 6050 bras 5c5de <rtems_blkstats+0x106> <== NOT EXECUTED
&stats,
(rtems_printk_plugin_t) fprintf,
output
);
} else {
fprintf(output, "error: get stats: %s\n", strerror(errno));
5c58e: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5c594: 2040 moveal %d0,%a0 <== NOT EXECUTED
5c596: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5c598: 4eb9 0007 3b4c jsr 73b4c <strerror> <== NOT EXECUTED
5c59e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c5a0: 4879 0008 cb01 pea 8cb01 <RTEMS_BDPART_MBR_MASTER_TYPE+0x28><== NOT EXECUTED
5c5a6: 602a bras 5c5d2 <rtems_blkstats+0xfa> <== NOT EXECUTED
}
}
} else {
fprintf(output, "error: not a block device\n");
5c5a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c5aa: 4879 0008 cb17 pea 8cb17 <RTEMS_BDPART_MBR_MASTER_TYPE+0x3e><== NOT EXECUTED
5c5b0: 4eb9 0006 e5b6 jsr 6e5b6 <fputs> <== NOT EXECUTED
5c5b6: 508f addql #8,%sp <== NOT EXECUTED
5c5b8: 6024 bras 5c5de <rtems_blkstats+0x106> <== NOT EXECUTED
}
} else {
fprintf(output, "error: get file stats: %s\n", strerror(errno));
5c5ba: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5c5c0: 2040 moveal %d0,%a0 <== NOT EXECUTED
5c5c2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5c5c4: 4eb9 0007 3b4c jsr 73b4c <strerror> <== NOT EXECUTED
5c5ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c5cc: 4879 0008 cb32 pea 8cb32 <RTEMS_BDPART_MBR_MASTER_TYPE+0x59><== NOT EXECUTED
5c5d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c5d4: 4eb9 0006 e462 jsr 6e462 <fprintf> <== NOT EXECUTED
5c5da: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
rv = close(fd);
5c5de: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c5e0: 4eb9 0005 da88 jsr 5da88 <close> <== NOT EXECUTED
if (rv != 0) {
5c5e6: 588f addql #4,%sp <== NOT EXECUTED
5c5e8: 4a80 tstl %d0 <== NOT EXECUTED
5c5ea: 673e beqs 5c62a <rtems_blkstats+0x152> <== NOT EXECUTED
fprintf(output, "error: close device: %s\n", strerror(errno));
5c5ec: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5c5f2: 2040 moveal %d0,%a0 <== NOT EXECUTED
5c5f4: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5c5f6: 4eb9 0007 3b4c jsr 73b4c <strerror> <== NOT EXECUTED
5c5fc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c5fe: 4879 0008 cb4d pea 8cb4d <RTEMS_BDPART_MBR_MASTER_TYPE+0x74><== NOT EXECUTED
5c604: 6018 bras 5c61e <rtems_blkstats+0x146> <== NOT EXECUTED
}
} else {
fprintf(output, "error: open device: %s\n", strerror(errno));
5c606: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
5c60c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5c60e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5c610: 4eb9 0007 3b4c jsr 73b4c <strerror> <== NOT EXECUTED
5c616: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c618: 4879 0008 cb66 pea 8cb66 <RTEMS_BDPART_MBR_MASTER_TYPE+0x8d><== NOT EXECUTED
5c61e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c620: 4eb9 0006 e462 jsr 6e462 <fprintf> <== NOT EXECUTED
5c626: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
}
5c62a: 4cee 001c ff8c moveml %fp@(-116),%d2-%d4 <== NOT EXECUTED
5c630: 4e5e unlk %fp <== NOT EXECUTED
00046de8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
46de8: 4e56 ffec linkw %fp,#-20
46dec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
46df0: 260e movel %fp,%d3
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
46df2: 45f9 0004 7394 lea 47394 <_Chain_Get>,%a2
46df8: 5983 subql #4,%d3
46dfa: 47f9 0004 622c lea 4622c <rtems_event_receive>,%a3
46e00: 6016 bras 46e18 <rtems_chain_get_with_wait+0x30>
46e02: 2f03 movel %d3,%sp@-
46e04: 2f2e 0010 movel %fp@(16),%sp@-
46e08: 42a7 clrl %sp@-
46e0a: 2f2e 000c movel %fp@(12),%sp@-
46e0e: 4e93 jsr %a3@
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
46e10: 4fef 0010 lea %sp@(16),%sp
46e14: 4a80 tstl %d0
46e16: 660e bnes 46e26 <rtems_chain_get_with_wait+0x3e> <== ALWAYS TAKEN
46e18: 2f2e 0008 movel %fp@(8),%sp@-
46e1c: 4e92 jsr %a2@
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
46e1e: 588f addql #4,%sp
46e20: 2400 movel %d0,%d2
46e22: 67de beqs 46e02 <rtems_chain_get_with_wait+0x1a>
46e24: 4280 clrl %d0
timeout,
&out
);
}
*node_ptr = node;
46e26: 206e 0014 moveal %fp@(20),%a0
46e2a: 2082 movel %d2,%a0@
return sc;
}
46e2c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
46e32: 4e5e unlk %fp
...
00042b60 <rtems_cpu_usage_report_with_plugin>:
*/
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
42b60: 4e56 ff90 linkw %fp,#-112
42b64: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42b68: 262e 0008 movel %fp@(8),%d3
42b6c: 246e 000c moveal %fp@(12),%a2
uint32_t seconds, nanoseconds;
#else
uint32_t total_units = 0;
#endif
if ( !print )
42b70: 4a8a tstl %a2
42b72: 6700 0212 beqw 42d86 <rtems_cpu_usage_report_with_plugin+0x226>
}
}
}
#endif
(*print)(
42b76: 4879 0005 cbf7 pea 5cbf7 <map.6766+0x11>
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
42b7c: 2a0e movel %fp,%d5
42b7e: 280e movel %fp,%d4
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
42b80: 2e0e movel %fp,%d7
42b82: 49f9 0005 fff6 lea 5fff6 <_Objects_Information_table+0x4>,%a4
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
42b88: 0685 ffff fff3 addil #-13,%d5
42b8e: 0684 ffff ffda addil #-38,%d4
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
42b94: 0687 ffff ffe2 addil #-30,%d7
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
42b9a: 4280 clrl %d0
42b9c: 4281 clrl %d1
}
}
}
#endif
(*print)(
42b9e: 2f03 movel %d3,%sp@-
42ba0: 2d40 ffe2 movel %d0,%fp@(-30)
42ba4: 2d41 ffe6 movel %d1,%fp@(-26)
* 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;
42ba8: 2239 0006 0220 movel 60220 <CPU_usage_Uptime_at_last_reset>,%d1
42bae: 2439 0006 0224 movel 60224 <CPU_usage_Uptime_at_last_reset+0x4>,%d2
42bb4: 2d41 ffc8 movel %d1,%fp@(-56)
42bb8: 2d42 ffcc movel %d2,%fp@(-52)
}
}
}
#endif
(*print)(
42bbc: 4e92 jsr %a2@
#endif
/*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
42bbe: 508f addql #8,%sp
"------------+----------------------------------------+---------------+---------\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 ] )
42bc0: 205c moveal %a4@+,%a0
42bc2: 4a88 tstl %a0
42bc4: 660c bnes 42bd2 <rtems_cpu_usage_report_with_plugin+0x72>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
42bc6: b9fc 0006 0002 cmpal #393218,%a4
42bcc: 66f2 bnes 42bc0 <rtems_cpu_usage_report_with_plugin+0x60>
42bce: 6000 0152 braw 42d22 <rtems_cpu_usage_report_with_plugin+0x1c2>
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
42bd2: 2668 0004 moveal %a0@(4),%a3
if ( information ) {
42bd6: 4a8b tstl %a3
42bd8: 6600 0136 bnew 42d10 <rtems_cpu_usage_report_with_plugin+0x1b0>
42bdc: 60e8 bras 42bc6 <rtems_cpu_usage_report_with_plugin+0x66><== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
42bde: 206b 0018 moveal %a3@(24),%a0
42be2: 2a70 2c00 moveal %a0@(00000000,%d2:l:4),%a5
if ( !the_thread )
42be6: 4a8d tstl %a5
42be8: 6700 0122 beqw 42d0c <rtems_cpu_usage_report_with_plugin+0x1ac>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
42bec: 2f05 movel %d5,%sp@-
42bee: 4878 000d pea d <OPER1+0x1>
42bf2: 2f2d 0008 movel %a5@(8),%sp@-
42bf6: 4eb9 0004 700c jsr 4700c <rtems_object_get_name>
(*print)(
42bfc: 2f05 movel %d5,%sp@-
42bfe: 2f2d 0008 movel %a5@(8),%sp@-
42c02: 4879 0005 cd69 pea 5cd69 <map.6766+0x183>
42c08: 2f03 movel %d3,%sp@-
42c0a: 4e92 jsr %a2@
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
42c0c: 2279 0006 01e6 moveal 601e6 <_Per_CPU_Information+0xe>,%a1
42c12: 4fef 001c lea %sp@(28),%sp
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
42c16: 202d 007e movel %a5@(126),%d0
42c1a: 222d 0082 movel %a5@(130),%d1
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
42c1e: 2a6d 0008 moveal %a5@(8),%a5
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
42c22: 2d40 ffea movel %d0,%fp@(-22)
42c26: 2d41 ffee movel %d1,%fp@(-18)
Thread_Control *the_thread,
Timestamp_Control *time_of_context_switch
)
{
#ifndef RTEMS_SMP
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
42c2a: bbe9 0008 cmpal %a1@(8),%a5
42c2e: 6600 0144 bnew 42d74 <rtems_cpu_usage_report_with_plugin+0x214>
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
42c32: 4879 0005 ffe0 pea 5ffe0 <_TOD+0x8>
*time_of_context_switch = _Thread_Time_of_last_context_switch;
42c38: 2039 0006 01f2 movel 601f2 <_Per_CPU_Information+0x1a>,%d0
42c3e: 2239 0006 01f6 movel 601f6 <_Per_CPU_Information+0x1e>,%d1
42c44: 2f04 movel %d4,%sp@-
42c46: 2d40 ffc0 movel %d0,%fp@(-64)
42c4a: 2d41 ffc4 movel %d1,%fp@(-60)
42c4e: 4eb9 0004 8228 jsr 48228 <_TOD_Get_with_nanoseconds>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
42c54: 202e ffda movel %fp@(-38),%d0
42c58: 222e ffde movel %fp@(-34),%d1
42c5c: 2c2e ffc0 movel %fp@(-64),%d6
42c60: 92ae ffc4 subl %fp@(-60),%d1
42c64: 9186 subxl %d6,%d0
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
42c66: d3ae ffee addl %d1,%fp@(-18)
42c6a: 2c2e ffea movel %fp@(-22),%d6
42c6e: dd80 addxl %d0,%d6
42c70: 2d46 ffea movel %d6,%fp@(-22)
42c74: 508f addql #8,%sp
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
42c76: 486e ffd6 pea %fp@(-42)
42c7a: 486e ffd2 pea %fp@(-46)
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
42c7e: 202e ffda movel %fp@(-38),%d0
42c82: 222e ffde movel %fp@(-34),%d1
42c86: 2f07 movel %d7,%sp@-
42c88: 486e ffea pea %fp@(-22)
42c8c: 2c2e ffc8 movel %fp@(-56),%d6
42c90: 92ae ffcc subl %fp@(-52),%d1
42c94: 9186 subxl %d6,%d0
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
42c96: 2c3c 0000 03e8 movel #1000,%d6
42c9c: 2d40 ffe2 movel %d0,%fp@(-30)
42ca0: 2d41 ffe6 movel %d1,%fp@(-26)
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
_Timestamp_Divide( &ran, &total, &ival, &fval );
42ca4: 4eb9 0004 a228 jsr 4a228 <_Timestamp64_Divide>
*/
seconds = _Timestamp_Get_seconds( &ran );
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
42caa: 2f2e ffd6 movel %fp@(-42),%sp@-
42cae: 2f2e ffd2 movel %fp@(-46),%sp@-
/*
* Print the information
*/
seconds = _Timestamp_Get_seconds( &ran );
42cb2: 206e ffea moveal %fp@(-22),%a0
42cb6: 226e ffee moveal %fp@(-18),%a1
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
42cba: 2f3c 3b9a ca00 movel #1000000000,%sp@-
42cc0: 42a7 clrl %sp@-
42cc2: 2f09 movel %a1,%sp@-
42cc4: 2d48 ffbc movel %a0,%fp@(-68)
42cc8: 2f08 movel %a0,%sp@-
42cca: 2d49 ffb8 movel %a1,%fp@(-72)
42cce: 4eb9 0005 a894 jsr 5a894 <__moddi3>
42cd4: 4fef 0010 lea %sp@(16),%sp
nanoseconds = _Timestamp_Get_nanoseconds( &ran ) /
42cd8: 4c46 1001 remul %d6,%d1,%d1
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
42cdc: 226e ffb8 moveal %fp@(-72),%a1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)( context,
42ce0: 2f01 movel %d1,%sp@-
42ce2: 206e ffbc moveal %fp@(-68),%a0
42ce6: 2f3c 3b9a ca00 movel #1000000000,%sp@-
42cec: 42a7 clrl %sp@-
42cee: 2f09 movel %a1,%sp@-
42cf0: 2f08 movel %a0,%sp@-
42cf2: 4eb9 0005 a434 jsr 5a434 <__divdi3>
42cf8: 4fef 000c lea %sp@(12),%sp
42cfc: 2e81 movel %d1,%sp@
42cfe: 4879 0005 cd7c pea 5cd7c <map.6766+0x196>
42d04: 2f03 movel %d3,%sp@-
42d06: 4e92 jsr %a2@
42d08: 4fef 0028 lea %sp@(40),%sp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
42d0c: 5282 addql #1,%d2
42d0e: 6002 bras 42d12 <rtems_cpu_usage_report_with_plugin+0x1b2>
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
42d10: 7401 moveq #1,%d2
for ( i=1 ; i <= information->maximum ; i++ ) {
42d12: 4280 clrl %d0
42d14: 302b 000e movew %a3@(14),%d0
42d18: b082 cmpl %d2,%d0
42d1a: 6400 fec2 bccw 42bde <rtems_cpu_usage_report_with_plugin+0x7e>
42d1e: 6000 fea6 braw 42bc6 <rtems_cpu_usage_report_with_plugin+0x66>
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
42d22: 243c 0000 03e8 movel #1000,%d2
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
42d28: 2f3c 3b9a ca00 movel #1000000000,%sp@-
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
seconds = _Timestamp_Get_seconds( &total );
42d2e: 282e ffe2 movel %fp@(-30),%d4
42d32: 2a2e ffe6 movel %fp@(-26),%d5
42d36: 42a7 clrl %sp@-
42d38: 2f05 movel %d5,%sp@-
42d3a: 2f04 movel %d4,%sp@-
42d3c: 4eb9 0005 a894 jsr 5a894 <__moddi3>
42d42: 4fef 0010 lea %sp@(16),%sp
nanoseconds = _Timestamp_Get_nanoseconds( &total ) /
42d46: 4c42 1001 remul %d2,%d1,%d1
TOD_NANOSECONDS_PER_MICROSECOND;
(*print)(
42d4a: 2f01 movel %d1,%sp@-
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
42d4c: 2f3c 3b9a ca00 movel #1000000000,%sp@-
42d52: 42a7 clrl %sp@-
42d54: 2f05 movel %d5,%sp@-
42d56: 2f04 movel %d4,%sp@-
42d58: 4eb9 0005 a434 jsr 5a434 <__divdi3>
42d5e: 4fef 000c lea %sp@(12),%sp
42d62: 2e81 movel %d1,%sp@
42d64: 4879 0005 cd94 pea 5cd94 <map.6766+0x1ae>
42d6a: 2f03 movel %d3,%sp@-
42d6c: 4e92 jsr %a2@
42d6e: 4fef 0010 lea %sp@(16),%sp
42d72: 6012 bras 42d86 <rtems_cpu_usage_report_with_plugin+0x226>
42d74: 4879 0005 ffe0 pea 5ffe0 <_TOD+0x8>
42d7a: 2f04 movel %d4,%sp@-
42d7c: 4eb9 0004 8228 jsr 48228 <_TOD_Get_with_nanoseconds>
42d82: 6000 fef0 braw 42c74 <rtems_cpu_usage_report_with_plugin+0x114>
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
42d86: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5
42d8c: 4e5e unlk %fp <== NOT EXECUTED
0004c2c4 <rtems_deviceio_errno>:
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4c2c4: 4280 clrl %d0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
4c2c6: 4e56 0000 linkw %fp,#0
4c2ca: 222e 0008 movel %fp@(8),%d1
4c2ce: 2f02 movel %d2,%sp@-
if (sc == RTEMS_SUCCESSFUL) {
4c2d0: 4a81 tstl %d1
4c2d2: 6722 beqs 4c2f6 <rtems_deviceio_errno+0x32>
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
4c2d4: 103c 001c moveb #28,%d0
4c2d8: b081 cmpl %d1,%d0
4c2da: 650c bcss 4c2e8 <rtems_deviceio_errno+0x24> <== NEVER TAKEN
eno = status_code_to_errno [sc];
4c2dc: 41f9 0005 ba44 lea 5ba44 <status_code_to_errno>,%a0
4c2e2: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2
4c2e6: 6002 bras 4c2ea <rtems_deviceio_errno+0x26>
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
4c2e8: 7416 moveq #22,%d2 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4c2ea: 4eb9 0004 c330 jsr 4c330 <__errno>
4c2f0: 2040 moveal %d0,%a0
return -1;
4c2f2: 70ff moveq #-1,%d0
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4c2f4: 2082 movel %d2,%a0@
return -1;
}
}
4c2f6: 242e fffc movel %fp@(-4),%d2
4c2fa: 4e5e unlk %fp
...
00042b7c <rtems_disk_create_phys>:
rtems_blkdev_bnum block_count,
rtems_block_device_ioctl handler,
void *driver_data,
const char *name
)
{
42b7c: 4e56 ffe8 linkw %fp,#-24
42b80: 48d7 003c moveml %d2-%d5,%sp@
42b84: 2a2e 0018 movel %fp@(24),%d5
42b88: 242e 0008 movel %fp@(8),%d2
42b8c: 262e 000c movel %fp@(12),%d3
rtems_disk_device *dd = NULL;
42b90: 42ae fff8 clrl %fp@(-8)
rtems_status_code sc = RTEMS_SUCCESSFUL;
char *alloc_name = NULL;
42b94: 42ae fffc clrl %fp@(-4)
if (handler == NULL) {
42b98: 4a85 tstl %d5
42b9a: 677a beqs 42c16 <rtems_disk_create_phys+0x9a> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
}
sc = disk_lock();
42b9c: 4eba fc48 jsr %pc@(427e6 <disk_lock>)
42ba0: 2800 movel %d0,%d4
if (sc != RTEMS_SUCCESSFUL) {
42ba2: 6674 bnes 42c18 <rtems_disk_create_phys+0x9c> <== NEVER TAKEN
return sc;
}
sc = create_disk(dev, name, &dd, &alloc_name);
42ba4: 486e fffc pea %fp@(-4)
42ba8: 486e fff8 pea %fp@(-8)
42bac: 2f2e 0020 movel %fp@(32),%sp@-
42bb0: 2f03 movel %d3,%sp@-
42bb2: 2f02 movel %d2,%sp@-
42bb4: 4eba fc8c jsr %pc@(42842 <create_disk>)
if (sc != RTEMS_SUCCESSFUL) {
42bb8: 4fef 0014 lea %sp@(20),%sp
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
sc = create_disk(dev, name, &dd, &alloc_name);
42bbc: 2800 movel %d0,%d4
if (sc != RTEMS_SUCCESSFUL) {
42bbe: 6702 beqs 42bc2 <rtems_disk_create_phys+0x46>
42bc0: 604e bras 42c10 <rtems_disk_create_phys+0x94>
disk_unlock();
return sc;
}
sc = rtems_disk_init_phys(
42bc2: 2f2e 001c movel %fp@(28),%sp@-
42bc6: 2f05 movel %d5,%sp@-
42bc8: 2f2e 0014 movel %fp@(20),%sp@-
42bcc: 2f2e 0010 movel %fp@(16),%sp@-
42bd0: 2f2e fff8 movel %fp@(-8),%sp@-
42bd4: 4eb9 0004 cefc jsr 4cefc <rtems_disk_init_phys>
block_count,
handler,
driver_data
);
dd->dev = dev;
42bda: 206e fff8 moveal %fp@(-8),%a0
disk_unlock();
return sc;
}
sc = rtems_disk_init_phys(
42bde: 2800 movel %d0,%d4
);
dd->dev = dev;
dd->name = alloc_name;
if (sc != RTEMS_SUCCESSFUL) {
42be0: 4fef 0014 lea %sp@(20),%sp
block_count,
handler,
driver_data
);
dd->dev = dev;
42be4: 2082 movel %d2,%a0@
42be6: 2143 0004 movel %d3,%a0@(4)
dd->name = alloc_name;
42bea: 216e fffc 0010 movel %fp@(-4),%a0@(16)
if (sc != RTEMS_SUCCESSFUL) {
42bf0: 4a80 tstl %d0
42bf2: 671c beqs 42c10 <rtems_disk_create_phys+0x94>
dd->ioctl = null_handler;
42bf4: 203c 0004 278e movel #272270,%d0
42bfa: 2140 0038 movel %d0,%a0@(56)
rtems_disk_delete(dev);
42bfe: 2f03 movel %d3,%sp@-
42c00: 2f02 movel %d2,%sp@-
42c02: 4eb9 0004 29a6 jsr 429a6 <rtems_disk_delete>
disk_unlock();
42c08: 4eba fc0a jsr %pc@(42814 <disk_unlock>)
42c0c: 508f addql #8,%sp
42c0e: 6008 bras 42c18 <rtems_disk_create_phys+0x9c>
return sc;
}
disk_unlock();
42c10: 4eba fc02 jsr %pc@(42814 <disk_unlock>)
42c14: 6002 bras 42c18 <rtems_disk_create_phys+0x9c>
rtems_disk_device *dd = NULL;
rtems_status_code sc = RTEMS_SUCCESSFUL;
char *alloc_name = NULL;
if (handler == NULL) {
return RTEMS_INVALID_ADDRESS;
42c16: 7809 moveq #9,%d4
}
disk_unlock();
return RTEMS_SUCCESSFUL;
}
42c18: 2004 movel %d4,%d0
42c1a: 4cee 003c ffe8 moveml %fp@(-24),%d2-%d5
42c20: 4e5e unlk %fp <== NOT EXECUTED
000429a6 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
429a6: 4e56 ffd8 linkw %fp,#-40
429aa: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
429ae: 4eba fe36 jsr %pc@(427e6 <disk_lock>)
429b2: 2c00 movel %d0,%d6
if (sc != RTEMS_SUCCESSFUL) {
429b4: 6600 00f8 bnew 42aae <rtems_disk_delete+0x108>
return sc;
}
dd = get_disk_entry(dev, true);
429b8: 4878 0001 pea 1 <ADD>
429bc: 2f2e 000c movel %fp@(12),%sp@-
429c0: 2f2e 0008 movel %fp@(8),%sp@-
429c4: 4eba fd6e jsr %pc@(42734 <get_disk_entry>)
if (dd == NULL) {
429c8: 4fef 000c lea %sp@(12),%sp
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
dd = get_disk_entry(dev, true);
429cc: 2040 moveal %d0,%a0
if (dd == NULL) {
429ce: 4a80 tstl %d0
429d0: 660c bnes 429de <rtems_disk_delete+0x38> <== ALWAYS TAKEN
disk_unlock();
429d2: 4eba fe40 jsr %pc@(42814 <disk_unlock>) <== NOT EXECUTED
return RTEMS_INVALID_ID;
429d6: 1c3c 0004 moveb #4,%d6 <== NOT EXECUTED
429da: 6000 00d2 braw 42aae <rtems_disk_delete+0x108> <== NOT EXECUTED
}
static void
rtems_disk_cleanup(rtems_disk_device *disk_to_remove)
{
rtems_disk_device *const physical_disk = disk_to_remove->phys_dev;
429de: 2468 0008 moveal %a0@(8),%a2
disk_unlock();
return RTEMS_INVALID_ID;
}
dd->deleted = true;
429e2: 7001 moveq #1,%d0
429e4: 1140 0040 moveb %d0,%a0@(64)
{
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) {
429e8: 4a2a 0040 tstb %a2@(64)
429ec: 6700 0094 beqw 42a82 <rtems_disk_delete+0xdc>
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
429f0: 4287 clrl %d7
for (major = 0; major < disktab_size; ++major) {
429f2: 4284 clrl %d4
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
429f4: 47fa fda2 lea %pc@(42798 <free_disk_device>),%a3
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;
429f8: 2412 movel %a2@,%d2
429fa: 262a 0004 movel %a2@(4),%d3
429fe: 6054 bras 42a54 <rtems_disk_delete+0xae>
}
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
42a00: 2004 movel %d4,%d0
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) {
42a02: 4285 clrl %d5
}
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
42a04: e788 lsll #3,%d0
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;
42a06: 2879 0006 0b7a moveal 60b7a <disktab>,%a4
42a0c: d9c0 addal %d0,%a4
42a0e: 603c bras 42a4c <rtems_disk_delete+0xa6>
}
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
42a10: 2005 movel %d5,%d0
42a12: e588 lsll #2,%d0
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
42a14: 2a54 moveal %a4@,%a5
42a16: dbc0 addal %d0,%a5
42a18: 2055 moveal %a5@,%a0
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
42a1a: 4a88 tstl %a0
42a1c: 672c beqs 42a4a <rtems_disk_delete+0xa4>
42a1e: 2268 0008 moveal %a0@(8),%a1
42a22: 2011 movel %a1@,%d0
42a24: 2229 0004 movel %a1@(4),%d1
42a28: 9283 subl %d3,%d1
42a2a: 9182 subxl %d2,%d0
42a2c: 661c bnes 42a4a <rtems_disk_delete+0xa4> <== NEVER TAKEN
42a2e: b5c8 cmpal %a0,%a2
42a30: 6718 beqs 42a4a <rtems_disk_delete+0xa4>
if (dd->uses == 0) {
42a32: 4aa8 0014 tstl %a0@(20)
42a36: 660c bnes 42a44 <rtems_disk_delete+0x9e>
++deleted_count;
dtab->minor [minor] = NULL;
42a38: 4295 clrl %a5@
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
if (dd->uses == 0) {
++deleted_count;
42a3a: 5287 addql #1,%d7
dtab->minor [minor] = NULL;
free_disk_device(dd);
42a3c: 2f08 movel %a0,%sp@-
42a3e: 4e93 jsr %a3@
42a40: 588f addql #4,%sp
42a42: 6006 bras 42a4a <rtems_disk_delete+0xa4>
} else {
dd->deleted = true;
42a44: 7201 moveq #1,%d1
42a46: 1141 0040 moveb %d1,%a0@(64)
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) {
42a4a: 5285 addql #1,%d5
42a4c: baac 0004 cmpl %a4@(4),%d5
42a50: 65be bcss 42a10 <rtems_disk_delete+0x6a>
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
42a52: 5284 addql #1,%d4
42a54: b8b9 0006 0b76 cmpl 60b76 <disktab_size>,%d4
42a5a: 65a4 bcss 42a00 <rtems_disk_delete+0x5a>
}
}
}
}
physical_disk->uses -= deleted_count;
42a5c: 202a 0014 movel %a2@(20),%d0
42a60: 9087 subl %d7,%d0
42a62: 2540 0014 movel %d0,%a2@(20)
if (physical_disk->uses == 0) {
42a66: 6642 bnes 42aaa <rtems_disk_delete+0x104>
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
42a68: 2012 movel %a2@,%d0
disktab [major].minor [minor] = NULL;
42a6a: 2079 0006 0b7a moveal 60b7a <disktab>,%a0
42a70: e788 lsll #3,%d0
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
42a72: 222a 0004 movel %a2@(4),%d1
disktab [major].minor [minor] = NULL;
42a76: 2070 0800 moveal %a0@(00000000,%d0:l),%a0
42a7a: 42b0 1c00 clrl %a0@(00000000,%d1:l:4)
free_disk_device(physical_disk);
42a7e: 2f0a movel %a2,%sp@-
42a80: 6022 bras 42aa4 <rtems_disk_delete+0xfe>
}
} else {
if (disk_to_remove->uses == 0) {
42a82: 4aa8 0014 tstl %a0@(20)
42a86: 6622 bnes 42aaa <rtems_disk_delete+0x104> <== NEVER TAKEN
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
42a88: 2010 movel %a0@,%d0
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
42a8a: 53aa 0014 subql #1,%a2@(20)
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
42a8e: 2279 0006 0b7a moveal 60b7a <disktab>,%a1
42a94: e788 lsll #3,%d0
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);
42a96: 2228 0004 movel %a0@(4),%d1
disktab [major].minor [minor] = NULL;
42a9a: 2271 0800 moveal %a1@(00000000,%d0:l),%a1
42a9e: 42b1 1c00 clrl %a1@(00000000,%d1:l:4)
free_disk_device(disk_to_remove);
42aa2: 2f08 movel %a0,%sp@-
42aa4: 4eba fcf2 jsr %pc@(42798 <free_disk_device>)
42aa8: 588f addql #4,%sp
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
42aaa: 4eba fd68 jsr %pc@(42814 <disk_unlock>)
return RTEMS_SUCCESSFUL;
}
42aae: 2006 movel %d6,%d0
42ab0: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
42ab6: 4e5e unlk %fp <== NOT EXECUTED
0004cf88 <rtems_disk_init_log>:
rtems_disk_device *dd,
rtems_disk_device *phys_dd,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
4cf88: 4e56 fff4 linkw %fp,#-12
4cf8c: 48d7 040c moveml %d2-%d3/%a2,%sp@
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
4cf90: 4878 0072 pea 72 <DBL_MANT_DIG+0x3d>
rtems_disk_device *dd,
rtems_disk_device *phys_dd,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
4cf94: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
4cf98: 42a7 clrl %sp@-
4cf9a: 2f2e 0008 movel %fp@(8),%sp@-
rtems_disk_device *dd,
rtems_disk_device *phys_dd,
rtems_blkdev_bnum block_begin,
rtems_blkdev_bnum block_count
)
{
4cf9e: 262e 0010 movel %fp@(16),%d3
4cfa2: 242e 0014 movel %fp@(20),%d2
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
4cfa6: 4eb9 0005 074c jsr 5074c <memset>
dd->media_block_size = phys_dd->media_block_size;
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (phys_dd->phys_dev == phys_dd) {
4cfac: 4fef 000c lea %sp@(12),%sp
rtems_blkdev_bnum block_count
)
{
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
4cfb0: 2040 moveal %d0,%a0
dd->start = block_begin;
dd->size = block_count;
dd->media_block_size = phys_dd->media_block_size;
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4cfb2: 70ff moveq #-1,%d0
{
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
dd->phys_dev = phys_dd;
4cfb4: 214a 0008 movel %a2,%a0@(8)
dd->start = block_begin;
dd->size = block_count;
dd->media_block_size = phys_dd->media_block_size;
4cfb8: 216a 0020 0020 movel %a2@(32),%a0@(32)
dd->ioctl = phys_dd->ioctl;
4cfbe: 216a 0038 0038 movel %a2@(56),%a0@(56)
dd->driver_data = phys_dd->driver_data;
4cfc4: 216a 003c 003c movel %a2@(60),%a0@(60)
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (phys_dd->phys_dev == phys_dd) {
4cfca: 226a 0008 moveal %a2@(8),%a1
dd->start = block_begin;
dd->size = block_count;
dd->media_block_size = phys_dd->media_block_size;
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4cfce: 2140 006a movel %d0,%a0@(106)
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
} else {
sc = RTEMS_INVALID_NUMBER;
}
} else {
sc = RTEMS_INVALID_ID;
4cfd2: 7004 moveq #4,%d0
rtems_status_code sc;
dd = memset(dd, 0, sizeof(*dd));
dd->phys_dev = phys_dd;
dd->start = block_begin;
4cfd4: 2143 0018 movel %d3,%a0@(24)
dd->size = block_count;
4cfd8: 2142 001c movel %d2,%a0@(28)
dd->media_block_size = phys_dd->media_block_size;
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (phys_dd->phys_dev == phys_dd) {
4cfdc: b5c9 cmpal %a1,%a2
4cfde: 6630 bnes 4d010 <rtems_disk_init_log+0x88> <== NEVER TAKEN
rtems_blkdev_bnum phys_block_count = phys_dd->size;
4cfe0: 2029 001c movel %a1@(28),%d0
if (
4cfe4: b083 cmpl %d3,%d0
4cfe6: 6326 blss 4d00e <rtems_disk_init_log+0x86>
block_begin < phys_block_count
&& block_count > 0
4cfe8: 4a82 tstl %d2
4cfea: 6722 beqs 4d00e <rtems_disk_init_log+0x86>
&& block_count <= phys_block_count - block_begin
4cfec: 9083 subl %d3,%d0
4cfee: b082 cmpl %d2,%d0
4cff0: 651c bcss 4d00e <rtems_disk_init_log+0x86>
) {
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
4cff2: 42ae 0010 clrl %fp@(16)
4cff6: 2d69 0020 000c movel %a1@(32),%fp@(12)
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
4cffc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
if (
block_begin < phys_block_count
&& block_count > 0
&& block_count <= phys_block_count - block_begin
) {
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
4d002: 2d48 0008 movel %a0,%fp@(8)
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
4d006: 4e5e unlk %fp
if (
block_begin < phys_block_count
&& block_count > 0
&& block_count <= phys_block_count - block_begin
) {
sc = rtems_bdbuf_set_block_size(dd, phys_dd->media_block_size, false);
4d008: 4ef9 0004 c972 jmp 4c972 <rtems_bdbuf_set_block_size>
} else {
sc = RTEMS_INVALID_NUMBER;
4d00e: 700a moveq #10,%d0
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
4d010: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4d016: 4e5e unlk %fp
...
00042e24 <rtems_disk_io_done>:
rtems_status_code
rtems_disk_io_done(void)
{
42e24: 4e56 ffec linkw %fp,#-20
42e28: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
42e2c: 4282 clrl %d2
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
if (dd != NULL) {
free_disk_device(dd);
42e2e: 47fa f968 lea %pc@(42798 <free_disk_device>),%a3
}
}
free(dtab->minor);
42e32: 49f9 0004 3810 lea 43810 <free>,%a4
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
42e38: 602e bras 42e68 <rtems_disk_io_done+0x44>
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
42e3a: 2002 movel %d2,%d0
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) {
42e3c: 4283 clrl %d3
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_disk_io_done(void)
42e3e: e788 lsll #3,%d0
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
rtems_disk_device_table *dtab = disktab + major;
42e40: 2479 0006 0b7a moveal 60b7a <disktab>,%a2
42e46: d5c0 addal %d0,%a2
for (minor = 0; minor < dtab->size; ++minor) {
42e48: 6010 bras 42e5a <rtems_disk_io_done+0x36>
rtems_disk_device *dd = dtab->minor [minor];
42e4a: 2052 moveal %a2@,%a0
42e4c: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0
if (dd != NULL) {
42e50: 6706 beqs 42e58 <rtems_disk_io_done+0x34> <== ALWAYS TAKEN
free_disk_device(dd);
42e52: 2f00 movel %d0,%sp@- <== NOT EXECUTED
42e54: 4e93 jsr %a3@ <== NOT EXECUTED
42e56: 588f addql #4,%sp <== NOT EXECUTED
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) {
42e58: 5283 addql #1,%d3
42e5a: b6aa 0004 cmpl %a2@(4),%d3
42e5e: 65ea bcss 42e4a <rtems_disk_io_done+0x26>
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
42e60: 2f12 movel %a2@,%sp@-
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
42e62: 5282 addql #1,%d2
if (dd != NULL) {
free_disk_device(dd);
}
}
free(dtab->minor);
42e64: 4e94 jsr %a4@
rtems_disk_io_done(void)
{
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
for (major = 0; major < disktab_size; ++major) {
42e66: 588f addql #4,%sp
42e68: b4b9 0006 0b76 cmpl 60b76 <disktab_size>,%d2
42e6e: 65ca bcss 42e3a <rtems_disk_io_done+0x16>
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
42e70: 2f39 0006 0b7a movel 60b7a <disktab>,%sp@-
42e76: 4eb9 0004 3810 jsr 43810 <free>
rtems_semaphore_delete(diskdevs_mutex);
42e7c: 2f39 0006 0b72 movel 60b72 <diskdevs_mutex>,%sp@-
42e82: 4eb9 0004 7308 jsr 47308 <rtems_semaphore_delete>
diskdevs_mutex = RTEMS_ID_NONE;
disktab = NULL;
disktab_size = 0;
return RTEMS_SUCCESSFUL;
}
42e88: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
42e8e: 4280 clrl %d0
42e90: 4e5e unlk %fp
}
free(disktab);
rtems_semaphore_delete(diskdevs_mutex);
diskdevs_mutex = RTEMS_ID_NONE;
42e92: 42b9 0006 0b72 clrl 60b72 <diskdevs_mutex>
disktab = NULL;
42e98: 42b9 0006 0b7a clrl 60b7a <disktab>
disktab_size = 0;
42e9e: 42b9 0006 0b76 clrl 60b76 <disktab_size>
return RTEMS_SUCCESSFUL;
}
...
00042d84 <rtems_disk_io_initialize>:
rtems_status_code
rtems_disk_io_initialize(void)
{
42d84: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
42d88: 4ab9 0006 0b76 tstl 60b76 <disktab_size>
42d8e: 6600 008a bnew 42e1a <rtems_disk_io_initialize+0x96>
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
42d92: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
42d96: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
42d9a: 4eb9 0004 3550 jsr 43550 <calloc>
if (disktab == NULL) {
42da0: 508f addql #8,%sp
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
42da2: 23c0 0006 0b7a movel %d0,60b7a <disktab>
if (disktab == NULL) {
42da8: 6774 beqs 42e1e <rtems_disk_io_initialize+0x9a> <== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
sc = rtems_semaphore_create(
42daa: 4879 0006 0b72 pea 60b72 <diskdevs_mutex>
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
42db0: 4200 clrb %d0
sc = rtems_semaphore_create(
42db2: 42a7 clrl %sp@-
42db4: 4878 0010 pea 10 <INVALID_OPERATION>
42db8: 4878 0001 pea 1 <ADD>
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
42dbc: 13c0 0006 0b70 moveb %d0,60b70 <diskdevs_protected>
sc = rtems_semaphore_create(
42dc2: 2f3c 4444 4556 movel #1145324886,%sp@-
42dc8: 4eb9 0004 7168 jsr 47168 <rtems_semaphore_create>
RTEMS_FIFO | RTEMS_BINARY_SEMAPHORE | RTEMS_NO_INHERIT_PRIORITY
| RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL,
0,
&diskdevs_mutex
);
if (sc != RTEMS_SUCCESSFUL) {
42dce: 4fef 0014 lea %sp@(20),%sp
42dd2: 4a80 tstl %d0
42dd4: 6710 beqs 42de6 <rtems_disk_io_initialize+0x62> <== ALWAYS TAKEN
free(disktab);
42dd6: 2f39 0006 0b7a movel 60b7a <disktab>,%sp@- <== NOT EXECUTED
42ddc: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
42de2: 588f addql #4,%sp <== NOT EXECUTED
42de4: 6038 bras 42e1e <rtems_disk_io_initialize+0x9a> <== NOT EXECUTED
}
sc = rtems_bdbuf_init();
42de6: 4eb9 0004 bfbe jsr 4bfbe <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
42dec: 4a80 tstl %d0
42dee: 671e beqs 42e0e <rtems_disk_io_initialize+0x8a> <== ALWAYS TAKEN
rtems_semaphore_delete(diskdevs_mutex);
42df0: 2f39 0006 0b72 movel 60b72 <diskdevs_mutex>,%sp@- <== NOT EXECUTED
42df6: 4eb9 0004 7308 jsr 47308 <rtems_semaphore_delete> <== NOT EXECUTED
free(disktab);
42dfc: 2f39 0006 0b7a movel 60b7a <disktab>,%sp@- <== NOT EXECUTED
42e02: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
42e08: 508f addql #8,%sp <== NOT EXECUTED
42e0a: 700d moveq #13,%d0 <== NOT EXECUTED
42e0c: 6012 bras 42e20 <rtems_disk_io_initialize+0x9c> <== NOT EXECUTED
}
disktab_size = size;
42e0e: 7008 moveq #8,%d0
42e10: 23c0 0006 0b76 movel %d0,60b76 <disktab_size>
return RTEMS_SUCCESSFUL;
42e16: 4200 clrb %d0
42e18: 6006 bras 42e20 <rtems_disk_io_initialize+0x9c>
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
42e1a: 4280 clrl %d0
42e1c: 6002 bras 42e20 <rtems_disk_io_initialize+0x9c>
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
42e1e: 701a moveq #26,%d0 <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
42e20: 4e5e unlk %fp <== NOT EXECUTED
00042cdc <rtems_disk_next>:
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
42cdc: 4e56 fff0 linkw %fp,#-16
42ce0: 202e 0008 movel %fp@(8),%d0
42ce4: 222e 000c movel %fp@(12),%d1
42ce8: 48d7 041c moveml %d2-%d4/%a2,%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) {
42cec: 74ff moveq #-1,%d2
42cee: 76ff moveq #-1,%d3
42cf0: 9681 subl %d1,%d3
42cf2: 9580 subxl %d0,%d2
42cf4: 6718 beqs 42d0e <rtems_disk_next+0x32>
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
42cf6: 2601 movel %d1,%d3
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
42cf8: 2040 moveal %d0,%a0
42cfa: 5283 addql #1,%d3
42cfc: 74ff moveq #-1,%d2
42cfe: b481 cmpl %d1,%d2
42d00: 6212 bhis 42d14 <rtems_disk_next+0x38> <== ALWAYS TAKEN
/* If major wraps around */
if ((major + 1) < major) {
42d02: 2408 movel %a0,%d2 <== NOT EXECUTED
42d04: 5282 addql #1,%d2 <== NOT EXECUTED
return NULL;
}
++major;
minor = 0;
42d06: 4283 clrl %d3 <== NOT EXECUTED
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
/* If major wraps around */
if ((major + 1) < major) {
42d08: b1c2 cmpal %d2,%a0 <== NOT EXECUTED
42d0a: 630a blss 42d16 <rtems_disk_next+0x3a> <== NOT EXECUTED
42d0c: 601e bras 42d2c <rtems_disk_next+0x50> <== 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;
42d0e: 4283 clrl %d3
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;
42d10: 4282 clrl %d2
42d12: 6002 bras 42d16 <rtems_disk_next+0x3a>
return temp.__overlay.major;
42d14: 2400 movel %d0,%d2
} else {
++minor;
}
}
sc = disk_lock();
42d16: 4eba face jsr %pc@(427e6 <disk_lock>)
if (sc != RTEMS_SUCCESSFUL) {
42d1a: 4a80 tstl %d0
42d1c: 660e bnes 42d2c <rtems_disk_next+0x50> <== NEVER TAKEN
return NULL;
}
if (major >= disktab_size) {
42d1e: 2039 0006 0b76 movel 60b76 <disktab_size>,%d0
42d24: b082 cmpl %d2,%d0
42d26: 6208 bhis 42d30 <rtems_disk_next+0x54> <== ALWAYS TAKEN
disk_unlock();
42d28: 4eba faea jsr %pc@(42814 <disk_unlock>)
return NULL;
42d2c: 4280 clrl %d0
42d2e: 604a bras 42d7a <rtems_disk_next+0x9e>
}
dtab = disktab + major;
42d30: 2802 movel %d2,%d4
42d32: 2239 0006 0b7a movel 60b7a <disktab>,%d1
42d38: 2441 moveal %d1,%a2
42d3a: e78c lsll #3,%d4
42d3c: d5c4 addal %d4,%a2
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
42d3e: 2052 moveal %a2@,%a0
42d40: 4a88 tstl %a0
42d42: 6706 beqs 42d4a <rtems_disk_next+0x6e>
42d44: b6aa 0004 cmpl %a2@(4),%d3
42d48: 6512 bcss 42d5c <rtems_disk_next+0x80>
minor = 0;
++major;
42d4a: 5282 addql #1,%d2
if (major >= disktab_size) {
42d4c: b082 cmpl %d2,%d0
42d4e: 63d8 blss 42d28 <rtems_disk_next+0x4c>
disk_unlock();
return NULL;
}
dtab = disktab + major;
42d50: 2602 movel %d2,%d3
42d52: 2441 moveal %d1,%a2
42d54: e78b lsll #3,%d3
42d56: d5c3 addal %d3,%a2
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
minor = 0;
42d58: 4283 clrl %d3
if (major >= disktab_size) {
disk_unlock();
return NULL;
}
dtab = disktab + major;
42d5a: 60e2 bras 42d3e <rtems_disk_next+0x62>
} else if (dtab->minor [minor] == NULL) {
42d5c: 2803 movel %d3,%d4
42d5e: e58c lsll #2,%d4
42d60: 2070 4800 moveal %a0@(00000000,%d4:l),%a0
42d64: 4a88 tstl %a0
42d66: 6604 bnes 42d6c <rtems_disk_next+0x90>
++minor;
42d68: 5283 addql #1,%d3
42d6a: 60d2 bras 42d3e <rtems_disk_next+0x62>
} else {
++dtab->minor [minor]->uses;
42d6c: 52a8 0014 addql #1,%a0@(20)
disk_unlock();
42d70: 4eba faa2 jsr %pc@(42814 <disk_unlock>)
return dtab->minor [minor];
42d74: 2052 moveal %a2@,%a0
42d76: 2030 4800 movel %a0@(00000000,%d4:l),%d0
}
}
}
42d7a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
42d80: 4e5e unlk %fp <== NOT EXECUTED
00042c24 <rtems_disk_obtain>:
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
42c24: 203c 0000 0700 movel #1792,%d0
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
42c2a: 4e56 fff0 linkw %fp,#-16
42c2e: 48d7 001c moveml %d2-%d4,%sp@
42c32: 242e 0008 movel %fp@(8),%d2
42c36: 262e 000c movel %fp@(12),%d3
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
rtems_interrupt_level level;
rtems_interrupt_disable(level);
42c3a: 40c4 movew %sr,%d4
42c3c: 8084 orl %d4,%d0
42c3e: 46c0 movew %d0,%sr
if (!diskdevs_protected) {
42c40: 1039 0006 0b70 moveb 60b70 <diskdevs_protected>,%d0
42c46: 6612 bnes 42c5a <rtems_disk_obtain+0x36> <== NEVER TAKEN
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
42c48: 42a7 clrl %sp@-
42c4a: 2f03 movel %d3,%sp@-
42c4c: 2f02 movel %d2,%sp@-
42c4e: 4eba fae4 jsr %pc@(42734 <get_disk_entry>)
rtems_interrupt_enable(level);
42c52: 46c4 movew %d4,%sr
42c54: 4fef 000c lea %sp@(12),%sp
42c58: 6028 bras 42c82 <rtems_disk_obtain+0x5e>
} else {
rtems_interrupt_enable(level);
42c5a: 46c4 movew %d4,%sr <== NOT EXECUTED
sc = disk_lock();
42c5c: 4eba fb88 jsr %pc@(427e6 <disk_lock>) <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
42c60: 4a80 tstl %d0 <== NOT EXECUTED
42c62: 661c bnes 42c80 <rtems_disk_obtain+0x5c> <== NOT EXECUTED
dd = get_disk_entry(dev, false);
42c64: 42a7 clrl %sp@- <== NOT EXECUTED
42c66: 2f03 movel %d3,%sp@- <== NOT EXECUTED
42c68: 2f02 movel %d2,%sp@- <== NOT EXECUTED
42c6a: 4eba fac8 jsr %pc@(42734 <get_disk_entry>) <== NOT EXECUTED
disk_unlock();
42c6e: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
42c72: 4eba fba0 jsr %pc@(42814 <disk_unlock>) <== NOT EXECUTED
42c76: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
42c7a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
42c7e: 6002 bras 42c82 <rtems_disk_obtain+0x5e> <== NOT EXECUTED
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
42c80: 4280 clrl %d0 <== NOT EXECUTED
disk_unlock();
}
}
return dd;
}
42c82: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
42c88: 4e5e unlk %fp <== NOT EXECUTED
0004e13c <rtems_event_system_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
4e13c: 4e56 0000 linkw %fp,#0
4e140: 202e 0008 movel %fp@(8),%d0
4e144: 206e 0014 moveal %fp@(20),%a0
4e148: 2f0a movel %a2,%sp@-
rtems_status_code sc;
if ( event_out != NULL ) {
4e14a: 4a88 tstl %a0
4e14c: 6758 beqs 4e1a6 <rtems_event_system_receive+0x6a><== NEVER TAKEN
Thread_Control *executing = _Thread_Executing;
4e14e: 2479 0006 16a2 moveal 616a2 <_Per_CPU_Information+0xe>,%a2
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
4e154: 226a 00f8 moveal %a2@(248),%a1
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
4e158: 4a80 tstl %d0
4e15a: 6742 beqs 4e19e <rtems_event_system_receive+0x62><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
4e15c: 2239 0006 152a movel 6152a <_Thread_Dispatch_disable_level>,%d1
++level;
4e162: 5281 addql #1,%d1
_Thread_Dispatch_disable_level = level;
4e164: 23c1 0006 152a movel %d1,6152a <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_Event_Seize(
4e16a: 2f3c 0004 0000 movel #262144,%sp@-
4e170: 4879 0006 16dc pea 616dc <_System_event_Sync_state>
4e176: 4869 0004 pea %a1@(4)
4e17a: 2f0a movel %a2,%sp@-
4e17c: 2f08 movel %a0,%sp@-
4e17e: 2f2e 0010 movel %fp@(16),%sp@-
4e182: 2f2e 000c movel %fp@(12),%sp@-
4e186: 2f00 movel %d0,%sp@-
4e188: 4eb9 0004 6e70 jsr 46e70 <_Event_Seize>
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
4e18e: 4fef 0020 lea %sp@(32),%sp
4e192: 4eb9 0004 98b4 jsr 498b4 <_Thread_Enable_dispatch>
sc = executing->Wait.return_code;
4e198: 202a 0034 movel %a2@(52),%d0
4e19c: 600a bras 4e1a8 <rtems_event_system_receive+0x6c>
} else {
*event_out = event->pending_events;
4e19e: 20a9 0004 movel %a1@(4),%a0@ <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
4e1a2: 4280 clrl %d0 <== NOT EXECUTED
4e1a4: 6002 bras 4e1a8 <rtems_event_system_receive+0x6c><== NOT EXECUTED
}
} else {
sc = RTEMS_INVALID_ADDRESS;
4e1a6: 7009 moveq #9,%d0 <== NOT EXECUTED
}
return sc;
}
4e1a8: 246e fffc moveal %fp@(-4),%a2
4e1ac: 4e5e unlk %fp <== NOT EXECUTED
00046478 <rtems_event_system_send>:
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
46478: 4e56 fffc linkw %fp,#-4
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
4647c: 486e fffc pea %fp@(-4)
46480: 2f2e 0008 movel %fp@(8),%sp@-
46484: 4eb9 0004 8698 jsr 48698 <_Thread_Get>
switch ( location ) {
4648a: 508f addql #8,%sp
4648c: 4aae fffc tstl %fp@(-4)
46490: 6630 bnes 464c2 <rtems_event_system_send+0x4a> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = thread->API_Extensions[ THREAD_API_RTEMS ];
_Event_Surrender(
46492: 2040 moveal %d0,%a0
46494: 2f3c 0004 0000 movel #262144,%sp@-
4649a: 4879 0005 dda8 pea 5dda8 <_System_event_Sync_state>
464a0: 2228 00f8 movel %a0@(248),%d1
464a4: 5881 addql #4,%d1
464a6: 2f01 movel %d1,%sp@-
464a8: 2f2e 000c movel %fp@(12),%sp@-
464ac: 2f00 movel %d0,%sp@-
464ae: 4eb9 0004 5ed8 jsr 45ed8 <_Event_Surrender>
event_in,
&api->System_event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
464b4: 4eb9 0004 8678 jsr 48678 <_Thread_Enable_dispatch>
sc = RTEMS_SUCCESSFUL;
break;
464ba: 4fef 0014 lea %sp@(20),%sp
&api->System_event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
sc = RTEMS_SUCCESSFUL;
464be: 4280 clrl %d0
break;
464c0: 6002 bras 464c4 <rtems_event_system_send+0x4c>
case OBJECTS_REMOTE:
sc = RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
break;
#endif
default:
sc = RTEMS_INVALID_ID;
464c2: 7004 moveq #4,%d0 <== NOT EXECUTED
break;
}
return sc;
}
464c4: 4e5e unlk %fp <== NOT EXECUTED
00045882 <rtems_fdisk_abort.constprop.9>:
*
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
*/
static void
rtems_fdisk_abort (const char *format, ...)
45882: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:abort:");
45886: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
*
* @param format The format string. See printf for details.
* @param ... The arguments for the format text.
*/
static void
rtems_fdisk_abort (const char *format, ...)
4588c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:abort:");
4588e: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
45892: 45f9 0005 b91e lea 5b91e <fputs>,%a2 <== NOT EXECUTED
45898: 4879 0006 a7fd pea 6a7fd <map.6766+0x57> <== NOT EXECUTED
4589e: 4e92 jsr %a2@ <== NOT EXECUTED
vfprintf (stderr, format, args);
458a0: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
458a6: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
458aa: 4879 0006 a80a pea 6a80a <map.6766+0x64> <== NOT EXECUTED
458b0: 4e92 jsr %a2@ <== NOT EXECUTED
fprintf (stderr, "\n");
458b2: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
458b8: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
458bc: 4878 000a pea a <LASTO> <== NOT EXECUTED
458c0: 4eb9 0005 b848 jsr 5b848 <fputc> <== NOT EXECUTED
fflush (stderr);
458c6: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
458cc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
458d0: 4eb9 0005 b41a jsr 5b41a <fflush> <== NOT EXECUTED
va_end (args);
exit (1);
458d6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
458da: 4eb9 0005 b0ac jsr 5b0ac <exit> <== NOT EXECUTED
000442fc <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)
{
442fc: 4e56 ffd4 linkw %fp,#-44
44300: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
44304: 246e 0008 moveal %fp@(8),%a2
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
44308: 202a 0024 movel %a2@(36),%d0
4430c: b0aa 0028 cmpl %a2@(40),%d0
44310: 6300 015c blsw 4446e <rtems_fdisk_compact+0x172>
fd->starvations++;
44314: 52aa 0070 addql #1,%a2@(112) <== NOT EXECUTED
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " resolve starvation");
#endif
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44318: 47fa f4e4 lea %pc@(437fe <rtems_fdisk_segment_queue_pop_head>),%a3<== NOT EXECUTED
uint32_t pages;
if (rtems_fdisk_is_erased_blocks_starvation (fd))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " resolve starvation");
4431c: 4879 0006 aa5a pea 6aa5a <map.6766+0x2b4> <== NOT EXECUTED
44322: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44324: 4eba f688 jsr %pc@(439ae <rtems_fdisk_printf>) <== NOT EXECUTED
#endif
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44328: 486a 0040 pea %a2@(64) <== NOT EXECUTED
4432c: 4e93 jsr %a3@ <== NOT EXECUTED
if (!ssc)
4432e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " resolve starvation");
#endif
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44332: 2400 movel %d0,%d2 <== NOT EXECUTED
if (!ssc)
44334: 660c bnes 44342 <rtems_fdisk_compact+0x46> <== NOT EXECUTED
ssc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44336: 486a 0034 pea %a2@(52) <== NOT EXECUTED
4433a: 4e93 jsr %a3@ <== NOT EXECUTED
if (ssc)
4433c: 588f addql #4,%sp <== NOT EXECUTED
rtems_fdisk_printf (fd, " resolve starvation");
#endif
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
if (!ssc)
ssc = rtems_fdisk_segment_queue_pop_head (&fd->available);
4433e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (ssc)
44340: 6732 beqs 44374 <rtems_fdisk_compact+0x78> <== NOT EXECUTED
{
dsc = rtems_fdisk_seg_most_available (&fd->available);
44342: 2f2a 0034 movel %a2@(52),%sp@- <== NOT EXECUTED
44346: 4eba f848 jsr %pc@(43b90 <rtems_fdisk_seg_most_available.isra.8>)<== NOT EXECUTED
4434a: 588f addql #4,%sp <== NOT EXECUTED
if (dsc)
4434c: 4a80 tstl %d0 <== NOT EXECUTED
4434e: 671c beqs 4436c <rtems_fdisk_compact+0x70> <== NOT EXECUTED
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
44350: 486e fffc pea %fp@(-4) <== NOT EXECUTED
44354: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44356: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44358: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4435a: 4eba fcee jsr %pc@(4404a <rtems_fdisk_recycle_segment>)<== NOT EXECUTED
if (ret)
4435e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
44362: 4a80 tstl %d0 <== NOT EXECUTED
44364: 6700 0108 beqw 4446e <rtems_fdisk_compact+0x172> <== NOT EXECUTED
44368: 6000 0136 braw 444a0 <rtems_fdisk_compact+0x1a4> <== NOT EXECUTED
return ret;
}
else
{
rtems_fdisk_error ("compacting: starvation");
4436c: 4879 0006 aa6e pea 6aa6e <map.6766+0x2c8> <== NOT EXECUTED
44372: 6006 bras 4437a <rtems_fdisk_compact+0x7e> <== NOT EXECUTED
return EIO;
}
}
else
{
rtems_fdisk_error ("compacting: nothing to recycle");
44374: 4879 0006 aa85 pea 6aa85 <map.6766+0x2df> <== NOT EXECUTED
4437a: 4eba f720 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
4437e: 588f addql #4,%sp <== NOT EXECUTED
return EIO;
44380: 7005 moveq #5,%d0 <== NOT EXECUTED
44382: 6000 011c braw 444a0 <rtems_fdisk_compact+0x1a4> <== NOT EXECUTED
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
44386: 4879 0006 aaa4 pea 6aaa4 <map.6766+0x2fe> <== NOT EXECUTED
4438c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4438e: 4e94 jsr %a4@ <== NOT EXECUTED
#endif
dsc = rtems_fdisk_seg_most_available (&fd->available);
44390: 2f2a 0034 movel %a2@(52),%sp@- <== NOT EXECUTED
44394: 4eba f7fa jsr %pc@(43b90 <rtems_fdisk_seg_most_available.isra.8>)<== NOT EXECUTED
if (dsc == 0)
44398: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
#endif
dsc = rtems_fdisk_seg_most_available (&fd->available);
4439c: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (dsc == 0)
4439e: 4a80 tstl %d0 <== NOT EXECUTED
443a0: 6608 bnes 443aa <rtems_fdisk_compact+0xae> <== NOT EXECUTED
{
rtems_fdisk_error ("compacting: no available segments to compact too");
443a2: 4879 0006 aab0 pea 6aab0 <map.6766+0x30a> <== NOT EXECUTED
443a8: 60d0 bras 4437a <rtems_fdisk_compact+0x7e> <== NOT EXECUTED
return EIO;
}
ssc = fd->used.head;
443aa: 2a6a 0040 moveal %a2@(64),%a5 <== NOT EXECUTED
dst_pages = rtems_fdisk_seg_pages_available (dsc);
443ae: 2f00 movel %d0,%sp@- <== NOT EXECUTED
443b0: 4eba f564 jsr %pc@(43916 <rtems_fdisk_seg_pages_available>)<== NOT EXECUTED
segments = 0;
pages = 0;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
443b4: 2eab 000c movel %a3@(12),%sp@ <== NOT EXECUTED
rtems_fdisk_error ("compacting: no available segments to compact too");
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
443b8: 2c00 movel %d0,%d6 <== NOT EXECUTED
segments = 0;
pages = 0;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
443ba: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
443be: 4879 0006 aae1 pea 6aae1 <map.6766+0x33b> <== NOT EXECUTED
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
pages = 0;
443c4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " dsc:%02d-%03d: most available",
443c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
443ca: 4e94 jsr %a4@ <== NOT EXECUTED
443cc: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
* 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 &&
443d0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return EIO;
}
ssc = fd->used.head;
dst_pages = rtems_fdisk_seg_pages_available (dsc);
segments = 0;
443d4: 4280 clrl %d0 <== NOT EXECUTED
* 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 &&
443d6: 6006 bras 443de <rtems_fdisk_compact+0xe2> <== NOT EXECUTED
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
segments++;
ssc = ssc->next;
443d8: 2a55 moveal %a5@,%a5 <== NOT EXECUTED
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
segments++;
443da: 5280 addql #1,%d0 <== NOT EXECUTED
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
((compacted_segs + segments) < fd->compact_segs))
{
pages += ssc->pages_active;
443dc: 2209 movel %a1,%d1 <== NOT EXECUTED
* 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 &&
443de: 4a8d tstl %a5 <== NOT EXECUTED
443e0: 6616 bnes 443f8 <rtems_fdisk_compact+0xfc> <== NOT EXECUTED
443e2: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " nothing to compact");
443e6: 4879 0006 ab00 pea 6ab00 <map.6766+0x35a> <== NOT EXECUTED
443ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
443ee: 4eba f5be jsr %pc@(439ae <rtems_fdisk_printf>) <== NOT EXECUTED
#endif
break;
443f2: 508f addql #8,%sp <== NOT EXECUTED
443f4: 6000 009a braw 44490 <rtems_fdisk_compact+0x194> <== NOT EXECUTED
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
443f8: 2241 moveal %d1,%a1 <== NOT EXECUTED
443fa: d3ed 001c addal %a5@(28),%a1 <== NOT EXECUTED
* 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 &&
443fe: bc89 cmpl %a1,%d6 <== NOT EXECUTED
44400: 6300 0092 blsw 44494 <rtems_fdisk_compact+0x198> <== NOT EXECUTED
* 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)
44404: 2e00 movel %d0,%d7 <== NOT EXECUTED
44406: de82 addl %d2,%d7 <== NOT EXECUTED
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
44408: beaa 000c cmpl %a2@(12),%d7 <== NOT EXECUTED
4440c: 65ca bcss 443d8 <rtems_fdisk_compact+0xdc> <== NOT EXECUTED
4440e: 6000 0084 braw 44494 <rtems_fdisk_compact+0x198> <== NOT EXECUTED
* We need a source segment and have pages to copy and
* compacting one segment to another is silly. Compaction needs
* to free at least one more segment.
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
44412: d480 addl %d0,%d2 <== NOT EXECUTED
44414: 7c01 moveq #1,%d6 <== NOT EXECUTED
44416: bc82 cmpl %d2,%d6 <== NOT EXECUTED
44418: 67cc beqs 443e6 <rtems_fdisk_compact+0xea> <== NOT EXECUTED
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
4441a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
if (ssc)
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
4441c: 2e3c 0004 404a movel #278602,%d7 <== NOT EXECUTED
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
44422: 2f01 movel %d1,%sp@- <== NOT EXECUTED
44424: 2f2d 000c movel %a5@(12),%sp@- <== NOT EXECUTED
44428: 2f2d 0008 movel %a5@(8),%sp@- <== NOT EXECUTED
4442c: 4879 0006 ab14 pea 6ab14 <map.6766+0x36e> <== NOT EXECUTED
* We now copy the pages to the new segment.
*/
while (pages)
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44432: 4bfa f3ca lea %pc@(437fe <rtems_fdisk_segment_queue_pop_head>),%a5<== NOT EXECUTED
#endif
break;
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
44436: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44438: 4e94 jsr %a4@ <== NOT EXECUTED
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
4443a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4443c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4443e: 4eba f416 jsr %pc@(43856 <rtems_fdisk_segment_queue_remove>)<== NOT EXECUTED
/*
* We now copy the pages to the new segment.
*/
while (pages)
44442: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
44446: 601e bras 44466 <rtems_fdisk_compact+0x16a> <== NOT EXECUTED
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44448: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4444a: 4e95 jsr %a5@ <== NOT EXECUTED
if (ssc)
4444c: 588f addql #4,%sp <== NOT EXECUTED
4444e: 4a80 tstl %d0 <== NOT EXECUTED
44450: 6714 beqs 44466 <rtems_fdisk_compact+0x16a> <== NOT EXECUTED
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
44452: 2f03 movel %d3,%sp@- <== NOT EXECUTED
44454: 2047 moveal %d7,%a0 <== NOT EXECUTED
44456: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44458: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4445a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4445c: 4e90 jsr %a0@ <== NOT EXECUTED
if (ret)
4445e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
44462: 4a80 tstl %d0 <== NOT EXECUTED
44464: 663a bnes 444a0 <rtems_fdisk_compact+0x1a4> <== NOT EXECUTED
/*
* We now copy the pages to the new segment.
*/
while (pages)
44466: 4aae fffc tstl %fp@(-4) <== NOT EXECUTED
4446a: 671c beqs 44488 <rtems_fdisk_compact+0x18c> <== NOT EXECUTED
4446c: 60da bras 44448 <rtems_fdisk_compact+0x14c> <== NOT EXECUTED
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
4446e: 280a movel %a2,%d4
* We now copy the pages to the new segment.
*/
while (pages)
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44470: 2a0a movel %a2,%d5
if (ssc)
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
44472: 260e movel %fp,%d3
* compaction or less delay when compacting but it may mean the disk
* will fill.
*/
while (ssc &&
((pages + ssc->pages_active) < dst_pages) &&
44474: 4282 clrl %d2
{
uint32_t dst_pages;
uint32_t segments;
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " compacting");
44476: 49fa f536 lea %pc@(439ae <rtems_fdisk_printf>),%a4
rtems_fdisk_printf (fd, " ssc scan: %d-%d: p=%ld, seg=%ld",
ssc->device, ssc->segment,
pages, segments);
#endif
rtems_fdisk_segment_queue_remove (&fd->available, dsc);
4447a: 0684 0000 0034 addil #52,%d4
* We now copy the pages to the new segment.
*/
while (pages)
{
ssc = rtems_fdisk_segment_queue_pop_head (&fd->used);
44480: 0685 0000 0040 addil #64,%d5
if (ssc)
{
ret = rtems_fdisk_recycle_segment (fd, ssc, dsc, &pages);
44486: 5983 subql #4,%d3
rtems_fdisk_error ("compacting: nothing to recycle");
return EIO;
}
}
while (fd->used.head)
44488: 4aaa 0040 tstl %a2@(64)
4448c: 6600 fef8 bnew 44386 <rtems_fdisk_compact+0x8a>
}
compacted_segs += segments;
}
return 0;
44490: 4280 clrl %d0
44492: 600c bras 444a0 <rtems_fdisk_compact+0x1a4>
44494: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
* We need a source segment and have pages to copy and
* compacting one segment to another is silly. Compaction needs
* to free at least one more segment.
*/
if (!ssc || (pages == 0) || ((compacted_segs + segments) == 1))
44498: 6600 ff78 bnew 44412 <rtems_fdisk_compact+0x116> <== NOT EXECUTED
4449c: 6000 ff48 braw 443e6 <rtems_fdisk_compact+0xea> <== NOT EXECUTED
compacted_segs += segments;
}
return 0;
}
444a0: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
444a6: 4e5e unlk %fp <== NOT EXECUTED
00043d84 <rtems_fdisk_erase_segment>:
/**
* Erase the segment.
*/
static int
rtems_fdisk_erase_segment (rtems_flashdisk* fd, rtems_fdisk_segment_ctl* sc)
{
43d84: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
43d88: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
43d8c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
43d90: 222a 0008 movel %a2@(8),%d1 <== NOT EXECUTED
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;
43d94: 2601 movel %d1,%d3 <== NOT EXECUTED
43d96: 2401 movel %d1,%d2 <== NOT EXECUTED
/**
* Erase the segment.
*/
static int
rtems_fdisk_erase_segment (rtems_flashdisk* fd, rtems_fdisk_segment_ctl* sc)
{
43d98: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
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;
43d9c: e58b lsll #2,%d3 <== NOT EXECUTED
43d9e: e98a lsll #4,%d2 <== NOT EXECUTED
43da0: 206b 002c moveal %a3@(44),%a0 <== NOT EXECUTED
43da4: 9483 subl %d3,%d2 <== NOT EXECUTED
43da6: d1c2 addal %d2,%a0 <== NOT EXECUTED
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;
43da8: 2268 0008 moveal %a0@(8),%a1 <== NOT EXECUTED
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
43dac: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED
sd = rtems_fdisk_seg_descriptor (fd, device, segment);
ops = fd->devices[device].descriptor->flash_ops;
ret = ops->erase (sd, device, segment);
43db0: 2269 0008 moveal %a1@(8),%a1 <== NOT EXECUTED
43db4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43db6: 2f01 movel %d1,%sp@- <== NOT EXECUTED
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;
43db8: 2200 movel %d0,%d1 <== NOT EXECUTED
43dba: ed88 lsll #6,%d0 <== NOT EXECUTED
43dbc: e989 lsll #4,%d1 <== NOT EXECUTED
43dbe: 2050 moveal %a0@,%a0 <== NOT EXECUTED
43dc0: 9081 subl %d1,%d0 <== NOT EXECUTED
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);
43dc2: 2f30 0804 movel %a0@(00000004,%d0:l),%sp@- <== NOT EXECUTED
43dc6: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED
43dca: 4e90 jsr %a0@ <== NOT EXECUTED
if (ret)
43dcc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
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);
43dd0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (ret)
43dd2: 673a beqs 43e0e <rtems_fdisk_erase_segment+0x8a> <== NOT EXECUTED
{
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
43dd4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43dd6: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
43ddc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
43dde: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43de0: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
43de4: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
43de8: 4879 0006 a871 pea 6a871 <map.6766+0xcb> <== NOT EXECUTED
43dee: 4eba fcac jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43df2: 206b 0058 moveal %a3@(88),%a0 <== 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;
43df6: 7001 moveq #1,%d0 <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43df8: 4fef 0018 lea %sp@(24),%sp <== 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;
43dfc: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
43e00: 6006 bras 43e08 <rtems_fdisk_erase_segment+0x84> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
43e02: b5c8 cmpal %a0,%a2 <== NOT EXECUTED
43e04: 675c beqs 43e62 <rtems_fdisk_erase_segment+0xde> <== NOT EXECUTED
return true;
it = it->next;
43e06: 2050 moveal %a0@,%a0 <== 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)
43e08: 4a88 tstl %a0 <== NOT EXECUTED
43e0a: 66f6 bnes 43e02 <rtems_fdisk_erase_segment+0x7e> <== NOT EXECUTED
43e0c: 6048 bras 43e56 <rtems_fdisk_erase_segment+0xd2> <== NOT EXECUTED
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
return ret;
}
fd->erased_blocks += sc->pages;
43e0e: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED
43e12: d1ab 0028 addl %d0,%a3@(40) <== NOT EXECUTED
sc->erased++;
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
43e16: 41ea 0018 lea %a2@(24),%a0 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
return ret;
}
fd->erased_blocks += sc->pages;
sc->erased++;
43e1a: 52aa 002c addql #1,%a2@(44) <== NOT EXECUTED
memset (sc->page_descriptors, 0xff, sc->pages_desc * fd->block_size);
43e1e: 202b 0014 movel %a3@(20),%d0 <== NOT EXECUTED
43e22: 4c10 0800 mulsl %a0@,%d0 <== NOT EXECUTED
43e26: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43e28: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
43e2c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
43e30: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
sc->pages_active = 0;
43e36: 42aa 001c clrl %a2@(28) <== NOT EXECUTED
sc->pages_used = 0;
43e3a: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
sc->pages_bad = 0;
43e3e: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED
sc->failed = false;
43e42: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
/*
* Push to the tail of the available queue. It is a very
* simple type of wear reduction. Every other available
* segment will now get a go.
*/
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
43e46: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43e48: 486b 0034 pea %a3@(52) <== NOT EXECUTED
43e4c: 4eba f9d4 jsr %pc@(43822 <rtems_fdisk_segment_queue_push_tail>)<== NOT EXECUTED
return 0;
43e50: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
43e54: 600c bras 43e62 <rtems_fdisk_erase_segment+0xde> <== NOT EXECUTED
rtems_fdisk_error (" erase-segment:%02d-%03d: " \
"segment erase failed: %s (%d)",
sc->device, sc->segment, strerror (ret), ret);
sc->failed = true;
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
43e56: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43e58: 486b 0058 pea %a3@(88) <== NOT EXECUTED
43e5c: 4eba f9c4 jsr %pc@(43822 <rtems_fdisk_segment_queue_push_tail>)<== NOT EXECUTED
43e60: 508f addql #8,%sp <== NOT EXECUTED
* segment will now get a go.
*/
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
return 0;
}
43e62: 2002 movel %d2,%d0 <== NOT EXECUTED
43e64: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
43e6a: 4e5e unlk %fp <== NOT EXECUTED
00043a9c <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, ...)
{
43a9c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:error:");
43aa0: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_error (const char *format, ...)
{
43aa6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:error:");
43aa8: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
43aac: 4879 0006 a7cd pea 6a7cd <map.6766+0x27> <== NOT EXECUTED
43ab2: 4eb9 0005 b91e jsr 5b91e <fputs> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
43ab8: 486e 000c pea %fp@(12) <== NOT EXECUTED
43abc: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43ac2: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
43ac6: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
43aca: 4eb9 0006 32c0 jsr 632c0 <vfprintf> <== NOT EXECUTED
fprintf (stderr, "\n");
43ad0: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "fdisk:error:");
ret = vfprintf (stderr, format, args);
43ad6: 2400 movel %d0,%d2 <== NOT EXECUTED
fprintf (stderr, "\n");
43ad8: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
43adc: 4878 000a pea a <LASTO> <== NOT EXECUTED
43ae0: 4eb9 0005 b848 jsr 5b848 <fputc> <== NOT EXECUTED
fflush (stderr);
43ae6: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43aec: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
43af0: 4eb9 0005 b41a jsr 5b41a <fflush> <== NOT EXECUTED
va_end (args);
return ret;
}
43af6: 2002 movel %d2,%d0 <== NOT EXECUTED
43af8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
43afc: 4e5e unlk %fp <== NOT EXECUTED
00043936 <rtems_fdisk_info>:
*/
static int
rtems_fdisk_info (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
if (fd->info_level >= 2)
43936: 7001 moveq #1,%d0
* @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, ...)
{
43938: 4e56 0000 linkw %fp,#0
int ret = 0;
if (fd->info_level >= 2)
4393c: 206e 0008 moveal %fp@(8),%a0
* @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, ...)
{
43940: 2f02 movel %d2,%sp@-
int ret = 0;
if (fd->info_level >= 2)
43942: b0a8 006c cmpl %a0@(108),%d0
43946: 645a bccs 439a2 <rtems_fdisk_info+0x6c> <== ALWAYS TAKEN
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
43948: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
4394e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43952: 4879 0006 a7b7 pea 6a7b7 <map.6766+0x11> <== NOT EXECUTED
43958: 4eb9 0005 b91e jsr 5b91e <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
4395e: 486e 0010 pea %fp@(16) <== NOT EXECUTED
43962: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43968: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4396c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43970: 4eb9 0006 32c0 jsr 632c0 <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
43976: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
if (fd->info_level >= 2)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
ret = vfprintf (stdout, format, args);
4397c: 2400 movel %d0,%d2 <== NOT EXECUTED
fprintf (stdout, "\n");
4397e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43982: 4878 000a pea a <LASTO> <== NOT EXECUTED
43986: 4eb9 0005 b848 jsr 5b848 <fputc> <== NOT EXECUTED
fflush (stdout);
4398c: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43992: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43996: 4eb9 0005 b41a jsr 5b41a <fflush> <== NOT EXECUTED
va_end (args);
4399c: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
439a0: 6002 bras 439a4 <rtems_fdisk_info+0x6e> <== NOT EXECUTED
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_info (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
439a2: 4282 clrl %d2
fprintf (stdout, "\n");
fflush (stdout);
va_end (args);
}
return ret;
}
439a4: 2002 movel %d2,%d0
439a6: 242e fffc movel %fp@(-4),%d2
439aa: 4e5e unlk %fp <== NOT EXECUTED
00045446 <rtems_fdisk_initialize>:
*/
rtems_device_driver
rtems_fdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
45446: 4e56 ffb0 linkw %fp,#-80
4544a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
const rtems_flashdisk_config* c = rtems_flashdisk_configuration;
rtems_flashdisk* fd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
4544e: 4eb9 0004 36b4 jsr 436b4 <rtems_disk_io_initialize>
if (sc != RTEMS_SUCCESSFUL)
45454: 4a80 tstl %d0
45456: 6600 0420 bnew 45878 <rtems_fdisk_initialize+0x432>
static rtems_status_code
rtems_fdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
4545a: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4545e: 4eb9 0004 6910 jsr 46910 <malloc>
if (!rtems_fdisk_crc16_factor)
45464: 588f addql #4,%sp
static rtems_status_code
rtems_fdisk_crc16_gen_factors (uint16_t pattern)
{
uint32_t b;
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
45466: 23c0 0007 fc10 movel %d0,7fc10 <rtems_fdisk_crc16_factor>
if (!rtems_fdisk_crc16_factor)
4546c: 6604 bnes 45472 <rtems_fdisk_initialize+0x2c> <== ALWAYS TAKEN
4546e: 6000 03c4 braw 45834 <rtems_fdisk_initialize+0x3ee> <== NOT EXECUTED
45472: 2440 moveal %d0,%a2
45474: 91c8 subal %a0,%a0
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
45476: 327c 0009 moveaw #9,%a1
4547a: 3208 movew %a0,%d1
4547c: 601a bras 45498 <rtems_fdisk_initialize+0x52>
4547e: 4280 clrl %d0
45480: 3001 movew %d1,%d0
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
45482: 0801 0000 btst #0,%d1
45486: 670c beqs 45494 <rtems_fdisk_initialize+0x4e>
45488: 2200 movel %d0,%d1
4548a: e289 lsrl #1,%d1
4548c: 0a81 ffff 8408 eoril #-31736,%d1
45492: 6004 bras 45498 <rtems_fdisk_initialize+0x52>
45494: 2200 movel %d0,%d1
45496: e289 lsrl #1,%d1
45498: 5389 subql #1,%a1
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
4549a: 4a89 tstl %a1
4549c: 66e0 bnes 4547e <rtems_fdisk_initialize+0x38>
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
4549e: 5288 addql #1,%a0
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_fdisk_crc16_factor[b] = v & 0xffff;
454a0: 34c1 movew %d1,%a2@+
rtems_fdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_fdisk_crc16_factor)
return RTEMS_NO_MEMORY;
for (b = 0; b < 256; b++)
454a2: b1fc 0000 0100 cmpal #256,%a0
454a8: 66cc bnes 45476 <rtems_fdisk_initialize+0x30>
454aa: 6000 03a2 braw 4584e <rtems_fdisk_initialize+0x408>
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";
454ae: 4878 000a pea a <LASTO>
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
454b2: 4282 clrl %d2
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";
454b4: 4879 0006 b24a pea 6b24a <map.6766+0xaa4>
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++)
454ba: 4283 clrl %d3
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";
454bc: 486e fff6 pea %fp@(-10)
454c0: 4eb9 0005 bffc jsr 5bffc <memcpy>
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
454c6: 246e ffe0 moveal %fp@(-32),%a2
454ca: d5f9 0007 fc08 addal 7fc08 <rtems_flashdisks>,%a2
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++)
454d0: 4fef 000c lea %sp@(12),%sp
454d4: 91c8 subal %a0,%a0
uint32_t blocks = 0;
int ret;
fd = &rtems_flashdisks[minor];
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
454d6: 1d47 ffff moveb %d7,%fp@(-1)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
454da: 202e 0008 movel %fp@(8),%d0
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
454de: 256b 000c 0008 movel %a3@(12),%a2@(8)
fd->compact_segs = c->compact_segs;
454e4: 256b 0014 000c movel %a3@(20),%a2@(12)
fd->avail_compact_segs = c->avail_compact_segs;
fd->block_size = c->block_size;
454ea: 2c13 movel %a3@,%d6
fd->major = major;
fd->minor = minor;
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
fd->avail_compact_segs = c->avail_compact_segs;
454ec: 256b 0018 0010 movel %a3@(24),%a2@(16)
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
454f2: 256b 0010 0020 movel %a3@(16),%a2@(32)
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
454f8: 282b 0004 movel %a3@(4),%d4
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;
454fc: 256b 001c 006c movel %a3@(28),%a2@(108)
45502: 2d40 ffec movel %d0,%fp@(-20)
45506: 2d47 fff0 movel %d7,%fp@(-16)
fd = &rtems_flashdisks[minor];
name [sizeof(RTEMS_FLASHDISK_DEVICE_BASE_NAME)] += minor;
fd->major = major;
4550a: 2480 movel %d0,%a2@
fd->minor = minor;
4550c: 2547 0004 movel %d7,%a2@(4)
fd->flags = c->flags;
fd->compact_segs = c->compact_segs;
fd->avail_compact_segs = c->avail_compact_segs;
fd->block_size = c->block_size;
45510: 2546 0014 movel %d6,%a2@(20)
fd->unavail_blocks = c->unavail_blocks;
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
45514: 2d44 ffe8 movel %d4,%fp@(-24)
45518: 6056 bras 45570 <rtems_fdisk_initialize+0x12a>
blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
4551a: 2a6b 0008 moveal %a3@(8),%a5
4551e: dbc8 addal %a0,%a5
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++)
45520: 4285 clrl %d5
*/
static uint32_t
rtems_fdisk_blocks_in_device (const rtems_fdisk_device_desc* dd,
uint32_t page_size)
{
uint32_t count = 0;
45522: 93c9 subal %a1,%a1
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
45524: 2d55 ffe4 movel %a5@,%fp@(-28)
45528: 42ae ffd8 clrl %fp@(-40)
4552c: 6030 bras 4555e <rtems_fdisk_initialize+0x118>
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
4552e: 286d 0004 moveal %a5@(4),%a4
45532: d9c5 addal %d5,%a4
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++)
45534: 52ae ffd8 addql #1,%fp@(-40)
45538: 0685 0000 000c addil #12,%d5
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
4553e: 222c 0008 movel %a4@(8),%d1
45542: 4c46 1001 remul %d6,%d1,%d1
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;
45546: 2001 movel %d1,%d0
45548: 5380 subql #1,%d0
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);
4554a: e789 lsll #3,%d1
return ((bytes - 1) / page_size) + 1;
4554c: 5381 subql #1,%d1
4554e: 4c46 1001 remul %d6,%d1,%d1
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
count +=
(rtems_fdisk_pages_in_segment (sd, page_size) -
45552: 9081 subl %d1,%d0
rtems_fdisk_page_desc_pages (sd, page_size)) * sd->count;
45554: 4281 clrl %d1
45556: 3214 movew %a4@,%d1
45558: 4c01 0800 mulsl %d1,%d0
uint32_t count = 0;
uint32_t s;
for (s = 0; s < dd->segment_count; s++)
{
const rtems_fdisk_segment_desc* sd = &dd->segments[s];
count +=
4555c: d3c0 addal %d0,%a1
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++)
4555e: 202e ffe4 movel %fp@(-28),%d0
45562: b0ae ffd8 cmpl %fp@(-40),%d0
45566: 66c6 bnes 4552e <rtems_fdisk_initialize+0xe8>
fd->block_size = c->block_size;
fd->unavail_blocks = c->unavail_blocks;
fd->info_level = c->info_level;
for (device = 0; device < c->device_count; device++)
blocks += rtems_fdisk_blocks_in_device (&c->devices[device],
45568: d489 addl %a1,%d2
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++)
4556a: 5283 addql #1,%d3
4556c: 41e8 000c lea %a0@(12),%a0
45570: b6ae ffe8 cmpl %fp@(-24),%d3
45574: 66a4 bnes 4551a <rtems_fdisk_initialize+0xd4>
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
45576: 2f06 movel %d6,%sp@-
45578: 4eb9 0004 6910 jsr 46910 <malloc>
if (!fd->copy_buffer)
4557e: 588f addql #4,%sp
c->block_size);
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
45580: 2540 0068 movel %d0,%a2@(104)
if (!fd->copy_buffer)
45584: 6700 02ae beqw 45834 <rtems_fdisk_initialize+0x3ee>
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
45588: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4558c: 2f02 movel %d2,%sp@-
4558e: 4eb9 0004 5fd0 jsr 45fd0 <calloc>
if (!fd->blocks)
45594: 508f addql #8,%sp
*/
fd->copy_buffer = malloc (c->block_size);
if (!fd->copy_buffer)
return RTEMS_NO_MEMORY;
fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
45596: 2540 0018 movel %d0,%a2@(24)
if (!fd->blocks)
4559a: 6700 0298 beqw 45834 <rtems_fdisk_initialize+0x3ee>
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
4559e: 2542 001c movel %d2,%a2@(28)
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
455a2: 4878 000c pea c <OPER1>
455a6: 2f03 movel %d3,%sp@-
455a8: 4eb9 0004 5fd0 jsr 45fd0 <calloc>
if (!fd->devices)
455ae: 508f addql #8,%sp
if (!fd->blocks)
return RTEMS_NO_MEMORY;
fd->block_count = blocks;
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
455b0: 2540 002c movel %d0,%a2@(44)
if (!fd->devices)
455b4: 6700 027e beqw 45834 <rtems_fdisk_initialize+0x3ee>
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
455b8: 486a 0064 pea %a2@(100)
455bc: 42a7 clrl %sp@-
455be: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
455c2: 4878 0001 pea 1 <ADD>
455c6: 2f3c 4644 534b movel #1178882891,%sp@-
455cc: 4eb9 0004 a338 jsr 4a338 <rtems_semaphore_create>
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &fd->lock);
if (sc != RTEMS_SUCCESSFUL)
455d2: 4fef 0014 lea %sp@(20),%sp
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
if (!fd->devices)
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
455d6: 2600 movel %d0,%d3
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &fd->lock);
if (sc != RTEMS_SUCCESSFUL)
455d8: 672c beqs 45606 <rtems_fdisk_initialize+0x1c0> <== ALWAYS TAKEN
{
rtems_fdisk_error ("disk lock create failed");
455da: 4879 0006 b1d7 pea 6b1d7 <map.6766+0xa31> <== NOT EXECUTED
free (fd->copy_buffer);
455e0: 47f9 0004 6348 lea 46348 <free>,%a3 <== 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");
455e6: 4eba e4b4 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
free (fd->copy_buffer);
455ea: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
455ee: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->blocks);
455f0: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
455f4: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->devices);
455f6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
455fa: 4e93 jsr %a3@ <== NOT EXECUTED
455fc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
if (!fd->devices)
return RTEMS_NO_MEMORY;
sc = rtems_semaphore_create (rtems_build_name ('F', 'D', 'S', 'K'), 1,
45600: 2003 movel %d3,%d0 <== NOT EXECUTED
45602: 6000 0274 braw 45878 <rtems_fdisk_initialize+0x432> <== NOT EXECUTED
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
45606: 486e fff6 pea %fp@(-10)
4560a: 42a7 clrl %sp@-
4560c: 487a f11e pea %pc@(4472c <rtems_fdisk_ioctl>)
45610: 94aa 0020 subl %a2@(32),%d2
45614: 2f02 movel %d2,%sp@-
45616: 2f13 movel %a3@,%sp@-
45618: 2f2e fff0 movel %fp@(-16),%sp@-
4561c: 2f2e ffec movel %fp@(-20),%sp@-
45620: 4eb9 0004 34ac jsr 434ac <rtems_disk_create_phys>
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
45626: 4fef 001c lea %sp@(28),%sp
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
4562a: 2400 movel %d0,%d2
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
4562c: 6700 013c beqw 4576a <rtems_fdisk_initialize+0x324>
{
rtems_semaphore_delete (fd->lock);
45630: 2f2a 0064 movel %a2@(100),%sp@- <== NOT EXECUTED
rtems_disk_delete (dev);
free (fd->copy_buffer);
45634: 47f9 0004 6348 lea 46348 <free>,%a3 <== 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);
4563a: 4eb9 0004 a4d8 jsr 4a4d8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_disk_delete (dev);
45640: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
45644: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
45648: 4eb9 0004 32d6 jsr 432d6 <rtems_disk_delete> <== NOT EXECUTED
free (fd->copy_buffer);
4564e: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
45652: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->blocks);
45654: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
45658: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->devices);
4565a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
4565e: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_fdisk_error ("disk create phy failed");
45660: 4879 0006 b1ef pea 6b1ef <map.6766+0xa49> <== NOT EXECUTED
45666: 4eba e434 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
4566a: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
free (fd->blocks);
free (fd->devices);
return sc;
}
sc = rtems_disk_create_phys(dev, c->block_size,
4566e: 2002 movel %d2,%d0 <== NOT EXECUTED
45670: 6000 0206 braw 45878 <rtems_fdisk_initialize+0x432> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc;
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
45674: 286b 0008 moveal %a3@(8),%a4
45678: d9c2 addal %d2,%a4
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++)
4567a: 4281 clrl %d1
4567c: 4280 clrl %d0
* Count the segments for a device.
*/
static uint32_t
rtems_fdisk_count_segments (const rtems_fdisk_device_desc* dd)
{
uint32_t count = 0;
4567e: 4283 clrl %d3
uint32_t segment;
for (segment = 0; segment < dd->segment_count; segment++)
45680: 2d54 ffe4 movel %a4@,%fp@(-28)
45684: 6014 bras 4569a <rtems_fdisk_initialize+0x254>
count += dd->segments[segment].count;
45686: 206c 0004 moveal %a4@(4),%a0
4568a: 4284 clrl %d4
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++)
4568c: 5280 addql #1,%d0
count += dd->segments[segment].count;
4568e: 3830 1800 movew %a0@(00000000,%d1:l),%d4
45692: 0681 0000 000c addil #12,%d1
45698: d684 addl %d4,%d3
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++)
4569a: b0ae ffe4 cmpl %fp@(-28),%d0
4569e: 66e6 bnes 45686 <rtems_fdisk_initialize+0x240>
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
456a0: 2a6a 002c moveal %a2@(44),%a5
456a4: 4878 0030 pea 30 <OPER2+0x1c>
456a8: dbc2 addal %d2,%a5
456aa: 2f03 movel %d3,%sp@-
456ac: 4eb9 0004 5fd0 jsr 45fd0 <calloc>
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
456b2: 508f addql #8,%sp
uint32_t segment_count;
uint32_t segment;
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
456b4: 2a80 movel %d0,%a5@
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
456b6: 6600 0090 bnew 45748 <rtems_fdisk_initialize+0x302>
{
rtems_disk_delete (dev);
456ba: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
free (fd->copy_buffer);
456be: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
fd->devices[device].segments = calloc (segment_count,
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
{
rtems_disk_delete (dev);
456c4: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
456c8: 4eb9 0004 32d6 jsr 432d6 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
456ce: 2f2a 0064 movel %a2@(100),%sp@- <== NOT EXECUTED
456d2: 4eb9 0004 a4d8 jsr 4a4d8 <rtems_semaphore_delete> <== NOT EXECUTED
free (fd->copy_buffer);
456d8: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
456dc: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->blocks);
456de: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
456e2: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->devices);
456e4: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
456e8: 4e93 jsr %a3@ <== NOT EXECUTED
456ea: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
456ee: 6000 0144 braw 45834 <rtems_fdisk_initialize+0x3ee> <== NOT EXECUTED
for (segment = 0; segment < c->devices[device].segment_count; segment++)
{
const rtems_fdisk_segment_desc* sd;
uint32_t seg_segment;
sd = &c->devices[device].segments[segment];
456f2: 206c 0004 moveal %a4@(4),%a0
456f6: d1c4 addal %d4,%a0
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
456f8: 4281 clrl %d1
456fa: 3a10 movew %a0@,%d5
for (segment = 0; segment < c->devices[device].segment_count; segment++)
{
const rtems_fdisk_segment_desc* sd;
uint32_t seg_segment;
sd = &c->devices[device].segments[segment];
456fc: 2d48 ffe8 movel %a0,%fp@(-24)
for (seg_segment = 0; seg_segment < sd->count; seg_segment++, sc++)
45700: 2040 moveal %d0,%a0
45702: 3205 movew %d5,%d1
45704: 2d41 ffdc movel %d1,%fp@(-36)
45708: 4281 clrl %d1
4570a: 601a bras 45726 <rtems_fdisk_initialize+0x2e0>
{
sc->descriptor = sd;
4570c: 226e ffe8 moveal %fp@(-24),%a1
sc->device = device;
sc->segment = seg_segment;
45710: 2141 000c movel %d1,%a0@(12)
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++)
45714: 5281 addql #1,%d1
{
sc->descriptor = sd;
45716: 2149 0004 movel %a1,%a0@(4)
sc->device = device;
4571a: 2146 0008 movel %d6,%a0@(8)
sc->segment = seg_segment;
sc->erased = 0;
4571e: 42a8 002c clrl %a0@(44)
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++)
45722: 41e8 0030 lea %a0@(48),%a0
45726: b2ae ffdc cmpl %fp@(-36),%d1
4572a: 65e0 bcss 4570c <rtems_fdisk_initialize+0x2c6>
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
4572c: 52ae ffd8 addql #1,%fp@(-40)
45730: 0684 0000 000c addil #12,%d4
* @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,
45736: 0285 0000 ffff andil #65535,%d5
4573c: 2205 movel %d5,%d1
4573e: ed8d lsll #6,%d5
45740: e989 lsll #4,%d1
45742: 9a81 subl %d1,%d5
45744: d085 addl %d5,%d0
45746: 6006 bras 4574e <rtems_fdisk_initialize+0x308>
segment_count = rtems_fdisk_count_segments (&c->devices[device]);
fd->devices[device].segments = calloc (segment_count,
sizeof (rtems_fdisk_segment_ctl));
if (!fd->devices[device].segments)
45748: 4284 clrl %d4
4574a: 42ae ffd8 clrl %fp@(-40)
return RTEMS_NO_MEMORY;
}
sc = fd->devices[device].segments;
for (segment = 0; segment < c->devices[device].segment_count; segment++)
4574e: 222e ffe4 movel %fp@(-28),%d1
45752: b2ae ffd8 cmpl %fp@(-40),%d1
45756: 669a bnes 456f2 <rtems_fdisk_initialize+0x2ac>
sc->segment = seg_segment;
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
45758: 2b43 0004 movel %d3,%a5@(4)
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
4575c: 5286 addql #1,%d6
sc->erased = 0;
}
}
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
4575e: 2b4c 0008 movel %a4,%a5@(8)
45762: 0682 0000 000c addil #12,%d2
45768: 6004 bras 4576e <rtems_fdisk_initialize+0x328>
}
sc = rtems_disk_create_phys(dev, c->block_size,
blocks - fd->unavail_blocks,
rtems_fdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
4576a: 4282 clrl %d2
4576c: 4286 clrl %d6
free (fd->devices);
rtems_fdisk_error ("disk create phy failed");
return sc;
}
for (device = 0; device < c->device_count; device++)
4576e: 202b 0004 movel %a3@(4),%d0
45772: b086 cmpl %d6,%d0
45774: 6200 fefe bhiw 45674 <rtems_fdisk_initialize+0x22e>
fd->devices[device].segment_count = segment_count;
fd->devices[device].descriptor = &c->devices[device];
}
fd->device_count = c->device_count;
45778: 2540 0030 movel %d0,%a2@(48)
ret = rtems_fdisk_recover_block_mappings (fd);
4577c: 2f0a movel %a2,%sp@-
4577e: 4eba ed2a jsr %pc@(444aa <rtems_fdisk_recover_block_mappings>)
if (ret)
45782: 588f addql #4,%sp
fd->devices[device].descriptor = &c->devices[device];
}
fd->device_count = c->device_count;
ret = rtems_fdisk_recover_block_mappings (fd);
45784: 2400 movel %d0,%d2
if (ret)
45786: 6744 beqs 457cc <rtems_fdisk_initialize+0x386> <== ALWAYS TAKEN
{
rtems_disk_delete (dev);
45788: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
free (fd->copy_buffer);
4578c: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
fd->device_count = c->device_count;
ret = rtems_fdisk_recover_block_mappings (fd);
if (ret)
{
rtems_disk_delete (dev);
45792: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
45796: 4eb9 0004 32d6 jsr 432d6 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
4579c: 2f2a 0064 movel %a2@(100),%sp@- <== NOT EXECUTED
457a0: 4eb9 0004 a4d8 jsr 4a4d8 <rtems_semaphore_delete> <== NOT EXECUTED
free (fd->copy_buffer);
457a6: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
457aa: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->blocks);
457ac: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
457b0: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->devices);
457b2: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
457b6: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
457b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
457ba: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
457c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
457c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
457c4: 4879 0006 b206 pea 6b206 <map.6766+0xa60> <== NOT EXECUTED
457ca: 6054 bras 45820 <rtems_fdisk_initialize+0x3da> <== NOT EXECUTED
strerror (ret), ret);
return ret;
}
ret = rtems_fdisk_compact (fd);
457cc: 2f0a movel %a2,%sp@-
457ce: 7874 moveq #116,%d4
457d0: 4eba eb2a jsr %pc@(442fc <rtems_fdisk_compact>)
if (ret)
457d4: 588f addql #4,%sp
457d6: d9ae ffe0 addl %d4,%fp@(-32)
rtems_fdisk_error ("recovery of disk failed: %s (%d)",
strerror (ret), ret);
return ret;
}
ret = rtems_fdisk_compact (fd);
457da: 2400 movel %d0,%d2
if (ret)
457dc: 674e beqs 4582c <rtems_fdisk_initialize+0x3e6>
{
rtems_disk_delete (dev);
457de: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
free (fd->copy_buffer);
457e2: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
}
ret = rtems_fdisk_compact (fd);
if (ret)
{
rtems_disk_delete (dev);
457e8: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
457ec: 4eb9 0004 32d6 jsr 432d6 <rtems_disk_delete> <== NOT EXECUTED
rtems_semaphore_delete (fd->lock);
457f2: 2f2a 0064 movel %a2@(100),%sp@- <== NOT EXECUTED
457f6: 4eb9 0004 a4d8 jsr 4a4d8 <rtems_semaphore_delete> <== NOT EXECUTED
free (fd->copy_buffer);
457fc: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
45800: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->blocks);
45802: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
45806: 4e93 jsr %a3@ <== NOT EXECUTED
free (fd->devices);
45808: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
4580c: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_fdisk_error ("compacting of disk failed: %s (%d)",
4580e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45810: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
45816: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45818: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4581a: 4879 0006 b227 pea 6b227 <map.6766+0xa81> <== NOT EXECUTED
45820: 4eba e27a jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
strerror (ret), ret);
return ret;
45824: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED
45828: 2002 movel %d2,%d0 <== NOT EXECUTED
4582a: 604c bras 45878 <rtems_fdisk_initialize+0x432> <== NOT EXECUTED
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
4582c: 5287 addql #1,%d7
4582e: 47eb 0020 lea %a3@(32),%a3
45832: 6004 bras 45838 <rtems_fdisk_initialize+0x3f2>
/*
* One copy buffer of a page size.
*/
fd->copy_buffer = malloc (c->block_size);
if (!fd->copy_buffer)
return RTEMS_NO_MEMORY;
45834: 701a moveq #26,%d0 <== NOT EXECUTED
45836: 6040 bras 45878 <rtems_fdisk_initialize+0x432> <== NOT EXECUTED
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_flashdisk_configuration_size; minor++, c++)
45838: 2039 0006 ed58 movel 6ed58 <rtems_flashdisk_configuration_size>,%d0
4583e: b087 cmpl %d7,%d0
45840: 6200 fc6c bhiw 454ae <rtems_fdisk_initialize+0x68>
strerror (ret), ret);
return ret;
}
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
45844: 23c0 0007 fc0c movel %d0,7fc0c <rtems_flashdisk_count>
return RTEMS_SUCCESSFUL;
4584a: 4280 clrl %d0
4584c: 602a bras 45878 <rtems_fdisk_initialize+0x432>
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
4584e: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f>
45852: 45f9 0004 5fd0 lea 45fd0 <calloc>,%a2
45858: 2f39 0006 ed58 movel 6ed58 <rtems_flashdisk_configuration_size>,%sp@-
4585e: 4e92 jsr %a2@
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
45860: 508f addql #8,%sp
sc = rtems_fdisk_crc16_gen_factors (0x8408);
if (sc != RTEMS_SUCCESSFUL)
return sc;
rtems_flashdisks = calloc (rtems_flashdisk_configuration_size,
45862: 23c0 0007 fc08 movel %d0,7fc08 <rtems_flashdisks>
sizeof (rtems_flashdisk));
if (!rtems_flashdisks)
45868: 67ca beqs 45834 <rtems_fdisk_initialize+0x3ee> <== NEVER TAKEN
4586a: 42ae ffe0 clrl %fp@(-32)
4586e: 47f9 0006 9e04 lea 69e04 <rtems_flashdisk_configuration>,%a3
45874: 4287 clrl %d7
45876: 60c0 bras 45838 <rtems_fdisk_initialize+0x3f2>
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
45878: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4587e: 4e5e unlk %fp <== NOT EXECUTED
0004472c <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)
{
4472c: 4e56 ffa0 linkw %fp,#-96
44730: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
44734: 286e 0008 moveal %fp@(8),%a4
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;
44738: 47f9 0005 b09c lea 5b09c <__errno>,%a3
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
4473e: 262c 0004 movel %a4@(4),%d3
* @param argp IOCTL argument.
* @retval The IOCTL return value
*/
static int
rtems_fdisk_ioctl (rtems_disk_device *dd, uint32_t req, void* argp)
{
44742: 242e 000c movel %fp@(12),%d2
44746: 246e 0010 moveal %fp@(16),%a2
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;
4474a: 4e93 jsr %a3@
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
4474c: 7274 moveq #116,%d1
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;
4474e: 2040 moveal %d0,%a0
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
44750: 4c03 1800 mulsl %d3,%d1
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;
44754: 4290 clrl %a0@
sc = rtems_semaphore_obtain (rtems_flashdisks[minor].lock, RTEMS_WAIT, 0);
44756: 2079 0007 fc08 moveal 7fc08 <rtems_flashdisks>,%a0
4475c: 42a7 clrl %sp@-
4475e: 42a7 clrl %sp@-
44760: 2f30 1864 movel %a0@(00000064,%d1:l),%sp@-
44764: 2d41 fff0 movel %d1,%fp@(-16)
44768: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
4476e: 4fef 000c lea %sp@(12),%sp
44772: 4a80 tstl %d0
44774: 6706 beqs 4477c <rtems_fdisk_ioctl+0x50> <== ALWAYS TAKEN
errno = EIO;
44776: 4e93 jsr %a3@ <== NOT EXECUTED
44778: 6000 0c9c braw 45416 <rtems_fdisk_ioctl+0xcea> <== NOT EXECUTED
else
{
errno = 0;
4477c: 4e93 jsr %a3@
4477e: 2240 moveal %d0,%a1
44780: 4291 clrl %a1@
switch (req)
44782: 0c82 2000 4283 cmpil #536887939,%d2
44788: 6700 0866 beqw 44ff0 <rtems_fdisk_ioctl+0x8c4>
4478c: 621c bhis 447aa <rtems_fdisk_ioctl+0x7e>
4478e: 0c82 2000 4281 cmpil #536887937,%d2
44794: 6700 07fa beqw 44f90 <rtems_fdisk_ioctl+0x864>
44798: 6200 0812 bhiw 44fac <rtems_fdisk_ioctl+0x880>
4479c: 0c82 2000 4280 cmpil #536887936,%d2
447a2: 6600 0c42 bnew 453e6 <rtems_fdisk_ioctl+0xcba>
447a6: 6000 073c braw 44ee4 <rtems_fdisk_ioctl+0x7b8> <== NOT EXECUTED
447aa: 0c82 2000 4285 cmpil #536887941,%d2
447b0: 6700 0948 beqw 450fa <rtems_fdisk_ioctl+0x9ce>
447b4: 6500 0932 bcsw 450e8 <rtems_fdisk_ioctl+0x9bc>
447b8: 0c82 c018 4201 cmpil #-1072152063,%d2
447be: 6600 0c26 bnew 453e6 <rtems_fdisk_ioctl+0xcba>
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
447c2: b6b9 0007 fc0c cmpl 7fc0c <rtems_flashdisk_count>,%d3
447c8: 6410 bccs 447da <rtems_fdisk_ioctl+0xae> <== NEVER TAKEN
(rtems_flashdisks[minor].device_count == 0))
447ca: 2079 0007 fc08 moveal 7fc08 <rtems_flashdisks>,%a0
{
errno = 0;
switch (req)
{
case RTEMS_BLKIO_REQUEST:
if ((minor >= rtems_flashdisk_count) ||
447d0: 222e fff0 movel %fp@(-16),%d1
447d4: 4ab0 1830 tstl %a0@(00000030,%d1:l)
447d8: 6610 bnes 447ea <rtems_fdisk_ioctl+0xbe> <== ALWAYS TAKEN
(rtems_flashdisks[minor].device_count == 0))
{
errno = ENODEV;
447da: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
447e0: 7413 moveq #19,%d2 <== NOT EXECUTED
447e2: 2040 moveal %d0,%a0 <== NOT EXECUTED
447e4: 2082 movel %d2,%a0@ <== NOT EXECUTED
447e6: 6000 0c0e braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
}
else
{
switch (r->req)
447ea: 2012 movel %a2@,%d0
447ec: 670c beqs 447fa <rtems_fdisk_ioctl+0xce>
447ee: 7201 moveq #1,%d1
447f0: b280 cmpl %d0,%d1
447f2: 6600 06e4 bnew 44ed8 <rtems_fdisk_ioctl+0x7ac>
447f6: 6000 023c braw 44a34 <rtems_fdisk_ioctl+0x308>
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
447fa: 4e93 jsr %a3@
447fc: 286e fff0 moveal %fp@(-16),%a4
44800: d9f9 0007 fc08 addal 7fc08 <rtems_flashdisks>,%a4
* @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;
44806: 4bea 0018 lea %a2@(24),%a5
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
4480a: 2d40 ffec movel %d0,%fp@(-20)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
4480e: 42ae fff4 clrl %fp@(-12)
44812: 6000 01fc braw 44a10 <rtems_fdisk_ioctl+0x2e4>
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
44816: 2a2d 0004 movel %a5@(4),%d5
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
4481a: 4286 clrl %d6
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
4481c: 4c6c 5005 0014 remul %a4@(20),%d5,%d5
data = sg->buffer;
44822: 262d 0008 movel %a5@(8),%d3
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
44826: 2d45 ffe8 movel %d5,%fp@(-24)
4482a: 6000 01ce braw 449fa <rtems_fdisk_ioctl+0x2ce>
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
{
ret = rtems_fdisk_read_block (fd, sg->block + b, data);
4482e: 2406 movel %d6,%d2
44830: d495 addl %a5@,%d2
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);
44832: 2f02 movel %d2,%sp@-
44834: 4879 0006 ac3a pea 6ac3a <map.6766+0x494>
4483a: 2f0c movel %a4,%sp@-
4483c: 4eba f0f8 jsr %pc@(43936 <rtems_fdisk_info>)
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
44840: 202c 001c movel %a4@(28),%d0
44844: 90ac 0020 subl %a4@(32),%d0
44848: 4fef 000c lea %sp@(12),%sp
4484c: b082 cmpl %d2,%d0
4484e: 6212 bhis 44862 <rtems_fdisk_ioctl+0x136> <== ALWAYS TAKEN
{
rtems_fdisk_error ("read-block: block out of range: %d", block);
44850: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44852: 4879 0006 ac48 pea 6ac48 <map.6766+0x4a2> <== NOT EXECUTED
44858: 4eba f242 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
4485c: 508f addql #8,%sp <== NOT EXECUTED
4485e: 6000 0bd6 braw 45436 <rtems_fdisk_ioctl+0xd0a> <== NOT EXECUTED
return EIO;
}
bc = &fd->blocks[block];
44862: 2802 movel %d2,%d4
44864: e78c lsll #3,%d4
44866: d8ac 0018 addl %a4@(24),%d4
if (!bc->segment)
4486a: 2044 moveal %d4,%a0
4486c: 2650 moveal %a0@,%a3
4486e: 4a8b tstl %a3
44870: 6626 bnes 44898 <rtems_fdisk_ioctl+0x16c>
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "read-block: no segment mapping: %d", block);
44872: 2f02 movel %d2,%sp@-
44874: 4879 0006 ac6b pea 6ac6b <map.6766+0x4c5>
4487a: 2f0c movel %a4,%sp@-
4487c: 4eba f0b8 jsr %pc@(43936 <rtems_fdisk_info>)
#endif
memset (buffer, 0xff, fd->block_size);
44880: 2f2c 0014 movel %a4@(20),%sp@-
44884: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
44888: 2f03 movel %d3,%sp@-
4488a: 4eb9 0005 c160 jsr 5c160 <memset>
44890: 4fef 0018 lea %sp@(24),%sp
44894: 6000 0b96 braw 4542c <rtems_fdisk_ioctl+0xd00>
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
44898: 2028 0004 movel %a0@(4),%d0
4489c: 2a00 movel %d0,%d5
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
4489e: 4281 clrl %d1
448a0: 4287 clrl %d7
memset (buffer, 0xff, fd->block_size);
return 0;
}
sc = fd->blocks[block].segment;
pd = &sc->page_descriptors[bc->page];
448a2: e78d lsll #3,%d5
448a4: daab 0010 addl %a3@(16),%d5
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
448a8: 2045 moveal %d5,%a0
448aa: 2245 moveal %d5,%a1
448ac: 2068 0004 moveal %a0@(4),%a0
448b0: 3211 movew %a1@,%d1
448b2: 2d48 ffe4 movel %a0,%fp@(-28)
448b6: 2041 moveal %d1,%a0
448b8: 3e29 0002 movew %a1@(2),%d7
448bc: 4a93 tstl %a3@
448be: 6708 beqs 448c8 <rtems_fdisk_ioctl+0x19c> <== NEVER TAKEN
448c0: 223c 0006 cb0a movel #445194,%d1
448c6: 6006 bras 448ce <rtems_fdisk_ioctl+0x1a2>
448c8: 223c 0006 a8a9 movel #436393,%d1 <== NOT EXECUTED
448ce: 2f2e ffe4 movel %fp@(-28),%sp@-
448d2: 2f08 movel %a0,%sp@-
448d4: 2f07 movel %d7,%sp@-
448d6: 2f01 movel %d1,%sp@-
448d8: 2f2b 0024 movel %a3@(36),%sp@-
448dc: 2f2b 0020 movel %a3@(32),%sp@-
448e0: 2f2b 001c movel %a3@(28),%sp@-
448e4: 2f2b 0014 movel %a3@(20),%sp@-
448e8: 2f00 movel %d0,%sp@-
448ea: 2f2b 000c movel %a3@(12),%sp@-
448ee: 2f2b 0008 movel %a3@(8),%sp@-
448f2: 2f02 movel %d2,%sp@-
448f4: 4879 0006 ac8e pea 6ac8e <map.6766+0x4e8>
448fa: 2f0c movel %a4,%sp@-
448fc: 4eba f038 jsr %pc@(43936 <rtems_fdisk_info>)
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))
44900: 4fef 0038 lea %sp@(56),%sp
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
44904: 2045 moveal %d5,%a0
44906: 3028 0002 movew %a0@(2),%d0
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))
4490a: 0800 0000 btst #0,%d0
4490e: 6600 00c8 bnew 449d8 <rtems_fdisk_ioctl+0x2ac>
{
if (rtems_fdisk_page_desc_flags_clear (pd, RTEMS_FDISK_PAGE_USED))
44912: 0800 0001 btst #1,%d0
44916: 6700 00a8 beqw 449c0 <rtems_fdisk_ioctl+0x294>
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);
4491a: 202c 0014 movel %a4@(20),%d0
/*
* 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,
4491e: 2244 moveal %d4,%a1
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,
44920: 2f00 movel %d0,%sp@-
44922: 2f03 movel %d3,%sp@-
/*
* 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,
44924: 222b 0018 movel %a3@(24),%d1
44928: d2a9 0004 addl %a1@(4),%d1
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,
4492c: 4c00 1800 mulsl %d0,%d1
44930: 2f01 movel %d1,%sp@-
44932: 2f0b movel %a3,%sp@-
44934: 2f0c movel %a4,%sp@-
44936: 4eba f1e0 jsr %pc@(43b18 <rtems_fdisk_seg_read>)
* driver. This skips the page descriptors.
*/
int ret = rtems_fdisk_seg_read_page (fd, sc,
bc->page + sc->pages_desc, buffer);
if (ret)
4493a: 4fef 0014 lea %sp@(20),%sp
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,
4493e: 2e00 movel %d0,%d7
* driver. This skips the page descriptors.
*/
int ret = rtems_fdisk_seg_read_page (fd, sc,
bc->page + sc->pages_desc, buffer);
if (ret)
44940: 672e beqs 44970 <rtems_fdisk_ioctl+0x244> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd,
44942: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44944: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4494a: 2044 moveal %d4,%a0 <== NOT EXECUTED
4494c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4494e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44950: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED
44954: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
44958: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
4495c: 4879 0006 acd5 pea 6acd5 <map.6766+0x52f> <== NOT EXECUTED
44962: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44964: 4eba efd0 jsr %pc@(43936 <rtems_fdisk_info>) <== NOT EXECUTED
44968: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
4496c: 6000 0ac8 braw 45436 <rtems_fdisk_ioctl+0xd0a> <== 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)
44970: 2243 moveal %d3,%a1
44972: d3ec 0014 addal %a4@(20),%a1
44976: 2043 moveal %d3,%a0
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
44978: 2679 0007 fc10 moveal 7fc10 <rtems_fdisk_crc16_factor>,%a3
* Calculate the checksum of a page in a segment.
*/
static uint16_t
rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
4497e: 72ff moveq #-1,%d1
44980: 6010 bras 44992 <rtems_fdisk_ioctl+0x266>
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
44982: 4280 clrl %d0
44984: 1018 moveb %a0@+,%d0
44986: b380 eorl %d1,%d0
44988: 0280 0000 00ff andil #255,%d0
4498e: 3233 0a00 movew %a3@(00000000,%d0:l:2),%d1
44992: 0281 0000 ffff andil #65535,%d1
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++)
44998: b3c8 cmpal %a0,%a1
4499a: 66e6 bnes 44982 <rtems_fdisk_ioctl+0x256>
return ret;
}
cs = rtems_fdisk_page_checksum (buffer, fd->block_size);
if (cs == pd->crc)
4499c: 2245 moveal %d5,%a1
4499e: 4280 clrl %d0
449a0: 3011 movew %a1@,%d0
449a2: b081 cmpl %d1,%d0
449a4: 6700 0a86 beqw 4542c <rtems_fdisk_ioctl+0xd00>
return 0;
rtems_fdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
449a8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
449aa: 2f01 movel %d1,%sp@- <== NOT EXECUTED
449ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
449ae: 4879 0006 ad0a pea 6ad0a <map.6766+0x564> <== NOT EXECUTED
449b4: 4eba f0e6 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
449b8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
449bc: 6000 0a78 braw 45436 <rtems_fdisk_ioctl+0xd0a> <== NOT EXECUTED
block, cs, pd->crc);
}
else
{
rtems_fdisk_error ("read-block: block points to used page: %d: %d-%d-%d",
449c0: 2044 moveal %d4,%a0 <== NOT EXECUTED
449c2: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED
449c6: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
449ca: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
449ce: 2f02 movel %d2,%sp@- <== NOT EXECUTED
449d0: 4879 0006 ad3d pea 6ad3d <map.6766+0x597> <== NOT EXECUTED
449d6: 6016 bras 449ee <rtems_fdisk_ioctl+0x2c2> <== NOT EXECUTED
block, sc->device, sc->segment, bc->page);
}
}
else
{
rtems_fdisk_error ("read-block: block page not active: %d: %d-%d-%d",
449d8: 2244 moveal %d4,%a1 <== NOT EXECUTED
449da: 2f29 0004 movel %a1@(4),%sp@- <== NOT EXECUTED
449de: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
449e2: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
449e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
449e8: 4879 0006 ad71 pea 6ad71 <map.6766+0x5cb> <== NOT EXECUTED
449ee: 4eba f0ac jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
449f2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
449f6: 6000 0a3e braw 45436 <rtems_fdisk_ioctl+0xd0a> <== NOT EXECUTED
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
449fa: bcae ffe8 cmpl %fp@(-24),%d6
449fe: 6600 fe2e bnew 4482e <rtems_fdisk_ioctl+0x102>
44a02: 4280 clrl %d0
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
44a04: 52ae fff4 addql #1,%fp@(-12)
44a08: 4bed 0010 lea %a5@(16),%a5
44a0c: 4a80 tstl %d0
44a0e: 6610 bnes 44a20 <rtems_fdisk_ioctl+0x2f4> <== NEVER TAKEN
44a10: 222e fff4 movel %fp@(-12),%d1
44a14: b2aa 0010 cmpl %a2@(16),%d1
44a18: 6500 fdfc bcsw 44816 <rtems_fdisk_ioctl+0xea>
if (ret)
break;
}
}
rtems_blkdev_request_done (req, ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL);
44a1c: 4280 clrl %d0
44a1e: 6002 bras 44a22 <rtems_fdisk_ioctl+0x2f6>
44a20: 701b moveq #27,%d0 <== NOT EXECUTED
static inline void rtems_blkdev_request_done(
rtems_blkdev_request *req,
rtems_status_code status
)
{
(*req->done)(req, status);
44a22: 2f00 movel %d0,%sp@-
44a24: 2f0a movel %a2,%sp@-
44a26: 206a 0004 moveal %a2@(4),%a0
44a2a: 4e90 jsr %a0@
else
{
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_fdisk_read (&rtems_flashdisks[minor], r);
44a2c: 206e ffec moveal %fp@(-20),%a0
44a30: 6000 049e braw 44ed0 <rtems_fdisk_ioctl+0x7a4>
break;
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_fdisk_write (&rtems_flashdisks[minor], r);
44a34: 4e93 jsr %a3@
44a36: 266e fff0 moveal %fp@(-16),%a3
44a3a: d7f9 0007 fc08 addal 7fc08 <rtems_flashdisks>,%a3
* @retval 0 Always. The request done callback contains the status.
*/
static int
rtems_fdisk_write (rtems_flashdisk* fd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
44a40: 43ea 0018 lea %a2@(24),%a1
rtems_fdisk_compact (fd);
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44a44: 41eb 0034 lea %a3@(52),%a0
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);
44a48: 2d40 ffd8 movel %d0,%fp@(-40)
* @retval 0 Always. The request done callback contains the status.
*/
static int
rtems_fdisk_write (rtems_flashdisk* fd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
44a4c: 2d49 fff4 movel %a1,%fp@(-12)
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
44a50: 42ae ffe8 clrl %fp@(-24)
rtems_fdisk_compact (fd);
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44a54: 2d48 ffe0 movel %a0,%fp@(-32)
44a58: 6000 0456 braw 44eb0 <rtems_fdisk_ioctl+0x784>
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
44a5c: 206e fff4 moveal %fp@(-12),%a0
44a60: 2228 0004 movel %a0@(4),%d1
44a64: 4c6b 1001 0014 remul %a3@(20),%d1,%d1
data = sg->buffer;
44a6a: 2e28 0008 movel %a0@(8),%d7
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
{
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
44a6e: 2d41 ffd4 movel %d1,%fp@(-44)
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
44a72: 42ae ffec clrl %fp@(-20)
44a76: 6000 041c braw 44e94 <rtems_fdisk_ioctl+0x768>
{
ret = rtems_fdisk_write_block (fd, sg->block + b, data);
44a7a: 242e ffec movel %fp@(-20),%d2
44a7e: 226e fff4 moveal %fp@(-12),%a1
44a82: d491 addl %a1@,%d2
rtems_fdisk_page_desc* pd;
uint32_t page;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d", block);
44a84: 2f02 movel %d2,%sp@-
44a86: 4879 0006 ada1 pea 6ada1 <map.6766+0x5fb>
44a8c: 2f0b movel %a3,%sp@-
44a8e: 4eba eea6 jsr %pc@(43936 <rtems_fdisk_info>)
/*
* Broken out to allow info messages when testing.
*/
if (block >= (fd->block_count - fd->unavail_blocks))
44a92: 202b 001c movel %a3@(28),%d0
44a96: 90ab 0020 subl %a3@(32),%d0
44a9a: 4fef 000c lea %sp@(12),%sp
44a9e: b082 cmpl %d2,%d0
44aa0: 6212 bhis 44ab4 <rtems_fdisk_ioctl+0x388> <== ALWAYS TAKEN
{
rtems_fdisk_error ("write-block: block out of range: %d", block);
44aa2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44aa4: 4879 0006 adb0 pea 6adb0 <map.6766+0x60a> <== NOT EXECUTED
44aaa: 4eba eff0 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
44aae: 508f addql #8,%sp <== NOT EXECUTED
44ab0: 6000 03d2 braw 44e84 <rtems_fdisk_ioctl+0x758> <== NOT EXECUTED
return EIO;
}
bc = &fd->blocks[block];
44ab4: 2002 movel %d2,%d0
44ab6: e788 lsll #3,%d0
44ab8: 2a6b 0018 moveal %a3@(24),%a5
44abc: dbc0 addal %d0,%a5
/*
* Does the page exist in flash ?
*/
if (bc->segment)
44abe: 2855 moveal %a5@,%a4
44ac0: 4a8c tstl %a4
44ac2: 6700 01b8 beqw 44c7c <rtems_fdisk_ioctl+0x550>
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
44ac6: 222c 0010 movel %a4@(16),%d1
44aca: 2a2d 0004 movel %a5@(4),%d5
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
44ace: 2f05 movel %d5,%sp@-
44ad0: 2f2c 000c movel %a4@(12),%sp@-
44ad4: 2f2c 0008 movel %a4@(8),%sp@-
44ad8: 4879 0006 add4 pea 6add4 <map.6766+0x62e>
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
44ade: 2d41 ffe4 movel %d1,%fp@(-28)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
44ae2: 2f0b movel %a3,%sp@-
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
44ae4: 2d45 ffc8 movel %d5,%fp@(-56)
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: flag used",
44ae8: 4eba ee4c jsr %pc@(43936 <rtems_fdisk_info>)
#endif
/*
* The page exists in flash so see if the page has been changed.
*/
if (rtems_fdisk_seg_verify_page (fd, sc->device, sc->segment,
44aec: 262c 0008 movel %a4@(8),%d3
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;
44af0: 2003 movel %d3,%d0
44af2: 2c03 movel %d3,%d6
44af4: e588 lsll #2,%d0
44af6: e98e lsll #4,%d6
44af8: 206b 002c moveal %a3@(44),%a0
44afc: 9c80 subl %d0,%d6
44afe: d1c6 addal %d6,%a0
#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,
44b00: 282c 000c movel %a4@(12),%d4
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;
44b04: 2c04 movel %d4,%d6
44b06: 2004 movel %d4,%d0
44b08: 2250 moveal %a0@,%a1
44b0a: e98e lsll #4,%d6
44b0c: ed88 lsll #6,%d0
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;
44b0e: 2068 0008 moveal %a0@(8),%a0
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;
44b12: 9086 subl %d6,%d0
#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,
44b14: 2a2c 0018 movel %a4@(24),%d5
44b18: daad 0004 addl %a5@(4),%d5
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;
44b1c: 2031 0804 movel %a1@(00000004,%d0:l),%d0
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);
44b20: 222b 0014 movel %a3@(20),%d1
uint32_t device,
uint32_t segment,
uint32_t page,
const void* buffer)
{
return rtems_fdisk_seg_verify (fd, device, segment,
44b24: 4c01 5800 mulsl %d1,%d5
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;
44b28: 2c28 0008 movel %a0@(8),%d6
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " seg-verify: %02d-%03d: o=%08x s=%d",
44b2c: 2f01 movel %d1,%sp@-
44b2e: 2f05 movel %d5,%sp@-
44b30: 2f04 movel %d4,%sp@-
44b32: 2f03 movel %d3,%sp@-
44b34: 4879 0006 adf5 pea 6adf5 <map.6766+0x64f>
44b3a: 2d41 ffd0 movel %d1,%fp@(-48)
44b3e: 2f0b movel %a3,%sp@-
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;
44b40: 2d40 ffdc movel %d0,%fp@(-36)
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",
44b44: 4eba ee68 jsr %pc@(439ae <rtems_fdisk_printf>)
device, segment, offset, size);
#endif
return ops->verify (sd, device, segment, offset, buffer, size);
44b48: 222e ffd0 movel %fp@(-48),%d1
44b4c: 4fef 002c lea %sp@(44),%sp
44b50: 2246 moveal %d6,%a1
44b52: 2f01 movel %d1,%sp@-
44b54: 2f07 movel %d7,%sp@-
44b56: 2f05 movel %d5,%sp@-
44b58: 2f04 movel %d4,%sp@-
44b5a: 2f03 movel %d3,%sp@-
44b5c: 2f2e ffdc movel %fp@(-36),%sp@-
44b60: 2069 000c moveal %a1@(12),%a0
44b64: 4e90 jsr %a0@
#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,
44b66: 4fef 0018 lea %sp@(24),%sp
44b6a: 4a80 tstl %d0
44b6c: 6622 bnes 44b90 <rtems_fdisk_ioctl+0x464> <== ALWAYS TAKEN
bc->page + sc->pages_desc, buffer) == 0)
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%d=>%02d-%03d-%03d: page verified",
44b6e: 2f2d 0004 movel %a5@(4),%sp@- <== NOT EXECUTED
44b72: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44b76: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44b7a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44b7c: 4879 0006 ae1a pea 6ae1a <map.6766+0x674> <== NOT EXECUTED
44b82: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44b84: 4eba edb0 jsr %pc@(43936 <rtems_fdisk_info>) <== NOT EXECUTED
44b88: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
44b8c: 6000 02fe braw 44e8c <rtems_fdisk_ioctl+0x760> <== NOT EXECUTED
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
44b90: 202e ffc8 movel %fp@(-56),%d0
* 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;
44b94: 72fd moveq #-3,%d1
* Does the page exist in flash ?
*/
if (bc->segment)
{
sc = bc->segment;
pd = &sc->page_descriptors[bc->page];
44b96: e788 lsll #3,%d0
44b98: 226e ffe4 moveal %fp@(-28),%a1
44b9c: d3c0 addal %d0,%a1
* 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;
44b9e: 3029 0002 movew %a1@(2),%d0
* 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);
44ba2: 282d 0004 movel %a5@(4),%d4
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)) +
44ba6: 2604 movel %d4,%d3
* 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;
44ba8: c081 andl %d1,%d0
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)) +
44baa: e78b lsll #3,%d3
* 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;
44bac: 3340 0002 movew %d0,%a1@(2)
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))
44bb0: 7008 moveq #8,%d0
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const rtems_fdisk_page_desc* page_desc)
{
uint32_t offset = ((page * sizeof (rtems_fdisk_page_desc)) +
((uint8_t*) &page_desc->flags) - ((uint8_t*) page_desc));
44bb2: 5483 addql #2,%d3
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
44bb4: c0ab 0008 andl %a3@(8),%d0
44bb8: 675a beqs 44c14 <rtems_fdisk_ioctl+0x4e8> <== NEVER TAKEN
{
uint16_t flash_flags;
int ret;
ret = rtems_fdisk_seg_read (fd, sc, offset,
44bba: 4878 0002 pea 2 <DOUBLE_FLOAT>
44bbe: 486e fff8 pea %fp@(-8)
44bc2: 2f03 movel %d3,%sp@-
44bc4: 2f0c movel %a4,%sp@-
44bc6: 2d49 ffd0 movel %a1,%fp@(-48)
44bca: 2f0b movel %a3,%sp@-
44bcc: 4eba ef4a jsr %pc@(43b18 <rtems_fdisk_seg_read>)
&flash_flags, sizeof (flash_flags));
if (ret)
44bd0: 226e ffd0 moveal %fp@(-48),%a1
((uint8_t*) &page_desc->flags) - ((uint8_t*) page_desc));
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
{
uint16_t flash_flags;
int ret;
ret = rtems_fdisk_seg_read (fd, sc, offset,
44bd4: 2a00 movel %d0,%d5
&flash_flags, sizeof (flash_flags));
if (ret)
44bd6: 4fef 0014 lea %sp@(20),%sp
44bda: 6650 bnes 44c2c <rtems_fdisk_ioctl+0x500> <== NEVER TAKEN
return ret;
if ((flash_flags & page_desc->flags) != page_desc->flags)
44bdc: 4281 clrl %d1
44bde: 3229 0002 movew %a1@(2),%d1
44be2: 302e fff8 movew %fp@(-8),%d0
44be6: 2a01 movel %d1,%d5
44be8: ca80 andl %d0,%d5
44bea: 0285 0000 ffff andil #65535,%d5
44bf0: ba81 cmpl %d1,%d5
44bf2: 6720 beqs 44c14 <rtems_fdisk_ioctl+0x4e8>
{
rtems_fdisk_error (" seg-write-page-flags: %02d-%03d-%03d: "
44bf4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
44bf6: 3f00 movew %d0,%sp@- <== NOT EXECUTED
44bf8: 4267 clrw %sp@- <== NOT EXECUTED
44bfa: 2f04 movel %d4,%sp@- <== NOT EXECUTED
44bfc: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44c00: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44c04: 4879 0006 ae48 pea 6ae48 <map.6766+0x6a2> <== NOT EXECUTED
44c0a: 4eba ee90 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
44c0e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
44c12: 6046 bras 44c5a <rtems_fdisk_ioctl+0x52e> <== NOT EXECUTED
sc->device, sc->segment, page,
flash_flags, page_desc->flags);
return ret;
}
}
return rtems_fdisk_seg_write (fd, sc, offset,
44c14: 4878 0002 pea 2 <DOUBLE_FLOAT>
44c18: 4869 0002 pea %a1@(2)
44c1c: 2f03 movel %d3,%sp@-
44c1e: 2f0c movel %a4,%sp@-
44c20: 2f0b movel %a3,%sp@-
44c22: 4eba f01a jsr %pc@(43c3e <rtems_fdisk_seg_write>)
44c26: 4fef 0014 lea %sp@(20),%sp
44c2a: 2a00 movel %d0,%d5
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)
44c2c: 4a85 tstl %d5
44c2e: 672a beqs 44c5a <rtems_fdisk_ioctl+0x52e> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " write:%02d-%03d-%03d: " \
44c30: 2f05 movel %d5,%sp@- <== NOT EXECUTED
44c32: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
44c38: 2f05 movel %d5,%sp@- <== NOT EXECUTED
44c3a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44c3c: 2f2d 0004 movel %a5@(4),%sp@- <== NOT EXECUTED
44c40: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44c44: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44c48: 4879 0006 ae92 pea 6ae92 <map.6766+0x6ec> <== NOT EXECUTED
44c4e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44c50: 4eba ece4 jsr %pc@(43936 <rtems_fdisk_info>) <== NOT EXECUTED
44c54: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
44c58: 6008 bras 44c62 <rtems_fdisk_ioctl+0x536> <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active--;
44c5a: 53ac 001c subql #1,%a4@(28)
sc->pages_used++;
44c5e: 52ac 0020 addql #1,%a4@(32)
/*
* 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);
44c62: 2f0c movel %a4,%sp@-
44c64: 2f0b movel %a3,%sp@-
44c66: 4eba f28a jsr %pc@(43ef2 <rtems_fdisk_queue_segment>)
/*
* If no background compacting then compact in the forground.
* If we compact we ignore the error as there is little we
* can do from here. The write may will work.
*/
if ((fd->flags & RTEMS_FDISK_BACKGROUND_COMPACT) == 0)
44c6a: 508f addql #8,%sp
44c6c: 7002 moveq #2,%d0
44c6e: c0ab 0008 andl %a3@(8),%d0
44c72: 6608 bnes 44c7c <rtems_fdisk_ioctl+0x550> <== NEVER TAKEN
rtems_fdisk_compact (fd);
44c74: 2f0b movel %a3,%sp@-
44c76: 4eba f684 jsr %pc@(442fc <rtems_fdisk_compact>)
44c7a: 588f addql #4,%sp
/*
* Is it time to compact the disk ?
*
* We override the background compaction configruation.
*/
if (rtems_fdisk_segment_count_queue (&fd->available) <=
44c7c: 2f2b 0034 movel %a3@(52),%sp@-
44c80: 4eba ee7e jsr %pc@(43b00 <rtems_fdisk_segment_count_queue.isra.1>)
44c84: 588f addql #4,%sp
44c86: b0ab 0010 cmpl %a3@(16),%d0
44c8a: 6208 bhis 44c94 <rtems_fdisk_ioctl+0x568> <== ALWAYS TAKEN
fd->avail_compact_segs)
rtems_fdisk_compact (fd);
44c8c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44c8e: 4eba f66c jsr %pc@(442fc <rtems_fdisk_compact>) <== NOT EXECUTED
44c92: 588f addql #4,%sp <== NOT EXECUTED
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44c94: 2f2e ffe0 movel %fp@(-32),%sp@-
44c98: 4eba eb64 jsr %pc@(437fe <rtems_fdisk_segment_queue_pop_head>)
/*
* Is the flash disk full ?
*/
if (!sc)
44c9c: 588f addql #4,%sp
rtems_fdisk_compact (fd);
/*
* Get the next avaliable segment.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44c9e: 2840 moveal %d0,%a4
/*
* Is the flash disk full ?
*/
if (!sc)
44ca0: 4a80 tstl %d0
44ca2: 6632 bnes 44cd6 <rtems_fdisk_ioctl+0x5aa> <== ALWAYS TAKEN
{
/*
* If compacting is configured for the background do it now
* to see if we can get some space back.
*/
if ((fd->flags & RTEMS_FDISK_BACKGROUND_COMPACT))
44ca4: 7002 moveq #2,%d0 <== NOT EXECUTED
44ca6: c0ab 0008 andl %a3@(8),%d0 <== NOT EXECUTED
44caa: 6708 beqs 44cb4 <rtems_fdisk_ioctl+0x588> <== NOT EXECUTED
rtems_fdisk_compact (fd);
44cac: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44cae: 4eba f64c jsr %pc@(442fc <rtems_fdisk_compact>) <== NOT EXECUTED
44cb2: 588f addql #4,%sp <== NOT EXECUTED
/*
* Try again for some free space.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44cb4: 2f2e ffe0 movel %fp@(-32),%sp@- <== NOT EXECUTED
44cb8: 4eba eb44 jsr %pc@(437fe <rtems_fdisk_segment_queue_pop_head>)<== NOT EXECUTED
if (!sc)
44cbc: 588f addql #4,%sp <== NOT EXECUTED
rtems_fdisk_compact (fd);
/*
* Try again for some free space.
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
44cbe: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (!sc)
44cc0: 4a80 tstl %d0 <== NOT EXECUTED
44cc2: 6612 bnes 44cd6 <rtems_fdisk_ioctl+0x5aa> <== NOT EXECUTED
{
rtems_fdisk_error ("write-block: no available pages");
44cc4: 4879 0006 aece pea 6aece <map.6766+0x728> <== NOT EXECUTED
return ENOSPC;
44cca: 741c moveq #28,%d2 <== NOT EXECUTED
*/
sc = rtems_fdisk_segment_queue_pop_head (&fd->available);
if (!sc)
{
rtems_fdisk_error ("write-block: no available pages");
44ccc: 4eba edce jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
44cd0: 588f addql #4,%sp <== NOT EXECUTED
44cd2: 6000 01ce braw 44ea2 <rtems_fdisk_ioctl+0x776> <== NOT EXECUTED
return ENOSPC;
}
}
#if RTEMS_FDISK_TRACE
if (fd->info_level >= 3)
44cd6: 7a02 moveq #2,%d5
44cd8: baab 006c cmpl %a3@(108),%d5
44cdc: 642a bccs 44d08 <rtems_fdisk_ioctl+0x5dc> <== ALWAYS TAKEN
{
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
44cde: 486e fffb pea %fp@(-5) <== NOT EXECUTED
44ce2: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44ce4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44ce6: 4eba f186 jsr %pc@(43e6e <rtems_fdisk_queue_status>) <== NOT EXECUTED
rtems_fdisk_info (fd, " write:%d=>%02d-%03d: queue check: %s",
44cea: 486e fffb pea %fp@(-5) <== NOT EXECUTED
44cee: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44cf2: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44cf6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44cf8: 4879 0006 aeee pea 6aeee <map.6766+0x748> <== NOT EXECUTED
44cfe: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44d00: 4eba ec34 jsr %pc@(43936 <rtems_fdisk_info>) <== NOT EXECUTED
44d04: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
/*
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
44d08: 2a2c 0010 movel %a4@(16),%d5
for (page = 0; page < sc->pages; page++, pd++)
44d0c: 4283 clrl %d3
44d0e: 2c2c 0014 movel %a4@(20),%d6
44d12: 6000 0140 braw 44e54 <rtems_fdisk_ioctl+0x728>
{
if (rtems_fdisk_page_desc_erased (pd))
44d16: 2f04 movel %d4,%sp@-
44d18: 4eba ebd8 jsr %pc@(438f2 <rtems_fdisk_page_desc_erased>)
44d1c: 588f addql #4,%sp
44d1e: 4a00 tstb %d0
44d20: 6700 0130 beqw 44e52 <rtems_fdisk_ioctl+0x726>
* @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)
44d24: 2207 movel %d7,%d1
44d26: d2ab 0014 addl %a3@(20),%d1
44d2a: 2047 moveal %d7,%a0
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
44d2c: 2279 0007 fc10 moveal 7fc10 <rtems_fdisk_crc16_factor>,%a1
* Calculate the checksum of a page in a segment.
*/
static uint16_t
rtems_fdisk_page_checksum (const uint8_t* buffer, uint32_t page_size)
{
uint16_t cs = 0xffff;
44d32: 70ff moveq #-1,%d0
44d34: 6010 bras 44d46 <rtems_fdisk_ioctl+0x61a>
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_fdisk_calc_crc16 (cs, *buffer);
44d36: 4285 clrl %d5
44d38: 1a18 moveb %a0@+,%d5
44d3a: 0280 0000 00ff andil #255,%d0
44d40: bb80 eorl %d5,%d0
44d42: 3031 0a00 movew %a1@(00000000,%d0:l:2),%d0
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++)
44d46: b288 cmpl %a0,%d1
44d48: 66ec bnes 44d36 <rtems_fdisk_ioctl+0x60a>
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);
44d4a: 2044 moveal %d4,%a0
* 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;
44d4c: 7afe moveq #-2,%d5
44d4e: 3228 0002 movew %a0@(2),%d1
for (page = 0; page < sc->pages; page++, pd++)
{
if (rtems_fdisk_page_desc_erased (pd))
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
pd->block = block;
44d52: 2142 0004 movel %d2,%a0@(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;
44d56: c285 andl %d5,%d1
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);
44d58: 3080 movew %d0,%a0@
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: " \
44d5a: 0280 0000 ffff andil #65535,%d0
44d60: 2a01 movel %d1,%d5
if (rtems_fdisk_page_desc_erased (pd))
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
pd->block = block;
bc->segment = sc;
44d62: 2a8c movel %a4,%a5@
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: " \
44d64: 0285 0000 fffe andil #65534,%d5
{
pd->crc = rtems_fdisk_page_checksum (buffer, fd->block_size);
pd->block = block;
bc->segment = sc;
bc->page = page;
44d6a: 2b43 0004 movel %d3,%a5@(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;
44d6e: 3141 0002 movew %d1,%a0@(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: " \
44d72: 4a94 tstl %a4@
44d74: 6708 beqs 44d7e <rtems_fdisk_ioctl+0x652> <== ALWAYS TAKEN
44d76: 223c 0006 cb0a movel #445194,%d1 <== NOT EXECUTED
44d7c: 6006 bras 44d84 <rtems_fdisk_ioctl+0x658> <== NOT EXECUTED
44d7e: 223c 0006 a8a9 movel #436393,%d1
44d84: 2f02 movel %d2,%sp@-
44d86: 2f00 movel %d0,%sp@-
44d88: 2f05 movel %d5,%sp@-
44d8a: 2f01 movel %d1,%sp@-
44d8c: 2f2c 0024 movel %a4@(36),%sp@-
44d90: 2f2c 0020 movel %a4@(32),%sp@-
44d94: 2f2c 001c movel %a4@(28),%sp@-
44d98: 2f06 movel %d6,%sp@-
44d9a: 2f03 movel %d3,%sp@-
44d9c: 2f2c 000c movel %a4@(12),%sp@-
44da0: 2f2c 0008 movel %a4@(8),%sp@-
44da4: 2f02 movel %d2,%sp@-
44da6: 4879 0006 af14 pea 6af14 <map.6766+0x76e>
44dac: 2f0b movel %a3,%sp@-
44dae: 4eba eb86 jsr %pc@(43936 <rtems_fdisk_info>)
/*
* We use the segment page offset not the page number used in the
* driver. This skips the page descriptors.
*/
ret = rtems_fdisk_seg_write_page (fd, sc, page + sc->pages_desc, buffer);
44db2: 4fef 0034 lea %sp@(52),%sp
44db6: 2043 moveal %d3,%a0
44db8: 2e87 movel %d7,%sp@
44dba: d1ec 0018 addal %a4@(24),%a0
44dbe: 2f08 movel %a0,%sp@-
44dc0: 2f0c movel %a4,%sp@-
44dc2: 2f0b movel %a3,%sp@-
44dc4: 4eba ef58 jsr %pc@(43d1e <rtems_fdisk_seg_write_page>)
if (ret)
44dc8: 4fef 0010 lea %sp@(16),%sp
/*
* 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);
44dcc: 2400 movel %d0,%d2
if (ret)
44dce: 671e beqs 44dee <rtems_fdisk_ioctl+0x6c2> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: write page failed: " \
44dd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44dd2: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
44dd8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44dda: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44ddc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
44dde: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44de2: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44de6: 4879 0006 af63 pea 6af63 <map.6766+0x7bd> <== NOT EXECUTED
44dec: 6032 bras 44e20 <rtems_fdisk_ioctl+0x6f4> <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
ret = rtems_fdisk_seg_write_page_desc (fd, sc, page, pd);
44dee: 2f04 movel %d4,%sp@-
44df0: 2f03 movel %d3,%sp@-
44df2: 2f0c movel %a4,%sp@-
44df4: 2f0b movel %a3,%sp@-
44df6: 4eba eece jsr %pc@(43cc6 <rtems_fdisk_seg_write_page_desc>)
if (ret)
44dfa: 4fef 0010 lea %sp@(16),%sp
strerror (ret), ret);
#endif
}
else
{
ret = rtems_fdisk_seg_write_page_desc (fd, sc, page, pd);
44dfe: 2400 movel %d0,%d2
if (ret)
44e00: 672a beqs 44e2c <rtems_fdisk_ioctl+0x700> <== ALWAYS TAKEN
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "write-block:%02d-%03d-%03d: " \
44e02: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44e04: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
44e0a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44e0c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44e0e: 2f2d 0004 movel %a5@(4),%sp@- <== NOT EXECUTED
44e12: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44e16: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44e1a: 4879 0006 af9a pea 6af9a <map.6766+0x7f4> <== NOT EXECUTED
44e20: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44e22: 4eba eb12 jsr %pc@(43936 <rtems_fdisk_info>) <== NOT EXECUTED
44e26: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
44e2a: 6004 bras 44e30 <rtems_fdisk_ioctl+0x704> <== NOT EXECUTED
strerror (ret), ret);
#endif
}
else
{
sc->pages_active++;
44e2c: 52ac 001c addql #1,%a4@(28)
}
}
rtems_fdisk_queue_segment (fd, sc);
44e30: 2f0c movel %a4,%sp@-
44e32: 2f0b movel %a3,%sp@-
44e34: 4eba f0bc jsr %pc@(43ef2 <rtems_fdisk_queue_segment>)
static bool
rtems_fdisk_is_erased_blocks_starvation (rtems_flashdisk* fd)
{
bool starvation = fd->erased_blocks < fd->starvation_threshold;
if (starvation)
44e38: 226b 0024 moveal %a3@(36),%a1
44e3c: 508f addql #8,%sp
44e3e: b3eb 0028 cmpal %a3@(40),%a1
44e42: 6344 blss 44e88 <rtems_fdisk_ioctl+0x75c> <== ALWAYS TAKEN
fd->starvations++;
44e44: 52ab 0070 addql #1,%a3@(112) <== NOT EXECUTED
}
rtems_fdisk_queue_segment (fd, sc);
if (rtems_fdisk_is_erased_blocks_starvation (fd))
rtems_fdisk_compact (fd);
44e48: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44e4a: 4eba f4b0 jsr %pc@(442fc <rtems_fdisk_compact>) <== NOT EXECUTED
44e4e: 588f addql #4,%sp <== NOT EXECUTED
44e50: 6036 bras 44e88 <rtems_fdisk_ioctl+0x75c> <== NOT EXECUTED
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
44e52: 5283 addql #1,%d3
* @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)
44e54: 2803 movel %d3,%d4
44e56: e78c lsll #3,%d4
44e58: d885 addl %d5,%d4
* Find the next avaliable page in the segment.
*/
pd = sc->page_descriptors;
for (page = 0; page < sc->pages; page++, pd++)
44e5a: bc83 cmpl %d3,%d6
44e5c: 6600 feb8 bnew 44d16 <rtems_fdisk_ioctl+0x5ea>
return ret;
}
}
rtems_fdisk_error ("write-block: no erased page descs in segment: %d-%d",
44e60: 2f2c 000c movel %a4@(12),%sp@- <== NOT EXECUTED
44e64: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
44e68: 4879 0006 afd6 pea 6afd6 <map.6766+0x830> <== NOT EXECUTED
44e6e: 4eba ec2c jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
sc->device, sc->segment);
sc->failed = true;
44e72: 7001 moveq #1,%d0 <== NOT EXECUTED
44e74: 2940 0028 movel %d0,%a4@(40) <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, sc);
44e78: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44e7a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44e7c: 4eba f074 jsr %pc@(43ef2 <rtems_fdisk_queue_segment>) <== NOT EXECUTED
44e80: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
return EIO;
44e84: 7405 moveq #5,%d2 <== NOT EXECUTED
44e86: 601a bras 44ea2 <rtems_fdisk_ioctl+0x776> <== NOT EXECUTED
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
{
ret = rtems_fdisk_write_block (fd, sg->block + b, data);
if (ret)
44e88: 4a82 tstl %d2
44e8a: 6616 bnes 44ea2 <rtems_fdisk_ioctl+0x776> <== NEVER TAKEN
uint8_t* data;
uint32_t fb;
uint32_t b;
fb = sg->length / fd->block_size;
data = sg->buffer;
for (b = 0; b < fb; b++, data += fd->block_size)
44e8c: deab 0014 addl %a3@(20),%d7
44e90: 52ae ffec addql #1,%fp@(-20)
44e94: 222e ffd4 movel %fp@(-44),%d1
44e98: b2ae ffec cmpl %fp@(-20),%d1
44e9c: 6600 fbdc bnew 44a7a <rtems_fdisk_ioctl+0x34e>
44ea0: 4282 clrl %d2
{
rtems_blkdev_sg_buffer* sg = req->bufs;
uint32_t buf;
int ret = 0;
for (buf = 0; (ret == 0) && (buf < req->bufnum); buf++, sg++)
44ea2: 7a10 moveq #16,%d5
44ea4: 52ae ffe8 addql #1,%fp@(-24)
44ea8: dbae fff4 addl %d5,%fp@(-12)
44eac: 4a82 tstl %d2
44eae: 6610 bnes 44ec0 <rtems_fdisk_ioctl+0x794> <== NEVER TAKEN
44eb0: 2e2e ffe8 movel %fp@(-24),%d7
44eb4: beaa 0010 cmpl %a2@(16),%d7
44eb8: 6500 fba2 bcsw 44a5c <rtems_fdisk_ioctl+0x330>
if (ret)
break;
}
}
rtems_blkdev_request_done (req, ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL);
44ebc: 4280 clrl %d0
44ebe: 6002 bras 44ec2 <rtems_fdisk_ioctl+0x796>
44ec0: 701b moveq #27,%d0 <== NOT EXECUTED
44ec2: 2f00 movel %d0,%sp@-
44ec4: 2f0a movel %a2,%sp@-
44ec6: 206a 0004 moveal %a2@(4),%a0
44eca: 4e90 jsr %a0@
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);
44ecc: 206e ffd8 moveal %fp@(-40),%a0
44ed0: 4290 clrl %a0@
break;
44ed2: 508f addql #8,%sp
44ed4: 6000 0520 braw 453f6 <rtems_fdisk_ioctl+0xcca>
default:
errno = EINVAL;
44ed8: 4e93 jsr %a3@ <== NOT EXECUTED
44eda: 7216 moveq #22,%d1 <== NOT EXECUTED
44edc: 2240 moveal %d0,%a1 <== NOT EXECUTED
44ede: 2281 movel %d1,%a1@ <== NOT EXECUTED
break;
44ee0: 6000 0514 braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
44ee4: 4e93 jsr %a3@ <== NOT EXECUTED
44ee6: 246e fff0 moveal %fp@(-16),%a2 <== NOT EXECUTED
44eea: d5f9 0007 fc08 addal 7fc08 <rtems_flashdisks>,%a2 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
44ef0: 4879 0006 b00a pea 6b00a <map.6766+0x864> <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
44ef6: 2840 moveal %d0,%a4 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
44ef8: 47fa ea3c lea %pc@(43936 <rtems_fdisk_info>),%a3 <== NOT EXECUTED
44efc: 4283 clrl %d3 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
44efe: 4282 clrl %d2 <== 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);
44f00: 4bfa eaac lea %pc@(439ae <rtems_fdisk_printf>),%a5 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
44f04: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44f06: 4e93 jsr %a3@ <== NOT EXECUTED
44f08: 508f addql #8,%sp <== NOT EXECUTED
44f0a: 6046 bras 44f52 <rtems_fdisk_ioctl+0x826> <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
{
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " erase-flash:%02d", device);
44f0c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44f0e: 4879 0006 b015 pea 6b015 <map.6766+0x86f> <== NOT EXECUTED
44f14: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44f16: 4e93 jsr %a3@ <== 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;
44f18: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
44f1c: 2070 3808 moveal %a0@(00000008,%d3:l),%a0 <== NOT EXECUTED
44f20: 2828 0008 movel %a0@(8),%d4 <== NOT EXECUTED
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, " device-erase: %02d", device);
44f24: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44f26: 4879 0006 b027 pea 6b027 <map.6766+0x881> <== NOT EXECUTED
44f2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44f2e: 4e95 jsr %a5@ <== NOT EXECUTED
#endif
return ops->erase_device (fd->devices[device].descriptor, device);
44f30: 2244 moveal %d4,%a1 <== NOT EXECUTED
44f32: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44f34: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
44f38: 2f30 3808 movel %a0@(00000008,%d3:l),%sp@- <== NOT EXECUTED
44f3c: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED
44f42: 2069 0014 moveal %a1@(20),%a0 <== NOT EXECUTED
44f46: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_fdisk_info (fd, " erase-flash:%02d", device);
#endif
ret = rtems_fdisk_device_erase (fd, device);
if (ret != 0)
44f48: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
44f4c: 4a80 tstl %d0 <== NOT EXECUTED
44f4e: 663a bnes 44f8a <rtems_fdisk_ioctl+0x85e> <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_flash (const rtems_flashdisk* fd)
{
uint32_t device;
for (device = 0; device < fd->device_count; device++)
44f50: 5282 addql #1,%d2 <== NOT EXECUTED
44f52: b4aa 0030 cmpl %a2@(48),%d2 <== NOT EXECUTED
44f56: 65b4 bcss 44f0c <rtems_fdisk_ioctl+0x7e0> <== NOT EXECUTED
44f58: 4283 clrl %d3 <== NOT EXECUTED
44f5a: 4282 clrl %d2 <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
{
if (!fd->devices[device].segments)
return ENOMEM;
ret = rtems_fdisk_recover_block_mappings (fd);
44f5c: 47fa f54c lea %pc@(444aa <rtems_fdisk_recover_block_mappings>),%a3<== NOT EXECUTED
44f60: 601c bras 44f7e <rtems_fdisk_ioctl+0x852> <== NOT EXECUTED
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
{
if (!fd->devices[device].segments)
44f62: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
44f66: 4ab0 3800 tstl %a0@(00000000,%d3:l) <== NOT EXECUTED
44f6a: 671c beqs 44f88 <rtems_fdisk_ioctl+0x85c> <== NOT EXECUTED
return ENOMEM;
ret = rtems_fdisk_recover_block_mappings (fd);
44f6c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44f6e: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED
44f74: 4e93 jsr %a3@ <== NOT EXECUTED
if (ret)
44f76: 588f addql #4,%sp <== NOT EXECUTED
44f78: 4a80 tstl %d0 <== NOT EXECUTED
44f7a: 660e bnes 44f8a <rtems_fdisk_ioctl+0x85e> <== NOT EXECUTED
ret = rtems_fdisk_erase_flash (fd);
if (ret == 0)
{
for (device = 0; device < fd->device_count; device++)
44f7c: 5282 addql #1,%d2 <== NOT EXECUTED
44f7e: b4aa 0030 cmpl %a2@(48),%d2 <== NOT EXECUTED
44f82: 65de bcss 44f62 <rtems_fdisk_ioctl+0x836> <== NOT EXECUTED
44f84: 4280 clrl %d0 <== NOT EXECUTED
44f86: 6002 bras 44f8a <rtems_fdisk_ioctl+0x85e> <== NOT EXECUTED
{
if (!fd->devices[device].segments)
return ENOMEM;
44f88: 700c moveq #12,%d0 <== NOT EXECUTED
}
}
break;
case RTEMS_FDISK_IOCTL_ERASE_DISK:
errno = rtems_fdisk_erase_disk (&rtems_flashdisks[minor]);
44f8a: 2880 movel %d0,%a4@ <== NOT EXECUTED
break;
44f8c: 6000 0468 braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_COMPACT:
errno = rtems_fdisk_compact (&rtems_flashdisks[minor]);
44f90: 4e93 jsr %a3@ <== NOT EXECUTED
44f92: 222e fff0 movel %fp@(-16),%d1 <== NOT EXECUTED
44f96: d2b9 0007 fc08 addl 7fc08 <rtems_flashdisks>,%d1 <== NOT EXECUTED
44f9c: 2440 moveal %d0,%a2 <== NOT EXECUTED
44f9e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
44fa0: 4eba f35a jsr %pc@(442fc <rtems_fdisk_compact>) <== NOT EXECUTED
break;
44fa4: 588f addql #4,%sp <== 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]);
44fa6: 2480 movel %d0,%a2@ <== NOT EXECUTED
break;
44fa8: 6000 044c braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_ERASE_USED:
errno = rtems_fdisk_erase_used (&rtems_flashdisks[minor]);
44fac: 4e93 jsr %a3@ <== NOT EXECUTED
44fae: 262e fff0 movel %fp@(-16),%d3 <== NOT EXECUTED
44fb2: d6b9 0007 fc08 addl 7fc08 <rtems_flashdisks>,%d3 <== NOT EXECUTED
rtems_fdisk_erase_used (rtems_flashdisk* fd)
{
rtems_fdisk_segment_ctl* sc;
int latched_ret = 0;
while ((sc = rtems_fdisk_segment_queue_pop_head (&fd->erase)))
44fb8: 2803 movel %d3,%d4 <== 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]);
44fba: 2440 moveal %d0,%a2 <== NOT EXECUTED
*/
static int
rtems_fdisk_erase_used (rtems_flashdisk* fd)
{
rtems_fdisk_segment_ctl* sc;
int latched_ret = 0;
44fbc: 4282 clrl %d2 <== NOT EXECUTED
while ((sc = rtems_fdisk_segment_queue_pop_head (&fd->erase)))
44fbe: 0684 0000 004c addil #76,%d4 <== NOT EXECUTED
44fc4: 47fa e838 lea %pc@(437fe <rtems_fdisk_segment_queue_pop_head>),%a3<== NOT EXECUTED
{
/*
* The segment will either end up on the available queue or
* the failed queue.
*/
int ret = rtems_fdisk_erase_segment (fd, sc);
44fc8: 49fa edba lea %pc@(43d84 <rtems_fdisk_erase_segment>),%a4<== NOT EXECUTED
44fcc: 6012 bras 44fe0 <rtems_fdisk_ioctl+0x8b4> <== NOT EXECUTED
44fce: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44fd0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
44fd2: 4e94 jsr %a4@ <== NOT EXECUTED
if (ret && !latched_ret)
44fd4: 508f addql #8,%sp <== NOT EXECUTED
44fd6: 4a80 tstl %d0 <== NOT EXECUTED
44fd8: 6706 beqs 44fe0 <rtems_fdisk_ioctl+0x8b4> <== NOT EXECUTED
44fda: 4a82 tstl %d2 <== NOT EXECUTED
44fdc: 6602 bnes 44fe0 <rtems_fdisk_ioctl+0x8b4> <== NOT EXECUTED
44fde: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_fdisk_erase_used (rtems_flashdisk* fd)
{
rtems_fdisk_segment_ctl* sc;
int latched_ret = 0;
while ((sc = rtems_fdisk_segment_queue_pop_head (&fd->erase)))
44fe0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
44fe2: 4e93 jsr %a3@ <== NOT EXECUTED
44fe4: 588f addql #4,%sp <== NOT EXECUTED
44fe6: 4a80 tstl %d0 <== NOT EXECUTED
44fe8: 66e4 bnes 44fce <rtems_fdisk_ioctl+0x8a2> <== 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]);
44fea: 2482 movel %d2,%a2@ <== NOT EXECUTED
break;
44fec: 6000 0408 braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_MONITORING:
errno = rtems_fdisk_monitoring_data (&rtems_flashdisks[minor],
44ff0: 4e93 jsr %a3@ <== NOT EXECUTED
44ff2: 266e fff0 moveal %fp@(-16),%a3 <== NOT EXECUTED
44ff6: d7f9 0007 fc08 addal 7fc08 <rtems_flashdisks>,%a3 <== NOT EXECUTED
44ffc: 2a40 moveal %d0,%a5 <== 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++)
44ffe: 4281 clrl %d1 <== NOT EXECUTED
rtems_fdisk_monitor_data* data)
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
45000: 24ab 0014 movel %a3@(20),%a2@ <== NOT EXECUTED
data->block_count = fd->block_count;
45004: 202b 001c movel %a3@(28),%d0 <== NOT EXECUTED
data->unavail_blocks = fd->unavail_blocks;
45008: 256b 0020 0008 movel %a3@(32),%a2@(8) <== NOT EXECUTED
data->device_count = fd->device_count;
4500e: 262b 0030 movel %a3@(48),%d3 <== NOT EXECUTED
{
uint32_t i;
uint32_t j;
data->block_size = fd->block_size;
data->block_count = fd->block_count;
45012: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED
data->unavail_blocks = fd->unavail_blocks;
data->device_count = fd->device_count;
45016: 2543 000c movel %d3,%a2@(12) <== NOT EXECUTED
data->blocks_used = 0;
4501a: 42aa 0018 clrl %a2@(24) <== NOT EXECUTED
4501e: 6014 bras 45034 <rtems_fdisk_ioctl+0x908> <== NOT EXECUTED
for (i = 0; i < fd->block_count; i++)
if (fd->blocks[i].segment)
45020: 2401 movel %d1,%d2 <== NOT EXECUTED
45022: 206b 0018 moveal %a3@(24),%a0 <== NOT EXECUTED
45026: e78a lsll #3,%d2 <== NOT EXECUTED
45028: 4ab0 2800 tstl %a0@(00000000,%d2:l) <== NOT EXECUTED
4502c: 6704 beqs 45032 <rtems_fdisk_ioctl+0x906> <== NOT EXECUTED
data->blocks_used++;
4502e: 52aa 0018 addql #1,%a2@(24) <== 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++)
45032: 5281 addql #1,%d1 <== NOT EXECUTED
45034: b081 cmpl %d1,%d0 <== NOT EXECUTED
45036: 66e8 bnes 45020 <rtems_fdisk_ioctl+0x8f4> <== NOT EXECUTED
if (fd->blocks[i].segment)
data->blocks_used++;
data->segs_available = rtems_fdisk_segment_count_queue (&fd->available);
45038: 2f2b 0034 movel %a3@(52),%sp@- <== NOT EXECUTED
4503c: 49fa eac2 lea %pc@(43b00 <rtems_fdisk_segment_count_queue.isra.1>),%a4<== NOT EXECUTED
45040: 4e94 jsr %a4@ <== NOT EXECUTED
45042: 2540 001c movel %d0,%a2@(28) <== NOT EXECUTED
data->segs_used = rtems_fdisk_segment_count_queue (&fd->used);
45046: 2eab 0040 movel %a3@(64),%sp@ <== NOT EXECUTED
4504a: 4e94 jsr %a4@ <== NOT EXECUTED
4504c: 2540 0020 movel %d0,%a2@(32) <== NOT EXECUTED
data->segs_failed = rtems_fdisk_segment_count_queue (&fd->failed);
45050: 2eab 0058 movel %a3@(88),%sp@ <== NOT EXECUTED
45054: 4e94 jsr %a4@ <== NOT EXECUTED
45056: 588f addql #4,%sp <== NOT EXECUTED
data->page_count = 0;
data->pages_desc = 0;
data->pages_active = 0;
data->pages_used = 0;
data->pages_bad = 0;
data->seg_erases = 0;
45058: 93c9 subal %a1,%a1 <== NOT EXECUTED
for (i = 0; i < fd->device_count; i++)
4505a: 4281 clrl %d1 <== 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);
4505c: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED
data->segment_count = 0;
45060: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
data->page_count = 0;
45064: 42aa 0014 clrl %a2@(20) <== NOT EXECUTED
data->pages_desc = 0;
45068: 42aa 002c clrl %a2@(44) <== NOT EXECUTED
data->pages_active = 0;
4506c: 42aa 0030 clrl %a2@(48) <== NOT EXECUTED
data->pages_used = 0;
45070: 42aa 0034 clrl %a2@(52) <== NOT EXECUTED
data->pages_bad = 0;
45074: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED
data->seg_erases = 0;
45078: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
4507c: 605a bras 450d8 <rtems_fdisk_ioctl+0x9ac> <== NOT EXECUTED
for (i = 0; i < fd->device_count; i++)
{
data->segment_count += fd->devices[i].segment_count;
4507e: 286b 002c moveal %a3@(44),%a4 <== NOT EXECUTED
45082: d9c9 addal %a1,%a4 <== NOT EXECUTED
45084: 4280 clrl %d0 <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
45086: 4282 clrl %d2 <== NOT EXECUTED
data->pages_bad = 0;
data->seg_erases = 0;
for (i = 0; i < fd->device_count; i++)
{
data->segment_count += fd->devices[i].segment_count;
45088: 282c 0004 movel %a4@(4),%d4 <== NOT EXECUTED
4508c: d9aa 0010 addl %d4,%a2@(16) <== NOT EXECUTED
45090: 603c bras 450ce <rtems_fdisk_ioctl+0x9a2> <== NOT EXECUTED
for (j = 0; j < fd->devices[i].segment_count; j++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
45092: 2054 moveal %a4@,%a0 <== NOT EXECUTED
45094: d1c0 addal %d0,%a0 <== 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++)
45096: 5282 addql #1,%d2 <== NOT EXECUTED
45098: 0680 0000 0030 addil #48,%d0 <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = &fd->devices[i].segments[j];
data->page_count += sc->pages;
4509e: 2a28 0014 movel %a0@(20),%d5 <== NOT EXECUTED
450a2: dbaa 0014 addl %d5,%a2@(20) <== NOT EXECUTED
data->pages_desc += sc->pages_desc;
450a6: 2e28 0018 movel %a0@(24),%d7 <== NOT EXECUTED
450aa: dfaa 002c addl %d7,%a2@(44) <== NOT EXECUTED
data->pages_active += sc->pages_active;
450ae: 2a28 001c movel %a0@(28),%d5 <== NOT EXECUTED
450b2: dbaa 0030 addl %d5,%a2@(48) <== NOT EXECUTED
data->pages_used += sc->pages_used;
450b6: 2e28 0020 movel %a0@(32),%d7 <== NOT EXECUTED
450ba: dfaa 0034 addl %d7,%a2@(52) <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
450be: 2a28 0024 movel %a0@(36),%d5 <== NOT EXECUTED
450c2: dbaa 0038 addl %d5,%a2@(56) <== NOT EXECUTED
data->seg_erases += sc->erased;
450c6: 2e28 002c movel %a0@(44),%d7 <== NOT EXECUTED
450ca: dfaa 0028 addl %d7,%a2@(40) <== 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++)
450ce: b882 cmpl %d2,%d4 <== NOT EXECUTED
450d0: 66c0 bnes 45092 <rtems_fdisk_ioctl+0x966> <== 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++)
450d2: 5281 addql #1,%d1 <== NOT EXECUTED
450d4: 43e9 000c lea %a1@(12),%a1 <== NOT EXECUTED
450d8: b681 cmpl %d1,%d3 <== NOT EXECUTED
450da: 66a2 bnes 4507e <rtems_fdisk_ioctl+0x952> <== NOT EXECUTED
data->pages_bad += sc->pages_bad;
data->seg_erases += sc->erased;
}
}
data->info_level = fd->info_level;
450dc: 256b 006c 003c movel %a3@(108),%a2@(60) <== 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],
450e2: 4295 clrl %a5@ <== NOT EXECUTED
(rtems_fdisk_monitor_data*) argp);
break;
450e4: 6000 0310 braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_INFO_LEVEL:
rtems_flashdisks[minor].info_level = (uintptr_t) argp;
450e8: 2079 0007 fc08 moveal 7fc08 <rtems_flashdisks>,%a0 <== NOT EXECUTED
450ee: 226e fff0 moveal %fp@(-16),%a1 <== NOT EXECUTED
450f2: 218a 986c movel %a2,%a0@(0000006c,%a1:l) <== NOT EXECUTED
break;
450f6: 6000 02fe braw 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
case RTEMS_FDISK_IOCTL_PRINT_STATUS:
errno = rtems_fdisk_print_status (&rtems_flashdisks[minor]);
450fa: 4e93 jsr %a3@ <== NOT EXECUTED
450fc: 246e fff0 moveal %fp@(-16),%a2 <== NOT EXECUTED
45100: d5f9 0007 fc08 addal 7fc08 <rtems_flashdisks>,%a2 <== NOT EXECUTED
uint32_t current_info_level = fd->info_level;
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
45106: 7a03 moveq #3,%d5 <== NOT EXECUTED
rtems_fdisk_printf (fd,
45108: 47fa e8a4 lea %pc@(439ae <rtems_fdisk_printf>),%a3 <== NOT EXECUTED
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
rtems_fdisk_printf (fd, "Starvation threshold\t%d", fd->starvation_threshold);
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
count = rtems_fdisk_segment_count_queue (&fd->available);
4510c: 49fa e9f2 lea %pc@(43b00 <rtems_fdisk_segment_count_queue.isra.1>),%a4<== NOT EXECUTED
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++)
45110: 4282 clrl %d2 <== NOT EXECUTED
*/
static int
rtems_fdisk_print_status (rtems_flashdisk* fd)
{
#if RTEMS_FDISK_TRACE
uint32_t current_info_level = fd->info_level;
45112: 222a 006c movel %a2@(108),%d1 <== NOT EXECUTED
uint32_t total;
uint32_t count;
uint32_t device;
fd->info_level = 3;
45116: 2545 006c movel %d5,%a2@(108) <== NOT EXECUTED
rtems_fdisk_printf (fd,
4511a: 2f2a 0004 movel %a2@(4),%sp@- <== NOT EXECUTED
4511e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
45120: 4879 0006 b03b pea 6b03b <map.6766+0x895> <== NOT EXECUTED
*/
static int
rtems_fdisk_print_status (rtems_flashdisk* fd)
{
#if RTEMS_FDISK_TRACE
uint32_t current_info_level = fd->info_level;
45126: 2d41 ffe0 movel %d1,%fp@(-32) <== NOT EXECUTED
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
4512a: 2f0a movel %a2,%sp@- <== 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]);
4512c: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED
uint32_t count;
uint32_t device;
fd->info_level = 3;
rtems_fdisk_printf (fd,
45130: 4e93 jsr %a3@ <== NOT EXECUTED
"Flash Disk Driver Status : %d.%d", fd->major, fd->minor);
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
45132: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED
45136: 4879 0006 b05c pea 6b05c <map.6766+0x8b6> <== NOT EXECUTED
4513c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4513e: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
45140: 2f2a 0020 movel %a2@(32),%sp@- <== NOT EXECUTED
45144: 4879 0006 b06b pea 6b06b <map.6766+0x8c5> <== NOT EXECUTED
4514a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4514c: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_fdisk_printf (fd, "Starvation threshold\t%d", fd->starvation_threshold);
4514e: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
45152: 2eaa 0024 movel %a2@(36),%sp@ <== NOT EXECUTED
45156: 4879 0006 b07d pea 6b07d <map.6766+0x8d7> <== NOT EXECUTED
4515c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4515e: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
45160: 2f2a 0070 movel %a2@(112),%sp@- <== NOT EXECUTED
45164: 4879 0006 b095 pea 6b095 <map.6766+0x8ef> <== NOT EXECUTED
4516a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4516c: 4e93 jsr %a3@ <== NOT EXECUTED
count = rtems_fdisk_segment_count_queue (&fd->available);
4516e: 2f2a 0034 movel %a2@(52),%sp@- <== NOT EXECUTED
45172: 4e94 jsr %a4@ <== NOT EXECUTED
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
45174: 2eaa 003c movel %a2@(60),%sp@ <== NOT EXECUTED
rtems_fdisk_printf (fd, "Block count\t%d", fd->block_count);
rtems_fdisk_printf (fd, "Unavail blocks\t%d", fd->unavail_blocks);
rtems_fdisk_printf (fd, "Starvation threshold\t%d", fd->starvation_threshold);
rtems_fdisk_printf (fd, "Starvations\t%d", fd->starvations);
count = rtems_fdisk_segment_count_queue (&fd->available);
45178: 2600 movel %d0,%d3 <== NOT EXECUTED
total = count;
rtems_fdisk_printf (fd, "Available queue\t%ld (%ld)",
4517a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4517c: 4879 0006 b0a4 pea 6b0a4 <map.6766+0x8fe> <== NOT EXECUTED
45182: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45184: 4e93 jsr %a3@ <== NOT EXECUTED
count, rtems_fdisk_segment_queue_count (&fd->available));
count = rtems_fdisk_segment_count_queue (&fd->used);
45186: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
4518a: 2eaa 0040 movel %a2@(64),%sp@ <== NOT EXECUTED
4518e: 4e94 jsr %a4@ <== NOT EXECUTED
total += count;
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
45190: 2eaa 0048 movel %a2@(72),%sp@ <== NOT EXECUTED
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;
45194: d680 addl %d0,%d3 <== NOT EXECUTED
rtems_fdisk_printf (fd, "Used queue\t%ld (%ld)",
45196: 2f00 movel %d0,%sp@- <== NOT EXECUTED
45198: 4879 0006 b0be pea 6b0be <map.6766+0x918> <== NOT EXECUTED
4519e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
451a0: 4e93 jsr %a3@ <== NOT EXECUTED
count, rtems_fdisk_segment_queue_count (&fd->used));
count = rtems_fdisk_segment_count_queue (&fd->erase);
451a2: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED
451a6: 4e94 jsr %a4@ <== NOT EXECUTED
total += count;
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
451a8: 2eaa 0054 movel %a2@(84),%sp@ <== NOT EXECUTED
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;
451ac: d680 addl %d0,%d3 <== NOT EXECUTED
rtems_fdisk_printf (fd, "Erase queue\t%ld (%ld)",
451ae: 2f00 movel %d0,%sp@- <== NOT EXECUTED
451b0: 4879 0006 b0d3 pea 6b0d3 <map.6766+0x92d> <== NOT EXECUTED
451b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
451b8: 4e93 jsr %a3@ <== NOT EXECUTED
count, rtems_fdisk_segment_queue_count (&fd->erase));
count = rtems_fdisk_segment_count_queue (&fd->failed);
451ba: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
451be: 2eaa 0058 movel %a2@(88),%sp@ <== NOT EXECUTED
451c2: 4e94 jsr %a4@ <== NOT EXECUTED
total += count;
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
451c4: 2eaa 0060 movel %a2@(96),%sp@ <== NOT EXECUTED
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;
451c8: d680 addl %d0,%d3 <== NOT EXECUTED
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
451ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED
451cc: 4879 0006 b0e9 pea 6b0e9 <map.6766+0x943> <== NOT EXECUTED
451d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
451d4: 4e93 jsr %a3@ <== NOT EXECUTED
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
for (device = 0; device < fd->device_count; device++)
451d6: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED
451da: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
451de: 93c9 subal %a1,%a1 <== NOT EXECUTED
count = rtems_fdisk_segment_count_queue (&fd->failed);
total += count;
rtems_fdisk_printf (fd, "Failed queue\t%ld (%ld)",
count, rtems_fdisk_segment_queue_count (&fd->failed));
count = 0;
451e0: 4281 clrl %d1 <== NOT EXECUTED
451e2: 6010 bras 451f4 <rtems_fdisk_ioctl+0xac8> <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
count += fd->devices[device].segment_count;
451e4: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
451e8: d2b0 2804 addl %a0@(00000004,%d2:l),%d1 <== NOT EXECUTED
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++)
451ec: 5289 addql #1,%a1 <== NOT EXECUTED
451ee: 0682 0000 000c addil #12,%d2 <== NOT EXECUTED
451f4: b089 cmpl %a1,%d0 <== NOT EXECUTED
451f6: 66ec bnes 451e4 <rtems_fdisk_ioctl+0xab8> <== NOT EXECUTED
count += fd->devices[device].segment_count;
rtems_fdisk_printf (fd, "Queue total\t%ld of %ld, %s", total, count,
451f8: 203c 0006 ac32 movel #437298,%d0 <== NOT EXECUTED
451fe: b283 cmpl %d3,%d1 <== NOT EXECUTED
45200: 6606 bnes 45208 <rtems_fdisk_ioctl+0xadc> <== NOT EXECUTED
45202: 203c 0006 ac2f movel #437295,%d0 <== NOT EXECUTED
45208: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4520a: 49fa e7a2 lea %pc@(439ae <rtems_fdisk_printf>),%a4 <== NOT EXECUTED
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
for (device = 0; device < fd->device_count; device++)
4520e: 4282 clrl %d2 <== 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,
45210: 2f01 movel %d1,%sp@- <== NOT EXECUTED
45212: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45214: 4879 0006 b100 pea 6b100 <map.6766+0x95a> <== NOT EXECUTED
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
4521a: 4283 clrl %d3 <== 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,
4521c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4521e: 4e94 jsr %a4@ <== NOT EXECUTED
total == count ? "ok" : "MISSING");
rtems_fdisk_printf (fd, "Device count\t%d", fd->device_count);
45220: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED
45224: 4879 0006 b11b pea 6b11b <map.6766+0x975> <== NOT EXECUTED
4522a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4522c: 4e94 jsr %a4@ <== NOT EXECUTED
4522e: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
45232: 6000 015e braw 45392 <rtems_fdisk_ioctl+0xc66> <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
45236: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45238: 4879 0006 b12b pea 6b12b <map.6766+0x985> <== NOT EXECUTED
rtems_fdisk_printf (fd, " Segment count\t%ld",
4523e: 4285 clrl %d5 <== NOT EXECUTED
fd->devices[device].segment_count);
for (seg = 0; seg < fd->devices[device].segment_count; seg++)
45240: 4284 clrl %d4 <== NOT EXECUTED
for (device = 0; device < fd->device_count; device++)
{
uint32_t block;
uint32_t seg;
rtems_fdisk_printf (fd, " Device\t\t%ld", device);
45242: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45244: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_fdisk_printf (fd, " Segment count\t%ld",
45246: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
4524a: 2f30 3804 movel %a0@(00000004,%d3:l),%sp@- <== NOT EXECUTED
4524e: 4879 0006 b138 pea 6b138 <map.6766+0x992> <== NOT EXECUTED
45254: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45256: 4e94 jsr %a4@ <== NOT EXECUTED
45258: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4525c: 6000 011e braw 4537c <rtems_fdisk_ioctl+0xc50> <== NOT EXECUTED
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];
45260: 2650 moveal %a0@,%a3 <== NOT EXECUTED
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
45262: 486e fffb pea %fp@(-5) <== NOT EXECUTED
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];
45266: d7c5 addal %d5,%a3 <== NOT EXECUTED
uint32_t page;
uint32_t erased = 0;
45268: 4286 clrl %d6 <== NOT EXECUTED
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
4526a: 9bcd subal %a5,%a5 <== NOT EXECUTED
uint32_t active = 0;
uint32_t used = 0;
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
4526c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
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;
4526e: 4207 clrb %d7 <== NOT EXECUTED
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
45270: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45272: 4eba ebfa jsr %pc@(43e6e <rtems_fdisk_queue_status>) <== NOT EXECUTED
45276: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
{
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;
4527a: 42ae fff4 clrl %fp@(-12) <== 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;
uint32_t active = 0;
4527e: 42ae ffec clrl %fp@(-20) <== NOT EXECUTED
45282: 6000 0082 braw 45306 <rtems_fdisk_ioctl+0xbda> <== 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)
45286: 200d movel %a5,%d0 <== NOT EXECUTED
45288: e788 lsll #3,%d0 <== 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]))
4528a: 206b 0010 moveal %a3@(16),%a0 <== NOT EXECUTED
4528e: d1c0 addal %d0,%a0 <== NOT EXECUTED
45290: 2f08 movel %a0,%sp@- <== NOT EXECUTED
45292: 2d48 ffd0 movel %a0,%fp@(-48) <== NOT EXECUTED
45296: 4eba e65a jsr %pc@(438f2 <rtems_fdisk_page_desc_erased>)<== NOT EXECUTED
4529a: 206e ffd0 moveal %fp@(-48),%a0 <== NOT EXECUTED
4529e: 588f addql #4,%sp <== NOT EXECUTED
452a0: 4a00 tstb %d0 <== NOT EXECUTED
452a2: 6704 beqs 452a8 <rtems_fdisk_ioctl+0xb7c> <== NOT EXECUTED
erased++;
452a4: 5286 addql #1,%d6 <== NOT EXECUTED
452a6: 601e bras 452c6 <rtems_fdisk_ioctl+0xb9a> <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
452a8: 3028 0002 movew %a0@(2),%d0 <== NOT EXECUTED
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],
452ac: 0800 0000 btst #0,%d0 <== NOT EXECUTED
452b0: 6614 bnes 452c6 <rtems_fdisk_ioctl+0xb9a> <== NOT EXECUTED
RTEMS_FDISK_PAGE_ACTIVE))
{
if (rtems_fdisk_page_desc_flags_set (&sc->page_descriptors[page],
452b2: 7202 moveq #2,%d1 <== NOT EXECUTED
452b4: c081 andl %d1,%d0 <== NOT EXECUTED
452b6: 4a40 tstw %d0 <== NOT EXECUTED
452b8: 6606 bnes 452c0 <rtems_fdisk_ioctl+0xb94> <== NOT EXECUTED
RTEMS_FDISK_PAGE_USED))
used++;
452ba: 52ae fff4 addql #1,%fp@(-12) <== NOT EXECUTED
452be: 6006 bras 452c6 <rtems_fdisk_ioctl+0xb9a> <== NOT EXECUTED
else
{
active++;
452c0: 52ae ffec addql #1,%fp@(-20) <== NOT EXECUTED
is_active = true;
452c4: 7e01 moveq #1,%d7 <== NOT EXECUTED
}
}
for (block = 0; block < fd->block_count; block++)
452c6: 4281 clrl %d1 <== NOT EXECUTED
452c8: 6034 bras 452fe <rtems_fdisk_ioctl+0xbd2> <== 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)
452ca: 2001 movel %d1,%d0 <== NOT EXECUTED
452cc: e788 lsll #3,%d0 <== NOT EXECUTED
}
}
for (block = 0; block < fd->block_count; block++)
{
if ((fd->blocks[block].segment == sc) &&
452ce: 206a 0018 moveal %a2@(24),%a0 <== NOT EXECUTED
452d2: d1c0 addal %d0,%a0 <== NOT EXECUTED
452d4: b7d0 cmpal %a0@,%a3 <== NOT EXECUTED
452d6: 6624 bnes 452fc <rtems_fdisk_ioctl+0xbd0> <== NOT EXECUTED
452d8: bbe8 0004 cmpal %a0@(4),%a5 <== NOT EXECUTED
452dc: 661e bnes 452fc <rtems_fdisk_ioctl+0xbd0> <== NOT EXECUTED
(fd->blocks[block].page == page) && !is_active)
452de: 4a07 tstb %d7 <== NOT EXECUTED
452e0: 661a bnes 452fc <rtems_fdisk_ioctl+0xbd0> <== NOT EXECUTED
rtems_fdisk_printf (fd,
452e2: 2f01 movel %d1,%sp@- <== NOT EXECUTED
452e4: 2f0d movel %a5,%sp@- <== NOT EXECUTED
452e6: 4879 0006 b14c pea 6b14c <map.6766+0x9a6> <== NOT EXECUTED
452ec: 2d41 ffd0 movel %d1,%fp@(-48) <== NOT EXECUTED
452f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
452f2: 4e94 jsr %a4@ <== NOT EXECUTED
452f4: 222e ffd0 movel %fp@(-48),%d1 <== NOT EXECUTED
452f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
active++;
is_active = true;
}
}
for (block = 0; block < fd->block_count; block++)
452fc: 5281 addql #1,%d1 <== NOT EXECUTED
452fe: b2aa 001c cmpl %a2@(28),%d1 <== NOT EXECUTED
45302: 65c6 bcss 452ca <rtems_fdisk_ioctl+0xb9e> <== NOT EXECUTED
bool is_active = false;
char queues[5];
rtems_fdisk_queue_status (fd, sc, queues);
for (page = 0; page < sc->pages; page++)
45304: 528d addql #1,%a5 <== NOT EXECUTED
45306: 222b 0014 movel %a3@(20),%d1 <== NOT EXECUTED
4530a: b28d cmpl %a5,%d1 <== NOT EXECUTED
4530c: 6200 ff78 bhiw 45286 <rtems_fdisk_ioctl+0xb5a> <== NOT EXECUTED
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
45310: 2e2a 001c movel %a2@(28),%d7 <== NOT EXECUTED
45314: 4280 clrl %d0 <== NOT EXECUTED
45316: 93c9 subal %a1,%a1 <== NOT EXECUTED
45318: 2d47 ffe4 movel %d7,%fp@(-28) <== NOT EXECUTED
4531c: 6014 bras 45332 <rtems_fdisk_ioctl+0xc06> <== NOT EXECUTED
{
if (fd->blocks[block].segment == sc)
4531e: 2e00 movel %d0,%d7 <== NOT EXECUTED
45320: e78f lsll #3,%d7 <== NOT EXECUTED
45322: 206a 0018 moveal %a2@(24),%a0 <== NOT EXECUTED
45326: 2a47 moveal %d7,%a5 <== NOT EXECUTED
45328: b7f5 8800 cmpal %a5@(00000000,%a0:l),%a3 <== NOT EXECUTED
4532c: 6602 bnes 45330 <rtems_fdisk_ioctl+0xc04> <== NOT EXECUTED
count++;
4532e: 5289 addql #1,%a1 <== NOT EXECUTED
page, block);
}
}
count = 0;
for (block = 0; block < fd->block_count; block++)
45330: 5280 addql #1,%d0 <== NOT EXECUTED
45332: b0ae ffe4 cmpl %fp@(-28),%d0 <== NOT EXECUTED
45336: 66e6 bnes 4531e <rtems_fdisk_ioctl+0xbf2> <== NOT EXECUTED
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 +
45338: 202b 001c movel %a3@(28),%d0 <== NOT EXECUTED
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
4533c: 2e01 movel %d1,%d7 <== NOT EXECUTED
4533e: 0685 0000 0030 addil #48,%d5 <== NOT EXECUTED
" 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),
45344: 206b 0020 moveal %a3@(32),%a0 <== NOT EXECUTED
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
45348: 2f09 movel %a1,%sp@- <== 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)
4534a: 43f0 0800 lea %a0@(00000000,%d0:l),%a1 <== NOT EXECUTED
4534e: d3eb 0024 addal %a3@(36),%a1 <== NOT EXECUTED
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
45352: 9e89 subl %a1,%d7 <== NOT EXECUTED
45354: 2f07 movel %d7,%sp@- <== NOT EXECUTED
45356: 2f06 movel %d6,%sp@- <== NOT EXECUTED
45358: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
4535c: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4535e: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
45362: 2f00 movel %d0,%sp@- <== NOT EXECUTED
45364: 2f01 movel %d1,%sp@- <== NOT EXECUTED
45366: 486e fffb pea %fp@(-5) <== NOT EXECUTED
4536a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4536c: 4879 0006 b179 pea 6b179 <map.6766+0x9d3> <== NOT EXECUTED
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++)
45372: 5284 addql #1,%d4 <== NOT EXECUTED
{
if (fd->blocks[block].segment == sc)
count++;
}
rtems_fdisk_printf (fd, " %3ld %s p:%3ld a:%3ld/%3ld" \
45374: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45376: 4e94 jsr %a4@ <== NOT EXECUTED
45378: 4fef 0030 lea %sp@(48),%sp <== NOT EXECUTED
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++)
4537c: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
45380: d1c3 addal %d3,%a0 <== NOT EXECUTED
45382: b8a8 0004 cmpl %a0@(4),%d4 <== NOT EXECUTED
45386: 6500 fed8 bcsw 45260 <rtems_fdisk_ioctl+0xb34> <== NOT EXECUTED
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++)
4538a: 5282 addql #1,%d2 <== NOT EXECUTED
4538c: 0683 0000 000c addil #12,%d3 <== NOT EXECUTED
45392: b4aa 0030 cmpl %a2@(48),%d2 <== NOT EXECUTED
45396: 6500 fe9e bcsw 45236 <rtems_fdisk_ioctl+0xb0a> <== NOT EXECUTED
count);
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
4539a: 266a 0040 moveal %a2@(64),%a3 <== NOT EXECUTED
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
4539e: 4879 0006 b1b5 pea 6b1b5 <map.6766+0xa0f> <== NOT EXECUTED
453a4: 49fa e608 lea %pc@(439ae <rtems_fdisk_printf>),%a4 <== NOT EXECUTED
}
}
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
453a8: 4282 clrl %d2 <== NOT EXECUTED
rtems_fdisk_printf (fd, "Used List:");
453aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
453ac: 4e94 jsr %a4@ <== NOT EXECUTED
453ae: 508f addql #8,%sp <== NOT EXECUTED
453b0: 6020 bras 453d2 <rtems_fdisk_ioctl+0xca6> <== NOT EXECUTED
while (sc)
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
453b2: 2f2b 0020 movel %a3@(32),%sp@- <== NOT EXECUTED
453b6: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
453ba: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
453be: 2f02 movel %d2,%sp@- <== NOT EXECUTED
453c0: 4879 0006 b1c0 pea 6b1c0 <map.6766+0xa1a> <== NOT EXECUTED
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
453c6: 5282 addql #1,%d2 <== NOT EXECUTED
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
while (sc)
{
rtems_fdisk_printf (fd, " %3d %02d:%03d u:%3ld",
453c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
453ca: 4e94 jsr %a4@ <== NOT EXECUTED
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
453cc: 2653 moveal %a3@,%a3 <== NOT EXECUTED
count++;
453ce: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* sc = fd->used.head;
int count = 0;
rtems_fdisk_printf (fd, "Used List:");
while (sc)
453d2: 4a8b tstl %a3 <== NOT EXECUTED
453d4: 66dc bnes 453b2 <rtems_fdisk_ioctl+0xc86> <== NOT EXECUTED
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
}
}
fd->info_level = current_info_level;
453d6: 206e ffe0 moveal %fp@(-32),%a0 <== 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]);
453da: 226e ffe8 moveal %fp@(-24),%a1 <== NOT EXECUTED
count, sc->device, sc->segment, sc->pages_used);
sc = sc->next;
count++;
}
}
fd->info_level = current_info_level;
453de: 2548 006c movel %a0,%a2@(108) <== 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]);
453e2: 4291 clrl %a1@ <== NOT EXECUTED
break;
453e4: 6010 bras 453f6 <rtems_fdisk_ioctl+0xcca> <== NOT EXECUTED
default:
rtems_blkdev_ioctl (dd, req, argp);
453e6: 2f0a movel %a2,%sp@-
453e8: 2f02 movel %d2,%sp@-
453ea: 2f0c movel %a4,%sp@-
453ec: 4eb9 0005 2530 jsr 52530 <rtems_blkdev_ioctl>
break;
453f2: 4fef 000c lea %sp@(12),%sp
}
sc = rtems_semaphore_release (rtems_flashdisks[minor].lock);
453f6: 2079 0007 fc08 moveal 7fc08 <rtems_flashdisks>,%a0
453fc: 222e fff0 movel %fp@(-16),%d1
45400: 2f30 1864 movel %a0@(00000064,%d1:l),%sp@-
45404: 4eb9 0004 a67c jsr 4a67c <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
4540a: 588f addql #4,%sp
4540c: 4a80 tstl %d0
4540e: 670c beqs 4541c <rtems_fdisk_ioctl+0xcf0> <== ALWAYS TAKEN
errno = EIO;
45410: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
45416: 2040 moveal %d0,%a0 <== NOT EXECUTED
45418: 7005 moveq #5,%d0 <== NOT EXECUTED
4541a: 2080 movel %d0,%a0@ <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
4541c: 4eb9 0005 b09c jsr 5b09c <__errno>
45422: 2240 moveal %d0,%a1
45424: 4a91 tstl %a1@
45426: 56c0 sne %d0
45428: 49c0 extbl %d0
4542a: 6010 bras 4543c <rtems_fdisk_ioctl+0xd10>
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)
4542c: d6ac 0014 addl %a4@(20),%d3
45430: 5286 addql #1,%d6
45432: 6000 f5c6 braw 449fa <rtems_fdisk_ioctl+0x2ce>
45436: 7001 moveq #1,%d0 <== NOT EXECUTED
45438: 6000 f5ca braw 44a04 <rtems_fdisk_ioctl+0x2d8> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
}
return errno == 0 ? 0 : -1;
}
4543c: 4cee 3cfc ffa0 moveml %fp@(-96),%d2-%d7/%a2-%a5
45442: 4e5e unlk %fp <== NOT EXECUTED
000439ae <rtems_fdisk_printf>:
*/
static int
rtems_fdisk_printf (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
if (fd->info_level >= 3)
439ae: 7002 moveq #2,%d0
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_printf (const rtems_flashdisk* fd, const char *format, ...)
{
439b0: 4e56 0000 linkw %fp,#0
int ret = 0;
if (fd->info_level >= 3)
439b4: 206e 0008 moveal %fp@(8),%a0
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_printf (const rtems_flashdisk* fd, const char *format, ...)
{
439b8: 2f02 movel %d2,%sp@-
int ret = 0;
if (fd->info_level >= 3)
439ba: b0a8 006c cmpl %a0@(108),%d0
439be: 645a bccs 43a1a <rtems_fdisk_printf+0x6c> <== ALWAYS TAKEN
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
439c0: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
439c6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439ca: 4879 0006 a7b7 pea 6a7b7 <map.6766+0x11> <== NOT EXECUTED
439d0: 4eb9 0005 b91e jsr 5b91e <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
439d6: 486e 0010 pea %fp@(16) <== NOT EXECUTED
439da: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
439e0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
439e4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439e8: 4eb9 0006 32c0 jsr 632c0 <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
439ee: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
if (fd->info_level >= 3)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:");
ret = vfprintf (stdout, format, args);
439f4: 2400 movel %d0,%d2 <== NOT EXECUTED
fprintf (stdout, "\n");
439f6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439fa: 4878 000a pea a <LASTO> <== NOT EXECUTED
439fe: 4eb9 0005 b848 jsr 5b848 <fputc> <== NOT EXECUTED
fflush (stdout);
43a04: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43a0a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a0e: 4eb9 0005 b41a jsr 5b41a <fflush> <== NOT EXECUTED
va_end (args);
43a14: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
43a18: 6002 bras 43a1c <rtems_fdisk_printf+0x6e> <== NOT EXECUTED
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_printf (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
43a1a: 4282 clrl %d2
fprintf (stdout, "\n");
fflush (stdout);
va_end (args);
}
return ret;
}
43a1c: 2002 movel %d2,%d0
43a1e: 242e fffc movel %fp@(-4),%d2
43a22: 4e5e unlk %fp <== NOT EXECUTED
00043ef2 <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)
{
43ef2: 4e56 ffe8 linkw %fp,#-24
43ef6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
43efa: 266e 0008 moveal %fp@(8),%a3
43efe: 246e 000c moveal %fp@(12),%a2
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, " queue-seg:%02d-%03d: p=%d a=%d u=%d b=%d f=%s n=%s",
43f02: 4a92 tstl %a2@
43f04: 6708 beqs 43f0e <rtems_fdisk_queue_segment+0x1c>
43f06: 223c 0006 cb0a movel #445194,%d1
43f0c: 6006 bras 43f14 <rtems_fdisk_queue_segment+0x22>
43f0e: 223c 0006 a8a9 movel #436393,%d1
43f14: 4aaa 0028 tstl %a2@(40)
43f18: 6708 beqs 43f22 <rtems_fdisk_queue_segment+0x30> <== ALWAYS TAKEN
43f1a: 203c 0006 a8ae movel #436398,%d0 <== NOT EXECUTED
43f20: 6006 bras 43f28 <rtems_fdisk_queue_segment+0x36> <== NOT EXECUTED
43f22: 203c 0006 ca77 movel #445047,%d0
43f28: 2f01 movel %d1,%sp@-
43f2a: 2f00 movel %d0,%sp@-
43f2c: 2f2a 0024 movel %a2@(36),%sp@-
43f30: 2f2a 0020 movel %a2@(32),%sp@-
43f34: 2f2a 001c movel %a2@(28),%sp@-
43f38: 2f2a 0014 movel %a2@(20),%sp@-
43f3c: 2f2a 000c movel %a2@(12),%sp@-
43f40: 2f2a 0008 movel %a2@(8),%sp@-
43f44: 4879 0006 a8b5 pea 6a8b5 <map.6766+0x10f>
43f4a: 2f0b movel %a3,%sp@-
43f4c: 4eba f9e8 jsr %pc@(43936 <rtems_fdisk_info>)
/*
* If the segment has failed then check the failed queue and append
* if not failed.
*/
if (sc->failed)
43f50: 4fef 0028 lea %sp@(40),%sp
43f54: 4aaa 0028 tstl %a2@(40)
43f58: 6716 beqs 43f70 <rtems_fdisk_queue_segment+0x7e> <== ALWAYS TAKEN
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43f5a: 206b 0058 moveal %a3@(88),%a0 <== NOT EXECUTED
43f5e: 6008 bras 43f68 <rtems_fdisk_queue_segment+0x76> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
43f60: b5c8 cmpal %a0,%a2 <== NOT EXECUTED
43f62: 6700 00dc beqw 44040 <rtems_fdisk_queue_segment+0x14e><== NOT EXECUTED
return true;
it = it->next;
43f66: 2050 moveal %a0@,%a0 <== 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)
43f68: 4a88 tstl %a0 <== NOT EXECUTED
43f6a: 66f4 bnes 43f60 <rtems_fdisk_queue_segment+0x6e> <== NOT EXECUTED
43f6c: 6000 008e braw 43ffc <rtems_fdisk_queue_segment+0x10a><== NOT EXECUTED
}
/*
* Remove the queue from the available or used queue.
*/
rtems_fdisk_segment_queue_remove (&fd->available, sc);
43f70: 2f0a movel %a2,%sp@-
43f72: 240b movel %a3,%d2
43f74: 0682 0000 0034 addil #52,%d2
43f7a: 49fa f8da lea %pc@(43856 <rtems_fdisk_segment_queue_remove>),%a4
rtems_fdisk_segment_queue_remove (&fd->used, sc);
43f7e: 260b movel %a3,%d3
43f80: 0683 0000 0040 addil #64,%d3
* 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)
43f86: 4bfa f98e lea %pc@(43916 <rtems_fdisk_seg_pages_available>),%a5
}
/*
* Remove the queue from the available or used queue.
*/
rtems_fdisk_segment_queue_remove (&fd->available, sc);
43f8a: 2f02 movel %d2,%sp@-
43f8c: 4e94 jsr %a4@
rtems_fdisk_segment_queue_remove (&fd->used, sc);
43f8e: 2f0a movel %a2,%sp@-
43f90: 2f03 movel %d3,%sp@-
43f92: 4e94 jsr %a4@
* 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)
43f94: 2f0a movel %a2,%sp@-
43f96: 4e95 jsr %a5@
43f98: 4fef 0014 lea %sp@(20),%sp
43f9c: 2840 moveal %d0,%a4
43f9e: 4a80 tstl %d0
43fa0: 6642 bnes 43fe4 <rtems_fdisk_queue_segment+0xf2> <== ALWAYS TAKEN
{
if (sc->pages_active)
43fa2: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED
43fa6: 6718 beqs 43fc0 <rtems_fdisk_queue_segment+0xce> <== 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;
43fa8: 206b 0040 moveal %a3@(64),%a0 <== NOT EXECUTED
while (seg)
43fac: 600c bras 43fba <rtems_fdisk_queue_segment+0xc8> <== NOT EXECUTED
{
if (sc->pages_used > seg->pages_used)
43fae: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED
43fb2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED
43fb6: 655c bcss 44014 <rtems_fdisk_queue_segment+0x122><== NOT EXECUTED
break;
seg = seg->next;
43fb8: 2050 moveal %a0@,%a0 <== NOT EXECUTED
* 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)
43fba: 4a88 tstl %a0 <== NOT EXECUTED
43fbc: 66f0 bnes 43fae <rtems_fdisk_queue_segment+0xbc> <== NOT EXECUTED
43fbe: 604a bras 4400a <rtems_fdisk_queue_segment+0x118><== NOT EXECUTED
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
43fc0: 7001 moveq #1,%d0 <== NOT EXECUTED
43fc2: c0ab 0008 andl %a3@(8),%d0 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
43fc6: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
}
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
43fca: 4a80 tstl %d0 <== NOT EXECUTED
43fcc: 6706 beqs 43fd4 <rtems_fdisk_queue_segment+0xe2> <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
43fce: 47eb 004c lea %a3@(76),%a3 <== NOT EXECUTED
43fd2: 6030 bras 44004 <rtems_fdisk_queue_segment+0x112><== NOT EXECUTED
else
rtems_fdisk_erase_segment (fd, sc);
43fd4: 2d4b 0008 movel %a3,%fp@(8) <== NOT EXECUTED
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
43fd8: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 <== NOT EXECUTED
43fde: 4e5e unlk %fp <== NOT EXECUTED
else
{
if ((fd->flags & RTEMS_FDISK_BACKGROUND_ERASE))
rtems_fdisk_segment_queue_push_tail (&fd->erase, sc);
else
rtems_fdisk_erase_segment (fd, sc);
43fe0: 6000 fda2 braw 43d84 <rtems_fdisk_erase_segment> <== NOT EXECUTED
* bit is cleared for that segment. When 32 erasers
* has occurred the page is re-written to the flash
* with all the counters updated with the number of
* bits cleared and all bits set back to 1.
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
43fe4: 266b 0034 moveal %a3@(52),%a3
while (seg)
43fe8: 600c bras 43ff6 <rtems_fdisk_queue_segment+0x104>
{
if (rtems_fdisk_seg_pages_available (sc) <
rtems_fdisk_seg_pages_available (seg))
43fea: 2f0b movel %a3,%sp@-
43fec: 4e95 jsr %a5@
43fee: 588f addql #4,%sp
*/
rtems_fdisk_segment_ctl* seg = fd->available.head;
while (seg)
{
if (rtems_fdisk_seg_pages_available (sc) <
43ff0: b08c cmpl %a4,%d0
43ff2: 6228 bhis 4401c <rtems_fdisk_queue_segment+0x12a><== NEVER TAKEN
rtems_fdisk_seg_pages_available (seg))
break;
seg = seg->next;
43ff4: 2653 moveal %a3@,%a3
* 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)
43ff6: 4a8b tstl %a3
43ff8: 66f0 bnes 43fea <rtems_fdisk_queue_segment+0xf8>
43ffa: 6030 bras 4402c <rtems_fdisk_queue_segment+0x13a>
* if not failed.
*/
if (sc->failed)
{
if (!rtems_fdisk_segment_queue_present (&fd->failed, sc))
rtems_fdisk_segment_queue_push_tail (&fd->failed, sc);
43ffc: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
44000: 47eb 0058 lea %a3@(88),%a3 <== NOT EXECUTED
44004: 2d4b 0008 movel %a3,%fp@(8) <== NOT EXECUTED
44008: 602a bras 44034 <rtems_fdisk_queue_segment+0x142><== NOT EXECUTED
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->used, sc);
4400a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
4400e: 2d43 0008 movel %d3,%fp@(8) <== NOT EXECUTED
44012: 6020 bras 44034 <rtems_fdisk_queue_segment+0x142><== NOT EXECUTED
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->used, seg, sc);
44014: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44016: 2f08 movel %a0,%sp@- <== NOT EXECUTED
44018: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4401a: 6006 bras 44022 <rtems_fdisk_queue_segment+0x130><== NOT EXECUTED
break;
seg = seg->next;
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
4401c: 2f0a movel %a2,%sp@-
4401e: 2f0b movel %a3,%sp@-
44020: 2f02 movel %d2,%sp@-
44022: 4eba f880 jsr %pc@(438a4 <rtems_fdisk_segment_queue_insert_before>)
44026: 4fef 000c lea %sp@(12),%sp
4402a: 6014 bras 44040 <rtems_fdisk_queue_segment+0x14e>
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
4402c: 2d4a 000c movel %a2,%fp@(12)
44030: 2d42 0008 movel %d2,%fp@(8)
}
}
44034: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4403a: 4e5e unlk %fp
}
if (seg)
rtems_fdisk_segment_queue_insert_before (&fd->available, seg, sc);
else
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
4403c: 6000 f7e4 braw 43822 <rtems_fdisk_segment_queue_push_tail>
}
}
44040: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
44046: 4e5e unlk %fp <== NOT EXECUTED
00043e6e <rtems_fdisk_queue_status>:
*/
static void
rtems_fdisk_queue_status (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
char queues[5])
{
43e6e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
43e72: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
43e76: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43e78: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
43e7c: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43e80: 2469 0034 moveal %a1@(52),%a2 <== NOT EXECUTED
43e84: 6006 bras 43e8c <rtems_fdisk_queue_status+0x1e> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
43e86: b08a cmpl %a2,%d0 <== NOT EXECUTED
43e88: 670a beqs 43e94 <rtems_fdisk_queue_status+0x26> <== NOT EXECUTED
return true;
it = it->next;
43e8a: 2452 moveal %a2@,%a2 <== 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)
43e8c: 4a8a tstl %a2 <== NOT EXECUTED
43e8e: 66f6 bnes 43e86 <rtems_fdisk_queue_status+0x18> <== NOT EXECUTED
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' : '-';
43e90: 722d moveq #45,%d1 <== NOT EXECUTED
43e92: 6002 bras 43e96 <rtems_fdisk_queue_status+0x28> <== NOT EXECUTED
43e94: 7241 moveq #65,%d1 <== NOT EXECUTED
43e96: 1081 moveb %d1,%a0@ <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43e98: 2469 0040 moveal %a1@(64),%a2 <== NOT EXECUTED
43e9c: 6006 bras 43ea4 <rtems_fdisk_queue_status+0x36> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
43e9e: b08a cmpl %a2,%d0 <== NOT EXECUTED
43ea0: 670a beqs 43eac <rtems_fdisk_queue_status+0x3e> <== NOT EXECUTED
return true;
it = it->next;
43ea2: 2452 moveal %a2@,%a2 <== 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)
43ea4: 4a8a tstl %a2 <== NOT EXECUTED
43ea6: 66f6 bnes 43e9e <rtems_fdisk_queue_status+0x30> <== NOT EXECUTED
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' : '-';
43ea8: 722d moveq #45,%d1 <== NOT EXECUTED
43eaa: 6002 bras 43eae <rtems_fdisk_queue_status+0x40> <== NOT EXECUTED
43eac: 7255 moveq #85,%d1 <== NOT EXECUTED
43eae: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43eb2: 2469 004c moveal %a1@(76),%a2 <== NOT EXECUTED
43eb6: 6006 bras 43ebe <rtems_fdisk_queue_status+0x50> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
43eb8: b08a cmpl %a2,%d0 <== NOT EXECUTED
43eba: 670a beqs 43ec6 <rtems_fdisk_queue_status+0x58> <== NOT EXECUTED
return true;
it = it->next;
43ebc: 2452 moveal %a2@,%a2 <== 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)
43ebe: 4a8a tstl %a2 <== NOT EXECUTED
43ec0: 66f6 bnes 43eb8 <rtems_fdisk_queue_status+0x4a> <== 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' : '-';
43ec2: 722d moveq #45,%d1 <== NOT EXECUTED
43ec4: 6002 bras 43ec8 <rtems_fdisk_queue_status+0x5a> <== NOT EXECUTED
43ec6: 7245 moveq #69,%d1 <== NOT EXECUTED
43ec8: 1141 0002 moveb %d1,%a0@(2) <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
43ecc: 2269 0058 moveal %a1@(88),%a1 <== NOT EXECUTED
43ed0: 6006 bras 43ed8 <rtems_fdisk_queue_status+0x6a> <== NOT EXECUTED
{
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
{
if (it == sc)
43ed2: b089 cmpl %a1,%d0 <== NOT EXECUTED
43ed4: 670a beqs 43ee0 <rtems_fdisk_queue_status+0x72> <== NOT EXECUTED
return true;
it = it->next;
43ed6: 2251 moveal %a1@,%a1 <== 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)
43ed8: 4a89 tstl %a1 <== NOT EXECUTED
43eda: 66f6 bnes 43ed2 <rtems_fdisk_queue_status+0x64> <== 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' : '-';
43edc: 702d moveq #45,%d0 <== NOT EXECUTED
43ede: 6002 bras 43ee2 <rtems_fdisk_queue_status+0x74> <== NOT EXECUTED
43ee0: 7046 moveq #70,%d0 <== NOT EXECUTED
43ee2: 1140 0003 moveb %d0,%a0@(3) <== NOT EXECUTED
queues[4] = '\0';
43ee6: 4200 clrb %d0 <== NOT EXECUTED
43ee8: 1140 0004 moveb %d0,%a0@(4) <== NOT EXECUTED
}
43eec: 245f moveal %sp@+,%a2 <== NOT EXECUTED
43eee: 4e5e unlk %fp <== NOT EXECUTED
000444aa <rtems_fdisk_recover_block_mappings>:
/**
* Recover the block mappings from the devices.
*/
static int
rtems_fdisk_recover_block_mappings (rtems_flashdisk* fd)
{
444aa: 4e56 ffd8 linkw %fp,#-40
444ae: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
444b2: 2a6e 0008 moveal %fp@(8),%a5
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
444b6: 4285 clrl %d5
444b8: 4283 clrl %d3
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,
444ba: 49fa f56a lea %pc@(43a26 <rtems_fdisk_warning>),%a4
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
444be: 202d 001c movel %a5@(28),%d0
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
444c2: 42ad 0038 clrl %a5@(56)
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
444c6: e788 lsll #3,%d0
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
444c8: 42ad 0034 clrl %a5@(52)
queue->count = 0;
444cc: 42ad 003c clrl %a5@(60)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
444d0: 42ad 0044 clrl %a5@(68)
444d4: 42ad 0040 clrl %a5@(64)
queue->count = 0;
444d8: 42ad 0048 clrl %a5@(72)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
444dc: 42ad 0050 clrl %a5@(80)
444e0: 42ad 004c clrl %a5@(76)
queue->count = 0;
444e4: 42ad 0054 clrl %a5@(84)
* Initialise the segment control queue.
*/
static void
rtems_fdisk_segment_queue_init (rtems_fdisk_segment_ctl_queue* queue)
{
queue->head = queue->tail = 0;
444e8: 42ad 005c clrl %a5@(92)
444ec: 42ad 0058 clrl %a5@(88)
queue->count = 0;
444f0: 42ad 0060 clrl %a5@(96)
rtems_fdisk_segment_queue_init (&fd->failed);
/*
* Clear the lock mappings.
*/
memset (fd->blocks, 0, fd->block_count * sizeof (rtems_fdisk_block_ctl));
444f4: 2f00 movel %d0,%sp@-
444f6: 42a7 clrl %sp@-
444f8: 2f2d 0018 movel %a5@(24),%sp@-
444fc: 4eb9 0005 c160 jsr 5c160 <memset>
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
44502: 4fef 000c lea %sp@(12),%sp
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;
44506: 42ad 0028 clrl %a5@(40)
fd->starvation_threshold = 0;
4450a: 42ad 0024 clrl %a5@(36)
for (device = 0; device < fd->device_count; device++)
4450e: 6000 0208 braw 44718 <rtems_fdisk_recover_block_mappings+0x26e>
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
{
rtems_fdisk_segment_ctl* sc = &fd->devices[device].segments[segment];
44512: 2651 moveal %a1@,%a3
44514: d7c6 addal %d6,%a3
const rtems_fdisk_segment_desc* sd = sc->descriptor;
44516: 246b 0004 moveal %a3@(4),%a2
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);
4451a: 2f04 movel %d4,%sp@-
4451c: 2f03 movel %d3,%sp@-
4451e: 4879 0006 ab35 pea 6ab35 <map.6766+0x38f>
44524: 2f0d movel %a5,%sp@-
44526: 4eba f40e jsr %pc@(43936 <rtems_fdisk_info>)
#endif
sc->pages_desc = rtems_fdisk_page_desc_pages (sd, fd->block_size);
4452a: 202d 0014 movel %a5@(20),%d0
sc->pages =
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
4452e: 4fef 0010 lea %sp@(16),%sp
*/
static uint32_t
rtems_fdisk_pages_in_segment (const rtems_fdisk_segment_desc* sd,
uint32_t page_size)
{
return sd->size / page_size;
44532: 242a 0008 movel %a2@(8),%d2
44536: 4c40 2002 remul %d0,%d2,%d2
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);
4453a: 2202 movel %d2,%d1
4453c: e789 lsll #3,%d1
return ((bytes - 1) / page_size) + 1;
4453e: 5381 subql #1,%d1
44540: 4c40 1001 remul %d0,%d1,%d1
44544: 5281 addql #1,%d1
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;
44546: 9481 subl %d1,%d2
#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);
44548: 2741 0018 movel %d1,%a3@(24)
sc->pages =
4454c: 2742 0014 movel %d2,%a3@(20)
rtems_fdisk_pages_in_segment (sd, fd->block_size) - sc->pages_desc;
if (sc->pages > fd->starvation_threshold)
44550: b4ad 0024 cmpl %a5@(36),%d2
44554: 6304 blss 4455a <rtems_fdisk_recover_block_mappings+0xb0>
fd->starvation_threshold = sc->pages;
44556: 2b42 0024 movel %d2,%a5@(36)
4455a: 2401 movel %d1,%d2
4455c: 4c00 2800 mulsl %d0,%d2
sc->pages_active = 0;
44560: 42ab 001c clrl %a3@(28)
sc->pages_used = 0;
44564: 42ab 0020 clrl %a3@(32)
sc->pages_bad = 0;
44568: 42ab 0024 clrl %a3@(36)
sc->failed = false;
4456c: 42ab 0028 clrl %a3@(40)
if (!sc->page_descriptors)
44570: 4aab 0010 tstl %a3@(16)
44574: 660e bnes 44584 <rtems_fdisk_recover_block_mappings+0xda><== NEVER TAKEN
sc->page_descriptors = malloc (sc->pages_desc * fd->block_size);
44576: 2f02 movel %d2,%sp@-
44578: 4eb9 0004 6910 jsr 46910 <malloc>
4457e: 588f addql #4,%sp
44580: 2740 0010 movel %d0,%a3@(16)
if (!sc->page_descriptors)
44584: 246b 0010 moveal %a3@(16),%a2
44588: 4a8a tstl %a2
4458a: 660c bnes 44598 <rtems_fdisk_recover_block_mappings+0xee><== ALWAYS TAKEN
rtems_fdisk_abort ("no memory for page descriptors");
4458c: 4879 0006 a80a pea 6a80a <map.6766+0x64> <== NOT EXECUTED
44592: 4eb9 0004 5882 jsr 45882 <rtems_fdisk_abort.constprop.9> <== NOT EXECUTED
* descriptors.
*
* @todo It may be better to ask the driver to get these value
* so NAND flash could be better supported.
*/
ret = rtems_fdisk_seg_read (fd, sc, 0, (void*) pd,
44598: 2f02 movel %d2,%sp@-
4459a: 2f0a movel %a2,%sp@-
4459c: 42a7 clrl %sp@-
4459e: 2f0b movel %a3,%sp@-
445a0: 2f0d movel %a5,%sp@-
445a2: 4eba f574 jsr %pc@(43b18 <rtems_fdisk_seg_read>)
sc->pages_desc * fd->block_size);
if (ret)
445a6: 4fef 0014 lea %sp@(20),%sp
* 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,
445aa: 2400 movel %d0,%d2
sc->pages_desc * fd->block_size);
if (ret)
445ac: 6700 012c beqw 446da <rtems_fdisk_recover_block_mappings+0x230>
{
rtems_fdisk_error ("recover-block-mappings:%02d-%03d: " \
445b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
445b2: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
445b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
445ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED
445bc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
445be: 2f03 movel %d3,%sp@- <== NOT EXECUTED
445c0: 4879 0006 ab56 pea 6ab56 <map.6766+0x3b0> <== NOT EXECUTED
445c6: 4eba f4d4 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
"read page desc failed: %s (%d)",
device, segment, strerror (ret), ret);
return ret;
445ca: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
445ce: 6000 0150 braw 44720 <rtems_fdisk_recover_block_mappings+0x276><== NOT EXECUTED
* If the page is active see if the block is with-in range and
* if the block is a duplicate.
*/
for (page = 0; page < sc->pages; page++, pd++)
{
if (rtems_fdisk_page_desc_erased (pd))
445d2: 2f0a movel %a2,%sp@-
445d4: 4eba f31c jsr %pc@(438f2 <rtems_fdisk_page_desc_erased>)
445d8: 588f addql #4,%sp
445da: 4a00 tstb %d0
445dc: 6774 beqs 44652 <rtems_fdisk_recover_block_mappings+0x1a8><== NEVER TAKEN
rtems_fdisk_seg_blank_check_page (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page)
{
return rtems_fdisk_seg_blank_check (fd, sc,
page * fd->block_size, fd->block_size);
445de: 202d 0014 movel %a5@(20),%d0
if (rtems_fdisk_page_desc_erased (pd))
{
/*
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
445e2: 2202 movel %d2,%d1
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,
445e4: 2f00 movel %d0,%sp@-
if (rtems_fdisk_page_desc_erased (pd))
{
/*
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
445e6: d2ab 0018 addl %a3@(24),%d1
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,
445ea: 4c00 1800 mulsl %d0,%d1
445ee: 2f01 movel %d1,%sp@-
445f0: 2f0b movel %a3,%sp@-
445f2: 2f0d movel %a5,%sp@-
445f4: 4eba f5d2 jsr %pc@(43bc8 <rtems_fdisk_seg_blank_check>)
* Is the page erased ?
*/
ret = rtems_fdisk_seg_blank_check_page (fd, sc,
page + sc->pages_desc);
if (ret == 0)
445f8: 4fef 0010 lea %sp@(16),%sp
445fc: 4a80 tstl %d0
445fe: 6608 bnes 44608 <rtems_fdisk_recover_block_mappings+0x15e><== NEVER TAKEN
{
++fd->erased_blocks;
44600: 52ad 0028 addql #1,%a5@(40)
44604: 6000 00ce braw 446d4 <rtems_fdisk_recover_block_mappings+0x22a>
}
else
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd, "page not blank: %d-%d-%d",
44608: 2f2a 0004 movel %a2@(4),%sp@- <== NOT EXECUTED
4460c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4460e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
44610: 2f03 movel %d3,%sp@- <== NOT EXECUTED
44612: 4879 0006 ab97 pea 6ab97 <map.6766+0x3f1> <== NOT EXECUTED
44618: 2f0d movel %a5,%sp@- <== NOT EXECUTED
4461a: 4e94 jsr %a4@ <== 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;
4461c: 302a 0002 movew %a2@(2),%d0 <== NOT EXECUTED
44620: 72fd moveq #-3,%d1 <== 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,
44622: 2047 moveal %d7,%a0 <== 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;
44624: c081 andl %d1,%d0 <== NOT EXECUTED
44626: 3540 0002 movew %d0,%a2@(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,
4462a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4462c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4462e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44630: 2f0d movel %a5,%sp@- <== NOT EXECUTED
44632: 4e90 jsr %a0@ <== NOT EXECUTED
page, pd);
if (ret)
44634: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED
44638: 4a80 tstl %d0 <== NOT EXECUTED
4463a: 6722 beqs 4465e <rtems_fdisk_recover_block_mappings+0x1b4><== NOT EXECUTED
{
rtems_fdisk_error ("forcing page to used failed: %d-%d-%d",
4463c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4463e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
44640: 2f03 movel %d3,%sp@- <== NOT EXECUTED
44642: 4879 0006 abb0 pea 6abb0 <map.6766+0x40a> <== NOT EXECUTED
44648: 4eba f452 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
4464c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
44650: 600c bras 4465e <rtems_fdisk_recover_block_mappings+0x1b4><== NOT EXECUTED
sc->pages_used++;
}
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
44652: 7202 moveq #2,%d1 <== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
44654: 302a 0002 movew %a2@(2),%d0 <== NOT EXECUTED
sc->pages_used++;
}
}
else
{
if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_USED))
44658: c280 andl %d0,%d1 <== NOT EXECUTED
4465a: 4a41 tstw %d1 <== NOT EXECUTED
4465c: 6606 bnes 44664 <rtems_fdisk_recover_block_mappings+0x1ba><== NOT EXECUTED
{
sc->pages_used++;
4465e: 52ab 0020 addql #1,%a3@(32) <== NOT EXECUTED
44662: 6070 bras 446d4 <rtems_fdisk_recover_block_mappings+0x22a><== NOT EXECUTED
}
else if (rtems_fdisk_page_desc_flags_set (pd, RTEMS_FDISK_PAGE_ACTIVE))
44664: 0800 0000 btst #0,%d0 <== NOT EXECUTED
44668: 6666 bnes 446d0 <rtems_fdisk_recover_block_mappings+0x226><== NOT EXECUTED
{
if (pd->block >= fd->block_count)
4466a: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
4466e: b0ad 001c cmpl %a5@(28),%d0 <== NOT EXECUTED
44672: 651c bcss 44690 <rtems_fdisk_recover_block_mappings+0x1e6><== NOT EXECUTED
{
#if RTEMS_FDISK_TRACE
rtems_fdisk_warning (fd,
44674: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44676: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44678: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4467a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4467c: 4879 0006 abd6 pea 6abd6 <map.6766+0x430> <== NOT EXECUTED
44682: 2f0d movel %a5,%sp@- <== NOT EXECUTED
44684: 4e94 jsr %a4@ <== NOT EXECUTED
"invalid block number: %d-%d-%d: block: %d",
device, segment, page, pd->block);
#endif
sc->pages_bad++;
44686: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4468a: 52ab 0024 addql #1,%a3@(36) <== NOT EXECUTED
4468e: 6044 bras 446d4 <rtems_fdisk_recover_block_mappings+0x22a><== NOT EXECUTED
}
else if (fd->blocks[pd->block].segment)
44690: 206d 0018 moveal %a5@(24),%a0 <== NOT EXECUTED
44694: e788 lsll #3,%d0 <== NOT EXECUTED
44696: d1c0 addal %d0,%a0 <== NOT EXECUTED
44698: 2250 moveal %a0@,%a1 <== NOT EXECUTED
4469a: 4a89 tstl %a1 <== NOT EXECUTED
4469c: 6726 beqs 446c4 <rtems_fdisk_recover_block_mappings+0x21a><== 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: " \
4469e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
446a0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
446a2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
446a4: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED
446a8: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED
446ac: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
446b0: 4879 0006 ac00 pea 6ac00 <map.6766+0x45a> <== NOT EXECUTED
446b6: 4eba f3e4 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
"duplicate: %d-%d-%d",
bsc->device, bsc->segment,
fd->blocks[pd->block].page,
device, segment, page);
sc->pages_bad++;
446ba: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
446be: 52ab 0024 addql #1,%a3@(36) <== NOT EXECUTED
446c2: 6010 bras 446d4 <rtems_fdisk_recover_block_mappings+0x22a><== NOT EXECUTED
{
/**
* @todo
* Add start up crc checks here.
*/
fd->blocks[pd->block].segment = sc;
446c4: 208b movel %a3,%a0@ <== NOT EXECUTED
fd->blocks[pd->block].page = page;
446c6: 2142 0004 movel %d2,%a0@(4) <== NOT EXECUTED
/*
* The page is active.
*/
sc->pages_active++;
446ca: 52ab 001c addql #1,%a3@(28) <== NOT EXECUTED
446ce: 6004 bras 446d4 <rtems_fdisk_recover_block_mappings+0x22a><== NOT EXECUTED
}
}
else
sc->pages_bad++;
446d0: 52ab 0024 addql #1,%a3@(36) <== 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++)
446d4: 5282 addql #1,%d2
446d6: 508a addql #8,%a2
446d8: 6008 bras 446e2 <rtems_fdisk_recover_block_mappings+0x238>
* so NAND flash could be better supported.
*/
ret = rtems_fdisk_seg_read (fd, sc, 0, (void*) pd,
sc->pages_desc * fd->block_size);
if (ret)
446da: 4282 clrl %d2
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,
446dc: 2e3c 0004 3cc6 movel #277702,%d7
* 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++)
446e2: b4ab 0014 cmpl %a3@(20),%d2
446e6: 6500 feea bcsw 445d2 <rtems_fdisk_recover_block_mappings+0x128>
}
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, sc);
446ea: 2f0b movel %a3,%sp@-
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
446ec: 5284 addql #1,%d4
446ee: 0686 0000 0030 addil #48,%d6
}
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, sc);
446f4: 2f0d movel %a5,%sp@-
446f6: 4eba f7fa jsr %pc@(43ef2 <rtems_fdisk_queue_segment>)
446fa: 508f addql #8,%sp
446fc: 6004 bras 44702 <rtems_fdisk_recover_block_mappings+0x258>
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
446fe: 4286 clrl %d6
44700: 4284 clrl %d4
{
uint32_t segment;
for (segment = 0; segment < fd->devices[device].segment_count; segment++)
44702: 226d 002c moveal %a5@(44),%a1
44706: d3c5 addal %d5,%a1
44708: b8a9 0004 cmpl %a1@(4),%d4
4470c: 6500 fe04 bcsw 44512 <rtems_fdisk_recover_block_mappings+0x68>
/*
* Scan each segment or each device recovering the valid pages.
*/
fd->erased_blocks = 0;
fd->starvation_threshold = 0;
for (device = 0; device < fd->device_count; device++)
44710: 5283 addql #1,%d3
44712: 0685 0000 000c addil #12,%d5
44718: b6ad 0030 cmpl %a5@(48),%d3
4471c: 65e0 bcss 446fe <rtems_fdisk_recover_block_mappings+0x254>
*/
rtems_fdisk_queue_segment (fd, sc);
}
}
return 0;
4471e: 4282 clrl %d2
}
44720: 2002 movel %d2,%d0
44722: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
44728: 4e5e unlk %fp <== NOT EXECUTED
0004404a <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)
{
4404a: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
4404e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
44052: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
44056: 4285 clrl %d5 <== NOT EXECUTED
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
int ret;
uint32_t spage;
uint32_t used = 0;
44058: 4286 clrl %d6 <== NOT EXECUTED
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
4405a: 4283 clrl %d3 <== NOT EXECUTED
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* ssc,
rtems_fdisk_segment_ctl* dsc,
uint32_t *pages)
{
4405c: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
44060: 246e 0010 moveal %fp@(16),%a2 <== NOT EXECUTED
44064: 282e 0014 movel %fp@(20),%d4 <== NOT EXECUTED
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
44068: 6000 0238 braw 442a2 <rtems_fdisk_recycle_segment+0x258><== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
4406c: 2003 movel %d3,%d0 <== NOT EXECUTED
4406e: e788 lsll #3,%d0 <== NOT EXECUTED
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
{
rtems_fdisk_page_desc* spd = &ssc->page_descriptors[spage];
44070: 2a6b 0010 moveal %a3@(16),%a5 <== NOT EXECUTED
44074: dbc0 addal %d0,%a5 <== NOT EXECUTED
if (!dsc && ssc->pages_active > 0)
44076: 4a8a tstl %a2 <== NOT EXECUTED
44078: 6616 bnes 44090 <rtems_fdisk_recycle_segment+0x46><== NOT EXECUTED
4407a: 4aab 001c tstl %a3@(28) <== NOT EXECUTED
4407e: 6710 beqs 44090 <rtems_fdisk_recycle_segment+0x46><== NOT EXECUTED
{
rtems_fdisk_error ("recycle: no available dst segment");
44080: 4879 0006 a8e9 pea 6a8e9 <map.6766+0x143> <== NOT EXECUTED
44086: 4eba fa14 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
return EIO;
4408a: 588f addql #4,%sp <== NOT EXECUTED
4408c: 6000 008c braw 4411a <rtems_fdisk_recycle_segment+0xd0><== NOT EXECUTED
}
rtems_flashdisk_count = rtems_flashdisk_configuration_size;
return RTEMS_SUCCESSFUL;
}
44090: 302d 0002 movew %a5@(2),%d0 <== NOT EXECUTED
{
rtems_fdisk_error ("recycle: no available dst segment");
return EIO;
}
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
44094: 0800 0000 btst #0,%d0 <== NOT EXECUTED
44098: 6600 01f2 bnew 4428c <rtems_fdisk_recycle_segment+0x242><== NOT EXECUTED
4409c: 7202 moveq #2,%d1 <== NOT EXECUTED
4409e: c081 andl %d1,%d0 <== NOT EXECUTED
440a0: 4a40 tstw %d0 <== NOT EXECUTED
440a2: 6700 01e8 beqw 4428c <rtems_fdisk_recycle_segment+0x242><== NOT EXECUTED
* Find the next available page in a segment.
*/
static uint32_t
rtems_fdisk_seg_next_available_page (rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_page_desc* pd = &sc->page_descriptors[0];
440a6: 2e2a 0010 movel %a2@(16),%d7 <== NOT EXECUTED
uint32_t page;
for (page = 0; page < sc->pages; page++, pd++)
440aa: 4282 clrl %d2 <== NOT EXECUTED
440ac: 222a 0014 movel %a2@(20),%d1 <== NOT EXECUTED
440b0: 6016 bras 440c8 <rtems_fdisk_recycle_segment+0x7e><== NOT EXECUTED
if (rtems_fdisk_page_desc_erased (pd))
440b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
440b4: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED
440b8: 4eba f838 jsr %pc@(438f2 <rtems_fdisk_page_desc_erased>)<== NOT EXECUTED
440bc: 222e fff8 movel %fp@(-8),%d1 <== NOT EXECUTED
440c0: 588f addql #4,%sp <== NOT EXECUTED
440c2: 4a00 tstb %d0 <== NOT EXECUTED
440c4: 660c bnes 440d2 <rtems_fdisk_recycle_segment+0x88><== NOT EXECUTED
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++)
440c6: 5282 addql #1,%d2 <== NOT EXECUTED
rtems_fdisk_segment_queue_push_tail (&fd->available, sc);
}
}
static int
rtems_fdisk_recycle_segment (rtems_flashdisk* fd,
440c8: 2002 movel %d2,%d0 <== NOT EXECUTED
440ca: e788 lsll #3,%d0 <== NOT EXECUTED
440cc: d087 addl %d7,%d0 <== NOT EXECUTED
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++)
440ce: b282 cmpl %d2,%d1 <== NOT EXECUTED
440d0: 66e0 bnes 440b2 <rtems_fdisk_recycle_segment+0x68><== NOT EXECUTED
uint32_t dst_pages;
rtems_fdisk_page_desc* dpd;
uint32_t dpage;
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
440d2: 2002 movel %d2,%d0 <== NOT EXECUTED
440d4: 2047 moveal %d7,%a0 <== NOT EXECUTED
active++;
440d6: 5285 addql #1,%d5 <== NOT EXECUTED
uint32_t dst_pages;
rtems_fdisk_page_desc* dpd;
uint32_t dpage;
dpage = rtems_fdisk_seg_next_available_page (dsc);
dpd = &dsc->page_descriptors[dpage];
440d8: e788 lsll #3,%d0 <== NOT EXECUTED
440da: d1c0 addal %d0,%a0 <== NOT EXECUTED
440dc: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
active++;
if (dpage >= dsc->pages)
440e0: b282 cmpl %d2,%d1 <== NOT EXECUTED
440e2: 623c bhis 44120 <rtems_fdisk_recycle_segment+0xd6><== NOT EXECUTED
{
rtems_fdisk_error ("recycle: %02d-%03d: " \
440e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
440e6: 4eba f82e jsr %pc@(43916 <rtems_fdisk_seg_pages_available>)<== NOT EXECUTED
440ea: 2e80 movel %d0,%sp@ <== NOT EXECUTED
440ec: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
440f0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
440f4: 4879 0006 a90b pea 6a90b <map.6766+0x165> <== NOT EXECUTED
440fa: 4eba f9a0 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
"no page desc available: %d",
dsc->device, dsc->segment,
rtems_fdisk_seg_pages_available (dsc));
dsc->failed = true;
440fe: 7001 moveq #1,%d0 <== NOT EXECUTED
44100: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
44104: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44106: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44108: 4eba fde8 jsr %pc@(43ef2 <rtems_fdisk_queue_segment>) <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
4410c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4410e: 486c 0040 pea %a4@(64) <== NOT EXECUTED
44112: 4eba f6c4 jsr %pc@(437d8 <rtems_fdisk_segment_queue_push_head>)<== NOT EXECUTED
return EIO;
44116: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
4411a: 7e05 moveq #5,%d7 <== NOT EXECUTED
4411c: 6000 01d2 braw 442f0 <rtems_fdisk_recycle_segment+0x2a6><== NOT EXECUTED
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "recycle: %02d-%03d-%03d=>%02d-%03d-%03d",
44120: 2f02 movel %d2,%sp@- <== NOT EXECUTED
44122: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage);
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
44126: 2e03 movel %d3,%d7 <== NOT EXECUTED
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",
44128: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4412c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4412e: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
44132: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
44136: 4879 0006 a93a pea 6a93a <map.6766+0x194> <== NOT EXECUTED
4413c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4413e: 4eba f7f6 jsr %pc@(43936 <rtems_fdisk_info>) <== NOT EXECUTED
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",
44142: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
#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,
44146: 2042 moveal %d2,%a0 <== NOT EXECUTED
44148: d1ea 0018 addal %a2@(24),%a0 <== NOT EXECUTED
4414c: deab 0018 addl %a3@(24),%d7 <== NOT EXECUTED
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",
44150: 2e88 movel %a0,%sp@ <== NOT EXECUTED
44152: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
44156: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4415a: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4415c: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
44160: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
44164: 4879 0006 a962 pea 6a962 <map.6766+0x1bc> <== NOT EXECUTED
4416a: 2d48 fff8 movel %a0,%fp@(-8) <== NOT EXECUTED
4416e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44170: 4eba f83c jsr %pc@(439ae <rtems_fdisk_printf>) <== NOT EXECUTED
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);
44174: 202c 0014 movel %a4@(20),%d0 <== NOT EXECUTED
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,
44178: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4417c: 4c00 7800 mulsl %d0,%d7 <== NOT EXECUTED
44180: 2e80 movel %d0,%sp@ <== NOT EXECUTED
44182: 2f2c 0068 movel %a4@(104),%sp@- <== NOT EXECUTED
44186: 2f07 movel %d7,%sp@- <== NOT EXECUTED
44188: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4418a: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4418c: 4eba f98a jsr %pc@(43b18 <rtems_fdisk_seg_read>) <== NOT EXECUTED
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)
44190: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
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,
44194: 2e00 movel %d0,%d7 <== NOT EXECUTED
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)
44196: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4419a: 6616 bnes 441b2 <rtems_fdisk_recycle_segment+0x168><== NOT EXECUTED
return ret;
return rtems_fdisk_seg_write_page (fd, dst_sc, dst_page,
4419c: 2f2c 0068 movel %a4@(104),%sp@- <== NOT EXECUTED
441a0: 2f08 movel %a0,%sp@- <== NOT EXECUTED
441a2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
441a4: 2f0c movel %a4,%sp@- <== NOT EXECUTED
441a6: 4eba fb76 jsr %pc@(43d1e <rtems_fdisk_seg_write_page>)<== NOT EXECUTED
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
spage + ssc->pages_desc,
dsc,
dpage + dsc->pages_desc);
if (ret)
441aa: 4fef 0010 lea %sp@(16),%sp <== 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,
441ae: 2e00 movel %d0,%d7 <== NOT EXECUTED
#endif
ret = rtems_fdisk_seg_copy_page (fd, ssc,
spage + ssc->pages_desc,
dsc,
dpage + dsc->pages_desc);
if (ret)
441b0: 6728 beqs 441da <rtems_fdisk_recycle_segment+0x190><== NOT EXECUTED
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
441b2: 2f07 movel %d7,%sp@- <== NOT EXECUTED
441b4: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
441ba: 2f07 movel %d7,%sp@- <== NOT EXECUTED
441bc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
441be: 2f02 movel %d2,%sp@- <== NOT EXECUTED
441c0: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
441c4: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
441c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
441ca: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
441ce: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
441d2: 4879 0006 a992 pea 6a992 <map.6766+0x1ec> <== NOT EXECUTED
441d8: 604a bras 44224 <rtems_fdisk_recycle_segment+0x1da><== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
*dpd = *spd;
441da: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
441de: 2015 movel %a5@,%d0 <== NOT EXECUTED
441e0: 222d 0004 movel %a5@(4),%d1 <== NOT EXECUTED
441e4: 2080 movel %d0,%a0@ <== NOT EXECUTED
441e6: 2141 0004 movel %d1,%a0@(4) <== NOT EXECUTED
ret = rtems_fdisk_seg_write_page_desc (fd,
441ea: 2f08 movel %a0,%sp@- <== NOT EXECUTED
441ec: 2f02 movel %d2,%sp@- <== NOT EXECUTED
441ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
441f0: 2f0c movel %a4,%sp@- <== NOT EXECUTED
441f2: 4eba fad2 jsr %pc@(43cc6 <rtems_fdisk_seg_write_page_desc>)<== NOT EXECUTED
dsc,
dpage, dpd);
if (ret)
441f6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return ret;
}
*dpd = *spd;
ret = rtems_fdisk_seg_write_page_desc (fd,
441fa: 2e00 movel %d0,%d7 <== NOT EXECUTED
dsc,
dpage, dpd);
if (ret)
441fc: 6748 beqs 44246 <rtems_fdisk_recycle_segment+0x1fc><== NOT EXECUTED
{
rtems_fdisk_error ("recycle: %02d-%03d-%03d=>" \
441fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44200: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
44206: 2f07 movel %d7,%sp@- <== NOT EXECUTED
44208: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4420a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4420c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
44210: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
44214: 2f03 movel %d3,%sp@- <== NOT EXECUTED
44216: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
4421a: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
4421e: 4879 0006 a9d5 pea 6a9d5 <map.6766+0x22f> <== NOT EXECUTED
44224: 4eba f876 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
"%02d-%03d-%03d: copy pd failed: %s (%d)",
ssc->device, ssc->segment, spage,
dsc->device, dsc->segment, dpage,
strerror (ret), ret);
rtems_fdisk_queue_segment (fd, dsc);
44228: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
4422c: 2e8a movel %a2,%sp@ <== NOT EXECUTED
4422e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44230: 4eba fcc0 jsr %pc@(43ef2 <rtems_fdisk_queue_segment>) <== NOT EXECUTED
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
44234: 2f0b movel %a3,%sp@- <== NOT EXECUTED
44236: 486c 0040 pea %a4@(64) <== NOT EXECUTED
4423a: 4eba f59c jsr %pc@(437d8 <rtems_fdisk_segment_queue_push_head>)<== NOT EXECUTED
return ret;
4423e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
44242: 6000 00ac braw 442f0 <rtems_fdisk_recycle_segment+0x2a6><== NOT EXECUTED
*/
ssc->pages_active--;
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
44246: 202d 0004 movel %a5@(4),%d0 <== NOT EXECUTED
rtems_fdisk_queue_segment (fd, dsc);
rtems_fdisk_segment_queue_push_head (&fd->used, ssc);
return ret;
}
dsc->pages_active++;
4424a: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED
* We do the stats to make sure everything is as it should
* be.
*/
ssc->pages_active--;
ssc->pages_used++;
4424e: 52ab 0020 addql #1,%a3@(32) <== NOT EXECUTED
* 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--;
44252: 53ab 001c subql #1,%a3@(28) <== NOT EXECUTED
ssc->pages_used++;
fd->blocks[spd->block].segment = dsc;
44256: 206c 0018 moveal %a4@(24),%a0 <== NOT EXECUTED
4425a: e788 lsll #3,%d0 <== NOT EXECUTED
4425c: d1c0 addal %d0,%a0 <== NOT EXECUTED
4425e: 208a movel %a2,%a0@ <== NOT EXECUTED
fd->blocks[spd->block].page = dpage;
44260: 2142 0004 movel %d2,%a0@(4) <== NOT EXECUTED
/*
* Place the segment on to the correct queue.
*/
rtems_fdisk_queue_segment (fd, dsc);
44264: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44266: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44268: 4eba fc88 jsr %pc@(43ef2 <rtems_fdisk_queue_segment>) <== NOT EXECUTED
/*
* Get new destination segment if necessary.
*/
dst_pages = rtems_fdisk_seg_pages_available (dsc);
4426c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4426e: 4eba f6a6 jsr %pc@(43916 <rtems_fdisk_seg_pages_available>)<== NOT EXECUTED
if (dst_pages == 0)
44272: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44276: 4a80 tstl %d0 <== NOT EXECUTED
44278: 660c bnes 44286 <rtems_fdisk_recycle_segment+0x23c><== NOT EXECUTED
dsc = rtems_fdisk_seg_most_available (&fd->available);
4427a: 2f2c 0034 movel %a4@(52),%sp@- <== NOT EXECUTED
4427e: 4eba f910 jsr %pc@(43b90 <rtems_fdisk_seg_most_available.isra.8>)<== NOT EXECUTED
44282: 588f addql #4,%sp <== NOT EXECUTED
44284: 2440 moveal %d0,%a2 <== NOT EXECUTED
(*pages)--;
44286: 2044 moveal %d4,%a0 <== NOT EXECUTED
44288: 5390 subql #1,%a0@ <== NOT EXECUTED
return EIO;
}
if (rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_ACTIVE) &&
!rtems_fdisk_page_desc_flags_set (spd, RTEMS_FDISK_PAGE_USED))
{
4428a: 6014 bras 442a0 <rtems_fdisk_recycle_segment+0x256><== NOT EXECUTED
if (dst_pages == 0)
dsc = rtems_fdisk_seg_most_available (&fd->available);
(*pages)--;
}
else if (rtems_fdisk_page_desc_erased (spd))
4428c: 2f0d movel %a5,%sp@- <== NOT EXECUTED
4428e: 4eba f662 jsr %pc@(438f2 <rtems_fdisk_page_desc_erased>)<== NOT EXECUTED
44292: 588f addql #4,%sp <== NOT EXECUTED
44294: 4a00 tstb %d0 <== NOT EXECUTED
44296: 6706 beqs 4429e <rtems_fdisk_recycle_segment+0x254><== NOT EXECUTED
{
--fd->erased_blocks;
44298: 53ac 0028 subql #1,%a4@(40) <== NOT EXECUTED
4429c: 6002 bras 442a0 <rtems_fdisk_recycle_segment+0x256><== NOT EXECUTED
}
else
{
used++;
4429e: 5286 addql #1,%d6 <== NOT EXECUTED
int ret;
uint32_t spage;
uint32_t used = 0;
uint32_t active = 0;
for (spage = 0; spage < ssc->pages; spage++)
442a0: 5283 addql #1,%d3 <== NOT EXECUTED
442a2: b6ab 0014 cmpl %a3@(20),%d3 <== NOT EXECUTED
442a6: 6500 fdc4 bcsw 4406c <rtems_fdisk_recycle_segment+0x22><== NOT EXECUTED
used++;
}
}
#if RTEMS_FDISK_TRACE
rtems_fdisk_printf (fd, "ssc end: %d-%d: p=%ld, a=%ld, u=%ld",
442aa: 2f06 movel %d6,%sp@- <== NOT EXECUTED
442ac: 2f05 movel %d5,%sp@- <== NOT EXECUTED
442ae: 2f04 movel %d4,%sp@- <== NOT EXECUTED
442b0: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
442b4: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
442b8: 4879 0006 aa16 pea 6aa16 <map.6766+0x270> <== NOT EXECUTED
442be: 2f0c movel %a4,%sp@- <== NOT EXECUTED
442c0: 4eba f6ec jsr %pc@(439ae <rtems_fdisk_printf>) <== NOT EXECUTED
ssc->device, ssc->segment,
pages, active, used);
#endif
if (ssc->pages_active != 0)
442c4: 202b 001c movel %a3@(28),%d0 <== NOT EXECUTED
442c8: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
442cc: 670e beqs 442dc <rtems_fdisk_recycle_segment+0x292><== NOT EXECUTED
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
442ce: 2f00 movel %d0,%sp@- <== NOT EXECUTED
442d0: 4879 0006 aa3a pea 6aa3a <map.6766+0x294> <== NOT EXECUTED
442d6: 4eba f7c4 jsr %pc@(43a9c <rtems_fdisk_error>) <== NOT EXECUTED
442da: 508f addql #8,%sp <== NOT EXECUTED
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
442dc: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED
442e0: 2d4c 0008 movel %a4,%fp@(8) <== NOT EXECUTED
return ret;
}
442e4: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED
442ea: 4e5e unlk %fp <== NOT EXECUTED
{
rtems_fdisk_error ("compacting: ssc pages not 0: %d",
ssc->pages_active);
}
ret = rtems_fdisk_erase_segment (fd, ssc);
442ec: 6000 fa96 braw 43d84 <rtems_fdisk_erase_segment> <== NOT EXECUTED
return ret;
}
442f0: 2007 movel %d7,%d0 <== NOT EXECUTED
442f2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED
442f8: 4e5e unlk %fp <== NOT EXECUTED
00043b90 <rtems_fdisk_seg_most_available.isra.8>:
/**
* 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)
43b90: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
43b94: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
43b98: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_fdisk_segment_ctl* sc = queue->head;
rtems_fdisk_segment_ctl* biggest = queue->head;
while (sc)
{
if (rtems_fdisk_seg_pages_available (sc) >
43b9c: 47fa fd78 lea %pc@(43916 <rtems_fdisk_seg_pages_available>),%a3<== NOT EXECUTED
*/
static rtems_fdisk_segment_ctl*
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;
43ba0: 240a movel %a2,%d2 <== NOT EXECUTED
43ba2: 6014 bras 43bb8 <rtems_fdisk_seg_most_available.isra.8+0x28><== NOT EXECUTED
while (sc)
{
if (rtems_fdisk_seg_pages_available (sc) >
43ba4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43ba6: 4e93 jsr %a3@ <== NOT EXECUTED
43ba8: 2600 movel %d0,%d3 <== NOT EXECUTED
rtems_fdisk_seg_pages_available (biggest))
43baa: 2e82 movel %d2,%sp@ <== NOT EXECUTED
43bac: 4e93 jsr %a3@ <== NOT EXECUTED
43bae: 588f addql #4,%sp <== NOT EXECUTED
rtems_fdisk_segment_ctl* sc = queue->head;
rtems_fdisk_segment_ctl* biggest = queue->head;
while (sc)
{
if (rtems_fdisk_seg_pages_available (sc) >
43bb0: b083 cmpl %d3,%d0 <== NOT EXECUTED
43bb2: 6402 bccs 43bb6 <rtems_fdisk_seg_most_available.isra.8+0x26><== NOT EXECUTED
43bb4: 240a movel %a2,%d2 <== NOT EXECUTED
rtems_fdisk_seg_pages_available (biggest))
biggest = sc;
sc = sc->next;
43bb6: 2452 moveal %a2@,%a2 <== NOT EXECUTED
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)
43bb8: 4a8a tstl %a2 <== NOT EXECUTED
43bba: 66e8 bnes 43ba4 <rtems_fdisk_seg_most_available.isra.8+0x14><== NOT EXECUTED
biggest = sc;
sc = sc->next;
}
return biggest;
}
43bbc: 2002 movel %d2,%d0 <== NOT EXECUTED
43bbe: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
43bc4: 4e5e unlk %fp <== NOT EXECUTED
00043c3e <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)
{
43c3e: 4e56 ffe4 linkw %fp,#-28
43c42: 226e 0008 moveal %fp@(8),%a1
43c46: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
43c4a: 246e 000c moveal %fp@(12),%a2
int ret;
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
43c4e: 242a 0008 movel %a2@(8),%d2
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;
43c52: 2202 movel %d2,%d1
43c54: 2002 movel %d2,%d0
43c56: e589 lsll #2,%d1
43c58: e988 lsll #4,%d0
43c5a: 2669 002c moveal %a1@(44),%a3
43c5e: 9081 subl %d1,%d0
43c60: d7c0 addal %d0,%a3
uint32_t device;
uint32_t segment;
const rtems_fdisk_segment_desc* sd;
const rtems_fdisk_driver_handlers* ops;
device = sc->device;
segment = sc->segment;
43c62: 262a 000c movel %a2@(12),%d3
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;
43c66: 2203 movel %d3,%d1
43c68: 2003 movel %d3,%d0
43c6a: e989 lsll #4,%d1
43c6c: ed88 lsll #6,%d0
43c6e: 2053 moveal %a3@,%a0
43c70: 9081 subl %d1,%d0
43c72: 2c30 0804 movel %a0@(00000004,%d0:l),%d6
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;
43c76: 206b 0008 moveal %a3@(8),%a0
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
43c7a: 2a2e 0018 movel %fp@(24),%d5
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;
43c7e: 2668 0008 moveal %a0@(8),%a3
rtems_fdisk_seg_write (const rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t offset,
const void* buffer,
uint32_t size)
{
43c82: 282e 0010 movel %fp@(16),%d4
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",
43c86: 2f05 movel %d5,%sp@-
43c88: 2f04 movel %d4,%sp@-
43c8a: 2f03 movel %d3,%sp@-
43c8c: 2f02 movel %d2,%sp@-
43c8e: 4879 0006 a84d pea 6a84d <map.6766+0xa7>
43c94: 2f09 movel %a1,%sp@-
43c96: 4eba fd16 jsr %pc@(439ae <rtems_fdisk_printf>)
device, segment, offset, size);
#endif
ret = ops->write (sd, device, segment, offset, buffer, size);
43c9a: 2f05 movel %d5,%sp@-
43c9c: 2f2e 0014 movel %fp@(20),%sp@-
43ca0: 2f04 movel %d4,%sp@-
43ca2: 2f03 movel %d3,%sp@-
43ca4: 2f02 movel %d2,%sp@-
43ca6: 2f06 movel %d6,%sp@-
43ca8: 206b 0004 moveal %a3@(4),%a0
43cac: 4e90 jsr %a0@
if (ret)
43cae: 4fef 0030 lea %sp@(48),%sp
43cb2: 4a80 tstl %d0
43cb4: 6706 beqs 43cbc <rtems_fdisk_seg_write+0x7e> <== ALWAYS TAKEN
sc->failed = true;
43cb6: 7201 moveq #1,%d1 <== NOT EXECUTED
43cb8: 2541 0028 movel %d1,%a2@(40) <== NOT EXECUTED
return ret;
}
43cbc: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
43cc2: 4e5e unlk %fp <== NOT EXECUTED
00043d1e <rtems_fdisk_seg_write_page>:
rtems_fdisk_seg_write_page (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const void* buffer)
{
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
43d1e: 7008 moveq #8,%d0
static int
rtems_fdisk_seg_write_page (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const void* buffer)
{
43d20: 4e56 fff4 linkw %fp,#-12
43d24: 48d7 040c moveml %d2-%d3/%a2,%sp@
43d28: 246e 0008 moveal %fp@(8),%a2
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
43d2c: c0aa 0008 andl %a2@(8),%d0
static int
rtems_fdisk_seg_write_page (rtems_flashdisk* fd,
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const void* buffer)
{
43d30: 262e 000c movel %fp@(12),%d3
43d34: 242e 0010 movel %fp@(16),%d2
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
43d38: 4a80 tstl %d0
43d3a: 6622 bnes 43d5e <rtems_fdisk_seg_write_page+0x40><== ALWAYS TAKEN
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
43d3c: 53aa 0028 subql #1,%a2@(40)
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
43d40: 202a 0014 movel %a2@(20),%d0
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
return ret;
}
--fd->erased_blocks;
return rtems_fdisk_seg_write (fd, sc,
43d44: 4c00 2800 mulsl %d0,%d2
43d48: 2f00 movel %d0,%sp@-
43d4a: 2f2e 0014 movel %fp@(20),%sp@-
43d4e: 2f02 movel %d2,%sp@-
43d50: 2f03 movel %d3,%sp@-
43d52: 2f0a movel %a2,%sp@-
43d54: 4eba fee8 jsr %pc@(43c3e <rtems_fdisk_seg_write>)
43d58: 4fef 0014 lea %sp@(20),%sp
43d5c: 601c bras 43d7a <rtems_fdisk_seg_write_page+0x5c>
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);
43d5e: 202a 0014 movel %a2@(20),%d0
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,
43d62: 2f00 movel %d0,%sp@-
43d64: 4c02 0800 mulsl %d2,%d0
43d68: 2f00 movel %d0,%sp@-
43d6a: 2f03 movel %d3,%sp@-
43d6c: 2f0a movel %a2,%sp@-
43d6e: 4eba fe58 jsr %pc@(43bc8 <rtems_fdisk_seg_blank_check>)
const void* buffer)
{
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
{
int ret = rtems_fdisk_seg_blank_check_page (fd, sc, page);
if (ret)
43d72: 4fef 0010 lea %sp@(16),%sp
43d76: 4a80 tstl %d0
43d78: 67c2 beqs 43d3c <rtems_fdisk_seg_write_page+0x1e><== ALWAYS TAKEN
return ret;
}
--fd->erased_blocks;
return rtems_fdisk_seg_write (fd, sc,
page * fd->block_size, buffer, fd->block_size);
}
43d7a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
43d80: 4e5e unlk %fp <== NOT EXECUTED
00043cc6 <rtems_fdisk_seg_write_page_desc>:
rtems_fdisk_segment_ctl* sc,
uint32_t page,
const rtems_fdisk_page_desc* page_desc)
{
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
43cc6: 7008 moveq #8,%d0
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)
{
43cc8: 4e56 fff4 linkw %fp,#-12
43ccc: 48d7 040c moveml %d2-%d3/%a2,%sp@
43cd0: 246e 0008 moveal %fp@(8),%a2
43cd4: 242e 0010 movel %fp@(16),%d2
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
43cd8: c0aa 0008 andl %a2@(8),%d0
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)
{
43cdc: 262e 000c movel %fp@(12),%d3
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
43ce0: e78a lsll #3,%d2
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
43ce2: 4a80 tstl %d0
43ce4: 6618 bnes 43cfe <rtems_fdisk_seg_write_page_desc+0x38><== ALWAYS TAKEN
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
43ce6: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
43cea: 2f2e 0014 movel %fp@(20),%sp@-
43cee: 2f02 movel %d2,%sp@-
43cf0: 2f03 movel %d3,%sp@-
43cf2: 2f0a movel %a2,%sp@-
43cf4: 4eba ff48 jsr %pc@(43c3e <rtems_fdisk_seg_write>)
43cf8: 4fef 0014 lea %sp@(20),%sp
43cfc: 6016 bras 43d14 <rtems_fdisk_seg_write_page_desc+0x4e>
const rtems_fdisk_page_desc* page_desc)
{
uint32_t offset = page * sizeof (rtems_fdisk_page_desc);
if ((fd->flags & RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE))
{
int ret = rtems_fdisk_seg_blank_check (fd, sc,
43cfe: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
43d02: 2f02 movel %d2,%sp@-
43d04: 2f03 movel %d3,%sp@-
43d06: 2f0a movel %a2,%sp@-
43d08: 4eba febe jsr %pc@(43bc8 <rtems_fdisk_seg_blank_check>)
offset,
sizeof (rtems_fdisk_page_desc));
if (ret)
43d0c: 4fef 0010 lea %sp@(16),%sp
43d10: 4a80 tstl %d0
43d12: 67d2 beqs 43ce6 <rtems_fdisk_seg_write_page_desc+0x20><== ALWAYS TAKEN
return ret;
}
return rtems_fdisk_seg_write (fd, sc, offset,
page_desc, sizeof (rtems_fdisk_page_desc));
}
43d14: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
43d1a: 4e5e unlk %fp <== NOT EXECUTED
000438a4 <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)
{
438a4: 4e56 0000 linkw %fp,#0
438a8: 206e 0008 moveal %fp@(8),%a0
438ac: 2f0b movel %a3,%sp@-
438ae: 202e 000c movel %fp@(12),%d0
438b2: 2f0a movel %a2,%sp@-
438b4: 246e 0010 moveal %fp@(16),%a2
if (item)
438b8: 4a80 tstl %d0
438ba: 671c beqs 438d8 <rtems_fdisk_segment_queue_insert_before+0x34><== NEVER TAKEN
{
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
438bc: 2250 moveal %a0@,%a1
rtems_fdisk_segment_ctl* item,
rtems_fdisk_segment_ctl* sc)
{
if (item)
{
rtems_fdisk_segment_ctl** prev = &queue->head;
438be: 2648 moveal %a0,%a3
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
438c0: 6012 bras 438d4 <rtems_fdisk_segment_queue_insert_before+0x30>
{
if (item == it)
438c2: b3c0 cmpal %d0,%a1
438c4: 660a bnes 438d0 <rtems_fdisk_segment_queue_insert_before+0x2c><== NEVER TAKEN
{
sc->next = item;
438c6: 2480 movel %d0,%a2@
*prev = sc;
438c8: 268a movel %a2,%a3@
queue->count++;
438ca: 52a8 0008 addql #1,%a0@(8)
return;
438ce: 601a bras 438ea <rtems_fdisk_segment_queue_insert_before+0x46>
}
prev = &it->next;
438d0: 2649 moveal %a1,%a3 <== NOT EXECUTED
it = it->next;
438d2: 2251 moveal %a1@,%a1 <== NOT EXECUTED
if (item)
{
rtems_fdisk_segment_ctl** prev = &queue->head;
rtems_fdisk_segment_ctl* it = queue->head;
while (it)
438d4: 4a89 tstl %a1
438d6: 66ea bnes 438c2 <rtems_fdisk_segment_queue_insert_before+0x1e><== ALWAYS TAKEN
prev = &it->next;
it = it->next;
}
}
rtems_fdisk_segment_queue_push_tail (queue, sc);
438d8: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
}
438dc: 245f moveal %sp@+,%a2 <== NOT EXECUTED
438de: 265f moveal %sp@+,%a3 <== NOT EXECUTED
prev = &it->next;
it = it->next;
}
}
rtems_fdisk_segment_queue_push_tail (queue, sc);
438e0: 2d48 0008 movel %a0,%fp@(8) <== NOT EXECUTED
}
438e4: 4e5e unlk %fp <== NOT EXECUTED
prev = &it->next;
it = it->next;
}
}
rtems_fdisk_segment_queue_push_tail (queue, sc);
438e6: 6000 ff3a braw 43822 <rtems_fdisk_segment_queue_push_tail><== NOT EXECUTED
}
438ea: 245f moveal %sp@+,%a2
438ec: 265f moveal %sp@+,%a3
438ee: 4e5e unlk %fp <== NOT EXECUTED
000437fe <rtems_fdisk_segment_queue_pop_head>:
/**
* Pop the head of the segment control queue.
*/
static rtems_fdisk_segment_ctl*
rtems_fdisk_segment_queue_pop_head (rtems_fdisk_segment_ctl_queue* queue)
{
437fe: 4e56 0000 linkw %fp,#0
43802: 206e 0008 moveal %fp@(8),%a0
if (queue->head)
43806: 2250 moveal %a0@,%a1
43808: 4a89 tstl %a1
4380a: 6710 beqs 4381c <rtems_fdisk_segment_queue_pop_head+0x1e><== NEVER TAKEN
{
rtems_fdisk_segment_ctl* sc = queue->head;
queue->head = sc->next;
4380c: 2011 movel %a1@,%d0
4380e: 2080 movel %d0,%a0@
if (!queue->head)
43810: 6604 bnes 43816 <rtems_fdisk_segment_queue_pop_head+0x18><== ALWAYS TAKEN
queue->tail = 0;
43812: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
queue->count--;
43816: 53a8 0008 subql #1,%a0@(8)
sc->next = 0;
4381a: 4291 clrl %a1@
return sc;
}
return 0;
}
4381c: 2009 movel %a1,%d0
4381e: 4e5e unlk %fp <== NOT EXECUTED
000437d8 <rtems_fdisk_segment_queue_push_head>:
* Push to the head of the segment control queue.
*/
static void
rtems_fdisk_segment_queue_push_head (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
437d8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
437dc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
437e0: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
if (sc)
437e4: 4a89 tstl %a1 <== NOT EXECUTED
437e6: 6712 beqs 437fa <rtems_fdisk_segment_queue_push_head+0x22><== NOT EXECUTED
{
sc->next = queue->head;
437e8: 2290 movel %a0@,%a1@ <== NOT EXECUTED
queue->head = sc;
437ea: 2089 movel %a1,%a0@ <== NOT EXECUTED
if (queue->tail == 0)
437ec: 4aa8 0004 tstl %a0@(4) <== NOT EXECUTED
437f0: 6604 bnes 437f6 <rtems_fdisk_segment_queue_push_head+0x1e><== NOT EXECUTED
queue->tail = sc;
437f2: 2149 0004 movel %a1,%a0@(4) <== NOT EXECUTED
queue->count++;
437f6: 52a8 0008 addql #1,%a0@(8) <== NOT EXECUTED
}
}
437fa: 4e5e unlk %fp <== NOT EXECUTED
00043822 <rtems_fdisk_segment_queue_push_tail>:
* Push to the tail of the segment control queue.
*/
static void
rtems_fdisk_segment_queue_push_tail (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
43822: 4e56 0000 linkw %fp,#0
43826: 206e 0008 moveal %fp@(8),%a0
4382a: 226e 000c moveal %fp@(12),%a1
4382e: 2f0a movel %a2,%sp@-
if (sc)
43830: 4a89 tstl %a1
43832: 671c beqs 43850 <rtems_fdisk_segment_queue_push_tail+0x2e><== NEVER TAKEN
{
sc->next = 0;
43834: 4291 clrl %a1@
if (queue->head)
43836: 4a90 tstl %a0@
43838: 670c beqs 43846 <rtems_fdisk_segment_queue_push_tail+0x24>
{
queue->tail->next = sc;
4383a: 2468 0004 moveal %a0@(4),%a2
4383e: 2489 movel %a1,%a2@
queue->tail = sc;
43840: 2149 0004 movel %a1,%a0@(4)
43844: 6006 bras 4384c <rtems_fdisk_segment_queue_push_tail+0x2a>
}
else
{
queue->head = queue->tail = sc;
43846: 2149 0004 movel %a1,%a0@(4)
4384a: 2089 movel %a1,%a0@
}
queue->count++;
4384c: 52a8 0008 addql #1,%a0@(8)
}
}
43850: 245f moveal %sp@+,%a2
43852: 4e5e unlk %fp <== NOT EXECUTED
00043856 <rtems_fdisk_segment_queue_remove>:
* Remove from the segment control queue.
*/
static void
rtems_fdisk_segment_queue_remove (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
43856: 4e56 0000 linkw %fp,#0
4385a: 206e 0008 moveal %fp@(8),%a0
4385e: 2f0b movel %a3,%sp@-
43860: 266e 000c moveal %fp@(12),%a3
43864: 2f0a movel %a2,%sp@-
rtems_fdisk_segment_ctl* prev = 0;
rtems_fdisk_segment_ctl* it = queue->head;
43866: 2250 moveal %a0@,%a1
*/
static void
rtems_fdisk_segment_queue_remove (rtems_fdisk_segment_ctl_queue* queue,
rtems_fdisk_segment_ctl* sc)
{
rtems_fdisk_segment_ctl* prev = 0;
43868: 95ca subal %a2,%a2
/*
* Do not change sc->next as sc could be on another queue.
*/
while (it)
4386a: 602c bras 43898 <rtems_fdisk_segment_queue_remove+0x42>
{
if (sc == it)
4386c: b3cb cmpal %a3,%a1
4386e: 6624 bnes 43894 <rtems_fdisk_segment_queue_remove+0x3e>
43870: 2013 movel %a3@,%d0
{
if (prev == 0)
43872: 4a8a tstl %a2
43874: 660a bnes 43880 <rtems_fdisk_segment_queue_remove+0x2a><== NEVER TAKEN
{
queue->head = sc->next;
43876: 2080 movel %d0,%a0@
if (queue->head == 0)
43878: 6612 bnes 4388c <rtems_fdisk_segment_queue_remove+0x36><== ALWAYS TAKEN
queue->tail = 0;
4387a: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
4387e: 600c bras 4388c <rtems_fdisk_segment_queue_remove+0x36><== NOT EXECUTED
}
else
{
prev->next = sc->next;
43880: 2480 movel %d0,%a2@ <== NOT EXECUTED
if (queue->tail == sc)
43882: b7e8 0004 cmpal %a0@(4),%a3 <== NOT EXECUTED
43886: 6604 bnes 4388c <rtems_fdisk_segment_queue_remove+0x36><== NOT EXECUTED
queue->tail = prev;
43888: 214a 0004 movel %a2,%a0@(4) <== NOT EXECUTED
}
sc->next = 0;
4388c: 4293 clrl %a3@
queue->count--;
4388e: 53a8 0008 subql #1,%a0@(8)
break;
43892: 6008 bras 4389c <rtems_fdisk_segment_queue_remove+0x46>
43894: 2449 moveal %a1,%a2
}
prev = it;
it = it->next;
43896: 2251 moveal %a1@,%a1
/*
* Do not change sc->next as sc could be on another queue.
*/
while (it)
43898: 4a89 tstl %a1
4389a: 66d0 bnes 4386c <rtems_fdisk_segment_queue_remove+0x16>
}
prev = it;
it = it->next;
}
}
4389c: 245f moveal %sp@+,%a2
4389e: 265f moveal %sp@+,%a3
438a0: 4e5e unlk %fp <== NOT EXECUTED
00043a26 <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, ...)
{
43a26: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
int ret = 0;
if (fd->info_level >= 1)
43a2a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
* @param ... The arguments for the format text.
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_warning (const rtems_flashdisk* fd, const char *format, ...)
{
43a2e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int ret = 0;
if (fd->info_level >= 1)
43a30: 4aa8 006c tstl %a0@(108) <== NOT EXECUTED
43a34: 675a beqs 43a90 <rtems_fdisk_warning+0x6a> <== NOT EXECUTED
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:warning:");
43a36: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43a3c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a40: 4879 0006 a7be pea 6a7be <map.6766+0x18> <== NOT EXECUTED
43a46: 4eb9 0005 b91e jsr 5b91e <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
43a4c: 486e 0010 pea %fp@(16) <== NOT EXECUTED
43a50: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43a56: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
43a5a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a5e: 4eb9 0006 32c0 jsr 632c0 <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
43a64: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
if (fd->info_level >= 1)
{
va_list args;
va_start (args, format);
fprintf (stdout, "fdisk:warning:");
ret = vfprintf (stdout, format, args);
43a6a: 2400 movel %d0,%d2 <== NOT EXECUTED
fprintf (stdout, "\n");
43a6c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a70: 4878 000a pea a <LASTO> <== NOT EXECUTED
43a74: 4eb9 0005 b848 jsr 5b848 <fputc> <== NOT EXECUTED
fflush (stdout);
43a7a: 2079 0006 eebc moveal 6eebc <_impure_ptr>,%a0 <== NOT EXECUTED
43a80: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a84: 4eb9 0005 b41a jsr 5b41a <fflush> <== NOT EXECUTED
va_end (args);
43a8a: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
43a8e: 6002 bras 43a92 <rtems_fdisk_warning+0x6c> <== NOT EXECUTED
* @return int The number of bytes written to the output.
*/
static int
rtems_fdisk_warning (const rtems_flashdisk* fd, const char *format, ...)
{
int ret = 0;
43a90: 4282 clrl %d2 <== NOT EXECUTED
fprintf (stdout, "\n");
fflush (stdout);
va_end (args);
}
return ret;
}
43a92: 2002 movel %d2,%d0 <== NOT EXECUTED
43a94: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
43a98: 4e5e unlk %fp <== NOT EXECUTED
0004a3f4 <rtems_filesystem_check_access>:
int eval_flags,
mode_t node_mode,
uid_t node_uid,
gid_t node_gid
)
{
4a3f4: 4e56 fff4 linkw %fp,#-12
4a3f8: 48d7 001c moveml %d2-%d4,%sp@
mode_t perm_flags = eval_flags & RTEMS_FS_PERMS_RWX;
4a3fc: 7407 moveq #7,%d2
int eval_flags,
mode_t node_mode,
uid_t node_uid,
gid_t node_gid
)
{
4a3fe: 382e 0012 movew %fp@(18),%d4
4a402: 362e 0016 movew %fp@(22),%d3
mode_t perm_flags = eval_flags & RTEMS_FS_PERMS_RWX;
4a406: c4ae 0008 andl %fp@(8),%d2
uid_t task_uid = geteuid();
4a40a: 4eb9 0004 be98 jsr 4be98 <geteuid>
if (task_uid == 0 || task_uid == node_uid) {
4a410: 4a40 tstw %d0
4a412: 6710 beqs 4a424 <rtems_filesystem_check_access+0x30>
4a414: 0280 0000 ffff andil #65535,%d0
4a41a: 0284 0000 ffff andil #65535,%d4
4a420: b880 cmpl %d0,%d4
4a422: 6604 bnes 4a428 <rtems_filesystem_check_access+0x34>
perm_flags <<= RTEMS_FS_USR_SHIFT;
4a424: ed8a lsll #6,%d2
4a426: 601c bras 4a444 <rtems_filesystem_check_access+0x50>
} else {
gid_t task_gid = getegid();
4a428: 4eb9 0004 be84 jsr 4be84 <getegid>
if (task_gid == 0 || task_gid == node_gid) {
4a42e: 4a40 tstw %d0
4a430: 6710 beqs 4a442 <rtems_filesystem_check_access+0x4e>
4a432: 0280 0000 ffff andil #65535,%d0
4a438: 0283 0000 ffff andil #65535,%d3
4a43e: b680 cmpl %d0,%d3
4a440: 6602 bnes 4a444 <rtems_filesystem_check_access+0x50><== ALWAYS TAKEN
perm_flags <<= RTEMS_FS_GRP_SHIFT;
4a442: e78a lsll #3,%d2
} else {
perm_flags <<= RTEMS_FS_OTH_SHIFT;
}
}
return (perm_flags & node_mode) == perm_flags;
4a444: 2002 movel %d2,%d0
4a446: c0ae 000c andl %fp@(12),%d0
4a44a: b480 cmpl %d0,%d2
4a44c: 57c0 seq %d0
}
4a44e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
4a454: 4e5e unlk %fp
4a456: 4480 negl %d0 <== NOT EXECUTED
00043dc8 <rtems_filesystem_do_unmount>:
}
void rtems_filesystem_do_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
43dc8: 4e56 0000 linkw %fp,#0
43dcc: 2f0a movel %a2,%sp@-
43dce: 246e 0008 moveal %fp@(8),%a2
*/
#include <rtems/userenv.h>
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
43dd2: 42a7 clrl %sp@-
43dd4: 42a7 clrl %sp@-
43dd6: 2f39 0005 daec movel 5daec <rtems_libio_semaphore>,%sp@-
43ddc: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
43de2: 2252 moveal %a2@,%a1
previous = the_node->previous;
43de4: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
43de8: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
43dec: 2089 movel %a1,%a0@
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
43dee: 2f39 0005 daec movel 5daec <rtems_libio_semaphore>,%sp@-
43df4: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
rtems_filesystem_mt_lock();
rtems_chain_extract_unprotected(&mt_entry->mt_node);
rtems_filesystem_mt_unlock();
rtems_filesystem_global_location_release(mt_entry->mt_point_node);
43dfa: 2f2a 0020 movel %a2@(32),%sp@-
43dfe: 4eb9 0004 3f4a jsr 43f4a <rtems_filesystem_global_location_release>
(*mt_entry->ops->fsunmount_me_h)(mt_entry);
43e04: 206a 000c moveal %a2@(12),%a0
43e08: 2f0a movel %a2,%sp@-
43e0a: 2068 003c moveal %a0@(60),%a0
43e0e: 4e90 jsr %a0@
if (mt_entry->unmount_task != 0) {
43e10: 202a 003a movel %a2@(58),%d0
43e14: 4fef 0018 lea %sp@(24),%sp
43e18: 6720 beqs 43e3a <rtems_filesystem_do_unmount+0x72><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_status_code rtems_event_transient_send(
rtems_id id
)
{
return rtems_event_system_send( id, RTEMS_EVENT_SYSTEM_TRANSIENT );
43e1a: 2f3c 8000 0000 movel #-2147483648,%sp@-
43e20: 2f00 movel %d0,%sp@-
43e22: 4eb9 0004 6478 jsr 46478 <rtems_event_system_send>
rtems_status_code sc =
rtems_event_transient_send(mt_entry->unmount_task);
if (sc != RTEMS_SUCCESSFUL) {
43e28: 508f addql #8,%sp
43e2a: 4a80 tstl %d0
43e2c: 670c beqs 43e3a <rtems_filesystem_do_unmount+0x72><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
43e2e: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
43e34: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
free(mt_entry);
43e3a: 2d4a 0008 movel %a2,%fp@(8)
}
43e3e: 246e fffc moveal %fp@(-4),%a2
43e42: 4e5e unlk %fp
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(0xdeadbeef);
}
}
free(mt_entry);
43e44: 4ef9 0004 2a60 jmp 42a60 <free>
0004a4a0 <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
)
{
4a4a0: 4e56 ffe4 linkw %fp,#-28
4a4a4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
4a4a8: 246e 0008 moveal %fp@(8),%a2
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 =
4a4ac: 280a movel %a2,%d4
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
4a4ae: 4bf9 0004 a684 lea 4a684 <rtems_filesystem_eval_path_next_token>,%a5
4a4b4: 0684 0000 0018 addil #24,%d4
void rtems_filesystem_eval_path_generic(
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const rtems_filesystem_eval_path_generic_config *config
)
{
4a4ba: 242e 000c movel %fp@(12),%d2
4a4be: 266e 0010 moveal %fp@(16),%a3
4a4c2: 2f0a movel %a2,%sp@-
4a4c4: 4e95 jsr %a5@
*token = ctx->token;
4a4c6: 286a 0008 moveal %a2@(8),%a4
const char *token;
size_t tokenlen;
rtems_filesystem_eval_path_get_next_token(ctx, &token, &tokenlen);
if (tokenlen > 0) {
4a4ca: 588f addql #4,%sp
*tokenlen = ctx->tokenlen;
4a4cc: 262a 000c movel %a2@(12),%d3
4a4d0: 6700 0158 beqw 4a62a <rtems_filesystem_eval_path_generic+0x18a>
if ((*config->is_directory)(ctx, arg)) {
4a4d4: 2f02 movel %d2,%sp@-
4a4d6: 2f0a movel %a2,%sp@-
4a4d8: 2053 moveal %a3@,%a0
4a4da: 4e90 jsr %a0@
4a4dc: 508f addql #8,%sp
4a4de: 4a00 tstb %d0
4a4e0: 6700 0134 beqw 4a616 <rtems_filesystem_eval_path_generic+0x176>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
4a4e4: 7001 moveq #1,%d0
4a4e6: b083 cmpl %d3,%d0
4a4e8: 6610 bnes 4a4fa <rtems_filesystem_eval_path_generic+0x5a>
4a4ea: 722e moveq #46,%d1
4a4ec: 1014 moveb %a4@,%d0
4a4ee: b380 eorl %d1,%d0
4a4f0: 4a00 tstb %d0
4a4f2: 57c0 seq %d0
4a4f4: 49c0 extbl %d0
4a4f6: 4480 negl %d0
4a4f8: 6002 bras 4a4fc <rtems_filesystem_eval_path_generic+0x5c>
4a4fa: 4280 clrl %d0
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
4a4fc: 0800 0000 btst #0,%d0
4a500: 6722 beqs 4a524 <rtems_filesystem_eval_path_generic+0x84>
if (rtems_filesystem_eval_path_has_path(ctx)) {
4a502: 4aaa 0004 tstl %a2@(4)
4a506: 6704 beqs 4a50c <rtems_filesystem_eval_path_generic+0x6c>
4a508: 6000 00b4 braw 4a5be <rtems_filesystem_eval_path_generic+0x11e>
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) {
4a50c: 202a 0010 movel %a2@(16),%d0
4a510: 0280 0000 0100 andil #256,%d0
4a516: 6604 bnes 4a51c <rtems_filesystem_eval_path_generic+0x7c>
4a518: 6000 00a4 braw 4a5be <rtems_filesystem_eval_path_generic+0x11e>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
4a51c: 4878 0016 pea 16 <OPER2+0x2>
4a520: 6000 00f8 braw 4a61a <rtems_filesystem_eval_path_generic+0x17a>
static inline bool rtems_filesystem_is_parent_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 2 && token [0] == '.' && token [1] == '.';
4a524: 7002 moveq #2,%d0
4a526: b083 cmpl %d3,%d0
4a528: 661a bnes 4a544 <rtems_filesystem_eval_path_generic+0xa4>
4a52a: 722e moveq #46,%d1
4a52c: 1014 moveb %a4@,%d0
4a52e: 49c0 extbl %d0
4a530: b280 cmpl %d0,%d1
4a532: 6610 bnes 4a544 <rtems_filesystem_eval_path_generic+0xa4>
4a534: 102c 0001 moveb %a4@(1),%d0
4a538: b380 eorl %d1,%d0
4a53a: 4a00 tstb %d0
4a53c: 57c0 seq %d0
4a53e: 49c0 extbl %d0
4a540: 4480 negl %d0
4a542: 6002 bras 4a546 <rtems_filesystem_eval_path_generic+0xa6>
4a544: 4280 clrl %d0
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
4a546: 0800 0000 btst #0,%d0
4a54a: 6700 008a beqw 4a5d6 <rtems_filesystem_eval_path_generic+0x136>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
4a54e: 206a 0030 moveal %a2@(48),%a0
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
return mt_entry == rootloc->mt_entry
&& (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
4a552: 4280 clrl %d0
static bool is_eval_path_root(
const rtems_filesystem_eval_path_context_t *ctx,
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
4a554: 226a 002c moveal %a2@(44),%a1
const rtems_filesystem_location_info_t *rootloc = &ctx->rootloc->location;
return mt_entry == rootloc->mt_entry
&& (*mt_entry->ops->are_nodes_equal_h)( loc, rootloc );
4a558: b3e8 0014 cmpal %a0@(20),%a1
4a55c: 6616 bnes 4a574 <rtems_filesystem_eval_path_generic+0xd4>
4a55e: 2269 000c moveal %a1@(12),%a1
4a562: 2f08 movel %a0,%sp@-
4a564: 2f04 movel %d4,%sp@-
4a566: 2069 0010 moveal %a1@(16),%a0
4a56a: 4e90 jsr %a0@
4a56c: 508f addql #8,%sp
4a56e: 0280 0000 00ff andil #255,%d0
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_get_currentloc( ctx );
if (is_eval_path_root(ctx, currentloc)) {
4a574: 0800 0000 btst #0,%d0
4a578: 6702 beqs 4a57c <rtems_filesystem_eval_path_generic+0xdc>
4a57a: 6042 bras 4a5be <rtems_filesystem_eval_path_generic+0x11e>
#include <rtems/libio_.h>
static bool is_fs_root( const rtems_filesystem_location_info_t *loc )
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
4a57c: 206a 002c moveal %a2@(44),%a0
const rtems_filesystem_location_info_t *mt_fs_root =
&mt_entry->mt_fs_root->location;
return (*mt_entry->ops->are_nodes_equal_h)( loc, mt_fs_root );
4a580: 2268 000c moveal %a0@(12),%a1
4a584: 2f28 0024 movel %a0@(36),%sp@-
4a588: 2f04 movel %d4,%sp@-
4a58a: 2069 0010 moveal %a1@(16),%a0
4a58e: 4e90 jsr %a0@
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)) {
4a590: 508f addql #8,%sp
4a592: 4a00 tstb %d0
4a594: 6734 beqs 4a5ca <rtems_filesystem_eval_path_generic+0x12a>
if (currentloc->mt_entry->mt_point_node != NULL) {
4a596: 206a 002c moveal %a2@(44),%a0
4a59a: 4aa8 0020 tstl %a0@(32)
4a59e: 671e beqs 4a5be <rtems_filesystem_eval_path_generic+0x11e><== NEVER TAKEN
static inline void rtems_filesystem_eval_path_put_back_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
size_t tokenlen = ctx->tokenlen;
4a5a0: 202a 000c movel %a2@(12),%d0
ctx->path -= tokenlen;
4a5a4: 9192 subl %d0,%a2@
ctx->pathlen += tokenlen;
4a5a6: d1aa 0004 addl %d0,%a2@(4)
ctx->tokenlen = 0;
4a5aa: 42aa 000c clrl %a2@(12)
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
4a5ae: 4868 0020 pea %a0@(32)
4a5b2: 2f0a movel %a2,%sp@-
4a5b4: 4eb9 0004 3bd6 jsr 43bd6 <rtems_filesystem_eval_path_restart>
4a5ba: 508f addql #8,%sp
4a5bc: 606c bras 4a62a <rtems_filesystem_eval_path_generic+0x18a>
¤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);
4a5be: 4878 0001 pea 1 <ADD>
4a5c2: 4879 0005 ba29 pea 5ba29 <status_flags_assoc+0x31>
4a5c8: 6010 bras 4a5da <rtems_filesystem_eval_path_generic+0x13a>
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
4a5ca: 4878 0002 pea 2 <DOUBLE_FLOAT>
4a5ce: 4879 0005 ba28 pea 5ba28 <status_flags_assoc+0x30>
4a5d4: 6004 bras 4a5da <rtems_filesystem_eval_path_generic+0x13a>
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
4a5d6: 2f03 movel %d3,%sp@-
4a5d8: 2f0c movel %a4,%sp@-
4a5da: 2f02 movel %d2,%sp@-
4a5dc: 2f0a movel %a2,%sp@-
4a5de: 206b 0004 moveal %a3@(4),%a0
4a5e2: 4e90 jsr %a0@
4a5e4: 4fef 0010 lea %sp@(16),%sp
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
4a5e8: 7202 moveq #2,%d1
4a5ea: b280 cmpl %d0,%d1
4a5ec: 6636 bnes 4a624 <rtems_filesystem_eval_path_generic+0x184>
if (rtems_filesystem_eval_path_has_path(ctx)) {
4a5ee: 4aaa 0004 tstl %a2@(4)
4a5f2: 6736 beqs 4a62a <rtems_filesystem_eval_path_generic+0x18a>
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
4a5f4: 2f0a movel %a2,%sp@-
4a5f6: 4eb9 0004 a634 jsr 4a634 <rtems_filesystem_eval_path_eat_delimiter>
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
4a5fc: 202a 0010 movel %a2@(16),%d0
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 (
4a600: 588f addql #4,%sp
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
4a602: 0280 0000 0080 andil #128,%d0
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 (
4a608: 6706 beqs 4a610 <rtems_filesystem_eval_path_generic+0x170>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
4a60a: 4aaa 0004 tstl %a2@(4)
4a60e: 671a beqs 4a62a <rtems_filesystem_eval_path_generic+0x18a>
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
4a610: 4878 0002 pea 2 <DOUBLE_FLOAT>
4a614: 6004 bras 4a61a <rtems_filesystem_eval_path_generic+0x17a>
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
4a616: 4878 0014 pea 14 <OPER2>
4a61a: 2f0a movel %a2,%sp@-
4a61c: 4eb9 0004 380a jsr 4380a <rtems_filesystem_eval_path_error>
4a622: 6096 bras 4a5ba <rtems_filesystem_eval_path_generic+0x11a>
)
{
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
while (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE) {
4a624: 4a80 tstl %d0
4a626: 6700 fe9a beqw 4a4c2 <rtems_filesystem_eval_path_generic+0x22>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
4a62a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4a630: 4e5e unlk %fp <== NOT EXECUTED
00043c4a <rtems_filesystem_eval_path_recursive>:
void rtems_filesystem_eval_path_recursive(
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
43c4a: 4e56 ffe8 linkw %fp,#-24
43c4e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
43c52: 246e 0008 moveal %fp@(8),%a2
43c56: 266e 000c moveal %fp@(12),%a3
43c5a: 242e 0010 movel %fp@(16),%d2
if (pathlen > 0) {
43c5e: 6776 beqs 43cd6 <rtems_filesystem_eval_path_recursive+0x8c><== NEVER TAKEN
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
43c60: 701f moveq #31,%d0
43c62: b0aa 0014 cmpl %a2@(20),%d0
43c66: 6d66 blts 43cce <rtems_filesystem_eval_path_recursive+0x84>
const char *saved_path = ctx->path;
43c68: 2812 movel %a2@,%d4
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
43c6a: 7a2f moveq #47,%d5
size_t saved_pathlen = ctx->pathlen;
if (rtems_filesystem_is_delimiter(path [0])) {
43c6c: 1013 moveb %a3@,%d0
)
{
if (pathlen > 0) {
if (ctx->recursionlevel < RTEMS_FILESYSTEM_SYMLOOP_MAX) {
const char *saved_path = ctx->path;
size_t saved_pathlen = ctx->pathlen;
43c6e: 262a 0004 movel %a2@(4),%d3
43c72: 1200 moveb %d0,%d1
43c74: 49c1 extbl %d1
43c76: ba81 cmpl %d1,%d5
43c78: 670e beqs 43c88 <rtems_filesystem_eval_path_recursive+0x3e>
43c7a: 725c moveq #92,%d1
43c7c: b380 eorl %d1,%d0
43c7e: 4a00 tstb %d0
43c80: 57c0 seq %d0
43c82: 49c0 extbl %d0
43c84: 4480 negl %d0
43c86: 6002 bras 43c8a <rtems_filesystem_eval_path_recursive+0x40>
43c88: 7001 moveq #1,%d0
if (rtems_filesystem_is_delimiter(path [0])) {
43c8a: 0800 0000 btst #0,%d0
43c8e: 670e beqs 43c9e <rtems_filesystem_eval_path_recursive+0x54>
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
43c90: 486a 0030 pea %a2@(48)
43c94: 2f0a movel %a2,%sp@-
43c96: 4eb9 0004 3bd6 jsr 43bd6 <rtems_filesystem_eval_path_restart>
43c9c: 508f addql #8,%sp
}
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
43c9e: 52aa 0014 addql #1,%a2@(20)
if (rtems_filesystem_is_delimiter(path [0])) {
rtems_filesystem_eval_path_restart(ctx, &ctx->rootloc);
}
ctx->path = path;
43ca2: 248b movel %a3,%a2@
ctx->pathlen = pathlen;
43ca4: 2542 0004 movel %d2,%a2@(4)
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
43ca8: 6012 bras 43cbc <rtems_filesystem_eval_path_recursive+0x72>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
43caa: 206a 002c moveal %a2@(44),%a0
43cae: 2068 000c moveal %a0@(12),%a0
43cb2: 2f0a movel %a2,%sp@-
43cb4: 2068 0008 moveal %a0@(8),%a0
43cb8: 4e90 jsr %a0@
43cba: 588f addql #4,%sp
ctx->path = path;
ctx->pathlen = pathlen;
++ctx->recursionlevel;
while (ctx->pathlen > 0) {
43cbc: 4aaa 0004 tstl %a2@(4)
43cc0: 66e8 bnes 43caa <rtems_filesystem_eval_path_recursive+0x60>
(*ctx->currentloc.mt_entry->ops->eval_path_h)(ctx);
}
--ctx->recursionlevel;
43cc2: 53aa 0014 subql #1,%a2@(20)
ctx->path = saved_path;
43cc6: 2484 movel %d4,%a2@
ctx->pathlen = saved_pathlen;
43cc8: 2543 0004 movel %d3,%a2@(4)
43ccc: 6020 bras 43cee <rtems_filesystem_eval_path_recursive+0xa4>
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
43cce: 7a5c moveq #92,%d5
43cd0: 2d45 000c movel %d5,%fp@(12)
43cd4: 6006 bras 43cdc <rtems_filesystem_eval_path_recursive+0x92>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
43cd6: 7002 moveq #2,%d0 <== NOT EXECUTED
43cd8: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
43cdc: 2d4a 0008 movel %a2,%fp@(8)
}
}
43ce0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
43ce6: 4e5e unlk %fp
ctx->pathlen = saved_pathlen;
} else {
rtems_filesystem_eval_path_error(ctx, ELOOP);
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
43ce8: 4ef9 0004 380a jmp 4380a <rtems_filesystem_eval_path_error>
}
}
43cee: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
43cf4: 4e5e unlk %fp <== NOT EXECUTED
00043aa0 <rtems_filesystem_eval_path_start_with_parent>:
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
43aa0: 4e56 ffec linkw %fp,#-20
43aa4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
43aa8: 246e 000c moveal %fp@(12),%a2
size_t pathlen = strlen(path);
43aac: 2f0a movel %a2,%sp@-
const char *path,
int eval_flags,
rtems_filesystem_location_info_t *parentloc,
int parent_eval_flags
)
{
43aae: 266e 0008 moveal %fp@(8),%a3
size_t pathlen = strlen(path);
43ab2: 4eb9 0004 d690 jsr 4d690 <strlen>
43ab8: 588f addql #4,%sp
43aba: 2200 movel %d0,%d1
43abc: 602a bras 43ae8 <rtems_filesystem_eval_path_start_with_parent+0x48>
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
size_t i = pathlen - 1;
43abe: 2041 moveal %d1,%a0
43ac0: 5388 subql #1,%a0
gid_t node_gid
);
static inline bool rtems_filesystem_is_delimiter(char c)
{
return c == '/' || c == '\\';
43ac2: 782f moveq #47,%d4
if (rtems_filesystem_is_delimiter(path [i])) {
43ac4: 1432 8800 moveb %a2@(00000000,%a0:l),%d2
43ac8: 1602 moveb %d2,%d3
43aca: 49c3 extbl %d3
43acc: b883 cmpl %d3,%d4
43ace: 670e beqs 43ade <rtems_filesystem_eval_path_start_with_parent+0x3e>
43ad0: 765c moveq #92,%d3
43ad2: b782 eorl %d3,%d2
43ad4: 4a02 tstb %d2
43ad6: 57c2 seq %d2
43ad8: 49c2 extbl %d2
43ada: 4482 negl %d2
43adc: 6002 bras 43ae0 <rtems_filesystem_eval_path_start_with_parent+0x40>
43ade: 7401 moveq #1,%d2
43ae0: 0802 0000 btst #0,%d2
43ae4: 6672 bnes 43b58 <rtems_filesystem_eval_path_start_with_parent+0xb8>
return pathlen;
}
pathlen = i;
43ae6: 2208 movel %a0,%d1
#include <rtems/libio_.h>
static size_t get_parentpathlen(const char *path, size_t pathlen)
{
while (pathlen > 0) {
43ae8: 4a81 tstl %d1
43aea: 66d2 bnes 43abe <rtems_filesystem_eval_path_start_with_parent+0x1e>
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
43aec: 4a80 tstl %d0
43aee: 671a beqs 43b0a <rtems_filesystem_eval_path_start_with_parent+0x6a>
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
name = path;
43af0: 240a movel %a2,%d2
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
43af2: 2600 movel %d0,%d3
if (parentpathlen == 0) {
parentpath = ".";
parentpathlen = 1;
43af4: 123c 0001 moveb #1,%d1
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
if (parentpathlen == 0) {
parentpath = ".";
43af8: 45f9 0005 ba29 lea 5ba29 <status_flags_assoc+0x31>,%a2
43afe: 6010 bras 43b10 <rtems_filesystem_eval_path_start_with_parent+0x70>
parentpathlen = 1;
name = path;
namelen = pathlen;
} else {
name = path + parentpathlen;
43b00: 240a movel %a2,%d2
namelen = pathlen - parentpathlen;
43b02: 2600 movel %d0,%d3
parentpath = ".";
parentpathlen = 1;
name = path;
namelen = pathlen;
} else {
name = path + parentpathlen;
43b04: d481 addl %d1,%d2
namelen = pathlen - parentpathlen;
43b06: 9681 subl %d1,%d3
43b08: 6006 bras 43b10 <rtems_filesystem_eval_path_start_with_parent+0x70>
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
43b0a: 4283 clrl %d3
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
43b0c: 4282 clrl %d2
}
pathlen = i;
}
return 0;
43b0e: 4281 clrl %d1
ctx,
parentpath,
parentpathlen,
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
43b10: 2079 0005 c49c moveal 5c49c <rtems_current_user_env>,%a0
name = path + parentpathlen;
namelen = pathlen - parentpathlen;
}
}
currentloc = eval_path_start(
43b16: 2f08 movel %a0,%sp@-
43b18: 4868 0004 pea %a0@(4)
43b1c: 2f2e 0018 movel %fp@(24),%sp@-
43b20: 2f01 movel %d1,%sp@-
43b22: 2f0a movel %a2,%sp@-
43b24: 2f0b movel %a3,%sp@-
43b26: 4eba fe36 jsr %pc@(4395e <eval_path_start>)
parent_eval_flags,
&rtems_filesystem_root,
&rtems_filesystem_current
);
rtems_filesystem_location_clone(parentloc, currentloc);
43b2a: 2f00 movel %d0,%sp@-
43b2c: 2f2e 0014 movel %fp@(20),%sp@-
43b30: 4eb9 0004 9f34 jsr 49f34 <rtems_filesystem_location_clone>
ctx->path = name;
ctx->pathlen = namelen;
ctx->flags = eval_flags;
43b36: 276e 0010 0010 movel %fp@(16),%a3@(16)
rtems_filesystem_eval_path_continue(ctx);
43b3c: 4fef 001c lea %sp@(28),%sp
&rtems_filesystem_current
);
rtems_filesystem_location_clone(parentloc, currentloc);
ctx->path = name;
43b40: 2682 movel %d2,%a3@
ctx->pathlen = namelen;
43b42: 2743 0004 movel %d3,%a3@(4)
ctx->flags = eval_flags;
rtems_filesystem_eval_path_continue(ctx);
43b46: 2e8b movel %a3,%sp@
43b48: 4eb9 0004 38f8 jsr 438f8 <rtems_filesystem_eval_path_continue>
return &ctx->currentloc;
43b4e: 200b movel %a3,%d0
43b50: 0680 0000 0018 addil #24,%d0
43b56: 600a bras 43b62 <rtems_filesystem_eval_path_start_with_parent+0xc2>
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
const rtems_filesystem_location_info_t *currentloc = NULL;
if (pathlen > 0) {
43b58: 4a80 tstl %d0
43b5a: 66a4 bnes 43b00 <rtems_filesystem_eval_path_start_with_parent+0x60><== ALWAYS TAKEN
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
size_t namelen = 0;
43b5c: 4283 clrl %d3 <== NOT EXECUTED
)
{
size_t pathlen = strlen(path);
const char *parentpath = path;
size_t parentpathlen = get_parentpathlen(path, pathlen);
const char *name = NULL;
43b5e: 4282 clrl %d2 <== NOT EXECUTED
43b60: 60ae bras 43b10 <rtems_filesystem_eval_path_start_with_parent+0x70><== NOT EXECUTED
ctx->flags = eval_flags;
rtems_filesystem_eval_path_continue(ctx);
return &ctx->currentloc;
}
43b62: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
43b68: 4e5e unlk %fp <== NOT EXECUTED
0004a288 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
4a288: 4e56 fff8 linkw %fp,#-8
4a28c: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
4a290: 42ae fffc clrl %fp@(-4)
4a294: 2d40 fff8 movel %d0,%fp@(-8)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4a298: 6710 beqs 4a2aa <rtems_filesystem_get_mount_handler+0x22><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
4a29a: 486e fff8 pea %fp@(-8)
4a29e: 487a ff10 pea %pc@(4a1b0 <find_handler>)
4a2a2: 4eb9 0004 a21a jsr 4a21a <rtems_filesystem_iterate>
4a2a8: 508f addql #8,%sp
}
return fa.mount_h;
}
4a2aa: 202e fffc movel %fp@(-4),%d0
4a2ae: 4e5e unlk %fp <== NOT EXECUTED
000427b8 <rtems_filesystem_initialize>:
/*
* Default mode for created files.
*/
void rtems_filesystem_initialize( void )
{
427b8: 4e56 0000 linkw %fp,#0
int rv = 0;
const rtems_filesystem_mount_configuration *root_config =
&rtems_filesystem_root_configuration;
rv = mount(
427bc: 2f39 0005 a820 movel 5a820 <rtems_filesystem_root_configuration+0x10>,%sp@-
427c2: 2f39 0005 a81c movel 5a81c <rtems_filesystem_root_configuration+0xc>,%sp@-
427c8: 2f39 0005 a818 movel 5a818 <rtems_filesystem_root_configuration+0x8>,%sp@-
427ce: 2f39 0005 a814 movel 5a814 <rtems_filesystem_root_configuration+0x4>,%sp@-
427d4: 2f39 0005 a810 movel 5a810 <rtems_filesystem_root_configuration>,%sp@-
427da: 4eb9 0004 2f18 jsr 42f18 <mount>
root_config->target,
root_config->filesystemtype,
root_config->options,
root_config->data
);
if ( rv != 0 )
427e0: 4fef 0014 lea %sp@(20),%sp
427e4: 4a80 tstl %d0
427e6: 6708 beqs 427f0 <rtems_filesystem_initialize+0x38><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
427e8: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED
427ee: 601c bras 4280c <rtems_filesystem_initialize+0x54><== NOT EXECUTED
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
rv = mkdir( "/dev", 0777);
427f0: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
427f4: 4879 0005 af9a pea 5af9a <IMFS_node_control_default+0x14>
427fa: 4eb9 0004 2ddc jsr 42ddc <mkdir>
if ( rv != 0 )
42800: 508f addql #8,%sp
42802: 4a80 tstl %d0
42804: 670c beqs 42812 <rtems_filesystem_initialize+0x5a><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
42806: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED
4280c: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
42812: 4e5e unlk %fp
...
0004a21a <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4a21a: 4e56 fff0 linkw %fp,#-16
4a21e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4a222: 266e 0008 moveal %fp@(8),%a3
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
4a226: 45f9 0005 a824 lea 5a824 <rtems_filesystem_table>,%a2
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4a22c: 262e 000c movel %fp@(12),%d3
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
4a230: 4202 clrb %d2
while ( table_entry->type && !stop ) {
4a232: 600c bras 4a240 <rtems_filesystem_iterate+0x26>
stop = (*routine)( table_entry, routine_arg );
4a234: 2f03 movel %d3,%sp@-
4a236: 2f0a movel %a2,%sp@-
++table_entry;
4a238: 508a addql #8,%a2
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
4a23a: 4e93 jsr %a3@
++table_entry;
4a23c: 508f addql #8,%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 ) {
stop = (*routine)( table_entry, routine_arg );
4a23e: 1400 moveb %d0,%d2
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4a240: 4a92 tstl %a2@
4a242: 6706 beqs 4a24a <rtems_filesystem_iterate+0x30>
4a244: 4a02 tstb %d2
4a246: 67ec beqs 4a234 <rtems_filesystem_iterate+0x1a>
4a248: 6032 bras 4a27c <rtems_filesystem_iterate+0x62>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
4a24a: 4a02 tstb %d2
4a24c: 662e bnes 4a27c <rtems_filesystem_iterate+0x62>
rtems_libio_lock();
4a24e: 4eba ff98 jsr %pc@(4a1e8 <rtems_libio_lock>)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4a252: 2479 0005 c548 moveal 5c548 <filesystem_chain>,%a2
for (
4a258: 600e bras 4a268 <rtems_filesystem_iterate+0x4e>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
4a25a: 2f03 movel %d3,%sp@-
4a25c: 486a 0008 pea %a2@(8)
4a260: 4e93 jsr %a3@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4a262: 2452 moveal %a2@,%a2
4a264: 508f addql #8,%sp
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
4a266: 1400 moveb %d0,%d2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4a268: b5fc 0005 c54c cmpal #378188,%a2
4a26e: 6606 bnes 4a276 <rtems_filesystem_iterate+0x5c>
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
4a270: 4eba ff92 jsr %pc@(4a204 <rtems_libio_unlock>)
4a274: 6006 bras 4a27c <rtems_filesystem_iterate+0x62>
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
4a276: 4a02 tstb %d2
4a278: 67e0 beqs 4a25a <rtems_filesystem_iterate+0x40> <== ALWAYS TAKEN
4a27a: 60f4 bras 4a270 <rtems_filesystem_iterate+0x56> <== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
4a27c: 1002 moveb %d2,%d0
4a27e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4a284: 4e5e unlk %fp <== NOT EXECUTED
00043e4a <rtems_filesystem_location_remove_from_mt_entry>:
)
{
rtems_filesystem_mt_entry_declare_lock_context(lock_context);
bool do_unmount;
rtems_filesystem_mt_entry_lock(lock_context);
43e4a: 203c 0000 0700 movel #1792,%d0
}
void rtems_filesystem_location_remove_from_mt_entry(
rtems_filesystem_location_info_t *loc
)
{
43e50: 4e56 0000 linkw %fp,#0
43e54: 2f0a movel %a2,%sp@-
43e56: 246e 0008 moveal %fp@(8),%a2
43e5a: 2f02 movel %d2,%sp@-
rtems_filesystem_mt_entry_declare_lock_context(lock_context);
bool do_unmount;
rtems_filesystem_mt_entry_lock(lock_context);
43e5c: 40c2 movew %sr,%d2
43e5e: 8082 orl %d2,%d0
43e60: 46c0 movew %d0,%sr
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
43e62: 2252 moveal %a2@,%a1
previous = the_node->previous;
43e64: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
43e68: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
43e6c: 2089 movel %a1,%a0@
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
43e6e: 2f2a 0014 movel %a2@(20),%sp@-
43e72: 4eba fe84 jsr %pc@(43cf8 <rtems_filesystem_is_ready_for_unmount>)
rtems_filesystem_mt_entry_unlock(lock_context);
43e76: 46c2 movew %d2,%sr
if (do_unmount) {
43e78: 588f addql #4,%sp
43e7a: 4a00 tstb %d0
43e7c: 6716 beqs 43e94 <rtems_filesystem_location_remove_from_mt_entry+0x4a><== ALWAYS TAKEN
rtems_filesystem_do_unmount(loc->mt_entry);
}
}
43e7e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
rtems_filesystem_mt_entry_unlock(lock_context);
if (do_unmount) {
rtems_filesystem_do_unmount(loc->mt_entry);
43e82: 2d6a 0014 0008 movel %a2@(20),%fp@(8) <== NOT EXECUTED
}
}
43e88: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
43e8c: 4e5e unlk %fp <== NOT EXECUTED
rtems_chain_extract_unprotected(&loc->mt_entry_node);
do_unmount = rtems_filesystem_is_ready_for_unmount(loc->mt_entry);
rtems_filesystem_mt_entry_unlock(lock_context);
if (do_unmount) {
rtems_filesystem_do_unmount(loc->mt_entry);
43e8e: 4ef9 0004 3dc8 jmp 43dc8 <rtems_filesystem_do_unmount> <== NOT EXECUTED
}
}
43e94: 242e fff8 movel %fp@(-8),%d2
43e98: 246e fffc moveal %fp@(-4),%a2
43e9c: 4e5e unlk %fp <== NOT EXECUTED
00044060 <rtems_filesystem_location_transform_to_global>:
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
44060: 4e56 fffc linkw %fp,#-4
44064: 2f0a movel %a2,%sp@-
44066: 2f02 movel %d2,%sp@-
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
44068: 4878 0024 pea 24 <OPER2+0x10>
}
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
4406c: 242e 0008 movel %fp@(8),%d2
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
44070: 4eb9 0004 2d30 jsr 42d30 <malloc>
if (global_loc != NULL) {
44076: 588f addql #4,%sp
rtems_filesystem_global_location_t *rtems_filesystem_location_transform_to_global(
rtems_filesystem_location_info_t *loc
)
{
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
44078: 2440 moveal %d0,%a2
if (global_loc != NULL) {
4407a: 4a80 tstl %d0
4407c: 6726 beqs 440a4 <rtems_filesystem_location_transform_to_global+0x44><== NEVER TAKEN
global_loc->reference_count = 1;
4407e: 7001 moveq #1,%d0
global_loc->deferred_released_next = NULL;
44080: 42aa 001c clrl %a2@(28)
)
{
rtems_filesystem_global_location_t *global_loc = malloc(sizeof(*global_loc));
if (global_loc != NULL) {
global_loc->reference_count = 1;
44084: 2540 0018 movel %d0,%a2@(24)
global_loc->deferred_released_next = NULL;
global_loc->deferred_released_count = 0;
44088: 42aa 0020 clrl %a2@(32)
rtems_filesystem_location_copy(&global_loc->location, loc);
4408c: 2f02 movel %d2,%sp@-
4408e: 2f0a movel %a2,%sp@-
44090: 4eb9 0004 3d44 jsr 43d44 <rtems_filesystem_location_copy>
rtems_filesystem_location_remove_from_mt_entry(loc);
44096: 2f02 movel %d2,%sp@-
44098: 4eb9 0004 3e4a jsr 43e4a <rtems_filesystem_location_remove_from_mt_entry>
4409e: 4fef 000c lea %sp@(12),%sp
440a2: 6024 bras 440c8 <rtems_filesystem_location_transform_to_global+0x68>
} else {
rtems_filesystem_location_free(loc);
440a4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
440a6: 4eb9 0004 9f90 jsr 49f90 <rtems_filesystem_location_free> <== NOT EXECUTED
);
static inline rtems_filesystem_global_location_t *
rtems_filesystem_global_location_obtain_null(void)
{
rtems_filesystem_global_location_t *global_loc = NULL;
440ac: 204e moveal %fp,%a0 <== NOT EXECUTED
440ae: 42a0 clrl %a0@- <== NOT EXECUTED
return rtems_filesystem_global_location_obtain( &global_loc );
440b0: 2f08 movel %a0,%sp@- <== NOT EXECUTED
440b2: 4eb9 0004 3fc0 jsr 43fc0 <rtems_filesystem_global_location_obtain><== NOT EXECUTED
440b8: 2440 moveal %d0,%a2 <== NOT EXECUTED
global_loc = rtems_filesystem_global_location_obtain_null();
errno = ENOMEM;
440ba: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
440c0: 508f addql #8,%sp <== NOT EXECUTED
440c2: 720c moveq #12,%d1 <== NOT EXECUTED
440c4: 2040 moveal %d0,%a0 <== NOT EXECUTED
440c6: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
return global_loc;
}
440c8: 200a movel %a2,%d0
440ca: 242e fff4 movel %fp@(-12),%d2
440ce: 246e fff8 moveal %fp@(-8),%a2
440d2: 4e5e unlk %fp
...
00042dfc <rtems_filesystem_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
42dfc: 4e56 fff0 linkw %fp,#-16
int rv = 0;
mode &= ~rtems_filesystem_umask;
42e00: 2279 0005 c49c moveal 5c49c <rtems_current_user_env>,%a1
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
42e06: 48d7 003c moveml %d2-%d5,%sp@
int rv = 0;
mode &= ~rtems_filesystem_umask;
42e0a: 2629 0008 movel %a1@(8),%d3
42e0e: 4683 notl %d3
42e10: c6ae 0014 andl %fp@(20),%d3
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
42e14: 206e 0008 moveal %fp@(8),%a0
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
42e18: 2403 movel %d3,%d2
42e1a: 0282 0000 f000 andil #61440,%d2
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
42e20: 282e 000c movel %fp@(12),%d4
42e24: 2a2e 0010 movel %fp@(16),%d5
42e28: 202e 0018 movel %fp@(24),%d0
42e2c: 222e 001c movel %fp@(28),%d1
int rv = 0;
mode &= ~rtems_filesystem_umask;
switch (mode & S_IFMT) {
42e30: 0c82 0000 4000 cmpil #16384,%d2
42e36: 6724 beqs 42e5c <rtems_filesystem_mknod+0x60>
42e38: 6212 bhis 42e4c <rtems_filesystem_mknod+0x50>
42e3a: 0c82 0000 1000 cmpil #4096,%d2
42e40: 671a beqs 42e5c <rtems_filesystem_mknod+0x60>
42e42: 0c82 0000 2000 cmpil #8192,%d2
42e48: 6640 bnes 42e8a <rtems_filesystem_mknod+0x8e>
42e4a: 6010 bras 42e5c <rtems_filesystem_mknod+0x60>
42e4c: 0c82 0000 6000 cmpil #24576,%d2
42e52: 6708 beqs 42e5c <rtems_filesystem_mknod+0x60>
42e54: 0c82 0000 8000 cmpil #32768,%d2
42e5a: 662e bnes 42e8a <rtems_filesystem_mknod+0x8e> <== NEVER TAKEN
rv = -1;
break;
}
if ( rv == 0 ) {
const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops;
42e5c: 2268 0014 moveal %a0@(20),%a1
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
42e60: 2269 000c moveal %a1@(12),%a1
42e64: 2d43 0014 movel %d3,%fp@(20)
42e68: 2d40 0018 movel %d0,%fp@(24)
42e6c: 2d41 001c movel %d1,%fp@(28)
42e70: 2d45 0010 movel %d5,%fp@(16)
42e74: 2d44 000c movel %d4,%fp@(12)
}
return rv;
}
42e78: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
}
if ( rv == 0 ) {
const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops;
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
42e7e: 2d48 0008 movel %a0,%fp@(8)
}
return rv;
}
42e82: 4e5e unlk %fp
}
if ( rv == 0 ) {
const rtems_filesystem_operations_table *ops = parentloc->mt_entry->ops;
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
42e84: 2269 0018 moveal %a1@(24),%a1
42e88: 4ed1 jmp %a1@
case S_IFDIR:
case S_IFIFO:
case S_IFREG:
break;
default:
errno = EINVAL;
42e8a: 4eb9 0004 c330 jsr 4c330 <__errno>
42e90: 2040 moveal %d0,%a0
42e92: 7016 moveq #22,%d0
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
}
return rv;
}
42e94: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
case S_IFDIR:
case S_IFIFO:
case S_IFREG:
break;
default:
errno = EINVAL;
42e9a: 2080 movel %d0,%a0@
rv = (*ops->mknod_h)( parentloc, name, namelen, mode, dev );
}
return rv;
}
42e9c: 70ff moveq #-1,%d0
42e9e: 4e5e unlk %fp <== NOT EXECUTED
00043162 <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
43162: 4e56 0000 linkw %fp,#0
43166: 2f0a movel %a2,%sp@-
43168: 2f02 movel %d2,%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 ) );
4316a: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
}
return 0;
}
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
4316e: 242e 000c movel %fp@(12),%d2
* 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 ) );
43172: 4eb9 0004 3504 jsr 43504 <malloc>
*key = new_key;
43178: 206e 0008 moveal %fp@(8),%a0
* 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 ) );
4317c: 2440 moveal %d0,%a2
*key = new_key;
4317e: 2080 movel %d0,%a0@
"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 );
43180: 2f02 movel %d2,%sp@-
43182: 2f00 movel %d0,%sp@-
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
*key = new_key;
new_key->val = NULL;
43184: 4292 clrl %a2@
"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 );
43186: 42a7 clrl %sp@-
*/
/* 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;
43188: 2542 0004 movel %d2,%a2@(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 );
4318c: 4eb9 0004 70b4 jsr 470b4 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
43192: 4fef 0010 lea %sp@(16),%sp
return 0;
43196: 4281 clrl %d1
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
43198: 4a80 tstl %d0
4319a: 670c beqs 431a8 <rtems_gxx_key_create+0x46> <== ALWAYS TAKEN
return 0;
free( new_key );
4319c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4319e: 4eb9 0004 2fd0 jsr 42fd0 <free> <== NOT EXECUTED
return -1;
431a4: 588f addql #4,%sp <== NOT EXECUTED
431a6: 72ff moveq #-1,%d1 <== NOT EXECUTED
}
431a8: 242e fff8 movel %fp@(-8),%d2
431ac: 2001 movel %d1,%d0
431ae: 246e fffc moveal %fp@(-4),%a2
431b2: 4e5e unlk %fp <== NOT EXECUTED
000431c6 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
431c6: 4e56 0000 linkw %fp,#0
431ca: 2f0a movel %a2,%sp@-
431cc: 246e 0008 moveal %fp@(8),%a2
#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 );
431d0: 2f0a movel %a2,%sp@-
431d2: 42a7 clrl %sp@-
431d4: 4eb9 0004 7144 jsr 47144 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
431da: 508f addql #8,%sp
431dc: 4a80 tstl %d0
431de: 660e bnes 431ee <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
431e0: 4a8a tstl %a2
431e2: 670a beqs 431ee <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
431e4: 2f12 movel %a2@,%sp@-
431e6: 4eb9 0004 2fd0 jsr 42fd0 <free>
431ec: 588f addql #4,%sp
return 0;
}
key = NULL;
return 0;
}
431ee: 246e fffc moveal %fp@(-4),%a2
431f2: 4280 clrl %d0
431f4: 4e5e unlk %fp <== NOT EXECUTED
00043108 <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))
{
43108: 4e56 fff0 linkw %fp,#-16
4310c: 48d7 040c moveml %d2-%d3/%a2,%sp@
43110: 246e 0008 moveal %fp@(8),%a2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
43114: 2012 movel %a2@,%d0
43116: 663e bnes 43156 <rtems_gxx_once+0x4e>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
43118: 260e movel %fp,%d3
4311a: 5983 subql #4,%d3
4311c: 2f03 movel %d3,%sp@-
4311e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
43122: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
43126: 4eb9 0004 6edc jsr 46edc <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
4312c: 2412 movel %a2@,%d2
4312e: 4fef 000c lea %sp@(12),%sp
43132: 6604 bnes 43138 <rtems_gxx_once+0x30> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
43134: 7001 moveq #1,%d0
43136: 2480 movel %d0,%a2@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43138: 2f03 movel %d3,%sp@-
4313a: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
4313e: 2f2e fffc movel %fp@(-4),%sp@-
43142: 4eb9 0004 6edc jsr 46edc <rtems_task_mode>
if ( o == 0 )
43148: 4fef 000c lea %sp@(12),%sp
4314c: 4a82 tstl %d2
4314e: 6606 bnes 43156 <rtems_gxx_once+0x4e> <== NEVER TAKEN
(*func)();
43150: 206e 000c moveal %fp@(12),%a0
43154: 4e90 jsr %a0@
}
return 0;
}
43156: 4280 clrl %d0
43158: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
4315e: 4e5e unlk %fp <== NOT EXECUTED
00043254 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
43254: 4e56 0000 linkw %fp,#0
43258: 2f0a movel %a2,%sp@-
4325a: 246e 0008 moveal %fp@(8),%a2
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 );
4325e: 2f2a 0004 movel %a2@(4),%sp@-
43262: 2f0a movel %a2,%sp@-
43264: 42a7 clrl %sp@-
43266: 4eb9 0004 70b4 jsr 470b4 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
4326c: 4fef 000c lea %sp@(12),%sp
43270: 4a80 tstl %d0
43272: 6606 bnes 4327a <rtems_gxx_setspecific+0x26> <== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
43274: 24ae 000c movel %fp@(12),%a2@
return 0;
43278: 6002 bras 4327c <rtems_gxx_setspecific+0x28>
}
return -1;
4327a: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
4327c: 246e fffc moveal %fp@(-4),%a2
43280: 4e5e unlk %fp <== NOT EXECUTED
00046e8c <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
46e8c: 7003 moveq #3,%d0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
46e8e: 4e56 0000 linkw %fp,#0
if (
46e92: b0b9 0006 3758 cmpl 63758 <_System_state_Current>,%d0
46e98: 6724 beqs 46ebe <rtems_heap_allocate_aligned_with_boundary+0x32><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
46e9a: 4eb9 0004 601e jsr 4601e <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
46ea0: 2f2e 0010 movel %fp@(16),%sp@-
46ea4: 2f2e 000c movel %fp@(12),%sp@-
46ea8: 2f2e 0008 movel %fp@(8),%sp@-
46eac: 2f39 0006 1530 movel 61530 <RTEMS_Malloc_Heap>,%sp@-
46eb2: 4eb9 0004 c028 jsr 4c028 <_Protected_heap_Allocate_aligned_with_boundary>
46eb8: 4fef 0010 lea %sp@(16),%sp
46ebc: 600c bras 46eca <rtems_heap_allocate_aligned_with_boundary+0x3e>
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
46ebe: 4eb9 0004 6000 jsr 46000 <malloc_is_system_state_OK>
46ec4: 4a00 tstb %d0
46ec6: 66d2 bnes 46e9a <rtems_heap_allocate_aligned_with_boundary+0xe>
) {
return NULL;
46ec8: 4280 clrl %d0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
46eca: 4e5e unlk %fp
...
00043774 <rtems_heap_extend_via_sbrk>:
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
43774: 4e56 ffec linkw %fp,#-20
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
43778: 2039 0005 ddcc movel 5ddcc <RTEMS_Malloc_Sbrk_amount>,%d0
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
4377e: 48d7 043c moveml %d2-%d5/%a2,%sp@
43782: 262e 000c movel %fp@(12),%d3
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
43786: 2a03 movel %d3,%d5
Heap_Control *heap,
size_t alloc_size
)
{
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
43788: 2403 movel %d3,%d2
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
4378a: 4c40 5801 remsl %d0,%d1,%d5
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
)
{
4378e: 282e 0008 movel %fp@(8),%d4
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
void *return_this = NULL;
if ( misaligned != 0 ) {
43792: 4a81 tstl %d1
43794: 6706 beqs 4379c <rtems_heap_extend_via_sbrk+0x28>
sbrk_size += sbrk_amount - misaligned;
43796: 2400 movel %d0,%d2
43798: 9481 subl %d1,%d2
4379a: d483 addl %d3,%d2
}
if ( sbrk_size > 0 && sbrk_amount > 0 ) {
4379c: 4a82 tstl %d2
4379e: 6e02 bgts 437a2 <rtems_heap_extend_via_sbrk+0x2e><== ALWAYS TAKEN
437a0: 604c bras 437ee <rtems_heap_extend_via_sbrk+0x7a><== NOT EXECUTED
437a2: 4a80 tstl %d0
437a4: 6f48 bles 437ee <rtems_heap_extend_via_sbrk+0x7a><== NEVER TAKEN
void *area_begin = sbrk( sbrk_size );
437a6: 2f02 movel %d2,%sp@-
437a8: 45f9 0004 07f0 lea 407f0 <sbrk>,%a2
437ae: 4e92 jsr %a2@
if ( area_begin != (void *) -1 ) {
437b0: 588f addql #4,%sp
437b2: 72ff moveq #-1,%d1
437b4: b280 cmpl %d0,%d1
437b6: 6736 beqs 437ee <rtems_heap_extend_via_sbrk+0x7a>
bool ok = _Protected_heap_Extend( heap, area_begin, sbrk_size );
437b8: 2f02 movel %d2,%sp@-
437ba: 2f00 movel %d0,%sp@-
437bc: 2f04 movel %d4,%sp@-
437be: 4eb9 0004 7cd4 jsr 47cd4 <_Protected_heap_Extend>
if ( ok ) {
437c4: 4fef 000c lea %sp@(12),%sp
437c8: 4a00 tstb %d0
437ca: 671a beqs 437e6 <rtems_heap_extend_via_sbrk+0x72>
437cc: 42a7 clrl %sp@-
MSBUMP( space_available, sbrk_size );
437ce: d5b9 0005 dda0 addl %d2,5dda0 <rtems_malloc_statistics>
437d4: 42a7 clrl %sp@-
437d6: 2f03 movel %d3,%sp@-
437d8: 2f04 movel %d4,%sp@-
437da: 4eb9 0004 7c94 jsr 47c94 <_Protected_heap_Allocate_aligned_with_boundary>
437e0: 4fef 0010 lea %sp@(16),%sp
437e4: 600a bras 437f0 <rtems_heap_extend_via_sbrk+0x7c>
return_this = _Protected_heap_Allocate( heap, alloc_size );
} else {
sbrk( -sbrk_size );
437e6: 4482 negl %d2
437e8: 2f02 movel %d2,%sp@-
437ea: 4e92 jsr %a2@
437ec: 588f addql #4,%sp
)
{
ptrdiff_t sbrk_amount = RTEMS_Malloc_Sbrk_amount;
ptrdiff_t sbrk_size = (ptrdiff_t) alloc_size;
ptrdiff_t misaligned = sbrk_size % sbrk_amount;
void *return_this = NULL;
437ee: 4280 clrl %d0
}
}
}
return return_this;
}
437f0: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
437f6: 4e5e unlk %fp
...
00045368 <rtems_heap_greedy_free>:
void rtems_heap_greedy_free( void *opaque )
{
45368: 4e56 0000 linkw %fp,#0
4536c: 2f02 movel %d2,%sp@-
_RTEMS_Lock_allocator();
4536e: 2f39 0006 201e movel 6201e <_RTEMS_Allocator_Mutex>,%sp@-
return opaque;
}
void rtems_heap_greedy_free( void *opaque )
{
45374: 242e 0008 movel %fp@(8),%d2
_RTEMS_Lock_allocator();
45378: 4eb9 0004 8988 jsr 48988 <_API_Mutex_Lock>
_Heap_Greedy_free( RTEMS_Malloc_Heap, opaque );
4537e: 2f02 movel %d2,%sp@-
45380: 2f39 0006 02e4 movel 602e4 <RTEMS_Malloc_Heap>,%sp@-
45386: 4eb9 0004 8fc4 jsr 48fc4 <_Heap_Greedy_free>
_RTEMS_Unlock_allocator();
}
4538c: 242e fffc movel %fp@(-4),%d2
void rtems_heap_greedy_free( void *opaque )
{
_RTEMS_Lock_allocator();
_Heap_Greedy_free( RTEMS_Malloc_Heap, opaque );
_RTEMS_Unlock_allocator();
45390: 41f9 0006 201e lea 6201e <_RTEMS_Allocator_Mutex>,%a0
45396: 4fef 000c lea %sp@(12),%sp
4539a: 2d50 0008 movel %a0@,%fp@(8)
}
4539e: 4e5e unlk %fp
void rtems_heap_greedy_free( void *opaque )
{
_RTEMS_Lock_allocator();
_Heap_Greedy_free( RTEMS_Malloc_Heap, opaque );
_RTEMS_Unlock_allocator();
453a0: 4ef9 0004 89e8 jmp 489e8 <_API_Mutex_Unlock>
...
00043744 <rtems_heap_null_extend>:
Heap_Control *heap __attribute__((unused)),
size_t alloc_size __attribute__((unused))
)
{
return NULL;
}
43744: 4280 clrl %d0
void *rtems_heap_null_extend(
Heap_Control *heap __attribute__((unused)),
size_t alloc_size __attribute__((unused))
)
{
43746: 4e56 0000 linkw %fp,#0
return NULL;
}
4374a: 4e5e unlk %fp
...
00043df2 <rtems_ide_part_table_free>:
* RETURNS:
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
{
43df2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
partition_table_free( disk_desc );
}
43df6: 4e5e unlk %fp <== NOT EXECUTED
* N/A
*/
void
rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc)
{
partition_table_free( disk_desc );
43df8: 6000 fbc2 braw 439bc <partition_table_free> <== NOT EXECUTED
00043dfc <rtems_ide_part_table_get>:
* RTEMS_SUCCESSFUL if success,
* RTEMS_INTERNAL_ERROR otherwise
*/
rtems_status_code
rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
{
43dfc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return partition_table_get( dev_name, disk_desc );
}
43e00: 4e5e unlk %fp <== NOT EXECUTED
* RTEMS_INTERNAL_ERROR otherwise
*/
rtems_status_code
rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc)
{
return partition_table_get( dev_name, disk_desc );
43e02: 6000 fe0e braw 43c12 <partition_table_get> <== NOT EXECUTED
00043e06 <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)
{
43e06: 4e56 ffc8 linkw %fp,#-56
43e0a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%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));
43e0e: 4878 0124 pea 124 <DBL_MANT_DIG+0xef>
43e12: 4878 0001 pea 1 <ADD>
* 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)
{
43e16: 2a2e 0008 movel %fp@(8),%d5
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));
43e1a: 4eb9 0004 4584 jsr 44584 <calloc>
if (disk_desc == NULL)
43e20: 508f addql #8,%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));
43e22: 2a40 moveal %d0,%a5
if (disk_desc == NULL)
43e24: 4a80 tstl %d0
43e26: 6700 00a6 beqw 43ece <rtems_ide_part_table_initialize+0xc8>
{
return RTEMS_NO_MEMORY;
}
/* get partition table */
rc = partition_table_get(dev_name, disk_desc);
43e2a: 2f00 movel %d0,%sp@-
43e2c: 2f05 movel %d5,%sp@-
43e2e: 4eba fde2 jsr %pc@(43c12 <partition_table_get>)
if (rc != RTEMS_SUCCESSFUL)
43e32: 508f addql #8,%sp
{
return RTEMS_NO_MEMORY;
}
/* get partition table */
rc = partition_table_get(dev_name, disk_desc);
43e34: 2600 movel %d0,%d3
if (rc != RTEMS_SUCCESSFUL)
43e36: 670c beqs 43e44 <rtems_ide_part_table_initialize+0x3e><== ALWAYS TAKEN
{
free(disk_desc);
43e38: 2f0d movel %a5,%sp@- <== NOT EXECUTED
43e3a: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
43e40: 6000 0088 braw 43eca <rtems_ide_part_table_initialize+0xc4><== NOT EXECUTED
rtems_filesystem_split_dev_t (disk_desc->dev, major, minor);
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
{
sprintf(name, "%s%d", dev_name, part_num + 1);
43e44: 280e movel %fp,%d4
*/
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++)
43e46: 4282 clrl %d2
{
sprintf(name, "%s%d", dev_name, part_num + 1);
43e48: 0684 ffff fff0 addil #-16,%d4
if (part_desc == NULL)
{
continue;
}
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
43e4e: 47f9 0004 34d2 lea 434d2 <rtems_disk_create_log>,%a3
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
43e54: 49f9 0005 15fe lea 515fe <fprintf>,%a4
/* 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);
43e5a: 2c15 movel %a5@,%d6
43e5c: 2e2d 0004 movel %a5@(4),%d7
/* create logical disks on the physical one */
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
43e60: 605c bras 43ebe <rtems_ide_part_table_initialize+0xb8>
{
sprintf(name, "%s%d", dev_name, part_num + 1);
43e62: 5282 addql #1,%d2
43e64: 2f02 movel %d2,%sp@-
43e66: 2f05 movel %d5,%sp@-
43e68: 4879 0005 f9e8 pea 5f9e8 <RTEMS_BDPART_MBR_MASTER_TYPE+0x14>
43e6e: 2f04 movel %d4,%sp@-
43e70: 4eb9 0005 1dd4 jsr 51dd4 <sprintf>
dev = rtems_filesystem_make_dev_t(major, ++minor);
part_desc = disk_desc->partitions[part_num];
if (part_desc == NULL)
43e76: 4fef 0010 lea %sp@(16),%sp
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
43e7a: 2242 moveal %d2,%a1
43e7c: d3c7 addal %d7,%a1
for (part_num = 0; part_num < disk_desc->last_log_id; part_num++)
{
sprintf(name, "%s%d", dev_name, part_num + 1);
dev = rtems_filesystem_make_dev_t(major, ++minor);
part_desc = disk_desc->partitions[part_num];
43e7e: 2035 2c24 movel %a5@(00000024,%d2:l:4),%d0
if (part_desc == NULL)
43e82: 673a beqs 43ebe <rtems_ide_part_table_initialize+0xb8>
{
continue;
}
rc = rtems_disk_create_log(dev, disk_desc->dev, part_desc->start,
43e84: 2440 moveal %d0,%a2
43e86: 2f04 movel %d4,%sp@-
43e88: 2f2a 0008 movel %a2@(8),%sp@-
43e8c: 2f2a 0004 movel %a2@(4),%sp@-
43e90: 2f2d 0004 movel %a5@(4),%sp@-
43e94: 2f15 movel %a5@,%sp@-
43e96: 2f09 movel %a1,%sp@-
43e98: 2f06 movel %d6,%sp@-
43e9a: 4e93 jsr %a3@
part_desc->size, name);
if (rc != RTEMS_SUCCESSFUL)
43e9c: 4fef 001c lea %sp@(28),%sp
43ea0: 4a80 tstl %d0
43ea2: 671a beqs 43ebe <rtems_ide_part_table_initialize+0xb8><== ALWAYS TAKEN
{
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
43ea4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43ea6: 2079 0006 1138 moveal 61138 <_impure_ptr>,%a0 <== NOT EXECUTED
43eac: 2f04 movel %d4,%sp@- <== NOT EXECUTED
43eae: 4879 0005 f9ed pea 5f9ed <RTEMS_BDPART_MBR_MASTER_TYPE+0x19><== NOT EXECUTED
43eb4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43eb8: 4e94 jsr %a4@ <== NOT EXECUTED
continue;
43eba: 4fef 0010 lea %sp@(16),%sp <== 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++)
43ebe: b4ad 0024 cmpl %a5@(36),%d2
43ec2: 6d9e blts 43e62 <rtems_ide_part_table_initialize+0x5c>
fprintf(stdout,"Cannot create device %s, error code %d\n", name, rc);
continue;
}
}
partition_table_free(disk_desc);
43ec4: 2f0d movel %a5,%sp@-
43ec6: 4eba faf4 jsr %pc@(439bc <partition_table_free>)
43eca: 588f addql #4,%sp
43ecc: 6002 bras 43ed0 <rtems_ide_part_table_initialize+0xca>
char name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
disk_desc = (rtems_disk_desc_t *) calloc(1, sizeof(rtems_disk_desc_t));
if (disk_desc == NULL)
{
return RTEMS_NO_MEMORY;
43ece: 761a moveq #26,%d3 <== NOT EXECUTED
}
partition_table_free(disk_desc);
return RTEMS_SUCCESSFUL;
}
43ed0: 2003 movel %d3,%d0
43ed2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
43ed8: 4e5e unlk %fp <== NOT EXECUTED
0004693c <rtems_initialize_start_multitasking>:
4693c: 7002 moveq #2,%d0
}
void rtems_initialize_start_multitasking(void)
{
4693e: 4e56 0000 linkw %fp,#0
46942: 23c0 0005 dd5c movel %d0,5dd5c <_System_state_Current>
uint32_t status;
_System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
_Thread_Start_multitasking();
46948: 4eb9 0004 8ea8 jsr 48ea8 <_Thread_Start_multitasking>
****** RETURNS WHEN SYSTEM IS SHUT DOWN ******
*******************************************************************
*******************************************************************
*******************************************************************/
status = _Per_CPU_Information[0].idle->Wait.return_code;
4694e: 2079 0005 dd76 moveal 5dd76 <_Per_CPU_Information+0x16>,%a0
rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
46954: 2f28 0034 movel %a0@(52),%sp@-
46958: 4878 0005 pea 5 <COMPARE>
4695c: 4eb9 0004 69d8 jsr 469d8 <rtems_fatal>
...
000487d8 <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)
{
487d8: 4e56 fff0 linkw %fp,#-16
487dc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
487e0: 286e 0008 moveal %fp@(8),%a4
487e4: 45f9 0005 fff6 lea 5fff6 <_Objects_Information_table+0x4>,%a2
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
487ea: 4a8c tstl %a4
487ec: 673a beqs 48828 <rtems_iterate_over_all_threads+0x50><== NEVER TAKEN
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 ] )
487ee: 205a moveal %a2@+,%a0
487f0: 4a88 tstl %a0
487f2: 660a bnes 487fe <rtems_iterate_over_all_threads+0x26>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
487f4: b5fc 0006 0002 cmpal #393218,%a2
487fa: 66f2 bnes 487ee <rtems_iterate_over_all_threads+0x16>
487fc: 602a bras 48828 <rtems_iterate_over_all_threads+0x50>
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
487fe: 2668 0004 moveal %a0@(4),%a3
if ( !information )
48802: 4a8b tstl %a3
48804: 67ee beqs 487f4 <rtems_iterate_over_all_threads+0x1c>
48806: 7401 moveq #1,%d2
48808: 6012 bras 4881c <rtems_iterate_over_all_threads+0x44>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
4880a: 206b 0018 moveal %a3@(24),%a0
4880e: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !the_thread )
48812: 6706 beqs 4881a <rtems_iterate_over_all_threads+0x42><== NEVER TAKEN
continue;
(*routine)(the_thread);
48814: 2f00 movel %d0,%sp@-
48816: 4e94 jsr %a4@
48818: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4881a: 5282 addql #1,%d2
4881c: 4280 clrl %d0
4881e: 302b 000e movew %a3@(14),%d0
48822: b082 cmpl %d2,%d0
48824: 64e4 bccs 4880a <rtems_iterate_over_all_threads+0x32>
48826: 60cc bras 487f4 <rtems_iterate_over_all_threads+0x1c>
(*routine)(the_thread);
}
}
}
48828: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
4882e: 4e5e unlk %fp
...
00042b98 <rtems_libio_init>:
rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
rtems_libio_t *rtems_libio_iop_freelist;
void rtems_libio_init( void )
{
42b98: 4e56 0000 linkw %fp,#0
42b9c: 2f02 movel %d2,%sp@-
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
42b9e: 2439 0005 c450 movel 5c450 <rtems_libio_number_iops>,%d2
42ba4: 6744 beqs 42bea <rtems_libio_init+0x52> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
42ba6: 4878 0030 pea 30 <OPER2+0x1c>
42baa: 2f02 movel %d2,%sp@-
42bac: 4eb9 0004 2818 jsr 42818 <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42bb2: 508f addql #8,%sp
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
42bb4: 23c0 0005 dae4 movel %d0,5dae4 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42bba: 6606 bnes 42bc2 <rtems_libio_init+0x2a>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
42bbc: 4878 001a pea 1a <OPER2+0x6>
42bc0: 604e bras 42c10 <rtems_libio_init+0x78>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
42bc2: 23c0 0005 dae8 movel %d0,5dae8 <rtems_libio_iop_freelist>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
42bc8: 2040 moveal %d0,%a0
42bca: 4281 clrl %d1
42bcc: 6008 bras 42bd6 <rtems_libio_init+0x3e>
iop->data1 = iop + 1;
42bce: 41e8 0030 lea %a0@(48),%a0
42bd2: 2148 fffc movel %a0,%a0@(-4)
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++)
42bd6: 5281 addql #1,%d1
42bd8: b481 cmpl %d1,%d2
42bda: 66f2 bnes 42bce <rtems_libio_init+0x36>
iop->data1 = iop + 1;
iop->data1 = NULL;
42bdc: 2401 movel %d1,%d2
42bde: 2040 moveal %d0,%a0
42be0: e98a lsll #4,%d2
42be2: ed89 lsll #6,%d1
42be4: 9282 subl %d2,%d1
42be6: 42b0 18fc clrl %a0@(fffffffc,%d1:l)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
42bea: 4879 0005 daec pea 5daec <rtems_libio_semaphore>
42bf0: 42a7 clrl %sp@-
42bf2: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
42bf6: 4878 0001 pea 1 <ADD>
42bfa: 2f3c 4c42 494f movel #1279412559,%sp@-
42c00: 4eb9 0004 6088 jsr 46088 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
42c06: 4fef 0014 lea %sp@(20),%sp
42c0a: 4a80 tstl %d0
42c0c: 6708 beqs 42c16 <rtems_libio_init+0x7e> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
42c0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
42c10: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
42c16: 2279 0005 c454 moveal 5c454 <rtems_fs_init_helper>,%a1
42c1c: 4a89 tstl %a1
42c1e: 6708 beqs 42c28 <rtems_libio_init+0x90>
(* rtems_fs_init_helper)();
}
42c20: 242e fffc movel %fp@(-4),%d2
42c24: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
42c26: 4ed1 jmp %a1@
}
42c28: 242e fffc movel %fp@(-4),%d2
42c2c: 4e5e unlk %fp <== NOT EXECUTED
00043108 <rtems_libio_set_private_env>:
}
rtems_status_code rtems_libio_set_private_env(void)
{
43108: 4e56 fff0 linkw %fp,#-16
4310c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
43110: 4eb9 0004 47c4 jsr 447c4 <rtems_task_self>
rtems_user_env_t *old_env = rtems_current_user_env;
43116: 2679 0005 b3a4 moveal 5b3a4 <rtems_current_user_env>,%a3
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
4311c: 2400 movel %d0,%d2
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;
4311e: 202b 0022 movel %a3@(34),%d0
if (uses_global_env || uses_shared_env) {
43122: b7fc 0005 b3a8 cmpal #373672,%a3
43128: 6706 beqs 43130 <rtems_libio_set_private_env+0x28>
4312a: b480 cmpl %d0,%d2
4312c: 6700 008a beqw 431b8 <rtems_libio_set_private_env+0xb0>
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
43130: 4878 002a pea 2a <OPER2+0x16>
43134: 4878 0001 pea 1 <ADD>
43138: 4eb9 0004 742c jsr 4742c <calloc>
if (new_env != NULL) {
4313e: 508f addql #8,%sp
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) {
rtems_user_env_t *new_env = calloc(1, sizeof(*new_env));
43140: 2440 moveal %d0,%a2
if (new_env != NULL) {
43142: 4a80 tstl %d0
43144: 6776 beqs 431bc <rtems_libio_set_private_env+0xb4>
*new_env = *old_env;
43146: 4878 002a pea 2a <OPER2+0x16>
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);
4314a: 49f9 0004 3d04 lea 43d04 <rtems_filesystem_global_location_obtain>,%a4
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;
43150: 2f0b movel %a3,%sp@-
43152: 2f00 movel %d0,%sp@-
43154: 4eb9 0004 9440 jsr 49440 <memcpy>
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);
4315a: 486b 0004 pea %a3@(4)
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;
4315e: 7001 moveq #1,%d0
new_env->task_id = self_task_id;
43160: 2542 0022 movel %d2,%a2@(34)
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;
43164: 2540 0026 movel %d0,%a2@(38)
new_env->task_id = self_task_id;
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
43168: 4e94 jsr %a4@
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
4316a: 2f0b movel %a3,%sp@-
if (new_env != NULL) {
*new_env = *old_env;
new_env->reference_count = 1;
new_env->task_id = self_task_id;
new_env->root_directory =
4316c: 2540 0004 movel %d0,%a2@(4)
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
43170: 4e94 jsr %a4@
rtems_fatal_error_occurred(0xdeadbeef);
}
rtems_current_user_env = &rtems_global_user_env;
}
}
43172: 206a 0004 moveal %a2@(4),%a0
new_env->root_directory =
rtems_filesystem_global_location_obtain(&old_env->root_directory);
new_env->current_directory =
rtems_filesystem_global_location_obtain(&old_env->current_directory);
if (
43176: 4fef 0014 lea %sp@(20),%sp
4317a: 223c 0005 a514 movel #369940,%d1
*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 =
43180: 2480 movel %d0,%a2@
rtems_filesystem_global_location_obtain(&old_env->current_directory);
if (
43182: b2a8 0010 cmpl %a0@(16),%d1
43186: 6738 beqs 431c0 <rtems_libio_set_private_env+0xb8>
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
43188: 2040 moveal %d0,%a0
4318a: b2a8 0010 cmpl %a0@(16),%d1
4318e: 6730 beqs 431c0 <rtems_libio_set_private_env+0xb8><== NEVER TAKEN
) {
sc = rtems_task_variable_add(
43190: 487a fefa pea %pc@(4308c <free_user_env>)
43194: 4879 0005 b3a4 pea 5b3a4 <rtems_current_user_env>
4319a: 42a7 clrl %sp@-
4319c: 4eb9 0004 4880 jsr 44880 <rtems_task_variable_add>
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
431a2: 4fef 000c lea %sp@(12),%sp
if (
!rtems_filesystem_global_location_is_null(new_env->root_directory)
&& !rtems_filesystem_global_location_is_null(new_env->current_directory)
) {
sc = rtems_task_variable_add(
431a6: 2400 movel %d0,%d2
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
431a8: 661a bnes 431c4 <rtems_libio_set_private_env+0xbc>
free_user_env_protected(old_env);
431aa: 2f0b movel %a3,%sp@-
431ac: 4eba ff34 jsr %pc@(430e2 <free_user_env_protected>)
rtems_current_user_env = new_env;
431b0: 23ca 0005 b3a4 movel %a2,5b3a4 <rtems_current_user_env>
431b6: 6014 bras 431cc <rtems_libio_set_private_env+0xc4>
_Thread_Enable_dispatch();
}
rtems_status_code rtems_libio_set_private_env(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
431b8: 4282 clrl %d2
431ba: 6012 bras 431ce <rtems_libio_set_private_env+0xc6>
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
}
} else {
sc = RTEMS_NO_MEMORY;
431bc: 741a moveq #26,%d2
431be: 600e bras 431ce <rtems_libio_set_private_env+0xc6>
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
}
} else {
sc = RTEMS_UNSATISFIED;
431c0: 740d moveq #13,%d2
431c2: 6002 bras 431c6 <rtems_libio_set_private_env+0xbe>
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(old_env);
rtems_current_user_env = new_env;
} else {
sc = RTEMS_TOO_MANY;
431c4: 7405 moveq #5,%d2
} else {
sc = RTEMS_UNSATISFIED;
}
if (sc != RTEMS_SUCCESSFUL) {
free_user_env(new_env);
431c6: 2f0a movel %a2,%sp@-
431c8: 4eba fec2 jsr %pc@(4308c <free_user_env>)
431cc: 588f addql #4,%sp
sc = RTEMS_NO_MEMORY;
}
}
return sc;
}
431ce: 2002 movel %d2,%d0
431d0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
431d6: 4e5e unlk %fp <== NOT EXECUTED
000431da <rtems_libio_share_private_env>:
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
431da: 4e56 fffc linkw %fp,#-4
431de: 2f02 movel %d2,%sp@-
431e0: 242e 0008 movel %fp@(8),%d2
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id self_task_id = rtems_task_self();
431e4: 4eb9 0004 47c4 jsr 447c4 <rtems_task_self>
if (task_id != RTEMS_SELF && self_task_id != task_id) {
431ea: 4a82 tstl %d2
431ec: 6700 0084 beqw 43272 <rtems_libio_share_private_env+0x98>
431f0: b480 cmpl %d0,%d2
431f2: 677e beqs 43272 <rtems_libio_share_private_env+0x98>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
431f4: 2039 0005 c45a movel 5c45a <_Thread_Dispatch_disable_level>,%d0
++level;
431fa: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
431fc: 23c0 0005 c45a movel %d0,5c45a <_Thread_Dispatch_disable_level>
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
43202: 486e fffc pea %fp@(-4)
43206: 4879 0005 b3a4 pea 5b3a4 <rtems_current_user_env>
4320c: 2f02 movel %d2,%sp@-
4320e: 4eb9 0004 4984 jsr 44984 <rtems_task_variable_get>
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
43214: 4fef 000c lea %sp@(12),%sp
/*
* We have to disable the thread dispatching to prevent deletion of the
* environment in the meantime.
*/
_Thread_Disable_dispatch();
sc = rtems_task_variable_get(
43218: 2400 movel %d0,%d2
task_id,
(void *) &rtems_current_user_env,
(void *) &env
);
if (sc == RTEMS_SUCCESSFUL) {
4321a: 660a bnes 43226 <rtems_libio_share_private_env+0x4c>
++env->reference_count;
4321c: 206e fffc moveal %fp@(-4),%a0
43220: 52a8 0026 addql #1,%a0@(38)
43224: 6002 bras 43228 <rtems_libio_share_private_env+0x4e>
} else {
sc = RTEMS_UNSATISFIED;
43226: 740d moveq #13,%d2
}
_Thread_Enable_dispatch();
43228: 4eb9 0004 638c jsr 4638c <_Thread_Enable_dispatch>
if (sc == RTEMS_SUCCESSFUL) {
4322e: 4a82 tstl %d2
43230: 6642 bnes 43274 <rtems_libio_share_private_env+0x9a>
sc = rtems_task_variable_add(
43232: 487a fe58 pea %pc@(4308c <free_user_env>)
43236: 4879 0005 b3a4 pea 5b3a4 <rtems_current_user_env>
4323c: 42a7 clrl %sp@-
4323e: 4eb9 0004 4880 jsr 44880 <rtems_task_variable_add>
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
43244: 4fef 000c lea %sp@(12),%sp
43248: 41fa fe98 lea %pc@(430e2 <free_user_env_protected>),%a0
sc = RTEMS_UNSATISFIED;
}
_Thread_Enable_dispatch();
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_task_variable_add(
4324c: 2400 movel %d0,%d2
RTEMS_SELF,
(void **) &rtems_current_user_env,
free_user_env
);
if (sc == RTEMS_SUCCESSFUL) {
4324e: 6616 bnes 43266 <rtems_libio_share_private_env+0x8c><== NEVER TAKEN
free_user_env_protected(rtems_current_user_env);
43250: 2f39 0005 b3a4 movel 5b3a4 <rtems_current_user_env>,%sp@-
43256: 4e90 jsr %a0@
rtems_current_user_env = env;
43258: 588f addql #4,%sp
4325a: 41ee fffc lea %fp@(-4),%a0
4325e: 23d0 0005 b3a4 movel %a0@,5b3a4 <rtems_current_user_env>
43264: 600e bras 43274 <rtems_libio_share_private_env+0x9a>
} else {
free_user_env_protected(env);
43266: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
sc = RTEMS_TOO_MANY;
4326a: 7405 moveq #5,%d2 <== NOT EXECUTED
);
if (sc == RTEMS_SUCCESSFUL) {
free_user_env_protected(rtems_current_user_env);
rtems_current_user_env = env;
} else {
free_user_env_protected(env);
4326c: 4e90 jsr %a0@ <== NOT EXECUTED
4326e: 588f addql #4,%sp <== NOT EXECUTED
43270: 6002 bras 43274 <rtems_libio_share_private_env+0x9a><== NOT EXECUTED
return sc;
}
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
43272: 4282 clrl %d2
}
}
}
return sc;
}
43274: 2002 movel %d2,%d0
43276: 242e fff8 movel %fp@(-8),%d2
4327a: 4e5e unlk %fp <== NOT EXECUTED
0004a0a8 <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 ) {
4a0a8: 7006 moveq #6,%d0
return flags;
}
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
4a0aa: 4e56 0000 linkw %fp,#0
4a0ae: 222e 0008 movel %fp@(8),%d1
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a0b2: c081 andl %d1,%d0
return flags;
}
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
4a0b4: 2f02 movel %d2,%sp@-
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a0b6: 7406 moveq #6,%d2
4a0b8: b480 cmpl %d0,%d2
4a0ba: 6712 beqs 4a0ce <rtems_libio_to_fcntl_flags+0x26><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4a0bc: 0801 0001 btst #1,%d1
4a0c0: 6610 bnes 4a0d2 <rtems_libio_to_fcntl_flags+0x2a><== ALWAYS TAKEN
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
4a0c2: 2001 movel %d1,%d0 <== NOT EXECUTED
4a0c4: e488 lsrl #2,%d0 <== NOT EXECUTED
4a0c6: 143c 0001 moveb #1,%d2 <== NOT EXECUTED
4a0ca: c082 andl %d2,%d0 <== NOT EXECUTED
4a0cc: 6006 bras 4a0d4 <rtems_libio_to_fcntl_flags+0x2c><== 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;
4a0ce: 7002 moveq #2,%d0 <== NOT EXECUTED
4a0d0: 6002 bras 4a0d4 <rtems_libio_to_fcntl_flags+0x2c><== NOT EXECUTED
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
4a0d2: 4280 clrl %d0
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
4a0d4: 0801 0000 btst #0,%d1
4a0d8: 6704 beqs 4a0de <rtems_libio_to_fcntl_flags+0x36>
fcntl_flags |= O_NONBLOCK;
4a0da: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4a0de: 0801 0009 btst #9,%d1
4a0e2: 6704 beqs 4a0e8 <rtems_libio_to_fcntl_flags+0x40>
fcntl_flags |= O_APPEND;
4a0e4: 7408 moveq #8,%d2
4a0e6: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4a0e8: 0801 000a btst #10,%d1
4a0ec: 6704 beqs 4a0f2 <rtems_libio_to_fcntl_flags+0x4a>
fcntl_flags |= O_CREAT;
4a0ee: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4a0f2: 241f movel %sp@+,%d2
4a0f4: 4e5e unlk %fp <== NOT EXECUTED
0004327e <rtems_libio_use_global_env>:
void rtems_libio_use_global_env(void)
{
4327e: 4e56 0000 linkw %fp,#0
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) {
43282: 203c 0005 b3a8 movel #373672,%d0
43288: b0b9 0005 b3a4 cmpl 5b3a4 <rtems_current_user_env>,%d0
4328e: 672c beqs 432bc <rtems_libio_use_global_env+0x3e>
sc = rtems_task_variable_delete(
43290: 4879 0005 b3a4 pea 5b3a4 <rtems_current_user_env>
43296: 42a7 clrl %sp@-
43298: 4eb9 0004 4910 jsr 44910 <rtems_task_variable_delete>
RTEMS_SELF,
(void **) &rtems_current_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
4329e: 508f addql #8,%sp
432a0: 4a80 tstl %d0
432a2: 670c beqs 432b0 <rtems_libio_use_global_env+0x32><== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
432a4: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
432aa: 4eb9 0004 4ba0 jsr 44ba0 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
rtems_current_user_env = &rtems_global_user_env;
432b0: 203c 0005 b3a8 movel #373672,%d0
432b6: 23c0 0005 b3a4 movel %d0,5b3a4 <rtems_current_user_env>
}
}
432bc: 4e5e unlk %fp <== NOT EXECUTED
000462dc <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
462dc: 4e56 fffc linkw %fp,#-4
462e0: 2f03 movel %d3,%sp@-
462e2: 2f02 movel %d2,%sp@-
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
462e4: 486e fffc pea %fp@(-4)
462e8: 2f2e 0008 movel %fp@(8),%sp@-
462ec: 2f39 0006 1530 movel 61530 <RTEMS_Malloc_Heap>,%sp@-
462f2: 4eb9 0004 c0e8 jsr 4c0e8 <_Protected_heap_Get_block_size>
462f8: 4fef 000c lea %sp@(12),%sp
462fc: 4a00 tstb %d0
462fe: 671a beqs 4631a <rtems_malloc_statistics_at_free+0x3e><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
46300: 262e fffc movel %fp@(-4),%d3
46304: 4282 clrl %d2
46306: d7b9 0006 3514 addl %d3,63514 <rtems_malloc_statistics+0x28>
4630c: 2039 0006 3510 movel 63510 <rtems_malloc_statistics+0x24>,%d0
46312: d182 addxl %d2,%d0
46314: 23c0 0006 3510 movel %d0,63510 <rtems_malloc_statistics+0x24>
}
}
4631a: 242e fff4 movel %fp@(-12),%d2
4631e: 262e fff8 movel %fp@(-8),%d3
46322: 4e5e unlk %fp <== NOT EXECUTED
00046326 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
46326: 4e56 fffc linkw %fp,#-4
4632a: 202e 0008 movel %fp@(8),%d0
4632e: 2f03 movel %d3,%sp@-
uintptr_t actual_size = 0;
46330: 42ae fffc clrl %fp@(-4)
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
46334: 2f02 movel %d2,%sp@-
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
46336: 4a80 tstl %d0
46338: 674c beqs 46386 <rtems_malloc_statistics_at_malloc+0x60><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
4633a: 486e fffc pea %fp@(-4)
MSBUMP(lifetime_allocated, actual_size);
4633e: 4282 clrl %d2
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
46340: 2f00 movel %d0,%sp@-
46342: 2f39 0006 1530 movel 61530 <RTEMS_Malloc_Heap>,%sp@-
46348: 4eb9 0004 c0e8 jsr 4c0e8 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
4634e: 262e fffc movel %fp@(-4),%d3
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
46352: 4fef 000c lea %sp@(12),%sp
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
46356: 2039 0006 3508 movel 63508 <rtems_malloc_statistics+0x1c>,%d0
4635c: d6b9 0006 350c addl 6350c <rtems_malloc_statistics+0x20>,%d3
46362: d580 addxl %d0,%d2
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
46364: 2003 movel %d3,%d0
46366: 90b9 0006 3514 subl 63514 <rtems_malloc_statistics+0x28>,%d0
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
4636c: 23c2 0006 3508 movel %d2,63508 <rtems_malloc_statistics+0x1c>
46372: 23c3 0006 350c movel %d3,6350c <rtems_malloc_statistics+0x20>
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
46378: b0b9 0006 3504 cmpl 63504 <rtems_malloc_statistics+0x18>,%d0
4637e: 6306 blss 46386 <rtems_malloc_statistics_at_malloc+0x60>
s->max_depth = current_depth;
46380: 23c0 0006 3504 movel %d0,63504 <rtems_malloc_statistics+0x18>
}
46386: 242e fff4 movel %fp@(-12),%d2
4638a: 262e fff8 movel %fp@(-8),%d3
4638e: 4e5e unlk %fp <== NOT EXECUTED
0004dba8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
4dba8: 4e56 0000 linkw %fp,#0
4dbac: 2f0a movel %a2,%sp@-
4dbae: 246e 0008 moveal %fp@(8),%a2
4dbb2: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
4dbb4: 4a8a tstl %a2
4dbb6: 6604 bnes 4dbbc <rtems_memalign+0x14>
return EINVAL;
4dbb8: 7016 moveq #22,%d0
4dbba: 605a bras 4dc16 <rtems_memalign+0x6e>
*pointer = NULL;
4dbbc: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4dbbe: 7003 moveq #3,%d0
4dbc0: b0b9 0006 1690 cmpl 61690 <_System_state_Current>,%d0
4dbc6: 6726 beqs 4dbee <rtems_memalign+0x46>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4dbc8: 4eb9 0004 3ba2 jsr 43ba2 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
4dbce: 42a7 clrl %sp@-
4dbd0: 2f2e 000c movel %fp@(12),%sp@-
4dbd4: 2f2e 0010 movel %fp@(16),%sp@-
4dbd8: 2f39 0005 fca4 movel 5fca4 <RTEMS_Malloc_Heap>,%sp@-
4dbde: 4eb9 0004 8e5c jsr 48e5c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
4dbe4: 4fef 0010 lea %sp@(16),%sp
4dbe8: 2400 movel %d0,%d2
4dbea: 660e bnes 4dbfa <rtems_memalign+0x52>
4dbec: 6026 bras 4dc14 <rtems_memalign+0x6c>
/*
* 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() )
4dbee: 4eb9 0004 3b84 jsr 43b84 <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4dbf4: 4a00 tstb %d0
4dbf6: 67c0 beqs 4dbb8 <rtems_memalign+0x10> <== NEVER TAKEN
4dbf8: 60ce bras 4dbc8 <rtems_memalign+0x20>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
4dbfa: 2079 0006 0344 moveal 60344 <rtems_malloc_statistics_helpers>,%a0
4dc00: 4a88 tstl %a0
4dc02: 670a beqs 4dc0e <rtems_memalign+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
4dc04: 2f0a movel %a2,%sp@-
4dc06: 2068 0004 moveal %a0@(4),%a0
4dc0a: 4e90 jsr %a0@
4dc0c: 588f addql #4,%sp
*pointer = return_this;
4dc0e: 2482 movel %d2,%a2@
return 0;
4dc10: 4280 clrl %d0
4dc12: 6002 bras 4dc16 <rtems_memalign+0x6e>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
4dc14: 700c moveq #12,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4dc16: 242e fff8 movel %fp@(-8),%d2
4dc1a: 246e fffc moveal %fp@(-4),%a2
4dc1e: 4e5e unlk %fp
...
0004d564 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
4d564: 4e56 fff0 linkw %fp,#-16
4d568: 48d7 001c moveml %d2-%d4,%sp@
4d56c: 242e 000c movel %fp@(12),%d2
4d570: 262e 0010 movel %fp@(16),%d3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
4d574: 4a82 tstl %d2
4d576: 6762 beqs 4d5da <rtems_message_queue_receive+0x76><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !size )
4d578: 4a83 tstl %d3
4d57a: 675e beqs 4d5da <rtems_message_queue_receive+0x76><== NEVER TAKEN
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
4d57c: 486e fffc pea %fp@(-4)
4d580: 2f2e 0008 movel %fp@(8),%sp@-
4d584: 4879 0006 65d8 pea 665d8 <_Message_queue_Information>
4d58a: 4eb9 0004 f600 jsr 4f600 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
4d590: 4fef 000c lea %sp@(12),%sp
4d594: 4aae fffc tstl %fp@(-4)
4d598: 6644 bnes 4d5de <rtems_message_queue_receive+0x7a>
4d59a: 222e 0014 movel %fp@(20),%d1
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
4d59e: 7801 moveq #1,%d4
4d5a0: 4681 notl %d1
4d5a2: 2040 moveal %d0,%a0
4d5a4: 2f2e 0018 movel %fp@(24),%sp@-
4d5a8: c881 andl %d1,%d4
4d5aa: 2f04 movel %d4,%sp@-
4d5ac: 2f03 movel %d3,%sp@-
4d5ae: 2f02 movel %d2,%sp@-
4d5b0: 2f28 0008 movel %a0@(8),%sp@-
4d5b4: 4868 0014 pea %a0@(20)
4d5b8: 4eb9 0004 e7c4 jsr 4e7c4 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
4d5be: 4eb9 0005 02cc jsr 502cc <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
4d5c4: 2079 0006 6596 moveal 66596 <_Per_CPU_Information+0xe>,%a0
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
4d5ca: 2f28 0034 movel %a0@(52),%sp@-
4d5ce: 4eb9 0004 d664 jsr 4d664 <_Message_queue_Translate_core_message_queue_return_code>
4d5d4: 4fef 001c lea %sp@(28),%sp
4d5d8: 6006 bras 4d5e0 <rtems_message_queue_receive+0x7c>
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
4d5da: 7009 moveq #9,%d0
4d5dc: 6002 bras 4d5e0 <rtems_message_queue_receive+0x7c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4d5de: 7004 moveq #4,%d0
}
4d5e0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
4d5e6: 4e5e unlk %fp
...
000475e4 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
475e4: 4e56 ff90 linkw %fp,#-112
475e8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int success = 0;
char *dup_path = strdup(path);
475ec: 2f2e 0008 movel %fp@(8),%sp@-
475f0: 4eb9 0005 cd40 jsr 5cd40 <strdup>
if (dup_path != NULL) {
475f6: 588f addql #4,%sp
int
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
475f8: 2440 moveal %d0,%a2
if (dup_path != NULL) {
475fa: 4a80 tstl %d0
475fc: 6606 bnes 47604 <rtems_mkdir+0x20>
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
475fe: 70ff moveq #-1,%d0
47600: 6000 013e braw 47740 <rtems_mkdir+0x15c>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
47604: 722f moveq #47,%d1
47606: 1012 moveb %a2@,%d0
47608: 49c0 extbl %d0
4760a: b280 cmpl %d0,%d1
4760c: 6606 bnes 47614 <rtems_mkdir+0x30>
++p;
4760e: 47ea 0001 lea %a2@(1),%a3
47612: 6002 bras 47616 <rtems_mkdir+0x32>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
47614: 264a moveal %a2,%a3
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
47616: 2c0e movel %fp,%d6
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
47618: 7601 moveq #1,%d3
4761a: 4284 clrl %d4
4761c: 7201 moveq #1,%d1
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4761e: 2a3c 0004 69bc movel #289212,%d5
if (errno == EEXIST || errno == EISDIR) {
47624: 4bf9 0005 b09c lea 5b09c <__errno>,%a5
if (stat(path, &sb) < 0) {
4762a: 0686 ffff ffba addil #-70,%d6
47630: 2e3c 0004 774c movel #292684,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
47636: 49f9 0004 9a04 lea 49a04 <umask>,%a4
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
4763c: 1013 moveb %a3@,%d0
4763e: 670e beqs 4764e <rtems_mkdir+0x6a>
last = 1;
else if (p[0] != '/')
47640: 49c0 extbl %d0
47642: 742f moveq #47,%d2
47644: b480 cmpl %d0,%d2
47646: 6600 00be bnew 47706 <rtems_mkdir+0x122>
4764a: 4280 clrl %d0
4764c: 6002 bras 47650 <rtems_mkdir+0x6c>
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
4764e: 7001 moveq #1,%d0
else if (p[0] != '/')
continue;
*p = '\0';
47650: 4213 clrb %a3@
if (!last && p[1] == '\0')
47652: 4a80 tstl %d0
47654: 660c bnes 47662 <rtems_mkdir+0x7e>
47656: 4a2b 0001 tstb %a3@(1)
4765a: 57c2 seq %d2
4765c: 49c2 extbl %d2
4765e: 4482 negl %d2
47660: 6002 bras 47664 <rtems_mkdir+0x80>
47662: 7401 moveq #1,%d2
last = 1;
if (first) {
47664: 4a81 tstl %d1
47666: 6712 beqs 4767a <rtems_mkdir+0x96>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
47668: 42a7 clrl %sp@-
4766a: 4e94 jsr %a4@
4766c: 2800 movel %d0,%d4
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
4766e: 0280 ffff ff3f andil #-193,%d0
47674: 2f00 movel %d0,%sp@-
47676: 4e94 jsr %a4@
47678: 508f addql #8,%sp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4767a: 203c 0000 01ff movel #511,%d0
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
47680: 4a82 tstl %d2
47682: 670a beqs 4768e <rtems_mkdir+0xaa>
(void)umask(oumask);
47684: 2f04 movel %d4,%sp@-
47686: 4e94 jsr %a4@
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
47688: 202e 000c movel %fp@(12),%d0
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4768c: 588f addql #4,%sp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4768e: 2f00 movel %d0,%sp@-
47690: 2045 moveal %d5,%a0
47692: 2f0a movel %a2,%sp@-
47694: 4e90 jsr %a0@
47696: 508f addql #8,%sp
47698: 4a80 tstl %d0
4769a: 6c64 bges 47700 <rtems_mkdir+0x11c>
if (errno == EEXIST || errno == EISDIR) {
4769c: 4e95 jsr %a5@
4769e: 7211 moveq #17,%d1
476a0: 2040 moveal %d0,%a0
476a2: b290 cmpl %a0@,%d1
476a4: 6612 bnes 476b8 <rtems_mkdir+0xd4>
if (stat(path, &sb) < 0) {
476a6: 2f06 movel %d6,%sp@-
476a8: 2047 moveal %d7,%a0
476aa: 2f0a movel %a2,%sp@-
476ac: 4e90 jsr %a0@
476ae: 508f addql #8,%sp
476b0: 4a80 tstl %d0
476b2: 6c10 bges 476c4 <rtems_mkdir+0xe0> <== ALWAYS TAKEN
476b4: 6000 0084 braw 4773a <rtems_mkdir+0x156> <== NOT EXECUTED
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
476b8: 4e95 jsr %a5@
476ba: 7215 moveq #21,%d1
476bc: 2040 moveal %d0,%a0
476be: b290 cmpl %a0@,%d1
476c0: 67e4 beqs 476a6 <rtems_mkdir+0xc2> <== NEVER TAKEN
476c2: 6076 bras 4773a <rtems_mkdir+0x156>
if (stat(path, &sb) < 0) {
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
476c4: 202e ffc6 movel %fp@(-58),%d0
476c8: 0280 0000 f000 andil #61440,%d0
476ce: 0c80 0000 4000 cmpil #16384,%d0
476d4: 671e beqs 476f4 <rtems_mkdir+0x110>
476d6: 41f9 0005 b09c lea 5b09c <__errno>,%a0
if (last)
476dc: 4a82 tstl %d2
476de: 670a beqs 476ea <rtems_mkdir+0x106>
errno = EEXIST;
476e0: 4e90 jsr %a0@
476e2: 7211 moveq #17,%d1
476e4: 2040 moveal %d0,%a0
476e6: 2081 movel %d1,%a0@
476e8: 603a bras 47724 <rtems_mkdir+0x140>
else
errno = ENOTDIR;
476ea: 4e90 jsr %a0@
476ec: 2040 moveal %d0,%a0
476ee: 7014 moveq #20,%d0
476f0: 2080 movel %d0,%a0@
476f2: 6026 bras 4771a <rtems_mkdir+0x136>
retval = 0;
break;
}
if (last)
476f4: 4a82 tstl %d2
476f6: 6612 bnes 4770a <rtems_mkdir+0x126>
retval = 0;
break;
}
}
if (!last)
*p = '/';
476f8: 4280 clrl %d0
476fa: 16bc 002f moveb #47,%a3@
476fe: 600e bras 4770e <rtems_mkdir+0x12a>
} else {
retval = 0;
break;
}
}
if (!last)
47700: 4a82 tstl %d2
47702: 67f4 beqs 476f8 <rtems_mkdir+0x114>
47704: 6006 bras 4770c <rtems_mkdir+0x128>
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
47706: 4280 clrl %d0
47708: 6006 bras 47710 <rtems_mkdir+0x12c>
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
4770a: 7602 moveq #2,%d3
else
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
4770c: 7001 moveq #1,%d0
4770e: 4281 clrl %d1
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
47710: 528b addql #1,%a3
47712: 4a80 tstl %d0
47714: 6700 ff26 beqw 4763c <rtems_mkdir+0x58>
47718: 600c bras 47726 <rtems_mkdir+0x142>
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
4771a: 2f04 movel %d4,%sp@-
4771c: 4eb9 0004 9a04 jsr 49a04 <umask>
47722: 588f addql #4,%sp
47724: 4283 clrl %d3
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
47726: 2f0a movel %a2,%sp@-
47728: 4eb9 0004 6348 jsr 46348 <free>
}
return success != 0 ? 0 : -1;
4772e: 588f addql #4,%sp
47730: 4a83 tstl %d3
47732: 6700 feca beqw 475fe <rtems_mkdir+0x1a>
47736: 4280 clrl %d0
47738: 6006 bras 47740 <rtems_mkdir+0x15c>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
4773a: 4a82 tstl %d2
4773c: 67dc beqs 4771a <rtems_mkdir+0x136> <== NEVER TAKEN
4773e: 60e4 bras 47724 <rtems_mkdir+0x140>
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
}
47740: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5
47746: 4e5e unlk %fp
...
0006a8e0 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
6a8e0: 4e56 ffec linkw %fp,#-20
6a8e4: 48d7 041c moveml %d2-%d4/%a2,%sp@
6a8e8: 486e fffc pea %fp@(-4)
6a8ec: 282e 0008 movel %fp@(8),%d4
6a8f0: 2f04 movel %d4,%sp@-
6a8f2: 4879 0009 6570 pea 96570 <_Rate_monotonic_Information>
6a8f8: 242e 000c movel %fp@(12),%d2
6a8fc: 4eb9 0004 7820 jsr 47820 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
6a902: 4fef 000c lea %sp@(12),%sp
6a906: 2440 moveal %d0,%a2
6a908: 4aae fffc tstl %fp@(-4)
6a90c: 6600 0156 bnew 6aa64 <rtems_rate_monotonic_period+0x184>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
6a910: 2039 0009 63a2 movel 963a2 <_Per_CPU_Information+0xe>,%d0
6a916: b0aa 0040 cmpl %a2@(64),%d0
6a91a: 670c beqs 6a928 <rtems_rate_monotonic_period+0x48>
_Thread_Enable_dispatch();
6a91c: 4eb9 0004 83f0 jsr 483f0 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
6a922: 7417 moveq #23,%d2
6a924: 6000 0140 braw 6aa66 <rtems_rate_monotonic_period+0x186>
}
if ( length == RTEMS_PERIOD_STATUS ) {
6a928: 4a82 tstl %d2
6a92a: 6624 bnes 6a950 <rtems_rate_monotonic_period+0x70>
switch ( the_period->state ) {
6a92c: 202a 0038 movel %a2@(56),%d0
6a930: 7204 moveq #4,%d1
6a932: b280 cmpl %d0,%d1
6a934: 650e bcss 6a944 <rtems_rate_monotonic_period+0x64><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
6a936: 41f9 0008 fd14 lea 8fd14 <CSWTCH.24>,%a0
6a93c: 4282 clrl %d2
6a93e: 1430 0800 moveb %a0@(00000000,%d0:l),%d2
6a942: 6002 bras 6a946 <rtems_rate_monotonic_period+0x66>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
6a944: 4282 clrl %d2 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
6a946: 4eb9 0004 83f0 jsr 483f0 <_Thread_Enable_dispatch>
6a94c: 6000 0118 braw 6aa66 <rtems_rate_monotonic_period+0x186>
return( return_value );
}
_ISR_Disable( level );
6a950: 203c 0000 0700 movel #1792,%d0
6a956: 40c3 movew %sr,%d3
6a958: 8083 orl %d3,%d0
6a95a: 46c0 movew %d0,%sr
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
6a95c: 202a 0038 movel %a2@(56),%d0
6a960: 664a bnes 6a9ac <rtems_rate_monotonic_period+0xcc>
_ISR_Enable( level );
6a962: 46c3 movew %d3,%sr
the_period->next_length = length;
6a964: 2542 003c movel %d2,%a2@(60)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
6a968: 2f0a movel %a2,%sp@-
6a96a: 4eb9 0006 a85c jsr 6a85c <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
6a970: 7002 moveq #2,%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
6a972: 223c 0006 aa74 movel #436852,%d1
6a978: 2540 0038 movel %d0,%a2@(56)
6a97c: 2541 002c movel %d1,%a2@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
6a980: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine;
the_watchdog->id = id;
6a984: 2544 0030 movel %d4,%a2@(48)
the_watchdog->user_data = user_data;
6a988: 42aa 0034 clrl %a2@(52)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
6a98c: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
6a990: 486a 0010 pea %a2@(16)
6a994: 4879 0009 62c6 pea 962c6 <_Watchdog_Ticks_chain>
6a99a: 4eb9 0004 8e90 jsr 48e90 <_Watchdog_Insert>
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
6a9a0: 4eb9 0004 83f0 jsr 483f0 <_Thread_Enable_dispatch>
6a9a6: 4fef 000c lea %sp@(12),%sp
6a9aa: 606a bras 6aa16 <rtems_rate_monotonic_period+0x136>
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
6a9ac: 7202 moveq #2,%d1
6a9ae: b280 cmpl %d0,%d1
6a9b0: 6668 bnes 6aa1a <rtems_rate_monotonic_period+0x13a>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
6a9b2: 2f0a movel %a2,%sp@-
6a9b4: 4eba fde2 jsr %pc@(6a798 <_Rate_monotonic_Update_statistics>)
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
6a9b8: 7001 moveq #1,%d0
the_period->next_length = length;
6a9ba: 2542 003c movel %d2,%a2@(60)
/*
* 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;
6a9be: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
6a9c2: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
6a9c4: 2079 0009 63a2 moveal 963a2 <_Per_CPU_Information+0xe>,%a0
6a9ca: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
6a9d0: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
6a9d4: 2f08 movel %a0,%sp@-
6a9d6: 4eb9 0004 8b4c jsr 48b4c <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
6a9dc: 203c 0000 0700 movel #1792,%d0
6a9e2: 40c1 movew %sr,%d1
6a9e4: 8081 orl %d1,%d0
6a9e6: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
6a9e8: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
6a9ea: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
6a9ee: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
6a9f2: 46c1 movew %d1,%sr
/*
* 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 )
6a9f4: 7203 moveq #3,%d1
6a9f6: 4fef 000c lea %sp@(12),%sp
6a9fa: b280 cmpl %d0,%d1
6a9fc: 6612 bnes 6aa10 <rtems_rate_monotonic_period+0x130>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
6a9fe: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
6aa02: 2f39 0009 63a2 movel 963a2 <_Per_CPU_Information+0xe>,%sp@-
6aa08: 4eb9 0004 807c jsr 4807c <_Thread_Clear_state>
6aa0e: 508f addql #8,%sp
_Thread_Enable_dispatch();
6aa10: 4eb9 0004 83f0 jsr 483f0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
6aa16: 4282 clrl %d2
6aa18: 604c bras 6aa66 <rtems_rate_monotonic_period+0x186>
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
6aa1a: 7204 moveq #4,%d1
6aa1c: b280 cmpl %d0,%d1
6aa1e: 6644 bnes 6aa64 <rtems_rate_monotonic_period+0x184><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
6aa20: 2f0a movel %a2,%sp@-
6aa22: 4eba fd74 jsr %pc@(6a798 <_Rate_monotonic_Update_statistics>)
_ISR_Enable( level );
6aa26: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
6aa28: 7002 moveq #2,%d0
the_period->next_length = length;
6aa2a: 2542 003c movel %d2,%a2@(60)
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
6aa2e: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
6aa32: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
6aa36: 486a 0010 pea %a2@(16)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
6aa3a: 7406 moveq #6,%d2
6aa3c: 4879 0009 62c6 pea 962c6 <_Watchdog_Ticks_chain>
6aa42: 4eb9 0004 8e90 jsr 48e90 <_Watchdog_Insert>
6aa48: 2f2a 003c movel %a2@(60),%sp@-
6aa4c: 2f2a 0040 movel %a2@(64),%sp@-
6aa50: 2079 0009 1560 moveal 91560 <_Scheduler+0x34>,%a0
6aa56: 4e90 jsr %a0@
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();
6aa58: 4eb9 0004 83f0 jsr 483f0 <_Thread_Enable_dispatch>
6aa5e: 4fef 0014 lea %sp@(20),%sp
6aa62: 6002 bras 6aa66 <rtems_rate_monotonic_period+0x186>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
6aa64: 7404 moveq #4,%d2
}
6aa66: 2002 movel %d2,%d0
6aa68: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
6aa6e: 4e5e unlk %fp
...
000471d0 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
471d0: 4e56 ffec linkw %fp,#-20
471d4: 202e 000c movel %fp@(12),%d0
471d8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
471dc: 286e 0008 moveal %fp@(8),%a4
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
471e0: 2600 movel %d0,%d3
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
471e2: 242c 002e movel %a4@(46),%d2
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
471e6: 4c42 3001 remul %d2,%d1,%d3
if (excess > 0) {
471ea: 4a81 tstl %d1
471ec: 6700 0090 beqw 4727e <rtems_rbheap_allocate+0xae>
value += alignment - excess;
471f0: d480 addl %d0,%d2 <== NOT EXECUTED
471f2: 9481 subl %d1,%d2 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
471f4: 4a80 tstl %d0 <== NOT EXECUTED
471f6: 6606 bnes 471fe <rtems_rbheap_allocate+0x2e> <== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
471f8: 4280 clrl %d0
471fa: 6000 008a braw 47286 <rtems_rbheap_allocate+0xb6>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
471fe: b480 cmpl %d0,%d2 <== NOT EXECUTED
47200: 65f6 bcss 471f8 <rtems_rbheap_allocate+0x28> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
47202: 224c moveal %a4,%a1
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
47204: 95ca subal %a2,%a2
47206: 2059 moveal %a1@+,%a0
47208: 600a bras 47214 <rtems_rbheap_allocate+0x44>
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
4720a: b4a8 001c cmpl %a0@(28),%d2
4720e: 6202 bhis 47212 <rtems_rbheap_allocate+0x42>
47210: 2448 moveal %a0,%a2
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
47212: 2050 moveal %a0@,%a0
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
47214: b3c8 cmpal %a0,%a1
47216: 6606 bnes 4721e <rtems_rbheap_allocate+0x4e>
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
47218: 4a8a tstl %a2
4721a: 6606 bnes 47222 <rtems_rbheap_allocate+0x52>
4721c: 60da bras 471f8 <rtems_rbheap_allocate+0x28>
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
4721e: 4a8a tstl %a2
47220: 67e8 beqs 4720a <rtems_rbheap_allocate+0x3a> <== ALWAYS TAKEN
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
47222: 262a 001c movel %a2@(28),%d3
if (free_size > aligned_size) {
47226: b483 cmpl %d3,%d2
47228: 643c bccs 47266 <rtems_rbheap_allocate+0x96>
rtems_rbheap_chunk *new_chunk = get_chunk(control);
4722a: 2f0c movel %a4,%sp@-
4722c: 4eba fe50 jsr %pc@(4707e <get_chunk>)
if (new_chunk != NULL) {
47230: 588f addql #4,%sp
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
47232: 2640 moveal %d0,%a3
if (new_chunk != NULL) {
47234: 4a80 tstl %d0
47236: 67c0 beqs 471f8 <rtems_rbheap_allocate+0x28> <== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
47238: 9682 subl %d2,%d3
free_chunk->size = new_free_size;
4723a: 2543 001c movel %d3,%a2@(28)
new_chunk->begin = free_chunk->begin + new_free_size;
4723e: d6aa 0018 addl %a2@(24),%d3
new_chunk->size = aligned_size;
47242: 2742 001c movel %d2,%a3@(28)
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
47246: 2743 0018 movel %d3,%a3@(24)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
4724a: 42ab 0004 clrl %a3@(4)
4724e: 4293 clrl %a3@
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
47250: 486b 0008 pea %a3@(8)
47254: 486c 0018 pea %a4@(24)
47258: 4eb9 0004 893c jsr 4893c <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
4725e: 202b 0018 movel %a3@(24),%d0
47262: 508f addql #8,%sp
47264: 6020 bras 47286 <rtems_rbheap_allocate+0xb6>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
47266: 2252 moveal %a2@,%a1
previous = the_node->previous;
47268: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4726c: 2348 0004 movel %a0,%a1@(4)
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
47270: 202a 0018 movel %a2@(24),%d0
previous->next = next;
47274: 2089 movel %a1,%a0@
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
47276: 42aa 0004 clrl %a2@(4)
4727a: 4292 clrl %a2@
4727c: 6008 bras 47286 <rtems_rbheap_allocate+0xb6>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
4727e: 2400 movel %d0,%d2
47280: 6680 bnes 47202 <rtems_rbheap_allocate+0x32>
47282: 6000 ff74 braw 471f8 <rtems_rbheap_allocate+0x28>
}
}
}
return ptr;
}
47286: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4728c: 4e5e unlk %fp <== NOT EXECUTED
00047388 <rtems_rbheap_extend_descriptors_with_malloc>:
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
47388: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4738c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
4738e: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
{
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
47392: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
47396: 4eb9 0004 3294 jsr 43294 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
4739c: 588f addql #4,%sp <== NOT EXECUTED
4739e: 4a80 tstl %d0 <== NOT EXECUTED
473a0: 671a beqs 473bc <rtems_rbheap_extend_descriptors_with_malloc+0x34><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
473a2: 43ea 000c lea %a2@(12),%a1 <== NOT EXECUTED
473a6: 2040 moveal %d0,%a0 <== NOT EXECUTED
473a8: 2149 0004 movel %a1,%a0@(4) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
473ac: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED
after_node->next = the_node;
the_node->next = before_node;
473b0: 2240 moveal %d0,%a1 <== NOT EXECUTED
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
473b2: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
the_node->next = before_node;
before_node->previous = the_node;
473b6: 2140 0004 movel %d0,%a0@(4) <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
473ba: 2288 movel %a0,%a1@ <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
473bc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
473c0: 4e5e unlk %fp <== NOT EXECUTED
00047290 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
47290: 4e56 ffc8 linkw %fp,#-56
47294: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
47298: 266e 0008 moveal %fp@(8),%a3
4729c: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
472a0: 4a8a tstl %a2
472a2: 6700 00c8 beqw 4736c <rtems_rbheap_free+0xdc>
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
472a6: 4878 0020 pea 20 <OPER2+0xc>
return rtems_rbheap_chunk_of_node(
472aa: 260e movel %fp,%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
472ac: 49eb 0018 lea %a3@(24),%a4
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
472b0: 4282 clrl %d2
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
return rtems_rbheap_chunk_of_node(
472b2: 0683 ffff ffe8 addil #-24,%d3
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
472b8: 42a7 clrl %sp@-
472ba: 486e ffe0 pea %fp@(-32)
472be: 4eb9 0004 da40 jsr 4da40 <memset>
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
472c4: 4fef 000c lea %sp@(12),%sp
472c8: 2d4a fff8 movel %a2,%fp@(-8)
472cc: 246b 001c moveal %a3@(28),%a2
472d0: 6026 bras 472f8 <rtems_rbheap_free+0x68>
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
472d2: 2f0a movel %a2,%sp@-
472d4: 2f03 movel %d3,%sp@-
472d6: 206c 0010 moveal %a4@(16),%a0
472da: 4e90 jsr %a0@
if ( _RBTree_Is_equal( compare_result ) ) {
472dc: 508f addql #8,%sp
472de: 4a80 tstl %d0
472e0: 6608 bnes 472ea <rtems_rbheap_free+0x5a>
found = iter_node;
if ( the_rbtree->is_unique )
472e2: 4a2c 0014 tstb %a4@(20)
472e6: 6616 bnes 472fe <rtems_rbheap_free+0x6e> <== ALWAYS TAKEN
472e8: 240a movel %a2,%d2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
472ea: 4a80 tstl %d0
472ec: 5ec0 sgt %d0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
472ee: 7201 moveq #1,%d1
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
472f0: 49c0 extbl %d0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
472f2: 9280 subl %d0,%d1
472f4: 2472 1c00 moveal %a2@(00000000,%d1:l:4),%a2
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
472f8: 4a8a tstl %a2
472fa: 66d6 bnes 472d2 <rtems_rbheap_free+0x42>
472fc: 2442 moveal %d2,%a2
return rtems_rbheap_chunk_of_node(
472fe: 518a subql #8,%a2
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
47300: 70f8 moveq #-8,%d0
47302: b08a cmpl %a2,%d0
47304: 676a beqs 47370 <rtems_rbheap_free+0xe0>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
47306: 4a92 tstl %a2@
47308: 660c bnes 47316 <rtems_rbheap_free+0x86>
4730a: 4aaa 0004 tstl %a2@(4)
4730e: 57c0 seq %d0
47310: 49c0 extbl %d0
47312: 4480 negl %d0
47314: 6002 bras 47318 <rtems_rbheap_free+0x88>
47316: 4280 clrl %d0
if (!rtems_rbheap_is_chunk_free(chunk)) {
47318: 0800 0000 btst #0,%d0
4731c: 6756 beqs 47374 <rtems_rbheap_free+0xe4>
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
4731e: 42a7 clrl %sp@-
47320: 240a movel %a2,%d2
47322: 5082 addql #8,%d2
47324: 4bf9 0004 8b28 lea 48b28 <_RBTree_Next_unprotected>,%a5
4732a: 2f02 movel %d2,%sp@-
4732c: 4e95 jsr %a5@
4732e: 4878 0001 pea 1 <ADD>
47332: 2600 movel %d0,%d3
47334: 2f02 movel %d2,%sp@-
47336: 4e95 jsr %a5@
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
47338: 4bfa fcbe lea %pc@(46ff8 <check_and_merge>),%a5
4733c: 5180 subql #8,%d0
4733e: 2f00 movel %d0,%sp@-
47340: 2f0a movel %a2,%sp@-
47342: 2f0c movel %a4,%sp@-
47344: 2f0b movel %a3,%sp@-
47346: 4e95 jsr %a5@
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
47348: 2053 moveal %a3@,%a0
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
4734a: 4fef 0020 lea %sp@(32),%sp
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4734e: 254b 0004 movel %a3,%a2@(4)
before_node = after_node->next;
after_node->next = the_node;
47352: 268a movel %a2,%a3@
the_node->next = before_node;
before_node->previous = the_node;
47354: 214a 0004 movel %a2,%a0@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
47358: 2488 movel %a0,%a2@
4735a: 2043 moveal %d3,%a0
4735c: 4868 fff8 pea %a0@(-8)
47360: 2f0a movel %a2,%sp@-
47362: 2f0c movel %a4,%sp@-
47364: 2f0b movel %a3,%sp@-
47366: 4e95 jsr %a5@
47368: 4fef 0010 lea %sp@(16),%sp
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
4736c: 4280 clrl %d0
4736e: 6006 bras 47376 <rtems_rbheap_free+0xe6>
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
47370: 7004 moveq #4,%d0
47372: 6002 bras 47376 <rtems_rbheap_free+0xe6>
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
47374: 700e moveq #14,%d0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
47376: 4cee 3c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a5
4737c: 4e5e unlk %fp <== NOT EXECUTED
000510b8 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
510b8: 4e56 fffc linkw %fp,#-4
510bc: 2f03 movel %d3,%sp@-
510be: 262e 0010 movel %fp@(16),%d3
510c2: 2f02 movel %d2,%sp@-
510c4: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
510c8: 6768 beqs 51132 <rtems_region_get_segment_size+0x7a>
return RTEMS_INVALID_ADDRESS;
if ( !size )
510ca: 4a83 tstl %d3
510cc: 6764 beqs 51132 <rtems_region_get_segment_size+0x7a>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
510ce: 2f39 0007 60c6 movel 760c6 <_RTEMS_Allocator_Mutex>,%sp@-
510d4: 4eb9 0005 30fc jsr 530fc <_API_Mutex_Lock>
510da: 486e fffc pea %fp@(-4)
510de: 2f2e 0008 movel %fp@(8),%sp@-
510e2: 4879 0007 5f3c pea 75f3c <_Region_Information>
510e8: 4eb9 0005 4af8 jsr 54af8 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
510ee: 222e fffc movel %fp@(-4),%d1
510f2: 4fef 0010 lea %sp@(16),%sp
510f6: 6708 beqs 51100 <rtems_region_get_segment_size+0x48>
510f8: 7001 moveq #1,%d0
510fa: b081 cmpl %d1,%d0
510fc: 671e beqs 5111c <rtems_region_get_segment_size+0x64><== ALWAYS TAKEN
510fe: 6018 bras 51118 <rtems_region_get_segment_size+0x60><== NOT EXECUTED
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
51100: 2f03 movel %d3,%sp@-
51102: 2040 moveal %d0,%a0
51104: 2f02 movel %d2,%sp@-
51106: 4868 0068 pea %a0@(104)
5110a: 4eb9 0005 4540 jsr 54540 <_Heap_Size_of_alloc_area>
51110: 4fef 000c lea %sp@(12),%sp
51114: 4a00 tstb %d0
51116: 6708 beqs 51120 <rtems_region_get_segment_size+0x68><== NEVER TAKEN
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
51118: 4282 clrl %d2
5111a: 6006 bras 51122 <rtems_region_get_segment_size+0x6a>
case OBJECTS_REMOTE: /* this error cannot be returned */
break;
#endif
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
5111c: 7404 moveq #4,%d2
5111e: 6002 bras 51122 <rtems_region_get_segment_size+0x6a>
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
return_status = RTEMS_INVALID_ADDRESS;
51120: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
51122: 2f39 0007 60c6 movel 760c6 <_RTEMS_Allocator_Mutex>,%sp@-
51128: 4eb9 0005 315c jsr 5315c <_API_Mutex_Unlock>
5112e: 588f addql #4,%sp
51130: 6002 bras 51134 <rtems_region_get_segment_size+0x7c>
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
return RTEMS_INVALID_ADDRESS;
51132: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
51134: 2002 movel %d2,%d0
51136: 242e fff4 movel %fp@(-12),%d2
5113a: 262e fff8 movel %fp@(-8),%d3
5113e: 4e5e unlk %fp
...
000553e6 <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
553e6: 4e56 ffdc linkw %fp,#-36
553ea: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
553ee: 486e fffc pea %fp@(-4)
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
553f2: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_bitmap_map map;
size_t size;
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
553f6: 2f0a movel %a2,%sp@-
553f8: 4eba fb12 jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>)
if (rc > 0)
553fc: 508f addql #8,%sp
553fe: 4a80 tstl %d0
55400: 6e74 bgts 55476 <rtems_rfs_bitmap_create_search+0x90><== NEVER TAKEN
return rc;
control->free = 0;
55402: 42aa 0010 clrl %a2@(16)
search_map = control->search_bits;
55406: 266a 0014 moveal %a2@(20),%a3
size = control->size;
5540a: 242a 000c movel %a2@(12),%d2
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5540e: 76ff moveq #-1,%d3
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
55410: 4bf9 0005 5106 lea 55106 <rtems_rfs_bitmap_mask_section>,%a5
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
55416: 7801 moveq #1,%d4
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55418: 2683 movel %d3,%a3@
5541a: 286e fffc moveal %fp@(-4),%a4
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
5541e: 4283 clrl %d3
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
55420: 604e bras 55470 <rtems_rfs_bitmap_create_search+0x8a>
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
55422: 701f moveq #31,%d0
55424: b082 cmpl %d2,%d0
55426: 650e bcss 55436 <rtems_rfs_bitmap_create_search+0x50>
{
bits = rtems_rfs_bitmap_merge (*map,
55428: 2f02 movel %d2,%sp@-
5542a: 42a7 clrl %sp@-
5542c: 4e95 jsr %a5@
5542e: 508f addql #8,%sp
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
55430: 2042 moveal %d2,%a0
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
55432: c094 andl %a4@,%d0
55434: 6006 bras 5543c <rtems_rfs_bitmap_create_search+0x56>
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
55436: 2014 movel %a4@,%d0
available = rtems_rfs_bitmap_element_bits ();
55438: 307c 0020 moveaw #32,%a0
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
5543c: 4a80 tstl %d0
5543e: 660a bnes 5544a <rtems_rfs_bitmap_create_search+0x64>
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
55440: 9488 subl %a0,%d2
if (bit == rtems_rfs_bitmap_element_bits ())
55442: 7020 moveq #32,%d0
55444: b083 cmpl %d3,%d0
55446: 6624 bnes 5546c <rtems_rfs_bitmap_create_search+0x86><== ALWAYS TAKEN
55448: 6016 bras 55460 <rtems_rfs_bitmap_create_search+0x7a><== NOT EXECUTED
{
bits = *map;
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
5544a: 4281 clrl %d1
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5544c: 2a04 movel %d4,%d5
5544e: e3ad lsll %d1,%d5
55450: ca80 andl %d0,%d5
rtems_rfs_bitmap_set (*search_map, bit);
else
{
int b;
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
55452: 6704 beqs 55458 <rtems_rfs_bitmap_create_search+0x72>
control->free++;
55454: 52aa 0010 addql #1,%a2@(16)
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++)
55458: 5281 addql #1,%d1
5545a: b1c1 cmpal %d1,%a0
5545c: 6eee bgts 5544c <rtems_rfs_bitmap_create_search+0x66>
5545e: 60e0 bras 55440 <rtems_rfs_bitmap_create_search+0x5a>
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55460: 70ff moveq #-1,%d0 <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
55462: 4283 clrl %d3 <== NOT EXECUTED
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55464: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
55468: 588b addql #4,%a3 <== NOT EXECUTED
5546a: 6002 bras 5546e <rtems_rfs_bitmap_create_search+0x88><== NOT EXECUTED
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
5546c: 5283 addql #1,%d3
5546e: 588c addql #4,%a4
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
55470: 4a82 tstl %d2
55472: 66ae bnes 55422 <rtems_rfs_bitmap_create_search+0x3c>
else
bit++;
map++;
}
return 0;
55474: 4280 clrl %d0
}
55476: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5
5547c: 4e5e unlk %fp <== NOT EXECUTED
00054f0c <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)
{
54f0c: 4e56 0000 linkw %fp,#0
54f10: 2f0b movel %a3,%sp@-
54f12: 266e 000c moveal %fp@(12),%a3
54f16: 2f0a movel %a2,%sp@-
54f18: 246e 0008 moveal %fp@(8),%a2
int rc;
if (!control->buffer)
54f1c: 4a92 tstl %a2@
54f1e: 672a beqs 54f4a <rtems_rfs_bitmap_load_map+0x3e> <== NEVER TAKEN
return ENXIO;
*map = NULL;
54f20: 4293 clrl %a3@
rc = rtems_rfs_buffer_handle_request (control->fs,
54f22: 4878 0001 pea 1 <ADD>
54f26: 2f2a 0008 movel %a2@(8),%sp@-
54f2a: 2f12 movel %a2@,%sp@-
54f2c: 2f2a 0004 movel %a2@(4),%sp@-
54f30: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request>
control->buffer,
control->block,
true);
if (rc)
54f36: 4fef 0010 lea %sp@(16),%sp
54f3a: 4a80 tstl %d0
54f3c: 660e bnes 54f4c <rtems_rfs_bitmap_load_map+0x40> <== NEVER TAKEN
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
54f3e: 2052 moveal %a2@,%a0
54f40: 2068 0006 moveal %a0@(6),%a0
54f44: 26a8 001a movel %a0@(26),%a3@
54f48: 6002 bras 54f4c <rtems_rfs_bitmap_load_map+0x40>
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
return ENXIO;
54f4a: 7006 moveq #6,%d0 <== NOT EXECUTED
if (rc)
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
return 0;
}
54f4c: 246e fff8 moveal %fp@(-8),%a2
54f50: 266e fffc moveal %fp@(-4),%a3
54f54: 4e5e unlk %fp <== NOT EXECUTED
00055348 <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)
{
55348: 4e56 ffe8 linkw %fp,#-24
5534c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
55350: 266e 0010 moveal %fp@(16),%a3
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
55354: 4bfa fc02 lea %pc@(54f58 <rtems_rfs_search_map_for_clear_bit.constprop.1>),%a5
* seed up then from the seed down a window number of bits, then repeat the
* process from the window distance from the seed, again above then
* below. Keep moving out until all bits have been searched.
*/
upper_seed = seed;
lower_seed = seed;
55358: 242e 000c movel %fp@(12),%d2
* 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;
5535c: 2602 movel %d2,%d3
int
rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit seed,
bool* allocated,
rtems_rfs_bitmap_bit* bit)
{
5535e: 246e 0008 moveal %fp@(8),%a2
55362: 286e 0014 moveal %fp@(20),%a4
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
55366: 4213 clrb %a3@
* 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))
55368: 605c bras 553c6 <rtems_rfs_bitmap_map_alloc+0x7e>
|| ((lower_seed >= 0) && (lower_seed < control->size)))
{
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
5536a: b6aa 000c cmpl %a2@(12),%d3
5536e: 6506 bcss 55376 <rtems_rfs_bitmap_map_alloc+0x2e><== ALWAYS TAKEN
window, 1);
if ((rc > 0) || *allocated)
break;
}
if (lower_seed >= 0)
55370: 4a82 tstl %d2 <== NOT EXECUTED
55372: 6c26 bges 5539a <rtems_rfs_bitmap_map_alloc+0x52><== NOT EXECUTED
55374: 601c bras 55392 <rtems_rfs_bitmap_map_alloc+0x4a><== NOT EXECUTED
/*
* Search up first so bits allocated in succession are grouped together.
*/
if (upper_seed < control->size)
{
*bit = upper_seed;
55376: 2883 movel %d3,%a4@
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
55378: 4878 0001 pea 1 <ADD>
5537c: 2f0b movel %a3,%sp@-
5537e: 2f0c movel %a4,%sp@-
55380: 2f0a movel %a2,%sp@-
55382: 4e95 jsr %a5@
window, 1);
if ((rc > 0) || *allocated)
55384: 4fef 0010 lea %sp@(16),%sp
55388: 4a80 tstl %d0
5538a: 6e4e bgts 553da <rtems_rfs_bitmap_map_alloc+0x92><== NEVER TAKEN
5538c: 4a13 tstb %a3@
5538e: 67e0 beqs 55370 <rtems_rfs_bitmap_map_alloc+0x28><== NEVER TAKEN
55390: 6048 bras 553da <rtems_rfs_bitmap_map_alloc+0x92>
/*
* 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)
55392: b6aa 000c cmpl %a2@(12),%d3 <== NOT EXECUTED
55396: 651e bcss 553b6 <rtems_rfs_bitmap_map_alloc+0x6e><== NOT EXECUTED
55398: 6022 bras 553bc <rtems_rfs_bitmap_map_alloc+0x74><== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
5539a: 2882 movel %d2,%a4@ <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
5539c: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
553a0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
553a2: 2f0c movel %a4,%sp@- <== NOT EXECUTED
553a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
553a6: 4e95 jsr %a5@ <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
553a8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
553ac: 4a80 tstl %d0 <== NOT EXECUTED
553ae: 6e2a bgts 553da <rtems_rfs_bitmap_map_alloc+0x92><== NOT EXECUTED
553b0: 4a13 tstb %a3@ <== NOT EXECUTED
553b2: 67de beqs 55392 <rtems_rfs_bitmap_map_alloc+0x4a><== NOT EXECUTED
553b4: 6024 bras 553da <rtems_rfs_bitmap_map_alloc+0x92><== NOT EXECUTED
/*
* Do not bound the limits at the edges of the map. Do not update if an
* edge has been passed.
*/
if (upper_seed < control->size)
upper_seed += window;
553b6: 0683 0000 0800 addil #2048,%d3 <== NOT EXECUTED
if (lower_seed >= 0)
553bc: 4a82 tstl %d2 <== NOT EXECUTED
553be: 6d06 blts 553c6 <rtems_rfs_bitmap_map_alloc+0x7e><== NOT EXECUTED
lower_seed -= window;
553c0: 0682 ffff f800 addil #-2048,%d2 <== NOT EXECUTED
* 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))
553c6: 4a83 tstl %d3
553c8: 6d06 blts 553d0 <rtems_rfs_bitmap_map_alloc+0x88><== NEVER TAKEN
553ca: b6aa 000c cmpl %a2@(12),%d3
553ce: 659a bcss 5536a <rtems_rfs_bitmap_map_alloc+0x22><== ALWAYS TAKEN
|| ((lower_seed >= 0) && (lower_seed < control->size)))
553d0: 4a82 tstl %d2 <== NOT EXECUTED
553d2: 6d06 blts 553da <rtems_rfs_bitmap_map_alloc+0x92><== NOT EXECUTED
553d4: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
553d8: 6590 bcss 5536a <rtems_rfs_bitmap_map_alloc+0x22><== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
553da: 4280 clrl %d0
553dc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
553e2: 4e5e unlk %fp <== NOT EXECUTED
000551aa <rtems_rfs_bitmap_map_clear>:
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
551aa: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
551ae: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
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);
551b2: 486e fffc pea %fp@(-4) <== NOT EXECUTED
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
551b6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
551ba: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
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);
551be: 2f0a movel %a2,%sp@- <== NOT EXECUTED
551c0: 4eba fd4a jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
551c4: 508f addql #8,%sp <== NOT EXECUTED
551c6: 4a80 tstl %d0 <== NOT EXECUTED
551c8: 6e42 bgts 5520c <rtems_rfs_bitmap_map_clear+0x62><== NOT EXECUTED
return rc;
if (bit >= control->size)
551ca: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
551ce: 643a bccs 5520a <rtems_rfs_bitmap_map_clear+0x60><== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
551d0: 2202 movel %d2,%d1 <== NOT EXECUTED
551d2: ea81 asrl #5,%d1 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
551d4: 2001 movel %d1,%d0 <== NOT EXECUTED
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
551d6: 761f moveq #31,%d3 <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
551d8: e588 lsll #2,%d0 <== NOT EXECUTED
551da: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED
551de: d3c0 addal %d0,%a1 <== NOT EXECUTED
551e0: 7001 moveq #1,%d0 <== NOT EXECUTED
551e2: 2800 movel %d0,%d4 <== NOT EXECUTED
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
551e4: c682 andl %d2,%d3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
551e6: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
551ea: e7ac lsll %d3,%d4 <== NOT EXECUTED
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
551ec: 760a moveq #10,%d3 <== NOT EXECUTED
551ee: e6a2 asrl %d3,%d2 <== NOT EXECUTED
*/
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);
551f0: 8991 orl %d4,%a1@ <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset(bit);
551f2: 781f moveq #31,%d4 <== NOT EXECUTED
551f4: c284 andl %d4,%d1 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
551f6: e3a8 lsll %d1,%d0 <== NOT EXECUTED
*/
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);
551f8: 81b0 2c00 orl %d0,%a0@(00000000,%d2:l:4) <== NOT EXECUTED
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);
551fc: 2052 moveal %a2@,%a0 <== NOT EXECUTED
control->free++;
return 0;
551fe: 4280 clrl %d0 <== NOT EXECUTED
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);
55200: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
control->free++;
55204: 52aa 0010 addql #1,%a2@(16) <== NOT EXECUTED
55208: 6002 bras 5520c <rtems_rfs_bitmap_map_clear+0x62><== NOT EXECUTED
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
5520a: 7016 moveq #22,%d0 <== NOT EXECUTED
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;
}
5520c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED
55212: 4e5e unlk %fp <== NOT EXECUTED
000552ca <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
552ca: 4e56 fff0 linkw %fp,#-16
552ce: 48d7 040c moveml %d2-%d3/%a2,%sp@
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
552d2: 486e fffc pea %fp@(-4)
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
552d6: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
552da: 2f0a movel %a2,%sp@-
552dc: 4eba fc2e jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>)
if (rc > 0)
552e0: 508f addql #8,%sp
552e2: 4a80 tstl %d0
552e4: 6e58 bgts 5533e <rtems_rfs_bitmap_map_clear_all+0x74><== NEVER TAKEN
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
552e6: 202a 000c movel %a2@(12),%d0
552ea: 5380 subql #1,%d0
552ec: ea88 lsrl #5,%d0
552ee: 2200 movel %d0,%d1
552f0: 5281 addql #1,%d1
control->free = elements;
for (e = 0; e < elements; e++)
552f2: 91c8 subal %a0,%a0
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
552f4: 2541 0010 movel %d1,%a2@(16)
552f8: 226e fffc moveal %fp@(-4),%a1
for (e = 0; e < elements; e++)
552fc: 6006 bras 55304 <rtems_rfs_bitmap_map_clear_all+0x3a>
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
552fe: 74ff moveq #-1,%d2
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
55300: 5288 addql #1,%a0
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55302: 22c2 movel %d2,%a1@+
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
55304: b288 cmpl %a0,%d1
55306: 62f6 bhis 552fe <rtems_rfs_bitmap_map_clear_all+0x34>
/*
* Set the un-mapped bits in the last search element so the available logic
* works.
*/
last_search_bit = rtems_rfs_bitmap_map_offset (elements);
55308: 741f moveq #31,%d2
5530a: c282 andl %d2,%d1
if (last_search_bit == 0)
5530c: 6604 bnes 55312 <rtems_rfs_bitmap_map_clear_all+0x48>
last_search_bit = rtems_rfs_bitmap_element_bits ();
5530e: 123c 0020 moveb #32,%d1
elements = rtems_rfs_bitmap_elements (elements);
55312: 2400 movel %d0,%d2
55314: ea8a lsrl #5,%d2
for (e = 0; e < (elements - 1); e++)
55316: 4280 clrl %d0
55318: 6008 bras 55322 <rtems_rfs_bitmap_map_clear_all+0x58>
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
5531a: 76ff moveq #-1,%d3 <== NOT EXECUTED
5531c: 2183 0c00 movel %d3,%a0@(00000000,%d0:l:4) <== 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++)
55320: 5280 addql #1,%d0 <== NOT EXECUTED
55322: 206a 0014 moveal %a2@(20),%a0
55326: b480 cmpl %d0,%d2
55328: 66f0 bnes 5531a <rtems_rfs_bitmap_map_clear_all+0x50><== NEVER TAKEN
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
5532a: 7420 moveq #32,%d2
5532c: 9481 subl %d1,%d2
5532e: 72ff moveq #-1,%d1
55330: e4a9 lsrl %d2,%d1
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] =
55332: 2181 0c00 movel %d1,%a0@(00000000,%d0:l:4)
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask (last_search_bit));
rtems_rfs_buffer_mark_dirty (control->buffer);
return 0;
55336: 4280 clrl %d0
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);
55338: 2052 moveal %a2@,%a0
5533a: 10bc 0001 moveb #1,%a0@
return 0;
}
5533e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
55344: 4e5e unlk %fp <== NOT EXECUTED
0005512e <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
5512e: 4e56 ffec linkw %fp,#-20
55132: 48d7 041c moveml %d2-%d4/%a2,%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);
55136: 486e fffc pea %fp@(-4)
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
5513a: 246e 0008 moveal %fp@(8),%a2
5513e: 242e 000c movel %fp@(12),%d2
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);
55142: 2f0a movel %a2,%sp@-
55144: 4eba fdc6 jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>)
if (rc > 0)
55148: 508f addql #8,%sp
5514a: 4a80 tstl %d0
5514c: 6e52 bgts 551a0 <rtems_rfs_bitmap_map_set+0x72> <== NEVER TAKEN
return rc;
if (bit >= control->size)
5514e: b4aa 000c cmpl %a2@(12),%d2
55152: 6446 bccs 5519a <rtems_rfs_bitmap_map_set+0x6c> <== NEVER TAKEN
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
55154: 2602 movel %d2,%d3
55156: ea83 asrl #5,%d3
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
55158: 2003 movel %d3,%d0
5515a: 7201 moveq #1,%d1
5515c: 2801 movel %d1,%d4
5515e: e588 lsll #2,%d0
55160: 226e fffc moveal %fp@(-4),%a1
55164: d3c0 addal %d0,%a1
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
55166: 701f moveq #31,%d0
55168: c082 andl %d2,%d0
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
search_map = control->search_bits;
5516a: 206a 0014 moveal %a2@(20),%a0
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
5516e: e1ac lsll %d0,%d4
55170: 2004 movel %d4,%d0
*/
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);
55172: 4680 notl %d0
55174: c091 andl %a1@,%d0
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);
55176: 2280 movel %d0,%a1@
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
55178: 6624 bnes 5519e <rtems_rfs_bitmap_map_set+0x70> <== ALWAYS TAKEN
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
5517a: 781f moveq #31,%d4 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
5517c: 103c 000a moveb #10,%d0 <== NOT EXECUTED
55180: e0a2 asrl %d0,%d2 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
55182: 2001 movel %d1,%d0 <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
55184: c684 andl %d4,%d3 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
55186: e7a8 lsll %d3,%d0 <== 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);
55188: 4680 notl %d0 <== NOT EXECUTED
5518a: c1b0 2c00 andl %d0,%a0@(00000000,%d2:l:4) <== 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--;
rtems_rfs_buffer_mark_dirty (control->buffer);
5518e: 2052 moveal %a2@,%a0 <== 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--;
55190: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
55194: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
55198: 6004 bras 5519e <rtems_rfs_bitmap_map_set+0x70> <== NOT EXECUTED
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
5519a: 7016 moveq #22,%d0 <== NOT EXECUTED
5519c: 6002 bras 551a0 <rtems_rfs_bitmap_map_set+0x72> <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
control->free--;
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
5519e: 4280 clrl %d0
}
551a0: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
551a6: 4e5e unlk %fp <== NOT EXECUTED
00055268 <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
55268: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
5526c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5526e: 486e fffc pea %fp@(-4) <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
55272: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
55276: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55278: 4eba fc92 jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
5527c: 508f addql #8,%sp <== NOT EXECUTED
5527e: 4a80 tstl %d0 <== NOT EXECUTED
55280: 6e40 bgts 552c2 <rtems_rfs_bitmap_map_set_all+0x5a><== NOT EXECUTED
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
55282: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED
55286: 5380 subql #1,%d0 <== NOT EXECUTED
55288: ea88 lsrl #5,%d0 <== NOT EXECUTED
5528a: 2240 moveal %d0,%a1 <== NOT EXECUTED
5528c: 5289 addql #1,%a1 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
5528e: 4281 clrl %d1 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
55290: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
55294: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
for (e = 0; e < elements; e++)
55298: 6004 bras 5529e <rtems_rfs_bitmap_map_set_all+0x36><== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
5529a: 4298 clrl %a0@+ <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
5529c: 5281 addql #1,%d1 <== NOT EXECUTED
5529e: b3c1 cmpal %d1,%a1 <== NOT EXECUTED
552a0: 62f8 bhis 5529a <rtems_rfs_bitmap_map_set_all+0x32><== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
552a2: ea88 lsrl #5,%d0 <== NOT EXECUTED
552a4: 2200 movel %d0,%d1 <== NOT EXECUTED
552a6: 5281 addql #1,%d1 <== NOT EXECUTED
for (e = 0; e < elements; e++)
552a8: 4280 clrl %d0 <== NOT EXECUTED
552aa: 600a bras 552b6 <rtems_rfs_bitmap_map_set_all+0x4e><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
552ac: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED
552b0: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) <== 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++)
552b4: 5280 addql #1,%d0 <== NOT EXECUTED
552b6: b280 cmpl %d0,%d1 <== NOT EXECUTED
552b8: 62f2 bhis 552ac <rtems_rfs_bitmap_map_set_all+0x44><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
552ba: 2052 moveal %a2@,%a0 <== NOT EXECUTED
return 0;
552bc: 4280 clrl %d0 <== 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);
552be: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
return 0;
}
552c2: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
552c6: 4e5e unlk %fp <== NOT EXECUTED
00055216 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
55216: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
5521a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5521c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
55220: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
55222: 486e fffc pea %fp@(-4) <== NOT EXECUTED
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
55226: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
5522a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5522c: 4eba fcde jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
55230: 508f addql #8,%sp <== NOT EXECUTED
55232: 4a80 tstl %d0 <== NOT EXECUTED
55234: 6e26 bgts 5525c <rtems_rfs_bitmap_map_test+0x46> <== NOT EXECUTED
return rc;
if (bit >= control->size)
55236: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
5523a: 641e bccs 5525a <rtems_rfs_bitmap_map_test+0x44> <== 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);
5523c: 7001 moveq #1,%d0 <== 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);
5523e: 2202 movel %d2,%d1 <== NOT EXECUTED
55240: ea81 asrl #5,%d1 <== 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);
55242: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55246: e5a8 lsll %d2,%d0 <== NOT EXECUTED
55248: c0b0 1c00 andl %a0@(00000000,%d1:l:4),%d0 <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
5524c: 206e 0010 moveal %fp@(16),%a0 <== 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);
55250: 57c0 seq %d0 <== NOT EXECUTED
55252: 4480 negl %d0 <== NOT EXECUTED
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
55254: 1080 moveb %d0,%a0@ <== NOT EXECUTED
return 0;
55256: 4280 clrl %d0 <== NOT EXECUTED
55258: 6002 bras 5525c <rtems_rfs_bitmap_map_test+0x46> <== NOT EXECUTED
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
if (bit >= control->size)
return EINVAL;
5525a: 7016 moveq #22,%d0 <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
5525c: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
55260: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
55264: 4e5e unlk %fp <== NOT EXECUTED
000550f4 <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);
550f4: 7220 moveq #32,%d1 <== NOT EXECUTED
return mask;
}
550f6: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
550f8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_bitmap_element mask = RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK;
mask >>= (rtems_rfs_bitmap_element_bits () - size);
550fc: 92ae 0008 subl %fp@(8),%d1 <== NOT EXECUTED
return mask;
}
55100: 4e5e unlk %fp <== NOT EXECUTED
55102: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
00055106 <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
55106: 4e56 0000 linkw %fp,#0
5510a: 222e 0008 movel %fp@(8),%d1
5510e: 202e 000c movel %fp@(12),%d0
55112: 2f02 movel %d2,%sp@-
rtems_rfs_bitmap_element mask = 0;
if (end > start)
55114: b280 cmpl %d0,%d1
55116: 640e bccs 55126 <rtems_rfs_bitmap_mask_section+0x20><== NEVER TAKEN
mask = rtems_rfs_bitmap_mask (end - start) << start;
55118: 9081 subl %d1,%d0
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);
5511a: 7420 moveq #32,%d2
5511c: 9480 subl %d0,%d2
5511e: 70ff moveq #-1,%d0
55120: e4a8 lsrl %d2,%d0
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;
55122: e3a8 lsll %d1,%d0
55124: 6002 bras 55128 <rtems_rfs_bitmap_mask_section+0x22>
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
rtems_rfs_bitmap_element mask = 0;
55126: 4280 clrl %d0 <== NOT EXECUTED
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
return mask;
}
55128: 241f movel %sp@+,%d2
5512a: 4e5e unlk %fp <== NOT EXECUTED
00055480 <rtems_rfs_bitmap_open>:
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
55480: 720a moveq #10,%d1
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)
{
55482: 4e56 0000 linkw %fp,#0
55486: 202e 0014 movel %fp@(20),%d0
5548a: 2f0a movel %a2,%sp@-
5548c: 246e 0008 moveal %fp@(8),%a2
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
55490: 2540 000c movel %d0,%a2@(12)
rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* buffer,
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
55494: 5380 subql #1,%d0
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
55496: e2a8 lsrl %d1,%d0
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
55498: e588 lsll #2,%d0
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
5549a: 24ae 0010 movel %fp@(16),%a2@
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
5549e: 2040 moveal %d0,%a0
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
control->fs = fs;
554a0: 256e 000c 0004 movel %fp@(12),%a2@(4)
control->block = block;
554a6: 256e 0018 0008 movel %fp@(24),%a2@(8)
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
554ac: 4868 0004 pea %a0@(4)
554b0: 4eb9 0004 6910 jsr 46910 <malloc>
if (!control->search_bits)
554b6: 588f addql #4,%sp
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
554b8: 2540 0014 movel %d0,%a2@(20)
if (!control->search_bits)
554bc: 6710 beqs 554ce <rtems_rfs_bitmap_open+0x4e> <== NEVER TAKEN
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
554be: 2d4a 0008 movel %a2,%fp@(8)
}
554c2: 246e fffc moveal %fp@(-4),%a2
554c6: 4e5e unlk %fp
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
if (!control->search_bits)
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
554c8: 4ef9 0005 53e6 jmp 553e6 <rtems_rfs_bitmap_create_search>
}
554ce: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
554d2: 700c moveq #12,%d0 <== NOT EXECUTED
554d4: 4e5e unlk %fp <== NOT EXECUTED
00055618 <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)
{
55618: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
5561c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED
/*
* 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);
55620: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
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)
{
55624: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
55628: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
/*
* 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);
5562c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
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)
{
5562e: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
/*
* 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);
55632: 2f0c movel %a4,%sp@- <== NOT EXECUTED
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)
{
55634: 282e 0014 movel %fp@(20),%d4 <== NOT EXECUTED
/*
* 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);
55638: 2f0b movel %a3,%sp@- <== NOT EXECUTED
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)
{
5563a: 246e 0018 moveal %fp@(24),%a2 <== NOT EXECUTED
/*
* 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);
5563e: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
55644: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
55648: 4a80 tstl %d0 <== NOT EXECUTED
5564a: 6e78 bgts 556c4 <rtems_rfs_block_find_indirect+0xac><== NOT EXECUTED
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
5564c: 206c 0006 moveal %a4@(6),%a0 <== NOT EXECUTED
55650: 2204 movel %d4,%d1 <== NOT EXECUTED
55652: 4282 clrl %d2 <== NOT EXECUTED
55654: 4280 clrl %d0 <== NOT EXECUTED
55656: 7a18 moveq #24,%d5 <== NOT EXECUTED
55658: e589 lsll #2,%d1 <== NOT EXECUTED
5565a: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
5565e: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED
55662: 1030 1803 moveb %a0@(00000003,%d1:l),%d0 <== NOT EXECUTED
55666: ebaa lsll %d5,%d2 <== NOT EXECUTED
55668: 8082 orl %d2,%d0 <== NOT EXECUTED
5566a: 4282 clrl %d2 <== NOT EXECUTED
5566c: 1430 1801 moveb %a0@(00000001,%d1:l),%d2 <== NOT EXECUTED
55670: 1230 1802 moveb %a0@(00000002,%d1:l),%d1 <== NOT EXECUTED
55674: 4842 swap %d2 <== NOT EXECUTED
55676: 4242 clrw %d2 <== NOT EXECUTED
55678: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
5567e: 8082 orl %d2,%d0 <== NOT EXECUTED
55680: e189 lsll #8,%d1 <== NOT EXECUTED
55682: 8081 orl %d1,%d0 <== NOT EXECUTED
if ((*result + 1) == 0)
55684: 72ff moveq #-1,%d1 <== NOT EXECUTED
55686: b280 cmpl %d0,%d1 <== NOT EXECUTED
55688: 6704 beqs 5568e <rtems_rfs_block_find_indirect+0x76><== NOT EXECUTED
*/
rc = rtems_rfs_buffer_handle_request (fs, buffer, block, true);
if (rc > 0)
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
5568a: 2480 movel %d0,%a2@ <== NOT EXECUTED
5568c: 6002 bras 55690 <rtems_rfs_block_find_indirect+0x78><== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
5568e: 4292 clrl %a2@ <== NOT EXECUTED
if (*result >= rtems_rfs_fs_blocks (fs))
55690: 266b 0004 moveal %a3@(4),%a3 <== NOT EXECUTED
55694: b7d2 cmpal %a2@,%a3 <== NOT EXECUTED
55696: 622a bhis 556c2 <rtems_rfs_block_find_indirect+0xaa><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
55698: 4878 1000 pea 1000 <D_MAX_EXP+0x801> <== NOT EXECUTED
5569c: 42a7 clrl %sp@- <== NOT EXECUTED
5569e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
556a4: 508f addql #8,%sp <== NOT EXECUTED
556a6: 4a00 tstb %d0 <== NOT EXECUTED
556a8: 6716 beqs 556c0 <rtems_rfs_block_find_indirect+0xa8><== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
556aa: 2f04 movel %d4,%sp@- <== NOT EXECUTED
556ac: 2f03 movel %d3,%sp@- <== NOT EXECUTED
556ae: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
556b0: 4879 0006 cd77 pea 6cd77 <CSWTCH.2+0x37> <== NOT EXECUTED
556b6: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
556bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
556c0: 4292 clrl %a2@ <== NOT EXECUTED
*result = rtems_rfs_block_get_number (buffer, offset);
if ((*result + 1) == 0)
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
556c2: 4280 clrl %d0 <== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
556c4: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
556ca: 4e5e unlk %fp <== NOT EXECUTED
000557dc <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)
{
557dc: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
557e0: 48d7 043c moveml %d2-%d5/%a2,%sp@ <== NOT EXECUTED
557e4: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
557e8: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
557ec: 246e 0014 moveal %fp@(20),%a2 <== NOT EXECUTED
if (pos == 0)
557f0: 2002 movel %d2,%d0 <== NOT EXECUTED
557f2: 8083 orl %d3,%d0 <== NOT EXECUTED
557f4: 6608 bnes 557fe <rtems_rfs_block_get_block_size+0x22><== 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;
557f6: 4292 clrl %a2@ <== NOT EXECUTED
size->offset = 0;
557f8: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
557fc: 6036 bras 55834 <rtems_rfs_block_get_block_size+0x58><== NOT EXECUTED
rtems_rfs_block_set_size_zero (size);
else
{
size->count = pos / rtems_rfs_fs_block_size (fs) + 1;
557fe: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
55802: 4284 clrl %d4 <== NOT EXECUTED
55804: 2a28 0008 movel %a0@(8),%d5 <== NOT EXECUTED
55808: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5580a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5580c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5580e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
55810: 4eb9 0006 8bf0 jsr 68bf0 <__udivdi3> <== NOT EXECUTED
55816: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5581a: 5281 addql #1,%d1 <== NOT EXECUTED
5581c: 2481 movel %d1,%a2@ <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
5581e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
55820: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55822: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55824: 2f02 movel %d2,%sp@- <== NOT EXECUTED
55826: 4eb9 0006 8ff4 jsr 68ff4 <__umoddi3> <== NOT EXECUTED
5582c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
55830: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
}
}
55834: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED
5583a: 4e5e unlk %fp <== NOT EXECUTED
0005576c <rtems_rfs_block_get_bpos>:
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
5576c: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
55770: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
55774: 48d7 043c moveml %d2-%d5/%a2,%sp@ <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
55778: 2628 0008 movel %a0@(8),%d3 <== NOT EXECUTED
5577c: 4282 clrl %d2 <== NOT EXECUTED
5577e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
55780: 246e 0014 moveal %fp@(20),%a2 <== NOT EXECUTED
55784: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
55788: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
5578c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5578e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
55790: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55792: 4eb9 0006 8bf0 jsr 68bf0 <__udivdi3> <== NOT EXECUTED
55798: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5579c: 2481 movel %d1,%a2@ <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
5579e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
557a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
557a2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
557a4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
557a6: 4eb9 0006 8ff4 jsr 68ff4 <__umoddi3> <== NOT EXECUTED
557ac: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
557b0: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
}
557b4: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED
557ba: 4e5e unlk %fp <== NOT EXECUTED
000557be <rtems_rfs_block_get_pos>:
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
}
557be: 4280 clrl %d0 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
557c0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
557c4: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
557c8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
}
557cc: 4e5e unlk %fp <== NOT EXECUTED
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
557ce: 2229 0008 movel %a1@(8),%d1 <== NOT EXECUTED
557d2: 4c10 1800 mulsl %a0@,%d1 <== NOT EXECUTED
}
557d6: d2a8 0004 addl %a0@(4),%d1 <== NOT EXECUTED
0005583e <rtems_rfs_block_get_size>:
rtems_rfs_pos
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
5583e: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
55842: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
55846: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
5584a: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
5584e: 2810 movel %a0@,%d4 <== NOT EXECUTED
55850: 6730 beqs 55882 <rtems_rfs_block_get_size+0x44> <== NOT EXECUTED
return 0;
if (size->offset == 0)
55852: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED
55856: 4a88 tstl %a0 <== NOT EXECUTED
55858: 6604 bnes 5585e <rtems_rfs_block_get_size+0x20> <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
5585a: 2069 0008 moveal %a1@(8),%a0 <== NOT EXECUTED
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
5585e: 2229 0008 movel %a1@(8),%d1 <== NOT EXECUTED
55862: 4280 clrl %d0 <== NOT EXECUTED
return (((uint64_t) (size->count - 1)) * block_size) + offset;
55864: 5384 subql #1,%d4 <== NOT EXECUTED
55866: 2608 movel %a0,%d3 <== NOT EXECUTED
55868: 4282 clrl %d2 <== NOT EXECUTED
5586a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5586c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5586e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55870: 42a7 clrl %sp@- <== NOT EXECUTED
55872: 4eb9 0006 82f4 jsr 682f4 <__muldi3> <== NOT EXECUTED
55878: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5587c: d681 addl %d1,%d3 <== NOT EXECUTED
5587e: d580 addxl %d0,%d2 <== NOT EXECUTED
55880: 6004 bras 55886 <rtems_rfs_block_get_size+0x48> <== NOT EXECUTED
rtems_rfs_block_size* size)
{
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
return 0;
55882: 4282 clrl %d2 <== NOT EXECUTED
55884: 4283 clrl %d3 <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
}
55886: 2002 movel %d2,%d0 <== NOT EXECUTED
55888: 2203 movel %d3,%d1 <== NOT EXECUTED
5588a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED
55890: 4e5e unlk %fp <== NOT EXECUTED
00055a16 <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
55a16: 4e56 ffe8 linkw %fp,#-24
55a1a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
55a1e: 262e 0008 movel %fp@(8),%d3
55a22: 246e 000c moveal %fp@(12),%a2
int rc = 0;
int brc;
if (map->dirty && map->inode)
55a26: 4a12 tstb %a2@
55a28: 6700 0166 beqw 55b90 <rtems_rfs_block_map_close+0x17a>
55a2c: 202a 0002 movel %a2@(2),%d0
55a30: 6700 015e beqw 55b90 <rtems_rfs_block_map_close+0x17a>
{
brc = rtems_rfs_inode_load (fs, map->inode);
55a34: 2f00 movel %d0,%sp@-
55a36: 2f03 movel %d3,%sp@-
55a38: 4eb9 0004 ea4c jsr 4ea4c <rtems_rfs_inode_load>
if (brc > 0)
55a3e: 508f addql #8,%sp
55a40: 4a80 tstl %d0
55a42: 6e00 0150 bgtw 55b94 <rtems_rfs_block_map_close+0x17e>
55a46: 4281 clrl %d1
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]);
55a48: 2432 1c22 movel %a2@(00000022,%d1:l:4),%d2
* @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);
55a4c: 2001 movel %d1,%d0
55a4e: 5e80 addql #7,%d0
55a50: 2802 movel %d2,%d4
55a52: 7a18 moveq #24,%d5
55a54: eaac lsrl %d5,%d4
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
55a56: 5281 addql #1,%d1
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
55a58: 206a 0002 moveal %a2@(2),%a0
55a5c: e588 lsll #2,%d0
55a5e: 2268 000c moveal %a0@(12),%a1
55a62: 1384 0800 moveb %d4,%a1@(00000000,%d0:l)
55a66: 2802 movel %d2,%d4
55a68: 2268 000c moveal %a0@(12),%a1
55a6c: 4244 clrw %d4
55a6e: 4844 swap %d4
55a70: 1384 0801 moveb %d4,%a1@(00000001,%d0:l)
55a74: 2802 movel %d2,%d4
55a76: e08c lsrl #8,%d4
55a78: 2268 000c moveal %a0@(12),%a1
55a7c: 1384 0802 moveb %d4,%a1@(00000002,%d0:l)
55a80: 2268 000c moveal %a0@(12),%a1
55a84: 1382 0803 moveb %d2,%a1@(00000003,%d0:l)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
55a88: 7001 moveq #1,%d0
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
55a8a: 7405 moveq #5,%d2
55a8c: 1140 0010 moveb %d0,%a0@(16)
55a90: b481 cmpl %d1,%d2
55a92: 66b4 bnes 55a48 <rtems_rfs_block_map_close+0x32>
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
55a94: 206a 0002 moveal %a2@(2),%a0
* @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);
55a98: 143c 0018 moveb #24,%d2
55a9c: 202a 0006 movel %a2@(6),%d0
* @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);
55aa0: 2200 movel %d0,%d1
55aa2: eaa9 lsrl %d5,%d1
55aa4: 2268 000c moveal %a0@(12),%a1
55aa8: 1341 000c moveb %d1,%a1@(12)
55aac: 2200 movel %d0,%d1
55aae: 2268 000c moveal %a0@(12),%a1
55ab2: 4241 clrw %d1
55ab4: 4841 swap %d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
55ab6: 7a01 moveq #1,%d5
* @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);
55ab8: 1341 000d moveb %d1,%a1@(13)
55abc: 2200 movel %d0,%d1
55abe: e089 lsrl #8,%d1
55ac0: 2268 000c moveal %a0@(12),%a1
55ac4: 1341 000e moveb %d1,%a1@(14)
55ac8: 2268 000c moveal %a0@(12),%a1
55acc: 1340 000f moveb %d0,%a1@(15)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
55ad0: 1145 0010 moveb %d5,%a0@(16)
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
55ad4: 202a 000a movel %a2@(10),%d0
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);
55ad8: 206a 0002 moveal %a2@(2),%a0
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
55adc: 0280 0000 ffff andil #65535,%d0
*/
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);
55ae2: 2268 000c moveal %a0@(12),%a1
55ae6: 2200 movel %d0,%d1
55ae8: e089 lsrl #8,%d1
55aea: 1341 000a moveb %d1,%a1@(10)
55aee: 2268 000c moveal %a0@(12),%a1
55af2: 1340 000b moveb %d0,%a1@(11)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
55af6: 1145 0010 moveb %d5,%a0@(16)
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);
55afa: 206a 0002 moveal %a2@(2),%a0
55afe: 202a 001a movel %a2@(26),%d0
* @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);
55b02: 2200 movel %d0,%d1
55b04: e4a9 lsrl %d2,%d1
55b06: 2268 000c moveal %a0@(12),%a1
55b0a: 1341 0030 moveb %d1,%a1@(48)
55b0e: 2200 movel %d0,%d1
55b10: 2268 000c moveal %a0@(12),%a1
55b14: 4241 clrw %d1
55b16: 4841 swap %d1
55b18: 1341 0031 moveb %d1,%a1@(49)
55b1c: 2200 movel %d0,%d1
55b1e: e089 lsrl #8,%d1
55b20: 2268 000c moveal %a0@(12),%a1
55b24: 1341 0032 moveb %d1,%a1@(50)
55b28: 2268 000c moveal %a0@(12),%a1
55b2c: 1340 0033 moveb %d0,%a1@(51)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
55b30: 1145 0010 moveb %d5,%a0@(16)
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
55b34: 206a 0002 moveal %a2@(2),%a0
55b38: 202a 001e movel %a2@(30),%d0
* @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);
55b3c: 2200 movel %d0,%d1
55b3e: e4a9 lsrl %d2,%d1
55b40: 2268 000c moveal %a0@(12),%a1
55b44: 1341 0034 moveb %d1,%a1@(52)
55b48: 2200 movel %d0,%d1
55b4a: 2268 000c moveal %a0@(12),%a1
55b4e: 4241 clrw %d1
55b50: 4841 swap %d1
55b52: 1341 0035 moveb %d1,%a1@(53)
55b56: 2268 000c moveal %a0@(12),%a1
55b5a: 2200 movel %d0,%d1
55b5c: e089 lsrl #8,%d1
55b5e: 1341 0036 moveb %d1,%a1@(54)
55b62: 2268 000c moveal %a0@(12),%a1
55b66: 1340 0037 moveb %d0,%a1@(55)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
55b6a: 1145 0010 moveb %d5,%a0@(16)
brc = rtems_rfs_inode_unload (fs, map->inode, true);
55b6e: 4878 0001 pea 1 <ADD>
55b72: 2f2a 0002 movel %a2@(2),%sp@-
55b76: 2f03 movel %d3,%sp@-
55b78: 4eb9 0004 eba2 jsr 4eba2 <rtems_rfs_inode_unload>
55b7e: 4fef 000c lea %sp@(12),%sp
55b82: 2400 movel %d0,%d2
55b84: 4680 notl %d0
55b86: d080 addl %d0,%d0
55b88: 9180 subxl %d0,%d0
if (brc > 0)
rc = brc;
map->dirty = false;
55b8a: 4212 clrb %a2@
55b8c: c480 andl %d0,%d2
55b8e: 6006 bras 55b96 <rtems_rfs_block_map_close+0x180>
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
int rc = 0;
55b90: 4282 clrl %d2 <== NOT EXECUTED
55b92: 6002 bras 55b96 <rtems_rfs_block_map_close+0x180><== NOT EXECUTED
int brc;
if (map->dirty && map->inode)
{
brc = rtems_rfs_inode_load (fs, map->inode);
if (brc > 0)
55b94: 2400 movel %d0,%d2 <== NOT EXECUTED
map->dirty = false;
}
}
map->inode = NULL;
55b96: 42aa 0002 clrl %a2@(2)
*/
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);
55b9a: 486a 0036 pea %a2@(54)
55b9e: 47f9 0005 6434 lea 56434 <rtems_rfs_buffer_handle_release>,%a3
55ba4: 2f03 movel %d3,%sp@-
handle->dirty = false;
55ba6: 4205 clrb %d5
*/
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);
55ba8: 4e93 jsr %a3@
handle->dirty = false;
55baa: 1545 0036 moveb %d5,%a2@(54)
handle->bnum = 0;
55bae: 42aa 0038 clrl %a2@(56)
handle->buffer = NULL;
55bb2: 42aa 003c clrl %a2@(60)
*/
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);
55bb6: 486a 0040 pea %a2@(64)
55bba: 2f03 movel %d3,%sp@-
55bbc: 4e93 jsr %a3@
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
55bbe: 2002 movel %d2,%d0
handle->dirty = false;
55bc0: 1545 0040 moveb %d5,%a2@(64)
handle->bnum = 0;
55bc4: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
55bc8: 42aa 0046 clrl %a2@(70)
55bcc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
55bd2: 4e5e unlk %fp <== NOT EXECUTED
00055bd6 <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)
{
55bd6: 4e56 ffe0 linkw %fp,#-32
55bda: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
55bde: 266e 0014 moveal %fp@(20),%a3
55be2: 2a6e 0010 moveal %fp@(16),%a5
int rc = 0;
*block = 0;
55be6: 4293 clrl %a3@
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)
{
55be8: 286e 0008 moveal %fp@(8),%a4
55bec: 246e 000c moveal %fp@(12),%a2
*block = 0;
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
55bf0: 2015 movel %a5@,%d0
55bf2: 6708 beqs 55bfc <rtems_rfs_block_map_find+0x26> <== ALWAYS TAKEN
55bf4: 4aaa 0006 tstl %a2@(6) <== NOT EXECUTED
55bf8: 6700 00bc beqw 55cb6 <rtems_rfs_block_map_find+0xe0> <== NOT EXECUTED
55bfc: 222a 0006 movel %a2@(6),%d1
55c00: b280 cmpl %d0,%d1
55c02: 6300 00b2 blsw 55cb6 <rtems_rfs_block_map_find+0xe0>
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))
55c06: b0aa 000e cmpl %a2@(14),%d0 <== NOT EXECUTED
55c0a: 660e bnes 55c1a <rtems_rfs_block_map_find+0x44> <== NOT EXECUTED
55c0c: 206a 0016 moveal %a2@(22),%a0 <== NOT EXECUTED
55c10: 4a88 tstl %a0 <== NOT EXECUTED
55c12: 6706 beqs 55c1a <rtems_rfs_block_map_find+0x44> <== NOT EXECUTED
{
*block = map->bpos.block;
55c14: 2688 movel %a0,%a3@ <== NOT EXECUTED
55c16: 6000 0086 braw 55c9e <rtems_rfs_block_map_find+0xc8> <== NOT EXECUTED
/*
* 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)
55c1a: 7405 moveq #5,%d2 <== NOT EXECUTED
55c1c: b481 cmpl %d1,%d2 <== NOT EXECUTED
55c1e: 6506 bcss 55c26 <rtems_rfs_block_map_find+0x50> <== NOT EXECUTED
{
*block = map->blocks[bpos->bno];
55c20: 26b2 0c22 movel %a2@(00000022,%d0:l:4),%a3@ <== NOT EXECUTED
55c24: 6078 bras 55c9e <rtems_rfs_block_map_find+0xc8> <== NOT EXECUTED
* 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;
55c26: 242c 0034 movel %a4@(52),%d2 <== NOT EXECUTED
55c2a: 4c42 0003 remul %d2,%d3,%d0 <== NOT EXECUTED
55c2e: 4c42 0000 remul %d2,%d0,%d0 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
55c32: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
55c36: b2ac 0038 cmpl %a4@(56),%d1 <== NOT EXECUTED
55c3a: 6214 bhis 55c50 <rtems_rfs_block_map_find+0x7a> <== NOT EXECUTED
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
55c3c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55c3e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55c40: 2f32 0c22 movel %a2@(00000022,%d0:l:4),%sp@- <== NOT EXECUTED
55c44: 486a 0036 pea %a2@(54) <== NOT EXECUTED
55c48: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55c4a: 4eba f9cc jsr %pc@(55618 <rtems_rfs_block_find_indirect>)<== NOT EXECUTED
55c4e: 6046 bras 55c96 <rtems_rfs_block_map_find+0xc0> <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
55c50: 4c42 0004 remul %d2,%d4,%d0 <== NOT EXECUTED
55c54: 4c42 0000 remul %d2,%d0,%d0 <== NOT EXECUTED
55c58: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
55c5c: b2ac 003c cmpl %a4@(60),%d1 <== NOT EXECUTED
55c60: 6454 bccs 55cb6 <rtems_rfs_block_map_find+0xe0> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
55c62: 486e fffc pea %fp@(-4) <== NOT EXECUTED
55c66: 243c 0005 5618 movel #349720,%d2 <== NOT EXECUTED
55c6c: 2042 moveal %d2,%a0 <== NOT EXECUTED
55c6e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55c70: 2f32 0c22 movel %a2@(00000022,%d0:l:4),%sp@- <== NOT EXECUTED
55c74: 486a 0040 pea %a2@(64) <== NOT EXECUTED
55c78: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55c7a: 4e90 jsr %a0@ <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
55c7c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
55c80: 4a80 tstl %d0 <== NOT EXECUTED
55c82: 6616 bnes 55c9a <rtems_rfs_block_map_find+0xc4> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
55c84: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55c86: 2042 moveal %d2,%a0 <== NOT EXECUTED
55c88: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55c8a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
55c8e: 486a 0036 pea %a2@(54) <== NOT EXECUTED
55c92: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55c94: 4e90 jsr %a0@ <== NOT EXECUTED
55c96: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
}
}
}
if (rc == 0)
55c9a: 4a80 tstl %d0 <== NOT EXECUTED
55c9c: 661a bnes 55cb8 <rtems_rfs_block_map_find+0xe2> <== NOT EXECUTED
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
55c9e: 2555 000e movel %a5@,%a2@(14) <== NOT EXECUTED
map->bpos.block = *block;
55ca2: 4280 clrl %d0 <== NOT EXECUTED
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
55ca4: 256d 0004 0012 movel %a5@(4),%a2@(18) <== NOT EXECUTED
55caa: 256d 0008 0016 movel %a5@(8),%a2@(22) <== NOT EXECUTED
map->bpos.block = *block;
55cb0: 2553 0016 movel %a3@,%a2@(22) <== NOT EXECUTED
55cb4: 6002 bras 55cb8 <rtems_rfs_block_map_find+0xe2> <== NOT EXECUTED
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
return ENXIO;
55cb6: 7006 moveq #6,%d0
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
55cb8: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
55cbe: 4e5e unlk %fp <== NOT EXECUTED
000562b8 <rtems_rfs_block_map_free_all>:
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
562b8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
562bc: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
562c0: 2f28 0006 movel %a0@(6),%sp@- <== NOT EXECUTED
562c4: 2f08 movel %a0,%sp@- <== NOT EXECUTED
562c6: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
562ca: 4eb9 0005 6046 jsr 56046 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
}
562d0: 4e5e unlk %fp <== NOT EXECUTED
00055d72 <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)
{
55d72: 4e56 ffcc linkw %fp,#-52
55d76: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
55d7a: 4878 2000 pea 2000 <D_MAX_EXP+0x1801>
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)
{
55d7e: 246e 0008 moveal %fp@(8),%a2
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
55d82: 42a7 clrl %sp@-
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)
{
55d84: 2a6e 000c moveal %fp@(12),%a5
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
55d88: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
55d8e: 508f addql #8,%sp
55d90: 4a00 tstb %d0
55d92: 6718 beqs 55dac <rtems_rfs_block_map_grow+0x3a> <== ALWAYS TAKEN
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
55d94: 2f2d 0006 movel %a5@(6),%sp@- <== NOT EXECUTED
55d98: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
55d9c: 4879 0006 cdc2 pea 6cdc2 <CSWTCH.2+0x82> <== NOT EXECUTED
55da2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
55da8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
55dac: 202e 0010 movel %fp@(16),%d0
55db0: d0ad 0006 addl %a5@(6),%d0
55db4: b0aa 003c cmpl %a2@(60),%d0
55db8: 6400 027e bccw 56038 <rtems_rfs_block_map_grow+0x2c6>
55dbc: 6000 0250 braw 5600e <rtems_rfs_block_map_grow+0x29c>
/*
* 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,
55dc0: 486e fff8 pea %fp@(-8)
55dc4: 42a7 clrl %sp@-
55dc6: 2f2d 001e movel %a5@(30),%sp@-
55dca: 2f0a movel %a2,%sp@-
55dcc: 4e94 jsr %a4@
false, &block);
if (rc > 0)
55dce: 4fef 0010 lea %sp@(16),%sp
/*
* 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,
55dd2: 2e00 movel %d0,%d7
false, &block);
if (rc > 0)
55dd4: 6e00 0264 bgtw 5603a <rtems_rfs_block_map_grow+0x2c8>
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
55dd8: 202d 0006 movel %a5@(6),%d0
55ddc: 7204 moveq #4,%d1
55dde: b280 cmpl %d0,%d1
55de0: 650c bcss 55dee <rtems_rfs_block_map_grow+0x7c> <== NEVER TAKEN
map->blocks[map->size.count] = block;
55de2: 41ee fff8 lea %fp@(-8),%a0
55de6: 2b90 0c22 movel %a0@,%a5@(00000022,%d0:l:4)
55dea: 6000 0200 braw 55fec <rtems_rfs_block_map_grow+0x27a>
* 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;
55dee: 2e2a 0034 movel %a2@(52),%d7 <== NOT EXECUTED
55df2: 2200 movel %d0,%d1 <== NOT EXECUTED
55df4: 4c47 1004 remul %d7,%d4,%d1 <== NOT EXECUTED
55df8: 4c47 1001 remul %d7,%d1,%d1 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
if (map->size.count < fs->block_map_singly_blocks)
55dfc: b0aa 0038 cmpl %a2@(56),%d0 <== NOT EXECUTED
55e00: 643e bccs 55e40 <rtems_rfs_block_map_grow+0xce> <== NOT EXECUTED
* 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) ||
55e02: 4a84 tstl %d4 <== NOT EXECUTED
55e04: 670a beqs 55e10 <rtems_rfs_block_map_grow+0x9e> <== NOT EXECUTED
55e06: 4a81 tstl %d1 <== NOT EXECUTED
55e08: 662a bnes 55e34 <rtems_rfs_block_map_grow+0xc2> <== NOT EXECUTED
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
55e0a: 7a05 moveq #5,%d5 <== NOT EXECUTED
55e0c: ba84 cmpl %d4,%d5 <== NOT EXECUTED
55e0e: 6624 bnes 55e34 <rtems_rfs_block_map_grow+0xc2> <== NOT EXECUTED
{
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
55e10: 7e05 moveq #5,%d7 <== NOT EXECUTED
55e12: be80 cmpl %d0,%d7 <== NOT EXECUTED
55e14: 57c0 seq %d0 <== NOT EXECUTED
55e16: 49c0 extbl %d0 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
55e18: 4480 negl %d0 <== NOT EXECUTED
55e1a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
55e1c: 4875 1c22 pea %a5@(00000022,%d1:l:4) <== NOT EXECUTED
55e20: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55e22: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55e24: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55e26: 4eba f6c8 jsr %pc@(554f0 <rtems_rfs_block_map_indirect_alloc>)<== NOT EXECUTED
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
{
55e2a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
/*
* Upping is when we move from direct to singly indirect.
*/
bool upping;
upping = map->size.count == RTEMS_RFS_INODE_BLOCKS;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
55e2e: 2e00 movel %d0,%d7 <== NOT EXECUTED
* move the direct blocks into the table and if not this is the first
* entry of a new block.
*/
if ((direct == 0) ||
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
{
55e30: 6000 0158 braw 55f8a <rtems_rfs_block_map_grow+0x218> <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
55e34: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55e38: 2f35 1c22 movel %a5@(00000022,%d1:l:4),%sp@- <== NOT EXECUTED
55e3c: 6000 0140 braw 55f7e <rtems_rfs_block_map_grow+0x20c> <== 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;
55e40: 4c47 1005 remul %d7,%d5,%d1 <== NOT EXECUTED
55e44: 4c47 1001 remul %d7,%d1,%d1 <== 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)
55e48: 4a84 tstl %d4 <== NOT EXECUTED
55e4a: 6600 00de bnew 55f2a <rtems_rfs_block_map_grow+0x1b8> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
55e4e: 42a7 clrl %sp@- <== NOT EXECUTED
55e50: 486e fffc pea %fp@(-4) <== NOT EXECUTED
55e54: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55e56: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55e58: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED
55e5c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55e5e: 4eba f690 jsr %pc@(554f0 <rtems_rfs_block_map_indirect_alloc>)<== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
55e62: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED
* doubly indirect block as well. Both always occur when direct is 0
* and the doubly indirect block when singly is 0.
*/
if (direct == 0)
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
55e66: 2e00 movel %d0,%d7 <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
55e68: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
55e6c: 6f04 bles 55e72 <rtems_rfs_block_map_grow+0x100> <== NOT EXECUTED
55e6e: 6000 011e braw 55f8e <rtems_rfs_block_map_grow+0x21c> <== 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) ||
55e72: 4a85 tstl %d5 <== NOT EXECUTED
55e74: 670a beqs 55e80 <rtems_rfs_block_map_grow+0x10e> <== NOT EXECUTED
55e76: 4a81 tstl %d1 <== NOT EXECUTED
55e78: 662c bnes 55ea6 <rtems_rfs_block_map_grow+0x134> <== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
55e7a: 7005 moveq #5,%d0 <== NOT EXECUTED
55e7c: b085 cmpl %d5,%d0 <== NOT EXECUTED
55e7e: 6626 bnes 55ea6 <rtems_rfs_block_map_grow+0x134> <== NOT EXECUTED
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
55e80: 2e2a 0038 movel %a2@(56),%d7 <== NOT EXECUTED
55e84: bead 0006 cmpl %a5@(6),%d7 <== NOT EXECUTED
55e88: 57c0 seq %d0 <== NOT EXECUTED
55e8a: 49c0 extbl %d0 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
55e8c: 4480 negl %d0 <== NOT EXECUTED
55e8e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
55e90: 4875 1c22 pea %a5@(00000022,%d1:l:4) <== NOT EXECUTED
55e94: 2f06 movel %d6,%sp@- <== NOT EXECUTED
55e96: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55e98: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55e9a: 4eba f654 jsr %pc@(554f0 <rtems_rfs_block_map_indirect_alloc>)<== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
55e9e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
if ((singly == 0) ||
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
55ea2: 2e00 movel %d0,%d7 <== NOT EXECUTED
55ea4: 6014 bras 55eba <rtems_rfs_block_map_grow+0x148> <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
55ea6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55eaa: 2f35 1c22 movel %a5@(00000022,%d1:l:4),%sp@- <== NOT EXECUTED
55eae: 2f06 movel %d6,%sp@- <== NOT EXECUTED
55eb0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55eb2: 4e93 jsr %a3@ <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
55eb4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
55eb8: 2e00 movel %d0,%d7 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
55eba: 4a87 tstl %d7 <== NOT EXECUTED
55ebc: 6f22 bles 55ee0 <rtems_rfs_block_map_grow+0x16e> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
55ebe: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
55ec2: 47f9 0004 e846 lea 4e846 <rtems_rfs_group_bitmap_free>,%a3 <== NOT EXECUTED
55ec8: 42a7 clrl %sp@- <== NOT EXECUTED
55eca: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55ecc: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
55ece: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
55ed2: 42a7 clrl %sp@- <== NOT EXECUTED
55ed4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55ed6: 4e93 jsr %a3@ <== NOT EXECUTED
55ed8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
55edc: 6000 015c braw 5603a <rtems_rfs_block_map_grow+0x2c8> <== NOT EXECUTED
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
55ee0: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
55ee4: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
55ee8: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55eec: e58d lsll #2,%d5 <== NOT EXECUTED
55eee: 7001 moveq #1,%d0 <== NOT EXECUTED
55ef0: 1390 5800 moveb %a0@,%a1@(00000000,%d5:l) <== NOT EXECUTED
55ef4: 41ee fffd lea %fp@(-3),%a0 <== NOT EXECUTED
55ef8: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
55efc: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55f00: 1390 5801 moveb %a0@,%a1@(00000001,%d5:l) <== NOT EXECUTED
55f04: 41ee fffe lea %fp@(-2),%a0 <== NOT EXECUTED
55f08: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
55f0c: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55f10: 1390 5802 moveb %a0@,%a1@(00000002,%d5:l) <== NOT EXECUTED
55f14: 41ee ffff lea %fp@(-1),%a0 <== NOT EXECUTED
55f18: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
55f1c: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55f20: 1390 5803 moveb %a0@,%a1@(00000003,%d5:l) <== NOT EXECUTED
55f24: 1b40 0040 moveb %d0,%a5@(64) <== NOT EXECUTED
55f28: 607a bras 55fa4 <rtems_rfs_block_map_grow+0x232> <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
55f2a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55f2e: 2f35 1c22 movel %a5@(00000022,%d1:l:4),%sp@- <== NOT EXECUTED
55f32: 2f06 movel %d6,%sp@- <== NOT EXECUTED
55f34: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55f36: 4e93 jsr %a3@ <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
55f38: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
55f3c: 2e00 movel %d0,%d7 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
55f3e: 6f02 bles 55f42 <rtems_rfs_block_map_grow+0x1d0> <== NOT EXECUTED
55f40: 604c bras 55f8e <rtems_rfs_block_map_grow+0x21c> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
55f42: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
55f46: 4281 clrl %d1 <== NOT EXECUTED
55f48: 4280 clrl %d0 <== NOT EXECUTED
55f4a: 7e18 moveq #24,%d7 <== NOT EXECUTED
55f4c: e58d lsll #2,%d5 <== NOT EXECUTED
55f4e: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55f52: 1231 5800 moveb %a1@(00000000,%d5:l),%d1 <== NOT EXECUTED
55f56: 1031 5803 moveb %a1@(00000003,%d5:l),%d0 <== NOT EXECUTED
55f5a: efa9 lsll %d7,%d1 <== NOT EXECUTED
55f5c: 8081 orl %d1,%d0 <== NOT EXECUTED
55f5e: 4281 clrl %d1 <== NOT EXECUTED
55f60: 1231 5801 moveb %a1@(00000001,%d5:l),%d1 <== NOT EXECUTED
55f64: 4841 swap %d1 <== NOT EXECUTED
55f66: 4241 clrw %d1 <== NOT EXECUTED
55f68: 8081 orl %d1,%d0 <== NOT EXECUTED
55f6a: 4281 clrl %d1 <== NOT EXECUTED
55f6c: 1231 5802 moveb %a1@(00000002,%d5:l),%d1 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
55f70: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
55f74: e189 lsll #8,%d1 <== NOT EXECUTED
55f76: 8081 orl %d1,%d0 <== NOT EXECUTED
55f78: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
55f7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
55f7e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55f80: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55f82: 4e93 jsr %a3@ <== NOT EXECUTED
singly_block, true);
if (rc > 0)
55f84: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
55f88: 2e00 movel %d0,%d7 <== NOT EXECUTED
singly_block, true);
if (rc > 0)
55f8a: 4a87 tstl %d7 <== NOT EXECUTED
55f8c: 6f16 bles 55fa4 <rtems_rfs_block_map_grow+0x232> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
55f8e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
55f92: 42a7 clrl %sp@- <== NOT EXECUTED
55f94: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55f96: 4eb9 0004 e846 jsr 4e846 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
55f9c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55fa0: 6000 0098 braw 5603a <rtems_rfs_block_map_grow+0x2c8> <== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
55fa4: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
55fa8: 41ee fff8 lea %fp@(-8),%a0 <== NOT EXECUTED
55fac: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55fb0: e58c lsll #2,%d4 <== NOT EXECUTED
55fb2: 7001 moveq #1,%d0 <== NOT EXECUTED
55fb4: 1390 4800 moveb %a0@,%a1@(00000000,%d4:l) <== NOT EXECUTED
55fb8: 41ee fff9 lea %fp@(-7),%a0 <== NOT EXECUTED
55fbc: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
55fc0: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55fc4: 1390 4801 moveb %a0@,%a1@(00000001,%d4:l) <== NOT EXECUTED
55fc8: 41ee fffa lea %fp@(-6),%a0 <== NOT EXECUTED
55fcc: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
55fd0: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55fd4: 1390 4802 moveb %a0@,%a1@(00000002,%d4:l) <== NOT EXECUTED
55fd8: 41ee fffb lea %fp@(-5),%a0 <== NOT EXECUTED
55fdc: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
55fe0: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55fe4: 1390 4803 moveb %a0@,%a1@(00000003,%d4:l) <== NOT EXECUTED
55fe8: 1b40 0036 moveb %d0,%a5@(54) <== NOT EXECUTED
}
map->size.count++;
55fec: 52ad 0006 addql #1,%a5@(6)
map->size.offset = 0;
55ff0: 42ad 000a clrl %a5@(10)
if (b == 0)
55ff4: 4a82 tstl %d2
55ff6: 6608 bnes 56000 <rtems_rfs_block_map_grow+0x28e> <== NEVER TAKEN
*new_block = block;
55ff8: 206e 0014 moveal %fp@(20),%a0
55ffc: 20ae fff8 movel %fp@(-8),%a0@
/*
* 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++)
56000: 5282 addql #1,%d2
map->size.count++;
map->size.offset = 0;
if (b == 0)
*new_block = block;
map->last_data_block = block;
56002: 2b6e fff8 001e movel %fp@(-8),%a5@(30)
map->dirty = true;
56008: 1abc 0001 moveb #1,%a5@
5600c: 601e bras 5602c <rtems_rfs_block_map_grow+0x2ba>
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
5600e: 2c0d movel %a5,%d6
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56010: 260d movel %a5,%d3
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
56012: 4282 clrl %d2
/*
* 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,
56014: 49f9 0004 e6c8 lea 4e6c8 <rtems_rfs_group_bitmap_alloc>,%a4
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
5601a: 0686 0000 0040 addil #64,%d6
56020: 47f9 0005 65b0 lea 565b0 <rtems_rfs_buffer_handle_request>,%a3
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56026: 0683 0000 0036 addil #54,%d3
/*
* 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++)
5602c: b4ae 0010 cmpl %fp@(16),%d2
56030: 6600 fd8e bnew 55dc0 <rtems_rfs_block_map_grow+0x4e>
*new_block = block;
map->last_data_block = block;
map->dirty = true;
}
return 0;
56034: 4287 clrl %d7
56036: 6002 bras 5603a <rtems_rfs_block_map_grow+0x2c8>
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
blocks, map->size.count);
if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs))
return EFBIG;
56038: 7e1b moveq #27,%d7 <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
5603a: 2007 movel %d7,%d0
5603c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
56042: 4e5e unlk %fp <== NOT EXECUTED
000554f0 <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)
{
554f0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
554f4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED
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);
554f8: 486e fffc pea %fp@(-4) <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
554fc: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
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);
55500: 42a7 clrl %sp@- <== NOT EXECUTED
55502: 2f2b 001a movel %a3@(26),%sp@- <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
55506: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
5550a: 246e 0010 moveal %fp@(16),%a2 <== NOT EXECUTED
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);
5550e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no* block,
bool upping)
{
55510: 162e 001b moveb %fp@(27),%d3 <== NOT EXECUTED
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);
55514: 4eb9 0004 e6c8 jsr 4e6c8 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
if (rc > 0)
5551a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
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);
5551e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
55520: 6e00 00ea bgtw 5560c <rtems_rfs_block_map_indirect_alloc+0x11c><== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
55524: 42a7 clrl %sp@- <== NOT EXECUTED
55526: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
5552a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5552c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5552e: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
55534: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
* slots which are cleared when upping.
*/
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_map_block, false, &new_block);
if (rc > 0)
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
55538: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5553a: 6f16 bles 55552 <rtems_rfs_block_map_indirect_alloc+0x62><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
5553c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
55540: 42a7 clrl %sp@- <== NOT EXECUTED
55542: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55544: 4eb9 0004 e846 jsr 4e846 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
5554a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5554e: 6000 00bc braw 5560c <rtems_rfs_block_map_indirect_alloc+0x11c><== NOT EXECUTED
return rc;
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
55552: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
55556: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
5555a: 206a 0006 moveal %a2@(6),%a0 <== NOT EXECUTED
5555e: 2f28 001a movel %a0@(26),%sp@- <== NOT EXECUTED
55562: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
if (upping)
55568: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5556c: 4a03 tstb %d3 <== NOT EXECUTED
5556e: 6700 0088 beqw 555f8 <rtems_rfs_block_map_indirect_alloc+0x108><== NOT EXECUTED
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
55572: 4878 2000 pea 2000 <D_MAX_EXP+0x1801> <== NOT EXECUTED
55576: 42a7 clrl %sp@- <== NOT EXECUTED
55578: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5557e: 508f addql #8,%sp <== NOT EXECUTED
55580: 4a00 tstb %d0 <== NOT EXECUTED
55582: 6712 beqs 55596 <rtems_rfs_block_map_indirect_alloc+0xa6><== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
55584: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
55588: 4879 0006 cd43 pea 6cd43 <CSWTCH.2+0x3> <== NOT EXECUTED
5558e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
55594: 508f addql #8,%sp <== NOT EXECUTED
* @param block The block number of the indirect block allocated.
* @param upping True is upping the map to the next indirect level.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
55596: 41eb 0022 lea %a3@(34),%a0 <== NOT EXECUTED
5559a: 4280 clrl %d0 <== NOT EXECUTED
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]);
5559c: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
555a0: 4be8 0001 lea %a0@(1),%a5 <== NOT EXECUTED
* @param block The block number of the indirect block allocated.
* @param upping True is upping the map to the next indirect level.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_alloc (rtems_rfs_file_system* fs,
555a4: 2848 moveal %a0,%a4 <== NOT EXECUTED
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]);
555a6: 568c addql #3,%a4 <== NOT EXECUTED
555a8: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
555ac: 1390 0800 moveb %a0@,%a1@(00000000,%d0:l) <== NOT EXECUTED
555b0: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
555b4: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
555b8: 1395 0801 moveb %a5@,%a1@(00000001,%d0:l) <== NOT EXECUTED
555bc: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
555c0: 2218 movel %a0@+,%d1 <== NOT EXECUTED
555c2: e089 lsrl #8,%d1 <== NOT EXECUTED
555c4: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
555c8: 1381 0802 moveb %d1,%a1@(00000002,%d0:l) <== NOT EXECUTED
{
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++)
555cc: 7214 moveq #20,%d1 <== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
555ce: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
555d2: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
555d6: 1394 0803 moveb %a4@,%a1@(00000003,%d0:l) <== NOT EXECUTED
555da: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
555de: 5880 addql #4,%d0 <== NOT EXECUTED
{
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++)
555e0: b280 cmpl %d0,%d1 <== NOT EXECUTED
555e2: 66b8 bnes 5559c <rtems_rfs_block_map_indirect_alloc+0xac><== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
555e4: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
555e8: 42a7 clrl %sp@- <== NOT EXECUTED
555ea: 486b 0022 pea %a3@(34) <== NOT EXECUTED
555ee: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
555f4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
555f8: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
map->last_map_block = new_block;
return 0;
555fc: 4282 clrl %d2 <== NOT EXECUTED
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
555fe: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED
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);
55602: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
*block = new_block;
55606: 2080 movel %d0,%a0@ <== NOT EXECUTED
map->last_map_block = new_block;
55608: 2740 001a movel %d0,%a3@(26) <== NOT EXECUTED
return 0;
}
5560c: 2002 movel %d2,%d0 <== NOT EXECUTED
5560e: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED
55614: 4e5e unlk %fp <== NOT EXECUTED
000556ce <rtems_rfs_block_map_indirect_shrink.isra.7>:
* @param indirect The index index in the inode's block table.
* @param index The index in the indirect table of the block.
* @return int The error number (errno). No error if 0.
*/
static int
rtems_rfs_block_map_indirect_shrink (rtems_rfs_file_system* fs,
556ce: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
556d2: 202e 0014 movel %fp@(20),%d0 <== NOT EXECUTED
556d6: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
556da: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
556de: 222e 0018 movel %fp@(24),%d1 <== NOT EXECUTED
* 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) ||
556e2: 670a beqs 556ee <rtems_rfs_block_map_indirect_shrink.isra.7+0x20><== NOT EXECUTED
556e4: 4a80 tstl %d0 <== NOT EXECUTED
556e6: 6678 bnes 55760 <rtems_rfs_block_map_indirect_shrink.isra.7+0x92><== NOT EXECUTED
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
556e8: 7405 moveq #5,%d2 <== NOT EXECUTED
556ea: b481 cmpl %d1,%d2 <== NOT EXECUTED
556ec: 6672 bnes 55760 <rtems_rfs_block_map_indirect_shrink.isra.7+0x92><== NOT EXECUTED
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
556ee: 2632 0c22 movel %a2@(00000022,%d0:l:4),%d3 <== NOT EXECUTED
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
556f2: 4a80 tstl %d0 <== NOT EXECUTED
556f4: 664a bnes 55740 <rtems_rfs_block_map_indirect_shrink.isra.7+0x72><== NOT EXECUTED
556f6: 7805 moveq #5,%d4 <== NOT EXECUTED
556f8: b881 cmpl %d1,%d4 <== NOT EXECUTED
556fa: 6644 bnes 55740 <rtems_rfs_block_map_indirect_shrink.isra.7+0x72><== NOT EXECUTED
/*
* 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);
556fc: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
55700: 2050 moveal %a0@,%a0 <== NOT EXECUTED
55702: 2268 001a moveal %a0@(26),%a1 <== NOT EXECUTED
* @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,
55706: 41e9 0001 lea %a1@(1),%a0 <== NOT EXECUTED
/*
* 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);
5570a: 4282 clrl %d2 <== NOT EXECUTED
5570c: 1431 0800 moveb %a1@(00000000,%d0:l),%d2 <== NOT EXECUTED
55710: 4281 clrl %d1 <== NOT EXECUTED
55712: 7818 moveq #24,%d4 <== NOT EXECUTED
55714: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
55718: e9aa lsll %d4,%d2 <== NOT EXECUTED
5571a: 8282 orl %d2,%d1 <== NOT EXECUTED
5571c: 4282 clrl %d2 <== NOT EXECUTED
5571e: 1410 moveb %a0@,%d2 <== NOT EXECUTED
55720: 4842 swap %d2 <== NOT EXECUTED
55722: 4242 clrw %d2 <== NOT EXECUTED
55724: 8282 orl %d2,%d1 <== NOT EXECUTED
55726: 4282 clrl %d2 <== NOT EXECUTED
55728: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
5572c: 5888 addql #4,%a0 <== NOT EXECUTED
5572e: e18a lsll #8,%d2 <== NOT EXECUTED
55730: 8282 orl %d2,%d1 <== NOT EXECUTED
55732: 2581 0822 movel %d1,%a2@(00000022,%d0:l) <== NOT EXECUTED
55736: 5880 addql #4,%d0 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
55738: 7214 moveq #20,%d1 <== NOT EXECUTED
5573a: b280 cmpl %d0,%d1 <== NOT EXECUTED
5573c: 66cc bnes 5570a <rtems_rfs_block_map_indirect_shrink.isra.7+0x3c><== NOT EXECUTED
5573e: 6004 bras 55744 <rtems_rfs_block_map_indirect_shrink.isra.7+0x76><== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
55740: 42b2 0c22 clrl %a2@(00000022,%d0:l:4) <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
55744: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55746: 42a7 clrl %sp@- <== NOT EXECUTED
55748: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
5574c: 4eb9 0004 e846 jsr 4e846 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
55752: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55756: 4a80 tstl %d0 <== NOT EXECUTED
55758: 6e08 bgts 55762 <rtems_rfs_block_map_indirect_shrink.isra.7+0x94><== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
5575a: 2543 001a movel %d3,%a2@(26) <== NOT EXECUTED
5575e: 6002 bras 55762 <rtems_rfs_block_map_indirect_shrink.isra.7+0x94><== NOT EXECUTED
rtems_rfs_block_map* map,
rtems_rfs_buffer_handle* buffer,
rtems_rfs_block_no indirect,
rtems_rfs_block_no index)
{
int rc = 0;
55760: 4280 clrl %d0 <== NOT EXECUTED
map->last_map_block = block_to_free;
}
return rc;
}
55762: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
55768: 4e5e unlk %fp <== NOT EXECUTED
00055d40 <rtems_rfs_block_map_next_block>:
int
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
55d40: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
55d44: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
55d48: 2028 000e movel %a0@(14),%d0 <== NOT EXECUTED
55d4c: 5280 addql #1,%d0 <== NOT EXECUTED
bpos.boff = 0;
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
55d4e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
55d52: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
55d56: 2f08 movel %a0,%sp@- <== NOT EXECUTED
55d58: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
rtems_rfs_block_map_next_block (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
55d5c: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED
bpos.boff = 0;
55d60: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
bpos.block = 0;
55d64: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
return rtems_rfs_block_map_find (fs, map, &bpos, block);
55d68: 4eb9 0005 5bd6 jsr 55bd6 <rtems_rfs_block_map_find> <== NOT EXECUTED
}
55d6e: 4e5e unlk %fp <== NOT EXECUTED
00055894 <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)
{
55894: 4e56 fff0 linkw %fp,#-16
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
55898: 4200 clrb %d0
5589a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
5589e: 246e 0010 moveal %fp@(16),%a2
558a2: 266e 000c moveal %fp@(12),%a3
* sure the inode has been loaded into memory. If we did not load the inode
* do not unload it. The caller may assume it is still loaded when we return.
*/
map->dirty = false;
map->inode = NULL;
558a6: 42aa 0002 clrl %a2@(2)
int
rtems_rfs_block_map_open (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* inode,
rtems_rfs_block_map* map)
{
558aa: 242e 0008 movel %fp@(8),%d2
* @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;
558ae: 42aa 0006 clrl %a2@(6)
* 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;
558b2: 4212 clrb %a2@
size->offset = 0;
558b4: 42aa 000a clrl %a2@(10)
558b8: 1540 0036 moveb %d0,%a2@(54)
* @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;
558bc: 42aa 000e clrl %a2@(14)
558c0: 1540 0040 moveb %d0,%a2@(64)
bpos->boff = 0;
558c4: 42aa 0012 clrl %a2@(18)
bpos->block = 0;
558c8: 42aa 0016 clrl %a2@(22)
handle->bnum = 0;
558cc: 42aa 0038 clrl %a2@(56)
handle->buffer = NULL;
558d0: 42aa 003c clrl %a2@(60)
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
558d4: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
558d8: 42aa 0046 clrl %a2@(70)
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
558dc: 2f0b movel %a3,%sp@-
558de: 2f02 movel %d2,%sp@-
558e0: 4eb9 0004 ea4c jsr 4ea4c <rtems_rfs_inode_load>
if (rc > 0)
558e6: 508f addql #8,%sp
return rc;
rc = rtems_rfs_buffer_handle_open (fs, &map->doubly_buffer);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_load (fs, inode);
558e8: 2600 movel %d0,%d3
if (rc > 0)
558ea: 6e00 00e8 bgtw 559d4 <rtems_rfs_block_map_open+0x140>
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
558ee: 206b 000c moveal %a3@(12),%a0
/*
* 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++)
558f2: 4281 clrl %d1
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
558f4: 254b 0002 movel %a3,%a2@(2)
* @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]);
558f8: 4280 clrl %d0
558fa: 7618 moveq #24,%d3
558fc: 43f0 1c1c lea %a0@(0000001c,%d1:l:4),%a1
55900: 1011 moveb %a1@,%d0
55902: e7a8 lsll %d3,%d0
55904: 4283 clrl %d3
55906: 1629 0001 moveb %a1@(1),%d3
5590a: 4843 swap %d3
5590c: 4243 clrw %d3
5590e: 8083 orl %d3,%d0
55910: 4283 clrl %d3
55912: 1629 0003 moveb %a1@(3),%d3
55916: 8083 orl %d3,%d0
55918: 1629 0002 moveb %a1@(2),%d3
5591c: e18b lsll #8,%d3
5591e: 8083 orl %d3,%d0
55920: 2580 1c22 movel %d0,%a2@(00000022,%d1:l:4)
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
55924: 5281 addql #1,%d1
55926: 7005 moveq #5,%d0
55928: b081 cmpl %d1,%d0
5592a: 66cc bnes 558f8 <rtems_rfs_block_map_open+0x64>
* @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);
5592c: 4280 clrl %d0
5592e: 1028 000c moveb %a0@(12),%d0
55932: 7218 moveq #24,%d1
* @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);
55934: 7618 moveq #24,%d3
* @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);
55936: e3a8 lsll %d1,%d0
55938: 4281 clrl %d1
5593a: 1228 000d moveb %a0@(13),%d1
5593e: 4841 swap %d1
55940: 4241 clrw %d1
55942: 8081 orl %d1,%d0
55944: 4281 clrl %d1
55946: 1228 000f moveb %a0@(15),%d1
5594a: 8081 orl %d1,%d0
5594c: 1228 000e moveb %a0@(14),%d1
55950: e189 lsll #8,%d1
55952: 8081 orl %d1,%d0
* @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);
55954: 4281 clrl %d1
* @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);
55956: 2540 0006 movel %d0,%a2@(6)
* @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);
5595a: 4280 clrl %d0
5595c: 1028 000a moveb %a0@(10),%d0
55960: 1228 000b moveb %a0@(11),%d1
55964: e188 lsll #8,%d0
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
55966: 8081 orl %d1,%d0
55968: 2540 000a movel %d0,%a2@(10)
* @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);
5596c: 4280 clrl %d0
5596e: 1028 0030 moveb %a0@(48),%d0
55972: 1228 0031 moveb %a0@(49),%d1
55976: e7a8 lsll %d3,%d0
55978: 4841 swap %d1
5597a: 4241 clrw %d1
5597c: 8081 orl %d1,%d0
5597e: 4281 clrl %d1
55980: 1228 0033 moveb %a0@(51),%d1
55984: 8081 orl %d1,%d0
55986: 1228 0032 moveb %a0@(50),%d1
5598a: e189 lsll #8,%d1
5598c: 8081 orl %d1,%d0
* @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);
5598e: 4281 clrl %d1
* @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);
55990: 2540 001a movel %d0,%a2@(26)
* @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);
55994: 4280 clrl %d0
55996: 1028 0034 moveb %a0@(52),%d0
5599a: 1228 0035 moveb %a0@(53),%d1
5599e: e7a8 lsll %d3,%d0
559a0: 4841 swap %d1
559a2: 4241 clrw %d1
559a4: 8081 orl %d1,%d0
559a6: 4281 clrl %d1
559a8: 1228 0037 moveb %a0@(55),%d1
559ac: 8081 orl %d1,%d0
559ae: 1228 0036 moveb %a0@(54),%d1
559b2: e189 lsll #8,%d1
559b4: 8081 orl %d1,%d0
559b6: 2540 001e movel %d0,%a2@(30)
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
559ba: 2d4b 000c movel %a3,%fp@(12)
559be: 2d42 0008 movel %d2,%fp@(8)
return rc;
}
559c2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
559c8: 42ae 0010 clrl %fp@(16)
return rc;
}
559cc: 4e5e unlk %fp
map->size.count = rtems_rfs_inode_get_block_count (inode);
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
559ce: 4ef9 0004 eba2 jmp 4eba2 <rtems_rfs_inode_unload>
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
559d4: 486a 0036 pea %a2@(54) <== NOT EXECUTED
559d8: 47f9 0005 6434 lea 56434 <rtems_rfs_buffer_handle_release>,%a3<== NOT EXECUTED
559de: 2f02 movel %d2,%sp@- <== NOT EXECUTED
559e0: 4e93 jsr %a3@ <== NOT EXECUTED
handle->dirty = false;
559e2: 4201 clrb %d1 <== NOT EXECUTED
559e4: 1541 0036 moveb %d1,%a2@(54) <== NOT EXECUTED
handle->bnum = 0;
559e8: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED
handle->buffer = NULL;
559ec: 42aa 003c clrl %a2@(60) <== 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);
559f0: 486a 0040 pea %a2@(64) <== NOT EXECUTED
559f4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
559f6: 4e93 jsr %a3@ <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
559f8: 4fef 0010 lea %sp@(16),%sp <== 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);
handle->dirty = false;
559fc: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
559fe: 42aa 0042 clrl %a2@(66) <== 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);
handle->dirty = false;
55a02: 1540 0040 moveb %d0,%a2@(64) <== NOT EXECUTED
return rc;
}
55a06: 2003 movel %d3,%d0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
55a08: 42aa 0046 clrl %a2@(70) <== NOT EXECUTED
55a0c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
55a12: 4e5e unlk %fp <== NOT EXECUTED
00055cc2 <rtems_rfs_block_map_seek>:
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
55cc2: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
55cc6: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED
55cca: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
55cce: 4284 clrl %d4 <== NOT EXECUTED
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
55cd0: 4282 clrl %d2 <== NOT EXECUTED
int
rtems_rfs_block_map_seek (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
rtems_rfs_pos_rel offset,
rtems_rfs_block_no* block)
{
55cd2: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
55cd6: 202a 000e movel %a2@(14),%d0 <== NOT EXECUTED
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
55cda: 222b 0008 movel %a3@(8),%d1 <== NOT EXECUTED
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
55cde: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
55ce2: 2a01 movel %d1,%d5 <== NOT EXECUTED
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
55ce4: d0aa 0012 addl %a2@(18),%d0 <== NOT EXECUTED
55ce8: 2600 movel %d0,%d3 <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
55cea: 2f01 movel %d1,%sp@- <== NOT EXECUTED
static inline void
rtems_rfs_block_add_pos (rtems_rfs_file_system* fs,
rtems_rfs_pos_rel offset,
rtems_rfs_block_pos* bpos)
{
rtems_rfs_block_get_bpos (fs,
55cec: 202e 0010 movel %fp@(16),%d0 <== NOT EXECUTED
55cf0: d6ae 0014 addl %fp@(20),%d3 <== NOT EXECUTED
55cf4: d580 addxl %d0,%d2 <== NOT EXECUTED
55cf6: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55cf8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55cfa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
55cfc: 4eb9 0006 8bf0 jsr 68bf0 <__udivdi3> <== NOT EXECUTED
55d02: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
55d06: 2f05 movel %d5,%sp@- <== NOT EXECUTED
55d08: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55d0a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
void
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
55d0c: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
55d10: 2f02 movel %d2,%sp@- <== NOT EXECUTED
55d12: 4eb9 0006 8ff4 jsr 68ff4 <__umoddi3> <== NOT EXECUTED
55d18: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
55d1c: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
55d20: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
55d24: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_block_get_bpos (rtems_rfs_file_system* fs,
rtems_rfs_pos pos,
rtems_rfs_block_pos* bpos)
{
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
55d26: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED
rtems_rfs_block_no* block)
{
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
55d2a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
55d2c: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
55d30: 4eb9 0005 5bd6 jsr 55bd6 <rtems_rfs_block_map_find> <== NOT EXECUTED
}
55d36: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 <== NOT EXECUTED
55d3c: 4e5e unlk %fp <== NOT EXECUTED
00056046 <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
56046: 4e56 ffc4 linkw %fp,#-60 <== NOT EXECUTED
5604a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
5604e: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> <== NOT EXECUTED
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
56052: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
56056: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
56058: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
5605c: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
56060: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56066: 508f addql #8,%sp <== NOT EXECUTED
56068: 4a00 tstb %d0 <== NOT EXECUTED
5606a: 6716 beqs 56082 <rtems_rfs_block_map_shrink+0x3c><== NOT EXECUTED
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
5606c: 2f2a 0006 movel %a2@(6),%sp@- <== NOT EXECUTED
56070: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56072: 4879 0006 cdfa pea 6cdfa <CSWTCH.2+0xba> <== NOT EXECUTED
56078: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5607e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
56082: 202a 0006 movel %a2@(6),%d0 <== NOT EXECUTED
56086: 6604 bnes 5608c <rtems_rfs_block_map_shrink+0x46><== NOT EXECUTED
56088: 6000 0222 braw 562ac <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
5608c: b083 cmpl %d3,%d0 <== NOT EXECUTED
5608e: 6400 01a2 bccw 56232 <rtems_rfs_block_map_shrink+0x1ec><== NOT EXECUTED
56092: 2600 movel %d0,%d3 <== NOT EXECUTED
56094: 6000 019c braw 56232 <rtems_rfs_block_map_shrink+0x1ec><== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
56098: 202a 0006 movel %a2@(6),%d0 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
5609c: 7204 moveq #4,%d1 <== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
5609e: 5380 subql #1,%d0 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
560a0: b280 cmpl %d0,%d1 <== NOT EXECUTED
560a2: 650c bcss 560b0 <rtems_rfs_block_map_shrink+0x6a><== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
560a4: 2432 0c22 movel %a2@(00000022,%d0:l:4),%d2 <== NOT EXECUTED
map->blocks[block] = 0;
560a8: 42b2 0c22 clrl %a2@(00000022,%d0:l:4) <== NOT EXECUTED
560ac: 6000 015e braw 5620c <rtems_rfs_block_map_shrink+0x1c6><== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
560b0: 222b 0034 movel %a3@(52),%d1 <== NOT EXECUTED
560b4: 2c00 movel %d0,%d6 <== NOT EXECUTED
560b6: 4c41 6004 remul %d1,%d4,%d6 <== NOT EXECUTED
560ba: 4c41 6006 remul %d1,%d6,%d6 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
560be: b0ab 0038 cmpl %a3@(56),%d0 <== NOT EXECUTED
560c2: 645e bccs 56122 <rtems_rfs_block_map_shrink+0xdc><== NOT EXECUTED
{
/*
* Request the indirect block and then obtain the block number from the
* indirect block.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
560c4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
560c8: 2f32 6c22 movel %a2@(00000022,%d6:l:4),%sp@- <== NOT EXECUTED
560cc: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
560d0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
560d2: 4e94 jsr %a4@ <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
560d4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
560d8: 4a80 tstl %d0 <== NOT EXECUTED
560da: 6e00 01d2 bgtw 562ae <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
560de: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED
560e2: 2004 movel %d4,%d0 <== NOT EXECUTED
560e4: 4281 clrl %d1 <== NOT EXECUTED
560e6: 4282 clrl %d2 <== NOT EXECUTED
560e8: 7a18 moveq #24,%d5 <== NOT EXECUTED
560ea: e588 lsll #2,%d0 <== NOT EXECUTED
560ec: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
560f0: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 <== NOT EXECUTED
560f4: 1430 0803 moveb %a0@(00000003,%d0:l),%d2 <== NOT EXECUTED
560f8: eba9 lsll %d5,%d1 <== NOT EXECUTED
560fa: 8481 orl %d1,%d2 <== NOT EXECUTED
560fc: 4281 clrl %d1 <== NOT EXECUTED
560fe: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
56102: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
56106: 2f04 movel %d4,%sp@- <== NOT EXECUTED
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,
56108: 4841 swap %d1 <== NOT EXECUTED
5610a: 4241 clrw %d1 <== NOT EXECUTED
5610c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
56112: 2f06 movel %d6,%sp@- <== NOT EXECUTED
56114: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
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,
56118: 8481 orl %d1,%d2 <== NOT EXECUTED
5611a: e188 lsll #8,%d0 <== NOT EXECUTED
5611c: 8480 orl %d0,%d2 <== NOT EXECUTED
5611e: 6000 00da braw 561fa <rtems_rfs_block_map_shrink+0x1b4><== NOT EXECUTED
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)
56122: b0ab 003c cmpl %a3@(60),%d0 <== NOT EXECUTED
56126: 6400 013c bccw 56264 <rtems_rfs_block_map_shrink+0x21e><== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5612a: 4878 0001 pea 1 <ADD> <== 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;
5612e: 4c41 6007 remul %d1,%d7,%d6 <== NOT EXECUTED
56132: 4c41 6006 remul %d1,%d6,%d6 <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
56136: 2f32 6c22 movel %a2@(00000022,%d6:l:4),%sp@- <== NOT EXECUTED
5613a: 2f2e fff8 movel %fp@(-8),%sp@- <== 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;
5613e: 2d46 ffec movel %d6,%fp@(-20) <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
56142: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56144: 4e94 jsr %a4@ <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
56146: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5614a: 4a80 tstl %d0 <== NOT EXECUTED
5614c: 6e00 0160 bgtw 562ae <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
56150: 206a 0046 moveal %a2@(70),%a0 <== NOT EXECUTED
56154: 2007 movel %d7,%d0 <== NOT EXECUTED
56156: 4282 clrl %d2 <== NOT EXECUTED
56158: 4285 clrl %d5 <== NOT EXECUTED
5615a: 7c18 moveq #24,%d6 <== NOT EXECUTED
5615c: e588 lsll #2,%d0 <== NOT EXECUTED
5615e: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
56162: 1430 0800 moveb %a0@(00000000,%d0:l),%d2 <== NOT EXECUTED
56166: 1a30 0803 moveb %a0@(00000003,%d0:l),%d5 <== NOT EXECUTED
5616a: edaa lsll %d6,%d2 <== NOT EXECUTED
5616c: 8a82 orl %d2,%d5 <== NOT EXECUTED
5616e: 4282 clrl %d2 <== NOT EXECUTED
56170: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED
56174: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56178: 4878 0001 pea 1 <ADD> <== 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,
5617c: 4842 swap %d2 <== NOT EXECUTED
5617e: 4242 clrw %d2 <== NOT EXECUTED
56180: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56186: 8a82 orl %d2,%d5 <== NOT EXECUTED
56188: e188 lsll #8,%d0 <== NOT EXECUTED
5618a: 8a80 orl %d0,%d5 <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
5618c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5618e: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
56192: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56194: 4e94 jsr %a4@ <== NOT EXECUTED
singly, true);
if (rc > 0)
56196: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5619a: 4a80 tstl %d0 <== NOT EXECUTED
5619c: 6e00 0110 bgtw 562ae <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
561a0: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED
561a4: 2004 movel %d4,%d0 <== NOT EXECUTED
561a6: 4281 clrl %d1 <== NOT EXECUTED
561a8: 4282 clrl %d2 <== NOT EXECUTED
561aa: e588 lsll #2,%d0 <== NOT EXECUTED
561ac: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
561b0: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 <== NOT EXECUTED
561b4: 1430 0803 moveb %a0@(00000003,%d0:l),%d2 <== NOT EXECUTED
561b8: eda9 lsll %d6,%d1 <== NOT EXECUTED
561ba: 8481 orl %d1,%d2 <== NOT EXECUTED
561bc: 4281 clrl %d1 <== NOT EXECUTED
561be: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
561c2: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED
561c6: 4841 swap %d1 <== NOT EXECUTED
561c8: 4241 clrw %d1 <== NOT EXECUTED
561ca: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
561d0: 8481 orl %d1,%d2 <== NOT EXECUTED
561d2: e188 lsll #8,%d0 <== NOT EXECUTED
561d4: 8480 orl %d0,%d2 <== NOT EXECUTED
direct);
if (direct == 0)
561d6: 4a84 tstl %d4 <== NOT EXECUTED
561d8: 6632 bnes 5620c <rtems_rfs_block_map_shrink+0x1c6><== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
561da: 2f05 movel %d5,%sp@- <== NOT EXECUTED
561dc: 42a7 clrl %sp@- <== NOT EXECUTED
561de: 2f0b movel %a3,%sp@- <== NOT EXECUTED
561e0: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc > 0)
561e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
561e6: 4a80 tstl %d0 <== NOT EXECUTED
561e8: 6e00 00c4 bgtw 562ae <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
map->last_map_block = singly;
561ec: 2545 001a movel %d5,%a2@(26) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
561f0: 2f07 movel %d7,%sp@- <== NOT EXECUTED
561f2: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
561f6: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
561fa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
561fc: 2f0b movel %a3,%sp@- <== NOT EXECUTED
561fe: 4eba f4ce jsr %pc@(556ce <rtems_rfs_block_map_indirect_shrink.isra.7>)<== NOT EXECUTED
doubly, doubly_singly);
if (rc)
56202: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56206: 4a80 tstl %d0 <== NOT EXECUTED
56208: 6600 00a4 bnew 562ae <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
5620c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5620e: 42a7 clrl %sp@- <== NOT EXECUTED
56210: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56212: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc > 0)
56214: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56218: 4a80 tstl %d0 <== NOT EXECUTED
5621a: 6e00 0092 bgtw 562ae <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
map->size.count--;
5621e: 53aa 0006 subql #1,%a2@(6) <== NOT EXECUTED
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
56222: 5383 subql #1,%d3 <== NOT EXECUTED
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
56224: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
if (rc > 0)
return rc;
map->size.count--;
map->size.offset = 0;
56228: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
map->last_data_block = block_to_free;
5622c: 2542 001e movel %d2,%a2@(30) <== NOT EXECUTED
56230: 602c bras 5625e <rtems_rfs_block_map_shrink+0x218><== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
56232: 41ea 0040 lea %a2@(64),%a0 <== NOT EXECUTED
56236: 49f9 0005 65b0 lea 565b0 <rtems_rfs_buffer_handle_request>,%a4<== NOT EXECUTED
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
direct);
if (direct == 0)
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
5623c: 4bf9 0004 e846 lea 4e846 <rtems_rfs_group_bitmap_free>,%a5 <== NOT EXECUTED
rtems_rfs_block_no doubly_singly;
doubly = singly / fs->blocks_per_block;
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
56242: 2d48 fff8 movel %a0,%fp@(-8) <== NOT EXECUTED
doubly_singly);
/*
* Read the singly indirect table and get the block number.
*/
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56246: 41ea 0036 lea %a2@(54),%a0 <== NOT EXECUTED
5624a: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
}
5624e: 41ea 0046 lea %a2@(70),%a0 <== NOT EXECUTED
56252: 2d48 fff4 movel %a0,%fp@(-12) <== NOT EXECUTED
56256: 41ea 003c lea %a2@(60),%a0 <== NOT EXECUTED
5625a: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
5625e: 4a83 tstl %d3 <== NOT EXECUTED
56260: 6600 fe36 bnew 56098 <rtems_rfs_block_map_shrink+0x52><== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
56264: 202a 0006 movel %a2@(6),%d0 <== NOT EXECUTED
56268: 6608 bnes 56272 <rtems_rfs_block_map_shrink+0x22c><== NOT EXECUTED
{
map->last_map_block = 0;
5626a: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
map->last_data_block = 0;
5626e: 42aa 001e clrl %a2@(30) <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
56272: 222a 000e movel %a2@(14),%d1 <== NOT EXECUTED
56276: 6704 beqs 5627c <rtems_rfs_block_map_shrink+0x236><== NOT EXECUTED
56278: 4a80 tstl %d0 <== NOT EXECUTED
5627a: 6716 beqs 56292 <rtems_rfs_block_map_shrink+0x24c><== NOT EXECUTED
5627c: b081 cmpl %d1,%d0 <== NOT EXECUTED
5627e: 6312 blss 56292 <rtems_rfs_block_map_shrink+0x24c><== NOT EXECUTED
56280: 2040 moveal %d0,%a0 <== NOT EXECUTED
56282: 5388 subql #1,%a0 <== NOT EXECUTED
56284: b1c1 cmpal %d1,%a0 <== NOT EXECUTED
56286: 6624 bnes 562ac <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
56288: 222a 000a movel %a2@(10),%d1 <== NOT EXECUTED
5628c: b2aa 0012 cmpl %a2@(18),%d1 <== NOT EXECUTED
56290: 641a bccs 562ac <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
56292: 222a 000a movel %a2@(10),%d1 <== NOT EXECUTED
56296: 2540 000e movel %d0,%a2@(14) <== NOT EXECUTED
5629a: 2541 0012 movel %d1,%a2@(18) <== NOT EXECUTED
5629e: 42aa 0016 clrl %a2@(22) <== NOT EXECUTED
562a2: 4a81 tstl %d1 <== NOT EXECUTED
562a4: 6706 beqs 562ac <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
562a6: 5380 subql #1,%d0 <== NOT EXECUTED
562a8: 2540 000e movel %d0,%a2@(14) <== NOT EXECUTED
return 0;
562ac: 4280 clrl %d0 <== NOT EXECUTED
}
562ae: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 <== NOT EXECUTED
562b4: 4e5e unlk %fp <== NOT EXECUTED
0005ad16 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
5ad16: 4e56 0000 linkw %fp,#0
5ad1a: 2f0a movel %a2,%sp@-
5ad1c: 246e 0008 moveal %fp@(8),%a2
5ad20: 2f02 movel %d2,%sp@-
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5ad22: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
5ad26: 142e 000f moveb %fp@(15),%d2
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5ad2a: 42a7 clrl %sp@-
5ad2c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
5ad32: 508f addql #8,%sp
5ad34: 4a00 tstb %d0
5ad36: 672c beqs 5ad64 <rtems_rfs_buffer_bdbuf_release+0x4e><== ALWAYS TAKEN
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
5ad38: 4a02 tstb %d2 <== NOT EXECUTED
5ad3a: 6708 beqs 5ad44 <rtems_rfs_buffer_bdbuf_release+0x2e><== NOT EXECUTED
5ad3c: 203c 0006 e2e6 movel #451302,%d0 <== NOT EXECUTED
5ad42: 6006 bras 5ad4a <rtems_rfs_buffer_bdbuf_release+0x34><== NOT EXECUTED
5ad44: 203c 0006 b9fe movel #440830,%d0 <== NOT EXECUTED
5ad4a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ad4c: 2f2a 0016 movel %a2@(22),%sp@- <== NOT EXECUTED
5ad50: 2f2a 0032 movel %a2@(50),%sp@- <== NOT EXECUTED
5ad54: 4879 0006 e2f1 pea 6e2f1 <rtems_rfs_rtems_file_handlers+0x37><== NOT EXECUTED
5ad5a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5ad60: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
5ad64: 4a02 tstb %d2
5ad66: 670a beqs 5ad72 <rtems_rfs_buffer_bdbuf_release+0x5c>
sc = rtems_bdbuf_release_modified (buffer);
5ad68: 2f0a movel %a2,%sp@-
5ad6a: 4eb9 0005 210a jsr 5210a <rtems_bdbuf_release_modified>
5ad70: 6008 bras 5ad7a <rtems_rfs_buffer_bdbuf_release+0x64>
else
sc = rtems_bdbuf_release (buffer);
5ad72: 2f0a movel %a2,%sp@-
5ad74: 4eb9 0005 2068 jsr 52068 <rtems_bdbuf_release>
5ad7a: 588f addql #4,%sp
if (sc != RTEMS_SUCCESSFUL)
5ad7c: 4a80 tstl %d0
5ad7e: 6702 beqs 5ad82 <rtems_rfs_buffer_bdbuf_release+0x6c><== ALWAYS TAKEN
#if RTEMS_RFS_BUFFER_ERRORS
printf ("rtems-rfs: buffer-release: bdbuf-%s: %s(%d)\n",
modified ? "modified" : "not-modified",
rtems_status_text (sc), sc);
#endif
rc = EIO;
5ad80: 7005 moveq #5,%d0 <== NOT EXECUTED
}
return rc;
}
5ad82: 242e fff8 movel %fp@(-8),%d2
5ad86: 246e fffc moveal %fp@(-4),%a2
5ad8a: 4e5e unlk %fp
...
0005acd4 <rtems_rfs_buffer_bdbuf_request>:
int
rtems_rfs_buffer_bdbuf_request (rtems_rfs_file_system* fs,
rtems_rfs_buffer_block block,
bool read,
rtems_rfs_buffer** buffer)
{
5acd4: 4e56 0000 linkw %fp,#0
5acd8: 206e 0008 moveal %fp@(8),%a0
5acdc: 202e 000c movel %fp@(12),%d0
5ace0: 222e 0014 movel %fp@(20),%d1
rtems_status_code sc;
int rc = 0;
if (read)
5ace4: 4a2e 0013 tstb %fp@(19)
5ace8: 6710 beqs 5acfa <rtems_rfs_buffer_bdbuf_request+0x26>
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
5acea: 2f01 movel %d1,%sp@-
5acec: 2f00 movel %d0,%sp@-
5acee: 2f28 0010 movel %a0@(16),%sp@-
5acf2: 4eb9 0005 1edc jsr 51edc <rtems_bdbuf_read>
5acf8: 600e bras 5ad08 <rtems_rfs_buffer_bdbuf_request+0x34>
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
5acfa: 2f01 movel %d1,%sp@-
5acfc: 2f00 movel %d0,%sp@-
5acfe: 2f28 0010 movel %a0@(16),%sp@-
5ad02: 4eb9 0005 1e1e jsr 51e1e <rtems_bdbuf_get>
5ad08: 4fef 000c lea %sp@(12),%sp
if (sc != RTEMS_SUCCESSFUL)
5ad0c: 4a80 tstl %d0
5ad0e: 6702 beqs 5ad12 <rtems_rfs_buffer_bdbuf_request+0x3e><== ALWAYS TAKEN
{
#if RTEMS_RFS_BUFFER_ERRORS
printf ("rtems-rfs: buffer-bdbuf-request: block=%lu: bdbuf-%s: %d: %s\n",
block, read ? "read" : "get", sc, rtems_status_text (sc));
#endif
rc = EIO;
5ad10: 7005 moveq #5,%d0 <== NOT EXECUTED
}
return rc;
}
5ad12: 4e5e unlk %fp <== NOT EXECUTED
00056b10 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
56b10: 4e56 0000 linkw %fp,#0
56b14: 2f0a movel %a2,%sp@-
56b16: 246e 0008 moveal %fp@(8),%a2
56b1a: 2f02 movel %d2,%sp@-
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
56b1c: 4878 0010 pea 10 <INVALID_OPERATION>
56b20: 42a7 clrl %sp@-
56b22: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56b28: 508f addql #8,%sp
56b2a: 4a00 tstb %d0
56b2c: 670e beqs 56b3c <rtems_rfs_buffer_close+0x2c> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-close: closing\n");
56b2e: 4879 0006 d27e pea 6d27e <CSWTCH.2+0x53e> <== NOT EXECUTED
56b34: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
56b3a: 588f addql #4,%sp <== 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));
56b3c: 206a 0010 moveal %a2@(16),%a0
56b40: 2f28 0020 movel %a0@(32),%sp@-
56b44: 2f0a movel %a2,%sp@-
56b46: 4eb9 0005 6a34 jsr 56a34 <rtems_rfs_buffer_setblksize>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
56b4c: 508f addql #8,%sp
/*
* 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));
56b4e: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
56b50: 6f2e bles 56b80 <rtems_rfs_buffer_close+0x70> <== ALWAYS TAKEN
56b52: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
56b56: 42a7 clrl %sp@- <== NOT EXECUTED
56b58: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56b5e: 508f addql #8,%sp <== NOT EXECUTED
56b60: 4a00 tstb %d0 <== NOT EXECUTED
56b62: 671c beqs 56b80 <rtems_rfs_buffer_close+0x70> <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
56b64: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56b66: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56b6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56b6e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56b70: 4879 0006 d29f pea 6d29f <CSWTCH.2+0x55f> <== NOT EXECUTED
56b76: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56b7c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
if (close (fs->device) < 0)
56b80: 2f2a 000c movel %a2@(12),%sp@-
56b84: 4eb9 0004 60d4 jsr 460d4 <close>
56b8a: 588f addql #4,%sp
56b8c: 4a80 tstl %d0
56b8e: 6c38 bges 56bc8 <rtems_rfs_buffer_close+0xb8> <== ALWAYS TAKEN
{
rc = errno;
56b90: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
56b96: 2040 moveal %d0,%a0 <== NOT EXECUTED
56b98: 2410 movel %a0@,%d2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
56b9a: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
56b9e: 42a7 clrl %sp@- <== NOT EXECUTED
56ba0: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56ba6: 508f addql #8,%sp <== NOT EXECUTED
56ba8: 4a00 tstb %d0 <== NOT EXECUTED
56baa: 671c beqs 56bc8 <rtems_rfs_buffer_close+0xb8> <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n",
56bac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56bae: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56bb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56bb6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56bb8: 4879 0006 d2dd pea 6d2dd <CSWTCH.2+0x59d> <== NOT EXECUTED
56bbe: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56bc4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
}
return rc;
}
56bc8: 2002 movel %d2,%d0
56bca: 242e fff8 movel %fp@(-8),%d2
56bce: 246e fffc moveal %fp@(-4),%a2
56bd2: 4e5e unlk %fp
...
00056434 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
56434: 4e56 fff4 linkw %fp,#-12
56438: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
5643c: 246e 0008 moveal %fp@(8),%a2
56440: 266e 000c moveal %fp@(12),%a3
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
56444: 4aab 0006 tstl %a3@(6)
56448: 6700 0158 beqw 565a2 <rtems_rfs_buffer_handle_release+0x16e>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
5644c: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
56450: 42a7 clrl %sp@-
56452: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56458: 508f addql #8,%sp
5645a: 4a00 tstb %d0
5645c: 6744 beqs 564a2 <rtems_rfs_buffer_handle_release+0x6e><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n",
rtems_rfs_buffer_bnum (handle),
rtems_rfs_buffer_dirty (handle) ? "(dirty)" : "",
rtems_rfs_buffer_refs (handle),
rtems_rfs_buffer_refs (handle) == 0 ? "BAD REF COUNT" : "");
5645e: 206b 0006 moveal %a3@(6),%a0 <== NOT EXECUTED
56462: 2228 002e movel %a0@(46),%d1 <== 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",
56466: 6608 bnes 56470 <rtems_rfs_buffer_handle_release+0x3c><== NOT EXECUTED
56468: 41f9 0006 ceac lea 6ceac <CSWTCH.2+0x16c>,%a0 <== NOT EXECUTED
5646e: 6006 bras 56476 <rtems_rfs_buffer_handle_release+0x42><== NOT EXECUTED
56470: 41f9 0006 b9fe lea 6b9fe <rtems_termios_baud_table+0x10a>,%a0<== NOT EXECUTED
56476: 4a13 tstb %a3@ <== NOT EXECUTED
56478: 6708 beqs 56482 <rtems_rfs_buffer_handle_release+0x4e><== NOT EXECUTED
5647a: 203c 0006 ceba movel #446138,%d0 <== NOT EXECUTED
56480: 6006 bras 56488 <rtems_rfs_buffer_handle_release+0x54><== NOT EXECUTED
56482: 203c 0006 b9fe movel #440830,%d0 <== NOT EXECUTED
56488: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5648a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5648c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5648e: 2f2b 0002 movel %a3@(2),%sp@- <== NOT EXECUTED
56492: 4879 0006 cec2 pea 6cec2 <CSWTCH.2+0x182> <== NOT EXECUTED
56498: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5649e: 4fef 0014 lea %sp@(20),%sp <== 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)
564a2: 206b 0006 moveal %a3@(6),%a0
564a6: 2028 002e movel %a0@(46),%d0
564aa: 6f06 bles 564b2 <rtems_rfs_buffer_handle_release+0x7e><== NEVER TAKEN
rtems_rfs_buffer_refs_down (handle);
564ac: 5380 subql #1,%d0
564ae: 2140 002e movel %d0,%a0@(46)
if (rtems_rfs_buffer_refs (handle) == 0)
564b2: 4aa8 002e tstl %a0@(46)
564b6: 6600 00e2 bnew 5659a <rtems_rfs_buffer_handle_release+0x166>
564ba: 2f08 movel %a0,%sp@-
564bc: 4eb9 0005 3d78 jsr 53d78 <_Chain_Extract>
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
564c2: 588f addql #4,%sp
564c4: 7002 moveq #2,%d0
rtems_rfs_buffer_refs_down (handle);
if (rtems_rfs_buffer_refs (handle) == 0)
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
564c6: 53aa 0050 subql #1,%a2@(80)
if (rtems_rfs_fs_no_local_cache (fs))
564ca: c092 andl %a2@,%d0
564cc: 671c beqs 564ea <rtems_rfs_buffer_handle_release+0xb6><== NEVER TAKEN
{
handle->buffer->user = (void*) 0;
564ce: 206b 0006 moveal %a3@(6),%a0
rc = rtems_rfs_buffer_io_release (handle->buffer,
564d2: 4280 clrl %d0
564d4: 1013 moveb %a3@,%d0
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
{
handle->buffer->user = (void*) 0;
564d6: 42a8 0032 clrl %a0@(50)
rc = rtems_rfs_buffer_io_release (handle->buffer,
564da: 2f00 movel %d0,%sp@-
564dc: 2f08 movel %a0,%sp@-
564de: 4eb9 0005 ad16 jsr 5ad16 <rtems_rfs_buffer_bdbuf_release>
564e4: 2400 movel %d0,%d2
564e6: 6000 00ae braw 56596 <rtems_rfs_buffer_handle_release+0x162>
* 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 +
564ea: 202a 0070 movel %a2@(112),%d0 <== NOT EXECUTED
564ee: d0aa 0060 addl %a2@(96),%d0 <== NOT EXECUTED
564f2: b0aa 0040 cmpl %a2@(64),%d0 <== NOT EXECUTED
564f6: 6572 bcss 5656a <rtems_rfs_buffer_handle_release+0x136><== NOT EXECUTED
fs->release_modified_count) >= fs->max_held_buffers)
{
rtems_rfs_buffer* buffer;
bool modified;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
564f8: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> <== NOT EXECUTED
564fc: 42a7 clrl %sp@- <== NOT EXECUTED
564fe: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56504: 508f addql #8,%sp <== NOT EXECUTED
56506: 4a00 tstb %d0 <== NOT EXECUTED
56508: 6718 beqs 56522 <rtems_rfs_buffer_handle_release+0xee><== NOT EXECUTED
printf ("rtems-rfs: buffer-release: local cache overflow:"
5650a: 202a 0070 movel %a2@(112),%d0 <== NOT EXECUTED
5650e: d0aa 0060 addl %a2@(96),%d0 <== NOT EXECUTED
56512: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56514: 4879 0006 cef6 pea 6cef6 <CSWTCH.2+0x1b6> <== NOT EXECUTED
5651a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56520: 508f addql #8,%sp <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
56522: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED
56526: 41f9 0004 aff0 lea 4aff0 <_Chain_Get>,%a0 <== NOT EXECUTED
5652c: b4aa 0060 cmpl %a2@(96),%d2 <== NOT EXECUTED
56530: 6410 bccs 56542 <rtems_rfs_buffer_handle_release+0x10e><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
56532: 486a 0054 pea %a2@(84) <== NOT EXECUTED
56536: 4e90 jsr %a0@ <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
56538: 588f addql #4,%sp <== NOT EXECUTED
5653a: 53aa 0060 subql #1,%a2@(96) <== NOT EXECUTED
modified = false;
5653e: 4201 clrb %d1 <== NOT EXECUTED
56540: 600e bras 56550 <rtems_rfs_buffer_handle_release+0x11c><== NOT EXECUTED
56542: 486a 0064 pea %a2@(100) <== NOT EXECUTED
56546: 4e90 jsr %a0@ <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
56548: 588f addql #4,%sp <== NOT EXECUTED
5654a: 53aa 0070 subql #1,%a2@(112) <== NOT EXECUTED
modified = true;
5654e: 7201 moveq #1,%d1 <== NOT EXECUTED
}
buffer->user = (void*) 0;
56550: 2040 moveal %d0,%a0 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
56552: 7401 moveq #1,%d2 <== NOT EXECUTED
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
modified = true;
}
buffer->user = (void*) 0;
56554: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
56558: c481 andl %d1,%d2 <== NOT EXECUTED
5655a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5655c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5655e: 4eb9 0005 ad16 jsr 5ad16 <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
56564: 508f addql #8,%sp <== NOT EXECUTED
56566: 2400 movel %d0,%d2 <== NOT EXECUTED
56568: 6002 bras 5656c <rtems_rfs_buffer_handle_release+0x138><== NOT EXECUTED
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
5656a: 4282 clrl %d2 <== NOT EXECUTED
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
5656c: 4a13 tstb %a3@ <== NOT EXECUTED
5656e: 6714 beqs 56584 <rtems_rfs_buffer_handle_release+0x150><== 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 );
56570: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
56574: 486a 0064 pea %a2@(100) <== NOT EXECUTED
56578: 4eb9 0004 afb8 jsr 4afb8 <_Chain_Append> <== NOT EXECUTED
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
5657e: 52aa 0070 addql #1,%a2@(112) <== NOT EXECUTED
56582: 6012 bras 56596 <rtems_rfs_buffer_handle_release+0x162><== NOT EXECUTED
56584: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
56588: 486a 0054 pea %a2@(84) <== NOT EXECUTED
5658c: 4eb9 0004 afb8 jsr 4afb8 <_Chain_Append> <== NOT EXECUTED
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
56592: 52aa 0060 addql #1,%a2@(96) <== NOT EXECUTED
56596: 508f addql #8,%sp
56598: 6002 bras 5659c <rtems_rfs_buffer_handle_release+0x168>
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
5659a: 4282 clrl %d2 <== NOT EXECUTED
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
5659c: 42ab 0006 clrl %a3@(6)
565a0: 6002 bras 565a4 <rtems_rfs_buffer_handle_release+0x170>
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
int rc = 0;
565a2: 4282 clrl %d2
}
handle->buffer = NULL;
}
return rc;
}
565a4: 2002 movel %d2,%d0
565a6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
565ac: 4e5e unlk %fp <== NOT EXECUTED
000565b0 <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)
{
565b0: 4e56 ffec linkw %fp,#-20
565b4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
565b8: 266e 0008 moveal %fp@(8),%a3
565bc: 246e 000c moveal %fp@(12),%a2
565c0: 242e 0010 movel %fp@(16),%d2
565c4: 182e 0017 moveb %fp@(23),%d4
/*
* 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))
565c8: 4aaa 0006 tstl %a2@(6)
565cc: 674a beqs 56618 <rtems_rfs_buffer_handle_request+0x68>
{
/*
* Treat block 0 as special to handle the loading of the super block.
*/
if (block && (rtems_rfs_buffer_bnum (handle) == block))
565ce: 4a82 tstl %d2
565d0: 670a beqs 565dc <rtems_rfs_buffer_handle_request+0x2c><== NEVER TAKEN
565d2: b4aa 0002 cmpl %a2@(2),%d2
565d6: 6604 bnes 565dc <rtems_rfs_buffer_handle_request+0x2c>
565d8: 6000 01de braw 567b8 <rtems_rfs_buffer_handle_request+0x208>
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
565dc: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
565e0: 42a7 clrl %sp@-
565e2: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
565e8: 508f addql #8,%sp
565ea: 4a00 tstb %d0
565ec: 6712 beqs 56600 <rtems_rfs_buffer_handle_request+0x50><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
565ee: 2f2a 0002 movel %a2@(2),%sp@- <== NOT EXECUTED
565f2: 4879 0006 cf30 pea 6cf30 <CSWTCH.2+0x1f0> <== NOT EXECUTED
565f8: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
565fe: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
56600: 2f0a movel %a2,%sp@-
56602: 2f0b movel %a3,%sp@-
56604: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release>
if (rc > 0)
5660a: 508f addql #8,%sp
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
5660c: 2600 movel %d0,%d3
if (rc > 0)
5660e: 6e00 01aa bgtw 567ba <rtems_rfs_buffer_handle_request+0x20a>
return rc;
handle->dirty = false;
handle->bnum = 0;
56612: 42aa 0002 clrl %a2@(2)
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
if (rc > 0)
return rc;
handle->dirty = false;
56616: 4212 clrb %a2@
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
56618: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
5661c: 42a7 clrl %sp@-
5661e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56624: 508f addql #8,%sp
56626: 4a00 tstb %d0
56628: 6710 beqs 5663a <rtems_rfs_buffer_handle_request+0x8a><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
5662a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5662c: 4879 0006 cf63 pea 6cf63 <CSWTCH.2+0x223> <== NOT EXECUTED
56632: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56638: 508f addql #8,%sp <== 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)
5663a: 4aab 0050 tstl %a3@(80)
5663e: 6744 beqs 56684 <rtems_rfs_buffer_handle_request+0xd4>
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
56640: 2f02 movel %d2,%sp@-
56642: 486b 0050 pea %a3@(80)
56646: 486b 0044 pea %a3@(68)
5664a: 4eba fd08 jsr %pc@(56354 <rtems_rfs_scan_chain>)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
5664e: 4fef 000c lea %sp@(12),%sp
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
56652: 2540 0006 movel %d0,%a2@(6)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
56656: 672c beqs 56684 <rtems_rfs_buffer_handle_request+0xd4><== ALWAYS TAKEN
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
56658: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED
5665c: 42a7 clrl %sp@- <== NOT EXECUTED
5665e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
* 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) &&
56664: 508f addql #8,%sp <== NOT EXECUTED
56666: 4a00 tstb %d0 <== NOT EXECUTED
56668: 671a beqs 56684 <rtems_rfs_buffer_handle_request+0xd4><== NOT EXECUTED
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
rtems_rfs_buffer_refs (handle) + 1);
5666a: 206a 0006 moveal %a2@(6),%a0 <== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n",
5666e: 2068 002e moveal %a0@(46),%a0 <== NOT EXECUTED
56672: 5288 addql #1,%a0 <== NOT EXECUTED
56674: 2f08 movel %a0,%sp@- <== NOT EXECUTED
56676: 4879 0006 cf89 pea 6cf89 <CSWTCH.2+0x249> <== NOT EXECUTED
5667c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56682: 508f addql #8,%sp <== 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) &&
56684: 7002 moveq #2,%d0
56686: c093 andl %a3@,%d0
56688: 664a bnes 566d4 <rtems_rfs_buffer_handle_request+0x124><== ALWAYS TAKEN
5668a: 4aaa 0006 tstl %a2@(6) <== NOT EXECUTED
5668e: 6644 bnes 566d4 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
56690: 4aab 0060 tstl %a3@(96) <== NOT EXECUTED
56694: 6716 beqs 566ac <rtems_rfs_buffer_handle_request+0xfc><== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->release,
56696: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56698: 486b 0060 pea %a3@(96) <== NOT EXECUTED
5669c: 486b 0054 pea %a3@(84) <== NOT EXECUTED
566a0: 4eba fcb2 jsr %pc@(56354 <rtems_rfs_scan_chain>) <== NOT EXECUTED
566a4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
566a8: 2540 0006 movel %d0,%a2@(6) <== NOT EXECUTED
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
566ac: 4aaa 0006 tstl %a2@(6) <== NOT EXECUTED
566b0: 6622 bnes 566d4 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
566b2: 4aab 0070 tstl %a3@(112) <== NOT EXECUTED
566b6: 671c beqs 566d4 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
566b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
566ba: 486b 0070 pea %a3@(112) <== NOT EXECUTED
566be: 486b 0064 pea %a3@(100) <== NOT EXECUTED
566c2: 4eba fc90 jsr %pc@(56354 <rtems_rfs_scan_chain>) <== NOT EXECUTED
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
566c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
566ca: 2540 0006 movel %d0,%a2@(6) <== NOT EXECUTED
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
566ce: 6704 beqs 566d4 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (handle);
566d0: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
566d4: 4aaa 0006 tstl %a2@(6)
566d8: 6670 bnes 5674a <rtems_rfs_buffer_handle_request+0x19a><== NEVER TAKEN
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
566da: 486a 0006 pea %a2@(6)
566de: 4280 clrl %d0
566e0: 1004 moveb %d4,%d0
566e2: 2f00 movel %d0,%sp@-
566e4: 2f02 movel %d2,%sp@-
566e6: 2f0b movel %a3,%sp@-
566e8: 4eb9 0005 acd4 jsr 5acd4 <rtems_rfs_buffer_bdbuf_request>
if (rc > 0)
566ee: 4fef 0010 lea %sp@(16),%sp
/*
* 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);
566f2: 2600 movel %d0,%d3
if (rc > 0)
566f4: 6f4a bles 56740 <rtems_rfs_buffer_handle_request+0x190><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
566f6: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED
566fa: 42a7 clrl %sp@- <== NOT EXECUTED
566fc: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56702: 508f addql #8,%sp <== NOT EXECUTED
56704: 4a00 tstb %d0 <== NOT EXECUTED
56706: 6700 00b2 beqw 567ba <rtems_rfs_buffer_handle_request+0x20a><== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
5670a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5670c: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56712: 588f addql #4,%sp <== NOT EXECUTED
56714: 4a04 tstb %d4 <== NOT EXECUTED
56716: 6708 beqs 56720 <rtems_rfs_buffer_handle_request+0x170><== NOT EXECUTED
56718: 223c 0006 cae3 movel #445155,%d1 <== NOT EXECUTED
5671e: 6006 bras 56726 <rtems_rfs_buffer_handle_request+0x176><== NOT EXECUTED
56720: 223c 0006 cf2c movel #446252,%d1 <== NOT EXECUTED
56726: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56728: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5672a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5672c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5672e: 4879 0006 cfbd pea 6cfbd <CSWTCH.2+0x27d> <== NOT EXECUTED
56734: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5673a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5673e: 607a bras 567ba <rtems_rfs_buffer_handle_request+0x20a><== NOT EXECUTED
block, read ? "read" : "get", rc, strerror (rc));
return rc;
}
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
56740: 206a 0006 moveal %a2@(6),%a0
56744: 42a8 0004 clrl %a0@(4)
56748: 4290 clrl %a0@
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
5674a: 206a 0006 moveal %a2@(6),%a0
5674e: 52a8 002e addql #1,%a0@(46)
56752: 2f08 movel %a0,%sp@-
56754: 486b 0044 pea %a3@(68)
56758: 4eb9 0004 afb8 jsr 4afb8 <_Chain_Append>
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
handle->buffer->user = (void*) ((intptr_t) block);
5675e: 206a 0006 moveal %a2@(6),%a0
/*
* 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++;
56762: 52ab 0050 addql #1,%a3@(80)
handle->buffer->user = (void*) ((intptr_t) block);
56766: 2142 0032 movel %d2,%a0@(50)
handle->bnum = block;
5676a: 2542 0002 movel %d2,%a2@(2)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
5676e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
56772: 42a7 clrl %sp@-
56774: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
5677a: 4fef 0010 lea %sp@(16),%sp
5677e: 4a00 tstb %d0
56780: 6736 beqs 567b8 <rtems_rfs_buffer_handle_request+0x208><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n",
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
56782: 206a 0006 moveal %a2@(6),%a0 <== 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",
56786: 2268 002e moveal %a0@(46),%a1 <== NOT EXECUTED
5678a: 2228 0016 movel %a0@(22),%d1 <== NOT EXECUTED
5678e: 4a04 tstb %d4 <== NOT EXECUTED
56790: 6708 beqs 5679a <rtems_rfs_buffer_handle_request+0x1ea><== NOT EXECUTED
56792: 203c 0006 cae3 movel #445155,%d0 <== NOT EXECUTED
56798: 6006 bras 567a0 <rtems_rfs_buffer_handle_request+0x1f0><== NOT EXECUTED
5679a: 203c 0006 cf2c movel #446252,%d0 <== NOT EXECUTED
567a0: 2f09 movel %a1,%sp@- <== NOT EXECUTED
567a2: 2f01 movel %d1,%sp@- <== NOT EXECUTED
567a4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
567a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
567a8: 4879 0006 cff5 pea 6cff5 <CSWTCH.2+0x2b5> <== NOT EXECUTED
567ae: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
567b4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
567b8: 4283 clrl %d3
}
567ba: 2003 movel %d3,%d0
567bc: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
567c2: 4e5e unlk %fp <== NOT EXECUTED
000567c6 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
567c6: 4e56 ffb8 linkw %fp,#-72
567ca: 2f0a movel %a2,%sp@-
567cc: 246e 000c moveal %fp@(12),%a2
567d0: 2f02 movel %d2,%sp@-
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
567d2: 4878 0020 pea 20 <OPER2+0xc>
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
567d6: 242e 0008 movel %fp@(8),%d2
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
567da: 42a7 clrl %sp@-
567dc: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
567e2: 508f addql #8,%sp
567e4: 4a00 tstb %d0
567e6: 6710 beqs 567f8 <rtems_rfs_buffer_open+0x32> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
567e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
567ea: 4879 0006 d030 pea 6d030 <CSWTCH.2+0x2f0> <== NOT EXECUTED
567f0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
567f6: 508f addql #8,%sp <== NOT EXECUTED
fs->device = open (name, O_RDWR);
567f8: 4878 0002 pea 2 <DOUBLE_FLOAT>
567fc: 2f02 movel %d2,%sp@-
567fe: 4eb9 0004 71a0 jsr 471a0 <open>
if (fs->device < 0)
56804: 508f addql #8,%sp
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
fs->device = open (name, O_RDWR);
56806: 2540 000c movel %d0,%a2@(12)
if (fs->device < 0)
5680a: 6c28 bges 56834 <rtems_rfs_buffer_open+0x6e> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
5680c: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
56810: 42a7 clrl %sp@- <== NOT EXECUTED
56812: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56818: 508f addql #8,%sp <== NOT EXECUTED
5681a: 4a00 tstb %d0 <== NOT EXECUTED
5681c: 6602 bnes 56820 <rtems_rfs_buffer_open+0x5a> <== NOT EXECUTED
5681e: 600e bras 5682e <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot open file\n");
56820: 4879 0006 d055 pea 6d055 <CSWTCH.2+0x315> <== NOT EXECUTED
56826: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
5682c: 588f addql #4,%sp <== NOT EXECUTED
return ENXIO;
5682e: 7006 moveq #6,%d0 <== NOT EXECUTED
56830: 6000 00ec braw 5691e <rtems_rfs_buffer_open+0x158> <== NOT EXECUTED
}
if (fstat (fs->device, &st) < 0)
56834: 486e ffba pea %fp@(-70)
56838: 2f00 movel %d0,%sp@-
5683a: 4eb9 0004 63d0 jsr 463d0 <fstat>
56840: 508f addql #8,%sp
56842: 4a80 tstl %d0
56844: 6c38 bges 5687e <rtems_rfs_buffer_open+0xb8> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
56846: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
5684a: 42a7 clrl %sp@- <== NOT EXECUTED
5684c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56852: 508f addql #8,%sp <== NOT EXECUTED
56854: 4a00 tstb %d0 <== NOT EXECUTED
56856: 67d6 beqs 5682e <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
56858: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
}
if (fstat (fs->device, &st) < 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
5685e: 2040 moveal %d0,%a0 <== NOT EXECUTED
56860: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
56862: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56868: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5686a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5686c: 4879 0006 d07e pea 6d07e <CSWTCH.2+0x33e> <== NOT EXECUTED
56872: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56878: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5687c: 60b0 bras 5682e <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
5687e: 202e ffc6 movel %fp@(-58),%d0
56882: 0280 0000 f000 andil #61440,%d0
56888: 0c80 0000 6000 cmpil #24576,%d0
5688e: 6726 beqs 568b6 <rtems_rfs_buffer_open+0xf0> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
56890: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
56894: 42a7 clrl %sp@- <== NOT EXECUTED
56896: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5689c: 508f addql #8,%sp <== NOT EXECUTED
5689e: 4a00 tstb %d0 <== NOT EXECUTED
568a0: 678c beqs 5682e <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
568a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
568a4: 4879 0006 d0ac pea 6d0ac <CSWTCH.2+0x36c> <== NOT EXECUTED
568aa: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
568b0: 508f addql #8,%sp <== NOT EXECUTED
568b2: 6000 ff7a braw 5682e <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
static inline int rtems_disk_fd_get_disk_device(
int fd,
rtems_disk_device **dd_ptr
)
{
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
568b6: 486a 0010 pea %a2@(16)
568ba: 2f3c 4004 4209 movel #1074020873,%sp@-
568c0: 2f2a 000c movel %a2@(12),%sp@-
568c4: 4eb9 0004 652c jsr 4652c <ioctl>
/*
* Check that device is registred as a block device and lock it.
*/
rv = rtems_disk_fd_get_disk_device (fs->device, &fs->disk);
if (rv != 0)
568ca: 4fef 000c lea %sp@(12),%sp
568ce: 41f9 0005 02fc lea 502fc <rtems_rfs_trace>,%a0
568d4: 4a80 tstl %d0
568d6: 671a beqs 568f2 <rtems_rfs_buffer_open+0x12c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
568d8: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
568dc: 42a7 clrl %sp@- <== NOT EXECUTED
568de: 4e90 jsr %a0@ <== NOT EXECUTED
568e0: 508f addql #8,%sp <== NOT EXECUTED
568e2: 4a00 tstb %d0 <== NOT EXECUTED
568e4: 6700 ff48 beqw 5682e <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
568e8: 4879 0006 d0e0 pea 6d0e0 <CSWTCH.2+0x3a0> <== NOT EXECUTED
568ee: 6000 ff36 braw 56826 <rtems_rfs_buffer_open+0x60> <== NOT EXECUTED
#else
fs->media_size = st.st_size;
strcat (fs->name, name);
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
568f2: 4878 0020 pea 20 <OPER2+0xc>
568f6: 42a7 clrl %sp@-
568f8: 4e90 jsr %a0@
568fa: 508f addql #8,%sp
568fc: 4a00 tstb %d0
568fe: 671c beqs 5691c <rtems_rfs_buffer_open+0x156> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n",
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
56900: 206a 0010 moveal %a2@(16),%a0 <== 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",
56904: 2f28 0020 movel %a0@(32),%sp@- <== NOT EXECUTED
56908: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED
5690c: 4879 0006 d10f pea 6d10f <CSWTCH.2+0x3cf> <== NOT EXECUTED
56912: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56918: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
5691c: 4280 clrl %d0
}
5691e: 242e ffb0 movel %fp@(-80),%d2
56922: 246e ffb4 moveal %fp@(-76),%a2
56926: 4e5e unlk %fp <== NOT EXECUTED
00056a34 <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
56a34: 4e56 0000 linkw %fp,#0
56a38: 2f0a movel %a2,%sp@-
56a3a: 246e 0008 moveal %fp@(8),%a2
56a3e: 2f02 movel %d2,%sp@-
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
56a40: 4878 0400 pea 400 <D_BIAS+0x2>
56a44: 42a7 clrl %sp@-
56a46: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56a4c: 508f addql #8,%sp
56a4e: 4a00 tstb %d0
56a50: 6712 beqs 56a64 <rtems_rfs_buffer_setblksize+0x30><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
56a52: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
56a56: 4879 0006 d1d8 pea 6d1d8 <CSWTCH.2+0x498> <== NOT EXECUTED
56a5c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56a62: 508f addql #8,%sp <== NOT EXECUTED
rc = rtems_rfs_buffers_release (fs);
56a64: 2f0a movel %a2,%sp@-
56a66: 4eb9 0005 69b2 jsr 569b2 <rtems_rfs_buffers_release>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
56a6c: 588f addql #4,%sp
int rc;
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);
56a6e: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
56a70: 6f2e bles 56aa0 <rtems_rfs_buffer_setblksize+0x6c><== ALWAYS TAKEN
56a72: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED
56a76: 42a7 clrl %sp@- <== NOT EXECUTED
56a78: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56a7e: 508f addql #8,%sp <== NOT EXECUTED
56a80: 4a00 tstb %d0 <== NOT EXECUTED
56a82: 671c beqs 56aa0 <rtems_rfs_buffer_setblksize+0x6c><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
56a84: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56a86: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56a8c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56a8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56a90: 4879 0006 d207 pea 6d207 <CSWTCH.2+0x4c7> <== NOT EXECUTED
56a96: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56a9c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
56aa0: 2f0a movel %a2,%sp@-
56aa2: 4eb9 0005 692a jsr 5692a <rtems_rfs_buffer_sync>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
56aa8: 588f addql #4,%sp
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",
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
56aaa: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
56aac: 6f2e bles 56adc <rtems_rfs_buffer_setblksize+0xa8><== ALWAYS TAKEN
56aae: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED
56ab2: 42a7 clrl %sp@- <== NOT EXECUTED
56ab4: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56aba: 508f addql #8,%sp <== NOT EXECUTED
56abc: 4a00 tstb %d0 <== NOT EXECUTED
56abe: 671c beqs 56adc <rtems_rfs_buffer_setblksize+0xa8><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
56ac0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56ac2: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56ac8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56aca: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56acc: 4879 0006 d244 pea 6d244 <CSWTCH.2+0x504> <== NOT EXECUTED
56ad2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56ad8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
#if RTEMS_RFS_USE_LIBBLOCK
rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size);
56adc: 206a 0010 moveal %a2@(16),%a0
56ae0: 486e 000c pea %fp@(12)
56ae4: 2f3c 8004 4204 movel #-2147204604,%sp@-
56aea: 2f08 movel %a0,%sp@-
56aec: 2068 0038 moveal %a0@(56),%a0
56af0: 4e90 jsr %a0@
if (rc < 0)
56af2: 4fef 000c lea %sp@(12),%sp
56af6: 4a80 tstl %d0
56af8: 6c0a bges 56b04 <rtems_rfs_buffer_setblksize+0xd0><== ALWAYS TAKEN
rc = errno;
56afa: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
56b00: 2040 moveal %d0,%a0 <== NOT EXECUTED
56b02: 2010 movel %a0@,%d0 <== NOT EXECUTED
#endif
return rc;
}
56b04: 242e fff8 movel %fp@(-8),%d2
56b08: 246e fffc moveal %fp@(-4),%a2
56b0c: 4e5e unlk %fp <== NOT EXECUTED
0005692a <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
5692a: 4e56 0000 linkw %fp,#0
5692e: 2f0a movel %a2,%sp@-
56930: 246e 0008 moveal %fp@(8),%a2
56934: 2f02 movel %d2,%sp@-
int result = 0;
#if RTEMS_RFS_USE_LIBBLOCK
rtems_status_code sc;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
56936: 4878 0020 pea 20 <OPER2+0xc>
5693a: 42a7 clrl %sp@-
5693c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56942: 508f addql #8,%sp
56944: 4a00 tstb %d0
56946: 670e beqs 56956 <rtems_rfs_buffer_sync+0x2c> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-sync: syncing\n");
56948: 4879 0006 d13f pea 6d13f <CSWTCH.2+0x3ff> <== NOT EXECUTED
5694e: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
56954: 588f addql #4,%sp <== 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));
56956: 2f2a 0010 movel %a2@(16),%sp@-
5695a: 4eb9 0005 2256 jsr 52256 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL)
56960: 588f addql #4,%sp
/*
* @todo Split in the separate files for each type.
*/
#if RTEMS_RFS_USE_LIBBLOCK
sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs));
56962: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
56964: 672e beqs 56994 <rtems_rfs_buffer_sync+0x6a> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
56966: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5696a: 42a7 clrl %sp@- <== NOT EXECUTED
5696c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56972: 508f addql #8,%sp <== NOT EXECUTED
56974: 4a00 tstb %d0 <== NOT EXECUTED
56976: 6720 beqs 56998 <rtems_rfs_buffer_sync+0x6e> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
56978: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5697a: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
56980: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56982: 4879 0006 d15f pea 6d15f <CSWTCH.2+0x41f> <== NOT EXECUTED
56988: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5698e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56992: 6004 bras 56998 <rtems_rfs_buffer_sync+0x6e> <== NOT EXECUTED
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
56994: 4282 clrl %d2
56996: 6002 bras 5699a <rtems_rfs_buffer_sync+0x70>
if (sc != RTEMS_SUCCESSFUL)
{
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;
56998: 7405 moveq #5,%d2 <== NOT EXECUTED
}
rtems_disk_release (fs->disk);
5699a: 2f2a 0010 movel %a2@(16),%sp@-
5699e: 4eb9 0004 35bc jsr 435bc <rtems_disk_release>
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
569a4: 246e fffc moveal %fp@(-4),%a2
569a8: 2002 movel %d2,%d0
569aa: 242e fff8 movel %fp@(-8),%d2
569ae: 4e5e unlk %fp <== NOT EXECUTED
000569b2 <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
569b2: 4e56 fff4 linkw %fp,#-12
569b6: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
569ba: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
569be: 246e 0008 moveal %fp@(8),%a2
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
569c2: 42a7 clrl %sp@-
569c4: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
569ca: 508f addql #8,%sp
569cc: 4a00 tstb %d0
569ce: 671c beqs 569ec <rtems_rfs_buffers_release+0x3a> <== ALWAYS TAKEN
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
569d0: 2f2a 0070 movel %a2@(112),%sp@- <== NOT EXECUTED
569d4: 2f2a 0060 movel %a2@(96),%sp@- <== NOT EXECUTED
569d8: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED
569dc: 4879 0006 d18f pea 6d18f <CSWTCH.2+0x44f> <== NOT EXECUTED
569e2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
569e8: 4fef 0010 lea %sp@(16),%sp <== 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,
569ec: 42a7 clrl %sp@-
569ee: 486a 0060 pea %a2@(96)
569f2: 47fa f8e0 lea %pc@(562d4 <rtems_rfs_release_chain>),%a3
569f6: 486a 0054 pea %a2@(84)
569fa: 4e93 jsr %a3@
569fc: 4fef 000c lea %sp@(12),%sp
56a00: 2200 movel %d0,%d1
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
56a02: 4878 0001 pea 1 <ADD>
56a06: 4681 notl %d1
56a08: 486a 0070 pea %a2@(112)
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,
56a0c: 2400 movel %d0,%d2
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
56a0e: 486a 0064 pea %a2@(100)
56a12: d281 addl %d1,%d1
56a14: 9381 subxl %d1,%d1
56a16: c481 andl %d1,%d2
56a18: 4e93 jsr %a3@
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
56a1a: 4fef 000c lea %sp@(12),%sp
56a1e: 4a80 tstl %d0
56a20: 6f06 bles 56a28 <rtems_rfs_buffers_release+0x76> <== ALWAYS TAKEN
56a22: 4a82 tstl %d2 <== NOT EXECUTED
56a24: 6602 bnes 56a28 <rtems_rfs_buffers_release+0x76> <== NOT EXECUTED
56a26: 2400 movel %d0,%d2 <== NOT EXECUTED
rrc = rc;
return rrc;
}
56a28: 2002 movel %d2,%d0
56a2a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
56a30: 4e5e unlk %fp <== NOT EXECUTED
00057056 <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)
{
57056: 4e56 ff6c linkw %fp,#-148
5705a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%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))
5705e: 2f3c 2000 0000 movel #536870912,%sp@-
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)
{
57064: 266e 0008 moveal %fp@(8),%a3
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))
57068: 42a7 clrl %sp@-
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)
{
5706a: 286e 000c moveal %fp@(12),%a4
5706e: 2a2e 0010 movel %fp@(16),%d5
57072: 282e 0014 movel %fp@(20),%d4
57076: 2c2e 0018 movel %fp@(24),%d6
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))
5707a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
57080: 508f addql #8,%sp
57082: 4a00 tstb %d0
57084: 673e beqs 570c4 <rtems_rfs_dir_add_entry+0x6e> <== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
57086: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
int
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
5708a: 2405 movel %d5,%d2 <== 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=",
5708c: 4879 0006 d5b9 pea 6d5b9 <CSWTCH.2+0x879> <== NOT EXECUTED
57092: 2445 moveal %d5,%a2 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
int
rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs,
57094: d484 addl %d4,%d2 <== NOT EXECUTED
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
printf ("%c", name[c]);
57096: 4bf9 0005 c440 lea 5c440 <putchar>,%a5 <== 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=",
5709c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
570a2: 508f addql #8,%sp <== NOT EXECUTED
570a4: 600a bras 570b0 <rtems_rfs_dir_add_entry+0x5a> <== NOT EXECUTED
printf ("%c", name[c]);
570a6: 101a moveb %a2@+,%d0 <== NOT EXECUTED
570a8: 49c0 extbl %d0 <== NOT EXECUTED
570aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED
570ac: 4e95 jsr %a5@ <== NOT EXECUTED
570ae: 588f addql #4,%sp <== 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++)
570b0: b48a cmpl %a2,%d2 <== NOT EXECUTED
570b2: 66f2 bnes 570a6 <rtems_rfs_dir_add_entry+0x50> <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
570b4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
570b6: 4879 0006 d5e2 pea 6d5e2 <CSWTCH.2+0x8a2> <== NOT EXECUTED
570bc: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
570c2: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
570c4: 4bee ffb6 lea %fp@(-74),%a5
570c8: 2f0d movel %a5,%sp@-
570ca: 2f0c movel %a4,%sp@-
570cc: 2f0b movel %a3,%sp@-
570ce: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open>
if (rc > 0)
570d4: 4fef 000c lea %sp@(12),%sp
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%zd\n", length);
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
570d8: 2400 movel %d0,%d2
if (rc > 0)
570da: 6e00 02ba bgtw 57396 <rtems_rfs_dir_add_entry+0x340>
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) <
570de: 2044 moveal %d4,%a0
570e0: 41e8 000a lea %a0@(10),%a0
/*
* 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);
570e4: 2e0e movel %fp,%d7
570e6: 0687 ffff ff9c addil #-100,%d7
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
570ec: 4201 clrb %d1
handle->bnum = 0;
570ee: 42ae ffa2 clrl %fp@(-94)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
570f2: 1d41 ffa0 moveb %d1,%fp@(-96)
handle->bnum = 0;
handle->buffer = NULL;
570f6: 42ae ffa6 clrl %fp@(-90)
* @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;
570fa: 42ae ffaa clrl %fp@(-86)
bpos->boff = 0;
570fe: 42ae ffae clrl %fp@(-82)
bpos->block = 0;
57102: 42ae ffb2 clrl %fp@(-78)
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) <
57106: 2d48 ff98 movel %a0,%fp@(-104)
/*
* 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);
5710a: 2f07 movel %d7,%sp@-
5710c: 486e ffaa pea %fp@(-86)
57110: 2f0d movel %a5,%sp@-
57112: 2f0b movel %a3,%sp@-
57114: 4eb9 0005 5bd6 jsr 55bd6 <rtems_rfs_block_map_find>
if (rc > 0)
5711a: 4fef 0010 lea %sp@(16),%sp
/*
* 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);
5711e: 2400 movel %d0,%d2
if (rc > 0)
57120: 6f00 0088 blew 571aa <rtems_rfs_dir_add_entry+0x154>
{
if (rc != ENXIO)
57124: 7006 moveq #6,%d0
57126: b082 cmpl %d2,%d0
57128: 672e beqs 57158 <rtems_rfs_dir_add_entry+0x102> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5712a: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57130: 42a7 clrl %sp@- <== NOT EXECUTED
57132: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57138: 508f addql #8,%sp <== NOT EXECUTED
5713a: 4a00 tstb %d0 <== NOT EXECUTED
5713c: 6700 023e beqw 5737c <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57140: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57142: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
57148: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5714a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5714c: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57150: 4879 0006 d5ed pea 6d5ed <CSWTCH.2+0x8ad> <== NOT EXECUTED
57156: 6044 bras 5719c <rtems_rfs_dir_add_entry+0x146> <== NOT EXECUTED
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
57158: 2f07 movel %d7,%sp@-
5715a: 4878 0001 pea 1 <ADD>
5715e: 2f0d movel %a5,%sp@-
57160: 2f0b movel %a3,%sp@-
57162: 4eb9 0005 5d72 jsr 55d72 <rtems_rfs_block_map_grow>
if (rc > 0)
57168: 4fef 0010 lea %sp@(16),%sp
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
5716c: 2400 movel %d0,%d2
if (rc > 0)
5716e: 6f3e bles 571ae <rtems_rfs_dir_add_entry+0x158> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
57170: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57176: 42a7 clrl %sp@- <== NOT EXECUTED
57178: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5717e: 508f addql #8,%sp <== NOT EXECUTED
57180: 4a00 tstb %d0 <== NOT EXECUTED
57182: 6700 01f8 beqw 5737c <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57186: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57188: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
5718e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57190: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57192: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57196: 4879 0006 d632 pea 6d632 <CSWTCH.2+0x8f2> <== NOT EXECUTED
5719c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
571a2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
571a6: 6000 01d4 braw 5737c <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
571aa: 7601 moveq #1,%d3 <== NOT EXECUTED
571ac: 6002 bras 571b0 <rtems_rfs_dir_add_entry+0x15a> <== NOT EXECUTED
"block map grow failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
read = false;
571ae: 4203 clrb %d3
}
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
571b0: 7201 moveq #1,%d1
}
read = false;
}
bpos.bno++;
571b2: 52ae ffaa addql #1,%fp@(-86)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
571b6: c283 andl %d3,%d1
571b8: 2f01 movel %d1,%sp@-
571ba: 2f2e ff9c movel %fp@(-100),%sp@-
571be: 486e ffa0 pea %fp@(-96)
571c2: 2f0b movel %a3,%sp@-
571c4: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request>
if (rc > 0)
571ca: 4fef 0010 lea %sp@(16),%sp
read = false;
}
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
571ce: 2400 movel %d0,%d2
if (rc > 0)
571d0: 6f2e bles 57200 <rtems_rfs_dir_add_entry+0x1aa> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
571d2: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
571d8: 42a7 clrl %sp@- <== NOT EXECUTED
571da: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
571e0: 508f addql #8,%sp <== NOT EXECUTED
571e2: 4a00 tstb %d0 <== NOT EXECUTED
571e4: 6700 0196 beqw 5737c <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
571e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
571ea: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
571f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
571f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
571f4: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
571f8: 4879 0006 d677 pea 6d677 <CSWTCH.2+0x937> <== NOT EXECUTED
571fe: 609c bras 5719c <rtems_rfs_dir_add_entry+0x146> <== NOT EXECUTED
"block buffer req failed for ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (dir), rc, strerror (rc));
break;
}
entry = rtems_rfs_buffer_data (&buffer);
57200: 206e ffa6 moveal %fp@(-90),%a0
57204: 2468 001a moveal %a0@(26),%a2
if (!read)
57208: 4a03 tstb %d3
5720a: 6614 bnes 57220 <rtems_rfs_dir_add_entry+0x1ca> <== NEVER TAKEN
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
5720c: 2f2b 0008 movel %a3@(8),%sp@-
57210: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
57214: 2f0a movel %a2,%sp@-
57216: 4eb9 0005 c160 jsr 5c160 <memset>
5721c: 4fef 000c lea %sp@(12),%sp
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57220: 206b 0008 moveal %a3@(8),%a0
entry = rtems_rfs_buffer_data (&buffer);
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
offset = 0;
57224: 4281 clrl %d1
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57226: 43e8 fff6 lea %a0@(-10),%a1
5722a: 6000 0146 braw 57372 <rtems_rfs_dir_add_entry+0x31c>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
5722e: 4283 clrl %d3
57230: 162a 0008 moveb %a2@(8),%d3
57234: 4280 clrl %d0
57236: 102a 0009 moveb %a2@(9),%d0
eino = rtems_rfs_dir_entry_ino (entry);
5723a: 4282 clrl %d2
5723c: 1412 moveb %a2@,%d2
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);
5723e: e18b lsll #8,%d3
57240: 8680 orl %d0,%d3
eino = rtems_rfs_dir_entry_ino (entry);
57242: 7018 moveq #24,%d0
57244: e1aa lsll %d0,%d2
57246: 4280 clrl %d0
57248: 102a 0001 moveb %a2@(1),%d0
5724c: 4840 swap %d0
5724e: 4240 clrw %d0
57250: 8480 orl %d0,%d2
57252: 4280 clrl %d0
57254: 102a 0003 moveb %a2@(3),%d0
57258: 8480 orl %d0,%d2
5725a: 102a 0002 moveb %a2@(2),%d0
5725e: e188 lsll #8,%d0
57260: 8480 orl %d0,%d2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
57262: 0c83 0000 ffff cmpil #65535,%d3
57268: 6600 009a bnew 57304 <rtems_rfs_dir_add_entry+0x2ae>
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
5726c: 91c1 subal %d1,%a0
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) <
5726e: b1ee ff98 cmpal %fp@(-104),%a0
57272: 6300 fe96 blsw 5710a <rtems_rfs_dir_add_entry+0xb4>
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
57276: 2f04 movel %d4,%sp@-
rtems_rfs_dir_set_entry_hash (entry, hash);
57278: 7418 moveq #24,%d2
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
5727a: 2f05 movel %d5,%sp@-
5727c: 4eb9 0005 ad90 jsr 5ad90 <rtems_rfs_dir_hash>
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
57282: 1546 0003 moveb %d6,%a2@(3)
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);
57286: 2200 movel %d0,%d1
57288: e4a9 lsrl %d2,%d1
5728a: 1541 0004 moveb %d1,%a2@(4)
5728e: 2200 movel %d0,%d1
57290: 4241 clrw %d1
57292: 4841 swap %d1
57294: 1540 0007 moveb %d0,%a2@(7)
57298: 1541 0005 moveb %d1,%a2@(5)
5729c: 2200 movel %d0,%d1
rtems_rfs_dir_set_entry_ino (entry, ino);
5729e: 2006 movel %d6,%d0
572a0: e4a8 lsrl %d2,%d0
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);
572a2: e089 lsrl #8,%d1
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
572a4: 4202 clrb %d2
(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);
572a6: 1480 moveb %d0,%a2@
572a8: 2006 movel %d6,%d0
572aa: 4240 clrw %d0
572ac: 4840 swap %d0
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);
572ae: 1541 0006 moveb %d1,%a2@(6)
rtems_rfs_dir_set_entry_ino (entry, ino);
572b2: 1540 0001 moveb %d0,%a2@(1)
572b6: 2006 movel %d6,%d0
572b8: e088 lsrl #8,%d0
572ba: 1540 0002 moveb %d0,%a2@(2)
rtems_rfs_dir_set_entry_length (entry,
572be: 2004 movel %d4,%d0
572c0: 0680 0000 000a addil #10,%d0
572c6: 2200 movel %d0,%d1
572c8: e089 lsrl #8,%d1
572ca: 1540 0009 moveb %d0,%a2@(9)
572ce: 1541 0008 moveb %d1,%a2@(8)
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
572d2: 2f04 movel %d4,%sp@-
572d4: 2f05 movel %d5,%sp@-
572d6: 486a 000a pea %a2@(10)
572da: 4eb9 0005 bffc jsr 5bffc <memcpy>
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
572e0: 486e ffa0 pea %fp@(-96)
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
rtems_rfs_buffer_mark_dirty (&buffer);
572e4: 7001 moveq #1,%d0
rtems_rfs_buffer_handle_close (fs, &buffer);
572e6: 2f0b movel %a3,%sp@-
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
rtems_rfs_dir_set_entry_length (entry,
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
rtems_rfs_buffer_mark_dirty (&buffer);
572e8: 1d40 ffa0 moveb %d0,%fp@(-96)
rtems_rfs_buffer_handle_close (fs, &buffer);
572ec: 4eba f8ea jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)
rtems_rfs_block_map_close (fs, &map);
572f0: 486e ffb6 pea %fp@(-74)
572f4: 2f0b movel %a3,%sp@-
572f6: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close>
572fc: 4fef 0024 lea %sp@(36),%sp
57300: 6000 0094 braw 57396 <rtems_rfs_dir_add_entry+0x340>
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
57304: 700a moveq #10,%d0 <== NOT EXECUTED
57306: b083 cmpl %d3,%d0 <== NOT EXECUTED
57308: 6c10 bges 5731a <rtems_rfs_dir_add_entry+0x2c4> <== NOT EXECUTED
5730a: b6ab 001c cmpl %a3@(28),%d3 <== NOT EXECUTED
5730e: 640a bccs 5731a <rtems_rfs_dir_add_entry+0x2c4> <== NOT EXECUTED
57310: 4a82 tstl %d2 <== NOT EXECUTED
57312: 6706 beqs 5731a <rtems_rfs_dir_add_entry+0x2c4> <== NOT EXECUTED
57314: b4ab 0014 cmpl %a3@(20),%d2 <== NOT EXECUTED
57318: 6354 blss 5736e <rtems_rfs_dir_add_entry+0x318> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
5731a: 2d41 ff94 movel %d1,%fp@(-108) <== NOT EXECUTED
5731e: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57324: 42a7 clrl %sp@- <== NOT EXECUTED
57326: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5732c: 222e ff94 movel %fp@(-108),%d1 <== NOT EXECUTED
57330: 508f addql #8,%sp <== NOT EXECUTED
57332: 4a00 tstb %d0 <== NOT EXECUTED
57334: 671a beqs 57350 <rtems_rfs_dir_add_entry+0x2fa> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57336: 2f01 movel %d1,%sp@- <== NOT EXECUTED
57338: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5733a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5733c: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57340: 4879 0006 d6be pea 6d6be <CSWTCH.2+0x97e> <== NOT EXECUTED
57346: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5734c: 4fef 0014 lea %sp@(20),%sp <== 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);
57350: 486e ffa0 pea %fp@(-96) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return EIO;
57354: 7405 moveq #5,%d2 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
printf ("rtems-rfs: dir-add-entry: "
"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);
57356: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57358: 4eba f87e jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
5735c: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57360: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57362: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57368: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5736c: 6028 bras 57396 <rtems_rfs_dir_add_entry+0x340> <== NOT EXECUTED
return EIO;
}
entry += elength;
5736e: d5c3 addal %d3,%a2 <== NOT EXECUTED
offset += elength;
57370: d283 addl %d3,%d1 <== NOT EXECUTED
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))
57372: b3c1 cmpal %d1,%a1
57374: 6200 feb8 bhiw 5722e <rtems_rfs_dir_add_entry+0x1d8>
57378: 6000 fd90 braw 5710a <rtems_rfs_dir_add_entry+0xb4> <== NOT EXECUTED
entry += elength;
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
5737c: 486e ffa0 pea %fp@(-96) <== NOT EXECUTED
57380: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57382: 4eba f854 jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57386: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
5738a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5738c: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57392: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return rc;
}
57396: 2002 movel %d2,%d0
57398: 4cee 3cfc ff6c moveml %fp@(-148),%d2-%d7/%a2-%a5
5739e: 4e5e unlk %fp <== NOT EXECUTED
000573a2 <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)
{
573a2: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED
573a6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
573aa: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
573b0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
573b4: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir,
rtems_rfs_ino ino,
uint32_t offset)
{
573b6: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
rtems_rfs_block_no block;
rtems_rfs_buffer_handle buffer;
bool search;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
573ba: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
573c0: 508f addql #8,%sp <== NOT EXECUTED
573c2: 4a00 tstb %d0 <== NOT EXECUTED
573c4: 671c beqs 573e2 <rtems_rfs_dir_del_entry+0x40> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
573c6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
573ca: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
573ce: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
573d2: 4879 0006 d706 pea 6d706 <CSWTCH.2+0x9c6> <== NOT EXECUTED
573d8: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
573de: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
573e2: 260e movel %fp,%d3 <== NOT EXECUTED
573e4: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
573ea: 2f03 movel %d3,%sp@- <== NOT EXECUTED
573ec: 2f0c movel %a4,%sp@- <== NOT EXECUTED
573ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
573f0: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
573f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
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);
573fa: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
573fc: 6e00 02ea bgtw 576e8 <rtems_rfs_dir_del_entry+0x346> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
57400: 280e movel %fp,%d4 <== NOT EXECUTED
57402: 0684 ffff ffa8 addil #-88,%d4 <== NOT EXECUTED
57408: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5740a: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5740e: 42a7 clrl %sp@- <== NOT EXECUTED
57410: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57412: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57414: 4eb9 0005 5cc2 jsr 55cc2 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
5741a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
5741e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57420: 6f1a bles 5743c <rtems_rfs_dir_del_entry+0x9a> <== NOT EXECUTED
{
if (rc == ENXIO)
57422: 7006 moveq #6,%d0 <== NOT EXECUTED
57424: b082 cmpl %d2,%d0 <== NOT EXECUTED
57426: 6602 bnes 5742a <rtems_rfs_dir_del_entry+0x88> <== NOT EXECUTED
rc = ENOENT;
57428: 7402 moveq #2,%d2 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
5742a: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
5742e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57430: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57436: 508f addql #8,%sp <== NOT EXECUTED
57438: 6000 02ae braw 576e8 <rtems_rfs_dir_del_entry+0x346> <== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
5743c: 4aae 0014 tstl %fp@(20) <== NOT EXECUTED
57440: 57c7 seq %d7 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
57442: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
57444: 42ae ffae clrl %fp@(-82) <== NOT EXECUTED
57448: 4487 negl %d7 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
5744a: 4282 clrl %d2 <== NOT EXECUTED
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_DEL_ENTRY))
5744c: 4bf9 0005 02fc lea 502fc <rtems_rfs_trace>,%a5 <== NOT EXECUTED
handle->buffer = NULL;
57452: 42ae ffb2 clrl %fp@(-78) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
57456: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
5745a: 6000 0262 braw 576be <rtems_rfs_dir_del_entry+0x31c> <== NOT EXECUTED
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5745e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57462: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57466: 486e ffac pea %fp@(-84) <== NOT EXECUTED
5746a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5746c: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
57472: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
while (rc == 0)
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57476: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
57478: 6f3a bles 574b4 <rtems_rfs_dir_del_entry+0x112> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5747a: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
57480: 42a7 clrl %sp@- <== NOT EXECUTED
57482: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57488: 508f addql #8,%sp <== NOT EXECUTED
5748a: 4a00 tstb %d0 <== NOT EXECUTED
5748c: 6700 0238 beqw 576c6 <rtems_rfs_dir_del_entry+0x324> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
57490: 2f05 movel %d5,%sp@- <== NOT EXECUTED
57492: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
57498: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5749a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5749c: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
574a0: 4879 0006 d73f pea 6d73f <CSWTCH.2+0x9ff> <== NOT EXECUTED
574a6: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
574ac: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
574b0: 6000 0214 braw 576c6 <rtems_rfs_dir_del_entry+0x324> <== 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)
574b4: 4a07 tstb %d7 <== NOT EXECUTED
574b6: 660c bnes 574c4 <rtems_rfs_dir_del_entry+0x122> <== NOT EXECUTED
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
574b8: 202e 0014 movel %fp@(20),%d0 <== NOT EXECUTED
574bc: 4c6a 0006 0008 remul %a2@(8),%d6,%d0 <== NOT EXECUTED
574c2: 6002 bras 574c6 <rtems_rfs_dir_del_entry+0x124> <== NOT EXECUTED
/*
* If we are searching start at the beginning of the block. If not searching
* skip to the offset in the block.
*/
if (search)
eoffset = 0;
574c4: 4286 clrl %d6 <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
574c6: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
574ca: 2668 001a moveal %a0@(26),%a3 <== NOT EXECUTED
574ce: d7c6 addal %d6,%a3 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
574d0: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED
574d4: 43e8 fff6 lea %a0@(-10),%a1 <== NOT EXECUTED
574d8: 6000 01b8 braw 57692 <rtems_rfs_dir_del_entry+0x2f0> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
574dc: 4283 clrl %d3 <== NOT EXECUTED
574de: 162b 0008 moveb %a3@(8),%d3 <== NOT EXECUTED
574e2: 4280 clrl %d0 <== NOT EXECUTED
574e4: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
574e8: 4284 clrl %d4 <== NOT EXECUTED
574ea: 1813 moveb %a3@,%d4 <== 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);
574ec: e18b lsll #8,%d3 <== NOT EXECUTED
574ee: 8680 orl %d0,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
574f0: 7018 moveq #24,%d0 <== NOT EXECUTED
574f2: e1ac lsll %d0,%d4 <== NOT EXECUTED
574f4: 4280 clrl %d0 <== NOT EXECUTED
574f6: 102b 0001 moveb %a3@(1),%d0 <== NOT EXECUTED
574fa: 4840 swap %d0 <== NOT EXECUTED
574fc: 4240 clrw %d0 <== NOT EXECUTED
574fe: 8880 orl %d0,%d4 <== NOT EXECUTED
57500: 4280 clrl %d0 <== NOT EXECUTED
57502: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED
57506: 8880 orl %d0,%d4 <== NOT EXECUTED
57508: 102b 0002 moveb %a3@(2),%d0 <== NOT EXECUTED
5750c: e188 lsll #8,%d0 <== NOT EXECUTED
5750e: 8880 orl %d0,%d4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
57510: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED
57516: 6700 0180 beqw 57698 <rtems_rfs_dir_del_entry+0x2f6> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
5751a: 700a moveq #10,%d0 <== NOT EXECUTED
5751c: b083 cmpl %d3,%d0 <== NOT EXECUTED
5751e: 6c10 bges 57530 <rtems_rfs_dir_del_entry+0x18e> <== NOT EXECUTED
57520: b6aa 001c cmpl %a2@(28),%d3 <== NOT EXECUTED
57524: 640a bccs 57530 <rtems_rfs_dir_del_entry+0x18e> <== NOT EXECUTED
57526: 4a84 tstl %d4 <== NOT EXECUTED
57528: 6706 beqs 57530 <rtems_rfs_dir_del_entry+0x18e> <== NOT EXECUTED
5752a: b8aa 0014 cmpl %a2@(20),%d4 <== NOT EXECUTED
5752e: 6334 blss 57564 <rtems_rfs_dir_del_entry+0x1c2> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57530: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
57536: 42a7 clrl %sp@- <== NOT EXECUTED
57538: 4e95 jsr %a5@ <== NOT EXECUTED
5753a: 508f addql #8,%sp <== NOT EXECUTED
5753c: 4a00 tstb %d0 <== NOT EXECUTED
5753e: 6700 01a4 beqw 576e4 <rtems_rfs_dir_del_entry+0x342> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
57542: 2f06 movel %d6,%sp@- <== NOT EXECUTED
57544: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57548: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5754a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5754c: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57550: 4879 0006 d786 pea 6d786 <CSWTCH.2+0xa46> <== NOT EXECUTED
57556: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5755c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
57560: 6000 0182 braw 576e4 <rtems_rfs_dir_del_entry+0x342> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
57564: b8ae 0010 cmpl %fp@(16),%d4 <== NOT EXECUTED
57568: 6600 0120 bnew 5768a <rtems_rfs_dir_del_entry+0x2e8> <== NOT EXECUTED
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
5756c: 2006 movel %d6,%d0 <== NOT EXECUTED
5756e: 2808 movel %a0,%d4 <== NOT EXECUTED
57570: d083 addl %d3,%d0 <== NOT EXECUTED
57572: 9880 subl %d0,%d4 <== NOT EXECUTED
memmove (entry, entry + elength, remaining);
57574: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57576: 4873 3800 pea %a3@(00000000,%d3:l) <== NOT EXECUTED
5757a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5757c: 4eb9 0005 c06c jsr 5c06c <memmove> <== NOT EXECUTED
memset (entry + remaining, 0xff, elength);
57582: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57584: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
57588: 4873 4800 pea %a3@(00000000,%d4:l) <== NOT EXECUTED
* 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);
5758c: 4283 clrl %d3 <== 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);
memset (entry + remaining, 0xff, elength);
5758e: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
* 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);
57594: 4280 clrl %d0 <== NOT EXECUTED
57596: 162b 0008 moveb %a3@(8),%d3 <== NOT EXECUTED
5759a: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
5759e: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
* 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);
575a4: e18b lsll #8,%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
575a6: 42a7 clrl %sp@- <== NOT EXECUTED
* 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);
575a8: 8680 orl %d0,%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
575aa: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
575b0: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
575b4: 4a00 tstb %d0 <== NOT EXECUTED
575b6: 6742 beqs 575fa <rtems_rfs_dir_del_entry+0x258> <== NOT EXECUTED
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");
575b8: 202e ffc4 movel %fp@(-60),%d0 <== 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: "
575bc: 660e bnes 575cc <rtems_rfs_dir_del_entry+0x22a> <== 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");
575be: 4aae ffbc tstl %fp@(-68) <== NOT EXECUTED
575c2: 6608 bnes 575cc <rtems_rfs_dir_del_entry+0x22a> <== 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: "
575c4: 203c 0006 c63c movel #443964,%d0 <== NOT EXECUTED
575ca: 6010 bras 575dc <rtems_rfs_dir_del_entry+0x23a> <== 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");
575cc: 206e ffbc moveal %fp@(-68),%a0 <== NOT EXECUTED
575d0: 5388 subql #1,%a0 <== NOT EXECUTED
575d2: b1c0 cmpal %d0,%a0 <== NOT EXECUTED
575d4: 67ee beqs 575c4 <rtems_rfs_dir_del_entry+0x222> <== 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: "
575d6: 203c 0006 ca77 movel #445047,%d0 <== NOT EXECUTED
575dc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
575de: 2f06 movel %d6,%sp@- <== NOT EXECUTED
575e0: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
575e4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
575e6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
575ea: 4879 0006 d7d2 pea 6d7d2 <CSWTCH.2+0xa92> <== NOT EXECUTED
575f0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
575f6: 4fef 0018 lea %sp@(24),%sp <== 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) &&
575fa: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED
57600: 6666 bnes 57668 <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
57602: 4a86 tstl %d6 <== NOT EXECUTED
57604: 6662 bnes 57668 <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
57606: 202e ffc4 movel %fp@(-60),%d0 <== NOT EXECUTED
5760a: 6606 bnes 57612 <rtems_rfs_dir_del_entry+0x270> <== NOT EXECUTED
5760c: 4aae ffbc tstl %fp@(-68) <== NOT EXECUTED
57610: 670a beqs 5761c <rtems_rfs_dir_del_entry+0x27a> <== NOT EXECUTED
57612: 222e ffbc movel %fp@(-68),%d1 <== NOT EXECUTED
57616: 5381 subql #1,%d1 <== NOT EXECUTED
57618: b280 cmpl %d0,%d1 <== NOT EXECUTED
5761a: 664c bnes 57668 <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
5761c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57620: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57624: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57626: 4eb9 0005 6046 jsr 56046 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
if (rc > 0)
5762c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_block_map_last (&map) ? "yes" : "no");
if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) &&
(eoffset == 0) && rtems_rfs_block_map_last (&map))
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
57630: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
57632: 6f34 bles 57668 <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57634: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
5763a: 42a7 clrl %sp@- <== NOT EXECUTED
5763c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57642: 508f addql #8,%sp <== NOT EXECUTED
57644: 4a00 tstb %d0 <== NOT EXECUTED
57646: 6720 beqs 57668 <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
57648: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5764a: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
57650: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57652: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57654: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57658: 4879 0006 d831 pea 6d831 <CSWTCH.2+0xaf1> <== NOT EXECUTED
5765e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57664: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), rc, strerror (rc));
}
}
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
57668: 486e ffac pea %fp@(-84) <== 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);
5766c: 7001 moveq #1,%d0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
5766e: 2f0a movel %a2,%sp@- <== 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);
57670: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
57674: 4eba f562 jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57678: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
5767c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5767e: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57684: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57688: 605e bras 576e8 <rtems_rfs_dir_del_entry+0x346> <== NOT EXECUTED
return 0;
}
if (!search)
5768a: 4a07 tstb %d7 <== NOT EXECUTED
5768c: 6756 beqs 576e4 <rtems_rfs_dir_del_entry+0x342> <== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
5768e: d7c3 addal %d3,%a3 <== NOT EXECUTED
eoffset += elength;
57690: dc83 addl %d3,%d6 <== 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))
57692: b3c6 cmpal %d6,%a1 <== NOT EXECUTED
57694: 6200 fe46 bhiw 574dc <rtems_rfs_dir_del_entry+0x13a> <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
57698: 4a85 tstl %d5 <== NOT EXECUTED
5769a: 6620 bnes 576bc <rtems_rfs_dir_del_entry+0x31a> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5769c: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
576a0: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
576a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
576a6: 4eb9 0005 5d40 jsr 55d40 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
576ac: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
576b0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc == ENXIO)
576b2: 7006 moveq #6,%d0 <== NOT EXECUTED
576b4: b082 cmpl %d2,%d0 <== NOT EXECUTED
576b6: 6606 bnes 576be <rtems_rfs_dir_del_entry+0x31c> <== NOT EXECUTED
rc = ENOENT;
576b8: 7402 moveq #2,%d2 <== NOT EXECUTED
576ba: 6008 bras 576c4 <rtems_rfs_dir_del_entry+0x322> <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
576bc: 2405 movel %d5,%d2 <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
576be: 4a82 tstl %d2 <== NOT EXECUTED
576c0: 6700 fd9c beqw 5745e <rtems_rfs_dir_del_entry+0xbc> <== NOT EXECUTED
576c4: 2a02 movel %d2,%d5 <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
576c6: 486e ffac pea %fp@(-84) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
576ca: 2405 movel %d5,%d2 <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
576cc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
576ce: 4eba f508 jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
576d2: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
576d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
576d8: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
576de: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
576e2: 6004 bras 576e8 <rtems_rfs_dir_del_entry+0x346> <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
576e4: 7a05 moveq #5,%d5 <== NOT EXECUTED
576e6: 60d4 bras 576bc <rtems_rfs_dir_del_entry+0x31a> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
576e8: 2002 movel %d2,%d0 <== NOT EXECUTED
576ea: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED
576f0: 4e5e unlk %fp <== NOT EXECUTED
00057a3a <rtems_rfs_dir_empty>:
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
57a3a: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED
57a3e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
57a42: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
57a48: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
57a4c: 42a7 clrl %sp@- <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
57a4e: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
rtems_rfs_buffer_handle buffer;
rtems_rfs_block_no block;
bool empty;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
57a52: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57a58: 508f addql #8,%sp <== NOT EXECUTED
57a5a: 4a00 tstb %d0 <== NOT EXECUTED
57a5c: 6712 beqs 57a70 <rtems_rfs_dir_empty+0x36> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
57a5e: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
57a62: 4879 0006 d951 pea 6d951 <CSWTCH.2+0xc11> <== NOT EXECUTED
57a68: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57a6e: 508f addql #8,%sp <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
57a70: 260e movel %fp,%d3 <== NOT EXECUTED
57a72: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
57a78: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57a7a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57a7c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57a7e: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
57a84: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
57a88: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57a8a: 6e00 0186 bgtw 57c12 <rtems_rfs_dir_empty+0x1d8> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
57a8e: 2a0e movel %fp,%d5 <== NOT EXECUTED
57a90: 0685 ffff ffa8 addil #-88,%d5 <== NOT EXECUTED
57a96: 2f05 movel %d5,%sp@- <== NOT EXECUTED
57a98: 42a7 clrl %sp@- <== NOT EXECUTED
57a9a: 42a7 clrl %sp@- <== NOT EXECUTED
57a9c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57a9e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57aa0: 4eb9 0005 5cc2 jsr 55cc2 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
57aa6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
57aaa: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57aac: 6f10 bles 57abe <rtems_rfs_dir_empty+0x84> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
57aae: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57ab0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57ab2: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57ab8: 508f addql #8,%sp <== NOT EXECUTED
57aba: 6000 0156 braw 57c12 <rtems_rfs_dir_empty+0x1d8> <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57abe: 2c0e movel %fp,%d6 <== NOT EXECUTED
57ac0: 0686 ffff ffac addil #-84,%d6 <== NOT EXECUTED
57ac6: 49f9 0005 65b0 lea 565b0 <rtems_rfs_buffer_handle_request>,%a4<== NOT EXECUTED
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))
57acc: 4bf9 0005 02fc lea 502fc <rtems_rfs_trace>,%a5 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
57ad2: 2e03 movel %d3,%d7 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
57ad4: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
57ad6: 42ae ffae clrl %fp@(-82) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
57ada: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
57ade: 42ae ffb2 clrl %fp@(-78) <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57ae2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57ae6: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57aea: 2f06 movel %d6,%sp@- <== NOT EXECUTED
57aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57aee: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
57af0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57af4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57af6: 6e00 00e4 bgtw 57bdc <rtems_rfs_dir_empty+0x1a2> <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
57afa: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
offset = 0;
57afe: 4285 clrl %d5 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57b00: 226a 0008 moveal %a2@(8),%a1 <== NOT EXECUTED
57b04: 43e9 fff6 lea %a1@(-10),%a1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
57b08: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57b0c: 6000 00b2 braw 57bc0 <rtems_rfs_dir_empty+0x186> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
57b10: 4283 clrl %d3 <== NOT EXECUTED
57b12: 1628 0008 moveb %a0@(8),%d3 <== NOT EXECUTED
57b16: 4280 clrl %d0 <== NOT EXECUTED
57b18: 1028 0009 moveb %a0@(9),%d0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
57b1c: 4284 clrl %d4 <== NOT EXECUTED
57b1e: 1810 moveb %a0@,%d4 <== NOT EXECUTED
57b20: 7218 moveq #24,%d1 <== NOT EXECUTED
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);
57b22: e18b lsll #8,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
57b24: e3ac lsll %d1,%d4 <== NOT EXECUTED
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);
57b26: 8680 orl %d0,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
57b28: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED
57b2c: 4840 swap %d0 <== NOT EXECUTED
57b2e: 4240 clrw %d0 <== NOT EXECUTED
57b30: 8880 orl %d0,%d4 <== NOT EXECUTED
57b32: 4280 clrl %d0 <== NOT EXECUTED
57b34: 1028 0003 moveb %a0@(3),%d0 <== NOT EXECUTED
57b38: 8880 orl %d0,%d4 <== NOT EXECUTED
57b3a: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
57b3e: e188 lsll #8,%d0 <== NOT EXECUTED
57b40: 8880 orl %d0,%d4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
57b42: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED
57b48: 6700 00ae beqw 57bf8 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
57b4c: 700a moveq #10,%d0 <== NOT EXECUTED
57b4e: b083 cmpl %d3,%d0 <== NOT EXECUTED
57b50: 6c10 bges 57b62 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
57b52: b6aa 001c cmpl %a2@(28),%d3 <== NOT EXECUTED
57b56: 640a bccs 57b62 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
57b58: 4a84 tstl %d4 <== NOT EXECUTED
57b5a: 6706 beqs 57b62 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
57b5c: b8aa 0014 cmpl %a2@(20),%d4 <== NOT EXECUTED
57b60: 632c blss 57b8e <rtems_rfs_dir_empty+0x154> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
57b62: 42a7 clrl %sp@- <== NOT EXECUTED
57b64: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57b68: 4e95 jsr %a5@ <== NOT EXECUTED
57b6a: 508f addql #8,%sp <== NOT EXECUTED
57b6c: 4a00 tstb %d0 <== NOT EXECUTED
57b6e: 6700 0088 beqw 57bf8 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: "
57b72: 2f05 movel %d5,%sp@- <== NOT EXECUTED
57b74: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57b76: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57b78: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
57b7c: 4879 0006 d970 pea 6d970 <CSWTCH.2+0xc30> <== NOT EXECUTED
57b82: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57b88: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
57b8c: 606a bras 57bf8 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
57b8e: 720b moveq #11,%d1 <== NOT EXECUTED
57b90: b283 cmpl %d3,%d1 <== NOT EXECUTED
57b92: 660c bnes 57ba0 <rtems_rfs_dir_empty+0x166> <== NOT EXECUTED
57b94: 4280 clrl %d0 <== NOT EXECUTED
57b96: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
57b9a: 123c 002e moveb #46,%d1 <== NOT EXECUTED
57b9e: 6018 bras 57bb8 <rtems_rfs_dir_empty+0x17e> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
57ba0: 700c moveq #12,%d0 <== NOT EXECUTED
57ba2: b083 cmpl %d3,%d0 <== NOT EXECUTED
57ba4: 662e bnes 57bd4 <rtems_rfs_dir_empty+0x19a> <== NOT EXECUTED
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
57ba6: 4280 clrl %d0 <== NOT EXECUTED
57ba8: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
57bac: 722e moveq #46,%d1 <== NOT EXECUTED
57bae: b280 cmpl %d0,%d1 <== NOT EXECUTED
57bb0: 6622 bnes 57bd4 <rtems_rfs_dir_empty+0x19a> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
57bb2: 4280 clrl %d0 <== NOT EXECUTED
57bb4: 1028 000b moveb %a0@(11),%d0 <== NOT EXECUTED
57bb8: b280 cmpl %d0,%d1 <== NOT EXECUTED
57bba: 6618 bnes 57bd4 <rtems_rfs_dir_empty+0x19a> <== NOT EXECUTED
{
empty = false;
break;
}
entry += elength;
57bbc: d1c3 addal %d3,%a0 <== NOT EXECUTED
offset += elength;
57bbe: da83 addl %d3,%d5 <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57bc0: b3c5 cmpal %d5,%a1 <== NOT EXECUTED
57bc2: 6200 ff4c bhiw 57b10 <rtems_rfs_dir_empty+0xd6> <== NOT EXECUTED
57bc6: 6030 bras 57bf8 <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc > 0)
{
if (rc == ENXIO)
57bc8: 7006 moveq #6,%d0 <== NOT EXECUTED
57bca: b082 cmpl %d2,%d0 <== NOT EXECUTED
57bcc: 56c0 sne %d0 <== NOT EXECUTED
57bce: 49c0 extbl %d0 <== NOT EXECUTED
57bd0: c480 andl %d0,%d2 <== NOT EXECUTED
57bd2: 6008 bras 57bdc <rtems_rfs_dir_empty+0x1a2> <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
57bd4: 4a82 tstl %d2 <== NOT EXECUTED
57bd6: 6604 bnes 57bdc <rtems_rfs_dir_empty+0x1a2> <== NOT EXECUTED
rc = ENOTEMPTY;
57bd8: 143c 005a moveb #90,%d2 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
57bdc: 486e ffac pea %fp@(-84) <== NOT EXECUTED
57be0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57be2: 4eba eff4 jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57be6: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57bea: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57bec: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57bf2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57bf6: 601a bras 57c12 <rtems_rfs_dir_empty+0x1d8> <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
57bf8: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
57bfc: 2f07 movel %d7,%sp@- <== NOT EXECUTED
57bfe: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57c00: 4eb9 0005 5d40 jsr 55d40 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc > 0)
57c06: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
57c0a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57c0c: 6f00 fed4 blew 57ae2 <rtems_rfs_dir_empty+0xa8> <== NOT EXECUTED
57c10: 60b6 bras 57bc8 <rtems_rfs_dir_empty+0x18e> <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
57c12: 2002 movel %d2,%d0 <== NOT EXECUTED
57c14: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED
57c1a: 4e5e unlk %fp <== NOT EXECUTED
...
0005ad90 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
5ad90: 4e56 ffec linkw %fp,#-20
break;
case 0 : return c; /* zero length requires no mixing */
}
} else { /* need to read the key one byte at a time */
const uint8_t *k = (const uint8_t *)key;
5ad94: 206e 0008 moveal %fp@(8),%a0
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
5ad98: 48d7 007c moveml %d2-%d6,%sp@
5ad9c: 282e 000c movel %fp@(12),%d4
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;
5ada0: 2004 movel %d4,%d0
5ada2: 0680 dfdf 169f addil #-539027809,%d0
5ada8: 2200 movel %d0,%d1
5adaa: 2240 moveal %d0,%a1
} 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)
5adac: 6000 00f2 braw 5aea0 <rtems_rfs_dir_hash+0x110>
{
a += k[0];
5adb0: 4282 clrl %d2 <== NOT EXECUTED
5adb2: 1410 moveb %a0@,%d2 <== NOT EXECUTED
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
5adb4: 4283 clrl %d3 <== NOT EXECUTED
const uint8_t *k = (const uint8_t *)key;
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
while (length > 12)
{
a += k[0];
5adb6: 43f1 2800 lea %a1@(00000000,%d2:l),%a1 <== NOT EXECUTED
a += ((uint32_t)k[1])<<8;
5adba: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
5adbe: 1628 0002 moveb %a0@(2),%d3 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
5adc2: 7a18 moveq #24,%d5 <== NOT EXECUTED
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);
5adc4: 7c1c moveq #28,%d6 <== NOT EXECUTED
length -= 12;
5adc6: 0684 ffff fff4 addil #-12,%d4 <== NOT EXECUTED
/*--------------- 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;
5adcc: e18a lsll #8,%d2 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
5adce: 4843 swap %d3 <== NOT EXECUTED
5add0: 4243 clrw %d3 <== NOT EXECUTED
/*--------------- 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;
5add2: d489 addl %a1,%d2 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
5add4: d483 addl %d3,%d2 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
5add6: 4283 clrl %d3 <== NOT EXECUTED
5add8: 1628 0003 moveb %a0@(3),%d3 <== NOT EXECUTED
5addc: ebab lsll %d5,%d3 <== NOT EXECUTED
5adde: d483 addl %d3,%d2 <== NOT EXECUTED
b += k[4];
5ade0: 4283 clrl %d3 <== NOT EXECUTED
5ade2: 1628 0004 moveb %a0@(4),%d3 <== NOT EXECUTED
5ade6: d283 addl %d3,%d1 <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
5ade8: 1628 0005 moveb %a0@(5),%d3 <== NOT EXECUTED
5adec: e18b lsll #8,%d3 <== NOT EXECUTED
5adee: d283 addl %d3,%d1 <== NOT EXECUTED
b += ((uint32_t)k[6])<<16;
5adf0: 4283 clrl %d3 <== NOT EXECUTED
5adf2: 1628 0006 moveb %a0@(6),%d3 <== NOT EXECUTED
5adf6: 4843 swap %d3 <== NOT EXECUTED
5adf8: 4243 clrw %d3 <== NOT EXECUTED
5adfa: d283 addl %d3,%d1 <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
5adfc: 4283 clrl %d3 <== NOT EXECUTED
5adfe: 1628 0007 moveb %a0@(7),%d3 <== NOT EXECUTED
5ae02: ebab lsll %d5,%d3 <== NOT EXECUTED
5ae04: d283 addl %d3,%d1 <== NOT EXECUTED
c += k[8];
5ae06: 4283 clrl %d3 <== NOT EXECUTED
5ae08: 1628 0008 moveb %a0@(8),%d3 <== NOT EXECUTED
5ae0c: d083 addl %d3,%d0 <== NOT EXECUTED
c += ((uint32_t)k[9])<<8;
5ae0e: 1628 0009 moveb %a0@(9),%d3 <== NOT EXECUTED
5ae12: e18b lsll #8,%d3 <== NOT EXECUTED
5ae14: d083 addl %d3,%d0 <== NOT EXECUTED
c += ((uint32_t)k[10])<<16;
5ae16: 4283 clrl %d3 <== NOT EXECUTED
5ae18: 1628 000a moveb %a0@(10),%d3 <== NOT EXECUTED
5ae1c: 4843 swap %d3 <== NOT EXECUTED
5ae1e: 4243 clrw %d3 <== NOT EXECUTED
5ae20: d083 addl %d3,%d0 <== NOT EXECUTED
c += ((uint32_t)k[11])<<24;
5ae22: 4283 clrl %d3 <== NOT EXECUTED
5ae24: 1628 000b moveb %a0@(11),%d3 <== NOT EXECUTED
mix(a,b,c);
length -= 12;
k += 12;
5ae28: 41e8 000c lea %a0@(12),%a0 <== NOT EXECUTED
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;
5ae2c: ebab lsll %d5,%d3 <== NOT EXECUTED
5ae2e: d083 addl %d3,%d0 <== NOT EXECUTED
mix(a,b,c);
5ae30: 2600 movel %d0,%d3 <== NOT EXECUTED
5ae32: 2a00 movel %d0,%d5 <== NOT EXECUTED
5ae34: ecad lsrl %d6,%d5 <== NOT EXECUTED
5ae36: 9480 subl %d0,%d2 <== NOT EXECUTED
5ae38: 2240 moveal %d0,%a1 <== NOT EXECUTED
5ae3a: d3c1 addal %d1,%a1 <== NOT EXECUTED
5ae3c: 1c3c 0018 moveb #24,%d6 <== NOT EXECUTED
5ae40: e98b lsll #4,%d3 <== NOT EXECUTED
5ae42: 8685 orl %d5,%d3 <== NOT EXECUTED
5ae44: 7a1a moveq #26,%d5 <== NOT EXECUTED
5ae46: b782 eorl %d3,%d2 <== NOT EXECUTED
5ae48: 2002 movel %d2,%d0 <== NOT EXECUTED
5ae4a: 2602 movel %d2,%d3 <== NOT EXECUTED
5ae4c: eaab lsrl %d5,%d3 <== NOT EXECUTED
5ae4e: 9282 subl %d2,%d1 <== NOT EXECUTED
5ae50: d489 addl %a1,%d2 <== NOT EXECUTED
5ae52: ed88 lsll #6,%d0 <== NOT EXECUTED
5ae54: 8083 orl %d3,%d0 <== NOT EXECUTED
5ae56: 2609 movel %a1,%d3 <== NOT EXECUTED
5ae58: b380 eorl %d1,%d0 <== NOT EXECUTED
5ae5a: 2200 movel %d0,%d1 <== NOT EXECUTED
5ae5c: 2a00 movel %d0,%d5 <== NOT EXECUTED
5ae5e: ecad lsrl %d6,%d5 <== NOT EXECUTED
5ae60: 9680 subl %d0,%d3 <== NOT EXECUTED
5ae62: d082 addl %d2,%d0 <== NOT EXECUTED
5ae64: 1c3c 000d moveb #13,%d6 <== NOT EXECUTED
5ae68: e189 lsll #8,%d1 <== NOT EXECUTED
5ae6a: 8285 orl %d5,%d1 <== NOT EXECUTED
5ae6c: 7a13 moveq #19,%d5 <== NOT EXECUTED
5ae6e: b781 eorl %d3,%d1 <== NOT EXECUTED
5ae70: 2601 movel %d1,%d3 <== NOT EXECUTED
5ae72: 9481 subl %d1,%d2 <== NOT EXECUTED
5ae74: 4843 swap %d3 <== NOT EXECUTED
5ae76: b583 eorl %d2,%d3 <== NOT EXECUTED
5ae78: 2401 movel %d1,%d2 <== NOT EXECUTED
5ae7a: d480 addl %d0,%d2 <== NOT EXECUTED
5ae7c: 2203 movel %d3,%d1 <== NOT EXECUTED
5ae7e: 9083 subl %d3,%d0 <== NOT EXECUTED
5ae80: 2243 moveal %d3,%a1 <== NOT EXECUTED
5ae82: d3c2 addal %d2,%a1 <== NOT EXECUTED
5ae84: eba9 lsll %d5,%d1 <== NOT EXECUTED
5ae86: 2a03 movel %d3,%d5 <== NOT EXECUTED
5ae88: ecad lsrl %d6,%d5 <== NOT EXECUTED
5ae8a: 8285 orl %d5,%d1 <== NOT EXECUTED
5ae8c: 7a1c moveq #28,%d5 <== NOT EXECUTED
5ae8e: b181 eorl %d0,%d1 <== NOT EXECUTED
5ae90: 2001 movel %d1,%d0 <== NOT EXECUTED
5ae92: 2601 movel %d1,%d3 <== NOT EXECUTED
5ae94: eaab lsrl %d5,%d3 <== NOT EXECUTED
5ae96: 9481 subl %d1,%d2 <== NOT EXECUTED
5ae98: d289 addl %a1,%d1 <== NOT EXECUTED
5ae9a: e988 lsll #4,%d0 <== NOT EXECUTED
5ae9c: 8083 orl %d3,%d0 <== NOT EXECUTED
5ae9e: b580 eorl %d2,%d0 <== NOT EXECUTED
} 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)
5aea0: 7c0c moveq #12,%d6
5aea2: bc84 cmpl %d4,%d6
5aea4: 6500 ff0a bcsw 5adb0 <rtems_rfs_dir_hash+0x20>
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
5aea8: 5384 subql #1,%d4
5aeaa: 740b moveq #11,%d2
5aeac: b484 cmpl %d4,%d2
5aeae: 6500 0118 bcsw 5afc8 <rtems_rfs_dir_hash+0x238>
5aeb2: 343b 4a08 movew %pc@(5aebc <rtems_rfs_dir_hash+0x12c>,%d4:l:2),%d2
5aeb6: 48c2 extl %d2
5aeb8: 4efb 2802 jmp %pc@(5aebc <rtems_rfs_dir_hash+0x12c>,%d2:l)
5aebc: 0090 0086 007a oril #8781946,%d0 <== NOT EXECUTED
5aec2: 006c .short 0x006c <== NOT EXECUTED
5aec4: 0064 .short 0x0064 <== NOT EXECUTED
5aec6: 005a .short 0x005a <== NOT EXECUTED
5aec8: 004e .short 0x004e <== NOT EXECUTED
5aeca: 0042 .short 0x0042 <== NOT EXECUTED
5aecc: 003a .short 0x003a <== NOT EXECUTED
5aece: 0030 .short 0x0030 <== NOT EXECUTED
5aed0: 0024 .short 0x0024 <== NOT EXECUTED
5aed2: 0018 .short 0x0018 <== NOT EXECUTED
{
case 12: c+=((uint32_t)k[11])<<24;
5aed4: 4282 clrl %d2 <== NOT EXECUTED
5aed6: 1428 000b moveb %a0@(11),%d2 <== NOT EXECUTED
5aeda: 7618 moveq #24,%d3 <== NOT EXECUTED
5aedc: e7aa lsll %d3,%d2 <== NOT EXECUTED
5aede: d082 addl %d2,%d0 <== NOT EXECUTED
case 11: c+=((uint32_t)k[10])<<16;
5aee0: 4282 clrl %d2 <== NOT EXECUTED
5aee2: 1428 000a moveb %a0@(10),%d2 <== NOT EXECUTED
5aee6: 4842 swap %d2 <== NOT EXECUTED
5aee8: 4242 clrw %d2 <== NOT EXECUTED
5aeea: d082 addl %d2,%d0 <== NOT EXECUTED
case 10: c+=((uint32_t)k[9])<<8;
5aeec: 4282 clrl %d2 <== NOT EXECUTED
5aeee: 1428 0009 moveb %a0@(9),%d2 <== NOT EXECUTED
5aef2: e18a lsll #8,%d2 <== NOT EXECUTED
5aef4: d082 addl %d2,%d0 <== NOT EXECUTED
case 9 : c+=k[8];
5aef6: 4282 clrl %d2 <== NOT EXECUTED
5aef8: 1428 0008 moveb %a0@(8),%d2 <== NOT EXECUTED
5aefc: d082 addl %d2,%d0 <== NOT EXECUTED
case 8 : b+=((uint32_t)k[7])<<24;
5aefe: 4282 clrl %d2 <== NOT EXECUTED
5af00: 1428 0007 moveb %a0@(7),%d2 <== NOT EXECUTED
5af04: 7818 moveq #24,%d4 <== NOT EXECUTED
5af06: e9aa lsll %d4,%d2 <== NOT EXECUTED
5af08: d282 addl %d2,%d1 <== NOT EXECUTED
case 7 : b+=((uint32_t)k[6])<<16;
5af0a: 4282 clrl %d2 <== NOT EXECUTED
5af0c: 1428 0006 moveb %a0@(6),%d2 <== NOT EXECUTED
5af10: 4842 swap %d2 <== NOT EXECUTED
5af12: 4242 clrw %d2 <== NOT EXECUTED
5af14: d282 addl %d2,%d1 <== NOT EXECUTED
case 6 : b+=((uint32_t)k[5])<<8;
5af16: 4282 clrl %d2 <== NOT EXECUTED
5af18: 1428 0005 moveb %a0@(5),%d2 <== NOT EXECUTED
5af1c: e18a lsll #8,%d2 <== NOT EXECUTED
5af1e: d282 addl %d2,%d1 <== NOT EXECUTED
case 5 : b+=k[4];
5af20: 4282 clrl %d2 <== NOT EXECUTED
5af22: 1428 0004 moveb %a0@(4),%d2 <== NOT EXECUTED
5af26: d282 addl %d2,%d1 <== NOT EXECUTED
case 4 : a+=((uint32_t)k[3])<<24;
5af28: 4282 clrl %d2 <== NOT EXECUTED
5af2a: 1428 0003 moveb %a0@(3),%d2 <== NOT EXECUTED
5af2e: 7a18 moveq #24,%d5 <== NOT EXECUTED
5af30: ebaa lsll %d5,%d2 <== NOT EXECUTED
5af32: 43f1 2800 lea %a1@(00000000,%d2:l),%a1 <== NOT EXECUTED
case 3 : a+=((uint32_t)k[2])<<16;
5af36: 4282 clrl %d2 <== NOT EXECUTED
5af38: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED
5af3c: 4842 swap %d2 <== NOT EXECUTED
5af3e: 4242 clrw %d2 <== NOT EXECUTED
5af40: d3c2 addal %d2,%a1 <== NOT EXECUTED
case 2 : a+=((uint32_t)k[1])<<8;
5af42: 4282 clrl %d2 <== NOT EXECUTED
5af44: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
5af48: e18a lsll #8,%d2 <== NOT EXECUTED
5af4a: d3c2 addal %d2,%a1 <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
5af4c: 2801 movel %d1,%d4
5af4e: 7a0e moveq #14,%d5
5af50: 2601 movel %d1,%d3
5af52: 7c12 moveq #18,%d6
5af54: ecab lsrl %d6,%d3
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];
5af56: 4282 clrl %d2
break;
case 0 : return c;
}
}
final(a,b,c);
5af58: 1c3c 000b moveb #11,%d6
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];
5af5c: 1410 moveb %a0@,%d2
5af5e: d489 addl %a1,%d2
break;
case 0 : return c;
}
}
final(a,b,c);
5af60: ebac lsll %d5,%d4
5af62: b380 eorl %d1,%d0
5af64: 1a3c 0015 moveb #21,%d5
5af68: 8684 orl %d4,%d3
5af6a: 9083 subl %d3,%d0
5af6c: 2600 movel %d0,%d3
5af6e: 2800 movel %d0,%d4
5af70: eaac lsrl %d5,%d4
5af72: 1a3c 001c moveb #28,%d5
5af76: edab lsll %d6,%d3
5af78: b182 eorl %d0,%d2
5af7a: 1c3c 0019 moveb #25,%d6
5af7e: 8684 orl %d4,%d3
5af80: 9483 subl %d3,%d2
5af82: 2602 movel %d2,%d3
5af84: 2802 movel %d2,%d4
5af86: ee8c lsrl #7,%d4
5af88: edab lsll %d6,%d3
5af8a: b581 eorl %d2,%d1
5af8c: 1c3c 000e moveb #14,%d6
5af90: 8684 orl %d4,%d3
5af92: 9283 subl %d3,%d1
5af94: 2601 movel %d1,%d3
5af96: 4843 swap %d3
5af98: b380 eorl %d1,%d0
5af9a: 9083 subl %d3,%d0
5af9c: 2600 movel %d0,%d3
5af9e: 2800 movel %d0,%d4
5afa0: eaac lsrl %d5,%d4
5afa2: 1a3c 0018 moveb #24,%d5
5afa6: e98b lsll #4,%d3
5afa8: b182 eorl %d0,%d2
5afaa: 8684 orl %d4,%d3
5afac: 7812 moveq #18,%d4
5afae: 9483 subl %d3,%d2
5afb0: 2602 movel %d2,%d3
5afb2: b581 eorl %d2,%d1
5afb4: edab lsll %d6,%d3
5afb6: e8aa lsrl %d4,%d2
5afb8: 8682 orl %d2,%d3
5afba: 9283 subl %d3,%d1
5afbc: 2401 movel %d1,%d2
5afbe: b380 eorl %d1,%d0
5afc0: ebaa lsll %d5,%d2
5afc2: e089 lsrl #8,%d1
5afc4: 8481 orl %d1,%d2
5afc6: 9082 subl %d2,%d0
return c;
}
5afc8: 4cd7 007c moveml %sp@,%d2-%d6
5afcc: 4e5e unlk %fp <== NOT EXECUTED
00056c02 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
56c02: 4e56 ff7c linkw %fp,#-132 <== NOT EXECUTED
56c06: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56c0a: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
56c10: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56c14: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
56c16: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
56c1a: 2a6e 0018 moveal %fp@(24),%a5 <== NOT EXECUTED
rtems_rfs_block_map map;
rtems_rfs_buffer_handle entries;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56c1e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56c24: 508f addql #8,%sp <== NOT EXECUTED
56c26: 4a00 tstb %d0 <== NOT EXECUTED
56c28: 6748 beqs 56c72 <rtems_rfs_dir_lookup_ino+0x70> <== NOT EXECUTED
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
56c2a: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56c2e: 4879 0006 d311 pea 6d311 <CSWTCH.2+0x5d1> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
56c34: 243c 0005 c440 movel #377920,%d2 <== 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=",
56c3a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
56c40: 246e 0010 moveal %fp@(16),%a2 <== NOT EXECUTED
56c44: 508f addql #8,%sp <== NOT EXECUTED
56c46: 600c bras 56c54 <rtems_rfs_dir_lookup_ino+0x52> <== NOT EXECUTED
printf ("%c", name[c]);
56c48: 2042 moveal %d2,%a0 <== NOT EXECUTED
56c4a: 101a moveb %a2@+,%d0 <== NOT EXECUTED
56c4c: 49c0 extbl %d0 <== NOT EXECUTED
56c4e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56c50: 4e90 jsr %a0@ <== NOT EXECUTED
56c52: 588f addql #4,%sp <== NOT EXECUTED
#define rtems_rfs_dir_entry_valid(_f, _l, _i) \
(((_l) <= RTEMS_RFS_DIR_ENTRY_SIZE) || ((_l) >= rtems_rfs_fs_max_name (_f)) \
|| (_i < RTEMS_RFS_ROOT_INO) || (_i > rtems_rfs_fs_inodes (_f)))
int
rtems_rfs_dir_lookup_ino (rtems_rfs_file_system* fs,
56c54: 200a movel %a2,%d0 <== NOT EXECUTED
56c56: 90ae 0010 subl %fp@(16),%d0 <== 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++)
56c5a: b0ae 0014 cmpl %fp@(20),%d0 <== NOT EXECUTED
56c5e: 6de8 blts 56c48 <rtems_rfs_dir_lookup_ino+0x46> <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
56c60: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
56c64: 4879 0006 d348 pea 6d348 <CSWTCH.2+0x608> <== NOT EXECUTED
56c6a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56c70: 508f addql #8,%sp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
56c72: 4295 clrl %a5@ <== NOT EXECUTED
*offset = 0;
56c74: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
56c78: 260e movel %fp,%d3 <== NOT EXECUTED
56c7a: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
56c80: 4290 clrl %a0@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
56c82: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56c84: 2f0c movel %a4,%sp@- <== NOT EXECUTED
56c86: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56c88: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
56c8e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
56c92: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
56c94: 6f3a bles 56cd0 <rtems_rfs_dir_lookup_ino+0xce> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56c96: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
56c9c: 42a7 clrl %sp@- <== NOT EXECUTED
56c9e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56ca4: 508f addql #8,%sp <== NOT EXECUTED
56ca6: 4a00 tstb %d0 <== NOT EXECUTED
56ca8: 6700 03a0 beqw 5704a <rtems_rfs_dir_lookup_ino+0x448> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
56cac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56cae: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56cb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56cb6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56cb8: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56cbc: 4879 0006 d352 pea 6d352 <CSWTCH.2+0x612> <== NOT EXECUTED
56cc2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56cc8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56ccc: 6000 037c braw 5704a <rtems_rfs_dir_lookup_ino+0x448> <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
56cd0: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
/*
* 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);
56cd4: 2e0e movel %fp,%d7 <== NOT EXECUTED
56cd6: 0687 ffff ffa8 addil #-88,%d7 <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
56cdc: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
56ce0: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
56ce2: 42ae ffae clrl %fp@(-82) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
56ce6: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
56cea: 42ae ffb2 clrl %fp@(-78) <== NOT EXECUTED
56cee: 4eb9 0005 ad90 jsr 5ad90 <rtems_rfs_dir_hash> <== NOT EXECUTED
/*
* 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);
56cf4: 2f07 movel %d7,%sp@- <== NOT EXECUTED
56cf6: 42a7 clrl %sp@- <== NOT EXECUTED
56cf8: 42a7 clrl %sp@- <== NOT EXECUTED
56cfa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
56cfc: 2d40 ffa4 movel %d0,%fp@(-92) <== NOT EXECUTED
/*
* 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);
56d00: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56d02: 4eb9 0005 5cc2 jsr 55cc2 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
56d08: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
/*
* 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);
56d0c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
56d0e: 6f00 02be blew 56fce <rtems_rfs_dir_lookup_ino+0x3cc> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56d12: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
56d18: 42a7 clrl %sp@- <== NOT EXECUTED
56d1a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56d20: 508f addql #8,%sp <== NOT EXECUTED
56d22: 4a00 tstb %d0 <== NOT EXECUTED
56d24: 671c beqs 56d42 <rtems_rfs_dir_lookup_ino+0x140> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
56d26: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56d28: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56d2e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56d30: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56d32: 4879 0006 d391 pea 6d391 <CSWTCH.2+0x651> <== NOT EXECUTED
56d38: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56d3e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
56d42: 7206 moveq #6,%d1 <== NOT EXECUTED
56d44: b282 cmpl %d2,%d1 <== NOT EXECUTED
56d46: 6600 02c6 bnew 5700e <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
rc = ENOENT;
56d4a: 7402 moveq #2,%d2 <== NOT EXECUTED
56d4c: 6000 02c0 braw 5700e <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
while ((rc == 0) && block)
{
uint8_t* entry;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56d50: 2044 moveal %d4,%a0 <== NOT EXECUTED
56d52: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
56d58: 42a7 clrl %sp@- <== NOT EXECUTED
56d5a: 4e90 jsr %a0@ <== NOT EXECUTED
56d5c: 508f addql #8,%sp <== NOT EXECUTED
56d5e: 4a00 tstb %d0 <== NOT EXECUTED
56d60: 6716 beqs 56d78 <rtems_rfs_dir_lookup_ino+0x176> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
56d62: 2f2e ffc4 movel %fp@(-60),%sp@- <== NOT EXECUTED
56d66: 2045 moveal %d5,%a0 <== NOT EXECUTED
56d68: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56d6c: 4879 0006 d3cb pea 6d3cb <CSWTCH.2+0x68b> <== NOT EXECUTED
56d72: 4e90 jsr %a0@ <== NOT EXECUTED
56d74: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (inode), map.bpos.bno);
rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true);
56d78: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
56d7c: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
56d80: 486e ffac pea %fp@(-84) <== NOT EXECUTED
56d84: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56d86: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
56d8c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
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);
56d90: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
56d92: 6f3e bles 56dd2 <rtems_rfs_dir_lookup_ino+0x1d0> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56d94: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
56d9a: 42a7 clrl %sp@- <== NOT EXECUTED
56d9c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56da2: 508f addql #8,%sp <== NOT EXECUTED
56da4: 4a00 tstb %d0 <== NOT EXECUTED
56da6: 6700 029e beqw 57046 <rtems_rfs_dir_lookup_ino+0x444> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
56daa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56dac: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56db2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56db4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56db6: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
56dba: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56dbe: 4879 0006 d403 pea 6d403 <CSWTCH.2+0x6c3> <== NOT EXECUTED
56dc4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56dca: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
56dce: 6000 0276 braw 57046 <rtems_rfs_dir_lookup_ino+0x444> <== NOT EXECUTED
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
56dd2: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
map.bpos.boff = 0;
56dd6: 42ae ffc8 clrl %fp@(-56) <== NOT EXECUTED
/*
* Search the block to see if the name matches. A hash of 0xffff or 0x0
* means the entry is empty.
*/
entry = rtems_rfs_buffer_data (&entries);
56dda: 2468 001a moveal %a0@(26),%a2 <== NOT EXECUTED
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
56dde: 6000 0180 braw 56f60 <rtems_rfs_dir_lookup_ino+0x35e> <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
56de2: 4281 clrl %d1 <== NOT EXECUTED
56de4: 122a 0004 moveb %a2@(4),%d1 <== NOT EXECUTED
56de8: 7018 moveq #24,%d0 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
56dea: 4287 clrl %d7 <== NOT EXECUTED
56dec: 1e2a 0008 moveb %a2@(8),%d7 <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
56df0: 7c18 moveq #24,%d6 <== NOT EXECUTED
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);
56df2: e1a9 lsll %d0,%d1 <== NOT EXECUTED
56df4: 4280 clrl %d0 <== NOT EXECUTED
56df6: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED
56dfa: 4840 swap %d0 <== NOT EXECUTED
56dfc: 4240 clrw %d0 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
56dfe: e18f lsll #8,%d7 <== NOT EXECUTED
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);
56e00: 8280 orl %d0,%d1 <== NOT EXECUTED
56e02: 4280 clrl %d0 <== NOT EXECUTED
56e04: 102a 0007 moveb %a2@(7),%d0 <== NOT EXECUTED
56e08: 8280 orl %d0,%d1 <== NOT EXECUTED
56e0a: 102a 0006 moveb %a2@(6),%d0 <== NOT EXECUTED
56e0e: e188 lsll #8,%d0 <== NOT EXECUTED
56e10: 8280 orl %d0,%d1 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
56e12: 4280 clrl %d0 <== NOT EXECUTED
56e14: 102a 0009 moveb %a2@(9),%d0 <== NOT EXECUTED
56e18: 8e80 orl %d0,%d7 <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
56e1a: 1012 moveb %a2@,%d0 <== NOT EXECUTED
56e1c: eda8 lsll %d6,%d0 <== NOT EXECUTED
56e1e: 4286 clrl %d6 <== NOT EXECUTED
56e20: 1c2a 0001 moveb %a2@(1),%d6 <== NOT EXECUTED
56e24: 4846 swap %d6 <== NOT EXECUTED
56e26: 4246 clrw %d6 <== NOT EXECUTED
56e28: 8086 orl %d6,%d0 <== NOT EXECUTED
56e2a: 4286 clrl %d6 <== NOT EXECUTED
56e2c: 1c2a 0003 moveb %a2@(3),%d6 <== NOT EXECUTED
56e30: 8086 orl %d6,%d0 <== NOT EXECUTED
56e32: 1c2a 0002 moveb %a2@(2),%d6 <== NOT EXECUTED
56e36: e18e lsll #8,%d6 <== NOT EXECUTED
56e38: 8086 orl %d6,%d0 <== NOT EXECUTED
56e3a: 2a80 movel %d0,%a5@ <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
56e3c: 0c87 0000 ffff cmpil #65535,%d7 <== NOT EXECUTED
56e42: 660a bnes 56e4e <rtems_rfs_dir_lookup_ino+0x24c> <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
56e44: 4a83 tstl %d3 <== NOT EXECUTED
56e46: 6600 0182 bnew 56fca <rtems_rfs_dir_lookup_ino+0x3c8> <== NOT EXECUTED
56e4a: 6000 012a braw 56f76 <rtems_rfs_dir_lookup_ino+0x374> <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
56e4e: 7c0a moveq #10,%d6 <== NOT EXECUTED
56e50: bc87 cmpl %d7,%d6 <== NOT EXECUTED
56e52: 6d16 blts 56e6a <rtems_rfs_dir_lookup_ino+0x268> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56e54: 2044 moveal %d4,%a0 <== NOT EXECUTED
56e56: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
56e5c: 42a7 clrl %sp@- <== NOT EXECUTED
56e5e: 4e90 jsr %a0@ <== NOT EXECUTED
56e60: 508f addql #8,%sp <== NOT EXECUTED
56e62: 4a00 tstb %d0 <== NOT EXECUTED
56e64: 6700 01c4 beqw 5702a <rtems_rfs_dir_lookup_ino+0x428> <== NOT EXECUTED
56e68: 6012 bras 56e7c <rtems_rfs_dir_lookup_ino+0x27a> <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
56e6a: beab 001c cmpl %a3@(28),%d7 <== NOT EXECUTED
56e6e: 64e4 bccs 56e54 <rtems_rfs_dir_lookup_ino+0x252> <== NOT EXECUTED
56e70: 4a80 tstl %d0 <== NOT EXECUTED
56e72: 67e0 beqs 56e54 <rtems_rfs_dir_lookup_ino+0x252> <== NOT EXECUTED
56e74: b0ab 0014 cmpl %a3@(20),%d0 <== NOT EXECUTED
56e78: 6320 blss 56e9a <rtems_rfs_dir_lookup_ino+0x298> <== NOT EXECUTED
56e7a: 60d8 bras 56e54 <rtems_rfs_dir_lookup_ino+0x252> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
56e7c: 2f2e ffc8 movel %fp@(-56),%sp@- <== NOT EXECUTED
56e80: 2045 moveal %d5,%a0 <== NOT EXECUTED
56e82: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
56e84: 2f07 movel %d7,%sp@- <== NOT EXECUTED
56e86: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56e8a: 4879 0006 d445 pea 6d445 <CSWTCH.2+0x705> <== NOT EXECUTED
56e90: 4e90 jsr %a0@ <== NOT EXECUTED
56e92: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56e96: 6000 0192 braw 5702a <rtems_rfs_dir_lookup_ino+0x428> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
56e9a: b2ae ffa4 cmpl %fp@(-92),%d1 <== NOT EXECUTED
56e9e: 6600 00ba bnew 56f5a <rtems_rfs_dir_lookup_ino+0x358> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
56ea2: 2044 moveal %d4,%a0 <== NOT EXECUTED
56ea4: 2f3c 0800 0000 movel #134217728,%sp@- <== NOT EXECUTED
56eaa: 42a7 clrl %sp@- <== NOT EXECUTED
56eac: 4e90 jsr %a0@ <== NOT EXECUTED
56eae: 508f addql #8,%sp <== NOT EXECUTED
56eb0: 4a00 tstb %d0 <== NOT EXECUTED
56eb2: 6742 beqs 56ef6 <rtems_rfs_dir_lookup_ino+0x2f4> <== NOT EXECUTED
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));
56eb4: 4280 clrl %d0 <== NOT EXECUTED
56eb6: 1012 moveb %a2@,%d0 <== NOT EXECUTED
56eb8: 7218 moveq #24,%d1 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
56eba: 2045 moveal %d5,%a0 <== 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));
56ebc: e3a8 lsll %d1,%d0 <== NOT EXECUTED
56ebe: 4281 clrl %d1 <== NOT EXECUTED
56ec0: 122a 0001 moveb %a2@(1),%d1 <== NOT EXECUTED
56ec4: 4841 swap %d1 <== NOT EXECUTED
56ec6: 4241 clrw %d1 <== NOT EXECUTED
56ec8: 8081 orl %d1,%d0 <== NOT EXECUTED
56eca: 4281 clrl %d1 <== NOT EXECUTED
56ecc: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED
56ed0: 8081 orl %d1,%d0 <== NOT EXECUTED
56ed2: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED
56ed6: e189 lsll #8,%d1 <== NOT EXECUTED
}
if (ehash == hash)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
printf ("rtems-rfs: dir-lookup-ino: "
56ed8: 8081 orl %d1,%d0 <== NOT EXECUTED
56eda: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56edc: 2f07 movel %d7,%sp@- <== NOT EXECUTED
56ede: 2f2e ffc8 movel %fp@(-56),%sp@- <== NOT EXECUTED
56ee2: 2f2e ffc4 movel %fp@(-60),%sp@- <== NOT EXECUTED
56ee6: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56eea: 4879 0006 d48f pea 6d48f <CSWTCH.2+0x74f> <== NOT EXECUTED
56ef0: 4e90 jsr %a0@ <== NOT EXECUTED
56ef2: 4fef 0018 lea %sp@(24),%sp <== 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)
56ef6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
56efa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
56efe: 486a 000a pea %a2@(10) <== NOT EXECUTED
56f02: 4eb9 0005 bf6c jsr 5bf6c <memcmp> <== NOT EXECUTED
56f08: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56f0c: 4a80 tstl %d0 <== NOT EXECUTED
56f0e: 664a bnes 56f5a <rtems_rfs_dir_lookup_ino+0x358> <== NOT EXECUTED
{
*offset = rtems_rfs_block_map_pos (fs, &map);
56f10: 486e ffc4 pea %fp@(-60) <== NOT EXECUTED
56f14: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56f16: 4eb9 0005 57be jsr 557be <rtems_rfs_block_get_pos> <== NOT EXECUTED
56f1c: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
56f20: 2081 movel %d1,%a0@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
56f22: 2f3c 1000 0000 movel #268435456,%sp@- <== NOT EXECUTED
56f28: 42a7 clrl %sp@- <== NOT EXECUTED
56f2a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
56f30: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56f34: 4a00 tstb %d0 <== NOT EXECUTED
56f36: 6700 00d6 beqw 5700e <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
56f3a: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
56f3e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
56f40: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
56f42: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56f46: 4879 0006 d4ed pea 6d4ed <CSWTCH.2+0x7ad> <== NOT EXECUTED
56f4c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56f52: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56f56: 6000 00b6 braw 5700e <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
56f5a: dfae ffc8 addl %d7,%fp@(-56) <== NOT EXECUTED
entry += elength;
56f5e: d5c7 addal %d7,%a2 <== 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))
56f60: 202b 0008 movel %a3@(8),%d0 <== NOT EXECUTED
56f64: 0680 ffff fff6 addil #-10,%d0 <== NOT EXECUTED
56f6a: b0ae ffc8 cmpl %fp@(-56),%d0 <== NOT EXECUTED
56f6e: 6200 fe72 bhiw 56de2 <rtems_rfs_dir_lookup_ino+0x1e0> <== NOT EXECUTED
56f72: 6000 fed0 braw 56e44 <rtems_rfs_dir_lookup_ino+0x242> <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
56f76: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
56f7a: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
56f7e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56f80: 4eb9 0005 5d40 jsr 55d40 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if ((rc > 0) && (rc != ENXIO))
56f86: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
56f8a: 2400 movel %d0,%d2 <== NOT EXECUTED
if ((rc > 0) && (rc != ENXIO))
56f8c: 6f4c bles 56fda <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
56f8e: 7006 moveq #6,%d0 <== NOT EXECUTED
56f90: b082 cmpl %d2,%d0 <== NOT EXECUTED
56f92: 6732 beqs 56fc6 <rtems_rfs_dir_lookup_ino+0x3c4> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
56f94: 2044 moveal %d4,%a0 <== NOT EXECUTED
56f96: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
56f9c: 42a7 clrl %sp@- <== NOT EXECUTED
56f9e: 4e90 jsr %a0@ <== NOT EXECUTED
56fa0: 508f addql #8,%sp <== NOT EXECUTED
56fa2: 4a00 tstb %d0 <== NOT EXECUTED
56fa4: 6734 beqs 56fda <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
56fa6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56fa8: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56fae: 2045 moveal %d5,%a0 <== NOT EXECUTED
56fb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56fb2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56fb4: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56fb8: 4879 0006 d534 pea 6d534 <CSWTCH.2+0x7f4> <== NOT EXECUTED
56fbe: 4e90 jsr %a0@ <== NOT EXECUTED
56fc0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56fc4: 6014 bras 56fda <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
56fc6: 7402 moveq #2,%d2 <== NOT EXECUTED
56fc8: 607a bras 57044 <rtems_rfs_dir_lookup_ino+0x442> <== NOT EXECUTED
56fca: 2403 movel %d3,%d2 <== NOT EXECUTED
56fcc: 600c bras 56fda <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
56fce: 283c 0005 02fc movel #328444,%d4 <== 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",
56fd4: 2a3c 0005 c2b0 movel #377520,%d5 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
56fda: 4a82 tstl %d2 <== NOT EXECUTED
56fdc: 6666 bnes 57044 <rtems_rfs_dir_lookup_ino+0x442> <== NOT EXECUTED
56fde: 4aae ffa8 tstl %fp@(-88) <== NOT EXECUTED
56fe2: 6600 fd6c bnew 56d50 <rtems_rfs_dir_lookup_ino+0x14e> <== NOT EXECUTED
56fe6: 6046 bras 5702e <rtems_rfs_dir_lookup_ino+0x42c> <== NOT EXECUTED
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
56fe8: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
56fec: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
56ff2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56ff4: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
56ff8: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
56ffc: 4879 0006 d57f pea 6d57f <CSWTCH.2+0x83f> <== NOT EXECUTED
57002: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57008: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
5700c: 7405 moveq #5,%d2 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
}
rtems_rfs_buffer_handle_close (fs, &entries);
5700e: 486e ffac pea %fp@(-84) <== NOT EXECUTED
57012: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57014: 4eba fbc2 jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57018: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
5701c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5701e: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57024: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57028: 6020 bras 5704a <rtems_rfs_dir_lookup_ino+0x448> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
5702a: 7605 moveq #5,%d3 <== NOT EXECUTED
5702c: 609c bras 56fca <rtems_rfs_dir_lookup_ino+0x3c8> <== NOT EXECUTED
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5702e: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
57034: 42a7 clrl %sp@- <== NOT EXECUTED
57036: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5703c: 508f addql #8,%sp <== NOT EXECUTED
5703e: 4a00 tstb %d0 <== NOT EXECUTED
57040: 66a6 bnes 56fe8 <rtems_rfs_dir_lookup_ino+0x3e6> <== NOT EXECUTED
57042: 60c8 bras 5700c <rtems_rfs_dir_lookup_ino+0x40a> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
57044: 2602 movel %d2,%d3 <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
"block map next block failed in ino %" PRIu32 ": %d: %s\n",
rtems_rfs_inode_ino (inode), rc, strerror (rc));
}
if (rc == ENXIO)
rc = ENOENT;
57046: 2403 movel %d3,%d2 <== NOT EXECUTED
57048: 60c4 bras 5700e <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5704a: 2002 movel %d2,%d0 <== NOT EXECUTED
5704c: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED
57052: 4e5e unlk %fp <== NOT EXECUTED
000576f4 <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)
{
576f4: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED
576f8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
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))
576fc: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
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)
{
57702: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
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))
57706: 42a7 clrl %sp@- <== NOT EXECUTED
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)
{
57708: 286e 0018 moveal %fp@(24),%a4 <== NOT EXECUTED
5770c: 2a6e 001c moveal %fp@(28),%a5 <== NOT EXECUTED
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))
57710: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57716: 508f addql #8,%sp <== NOT EXECUTED
57718: 4a00 tstb %d0 <== NOT EXECUTED
5771a: 6720 beqs 5773c <rtems_rfs_dir_read+0x48> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
5771c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
57720: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
57724: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
57728: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
5772c: 4879 0006 d878 pea 6d878 <CSWTCH.2+0xb38> <== NOT EXECUTED
57732: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57738: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
5773c: 4295 clrl %a5@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
5773e: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57742: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
57746: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57748: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5774e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
rtems_rfs_inode_ino (dir), offset);
*length = 0;
rc = rtems_rfs_block_map_open (fs, dir, &map);
57752: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
57754: 6e00 02d8 bgtw 57a2e <rtems_rfs_dir_read+0x33a> <== NOT EXECUTED
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
57758: 262a 0008 movel %a2@(8),%d3 <== NOT EXECUTED
5775c: 4282 clrl %d2 <== NOT EXECUTED
5775e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
57760: 2802 movel %d2,%d4 <== NOT EXECUTED
57762: 2a03 movel %d3,%d5 <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
57764: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57766: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5776a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5776e: 4eb9 0006 8804 jsr 68804 <__moddi3> <== NOT EXECUTED
57774: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
if (rc > 0)
return rc;
if (((rtems_rfs_fs_block_size (fs) -
57778: 9a81 subl %d1,%d5 <== NOT EXECUTED
5777a: 9980 subxl %d0,%d4 <== NOT EXECUTED
5777c: 2004 movel %d4,%d0 <== NOT EXECUTED
5777e: 2205 movel %d5,%d1 <== NOT EXECUTED
57780: 4285 clrl %d5 <== NOT EXECUTED
57782: 7c0a moveq #10,%d6 <== NOT EXECUTED
57784: 9c81 subl %d1,%d6 <== NOT EXECUTED
57786: 9b80 subxl %d0,%d5 <== NOT EXECUTED
57788: 6d36 blts 577c0 <rtems_rfs_dir_read+0xcc> <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
5778a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5778c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5778e: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
57792: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
57796: 4eb9 0006 83a4 jsr 683a4 <__divdi3> <== NOT EXECUTED
5779c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
577a0: 2e83 movel %d3,%sp@ <== NOT EXECUTED
577a2: 4286 clrl %d6 <== NOT EXECUTED
577a4: 5281 addql #1,%d1 <== NOT EXECUTED
577a6: d186 addxl %d6,%d0 <== NOT EXECUTED
577a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
577aa: 2f01 movel %d1,%sp@- <== NOT EXECUTED
577ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED
577ae: 4eb9 0006 82f4 jsr 682f4 <__muldi3> <== NOT EXECUTED
577b4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
577b8: 2d40 0010 movel %d0,%fp@(16) <== NOT EXECUTED
577bc: 2d41 0014 movel %d1,%fp@(20) <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
577c0: 260e movel %fp,%d3 <== NOT EXECUTED
577c2: 0683 ffff ffa8 addil #-88,%d3 <== NOT EXECUTED
577c8: 240e movel %fp,%d2 <== NOT EXECUTED
577ca: 0682 ffff ffb6 addil #-74,%d2 <== NOT EXECUTED
577d0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
577d2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
577d6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
577da: 2f02 movel %d2,%sp@- <== NOT EXECUTED
577dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
577de: 4eb9 0005 5cc2 jsr 55cc2 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
577e4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
if (((rtems_rfs_fs_block_size (fs) -
(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);
577e8: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
577ea: 6f18 bles 57804 <rtems_rfs_dir_read+0x110> <== NOT EXECUTED
{
if (rc == ENXIO)
577ec: 7e06 moveq #6,%d7 <== NOT EXECUTED
577ee: be80 cmpl %d0,%d7 <== NOT EXECUTED
577f0: 6602 bnes 577f4 <rtems_rfs_dir_read+0x100> <== NOT EXECUTED
rc = ENOENT;
577f2: 7802 moveq #2,%d4 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
577f4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
577f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
577f8: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
577fe: 508f addql #8,%sp <== NOT EXECUTED
57800: 6000 022c braw 57a2e <rtems_rfs_dir_read+0x33a> <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57804: 2a0e movel %fp,%d5 <== NOT EXECUTED
57806: 0685 ffff ffac addil #-84,%d5 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5780c: 2c03 movel %d3,%d6 <== NOT EXECUTED
5780e: 2e02 movel %d2,%d7 <== NOT EXECUTED
57810: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
57812: 42ae ffae clrl %fp@(-82) <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
57816: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
5781a: 42ae ffb2 clrl %fp@(-78) <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
5781e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57822: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57826: 2f05 movel %d5,%sp@- <== NOT EXECUTED
57828: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5782a: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
57830: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57834: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
57836: 6f06 bles 5783e <rtems_rfs_dir_read+0x14a> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &buffer);
57838: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5783a: 6000 01dc braw 57a18 <rtems_rfs_dir_read+0x324> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
5783e: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
57842: 4282 clrl %d2 <== NOT EXECUTED
57844: 4280 clrl %d0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
57846: 2668 001a moveal %a0@(26),%a3 <== NOT EXECUTED
5784a: 262e ffc8 movel %fp@(-56),%d3 <== NOT EXECUTED
5784e: d7c3 addal %d3,%a3 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
57850: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED
57854: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
57858: e18a lsll #8,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5785a: 1213 moveb %a3@,%d1 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
5785c: 8480 orl %d0,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5785e: 102b 0001 moveb %a3@(1),%d0 <== NOT EXECUTED
57862: 3241 moveaw %d1,%a1 <== NOT EXECUTED
57864: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED
57868: 3040 moveaw %d0,%a0 <== NOT EXECUTED
5786a: 102b 0002 moveb %a3@(2),%d0 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
5786e: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED
57874: 6700 0142 beqw 579b8 <rtems_rfs_dir_read+0x2c4> <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
57878: 7c18 moveq #24,%d6 <== NOT EXECUTED
5787a: 2a09 movel %a1,%d5 <== NOT EXECUTED
5787c: 3e08 movew %a0,%d7 <== NOT EXECUTED
5787e: edad lsll %d6,%d5 <== NOT EXECUTED
57880: 4286 clrl %d6 <== NOT EXECUTED
57882: 1c07 moveb %d7,%d6 <== NOT EXECUTED
57884: 4846 swap %d6 <== NOT EXECUTED
57886: 4246 clrw %d6 <== NOT EXECUTED
57888: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
5788e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
57894: 8a86 orl %d6,%d5 <== NOT EXECUTED
57896: e188 lsll #8,%d0 <== NOT EXECUTED
57898: 8a81 orl %d1,%d5 <== NOT EXECUTED
5789a: 8a80 orl %d0,%d5 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
5789c: 700a moveq #10,%d0 <== NOT EXECUTED
5789e: b082 cmpl %d2,%d0 <== NOT EXECUTED
578a0: 6c10 bges 578b2 <rtems_rfs_dir_read+0x1be> <== NOT EXECUTED
578a2: b4aa 001c cmpl %a2@(28),%d2 <== NOT EXECUTED
578a6: 640a bccs 578b2 <rtems_rfs_dir_read+0x1be> <== NOT EXECUTED
578a8: 4a85 tstl %d5 <== NOT EXECUTED
578aa: 6706 beqs 578b2 <rtems_rfs_dir_read+0x1be> <== NOT EXECUTED
578ac: baaa 0014 cmpl %a2@(20),%d5 <== NOT EXECUTED
578b0: 633a blss 578ec <rtems_rfs_dir_read+0x1f8> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
578b2: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
578b8: 42a7 clrl %sp@- <== NOT EXECUTED
578ba: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
578c0: 508f addql #8,%sp <== NOT EXECUTED
578c2: 4a00 tstb %d0 <== NOT EXECUTED
578c4: 6700 0148 beqw 57a0e <rtems_rfs_dir_read+0x31a> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
578c8: 2f2e ffc8 movel %fp@(-56),%sp@- <== NOT EXECUTED
578cc: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
578d0: 2f05 movel %d5,%sp@- <== NOT EXECUTED
578d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
578d4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
578d8: 4879 0006 d8a2 pea 6d8a2 <CSWTCH.2+0xb62> <== NOT EXECUTED
578de: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
578e4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
578e8: 6000 0124 braw 57a0e <rtems_rfs_dir_read+0x31a> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
578ec: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED
578f0: 42a7 clrl %sp@- <== NOT EXECUTED
578f2: 2f0c movel %a4,%sp@- <== NOT EXECUTED
578f4: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
578fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
578fe: 2002 movel %d2,%d0 <== NOT EXECUTED
57900: d095 addl %a5@,%d0 <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
57902: 720a moveq #10,%d1 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
57904: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
57908: 2c2e 0014 movel %fp@(20),%d6 <== NOT EXECUTED
5790c: 2945 0004 movel %d5,%a4@(4) <== NOT EXECUTED
57910: 2946 0008 movel %d6,%a4@(8) <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
57914: 3c3c 0110 movew #272,%d6 <== NOT EXECUTED
57918: 3946 000c movew %d6,%a4@(12) <== NOT EXECUTED
*length += elength;
5791c: 2a80 movel %d0,%a5@ <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
5791e: 2e2a 0008 movel %a2@(8),%d7 <== NOT EXECUTED
57922: 9e83 subl %d3,%d7 <== NOT EXECUTED
57924: 2607 movel %d7,%d3 <== NOT EXECUTED
57926: 9682 subl %d2,%d3 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
57928: b283 cmpl %d3,%d1 <== NOT EXECUTED
5792a: 6d04 blts 57930 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
*length += remaining;
5792c: d680 addl %d0,%d3 <== NOT EXECUTED
5792e: 2a83 movel %d3,%a5@ <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
57930: 0682 ffff fff6 addil #-10,%d2 <== NOT EXECUTED
57936: 0c82 0000 00ff cmpil #255,%d2 <== NOT EXECUTED
5793c: 6f06 bles 57944 <rtems_rfs_dir_read+0x250> <== NOT EXECUTED
5793e: 243c 0000 00ff movel #255,%d2 <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
57944: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57946: 486b 000a pea %a3@(10) <== NOT EXECUTED
5794a: 260c movel %a4,%d3 <== NOT EXECUTED
5794c: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
57952: 7a18 moveq #24,%d5 <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
57954: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57956: 4eb9 0005 bffc jsr 5bffc <memcpy> <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
5795c: 4280 clrl %d0 <== NOT EXECUTED
5795e: 4281 clrl %d1 <== NOT EXECUTED
57960: 1013 moveb %a3@,%d0 <== NOT EXECUTED
57962: 122b 0001 moveb %a3@(1),%d1 <== NOT EXECUTED
57966: eba8 lsll %d5,%d0 <== NOT EXECUTED
57968: 4841 swap %d1 <== NOT EXECUTED
5796a: 4241 clrw %d1 <== NOT EXECUTED
5796c: 8081 orl %d1,%d0 <== NOT EXECUTED
5796e: 4281 clrl %d1 <== NOT EXECUTED
57970: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED
57974: 8081 orl %d1,%d0 <== NOT EXECUTED
57976: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED
5797a: e189 lsll #8,%d1 <== NOT EXECUTED
dirent->d_namlen = elength;
5797c: 3942 000e movew %d2,%a4@(14) <== NOT EXECUTED
if (elength > NAME_MAX)
elength = NAME_MAX;
memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength);
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
57980: 8081 orl %d1,%d0 <== NOT EXECUTED
57982: 2880 movel %d0,%a4@ <== NOT EXECUTED
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
57984: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
5798a: 42a7 clrl %sp@- <== NOT EXECUTED
5798c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57992: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
57996: 4a00 tstb %d0 <== NOT EXECUTED
57998: 677a beqs 57a14 <rtems_rfs_dir_read+0x320> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
5799a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5799c: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
5799e: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
579a2: 2f2c 0004 movel %a4@(4),%sp@- <== NOT EXECUTED
579a6: 4879 0006 d8e6 pea 6d8e6 <CSWTCH.2+0xba6> <== NOT EXECUTED
579ac: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
579b2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
579b6: 605c bras 57a14 <rtems_rfs_dir_read+0x320> <== NOT EXECUTED
dirent->d_off, dirent->d_ino, dirent->d_name);
break;
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
579b8: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED
579bc: 9083 subl %d3,%d0 <== NOT EXECUTED
579be: d195 addl %d0,%a5@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
579c0: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
579c6: 42a7 clrl %sp@- <== NOT EXECUTED
579c8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
579ce: 508f addql #8,%sp <== NOT EXECUTED
579d0: 4a00 tstb %d0 <== NOT EXECUTED
579d2: 671a beqs 579ee <rtems_rfs_dir_read+0x2fa> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
579d4: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
579d6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
579da: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
579de: 4879 0006 d91b pea 6d91b <CSWTCH.2+0xbdb> <== NOT EXECUTED
579e4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
579ea: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
579ee: 2f06 movel %d6,%sp@- <== NOT EXECUTED
579f0: 2f07 movel %d7,%sp@- <== NOT EXECUTED
579f2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
579f4: 4eb9 0005 5d40 jsr 55d40 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
579fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
579fe: 7206 moveq #6,%d1 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
57a00: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc == ENXIO)
57a02: b280 cmpl %d0,%d1 <== NOT EXECUTED
57a04: 670c beqs 57a12 <rtems_rfs_dir_read+0x31e> <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
57a06: 4a80 tstl %d0 <== NOT EXECUTED
57a08: 6700 fe14 beqw 5781e <rtems_rfs_dir_read+0x12a> <== NOT EXECUTED
57a0c: 6006 bras 57a14 <rtems_rfs_dir_read+0x320> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
printf ("rtems-rfs: dir-read: "
"bad length or ino for ino %" PRIu32 ": %u/%" PRId32 " @ %04" PRIx32 "\n",
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
57a0e: 7805 moveq #5,%d4 <== NOT EXECUTED
57a10: 6002 bras 57a14 <rtems_rfs_dir_read+0x320> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
57a12: 7802 moveq #2,%d4 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
57a14: 486e ffac pea %fp@(-84) <== NOT EXECUTED
57a18: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57a1a: 4eba f1bc jsr %pc@(56bd8 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57a1e: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57a22: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57a24: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
57a2a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return rc;
}
57a2e: 2004 movel %d4,%d0 <== NOT EXECUTED
57a30: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED
57a36: 4e5e unlk %fp <== NOT EXECUTED
00057c20 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
57c20: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
57c24: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
57c28: 42a7 clrl %sp@- <== NOT EXECUTED
57c2a: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
57c2e: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
57c32: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
57c36: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57c3c: 508f addql #8,%sp <== NOT EXECUTED
57c3e: 4a00 tstb %d0 <== NOT EXECUTED
57c40: 6716 beqs 57c58 <rtems_rfs_file_close+0x38> <== NOT EXECUTED
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
57c42: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
57c46: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED
57c4a: 4879 0006 d9b4 pea 6d9b4 <CSWTCH.2+0xc74> <== NOT EXECUTED
57c50: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57c56: 508f addql #8,%sp <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
57c58: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57c5c: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
57c60: 6f06 bles 57c68 <rtems_rfs_file_close+0x48> <== NOT EXECUTED
handle->shared->references--;
57c62: 5380 subql #1,%d0 <== NOT EXECUTED
57c64: 2140 0008 movel %d0,%a0@(8) <== NOT EXECUTED
if (handle->shared->references == 0)
57c68: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED
57c6c: 6600 01bc bnew 57e2a <rtems_rfs_file_close+0x20a> <== NOT EXECUTED
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
57c70: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED
57c74: 6614 bnes 57c8a <rtems_rfs_file_close+0x6a> <== NOT EXECUTED
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
57c76: 4868 000c pea %a0@(12) <== NOT EXECUTED
57c7a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57c7c: 4eb9 0004 ea4c jsr 4ea4c <rtems_rfs_inode_load> <== NOT EXECUTED
if (rrc == 0)
57c82: 508f addql #8,%sp <== NOT EXECUTED
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);
57c84: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rrc == 0)
57c86: 6600 00e2 bnew 57d6a <rtems_rfs_file_close+0x14a> <== NOT EXECUTED
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
57c8a: 206a 001a moveal %a2@(26),%a0 <== 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);
57c8e: 7418 moveq #24,%d2 <== NOT EXECUTED
if (rrc == 0)
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
57c90: 2028 0084 movel %a0@(132),%d0 <== NOT EXECUTED
57c94: 2200 movel %d0,%d1 <== NOT EXECUTED
57c96: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
57c98: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57c9c: 1341 0010 moveb %d1,%a1@(16) <== NOT EXECUTED
57ca0: 2200 movel %d0,%d1 <== NOT EXECUTED
57ca2: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57ca6: 4241 clrw %d1 <== NOT EXECUTED
57ca8: 4841 swap %d1 <== NOT EXECUTED
57caa: 1341 0011 moveb %d1,%a1@(17) <== NOT EXECUTED
57cae: 2200 movel %d0,%d1 <== NOT EXECUTED
57cb0: e089 lsrl #8,%d1 <== NOT EXECUTED
57cb2: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57cb6: 1341 0012 moveb %d1,%a1@(18) <== NOT EXECUTED
57cba: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57cbe: 1340 0013 moveb %d0,%a1@(19) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
57cc2: 7001 moveq #1,%d0 <== NOT EXECUTED
57cc4: 1140 001c moveb %d0,%a0@(28) <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
57cc8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
57ccc: 2028 0088 movel %a0@(136),%d0 <== 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);
57cd0: 2200 movel %d0,%d1 <== NOT EXECUTED
57cd2: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
57cd4: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57cd8: 1341 0014 moveb %d1,%a1@(20) <== NOT EXECUTED
57cdc: 2200 movel %d0,%d1 <== NOT EXECUTED
57cde: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57ce2: 4241 clrw %d1 <== NOT EXECUTED
57ce4: 4841 swap %d1 <== NOT EXECUTED
57ce6: 1341 0015 moveb %d1,%a1@(21) <== NOT EXECUTED
57cea: 2200 movel %d0,%d1 <== NOT EXECUTED
57cec: e089 lsrl #8,%d1 <== NOT EXECUTED
57cee: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57cf2: 1341 0016 moveb %d1,%a1@(22) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
57cf6: 7201 moveq #1,%d1 <== 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);
57cf8: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57cfc: 1340 0017 moveb %d0,%a1@(23) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
57d00: 1141 001c moveb %d1,%a0@(28) <== NOT EXECUTED
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
57d04: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
57d08: 2028 008c movel %a0@(140),%d0 <== NOT EXECUTED
*/
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);
57d0c: 2200 movel %d0,%d1 <== NOT EXECUTED
57d0e: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
57d10: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57d14: 1341 0018 moveb %d1,%a1@(24) <== NOT EXECUTED
57d18: 2200 movel %d0,%d1 <== NOT EXECUTED
57d1a: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57d1e: 4241 clrw %d1 <== NOT EXECUTED
57d20: 4841 swap %d1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
57d22: 7401 moveq #1,%d2 <== NOT EXECUTED
*/
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);
57d24: 1341 0019 moveb %d1,%a1@(25) <== NOT EXECUTED
57d28: 2200 movel %d0,%d1 <== NOT EXECUTED
57d2a: e089 lsrl #8,%d1 <== NOT EXECUTED
57d2c: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57d30: 1341 001a moveb %d1,%a1@(26) <== NOT EXECUTED
57d34: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
57d38: 1340 001b moveb %d0,%a1@(27) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
57d3c: 1142 001c moveb %d2,%a0@(28) <== NOT EXECUTED
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
57d40: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57d44: 2028 007c movel %a0@(124),%d0 <== NOT EXECUTED
57d48: b0a8 0038 cmpl %a0@(56),%d0 <== NOT EXECUTED
57d4c: 660a bnes 57d58 <rtems_rfs_file_close+0x138> <== NOT EXECUTED
57d4e: 2228 003c movel %a0@(60),%d1 <== NOT EXECUTED
57d52: b2a8 0080 cmpl %a0@(128),%d1 <== NOT EXECUTED
57d56: 6710 beqs 57d68 <rtems_rfs_file_close+0x148> <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
57d58: 2140 0038 movel %d0,%a0@(56) <== NOT EXECUTED
map->dirty = true;
57d5c: 7401 moveq #1,%d2 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_map_set_size (rtems_rfs_block_map* map,
rtems_rfs_block_size* size)
{
rtems_rfs_block_copy_size (&map->size, size);
57d5e: 2168 0080 003c movel %a0@(128),%a0@(60) <== NOT EXECUTED
map->dirty = true;
57d64: 1142 0032 moveb %d2,%a0@(50) <== NOT EXECUTED
57d68: 4282 clrl %d2 <== 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);
57d6a: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57d6e: 41e8 0032 lea %a0@(50),%a0 <== NOT EXECUTED
57d72: 2f08 movel %a0,%sp@- <== NOT EXECUTED
57d74: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57d76: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
57d7c: 508f addql #8,%sp <== 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);
57d7e: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
57d80: 6f3c bles 57dbe <rtems_rfs_file_close+0x19e> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
57d82: 42a7 clrl %sp@- <== NOT EXECUTED
57d84: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
57d88: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57d8e: 508f addql #8,%sp <== NOT EXECUTED
57d90: 4a00 tstb %d0 <== NOT EXECUTED
57d92: 6724 beqs 57db8 <rtems_rfs_file_close+0x198> <== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
57d94: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57d96: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
57d9c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57d9e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
57da0: 206a 001a moveal %a2@(26),%a0 <== 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",
57da4: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED
57da8: 4879 0006 d9db pea 6d9db <CSWTCH.2+0xc9b> <== NOT EXECUTED
57dae: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57db4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
57db8: 4a82 tstl %d2 <== NOT EXECUTED
57dba: 6602 bnes 57dbe <rtems_rfs_file_close+0x19e> <== NOT EXECUTED
57dbc: 2404 movel %d4,%d2 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
57dbe: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57dc2: 41e8 000c lea %a0@(12),%a0 <== NOT EXECUTED
57dc6: 2f08 movel %a0,%sp@- <== NOT EXECUTED
57dc8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57dca: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
57dd0: 508f addql #8,%sp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
57dd2: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
57dd4: 6f3c bles 57e12 <rtems_rfs_file_close+0x1f2> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
57dd6: 42a7 clrl %sp@- <== NOT EXECUTED
57dd8: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
57ddc: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57de2: 508f addql #8,%sp <== NOT EXECUTED
57de4: 4a00 tstb %d0 <== NOT EXECUTED
57de6: 6724 beqs 57e0c <rtems_rfs_file_close+0x1ec> <== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
57de8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57dea: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
57df0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57df2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
57df4: 206a 001a moveal %a2@(26),%a0 <== 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",
57df8: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED
57dfc: 4879 0006 da14 pea 6da14 <CSWTCH.2+0xcd4> <== NOT EXECUTED
57e02: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57e08: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
57e0c: 4a82 tstl %d2 <== NOT EXECUTED
57e0e: 6602 bnes 57e12 <rtems_rfs_file_close+0x1f2> <== NOT EXECUTED
57e10: 2404 movel %d4,%d2 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
57e12: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED
57e16: 4eb9 0005 3d78 jsr 53d78 <_Chain_Extract> <== NOT EXECUTED
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
57e1c: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED
57e20: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
57e26: 508f addql #8,%sp <== NOT EXECUTED
57e28: 6002 bras 57e2c <rtems_rfs_file_close+0x20c> <== NOT EXECUTED
rtems_rfs_file_handle* handle)
{
int rrc;
int rc;
rrc = 0;
57e2a: 4282 clrl %d2 <== 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);
57e2c: 486a 0004 pea %a2@(4) <== NOT EXECUTED
57e30: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57e32: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer);
if ((rrc == 0) && (rc > 0))
rrc = rc;
if (rrc > 0)
57e38: 508f addql #8,%sp <== NOT EXECUTED
handle->dirty = false;
57e3a: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
57e3c: 42aa 0006 clrl %a2@(6) <== 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);
handle->dirty = false;
57e40: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
57e44: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
57e48: 4a82 tstl %d2 <== NOT EXECUTED
57e4a: 6f2e bles 57e7a <rtems_rfs_file_close+0x25a> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
57e4c: 42a7 clrl %sp@- <== NOT EXECUTED
57e4e: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
57e52: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57e58: 508f addql #8,%sp <== NOT EXECUTED
57e5a: 4a00 tstb %d0 <== NOT EXECUTED
57e5c: 671c beqs 57e7a <rtems_rfs_file_close+0x25a> <== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
57e5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57e60: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
57e66: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57e68: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57e6a: 4879 0006 da4f pea 6da4f <CSWTCH.2+0xd0f> <== NOT EXECUTED
57e70: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57e76: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
free (handle);
57e7a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57e7c: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return rrc;
}
57e82: 2002 movel %d2,%d0 <== NOT EXECUTED
57e84: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
57e8a: 4e5e unlk %fp <== NOT EXECUTED
000585fc <rtems_rfs_file_get_shared>:
rtems_rfs_file_shared*
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
585fc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
58600: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
58604: 2069 0074 moveal %a1@(116),%a0 <== NOT EXECUTED
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 ));
58608: 43e9 0078 lea %a1@(120),%a1 <== NOT EXECUTED
5860c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
rtems_chain_node* node;
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
58610: 6008 bras 5861a <rtems_rfs_file_get_shared+0x1e> <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
58612: b0a8 0014 cmpl %a0@(20),%d0 <== NOT EXECUTED
58616: 670a beqs 58622 <rtems_rfs_file_get_shared+0x26> <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
58618: 2050 moveal %a0@,%a0 <== 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))
5861a: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
5861c: 66f4 bnes 58612 <rtems_rfs_file_get_shared+0x16> <== NOT EXECUTED
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
5861e: 4280 clrl %d0 <== NOT EXECUTED
58620: 6002 bras 58624 <rtems_rfs_file_get_shared+0x28> <== NOT EXECUTED
node = rtems_chain_first (&fs->file_shares);
while (!rtems_chain_is_tail (&fs->file_shares, node))
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
58622: 2008 movel %a0,%d0 <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
58624: 4e5e unlk %fp <== NOT EXECUTED
0005805a <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
5805a: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
5805e: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58062: 42a7 clrl %sp@- <== NOT EXECUTED
58064: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
58068: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
5806c: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
58070: 162e 0013 moveb %fp@(19),%d3 <== NOT EXECUTED
bool atime;
bool mtime;
bool length;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58074: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5807a: 508f addql #8,%sp <== NOT EXECUTED
5807c: 4a00 tstb %d0 <== NOT EXECUTED
5807e: 6726 beqs 580a6 <rtems_rfs_file_io_end+0x4c> <== NOT EXECUTED
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
58080: 4a03 tstb %d3 <== NOT EXECUTED
58082: 6708 beqs 5808c <rtems_rfs_file_io_end+0x32> <== NOT EXECUTED
58084: 203c 0006 cae3 movel #445155,%d0 <== NOT EXECUTED
5808a: 6006 bras 58092 <rtems_rfs_file_io_end+0x38> <== NOT EXECUTED
5808c: 203c 0006 da76 movel #449142,%d0 <== NOT EXECUTED
58092: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58094: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58096: 4879 0006 db2d pea 6db2d <CSWTCH.2+0xded> <== NOT EXECUTED
5809c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
580a2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
580a6: 4aaa 000a tstl %a2@(10) <== NOT EXECUTED
580aa: 675a beqs 58106 <rtems_rfs_file_io_end+0xac> <== NOT EXECUTED
{
if (!read)
580ac: 4a03 tstb %d3 <== NOT EXECUTED
580ae: 6606 bnes 580b6 <rtems_rfs_file_io_end+0x5c> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
580b0: 7001 moveq #1,%d0 <== NOT EXECUTED
580b2: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
580b6: 486a 0004 pea %a2@(4) <== NOT EXECUTED
580ba: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
580be: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
580c2: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
580c8: 508f addql #8,%sp <== NOT EXECUTED
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
if (!read)
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
580ca: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
580cc: 6f3a bles 58108 <rtems_rfs_file_io_end+0xae> <== NOT EXECUTED
{
printf (
580ce: 2f00 movel %d0,%sp@- <== NOT EXECUTED
580d0: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
580d6: 588f addql #4,%sp <== NOT EXECUTED
580d8: 4a03 tstb %d3 <== NOT EXECUTED
580da: 6708 beqs 580e4 <rtems_rfs_file_io_end+0x8a> <== NOT EXECUTED
580dc: 223c 0006 cae3 movel #445155,%d1 <== NOT EXECUTED
580e2: 6006 bras 580ea <rtems_rfs_file_io_end+0x90> <== NOT EXECUTED
580e4: 223c 0006 da76 movel #449142,%d1 <== NOT EXECUTED
580ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED
580ec: 2f02 movel %d2,%sp@- <== NOT EXECUTED
580ee: 2f04 movel %d4,%sp@- <== NOT EXECUTED
580f0: 2f01 movel %d1,%sp@- <== NOT EXECUTED
580f2: 4879 0006 db55 pea 6db55 <CSWTCH.2+0xe15> <== NOT EXECUTED
580f8: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
580fe: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
58102: 6000 011e braw 58222 <rtems_rfs_file_io_end+0x1c8> <== NOT EXECUTED
bool read)
{
bool atime;
bool mtime;
bool length;
int rc = 0;
58106: 4282 clrl %d2 <== 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)))
58108: 206a 001a moveal %a2@(26),%a0 <== 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;
5810c: d8aa 0012 addl %a2@(18),%d4 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
58110: 2268 0090 moveal %a0@(144),%a1 <== NOT EXECUTED
58114: 2029 0008 movel %a1@(8),%d0 <== 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;
58118: 2544 0012 movel %d4,%a2@(18) <== NOT EXECUTED
if (handle->bpos.boff >=
5811c: b084 cmpl %d4,%d0 <== NOT EXECUTED
5811e: 620a bhis 5812a <rtems_rfs_file_io_end+0xd0> <== NOT EXECUTED
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
58120: 9880 subl %d0,%d4 <== NOT EXECUTED
handle->bpos.boff += size;
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
{
handle->bpos.bno++;
58122: 52aa 000e addql #1,%a2@(14) <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
58126: 2544 0012 movel %d4,%a2@(18) <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
5812a: 4a03 tstb %d3 <== NOT EXECUTED
5812c: 6634 bnes 58162 <rtems_rfs_file_io_end+0x108> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
5812e: 202a 000e movel %a2@(14),%d0 <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
58132: 6706 beqs 5813a <rtems_rfs_file_io_end+0xe0> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
58134: 4aa8 0038 tstl %a0@(56) <== NOT EXECUTED
58138: 6718 beqs 58152 <rtems_rfs_file_io_end+0xf8> <== NOT EXECUTED
5813a: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED
5813e: b280 cmpl %d0,%d1 <== NOT EXECUTED
58140: 6310 blss 58152 <rtems_rfs_file_io_end+0xf8> <== NOT EXECUTED
58142: 5381 subql #1,%d1 <== NOT EXECUTED
58144: b280 cmpl %d0,%d1 <== NOT EXECUTED
58146: 661a bnes 58162 <rtems_rfs_file_io_end+0x108> <== NOT EXECUTED
58148: 2828 003c movel %a0@(60),%d4 <== NOT EXECUTED
5814c: b8aa 0012 cmpl %a2@(18),%d4 <== NOT EXECUTED
58150: 6410 bccs 58162 <rtems_rfs_file_io_end+0x108> <== 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;
58152: 216a 0012 003c movel %a2@(18),%a0@(60) <== NOT EXECUTED
map->dirty = true;
58158: 7c01 moveq #1,%d6 <== NOT EXECUTED
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
handle->bpos.boff);
length = true;
mtime = true;
5815a: 7001 moveq #1,%d0 <== NOT EXECUTED
5815c: 1146 0032 moveb %d6,%a0@(50) <== NOT EXECUTED
58160: 6002 bras 58164 <rtems_rfs_file_io_end+0x10a> <== NOT EXECUTED
handle->bpos.bno++;
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
}
length = false;
mtime = false;
58162: 4200 clrb %d0 <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
58164: 2212 movel %a2@,%d1 <== NOT EXECUTED
58166: 2a01 movel %d1,%d5 <== NOT EXECUTED
58168: 7801 moveq #1,%d4 <== NOT EXECUTED
5816a: 4685 notl %d5 <== NOT EXECUTED
5816c: ca84 andl %d4,%d5 <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
5816e: 4284 clrl %d4 <== NOT EXECUTED
58170: 0801 0001 btst #1,%d1 <== NOT EXECUTED
58174: 6602 bnes 58178 <rtems_rfs_file_io_end+0x11e> <== NOT EXECUTED
58176: 1800 moveb %d0,%d4 <== NOT EXECUTED
58178: 7c01 moveq #1,%d6 <== NOT EXECUTED
5817a: c886 andl %d6,%d4 <== NOT EXECUTED
length = rtems_rfs_file_update_length (handle) && length;
5817c: 4286 clrl %d6 <== NOT EXECUTED
5817e: 44c1 movew %d1,%ccr <== NOT EXECUTED
58180: 6702 beqs 58184 <rtems_rfs_file_io_end+0x12a> <== NOT EXECUTED
58182: 1c00 moveb %d0,%d6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58184: 42a7 clrl %sp@- <== NOT EXECUTED
58186: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
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;
5818a: 7001 moveq #1,%d0 <== NOT EXECUTED
5818c: cc80 andl %d0,%d6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5818e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58194: 508f addql #8,%sp <== NOT EXECUTED
58196: 4a00 tstb %d0 <== NOT EXECUTED
58198: 6740 beqs 581da <rtems_rfs_file_io_end+0x180> <== NOT EXECUTED
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
5819a: 4a06 tstb %d6 <== NOT EXECUTED
5819c: 6706 beqs 581a4 <rtems_rfs_file_io_end+0x14a> <== NOT EXECUTED
5819e: 307c 004c moveaw #76,%a0 <== NOT EXECUTED
581a2: 6004 bras 581a8 <rtems_rfs_file_io_end+0x14e> <== NOT EXECUTED
581a4: 307c 002d moveaw #45,%a0 <== NOT EXECUTED
581a8: 4a04 tstb %d4 <== NOT EXECUTED
581aa: 6704 beqs 581b0 <rtems_rfs_file_io_end+0x156> <== NOT EXECUTED
581ac: 724d moveq #77,%d1 <== NOT EXECUTED
581ae: 6002 bras 581b2 <rtems_rfs_file_io_end+0x158> <== NOT EXECUTED
581b0: 722d moveq #45,%d1 <== NOT EXECUTED
581b2: 4a05 tstb %d5 <== NOT EXECUTED
581b4: 6704 beqs 581ba <rtems_rfs_file_io_end+0x160> <== NOT EXECUTED
581b6: 7041 moveq #65,%d0 <== NOT EXECUTED
581b8: 6002 bras 581bc <rtems_rfs_file_io_end+0x162> <== NOT EXECUTED
581ba: 702d moveq #45,%d0 <== NOT EXECUTED
581bc: 2f08 movel %a0,%sp@- <== NOT EXECUTED
581be: 2f01 movel %d1,%sp@- <== NOT EXECUTED
581c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
581c2: 2f2a 0012 movel %a2@(18),%sp@- <== NOT EXECUTED
581c6: 2f2a 000e movel %a2@(14),%sp@- <== NOT EXECUTED
581ca: 4879 0006 db97 pea 6db97 <CSWTCH.2+0xe57> <== NOT EXECUTED
581d0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
581d6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
581da: 4a05 tstb %d5 <== NOT EXECUTED
581dc: 6604 bnes 581e2 <rtems_rfs_file_io_end+0x188> <== NOT EXECUTED
581de: 4a04 tstb %d4 <== NOT EXECUTED
581e0: 6724 beqs 58206 <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
{
time_t now = time (NULL);
581e2: 42a7 clrl %sp@- <== NOT EXECUTED
581e4: 4eb9 0005 fc1c jsr 5fc1c <time> <== NOT EXECUTED
if (read && atime)
581ea: 588f addql #4,%sp <== NOT EXECUTED
581ec: 4a03 tstb %d3 <== NOT EXECUTED
581ee: 672c beqs 5821c <rtems_rfs_file_io_end+0x1c2> <== NOT EXECUTED
581f0: 4a05 tstb %d5 <== NOT EXECUTED
581f2: 6712 beqs 58206 <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
handle->shared->atime = now;
581f4: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
581f8: 2140 0084 movel %d0,%a0@(132) <== NOT EXECUTED
581fc: 6008 bras 58206 <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
581fe: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58202: 2140 0088 movel %d0,%a0@(136) <== NOT EXECUTED
}
if (length)
58206: 4a06 tstb %d6 <== NOT EXECUTED
58208: 6718 beqs 58222 <rtems_rfs_file_io_end+0x1c8> <== NOT EXECUTED
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
5820a: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
5820e: 2168 0038 007c movel %a0@(56),%a0@(124) <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
58214: 2168 003c 0080 movel %a0@(60),%a0@(128) <== NOT EXECUTED
5821a: 6006 bras 58222 <rtems_rfs_file_io_end+0x1c8> <== NOT EXECUTED
if (atime || mtime)
{
time_t now = time (NULL);
if (read && atime)
handle->shared->atime = now;
if (!read && mtime)
5821c: 4a04 tstb %d4 <== NOT EXECUTED
5821e: 66de bnes 581fe <rtems_rfs_file_io_end+0x1a4> <== NOT EXECUTED
58220: 60e4 bras 58206 <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
handle->shared->size.offset =
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
58222: 2002 movel %d2,%d0 <== NOT EXECUTED
58224: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED
5822a: 4e5e unlk %fp <== NOT EXECUTED
0005822e <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
5822e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
58232: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
58236: 4aa8 000a tstl %a0@(10) <== NOT EXECUTED
5823a: 6716 beqs 58252 <rtems_rfs_file_io_release+0x24> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5823c: 4868 0004 pea %a0@(4) <== NOT EXECUTED
58240: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
58244: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58248: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
5824e: 508f addql #8,%sp <== NOT EXECUTED
58250: 6002 bras 58254 <rtems_rfs_file_io_release+0x26> <== NOT EXECUTED
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
58252: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
rtems_rfs_file_buffer (handle));
return rc;
}
58254: 4e5e unlk %fp <== NOT EXECUTED
00057e8e <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
57e8e: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
57e92: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
57e96: 42a7 clrl %sp@- <== NOT EXECUTED
57e98: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
57e9c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
57ea0: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
57ea4: 142e 0013 moveb %fp@(19),%d2 <== NOT EXECUTED
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
57ea8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57eae: 508f addql #8,%sp <== NOT EXECUTED
57eb0: 4a00 tstb %d0 <== NOT EXECUTED
57eb2: 6730 beqs 57ee4 <rtems_rfs_file_io_start+0x56> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
57eb4: 206a 0012 moveal %a2@(18),%a0 <== NOT EXECUTED
57eb8: 222a 000e movel %a2@(14),%d1 <== NOT EXECUTED
57ebc: 4a02 tstb %d2 <== NOT EXECUTED
57ebe: 6708 beqs 57ec8 <rtems_rfs_file_io_start+0x3a> <== NOT EXECUTED
57ec0: 203c 0006 cae3 movel #445155,%d0 <== NOT EXECUTED
57ec6: 6006 bras 57ece <rtems_rfs_file_io_start+0x40> <== NOT EXECUTED
57ec8: 203c 0006 da76 movel #449142,%d0 <== NOT EXECUTED
57ece: 2f08 movel %a0,%sp@- <== NOT EXECUTED
57ed0: 2f01 movel %d1,%sp@- <== NOT EXECUTED
57ed2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57ed4: 4879 0006 da7c pea 6da7c <CSWTCH.2+0xd3c> <== NOT EXECUTED
57eda: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57ee0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
read ? "read" : "write", handle->bpos.bno, handle->bpos.boff);
if (!rtems_rfs_buffer_handle_has_block (&handle->buffer))
57ee4: 4aaa 000a tstl %a2@(10) <== NOT EXECUTED
57ee8: 6600 0106 bnew 57ff0 <rtems_rfs_file_io_start+0x162> <== NOT EXECUTED
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
57eec: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
57ef0: 486e fffc pea %fp@(-4) <== NOT EXECUTED
57ef4: 486a 000e pea %a2@(14) <== NOT EXECUTED
57ef8: 4868 0032 pea %a0@(50) <== NOT EXECUTED
57efc: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
57f00: 4eb9 0005 5bd6 jsr 55bd6 <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
57f06: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57f0a: 4a80 tstl %d0 <== NOT EXECUTED
57f0c: 6f60 bles 57f6e <rtems_rfs_file_io_start+0xe0> <== NOT EXECUTED
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
57f0e: 7206 moveq #6,%d1 <== NOT EXECUTED
57f10: 4a02 tstb %d2 <== NOT EXECUTED
57f12: 670c beqs 57f20 <rtems_rfs_file_io_start+0x92> <== NOT EXECUTED
57f14: b280 cmpl %d0,%d1 <== NOT EXECUTED
57f16: 6600 0138 bnew 58050 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
{
*available = 0;
57f1a: 4293 clrl %a3@ <== NOT EXECUTED
57f1c: 6000 0130 braw 5804e <rtems_rfs_file_io_start+0x1c0> <== NOT EXECUTED
return 0;
}
if (rc != ENXIO)
57f20: b280 cmpl %d0,%d1 <== NOT EXECUTED
57f22: 6600 012c bnew 58050 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
57f26: 42a7 clrl %sp@- <== NOT EXECUTED
57f28: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
57f2c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57f32: 508f addql #8,%sp <== NOT EXECUTED
57f34: 4a00 tstb %d0 <== NOT EXECUTED
57f36: 670e beqs 57f46 <rtems_rfs_file_io_start+0xb8> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: grow\n");
57f38: 4879 0006 daa7 pea 6daa7 <CSWTCH.2+0xd67> <== NOT EXECUTED
57f3e: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
57f44: 588f addql #4,%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
57f46: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
printf ("rtems-rfs: file-io: start: grow\n");
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
57f4a: 486e fffc pea %fp@(-4) <== NOT EXECUTED
57f4e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57f52: 4868 0032 pea %a0@(50) <== NOT EXECUTED
57f56: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
57f5a: 4eb9 0005 5d72 jsr 55d72 <rtems_rfs_block_map_grow> <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
57f60: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57f64: 4a80 tstl %d0 <== NOT EXECUTED
57f66: 6e00 00e8 bgtw 58050 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
return rc;
request_read = false;
57f6a: 4203 clrb %d3 <== NOT EXECUTED
57f6c: 6022 bras 57f90 <rtems_rfs_file_io_start+0x102> <== 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 &&
57f6e: 4a02 tstb %d2 <== NOT EXECUTED
57f70: 6618 bnes 57f8a <rtems_rfs_file_io_start+0xfc> <== NOT EXECUTED
57f72: 4aaa 0012 tstl %a2@(18) <== NOT EXECUTED
57f76: 6616 bnes 57f8e <rtems_rfs_file_io_start+0x100> <== NOT EXECUTED
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
57f78: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57f7c: 2068 0090 moveal %a0@(144),%a0 <== 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 &&
(rtems_rfs_file_block_offset (handle) ||
57f80: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
57f84: b1d3 cmpal %a3@,%a0 <== NOT EXECUTED
57f86: 63e2 blss 57f6a <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
57f88: 6004 bras 57f8e <rtems_rfs_file_io_start+0x100> <== 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 &&
57f8a: 1602 moveb %d2,%d3 <== NOT EXECUTED
57f8c: 6002 bras 57f90 <rtems_rfs_file_io_start+0x102> <== NOT EXECUTED
(rtems_rfs_file_block_offset (handle) ||
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
request_read = true;
57f8e: 7601 moveq #1,%d3 <== NOT EXECUTED
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
57f90: 42a7 clrl %sp@- <== NOT EXECUTED
57f92: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
57f96: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
57f9c: 508f addql #8,%sp <== NOT EXECUTED
57f9e: 4a00 tstb %d0 <== NOT EXECUTED
57fa0: 6728 beqs 57fca <rtems_rfs_file_io_start+0x13c> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
57fa2: 4a03 tstb %d3 <== NOT EXECUTED
57fa4: 6708 beqs 57fae <rtems_rfs_file_io_start+0x120> <== NOT EXECUTED
57fa6: 203c 0006 c63c movel #443964,%d0 <== NOT EXECUTED
57fac: 6006 bras 57fb4 <rtems_rfs_file_io_start+0x126> <== NOT EXECUTED
57fae: 203c 0006 ca77 movel #445047,%d0 <== NOT EXECUTED
57fb4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57fb6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
57fba: 4879 0006 dac7 pea 6dac7 <CSWTCH.2+0xd87> <== NOT EXECUTED
57fc0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
57fc6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
57fca: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED
57fd0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57fd2: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
57fd6: 486a 0004 pea %a2@(4) <== NOT EXECUTED
57fda: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57fde: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
57fe2: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
57fe8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57fec: 4a80 tstl %d0 <== NOT EXECUTED
57fee: 6e60 bgts 58050 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
return rc;
}
if (read
57ff0: 4a02 tstb %d2 <== NOT EXECUTED
57ff2: 6720 beqs 58014 <rtems_rfs_file_io_start+0x186> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
57ff4: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
57ff8: 2028 0040 movel %a0@(64),%d0 <== NOT EXECUTED
57ffc: 6606 bnes 58004 <rtems_rfs_file_io_start+0x176> <== NOT EXECUTED
57ffe: 4aa8 0038 tstl %a0@(56) <== NOT EXECUTED
58002: 670a beqs 5800e <rtems_rfs_file_io_start+0x180> <== NOT EXECUTED
58004: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED
58008: 5381 subql #1,%d1 <== NOT EXECUTED
5800a: b280 cmpl %d0,%d1 <== NOT EXECUTED
5800c: 6606 bnes 58014 <rtems_rfs_file_io_start+0x186> <== NOT EXECUTED
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
5800e: 2428 003c movel %a0@(60),%d2 <== NOT EXECUTED
58012: 660c bnes 58020 <rtems_rfs_file_io_start+0x192> <== NOT EXECUTED
size = rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
else
size = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
58014: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58018: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5801c: 2428 0008 movel %a0@(8),%d2 <== NOT EXECUTED
*available = size - rtems_rfs_file_block_offset (handle);
58020: 2002 movel %d2,%d0 <== NOT EXECUTED
58022: 90aa 0012 subl %a2@(18),%d0 <== NOT EXECUTED
58026: 2680 movel %d0,%a3@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58028: 42a7 clrl %sp@- <== NOT EXECUTED
5802a: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5802e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58034: 508f addql #8,%sp <== NOT EXECUTED
58036: 4a00 tstb %d0 <== NOT EXECUTED
58038: 6714 beqs 5804e <rtems_rfs_file_io_start+0x1c0> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
5803a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5803c: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
5803e: 4879 0006 dafd pea 6dafd <CSWTCH.2+0xdbd> <== NOT EXECUTED
58044: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5804a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*available, size);
return 0;
5804e: 4280 clrl %d0 <== NOT EXECUTED
}
58050: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED
58056: 4e5e unlk %fp <== NOT EXECUTED
00058628 <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)
{
58628: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
5862c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
58630: 42a7 clrl %sp@- <== NOT EXECUTED
58632: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
int
rtems_rfs_file_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
int oflag,
rtems_rfs_file_handle** file)
{
58636: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
5863a: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
5863e: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED
rtems_rfs_file_handle* handle;
rtems_rfs_file_shared* shared;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
58642: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58648: 508f addql #8,%sp <== NOT EXECUTED
5864a: 4a00 tstb %d0 <== NOT EXECUTED
5864c: 6710 beqs 5865e <rtems_rfs_file_open+0x36> <== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
5864e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58650: 4879 0006 dc0d pea 6dc0d <CSWTCH.2+0xecd> <== NOT EXECUTED
58656: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5865c: 508f addql #8,%sp <== NOT EXECUTED
*file = NULL;
5865e: 4295 clrl %a5@ <== NOT EXECUTED
/*
* 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));
58660: 4878 001e pea 1e <OPER2+0xa> <== NOT EXECUTED
58664: 283c 0004 6910 movel #289040,%d4 <== NOT EXECUTED
5866a: 2044 moveal %d4,%a0 <== NOT EXECUTED
5866c: 4e90 jsr %a0@ <== NOT EXECUTED
if (!handle)
5866e: 588f addql #4,%sp <== NOT EXECUTED
/*
* 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));
58670: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (!handle)
58672: 4a80 tstl %d0 <== NOT EXECUTED
58674: 6700 02b0 beqw 58926 <rtems_rfs_file_open+0x2fe> <== NOT EXECUTED
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
58678: 4878 001e pea 1e <OPER2+0xa> <== NOT EXECUTED
5867c: 243c 0005 c160 movel #377184,%d2 <== NOT EXECUTED
58682: 2042 moveal %d2,%a0 <== NOT EXECUTED
58684: 42a7 clrl %sp@- <== NOT EXECUTED
58686: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58688: 4e90 jsr %a0@ <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
5868a: 4200 clrb %d0 <== NOT EXECUTED
/*
* Scan the file system data list of open files for this ino. If found up
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
5868c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5868e: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
58692: 2f0c movel %a4,%sp@- <== NOT EXECUTED
handle->bnum = 0;
58694: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
58698: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
5869c: 4eb9 0005 85fc jsr 585fc <rtems_rfs_file_get_shared> <== NOT EXECUTED
if (shared)
586a2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
/*
* Scan the file system data list of open files for this ino. If found up
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
586a6: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (shared)
586a8: 4a80 tstl %d0 <== NOT EXECUTED
586aa: 6724 beqs 586d0 <rtems_rfs_file_open+0xa8> <== NOT EXECUTED
{
shared->references++;
586ac: 52ab 0008 addql #1,%a3@(8) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
586b0: 42a7 clrl %sp@- <== NOT EXECUTED
586b2: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
586b6: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
586bc: 508f addql #8,%sp <== NOT EXECUTED
586be: 4a00 tstb %d0 <== NOT EXECUTED
586c0: 6700 0256 beqw 58918 <rtems_rfs_file_open+0x2f0> <== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
586c4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
586c6: 4879 0006 dc2c pea 6dc2c <CSWTCH.2+0xeec> <== NOT EXECUTED
586cc: 6000 0242 braw 58910 <rtems_rfs_file_open+0x2e8> <== 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));
586d0: 4878 0094 pea 94 <DBL_MANT_DIG+0x5f> <== NOT EXECUTED
586d4: 2044 moveal %d4,%a0 <== NOT EXECUTED
586d6: 4e90 jsr %a0@ <== NOT EXECUTED
if (!shared)
586d8: 588f addql #4,%sp <== 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));
586da: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (!shared)
586dc: 4a80 tstl %d0 <== NOT EXECUTED
586de: 662a bnes 5870a <rtems_rfs_file_open+0xe2> <== 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);
586e0: 486a 0004 pea %a2@(4) <== NOT EXECUTED
586e4: 2f0c movel %a4,%sp@- <== NOT EXECUTED
586e6: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
586ec: 4200 clrb %d0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
586ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
586f0: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
586f4: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
586f8: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
586fc: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return ENOMEM;
58702: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
58706: 6000 021e braw 58926 <rtems_rfs_file_open+0x2fe> <== NOT EXECUTED
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
5870a: 4878 0094 pea 94 <DBL_MANT_DIG+0x5f> <== NOT EXECUTED
5870e: 2042 moveal %d2,%a0 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
58710: 280b movel %a3,%d4 <== NOT EXECUTED
58712: 0684 0000 000c addil #12,%d4 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
58718: 42a7 clrl %sp@- <== NOT EXECUTED
5871a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5871c: 4e90 jsr %a0@ <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
5871e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58722: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58724: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58726: 2f0c movel %a4,%sp@- <== NOT EXECUTED
58728: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
5872e: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
58732: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
58734: 6f5e bles 58794 <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
58736: 42a7 clrl %sp@- <== NOT EXECUTED
58738: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
5873c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58742: 508f addql #8,%sp <== NOT EXECUTED
58744: 4a00 tstb %d0 <== NOT EXECUTED
58746: 671c beqs 58764 <rtems_rfs_file_open+0x13c> <== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
58748: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5874a: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
58750: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58752: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58754: 4879 0006 dc52 pea 6dc52 <CSWTCH.2+0xf12> <== NOT EXECUTED
5875a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
58760: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
free (shared);
58764: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58766: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
5876c: 4e93 jsr %a3@ <== 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);
5876e: 486a 0004 pea %a2@(4) <== NOT EXECUTED
58772: 2f0c movel %a4,%sp@- <== NOT EXECUTED
58774: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5877a: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
5877c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5877e: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
58782: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
58786: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
5878a: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5878c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58790: 6000 0196 braw 58928 <rtems_rfs_file_open+0x300> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
58794: 486b 0032 pea %a3@(50) <== NOT EXECUTED
58798: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5879a: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5879c: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
587a2: 4fef 000c lea %sp@(12),%sp <== 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);
587a6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
587a8: 6f68 bles 58812 <rtems_rfs_file_open+0x1ea> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
587aa: 42a7 clrl %sp@- <== NOT EXECUTED
587ac: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
587b0: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
587b6: 508f addql #8,%sp <== NOT EXECUTED
587b8: 4a00 tstb %d0 <== NOT EXECUTED
587ba: 671c beqs 587d8 <rtems_rfs_file_open+0x1b0> <== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
587bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
587be: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
587c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
587c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
587c8: 4879 0006 dc83 pea 6dc83 <CSWTCH.2+0xf43> <== NOT EXECUTED
587ce: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
587d4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
587d8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
587da: 2f0c movel %a4,%sp@- <== NOT EXECUTED
587dc: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
587e2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
587e4: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
587ea: 4e93 jsr %a3@ <== 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);
587ec: 486a 0004 pea %a2@(4) <== NOT EXECUTED
587f0: 2f0c movel %a4,%sp@- <== NOT EXECUTED
587f2: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
587f8: 4201 clrb %d1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
587fa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
587fc: 1541 0004 moveb %d1,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
58800: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
58804: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
58808: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
5880a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5880e: 6000 0118 braw 58928 <rtems_rfs_file_open+0x300> <== NOT EXECUTED
}
shared->references = 1;
58812: 7001 moveq #1,%d0 <== 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);
58814: 7218 moveq #24,%d1 <== NOT EXECUTED
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
58816: 206b 0018 moveal %a3@(24),%a0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
5881a: 2740 0008 movel %d0,%a3@(8) <== NOT EXECUTED
5881e: 4280 clrl %d0 <== NOT EXECUTED
58820: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
58824: e3a8 lsll %d1,%d0 <== NOT EXECUTED
58826: 4281 clrl %d1 <== NOT EXECUTED
58828: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
5882c: 4841 swap %d1 <== NOT EXECUTED
5882e: 4241 clrw %d1 <== NOT EXECUTED
58830: 8081 orl %d1,%d0 <== NOT EXECUTED
58832: 4281 clrl %d1 <== NOT EXECUTED
58834: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
58838: 8081 orl %d1,%d0 <== NOT EXECUTED
5883a: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
5883e: e189 lsll #8,%d1 <== NOT EXECUTED
58840: 8081 orl %d1,%d0 <== 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);
58842: 4281 clrl %d1 <== 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);
58844: 2740 007c movel %d0,%a3@(124) <== 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);
58848: 4280 clrl %d0 <== NOT EXECUTED
5884a: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
5884e: 1228 000b moveb %a0@(11),%d1 <== NOT EXECUTED
58852: e188 lsll #8,%d0 <== NOT EXECUTED
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
58854: 8081 orl %d1,%d0 <== NOT EXECUTED
* @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);
58856: 7218 moveq #24,%d1 <== NOT EXECUTED
58858: 2740 0080 movel %d0,%a3@(128) <== NOT EXECUTED
5885c: 4280 clrl %d0 <== NOT EXECUTED
5885e: 1028 0010 moveb %a0@(16),%d0 <== NOT EXECUTED
58862: e3a8 lsll %d1,%d0 <== NOT EXECUTED
58864: 4281 clrl %d1 <== NOT EXECUTED
58866: 1228 0011 moveb %a0@(17),%d1 <== NOT EXECUTED
5886a: 4841 swap %d1 <== NOT EXECUTED
5886c: 4241 clrw %d1 <== NOT EXECUTED
5886e: 8081 orl %d1,%d0 <== NOT EXECUTED
58870: 4281 clrl %d1 <== NOT EXECUTED
58872: 1228 0013 moveb %a0@(19),%d1 <== NOT EXECUTED
58876: 8081 orl %d1,%d0 <== NOT EXECUTED
58878: 1228 0012 moveb %a0@(18),%d1 <== NOT EXECUTED
5887c: e189 lsll #8,%d1 <== NOT EXECUTED
5887e: 8081 orl %d1,%d0 <== NOT EXECUTED
* @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);
58880: 7218 moveq #24,%d1 <== NOT EXECUTED
* @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);
58882: 2740 0084 movel %d0,%a3@(132) <== NOT EXECUTED
* @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);
58886: 4280 clrl %d0 <== NOT EXECUTED
58888: 1028 0014 moveb %a0@(20),%d0 <== NOT EXECUTED
5888c: e3a8 lsll %d1,%d0 <== NOT EXECUTED
5888e: 4281 clrl %d1 <== NOT EXECUTED
58890: 1228 0015 moveb %a0@(21),%d1 <== NOT EXECUTED
58894: 4841 swap %d1 <== NOT EXECUTED
58896: 4241 clrw %d1 <== NOT EXECUTED
58898: 8081 orl %d1,%d0 <== NOT EXECUTED
5889a: 4281 clrl %d1 <== NOT EXECUTED
5889c: 1228 0017 moveb %a0@(23),%d1 <== NOT EXECUTED
588a0: 8081 orl %d1,%d0 <== NOT EXECUTED
588a2: 1228 0016 moveb %a0@(22),%d1 <== NOT EXECUTED
588a6: e189 lsll #8,%d1 <== NOT EXECUTED
588a8: 8081 orl %d1,%d0 <== NOT EXECUTED
* @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);
588aa: 7218 moveq #24,%d1 <== NOT EXECUTED
* @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);
588ac: 2740 0088 movel %d0,%a3@(136) <== NOT EXECUTED
* @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);
588b0: 4280 clrl %d0 <== NOT EXECUTED
588b2: 1028 0018 moveb %a0@(24),%d0 <== NOT EXECUTED
588b6: e3a8 lsll %d1,%d0 <== NOT EXECUTED
588b8: 4281 clrl %d1 <== NOT EXECUTED
588ba: 1228 0019 moveb %a0@(25),%d1 <== NOT EXECUTED
588be: 4841 swap %d1 <== NOT EXECUTED
588c0: 4241 clrw %d1 <== NOT EXECUTED
588c2: 8081 orl %d1,%d0 <== NOT EXECUTED
588c4: 4281 clrl %d1 <== NOT EXECUTED
588c6: 1228 001b moveb %a0@(27),%d1 <== NOT EXECUTED
588ca: 8081 orl %d1,%d0 <== NOT EXECUTED
588cc: 1228 001a moveb %a0@(26),%d1 <== NOT EXECUTED
588d0: e189 lsll #8,%d1 <== NOT EXECUTED
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
shared->fs = fs;
588d2: 274c 0090 movel %a4,%a3@(144) <== NOT EXECUTED
588d6: 8081 orl %d1,%d0 <== NOT EXECUTED
588d8: 2740 008c movel %d0,%a3@(140) <== 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 );
588dc: 2f0b movel %a3,%sp@- <== NOT EXECUTED
588de: 486c 0074 pea %a4@(116) <== NOT EXECUTED
588e2: 4eb9 0004 afb8 jsr 4afb8 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
588e8: 42a7 clrl %sp@- <== NOT EXECUTED
588ea: 2f04 movel %d4,%sp@- <== NOT EXECUTED
588ec: 2f0c movel %a4,%sp@- <== NOT EXECUTED
588ee: 4eb9 0004 eba2 jsr 4eba2 <rtems_rfs_inode_unload> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
588f4: 42a7 clrl %sp@- <== NOT EXECUTED
588f6: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
588fa: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58900: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
58904: 4a00 tstb %d0 <== NOT EXECUTED
58906: 6710 beqs 58918 <rtems_rfs_file_open+0x2f0> <== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
58908: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5890a: 4879 0006 dcb8 pea 6dcb8 <CSWTCH.2+0xf78> <== NOT EXECUTED
58910: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
58916: 508f addql #8,%sp <== NOT EXECUTED
}
handle->flags = oflag;
58918: 24ae 0010 movel %fp@(16),%a2@ <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
5891c: 4282 clrl %d2 <== 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;
handle->shared = shared;
5891e: 254b 001a movel %a3,%a2@(26) <== NOT EXECUTED
*file = handle;
58922: 2a8a movel %a2,%a5@ <== NOT EXECUTED
return 0;
58924: 6002 bras 58928 <rtems_rfs_file_open+0x300> <== NOT EXECUTED
* shared node data so we do not have to be concerned with reference
* counting.
*/
handle = malloc (sizeof (rtems_rfs_file_handle));
if (!handle)
return ENOMEM;
58926: 740c moveq #12,%d2 <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
58928: 2002 movel %d2,%d0 <== NOT EXECUTED
5892a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED
58930: 4e5e unlk %fp <== NOT EXECUTED
00058258 <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
58258: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
5825c: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58260: 42a7 clrl %sp@- <== NOT EXECUTED
58262: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
58266: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
5826a: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
5826e: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58272: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58278: 508f addql #8,%sp <== NOT EXECUTED
5827a: 4a00 tstb %d0 <== NOT EXECUTED
5827c: 6714 beqs 58292 <rtems_rfs_file_seek+0x3a> <== NOT EXECUTED
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
5827e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58280: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58282: 4879 0006 dbc8 pea 6dbc8 <CSWTCH.2+0xe88> <== NOT EXECUTED
58288: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5828e: 4fef 000c lea %sp@(12),%sp <== 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),
58292: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58296: 4868 007c pea %a0@(124) <== NOT EXECUTED
5829a: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5829e: 4eb9 0005 583e jsr 5583e <rtems_rfs_block_get_size> <== NOT EXECUTED
582a4: 508f addql #8,%sp <== NOT EXECUTED
582a6: 9283 subl %d3,%d1 <== NOT EXECUTED
582a8: 9182 subxl %d2,%d0 <== NOT EXECUTED
582aa: 6566 bcss 58312 <rtems_rfs_file_seek+0xba> <== NOT EXECUTED
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
582ac: 280a movel %a2,%d4 <== NOT EXECUTED
582ae: 0684 0000 000e addil #14,%d4 <== NOT EXECUTED
582b4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
582b6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
582b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
582ba: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
582be: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
582c2: 4eb9 0005 576c jsr 5576c <rtems_rfs_block_get_bpos> <== NOT EXECUTED
/*
* 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))
582c8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
582cc: 4aaa 000a tstl %a2@(10) <== NOT EXECUTED
582d0: 674e beqs 58320 <rtems_rfs_file_seek+0xc8> <== NOT EXECUTED
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
582d2: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
582d6: 486e fffc pea %fp@(-4) <== NOT EXECUTED
582da: 2f04 movel %d4,%sp@- <== NOT EXECUTED
582dc: 4868 0032 pea %a0@(50) <== NOT EXECUTED
582e0: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
582e4: 4eb9 0005 5bd6 jsr 55bd6 <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
582ea: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
582ee: 4a80 tstl %d0 <== NOT EXECUTED
582f0: 6e3a bgts 5832c <rtems_rfs_file_seek+0xd4> <== NOT EXECUTED
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
582f2: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
582f6: b0aa 0006 cmpl %a2@(6),%d0 <== NOT EXECUTED
582fa: 6724 beqs 58320 <rtems_rfs_file_seek+0xc8> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
582fc: 486a 0004 pea %a2@(4) <== NOT EXECUTED
58300: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58304: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58308: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
5830e: 508f addql #8,%sp <== NOT EXECUTED
58310: 600a bras 5831c <rtems_rfs_file_seek+0xc4> <== NOT EXECUTED
{
/*
* The seek is outside the current file so release any buffer. A write will
* extend the file.
*/
int rc = rtems_rfs_file_io_release (handle);
58312: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58314: 4eb9 0005 822e jsr 5822e <rtems_rfs_file_io_release> <== NOT EXECUTED
if (rc > 0)
5831a: 588f addql #4,%sp <== NOT EXECUTED
5831c: 4a80 tstl %d0 <== NOT EXECUTED
5831e: 6e0c bgts 5832c <rtems_rfs_file_seek+0xd4> <== NOT EXECUTED
return rc;
}
*new_pos = pos;
58320: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED
return 0;
58324: 4280 clrl %d0 <== NOT EXECUTED
int rc = rtems_rfs_file_io_release (handle);
if (rc > 0)
return rc;
}
*new_pos = pos;
58326: 2082 movel %d2,%a0@ <== NOT EXECUTED
58328: 2143 0004 movel %d3,%a0@(4) <== NOT EXECUTED
return 0;
}
5832c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED
58332: 4e5e unlk %fp <== NOT EXECUTED
00058336 <rtems_rfs_file_set_size>:
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
58336: 4e56 ffb0 linkw %fp,#-80 <== NOT EXECUTED
5833a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
5833e: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
58342: 246d 001a moveal %a5@(26),%a2 <== NOT EXECUTED
58346: 260a movel %a2,%d3 <== NOT EXECUTED
58348: 0683 0000 0032 addil #50,%d3 <== NOT EXECUTED
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5834e: 42a7 clrl %sp@- <== NOT EXECUTED
58350: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
58354: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
58358: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
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))
5835c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58362: 508f addql #8,%sp <== NOT EXECUTED
58364: 4a00 tstb %d0 <== NOT EXECUTED
58366: 6714 beqs 5837c <rtems_rfs_file_set_size+0x46> <== NOT EXECUTED
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
58368: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5836a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5836c: 4879 0006 dbe8 pea 6dbe8 <CSWTCH.2+0xea8> <== NOT EXECUTED
58372: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
58378: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
size = rtems_rfs_file_size (handle);
5837c: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58380: 4869 007c pea %a1@(124) <== NOT EXECUTED
58384: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58388: 4eb9 0005 583e jsr 5583e <rtems_rfs_block_get_size> <== NOT EXECUTED
/*
* 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)
5838e: 508f addql #8,%sp <== NOT EXECUTED
58390: 2c00 movel %d0,%d6 <== NOT EXECUTED
58392: 2e01 movel %d1,%d7 <== NOT EXECUTED
58394: 9e85 subl %d5,%d7 <== NOT EXECUTED
58396: 9d84 subxl %d4,%d6 <== NOT EXECUTED
58398: 6604 bnes 5839e <rtems_rfs_file_set_size+0x68> <== NOT EXECUTED
5839a: 6000 0254 braw 585f0 <rtems_rfs_file_set_size+0x2ba> <== NOT EXECUTED
5839e: 266d 001a moveal %a5@(26),%a3 <== NOT EXECUTED
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
583a2: 2e04 movel %d4,%d7 <== NOT EXECUTED
583a4: 8e85 orl %d5,%d7 <== NOT EXECUTED
583a6: 6618 bnes 583c0 <rtems_rfs_file_set_size+0x8a> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
583a8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
583aa: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
583ae: 4eb9 0005 62b8 jsr 562b8 <rtems_rfs_block_map_free_all> <== NOT EXECUTED
if (rc > 0)
583b4: 508f addql #8,%sp <== NOT EXECUTED
583b6: 4a80 tstl %d0 <== NOT EXECUTED
583b8: 6e00 0238 bgtw 585f2 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
583bc: 6000 020c braw 585ca <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
return rc;
}
else
{
if (size < new_size)
583c0: 2c00 movel %d0,%d6 <== NOT EXECUTED
583c2: 2e01 movel %d1,%d7 <== NOT EXECUTED
583c4: 9e85 subl %d5,%d7 <== NOT EXECUTED
583c6: 9d84 subxl %d4,%d6 <== NOT EXECUTED
583c8: 6400 0150 bccw 5851a <rtems_rfs_file_set_size+0x1e4> <== 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));
583cc: 226b 0090 moveal %a3@(144),%a1 <== NOT EXECUTED
* Have we reached the EOF ?
*/
if (rc != ENXIO)
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
583d0: 49f9 0005 5d72 lea 55d72 <rtems_rfs_block_map_grow>,%a4 <== NOT EXECUTED
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
583d6: 47ed 0004 lea %a5@(4),%a3 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
583da: 2c04 movel %d4,%d6 <== NOT EXECUTED
583dc: 2e05 movel %d5,%d7 <== 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);
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
583de: 2a0e movel %fp,%d5 <== NOT EXECUTED
583e0: 0685 ffff fff0 addil #-16,%d5 <== 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));
583e6: 2429 0008 movel %a1@(8),%d2 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
583ea: 9e81 subl %d1,%d7 <== NOT EXECUTED
583ec: 9d80 subxl %d0,%d6 <== NOT EXECUTED
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
583ee: 4204 clrb %d4 <== NOT EXECUTED
while (count)
583f0: 6000 011c braw 5850e <rtems_rfs_file_set_size+0x1d8> <== 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);
583f4: 202a 0038 movel %a2@(56),%d0 <== NOT EXECUTED
583f8: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
583fc: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED
58400: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED
58404: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
58408: 4a81 tstl %d1 <== NOT EXECUTED
5840a: 6706 beqs 58412 <rtems_rfs_file_set_size+0xdc> <== NOT EXECUTED
5840c: 5380 subql #1,%d0 <== NOT EXECUTED
5840e: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
58412: 2f05 movel %d5,%sp@- <== NOT EXECUTED
58414: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
58418: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5841a: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
5841e: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58422: 4eb9 0005 5bd6 jsr 55bd6 <rtems_rfs_block_map_find> <== NOT EXECUTED
map, &bpos, &block);
if (rc > 0)
58428: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5842c: 4a80 tstl %d0 <== NOT EXECUTED
5842e: 6e22 bgts 58452 <rtems_rfs_file_set_size+0x11c> <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
58430: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED
58434: 2202 movel %d2,%d1 <== NOT EXECUTED
58436: 9289 subl %a1,%d1 <== NOT EXECUTED
58438: 91c8 subal %a0,%a0 <== NOT EXECUTED
5843a: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
5843e: 2d48 ffe8 movel %a0,%fp@(-24) <== NOT EXECUTED
58442: 202e ffe8 movel %fp@(-24),%d0 <== NOT EXECUTED
58446: 222e ffec movel %fp@(-20),%d1 <== NOT EXECUTED
5844a: 9287 subl %d7,%d1 <== NOT EXECUTED
5844c: 9186 subxl %d6,%d0 <== NOT EXECUTED
5844e: 6228 bhis 58478 <rtems_rfs_file_set_size+0x142> <== NOT EXECUTED
58450: 6038 bras 5848a <rtems_rfs_file_set_size+0x154> <== NOT EXECUTED
if (rc > 0)
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
58452: 7206 moveq #6,%d1 <== NOT EXECUTED
58454: b280 cmpl %d0,%d1 <== NOT EXECUTED
58456: 6600 019a bnew 585f2 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
5845a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5845c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58460: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58462: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58466: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
5846a: 4e94 jsr %a4@ <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
5846c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58470: 4a80 tstl %d0 <== NOT EXECUTED
58472: 6fbc bles 58430 <rtems_rfs_file_set_size+0xfa> <== NOT EXECUTED
58474: 6000 017c braw 585f2 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
{
length = count + bpos.boff;
58478: 2409 movel %a1,%d2 <== NOT EXECUTED
5847a: d487 addl %d7,%d2 <== NOT EXECUTED
5847c: 7001 moveq #1,%d0 <== 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;
5847e: 2542 003c movel %d2,%a2@(60) <== NOT EXECUTED
map->dirty = true;
58482: 1540 0032 moveb %d0,%a2@(50) <== NOT EXECUTED
read_block = true;
58486: 7801 moveq #1,%d4 <== NOT EXECUTED
58488: 600a bras 58494 <rtems_rfs_file_set_size+0x15e> <== 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;
5848a: 42aa 003c clrl %a2@(60) <== NOT EXECUTED
map->dirty = true;
5848e: 7201 moveq #1,%d1 <== NOT EXECUTED
58490: 1541 0032 moveb %d1,%a2@(50) <== NOT EXECUTED
}
/*
* Only read the block if the length is not the block size.
*/
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
58494: 7001 moveq #1,%d0 <== NOT EXECUTED
58496: c084 andl %d4,%d0 <== NOT EXECUTED
58498: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5849a: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
5849e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
584a0: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
584a4: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
584a8: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
584ae: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
584b2: 4a80 tstl %d0 <== NOT EXECUTED
584b4: 6e00 013c bgtw 585f2 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
584b8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
584bc: 2202 movel %d2,%d1 <== NOT EXECUTED
584be: 9280 subl %d0,%d1 <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
584c0: 226d 000a moveal %a5@(10),%a1 <== NOT EXECUTED
memset (dst + bpos.boff, 0, length - bpos.boff);
584c4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
584c6: 42a7 clrl %sp@- <== NOT EXECUTED
584c8: d0a9 001a addl %a1@(26),%d0 <== NOT EXECUTED
584cc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
584ce: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
584d4: 7001 moveq #1,%d0 <== NOT EXECUTED
584d6: 1b40 0004 moveb %d0,%a5@(4) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
584da: 2f0b movel %a3,%sp@- <== NOT EXECUTED
584dc: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
584e0: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
584e4: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
584ea: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
584ee: 4a80 tstl %d0 <== NOT EXECUTED
584f0: 6e00 0100 bgtw 585f2 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
count -= length - bpos.boff;
584f4: 2002 movel %d2,%d0 <== NOT EXECUTED
584f6: 90ae fff8 subl %fp@(-8),%d0 <== NOT EXECUTED
584fa: 91c8 subal %a0,%a0 <== NOT EXECUTED
584fc: 2d40 ffe4 movel %d0,%fp@(-28) <== NOT EXECUTED
58500: 2d48 ffe0 movel %a0,%fp@(-32) <== NOT EXECUTED
58504: 202e ffe0 movel %fp@(-32),%d0 <== NOT EXECUTED
58508: 9eae ffe4 subl %fp@(-28),%d7 <== NOT EXECUTED
5850c: 9d80 subxl %d0,%d6 <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
5850e: 2206 movel %d6,%d1 <== NOT EXECUTED
58510: 8287 orl %d7,%d1 <== NOT EXECUTED
58512: 6600 fee0 bnew 583f4 <rtems_rfs_file_set_size+0xbe> <== NOT EXECUTED
58516: 6000 00b2 braw 585ca <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
5851a: 286b 0090 moveal %a3@(144),%a4 <== NOT EXECUTED
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
5851e: 91c8 subal %a0,%a0 <== NOT EXECUTED
58520: 242c 0008 movel %a4@(8),%d2 <== NOT EXECUTED
58524: 2d42 ffdc movel %d2,%fp@(-36) <== NOT EXECUTED
58528: 2f2e ffdc movel %fp@(-36),%sp@- <== NOT EXECUTED
5852c: 70ff moveq #-1,%d0 <== NOT EXECUTED
5852e: 72ff moveq #-1,%d1 <== NOT EXECUTED
58530: 2d48 ffd8 movel %a0,%fp@(-40) <== NOT EXECUTED
58534: 2f2e ffd8 movel %fp@(-40),%sp@- <== NOT EXECUTED
58538: d285 addl %d5,%d1 <== NOT EXECUTED
5853a: d184 addxl %d4,%d0 <== NOT EXECUTED
5853c: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5853e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58540: 4eb9 0006 8bf0 jsr 68bf0 <__udivdi3> <== NOT EXECUTED
58546: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
5854a: 2401 movel %d1,%d2 <== NOT EXECUTED
5854c: 4682 notl %d2 <== NOT EXECUTED
5854e: d4aa 0038 addl %a2@(56),%d2 <== 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));
58552: 2f2e ffdc movel %fp@(-36),%sp@- <== NOT EXECUTED
58556: 2f2e ffd8 movel %fp@(-40),%sp@- <== NOT EXECUTED
5855a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5855c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5855e: 4eb9 0006 8ff4 jsr 68ff4 <__umoddi3> <== NOT EXECUTED
58564: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58568: 2601 movel %d1,%d3 <== NOT EXECUTED
if (blocks)
5856a: 4a82 tstl %d2 <== NOT EXECUTED
5856c: 6616 bnes 58584 <rtems_rfs_file_set_size+0x24e> <== NOT EXECUTED
5856e: 202a 0038 movel %a2@(56),%d0 <== NOT EXECUTED
58572: 7201 moveq #1,%d1 <== 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;
58574: 2543 003c movel %d3,%a2@(60) <== NOT EXECUTED
map->dirty = true;
58578: 1541 0032 moveb %d1,%a2@(50) <== 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),
5857c: 222d 000e movel %a5@(14),%d1 <== NOT EXECUTED
58580: 661a bnes 5859c <rtems_rfs_file_set_size+0x266> <== NOT EXECUTED
58582: 601e bras 585a2 <rtems_rfs_file_set_size+0x26c> <== 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),
58584: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58586: 486b 0032 pea %a3@(50) <== NOT EXECUTED
5858a: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5858c: 4eb9 0005 6046 jsr 56046 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
58592: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
58596: 4a80 tstl %d0 <== NOT EXECUTED
58598: 6e58 bgts 585f2 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
5859a: 60d2 bras 5856e <rtems_rfs_file_set_size+0x238> <== 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),
5859c: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED
585a0: 6712 beqs 585b4 <rtems_rfs_file_set_size+0x27e> <== NOT EXECUTED
585a2: b081 cmpl %d1,%d0 <== NOT EXECUTED
585a4: 630e blss 585b4 <rtems_rfs_file_set_size+0x27e> <== NOT EXECUTED
585a6: 2240 moveal %d0,%a1 <== NOT EXECUTED
585a8: 5389 subql #1,%a1 <== NOT EXECUTED
585aa: b3c1 cmpal %d1,%a1 <== NOT EXECUTED
585ac: 661c bnes 585ca <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
585ae: b6ad 0012 cmpl %a5@(18),%d3 <== NOT EXECUTED
585b2: 6416 bccs 585ca <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
585b4: 2b40 000e movel %d0,%a5@(14) <== NOT EXECUTED
585b8: 2b43 0012 movel %d3,%a5@(18) <== NOT EXECUTED
585bc: 42ad 0016 clrl %a5@(22) <== NOT EXECUTED
585c0: 4a83 tstl %d3 <== NOT EXECUTED
585c2: 6706 beqs 585ca <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
585c4: 5380 subql #1,%d0 <== NOT EXECUTED
585c6: 2b40 000e movel %d0,%a5@(14) <== NOT EXECUTED
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
585ca: 266d 001a moveal %a5@(26),%a3 <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
585ce: 7002 moveq #2,%d0 <== NOT EXECUTED
585d0: c095 andl %a5@,%d0 <== NOT EXECUTED
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);
585d2: 276a 0038 007c movel %a2@(56),%a3@(124) <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
585d8: 276a 003c 0080 movel %a2@(60),%a3@(128) <== NOT EXECUTED
if (rtems_rfs_file_update_mtime (handle))
585de: 4a80 tstl %d0 <== NOT EXECUTED
585e0: 660e bnes 585f0 <rtems_rfs_file_set_size+0x2ba> <== NOT EXECUTED
handle->shared->mtime = time (NULL);
585e2: 42a7 clrl %sp@- <== NOT EXECUTED
585e4: 4eb9 0005 fc1c jsr 5fc1c <time> <== NOT EXECUTED
585ea: 588f addql #4,%sp <== NOT EXECUTED
585ec: 2740 0088 movel %d0,%a3@(136) <== NOT EXECUTED
}
return 0;
585f0: 4280 clrl %d0 <== NOT EXECUTED
}
585f2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED
585f8: 4e5e unlk %fp <== NOT EXECUTED
0004d942 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
4d942: 4e56 fefc linkw %fp,#-260
4d946: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4d94a: 246e 000c moveal %fp@(12),%a2
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
4d94e: 4a2a 0015 tstb %a2@(21)
4d952: 6712 beqs 4d966 <rtems_rfs_format+0x24> <== ALWAYS TAKEN
printf ("rtems-rfs: format: %s\n", name);
4d954: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4d958: 4879 0006 bc09 pea 6bc09 <_CPU_m68k_BFFFO_table+0x100> <== NOT EXECUTED
4d95e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4d964: 508f addql #8,%sp <== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
4d966: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f>
4d96a: 240e movel %fp,%d2
4d96c: 0682 ffff ff7c addil #-132,%d2
4d972: 42a7 clrl %sp@-
4d974: 2f02 movel %d2,%sp@-
4d976: 4eb9 0005 c160 jsr 5c160 <memset>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d97c: 41ee ffc4 lea %fp@(-60),%a0
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;
4d980: 7005 moveq #5,%d0
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
4d982: 7202 moveq #2,%d1
4d984: 2d48 ffc0 movel %a0,%fp@(-64)
head->previous = NULL;
tail->previous = head;
4d988: 41ee ffc0 lea %fp@(-64),%a0
4d98c: 2d48 ffc8 movel %a0,%fp@(-56)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d990: 41ee ffd4 lea %fp@(-44),%a0
4d994: 2d48 ffd0 movel %a0,%fp@(-48)
head->previous = NULL;
tail->previous = head;
4d998: 41ee ffd0 lea %fp@(-48),%a0
4d99c: 2d48 ffd8 movel %a0,%fp@(-40)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d9a0: 41ee ffe4 lea %fp@(-28),%a0
4d9a4: 2d48 ffe0 movel %a0,%fp@(-32)
head->previous = NULL;
tail->previous = head;
4d9a8: 41ee ffe0 lea %fp@(-32),%a0
4d9ac: 2d48 ffe8 movel %a0,%fp@(-24)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4d9b0: 41ee fff4 lea %fp@(-12),%a0
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4d9b4: 2f02 movel %d2,%sp@-
4d9b6: 2f2e 0008 movel %fp@(8),%sp@-
4d9ba: 2d48 fff0 movel %a0,%fp@(-16)
head->previous = NULL;
tail->previous = head;
4d9be: 41ee fff0 lea %fp@(-16),%a0
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;
4d9c2: 2d40 ffbc movel %d0,%fp@(-68)
4d9c6: 2d48 fff8 movel %a0,%fp@(-8)
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
4d9ca: 2d41 ff7c movel %d1,%fp@(-132)
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4d9ce: 4eb9 0005 67c6 jsr 567c6 <rtems_rfs_buffer_open>
if (rc > 0)
4d9d4: 4fef 0014 lea %sp@(20),%sp
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4d9d8: 2600 movel %d0,%d3
if (rc > 0)
4d9da: 6f16 bles 4d9f2 <rtems_rfs_format+0xb0> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
4d9dc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4d9de: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4d9e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4d9e6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4d9e8: 4879 0006 bc20 pea 6bc20 <_CPU_m68k_BFFFO_table+0x117> <== NOT EXECUTED
4d9ee: 6000 0a22 braw 4e412 <rtems_rfs_format+0xad0> <== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
4d9f2: 206e ff8c moveal %fp@(-116),%a0
4d9f6: 4aa8 0020 tstl %a0@(32)
4d9fa: 660c bnes 4da08 <rtems_rfs_format+0xc6> <== ALWAYS TAKEN
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
4d9fc: 42a7 clrl %sp@- <== NOT EXECUTED
4d9fe: 4879 0006 bc4f pea 6bc4f <_CPU_m68k_BFFFO_table+0x146> <== NOT EXECUTED
4da04: 6000 04ce braw 4ded4 <rtems_rfs_format+0x592> <== NOT EXECUTED
static bool
rtems_rfs_check_config (rtems_rfs_file_system* fs,
const rtems_rfs_format_config* config)
{
fs->block_size = config->block_size;
4da08: 2012 movel %a2@,%d0
4da0a: 2d40 ff84 movel %d0,%fp@(-124)
if (!fs->block_size)
4da0e: 666c bnes 4da7c <rtems_rfs_format+0x13a>
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
4da10: 2f02 movel %d2,%sp@-
if (total_size >= GIGS (1))
4da12: 4282 clrl %d2
4da14: 263c 000f ffff movel #1048575,%d3
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);
4da1a: 4eb9 0005 898e jsr 5898e <rtems_rfs_fs_media_size>
if (total_size >= GIGS (1))
4da20: 588f addql #4,%sp
4da22: 9681 subl %d1,%d3
4da24: 9580 subxl %d0,%d2
4da26: 6430 bccs 4da58 <rtems_rfs_format+0x116> <== ALWAYS TAKEN
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
4da28: 780c moveq #12,%d4 <== NOT EXECUTED
4da2a: 7a14 moveq #20,%d5 <== NOT EXECUTED
4da2c: 4283 clrl %d3 <== NOT EXECUTED
4da2e: 0681 0010 0000 addil #1048576,%d1 <== NOT EXECUTED
4da34: d183 addxl %d3,%d0 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
4da36: 7601 moveq #1,%d3 <== 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);
4da38: 2400 movel %d0,%d2 <== NOT EXECUTED
4da3a: 2001 movel %d1,%d0 <== NOT EXECUTED
4da3c: eaa8 lsrl %d5,%d0 <== NOT EXECUTED
4da3e: e9aa lsll %d4,%d2 <== NOT EXECUTED
4da40: 8480 orl %d0,%d2 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
4da42: 701f moveq #31,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4da44: 2203 movel %d3,%d1 <== NOT EXECUTED
4da46: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4da48: c282 andl %d2,%d1 <== NOT EXECUTED
4da4a: 6604 bnes 4da50 <rtems_rfs_format+0x10e> <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
4da4c: 5380 subql #1,%d0 <== NOT EXECUTED
4da4e: 66f4 bnes 4da44 <rtems_rfs_format+0x102> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
4da50: 7201 moveq #1,%d1 <== NOT EXECUTED
4da52: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4da54: 2d41 ff84 movel %d1,%fp@(-124) <== NOT EXECUTED
}
if (fs->block_size < 512)
4da58: 307c 01ff moveaw #511,%a0
4da5c: b1ee ff84 cmpal %fp@(-124),%a0
4da60: 650a bcss 4da6c <rtems_rfs_format+0x12a> <== NEVER TAKEN
fs->block_size = 512;
4da62: 203c 0000 0200 movel #512,%d0
4da68: 2d40 ff84 movel %d0,%fp@(-124)
if (fs->block_size > (4 * 1024))
4da6c: 223c 0000 1000 movel #4096,%d1
4da72: b2ae ff84 cmpl %fp@(-124),%d1
4da76: 6404 bccs 4da7c <rtems_rfs_format+0x13a> <== ALWAYS TAKEN
fs->block_size = (4 * 1024);
4da78: 2d41 ff84 movel %d1,%fp@(-124) <== NOT EXECUTED
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
4da7c: 206e ff8c moveal %fp@(-116),%a0
4da80: 202e ff84 movel %fp@(-124),%d0
4da84: 2600 movel %d0,%d3
4da86: 2228 0020 movel %a0@(32),%d1
4da8a: 4c41 3002 remul %d1,%d2,%d3
4da8e: 4a82 tstl %d2
4da90: 6718 beqs 4daaa <rtems_rfs_format+0x168> <== ALWAYS TAKEN
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
4da92: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4da94: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4da96: 4879 0006 bc77 pea 6bc77 <_CPU_m68k_BFFFO_table+0x16e> <== NOT EXECUTED
4da9c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4daa2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4daa6: 6000 097a braw 4e422 <rtems_rfs_format+0xae0> <== NOT EXECUTED
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
4daaa: 222a 0004 movel %a2@(4),%d1
4daae: e788 lsll #3,%d0
if (!fs->group_blocks)
4dab0: 4a81 tstl %d1
4dab2: 6706 beqs 4daba <rtems_rfs_format+0x178> <== ALWAYS TAKEN
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
4dab4: 2d41 ffa4 movel %d1,%fp@(-92) <== NOT EXECUTED
4dab8: 6004 bras 4dabe <rtems_rfs_format+0x17c> <== NOT EXECUTED
{
/*
* The number of blocks per group is defined by the number of bits in a
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
4daba: 2d40 ffa4 movel %d0,%fp@(-92)
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
4dabe: b0ae ffa4 cmpl %fp@(-92),%d0
4dac2: 640a bccs 4dace <rtems_rfs_format+0x18c> <== ALWAYS TAKEN
{
printf ("group block count is higher than bits in block\n");
4dac4: 4879 0006 bcb5 pea 6bcb5 <_CPU_m68k_BFFFO_table+0x1ac> <== NOT EXECUTED
4daca: 6000 03d0 braw 4de9c <rtems_rfs_format+0x55a> <== NOT EXECUTED
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4dace: 486e ff7c pea %fp@(-132)
4dad2: 4eb9 0005 898e jsr 5898e <rtems_rfs_fs_media_size>
4dad8: 242e ff84 movel %fp@(-124),%d2
* 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));
4dadc: 2602 movel %d2,%d3
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4dade: 2f02 movel %d2,%sp@-
* 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));
4dae0: e78b lsll #3,%d3
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4dae2: 42a7 clrl %sp@-
4dae4: 2f01 movel %d1,%sp@-
4dae6: 2f00 movel %d0,%sp@-
4dae8: 4eb9 0006 8bf0 jsr 68bf0 <__udivdi3>
4daee: 4fef 0010 lea %sp@(16),%sp
4daf2: 2801 movel %d1,%d4
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
4daf4: 2f03 movel %d3,%sp@-
{
printf ("group block count is higher than bits in block\n");
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4daf6: 2d41 ff80 movel %d1,%fp@(-128)
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
4dafa: 2f01 movel %d1,%sp@-
4dafc: 4eb9 0004 d91e jsr 4d91e <rtems_rfs_rup_quotient>
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
4db02: 222a 0008 movel %a2@(8),%d1
if (!fs->group_inodes)
4db06: 4fef 000c lea %sp@(12),%sp
/*
* The bits per block sets the upper limit for the number of blocks in a
* group. The disk will be divided into groups which are the number of bits
* per block.
*/
fs->group_count = rtems_rfs_rup_quotient (rtems_rfs_fs_blocks (fs),
4db0a: 2d40 ffa0 movel %d0,%fp@(-96)
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
4db0e: 2d41 ffa8 movel %d1,%fp@(-88)
if (!fs->group_inodes)
4db12: 6634 bnes 4db48 <rtems_rfs_format+0x206> <== NEVER TAKEN
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
/*
* The number of inodes per group is set as a percentage.
*/
if (config->inode_overhead)
4db14: 2a2a 000c movel %a2@(12),%d5
4db18: 6604 bnes 4db1e <rtems_rfs_format+0x1dc> <== NEVER TAKEN
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
if (!fs->group_inodes)
{
int inode_overhead = RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE;
4db1a: 1a3c 0001 moveb #1,%d5
static int
rtems_rfs_inodes_from_percent (rtems_rfs_file_system* fs,
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
4db1e: 2204 movel %d4,%d1
4db20: 5381 subql #1,%d1
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
4db22: 4c05 1800 mulsl %d5,%d1
4db26: 7864 moveq #100,%d4
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
4db28: 7a38 moveq #56,%d5
int percentage)
{
int blocks;
blocks = ((rtems_rfs_fs_blocks (fs) -
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
4db2a: 2f00 movel %d0,%sp@-
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;
4db2c: 4c44 1001 remul %d4,%d1,%d1
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
4db30: 2f01 movel %d1,%sp@-
4db32: 4eb9 0004 d91e jsr 4d91e <rtems_rfs_rup_quotient>
4db38: 508f addql #8,%sp
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
4db3a: 2202 movel %d2,%d1
4db3c: 4c45 1001 remul %d5,%d1,%d1
4db40: 4c01 0800 mulsl %d1,%d0
4db44: 2d40 ffa8 movel %d0,%fp@(-88)
}
/*
* 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;
4db48: 7238 moveq #56,%d1
4db4a: 4c41 2002 remul %d1,%d2,%d2
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
4db4e: 2f02 movel %d2,%sp@-
4db50: 2f2e ffa8 movel %fp@(-88),%sp@-
}
/*
* 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;
4db54: 2d42 ffac movel %d2,%fp@(-84)
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
4db58: 4eb9 0004 d91e jsr 4d91e <rtems_rfs_rup_quotient>
4db5e: 508f addql #8,%sp
fs->inodes_per_block) * fs->inodes_per_block;
4db60: 4c02 0800 mulsl %d2,%d0
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
4db64: b680 cmpl %d0,%d3
4db66: 6506 bcss 4db6e <rtems_rfs_format+0x22c> <== NEVER TAKEN
/*
* Round up to fill a block because the minimum allocation unit is a block.
*/
fs->inodes_per_block = rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE;
fs->group_inodes =
4db68: 2d40 ffa8 movel %d0,%fp@(-88)
4db6c: 6004 bras 4db72 <rtems_rfs_format+0x230>
rtems_rfs_rup_quotient (fs->group_inodes,
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
4db6e: 2d43 ffa8 movel %d3,%fp@(-88) <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
4db72: 202a 0010 movel %a2@(16),%d0
if (!fs->max_name_length)
4db76: 6600 08ae bnew 4e426 <rtems_rfs_format+0xae4>
{
fs->max_name_length = 512;
4db7a: 243c 0000 0200 movel #512,%d2
4db80: 2d42 ff98 movel %d2,%fp@(-104)
4db84: 6000 08a4 braw 4e42a <rtems_rfs_format+0xae8>
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
4db88: 240e movel %fp,%d2 <== NOT EXECUTED
4db8a: 0682 ffff ff7c addil #-132,%d2 <== NOT EXECUTED
4db90: 47f9 0005 c2b0 lea 5c2b0 <printf>,%a3 <== NOT EXECUTED
4db96: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4db98: 4eb9 0005 898e jsr 5898e <rtems_rfs_fs_media_size> <== NOT EXECUTED
4db9e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dba0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dba2: 4879 0006 bce4 pea 6bce4 <_CPU_m68k_BFFFO_table+0x1db> <== NOT EXECUTED
4dba8: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
rtems_rfs_fs_media_blocks (&fs));
4dbaa: 206e ff8c moveal %fp@(-116),%a0 <== 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",
4dbae: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED
4dbb2: 4879 0006 bd0a pea 6bd0a <_CPU_m68k_BFFFO_table+0x201> <== NOT EXECUTED
4dbb8: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
rtems_rfs_fs_media_block_size (&fs));
4dbba: 206e ff8c moveal %fp@(-116),%a0 <== 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",
4dbbe: 2f28 0020 movel %a0@(32),%sp@- <== NOT EXECUTED
4dbc2: 4879 0006 bd31 pea 6bd31 <_CPU_m68k_BFFFO_table+0x228> <== NOT EXECUTED
4dbc8: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
4dbca: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4dbce: 2e82 movel %d2,%sp@ <== NOT EXECUTED
4dbd0: 4eb9 0005 895e jsr 5895e <rtems_rfs_fs_size> <== NOT EXECUTED
4dbd6: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dbd8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dbda: 4879 0006 bd5c pea 6bd5c <_CPU_m68k_BFFFO_table+0x253> <== NOT EXECUTED
4dbe0: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
4dbe2: 2f2e ff80 movel %fp@(-128),%sp@- <== NOT EXECUTED
4dbe6: 4879 0006 bd7c pea 6bd7c <_CPU_m68k_BFFFO_table+0x273> <== NOT EXECUTED
4dbec: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
4dbee: 2f2e ff84 movel %fp@(-124),%sp@- <== NOT EXECUTED
4dbf2: 4879 0006 bd9d pea 6bd9d <_CPU_m68k_BFFFO_table+0x294> <== NOT EXECUTED
4dbf8: 4e93 jsr %a3@ <== 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));
4dbfa: 202e ff84 movel %fp@(-124),%d0 <== 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",
4dbfe: 4fef 0020 lea %sp@(32),%sp <== 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));
4dc02: e788 lsll #3,%d0 <== 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",
4dc04: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dc06: 4879 0006 bdc2 pea 6bdc2 <_CPU_m68k_BFFFO_table+0x2b9> <== NOT EXECUTED
4dc0c: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
4dc0e: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED
4dc12: 4879 0006 bdea pea 6bdea <_CPU_m68k_BFFFO_table+0x2e1> <== NOT EXECUTED
4dc18: 4e93 jsr %a3@ <== 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,
4dc1a: 242e ffa8 movel %fp@(-88),%d2 <== NOT EXECUTED
4dc1e: 2002 movel %d2,%d0 <== NOT EXECUTED
4dc20: 2202 movel %d2,%d1 <== NOT EXECUTED
4dc22: 262e ff84 movel %fp@(-124),%d3 <== NOT EXECUTED
4dc26: e788 lsll #3,%d0 <== NOT EXECUTED
4dc28: ed89 lsll #6,%d1 <== NOT EXECUTED
4dc2a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4dc2c: 9280 subl %d0,%d1 <== NOT EXECUTED
4dc2e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dc30: 4eb9 0004 d91e jsr 4d91e <rtems_rfs_rup_quotient> <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
bits_per_block = rtems_rfs_bits_per_block (fs);
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
4dc36: 206e ff80 moveal %fp@(-128),%a0 <== 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));
4dc3a: 2203 movel %d3,%d1 <== 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))
4dc3c: 5388 subql #1,%a0 <== NOT EXECUTED
4dc3e: 4fef 0018 lea %sp@(24),%sp <== 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));
4dc42: e789 lsll #3,%d1 <== 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))
4dc44: b1c1 cmpal %d1,%a0 <== NOT EXECUTED
4dc46: 6402 bccs 4dc4a <rtems_rfs_format+0x308> <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
4dc48: 2208 movel %a0,%d1 <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
4dc4a: 263c 0000 03e8 movel #1000,%d3 <== NOT EXECUTED
4dc50: 5280 addql #1,%d0 <== NOT EXECUTED
4dc52: 4c03 0800 mulsl %d3,%d0 <== 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",
4dc56: 780a moveq #10,%d4 <== NOT EXECUTED
4dc58: 47f9 0005 c2b0 lea 5c2b0 <printf>,%a3 <== NOT EXECUTED
/*
* There could be more bits than blocks, eg 512K disk with 512 blocks.
*/
if (bits_per_block > (rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE))
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
return ((blocks + 1) * 100 * 10) / bits_per_block;
4dc5e: 4c41 0800 remsl %d1,%d0,%d0 <== 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",
4dc62: 2a2e ffa0 movel %fp@(-96),%d5 <== NOT EXECUTED
4dc66: 4c02 5800 mulsl %d2,%d5 <== NOT EXECUTED
4dc6a: 4c44 0801 remsl %d4,%d1,%d0 <== NOT EXECUTED
4dc6e: 4c44 0800 remsl %d4,%d0,%d0 <== NOT EXECUTED
4dc72: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dc74: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dc76: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4dc78: 4879 0006 be0f pea 6be0f <_CPU_m68k_BFFFO_table+0x306> <== NOT EXECUTED
4dc7e: 4e93 jsr %a3@ <== 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);
4dc80: 2f2e ffa0 movel %fp@(-96),%sp@- <== NOT EXECUTED
4dc84: 4879 0006 be3a pea 6be3a <_CPU_m68k_BFFFO_table+0x331> <== NOT EXECUTED
4dc8a: 4e93 jsr %a3@ <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
4dc8c: 2f2e ffa4 movel %fp@(-92),%sp@- <== NOT EXECUTED
4dc90: 4879 0006 be5a pea 6be5a <_CPU_m68k_BFFFO_table+0x351> <== NOT EXECUTED
4dc96: 4e93 jsr %a3@ <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
4dc98: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4dc9c: 2eae ffa8 movel %fp@(-88),%sp@ <== NOT EXECUTED
4dca0: 4879 0006 be81 pea 6be81 <_CPU_m68k_BFFFO_table+0x378> <== NOT EXECUTED
4dca6: 4e93 jsr %a3@ <== NOT EXECUTED
4dca8: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
4dcaa: 2f2e ff84 movel %fp@(-124),%sp@-
4dcae: 2a0e movel %fp,%d5
4dcb0: 0685 ffff ff7c addil #-132,%d5
4dcb6: 2f05 movel %d5,%sp@-
4dcb8: 4eb9 0005 6a34 jsr 56a34 <rtems_rfs_buffer_setblksize>
if (rc > 0)
4dcbe: 508f addql #8,%sp
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));
4dcc0: 2400 movel %d0,%d2
if (rc > 0)
4dcc2: 6f16 bles 4dcda <rtems_rfs_format+0x398> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
4dcc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dcc6: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4dccc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dcce: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dcd0: 4879 0006 bea8 pea 6bea8 <_CPU_m68k_BFFFO_table+0x39f> <== NOT EXECUTED
4dcd6: 6000 073a braw 4e412 <rtems_rfs_format+0xad0> <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_request (fs, &handle, 0, false);
4dcda: 42a7 clrl %sp@-
4dcdc: 280e movel %fp,%d4
4dcde: 0684 ffff ff34 addil #-204,%d4
4dce4: 42a7 clrl %sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4dce6: 4200 clrb %d0
4dce8: 2f04 movel %d4,%sp@-
4dcea: 1d40 ff34 moveb %d0,%fp@(-204)
4dcee: 2f05 movel %d5,%sp@-
handle->bnum = 0;
4dcf0: 42ae ff36 clrl %fp@(-202)
handle->buffer = NULL;
4dcf4: 42ae ff3a clrl %fp@(-198)
4dcf8: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request>
if (rc > 0)
4dcfe: 4fef 0010 lea %sp@(16),%sp
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);
4dd02: 2400 movel %d0,%d2
if (rc > 0)
4dd04: 6f1e bles 4dd24 <rtems_rfs_format+0x3e2> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4dd06: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4dd08: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4dd0a: 4eba fbe8 jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
4dd0e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dd10: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4dd16: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dd18: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dd1a: 4879 0006 bede pea 6bede <_CPU_m68k_BFFFO_table+0x3d5> <== NOT EXECUTED
4dd20: 6000 013e braw 4de60 <rtems_rfs_format+0x51e> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
4dd24: 206e ff3a moveal %fp@(-198),%a0
4dd28: 2668 001a moveal %a0@(26),%a3
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
4dd2c: 2f2e ff84 movel %fp@(-124),%sp@-
4dd30: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
4dd34: 7420 moveq #32,%d2
sb = rtems_rfs_buffer_data (&handle);
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
4dd36: 2f0b movel %a3,%sp@-
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
4dd38: 7601 moveq #1,%d3
sb = rtems_rfs_buffer_data (&handle);
#define write_sb(_o, _d) rtems_rfs_write_u32(sb + (_o), _d)
memset (sb, 0xff, rtems_rfs_fs_block_size (fs));
4dd3a: 4eb9 0005 c160 jsr 5c160 <memset>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
4dd40: 4200 clrb %d0
#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);
4dd42: 7209 moveq #9,%d1
4dd44: 1742 0002 moveb %d2,%a3@(2)
4dd48: 1743 0003 moveb %d3,%a3@(3)
4dd4c: 1741 0001 moveb %d1,%a3@(1)
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
4dd50: 7418 moveq #24,%d2
#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);
4dd52: 16bc 0028 moveb #40,%a3@
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
4dd56: 1740 0004 moveb %d0,%a3@(4)
4dd5a: 1740 0005 moveb %d0,%a3@(5)
4dd5e: 1740 0006 moveb %d0,%a3@(6)
4dd62: 1740 0007 moveb %d0,%a3@(7)
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);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
4dd66: 4203 clrb %d3
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));
4dd68: 202e ff80 movel %fp@(-128),%d0
4dd6c: 2200 movel %d0,%d1
4dd6e: e4a9 lsrl %d2,%d1
4dd70: 1741 000c moveb %d1,%a3@(12)
4dd74: 2200 movel %d0,%d1
4dd76: 4241 clrw %d1
4dd78: 4841 swap %d1
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4dd7a: 176e ff84 0008 moveb %fp@(-124),%a3@(8)
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));
4dd80: 1740 000f moveb %d0,%a3@(15)
4dd84: 1741 000d moveb %d1,%a3@(13)
4dd88: 2200 movel %d0,%d1
4dd8a: e089 lsrl #8,%d1
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4dd8c: 176e ff85 0009 moveb %fp@(-123),%a3@(9)
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));
4dd92: 1741 000e moveb %d1,%a3@(14)
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);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
4dd96: 7038 moveq #56,%d0
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));
4dd98: 176e ff86 000a moveb %fp@(-122),%a3@(10)
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);
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
rtems_rfs_buffer_mark_dirty (&handle);
4dd9e: 7201 moveq #1,%d1
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));
4dda0: 176e ff87 000b moveb %fp@(-121),%a3@(11)
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
4dda6: 176e ff94 0010 moveb %fp@(-108),%a3@(16)
4ddac: 176e ff95 0011 moveb %fp@(-107),%a3@(17)
4ddb2: 176e ff96 0012 moveb %fp@(-106),%a3@(18)
4ddb8: 176e ff97 0013 moveb %fp@(-105),%a3@(19)
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
4ddbe: 176e ff98 0014 moveb %fp@(-104),%a3@(20)
4ddc4: 176e ff99 0015 moveb %fp@(-103),%a3@(21)
4ddca: 176e ff9a 0016 moveb %fp@(-102),%a3@(22)
4ddd0: 176e ff9b 0017 moveb %fp@(-101),%a3@(23)
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
4ddd6: 176e ffa0 0018 moveb %fp@(-96),%a3@(24)
4dddc: 176e ffa1 0019 moveb %fp@(-95),%a3@(25)
4dde2: 176e ffa2 001a moveb %fp@(-94),%a3@(26)
4dde8: 176e ffa3 001b moveb %fp@(-93),%a3@(27)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
4ddee: 176e ffa4 001c moveb %fp@(-92),%a3@(28)
4ddf4: 176e ffa5 001d moveb %fp@(-91),%a3@(29)
4ddfa: 176e ffa6 001e moveb %fp@(-90),%a3@(30)
4de00: 176e ffa7 001f moveb %fp@(-89),%a3@(31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
4de06: 176e ffa8 0020 moveb %fp@(-88),%a3@(32)
4de0c: 176e ffa9 0021 moveb %fp@(-87),%a3@(33)
4de12: 176e ffaa 0022 moveb %fp@(-86),%a3@(34)
4de18: 176e ffab 0023 moveb %fp@(-85),%a3@(35)
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
4de1e: 1740 0027 moveb %d0,%a3@(39)
4de22: 1743 0024 moveb %d3,%a3@(36)
4de26: 1743 0025 moveb %d3,%a3@(37)
4de2a: 1743 0026 moveb %d3,%a3@(38)
rtems_rfs_buffer_mark_dirty (&handle);
4de2e: 1d41 ff34 moveb %d1,%fp@(-204)
rc = rtems_rfs_buffer_handle_release (fs, &handle);
4de32: 2f04 movel %d4,%sp@-
4de34: 2f05 movel %d5,%sp@-
4de36: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release>
if (rc > 0)
4de3c: 4fef 0014 lea %sp@(20),%sp
4de40: 41fa fab2 lea %pc@(4d8f4 <rtems_rfs_buffer_handle_close>),%a0
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);
4de44: 2400 movel %d0,%d2
if (rc > 0)
4de46: 6f24 bles 4de6c <rtems_rfs_format+0x52a> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4de48: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4de4a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4de4c: 4e90 jsr %a0@ <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
4de4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4de50: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4de56: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4de58: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4de5a: 4879 0006 bf13 pea 6bf13 <_CPU_m68k_BFFFO_table+0x40a> <== NOT EXECUTED
4de60: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4de66: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4de6a: 602a bras 4de96 <rtems_rfs_format+0x554> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4de6c: 2f04 movel %d4,%sp@-
4de6e: 2f05 movel %d5,%sp@-
4de70: 4e90 jsr %a0@
if (rc > 0)
4de72: 508f addql #8,%sp
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4de74: 2400 movel %d0,%d2
if (rc > 0)
4de76: 6f00 033c blew 4e1b4 <rtems_rfs_format+0x872>
{
printf ("rtems-rfs: write-superblock: buffer handle close failed: %d: %s\n",
4de7a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4de7c: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4de82: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4de84: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4de86: 4879 0006 bf4f pea 6bf4f <_CPU_m68k_BFFFO_table+0x446> <== NOT EXECUTED
4de8c: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4de92: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
4de96: 4879 0006 bf90 pea 6bf90 <_CPU_m68k_BFFFO_table+0x487> <== NOT EXECUTED
4de9c: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
4dea2: 588f addql #4,%sp <== NOT EXECUTED
4dea4: 6000 057c braw 4e422 <rtems_rfs_format+0xae0> <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
4dea8: 2c2e ffa4 movel %fp@(-92),%d6
4deac: 2002 movel %d2,%d0
4deae: 4c06 0800 mulsl %d6,%d0
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
4deb2: 122a 0014 moveb %a2@(20),%d1
4deb6: 1e2a 0015 moveb %a2@(21),%d7
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
4deba: 2840 moveal %d0,%a4
4debc: 47ec 0001 lea %a4@(1),%a3
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
4dec0: 1d41 ff28 moveb %d1,%fp@(-216)
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
4dec4: 202e ff80 movel %fp@(-128),%d0
4dec8: b08b cmpl %a3,%d0
4deca: 6414 bccs 4dee0 <rtems_rfs_format+0x59e> <== ALWAYS TAKEN
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
4decc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dece: 4879 0006 bfbb pea 6bfbb <_CPU_m68k_BFFFO_table+0x4b2> <== NOT EXECUTED
4ded4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4deda: 508f addql #8,%sp <== NOT EXECUTED
4dedc: 6000 0544 braw 4e422 <rtems_rfs_format+0xae0> <== NOT EXECUTED
/*
* Be nice to strange sizes of disks. These are embedded systems after all
* and nice numbers do not always work out. Let the last block pick up the
* remainder of the blocks.
*/
if ((group_base + group_size) > rtems_rfs_fs_blocks (fs))
4dee0: 220b movel %a3,%d1
4dee2: d286 addl %d6,%d1
4dee4: b081 cmpl %d1,%d0
4dee6: 6404 bccs 4deec <rtems_rfs_format+0x5aa> <== NEVER TAKEN
group_size = rtems_rfs_fs_blocks (fs) - group_base;
4dee8: 2c00 movel %d0,%d6
4deea: 9c8b subl %a3,%d6
if (verbose)
4deec: 4a07 tstb %d7
4deee: 6716 beqs 4df06 <rtems_rfs_format+0x5c4> <== ALWAYS TAKEN
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
4def0: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4def2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4def4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4def6: 4879 0006 bff4 pea 6bff4 <_CPU_m68k_BFFFO_table+0x4eb> <== NOT EXECUTED
4defc: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4df02: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
4df06: 42ae ff36 clrl %fp@(-202)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4df0a: 4201 clrb %d1
handle->bnum = 0;
handle->buffer = NULL;
4df0c: 42ae ff3a clrl %fp@(-198)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4df10: 1d41 ff34 moveb %d1,%fp@(-204)
printf ("\nrtems-rfs: write-group: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
if (verbose)
4df14: 4a07 tstb %d7
4df16: 670e beqs 4df26 <rtems_rfs_format+0x5e4> <== ALWAYS TAKEN
printf (", blocks");
4df18: 4879 0006 c02a pea 6c02a <_CPU_m68k_BFFFO_table+0x521> <== NOT EXECUTED
4df1e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4df24: 588f addql #4,%sp <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4df26: 2f0b movel %a3,%sp@-
4df28: 2f06 movel %d6,%sp@-
4df2a: 2f04 movel %d4,%sp@-
4df2c: 2f05 movel %d5,%sp@-
4df2e: 2f03 movel %d3,%sp@-
4df30: 4eb9 0005 5480 jsr 55480 <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4df36: 4fef 0014 lea %sp@(20),%sp
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4df3a: 2640 moveal %d0,%a3
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4df3c: 4a80 tstl %d0
4df3e: 6f20 bles 4df60 <rtems_rfs_format+0x61e> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4df40: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4df42: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4df44: 4eba f9ae jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
4df48: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4df4a: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4df50: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4df52: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4df54: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4df56: 4879 0006 c033 pea 6c033 <_CPU_m68k_BFFFO_table+0x52a> <== NOT EXECUTED
4df5c: 6000 0192 braw 4e0f0 <rtems_rfs_format+0x7ae> <== 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));
4df60: 2f2e ff84 movel %fp@(-124),%sp@-
4df64: 206e ff3a moveal %fp@(-198),%a0
4df68: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
4df6c: 2f28 001a movel %a0@(26),%sp@-
4df70: 4eb9 0005 c160 jsr 5c160 <memset>
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4df76: 2f03 movel %d3,%sp@-
4df78: 4eb9 0005 52ca jsr 552ca <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
4df7e: 4fef 0010 lea %sp@(16),%sp
memset (rtems_rfs_buffer_data (&handle), 0xff, rtems_rfs_fs_block_size (fs));
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4df82: 2640 moveal %d0,%a3
if (rc > 0)
4df84: 4a80 tstl %d0
4df86: 6f28 bles 4dfb0 <rtems_rfs_format+0x66e> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
4df88: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4df8a: 4eb9 0005 54d8 jsr 554d8 <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
4df90: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4df92: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4df94: 4eba f95e jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
4df98: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4df9a: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4dfa0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dfa2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4dfa4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dfa6: 4879 0006 c079 pea 6c079 <_CPU_m68k_BFFFO_table+0x570> <== NOT EXECUTED
4dfac: 6000 0112 braw 4e0c0 <rtems_rfs_format+0x77e> <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
4dfb0: 42a7 clrl %sp@-
4dfb2: 47f9 0005 512e lea 5512e <rtems_rfs_bitmap_map_set>,%a3
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++)
4dfb8: 9bcd subal %a5,%a5
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
4dfba: 2f03 movel %d3,%sp@-
4dfbc: 4e93 jsr %a3@
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
4dfbe: 4878 0001 pea 1 <ADD>
4dfc2: 2f03 movel %d3,%sp@-
4dfc4: 4e93 jsr %a3@
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
4dfc6: 2f2e ffac movel %fp@(-84),%sp@-
4dfca: 2f2e ffa8 movel %fp@(-88),%sp@-
4dfce: 4eb9 0004 d91e jsr 4d91e <rtems_rfs_rup_quotient>
4dfd4: 4fef 0018 lea %sp@(24),%sp
4dfd8: 2d40 ff24 movel %d0,%fp@(-220)
4dfdc: 600c bras 4dfea <rtems_rfs_format+0x6a8>
/*
* 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);
4dfde: 486d 0002 pea %a5@(2)
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++)
4dfe2: 528d addql #1,%a5
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
4dfe4: 2f03 movel %d3,%sp@-
4dfe6: 4e93 jsr %a3@
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++)
4dfe8: 508f addql #8,%sp
4dfea: bbee ff24 cmpal %fp@(-220),%a5
4dfee: 6dee blts 4dfde <rtems_rfs_format+0x69c>
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4dff0: 2f03 movel %d3,%sp@-
4dff2: 4eb9 0005 54d8 jsr 554d8 <rtems_rfs_bitmap_close>
if (rc > 0)
4dff8: 588f addql #4,%sp
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4dffa: 2640 moveal %d0,%a3
if (rc > 0)
4dffc: 4a80 tstl %d0
4dffe: 6f24 bles 4e024 <rtems_rfs_format+0x6e2> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e000: 486e ff34 pea %fp@(-204) <== NOT EXECUTED
4e004: 486e ff7c pea %fp@(-132) <== NOT EXECUTED
4e008: 4eba f8ea jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
4e00c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e00e: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e014: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e016: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e018: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e01a: 4879 0006 c0c4 pea 6c0c4 <_CPU_m68k_BFFFO_table+0x5bb> <== NOT EXECUTED
4e020: 6000 00ce braw 4e0f0 <rtems_rfs_format+0x7ae> <== NOT EXECUTED
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
4e024: 7001 moveq #1,%d0
4e026: 1d40 ff34 moveb %d0,%fp@(-204)
if (verbose)
4e02a: 4a07 tstb %d7
4e02c: 670e beqs 4e03c <rtems_rfs_format+0x6fa> <== ALWAYS TAKEN
printf (", inodes");
4e02e: 4879 0006 c10b pea 6c10b <_CPU_m68k_BFFFO_table+0x602> <== NOT EXECUTED
4e034: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e03a: 588f addql #4,%sp <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4e03c: 486c 0002 pea %a4@(2)
4e040: 2f06 movel %d6,%sp@-
4e042: 2f04 movel %d4,%sp@-
4e044: 2f05 movel %d5,%sp@-
4e046: 2f03 movel %d3,%sp@-
4e048: 4eb9 0005 5480 jsr 55480 <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e04e: 4fef 0014 lea %sp@(20),%sp
printf (", inodes");
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4e052: 2c00 movel %d0,%d6
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e054: 6f1e bles 4e074 <rtems_rfs_format+0x732> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e056: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e058: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e05a: 4eba f898 jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
4e05e: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e060: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e066: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e068: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e06a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e06c: 4879 0006 c114 pea 6c114 <_CPU_m68k_BFFFO_table+0x60b> <== NOT EXECUTED
4e072: 607c bras 4e0f0 <rtems_rfs_format+0x7ae> <== 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));
4e074: 2f2e ff84 movel %fp@(-124),%sp@-
4e078: 4bf9 0005 c160 lea 5c160 <memset>,%a5
4e07e: 206e ff3a moveal %fp@(-198),%a0
4e082: 42a7 clrl %sp@-
4e084: 2f28 001a movel %a0@(26),%sp@-
4e088: 4e95 jsr %a5@
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4e08a: 2f03 movel %d3,%sp@-
4e08c: 4eb9 0005 52ca jsr 552ca <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
4e092: 4fef 0010 lea %sp@(16),%sp
4e096: 41f9 0005 54d8 lea 554d8 <rtems_rfs_bitmap_close>,%a0
memset (rtems_rfs_buffer_data (&handle), 0x00, rtems_rfs_fs_block_size (fs));
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4e09c: 2c00 movel %d0,%d6
if (rc > 0)
4e09e: 6f2a bles 4e0ca <rtems_rfs_format+0x788> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
4e0a0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e0a2: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
4e0a4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e0a6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e0a8: 4eba f84a jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
4e0ac: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e0ae: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e0b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e0b6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e0b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e0ba: 4879 0006 c15a pea 6c15a <_CPU_m68k_BFFFO_table+0x651> <== NOT EXECUTED
4e0c0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e0c6: 6000 0092 braw 4e15a <rtems_rfs_format+0x818> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4e0ca: 2f03 movel %d3,%sp@-
4e0cc: 4e90 jsr %a0@
if (rc > 0)
4e0ce: 588f addql #4,%sp
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4e0d0: 2c00 movel %d0,%d6
if (rc > 0)
4e0d2: 6f2a bles 4e0fe <rtems_rfs_format+0x7bc> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e0d4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e0d6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e0d8: 4eba f81a jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
4e0dc: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e0de: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e0e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e0e6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e0e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e0ea: 4879 0006 c1a5 pea 6c1a5 <_CPU_m68k_BFFFO_table+0x69c> <== NOT EXECUTED
4e0f0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e0f6: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4e0fa: 6000 0326 braw 4e422 <rtems_rfs_format+0xae0> <== NOT EXECUTED
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
4e0fe: 7201 moveq #1,%d1
4e100: 1d41 ff34 moveb %d1,%fp@(-204)
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
4e104: 4a2e ff28 tstb %fp@(-216)
4e108: 6678 bnes 4e182 <rtems_rfs_format+0x840> <== NEVER TAKEN
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4e10a: 2f04 movel %d4,%sp@-
4e10c: 2f05 movel %d5,%sp@-
4e10e: 4eba f7e4 jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)
if (rc > 0)
4e112: 508f addql #8,%sp
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4e114: 2c00 movel %d0,%d6
if (rc > 0)
4e116: 6e00 0082 bgtw 4e19a <rtems_rfs_format+0x858>
4e11a: 6000 0094 braw 4e1b0 <rtems_rfs_format+0x86e>
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
4e11e: 266e ff28 moveal %fp@(-216),%a3 <== NOT EXECUTED
4e122: d7c6 addal %d6,%a3 <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
4e124: 42a7 clrl %sp@- <== NOT EXECUTED
4e126: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e128: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e12a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e12c: 4e94 jsr %a4@ <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
4e12e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
4e132: 2e00 movel %d0,%d7 <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
4e134: 6f2c bles 4e162 <rtems_rfs_format+0x820> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e136: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e138: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e13a: 4eba f7b8 jsr %pc@(4d8f4 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
4e13e: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4e140: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e146: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e148: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4e14a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e14c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e14e: 4879 0006 c1ec pea 6c1ec <_CPU_m68k_BFFFO_table+0x6e3> <== NOT EXECUTED
4e154: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e15a: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
4e15e: 6000 02c2 braw 4e422 <rtems_rfs_format+0xae0> <== 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));
4e162: 2f2e ff84 movel %fp@(-124),%sp@- <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
4e166: 5286 addql #1,%d6 <== 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));
4e168: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
4e16c: 206e ff3a moveal %fp@(-198),%a0 <== NOT EXECUTED
4e170: 2f28 001a movel %a0@(26),%sp@- <== NOT EXECUTED
4e174: 4e95 jsr %a5@ <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
4e176: 4fef 000c lea %sp@(12),%sp <== 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));
rtems_rfs_buffer_mark_dirty (&handle);
4e17a: 7001 moveq #1,%d0 <== NOT EXECUTED
4e17c: 1d40 ff34 moveb %d0,%fp@(-204) <== NOT EXECUTED
4e180: 600e bras 4e190 <rtems_rfs_format+0x84e> <== NOT EXECUTED
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
4e182: 568c addql #3,%a4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
4e184: 4286 clrl %d6 <== NOT EXECUTED
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
4e186: 2d4c ff28 movel %a4,%fp@(-216) <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
4e18a: 49f9 0005 65b0 lea 565b0 <rtems_rfs_buffer_handle_request>,%a4<== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
4e190: bcae ff24 cmpl %fp@(-220),%d6 <== NOT EXECUTED
4e194: 6d88 blts 4e11e <rtems_rfs_format+0x7dc> <== NOT EXECUTED
4e196: 6000 ff72 braw 4e10a <rtems_rfs_format+0x7c8> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
if (rc > 0)
{
printf ("\nrtems-rfs: write-group: buffer handle close failed: %d: %s\n",
4e19a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e19c: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e1a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e1a4: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e1a6: 4879 0006 c232 pea 6c232 <_CPU_m68k_BFFFO_table+0x729> <== NOT EXECUTED
4e1ac: 6000 0264 braw 4e412 <rtems_rfs_format+0xad0> <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
4e1b0: 5282 addql #1,%d2
4e1b2: 600a bras 4e1be <rtems_rfs_format+0x87c>
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4e1b4: 260e movel %fp,%d3
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
rc, strerror (rc));
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
4e1b6: 4282 clrl %d2
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4e1b8: 0683 ffff ff3e addil #-194,%d3
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
4e1be: b4ae ffa0 cmpl %fp@(-96),%d2
4e1c2: 6d00 fce4 bltw 4dea8 <rtems_rfs_format+0x566>
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
4e1c6: 4a2a 0015 tstb %a2@(21)
4e1ca: 670c beqs 4e1d8 <rtems_rfs_format+0x896> <== ALWAYS TAKEN
printf ("\n");
4e1cc: 4878 000a pea a <LASTO> <== NOT EXECUTED
4e1d0: 4eb9 0005 c440 jsr 5c440 <putchar> <== NOT EXECUTED
4e1d6: 588f addql #4,%sp <== NOT EXECUTED
rc = rtems_rfs_buffer_close (&fs);
4e1d8: 486e ff7c pea %fp@(-132)
4e1dc: 4eb9 0005 6b10 jsr 56b10 <rtems_rfs_buffer_close>
if (rc > 0)
4e1e2: 588f addql #4,%sp
return -1;
if (config->verbose)
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
4e1e4: 2400 movel %d0,%d2
if (rc > 0)
4e1e6: 6f16 bles 4e1fe <rtems_rfs_format+0x8bc> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
4e1e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e1ea: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e1f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e1f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e1f4: 4879 0006 c26f pea 6c26f <_CPU_m68k_BFFFO_table+0x766> <== NOT EXECUTED
4e1fa: 6000 0216 braw 4e412 <rtems_rfs_format+0xad0> <== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
4e1fe: 486e ff2c pea %fp@(-212)
4e202: 42a7 clrl %sp@-
4e204: 4878 0006 pea 6 <EXTENDSFDF>
4e208: 42a7 clrl %sp@-
4e20a: 2f2e 0008 movel %fp@(8),%sp@-
4e20e: 4eb9 0005 89c2 jsr 589c2 <rtems_rfs_fs_open>
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
4e214: 4fef 0014 lea %sp@(20),%sp
4e218: 4a80 tstl %d0
4e21a: 6c30 bges 4e24c <rtems_rfs_format+0x90a> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
4e21c: 45f9 0005 b09c lea 5b09c <__errno>,%a2 <== NOT EXECUTED
4e222: 4e92 jsr %a2@ <== 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",
4e224: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e226: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e228: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e22e: 2400 movel %d0,%d2 <== NOT EXECUTED
errno, strerror (errno));
4e230: 4e92 jsr %a2@ <== 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",
4e232: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e234: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e236: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e238: 4879 0006 c29f pea 6c29f <_CPU_m68k_BFFFO_table+0x796> <== NOT EXECUTED
4e23e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e244: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e248: 6000 01d4 braw 4e41e <rtems_rfs_format+0xadc> <== NOT EXECUTED
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
4e24c: 486e ff30 pea %fp@(-208)
4e250: 4878 0001 pea 1 <ADD>
4e254: 2f2e ff2c movel %fp@(-212),%sp@-
4e258: 4eb9 0004 ea0c jsr 4ea0c <rtems_rfs_inode_alloc>
if (rc > 0)
4e25e: 4fef 000c lea %sp@(12),%sp
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);
4e262: 2400 movel %d0,%d2
if (rc > 0)
4e264: 6f2a bles 4e290 <rtems_rfs_format+0x94e> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
4e266: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e268: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e26e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e270: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e272: 4879 0006 c2d3 pea 6c2d3 <_CPU_m68k_BFFFO_table+0x7ca> <== NOT EXECUTED
4e278: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
4e27e: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e282: 4eb9 0005 911a jsr 5911a <rtems_rfs_fs_close> <== NOT EXECUTED
4e288: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4e28c: 6000 016e braw 4e3fc <rtems_rfs_format+0xaba> <== NOT EXECUTED
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
4e290: 202e ff30 movel %fp@(-208),%d0
4e294: 7201 moveq #1,%d1
4e296: b280 cmpl %d0,%d1
4e298: 6720 beqs 4e2ba <rtems_rfs_format+0x978> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
4e29a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e29c: 4879 0006 c307 pea 6c307 <_CPU_m68k_BFFFO_table+0x7fe> <== NOT EXECUTED
4e2a2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
4e2a8: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e2ac: 4eb9 0005 911a jsr 5911a <rtems_rfs_fs_close> <== NOT EXECUTED
4e2b2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4e2b6: 6000 0144 braw 4e3fc <rtems_rfs_format+0xaba> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4e2ba: 4878 0001 pea 1 <ADD>
4e2be: 260e movel %fp,%d3
4e2c0: 0683 ffff ff56 addil #-170,%d3
4e2c6: 2f03 movel %d3,%sp@-
4e2c8: 4878 0001 pea 1 <ADD>
4e2cc: 2f2e ff2c movel %fp@(-212),%sp@-
4e2d0: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open>
if (rc > 0)
4e2d6: 4fef 0010 lea %sp@(16),%sp
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);
4e2da: 2400 movel %d0,%d2
if (rc > 0)
4e2dc: 6f3c bles 4e31a <rtems_rfs_format+0x9d8> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
4e2de: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e2e0: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e2e6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e2e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e2ea: 4879 0006 c33d pea 6c33d <_CPU_m68k_BFFFO_table+0x834> <== NOT EXECUTED
4e2f0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
4e2f6: 2f2e ff30 movel %fp@(-208),%sp@- <== NOT EXECUTED
4e2fa: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4e2fe: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e302: 4eb9 0004 e846 jsr 4e846 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
4e308: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e30c: 4eb9 0005 911a jsr 5911a <rtems_rfs_fs_close> <== NOT EXECUTED
4e312: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
4e316: 6000 00e4 braw 4e3fc <rtems_rfs_format+0xaba> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
4e31a: 42a7 clrl %sp@-
4e31c: 42a7 clrl %sp@-
4e31e: 4878 41c9 pea 41c9 <D_MAX_EXP+0x39ca>
4e322: 42a7 clrl %sp@-
4e324: 2f03 movel %d3,%sp@-
4e326: 4eb9 0004 ee7c jsr 4ee7c <rtems_rfs_inode_initialise>
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
4e32c: 4fef 0014 lea %sp@(20),%sp
rtems_rfs_group_bitmap_free (fs, true, ino);
rtems_rfs_fs_close (fs);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
4e330: 2400 movel %d0,%d2
(RTEMS_RFS_S_IFDIR | RTEMS_RFS_S_IRWXU |
RTEMS_RFS_S_IXGRP | RTEMS_RFS_S_IXOTH),
0, 0);
if (rc > 0)
4e332: 6f1c bles 4e350 <rtems_rfs_format+0xa0e> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
4e334: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e336: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e33c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e33e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e340: 4879 0006 c36b pea 6c36b <_CPU_m68k_BFFFO_table+0x862> <== NOT EXECUTED
4e346: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e34c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
4e350: 2f2e ff30 movel %fp@(-208),%sp@-
4e354: 4878 0001 pea 1 <ADD>
4e358: 4879 0006 9eb7 pea 69eb7 <flashdisk_ops+0x19>
4e35e: 486e ff56 pea %fp@(-170)
4e362: 2f2e ff2c movel %fp@(-212),%sp@-
4e366: 4eb9 0005 7056 jsr 57056 <rtems_rfs_dir_add_entry>
if (rc > 0)
4e36c: 4fef 0014 lea %sp@(20),%sp
0, 0);
if (rc > 0)
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
4e370: 2400 movel %d0,%d2
if (rc > 0)
4e372: 6f1c bles 4e390 <rtems_rfs_format+0xa4e> <== ALWAYS TAKEN
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
4e374: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e376: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e37c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e37e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e380: 4879 0006 c39f pea 6c39f <_CPU_m68k_BFFFO_table+0x896> <== NOT EXECUTED
4e386: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e38c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
4e390: 486e ff56 pea %fp@(-170)
4e394: 2f2e ff2c movel %fp@(-212),%sp@-
4e398: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close>
if (rc > 0)
4e39e: 508f addql #8,%sp
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
if (rc > 0)
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
4e3a0: 2400 movel %d0,%d2
if (rc > 0)
4e3a2: 6f1c bles 4e3c0 <rtems_rfs_format+0xa7e> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
4e3a4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e3a6: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e3ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e3ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e3b0: 4879 0006 c3d0 pea 6c3d0 <_CPU_m68k_BFFFO_table+0x8c7> <== NOT EXECUTED
4e3b6: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e3bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
4e3c0: 2f2e ff2c movel %fp@(-212),%sp@-
4e3c4: 4eb9 0005 911a jsr 5911a <rtems_rfs_fs_close>
if (rc < 0)
4e3ca: 588f addql #4,%sp
rc = rtems_rfs_inode_close (fs, &inode);
if (rc > 0)
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
4e3cc: 2400 movel %d0,%d2
if (rc < 0)
4e3ce: 6c2c bges 4e3fc <rtems_rfs_format+0xaba> <== ALWAYS TAKEN
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
4e3d0: 45f9 0005 b09c lea 5b09c <__errno>,%a2 <== NOT EXECUTED
4e3d6: 4e92 jsr %a2@ <== 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",
4e3d8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e3da: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e3dc: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e3e2: 2600 movel %d0,%d3 <== NOT EXECUTED
errno, strerror (errno));
4e3e4: 4e92 jsr %a2@ <== 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",
4e3e6: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e3e8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e3ea: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e3ec: 4879 0006 c3ff pea 6c3ff <_CPU_m68k_BFFFO_table+0x8f6> <== NOT EXECUTED
4e3f2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e3f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
4e3fc: 4a82 tstl %d2
4e3fe: 6f1e bles 4e41e <rtems_rfs_format+0xadc> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
4e400: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e402: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e408: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e40a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e40c: 4879 0006 c434 pea 6c434 <_CPU_m68k_BFFFO_table+0x92b> <== NOT EXECUTED
4e412: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e418: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e41c: 6004 bras 4e422 <rtems_rfs_format+0xae0> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
4e41e: 4280 clrl %d0
4e420: 6014 bras 4e436 <rtems_rfs_format+0xaf4>
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
4e422: 70ff moveq #-1,%d0 <== NOT EXECUTED
4e424: 6010 bras 4e436 <rtems_rfs_format+0xaf4> <== NOT EXECUTED
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
fs->group_inodes = rtems_rfs_bitmap_numof_bits (fs->block_size);
fs->max_name_length = config->max_name_length;
4e426: 2d40 ff98 movel %d0,%fp@(-104) <== NOT EXECUTED
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
4e42a: 4a2a 0015 tstb %a2@(21)
4e42e: 6700 f87a beqw 4dcaa <rtems_rfs_format+0x368>
4e432: 6000 f754 braw 4db88 <rtems_rfs_format+0x246> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
4e436: 4cee 3cfc fefc moveml %fp@(-260),%d2-%d7/%a2-%a5
4e43c: 4e5e unlk %fp <== NOT EXECUTED
0005911a <rtems_rfs_fs_close>:
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
5911a: 4e56 fff0 linkw %fp,#-16
5911e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
59122: 4878 0002 pea 2 <DOUBLE_FLOAT>
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
59126: 246e 0008 moveal %fp@(8),%a2
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
5912a: 42a7 clrl %sp@-
5912c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
59132: 508f addql #8,%sp
59134: 4a00 tstb %d0
59136: 670e beqs 59146 <rtems_rfs_fs_close+0x2c> <== ALWAYS TAKEN
printf ("rtems-rfs: close\n");
59138: 4879 0006 dfec pea 6dfec <CSWTCH.2+0x12ac> <== NOT EXECUTED
5913e: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
59144: 588f addql #4,%sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
59146: 4283 clrl %d3
59148: 4282 clrl %d2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
rtems_rfs_group_close (fs, &fs->groups[group]);
5914a: 47f9 0004 e62a lea 4e62a <rtems_rfs_group_close>,%a3
59150: 6016 bras 59168 <rtems_rfs_fs_close+0x4e>
59152: 202a 0020 movel %a2@(32),%d0
59156: d083 addl %d3,%d0
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
59158: 5282 addql #1,%d2
5915a: 0683 0000 004c addil #76,%d3
rtems_rfs_group_close (fs, &fs->groups[group]);
59160: 2f00 movel %d0,%sp@-
59162: 2f0a movel %a2,%sp@-
59164: 4e93 jsr %a3@
59166: 508f addql #8,%sp
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
printf ("rtems-rfs: close\n");
for (group = 0; group < fs->group_count; group++)
59168: b4aa 0024 cmpl %a2@(36),%d2
5916c: 6de4 blts 59152 <rtems_rfs_fs_close+0x38>
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
5916e: 2f0a movel %a2,%sp@-
59170: 4eb9 0005 6b10 jsr 56b10 <rtems_rfs_buffer_close>
free (fs);
59176: 2f0a movel %a2,%sp@-
59178: 4eb9 0004 6348 jsr 46348 <free>
return 0;
}
5917e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
59184: 4280 clrl %d0
59186: 4e5e unlk %fp
...
000589c2 <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)
{
589c2: 4e56 ff9c linkw %fp,#-100
589c6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
589ca: 4878 0001 pea 1 <ADD>
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
589ce: 282e 0008 movel %fp@(8),%d4
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
589d2: 42a7 clrl %sp@-
rtems_rfs_fs_open (const char* name,
void* user,
uint32_t flags,
uint32_t max_held_buffers,
rtems_rfs_file_system** fs)
{
589d4: 286e 0018 moveal %fp@(24),%a4
#endif
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
589d8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
589de: 508f addql #8,%sp
589e0: 4a00 tstb %d0
589e2: 6710 beqs 589f4 <rtems_rfs_fs_open+0x32> <== ALWAYS TAKEN
printf ("rtems-rfs: open: %s\n", name);
589e4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
589e6: 4879 0006 dce5 pea 6dce5 <CSWTCH.2+0xfa5> <== NOT EXECUTED
589ec: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
589f2: 508f addql #8,%sp <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
589f4: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f>
589f8: 4eb9 0004 6910 jsr 46910 <malloc>
if (!*fs)
589fe: 588f addql #4,%sp
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: %s\n", name);
*fs = malloc (sizeof (rtems_rfs_file_system));
58a00: 2880 movel %d0,%a4@
if (!*fs)
58a02: 6630 bnes 58a34 <rtems_rfs_fs_open+0x72> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58a04: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58a08: 42a7 clrl %sp@- <== NOT EXECUTED
58a0a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58a10: 508f addql #8,%sp <== NOT EXECUTED
58a12: 4a00 tstb %d0 <== NOT EXECUTED
58a14: 670e beqs 58a24 <rtems_rfs_fs_open+0x62> <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
58a16: 4879 0006 dcfa pea 6dcfa <CSWTCH.2+0xfba> <== NOT EXECUTED
58a1c: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
58a22: 588f addql #4,%sp <== NOT EXECUTED
errno = ENOMEM;
58a24: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
58a2a: 720c moveq #12,%d1 <== NOT EXECUTED
58a2c: 2040 moveal %d0,%a0 <== NOT EXECUTED
58a2e: 2081 movel %d1,%a0@ <== NOT EXECUTED
58a30: 6000 00dc braw 58b0e <rtems_rfs_fs_open+0x14c> <== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
58a34: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f>
58a38: 42a7 clrl %sp@-
58a3a: 2f00 movel %d0,%sp@-
58a3c: 4eb9 0005 c160 jsr 5c160 <memset>
(*fs)->user = user;
58a42: 2054 moveal %a4@,%a0
58a44: 216e 000c 0080 movel %fp@(12),%a0@(128)
rtems_chain_initialize_empty (&(*fs)->buffers);
58a4a: 2054 moveal %a4@,%a0
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 );
58a4c: 43e8 0048 lea %a0@(72),%a1
58a50: 2149 0044 movel %a1,%a0@(68)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a54: 43e8 0044 lea %a0@(68),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
58a58: 42a8 0048 clrl %a0@(72)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a5c: 2149 004c movel %a1,%a0@(76)
rtems_chain_initialize_empty (&(*fs)->release);
58a60: 2054 moveal %a4@,%a0
Chain_Node *tail = _Chain_Tail( the_chain );
58a62: 43e8 0058 lea %a0@(88),%a1
58a66: 2149 0054 movel %a1,%a0@(84)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a6a: 43e8 0054 lea %a0@(84),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
58a6e: 42a8 0058 clrl %a0@(88)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a72: 2149 005c movel %a1,%a0@(92)
rtems_chain_initialize_empty (&(*fs)->release_modified);
58a76: 2054 moveal %a4@,%a0
Chain_Node *tail = _Chain_Tail( the_chain );
58a78: 43e8 0068 lea %a0@(104),%a1
58a7c: 2149 0064 movel %a1,%a0@(100)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a80: 43e8 0064 lea %a0@(100),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
58a84: 42a8 0068 clrl %a0@(104)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a88: 2149 006c movel %a1,%a0@(108)
rtems_chain_initialize_empty (&(*fs)->file_shares);
58a8c: 2054 moveal %a4@,%a0
Chain_Node *tail = _Chain_Tail( the_chain );
58a8e: 43e8 0078 lea %a0@(120),%a1
58a92: 2149 0074 movel %a1,%a0@(116)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a96: 43e8 0074 lea %a0@(116),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
58a9a: 42a8 0078 clrl %a0@(120)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
58a9e: 2149 007c movel %a1,%a0@(124)
(*fs)->max_held_buffers = max_held_buffers;
58aa2: 2054 moveal %a4@,%a0
58aa4: 216e 0014 0040 movel %fp@(20),%a0@(64)
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
(*fs)->flags = flags;
58aaa: 20ae 0010 movel %fp@(16),%a0@
rtems_chain_initialize_empty (&(*fs)->release);
rtems_chain_initialize_empty (&(*fs)->release_modified);
rtems_chain_initialize_empty (&(*fs)->file_shares);
(*fs)->max_held_buffers = max_held_buffers;
(*fs)->buffers_count = 0;
58aae: 42a8 0050 clrl %a0@(80)
(*fs)->release_count = 0;
58ab2: 42a8 0060 clrl %a0@(96)
(*fs)->release_modified_count = 0;
58ab6: 42a8 0070 clrl %a0@(112)
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
58aba: 2f08 movel %a0,%sp@-
58abc: 2f04 movel %d4,%sp@-
58abe: 4eb9 0005 67c6 jsr 567c6 <rtems_rfs_buffer_open>
if (rc > 0)
58ac4: 4fef 0014 lea %sp@(20),%sp
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
58ac8: 2800 movel %d0,%d4
if (rc > 0)
58aca: 6f48 bles 58b14 <rtems_rfs_fs_open+0x152> <== ALWAYS TAKEN
{
free (*fs);
58acc: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
58ace: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58ad4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58ad8: 42a7 clrl %sp@- <== NOT EXECUTED
58ada: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58ae0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
58ae4: 4a00 tstb %d0 <== NOT EXECUTED
58ae6: 671c beqs 58b04 <rtems_rfs_fs_open+0x142> <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
58ae8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58aea: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
58af0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58af2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58af4: 4879 0006 dd2a pea 6dd2a <CSWTCH.2+0xfea> <== NOT EXECUTED
58afa: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
58b00: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
58b04: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
58b0a: 2040 moveal %d0,%a0 <== NOT EXECUTED
58b0c: 2084 movel %d4,%a0@ <== NOT EXECUTED
return -1;
58b0e: 70ff moveq #-1,%d0 <== NOT EXECUTED
58b10: 6000 05fe braw 59110 <rtems_rfs_fs_open+0x74e> <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
58b14: 2654 moveal %a4@,%a3
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);
58b16: 4878 0001 pea 1 <ADD>
58b1a: 2e0e movel %fp,%d7
58b1c: 0687 ffff ffd0 addil #-48,%d7
58b22: 42a7 clrl %sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
58b24: 4200 clrb %d0
58b26: 2f07 movel %d7,%sp@-
58b28: 1d40 ffd0 moveb %d0,%fp@(-48)
58b2c: 2f0b movel %a3,%sp@-
handle->bnum = 0;
58b2e: 42ae ffd2 clrl %fp@(-46)
handle->buffer = NULL;
58b32: 42ae ffd6 clrl %fp@(-42)
58b36: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request>
if (rc > 0)
58b3c: 4fef 0010 lea %sp@(16),%sp
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);
58b40: 2800 movel %d0,%d4
if (rc > 0)
58b42: 6f2a bles 58b6e <rtems_rfs_fs_open+0x1ac> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58b44: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58b48: 42a7 clrl %sp@- <== NOT EXECUTED
58b4a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58b50: 508f addql #8,%sp <== NOT EXECUTED
58b52: 4a00 tstb %d0 <== NOT EXECUTED
58b54: 6700 0436 beqw 58f8c <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
58b58: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58b5a: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
58b60: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58b62: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58b64: 4879 0006 dd57 pea 6dd57 <CSWTCH.2+0x1017> <== NOT EXECUTED
58b6a: 6000 0324 braw 58e90 <rtems_rfs_fs_open+0x4ce> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
58b6e: 206e ffd6 moveal %fp@(-42),%a0
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
58b72: 4280 clrl %d0
58b74: 7218 moveq #24,%d1
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
58b76: 2468 001a moveal %a0@(26),%a2
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
58b7a: 1012 moveb %a2@,%d0
58b7c: e3a8 lsll %d1,%d0
58b7e: 4281 clrl %d1
58b80: 122a 0001 moveb %a2@(1),%d1
58b84: 4841 swap %d1
58b86: 4241 clrw %d1
58b88: 8081 orl %d1,%d0
58b8a: 4281 clrl %d1
58b8c: 122a 0003 moveb %a2@(3),%d1
58b90: 8081 orl %d1,%d0
58b92: 122a 0002 moveb %a2@(2),%d1
58b96: e189 lsll #8,%d1
58b98: 8081 orl %d1,%d0
58b9a: 0c80 2809 2001 cmpil #671686657,%d0
58ba0: 671e beqs 58bc0 <rtems_rfs_fs_open+0x1fe> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58ba2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58ba6: 42a7 clrl %sp@- <== NOT EXECUTED
58ba8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58bae: 508f addql #8,%sp <== NOT EXECUTED
58bb0: 4a00 tstb %d0 <== NOT EXECUTED
58bb2: 6700 014a beqw 58cfe <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
58bb6: 4879 0006 dd89 pea 6dd89 <CSWTCH.2+0x1049> <== NOT EXECUTED
58bbc: 6000 00be braw 58c7c <rtems_rfs_fs_open+0x2ba> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->blocks = read_sb (RTEMS_RFS_SB_OFFSET_BLOCKS);
58bc0: 4280 clrl %d0
58bc2: 4281 clrl %d1
58bc4: 102a 000c moveb %a2@(12),%d0
58bc8: 122a 000d moveb %a2@(13),%d1
58bcc: 7418 moveq #24,%d2
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
58bce: 4286 clrl %d6
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;
58bd0: 4bf9 0006 82f4 lea 682f4 <__muldi3>,%a5
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);
58bd6: e5a8 lsll %d2,%d0
58bd8: 4841 swap %d1
58bda: 4241 clrw %d1
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
58bdc: 206b 0010 moveal %a3@(16),%a0
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);
58be0: 8081 orl %d1,%d0
58be2: 4281 clrl %d1
58be4: 122a 000f moveb %a2@(15),%d1
58be8: 8081 orl %d1,%d0
58bea: 122a 000e moveb %a2@(14),%d1
58bee: e189 lsll #8,%d1
58bf0: 8081 orl %d1,%d0
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
58bf2: 4281 clrl %d1
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);
58bf4: 2740 0004 movel %d0,%a3@(4)
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
58bf8: 1c2a 0008 moveb %a2@(8),%d6
58bfc: 122a 0009 moveb %a2@(9),%d1
58c00: e5ae lsll %d2,%d6
58c02: 4841 swap %d1
58c04: 4241 clrw %d1
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
58c06: 4202 clrb %d2
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);
58c08: 8c81 orl %d1,%d6
58c0a: 4281 clrl %d1
58c0c: 122a 000b moveb %a2@(11),%d1
58c10: 8c81 orl %d1,%d6
58c12: 122a 000a moveb %a2@(10),%d1
58c16: e189 lsll #8,%d1
58c18: 8c81 orl %d1,%d6
58c1a: 2746 0008 movel %d6,%a3@(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;
58c1e: 2f00 movel %d0,%sp@-
58c20: 42a7 clrl %sp@-
58c22: 2f06 movel %d6,%sp@-
58c24: 2d48 ffc4 movel %a0,%fp@(-60)
58c28: 42a7 clrl %sp@-
58c2a: 4e95 jsr %a5@
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);
58c2c: 206e ffc4 moveal %fp@(-60),%a0
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;
58c30: 4fef 0010 lea %sp@(16),%sp
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);
58c34: 93c9 subal %a1,%a1
58c36: 2628 0020 movel %a0@(32),%d3
58c3a: 2d43 ffcc movel %d3,%fp@(-52)
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
58c3e: 2628 001c movel %a0@(28),%d3
uint64_t media_block_size = (uint64_t) rtems_rfs_fs_media_block_size (fs);
return media_blocks * media_block_size;
58c42: 2f03 movel %d3,%sp@-
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;
58c44: 2800 movel %d0,%d4
58c46: 2a01 movel %d1,%d5
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;
58c48: 2f02 movel %d2,%sp@-
58c4a: 2f2e ffcc movel %fp@(-52),%sp@-
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);
58c4e: 2d49 ffc8 movel %a1,%fp@(-56)
return media_blocks * media_block_size;
58c52: 2f2e ffc8 movel %fp@(-56),%sp@-
58c56: 4e95 jsr %a5@
58c58: 4fef 0010 lea %sp@(16),%sp
}
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))
58c5c: 9285 subl %d5,%d1
58c5e: 9184 subxl %d4,%d0
58c60: 6424 bccs 58c86 <rtems_rfs_fs_open+0x2c4> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58c62: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58c66: 42a7 clrl %sp@- <== NOT EXECUTED
58c68: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58c6e: 508f addql #8,%sp <== NOT EXECUTED
58c70: 4a00 tstb %d0 <== NOT EXECUTED
58c72: 6700 008a beqw 58cfe <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
58c76: 4879 0006 ddc3 pea 6ddc3 <CSWTCH.2+0x1083> <== NOT EXECUTED
58c7c: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
58c82: 588f addql #4,%sp <== NOT EXECUTED
58c84: 6078 bras 58cfe <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
if (read_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE) != RTEMS_RFS_INODE_SIZE)
58c86: 4280 clrl %d0
58c88: 102a 0024 moveb %a2@(36),%d0
58c8c: 7218 moveq #24,%d1
58c8e: 7438 moveq #56,%d2
58c90: e3a8 lsll %d1,%d0
58c92: 4281 clrl %d1
58c94: 122a 0025 moveb %a2@(37),%d1
58c98: 4841 swap %d1
58c9a: 4241 clrw %d1
58c9c: 8081 orl %d1,%d0
58c9e: 4281 clrl %d1
58ca0: 122a 0027 moveb %a2@(39),%d1
58ca4: 8081 orl %d1,%d0
58ca6: 122a 0026 moveb %a2@(38),%d1
58caa: e189 lsll #8,%d1
58cac: 8081 orl %d1,%d0
58cae: b480 cmpl %d0,%d2
58cb0: 675c beqs 58d0e <rtems_rfs_fs_open+0x34c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58cb2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58cb6: 42a7 clrl %sp@- <== NOT EXECUTED
58cb8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58cbe: 508f addql #8,%sp <== NOT EXECUTED
58cc0: 4a00 tstb %d0 <== NOT EXECUTED
58cc2: 673a beqs 58cfe <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
58cc4: 42a7 clrl %sp@- <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
58cc6: 4280 clrl %d0 <== NOT EXECUTED
58cc8: 4281 clrl %d1 <== NOT EXECUTED
58cca: 102a 0004 moveb %a2@(4),%d0 <== NOT EXECUTED
58cce: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED
58cd2: 7618 moveq #24,%d3 <== NOT EXECUTED
58cd4: 4841 swap %d1 <== NOT EXECUTED
58cd6: 4241 clrw %d1 <== NOT EXECUTED
58cd8: e7a8 lsll %d3,%d0 <== NOT EXECUTED
58cda: 8081 orl %d1,%d0 <== NOT EXECUTED
58cdc: 4281 clrl %d1 <== NOT EXECUTED
58cde: 122a 0007 moveb %a2@(7),%d1 <== NOT EXECUTED
58ce2: 8081 orl %d1,%d0 <== NOT EXECUTED
58ce4: 122a 0006 moveb %a2@(6),%d1 <== NOT EXECUTED
58ce8: e189 lsll #8,%d1 <== 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",
58cea: 8081 orl %d1,%d0 <== NOT EXECUTED
58cec: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58cee: 4879 0006 de03 pea 6de03 <CSWTCH.2+0x10c3> <== NOT EXECUTED
58cf4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
58cfa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
rtems_rfs_buffer_handle_close (fs, &handle);
58cfe: 486e ffd0 pea %fp@(-48) <== NOT EXECUTED
58d02: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58d04: 4eba fc2e jsr %pc@(58934 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
58d08: 508f addql #8,%sp <== NOT EXECUTED
58d0a: 6000 0278 braw 58f84 <rtems_rfs_fs_open+0x5c2> <== NOT EXECUTED
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
58d0e: 4280 clrl %d0
58d10: 102a 0010 moveb %a2@(16),%d0
58d14: 7218 moveq #24,%d1
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
58d16: 7418 moveq #24,%d2
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);
58d18: 7618 moveq #24,%d3
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);
58d1a: e3a8 lsll %d1,%d0
58d1c: 4281 clrl %d1
58d1e: 122a 0011 moveb %a2@(17),%d1
58d22: 4841 swap %d1
58d24: 4241 clrw %d1
58d26: 8081 orl %d1,%d0
58d28: 4281 clrl %d1
58d2a: 122a 0013 moveb %a2@(19),%d1
58d2e: 8081 orl %d1,%d0
58d30: 122a 0012 moveb %a2@(18),%d1
58d34: e189 lsll #8,%d1
58d36: 8081 orl %d1,%d0
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
58d38: 4281 clrl %d1
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);
58d3a: 2740 0018 movel %d0,%a3@(24)
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
58d3e: 4280 clrl %d0
58d40: 102a 0014 moveb %a2@(20),%d0
58d44: 122a 0015 moveb %a2@(21),%d1
58d48: e5a8 lsll %d2,%d0
58d4a: 4841 swap %d1
58d4c: 4241 clrw %d1
58d4e: 8081 orl %d1,%d0
58d50: 4281 clrl %d1
58d52: 122a 0017 moveb %a2@(23),%d1
58d56: 8081 orl %d1,%d0
58d58: 122a 0016 moveb %a2@(22),%d1
58d5c: e189 lsll #8,%d1
58d5e: 8081 orl %d1,%d0
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
58d60: 4281 clrl %d1
rtems_rfs_buffer_handle_close (fs, &handle);
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
58d62: 2740 001c movel %d0,%a3@(28)
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
58d66: 4280 clrl %d0
58d68: 102a 0018 moveb %a2@(24),%d0
58d6c: 122a 0019 moveb %a2@(25),%d1
58d70: e5a8 lsll %d2,%d0
58d72: 4841 swap %d1
58d74: 4241 clrw %d1
58d76: 8081 orl %d1,%d0
58d78: 4281 clrl %d1
58d7a: 122a 001b moveb %a2@(27),%d1
58d7e: 8081 orl %d1,%d0
58d80: 122a 001a moveb %a2@(26),%d1
58d84: e189 lsll #8,%d1
58d86: 8081 orl %d1,%d0
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
58d88: 4281 clrl %d1
return EIO;
}
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);
58d8a: 2740 0024 movel %d0,%a3@(36)
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
58d8e: 122a 001c moveb %a2@(28),%d1
58d92: e5a9 lsll %d2,%d1
58d94: 4282 clrl %d2
58d96: 142a 001d moveb %a2@(29),%d2
58d9a: 4842 swap %d2
58d9c: 4242 clrw %d2
58d9e: 8282 orl %d2,%d1
58da0: 4282 clrl %d2
58da2: 142a 001f moveb %a2@(31),%d2
58da6: 8282 orl %d2,%d1
58da8: 142a 001e moveb %a2@(30),%d2
58dac: e18a lsll #8,%d2
58dae: 8282 orl %d2,%d1
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
58db0: 4282 clrl %d2
}
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);
58db2: 2741 0028 movel %d1,%a3@(40)
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
58db6: 142a 0020 moveb %a2@(32),%d2
58dba: e7aa lsll %d3,%d2
58dbc: 4283 clrl %d3
58dbe: 162a 0021 moveb %a2@(33),%d3
58dc2: 4843 swap %d3
58dc4: 4243 clrw %d3
58dc6: 8483 orl %d3,%d2
58dc8: 4283 clrl %d3
58dca: 162a 0023 moveb %a2@(35),%d3
58dce: 8483 orl %d3,%d2
58dd0: 162a 0022 moveb %a2@(34),%d3
58dd4: 45fa fb5e lea %pc@(58934 <rtems_rfs_buffer_handle_close>),%a2
58dd8: e18b lsll #8,%d3
58dda: 8483 orl %d3,%d2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
58ddc: 2606 movel %d6,%d3
58dde: e48b lsrl #2,%d3
fs->block_map_singly_blocks =
58de0: 2043 moveal %d3,%a0
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 =
58de2: 2743 0034 movel %d3,%a3@(52)
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
58de6: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
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;
58dea: 4c03 3800 mulsl %d3,%d3
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);
58dee: 2742 002c movel %d2,%a3@(44)
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;
58df2: 4c00 2800 mulsl %d0,%d2
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 =
58df6: 2243 moveal %d3,%a1
58df8: 43f1 3c00 lea %a1@(00000000,%d3:l:4),%a1
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
58dfc: 2742 0014 movel %d2,%a3@(20)
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
58e00: 2406 movel %d6,%d2
58e02: 7638 moveq #56,%d3
58e04: 4c43 2002 remul %d3,%d2,%d2
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
58e08: e78e lsll #3,%d6
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
58e0a: 2748 0038 movel %a0,%a3@(56)
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
58e0e: 2749 003c movel %a1,%a3@(60)
fs->blocks_per_block * fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->inodes = fs->group_count * fs->group_inodes;
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
58e12: 2742 0030 movel %d2,%a3@(48)
if (fs->group_blocks >
58e16: bc81 cmpl %d1,%d6
58e18: 642e bccs 58e48 <rtems_rfs_fs_open+0x486> <== ALWAYS TAKEN
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
{
rtems_rfs_buffer_handle_close (fs, &handle);
58e1a: 2f07 movel %d7,%sp@- <== NOT EXECUTED
58e1c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58e1e: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58e20: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58e24: 42a7 clrl %sp@- <== NOT EXECUTED
58e26: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58e2c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58e30: 4a00 tstb %d0 <== NOT EXECUTED
58e32: 6700 0150 beqw 58f84 <rtems_rfs_fs_open+0x5c2> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
58e36: 4879 0006 de47 pea 6de47 <CSWTCH.2+0x1107> <== NOT EXECUTED
58e3c: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
58e42: 588f addql #4,%sp <== NOT EXECUTED
58e44: 6000 013e braw 58f84 <rtems_rfs_fs_open+0x5c2> <== NOT EXECUTED
return EIO;
}
rtems_rfs_buffer_handle_close (fs, &handle);
58e48: 2f07 movel %d7,%sp@-
58e4a: 2f0b movel %a3,%sp@-
58e4c: 4e92 jsr %a2@
/*
* Change the block size to the value in the superblock.
*/
rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_block_size (fs));
58e4e: 2f2b 0008 movel %a3@(8),%sp@-
58e52: 2f0b movel %a3,%sp@-
58e54: 4eb9 0005 6a34 jsr 56a34 <rtems_rfs_buffer_setblksize>
if (rc > 0)
58e5a: 4fef 0010 lea %sp@(16),%sp
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));
58e5e: 2800 movel %d0,%d4
if (rc > 0)
58e60: 6f3c bles 58e9e <rtems_rfs_fs_open+0x4dc> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
58e62: 2f07 movel %d7,%sp@- <== NOT EXECUTED
58e64: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58e66: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58e68: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58e6c: 42a7 clrl %sp@- <== NOT EXECUTED
58e6e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58e74: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58e78: 4a00 tstb %d0 <== NOT EXECUTED
58e7a: 6700 0110 beqw 58f8c <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
58e7e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58e80: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
58e86: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58e88: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58e8a: 4879 0006 de88 pea 6de88 <CSWTCH.2+0x1148> <== NOT EXECUTED
58e90: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
58e96: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58e9a: 6000 00f0 braw 58f8c <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
58e9e: 4878 004c pea 4c <DBL_MANT_DIG+0x17>
58ea2: 2f2b 0024 movel %a3@(36),%sp@-
58ea6: 4eb9 0004 5fd0 jsr 45fd0 <calloc>
if (!fs->groups)
58eac: 508f addql #8,%sp
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));
58eae: 2740 0020 movel %d0,%a3@(32)
if (!fs->groups)
58eb2: 6600 00bc bnew 58f70 <rtems_rfs_fs_open+0x5ae>
{
rtems_rfs_buffer_handle_close (fs, &handle);
58eb6: 2f07 movel %d7,%sp@- <== NOT EXECUTED
58eb8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58eba: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58ebc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58ec0: 42a7 clrl %sp@- <== NOT EXECUTED
58ec2: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58ec8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58ecc: 4a00 tstb %d0 <== NOT EXECUTED
58ece: 6700 00b8 beqw 58f88 <rtems_rfs_fs_open+0x5c6> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
58ed2: 4879 0006 dec9 pea 6dec9 <CSWTCH.2+0x1189> <== NOT EXECUTED
58ed8: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
58ede: 588f addql #4,%sp <== NOT EXECUTED
58ee0: 6000 00a6 braw 58f88 <rtems_rfs_fs_open+0x5c6> <== NOT EXECUTED
* 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,
58ee4: 206b 0020 moveal %a3@(32),%a0
58ee8: d1c3 addal %d3,%a0
58eea: 0683 0000 004c addil #76,%d3
rtems_rfs_fs_block (fs, group, 0),
58ef0: 202b 0028 movel %a3@(40),%d0
* 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,
58ef4: 2f08 movel %a0,%sp@-
58ef6: 2f2b 002c movel %a3@(44),%sp@-
58efa: 2f00 movel %d0,%sp@-
rtems_rfs_fs_block (fs, group, 0),
58efc: 4c02 0800 mulsl %d2,%d0
* 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,
58f00: 2240 moveal %d0,%a1
58f02: 4869 0001 pea %a1@(1)
58f06: 2f0b movel %a3,%sp@-
58f08: 4e92 jsr %a2@
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
58f0a: 4fef 0014 lea %sp@(20),%sp
* 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,
58f0e: 2800 movel %d0,%d4
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
58f10: 6f5a bles 58f6c <rtems_rfs_fs_open+0x5aa> <== ALWAYS TAKEN
58f12: 4285 clrl %d5 <== NOT EXECUTED
58f14: 4283 clrl %d3 <== NOT EXECUTED
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
58f16: 45f9 0004 e62a lea 4e62a <rtems_rfs_group_close>,%a2 <== NOT EXECUTED
58f1c: 6016 bras 58f34 <rtems_rfs_fs_open+0x572> <== NOT EXECUTED
58f1e: 202b 0020 movel %a3@(32),%d0 <== NOT EXECUTED
58f22: d085 addl %d5,%d0 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
58f24: 5283 addql #1,%d3 <== NOT EXECUTED
58f26: 0685 0000 004c addil #76,%d5 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
58f2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58f2e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58f30: 4e92 jsr %a2@ <== NOT EXECUTED
58f32: 508f addql #8,%sp <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
58f34: b483 cmpl %d3,%d2 <== NOT EXECUTED
58f36: 6ee6 bgts 58f1e <rtems_rfs_fs_open+0x55c> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
58f38: 486e ffd0 pea %fp@(-48) <== NOT EXECUTED
58f3c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58f3e: 4eba f9f4 jsr %pc@(58934 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58f42: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58f46: 42a7 clrl %sp@- <== NOT EXECUTED
58f48: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58f4e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58f52: 4a00 tstb %d0 <== NOT EXECUTED
58f54: 6736 beqs 58f8c <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
58f56: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58f58: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
58f5e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58f60: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58f62: 4879 0006 deff pea 6deff <CSWTCH.2+0x11bf> <== NOT EXECUTED
58f68: 6000 ff26 braw 58e90 <rtems_rfs_fs_open+0x4ce> <== NOT EXECUTED
/*
* Perform each phase of group initialisation at the same time. This way we
* know how far the initialisation has gone if an error occurs and we need to
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
58f6c: 5282 addql #1,%d2
58f6e: 600a bras 58f7a <rtems_rfs_fs_open+0x5b8>
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
58f70: 4283 clrl %d3
58f72: 4282 clrl %d2
* 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,
58f74: 45f9 0004 e440 lea 4e440 <rtems_rfs_group_open>,%a2
/*
* 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++)
58f7a: b4ab 0024 cmpl %a3@(36),%d2
58f7e: 6d00 ff64 bltw 58ee4 <rtems_rfs_fs_open+0x522>
58f82: 6048 bras 58fcc <rtems_rfs_fs_open+0x60a>
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))
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
return EIO;
58f84: 7805 moveq #5,%d4 <== NOT EXECUTED
58f86: 6008 bras 58f90 <rtems_rfs_fs_open+0x5ce> <== NOT EXECUTED
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");
return ENOMEM;
58f88: 780c moveq #12,%d4 <== NOT EXECUTED
58f8a: 6004 bras 58f90 <rtems_rfs_fs_open+0x5ce> <== NOT EXECUTED
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
58f8c: 4a84 tstl %d4 <== NOT EXECUTED
58f8e: 673c beqs 58fcc <rtems_rfs_fs_open+0x60a> <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
58f90: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
58f92: 4eb9 0005 6b10 jsr 56b10 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
58f98: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
58f9a: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58fa0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58fa4: 42a7 clrl %sp@- <== NOT EXECUTED
58fa6: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
58fac: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58fb0: 4a00 tstb %d0 <== NOT EXECUTED
58fb2: 6700 fb50 beqw 58b04 <rtems_rfs_fs_open+0x142> <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
58fb6: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58fb8: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
58fbe: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58fc0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58fc2: 4879 0006 df3c pea 6df3c <CSWTCH.2+0x11fc> <== NOT EXECUTED
58fc8: 6000 fb30 braw 58afa <rtems_rfs_fs_open+0x138> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
58fcc: 4878 0001 pea 1 <ADD>
58fd0: 486e ffda pea %fp@(-38)
58fd4: 4878 0001 pea 1 <ADD>
58fd8: 2f14 movel %a4@,%sp@-
58fda: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open>
if (rc > 0)
58fe0: 4fef 0010 lea %sp@(16),%sp
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
58fe4: 2400 movel %d0,%d2
if (rc > 0)
58fe6: 6f3c bles 59024 <rtems_rfs_fs_open+0x662> <== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
58fe8: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
58fea: 4eb9 0005 6b10 jsr 56b10 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
58ff0: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
58ff2: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
58ff8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58ffc: 42a7 clrl %sp@- <== NOT EXECUTED
58ffe: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59004: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59008: 4a00 tstb %d0 <== NOT EXECUTED
5900a: 6700 00ea beqw 590f6 <rtems_rfs_fs_open+0x734> <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
5900e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59010: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
59016: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59018: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5901a: 4879 0006 df69 pea 6df69 <CSWTCH.2+0x1229> <== NOT EXECUTED
59020: 6000 00ca braw 590ec <rtems_rfs_fs_open+0x72a> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
59024: 2054 moveal %a4@,%a0
59026: 7004 moveq #4,%d0
59028: c090 andl %a0@,%d0
5902a: 6678 bnes 590a4 <rtems_rfs_fs_open+0x6e2> <== ALWAYS TAKEN
{
mode = rtems_rfs_inode_get_mode (&inode);
5902c: 226e ffe6 moveal %fp@(-26),%a1 <== 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);
59030: 4280 clrl %d0 <== NOT EXECUTED
59032: 1029 0002 moveb %a1@(2),%d0 <== NOT EXECUTED
59036: 4281 clrl %d1 <== NOT EXECUTED
59038: 1229 0003 moveb %a1@(3),%d1 <== NOT EXECUTED
5903c: e188 lsll #8,%d0 <== NOT EXECUTED
5903e: 8081 orl %d1,%d0 <== NOT EXECUTED
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
59040: 0c80 0000 ffff cmpil #65535,%d0 <== NOT EXECUTED
59046: 670e beqs 59056 <rtems_rfs_fs_open+0x694> <== NOT EXECUTED
59048: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5904e: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
59054: 674e beqs 590a4 <rtems_rfs_fs_open+0x6e2> <== NOT EXECUTED
{
rtems_rfs_inode_close (*fs, &inode);
59056: 486e ffda pea %fp@(-38) <== NOT EXECUTED
5905a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5905c: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
59062: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
59064: 4eb9 0005 6b10 jsr 56b10 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5906a: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
5906c: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59072: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59076: 42a7 clrl %sp@- <== NOT EXECUTED
59078: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5907e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
59082: 4a00 tstb %d0 <== NOT EXECUTED
59084: 670e beqs 59094 <rtems_rfs_fs_open+0x6d2> <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
59086: 4879 0006 df96 pea 6df96 <CSWTCH.2+0x1256> <== NOT EXECUTED
5908c: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
59092: 588f addql #4,%sp <== NOT EXECUTED
errno = EIO;
59094: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5909a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5909c: 7005 moveq #5,%d0 <== NOT EXECUTED
5909e: 2080 movel %d0,%a0@ <== NOT EXECUTED
590a0: 6000 fa6c braw 58b0e <rtems_rfs_fs_open+0x14c> <== NOT EXECUTED
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
590a4: 486e ffda pea %fp@(-38)
590a8: 2f08 movel %a0,%sp@-
590aa: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close>
if (rc > 0)
590b0: 508f addql #8,%sp
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
590b2: 2400 movel %d0,%d2
if (rc > 0)
590b4: 6f4e bles 59104 <rtems_rfs_fs_open+0x742> <== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
590b6: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
590b8: 4eb9 0005 6b10 jsr 56b10 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
590be: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
590c0: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
590c6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
590ca: 42a7 clrl %sp@- <== NOT EXECUTED
590cc: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
590d2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
590d6: 4a00 tstb %d0 <== NOT EXECUTED
590d8: 671c beqs 590f6 <rtems_rfs_fs_open+0x734> <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
590da: 2f02 movel %d2,%sp@- <== NOT EXECUTED
590dc: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
590e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
590e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
590e6: 4879 0006 dfbf pea 6dfbf <CSWTCH.2+0x127f> <== NOT EXECUTED
590ec: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
590f2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
errno = rc;
590f6: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
590fc: 2240 moveal %d0,%a1 <== NOT EXECUTED
590fe: 2282 movel %d2,%a1@ <== NOT EXECUTED
59100: 6000 fa0c braw 58b0e <rtems_rfs_fs_open+0x14c> <== NOT EXECUTED
return -1;
}
errno = 0;
59104: 4eb9 0005 b09c jsr 5b09c <__errno>
5910a: 2040 moveal %d0,%a0
return 0;
5910c: 4280 clrl %d0
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
5910e: 4290 clrl %a0@
return 0;
}
59110: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
59116: 4e5e unlk %fp <== NOT EXECUTED
0005895e <rtems_rfs_fs_size>:
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
5895e: 91c8 subal %a0,%a0 <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
58960: 4280 clrl %d0 <== NOT EXECUTED
#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)
{
58962: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
58966: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58968: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
uint64_t blocks = rtems_rfs_fs_blocks (fs);
uint64_t block_size = rtems_rfs_fs_block_size (fs);
5896c: 222a 0008 movel %a2@(8),%d1 <== NOT EXECUTED
#include <rtems/rfs/rtems-rfs-trace.h>
uint64_t
rtems_rfs_fs_size (rtems_rfs_file_system* fs)
{
uint64_t blocks = rtems_rfs_fs_blocks (fs);
58970: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
58974: 2f09 movel %a1,%sp@- <== NOT EXECUTED
58976: 2f08 movel %a0,%sp@- <== NOT EXECUTED
58978: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5897a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5897c: 4eb9 0006 82f4 jsr 682f4 <__muldi3> <== NOT EXECUTED
}
58982: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
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;
58986: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5898a: 4e5e unlk %fp <== NOT EXECUTED
0004e6c8 <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)
{
4e6c8: 4e56 ffc8 linkw %fp,#-56
4e6cc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4e6d0: 182e 0013 moveb %fp@(19),%d4
4e6d4: 286e 0008 moveal %fp@(8),%a4
4e6d8: 2e2e 000c movel %fp@(12),%d7
4e6dc: 246e 0014 moveal %fp@(20),%a2
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
4e6e0: 4a04 tstb %d4
4e6e2: 6708 beqs 4e6ec <rtems_rfs_group_bitmap_alloc+0x24>
{
size = fs->group_inodes;
4e6e4: 202c 002c movel %a4@(44),%d0
goal -= RTEMS_RFS_ROOT_INO;
4e6e8: 5387 subql #1,%d7
4e6ea: 6004 bras 4e6f0 <rtems_rfs_group_bitmap_alloc+0x28>
}
else
size = fs->group_blocks;
4e6ec: 202c 0028 movel %a4@(40),%d0
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
4e6f0: 264e moveal %fp,%a3
offset = 0;
updown = true;
direction = 1;
4e6f2: 7401 moveq #1,%d2
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
4e6f4: 4283 clrl %d3
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
4e6f6: 4c40 7001 remul %d0,%d1,%d7
4e6fa: 4c40 7007 remul %d0,%d7,%d7
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4e6fe: 5380 subql #1,%d0
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
4e700: 7c01 moveq #1,%d6
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
4e702: 2d47 fff4 movel %d7,%fp@(-12)
bit = (rtems_rfs_bitmap_bit) (goal % size);
4e706: 2701 movel %d1,%a3@-
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
bit = direction > 0 ? 0 : size - 1;
4e708: 2d40 fff0 movel %d0,%fp@(-16)
/*
* 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);
4e70c: 2a02 movel %d2,%d5
4e70e: 4c03 5800 mulsl %d3,%d5
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4e712: 4200 clrb %d0
/*
* 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);
4e714: daae fff4 addl %fp@(-12),%d5
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4e718: 1d40 fffb moveb %d0,%fp@(-5)
/*
* We can start at any location and we move out from that point in each
* direction. The offset grows until we find a free bit or we hit an end.
*/
group = group_start + (direction * offset);
if (offset)
4e71c: 4a83 tstl %d3
4e71e: 6710 beqs 4e730 <rtems_rfs_group_bitmap_alloc+0x68><== ALWAYS TAKEN
bit = direction > 0 ? 0 : size - 1;
4e720: 4a82 tstl %d2 <== NOT EXECUTED
4e722: 6e06 bgts 4e72a <rtems_rfs_group_bitmap_alloc+0x62><== NOT EXECUTED
4e724: 202e fff0 movel %fp@(-16),%d0 <== NOT EXECUTED
4e728: 6002 bras 4e72c <rtems_rfs_group_bitmap_alloc+0x64><== NOT EXECUTED
4e72a: 4280 clrl %d0 <== NOT EXECUTED
4e72c: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
/*
* 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))
4e730: 4a85 tstl %d5
4e732: 6d06 blts 4e73a <rtems_rfs_group_bitmap_alloc+0x72><== NEVER TAKEN
4e734: baac 0024 cmpl %a4@(36),%d5
4e738: 6d14 blts 4e74e <rtems_rfs_group_bitmap_alloc+0x86><== ALWAYS TAKEN
{
if (!updown)
4e73a: 4a06 tstb %d6 <== NOT EXECUTED
4e73c: 6700 00d4 beqw 4e812 <rtems_rfs_group_bitmap_alloc+0x14a><== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
4e740: 4a82 tstl %d2 <== NOT EXECUTED
4e742: 5ec2 sgt %d2 <== NOT EXECUTED
4e744: 7001 moveq #1,%d0 <== NOT EXECUTED
4e746: 49c2 extbl %d2 <== NOT EXECUTED
updown = false;
4e748: 4206 clrb %d6 <== NOT EXECUTED
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
4e74a: 8480 orl %d0,%d2 <== NOT EXECUTED
4e74c: 60be bras 4e70c <rtems_rfs_group_bitmap_alloc+0x44><== NOT EXECUTED
4e74e: 7e4c moveq #76,%d7
4e750: 4c05 7800 mulsl %d5,%d7
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4e754: 226c 0020 moveal %a4@(32),%a1
4e758: d3c7 addal %d7,%a1
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
4e75a: 4a04 tstb %d4
4e75c: 6706 beqs 4e764 <rtems_rfs_group_bitmap_alloc+0x9c>
bitmap = &fs->groups[group].inode_bitmap;
4e75e: 4be9 002a lea %a1@(42),%a5
4e762: 6004 bras 4e768 <rtems_rfs_group_bitmap_alloc+0xa0>
else
bitmap = &fs->groups[group].block_bitmap;
4e764: 4be9 0008 lea %a1@(8),%a5
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
4e768: 2f0b movel %a3,%sp@-
4e76a: 486e fffb pea %fp@(-5)
4e76e: 2f2e fffc movel %fp@(-4),%sp@-
4e772: 2f0d movel %a5,%sp@-
4e774: 4eb9 0005 5348 jsr 55348 <rtems_rfs_bitmap_map_alloc>
if (rc > 0)
4e77a: 4fef 0010 lea %sp@(16),%sp
4e77e: 4a80 tstl %d0
4e780: 6e00 00ba bgtw 4e83c <rtems_rfs_group_bitmap_alloc+0x174>
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
4e784: 7001 moveq #1,%d0
4e786: c094 andl %a4@,%d0
4e788: 660c bnes 4e796 <rtems_rfs_group_bitmap_alloc+0xce><== NEVER TAKEN
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e78a: 2f15 movel %a5@,%sp@-
4e78c: 2f0c movel %a4,%sp@-
4e78e: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release>
4e794: 508f addql #8,%sp
if (allocated)
4e796: 4a2e fffb tstb %fp@(-5)
4e79a: 6762 beqs 4e7fe <rtems_rfs_group_bitmap_alloc+0x136><== NEVER TAKEN
{
if (inode)
4e79c: 4a04 tstb %d4
4e79e: 6712 beqs 4e7b2 <rtems_rfs_group_bitmap_alloc+0xea>
*result = rtems_rfs_group_inode (fs, group, bit);
4e7a0: 49ec 002c lea %a4@(44),%a4
4e7a4: 4c14 5800 mulsl %a4@,%d5
4e7a8: 202e fffc movel %fp@(-4),%d0
4e7ac: 5280 addql #1,%d0
4e7ae: d085 addl %d5,%d0
4e7b0: 600c bras 4e7be <rtems_rfs_group_bitmap_alloc+0xf6>
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
4e7b2: 206c 0020 moveal %a4@(32),%a0
4e7b6: 202e fffc movel %fp@(-4),%d0
4e7ba: d0b0 7800 addl %a0@(00000000,%d7:l),%d0
4e7be: 2480 movel %d0,%a2@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e7c0: 2f3c 0002 0000 movel #131072,%sp@-
4e7c6: 42a7 clrl %sp@-
4e7c8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4e7ce: 508f addql #8,%sp
4e7d0: 4a00 tstb %d0
4e7d2: 6754 beqs 4e828 <rtems_rfs_group_bitmap_alloc+0x160><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
4e7d4: 2212 movel %a2@,%d1 <== NOT EXECUTED
4e7d6: 4a04 tstb %d4 <== NOT EXECUTED
4e7d8: 6708 beqs 4e7e2 <rtems_rfs_group_bitmap_alloc+0x11a><== NOT EXECUTED
4e7da: 203c 0006 c579 movel #443769,%d0 <== NOT EXECUTED
4e7e0: 6006 bras 4e7e8 <rtems_rfs_group_bitmap_alloc+0x120><== NOT EXECUTED
4e7e2: 203c 0006 bcde movel #441566,%d0 <== NOT EXECUTED
4e7e8: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4e7ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e7ec: 4879 0006 c57f pea 6c57f <_CPU_m68k_BFFFO_table+0xa76> <== NOT EXECUTED
4e7f2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e7f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4e7fc: 602a bras 4e828 <rtems_rfs_group_bitmap_alloc+0x160><== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
4e7fe: 4a06 tstb %d6 <== NOT EXECUTED
4e800: 670a beqs 4e80c <rtems_rfs_group_bitmap_alloc+0x144><== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
4e802: 4a82 tstl %d2 <== NOT EXECUTED
4e804: 5ec2 sgt %d2 <== NOT EXECUTED
4e806: 7001 moveq #1,%d0 <== NOT EXECUTED
4e808: 49c2 extbl %d2 <== NOT EXECUTED
4e80a: 8480 orl %d0,%d2 <== NOT EXECUTED
offset++;
4e80c: 5283 addql #1,%d3 <== NOT EXECUTED
4e80e: 6000 fefc braw 4e70c <rtems_rfs_group_bitmap_alloc+0x44><== NOT EXECUTED
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e812: 2f3c 0002 0000 movel #131072,%sp@- <== NOT EXECUTED
4e818: 42a7 clrl %sp@- <== NOT EXECUTED
4e81a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4e820: 508f addql #8,%sp <== NOT EXECUTED
4e822: 4a00 tstb %d0 <== NOT EXECUTED
4e824: 6606 bnes 4e82c <rtems_rfs_group_bitmap_alloc+0x164><== NOT EXECUTED
4e826: 6012 bras 4e83a <rtems_rfs_group_bitmap_alloc+0x172><== NOT EXECUTED
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",
inode ? "inode" : "block", *result);
return 0;
4e828: 4280 clrl %d0
4e82a: 6010 bras 4e83c <rtems_rfs_group_bitmap_alloc+0x174>
offset++;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
printf ("rtems-rfs: group-bitmap-alloc: no blocks available\n");
4e82c: 4879 0006 c5b1 pea 6c5b1 <_CPU_m68k_BFFFO_table+0xaa8> <== NOT EXECUTED
4e832: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
4e838: 588f addql #4,%sp <== NOT EXECUTED
return ENOSPC;
4e83a: 701c moveq #28,%d0 <== NOT EXECUTED
}
4e83c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4e842: 4e5e unlk %fp <== NOT EXECUTED
0004e846 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
4e846: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
4e84a: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%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))
4e84e: 2f3c 0002 0000 movel #131072,%sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
4e854: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e858: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
4e85a: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
4e85e: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e862: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4e868: 508f addql #8,%sp <== NOT EXECUTED
4e86a: 4a00 tstb %d0 <== NOT EXECUTED
4e86c: 6726 beqs 4e894 <rtems_rfs_group_bitmap_free+0x4e><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
4e86e: 4a02 tstb %d2 <== NOT EXECUTED
4e870: 6708 beqs 4e87a <rtems_rfs_group_bitmap_free+0x34><== NOT EXECUTED
4e872: 203c 0006 c579 movel #443769,%d0 <== NOT EXECUTED
4e878: 6006 bras 4e880 <rtems_rfs_group_bitmap_free+0x3a><== NOT EXECUTED
4e87a: 203c 0006 bcde movel #441566,%d0 <== NOT EXECUTED
4e880: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e882: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e884: 4879 0006 c5e4 pea 6c5e4 <_CPU_m68k_BFFFO_table+0xadb> <== NOT EXECUTED
4e88a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e890: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4e894: 220b movel %a3,%d1 <== NOT EXECUTED
4e896: 5381 subql #1,%d1 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
4e898: 4a02 tstb %d2 <== NOT EXECUTED
4e89a: 6706 beqs 4e8a2 <rtems_rfs_group_bitmap_free+0x5c><== NOT EXECUTED
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
4e89c: 202a 002c movel %a2@(44),%d0 <== NOT EXECUTED
4e8a0: 6004 bras 4e8a6 <rtems_rfs_group_bitmap_free+0x60><== NOT EXECUTED
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
4e8a2: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4e8a6: 266a 0020 moveal %a2@(32),%a3 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
4e8aa: 4c40 1003 remul %d0,%d3,%d1 <== NOT EXECUTED
4e8ae: 4c40 1001 remul %d0,%d1,%d1 <== NOT EXECUTED
4e8b2: 2001 movel %d1,%d0 <== NOT EXECUTED
4e8b4: 724c moveq #76,%d1 <== NOT EXECUTED
4e8b6: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4e8ba: d7c0 addal %d0,%a3 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
4e8bc: 4a02 tstb %d2 <== NOT EXECUTED
4e8be: 6706 beqs 4e8c6 <rtems_rfs_group_bitmap_free+0x80><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
4e8c0: 47eb 002a lea %a3@(42),%a3 <== NOT EXECUTED
4e8c4: 6002 bras 4e8c8 <rtems_rfs_group_bitmap_free+0x82><== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
4e8c6: 508b addql #8,%a3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
4e8c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e8ca: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e8cc: 4eb9 0005 51aa jsr 551aa <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e8d2: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
4e8d4: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e8d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4e8d8: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
}
4e8de: 2002 movel %d2,%d0 <== NOT EXECUTED
4e8e0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4e8e6: 4e5e unlk %fp <== NOT EXECUTED
0004e8ea <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)
{
4e8ea: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
4e8ee: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%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))
4e8f2: 2f3c 0002 0000 movel #131072,%sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
4e8f8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e8fc: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
4e8fe: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED
4e902: 162e 000f moveb %fp@(15),%d3 <== NOT EXECUTED
unsigned int group;
rtems_rfs_bitmap_bit bit;
size_t size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e906: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4e90c: 508f addql #8,%sp <== NOT EXECUTED
4e90e: 4a00 tstb %d0 <== NOT EXECUTED
4e910: 6726 beqs 4e938 <rtems_rfs_group_bitmap_test+0x4e><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
4e912: 4a03 tstb %d3 <== NOT EXECUTED
4e914: 6708 beqs 4e91e <rtems_rfs_group_bitmap_test+0x34><== NOT EXECUTED
4e916: 203c 0006 c579 movel #443769,%d0 <== NOT EXECUTED
4e91c: 6006 bras 4e924 <rtems_rfs_group_bitmap_test+0x3a><== NOT EXECUTED
4e91e: 203c 0006 bcde movel #441566,%d0 <== NOT EXECUTED
4e924: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e926: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e928: 4879 0006 c610 pea 6c610 <_CPU_m68k_BFFFO_table+0xb07> <== NOT EXECUTED
4e92e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e934: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
4e938: 4a03 tstb %d3 <== NOT EXECUTED
4e93a: 6712 beqs 4e94e <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
4e93c: 4a82 tstl %d2 <== NOT EXECUTED
4e93e: 6f58 bles 4e998 <rtems_rfs_group_bitmap_test+0xae><== NOT EXECUTED
4e940: b4aa 0014 cmpl %a2@(20),%d2 <== NOT EXECUTED
4e944: 6252 bhis 4e998 <rtems_rfs_group_bitmap_test+0xae><== NOT EXECUTED
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
4e946: 202a 002c movel %a2@(44),%d0 <== NOT EXECUTED
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
4e94a: 5382 subql #1,%d2 <== NOT EXECUTED
4e94c: 600a bras 4e958 <rtems_rfs_group_bitmap_test+0x6e><== NOT EXECUTED
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
4e94e: b4aa 0004 cmpl %a2@(4),%d2 <== NOT EXECUTED
4e952: 6444 bccs 4e998 <rtems_rfs_group_bitmap_test+0xae><== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
4e954: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
}
group = no / size;
4e958: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED
4e95c: 4c40 2002 remul %d0,%d2,%d2 <== NOT EXECUTED
4e960: 704c moveq #76,%d0 <== NOT EXECUTED
4e962: 4c00 2800 mulsl %d0,%d2 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4e966: d4aa 0020 addl %a2@(32),%d2 <== NOT EXECUTED
4e96a: 2642 moveal %d2,%a3 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
4e96c: 4a03 tstb %d3 <== NOT EXECUTED
4e96e: 6706 beqs 4e976 <rtems_rfs_group_bitmap_test+0x8c><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
4e970: 47eb 002a lea %a3@(42),%a3 <== NOT EXECUTED
4e974: 6002 bras 4e978 <rtems_rfs_group_bitmap_test+0x8e><== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
4e976: 508b addql #8,%a3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
4e978: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4e97c: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4e97e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e980: 4eb9 0005 5216 jsr 55216 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e986: 2f13 movel %a3@,%sp@- <== 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);
4e988: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e98a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4e98c: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
4e992: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4e996: 6002 bras 4e99a <rtems_rfs_group_bitmap_test+0xb0><== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
return EINVAL;
4e998: 7416 moveq #22,%d2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
}
4e99a: 2002 movel %d2,%d0 <== NOT EXECUTED
4e99c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4e9a2: 4e5e unlk %fp <== NOT EXECUTED
0004e62a <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4e62a: 4e56 fff0 linkw %fp,#-16
4e62e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4e632: 2f3c 0001 0000 movel #65536,%sp@-
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4e638: 242e 0008 movel %fp@(8),%d2
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4e63c: 42a7 clrl %sp@-
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4e63e: 246e 000c moveal %fp@(12),%a2
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4e642: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4e648: 508f addql #8,%sp
4e64a: 4a00 tstb %d0
4e64c: 6710 beqs 4e65e <rtems_rfs_group_close+0x34> <== ALWAYS TAKEN
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
4e64e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4e650: 4879 0006 c557 pea 6c557 <_CPU_m68k_BFFFO_table+0xa4e> <== NOT EXECUTED
4e656: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e65c: 508f addql #8,%sp <== 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);
4e65e: 486a 002a pea %a2@(42)
4e662: 47f9 0005 54d8 lea 554d8 <rtems_rfs_bitmap_close>,%a3
4e668: 4e93 jsr %a3@
*/
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);
4e66a: 486a 0042 pea %a2@(66)
4e66e: 2600 movel %d0,%d3
4e670: 2f02 movel %d2,%sp@-
4e672: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
4e678: 4200 clrb %d0
4e67a: 1540 0042 moveb %d0,%a2@(66)
handle->bnum = 0;
4e67e: 42aa 0044 clrl %a2@(68)
handle->buffer = NULL;
4e682: 42aa 0048 clrl %a2@(72)
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);
4e686: 486a 0008 pea %a2@(8)
4e68a: 4e93 jsr %a3@
if (rc > 0)
4e68c: 4fef 0010 lea %sp@(16),%sp
4e690: 4a80 tstl %d0
4e692: 6e0c bgts 4e6a0 <rtems_rfs_group_close+0x76> <== NEVER TAKEN
4e694: 2203 movel %d3,%d1
4e696: 4681 notl %d1
4e698: d281 addl %d1,%d1
4e69a: 9381 subxl %d1,%d1
4e69c: c681 andl %d1,%d3
4e69e: 6002 bras 4e6a2 <rtems_rfs_group_close+0x78>
4e6a0: 2600 movel %d0,%d3 <== 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);
4e6a2: 486a 0020 pea %a2@(32)
4e6a6: 2f02 movel %d2,%sp@-
4e6a8: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
4e6ae: 4200 clrb %d0
4e6b0: 1540 0020 moveb %d0,%a2@(32)
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
4e6b4: 2003 movel %d3,%d0
handle->bnum = 0;
4e6b6: 42aa 0022 clrl %a2@(34)
handle->buffer = NULL;
4e6ba: 42aa 0026 clrl %a2@(38)
4e6be: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4e6c4: 4e5e unlk %fp <== NOT EXECUTED
0004e440 <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)
{
4e440: 4e56 ffe0 linkw %fp,#-32
4e444: 222e 0014 movel %fp@(20),%d1
4e448: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
4e44c: 266e 0008 moveal %fp@(8),%a3
4e450: 262e 000c movel %fp@(12),%d3
4e454: 242e 0010 movel %fp@(16),%d2
4e458: 246e 0018 moveal %fp@(24),%a2
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
4e45c: 202b 0004 movel %a3@(4),%d0
4e460: b083 cmpl %d3,%d0
4e462: 623a bhis 4e49e <rtems_rfs_group_open+0x5e> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4e464: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4e46a: 42a7 clrl %sp@- <== NOT EXECUTED
4e46c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4e472: 508f addql #8,%sp <== NOT EXECUTED
4e474: 4a00 tstb %d0 <== NOT EXECUTED
4e476: 6700 01a0 beqw 4e618 <rtems_rfs_group_open+0x1d8> <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
4e47a: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4e47e: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e484: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e486: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4e48a: 4879 0006 c468 pea 6c468 <_CPU_m68k_BFFFO_table+0x95f> <== NOT EXECUTED
4e490: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e496: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e49a: 6000 017c braw 4e618 <rtems_rfs_group_open+0x1d8> <== NOT EXECUTED
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
4e49e: 2042 moveal %d2,%a0
4e4a0: d1c3 addal %d3,%a0
4e4a2: b088 cmpl %a0,%d0
4e4a4: 6204 bhis 4e4aa <rtems_rfs_group_open+0x6a> <== NEVER TAKEN
size = rtems_rfs_fs_blocks (fs) - base;
4e4a6: 2400 movel %d0,%d2
4e4a8: 9483 subl %d3,%d2
4e4aa: 2a02 movel %d2,%d5
4e4ac: b282 cmpl %d2,%d1
4e4ae: 6402 bccs 4e4b2 <rtems_rfs_group_open+0x72> <== NEVER TAKEN
4e4b0: 2a01 movel %d1,%d5
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4e4b2: 2f3c 0000 8000 movel #32768,%sp@-
4e4b8: 42a7 clrl %sp@-
4e4ba: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4e4c0: 508f addql #8,%sp
4e4c2: 4a00 tstb %d0
4e4c4: 6716 beqs 4e4dc <rtems_rfs_group_open+0x9c> <== ALWAYS TAKEN
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
4e4c6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e4c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e4ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e4cc: 4879 0006 c4a7 pea 6c4a7 <_CPU_m68k_BFFFO_table+0x99e> <== NOT EXECUTED
4e4d2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e4d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
base, size, inodes);
group->base = base;
group->size = size;
4e4dc: 2542 0004 movel %d2,%a2@(4)
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,
4e4e0: 280a movel %a2,%d4
4e4e2: 2c0a movel %a2,%d6
4e4e4: 0684 0000 0020 addil #32,%d4
4e4ea: 5086 addql #8,%d6
4e4ec: 49f9 0005 5480 lea 55480 <rtems_rfs_bitmap_open>,%a4
4e4f2: 4200 clrb %d0
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
base, size, inodes);
group->base = base;
4e4f4: 2483 movel %d3,%a2@
4e4f6: 1540 0020 moveb %d0,%a2@(32)
handle->bnum = 0;
4e4fa: 42aa 0022 clrl %a2@(34)
handle->buffer = NULL;
4e4fe: 42aa 0026 clrl %a2@(38)
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,
4e502: 2f03 movel %d3,%sp@-
4e504: 2f02 movel %d2,%sp@-
4e506: 2f04 movel %d4,%sp@-
4e508: 2f0b movel %a3,%sp@-
4e50a: 2f06 movel %d6,%sp@-
4e50c: 4e94 jsr %a4@
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4e50e: 4fef 0014 lea %sp@(20),%sp
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,
4e512: 2400 movel %d0,%d2
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4e514: 6f46 bles 4e55c <rtems_rfs_group_open+0x11c> <== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4e516: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e518: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e51a: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4e520: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4e522: 42aa 0022 clrl %a2@(34) <== 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);
handle->dirty = false;
4e526: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
4e52a: 42aa 0026 clrl %a2@(38) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4e52e: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4e534: 42a7 clrl %sp@- <== NOT EXECUTED
4e536: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4e53c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e540: 4a00 tstb %d0 <== NOT EXECUTED
4e542: 6700 00da beqw 4e61e <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
4e546: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e548: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e54e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e550: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e552: 4879 0006 c4df pea 6c4df <_CPU_m68k_BFFFO_table+0x9d6> <== NOT EXECUTED
4e558: 6000 0090 braw 4e5ea <rtems_rfs_group_open+0x1aa> <== NOT EXECUTED
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
handle->bnum = 0;
4e55c: 42aa 0044 clrl %a2@(68)
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,
4e560: 260a movel %a2,%d3
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4e562: 4200 clrb %d0
handle->bnum = 0;
handle->buffer = NULL;
4e564: 42aa 0048 clrl %a2@(72)
4e568: 0683 0000 0042 addil #66,%d3
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4e56e: 1540 0042 moveb %d0,%a2@(66)
4e572: 2012 movel %a2@,%d0
4e574: 5280 addql #1,%d0
4e576: 2f00 movel %d0,%sp@-
4e578: 2f05 movel %d5,%sp@-
4e57a: 2f03 movel %d3,%sp@-
4e57c: 2f0b movel %a3,%sp@-
4e57e: 486a 002a pea %a2@(42)
4e582: 4e94 jsr %a4@
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e584: 4fef 0014 lea %sp@(20),%sp
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,
4e588: 2400 movel %d0,%d2
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e58a: 6f6a bles 4e5f6 <rtems_rfs_group_open+0x1b6> <== ALWAYS TAKEN
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4e58c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e58e: 49f9 0005 6434 lea 56434 <rtems_rfs_buffer_handle_release>,%a4<== NOT EXECUTED
4e594: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e596: 4e94 jsr %a4@ <== NOT EXECUTED
handle->dirty = false;
4e598: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4e59a: 42aa 0044 clrl %a2@(68) <== 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);
handle->dirty = false;
4e59e: 1540 0042 moveb %d0,%a2@(66) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
4e5a2: 42aa 0048 clrl %a2@(72) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
4e5a6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e5a8: 4eb9 0005 54d8 jsr 554d8 <rtems_rfs_bitmap_close> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
4e5ae: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e5b0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e5b2: 4e94 jsr %a4@ <== NOT EXECUTED
handle->dirty = false;
4e5b4: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4e5b6: 42aa 0022 clrl %a2@(34) <== 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);
handle->dirty = false;
4e5ba: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
4e5be: 42aa 0026 clrl %a2@(38) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4e5c2: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4e5c8: 42a7 clrl %sp@- <== NOT EXECUTED
4e5ca: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4e5d0: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4e5d4: 4a00 tstb %d0 <== NOT EXECUTED
4e5d6: 6746 beqs 4e61e <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
4e5d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e5da: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
4e5e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e5e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e5e4: 4879 0006 c51b pea 6c51b <_CPU_m68k_BFFFO_table+0xa12> <== NOT EXECUTED
4e5ea: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4e5f0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e5f4: 6028 bras 4e61e <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
4e5f6: 7001 moveq #1,%d0
4e5f8: c093 andl %a3@,%d0
4e5fa: 6620 bnes 4e61c <rtems_rfs_group_open+0x1dc> <== NEVER TAKEN
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
4e5fc: 2f2a 0008 movel %a2@(8),%sp@-
4e600: 49f9 0005 6434 lea 56434 <rtems_rfs_buffer_handle_release>,%a4
4e606: 2f0b movel %a3,%sp@-
4e608: 4e94 jsr %a4@
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
4e60a: 2f2a 002a movel %a2@(42),%sp@-
4e60e: 2f0b movel %a3,%sp@-
4e610: 4e94 jsr %a4@
4e612: 4fef 0010 lea %sp@(16),%sp
4e616: 6004 bras 4e61c <rtems_rfs_group_open+0x1dc>
if (base >= rtems_rfs_fs_blocks (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
EIO, strerror (EIO));
return EIO;
4e618: 7405 moveq #5,%d2 <== NOT EXECUTED
4e61a: 6002 bras 4e61e <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
}
return 0;
4e61c: 4282 clrl %d2
}
4e61e: 2002 movel %d2,%d0
4e620: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
4e626: 4e5e unlk %fp <== NOT EXECUTED
0004e9a6 <rtems_rfs_group_usage>:
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4e9a6: 4281 clrl %d1 <== NOT EXECUTED
4e9a8: 4280 clrl %d0 <== NOT EXECUTED
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
4e9aa: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
4e9ae: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
4e9b2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
4e9b6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
4e9ba: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
int g;
*blocks = 0;
4e9be: 4291 clrl %a1@ <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4e9c0: 242a 0024 movel %a2@(36),%d2 <== NOT EXECUTED
size_t* inodes)
{
int g;
*blocks = 0;
*inodes = 0;
4e9c4: 4290 clrl %a0@ <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
4e9c6: 6022 bras 4e9ea <rtems_rfs_group_usage+0x44> <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
4e9c8: 266a 0020 moveal %a2@(32),%a3 <== NOT EXECUTED
4e9cc: d7c1 addal %d1,%a3 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4e9ce: 5280 addql #1,%d0 <== NOT EXECUTED
4e9d0: 0681 0000 004c addil #76,%d1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
4e9d6: 262b 0014 movel %a3@(20),%d3 <== NOT EXECUTED
4e9da: 96ab 0018 subl %a3@(24),%d3 <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
4e9de: d791 addl %d3,%a1@ <== 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) -
4e9e0: 262b 0036 movel %a3@(54),%d3 <== NOT EXECUTED
4e9e4: 96ab 003a subl %a3@(58),%d3 <== 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 +=
4e9e8: d790 addl %d3,%a0@ <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4e9ea: b480 cmpl %d0,%d2 <== NOT EXECUTED
4e9ec: 6eda bgts 4e9c8 <rtems_rfs_group_usage+0x22> <== 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))
4e9ee: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
4e9f2: b091 cmpl %a1@,%d0 <== NOT EXECUTED
4e9f4: 6402 bccs 4e9f8 <rtems_rfs_group_usage+0x52> <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
4e9f6: 2280 movel %d0,%a1@ <== NOT EXECUTED
if (*inodes > rtems_rfs_fs_inodes (fs))
4e9f8: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED
4e9fc: b090 cmpl %a0@,%d0 <== NOT EXECUTED
4e9fe: 6402 bccs 4ea02 <rtems_rfs_group_usage+0x5c> <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
4ea00: 2080 movel %d0,%a0@ <== NOT EXECUTED
return 0;
}
4ea02: 4280 clrl %d0 <== NOT EXECUTED
4ea04: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 <== NOT EXECUTED
4ea08: 4e5e unlk %fp <== NOT EXECUTED
0004ec7a <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4ec7a: 4e56 0000 linkw %fp,#0
4ec7e: 2f0a movel %a2,%sp@-
4ec80: 246e 000c moveal %fp@(12),%a2
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
4ec84: 2f3c 0008 0000 movel #524288,%sp@-
4ec8a: 42a7 clrl %sp@-
4ec8c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4ec92: 508f addql #8,%sp
4ec94: 4a00 tstb %d0
4ec96: 6712 beqs 4ecaa <rtems_rfs_inode_close+0x30> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
4ec98: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ec9c: 4879 0006 c6c9 pea 6c6c9 <_CPU_m68k_BFFFO_table+0xbc0> <== NOT EXECUTED
4eca2: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4eca8: 508f addql #8,%sp <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
4ecaa: 4878 0001 pea 1 <ADD>
4ecae: 2f0a movel %a2,%sp@-
4ecb0: 2f2e 0008 movel %fp@(8),%sp@-
4ecb4: 4eb9 0004 eba2 jsr 4eba2 <rtems_rfs_inode_unload>
if ((rc == 0) && (handle->loads > 0))
4ecba: 4fef 000c lea %sp@(12),%sp
4ecbe: 4a80 tstl %d0
4ecc0: 662e bnes 4ecf0 <rtems_rfs_inode_close+0x76> <== NEVER TAKEN
4ecc2: 4aaa 0022 tstl %a2@(34)
4ecc6: 6f28 bles 4ecf0 <rtems_rfs_inode_close+0x76> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
4ecc8: 2f3c 0008 0000 movel #524288,%sp@- <== NOT EXECUTED
4ecce: 42a7 clrl %sp@- <== NOT EXECUTED
4ecd0: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4ecd6: 508f addql #8,%sp <== NOT EXECUTED
4ecd8: 4a00 tstb %d0 <== NOT EXECUTED
4ecda: 6712 beqs 4ecee <rtems_rfs_inode_close+0x74> <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
4ecdc: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED
4ece0: 4879 0006 c6eb pea 6c6eb <_CPU_m68k_BFFFO_table+0xbe2> <== NOT EXECUTED
4ece6: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4ecec: 508f addql #8,%sp <== NOT EXECUTED
handle->loads);
rc = EIO;
4ecee: 7005 moveq #5,%d0 <== NOT EXECUTED
}
handle->ino = 0;
4ecf0: 42aa 0008 clrl %a2@(8)
return rc;
}
4ecf4: 246e fffc moveal %fp@(-4),%a2
4ecf8: 4e5e unlk %fp <== NOT EXECUTED
0004efd6 <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4efd6: 4e56 ff88 linkw %fp,#-120 <== NOT EXECUTED
4efda: 302e 001e movew %fp@(30),%d0 <== NOT EXECUTED
4efde: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
4efe2: 2f3c 0040 0000 movel #4194304,%sp@- <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4efe8: 282e 0018 movel %fp@(24),%d4 <== NOT EXECUTED
4efec: 3d40 ffb2 movew %d0,%fp@(-78) <== NOT EXECUTED
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
4eff0: 42a7 clrl %sp@- <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4eff2: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
4eff6: 302e 0026 movew %fp@(38),%d0 <== NOT EXECUTED
4effa: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
4effe: 246e 0028 moveal %fp@(40),%a2 <== NOT EXECUTED
4f002: 3e2e 0022 movew %fp@(34),%d7 <== NOT EXECUTED
4f006: 3d40 ffb0 movew %d0,%fp@(-80) <== NOT EXECUTED
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
4f00a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4f010: 508f addql #8,%sp <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4f012: 3a04 movew %d4,%d5 <== NOT EXECUTED
rtems_rfs_inode_handle parent_inode;
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
4f014: 4a00 tstb %d0 <== NOT EXECUTED
4f016: 6700 00b0 beqw 4f0c8 <rtems_rfs_inode_create+0xf2> <== NOT EXECUTED
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
4f01a: 2004 movel %d4,%d0 <== NOT EXECUTED
4f01c: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4f022: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f028: 6728 beqs 4f052 <rtems_rfs_inode_create+0x7c> <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
4f02a: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f030: 6728 beqs 4f05a <rtems_rfs_inode_create+0x84> <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
4f032: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f038: 6728 beqs 4f062 <rtems_rfs_inode_create+0x8c> <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
4f03a: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
4f040: 6728 beqs 4f06a <rtems_rfs_inode_create+0x94> <== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
4f042: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
4f048: 6728 beqs 4f072 <rtems_rfs_inode_create+0x9c> <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CREATE))
{
const char* type = "unknown";
4f04a: 2c3c 0006 c74e movel #444238,%d6 <== NOT EXECUTED
4f050: 6026 bras 4f078 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
4f052: 2c3c 0006 c745 movel #444229,%d6 <== NOT EXECUTED
4f058: 601e bras 4f078 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
4f05a: 2c3c 0006 c749 movel #444233,%d6 <== NOT EXECUTED
4f060: 6016 bras 4f078 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
4f062: 2c3c 0006 bcde movel #441566,%d6 <== NOT EXECUTED
4f068: 600e bras 4f078 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
4f06a: 2c3c 0006 d079 movel #446585,%d6 <== NOT EXECUTED
4f070: 6006 bras 4f078 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
4f072: 2c3c 0006 e5fe movel #452094,%d6 <== NOT EXECUTED
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
4f078: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f07a: 4879 0006 c756 pea 6c756 <_CPU_m68k_BFFFO_table+0xc4d> <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
4f080: 4bf9 0005 c440 lea 5c440 <putchar>,%a5 <== NOT EXECUTED
type = "block";
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);
4f086: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4f08c: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_inode_create (rtems_rfs_file_system* fs,
4f090: 284b moveal %a3,%a4 <== NOT EXECUTED
4f092: d9ee 0014 addal %fp@(20),%a4 <== 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++)
4f096: 508f addql #8,%sp <== NOT EXECUTED
4f098: 600a bras 4f0a4 <rtems_rfs_inode_create+0xce> <== NOT EXECUTED
printf ("%c", name[c]);
4f09a: 101b moveb %a3@+,%d0 <== NOT EXECUTED
4f09c: 49c0 extbl %d0 <== NOT EXECUTED
4f09e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f0a0: 4e95 jsr %a5@ <== NOT EXECUTED
4f0a2: 588f addql #4,%sp <== 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++)
4f0a4: b9cb cmpal %a3,%a4 <== NOT EXECUTED
4f0a6: 66f2 bnes 4f09a <rtems_rfs_inode_create+0xc4> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
4f0a8: 2004 movel %d4,%d0 <== NOT EXECUTED
4f0aa: 0280 0000 03ff andil #1023,%d0 <== NOT EXECUTED
4f0b0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f0b2: 3f05 movew %d5,%sp@- <== NOT EXECUTED
4f0b4: 4267 clrw %sp@- <== NOT EXECUTED
4f0b6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f0b8: 4879 0006 c780 pea 6c780 <_CPU_m68k_BFFFO_table+0xc77> <== NOT EXECUTED
4f0be: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4f0c4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
4f0c8: 4280 clrl %d0 <== NOT EXECUTED
4f0ca: 0284 ffff f000 andil #-4096,%d4 <== NOT EXECUTED
4f0d0: 3004 movew %d4,%d0 <== NOT EXECUTED
4f0d2: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f0d8: 6728 beqs 4f102 <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f0da: 6214 bhis 4f0f0 <rtems_rfs_inode_create+0x11a> <== NOT EXECUTED
4f0dc: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f0e2: 671e beqs 4f102 <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f0e4: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f0ea: 6600 01fa bnew 4f2e6 <rtems_rfs_inode_create+0x310> <== NOT EXECUTED
4f0ee: 6012 bras 4f102 <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f0f0: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
4f0f6: 670a beqs 4f102 <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f0f8: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
4f0fe: 6600 01e6 bnew 4f2e6 <rtems_rfs_inode_create+0x310> <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
4f102: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f104: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f106: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f108: 4eb9 0004 ea0c jsr 4ea0c <rtems_rfs_inode_alloc> <== NOT EXECUTED
if (rc > 0)
4f10e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
4f112: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f114: 4a80 tstl %d0 <== NOT EXECUTED
4f116: 6e00 01d6 bgtw 4f2ee <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
4f11a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f11e: 49ee ffda lea %fp@(-38),%a4 <== NOT EXECUTED
4f122: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f124: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f126: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f128: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f12e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_alloc (fs, parent, ino);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
4f132: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f134: 4a80 tstl %d0 <== NOT EXECUTED
4f136: 6f04 bles 4f13c <rtems_rfs_inode_create+0x166> <== NOT EXECUTED
4f138: 6000 019e braw 4f2d8 <rtems_rfs_inode_create+0x302> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
4f13c: 3f2e ffb0 movew %fp@(-80),%sp@- <== NOT EXECUTED
4f140: 4267 clrw %sp@- <== NOT EXECUTED
4f142: 3f07 movew %d7,%sp@- <== NOT EXECUTED
4f144: 4267 clrw %sp@- <== NOT EXECUTED
4f146: 3f05 movew %d5,%sp@- <== NOT EXECUTED
4f148: 4267 clrw %sp@- <== NOT EXECUTED
4f14a: 3f2e ffb2 movew %fp@(-78),%sp@- <== NOT EXECUTED
4f14e: 4267 clrw %sp@- <== NOT EXECUTED
4f150: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f152: 4eb9 0004 ee7c jsr 4ee7c <rtems_rfs_inode_initialise> <== NOT EXECUTED
if (rc > 0)
4f158: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
4f15c: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f15e: 4a80 tstl %d0 <== NOT EXECUTED
4f160: 6f18 bles 4f17a <rtems_rfs_inode_create+0x1a4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
4f162: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f164: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f166: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
4f16c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f16e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f170: 4eb9 0004 ea32 jsr 4ea32 <rtems_rfs_inode_free> <== NOT EXECUTED
4f176: 6000 014c braw 4f2c4 <rtems_rfs_inode_create+0x2ee> <== NOT EXECUTED
/*
* Only handle the specifics of a directory. Let caller handle the others.
*
* The inode delete will free the inode.
*/
if (RTEMS_RFS_S_ISDIR (mode))
4f17a: 4280 clrl %d0 <== NOT EXECUTED
4f17c: 3004 movew %d4,%d0 <== NOT EXECUTED
4f17e: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f184: 6640 bnes 4f1c6 <rtems_rfs_inode_create+0x1f0> <== NOT EXECUTED
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
4f186: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f188: 47f9 0005 7056 lea 57056 <rtems_rfs_dir_add_entry>,%a3 <== NOT EXECUTED
4f18e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f192: 4879 0006 9eb7 pea 69eb7 <flashdisk_ops+0x19> <== NOT EXECUTED
4f198: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f19a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f19c: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc == 0)
4f19e: 4fef 0014 lea %sp@(20),%sp <== 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);
4f1a2: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc == 0)
4f1a4: 4a80 tstl %d0 <== NOT EXECUTED
4f1a6: 6618 bnes 4f1c0 <rtems_rfs_inode_create+0x1ea> <== NOT EXECUTED
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
4f1a8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f1aa: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4f1ae: 4879 0006 9eb6 pea 69eb6 <flashdisk_ops+0x18> <== NOT EXECUTED
4f1b4: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f1b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f1b8: 4e93 jsr %a3@ <== NOT EXECUTED
4f1ba: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4f1be: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f1c0: 4a8d tstl %a5 <== NOT EXECUTED
4f1c2: 6f02 bles 4f1c6 <rtems_rfs_inode_create+0x1f0> <== NOT EXECUTED
4f1c4: 6022 bras 4f1e8 <rtems_rfs_inode_create+0x212> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
4f1c6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f1ca: 2a0e movel %fp,%d5 <== NOT EXECUTED
4f1cc: 0685 ffff ffb4 addil #-76,%d5 <== NOT EXECUTED
4f1d2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f1d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f1d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f1d8: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f1de: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
4f1e2: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f1e4: 4a80 tstl %d0 <== NOT EXECUTED
4f1e6: 6f20 bles 4f208 <rtems_rfs_inode_create+0x232> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
4f1e8: 260e movel %fp,%d3 <== NOT EXECUTED
4f1ea: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4f1f0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f1f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f1f4: 4eb9 0004 ecfc jsr 4ecfc <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f1fa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f1fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f1fe: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
4f204: 6000 00be braw 4f2c4 <rtems_rfs_inode_create+0x2ee> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
4f208: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f20a: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4f20e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f212: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f214: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f216: 4eb9 0005 7056 jsr 57056 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
4f21c: 4fef 0014 lea %sp@(20),%sp <== 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);
4f220: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f222: 4a80 tstl %d0 <== NOT EXECUTED
4f224: 6f2c bles 4f252 <rtems_rfs_inode_create+0x27c> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
4f226: 260e movel %fp,%d3 <== NOT EXECUTED
4f228: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f22e: 45f9 0004 ec7a lea 4ec7a <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
if (rc > 0)
{
rtems_rfs_inode_delete (fs, &inode);
4f234: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f236: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f238: 4eb9 0004 ecfc jsr 4ecfc <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f23e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f240: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f242: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
4f244: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f246: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f248: 4e92 jsr %a2@ <== NOT EXECUTED
4f24a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4f24e: 6000 009e braw 4f2ee <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
4f252: 0284 0000 ffff andil #65535,%d4 <== NOT EXECUTED
4f258: 0c84 0000 4000 cmpil #16384,%d4 <== NOT EXECUTED
4f25e: 6636 bnes 4f296 <rtems_rfs_inode_create+0x2c0> <== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
4f260: 206e ffc0 moveal %fp@(-64),%a0 <== 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);
4f264: 4280 clrl %d0 <== NOT EXECUTED
4f266: 1010 moveb %a0@,%d0 <== NOT EXECUTED
4f268: 4281 clrl %d1 <== NOT EXECUTED
4f26a: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
4f26e: e188 lsll #8,%d0 <== NOT EXECUTED
4f270: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
4f272: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
4f274: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED
4f27a: 56c1 sne %d1 <== NOT EXECUTED
4f27c: 4881 extw %d1 <== NOT EXECUTED
4f27e: c081 andl %d1,%d0 <== NOT EXECUTED
/*
* If the node is a directory update the parent link count as the
* new directory has the '..' link that points to the parent.
*/
if (RTEMS_RFS_S_ISDIR (mode))
rtems_rfs_inode_set_links (&parent_inode,
4f280: 5280 addql #1,%d0 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
4f282: 2200 movel %d0,%d1 <== NOT EXECUTED
4f284: e089 lsrl #8,%d1 <== NOT EXECUTED
4f286: 1081 moveb %d1,%a0@ <== NOT EXECUTED
4f288: 206e ffc0 moveal %fp@(-64),%a0 <== NOT EXECUTED
4f28c: 1140 0001 moveb %d0,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f290: 7001 moveq #1,%d0 <== NOT EXECUTED
4f292: 1d40 ffc4 moveb %d0,%fp@(-60) <== NOT EXECUTED
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
4f296: 486e ffb4 pea %fp@(-76) <== NOT EXECUTED
4f29a: 47f9 0004 ec7a lea 4ec7a <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED
4f2a0: 260e movel %fp,%d3 <== NOT EXECUTED
4f2a2: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4f2a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2aa: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc > 0)
4f2ac: 508f addql #8,%sp <== NOT EXECUTED
*/
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);
4f2ae: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f2b0: 4a80 tstl %d0 <== NOT EXECUTED
4f2b2: 6f16 bles 4f2ca <rtems_rfs_inode_create+0x2f4> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
4f2b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2b8: 4eb9 0004 ecfc jsr 4ecfc <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f2be: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2c2: 4e93 jsr %a3@ <== NOT EXECUTED
4f2c4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4f2c8: 6024 bras 4f2ee <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
4f2ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2cc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2ce: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc > 0)
4f2d0: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_inode_delete (fs, &inode);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
4f2d2: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f2d4: 4a80 tstl %d0 <== NOT EXECUTED
4f2d6: 6f14 bles 4f2ec <rtems_rfs_inode_create+0x316> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
4f2d8: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f2da: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2dc: 4eb9 0004 ea32 jsr 4ea32 <rtems_rfs_inode_free> <== NOT EXECUTED
4f2e2: 508f addql #8,%sp <== NOT EXECUTED
4f2e4: 6008 bras 4f2ee <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
case RTEMS_RFS_S_IFBLK:
case RTEMS_RFS_S_IFREG:
case RTEMS_RFS_S_IFLNK:
break;
default:
return EINVAL;
4f2e6: 3a7c 0016 moveaw #22,%a5 <== NOT EXECUTED
4f2ea: 6002 bras 4f2ee <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
4f2ec: 9bcd subal %a5,%a5 <== NOT EXECUTED
}
4f2ee: 200d movel %a5,%d0 <== NOT EXECUTED
4f2f0: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4f2f6: 4e5e unlk %fp <== NOT EXECUTED
0004ecfc <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4ecfc: 4e56 ffa8 linkw %fp,#-88 <== NOT EXECUTED
4ed00: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
4ed04: 2f3c 0080 0000 movel #8388608,%sp@- <== NOT EXECUTED
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4ed0a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
4ed0e: 42a7 clrl %sp@- <== NOT EXECUTED
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4ed10: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
4ed14: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4ed1a: 508f addql #8,%sp <== NOT EXECUTED
4ed1c: 4a00 tstb %d0 <== NOT EXECUTED
4ed1e: 672a beqs 4ed4a <rtems_rfs_inode_delete+0x4e> <== NOT EXECUTED
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
4ed20: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ed24: 6708 beqs 4ed2e <rtems_rfs_inode_delete+0x32> <== NOT EXECUTED
4ed26: 203c 0006 c63c movel #443964,%d0 <== NOT EXECUTED
4ed2c: 6006 bras 4ed34 <rtems_rfs_inode_delete+0x38> <== NOT EXECUTED
4ed2e: 203c 0006 ca77 movel #445047,%d0 <== NOT EXECUTED
4ed34: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ed36: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ed3a: 4879 0006 c719 pea 6c719 <_CPU_m68k_BFFFO_table+0xc10> <== NOT EXECUTED
4ed40: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4ed46: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (handle),
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
4ed4a: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ed4e: 6774 beqs 4edc4 <rtems_rfs_inode_delete+0xc8> <== NOT EXECUTED
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
4ed50: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ed54: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ed56: 4eb9 0004 ea32 jsr 4ea32 <rtems_rfs_inode_free> <== NOT EXECUTED
if (rc > 0)
4ed5c: 508f addql #8,%sp <== NOT EXECUTED
4ed5e: 4a80 tstl %d0 <== NOT EXECUTED
4ed60: 6e64 bgts 4edc6 <rtems_rfs_inode_delete+0xca> <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
4ed62: 260e movel %fp,%d3 <== NOT EXECUTED
4ed64: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
4ed6a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ed6c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ed6e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ed70: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc == 0)
4ed76: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ed7a: 4a80 tstl %d0 <== NOT EXECUTED
4ed7c: 6648 bnes 4edc6 <rtems_rfs_inode_delete+0xca> <== NOT EXECUTED
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
4ed7e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ed80: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ed82: 4eb9 0005 62b8 jsr 562b8 <rtems_rfs_block_map_free_all> <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &map);
4ed88: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ed8a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ed8c: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
4ed92: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED
4ed96: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
4ed9a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4ed9e: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4eda4: 7001 moveq #1,%d0 <== NOT EXECUTED
4eda6: 1540 0010 moveb %d0,%a2@(16) <== NOT EXECUTED
/*
* 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);
4edaa: 486a 0010 pea %a2@(16) <== NOT EXECUTED
4edae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4edb0: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
4edb6: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
* 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);
handle->loads = 0;
4edba: 42aa 0022 clrl %a2@(34) <== NOT EXECUTED
handle->node = NULL;
4edbe: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
4edc2: 6002 bras 4edc6 <rtems_rfs_inode_delete+0xca> <== NOT EXECUTED
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
int rc = 0;
4edc4: 4280 clrl %d0 <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
4edc6: 4cee 040c ffa8 moveml %fp@(-88),%d2-%d3/%a2 <== NOT EXECUTED
4edcc: 4e5e unlk %fp <== NOT EXECUTED
0004ea32 <rtems_rfs_inode_free>:
int
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
4ea32: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
4ea36: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4ea3a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4ea3e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4ea42: 4eb9 0004 e846 jsr 4e846 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
}
4ea48: 4e5e unlk %fp <== NOT EXECUTED
00059c5a <rtems_rfs_inode_get_block.isra.0>:
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
59c5a: 7218 moveq #24,%d1 <== NOT EXECUTED
* @param handle The inode handle.
* @param block The block number to return.
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
59c5c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
59c60: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
59c64: 5e80 addql #7,%d0 <== NOT EXECUTED
59c66: e588 lsll #2,%d0 <== NOT EXECUTED
59c68: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
59c6c: d1c0 addal %d0,%a0 <== NOT EXECUTED
59c6e: 4280 clrl %d0 <== NOT EXECUTED
59c70: 1010 moveb %a0@,%d0 <== NOT EXECUTED
}
59c72: 4e5e unlk %fp <== 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]);
59c74: e3a8 lsll %d1,%d0 <== NOT EXECUTED
59c76: 4281 clrl %d1 <== NOT EXECUTED
59c78: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
59c7c: 4841 swap %d1 <== NOT EXECUTED
59c7e: 4241 clrw %d1 <== NOT EXECUTED
59c80: 8081 orl %d1,%d0 <== NOT EXECUTED
59c82: 4281 clrl %d1 <== NOT EXECUTED
59c84: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
59c88: 8081 orl %d1,%d0 <== NOT EXECUTED
59c8a: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
59c8e: e189 lsll #8,%d1 <== NOT EXECUTED
}
59c90: 8081 orl %d1,%d0 <== NOT EXECUTED
0004fad6 <rtems_rfs_inode_get_block.isra.12>:
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
4fad6: 7218 moveq #24,%d1 <== NOT EXECUTED
* @param handle The inode handle.
* @param block The block number to return.
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
4fad8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
4fadc: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
4fae0: 5e80 addql #7,%d0 <== NOT EXECUTED
4fae2: e588 lsll #2,%d0 <== NOT EXECUTED
4fae4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4fae8: d1c0 addal %d0,%a0 <== NOT EXECUTED
4faea: 4280 clrl %d0 <== NOT EXECUTED
4faec: 1010 moveb %a0@,%d0 <== NOT EXECUTED
}
4faee: 4e5e unlk %fp <== 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]);
4faf0: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4faf2: 4281 clrl %d1 <== NOT EXECUTED
4faf4: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
4faf8: 4841 swap %d1 <== NOT EXECUTED
4fafa: 4241 clrw %d1 <== NOT EXECUTED
4fafc: 8081 orl %d1,%d0 <== NOT EXECUTED
4fafe: 4281 clrl %d1 <== NOT EXECUTED
4fb00: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
4fb04: 8081 orl %d1,%d0 <== NOT EXECUTED
4fb06: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
4fb0a: e189 lsll #8,%d1 <== NOT EXECUTED
}
4fb0c: 8081 orl %d1,%d0 <== NOT EXECUTED
0005a4d8 <rtems_rfs_inode_get_block.isra.5>:
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
5a4d8: 7218 moveq #24,%d1 <== NOT EXECUTED
* @param handle The inode handle.
* @param block The block number to return.
* @return uint32_t The block number.
*/
static inline uint32_t
rtems_rfs_inode_get_block (rtems_rfs_inode_handle* handle, int block)
5a4da: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
5a4de: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
5a4e2: 5e80 addql #7,%d0 <== NOT EXECUTED
5a4e4: e588 lsll #2,%d0 <== NOT EXECUTED
5a4e6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
5a4ea: d1c0 addal %d0,%a0 <== NOT EXECUTED
5a4ec: 4280 clrl %d0 <== NOT EXECUTED
5a4ee: 1010 moveb %a0@,%d0 <== NOT EXECUTED
}
5a4f0: 4e5e unlk %fp <== 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]);
5a4f2: e3a8 lsll %d1,%d0 <== NOT EXECUTED
5a4f4: 4281 clrl %d1 <== NOT EXECUTED
5a4f6: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
5a4fa: 4841 swap %d1 <== NOT EXECUTED
5a4fc: 4241 clrw %d1 <== NOT EXECUTED
5a4fe: 8081 orl %d1,%d0 <== NOT EXECUTED
5a500: 4281 clrl %d1 <== NOT EXECUTED
5a502: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
5a506: 8081 orl %d1,%d0 <== NOT EXECUTED
5a508: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
5a50c: e189 lsll #8,%d1 <== NOT EXECUTED
}
5a50e: 8081 orl %d1,%d0 <== NOT EXECUTED
0004f2fa <rtems_rfs_inode_get_size>:
* @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);
4f2fa: 4280 clrl %d0 <== NOT EXECUTED
4f2fc: 7218 moveq #24,%d1 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4f2fe: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
size.offset = rtems_rfs_inode_get_block_offset (handle);
return rtems_rfs_block_get_size (fs, &size);
}
4f302: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
4f306: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED
4f30a: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
4f30e: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4f310: 4281 clrl %d1 <== NOT EXECUTED
4f312: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
4f316: 4841 swap %d1 <== NOT EXECUTED
4f318: 4241 clrw %d1 <== NOT EXECUTED
4f31a: 8081 orl %d1,%d0 <== NOT EXECUTED
4f31c: 4281 clrl %d1 <== NOT EXECUTED
4f31e: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
4f322: 8081 orl %d1,%d0 <== NOT EXECUTED
4f324: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
4f328: e189 lsll #8,%d1 <== NOT EXECUTED
4f32a: 8081 orl %d1,%d0 <== 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);
4f32c: 4281 clrl %d1 <== NOT EXECUTED
4f32e: 1228 000b moveb %a0@(11),%d1 <== 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);
4f332: 2d40 fff8 movel %d0,%fp@(-8) <== 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);
4f336: 4280 clrl %d0 <== NOT EXECUTED
4f338: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
rtems_rfs_inode_handle* handle)
{
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
size.offset = rtems_rfs_inode_get_block_offset (handle);
return rtems_rfs_block_get_size (fs, &size);
4f33c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
4f340: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4f344: e188 lsll #8,%d0 <== NOT EXECUTED
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
size.offset = rtems_rfs_inode_get_block_offset (handle);
4f346: 8081 orl %d1,%d0 <== NOT EXECUTED
4f348: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
4f34c: 4eb9 0005 583e jsr 5583e <rtems_rfs_block_get_size> <== NOT EXECUTED
}
4f352: 4e5e unlk %fp <== NOT EXECUTED
...
0004ea4c <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4ea4c: 4e56 0000 linkw %fp,#0
4ea50: 2f0a movel %a2,%sp@-
4ea52: 246e 000c moveal %fp@(12),%a2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
4ea56: 2f3c 0010 0000 movel #1048576,%sp@-
4ea5c: 42a7 clrl %sp@-
4ea5e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4ea64: 508f addql #8,%sp
4ea66: 4a00 tstb %d0
4ea68: 672e beqs 4ea98 <rtems_rfs_inode_load+0x4c> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
4ea6a: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ea6e: 6708 beqs 4ea78 <rtems_rfs_inode_load+0x2c> <== NOT EXECUTED
4ea70: 203c 0006 c63c movel #443964,%d0 <== NOT EXECUTED
4ea76: 6006 bras 4ea7e <rtems_rfs_inode_load+0x32> <== NOT EXECUTED
4ea78: 203c 0006 ca77 movel #445047,%d0 <== NOT EXECUTED
4ea7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ea80: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED
4ea84: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ea88: 4879 0006 c640 pea 6c640 <_CPU_m68k_BFFFO_table+0xb37> <== NOT EXECUTED
4ea8e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4ea94: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
4ea98: 4aaa 000c tstl %a2@(12)
4ea9c: 6636 bnes 4ead4 <rtems_rfs_inode_load+0x88>
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
4ea9e: 4878 0001 pea 1 <ADD>
4eaa2: 2f2a 001a movel %a2@(26),%sp@-
4eaa6: 486a 0010 pea %a2@(16)
4eaaa: 2f2e 0008 movel %fp@(8),%sp@-
4eaae: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request>
handle->block, true);
if (rc > 0)
4eab4: 4fef 0010 lea %sp@(16),%sp
4eab8: 4a80 tstl %d0
4eaba: 6e1e bgts 4eada <rtems_rfs_inode_load+0x8e> <== NEVER TAKEN
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
4eabc: 202a 001e movel %a2@(30),%d0
4eac0: 2200 movel %d0,%d1
4eac2: ed88 lsll #6,%d0
4eac4: e789 lsll #3,%d1
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
handle->block, true);
if (rc > 0)
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
4eac6: 206a 0016 moveal %a2@(22),%a0
handle->node += handle->offset;
4eaca: 9081 subl %d1,%d0
4eacc: d0a8 001a addl %a0@(26),%d0
4ead0: 2540 000c movel %d0,%a2@(12)
}
handle->loads++;
4ead4: 52aa 0022 addql #1,%a2@(34)
return 0;
4ead8: 4280 clrl %d0
}
4eada: 246e fffc moveal %fp@(-4),%a2
4eade: 4e5e unlk %fp <== NOT EXECUTED
0004eae2 <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)
{
4eae2: 4e56 fff0 linkw %fp,#-16
4eae6: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
4eaea: 2f3c 0004 0000 movel #262144,%sp@-
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
4eaf0: 266e 0008 moveal %fp@(8),%a3
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
4eaf4: 42a7 clrl %sp@-
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
4eaf6: 242e 000c movel %fp@(12),%d2
4eafa: 246e 0010 moveal %fp@(16),%a2
4eafe: 162e 0017 moveb %fp@(23),%d3
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
4eb02: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4eb08: 508f addql #8,%sp
4eb0a: 4a00 tstb %d0
4eb0c: 6710 beqs 4eb1e <rtems_rfs_inode_open+0x3c> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
4eb0e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4eb10: 4879 0006 c673 pea 6c673 <_CPU_m68k_BFFFO_table+0xb6a> <== NOT EXECUTED
4eb16: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4eb1c: 508f addql #8,%sp <== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
4eb1e: 4a82 tstl %d2
4eb20: 6774 beqs 4eb96 <rtems_rfs_inode_open+0xb4> <== NEVER TAKEN
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
4eb22: 2002 movel %d2,%d0
4eb24: 5380 subql #1,%d0
4eb26: b0ab 0014 cmpl %a3@(20),%d0
4eb2a: 626a bhis 4eb96 <rtems_rfs_inode_open+0xb4> <== NEVER TAKEN
return EINVAL;
handle->ino = ino;
4eb2c: 2542 0008 movel %d2,%a2@(8)
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
4eb30: 206b 0020 moveal %a3@(32),%a0
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
4eb34: 42aa 000c clrl %a2@(12)
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
4eb38: 4c6b 0001 002c remul %a3@(44),%d1,%d0
4eb3e: 4c6b 0000 002c remul %a3@(44),%d0,%d0
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
return EINVAL;
handle->ino = ino;
handle->node = NULL;
handle->loads = 0;
4eb44: 42aa 0022 clrl %a2@(34)
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
4eb48: 4c6b 1002 0030 remul %a3@(48),%d2,%d1
4eb4e: 4c6b 1001 0030 remul %a3@(48),%d1,%d1
4eb54: 2542 001e movel %d2,%a2@(30)
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
4eb58: 744c moveq #76,%d2
4eb5a: 4c02 0800 mulsl %d2,%d0
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;
4eb5e: 2030 0800 movel %a0@(00000000,%d0:l),%d0
4eb62: 5480 addql #2,%d0
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
4eb64: d081 addl %d1,%d0
4eb66: 2540 001a movel %d0,%a2@(26)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4eb6a: 4200 clrb %d0
handle->bnum = 0;
4eb6c: 42aa 0012 clrl %a2@(18)
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4eb70: 1540 0010 moveb %d0,%a2@(16)
handle->bnum = 0;
handle->buffer = NULL;
4eb74: 42aa 0016 clrl %a2@(22)
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
4eb78: 4a03 tstb %d3
4eb7a: 6716 beqs 4eb92 <rtems_rfs_inode_open+0xb0> <== NEVER TAKEN
rc = rtems_rfs_inode_load (fs, handle);
4eb7c: 2d4a 000c movel %a2,%fp@(12)
4eb80: 2d4b 0008 movel %a3,%fp@(8)
return rc;
}
4eb84: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4eb8a: 4e5e unlk %fp
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
4eb8c: 4ef9 0004 ea4c jmp 4ea4c <rtems_rfs_inode_load>
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);
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
4eb92: 4280 clrl %d0 <== NOT EXECUTED
4eb94: 6002 bras 4eb98 <rtems_rfs_inode_open+0xb6> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
if (ino == RTEMS_RFS_EMPTY_INO)
return EINVAL;
4eb96: 7016 moveq #22,%d0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
rc = rtems_rfs_inode_load (fs, handle);
return rc;
}
4eb98: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4eb9e: 4e5e unlk %fp <== NOT EXECUTED
0004f358 <rtems_rfs_inode_set_block>:
* @param block The block index.
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
4f358: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
4f35c: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
4f360: 5e80 addql #7,%d0 <== NOT EXECUTED
* @param block The block index.
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
4f362: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f364: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
4f368: 7618 moveq #24,%d3 <== NOT EXECUTED
* @param block The block index.
* @param bno The block number.
*/
static inline void
rtems_rfs_inode_set_block (rtems_rfs_inode_handle* handle, int block, uint32_t bno)
{
4f36a: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED
4f36e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
4f370: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f374: 2401 movel %d1,%d2 <== NOT EXECUTED
4f376: e6aa lsrl %d3,%d2 <== NOT EXECUTED
4f378: e588 lsll #2,%d0 <== NOT EXECUTED
4f37a: 1382 0800 moveb %d2,%a1@(00000000,%d0:l) <== NOT EXECUTED
4f37e: 2401 movel %d1,%d2 <== NOT EXECUTED
4f380: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f384: 4242 clrw %d2 <== NOT EXECUTED
4f386: 4842 swap %d2 <== NOT EXECUTED
4f388: 1382 0801 moveb %d2,%a1@(00000001,%d0:l) <== NOT EXECUTED
4f38c: 2401 movel %d1,%d2 <== NOT EXECUTED
4f38e: e08a lsrl #8,%d2 <== NOT EXECUTED
4f390: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f394: 1382 0802 moveb %d2,%a1@(00000002,%d0:l) <== NOT EXECUTED
4f398: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f39c: 1381 0803 moveb %d1,%a1@(00000003,%d0:l) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f3a0: 7001 moveq #1,%d0 <== NOT EXECUTED
}
4f3a2: 241f movel %sp@+,%d2 <== NOT EXECUTED
4f3a4: 261f movel %sp@+,%d3 <== NOT EXECUTED
4f3a6: 4e5e unlk %fp <== NOT EXECUTED
*/
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);
4f3a8: 1140 0010 moveb %d0,%a0@(16) <== NOT EXECUTED
}
0004edd0 <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
4edd0: 4e56 fff4 linkw %fp,#-12
4edd4: 48d7 040c moveml %d2-%d3/%a2,%sp@
4edd8: 246e 0008 moveal %fp@(8),%a2
4eddc: 162e 000f moveb %fp@(15),%d3
4ede0: 142e 0013 moveb %fp@(19),%d2
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
4ede4: 4aaa 000c tstl %a2@(12)
4ede8: 6700 0082 beqw 4ee6c <rtems_rfs_inode_time_stamp_now+0x9c>
return ENXIO;
now = time (NULL);
4edec: 42a7 clrl %sp@-
4edee: 4eb9 0005 fc1c jsr 5fc1c <time>
if (atime)
4edf4: 588f addql #4,%sp
4edf6: 4a03 tstb %d3
4edf8: 6736 beqs 4ee30 <rtems_rfs_inode_time_stamp_now+0x60><== NEVER TAKEN
*/
static inline void
rtems_rfs_inode_set_atime (rtems_rfs_inode_handle* handle,
rtems_rfs_time atime)
{
rtems_rfs_write_u32 (&handle->node->atime, atime);
4edfa: 206a 000c moveal %a2@(12),%a0
4edfe: 2200 movel %d0,%d1
4ee00: 7618 moveq #24,%d3
4ee02: e6a9 lsrl %d3,%d1
4ee04: 1141 0010 moveb %d1,%a0@(16)
4ee08: 2200 movel %d0,%d1
4ee0a: 206a 000c moveal %a2@(12),%a0
4ee0e: 4241 clrw %d1
4ee10: 4841 swap %d1
4ee12: 1141 0011 moveb %d1,%a0@(17)
4ee16: 2200 movel %d0,%d1
4ee18: e089 lsrl #8,%d1
4ee1a: 206a 000c moveal %a2@(12),%a0
4ee1e: 1141 0012 moveb %d1,%a0@(18)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ee22: 7201 moveq #1,%d1
*/
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);
4ee24: 206a 000c moveal %a2@(12),%a0
4ee28: 1140 0013 moveb %d0,%a0@(19)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ee2c: 1541 0010 moveb %d1,%a2@(16)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
4ee30: 4a02 tstb %d2
4ee32: 673c beqs 4ee70 <rtems_rfs_inode_time_stamp_now+0xa0><== NEVER TAKEN
*/
static inline void
rtems_rfs_inode_set_mtime (rtems_rfs_inode_handle* handle,
rtems_rfs_time mtime)
{
rtems_rfs_write_u32 (&handle->node->mtime, mtime);
4ee34: 206a 000c moveal %a2@(12),%a0
4ee38: 2200 movel %d0,%d1
4ee3a: 7418 moveq #24,%d2
4ee3c: e4a9 lsrl %d2,%d1
4ee3e: 1141 0014 moveb %d1,%a0@(20)
4ee42: 2200 movel %d0,%d1
4ee44: 206a 000c moveal %a2@(12),%a0
4ee48: 4241 clrw %d1
4ee4a: 4841 swap %d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ee4c: 7601 moveq #1,%d3
*/
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);
4ee4e: 1141 0015 moveb %d1,%a0@(21)
4ee52: 2200 movel %d0,%d1
4ee54: e089 lsrl #8,%d1
4ee56: 206a 000c moveal %a2@(12),%a0
4ee5a: 1141 0016 moveb %d1,%a0@(22)
4ee5e: 206a 000c moveal %a2@(12),%a0
4ee62: 1140 0017 moveb %d0,%a0@(23)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ee66: 1543 0010 moveb %d3,%a2@(16)
4ee6a: 6004 bras 4ee70 <rtems_rfs_inode_time_stamp_now+0xa0>
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
4ee6c: 7006 moveq #6,%d0 <== NOT EXECUTED
4ee6e: 6002 bras 4ee72 <rtems_rfs_inode_time_stamp_now+0xa2><== NOT EXECUTED
now = time (NULL);
if (atime)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
rtems_rfs_inode_set_mtime (handle, now);
return 0;
4ee70: 4280 clrl %d0
}
4ee72: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4ee78: 4e5e unlk %fp <== NOT EXECUTED
0004eba2 <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
4eba2: 4e56 0000 linkw %fp,#0
4eba6: 2f0a movel %a2,%sp@-
4eba8: 246e 000c moveal %fp@(12),%a2
4ebac: 2f02 movel %d2,%sp@-
4ebae: 142e 0013 moveb %fp@(19),%d2
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
4ebb2: 2f3c 0020 0000 movel #2097152,%sp@-
4ebb8: 42a7 clrl %sp@-
4ebba: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
4ebc0: 508f addql #8,%sp
4ebc2: 4a00 tstb %d0
4ebc4: 672e beqs 4ebf4 <rtems_rfs_inode_unload+0x52> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
4ebc6: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ebca: 6708 beqs 4ebd4 <rtems_rfs_inode_unload+0x32> <== NOT EXECUTED
4ebcc: 203c 0006 c63c movel #443964,%d0 <== NOT EXECUTED
4ebd2: 6006 bras 4ebda <rtems_rfs_inode_unload+0x38> <== NOT EXECUTED
4ebd4: 203c 0006 ca77 movel #445047,%d0 <== NOT EXECUTED
4ebda: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ebdc: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED
4ebe0: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ebe4: 4879 0006 c694 pea 6c694 <_CPU_m68k_BFFFO_table+0xb8b> <== NOT EXECUTED
4ebea: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4ebf0: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
4ebf4: 4aaa 000c tstl %a2@(12)
4ebf8: 6604 bnes 4ebfe <rtems_rfs_inode_unload+0x5c> <== ALWAYS TAKEN
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
int rc = 0;
4ebfa: 4280 clrl %d0
4ebfc: 6070 bras 4ec6e <rtems_rfs_inode_unload+0xcc>
handle->ino, handle->loads,
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
4ebfe: 202a 0022 movel %a2@(34),%d0
4ec02: 6768 beqs 4ec6c <rtems_rfs_inode_unload+0xca> <== NEVER TAKEN
return EIO;
handle->loads--;
4ec04: 5380 subql #1,%d0
4ec06: 2540 0022 movel %d0,%a2@(34)
if (handle->loads == 0)
4ec0a: 66ee bnes 4ebfa <rtems_rfs_inode_unload+0x58>
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
4ec0c: 4a2a 0010 tstb %a2@(16)
4ec10: 6744 beqs 4ec56 <rtems_rfs_inode_unload+0xb4>
4ec12: 4a02 tstb %d2
4ec14: 6740 beqs 4ec56 <rtems_rfs_inode_unload+0xb4> <== NEVER TAKEN
rtems_rfs_inode_set_ctime (handle, time (NULL));
4ec16: 42a7 clrl %sp@-
*/
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);
4ec18: 7418 moveq #24,%d2
4ec1a: 4eb9 0005 fc1c jsr 5fc1c <time>
4ec20: 206a 000c moveal %a2@(12),%a0
4ec24: 2200 movel %d0,%d1
4ec26: e4a9 lsrl %d2,%d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ec28: 588f addql #4,%sp
*/
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);
4ec2a: 1141 0018 moveb %d1,%a0@(24)
4ec2e: 2200 movel %d0,%d1
4ec30: 206a 000c moveal %a2@(12),%a0
4ec34: 4241 clrw %d1
4ec36: 4841 swap %d1
4ec38: 1141 0019 moveb %d1,%a0@(25)
4ec3c: 2200 movel %d0,%d1
4ec3e: e089 lsrl #8,%d1
4ec40: 206a 000c moveal %a2@(12),%a0
4ec44: 1141 001a moveb %d1,%a0@(26)
4ec48: 206a 000c moveal %a2@(12),%a0
4ec4c: 1140 001b moveb %d0,%a0@(27)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ec50: 7001 moveq #1,%d0
4ec52: 1540 0010 moveb %d0,%a2@(16)
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
4ec56: 486a 0010 pea %a2@(16)
4ec5a: 2f2e 0008 movel %fp@(8),%sp@-
4ec5e: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release>
handle->node = NULL;
4ec64: 508f addql #8,%sp
4ec66: 42aa 000c clrl %a2@(12)
4ec6a: 6002 bras 4ec6e <rtems_rfs_inode_unload+0xcc>
rtems_rfs_inode_is_loaded (handle) ? "yes" : "no");
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
4ec6c: 7005 moveq #5,%d0 <== NOT EXECUTED
handle->node = NULL;
}
}
return rc;
}
4ec6e: 242e fff8 movel %fp@(-8),%d2
4ec72: 246e fffc moveal %fp@(-4),%a2
4ec76: 4e5e unlk %fp <== NOT EXECUTED
0005918c <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
5918c: 4e56 ff8c linkw %fp,#-116 <== NOT EXECUTED
59190: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
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))
59194: 2f3c 0100 0000 movel #16777216,%sp@- <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
5919a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
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))
5919e: 42a7 clrl %sp@- <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
591a0: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
591a4: 286e 0010 moveal %fp@(16),%a4 <== NOT EXECUTED
591a8: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED
591ac: 2a2e 0018 movel %fp@(24),%d5 <== NOT EXECUTED
591b0: 1c2e 001f moveb %fp@(31),%d6 <== NOT EXECUTED
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))
591b4: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
591ba: 508f addql #8,%sp <== NOT EXECUTED
591bc: 4a00 tstb %d0 <== NOT EXECUTED
591be: 673c beqs 591fc <rtems_rfs_link+0x70> <== NOT EXECUTED
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
591c0: 2f07 movel %d7,%sp@- <== NOT EXECUTED
591c2: 4879 0006 dffd pea 6dffd <CSWTCH.2+0x12bd> <== NOT EXECUTED
for (c = 0; c < length; c++)
591c8: 264a moveal %a2,%a3 <== NOT EXECUTED
printf ("%c", name[c]);
591ca: 4bf9 0005 c440 lea 5c440 <putchar>,%a5 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
591d0: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
591d6: 508f addql #8,%sp <== NOT EXECUTED
591d8: 600a bras 591e4 <rtems_rfs_link+0x58> <== NOT EXECUTED
printf ("%c", name[c]);
591da: 101b moveb %a3@+,%d0 <== NOT EXECUTED
591dc: 49c0 extbl %d0 <== NOT EXECUTED
591de: 2f00 movel %d0,%sp@- <== NOT EXECUTED
591e0: 4e95 jsr %a5@ <== NOT EXECUTED
591e2: 588f addql #4,%sp <== NOT EXECUTED
#include <rtems/rfs/rtems-rfs-dir.h>
#include <rtems/rfs/rtems-rfs-dir-hash.h>
#include <rtems/rfs/rtems-rfs-link.h>
int
rtems_rfs_link (rtems_rfs_file_system* fs,
591e4: 200b movel %a3,%d0 <== NOT EXECUTED
591e6: 908a subl %a2,%d0 <== 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++)
591e8: b9c0 cmpal %d0,%a4 <== NOT EXECUTED
591ea: 6eee bgts 591da <rtems_rfs_link+0x4e> <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
591ec: 2f05 movel %d5,%sp@- <== NOT EXECUTED
591ee: 4879 0006 e042 pea 6e042 <CSWTCH.2+0x1302> <== NOT EXECUTED
591f4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
591fa: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
591fc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59200: 280e movel %fp,%d4 <== NOT EXECUTED
59202: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
59208: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5920a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5920c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5920e: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59214: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
59218: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
5921a: 6600 0118 bnew 59334 <rtems_rfs_link+0x1a8> <== 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)))
5921e: 4a06 tstb %d6 <== NOT EXECUTED
59220: 662e bnes 59250 <rtems_rfs_link+0xc4> <== NOT EXECUTED
59222: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
59226: 4280 clrl %d0 <== NOT EXECUTED
59228: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
5922c: e188 lsll #8,%d0 <== NOT EXECUTED
5922e: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
59234: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
5923a: 6614 bnes 59250 <rtems_rfs_link+0xc4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
5923c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
return ENOTSUP;
5923e: 163c ff86 moveb #-122,%d3 <== 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);
59242: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59244: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
5924a: 508f addql #8,%sp <== NOT EXECUTED
5924c: 6000 00e6 braw 59334 <rtems_rfs_link+0x1a8> <== NOT EXECUTED
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
59250: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59254: 280e movel %fp,%d4 <== NOT EXECUTED
59256: 0684 ffff ffb4 addil #-76,%d4 <== NOT EXECUTED
5925c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5925e: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59260: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59262: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59268: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
5926c: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
5926e: 6710 beqs 59280 <rtems_rfs_link+0xf4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
59270: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59274: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59276: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
5927c: 6000 00b4 braw 59332 <rtems_rfs_link+0x1a6> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
59280: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59282: 2f0c movel %a4,%sp@- <== NOT EXECUTED
59284: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59286: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59288: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5928a: 4eb9 0005 7056 jsr 57056 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
59290: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
59294: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59296: 6f0c bles 592a4 <rtems_rfs_link+0x118> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &parent_inode);
59298: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5929a: 45f9 0004 ec7a lea 4ec7a <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
592a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
592a2: 6058 bras 592fc <rtems_rfs_link+0x170> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
592a4: 206e ffe6 moveal %fp@(-26),%a0 <== 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);
592a8: 4280 clrl %d0 <== NOT EXECUTED
592aa: 1010 moveb %a0@,%d0 <== NOT EXECUTED
592ac: 4281 clrl %d1 <== NOT EXECUTED
592ae: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
592b2: 45f9 0004 ec7a lea 4ec7a <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
592b8: e188 lsll #8,%d0 <== NOT EXECUTED
592ba: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
592bc: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
592be: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED
592c4: 56c1 sne %d1 <== NOT EXECUTED
592c6: 4881 extw %d1 <== NOT EXECUTED
592c8: c081 andl %d1,%d0 <== NOT EXECUTED
592ca: 5280 addql #1,%d0 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
592cc: 2200 movel %d0,%d1 <== NOT EXECUTED
592ce: e089 lsrl #8,%d1 <== NOT EXECUTED
592d0: 1081 moveb %d1,%a0@ <== NOT EXECUTED
592d2: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
592d6: 1140 0001 moveb %d0,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
592da: 7001 moveq #1,%d0 <== NOT EXECUTED
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
592dc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
592e0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
592e4: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED
592e8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
592ea: 4eb9 0004 edd0 jsr 4edd0 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
592f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
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);
592f4: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
592f6: 6f14 bles 5930c <rtems_rfs_link+0x180> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &parent_inode);
592f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
592fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
592fc: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
592fe: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59302: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59304: 4e92 jsr %a2@ <== NOT EXECUTED
59306: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5930a: 6028 bras 59334 <rtems_rfs_link+0x1a8> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
5930c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5930e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59310: 4e92 jsr %a2@ <== NOT EXECUTED
if (rc > 0)
59312: 508f addql #8,%sp <== 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);
59314: 2600 movel %d0,%d3 <== NOT EXECUTED
59316: 200e movel %fp,%d0 <== NOT EXECUTED
59318: 0680 ffff ffda addil #-38,%d0 <== NOT EXECUTED
if (rc > 0)
5931e: 4a83 tstl %d3 <== NOT EXECUTED
59320: 6f08 bles 5932a <rtems_rfs_link+0x19e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
59322: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59324: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59326: 4e92 jsr %a2@ <== NOT EXECUTED
59328: 6008 bras 59332 <rtems_rfs_link+0x1a6> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
5932a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5932c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5932e: 4e92 jsr %a2@ <== NOT EXECUTED
59330: 2600 movel %d0,%d3 <== NOT EXECUTED
59332: 508f addql #8,%sp <== NOT EXECUTED
return rc;
}
59334: 2003 movel %d3,%d0 <== NOT EXECUTED
59336: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5933c: 4e5e unlk %fp <== NOT EXECUTED
00059b10 <rtems_rfs_mutex_create>:
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
59b10: 4e56 0000 linkw %fp,#0
59b14: 2f02 movel %d2,%sp@-
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
59b16: 2f2e 0008 movel %fp@(8),%sp@-
59b1a: 42a7 clrl %sp@-
59b1c: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
59b20: 4878 0001 pea 1 <ADD>
59b24: 2f3c 5246 536d movel #1380340589,%sp@-
59b2a: 4eb9 0004 a338 jsr 4a338 <rtems_semaphore_create>
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
59b30: 4fef 0014 lea %sp@(20),%sp
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
59b34: 2400 movel %d0,%d2
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
59b36: 672e beqs 59b66 <rtems_rfs_mutex_create+0x56> <== NEVER TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
59b38: 4878 0004 pea 4 <CONTEXT_ARG>
59b3c: 42a7 clrl %sp@-
59b3e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
59b44: 508f addql #8,%sp
59b46: 4a00 tstb %d0
59b48: 6720 beqs 59b6a <rtems_rfs_mutex_create+0x5a> <== ALWAYS TAKEN
printf ("rtems-rfs: mutex: open failed: %s\n",
59b4a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59b4c: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
59b52: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59b54: 4879 0006 e21b pea 6e21b <CSWTCH.2+0x14db> <== NOT EXECUTED
59b5a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59b60: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
59b64: 6004 bras 59b6a <rtems_rfs_mutex_create+0x5a> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
59b66: 4280 clrl %d0 <== NOT EXECUTED
59b68: 6002 bras 59b6c <rtems_rfs_mutex_create+0x5c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: open failed: %s\n",
rtems_status_text (sc));
return EIO;
59b6a: 7005 moveq #5,%d0
}
#endif
return 0;
}
59b6c: 242e fffc movel %fp@(-4),%d2
59b70: 4e5e unlk %fp <== NOT EXECUTED
00059b74 <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
59b74: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
59b78: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
59b7c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
59b7e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
59b80: 4eb9 0004 a4d8 jsr 4a4d8 <rtems_semaphore_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59b86: 588f addql #4,%sp <== NOT EXECUTED
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
59b88: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59b8a: 672e beqs 59bba <rtems_rfs_mutex_destroy+0x46> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
59b8c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
59b90: 42a7 clrl %sp@- <== NOT EXECUTED
59b92: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59b98: 508f addql #8,%sp <== NOT EXECUTED
59b9a: 4a00 tstb %d0 <== NOT EXECUTED
59b9c: 6720 beqs 59bbe <rtems_rfs_mutex_destroy+0x4a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
59b9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59ba0: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
59ba6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59ba8: 4879 0006 e23e pea 6e23e <CSWTCH.2+0x14fe> <== NOT EXECUTED
59bae: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59bb4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
59bb8: 6004 bras 59bbe <rtems_rfs_mutex_destroy+0x4a> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
59bba: 4280 clrl %d0 <== NOT EXECUTED
59bbc: 6002 bras 59bc0 <rtems_rfs_mutex_destroy+0x4c> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: close failed: %s\n",
rtems_status_text (sc));
return EIO;
59bbe: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
59bc0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
59bc4: 4e5e unlk %fp <== NOT EXECUTED
0005a06c <rtems_rfs_mutex_lock.isra.0>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
5a06c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a070: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5a072: 42a7 clrl %sp@- <== NOT EXECUTED
5a074: 42a7 clrl %sp@- <== NOT EXECUTED
5a076: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
5a07a: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a080: 4fef 000c lea %sp@(12),%sp <== 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);
5a084: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a086: 672e beqs 5a0b6 <rtems_rfs_mutex_lock.isra.0+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a088: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a08c: 42a7 clrl %sp@- <== NOT EXECUTED
5a08e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5a094: 508f addql #8,%sp <== NOT EXECUTED
5a096: 4a00 tstb %d0 <== NOT EXECUTED
5a098: 6720 beqs 5a0ba <rtems_rfs_mutex_lock.isra.0+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5a09a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a09c: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a0a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a0a4: 4879 0006 c7c1 pea 6c7c1 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
5a0aa: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5a0b0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a0b4: 6004 bras 5a0ba <rtems_rfs_mutex_lock.isra.0+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
5a0b6: 4280 clrl %d0 <== NOT EXECUTED
5a0b8: 6002 bras 5a0bc <rtems_rfs_mutex_lock.isra.0+0x50><== NOT EXECUTED
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
5a0ba: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
5a0bc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5a0c0: 4e5e unlk %fp <== NOT EXECUTED
00059e02 <rtems_rfs_mutex_lock.isra.1>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
59e02: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
59e06: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
59e08: 42a7 clrl %sp@- <== NOT EXECUTED
59e0a: 42a7 clrl %sp@- <== NOT EXECUTED
59e0c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
59e10: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59e16: 4fef 000c lea %sp@(12),%sp <== 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);
59e1a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59e1c: 672e beqs 59e4c <rtems_rfs_mutex_lock.isra.1+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
59e1e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
59e22: 42a7 clrl %sp@- <== NOT EXECUTED
59e24: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59e2a: 508f addql #8,%sp <== NOT EXECUTED
59e2c: 4a00 tstb %d0 <== NOT EXECUTED
59e2e: 6720 beqs 59e50 <rtems_rfs_mutex_lock.isra.1+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
59e30: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59e32: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
59e38: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59e3a: 4879 0006 c7c1 pea 6c7c1 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
59e40: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59e46: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
59e4a: 6004 bras 59e50 <rtems_rfs_mutex_lock.isra.1+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
59e4c: 4280 clrl %d0 <== NOT EXECUTED
59e4e: 6002 bras 59e52 <rtems_rfs_mutex_lock.isra.1+0x50><== NOT EXECUTED
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
59e50: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
59e52: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
59e56: 4e5e unlk %fp <== NOT EXECUTED
0004fdd2 <rtems_rfs_mutex_lock.isra.20>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
4fdd2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4fdd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
4fdd8: 42a7 clrl %sp@- <== NOT EXECUTED
4fdda: 42a7 clrl %sp@- <== NOT EXECUTED
4fddc: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4fde0: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4fde6: 4fef 000c lea %sp@(12),%sp <== 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);
4fdea: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4fdec: 672e beqs 4fe1c <rtems_rfs_mutex_lock.isra.20+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
4fdee: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4fdf2: 42a7 clrl %sp@- <== NOT EXECUTED
4fdf4: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4fdfa: 508f addql #8,%sp <== NOT EXECUTED
4fdfc: 4a00 tstb %d0 <== NOT EXECUTED
4fdfe: 6720 beqs 4fe20 <rtems_rfs_mutex_lock.isra.20+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
4fe00: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fe02: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
4fe08: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4fe0a: 4879 0006 c7c1 pea 6c7c1 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
4fe10: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4fe16: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fe1a: 6004 bras 4fe20 <rtems_rfs_mutex_lock.isra.20+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
4fe1c: 4280 clrl %d0 <== NOT EXECUTED
4fe1e: 6002 bras 4fe22 <rtems_rfs_mutex_lock.isra.20+0x50><== NOT EXECUTED
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
4fe20: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
4fe22: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4fe26: 4e5e unlk %fp <== NOT EXECUTED
0005a512 <rtems_rfs_mutex_lock.isra.6>:
* @param mutex The mutex to lock.
* @retval true The mutex is locked.
* @retval false The mutex could not be locked.
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
5a512: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a516: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5a518: 42a7 clrl %sp@- <== NOT EXECUTED
5a51a: 42a7 clrl %sp@- <== NOT EXECUTED
5a51c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
5a520: 4eb9 0004 60fc jsr 460fc <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a526: 4fef 000c lea %sp@(12),%sp <== 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);
5a52a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a52c: 672e beqs 5a55c <rtems_rfs_mutex_lock.isra.6+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a52e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a532: 42a7 clrl %sp@- <== NOT EXECUTED
5a534: 4eb9 0005 b3e8 jsr 5b3e8 <rtems_rfs_trace> <== NOT EXECUTED
5a53a: 508f addql #8,%sp <== NOT EXECUTED
5a53c: 4a00 tstb %d0 <== NOT EXECUTED
5a53e: 6720 beqs 5a560 <rtems_rfs_mutex_lock.isra.6+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5a540: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a542: 4eb9 0004 269c jsr 4269c <rtems_status_text> <== NOT EXECUTED
5a548: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a54a: 4879 0008 bcde pea 8bcde <rtems_rtc_shell_usage+0xbaa> <== NOT EXECUTED
5a550: 4eb9 0007 1b38 jsr 71b38 <printf> <== NOT EXECUTED
5a556: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a55a: 6004 bras 5a560 <rtems_rfs_mutex_lock.isra.6+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
5a55c: 4280 clrl %d0 <== NOT EXECUTED
5a55e: 6002 bras 5a562 <rtems_rfs_mutex_lock.isra.6+0x50><== NOT EXECUTED
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: obtain failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
5a560: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
5a562: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5a566: 4e5e unlk %fp <== NOT EXECUTED
0004fd80 <rtems_rfs_mutex_unlock.isra.19>:
* @param mutex The mutex to unlock.
* @retval true The mutex is unlocked.
* @retval false The mutex could not be unlocked.
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
4fd80: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4fd84: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
4fd86: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4fd8a: 4eb9 0004 a67c jsr 4a67c <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4fd90: 588f addql #4,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
4fd92: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4fd94: 672e beqs 4fdc4 <rtems_rfs_mutex_unlock.isra.19+0x44><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
4fd96: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4fd9a: 42a7 clrl %sp@- <== NOT EXECUTED
4fd9c: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
4fda2: 508f addql #8,%sp <== NOT EXECUTED
4fda4: 4a00 tstb %d0 <== NOT EXECUTED
4fda6: 6720 beqs 4fdc8 <rtems_rfs_mutex_unlock.isra.19+0x48><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
4fda8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fdaa: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
4fdb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4fdb2: 4879 0006 c79b pea 6c79b <_CPU_m68k_BFFFO_table+0xc92> <== NOT EXECUTED
4fdb8: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
4fdbe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fdc2: 6004 bras 4fdc8 <rtems_rfs_mutex_unlock.isra.19+0x48><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
4fdc4: 4280 clrl %d0 <== NOT EXECUTED
4fdc6: 6002 bras 4fdca <rtems_rfs_mutex_unlock.isra.19+0x4a><== NOT EXECUTED
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
printf ("rtems-rfs: mutex: release failed: %s\n",
rtems_status_text (sc));
#endif
return EIO;
4fdc8: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
4fdca: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4fdce: 4e5e unlk %fp <== NOT EXECUTED
000562d4 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
562d4: 4e56 ffe4 linkw %fp,#-28
562d8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
562dc: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
562e0: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
562e4: 42a7 clrl %sp@-
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
562e6: 266e 000c moveal %fp@(12),%a3
562ea: 182e 0013 moveb %fp@(19),%d4
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
562ee: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
562f4: 508f addql #8,%sp
562f6: 4a00 tstb %d0
562f8: 6710 beqs 5630a <rtems_rfs_release_chain+0x36> <== ALWAYS TAKEN
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
562fa: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
562fc: 4879 0006 ce34 pea 6ce34 <CSWTCH.2+0xf4> <== NOT EXECUTED
56302: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
56308: 508f addql #8,%sp <== NOT EXECUTED
5630a: 260a movel %a2,%d3
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
5630c: 4282 clrl %d2
5630e: 5883 addql #4,%d3
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
56310: 49f9 0004 aff0 lea 4aff0 <_Chain_Get>,%a4
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
56316: 4bf9 0005 ad16 lea 5ad16 <rtems_rfs_buffer_bdbuf_release>,%a5
5631c: 0284 0000 00ff andil #255,%d4
56322: 6020 bras 56344 <rtems_rfs_release_chain+0x70>
56324: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56326: 4e94 jsr %a4@ <== NOT EXECUTED
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
56328: 5393 subql #1,%a3@ <== NOT EXECUTED
buffer->user = (void*) 0;
5632a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5632c: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
56330: 2f04 movel %d4,%sp@- <== NOT EXECUTED
56332: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56334: 4e95 jsr %a5@ <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
56336: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5633a: 4a80 tstl %d0 <== NOT EXECUTED
5633c: 6f06 bles 56344 <rtems_rfs_release_chain+0x70> <== NOT EXECUTED
5633e: 4a82 tstl %d2 <== NOT EXECUTED
56340: 6602 bnes 56344 <rtems_rfs_release_chain+0x70> <== NOT EXECUTED
56342: 2400 movel %d0,%d2 <== 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))
56344: b692 cmpl %a2@,%d3
56346: 66dc bnes 56324 <rtems_rfs_release_chain+0x50> <== NEVER TAKEN
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
56348: 2002 movel %d2,%d0
5634a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
56350: 4e5e unlk %fp <== NOT EXECUTED
0004f740 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
4f740: 4e56 ffc4 linkw %fp,#-60 <== NOT EXECUTED
4f744: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f748: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
4f74c: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f750: 2629 0008 movel %a1@(8),%d3 <== NOT EXECUTED
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);
4f754: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f758: 280e movel %fp,%d4 <== NOT EXECUTED
4f75a: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
4f760: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f762: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
4f766: 342e 000e movew %fp@(14),%d2 <== NOT EXECUTED
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);
4f76a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
4f76c: 3c2e 0012 movew %fp@(18),%d6 <== NOT EXECUTED
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);
4f770: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f776: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
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);
4f77a: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
4f77c: 6f0c bles 4f78a <rtems_rfs_rtems_chown+0x4a> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("chown: opening inode", rc);
4f77e: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f784: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f786: 2085 movel %d5,%a0@ <== NOT EXECUTED
4f788: 605a bras 4f7e4 <rtems_rfs_rtems_chown+0xa4> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
4f78a: 2006 movel %d6,%d0 <== NOT EXECUTED
4f78c: 4281 clrl %d1 <== NOT EXECUTED
4f78e: 7a18 moveq #24,%d5 <== NOT EXECUTED
4f790: 3202 movew %d2,%d1 <== NOT EXECUTED
4f792: 4840 swap %d0 <== NOT EXECUTED
4f794: 4240 clrw %d0 <== NOT EXECUTED
4f796: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f79a: 8081 orl %d1,%d0 <== NOT EXECUTED
4f79c: 2200 movel %d0,%d1 <== NOT EXECUTED
4f79e: eaa9 lsrl %d5,%d1 <== NOT EXECUTED
4f7a0: 1141 0004 moveb %d1,%a0@(4) <== NOT EXECUTED
4f7a4: 2200 movel %d0,%d1 <== NOT EXECUTED
4f7a6: e088 lsrl #8,%d0 <== NOT EXECUTED
4f7a8: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f7ac: 4241 clrw %d1 <== NOT EXECUTED
4f7ae: 4841 swap %d1 <== NOT EXECUTED
4f7b0: 1141 0005 moveb %d1,%a0@(5) <== NOT EXECUTED
4f7b4: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f7b8: 1140 0006 moveb %d0,%a0@(6) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f7bc: 7001 moveq #1,%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_uid_gid (rtems_rfs_inode_handle* handle,
uint16_t uid, uint16_t gid)
{
rtems_rfs_write_u32 (&handle->node->owner, (((uint32_t) gid) << 16) | uid);
4f7be: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f7c2: 1142 0007 moveb %d2,%a0@(7) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f7c6: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
4f7ca: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f7cc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f7ce: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
4f7d4: 508f addql #8,%sp <== NOT EXECUTED
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
4f7d6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f7d8: 670e beqs 4f7e8 <rtems_rfs_rtems_chown+0xa8> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
4f7da: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f7e0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f7e2: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f7e4: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f7e6: 6002 bras 4f7ea <rtems_rfs_rtems_chown+0xaa> <== NOT EXECUTED
}
return 0;
4f7e8: 4280 clrl %d0 <== NOT EXECUTED
}
4f7ea: 4cee 007c ffc4 moveml %fp@(-60),%d2-%d6 <== NOT EXECUTED
4f7f0: 4e5e unlk %fp <== NOT EXECUTED
00059c3e <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
59c3e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
59c42: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_close (iop, major, minor);
59c46: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
59c4a: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
59c4e: 2f08 movel %a0,%sp@- <== NOT EXECUTED
59c50: 4eb9 0005 a8f2 jsr 5a8f2 <rtems_deviceio_close> <== NOT EXECUTED
}
59c56: 4e5e unlk %fp <== NOT EXECUTED
00059bc8 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
return 0;
}
59bc8: 4280 clrl %d0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
59bca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
59bce: 4e5e unlk %fp <== NOT EXECUTED
00059bd2 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
ioctl_command_t command,
void* buffer)
{
59bd2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
59bd6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_control (iop, command, buffer, major, minor);
59bda: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
59bde: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
59be2: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
59be6: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
59bea: 2f08 movel %a0,%sp@- <== NOT EXECUTED
59bec: 4eb9 0005 aa1a jsr 5aa1a <rtems_deviceio_control> <== NOT EXECUTED
}
59bf2: 4e5e unlk %fp <== NOT EXECUTED
00059cf2 <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
59cf2: 4e56 ffc0 linkw %fp,#-64 <== NOT EXECUTED
59cf6: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
59cfa: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
59cfe: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
59d02: 262b 0018 movel %a3@(24),%d3 <== NOT EXECUTED
rtems_rfs_rtems_device_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);
59d06: 2468 0008 moveal %a0@(8),%a2 <== 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);
59d0a: 42a7 clrl %sp@- <== NOT EXECUTED
59d0c: 42a7 clrl %sp@- <== 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
};
59d0e: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
59d12: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
59d14: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59d1a: 4fef 000c lea %sp@(12),%sp <== 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);
59d1e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59d20: 672c beqs 59d4e <rtems_rfs_rtems_device_open+0x5c><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
59d22: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
59d26: 42a7 clrl %sp@- <== NOT EXECUTED
59d28: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59d2e: 508f addql #8,%sp <== NOT EXECUTED
59d30: 4a00 tstb %d0 <== NOT EXECUTED
59d32: 671a beqs 59d4e <rtems_rfs_rtems_device_open+0x5c><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
59d34: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d36: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
59d3c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59d3e: 4879 0006 c7c1 pea 6c7c1 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
59d44: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59d4a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_device_minor_number minor;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59d4e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59d52: 280e movel %fp,%d4 <== NOT EXECUTED
59d54: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
59d5a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59d5c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59d5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59d60: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
59d66: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_device_minor_number minor;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59d6a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59d6c: 6f12 bles 59d80 <rtems_rfs_rtems_device_open+0x8e><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
59d6e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59d70: 4eba ff22 jsr %pc@(59c94 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
59d74: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
59d7a: 2040 moveal %d0,%a0 <== NOT EXECUTED
59d7c: 2082 movel %d2,%a0@ <== NOT EXECUTED
59d7e: 6040 bras 59dc0 <rtems_rfs_rtems_device_open+0xce><== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
59d80: 242e ffe6 movel %fp@(-26),%d2 <== NOT EXECUTED
59d84: 49fa fed4 lea %pc@(59c5a <rtems_rfs_inode_get_block.isra.0>),%a4<== NOT EXECUTED
59d88: 42a7 clrl %sp@- <== NOT EXECUTED
59d8a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d8c: 4e94 jsr %a4@ <== NOT EXECUTED
59d8e: 508f addql #8,%sp <== NOT EXECUTED
59d90: 2600 movel %d0,%d3 <== NOT EXECUTED
minor = rtems_rfs_inode_get_block (&inode, 1);
59d92: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59d96: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d98: 4e94 jsr %a4@ <== NOT EXECUTED
59d9a: 508f addql #8,%sp <== NOT EXECUTED
59d9c: 2400 movel %d0,%d2 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
59d9e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59da0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59da2: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
59da8: 508f addql #8,%sp <== NOT EXECUTED
59daa: 41fa fee8 lea %pc@(59c94 <rtems_rfs_rtems_unlock>),%a0<== 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);
59dae: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
59db0: 6f14 bles 59dc6 <rtems_rfs_rtems_device_open+0xd4><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
59db2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59db4: 4e90 jsr %a0@ <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
59db6: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
59dbc: 2040 moveal %d0,%a0 <== NOT EXECUTED
59dbe: 2084 movel %d4,%a0@ <== NOT EXECUTED
59dc0: 588f addql #4,%sp <== NOT EXECUTED
59dc2: 70ff moveq #-1,%d0 <== NOT EXECUTED
59dc4: 6028 bras 59dee <rtems_rfs_rtems_device_open+0xfc><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
59dc6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59dc8: 4e90 jsr %a0@ <== NOT EXECUTED
iop->data0 = major;
59dca: 2743 0028 movel %d3,%a3@(40) <== NOT EXECUTED
iop->data1 = (void *) minor;
59dce: 2742 002c movel %d2,%a3@(44) <== NOT EXECUTED
return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major);
59dd2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59dd4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59dd6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
59dda: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
59dde: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
59de2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
59de4: 4eb9 0005 a8bc jsr 5a8bc <rtems_deviceio_open> <== NOT EXECUTED
59dea: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
}
59dee: 4cee 1c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a4 <== NOT EXECUTED
59df4: 4e5e unlk %fp <== NOT EXECUTED
00059c1a <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)
{
59c1a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
59c1e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_read (iop, buffer, count, major, minor);
59c22: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
59c26: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
59c2a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
59c2e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
59c32: 2f08 movel %a0,%sp@- <== NOT EXECUTED
59c34: 4eb9 0005 a922 jsr 5a922 <rtems_deviceio_read> <== NOT EXECUTED
}
59c3a: 4e5e unlk %fp <== NOT EXECUTED
00059bf6 <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
59bf6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
59bfa: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_device_major_number major;
rtems_device_minor_number minor;
rtems_rfs_rtems_device_get_major_and_minor (iop, &major, &minor);
return rtems_deviceio_write (iop, buffer, count, major, minor);
59bfe: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
59c02: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
59c06: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
59c0a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
59c0e: 2f08 movel %a0,%sp@- <== NOT EXECUTED
59c10: 4eb9 0005 a99e jsr 5a99e <rtems_deviceio_write> <== NOT EXECUTED
}
59c16: 4e5e unlk %fp <== NOT EXECUTED
00059df8 <rtems_rfs_rtems_dir_close>:
{
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
59df8: 4280 clrl %d0 <== NOT EXECUTED
* @param iop
* @retval 0 Always no error.
*/
static int
rtems_rfs_rtems_dir_close (rtems_libio_t* iop)
{
59dfa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
59dfe: 4e5e unlk %fp <== NOT EXECUTED
00059faa <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
59faa: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED
59fae: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
59fb2: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59fb6: 240e movel %fp,%d2 <== NOT EXECUTED
59fb8: 0682 ffff ffda addil #-38,%d2 <== NOT EXECUTED
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);
59fbe: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
59fc2: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
59fc6: 262b 0018 movel %a3@(24),%d3 <== NOT EXECUTED
.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
};
59fca: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
59fce: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
59fd0: 4eba fe30 jsr %pc@(59e02 <rtems_rfs_mutex_lock.isra.1>)<== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59fd4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59fd8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59fda: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59fdc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59fde: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59fe4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59fe8: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
59fea: 6714 beqs 5a000 <rtems_rfs_rtems_dir_open+0x56> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
59fec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59fee: 4eba fe6a jsr %pc@(59e5a <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
59ff2: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
59ff8: 588f addql #4,%sp <== NOT EXECUTED
59ffa: 2040 moveal %d0,%a0 <== NOT EXECUTED
59ffc: 2083 movel %d3,%a0@ <== NOT EXECUTED
59ffe: 603a bras 5a03a <rtems_rfs_rtems_dir_open+0x90> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
5a000: 206e ffe6 moveal %fp@(-26),%a0 <== 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);
5a004: 4280 clrl %d0 <== NOT EXECUTED
5a006: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
5a00a: e188 lsll #8,%d0 <== NOT EXECUTED
5a00c: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5a012: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
5a018: 6724 beqs 5a03e <rtems_rfs_rtems_dir_open+0x94> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
5a01a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a01c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a01e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a024: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a026: 4eba fe32 jsr %pc@(59e5a <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
5a02a: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a030: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a034: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a036: 7014 moveq #20,%d0 <== NOT EXECUTED
5a038: 2080 movel %d0,%a0@ <== NOT EXECUTED
5a03a: 70ff moveq #-1,%d0 <== NOT EXECUTED
5a03c: 6022 bras 5a060 <rtems_rfs_rtems_dir_open+0xb6> <== NOT EXECUTED
}
iop->offset = 0;
5a03e: 4280 clrl %d0 <== NOT EXECUTED
5a040: 4281 clrl %d1 <== NOT EXECUTED
5a042: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
5a046: 2741 0008 movel %d1,%a3@(8) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5a04a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a04c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a04e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a054: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a056: 4eba fe02 jsr %pc@(59e5a <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
5a05a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return 0;
5a05e: 4280 clrl %d0 <== NOT EXECUTED
}
5a060: 4cee 0c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a3 <== NOT EXECUTED
5a066: 4e5e unlk %fp <== NOT EXECUTED
...
00059eb8 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
59eb8: 4e56 ffac linkw %fp,#-84 <== NOT EXECUTED
59ebc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
59ec0: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59ec4: 49ee ffda lea %fp@(-38),%a4 <== NOT EXECUTED
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);
59ec8: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
59ecc: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
59ed0: 282b 0018 movel %a3@(24),%d4 <== NOT EXECUTED
.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
};
59ed4: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_mutex_lock (&rtems->access);
59ed8: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
59eda: 2c2e 0010 movel %fp@(16),%d6 <== NOT EXECUTED
59ede: 4eba ff22 jsr %pc@(59e02 <rtems_rfs_mutex_lock.isra.1>)<== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59ee2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59ee6: 2f0c movel %a4,%sp@- <== NOT EXECUTED
59ee8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59eea: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59eec: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59ef2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
count = count / sizeof (struct dirent);
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
59ef6: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc)
59ef8: 6768 beqs 59f62 <rtems_rfs_rtems_dir_read+0xaa> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
59efa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59efc: 4eba ff5c jsr %pc@(59e5a <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
59f00: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
59f06: 588f addql #4,%sp <== NOT EXECUTED
59f08: 2040 moveal %d0,%a0 <== NOT EXECUTED
59f0a: 2084 movel %d4,%a0@ <== NOT EXECUTED
59f0c: 78ff moveq #-1,%d4 <== NOT EXECUTED
59f0e: 6000 008e braw 59f9e <rtems_rfs_rtems_dir_read+0xe6> <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
59f12: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59f14: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59f16: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
59f1a: 2f2b 0004 movel %a3@(4),%sp@- <== NOT EXECUTED
59f1e: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59f22: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59f24: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc == ENOENT)
59f26: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
59f2a: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (rc == ENOENT)
59f2c: 7002 moveq #2,%d0 <== NOT EXECUTED
59f2e: b08c cmpl %a4,%d0 <== NOT EXECUTED
59f30: 6756 beqs 59f88 <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
{
rc = 0;
break;
}
if (rc > 0)
59f32: 4a8c tstl %a4 <== NOT EXECUTED
59f34: 6f0e bles 59f44 <rtems_rfs_rtems_dir_read+0x8c> <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
59f36: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
59f3c: 78ff moveq #-1,%d4 <== NOT EXECUTED
59f3e: 2040 moveal %d0,%a0 <== NOT EXECUTED
59f40: 208c movel %a4,%a0@ <== NOT EXECUTED
59f42: 6044 bras 59f88 <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
break;
}
iop->offset += size;
59f44: 262e ffd6 movel %fp@(-42),%d3 <== NOT EXECUTED
59f48: 4282 clrl %d2 <== NOT EXECUTED
* 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,
59f4a: 0684 0000 0110 addil #272,%d4 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
59f50: 5285 addql #1,%d5 <== NOT EXECUTED
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
59f52: d7ab 0008 addl %d3,%a3@(8) <== NOT EXECUTED
59f56: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED
59f5a: d182 addxl %d2,%d0 <== NOT EXECUTED
59f5c: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
59f60: 601c bras 59f7e <rtems_rfs_rtems_dir_read+0xc6> <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
59f62: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
59f68: 2e0e movel %fp,%d7 <== NOT EXECUTED
* 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,
59f6a: 4285 clrl %d5 <== NOT EXECUTED
59f6c: 4284 clrl %d4 <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
59f6e: 0687 ffff ffd6 addil #-42,%d7 <== NOT EXECUTED
59f74: 4bf9 0005 76f4 lea 576f4 <rtems_rfs_dir_read>,%a5 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
59f7a: 4c41 6006 remul %d1,%d6,%d6 <== NOT EXECUTED
* 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,
59f7e: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
59f82: d084 addl %d4,%d0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
59f84: bc85 cmpl %d5,%d6 <== NOT EXECUTED
59f86: 668a bnes 59f12 <rtems_rfs_rtems_dir_read+0x5a> <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
59f88: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59f8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59f8e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
59f94: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59f96: 4eba fec2 jsr %pc@(59e5a <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
59f9a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return bytes_transferred;
}
59f9e: 2004 movel %d4,%d0 <== NOT EXECUTED
59fa0: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 <== NOT EXECUTED
59fa6: 4e5e unlk %fp <== NOT EXECUTED
0004fa1c <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)
{
4fa1c: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED
4fa20: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
4fa24: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (currentloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4fa28: 240e movel %fp,%d2 <== NOT EXECUTED
4fa2a: 0682 ffff ffda addil #-38,%d2 <== NOT EXECUTED
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);
4fa30: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
4fa34: 2628 0008 movel %a0@(8),%d3 <== NOT EXECUTED
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);
4fa38: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fa3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fa3e: 2f2a 0020 movel %a2@(32),%sp@- <== NOT EXECUTED
4fa42: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fa44: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc == 0) {
4fa4a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (currentloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (currentloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4fa4e: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc == 0) {
4fa50: 662e bnes 4fa80 <rtems_rfs_rtems_eval_path+0x64> <== NOT EXECUTED
rtems_filesystem_eval_path_generic (
4fa52: 4879 0006 c89c pea 6c89c <rtems_rfs_rtems_eval_config> <== NOT EXECUTED
4fa58: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fa5a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fa5c: 4eb9 0005 35a8 jsr 535a8 <rtems_filesystem_eval_path_generic><== NOT EXECUTED
ctx,
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
4fa62: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fa64: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fa66: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc != 0) {
4fa6c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rtems_filesystem_eval_path_generic (
ctx,
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
4fa70: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != 0) {
4fa72: 6724 beqs 4fa98 <rtems_rfs_rtems_eval_path+0x7c> <== NOT EXECUTED
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
4fa74: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4fa7a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fa7c: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fa7e: 600a bras 4fa8a <rtems_rfs_rtems_eval_path+0x6e> <== NOT EXECUTED
);
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
4fa80: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4fa86: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fa88: 2084 movel %d4,%a0@ <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
);
}
} else {
rtems_filesystem_eval_path_error (
4fa8a: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4fa8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fa90: 4eb9 0004 7806 jsr 47806 <rtems_filesystem_eval_path_error><== NOT EXECUTED
4fa96: 508f addql #8,%sp <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
);
}
}
4fa98: 4cee 041c ffc8 moveml %fp@(-56),%d2-%d4/%a2 <== NOT EXECUTED
4fa9e: 4e5e unlk %fp <== NOT EXECUTED
00050000 <rtems_rfs_rtems_eval_token>:
* @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;
50000: 4280 clrl %d0 <== NOT EXECUTED
50002: 7218 moveq #24,%d1 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
50004: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
50008: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
5000c: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
50010: 4282 clrl %d2 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
50012: 206b 000c moveal %a3@(12),%a0 <== NOT EXECUTED
50016: 1028 0004 moveb %a0@(4),%d0 <== NOT EXECUTED
5001a: 1428 0007 moveb %a0@(7),%d2 <== NOT EXECUTED
5001e: e3a8 lsll %d1,%d0 <== NOT EXECUTED
50020: 4281 clrl %d1 <== NOT EXECUTED
50022: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED
50026: 4841 swap %d1 <== NOT EXECUTED
50028: 4241 clrw %d1 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
5002a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
5002e: 8081 orl %d1,%d0 <== NOT EXECUTED
50030: 4281 clrl %d1 <== NOT EXECUTED
50032: 1228 0006 moveb %a0@(6),%d1 <== NOT EXECUTED
50036: 4240 clrw %d0 <== NOT EXECUTED
50038: 4840 swap %d0 <== NOT EXECUTED
5003a: e189 lsll #8,%d1 <== NOT EXECUTED
5003c: 286e 0010 moveal %fp@(16),%a4 <== NOT EXECUTED
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(
50040: 2f00 movel %d0,%sp@- <== 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);
50042: 4280 clrl %d0 <== NOT EXECUTED
50044: 8282 orl %d2,%d1 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
50046: 262e 0014 movel %fp@(20),%d3 <== NOT EXECUTED
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(
5004a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5004c: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
50050: 4281 clrl %d1 <== NOT EXECUTED
50052: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
50056: e188 lsll #8,%d0 <== NOT EXECUTED
50058: 8081 orl %d1,%d0 <== NOT EXECUTED
5005a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5005c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
50060: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50062: 4eb9 0005 3562 jsr 53562 <rtems_filesystem_eval_path_check_access><== NOT EXECUTED
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) {
50068: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5006c: 4a00 tstb %d0 <== NOT EXECUTED
5006e: 676e beqs 500de <rtems_rfs_rtems_eval_token+0xde><== NOT EXECUTED
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
50070: 7801 moveq #1,%d4 <== NOT EXECUTED
50072: b883 cmpl %d3,%d4 <== NOT EXECUTED
50074: 6610 bnes 50086 <rtems_rfs_rtems_eval_token+0x86><== NOT EXECUTED
50076: 722e moveq #46,%d1 <== NOT EXECUTED
50078: 1014 moveb %a4@,%d0 <== NOT EXECUTED
5007a: b380 eorl %d1,%d0 <== NOT EXECUTED
5007c: 4a00 tstb %d0 <== NOT EXECUTED
5007e: 57c0 seq %d0 <== NOT EXECUTED
50080: 49c0 extbl %d0 <== NOT EXECUTED
50082: 4480 negl %d0 <== NOT EXECUTED
50084: 6002 bras 50088 <rtems_rfs_rtems_eval_token+0x88><== NOT EXECUTED
50086: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_filesystem_is_current_directory (token, tokenlen)) {
50088: 0800 0000 btst #0,%d0 <== NOT EXECUTED
5008c: 6706 beqs 50094 <rtems_rfs_rtems_eval_token+0x94><== NOT EXECUTED
static inline void rtems_filesystem_eval_path_clear_token(
rtems_filesystem_eval_path_context_t *ctx
)
{
ctx->tokenlen = 0;
5008e: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
50092: 604a bras 500de <rtems_rfs_rtems_eval_token+0xde><== NOT EXECUTED
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);
50094: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
50098: 2428 0008 movel %a0@(8),%d2 <== NOT EXECUTED
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
5009c: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
500a0: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
500a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
500a6: 2f0c movel %a4,%sp@- <== NOT EXECUTED
500a8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
500aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
500ac: 4eb9 0005 6c02 jsr 56c02 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
tokenlen,
&entry_ino,
&entry_doff
);
if (rc == 0) {
500b2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
500b6: 4a80 tstl %d0 <== NOT EXECUTED
500b8: 6600 0104 bnew 501be <rtems_rfs_rtems_eval_token+0x1be><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, inode);
500bc: 2f0b movel %a3,%sp@- <== NOT EXECUTED
500be: 2f02 movel %d2,%sp@- <== NOT EXECUTED
500c0: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc == 0) {
500c6: 508f addql #8,%sp <== NOT EXECUTED
500c8: 4a80 tstl %d0 <== NOT EXECUTED
500ca: 6718 beqs 500e4 <rtems_rfs_rtems_eval_token+0xe4><== NOT EXECUTED
if (rc != 0) {
/*
* This prevents the rtems_rfs_inode_close() from doing something in
* rtems_rfs_rtems_eval_path().
*/
memset (inode, 0, sizeof(*inode));
500cc: 4878 0026 pea 26 <OPER2+0x12> <== NOT EXECUTED
500d0: 42a7 clrl %sp@- <== NOT EXECUTED
500d2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
500d4: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
500da: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
500de: 7001 moveq #1,%d0 <== NOT EXECUTED
500e0: 6000 0102 braw 501e4 <rtems_rfs_rtems_eval_token+0x1e4><== 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);
500e4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
500e8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
500ea: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
500ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED
500f0: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
}
if (rc != 0) {
500f6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
500fa: 4a80 tstl %d0 <== NOT EXECUTED
500fc: 6700 009c beqw 5019a <rtems_rfs_rtems_eval_token+0x19a><== NOT EXECUTED
50100: 60ca bras 500cc <rtems_rfs_rtems_eval_token+0xcc><== NOT EXECUTED
bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0;
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
50102: 4a81 tstl %d1 <== NOT EXECUTED
50104: 6604 bnes 5010a <rtems_rfs_rtems_eval_token+0x10a><== NOT EXECUTED
50106: 4a03 tstb %d3 <== NOT EXECUTED
50108: 667c bnes 50186 <rtems_rfs_rtems_eval_token+0x186><== NOT EXECUTED
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
char *link = malloc(len + 1);
5010a: 4878 0401 pea 401 <DBL_MAX_EXP> <== NOT EXECUTED
rtems_filesystem_eval_path_context_t* ctx,
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
5010e: 283c 0000 0400 movel #1024,%d4 <== NOT EXECUTED
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);
50114: 262e fff4 movel %fp@(-12),%d3 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t* ctx,
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
50118: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
char *link = malloc(len + 1);
5011c: 4eb9 0004 6910 jsr 46910 <malloc> <== NOT EXECUTED
if (link != NULL) {
50122: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
char *link = malloc(len + 1);
50124: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (link != NULL) {
50126: 4a80 tstl %d0 <== NOT EXECUTED
50128: 674a beqs 50174 <rtems_rfs_rtems_eval_token+0x174><== NOT EXECUTED
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
5012a: 486e fffc pea %fp@(-4) <== NOT EXECUTED
5012e: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED
50132: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50134: 2f03 movel %d3,%sp@- <== NOT EXECUTED
50136: 2f02 movel %d2,%sp@- <== NOT EXECUTED
50138: 4eb9 0005 9938 jsr 59938 <rtems_rfs_symlink_read> <== NOT EXECUTED
if (rc == 0) {
5013e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50142: 4a80 tstl %d0 <== NOT EXECUTED
50144: 6614 bnes 5015a <rtems_rfs_rtems_eval_token+0x15a><== NOT EXECUTED
rtems_filesystem_eval_path_recursive (ctx, link, len);
50146: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
5014a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5014c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5014e: 4eb9 0004 7c46 jsr 47c46 <rtems_filesystem_eval_path_recursive><== NOT EXECUTED
50154: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
50158: 600c bras 50166 <rtems_rfs_rtems_eval_token+0x166><== NOT EXECUTED
} else {
rtems_filesystem_eval_path_error (ctx, 0);
5015a: 42a7 clrl %sp@- <== NOT EXECUTED
5015c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5015e: 4eb9 0004 7806 jsr 47806 <rtems_filesystem_eval_path_error><== NOT EXECUTED
50164: 508f addql #8,%sp <== NOT EXECUTED
}
free(link);
50166: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50168: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
5016e: 588f addql #4,%sp <== NOT EXECUTED
50170: 6000 ff6c braw 500de <rtems_rfs_rtems_eval_token+0xde><== NOT EXECUTED
} else {
rtems_filesystem_eval_path_error (ctx, ENOMEM);
50174: 4878 000c pea c <OPER1> <== NOT EXECUTED
50178: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5017a: 4eb9 0004 7806 jsr 47806 <rtems_filesystem_eval_path_error><== NOT EXECUTED
50180: 508f addql #8,%sp <== NOT EXECUTED
50182: 6000 ff5a braw 500de <rtems_rfs_rtems_eval_token+0xde><== NOT EXECUTED
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
} else {
rc = rtems_rfs_rtems_set_handlers (currentloc, inode) ? 0 : EIO;
50186: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50188: 486a 0018 pea %a2@(24) <== NOT EXECUTED
5018c: 4eb9 0005 0250 jsr 50250 <rtems_rfs_rtems_set_handlers> <== NOT EXECUTED
50192: 508f addql #8,%sp <== NOT EXECUTED
50194: 4a00 tstb %d0 <== NOT EXECUTED
50196: 663c bnes 501d4 <rtems_rfs_rtems_eval_token+0x1d4><== NOT EXECUTED
50198: 6028 bras 501c2 <rtems_rfs_rtems_eval_token+0x1c2><== NOT EXECUTED
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
rc = -1;
}
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (inode)
5019a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0;
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
5019c: 7803 moveq #3,%d4 <== NOT EXECUTED
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
rc = -1;
}
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (inode)
5019e: 4eba f20e jsr %pc@(4f3ae <rtems_rfs_rtems_node_type_by_inode>)<== NOT EXECUTED
== 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);
501a2: 4aaa 0004 tstl %a2@(4) <== NOT EXECUTED
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (inode)
== RTEMS_FILESYSTEM_SYM_LINK;
int eval_flags = rtems_filesystem_eval_path_get_flags (ctx);
bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0;
501a6: 7210 moveq #16,%d1 <== NOT EXECUTED
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
501a8: 57c3 seq %d3 <== NOT EXECUTED
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
rc = -1;
}
if (rc == 0) {
bool is_sym_link = rtems_rfs_rtems_node_type_by_inode (inode)
501aa: 588f addql #4,%sp <== NOT EXECUTED
== 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;
501ac: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
501b0: 4483 negl %d3 <== NOT EXECUTED
501b2: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
501b6: b880 cmpl %d0,%d4 <== NOT EXECUTED
501b8: 66cc bnes 50186 <rtems_rfs_rtems_eval_token+0x186><== NOT EXECUTED
501ba: 6000 ff46 braw 50102 <rtems_rfs_rtems_eval_token+0x102><== NOT EXECUTED
* rtems_rfs_rtems_eval_path().
*/
memset (inode, 0, sizeof(*inode));
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
501be: 7002 moveq #2,%d0 <== NOT EXECUTED
501c0: 6022 bras 501e4 <rtems_rfs_rtems_eval_token+0x1e4><== NOT EXECUTED
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: set handlers", rc)
501c2: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
501c8: 7605 moveq #5,%d3 <== NOT EXECUTED
501ca: 2040 moveal %d0,%a0 <== NOT EXECUTED
501cc: 2083 movel %d3,%a0@ <== NOT EXECUTED
if (!terminal) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
501ce: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
501d2: 60a4 bras 50178 <rtems_rfs_rtems_eval_token+0x178><== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
501d4: 4280 clrl %d0 <== NOT EXECUTED
501d6: 1003 moveb %d3,%d0 <== NOT EXECUTED
if (is_sym_link && (follow_sym_link || !terminal)) {
rtems_rfs_rtems_follow_link (ctx, fs, entry_ino);
} else {
rc = rtems_rfs_rtems_set_handlers (currentloc, inode) ? 0 : EIO;
if (rc == 0) {
rtems_rfs_rtems_set_pathloc_ino (currentloc, entry_ino);
501d8: 256e fff4 0020 movel %fp@(-12),%a2@(32) <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (currentloc, entry_doff);
501de: 256e fff8 0024 movel %fp@(-8),%a2@(36) <== NOT EXECUTED
}
}
}
return status;
}
501e4: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 <== NOT EXECUTED
501ea: 4e5e unlk %fp <== NOT EXECUTED
0004f7f4 <rtems_rfs_rtems_fchmod>:
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
4f7f4: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
4f7f8: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f7fc: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
4f800: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f804: 2429 0008 movel %a1@(8),%d2 <== 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);
4f808: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f80c: 260e movel %fp,%d3 <== NOT EXECUTED
4f80e: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4f814: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f816: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f81a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f81c: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
4f822: 4fef 0010 lea %sp@(16),%sp <== 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);
4f826: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc)
4f828: 670c beqs 4f836 <rtems_rfs_rtems_fchmod+0x42> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
4f82a: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f830: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f832: 2084 movel %d4,%a0@ <== NOT EXECUTED
4f834: 604e bras 4f884 <rtems_rfs_rtems_fchmod+0x90> <== NOT EXECUTED
}
imode = rtems_rfs_inode_get_mode (&inode);
4f836: 206e ffe6 moveal %fp@(-26),%a0 <== 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);
4f83a: 4280 clrl %d0 <== NOT EXECUTED
4f83c: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4f840: 222e 000c movel %fp@(12),%d1 <== NOT EXECUTED
4f844: e188 lsll #8,%d0 <== NOT EXECUTED
4f846: 0281 0000 0fff andil #4095,%d1 <== 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);
4f84c: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4f852: 8081 orl %d1,%d0 <== 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);
4f854: 2200 movel %d0,%d1 <== NOT EXECUTED
4f856: e089 lsrl #8,%d1 <== NOT EXECUTED
4f858: 1141 0002 moveb %d1,%a0@(2) <== NOT EXECUTED
4f85c: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f860: 1140 0003 moveb %d0,%a0@(3) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f864: 7001 moveq #1,%d0 <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
4f866: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f868: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED
4f86c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f86e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4f874: 508f addql #8,%sp <== NOT EXECUTED
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
4f876: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4f878: 6f0e bles 4f888 <rtems_rfs_rtems_fchmod+0x94> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
4f87a: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f880: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f882: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f884: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f886: 6002 bras 4f88a <rtems_rfs_rtems_fchmod+0x96> <== NOT EXECUTED
}
return 0;
4f888: 4280 clrl %d0 <== NOT EXECUTED
}
4f88a: 4cee 001c ffcc moveml %fp@(-52),%d2-%d4 <== NOT EXECUTED
4f890: 4e5e unlk %fp <== NOT EXECUTED
00050218 <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
50218: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
5021c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
50220: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
50224: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
50226: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
5022a: 4eb9 0005 692a jsr 5692a <rtems_rfs_buffer_sync> <== NOT EXECUTED
if (rc)
50230: 588f addql #4,%sp <== 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));
50232: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
50234: 670e beqs 50244 <rtems_rfs_rtems_fdatasync+0x2c> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
50236: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5023c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5023e: 70ff moveq #-1,%d0 <== NOT EXECUTED
50240: 2082 movel %d2,%a0@ <== NOT EXECUTED
50242: 6002 bras 50246 <rtems_rfs_rtems_fdatasync+0x2e> <== NOT EXECUTED
return 0;
50244: 4280 clrl %d0 <== NOT EXECUTED
}
50246: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5024a: 4e5e unlk %fp <== NOT EXECUTED
...
0005a220 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
5a220: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a224: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
5a228: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a22c: 2668 001c moveal %a0@(28),%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
5a230: 206b 001a moveal %a3@(26),%a0 <== NOT EXECUTED
5a234: 2468 0090 moveal %a0@(144),%a2 <== NOT EXECUTED
.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
};
5a238: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
5a23c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a23e: 4eba fe2c jsr %pc@(5a06c <rtems_rfs_mutex_lock.isra.0>)<== 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);
5a242: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5a244: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a246: 4eb9 0005 7c20 jsr 57c20 <rtems_rfs_file_close> <== NOT EXECUTED
if (rc > 0)
5a24c: 4fef 000c lea %sp@(12),%sp <== 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);
5a250: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a252: 6f0c bles 5a260 <rtems_rfs_rtems_file_close+0x40><== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
5a254: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a25a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a25c: 2082 movel %d2,%a0@ <== NOT EXECUTED
5a25e: 74ff moveq #-1,%d2 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a260: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a262: 4eba fe60 jsr %pc@(5a0c4 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rc;
}
5a266: 2002 movel %d2,%d0 <== NOT EXECUTED
5a268: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
5a26e: 4e5e unlk %fp <== NOT EXECUTED
0005a2da <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
5a2da: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a2de: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
5a2e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a2e4: 2468 001c moveal %a0@(28),%a2 <== NOT EXECUTED
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));
5a2e8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
.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
};
5a2ec: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5a2f0: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
5a2f4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a2f6: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a2f8: 4eba fd72 jsr %pc@(5a06c <rtems_rfs_mutex_lock.isra.0>)<== 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);
5a2fc: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5a300: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5a304: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a306: 4eb9 0005 8336 jsr 58336 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
5a30c: 4fef 0010 lea %sp@(16),%sp <== 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);
5a310: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5a312: 670c beqs 5a320 <rtems_rfs_rtems_file_ftruncate+0x46><== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
5a314: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a31a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a31c: 2082 movel %d2,%a0@ <== NOT EXECUTED
5a31e: 74ff moveq #-1,%d2 <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5a320: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5a324: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a328: 4eba fd9a jsr %pc@(5a0c4 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rc;
}
5a32c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
5a330: 2002 movel %d2,%d0 <== NOT EXECUTED
5a332: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5a336: 4e5e unlk %fp <== NOT EXECUTED
0005a33a <rtems_rfs_rtems_file_lseek>:
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
5a33a: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
5a33e: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ <== NOT EXECUTED
5a342: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a346: 266a 001c moveal %a2@(28),%a3 <== NOT EXECUTED
off_t new_offset;
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_LSEEK))
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
5a34a: 206b 001a moveal %a3@(26),%a0 <== NOT EXECUTED
.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
};
5a34e: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5a352: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
5a356: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a358: 4eba fd12 jsr %pc@(5a06c <rtems_rfs_mutex_lock.isra.0>)<== 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));
old_offset = iop->offset;
5a35c: 282a 0004 movel %a2@(4),%d4 <== NOT EXECUTED
5a360: 2a2a 0008 movel %a2@(8),%d5 <== NOT EXECUTED
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
5a364: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5a368: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5a36c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5a370: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a372: 4eb9 0005 a604 jsr 5a604 <rtems_filesystem_default_lseek_file><== NOT EXECUTED
if (new_offset != -1)
5a378: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
printf("rtems-rfs: file-lseek: handle:%p offset:%" PRIdoff_t "\n", file, offset);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
old_offset = iop->offset;
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
5a37c: 2400 movel %d0,%d2 <== NOT EXECUTED
5a37e: 2601 movel %d1,%d3 <== NOT EXECUTED
if (new_offset != -1)
5a380: 70ff moveq #-1,%d0 <== NOT EXECUTED
5a382: 72ff moveq #-1,%d1 <== NOT EXECUTED
5a384: 9283 subl %d3,%d1 <== NOT EXECUTED
5a386: 9182 subxl %d2,%d0 <== NOT EXECUTED
5a388: 673a beqs 5a3c4 <rtems_rfs_rtems_file_lseek+0x8a><== NOT EXECUTED
{
rtems_rfs_pos pos = iop->offset;
5a38a: 204e moveal %fp,%a0 <== NOT EXECUTED
5a38c: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
5a390: 222a 0008 movel %a2@(8),%d1 <== NOT EXECUTED
5a394: 2101 movel %d1,%a0@- <== NOT EXECUTED
5a396: 2100 movel %d0,%a0@- <== NOT EXECUTED
int rc = rtems_rfs_file_seek (file, pos, &pos);
5a398: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a39a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5a39c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a39e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5a3a0: 4eb9 0005 8258 jsr 58258 <rtems_rfs_file_seek> <== NOT EXECUTED
if (rc)
5a3a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
old_offset = iop->offset;
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
if (new_offset != -1)
{
rtems_rfs_pos pos = iop->offset;
int rc = rtems_rfs_file_seek (file, pos, &pos);
5a3aa: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc)
5a3ac: 6716 beqs 5a3c4 <rtems_rfs_rtems_file_lseek+0x8a><== NOT EXECUTED
{
rtems_rfs_rtems_error ("file_lseek: lseek", rc);
5a3ae: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a3b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a3b6: 2086 movel %d6,%a0@ <== NOT EXECUTED
iop->offset = old_offset;
5a3b8: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
5a3bc: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED
new_offset = -1;
5a3c0: 74ff moveq #-1,%d2 <== NOT EXECUTED
5a3c2: 76ff moveq #-1,%d3 <== NOT EXECUTED
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5a3c4: 206b 001a moveal %a3@(26),%a0 <== NOT EXECUTED
5a3c8: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a3cc: 4eba fcf6 jsr %pc@(5a0c4 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return new_offset;
}
5a3d0: 2002 movel %d2,%d0 <== NOT EXECUTED
5a3d2: 2203 movel %d3,%d1 <== NOT EXECUTED
5a3d4: 4cee 0c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a3 <== NOT EXECUTED
5a3da: 4e5e unlk %fp <== NOT EXECUTED
0005a272 <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
5a272: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
5a276: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
5a27a: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
5a27e: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
5a282: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
.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
};
5a286: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
5a28a: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a28c: 4eba fdde jsr %pc@(5a06c <rtems_rfs_mutex_lock.isra.0>)<== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
5a290: 486e fffc pea %fp@(-4) <== NOT EXECUTED
5a294: 42a7 clrl %sp@- <== NOT EXECUTED
5a296: 2f2b 0018 movel %a3@(24),%sp@- <== NOT EXECUTED
5a29a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a29c: 4eb9 0005 8628 jsr 58628 <rtems_rfs_file_open> <== NOT EXECUTED
if (rc > 0)
5a2a2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5a2a6: 41fa fe1c lea %pc@(5a0c4 <rtems_rfs_rtems_unlock>),%a0<== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
ino = rtems_rfs_rtems_get_iop_ino (iop);
rc = rtems_rfs_file_open (fs, ino, flags, &file);
5a2aa: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a2ac: 6f14 bles 5a2c2 <rtems_rfs_rtems_file_open+0x50> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
5a2ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a2b0: 4e90 jsr %a0@ <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-open: open", rc);
5a2b2: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a2b8: 588f addql #4,%sp <== NOT EXECUTED
5a2ba: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a2bc: 70ff moveq #-1,%d0 <== NOT EXECUTED
5a2be: 2082 movel %d2,%a0@ <== NOT EXECUTED
5a2c0: 600e bras 5a2d0 <rtems_rfs_rtems_file_open+0x5e> <== NOT EXECUTED
}
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FILE_OPEN))
printf("rtems-rfs: file-open: handle:%p\n", file);
rtems_rfs_rtems_set_iop_file_handle (iop, file);
5a2c2: 276e fffc 001c movel %fp@(-4),%a3@(28) <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a2c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a2ca: 4e90 jsr %a0@ <== NOT EXECUTED
5a2cc: 588f addql #4,%sp <== NOT EXECUTED
return 0;
5a2ce: 4280 clrl %d0 <== NOT EXECUTED
}
5a2d0: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED
5a2d6: 4e5e unlk %fp <== NOT EXECUTED
0005a122 <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
5a122: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED
5a126: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
5a12a: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a12e: 246b 001c moveal %a3@(28),%a2 <== NOT EXECUTED
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));
5a132: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
.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
};
5a136: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5a13a: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_mutex_lock (&rtems->access);
5a13e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
5a140: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
5a144: 4eba ff26 jsr %pc@(5a06c <rtems_rfs_mutex_lock.isra.0>)<== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
5a148: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
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;
5a14c: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED
5a150: 262b 0008 movel %a3@(8),%d3 <== NOT EXECUTED
5a154: 4868 007c pea %a0@(124) <== NOT EXECUTED
5a158: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a15c: 4eb9 0005 583e jsr 5583e <rtems_rfs_block_get_size> <== NOT EXECUTED
if (pos < rtems_rfs_file_size (file))
5a162: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a166: 9283 subl %d3,%d1 <== NOT EXECUTED
5a168: 9182 subxl %d2,%d0 <== NOT EXECUTED
5a16a: 626c bhis 5a1d8 <rtems_rfs_rtems_file_read+0xb6> <== 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;
5a16c: 4284 clrl %d4 <== NOT EXECUTED
5a16e: 6000 0082 braw 5a1f2 <rtems_rfs_rtems_file_read+0xd0> <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
5a172: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a176: 486e fffc pea %fp@(-4) <== NOT EXECUTED
5a17a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a17c: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
5a17e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
5a182: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc > 0)
5a184: 6f02 bles 5a188 <rtems_rfs_rtems_file_read+0x66> <== NOT EXECUTED
5a186: 6042 bras 5a1ca <rtems_rfs_rtems_file_read+0xa8> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
5a188: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
5a18c: 6760 beqs 5a1ee <rtems_rfs_rtems_file_read+0xcc> <== NOT EXECUTED
break;
if (size > count)
5a18e: ba80 cmpl %d0,%d5 <== NOT EXECUTED
5a190: 6404 bccs 5a196 <rtems_rfs_rtems_file_read+0x74> <== NOT EXECUTED
size = count;
5a192: 2d45 fffc movel %d5,%fp@(-4) <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
5a196: 2e2e fffc movel %fp@(-4),%d7 <== NOT EXECUTED
data += size;
count -= size;
5a19a: 9a87 subl %d7,%d5 <== NOT EXECUTED
read += size;
5a19c: d887 addl %d7,%d4 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
5a19e: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
5a1a2: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5a1a4: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
5a1a8: d1ea 0012 addal %a2@(18),%a0 <== NOT EXECUTED
5a1ac: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a1ae: 2f06 movel %d6,%sp@- <== NOT EXECUTED
data += size;
5a1b0: dc87 addl %d7,%d6 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
5a1b2: 4e95 jsr %a5@ <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
5a1b4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a1b8: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5a1ba: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a1bc: 4eb9 0005 805a jsr 5805a <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc > 0)
5a1c2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
5a1c6: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc > 0)
5a1c8: 6f20 bles 5a1ea <rtems_rfs_rtems_file_read+0xc8> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
5a1ca: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a1d0: 78ff moveq #-1,%d4 <== NOT EXECUTED
5a1d2: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a1d4: 2087 movel %d7,%a0@ <== NOT EXECUTED
5a1d6: 6030 bras 5a208 <rtems_rfs_rtems_file_read+0xe6> <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
5a1d8: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED
5a1dc: 4284 clrl %d4 <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
5a1de: 49f9 0005 7e8e lea 57e8e <rtems_rfs_file_io_start>,%a4 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
5a1e4: 4bf9 0005 bffc lea 5bffc <memcpy>,%a5 <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
5a1ea: 4a85 tstl %d5 <== NOT EXECUTED
5a1ec: 6684 bnes 5a172 <rtems_rfs_rtems_file_read+0x50> <== NOT EXECUTED
break;
}
}
}
if (read >= 0)
5a1ee: 4a84 tstl %d4 <== NOT EXECUTED
5a1f0: 6d16 blts 5a208 <rtems_rfs_rtems_file_read+0xe6> <== NOT EXECUTED
iop->offset = pos + read;
5a1f2: 2204 movel %d4,%d1 <== NOT EXECUTED
5a1f4: 5bc0 smi %d0 <== NOT EXECUTED
5a1f6: 49c0 extbl %d0 <== NOT EXECUTED
5a1f8: 2a00 movel %d0,%d5 <== NOT EXECUTED
5a1fa: 2c01 movel %d1,%d6 <== NOT EXECUTED
5a1fc: dc83 addl %d3,%d6 <== NOT EXECUTED
5a1fe: db82 addxl %d2,%d5 <== NOT EXECUTED
5a200: 2745 0004 movel %d5,%a3@(4) <== NOT EXECUTED
5a204: 2746 0008 movel %d6,%a3@(8) <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5a208: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5a20c: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a210: 4eba feb2 jsr %pc@(5a0c4 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return read;
}
5a214: 2004 movel %d4,%d0 <== NOT EXECUTED
5a216: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5a21c: 4e5e unlk %fp <== NOT EXECUTED
0005a3de <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5a3de: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
5a3e2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
5a3e6: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5a3ea: 246b 001c moveal %a3@(28),%a2 <== NOT EXECUTED
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));
5a3ee: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
.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
};
5a3f2: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5a3f6: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
5a3fa: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5a3fc: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
5a400: 4eba fc6a jsr %pc@(5a06c <rtems_rfs_mutex_lock.isra.0>)<== NOT EXECUTED
printf("rtems-rfs: file-write: handle:%p count:%zd\n", file, count);
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
file_size = rtems_rfs_file_size (file);
5a404: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
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;
5a408: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED
5a40c: 222b 0008 movel %a3@(8),%d1 <== NOT EXECUTED
5a410: 4868 007c pea %a0@(124) <== NOT EXECUTED
5a414: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a418: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
5a41c: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
5a420: 4eb9 0005 583e jsr 5583e <rtems_rfs_block_get_size> <== NOT EXECUTED
file_size = rtems_rfs_file_size (file);
if (pos > file_size)
5a426: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a42a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5a42e: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
5a432: 2c02 movel %d2,%d6 <== NOT EXECUTED
5a434: 2e03 movel %d3,%d7 <== NOT EXECUTED
5a436: 9e81 subl %d1,%d7 <== NOT EXECUTED
5a438: 9d80 subxl %d0,%d6 <== NOT EXECUTED
5a43a: 6358 blss 5a494 <rtems_rfs_rtems_file_write+0xb6><== NOT EXECUTED
/*
* If the iop position is past the physical end of the file we need to set
* the file size to the new length before writing. The
* rtems_rfs_file_io_end() will grow the file subsequently.
*/
rc = rtems_rfs_file_set_size (file, pos);
5a43c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a43e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a440: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a442: 4eb9 0005 8336 jsr 58336 <rtems_rfs_file_set_size> <== NOT EXECUTED
5a448: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5a44c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5a44e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a452: 6702 beqs 5a456 <rtems_rfs_rtems_file_write+0x78><== NOT EXECUTED
5a454: 6074 bras 5a4ca <rtems_rfs_rtems_file_write+0xec><== 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);
5a456: 486a 000e pea %a2@(14) <== NOT EXECUTED
5a45a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
5a45e: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
5a462: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a466: 4eb9 0005 576c jsr 5576c <rtems_rfs_block_get_bpos> <== NOT EXECUTED
5a46c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5a470: 260e movel %fp,%d3 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5a472: 4284 clrl %d4 <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5a474: 0683 ffff fff4 addil #-12,%d3 <== NOT EXECUTED
5a47a: 49f9 0005 7e8e lea 57e8e <rtems_rfs_file_io_start>,%a4 <== NOT EXECUTED
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
5a480: 4bf9 0005 bffc lea 5bffc <memcpy>,%a5 <== NOT EXECUTED
data += size;
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
5a486: 2c3c 0005 805a movel #360538,%d6 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5a48c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
5a490: 6000 00b2 braw 5a544 <rtems_rfs_rtems_file_write+0x166><== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
}
rtems_rfs_file_set_bpos (file, pos);
}
else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
5a494: 2c02 movel %d2,%d6 <== NOT EXECUTED
5a496: 2e03 movel %d3,%d7 <== NOT EXECUTED
5a498: 9e81 subl %d1,%d7 <== NOT EXECUTED
5a49a: 9d80 subxl %d0,%d6 <== NOT EXECUTED
5a49c: 64d2 bccs 5a470 <rtems_rfs_rtems_file_write+0x92><== NOT EXECUTED
5a49e: 242b 000c movel %a3@(12),%d2 <== NOT EXECUTED
5a4a2: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED
5a4a8: 67c6 beqs 5a470 <rtems_rfs_rtems_file_write+0x92><== NOT EXECUTED
{
pos = file_size;
5a4aa: 204e moveal %fp,%a0 <== NOT EXECUTED
5a4ac: 2101 movel %d1,%a0@- <== NOT EXECUTED
5a4ae: 2100 movel %d0,%a0@- <== NOT EXECUTED
rc = rtems_rfs_file_seek (file, pos, &pos);
5a4b0: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a4b2: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5a4b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a4b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a4b8: 4eb9 0005 8258 jsr 58258 <rtems_rfs_file_seek> <== NOT EXECUTED
if (rc)
5a4be: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_file_set_bpos (file, pos);
}
else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
{
pos = file_size;
rc = rtems_rfs_file_seek (file, pos, &pos);
5a4c2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5a4c4: 67aa beqs 5a470 <rtems_rfs_rtems_file_write+0x92><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5a4c6: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5a4ca: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
5a4ce: 78ff moveq #-1,%d4 <== NOT EXECUTED
{
pos = file_size;
rc = rtems_rfs_file_seek (file, pos, &pos);
if (rc)
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5a4d0: 4eba fbf2 jsr %pc@(5a0c4 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
5a4d4: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a4da: 588f addql #4,%sp <== NOT EXECUTED
5a4dc: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a4de: 2082 movel %d2,%a0@ <== NOT EXECUTED
5a4e0: 6000 0092 braw 5a574 <rtems_rfs_rtems_file_write+0x196><== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5a4e4: 42a7 clrl %sp@- <== NOT EXECUTED
5a4e6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
}
}
while (count)
{
size_t size = count;
5a4e8: 2d45 fff4 movel %d5,%fp@(-12) <== NOT EXECUTED
rc = rtems_rfs_file_io_start (file, &size, false);
5a4ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a4ee: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc)
5a4f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5a4f4: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc)
5a4f6: 6702 beqs 5a4fa <rtems_rfs_rtems_file_write+0x11c><== NOT EXECUTED
5a4f8: 603c bras 5a536 <rtems_rfs_rtems_file_write+0x158><== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
5a4fa: baae fff4 cmpl %fp@(-12),%d5 <== NOT EXECUTED
5a4fe: 6404 bccs 5a504 <rtems_rfs_rtems_file_write+0x126><== NOT EXECUTED
size = count;
5a500: 2d45 fff4 movel %d5,%fp@(-12) <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
5a504: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
5a508: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
5a50c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a50e: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
5a512: d1ea 0012 addal %a2@(18),%a0 <== NOT EXECUTED
5a516: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a518: 4e95 jsr %a5@ <== NOT EXECUTED
data += size;
5a51a: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
5a51e: 2046 moveal %d6,%a0 <== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
5a520: d480 addl %d0,%d2 <== NOT EXECUTED
count -= size;
5a522: 9a80 subl %d0,%d5 <== NOT EXECUTED
write += size;
5a524: d880 addl %d0,%d4 <== NOT EXECUTED
rc = rtems_rfs_file_io_end (file, size, false);
5a526: 42a7 clrl %sp@- <== NOT EXECUTED
5a528: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a52a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a52c: 4e90 jsr %a0@ <== NOT EXECUTED
if (rc)
5a52e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
data += size;
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
5a532: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc)
5a534: 670e beqs 5a544 <rtems_rfs_rtems_file_write+0x166><== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
5a536: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
5a53c: 78ff moveq #-1,%d4 <== NOT EXECUTED
5a53e: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a540: 2087 movel %d7,%a0@ <== NOT EXECUTED
5a542: 6022 bras 5a566 <rtems_rfs_rtems_file_write+0x188><== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
}
}
while (count)
5a544: 4a85 tstl %d5 <== NOT EXECUTED
5a546: 669c bnes 5a4e4 <rtems_rfs_rtems_file_write+0x106><== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
if (write >= 0)
5a548: 4a84 tstl %d4 <== NOT EXECUTED
5a54a: 6d1a blts 5a566 <rtems_rfs_rtems_file_write+0x188><== NOT EXECUTED
iop->offset = pos + write;
5a54c: 2604 movel %d4,%d3 <== NOT EXECUTED
5a54e: 5bc2 smi %d2 <== NOT EXECUTED
5a550: 49c2 extbl %d2 <== NOT EXECUTED
5a552: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
5a556: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
5a55a: d283 addl %d3,%d1 <== NOT EXECUTED
5a55c: d182 addxl %d2,%d0 <== NOT EXECUTED
5a55e: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
5a562: 2741 0008 movel %d1,%a3@(8) <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5a566: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5a56a: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5a56e: 4eba fb54 jsr %pc@(5a0c4 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
5a572: 588f addql #4,%sp <== NOT EXECUTED
return write;
}
5a574: 2004 movel %d4,%d0 <== NOT EXECUTED
5a576: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5a57c: 4e5e unlk %fp <== NOT EXECUTED
0004fb10 <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
4fb10: 4e56 ffc0 linkw %fp,#-64 <== NOT EXECUTED
4fb14: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4fb18: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
4fb1c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4fb20: 2669 0008 moveal %a1@(8),%a3 <== NOT EXECUTED
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);
4fb24: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fb28: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4fb2c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
4fb30: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
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);
4fb34: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fb36: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
4fb3c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
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);
4fb40: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4fb42: 6704 beqs 4fb48 <rtems_rfs_rtems_fstat+0x38> <== NOT EXECUTED
4fb44: 6000 0220 braw 4fd66 <rtems_rfs_rtems_fstat+0x256> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
4fb48: 286e ffe6 moveal %fp@(-26),%a4 <== 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);
4fb4c: 4280 clrl %d0 <== NOT EXECUTED
4fb4e: 102c 0002 moveb %a4@(2),%d0 <== NOT EXECUTED
4fb52: 4281 clrl %d1 <== NOT EXECUTED
4fb54: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED
4fb58: e188 lsll #8,%d0 <== NOT EXECUTED
4fb5a: 8081 orl %d1,%d0 <== NOT EXECUTED
4fb5c: 3400 movew %d0,%d2 <== NOT EXECUTED
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
4fb5e: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4fb64: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4fb6a: 6708 beqs 4fb74 <rtems_rfs_rtems_fstat+0x64> <== NOT EXECUTED
4fb6c: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4fb72: 6620 bnes 4fb94 <rtems_rfs_rtems_fstat+0x84> <== NOT EXECUTED
{
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
4fb74: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fb78: 4bfa ff5c lea %pc@(4fad6 <rtems_rfs_inode_get_block.isra.12>),%a5<== NOT EXECUTED
4fb7c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4fb7e: 4e95 jsr %a5@ <== NOT EXECUTED
4fb80: 508f addql #8,%sp <== NOT EXECUTED
4fb82: 2600 movel %d0,%d3 <== NOT EXECUTED
4fb84: 42a7 clrl %sp@- <== NOT EXECUTED
4fb86: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4fb88: 4e95 jsr %a5@ <== NOT EXECUTED
4fb8a: 508f addql #8,%sp <== NOT EXECUTED
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
{
buf->st_rdev =
4fb8c: 2540 0016 movel %d0,%a2@(22) <== NOT EXECUTED
4fb90: 2543 001a movel %d3,%a2@(26) <== 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);
4fb94: 222b 0010 movel %a3@(16),%d1 <== NOT EXECUTED
4fb98: 5bc0 smi %d0 <== NOT EXECUTED
4fb9a: 49c0 extbl %d0 <== NOT EXECUTED
buf->st_ino = rtems_rfs_inode_ino (&inode);
4fb9c: 256e ffe2 0008 movel %fp@(-30),%a2@(8) <== NOT EXECUTED
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);
4fba2: 2480 movel %d0,%a2@ <== NOT EXECUTED
4fba4: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
4fba8: 3f02 movew %d2,%sp@- <== NOT EXECUTED
4fbaa: 4267 clrw %sp@- <== NOT EXECUTED
4fbac: 4eb9 0005 02ee jsr 502ee <rtems_rfs_rtems_mode> <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
4fbb2: 206e ffe6 moveal %fp@(-26),%a0 <== 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);
4fbb6: 4281 clrl %d1 <== NOT EXECUTED
rtems_rfs_inode_get_block (&inode, 1));
}
buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
4fbb8: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
4fbbc: 4280 clrl %d0 <== NOT EXECUTED
4fbbe: 1010 moveb %a0@,%d0 <== NOT EXECUTED
4fbc0: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
4fbc4: e188 lsll #8,%d0 <== NOT EXECUTED
4fbc6: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
4fbc8: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
4fbca: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED
4fbd0: 56c1 sne %d1 <== NOT EXECUTED
4fbd2: 4881 extw %d1 <== NOT EXECUTED
4fbd4: c081 andl %d1,%d0 <== NOT EXECUTED
* @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;
4fbd6: 4281 clrl %d1 <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
4fbd8: 3540 0010 movew %d0,%a2@(16) <== NOT EXECUTED
4fbdc: 4280 clrl %d0 <== NOT EXECUTED
4fbde: 1028 0006 moveb %a0@(6),%d0 <== NOT EXECUTED
4fbe2: 1228 0007 moveb %a0@(7),%d1 <== NOT EXECUTED
4fbe6: e188 lsll #8,%d0 <== NOT EXECUTED
4fbe8: 8081 orl %d1,%d0 <== NOT EXECUTED
* @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;
4fbea: 7218 moveq #24,%d1 <== NOT EXECUTED
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
4fbec: 3540 0012 movew %d0,%a2@(18) <== NOT EXECUTED
4fbf0: 4280 clrl %d0 <== NOT EXECUTED
4fbf2: 1028 0004 moveb %a0@(4),%d0 <== NOT EXECUTED
4fbf6: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fbf8: 4281 clrl %d1 <== NOT EXECUTED
4fbfa: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED
4fbfe: 4841 swap %d1 <== NOT EXECUTED
4fc00: 4241 clrw %d1 <== NOT EXECUTED
4fc02: 8081 orl %d1,%d0 <== NOT EXECUTED
4fc04: 4240 clrw %d0 <== NOT EXECUTED
4fc06: 4840 swap %d0 <== NOT EXECUTED
4fc08: 3540 0014 movew %d0,%a2@(20) <== NOT EXECUTED
/*
* 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));
4fc0c: 2eae ffe2 movel %fp@(-30),%sp@ <== NOT EXECUTED
4fc10: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fc12: 4eb9 0005 85fc jsr 585fc <rtems_rfs_file_get_shared> <== NOT EXECUTED
4fc18: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED
4fc1c: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (shared)
4fc1e: 508f addql #8,%sp <== NOT EXECUTED
4fc20: 0282 0000 f000 andil #61440,%d2 <== NOT EXECUTED
4fc26: 4a80 tstl %d0 <== NOT EXECUTED
4fc28: 673a beqs 4fc64 <rtems_rfs_rtems_fstat+0x154> <== NOT EXECUTED
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
4fc2a: 2568 0084 0026 movel %a0@(132),%a2@(38) <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
4fc30: 2568 0088 002e movel %a0@(136),%a2@(46) <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
4fc36: 2568 008c 0036 movel %a0@(140),%a2@(54) <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
4fc3c: 2568 007c 0042 movel %a0@(124),%a2@(66) <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
4fc42: 0c82 0000 a000 cmpil #40960,%d2 <== NOT EXECUTED
4fc48: 660a bnes 4fc54 <rtems_rfs_rtems_fstat+0x144> <== NOT EXECUTED
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
4fc4a: 4280 clrl %d0 <== NOT EXECUTED
4fc4c: 3028 0082 movew %a0@(130),%d0 <== NOT EXECUTED
4fc50: 6000 00dc braw 4fd2e <rtems_rfs_rtems_fstat+0x21e> <== 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);
4fc54: 4868 007c pea %a0@(124) <== NOT EXECUTED
4fc58: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fc5a: 4eb9 0005 583e jsr 5583e <rtems_rfs_block_get_size> <== NOT EXECUTED
4fc60: 6000 00e2 braw 4fd44 <rtems_rfs_rtems_fstat+0x234> <== NOT EXECUTED
else
buf->st_size = rtems_rfs_file_shared_get_size (fs, shared);
}
else
{
buf->st_atime = rtems_rfs_inode_get_atime (&inode);
4fc64: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
* @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);
4fc68: 4280 clrl %d0 <== NOT EXECUTED
4fc6a: 1028 0010 moveb %a0@(16),%d0 <== NOT EXECUTED
4fc6e: 7218 moveq #24,%d1 <== NOT EXECUTED
4fc70: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fc72: 4281 clrl %d1 <== NOT EXECUTED
4fc74: 1228 0011 moveb %a0@(17),%d1 <== NOT EXECUTED
4fc78: 4841 swap %d1 <== NOT EXECUTED
4fc7a: 4241 clrw %d1 <== NOT EXECUTED
4fc7c: 8081 orl %d1,%d0 <== NOT EXECUTED
4fc7e: 4281 clrl %d1 <== NOT EXECUTED
4fc80: 1228 0013 moveb %a0@(19),%d1 <== NOT EXECUTED
4fc84: 8081 orl %d1,%d0 <== NOT EXECUTED
4fc86: 1228 0012 moveb %a0@(18),%d1 <== NOT EXECUTED
4fc8a: e189 lsll #8,%d1 <== NOT EXECUTED
4fc8c: 8081 orl %d1,%d0 <== NOT EXECUTED
* @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);
4fc8e: 7218 moveq #24,%d1 <== NOT EXECUTED
* @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);
4fc90: 2540 0026 movel %d0,%a2@(38) <== NOT EXECUTED
* @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);
4fc94: 4280 clrl %d0 <== NOT EXECUTED
4fc96: 1028 0014 moveb %a0@(20),%d0 <== NOT EXECUTED
4fc9a: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fc9c: 4281 clrl %d1 <== NOT EXECUTED
4fc9e: 1228 0015 moveb %a0@(21),%d1 <== NOT EXECUTED
4fca2: 4841 swap %d1 <== NOT EXECUTED
4fca4: 4241 clrw %d1 <== NOT EXECUTED
4fca6: 8081 orl %d1,%d0 <== NOT EXECUTED
4fca8: 4281 clrl %d1 <== NOT EXECUTED
4fcaa: 1228 0017 moveb %a0@(23),%d1 <== NOT EXECUTED
4fcae: 8081 orl %d1,%d0 <== NOT EXECUTED
4fcb0: 1228 0016 moveb %a0@(22),%d1 <== NOT EXECUTED
4fcb4: e189 lsll #8,%d1 <== NOT EXECUTED
4fcb6: 8081 orl %d1,%d0 <== NOT EXECUTED
* @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);
4fcb8: 7218 moveq #24,%d1 <== NOT EXECUTED
* @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);
4fcba: 2540 002e movel %d0,%a2@(46) <== NOT EXECUTED
* @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);
4fcbe: 4280 clrl %d0 <== NOT EXECUTED
4fcc0: 1028 0018 moveb %a0@(24),%d0 <== NOT EXECUTED
4fcc4: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fcc6: 4281 clrl %d1 <== NOT EXECUTED
4fcc8: 1228 0019 moveb %a0@(25),%d1 <== NOT EXECUTED
4fccc: 4841 swap %d1 <== NOT EXECUTED
4fcce: 4241 clrw %d1 <== NOT EXECUTED
4fcd0: 8081 orl %d1,%d0 <== NOT EXECUTED
4fcd2: 4281 clrl %d1 <== NOT EXECUTED
4fcd4: 1228 001b moveb %a0@(27),%d1 <== NOT EXECUTED
4fcd8: 8081 orl %d1,%d0 <== NOT EXECUTED
4fcda: 1228 001a moveb %a0@(26),%d1 <== NOT EXECUTED
4fcde: e189 lsll #8,%d1 <== NOT EXECUTED
4fce0: 8081 orl %d1,%d0 <== 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);
4fce2: 7218 moveq #24,%d1 <== NOT EXECUTED
* @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);
4fce4: 2540 0036 movel %d0,%a2@(54) <== 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);
4fce8: 4280 clrl %d0 <== NOT EXECUTED
4fcea: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
4fcee: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fcf0: 4281 clrl %d1 <== NOT EXECUTED
4fcf2: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
4fcf6: 4841 swap %d1 <== NOT EXECUTED
4fcf8: 4241 clrw %d1 <== NOT EXECUTED
4fcfa: 8081 orl %d1,%d0 <== NOT EXECUTED
4fcfc: 4281 clrl %d1 <== NOT EXECUTED
4fcfe: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
4fd02: 8081 orl %d1,%d0 <== NOT EXECUTED
4fd04: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
4fd08: e189 lsll #8,%d1 <== NOT EXECUTED
4fd0a: 8081 orl %d1,%d0 <== NOT EXECUTED
4fd0c: 2540 0042 movel %d0,%a2@(66) <== NOT EXECUTED
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))
4fd10: 0c82 0000 a000 cmpil #40960,%d2 <== NOT EXECUTED
4fd16: 6620 bnes 4fd38 <rtems_rfs_rtems_fstat+0x228> <== 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);
4fd18: 4280 clrl %d0 <== NOT EXECUTED
4fd1a: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
4fd1e: 4281 clrl %d1 <== NOT EXECUTED
4fd20: 1228 000b moveb %a0@(11),%d1 <== NOT EXECUTED
4fd24: e188 lsll #8,%d0 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
4fd26: 8081 orl %d1,%d0 <== NOT EXECUTED
4fd28: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
4fd2e: 42aa 001e clrl %a2@(30) <== NOT EXECUTED
4fd32: 2540 0022 movel %d0,%a2@(34) <== NOT EXECUTED
4fd36: 6016 bras 4fd4e <rtems_rfs_rtems_fstat+0x23e> <== NOT EXECUTED
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
4fd38: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4fd3c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fd3e: 4eb9 0004 f2fa jsr 4f2fa <rtems_rfs_inode_get_size> <== NOT EXECUTED
4fd44: 508f addql #8,%sp <== NOT EXECUTED
4fd46: 2540 001e movel %d0,%a2@(30) <== NOT EXECUTED
4fd4a: 2541 0022 movel %d1,%a2@(34) <== NOT EXECUTED
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
4fd4e: 256b 0008 003e movel %a3@(8),%a2@(62) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
4fd54: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4fd58: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fd5a: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4fd60: 508f addql #8,%sp <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
rc = rtems_rfs_inode_close (fs, &inode);
4fd62: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4fd64: 6f0e bles 4fd74 <rtems_rfs_rtems_fstat+0x264> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("stat: closing inode", rc);
4fd66: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4fd6c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fd6e: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fd70: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fd72: 6002 bras 4fd76 <rtems_rfs_rtems_fstat+0x266> <== NOT EXECUTED
}
return 0;
4fd74: 4280 clrl %d0 <== NOT EXECUTED
}
4fd76: 4cee 3c0c ffc0 moveml %fp@(-64),%d2-%d3/%a2-%a5 <== NOT EXECUTED
4fd7c: 4e5e unlk %fp <== NOT EXECUTED
000502e2 <rtems_rfs_rtems_imode>:
uint16_t
rtems_rfs_rtems_imode (mode_t mode)
{
502e2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return mode;
}
502e6: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED
502ea: 4e5e unlk %fp <== NOT EXECUTED
0004fe2a <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
4fe2a: 4e56 ffdc linkw %fp,#-36
4fe2e: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4fe32: 266e 0008 moveal %fp@(8),%a3
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
4fe36: 7605 moveq #5,%d3
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
4fe38: 4282 clrl %d2
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
4fe3a: 4bf9 0005 c2b0 lea 5c2b0 <printf>,%a5
if (strncmp (options, "hold-bitmaps",
4fe40: 49f9 0005 d2b0 lea 5d2b0 <strncmp>,%a4
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
4fe46: 283c 0005 d552 movel #382290,%d4
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
4fe4c: 2a3c 0005 cad8 movel #379608,%d5
{
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
const char* options = data;
4fe52: 246e 000c moveal %fp@(12),%a2
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
4fe56: 6000 0098 braw 4fef0 <rtems_rfs_rtems_initialise+0xc6>
{
printf ("options=%s\n", options);
4fe5a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fe5c: 4879 0006 c7e6 pea 6c7e6 <_CPU_m68k_BFFFO_table+0xcdd> <== NOT EXECUTED
4fe62: 4e95 jsr %a5@ <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
4fe64: 4878 000c pea c <OPER1> <== NOT EXECUTED
4fe68: 4879 0006 c7f2 pea 6c7f2 <_CPU_m68k_BFFFO_table+0xce9> <== NOT EXECUTED
4fe6e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fe70: 4e94 jsr %a4@ <== NOT EXECUTED
4fe72: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4fe76: 4a80 tstl %d0 <== NOT EXECUTED
4fe78: 6606 bnes 4fe80 <rtems_rfs_rtems_initialise+0x56><== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
4fe7a: 103c 0001 moveb #1,%d0 <== NOT EXECUTED
4fe7e: 601a bras 4fe9a <rtems_rfs_rtems_initialise+0x70><== NOT EXECUTED
else if (strncmp (options, "no-local-cache",
4fe80: 4878 000e pea e <OPER1+0x2> <== NOT EXECUTED
4fe84: 4879 0006 c7ff pea 6c7ff <_CPU_m68k_BFFFO_table+0xcf6> <== NOT EXECUTED
4fe8a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fe8c: 4e94 jsr %a4@ <== NOT EXECUTED
4fe8e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fe92: 4a80 tstl %d0 <== NOT EXECUTED
4fe94: 6608 bnes 4fe9e <rtems_rfs_rtems_initialise+0x74><== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
4fe96: 103c 0002 moveb #2,%d0 <== NOT EXECUTED
4fe9a: 8480 orl %d0,%d2 <== NOT EXECUTED
4fe9c: 6038 bras 4fed6 <rtems_rfs_rtems_initialise+0xac><== NOT EXECUTED
else if (strncmp (options, "max-held-bufs",
4fe9e: 4878 000d pea d <OPER1+0x1> <== NOT EXECUTED
4fea2: 4879 0006 c80e pea 6c80e <_CPU_m68k_BFFFO_table+0xd05> <== NOT EXECUTED
4fea8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4feaa: 4e94 jsr %a4@ <== NOT EXECUTED
4feac: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4feb0: 4a80 tstl %d0 <== NOT EXECUTED
4feb2: 6614 bnes 4fec8 <rtems_rfs_rtems_initialise+0x9e><== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
4feb4: 42a7 clrl %sp@- <== NOT EXECUTED
4feb6: 2044 moveal %d4,%a0 <== NOT EXECUTED
4feb8: 42a7 clrl %sp@- <== NOT EXECUTED
4feba: 486a 000e pea %a2@(14) <== NOT EXECUTED
4febe: 4e90 jsr %a0@ <== NOT EXECUTED
4fec0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fec4: 2600 movel %d0,%d3 <== NOT EXECUTED
4fec6: 600e bras 4fed6 <rtems_rfs_rtems_initialise+0xac><== NOT EXECUTED
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
4fec8: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4fece: 7416 moveq #22,%d2 <== NOT EXECUTED
4fed0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fed2: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fed4: 603e bras 4ff14 <rtems_rfs_rtems_initialise+0xea><== NOT EXECUTED
options = strchr (options, ',');
4fed6: 4878 002c pea 2c <OPER2+0x18> <== NOT EXECUTED
4feda: 2045 moveal %d5,%a0 <== NOT EXECUTED
4fedc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fede: 4e90 jsr %a0@ <== NOT EXECUTED
4fee0: 508f addql #8,%sp <== NOT EXECUTED
4fee2: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (options)
4fee4: 4a80 tstl %d0 <== NOT EXECUTED
4fee6: 670e beqs 4fef6 <rtems_rfs_rtems_initialise+0xcc><== NOT EXECUTED
{
++options;
if (*options == '\0')
4fee8: 4a2a 0001 tstb %a2@(1) <== NOT EXECUTED
4feec: 6708 beqs 4fef6 <rtems_rfs_rtems_initialise+0xcc><== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
if (options)
{
++options;
4feee: 528a addql #1,%a2 <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
4fef0: 4a8a tstl %a2
4fef2: 6600 ff66 bnew 4fe5a <rtems_rfs_rtems_initialise+0x30>
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
4fef6: 4878 0004 pea 4 <CONTEXT_ARG>
4fefa: 4eb9 0004 6910 jsr 46910 <malloc>
if (!rtems)
4ff00: 588f addql #4,%sp
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
4ff02: 2440 moveal %d0,%a2
if (!rtems)
4ff04: 4a80 tstl %d0
4ff06: 6612 bnes 4ff1a <rtems_rfs_rtems_initialise+0xf0><== ALWAYS TAKEN
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
4ff08: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4ff0e: 720c moveq #12,%d1 <== NOT EXECUTED
4ff10: 2040 moveal %d0,%a0 <== NOT EXECUTED
4ff12: 2081 movel %d1,%a0@ <== NOT EXECUTED
4ff14: 70ff moveq #-1,%d0
4ff16: 6000 00c4 braw 4ffdc <rtems_rfs_rtems_initialise+0x1b2>
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
4ff1a: 4292 clrl %a2@
rc = rtems_rfs_mutex_create (&rtems->access);
4ff1c: 2f00 movel %d0,%sp@-
4ff1e: 4eb9 0005 9b10 jsr 59b10 <rtems_rfs_mutex_create>
if (rc > 0)
4ff24: 588f addql #4,%sp
if (!rtems)
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
rc = rtems_rfs_mutex_create (&rtems->access);
4ff26: 2840 moveal %d0,%a4
if (rc > 0)
4ff28: 4a80 tstl %d0
4ff2a: 6f14 bles 4ff40 <rtems_rfs_rtems_initialise+0x116><== NEVER TAKEN
{
free (rtems);
4ff2c: 2f0a movel %a2,%sp@-
4ff2e: 4eb9 0004 6348 jsr 46348 <free>
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
4ff34: 4eb9 0005 b09c jsr 5b09c <__errno>
4ff3a: 2040 moveal %d0,%a0
4ff3c: 208c movel %a4,%a0@
4ff3e: 605a bras 4ff9a <rtems_rfs_rtems_initialise+0x170>
}
rc = rtems_rfs_mutex_lock (&rtems->access);
4ff40: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4ff42: 4eba fe8e jsr %pc@(4fdd2 <rtems_rfs_mutex_lock.isra.20>)<== NOT EXECUTED
if (rc > 0)
4ff46: 588f addql #4,%sp <== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
}
rc = rtems_rfs_mutex_lock (&rtems->access);
4ff48: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (rc > 0)
4ff4a: 4a80 tstl %d0 <== NOT EXECUTED
4ff4c: 6f1e bles 4ff6c <rtems_rfs_rtems_initialise+0x142><== NOT EXECUTED
{
rtems_rfs_mutex_destroy (&rtems->access);
4ff4e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ff50: 4eb9 0005 9b74 jsr 59b74 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
4ff56: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ff58: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
4ff5e: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4ff64: 508f addql #8,%sp <== NOT EXECUTED
4ff66: 2040 moveal %d0,%a0 <== NOT EXECUTED
4ff68: 208c movel %a4,%a0@ <== NOT EXECUTED
4ff6a: 60a8 bras 4ff14 <rtems_rfs_rtems_initialise+0xea><== NOT EXECUTED
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
4ff6c: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4ff70: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ff72: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ff74: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ff76: 2f2b 0036 movel %a3@(54),%sp@- <== NOT EXECUTED
4ff7a: 4eb9 0005 89c2 jsr 589c2 <rtems_rfs_fs_open> <== NOT EXECUTED
if (rc)
4ff80: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
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);
4ff84: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4ff86: 6718 beqs 4ffa0 <rtems_rfs_rtems_initialise+0x176><== NOT EXECUTED
{
free (rtems);
4ff88: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ff8a: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
4ff90: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4ff96: 2040 moveal %d0,%a0 <== NOT EXECUTED
4ff98: 2082 movel %d2,%a0@ <== NOT EXECUTED
4ff9a: 588f addql #4,%sp
4ff9c: 6000 ff76 braw 4ff14 <rtems_rfs_rtems_initialise+0xea>
}
mt_entry->fs_info = fs;
4ffa0: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
mt_entry->ops = &rtems_rfs_ops;
4ffa4: 203c 0006 c81c movel #444444,%d0 <== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
4ffaa: 2748 0008 movel %a0,%a3@(8) <== NOT EXECUTED
mt_entry->ops = &rtems_rfs_ops;
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
4ffae: 226b 0024 moveal %a3@(36),%a1 <== NOT EXECUTED
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
mt_entry->ops = &rtems_rfs_ops;
4ffb2: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
4ffb6: 7001 moveq #1,%d0 <== NOT EXECUTED
4ffb8: 2340 0008 movel %d0,%a1@(8) <== NOT EXECUTED
mt_entry->mt_fs_root->location.handlers = &rtems_rfs_rtems_dir_handlers;
4ffbc: 203c 0006 e28e movel #451214,%d0 <== 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);
4ffc2: 2468 0080 moveal %a0@(128),%a2 <== NOT EXECUTED
4ffc6: 2340 0010 movel %d0,%a1@(16) <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
4ffca: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4ffcc: 4eb9 0005 69b2 jsr 569b2 <rtems_rfs_buffers_release> <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
4ffd2: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4ffd4: 4eba fdaa jsr %pc@(4fd80 <rtems_rfs_mutex_unlock.isra.19>)<== NOT EXECUTED
4ffd8: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
4ffda: 4280 clrl %d0 <== NOT EXECUTED
}
4ffdc: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5
4ffe2: 4e5e unlk %fp <== NOT EXECUTED
0004f3fa <rtems_rfs_rtems_is_directory>:
static bool
rtems_rfs_rtems_is_directory(
rtems_filesystem_eval_path_context_t *ctx,
void *arg
)
{
4f3fa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_inode_handle* inode = arg;
return rtems_rfs_rtems_node_type_by_inode (inode)
4f3fe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f402: 4eba ffaa jsr %pc@(4f3ae <rtems_rfs_rtems_node_type_by_inode>)<== NOT EXECUTED
4f406: 588f addql #4,%sp <== NOT EXECUTED
== RTEMS_FILESYSTEM_DIRECTORY;
}
4f408: 4e5e unlk %fp <== NOT EXECUTED
void *arg
)
{
rtems_rfs_inode_handle* inode = arg;
return rtems_rfs_rtems_node_type_by_inode (inode)
4f40a: 4a80 tstl %d0 <== NOT EXECUTED
4f40c: 57c0 seq %d0 <== NOT EXECUTED
== RTEMS_FILESYSTEM_DIRECTORY;
}
4f40e: 4480 negl %d0 <== NOT EXECUTED
0004f4a2 <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)
{
4f4a2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4f4a6: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
4f4aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
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);
4f4ac: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
4f4b0: 42a7 clrl %sp@- <== NOT EXECUTED
4f4b2: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f4b6: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
4f4ba: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4f4be: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
rtems_rfs_rtems_link (const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
const char *name,
size_t namelen)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (targetloc);
4f4c2: 2068 0014 moveal %a0@(20),%a0 <== NOT EXECUTED
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);
4f4c6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f4ca: 4eb9 0005 918c jsr 5918c <rtems_rfs_link> <== NOT EXECUTED
if (rc)
4f4d0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
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);
4f4d4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f4d6: 670e beqs 4f4e6 <rtems_rfs_rtems_link+0x44> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("link: linking", rc);
4f4d8: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f4de: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f4e0: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f4e2: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f4e4: 6002 bras 4f4e8 <rtems_rfs_rtems_link+0x46> <== NOT EXECUTED
}
return 0;
4f4e6: 4280 clrl %d0 <== NOT EXECUTED
}
4f4e8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4f4ec: 4e5e unlk %fp <== NOT EXECUTED
0004ffe6 <rtems_rfs_rtems_lock_by_mt_entry>:
static void
rtems_rfs_rtems_lock_by_mt_entry (
const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
4ffe6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
4ffea: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4ffee: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
4fff2: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_rtems_lock (rtems_rfs_file_system* fs)
{
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_mutex_lock (&rtems->access);
4fff6: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
)
{
rtems_rfs_file_system* fs = mt_entry->fs_info;
rtems_rfs_rtems_lock (fs);
}
4fffa: 4e5e unlk %fp <== NOT EXECUTED
4fffc: 6000 fdd4 braw 4fdd2 <rtems_rfs_mutex_lock.isra.20> <== NOT EXECUTED
0004f906 <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)
{
4f906: 4e56 ffbc linkw %fp,#-68 <== NOT EXECUTED
4f90a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
4f90e: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
4f912: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parentloc);
4f916: 2828 0008 movel %a0@(8),%d4 <== NOT EXECUTED
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
4f91a: 2429 0008 movel %a1@(8),%d2 <== NOT EXECUTED
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
4f91e: 262e 0014 movel %fp@(20),%d3 <== NOT EXECUTED
4f922: 2c2e 0018 movel %fp@(24),%d6 <== NOT EXECUTED
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
rtems_rfs_rtems_imode (mode),
4f926: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rtems_rfs_rtems_mknod (const rtems_filesystem_location_info_t *parentloc,
const char *name,
size_t namelen,
mode_t mode,
dev_t dev)
{
4f928: 2a2e 001c movel %fp@(28),%d5 <== NOT EXECUTED
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
rtems_rfs_rtems_imode (mode),
4f92c: 4eb9 0005 02e2 jsr 502e2 <rtems_rfs_rtems_imode> <== NOT EXECUTED
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
4f932: 486e ffd6 pea %fp@(-42) <== NOT EXECUTED
4f936: 42a7 clrl %sp@- <== NOT EXECUTED
4f938: 42a7 clrl %sp@- <== NOT EXECUTED
4f93a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f93e: 3f00 movew %d0,%sp@- <== NOT EXECUTED
4f940: 4267 clrw %sp@- <== NOT EXECUTED
4f942: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f946: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f94a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f94c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f94e: 4eb9 0004 efd6 jsr 4efd6 <rtems_rfs_inode_create> <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
4f954: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
4f958: 2800 movel %d0,%d4 <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
4f95a: 6f02 bles 4f95e <rtems_rfs_rtems_mknod+0x58> <== NOT EXECUTED
4f95c: 601e bras 4f97c <rtems_rfs_rtems_mknod+0x76> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f95e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f962: 45ee ffda lea %fp@(-38),%a2 <== NOT EXECUTED
4f966: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f968: 2f2e ffd6 movel %fp@(-42),%sp@- <== NOT EXECUTED
4f96c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f96e: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f974: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (rc > 0)
{
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f978: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
4f97a: 6f0e bles 4f98a <rtems_rfs_rtems_mknod+0x84> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("mknod: inode open", rc);
4f97c: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f982: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f984: 2084 movel %d4,%a0@ <== NOT EXECUTED
4f986: 6000 0084 braw 4fa0c <rtems_rfs_rtems_mknod+0x106> <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
4f98a: 2003 movel %d3,%d0 <== NOT EXECUTED
4f98c: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4f992: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f998: 6756 beqs 4f9f0 <rtems_rfs_rtems_mknod+0xea> <== NOT EXECUTED
4f99a: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
4f9a0: 674e beqs 4f9f0 <rtems_rfs_rtems_mknod+0xea> <== NOT EXECUTED
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
4f9a2: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f9a8: 6708 beqs 4f9b2 <rtems_rfs_rtems_mknod+0xac> <== NOT EXECUTED
4f9aa: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f9b0: 6624 bnes 4f9d6 <rtems_rfs_rtems_mknod+0xd0> <== NOT EXECUTED
{
int major;
int minor;
rtems_filesystem_split_dev_t (dev, major, minor);
rtems_rfs_inode_set_block (&inode, 0, major);
4f9b2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f9b4: 260e movel %fp,%d3 <== NOT EXECUTED
4f9b6: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4f9bc: 45fa f99a lea %pc@(4f358 <rtems_rfs_inode_set_block>),%a2<== NOT EXECUTED
4f9c0: 42a7 clrl %sp@- <== NOT EXECUTED
4f9c2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f9c4: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 1, minor);
4f9c6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f9c8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f9cc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f9ce: 4e92 jsr %a2@ <== NOT EXECUTED
if (S_ISDIR(mode) || S_ISREG(mode))
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
{
4f9d0: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4f9d4: 601a bras 4f9f0 <rtems_rfs_rtems_mknod+0xea> <== 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);
4f9d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f9d8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f9da: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
4f9e0: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f9e6: 508f addql #8,%sp <== NOT EXECUTED
4f9e8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f9ea: 7016 moveq #22,%d0 <== NOT EXECUTED
4f9ec: 2080 movel %d0,%a0@ <== NOT EXECUTED
4f9ee: 601c bras 4fa0c <rtems_rfs_rtems_mknod+0x106> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
4f9f0: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4f9f4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f9f6: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4f9fc: 508f addql #8,%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
}
rc = rtems_rfs_inode_close (fs, &inode);
4f9fe: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4fa00: 6f0e bles 4fa10 <rtems_rfs_rtems_mknod+0x10a> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
4fa02: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4fa08: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fa0a: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fa0c: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fa0e: 6002 bras 4fa12 <rtems_rfs_rtems_mknod+0x10c> <== NOT EXECUTED
}
return 0;
4fa10: 4280 clrl %d0 <== NOT EXECUTED
}
4fa12: 4cee 047c ffbc moveml %fp@(-68),%d2-%d6/%a2 <== NOT EXECUTED
4fa18: 4e5e unlk %fp <== NOT EXECUTED
000502ee <rtems_rfs_rtems_mode>:
mode_t
rtems_rfs_rtems_mode (int imode)
{
502ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
502f2: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED
502f6: 4e5e unlk %fp <== NOT EXECUTED
...
0004f894 <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)
{
4f894: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
4f898: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f89c: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
* @return rtems_filesystem_node_types_t
*/
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (const rtems_filesystem_location_info_t* pathloc)
{
4f8a0: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f8a4: 2829 0008 movel %a1@(8),%d4 <== NOT EXECUTED
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);
4f8a8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f8ac: 240e movel %fp,%d2 <== NOT EXECUTED
4f8ae: 0682 ffff ffda addil #-38,%d2 <== NOT EXECUTED
4f8b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f8b6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f8ba: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f8bc: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f8c2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
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);
4f8c6: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
4f8c8: 6f0c bles 4f8d6 <rtems_rfs_rtems_node_type+0x42> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
4f8ca: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f8d0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f8d2: 2083 movel %d3,%a0@ <== NOT EXECUTED
4f8d4: 6022 bras 4f8f8 <rtems_rfs_rtems_node_type+0x64> <== NOT EXECUTED
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
4f8d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f8d8: 4eba fad4 jsr %pc@(4f3ae <rtems_rfs_rtems_node_type_by_inode>)<== NOT EXECUTED
4f8dc: 2600 movel %d0,%d3 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
4f8de: 2e82 movel %d2,%sp@ <== NOT EXECUTED
4f8e0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f8e2: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4f8e8: 508f addql #8,%sp <== NOT EXECUTED
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
rc = rtems_rfs_inode_close (fs, &inode);
4f8ea: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4f8ec: 6f0c bles 4f8fa <rtems_rfs_rtems_node_type+0x66> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
4f8ee: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f8f4: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f8f6: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f8f8: 76ff moveq #-1,%d3 <== NOT EXECUTED
}
return type;
}
4f8fa: 2003 movel %d3,%d0 <== NOT EXECUTED
4f8fc: 4cee 001c ffcc moveml %fp@(-52),%d2-%d4 <== NOT EXECUTED
4f902: 4e5e unlk %fp <== NOT EXECUTED
0004f3ae <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);
4f3ae: 4280 clrl %d0 <== NOT EXECUTED
);
}
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type_by_inode (rtems_rfs_inode_handle* inode)
{
4f3b0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
4f3b4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4f3b8: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED
4f3bc: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
4f3c0: e188 lsll #8,%d0 <== NOT EXECUTED
* 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))
4f3c2: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4f3c8: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f3ce: 6720 beqs 4f3f0 <rtems_rfs_rtems_node_type_by_inode+0x42><== NOT EXECUTED
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
4f3d0: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
4f3d6: 671c beqs 4f3f4 <rtems_rfs_rtems_node_type_by_inode+0x46><== NOT EXECUTED
return RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
4f3d8: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f3de: 6604 bnes 4f3e4 <rtems_rfs_rtems_node_type_by_inode+0x36><== NOT EXECUTED
return RTEMS_FILESYSTEM_DEVICE;
4f3e0: 7001 moveq #1,%d0 <== NOT EXECUTED
4f3e2: 6012 bras 4f3f6 <rtems_rfs_rtems_node_type_by_inode+0x48><== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
if (RTEMS_RFS_S_ISDIR (mode))
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
return RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
4f3e4: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f3ea: 67f4 beqs 4f3e0 <rtems_rfs_rtems_node_type_by_inode+0x32><== NOT EXECUTED
return RTEMS_FILESYSTEM_DEVICE;
else
return RTEMS_FILESYSTEM_MEMORY_FILE;
4f3ec: 7004 moveq #4,%d0 <== NOT EXECUTED
4f3ee: 6006 bras 4f3f6 <rtems_rfs_rtems_node_type_by_inode+0x48><== NOT EXECUTED
* etc's inode. Links to inodes can be considered "the real" one, yet they
* are all links.
*/
uint16_t mode = rtems_rfs_inode_get_mode (inode);
if (RTEMS_RFS_S_ISDIR (mode))
return RTEMS_FILESYSTEM_DIRECTORY;
4f3f0: 4280 clrl %d0 <== NOT EXECUTED
4f3f2: 6002 bras 4f3f6 <rtems_rfs_rtems_node_type_by_inode+0x48><== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
return RTEMS_FILESYSTEM_SYM_LINK;
4f3f4: 7003 moveq #3,%d0 <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
return RTEMS_FILESYSTEM_DEVICE;
else
return RTEMS_FILESYSTEM_MEMORY_FILE;
}
4f3f6: 4e5e unlk %fp <== NOT EXECUTED
0004f5c6 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
4f5c6: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
4f5ca: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4f5ce: 2f02 movel %d2,%sp@- <== NOT EXECUTED
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);
4f5d0: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f5d4: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f5d8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f5dc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f5e0: 2068 0014 moveal %a0@(20),%a0 <== NOT EXECUTED
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);
4f5e4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f5e8: 4eb9 0005 9938 jsr 59938 <rtems_rfs_symlink_read> <== NOT EXECUTED
if (rc)
4f5ee: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
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);
4f5f2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f5f4: 670e beqs 4f604 <rtems_rfs_rtems_readlink+0x3e> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("readlink: reading link", rc);
4f5f6: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f5fc: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f5fe: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f600: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f602: 6004 bras 4f608 <rtems_rfs_rtems_readlink+0x42> <== NOT EXECUTED
}
return (ssize_t) length;
4f604: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4f608: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
4f60c: 4e5e unlk %fp <== NOT EXECUTED
0004f4f0 <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)
{
4f4f0: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
4f4f4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
4f4f8: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
rtems_rfs_rtems_rename(const rtems_filesystem_location_info_t* old_parent_loc,
const rtems_filesystem_location_info_t* old_loc,
const rtems_filesystem_location_info_t* new_parent_loc,
const char* new_name,
size_t new_name_len)
{
4f4fc: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
4f500: 2429 0008 movel %a1@(8),%d2 <== 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);
4f504: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
new_parent = rtems_rfs_rtems_get_pathloc_ino (new_parent_loc);
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
4f508: 2628 0008 movel %a0@(8),%d3 <== NOT EXECUTED
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
4f50c: 2c28 000c movel %a0@(12),%d6 <== 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);
4f510: 2a29 0008 movel %a1@(8),%d5 <== 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);
4f514: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f518: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
4f51c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f51e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f522: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
4f526: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4f52a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f52c: 4eb9 0005 918c jsr 5918c <rtems_rfs_link> <== NOT EXECUTED
if (rc)
4f532: 4fef 0018 lea %sp@(24),%sp <== 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);
4f536: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc)
4f538: 670c beqs 4f546 <rtems_rfs_rtems_rename+0x56> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: linking", rc);
4f53a: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f540: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f542: 2084 movel %d4,%a0@ <== NOT EXECUTED
4f544: 6024 bras 4f56a <rtems_rfs_rtems_rename+0x7a> <== 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,
4f546: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4f54a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f54c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f54e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f550: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f552: 4eb9 0005 9340 jsr 59340 <rtems_rfs_unlink> <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
4f558: 4fef 0014 lea %sp@(20),%sp <== 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,
4f55c: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
4f55e: 670e beqs 4f56e <rtems_rfs_rtems_rename+0x7e> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
4f560: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f566: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f568: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f56a: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f56c: 6002 bras 4f570 <rtems_rfs_rtems_rename+0x80> <== NOT EXECUTED
}
return 0;
4f56e: 4280 clrl %d0 <== NOT EXECUTED
}
4f570: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED
4f576: 4e5e unlk %fp <== NOT EXECUTED
0004f57a <rtems_rfs_rtems_rmnod>:
* @return int
*/
int
rtems_rfs_rtems_rmnod (const rtems_filesystem_location_info_t* parent_pathloc,
const rtems_filesystem_location_info_t* pathloc)
{
4f57a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4f57e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
4f582: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RMNOD))
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
4f584: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f588: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
4f58c: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
4f590: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f594: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
*/
int
rtems_rfs_rtems_rmnod (const rtems_filesystem_location_info_t* parent_pathloc,
const rtems_filesystem_location_info_t* pathloc)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f598: 2068 0014 moveal %a0@(20),%a0 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RMNOD))
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
4f59c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f5a0: 4eb9 0005 9340 jsr 59340 <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
4f5a6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RMNOD))
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
4f5aa: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f5ac: 670e beqs 4f5bc <rtems_rfs_rtems_rmnod+0x42> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
4f5ae: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f5b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f5b6: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f5b8: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f5ba: 6002 bras 4f5be <rtems_rfs_rtems_rmnod+0x44> <== NOT EXECUTED
}
return 0;
4f5bc: 4280 clrl %d0 <== NOT EXECUTED
}
4f5be: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4f5c2: 4e5e unlk %fp <== NOT EXECUTED
00050250 <rtems_rfs_rtems_set_handlers>:
50250: 4280 clrl %d0 <== NOT EXECUTED
50252: 4281 clrl %d1 <== NOT EXECUTED
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
50254: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
50258: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
5025c: 2269 000c moveal %a1@(12),%a1 <== NOT EXECUTED
50260: 1029 0002 moveb %a1@(2),%d0 <== NOT EXECUTED
50264: 1229 0003 moveb %a1@(3),%d1 <== NOT EXECUTED
50268: e188 lsll #8,%d0 <== NOT EXECUTED
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
5026a: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
5026e: 8081 orl %d1,%d0 <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
50270: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED
50274: 3200 movew %d0,%d1 <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
50276: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5027c: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
50282: 6608 bnes 5028c <rtems_rfs_rtems_set_handlers+0x3c><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (dir);
50284: 203c 0006 e28e movel #451214,%d0 <== NOT EXECUTED
5028a: 6016 bras 502a2 <rtems_rfs_rtems_set_handlers+0x52><== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
5028c: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
50292: 6708 beqs 5029c <rtems_rfs_rtems_set_handlers+0x4c><== NOT EXECUTED
50294: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
5029a: 660e bnes 502aa <rtems_rfs_rtems_set_handlers+0x5a><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (device);
5029c: 203c 0006 e262 movel #451170,%d0 <== NOT EXECUTED
502a2: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
502a6: 7001 moveq #1,%d0 <== 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);
502a8: 6034 bras 502de <rtems_rfs_rtems_set_handlers+0x8e><== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
502aa: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
502b0: 6608 bnes 502ba <rtems_rfs_rtems_set_handlers+0x6a><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
502b2: 203c 0006 c870 movel #444528,%d0 <== NOT EXECUTED
502b8: 60e8 bras 502a2 <rtems_rfs_rtems_set_handlers+0x52><== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
502ba: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
502c0: 6608 bnes 502ca <rtems_rfs_rtems_set_handlers+0x7a><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (file);
502c2: 203c 0006 e2ba movel #451258,%d0 <== NOT EXECUTED
502c8: 60d8 bras 502a2 <rtems_rfs_rtems_set_handlers+0x52><== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
502ca: 3f01 movew %d1,%sp@- <== NOT EXECUTED
502cc: 4267 clrw %sp@- <== NOT EXECUTED
502ce: 4879 0006 c8a4 pea 6c8a4 <rtems_rfs_rtems_eval_config+0x8> <== NOT EXECUTED
502d4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
return false;
502da: 508f addql #8,%sp <== NOT EXECUTED
502dc: 4200 clrb %d0 <== NOT EXECUTED
}
return true;
}
502de: 4e5e unlk %fp <== NOT EXECUTED
0004faa2 <rtems_rfs_rtems_shutdown>:
/**
* Shutdown the file system.
*/
void
rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
{
4faa2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
4faa6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4faaa: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
/**
* Shutdown the file system.
*/
void
rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
{
4faae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
rtems_rfs_rtems_private* rtems;
rtems = rtems_rfs_fs_user (fs);
4fab0: 2428 0080 movel %a0@(128),%d2 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
4fab4: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4fab6: 4eb9 0005 911a jsr 5911a <rtems_rfs_fs_close> <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
4fabc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fabe: 4eb9 0005 9b74 jsr 59b74 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
4fac4: 508f addql #8,%sp <== NOT EXECUTED
4fac6: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
4faca: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4face: 4e5e unlk %fp <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
4fad0: 4ef9 0004 6348 jmp 46348 <free> <== NOT EXECUTED
0004f412 <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
4f412: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f416: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4f41a: 2068 0014 moveal %a0@(20),%a0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
4f41e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f420: 2668 0008 moveal %a0@(8),%a3 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
4f424: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
4f426: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f42a: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
4f42e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
size_t blocks;
size_t inodes;
rtems_rfs_group_usage (fs, &blocks, &inodes);
4f432: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f434: 4eb9 0004 e9a6 jsr 4e9a6 <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
4f43a: 24ab 0008 movel %a3@(8),%a2@ <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
4f43e: 206b 0010 moveal %a3@(16),%a0 <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
4f442: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED
4f446: 90ae fff8 subl %fp@(-8),%d0 <== 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);
4f44a: 2568 0020 0004 movel %a0@(32),%a2@(4) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
4f450: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
4f454: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
4f458: 2540 001c movel %d0,%a2@(28) <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
4f45c: 202b 0014 movel %a3@(20),%d0 <== NOT EXECUTED
4f460: 2540 0020 movel %d0,%a2@(32) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
4f464: 90ae fffc subl %fp@(-4),%d0 <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
4f468: 2553 0030 movel %a3@,%a2@(48) <== NOT EXECUTED
sb->f_namemax = rtems_rfs_fs_max_name (fs);
4f46c: 256b 001c 0034 movel %a3@(28),%a2@(52) <== NOT EXECUTED
return 0;
}
4f472: 266e fff4 moveal %fp@(-12),%a3 <== 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;
4f476: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
4f47a: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
4f47e: 203c 2809 2001 movel #671686657,%d0 <== 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);
4f484: 2548 000c movel %a0,%a2@(12) <== 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;
4f488: 2540 002c movel %d0,%a2@(44) <== NOT EXECUTED
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
4f48c: 4280 clrl %d0 <== 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);
4f48e: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
4f492: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
4f496: 42aa 0018 clrl %a2@(24) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
sb->f_flag = rtems_rfs_fs_flags (fs);
sb->f_namemax = rtems_rfs_fs_max_name (fs);
return 0;
}
4f49a: 246e fff0 moveal %fp@(-16),%a2 <== NOT EXECUTED
4f49e: 4e5e unlk %fp <== NOT EXECUTED
0004f610 <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)
{
4f610: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
4f614: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
4f618: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
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)
{
4f61c: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
4f620: 2629 0008 movel %a1@(8),%d3 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
4f624: 2c28 0008 movel %a0@(8),%d6 <== NOT EXECUTED
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)
{
4f628: 242e 0014 movel %fp@(20),%d2 <== NOT EXECUTED
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),
geteuid(), getegid(), parent);
4f62c: 4eb9 0005 3214 jsr 53214 <getegid> <== NOT EXECUTED
4f632: 3a00 movew %d0,%d5 <== NOT EXECUTED
4f634: 4eb9 0005 3228 jsr 53228 <geteuid> <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
target, strlen (target),
4f63a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
geteuid(), getegid(), parent);
4f63c: 3800 movew %d0,%d4 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
int rc;
rc = rtems_rfs_symlink (fs, node_name, node_name_len,
target, strlen (target),
4f63e: 4eb9 0005 d294 jsr 5d294 <strlen> <== NOT EXECUTED
{
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,
4f644: 2e86 movel %d6,%sp@ <== NOT EXECUTED
4f646: 3f05 movew %d5,%sp@- <== NOT EXECUTED
4f648: 4267 clrw %sp@- <== NOT EXECUTED
4f64a: 3f04 movew %d4,%sp@- <== NOT EXECUTED
4f64c: 4267 clrw %sp@- <== NOT EXECUTED
4f64e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f650: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f652: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f656: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f65a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f65c: 4eb9 0005 96ca jsr 596ca <rtems_rfs_symlink> <== NOT EXECUTED
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
4f662: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
{
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,
4f666: 2400 movel %d0,%d2 <== NOT EXECUTED
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
4f668: 670e beqs 4f678 <rtems_rfs_rtems_symlink+0x68> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("symlink: linking", rc);
4f66a: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f670: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f672: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f674: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f676: 6002 bras 4f67a <rtems_rfs_rtems_symlink+0x6a> <== NOT EXECUTED
}
return 0;
4f678: 4280 clrl %d0 <== NOT EXECUTED
}
4f67a: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED
4f680: 4e5e unlk %fp <== NOT EXECUTED
00059c94 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
59c94: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
59c98: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
59c9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
59c9e: 2468 0080 moveal %a0@(128),%a2 <== NOT EXECUTED
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
59ca2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
59ca4: 2f08 movel %a0,%sp@- <== NOT EXECUTED
59ca6: 4eb9 0005 69b2 jsr 569b2 <rtems_rfs_buffers_release> <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
59cac: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
59cae: 4eb9 0004 a67c jsr 4a67c <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59cb4: 508f addql #8,%sp <== NOT EXECUTED
*/
static inline int
rtems_rfs_mutex_unlock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
59cb6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
59cb8: 672c beqs 59ce6 <rtems_rfs_rtems_unlock+0x52> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
59cba: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
59cbe: 42a7 clrl %sp@- <== NOT EXECUTED
59cc0: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59cc6: 508f addql #8,%sp <== NOT EXECUTED
59cc8: 4a00 tstb %d0 <== NOT EXECUTED
59cca: 671a beqs 59ce6 <rtems_rfs_rtems_unlock+0x52> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
59ccc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59cce: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
59cd4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59cd6: 4879 0006 c79b pea 6c79b <_CPU_m68k_BFFFO_table+0xc92> <== NOT EXECUTED
59cdc: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59ce2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
59ce6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
59cea: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
59cee: 4e5e unlk %fp <== NOT EXECUTED
000501ee <rtems_rfs_rtems_unlock_by_mt_entry>:
static void
rtems_rfs_rtems_unlock_by_mt_entry (
const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
501ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
501f2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
501f6: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
static void
rtems_rfs_rtems_unlock_by_mt_entry (
const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
501fa: 2f0a movel %a2,%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);
501fc: 2468 0080 moveal %a0@(128),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
50200: 2f08 movel %a0,%sp@- <== NOT EXECUTED
50202: 4eb9 0005 69b2 jsr 569b2 <rtems_rfs_buffers_release> <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
50208: 2d52 0008 movel %a2@,%fp@(8) <== NOT EXECUTED
5020c: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
rtems_rfs_rtems_unlock (fs);
}
5020e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
50212: 4e5e unlk %fp <== NOT EXECUTED
50214: 6000 fb6a braw 4fd80 <rtems_rfs_mutex_unlock.isra.19> <== NOT EXECUTED
0004f684 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
4f684: 4e56 ffc4 linkw %fp,#-60 <== NOT EXECUTED
4f688: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f68c: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
4f690: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f694: 2829 0008 movel %a1@(8),%d4 <== 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);
4f698: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f69c: 2a0e movel %fp,%d5 <== NOT EXECUTED
4f69e: 0685 ffff ffda addil #-38,%d5 <== NOT EXECUTED
4f6a4: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f6a6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
4f6aa: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f6ae: 2f04 movel %d4,%sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
4f6b0: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f6b4: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
4f6ba: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
int rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4f6be: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc)
4f6c0: 670c beqs 4f6ce <rtems_rfs_rtems_utime+0x4a> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: read inode", rc);
4f6c2: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f6c8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f6ca: 2086 movel %d6,%a0@ <== NOT EXECUTED
4f6cc: 6062 bras 4f730 <rtems_rfs_rtems_utime+0xac> <== 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);
4f6ce: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f6d2: 7218 moveq #24,%d1 <== NOT EXECUTED
4f6d4: 2003 movel %d3,%d0 <== NOT EXECUTED
4f6d6: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
4f6d8: 1140 0010 moveb %d0,%a0@(16) <== NOT EXECUTED
4f6dc: 2003 movel %d3,%d0 <== NOT EXECUTED
4f6de: 4240 clrw %d0 <== NOT EXECUTED
4f6e0: 4840 swap %d0 <== 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);
4f6e2: 1142 0017 moveb %d2,%a0@(23) <== 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);
4f6e6: 1143 0013 moveb %d3,%a0@(19) <== NOT EXECUTED
4f6ea: 1140 0011 moveb %d0,%a0@(17) <== NOT EXECUTED
4f6ee: 2003 movel %d3,%d0 <== NOT EXECUTED
4f6f0: e088 lsrl #8,%d0 <== NOT EXECUTED
4f6f2: 1140 0012 moveb %d0,%a0@(18) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f6f6: 7001 moveq #1,%d0 <== NOT EXECUTED
4f6f8: 1d40 ffea moveb %d0,%fp@(-22) <== 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);
4f6fc: 2002 movel %d2,%d0 <== NOT EXECUTED
4f6fe: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
4f700: 1140 0014 moveb %d0,%a0@(20) <== NOT EXECUTED
4f704: 2002 movel %d2,%d0 <== NOT EXECUTED
4f706: 4240 clrw %d0 <== NOT EXECUTED
4f708: 4840 swap %d0 <== NOT EXECUTED
4f70a: 1140 0015 moveb %d0,%a0@(21) <== NOT EXECUTED
4f70e: 2002 movel %d2,%d0 <== NOT EXECUTED
4f710: e088 lsrl #8,%d0 <== NOT EXECUTED
4f712: 1140 0016 moveb %d0,%a0@(22) <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
4f716: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f718: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f71a: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
4f720: 508f addql #8,%sp <== NOT EXECUTED
}
rtems_rfs_inode_set_atime (&inode, atime);
rtems_rfs_inode_set_mtime (&inode, mtime);
rc = rtems_rfs_inode_close (fs, &inode);
4f722: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f724: 670e beqs 4f734 <rtems_rfs_rtems_utime+0xb0> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
4f726: 4eb9 0005 b09c jsr 5b09c <__errno> <== NOT EXECUTED
4f72c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f72e: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f730: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f732: 6002 bras 4f736 <rtems_rfs_rtems_utime+0xb2> <== NOT EXECUTED
}
return 0;
4f734: 4280 clrl %d0 <== NOT EXECUTED
}
4f736: 4cee 007c ffc4 moveml %fp@(-60),%d2-%d6 <== NOT EXECUTED
4f73c: 4e5e unlk %fp <== NOT EXECUTED
00056354 <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
56354: 4e56 ffe8 linkw %fp,#-24
56358: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
5635c: 286e 0008 moveal %fp@(8),%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
56360: 246c 0008 moveal %a4@(8),%a2
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56364: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
56368: 266e 000c moveal %fp@(12),%a3
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
5636c: 42a7 clrl %sp@-
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
5636e: 242e 0010 movel %fp@(16),%d2
rtems_rfs_buffer* buffer;
rtems_chain_node* node;
node = rtems_chain_last (chain);
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56372: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56378: 508f addql #8,%sp
5637a: 4a00 tstb %d0
5637c: 677a beqs 563f8 <rtems_rfs_scan_chain+0xa4> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
5637e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56380: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
56382: 4879 0006 ce59 pea 6ce59 <CSWTCH.2+0x119> <== NOT EXECUTED
56388: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5638e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56392: 6064 bras 563f8 <rtems_rfs_scan_chain+0xa4> <== NOT EXECUTED
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56394: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
56398: 42a7 clrl %sp@-
5639a: 4e95 jsr %a5@
5639c: 508f addql #8,%sp
5639e: 4a00 tstb %d0
563a0: 6710 beqs 563b2 <rtems_rfs_scan_chain+0x5e> <== ALWAYS TAKEN
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
563a2: 2f2a 0032 movel %a2@(50),%sp@- <== NOT EXECUTED
563a6: 2043 moveal %d3,%a0 <== NOT EXECUTED
563a8: 4879 0006 ce88 pea 6ce88 <CSWTCH.2+0x148> <== NOT EXECUTED
563ae: 4e90 jsr %a0@ <== NOT EXECUTED
563b0: 508f addql #8,%sp <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
563b2: b4aa 0032 cmpl %a2@(50),%d2
563b6: 663a bnes 563f2 <rtems_rfs_scan_chain+0x9e> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
563b8: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> <== NOT EXECUTED
563bc: 42a7 clrl %sp@- <== NOT EXECUTED
563be: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
563c4: 508f addql #8,%sp <== NOT EXECUTED
563c6: 4a00 tstb %d0 <== NOT EXECUTED
563c8: 6712 beqs 563dc <rtems_rfs_scan_chain+0x88> <== NOT EXECUTED
printf (": found block=%" PRIuPTR "\n",
563ca: 2f2a 0032 movel %a2@(50),%sp@- <== NOT EXECUTED
563ce: 4879 0006 ce8d pea 6ce8d <CSWTCH.2+0x14d> <== NOT EXECUTED
563d4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
563da: 508f addql #8,%sp <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
563dc: 5393 subql #1,%a3@ <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
563de: 2f0a movel %a2,%sp@- <== NOT EXECUTED
563e0: 4eb9 0005 3d78 jsr 53d78 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
563e6: 588f addql #4,%sp <== NOT EXECUTED
563e8: 200a movel %a2,%d0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
563ea: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
563ee: 4292 clrl %a2@ <== NOT EXECUTED
563f0: 6038 bras 5642a <rtems_rfs_scan_chain+0xd6> <== NOT EXECUTED
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
563f2: 246a 0004 moveal %a2@(4),%a2
563f6: 600c bras 56404 <rtems_rfs_scan_chain+0xb0>
563f8: 4bf9 0005 02fc lea 502fc <rtems_rfs_trace>,%a5
while (!rtems_chain_is_head (chain, node))
{
buffer = (rtems_rfs_buffer*) node;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
563fe: 263c 0005 c2b0 movel #377520,%d3
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))
56404: b9ca cmpal %a2,%a4
56406: 668c bnes 56394 <rtems_rfs_scan_chain+0x40>
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56408: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
5640c: 42a7 clrl %sp@-
5640e: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace>
56414: 508f addql #8,%sp
56416: 4a00 tstb %d0
56418: 670e beqs 56428 <rtems_rfs_scan_chain+0xd4> <== ALWAYS TAKEN
printf (": not found\n");
5641a: 4879 0006 cea0 pea 6cea0 <CSWTCH.2+0x160> <== NOT EXECUTED
56420: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
56426: 588f addql #4,%sp <== NOT EXECUTED
return NULL;
56428: 4280 clrl %d0
}
5642a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
56430: 4e5e unlk %fp <== NOT EXECUTED
00054f58 <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,
54f58: 4e56 ffb8 linkw %fp,#-72
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
54f5c: 206e 0010 moveal %fp@(16),%a0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
54f60: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
54f64: 4210 clrb %a0@
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
54f66: 246e 0008 moveal %fp@(8),%a2
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
54f6a: 486e fffc pea %fp@(-4)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
54f6e: 242e 0014 movel %fp@(20),%d2
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
54f72: 2f0a movel %a2,%sp@-
54f74: 4eba ff96 jsr %pc@(54f0c <rtems_rfs_bitmap_load_map>)
if (rc > 0)
54f78: 508f addql #8,%sp
54f7a: 4a80 tstl %d0
54f7c: 6e00 016c bgtw 550ea <rtems_rfs_search_map_for_clear_bit.constprop.1+0x192>
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
54f80: 206e 000c moveal %fp@(12),%a0
end_bit = test_bit + (window * direction);
54f84: 2002 movel %d2,%d0
54f86: 720b moveq #11,%d1
54f88: e3a8 lsll %d1,%d0
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
54f8a: 2c10 movel %a0@,%d6
end_bit = test_bit + (window * direction);
54f8c: d086 addl %d6,%d0
if (end_bit < 0)
54f8e: 6b0e bmis 54f9e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x46><== NEVER TAKEN
end_bit = 0;
else if (end_bit >= control->size)
54f90: 222a 000c movel %a2@(12),%d1
54f94: b280 cmpl %d0,%d1
54f96: 6208 bhis 54fa0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x48><== NEVER TAKEN
end_bit = control->size - 1;
54f98: 2001 movel %d1,%d0
54f9a: 5380 subql #1,%d0
54f9c: 6002 bras 54fa0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x48>
*/
test_bit = *bit;
end_bit = test_bit + (window * direction);
if (end_bit < 0)
end_bit = 0;
54f9e: 4280 clrl %d0 <== NOT EXECUTED
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);
54fa0: 2606 movel %d6,%d3
54fa2: 780a moveq #10,%d4
54fa4: e8a3 asrl %d4,%d3
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);
54fa6: 2206 movel %d6,%d1
54fa8: ea81 asrl #5,%d1
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
54faa: 7e1f moveq #31,%d7
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
54fac: 7a1f moveq #31,%d5
search_bits = &control->search_bits[search_index];
54fae: e58b lsll #2,%d3
54fb0: 266a 0014 moveal %a2@(20),%a3
54fb4: d7c3 addal %d3,%a3
map_bits = &map[map_index];
54fb6: 2601 movel %d1,%d3
54fb8: e58b lsll #2,%d3
54fba: 206e fffc moveal %fp@(-4),%a0
54fbe: d1c3 addal %d3,%a0
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
54fc0: 2602 movel %d2,%d3
54fc2: e58b lsll #2,%d3
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);
54fc4: ce86 andl %d6,%d7
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
54fc6: ca81 andl %d1,%d5
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
54fc8: 2843 moveal %d3,%a4
54fca: 4a82 tstl %d2
54fcc: 6f04 bles 54fd2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x7a><== NEVER TAKEN
54fce: 4283 clrl %d3
54fd0: 6002 bras 54fd4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x7c>
54fd2: 761f moveq #31,%d3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
54fd4: 2802 movel %d2,%d4
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
54fd6: 3a7c 0001 moveaw #1,%a5
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
54fda: eb8c lsll #5,%d4
54fdc: 2d44 fff4 movel %d4,%fp@(-12)
54fe0: 6006 bras 54fe8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x90>
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
54fe2: 7a1f moveq #31,%d5 <== NOT EXECUTED
54fe4: 6002 bras 54fe8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x90><== NOT EXECUTED
54fe6: 4285 clrl %d5 <== NOT EXECUTED
/*
* If any bit is clear find that bit and then search the map element. If
* all bits are set there are no map bits so move to the next search
* element.
*/
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
54fe8: 2d53 fff8 movel %a3@,%fp@(-8)
54fec: 6700 00b4 beqw 550a2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x14a>
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
54ff0: 2801 movel %d1,%d4
54ff2: d882 addl %d2,%d4
54ff4: 9a81 subl %d1,%d5
54ff6: eb8c lsll #5,%d4
54ff8: 2d45 ffe8 movel %d5,%fp@(-24)
54ffc: d883 addl %d3,%d4
54ffe: 2d44 ffe0 movel %d4,%fp@(-32)
55002: 6000 008e braw 55092 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x13a>
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
55006: 2809 movel %a1,%d4
55008: 2a0d movel %a5,%d5
5500a: e9ad lsll %d4,%d5
5500c: 282e fff8 movel %fp@(-8),%d4
55010: c885 andl %d5,%d4
55012: 2d45 ffe4 movel %d5,%fp@(-28)
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
55016: 4a84 tstl %d4
55018: 6754 beqs 5506e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x116><== NEVER TAKEN
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5501a: 9e86 subl %d6,%d7
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
5501c: 2246 moveal %d6,%a1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5501e: 2d47 ffec movel %d7,%fp@(-20)
55022: 603e bras 55062 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x10a>
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
55024: 2a0d movel %a5,%d5
55026: efad lsll %d7,%d5
* 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))
55028: 2c10 movel %a0@,%d6
*/
static bool
rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target,
rtems_rfs_bitmap_bit bit)
{
return RTEMS_RFS_BITMAP_TEST_BIT (target, bit);
5502a: 2e05 movel %d5,%d7
5502c: ca86 andl %d6,%d5
* 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))
5502e: 672c beqs 5505c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x104>
*/
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);
55030: 4687 notl %d7
55032: ce86 andl %d6,%d7
while ((map_offset >= 0)
&& (map_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*map_bits, map_offset))
{
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
55034: 2087 movel %d7,%a0@
if (rtems_rfs_bitmap_match(*map_bits,
55036: 6608 bnes 55040 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xe8><== ALWAYS TAKEN
*/
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);
55038: 2a2e ffe4 movel %fp@(-28),%d5 <== NOT EXECUTED
5503c: 4685 notl %d5 <== NOT EXECUTED
5503e: cb93 andl %d5,%a3@ <== NOT EXECUTED
*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--;
55040: 53aa 0010 subql #1,%a2@(16)
*bit = test_bit;
55044: 206e 000c moveal %fp@(12),%a0
55048: 2089 movel %a1,%a0@
*found = true;
5504a: 206e 0010 moveal %fp@(16),%a0
5504e: 10bc 0001 moveb #1,%a0@
rtems_rfs_buffer_mark_dirty (control->buffer);
55052: 2052 moveal %a2@,%a0
55054: 10bc 0001 moveb #1,%a0@
55058: 6000 008e braw 550e8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x190>
return 0;
}
if (test_bit == end_bit)
5505c: b089 cmpl %a1,%d0
5505e: 670e beqs 5506e <rtems_rfs_search_map_for_clear_bit.constprop.1+0x116><== NEVER TAKEN
break;
map_offset += direction;
test_bit += direction;
55060: d3c2 addal %d2,%a1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55062: 2e2e ffec movel %fp@(-20),%d7
{
/*
* 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)
55066: 781f moveq #31,%d4
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55068: de89 addl %a1,%d7
{
/*
* 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)
5506a: b887 cmpl %d7,%d4
5506c: 64b6 bccs 55024 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xcc><== ALWAYS TAKEN
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
5506e: 2c2e ffe0 movel %fp@(-32),%d6 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
55072: d1cc addal %a4,%a0 <== NOT EXECUTED
map_index += direction;
55074: d282 addl %d2,%d1 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
55076: 4a82 tstl %d2 <== NOT EXECUTED
55078: 6c06 bges 55080 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x128><== NOT EXECUTED
5507a: b086 cmpl %d6,%d0 <== NOT EXECUTED
5507c: 6d0a blts 55088 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x130><== NOT EXECUTED
5507e: 6050 bras 550d0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x178><== NOT EXECUTED
|| ((direction > 0) && (test_bit >= end_bit)))
55080: 4a82 tstl %d2 <== NOT EXECUTED
55082: 6704 beqs 55088 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x130><== NOT EXECUTED
55084: b086 cmpl %d6,%d0 <== NOT EXECUTED
55086: 6f48 bles 550d0 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x178><== NOT EXECUTED
55088: 2a2e fff4 movel %fp@(-12),%d5 <== NOT EXECUTED
if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
{
while ((search_offset >= 0)
&& (search_offset < rtems_rfs_bitmap_element_bits ()))
{
if (!rtems_rfs_bitmap_test (*search_bits, search_offset))
5508c: 2e03 movel %d3,%d7 <== NOT EXECUTED
5508e: dbae ffe0 addl %d5,%fp@(-32) <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55092: 226e ffe8 moveal %fp@(-24),%a1
* 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)
55096: 781f moveq #31,%d4
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55098: d3c1 addal %d1,%a1
* 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)
5509a: b889 cmpl %a1,%d4
5509c: 6400 ff68 bccw 55006 <rtems_rfs_search_map_for_clear_bit.constprop.1+0xae>
550a0: 6030 bras 550d2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x17a><== NOT EXECUTED
*
* Align test_bit either up or down depending on the direction to next 32
* bit boundary.
*/
rtems_rfs_bitmap_bit bits_skipped;
test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1);
550a2: 78e0 moveq #-32,%d4 <== NOT EXECUTED
550a4: cc84 andl %d4,%d6 <== NOT EXECUTED
if (direction > 0)
550a6: 4a82 tstl %d2 <== NOT EXECUTED
550a8: 6f0e bles 550b8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x160><== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
550aa: 7820 moveq #32,%d4 <== NOT EXECUTED
550ac: 9885 subl %d5,%d4 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
550ae: 2a04 movel %d4,%d5 <== NOT EXECUTED
map_offset = 0;
550b0: 4287 clrl %d7 <== 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;
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
550b2: eb8d lsll #5,%d5 <== NOT EXECUTED
550b4: dc85 addl %d5,%d6 <== NOT EXECUTED
550b6: 600c bras 550c4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x16c><== NOT EXECUTED
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
550b8: 2805 movel %d5,%d4 <== NOT EXECUTED
550ba: 5284 addql #1,%d4 <== 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;
map_offset = rtems_rfs_bitmap_element_bits () - 1;
550bc: 7e1f moveq #31,%d7 <== 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;
550be: eb8d lsll #5,%d5 <== NOT EXECUTED
550c0: 4685 notl %d5 <== NOT EXECUTED
550c2: dc85 addl %d5,%d6 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
550c4: 4c02 4800 mulsl %d2,%d4 <== NOT EXECUTED
map_index += direction * bits_skipped;
550c8: d284 addl %d4,%d1 <== 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;
550ca: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED
550ce: 6002 bras 550d2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x17a><== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
550d0: 2e03 movel %d3,%d7 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
550d2: d7cc addal %a4,%a3 <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
550d4: 4a82 tstl %d2 <== NOT EXECUTED
550d6: 6e0a bgts 550e2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x18a><== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
550d8: 670e beqs 550e8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x190><== NOT EXECUTED
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
550da: b086 cmpl %d6,%d0 <== NOT EXECUTED
550dc: 6f00 ff04 blew 54fe2 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x8a><== NOT EXECUTED
550e0: 6006 bras 550e8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x190><== NOT EXECUTED
|| ((direction > 0) && (test_bit <= end_bit)));
550e2: b086 cmpl %d6,%d0 <== NOT EXECUTED
550e4: 6c00 ff00 bgew 54fe6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x8e><== NOT EXECUTED
return 0;
550e8: 4280 clrl %d0
}
550ea: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5
550f0: 4e5e unlk %fp <== NOT EXECUTED
000596ca <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
596ca: 4e56 ff58 linkw %fp,#-168 <== NOT EXECUTED
596ce: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ <== NOT EXECUTED
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
596d2: 42a7 clrl %sp@- <== NOT EXECUTED
596d4: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
596d8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
596dc: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
596e0: 2c2e 0014 movel %fp@(20),%d6 <== NOT EXECUTED
596e4: 262e 0018 movel %fp@(24),%d3 <== NOT EXECUTED
596e8: 282e 0024 movel %fp@(36),%d4 <== NOT EXECUTED
596ec: 3a2e 001e movew %fp@(30),%d5 <== NOT EXECUTED
596f0: 3e2e 0022 movew %fp@(34),%d7 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
596f4: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
596fa: 508f addql #8,%sp <== NOT EXECUTED
596fc: 4a00 tstb %d0 <== NOT EXECUTED
596fe: 660a bnes 5970a <rtems_rfs_symlink+0x40> <== NOT EXECUTED
printf (" link:");
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
59700: b6aa 0008 cmpl %a2@(8),%d3 <== NOT EXECUTED
59704: 6400 0224 bccw 5992a <rtems_rfs_symlink+0x260> <== NOT EXECUTED
59708: 605a bras 59764 <rtems_rfs_symlink+0x9a> <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
5970a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5970c: 4879 0006 e1cc pea 6e1cc <CSWTCH.2+0x148c> <== NOT EXECUTED
for (c = 0; c < length; c++)
59712: 2642 moveal %d2,%a3 <== NOT EXECUTED
printf ("%c", name[c]);
59714: 49f9 0005 c440 lea 5c440 <putchar>,%a4 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
5971a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
59720: 508f addql #8,%sp <== NOT EXECUTED
59722: 600a bras 5972e <rtems_rfs_symlink+0x64> <== NOT EXECUTED
printf ("%c", name[c]);
59724: 101b moveb %a3@+,%d0 <== NOT EXECUTED
59726: 49c0 extbl %d0 <== NOT EXECUTED
59728: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5972a: 4e94 jsr %a4@ <== NOT EXECUTED
5972c: 588f addql #4,%sp <== NOT EXECUTED
return rc;
}
int
rtems_rfs_symlink (rtems_rfs_file_system* fs,
5972e: 200b movel %a3,%d0 <== NOT EXECUTED
59730: 9082 subl %d2,%d0 <== 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++)
59732: b0ae 0010 cmpl %fp@(16),%d0 <== NOT EXECUTED
59736: 6dec blts 59724 <rtems_rfs_symlink+0x5a> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
59738: 4879 0006 e1f1 pea 6e1f1 <CSWTCH.2+0x14b1> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
5973e: 2646 moveal %d6,%a3 <== NOT EXECUTED
printf ("%c", link[c]);
59740: 49f9 0005 c440 lea 5c440 <putchar>,%a4 <== NOT EXECUTED
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (" link:");
59746: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
5974c: 588f addql #4,%sp <== NOT EXECUTED
5974e: 600a bras 5975a <rtems_rfs_symlink+0x90> <== NOT EXECUTED
printf ("%c", link[c]);
59750: 101b moveb %a3@+,%d0 <== NOT EXECUTED
59752: 49c0 extbl %d0 <== NOT EXECUTED
59754: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59756: 4e94 jsr %a4@ <== NOT EXECUTED
59758: 588f addql #4,%sp <== NOT EXECUTED
return rc;
}
int
rtems_rfs_symlink (rtems_rfs_file_system* fs,
5975a: 200b movel %a3,%d0 <== NOT EXECUTED
5975c: 9086 subl %d6,%d0 <== 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++)
5975e: b680 cmpl %d0,%d3 <== NOT EXECUTED
59760: 6eee bgts 59750 <rtems_rfs_symlink+0x86> <== NOT EXECUTED
59762: 609c bras 59700 <rtems_rfs_symlink+0x36> <== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
59764: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59766: 4eb9 0005 d294 jsr 5d294 <strlen> <== NOT EXECUTED
5976c: 588f addql #4,%sp <== NOT EXECUTED
5976e: 486e ff7e pea %fp@(-130) <== NOT EXECUTED
59772: 3f07 movew %d7,%sp@- <== NOT EXECUTED
59774: 4267 clrw %sp@- <== NOT EXECUTED
59776: 3f05 movew %d5,%sp@- <== NOT EXECUTED
59778: 4267 clrw %sp@- <== NOT EXECUTED
5977a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5977e: 2f3c 0000 a1ff movel #41471,%sp@- <== NOT EXECUTED
59784: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59786: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59788: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5978a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5978c: 4eb9 0004 efd6 jsr 4efd6 <rtems_rfs_inode_create> <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
59792: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
59796: 2400 movel %d0,%d2 <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
59798: 6e00 0192 bgtw 5992c <rtems_rfs_symlink+0x262> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5979c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
597a0: 280e movel %fp,%d4 <== NOT EXECUTED
597a2: 0684 ffff ff90 addil #-112,%d4 <== NOT EXECUTED
597a8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
597aa: 2f2e ff7e movel %fp@(-130),%sp@- <== NOT EXECUTED
597ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED
597b0: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
597b6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
597ba: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
597bc: 6e00 016e bgtw 5992c <rtems_rfs_symlink+0x262> <== NOT EXECUTED
/*
* 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)
597c0: 7013 moveq #19,%d0 <== NOT EXECUTED
597c2: b083 cmpl %d3,%d0 <== NOT EXECUTED
597c4: 6554 bcss 5981a <rtems_rfs_symlink+0x150> <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
597c6: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
597ca: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
597ce: 41e8 001c lea %a0@(28),%a0 <== NOT EXECUTED
597d2: 42a7 clrl %sp@- <== NOT EXECUTED
597d4: 2f08 movel %a0,%sp@- <== NOT EXECUTED
597d6: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
memcpy (inode.node->data.name, link, link_length);
597dc: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
597e0: 41e8 001c lea %a0@(28),%a0 <== NOT EXECUTED
597e4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
597e6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
597e8: 2f08 movel %a0,%sp@- <== NOT EXECUTED
597ea: 4eb9 0005 bffc jsr 5bffc <memcpy> <== NOT EXECUTED
* @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);
597f0: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
597f4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
* @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);
597f8: 4200 clrb %d0 <== NOT EXECUTED
597fa: 1140 000c moveb %d0,%a0@(12) <== NOT EXECUTED
597fe: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
59802: 1140 000d moveb %d0,%a0@(13) <== NOT EXECUTED
59806: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5980a: 1140 000e moveb %d0,%a0@(14) <== NOT EXECUTED
5980e: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
59812: 1140 000f moveb %d0,%a0@(15) <== NOT EXECUTED
59816: 6000 00e0 braw 598f8 <rtems_rfs_symlink+0x22e> <== NOT EXECUTED
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);
5981a: 2a0e movel %fp,%d5 <== NOT EXECUTED
5981c: 0685 ffff ffb6 addil #-74,%d5 <== NOT EXECUTED
59822: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59824: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59826: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59828: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5982e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
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);
59832: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59834: 6f04 bles 5983a <rtems_rfs_symlink+0x170> <== NOT EXECUTED
59836: 6000 00b4 braw 598ec <rtems_rfs_symlink+0x222> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
5983a: 486e ff82 pea %fp@(-126) <== NOT EXECUTED
5983e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59842: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59844: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59846: 4eb9 0005 5d72 jsr 55d72 <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
5984c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
59850: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59852: 6f02 bles 59856 <rtems_rfs_symlink+0x18c> <== NOT EXECUTED
59854: 602a bras 59880 <rtems_rfs_symlink+0x1b6> <== 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);
59856: 42a7 clrl %sp@- <== NOT EXECUTED
59858: 2f2e ff82 movel %fp@(-126),%sp@- <== NOT EXECUTED
5985c: 47ee ff86 lea %fp@(-122),%a3 <== NOT EXECUTED
59860: 2f0b movel %a3,%sp@- <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
59862: 4200 clrb %d0 <== NOT EXECUTED
59864: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59866: 1d40 ff86 moveb %d0,%fp@(-122) <== NOT EXECUTED
handle->bnum = 0;
5986a: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
5986e: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
59872: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
59878: 4fef 0010 lea %sp@(16),%sp <== 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);
5987c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5987e: 6f1c bles 5989c <rtems_rfs_symlink+0x1d2> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
59880: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59882: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59884: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5988a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5988c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5988e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
59894: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59898: 6000 0092 braw 5992c <rtems_rfs_symlink+0x262> <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
5989c: 206e ff8c moveal %fp@(-116),%a0 <== NOT EXECUTED
598a0: 2428 001a movel %a0@(26),%d2 <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
598a4: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
598a8: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
598ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
598ae: 4eb9 0005 c160 jsr 5c160 <memset> <== NOT EXECUTED
memcpy (data, link, link_length);
598b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
598b6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
598b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
598ba: 4eb9 0005 bffc jsr 5bffc <memcpy> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
598c0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
598c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
598c4: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_close (fs, &map);
598ca: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
598ce: 2e85 movel %d5,%sp@ <== NOT EXECUTED
handle->dirty = false;
598d0: 4200 clrb %d0 <== NOT EXECUTED
598d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
598d4: 1d40 ff86 moveb %d0,%fp@(-122) <== NOT EXECUTED
handle->bnum = 0;
598d8: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
598dc: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
598e0: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
598e6: 508f addql #8,%sp <== 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);
598e8: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
598ea: 6f0c bles 598f8 <rtems_rfs_symlink+0x22e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
598ec: 2f04 movel %d4,%sp@- <== NOT EXECUTED
598ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
598f0: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
598f6: 602e bras 59926 <rtems_rfs_symlink+0x25c> <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
598f8: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
return rc;
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
598fc: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED
59902: 2003 movel %d3,%d0 <== NOT EXECUTED
59904: e088 lsrl #8,%d0 <== NOT EXECUTED
59906: 1140 000a moveb %d0,%a0@(10) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5990a: 7001 moveq #1,%d0 <== NOT EXECUTED
*/
static inline void
rtems_rfs_inode_set_block_offset (rtems_rfs_inode_handle* handle,
uint16_t block_offset)
{
rtems_rfs_write_u16 (&handle->node->block_offset, block_offset);
5990c: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
59910: 1143 000b moveb %d3,%a0@(11) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59914: 1d40 ffa0 moveb %d0,%fp@(-96) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
59918: 486e ff90 pea %fp@(-112) <== NOT EXECUTED
5991c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5991e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
59924: 2400 movel %d0,%d2 <== NOT EXECUTED
59926: 508f addql #8,%sp <== NOT EXECUTED
59928: 6002 bras 5992c <rtems_rfs_symlink+0x262> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
printf ("%c", link[c]);
}
if (link_length >= rtems_rfs_fs_block_size (fs))
return ENAMETOOLONG;
5992a: 745b moveq #91,%d2 <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5992c: 2002 movel %d2,%d0 <== NOT EXECUTED
5992e: 4cee 1cfc ff58 moveml %fp@(-168),%d2-%d7/%a2-%a4 <== NOT EXECUTED
59934: 4e5e unlk %fp <== NOT EXECUTED
00059938 <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)
{
59938: 4e56 ff64 linkw %fp,#-156 <== NOT EXECUTED
5993c: 48d7 04fc moveml %d2-%d7/%a2,%sp@ <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
59940: 42a7 clrl %sp@- <== NOT EXECUTED
59942: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
rtems_rfs_symlink_read (rtems_rfs_file_system* fs,
rtems_rfs_ino link,
char* path,
size_t size,
size_t* length)
{
59946: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
5994a: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
5994e: 2c2e 0010 movel %fp@(16),%d6 <== NOT EXECUTED
59952: 282e 0014 movel %fp@(20),%d4 <== NOT EXECUTED
59956: 246e 0018 moveal %fp@(24),%a2 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
5995a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59960: 508f addql #8,%sp <== NOT EXECUTED
59962: 4a00 tstb %d0 <== NOT EXECUTED
59964: 6710 beqs 59976 <rtems_rfs_symlink_read+0x3e> <== NOT EXECUTED
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
59966: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59968: 4879 0006 e1f8 pea 6e1f8 <CSWTCH.2+0x14b8> <== NOT EXECUTED
5996e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59974: 508f addql #8,%sp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
59976: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5997a: 2a0e movel %fp,%d5 <== NOT EXECUTED
5997c: 0685 ffff ff90 addil #-112,%d5 <== NOT EXECUTED
59982: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59984: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59986: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59988: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
5998e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
rc = rtems_rfs_inode_open (fs, link, &inode, true);
59992: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
59994: 6600 016c bnew 59b02 <rtems_rfs_symlink_read+0x1ca> <== NOT EXECUTED
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
59998: 206e ff9c moveal %fp@(-100),%a0 <== 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);
5999c: 4280 clrl %d0 <== NOT EXECUTED
5999e: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
599a2: e188 lsll #8,%d0 <== NOT EXECUTED
599a4: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
599aa: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
599b0: 6714 beqs 599c6 <rtems_rfs_symlink_read+0x8e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
599b2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
return EINVAL;
599b4: 163c 0016 moveb #22,%d3 <== NOT EXECUTED
if (rc)
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
{
rtems_rfs_inode_close (fs, &inode);
599b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
599ba: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
599c0: 508f addql #8,%sp <== NOT EXECUTED
599c2: 6000 013e braw 59b02 <rtems_rfs_symlink_read+0x1ca> <== 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);
599c6: 4280 clrl %d0 <== NOT EXECUTED
599c8: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
599cc: 4281 clrl %d1 <== NOT EXECUTED
599ce: 1228 000b moveb %a0@(11),%d1 <== NOT EXECUTED
599d2: e188 lsll #8,%d0 <== NOT EXECUTED
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
599d4: 8081 orl %d1,%d0 <== NOT EXECUTED
if (size < *length)
599d6: b084 cmpl %d4,%d0 <== NOT EXECUTED
599d8: 6204 bhis 599de <rtems_rfs_symlink_read+0xa6> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
599da: 2480 movel %d0,%a2@ <== NOT EXECUTED
599dc: 6002 bras 599e0 <rtems_rfs_symlink_read+0xa8> <== NOT EXECUTED
if (size < *length)
{
*length = size;
599de: 2484 movel %d4,%a2@ <== 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);
599e0: 4280 clrl %d0 <== NOT EXECUTED
599e2: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
599e6: 7218 moveq #24,%d1 <== NOT EXECUTED
599e8: e3a8 lsll %d1,%d0 <== NOT EXECUTED
599ea: 4281 clrl %d1 <== NOT EXECUTED
599ec: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
599f0: 4841 swap %d1 <== NOT EXECUTED
599f2: 4241 clrw %d1 <== NOT EXECUTED
599f4: 8081 orl %d1,%d0 <== NOT EXECUTED
599f6: 4281 clrl %d1 <== NOT EXECUTED
599f8: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
599fc: 8081 orl %d1,%d0 <== NOT EXECUTED
599fe: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
59a02: e189 lsll #8,%d1 <== NOT EXECUTED
59a04: 8081 orl %d1,%d0 <== NOT EXECUTED
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
59a06: 6616 bnes 59a1e <rtems_rfs_symlink_read+0xe6> <== NOT EXECUTED
{
memcpy (path, inode.node->data.name, *length);
59a08: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
59a0a: 4868 001c pea %a0@(28) <== NOT EXECUTED
59a0e: 2f06 movel %d6,%sp@- <== NOT EXECUTED
59a10: 4eb9 0005 bffc jsr 5bffc <memcpy> <== NOT EXECUTED
59a16: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
59a1a: 6000 00d6 braw 59af2 <rtems_rfs_symlink_read+0x1ba> <== 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);
59a1e: 2a0e movel %fp,%d5 <== NOT EXECUTED
59a20: 0685 ffff ffb6 addil #-74,%d5 <== NOT EXECUTED
59a26: 280e movel %fp,%d4 <== NOT EXECUTED
59a28: 0684 ffff ff90 addil #-112,%d4 <== NOT EXECUTED
59a2e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59a30: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59a32: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59a34: 4eb9 0005 5894 jsr 55894 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
59a3a: 4fef 000c lea %sp@(12),%sp <== 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);
59a3e: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59a40: 6f04 bles 59a46 <rtems_rfs_symlink_read+0x10e> <== NOT EXECUTED
59a42: 6000 00a2 braw 59ae6 <rtems_rfs_symlink_read+0x1ae> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
59a46: 486e ff82 pea %fp@(-126) <== NOT EXECUTED
59a4a: 42a7 clrl %sp@- <== NOT EXECUTED
59a4c: 42a7 clrl %sp@- <== NOT EXECUTED
59a4e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59a50: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59a52: 4eb9 0005 5cc2 jsr 55cc2 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
59a58: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
59a5c: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59a5e: 6f02 bles 59a62 <rtems_rfs_symlink_read+0x12a> <== NOT EXECUTED
59a60: 602e bras 59a90 <rtems_rfs_symlink_read+0x158> <== 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);
59a62: 42a7 clrl %sp@- <== NOT EXECUTED
59a64: 2f2e ff82 movel %fp@(-126),%sp@- <== NOT EXECUTED
59a68: 2e0e movel %fp,%d7 <== NOT EXECUTED
59a6a: 0687 ffff ff86 addil #-122,%d7 <== NOT EXECUTED
59a70: 2f07 movel %d7,%sp@- <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
59a72: 4200 clrb %d0 <== NOT EXECUTED
59a74: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59a76: 1d40 ff86 moveb %d0,%fp@(-122) <== NOT EXECUTED
handle->bnum = 0;
59a7a: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
59a7e: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
59a82: 4eb9 0005 65b0 jsr 565b0 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
59a88: 4fef 0010 lea %sp@(16),%sp <== 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);
59a8c: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59a8e: 6f1a bles 59aaa <rtems_rfs_symlink_read+0x172> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
59a90: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59a92: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59a94: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
59a9a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59a9c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59a9e: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
59aa4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59aa8: 6058 bras 59b02 <rtems_rfs_symlink_read+0x1ca> <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
59aaa: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
59aac: 206e ff8c moveal %fp@(-116),%a0 <== NOT EXECUTED
59ab0: 2f28 001a movel %a0@(26),%sp@- <== NOT EXECUTED
59ab4: 2f06 movel %d6,%sp@- <== NOT EXECUTED
59ab6: 4eb9 0005 bffc jsr 5bffc <memcpy> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_close (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
rtems_rfs_buffer_handle_release (fs, handle);
59abc: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59abe: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59ac0: 4eb9 0005 6434 jsr 56434 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
59ac6: 4201 clrb %d1 <== 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);
59ac8: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59aca: 1d41 ff86 moveb %d1,%fp@(-122) <== NOT EXECUTED
59ace: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
59ad0: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
59ad4: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
59ad8: 4eb9 0005 5a16 jsr 55a16 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
59ade: 4fef 001c lea %sp@(28),%sp <== 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);
59ae2: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59ae4: 6f0c bles 59af2 <rtems_rfs_symlink_read+0x1ba> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
59ae6: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59ae8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59aea: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
59af0: 600e bras 59b00 <rtems_rfs_symlink_read+0x1c8> <== NOT EXECUTED
return rc;
}
}
rc = rtems_rfs_inode_close (fs, &inode);
59af2: 486e ff90 pea %fp@(-112) <== NOT EXECUTED
59af6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59af8: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
59afe: 2600 movel %d0,%d3 <== NOT EXECUTED
59b00: 508f addql #8,%sp <== NOT EXECUTED
return rc;
}
59b02: 2003 movel %d3,%d0 <== NOT EXECUTED
59b04: 4cee 04fc ff64 moveml %fp@(-156),%d2-%d7/%a2 <== NOT EXECUTED
59b0a: 4e5e unlk %fp <== NOT EXECUTED
...
0005034e <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
5034e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
50352: 2239 0007 fd2c movel 7fd2c <rtems_rfs_trace_flags+0x4>,%d1 <== NOT EXECUTED
return state;
}
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
50358: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
5035a: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
5035e: 4683 notl %d3 <== NOT EXECUTED
return state;
}
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
50360: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
50362: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
50366: 4682 notl %d2 <== 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;
50368: 2039 0007 fd28 movel 7fd28 <rtems_rfs_trace_flags>,%d0 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
5036e: c481 andl %d1,%d2 <== NOT EXECUTED
50370: c680 andl %d0,%d3 <== NOT EXECUTED
50372: 23c2 0007 fd2c movel %d2,7fd2c <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
return state;
}
50378: 241f movel %sp@+,%d2 <== 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;
5037a: 23c3 0007 fd28 movel %d3,7fd28 <rtems_rfs_trace_flags> <== NOT EXECUTED
return state;
}
50380: 261f movel %sp@+,%d3 <== NOT EXECUTED
50382: 4e5e unlk %fp <== NOT EXECUTED
0005031e <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
5031e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
50322: 2039 0007 fd28 movel 7fd28 <rtems_rfs_trace_flags>,%d0 <== NOT EXECUTED
return result;
}
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
50328: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
5032a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
5032e: 8480 orl %d0,%d2 <== 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;
50330: 2239 0007 fd2c movel 7fd2c <rtems_rfs_trace_flags+0x4>,%d1 <== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
50336: 23c2 0007 fd28 movel %d2,7fd28 <rtems_rfs_trace_flags> <== NOT EXECUTED
5033c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
50340: 8481 orl %d1,%d2 <== NOT EXECUTED
50342: 23c2 0007 fd2c movel %d2,7fd2c <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
return state;
}
50348: 241f movel %sp@+,%d2 <== NOT EXECUTED
5034a: 4e5e unlk %fp <== NOT EXECUTED
00050386 <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
50386: 4e56 ff30 linkw %fp,#-208 <== NOT EXECUTED
5038a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
const char* table[] =
5038e: 4878 009c pea 9c <DBL_MANT_DIG+0x67> <== NOT EXECUTED
50392: 45ee ff64 lea %fp@(-156),%a2 <== NOT EXECUTED
50396: 4879 0006 cb0e pea 6cb0e <rtems_rfs_rtems_eval_config+0x272><== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
5039c: 7e01 moveq #1,%d7 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
5039e: 47f9 0005 cc78 lea 5cc78 <strcmp>,%a3 <== NOT EXECUTED
503a4: 4bf9 0006 835c lea 6835c <__ashldi3>,%a5 <== NOT EXECUTED
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
const char* table[] =
503aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
503ac: 7c01 moveq #1,%d6 <== NOT EXECUTED
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
const char* table[] =
503ae: 4eb9 0005 bffc jsr 5bffc <memcpy> <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
503b4: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
503b8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
503bc: 588c addql #4,%a4 <== NOT EXECUTED
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
503be: 4284 clrl %d4 <== NOT EXECUTED
503c0: 4285 clrl %d5 <== NOT EXECUTED
"file-close",
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
503c2: 4282 clrl %d2 <== NOT EXECUTED
503c4: 4283 clrl %d3 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
503c6: 6000 0158 braw 50520 <rtems_rfs_trace_shell_command+0x19a><== NOT EXECUTED
{
if (argv[arg][0] == '-')
503ca: 245c moveal %a4@+,%a2 <== NOT EXECUTED
503cc: 722d moveq #45,%d1 <== NOT EXECUTED
503ce: 1012 moveb %a2@,%d0 <== NOT EXECUTED
503d0: 49c0 extbl %d0 <== NOT EXECUTED
503d2: b280 cmpl %d0,%d1 <== NOT EXECUTED
503d4: 6674 bnes 5044a <rtems_rfs_trace_shell_command+0xc4><== NOT EXECUTED
{
switch (argv[arg][1])
503d6: 123c 0068 moveb #104,%d1 <== NOT EXECUTED
503da: 102a 0001 moveb %a2@(1),%d0 <== NOT EXECUTED
503de: 49c0 extbl %d0 <== NOT EXECUTED
503e0: b280 cmpl %d0,%d1 <== NOT EXECUTED
503e2: 670a beqs 503ee <rtems_rfs_trace_shell_command+0x68><== NOT EXECUTED
503e4: 123c 006c moveb #108,%d1 <== NOT EXECUTED
503e8: b280 cmpl %d0,%d1 <== NOT EXECUTED
503ea: 664a bnes 50436 <rtems_rfs_trace_shell_command+0xb0><== NOT EXECUTED
503ec: 6016 bras 50404 <rtems_rfs_trace_shell_command+0x7e><== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
503ee: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
503f2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
503f4: 4879 0006 c8c8 pea 6c8c8 <rtems_rfs_rtems_eval_config+0x2c><== NOT EXECUTED
503fa: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
50400: 508f addql #8,%sp <== NOT EXECUTED
50402: 602c bras 50430 <rtems_rfs_trace_shell_command+0xaa><== NOT EXECUTED
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
50404: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
50408: 47f9 0005 c2b0 lea 5c2b0 <printf>,%a3 <== NOT EXECUTED
5040e: 45ee ff64 lea %fp@(-156),%a2 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
50412: 240e movel %fp,%d2 <== 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]);
50414: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
50416: 4879 0006 c8ed pea 6c8ed <rtems_rfs_rtems_eval_config+0x51><== NOT EXECUTED
5041c: 4e93 jsr %a3@ <== NOT EXECUTED
5041e: 600a bras 5042a <rtems_rfs_trace_shell_command+0xa4><== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
50420: 2f1a movel %a2@+,%sp@- <== NOT EXECUTED
50422: 4879 0006 c913 pea 6c913 <rtems_rfs_rtems_eval_config+0x77><== NOT EXECUTED
50428: 4e93 jsr %a3@ <== NOT EXECUTED
5042a: 508f addql #8,%sp <== 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++)
5042c: b48a cmpl %a2,%d2 <== NOT EXECUTED
5042e: 66f0 bnes 50420 <rtems_rfs_trace_shell_command+0x9a><== NOT EXECUTED
printf (" %s\n", table[t]);
return 0;
50430: 4280 clrl %d0 <== NOT EXECUTED
50432: 6000 00f8 braw 5052c <rtems_rfs_trace_shell_command+0x1a6><== NOT EXECUTED
default:
printf ("error: unknown option\n");
50436: 4879 0006 c919 pea 6c919 <rtems_rfs_rtems_eval_config+0x7d><== NOT EXECUTED
5043c: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
50442: 588f addql #4,%sp <== NOT EXECUTED
return 1;
50444: 7001 moveq #1,%d0 <== NOT EXECUTED
50446: 6000 00e4 braw 5052c <rtems_rfs_trace_shell_command+0x1a6><== NOT EXECUTED
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
5044a: 4879 0006 cb0a pea 6cb0a <rtems_rfs_rtems_eval_config+0x26e><== NOT EXECUTED
50450: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50452: 4e93 jsr %a3@ <== NOT EXECUTED
50454: 508f addql #8,%sp <== NOT EXECUTED
50456: 4a80 tstl %d0 <== NOT EXECUTED
50458: 6602 bnes 5045c <rtems_rfs_trace_shell_command+0xd6><== NOT EXECUTED
set = true;
5045a: 7c01 moveq #1,%d6 <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
5045c: 4879 0006 c92f pea 6c92f <rtems_rfs_rtems_eval_config+0x93><== NOT EXECUTED
50462: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50464: 4e93 jsr %a3@ <== NOT EXECUTED
50466: 508f addql #8,%sp <== NOT EXECUTED
50468: 4a80 tstl %d0 <== NOT EXECUTED
5046a: 6774 beqs 504e0 <rtems_rfs_trace_shell_command+0x15a><== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
5046c: 4879 0006 e4ee pea 6e4ee <_global_impure_ptr+0x54> <== NOT EXECUTED
50472: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50474: 4e93 jsr %a3@ <== NOT EXECUTED
50476: 508f addql #8,%sp <== NOT EXECUTED
50478: 4a80 tstl %d0 <== NOT EXECUTED
5047a: 6708 beqs 50484 <rtems_rfs_trace_shell_command+0xfe><== NOT EXECUTED
5047c: 41ee ff64 lea %fp@(-156),%a0 <== NOT EXECUTED
50480: 4281 clrl %d1 <== NOT EXECUTED
50482: 600a bras 5048e <rtems_rfs_trace_shell_command+0x108><== NOT EXECUTED
{
if (set)
50484: 4a06 tstb %d6 <== NOT EXECUTED
50486: 675c beqs 504e4 <rtems_rfs_trace_shell_command+0x15e><== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
50488: 74ff moveq #-1,%d2 <== NOT EXECUTED
5048a: 76ff moveq #-1,%d3 <== NOT EXECUTED
5048c: 605a bras 504e8 <rtems_rfs_trace_shell_command+0x162><== NOT EXECUTED
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
{
if (strcmp (argv[arg], table[t]) == 0)
5048e: 2f18 movel %a0@+,%sp@- <== NOT EXECUTED
50490: 2d41 ff60 movel %d1,%fp@(-160) <== NOT EXECUTED
50494: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50496: 2d48 ff5c movel %a0,%fp@(-164) <== NOT EXECUTED
5049a: 4e93 jsr %a3@ <== NOT EXECUTED
5049c: 222e ff60 movel %fp@(-160),%d1 <== NOT EXECUTED
504a0: 508f addql #8,%sp <== NOT EXECUTED
504a2: 206e ff5c moveal %fp@(-164),%a0 <== NOT EXECUTED
504a6: 4a80 tstl %d0 <== NOT EXECUTED
504a8: 662c bnes 504d6 <rtems_rfs_trace_shell_command+0x150><== NOT EXECUTED
{
if (set)
504aa: 4a06 tstb %d6 <== NOT EXECUTED
504ac: 6714 beqs 504c2 <rtems_rfs_trace_shell_command+0x13c><== NOT EXECUTED
set_value = 1ULL << t;
504ae: 2f01 movel %d1,%sp@- <== NOT EXECUTED
504b0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
504b4: 42a7 clrl %sp@- <== NOT EXECUTED
504b6: 4e95 jsr %a5@ <== NOT EXECUTED
504b8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
504bc: 2400 movel %d0,%d2 <== NOT EXECUTED
504be: 2601 movel %d1,%d3 <== NOT EXECUTED
504c0: 6026 bras 504e8 <rtems_rfs_trace_shell_command+0x162><== NOT EXECUTED
else
clear_value = 1ULL << t;
504c2: 2f01 movel %d1,%sp@- <== NOT EXECUTED
504c4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
504c8: 42a7 clrl %sp@- <== NOT EXECUTED
504ca: 4e95 jsr %a5@ <== NOT EXECUTED
504cc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
504d0: 2800 movel %d0,%d4 <== NOT EXECUTED
504d2: 2a01 movel %d1,%d5 <== NOT EXECUTED
504d4: 6012 bras 504e8 <rtems_rfs_trace_shell_command+0x162><== NOT EXECUTED
else
clear_value = RTEMS_RFS_TRACE_ALL;
}
else
{
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
504d6: 5281 addql #1,%d1 <== NOT EXECUTED
504d8: 7027 moveq #39,%d0 <== NOT EXECUTED
504da: b081 cmpl %d1,%d0 <== NOT EXECUTED
504dc: 66b0 bnes 5048e <rtems_rfs_trace_shell_command+0x108><== NOT EXECUTED
504de: 6008 bras 504e8 <rtems_rfs_trace_shell_command+0x162><== NOT EXECUTED
else
{
if (strcmp (argv[arg], "set") == 0)
set = true;
if (strcmp (argv[arg], "clear") == 0)
set = false;
504e0: 4206 clrb %d6 <== NOT EXECUTED
504e2: 6004 bras 504e8 <rtems_rfs_trace_shell_command+0x162><== NOT EXECUTED
else if (strcmp (argv[arg], "all") == 0)
{
if (set)
set_value = RTEMS_RFS_TRACE_ALL;
else
clear_value = RTEMS_RFS_TRACE_ALL;
504e4: 78ff moveq #-1,%d4 <== NOT EXECUTED
504e6: 7aff moveq #-1,%d5 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
504e8: 2005 movel %d5,%d0 <== NOT EXECUTED
504ea: 4680 notl %d0 <== NOT EXECUTED
504ec: 2440 moveal %d0,%a2 <== NOT EXECUTED
504ee: 2204 movel %d4,%d1 <== NOT EXECUTED
504f0: 4681 notl %d1 <== NOT EXECUTED
504f2: 2241 moveal %d1,%a1 <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
504f4: 5287 addql #1,%d7 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_trace_flags |= set_value;
504f6: 2039 0007 fd2c movel 7fd2c <rtems_rfs_trace_flags+0x4>,%d0 <== NOT EXECUTED
504fc: 2239 0007 fd28 movel 7fd28 <rtems_rfs_trace_flags>,%d1 <== NOT EXECUTED
50502: 8083 orl %d3,%d0 <== NOT EXECUTED
50504: 8282 orl %d2,%d1 <== NOT EXECUTED
50506: 2d40 ff58 movel %d0,%fp@(-168) <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
5050a: 2009 movel %a1,%d0 <== NOT EXECUTED
5050c: c081 andl %d1,%d0 <== NOT EXECUTED
5050e: 220a movel %a2,%d1 <== NOT EXECUTED
50510: c2ae ff58 andl %fp@(-168),%d1 <== NOT EXECUTED
50514: 23c0 0007 fd28 movel %d0,7fd28 <rtems_rfs_trace_flags> <== NOT EXECUTED
5051a: 23c1 0007 fd2c movel %d1,7fd2c <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
rtems_rfs_trace_mask clear_value = 0;
bool set = true;
int arg;
int t;
for (arg = 1; arg < argc; arg++)
50520: beae 0008 cmpl %fp@(8),%d7 <== NOT EXECUTED
50524: 6d00 fea4 bltw 503ca <rtems_rfs_trace_shell_command+0x44><== NOT EXECUTED
50528: 6000 ff06 braw 50430 <rtems_rfs_trace_shell_command+0xaa><== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
5052c: 4cee 3cfc ff30 moveml %fp@(-208),%d2-%d7/%a2-%a5 <== NOT EXECUTED
50532: 4e5e unlk %fp <== NOT EXECUTED
...
00059340 <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)
{
59340: 4e56 ff98 linkw %fp,#-104 <== NOT EXECUTED
59344: 48d7 04fc moveml %d2-%d7/%a2,%sp@ <== NOT EXECUTED
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59348: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
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)
{
5934e: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59352: 42a7 clrl %sp@- <== NOT EXECUTED
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)
{
59354: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED
59358: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED
5935c: 2e2e 0018 movel %fp@(24),%d7 <== NOT EXECUTED
rtems_rfs_inode_handle target_inode;
uint16_t links;
bool dir;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59360: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59366: 508f addql #8,%sp <== NOT EXECUTED
59368: 4a00 tstb %d0 <== NOT EXECUTED
5936a: 6714 beqs 59380 <rtems_rfs_unlink+0x40> <== NOT EXECUTED
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
5936c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5936e: 2f06 movel %d6,%sp@- <== NOT EXECUTED
59370: 4879 0006 e01e pea 6e01e <CSWTCH.2+0x12de> <== NOT EXECUTED
59376: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5937c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
59380: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59384: 45ee ffda lea %fp@(-38),%a2 <== NOT EXECUTED
59388: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5938a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5938c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5938e: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59394: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
59398: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5939a: 6600 0322 bnew 596be <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
/*
* If a directory process the unlink mode.
*/
dir = RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&target_inode));
5939e: 206e ffe6 moveal %fp@(-26),%a0 <== 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);
593a2: 4280 clrl %d0 <== NOT EXECUTED
593a4: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
593a8: e188 lsll #8,%d0 <== NOT EXECUTED
593aa: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
593b0: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
593b6: 57c5 seq %d5 <== NOT EXECUTED
593b8: 4485 negl %d5 <== NOT EXECUTED
if (dir)
593ba: 4a05 tstb %d5 <== NOT EXECUTED
593bc: 677e beqs 5943c <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
{
switch (dir_mode)
593be: 4a87 tstl %d7 <== NOT EXECUTED
593c0: 6708 beqs 593ca <rtems_rfs_unlink+0x8a> <== NOT EXECUTED
593c2: 7001 moveq #1,%d0 <== NOT EXECUTED
593c4: b087 cmpl %d7,%d0 <== NOT EXECUTED
593c6: 6674 bnes 5943c <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
593c8: 6036 bras 59400 <rtems_rfs_unlink+0xc0> <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
593ca: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
593d0: 42a7 clrl %sp@- <== NOT EXECUTED
593d2: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
593d8: 508f addql #8,%sp <== NOT EXECUTED
593da: 4a00 tstb %d0 <== NOT EXECUTED
593dc: 670e beqs 593ec <rtems_rfs_unlink+0xac> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
593de: 4879 0006 e049 pea 6e049 <CSWTCH.2+0x1309> <== NOT EXECUTED
593e4: 4eb9 0005 c500 jsr 5c500 <puts> <== NOT EXECUTED
593ea: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
593ec: 486e ffda pea %fp@(-38) <== NOT EXECUTED
return EISDIR;
593f0: 7415 moveq #21,%d2 <== 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");
rtems_rfs_inode_close (fs, &target_inode);
593f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
593f4: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
593fa: 508f addql #8,%sp <== NOT EXECUTED
593fc: 6000 02c0 braw 596be <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
59400: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59402: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59404: 4eb9 0005 7a3a jsr 57a3a <rtems_rfs_dir_empty> <== NOT EXECUTED
if (rc > 0)
5940a: 508f addql #8,%sp <== NOT EXECUTED
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);
5940c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5940e: 6f2c bles 5943c <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59410: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59416: 42a7 clrl %sp@- <== NOT EXECUTED
59418: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5941e: 508f addql #8,%sp <== NOT EXECUTED
59420: 4a00 tstb %d0 <== NOT EXECUTED
59422: 6700 024c beqw 59670 <rtems_rfs_unlink+0x330> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
59426: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59428: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
5942e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59430: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59432: 4879 0006 e068 pea 6e068 <CSWTCH.2+0x1328> <== NOT EXECUTED
59438: 6000 022c braw 59666 <rtems_rfs_unlink+0x326> <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
5943c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59440: 2e0e movel %fp,%d7 <== NOT EXECUTED
59442: 0687 ffff ffb4 addil #-76,%d7 <== NOT EXECUTED
59448: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5944a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5944c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5944e: 4eb9 0004 eae2 jsr 4eae2 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59454: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
59458: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5945a: 672c beqs 59488 <rtems_rfs_unlink+0x148> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5945c: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59462: 42a7 clrl %sp@- <== NOT EXECUTED
59464: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5946a: 508f addql #8,%sp <== NOT EXECUTED
5946c: 4a00 tstb %d0 <== NOT EXECUTED
5946e: 6700 0200 beqw 59670 <rtems_rfs_unlink+0x330> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
59472: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59474: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
5947a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5947c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5947e: 4879 0006 e086 pea 6e086 <CSWTCH.2+0x1346> <== NOT EXECUTED
59484: 6000 01e0 braw 59666 <rtems_rfs_unlink+0x326> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
59488: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5948c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5948e: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59490: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59492: 4eb9 0005 73a2 jsr 573a2 <rtems_rfs_dir_del_entry> <== NOT EXECUTED
if (rc > 0)
59498: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_del_entry (fs, &parent_inode, target, doff);
5949c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5949e: 6f2c bles 594cc <rtems_rfs_unlink+0x18c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
594a0: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
594a6: 42a7 clrl %sp@- <== NOT EXECUTED
594a8: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
594ae: 508f addql #8,%sp <== NOT EXECUTED
594b0: 4a00 tstb %d0 <== NOT EXECUTED
594b2: 6700 0160 beqw 59614 <rtems_rfs_unlink+0x2d4> <== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
594b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
594b8: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
594be: 2f00 movel %d0,%sp@- <== NOT EXECUTED
594c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
594c2: 4879 0006 e0b2 pea 6e0b2 <CSWTCH.2+0x1372> <== NOT EXECUTED
594c8: 6000 0140 braw 5960a <rtems_rfs_unlink+0x2ca> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode);
594cc: 206e ffe6 moveal %fp@(-26),%a0 <== 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);
594d0: 4280 clrl %d0 <== NOT EXECUTED
594d2: 1010 moveb %a0@,%d0 <== NOT EXECUTED
594d4: 4282 clrl %d2 <== NOT EXECUTED
594d6: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
594da: e188 lsll #8,%d0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
594dc: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
594e2: 8480 orl %d0,%d2 <== NOT EXECUTED
if (links == 0xffff)
594e4: 4280 clrl %d0 <== NOT EXECUTED
594e6: 3002 movew %d2,%d0 <== NOT EXECUTED
594e8: 42a7 clrl %sp@- <== NOT EXECUTED
links = 0;
594ea: 0c80 0000 ffff cmpil #65535,%d0 <== NOT EXECUTED
594f0: 56c0 sne %d0 <== NOT EXECUTED
594f2: 4880 extw %d0 <== NOT EXECUTED
594f4: c480 andl %d0,%d2 <== NOT EXECUTED
594f6: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
594fc: 508f addql #8,%sp <== NOT EXECUTED
594fe: 4a00 tstb %d0 <== NOT EXECUTED
59500: 6716 beqs 59518 <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
59502: 3f02 movew %d2,%sp@- <== NOT EXECUTED
59504: 4267 clrw %sp@- <== NOT EXECUTED
59506: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59508: 4879 0006 e0dd pea 6e0dd <CSWTCH.2+0x139d> <== NOT EXECUTED
5950e: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59514: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (links > 1)
59518: 4280 clrl %d0 <== NOT EXECUTED
5951a: 7201 moveq #1,%d1 <== NOT EXECUTED
5951c: 3002 movew %d2,%d0 <== NOT EXECUTED
5951e: b280 cmpl %d0,%d1 <== NOT EXECUTED
59520: 641e bccs 59540 <rtems_rfs_unlink+0x200> <== NOT EXECUTED
{
links--;
59522: 5382 subql #1,%d2 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
59524: 2002 movel %d2,%d0 <== NOT EXECUTED
59526: e088 lsrl #8,%d0 <== NOT EXECUTED
59528: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
5952c: 1080 moveb %d0,%a0@ <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5952e: 7801 moveq #1,%d4 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
59530: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
59534: 1142 0001 moveb %d2,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59538: 1d44 ffea moveb %d4,%fp@(-22) <== NOT EXECUTED
5953c: 6000 0086 braw 595c4 <rtems_rfs_unlink+0x284> <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
59540: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59544: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59546: 4eb9 0004 ecfc jsr 4ecfc <rtems_rfs_inode_delete> <== NOT EXECUTED
if (rc > 0)
5954c: 508f addql #8,%sp <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
5954e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59550: 6f2c bles 5957e <rtems_rfs_unlink+0x23e> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59552: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59558: 42a7 clrl %sp@- <== NOT EXECUTED
5955a: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
59560: 508f addql #8,%sp <== NOT EXECUTED
59562: 4a00 tstb %d0 <== NOT EXECUTED
59564: 6700 00ae beqw 59614 <rtems_rfs_unlink+0x2d4> <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
59568: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5956a: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
59570: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59572: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59574: 4879 0006 e105 pea 6e105 <CSWTCH.2+0x13c5> <== NOT EXECUTED
5957a: 6000 008e braw 5960a <rtems_rfs_unlink+0x2ca> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
5957e: 4a05 tstb %d5 <== NOT EXECUTED
59580: 6742 beqs 595c4 <rtems_rfs_unlink+0x284> <== NOT EXECUTED
{
links = rtems_rfs_inode_get_links (&parent_inode);
59582: 206e ffc0 moveal %fp@(-64),%a0 <== 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);
59586: 4280 clrl %d0 <== NOT EXECUTED
59588: 1010 moveb %a0@,%d0 <== NOT EXECUTED
5958a: 4281 clrl %d1 <== NOT EXECUTED
5958c: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
if (links == 0xffff)
59590: 4282 clrl %d2 <== 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);
59592: e188 lsll #8,%d0 <== NOT EXECUTED
59594: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
59596: 3400 movew %d0,%d2 <== 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);
59598: 3200 movew %d0,%d1 <== NOT EXECUTED
if (links == 0xffff)
5959a: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED
595a0: 670c beqs 595ae <rtems_rfs_unlink+0x26e> <== NOT EXECUTED
if (links > 1)
595a2: 7801 moveq #1,%d4 <== NOT EXECUTED
595a4: b882 cmpl %d2,%d4 <== NOT EXECUTED
595a6: 6408 bccs 595b0 <rtems_rfs_unlink+0x270> <== NOT EXECUTED
links--;
595a8: 2200 movel %d0,%d1 <== NOT EXECUTED
595aa: 5381 subql #1,%d1 <== NOT EXECUTED
595ac: 6002 bras 595b0 <rtems_rfs_unlink+0x270> <== NOT EXECUTED
links = 0;
595ae: 4241 clrw %d1 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
595b0: 2001 movel %d1,%d0 <== NOT EXECUTED
595b2: e088 lsrl #8,%d0 <== NOT EXECUTED
595b4: 1080 moveb %d0,%a0@ <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
595b6: 7001 moveq #1,%d0 <== NOT EXECUTED
* @prarm links The links.
*/
static inline void
rtems_rfs_inode_set_links (rtems_rfs_inode_handle* handle, uint16_t links)
{
rtems_rfs_write_u16 (&handle->node->links, links);
595b8: 206e ffc0 moveal %fp@(-64),%a0 <== NOT EXECUTED
595bc: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
595c0: 1d40 ffc4 moveb %d0,%fp@(-60) <== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
595c4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
595c8: 280e movel %fp,%d4 <== NOT EXECUTED
595ca: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
595ce: 0684 ffff ffb4 addil #-76,%d4 <== NOT EXECUTED
595d4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
595d6: 4eb9 0004 edd0 jsr 4edd0 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
595dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
links--;
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
595e0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
595e2: 6f4a bles 5962e <rtems_rfs_unlink+0x2ee> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
595e4: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
595ea: 42a7 clrl %sp@- <== NOT EXECUTED
595ec: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
595f2: 508f addql #8,%sp <== NOT EXECUTED
595f4: 4a00 tstb %d0 <== NOT EXECUTED
595f6: 671c beqs 59614 <rtems_rfs_unlink+0x2d4> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
595f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
595fa: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
59600: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59602: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59604: 4879 0006 e132 pea 6e132 <CSWTCH.2+0x13f2> <== NOT EXECUTED
5960a: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
59610: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
59614: 486e ffb4 pea %fp@(-76) <== NOT EXECUTED
59618: 45f9 0004 ec7a lea 4ec7a <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
5961e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59620: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
59622: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59626: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59628: 4e92 jsr %a2@ <== NOT EXECUTED
5962a: 6000 008e braw 596ba <rtems_rfs_unlink+0x37a> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
5962e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59630: 45f9 0004 ec7a lea 4ec7a <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
59636: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59638: 4e92 jsr %a2@ <== NOT EXECUTED
if (rc > 0)
5963a: 508f addql #8,%sp <== 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);
5963c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5963e: 6f40 bles 59680 <rtems_rfs_unlink+0x340> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59640: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59646: 42a7 clrl %sp@- <== NOT EXECUTED
59648: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5964e: 508f addql #8,%sp <== NOT EXECUTED
59650: 4a00 tstb %d0 <== NOT EXECUTED
59652: 671c beqs 59670 <rtems_rfs_unlink+0x330> <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
59654: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59656: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
5965c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5965e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59660: 4879 0006 e164 pea 6e164 <CSWTCH.2+0x1424> <== NOT EXECUTED
59666: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
5966c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
59670: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59674: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59676: 4eb9 0004 ec7a jsr 4ec7a <rtems_rfs_inode_close> <== NOT EXECUTED
5967c: 508f addql #8,%sp <== NOT EXECUTED
5967e: 603e bras 596be <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
59680: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59684: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59686: 4e92 jsr %a2@ <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59688: 508f addql #8,%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
5968a: 2400 movel %d0,%d2 <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
5968c: 6f30 bles 596be <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
5968e: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59694: 42a7 clrl %sp@- <== NOT EXECUTED
59696: 4eb9 0005 02fc jsr 502fc <rtems_rfs_trace> <== NOT EXECUTED
5969c: 508f addql #8,%sp <== NOT EXECUTED
5969e: 4a00 tstb %d0 <== NOT EXECUTED
596a0: 671c beqs 596be <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
596a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
596a4: 4eb9 0005 d210 jsr 5d210 <strerror> <== NOT EXECUTED
596aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED
596ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
596ae: 4879 0006 e198 pea 6e198 <CSWTCH.2+0x1458> <== NOT EXECUTED
596b4: 4eb9 0005 c2b0 jsr 5c2b0 <printf> <== NOT EXECUTED
596ba: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
596be: 2002 movel %d2,%d0 <== NOT EXECUTED
596c0: 4cee 04fc ff98 moveml %fp@(-104),%d2-%d7/%a2 <== NOT EXECUTED
596c6: 4e5e unlk %fp <== NOT EXECUTED
0005b24e <rtems_shell_rfs_format>:
int
rtems_shell_rfs_format (int argc, char* argv[])
{
5b24e: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED
5b252: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
5b256: 4878 0016 pea 16 <OPER2+0x2> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
5b25a: 7401 moveq #1,%d2 <== NOT EXECUTED
int
rtems_shell_rfs_format (int argc, char* argv[])
{
rtems_rfs_format_config config;
const char* driver = NULL;
5b25c: 4283 clrl %d3 <== NOT EXECUTED
if (arg >= argc)
{
printf ("error: group inode count needs an argument\n");
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
5b25e: 47f9 0007 51fa lea 751fa <strtoul>,%a3 <== NOT EXECUTED
{
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
5b264: 42a7 clrl %sp@- <== NOT EXECUTED
5b266: 486e ffea pea %fp@(-22) <== NOT EXECUTED
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
5b26a: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED
5b26e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
5b272: 4eb9 0007 0d14 jsr 70d14 <memset> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
5b278: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5b27c: 6000 0108 braw 5b386 <rtems_shell_rfs_format+0x138> <== NOT EXECUTED
{
if (argv[arg][0] == '-')
5b280: 2072 2c00 moveal %a2@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
5b284: 722d moveq #45,%d1 <== NOT EXECUTED
5b286: 1010 moveb %a0@,%d0 <== NOT EXECUTED
5b288: 49c0 extbl %d0 <== NOT EXECUTED
5b28a: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b28c: 6600 00de bnew 5b36c <rtems_shell_rfs_format+0x11e> <== NOT EXECUTED
{
switch (argv[arg][1])
5b290: 123c 0069 moveb #105,%d1 <== NOT EXECUTED
5b294: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED
5b298: 49c0 extbl %d0 <== NOT EXECUTED
5b29a: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b29c: 677c beqs 5b31a <rtems_shell_rfs_format+0xcc> <== NOT EXECUTED
5b29e: 6d16 blts 5b2b6 <rtems_shell_rfs_format+0x68> <== NOT EXECUTED
5b2a0: 123c 0049 moveb #73,%d1 <== NOT EXECUTED
5b2a4: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b2a6: 6700 0094 beqw 5b33c <rtems_shell_rfs_format+0xee> <== NOT EXECUTED
5b2aa: 123c 0062 moveb #98,%d1 <== NOT EXECUTED
5b2ae: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b2b0: 6600 00b0 bnew 5b362 <rtems_shell_rfs_format+0x114> <== NOT EXECUTED
5b2b4: 6044 bras 5b2fa <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
5b2b6: 7273 moveq #115,%d1 <== NOT EXECUTED
5b2b8: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b2ba: 671e beqs 5b2da <rtems_shell_rfs_format+0x8c> <== NOT EXECUTED
5b2bc: 123c 0076 moveb #118,%d1 <== NOT EXECUTED
5b2c0: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b2c2: 670c beqs 5b2d0 <rtems_shell_rfs_format+0x82> <== NOT EXECUTED
5b2c4: 123c 006f moveb #111,%d1 <== NOT EXECUTED
5b2c8: b280 cmpl %d0,%d1 <== NOT EXECUTED
5b2ca: 6600 0096 bnew 5b362 <rtems_shell_rfs_format+0x114> <== NOT EXECUTED
5b2ce: 6074 bras 5b344 <rtems_shell_rfs_format+0xf6> <== NOT EXECUTED
{
case 'v':
config.verbose = true;
5b2d0: 7001 moveq #1,%d0 <== NOT EXECUTED
5b2d2: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED
break;
5b2d6: 6000 00ac braw 5b384 <rtems_shell_rfs_format+0x136> <== NOT EXECUTED
case 's':
arg++;
5b2da: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5b2dc: b882 cmpl %d2,%d4 <== NOT EXECUTED
5b2de: 6e0a bgts 5b2ea <rtems_shell_rfs_format+0x9c> <== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
5b2e0: 4879 0008 c51e pea 8c51e <rtems_rtc_shell_usage+0x13ea> <== NOT EXECUTED
5b2e6: 6000 00ae braw 5b396 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
5b2ea: 42a7 clrl %sp@- <== NOT EXECUTED
5b2ec: 42a7 clrl %sp@- <== NOT EXECUTED
5b2ee: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5b2f2: 4e93 jsr %a3@ <== NOT EXECUTED
5b2f4: 2d40 ffea movel %d0,%fp@(-22) <== NOT EXECUTED
5b2f8: 603c bras 5b336 <rtems_shell_rfs_format+0xe8> <== NOT EXECUTED
break;
case 'b':
arg++;
5b2fa: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5b2fc: b882 cmpl %d2,%d4 <== NOT EXECUTED
5b2fe: 6e0a bgts 5b30a <rtems_shell_rfs_format+0xbc> <== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
5b300: 4879 0008 c542 pea 8c542 <rtems_rtc_shell_usage+0x140e> <== NOT EXECUTED
5b306: 6000 008e braw 5b396 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
5b30a: 42a7 clrl %sp@- <== NOT EXECUTED
5b30c: 42a7 clrl %sp@- <== NOT EXECUTED
5b30e: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5b312: 4e93 jsr %a3@ <== NOT EXECUTED
5b314: 2d40 ffee movel %d0,%fp@(-18) <== NOT EXECUTED
5b318: 601c bras 5b336 <rtems_shell_rfs_format+0xe8> <== NOT EXECUTED
break;
case 'i':
arg++;
5b31a: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5b31c: b882 cmpl %d2,%d4 <== NOT EXECUTED
5b31e: 6e08 bgts 5b328 <rtems_shell_rfs_format+0xda> <== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
5b320: 4879 0008 c56d pea 8c56d <rtems_rtc_shell_usage+0x1439> <== NOT EXECUTED
5b326: 606e bras 5b396 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
5b328: 42a7 clrl %sp@- <== NOT EXECUTED
5b32a: 42a7 clrl %sp@- <== NOT EXECUTED
5b32c: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5b330: 4e93 jsr %a3@ <== NOT EXECUTED
5b332: 2d40 fff2 movel %d0,%fp@(-14) <== NOT EXECUTED
break;
5b336: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5b33a: 6048 bras 5b384 <rtems_shell_rfs_format+0x136> <== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
5b33c: 7201 moveq #1,%d1 <== NOT EXECUTED
5b33e: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED
break;
5b342: 6040 bras 5b384 <rtems_shell_rfs_format+0x136> <== NOT EXECUTED
case 'o':
arg++;
5b344: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5b346: b882 cmpl %d2,%d4 <== NOT EXECUTED
5b348: 6e08 bgts 5b352 <rtems_shell_rfs_format+0x104> <== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
5b34a: 4879 0008 c598 pea 8c598 <rtems_rtc_shell_usage+0x1464> <== NOT EXECUTED
5b350: 6044 bras 5b396 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
5b352: 42a7 clrl %sp@- <== NOT EXECUTED
5b354: 42a7 clrl %sp@- <== NOT EXECUTED
5b356: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5b35a: 4e93 jsr %a3@ <== NOT EXECUTED
5b35c: 2d40 fff6 movel %d0,%fp@(-10) <== NOT EXECUTED
5b360: 60d4 bras 5b336 <rtems_shell_rfs_format+0xe8> <== NOT EXECUTED
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
5b362: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5b364: 4879 0008 aaea pea 8aaea <iMinorError+0x2df> <== NOT EXECUTED
5b36a: 600c bras 5b378 <rtems_shell_rfs_format+0x12a> <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
5b36c: 4a83 tstl %d3 <== NOT EXECUTED
5b36e: 6712 beqs 5b382 <rtems_shell_rfs_format+0x134> <== NOT EXECUTED
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
5b370: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5b372: 4879 0008 c5cb pea 8c5cb <rtems_rtc_shell_usage+0x1497> <== NOT EXECUTED
5b378: 4eb9 0007 1b38 jsr 71b38 <printf> <== NOT EXECUTED
5b37e: 508f addql #8,%sp <== NOT EXECUTED
5b380: 6054 bras 5b3d6 <rtems_shell_rfs_format+0x188> <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
5b382: 2608 movel %a0,%d3 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
5b384: 5282 addql #1,%d2 <== NOT EXECUTED
5b386: b882 cmpl %d2,%d4 <== NOT EXECUTED
5b388: 6e00 fef6 bgtw 5b280 <rtems_shell_rfs_format+0x32> <== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
5b38c: 4a83 tstl %d3 <== NOT EXECUTED
5b38e: 6610 bnes 5b3a0 <rtems_shell_rfs_format+0x152> <== NOT EXECUTED
printf ("error: no driver name provided\n");
5b390: 4879 0008 c5f4 pea 8c5f4 <rtems_rtc_shell_usage+0x14c0> <== NOT EXECUTED
5b396: 4eb9 0007 1d88 jsr 71d88 <puts> <== NOT EXECUTED
5b39c: 588f addql #4,%sp <== NOT EXECUTED
5b39e: 6036 bras 5b3d6 <rtems_shell_rfs_format+0x188> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
5b3a0: 486e ffea pea %fp@(-22) <== NOT EXECUTED
5b3a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5b3a6: 4eb9 0006 64ee jsr 664ee <rtems_rfs_format> <== NOT EXECUTED
5b3ac: 508f addql #8,%sp <== NOT EXECUTED
5b3ae: 4a80 tstl %d0 <== NOT EXECUTED
5b3b0: 6c28 bges 5b3da <rtems_shell_rfs_format+0x18c> <== NOT EXECUTED
{
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
5b3b2: 4eb9 0006 da4c jsr 6da4c <__errno> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
5b3b8: 2040 moveal %d0,%a0 <== NOT EXECUTED
5b3ba: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5b3bc: 4eb9 0007 3b4c jsr 73b4c <strerror> <== NOT EXECUTED
5b3c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5b3c4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5b3c6: 4879 0008 c613 pea 8c613 <rtems_rtc_shell_usage+0x14df> <== NOT EXECUTED
5b3cc: 4eb9 0007 1b38 jsr 71b38 <printf> <== NOT EXECUTED
5b3d2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
driver, strerror (errno));
return 1;
5b3d6: 7001 moveq #1,%d0 <== NOT EXECUTED
5b3d8: 6002 bras 5b3dc <rtems_shell_rfs_format+0x18e> <== NOT EXECUTED
}
return 0;
5b3da: 4280 clrl %d0 <== NOT EXECUTED
}
5b3dc: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 <== NOT EXECUTED
5b3e2: 4e5e unlk %fp <== NOT EXECUTED
...
00046964 <rtems_shutdown_executive>:
void rtems_shutdown_executive(
uint32_t result
)
{
if ( _System_state_Is_up( _System_state_Get() ) ) {
46964: 7003 moveq #3,%d0
*/
void rtems_shutdown_executive(
uint32_t result
)
{
46966: 4e56 0000 linkw %fp,#0
if ( _System_state_Is_up( _System_state_Get() ) ) {
4696a: b0b9 0005 dd5c cmpl 5dd5c <_System_state_Current>,%d0
46970: 6624 bnes 46996 <rtems_shutdown_executive+0x32>
#if defined(RTEMS_SMP)
_SMP_Request_other_cores_to_shutdown();
#endif
_Per_CPU_Information[0].idle->Wait.return_code = result;
46972: 2079 0005 dd76 moveal 5dd76 <_Per_CPU_Information+0x16>,%a0
46978: 103c 0004 moveb #4,%d0
4697c: 216e 0008 0034 movel %fp@(8),%a0@(52)
* if we were running within the same context, it would work.
*
* And we will not return to this thread, so there is no point of
* saving the context.
*/
_Context_Restart_self( &_Thread_BSP_context );
46982: 4879 0005 dbc2 pea 5dbc2 <_Thread_BSP_context>
46988: 23c0 0005 dd5c movel %d0,5dd5c <_System_state_Current>
4698e: 4eb9 0004 947e jsr 4947e <_CPU_Context_Restart_self>
46994: 588f addql #4,%sp <== NOT EXECUTED
****** RETURN TO RTEMS_INITIALIZE_START_MULTITASKING() ******
****** AND THEN TO BOOT_CARD() ******
*******************************************************************
*******************************************************************/
}
_Internal_error_Occurred(
46996: 4878 0014 pea 14 <OPER2>
4699a: 4878 0001 pea 1 <ADD>
4699e: 42a7 clrl %sp@-
469a0: 4eb9 0004 74f8 jsr 474f8 <_Internal_error_Occurred>
...
00051718 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
51718: 4e56 fffc linkw %fp,#-4
5171c: 2f03 movel %d3,%sp@-
5171e: 2f02 movel %d2,%sp@-
51720: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
51724: 6776 beqs 5179c <rtems_signal_send+0x84>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
51726: 486e fffc pea %fp@(-4)
5172a: 2f2e 0008 movel %fp@(8),%sp@-
5172e: 4eb9 0005 5794 jsr 55794 <_Thread_Get>
switch ( location ) {
51734: 508f addql #8,%sp
51736: 4aae fffc tstl %fp@(-4)
5173a: 6664 bnes 517a0 <rtems_signal_send+0x88>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
5173c: 2240 moveal %d0,%a1
5173e: 2069 00f8 moveal %a1@(248),%a0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
51742: 4aa8 000a tstl %a0@(10)
51746: 674a beqs 51792 <rtems_signal_send+0x7a>
51748: 223c 0000 0700 movel #1792,%d1
if ( asr->is_enabled ) {
5174e: 4a28 0008 tstb %a0@(8)
51752: 6726 beqs 5177a <rtems_signal_send+0x62>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
51754: 40c3 movew %sr,%d3
51756: 8283 orl %d3,%d1
51758: 46c1 movew %d1,%sr
*signal_set |= signals;
5175a: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
5175e: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
51760: 4ab9 0007 61bc tstl 761bc <_Per_CPU_Information+0x8>
51766: 6720 beqs 51788 <rtems_signal_send+0x70>
51768: b0b9 0007 61c2 cmpl 761c2 <_Per_CPU_Information+0xe>,%d0
5176e: 6618 bnes 51788 <rtems_signal_send+0x70> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
51770: 7001 moveq #1,%d0
51772: 13c0 0007 61c0 moveb %d0,761c0 <_Per_CPU_Information+0xc>
51778: 600e bras 51788 <rtems_signal_send+0x70>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
5177a: 2001 movel %d1,%d0
5177c: 40c1 movew %sr,%d1
5177e: 8081 orl %d1,%d0
51780: 46c0 movew %d0,%sr
*signal_set |= signals;
51782: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
51786: 46c1 movew %d1,%sr
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
51788: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5178e: 4280 clrl %d0
51790: 6010 bras 517a2 <rtems_signal_send+0x8a>
}
_Thread_Enable_dispatch();
51792: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
51798: 700b moveq #11,%d0
5179a: 6006 bras 517a2 <rtems_signal_send+0x8a>
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
5179c: 700a moveq #10,%d0
5179e: 6002 bras 517a2 <rtems_signal_send+0x8a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
517a0: 7004 moveq #4,%d0
}
517a2: 242e fff4 movel %fp@(-12),%d2
517a6: 262e fff8 movel %fp@(-8),%d3
517aa: 4e5e unlk %fp
...
0004c5c4 <rtems_sparse_disk_create_and_register>:
const char *device_file_name,
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern )
{
4c5c4: 4e56 fff4 linkw %fp,#-12
4c5c8: 48d7 001c moveml %d2-%d4,%sp@
4c5cc: 242e 000c movel %fp@(12),%d2
4c5d0: 2002 movel %d2,%d0
4c5d2: 5080 addql #8,%d0
4c5d4: 262e 0010 movel %fp@(16),%d3
const rtems_blkdev_bnum blocks_with_buffer )
{
size_t const key_table_size = blocks_with_buffer
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
size_t const alloc_size = sizeof( rtems_sparse_disk )
4c5d8: 4c03 0800 mulsl %d3,%d0
const char *device_file_name,
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern )
{
4c5dc: 182e 001b moveb %fp@(27),%d4
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
size_t const alloc_size = sizeof( rtems_sparse_disk )
+ key_table_size + data_size;
rtems_sparse_disk *const sd = (rtems_sparse_disk *) malloc(
4c5e0: 2040 moveal %d0,%a0
4c5e2: 4868 001a pea %a0@(26)
4c5e6: 4eb9 0004 4410 jsr 44410 <malloc>
rtems_sparse_disk *sparse_disk = sparse_disk_allocate(
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
4c5ec: 588f addql #4,%sp
4c5ee: 4a80 tstl %d0
4c5f0: 6728 beqs 4c61a <rtems_sparse_disk_create_and_register+0x56><== NEVER TAKEN
sc = rtems_sparse_disk_register(
4c5f2: 4879 0004 c2b6 pea 4c2b6 <rtems_sparse_disk_free>
4c5f8: 0284 0000 00ff andil #255,%d4
4c5fe: 2f04 movel %d4,%sp@-
4c600: 2f2e 0014 movel %fp@(20),%sp@-
4c604: 2f03 movel %d3,%sp@-
4c606: 2f02 movel %d2,%sp@-
4c608: 2f00 movel %d0,%sp@-
4c60a: 2f2e 0008 movel %fp@(8),%sp@-
4c60e: 4eb9 0004 c4da jsr 4c4da <rtems_sparse_disk_register>
4c614: 4fef 001c lea %sp@(28),%sp
4c618: 6002 bras 4c61c <rtems_sparse_disk_create_and_register+0x58>
media_block_count,
fill_pattern,
rtems_sparse_disk_free
);
} else {
sc = RTEMS_NO_MEMORY;
4c61a: 701a moveq #26,%d0 <== NOT EXECUTED
}
return sc;
}
4c61c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
4c622: 4e5e unlk %fp
...
0004c4da <rtems_sparse_disk_register>:
uint32_t media_block_size,
rtems_blkdev_bnum blocks_with_buffer,
rtems_blkdev_bnum media_block_count,
uint8_t fill_pattern,
rtems_sparse_disk_delete_handler sparse_disk_delete )
{
4c4da: 4e56 ffd4 linkw %fp,#-44
4c4de: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c4e2: 282e 001c movel %fp@(28),%d4
4c4e6: 2c2e 0008 movel %fp@(8),%d6
4c4ea: 246e 000c moveal %fp@(12),%a2
4c4ee: 262e 0010 movel %fp@(16),%d3
4c4f2: 242e 0014 movel %fp@(20),%d2
4c4f6: 2a2e 0018 movel %fp@(24),%d5
4c4fa: 286e 0020 moveal %fp@(32),%a4
4c4fe: 1d44 ffff moveb %d4,%fp@(-1)
rtems_status_code sc;
if ( blocks_with_buffer <= media_block_count ) {
4c502: ba82 cmpl %d2,%d5
4c504: 6500 00ae bcsw 4c5b4 <rtems_sparse_disk_register+0xda>
const uint8_t fill_pattern )
{
rtems_status_code sc;
rtems_blkdev_bnum i;
if ( NULL == sd )
4c508: 4a8a tstl %a2
4c50a: 6700 00ac beqw 4c5b8 <rtems_sparse_disk_register+0xde>
return RTEMS_INVALID_ADDRESS;
uint8_t *data = (uint8_t *) sd;
size_t const key_table_size = blocks_with_buffer
4c50e: 2e02 movel %d2,%d7
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
4c510: 47f9 0005 71d8 lea 571d8 <memset>,%a3
if ( NULL == sd )
return RTEMS_INVALID_ADDRESS;
uint8_t *data = (uint8_t *) sd;
size_t const key_table_size = blocks_with_buffer
4c516: e78f lsll #3,%d7
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
4c518: 2a47 moveal %d7,%a5
4c51a: 4bed 001a lea %a5@(26),%a5
4c51e: 2f0d movel %a5,%sp@-
4c520: 42a7 clrl %sp@-
4c522: 2f0a movel %a2,%sp@-
4c524: 4e93 jsr %a3@
sd->fill_pattern = fill_pattern;
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
4c526: 2002 movel %d2,%d0
4c528: 4c03 0800 mulsl %d3,%d0
* sizeof( rtems_sparse_disk_key );
size_t const data_size = blocks_with_buffer * media_block_size;
memset( data, 0, sizeof( rtems_sparse_disk ) + key_table_size );
sd->fill_pattern = fill_pattern;
4c52c: 1544 0014 moveb %d4,%a2@(20)
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
4c530: 2f00 movel %d0,%sp@-
4c532: 4280 clrl %d0
4c534: 102e ffff moveb %fp@(-1),%d0
4c538: 2f00 movel %d0,%sp@-
4c53a: 4872 d800 pea %a2@(00000000,%a5:l)
4c53e: 4e93 jsr %a3@
sd->fill_pattern,
data_size );
sd->delete_handler = sparse_disk_delete;
4c540: 254c 0010 movel %a4,%a2@(16)
sc = rtems_semaphore_create(
4c544: 2f0a movel %a2,%sp@-
4c546: 42a7 clrl %sp@-
4c548: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4c54c: 4878 0001 pea 1 <ADD>
4c550: 2f3c 5350 4152 movel #1397768530,%sp@-
4c556: 4eb9 0004 7a80 jsr 47a80 <rtems_semaphore_create>
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY,
0,
&sd->mutex
);
if ( sc != RTEMS_SUCCESSFUL ) {
4c55c: 4fef 002c lea %sp@(44),%sp
4c560: 4a80 tstl %d0
4c562: 6656 bnes 4c5ba <rtems_sparse_disk_register+0xe0><== NEVER TAKEN
return sc;
}
data += sizeof( rtems_sparse_disk );
4c564: 220a movel %a2,%d1
4c566: 0681 0000 001a addil #26,%d1
sd->blocks_with_buffer = blocks_with_buffer;
4c56c: 2542 0004 movel %d2,%a2@(4)
sd->key_table = (rtems_sparse_disk_key *) data;
4c570: 2541 0016 movel %d1,%a2@(22)
data += key_table_size;
4c574: d287 addl %d7,%d1
4c576: 600c bras 4c584 <rtems_sparse_disk_register+0xaa>
}
return sc;
}
rtems_status_code rtems_sparse_disk_register(
4c578: 2800 movel %d0,%d4
sd->blocks_with_buffer = blocks_with_buffer;
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
4c57a: 5280 addql #1,%d0
}
return sc;
}
rtems_status_code rtems_sparse_disk_register(
4c57c: e78c lsll #3,%d4
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
sd->key_table[i].data = data;
4c57e: 2581 481e movel %d1,%a2@(0000001e,%d4:l)
sd->blocks_with_buffer = blocks_with_buffer;
sd->key_table = (rtems_sparse_disk_key *) data;
data += key_table_size;
for ( i = 0; i < blocks_with_buffer; ++i, data += media_block_size ) {
4c582: d283 addl %d3,%d1
4c584: b480 cmpl %d0,%d2
4c586: 66f0 bnes 4c578 <rtems_sparse_disk_register+0x9e>
sd->key_table[i].data = data;
}
sd->media_block_size = media_block_size;
4c588: 2543 000c movel %d3,%a2@(12)
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
4c58c: 203c 0004 c2c2 movel #312002,%d0
4c592: 2d4a 0018 movel %a2,%fp@(24)
4c596: 2d45 0010 movel %d5,%fp@(16)
4c59a: 2d43 000c movel %d3,%fp@(12)
4c59e: 2d46 0008 movel %d6,%fp@(8)
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c5a2: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
4c5a8: 2d40 0014 movel %d0,%fp@(20)
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c5ac: 4e5e unlk %fp
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
4c5ae: 4ef9 0004 e94c jmp 4e94c <rtems_blkdev_create>
sparse_disk_ioctl,
sparse_disk
);
}
} else {
sc = RTEMS_INVALID_NUMBER;
4c5b4: 700a moveq #10,%d0 <== NOT EXECUTED
4c5b6: 6002 bras 4c5ba <rtems_sparse_disk_register+0xe0><== NOT EXECUTED
{
rtems_status_code sc;
rtems_blkdev_bnum i;
if ( NULL == sd )
return RTEMS_INVALID_ADDRESS;
4c5b8: 7009 moveq #9,%d0 <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c5ba: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4c5c0: 4e5e unlk %fp <== NOT EXECUTED
0005c834 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
5c834: 4e56 0000 linkw %fp,#0
5c838: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
5c83c: 4aa8 0008 tstl %a0@(8)
5c840: 671c beqs 5c85e <rtems_stack_checker_begin_extension+0x2a><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
5c842: 4878 0010 pea 10 <INVALID_OPERATION>
5c846: 4879 0009 64e8 pea 964e8 <Stack_check_Pattern>
5c84c: 2068 00b0 moveal %a0@(176),%a0
5c850: 5088 addql #8,%a0
5c852: 2f08 movel %a0,%sp@-
5c854: 4eb9 0007 0bb0 jsr 70bb0 <memcpy>
5c85a: 4fef 000c lea %sp@(12),%sp
}
5c85e: 4e5e unlk %fp <== NOT EXECUTED
0005c796 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
5c796: 4e56 0000 linkw %fp,#0
5c79a: 2f0a movel %a2,%sp@-
5c79c: 246e 000c moveal %fp@(12),%a2
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
5c7a0: 4ab9 0009 55b0 tstl 955b0 <Stack_check_Initialized>
5c7a6: 6668 bnes 5c810 <rtems_stack_checker_create_extension+0x7a>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
5c7a8: 203c feed f00d movel #-17960947,%d0
5c7ae: 23c0 0009 64e8 movel %d0,964e8 <Stack_check_Pattern>
5c7b4: 203c 0bad 0d06 movel #195890438,%d0
5c7ba: 23c0 0009 64ec movel %d0,964ec <Stack_check_Pattern+0x4>
5c7c0: 203c dead f00d movel #-559026163,%d0
5c7c6: 23c0 0009 64f0 movel %d0,964f0 <Stack_check_Pattern+0x8>
5c7cc: 203c 600d 0d06 movel #1611468038,%d0
5c7d2: 23c0 0009 64f4 movel %d0,964f4 <Stack_check_Pattern+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) {
5c7d8: 2039 0009 6394 movel 96394 <_Per_CPU_Information>,%d0
5c7de: 6728 beqs 5c808 <rtems_stack_checker_create_extension+0x72><== NEVER TAKEN
5c7e0: 2239 0009 6398 movel 96398 <_Per_CPU_Information+0x4>,%d1
5c7e6: 6720 beqs 5c808 <rtems_stack_checker_create_extension+0x72><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
5c7e8: 9280 subl %d0,%d1
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
5c7ea: 2f01 movel %d1,%sp@-
5c7ec: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
* 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;
5c7f0: 23c0 0009 64fc movel %d0,964fc <Stack_check_Interrupt_stack+0x4>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
5c7f6: 2f00 movel %d0,%sp@-
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
5c7f8: 23c1 0009 64f8 movel %d1,964f8 <Stack_check_Interrupt_stack>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
5c7fe: 4eb9 0007 0d14 jsr 70d14 <memset>
5c804: 4fef 000c lea %sp@(12),%sp
}
#endif
Stack_check_Initialized = 1;
5c808: 7001 moveq #1,%d0
5c80a: 23c0 0009 55b0 movel %d0,955b0 <Stack_check_Initialized>
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
5c810: 4a8a tstl %a2
5c812: 6716 beqs 5c82a <rtems_stack_checker_create_extension+0x94><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
5c814: 2f2a 00ac movel %a2@(172),%sp@-
5c818: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
5c81c: 2f2a 00b0 movel %a2@(176),%sp@-
5c820: 4eb9 0007 0d14 jsr 70d14 <memset>
5c826: 4fef 000c lea %sp@(12),%sp
return true;
}
5c82a: 246e fffc moveal %fp@(-4),%a2
5c82e: 4e5e unlk %fp
5c830: 7001 moveq #1,%d0 <== NOT EXECUTED
0005c974 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
5c974: 4e56 0000 linkw %fp,#0
5c978: 2f0a movel %a2,%sp@-
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
5c97a: 2479 0009 63a2 moveal 963a2 <_Per_CPU_Information+0xe>,%a2
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5c980: 206a 00b0 moveal %a2@(176),%a0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
5c984: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5c986: b1ce cmpal %fp,%a0
5c988: 620e bhis 5c998 <rtems_stack_checker_is_blown+0x24><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
5c98a: 2008 movel %a0,%d0
5c98c: d0aa 00ac addl %a2@(172),%d0
5c990: b08e cmpl %fp,%d0
5c992: 54c2 scc %d2
5c994: 4482 negl %d2
5c996: 6002 bras 5c99a <rtems_stack_checker_is_blown+0x26>
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
5c998: 4202 clrb %d2 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
5c99a: 4ab9 0009 55b0 tstl 955b0 <Stack_check_Initialized>
5c9a0: 6736 beqs 5c9d8 <rtems_stack_checker_is_blown+0x64><== NEVER TAKEN
pattern_ok = (!memcmp(
5c9a2: 4878 0010 pea 10 <INVALID_OPERATION>
5c9a6: 4879 0009 64e8 pea 964e8 <Stack_check_Pattern>
5c9ac: 4868 0008 pea %a0@(8)
5c9b0: 4eb9 0007 0b20 jsr 70b20 <memcmp>
5c9b6: 4fef 000c lea %sp@(12),%sp
5c9ba: 4a80 tstl %d0
5c9bc: 57c0 seq %d0
5c9be: 4480 negl %d0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
5c9c0: 4a02 tstb %d2
5c9c2: 6704 beqs 5c9c8 <rtems_stack_checker_is_blown+0x54><== NEVER TAKEN
5c9c4: 4a00 tstb %d0
5c9c6: 6616 bnes 5c9de <rtems_stack_checker_is_blown+0x6a><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
5c9c8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
5c9ce: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c9d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c9d2: 4eb9 0005 c862 jsr 5c862 <Stack_check_report_blown_task> <== NOT EXECUTED
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
5c9d8: 7001 moveq #1,%d0 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
5c9da: 4a02 tstb %d2 <== NOT EXECUTED
5c9dc: 67ea beqs 5c9c8 <rtems_stack_checker_is_blown+0x54><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
5c9de: 242e fff8 movel %fp@(-8),%d2
5c9e2: 246e fffc moveal %fp@(-4),%a2
5c9e6: 4e5e unlk %fp
5c9e8: 4200 clrb %d0 <== NOT EXECUTED
0005ca4e <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
5ca4e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
5ca52: 4879 0005 e8cc pea 5e8cc <printk_plugin> <== NOT EXECUTED
5ca58: 42a7 clrl %sp@- <== NOT EXECUTED
5ca5a: 4eb9 0005 c9ec jsr 5c9ec <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
5ca60: 508f addql #8,%sp <== NOT EXECUTED
}
5ca62: 4e5e unlk %fp <== NOT EXECUTED
...
0005c9ec <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5c9ec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5c9f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c9f2: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
5c9f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c9f8: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
if ( !print )
5c9fc: 4a8a tstl %a2 <== NOT EXECUTED
5c9fe: 6742 beqs 5ca42 <rtems_stack_checker_report_usage_with_plugin+0x56><== NOT EXECUTED
return;
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
5ca00: 4879 0008 ce9c pea 8ce9c <RTEMS_BDPART_MBR_MASTER_TYPE+0x3c3><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
5ca06: 23c2 0009 55b4 movel %d2,955b4 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
5ca0c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
if ( !print )
return;
print_context = context;
print_handler = print;
5ca0e: 23ca 0009 55b8 movel %a2,955b8 <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
5ca14: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
5ca16: 4879 0008 ceb3 pea 8ceb3 <RTEMS_BDPART_MBR_MASTER_TYPE+0x3da><== NOT EXECUTED
5ca1c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ca1e: 4e92 jsr %a2@ <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
5ca20: 487a fc52 pea %pc@(5c674 <Stack_check_Dump_threads_usage>)<== NOT EXECUTED
5ca24: 4eb9 0006 0228 jsr 60228 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
5ca2a: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
5ca2e: 4eba fc44 jsr %pc@(5c674 <Stack_check_Dump_threads_usage>)<== NOT EXECUTED
#endif
print_context = NULL;
print_handler = NULL;
5ca32: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
5ca36: 42b9 0009 55b4 clrl 955b4 <print_context> <== NOT EXECUTED
print_handler = NULL;
5ca3c: 42b9 0009 55b8 clrl 955b8 <print_handler> <== NOT EXECUTED
}
5ca42: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5ca46: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
5ca4a: 4e5e unlk %fp <== NOT EXECUTED
0005c90c <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
5c90c: 4e56 0000 linkw %fp,#0
5c910: 2f0a movel %a2,%sp@-
5c912: 246e 0008 moveal %fp@(8),%a2
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);
5c916: 222a 00b0 movel %a2@(176),%d1
5c91a: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5c91c: 202a 00b0 movel %a2@(176),%d0
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
5c920: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5c922: b08e cmpl %fp,%d0
5c924: 620c bhis 5c932 <rtems_stack_checker_switch_extension+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
5c926: d0aa 00ac addl %a2@(172),%d0
5c92a: b08e cmpl %fp,%d0
5c92c: 54c2 scc %d2
5c92e: 4482 negl %d2
5c930: 6002 bras 5c934 <rtems_stack_checker_switch_extension+0x28>
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
5c932: 4202 clrb %d2 <== NOT EXECUTED
/*
* 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,
5c934: 4878 0010 pea 10 <INVALID_OPERATION>
5c938: 4879 0009 64e8 pea 964e8 <Stack_check_Pattern>
5c93e: 2f01 movel %d1,%sp@-
5c940: 4eb9 0007 0b20 jsr 70b20 <memcmp>
5c946: 4fef 000c lea %sp@(12),%sp
5c94a: 4a80 tstl %d0
5c94c: 57c0 seq %d0
5c94e: 4480 negl %d0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
5c950: 4a02 tstb %d2
5c952: 6704 beqs 5c958 <rtems_stack_checker_switch_extension+0x4c><== NEVER TAKEN
5c954: 4a00 tstb %d0
5c956: 6610 bnes 5c968 <rtems_stack_checker_switch_extension+0x5c><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
5c958: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
5c95e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c960: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c962: 4eb9 0005 c862 jsr 5c862 <Stack_check_report_blown_task> <== NOT EXECUTED
}
}
5c968: 242e fff8 movel %fp@(-8),%d2
5c96c: 246e fffc moveal %fp@(-4),%a2
5c970: 4e5e unlk %fp <== NOT EXECUTED
0004c500 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
4c500: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4c504: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
4c508: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED
4c50c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4c510: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
double result;
char *end;
if ( !n )
4c514: 4a8a tstl %a2 <== NOT EXECUTED
4c516: 6700 009c beqw 4c5b4 <rtems_string_to_double+0xb4> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c51a: 4eb9 0004 e3a0 jsr 4e3a0 <__errno> <== NOT EXECUTED
*n = 0;
4c520: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c522: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4c524: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c526: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
4c528: 2480 movel %d0,%a2@ <== NOT EXECUTED
4c52a: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
result = strtod( s, &end );
4c52e: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4c532: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4c534: 4eb9 0005 0dd0 jsr 50dd0 <strtod> <== NOT EXECUTED
if ( endptr )
4c53a: 508f addql #8,%sp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
4c53c: 2400 movel %d0,%d2 <== NOT EXECUTED
4c53e: 2601 movel %d1,%d3 <== NOT EXECUTED
if ( endptr )
4c540: 4a8b tstl %a3 <== NOT EXECUTED
4c542: 6704 beqs 4c548 <rtems_string_to_double+0x48> <== NOT EXECUTED
*endptr = end;
4c544: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED
if ( end == s )
4c548: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED
4c54c: 676a beqs 4c5b8 <rtems_string_to_double+0xb8> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c54e: 4eb9 0004 e3a0 jsr 4e3a0 <__errno> <== NOT EXECUTED
4c554: 7222 moveq #34,%d1 <== NOT EXECUTED
4c556: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c558: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4c55a: 664e bnes 4c5aa <rtems_string_to_double+0xaa> <== NOT EXECUTED
4c55c: 42a7 clrl %sp@- <== NOT EXECUTED
4c55e: 42a7 clrl %sp@- <== NOT EXECUTED
4c560: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c562: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c564: 4eb9 0005 c8e8 jsr 5c8e8 <__eqdf2> <== NOT EXECUTED
4c56a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c56e: 4a80 tstl %d0 <== NOT EXECUTED
4c570: 674a beqs 4c5bc <rtems_string_to_double+0xbc> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
4c572: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4c576: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED
4c57c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c57e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c580: 4eb9 0005 c90c jsr 5c90c <__gtdf2> <== NOT EXECUTED
4c586: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c58a: 4a80 tstl %d0 <== NOT EXECUTED
4c58c: 6e2e bgts 4c5bc <rtems_string_to_double+0xbc> <== NOT EXECUTED
4c58e: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4c592: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED
4c598: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c59a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c59c: 4eb9 0005 c954 jsr 5c954 <__ltdf2> <== NOT EXECUTED
4c5a2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c5a6: 4a80 tstl %d0 <== NOT EXECUTED
4c5a8: 6d12 blts 4c5bc <rtems_string_to_double+0xbc> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
4c5aa: 2482 movel %d2,%a2@ <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
4c5ac: 4280 clrl %d0 <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4c5ae: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED
4c5b2: 600a bras 4c5be <rtems_string_to_double+0xbe> <== NOT EXECUTED
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c5b4: 7009 moveq #9,%d0 <== NOT EXECUTED
4c5b6: 6006 bras 4c5be <rtems_string_to_double+0xbe> <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c5b8: 700b moveq #11,%d0 <== NOT EXECUTED
4c5ba: 6002 bras 4c5be <rtems_string_to_double+0xbe> <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
4c5bc: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4c5be: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED
4c5c4: 4e5e unlk %fp <== NOT EXECUTED
0004c5c8 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
4c5c8: 4e56 ffec linkw %fp,#-20
4c5cc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4c5d0: 262e 0008 movel %fp@(8),%d3
4c5d4: 246e 000c moveal %fp@(12),%a2
4c5d8: 266e 0010 moveal %fp@(16),%a3
float result;
char *end;
if ( !n )
4c5dc: 4a8a tstl %a2
4c5de: 677e beqs 4c65e <rtems_string_to_float+0x96>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c5e0: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c5e6: 2040 moveal %d0,%a0
4c5e8: 4290 clrl %a0@
*n = 0;
4c5ea: 24bc 0000 0000 movel #0,%a2@
result = strtof( s, &end );
4c5f0: 486e fffc pea %fp@(-4)
4c5f4: 2f03 movel %d3,%sp@-
4c5f6: 4eb9 0005 0df0 jsr 50df0 <strtof>
if ( endptr )
4c5fc: 508f addql #8,%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
4c5fe: 2400 movel %d0,%d2
if ( endptr )
4c600: 4a8b tstl %a3
4c602: 6704 beqs 4c608 <rtems_string_to_float+0x40>
*endptr = end;
4c604: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c608: b6ae fffc cmpl %fp@(-4),%d3
4c60c: 6754 beqs 4c662 <rtems_string_to_float+0x9a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c60e: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c614: 7222 moveq #34,%d1
4c616: 2040 moveal %d0,%a0
4c618: b290 cmpl %a0@,%d1
4c61a: 663c bnes 4c658 <rtems_string_to_float+0x90>
4c61c: 2f3c 0000 0000 movel #0,%sp@-
4c622: 2f02 movel %d2,%sp@-
4c624: 4eb9 0005 c99c jsr 5c99c <__eqsf2>
4c62a: 508f addql #8,%sp
4c62c: 4a80 tstl %d0
4c62e: 6736 beqs 4c666 <rtems_string_to_float+0x9e> <== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
4c630: 2f3c 7f7f ffff movel #2139095039,%sp@-
4c636: 2f02 movel %d2,%sp@-
4c638: 4eb9 0005 c9b8 jsr 5c9b8 <__gtsf2>
4c63e: 508f addql #8,%sp
4c640: 4a80 tstl %d0
4c642: 6e22 bgts 4c666 <rtems_string_to_float+0x9e> <== NEVER TAKEN
4c644: 2f3c ff7f ffff movel #-8388609,%sp@-
4c64a: 2f02 movel %d2,%sp@-
4c64c: 4eb9 0005 c9d4 jsr 5c9d4 <__ltsf2>
4c652: 508f addql #8,%sp
4c654: 4a80 tstl %d0
4c656: 6d0e blts 4c666 <rtems_string_to_float+0x9e> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
4c658: 2482 movel %d2,%a2@
return RTEMS_SUCCESSFUL;
4c65a: 4280 clrl %d0
4c65c: 600a bras 4c668 <rtems_string_to_float+0xa0>
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c65e: 7009 moveq #9,%d0
4c660: 6006 bras 4c668 <rtems_string_to_float+0xa0>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c662: 700b moveq #11,%d0
4c664: 6002 bras 4c668 <rtems_string_to_float+0xa0>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
4c666: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4c668: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c66e: 4e5e unlk %fp
...
000583b0 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
583b0: 4e56 ffec linkw %fp,#-20
583b4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
583b8: 262e 0008 movel %fp@(8),%d3
583bc: 246e 000c moveal %fp@(12),%a2
583c0: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
583c4: 4a8a tstl %a2
583c6: 6758 beqs 58420 <rtems_string_to_int+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
583c8: 4eb9 0006 da4c jsr 6da4c <__errno>
583ce: 2040 moveal %d0,%a0
583d0: 4290 clrl %a0@
*n = 0;
583d2: 4292 clrl %a2@
result = strtol( s, &end, base );
583d4: 2f2e 0014 movel %fp@(20),%sp@-
583d8: 486e fffc pea %fp@(-4)
583dc: 2f03 movel %d3,%sp@-
583de: 4eb9 0007 4d56 jsr 74d56 <strtol>
if ( endptr )
583e4: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
583e8: 2400 movel %d0,%d2
if ( endptr )
583ea: 4a8b tstl %a3
583ec: 6704 beqs 583f2 <rtems_string_to_int+0x42>
*endptr = end;
583ee: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
583f2: b6ae fffc cmpl %fp@(-4),%d3
583f6: 672c beqs 58424 <rtems_string_to_int+0x74>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
583f8: 4eb9 0006 da4c jsr 6da4c <__errno>
583fe: 7222 moveq #34,%d1
58400: 2040 moveal %d0,%a0
58402: b290 cmpl %a0@,%d1
58404: 6614 bnes 5841a <rtems_string_to_int+0x6a>
58406: 4a82 tstl %d2
58408: 671e beqs 58428 <rtems_string_to_int+0x78> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
5840a: 0c82 7fff ffff cmpil #2147483647,%d2
58410: 6716 beqs 58428 <rtems_string_to_int+0x78>
58412: 0c82 8000 0000 cmpil #-2147483648,%d2
58418: 670e beqs 58428 <rtems_string_to_int+0x78> <== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
5841a: 2482 movel %d2,%a2@
return RTEMS_SUCCESSFUL;
5841c: 4280 clrl %d0
5841e: 600a bras 5842a <rtems_string_to_int+0x7a>
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
58420: 7009 moveq #9,%d0
58422: 6006 bras 5842a <rtems_string_to_int+0x7a>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
58424: 700b moveq #11,%d0
58426: 6002 bras 5842a <rtems_string_to_int+0x7a>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
58428: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
5842a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
58430: 4e5e unlk %fp <== NOT EXECUTED
0004c798 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
4c798: 4e56 ffec linkw %fp,#-20
4c79c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4c7a0: 262e 0008 movel %fp@(8),%d3
4c7a4: 246e 000c moveal %fp@(12),%a2
4c7a8: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4c7ac: 4a8a tstl %a2
4c7ae: 6758 beqs 4c808 <rtems_string_to_long+0x70> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c7b0: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c7b6: 2040 moveal %d0,%a0
4c7b8: 4290 clrl %a0@
*n = 0;
4c7ba: 4292 clrl %a2@
result = strtol( s, &end, base );
4c7bc: 2f2e 0014 movel %fp@(20),%sp@-
4c7c0: 486e fffc pea %fp@(-4)
4c7c4: 2f03 movel %d3,%sp@-
4c7c6: 4eb9 0005 0fd2 jsr 50fd2 <strtol>
if ( endptr )
4c7cc: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4c7d0: 2400 movel %d0,%d2
if ( endptr )
4c7d2: 4a8b tstl %a3
4c7d4: 6704 beqs 4c7da <rtems_string_to_long+0x42>
*endptr = end;
4c7d6: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c7da: b6ae fffc cmpl %fp@(-4),%d3
4c7de: 672c beqs 4c80c <rtems_string_to_long+0x74> <== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c7e0: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c7e6: 7222 moveq #34,%d1
4c7e8: 2040 moveal %d0,%a0
4c7ea: b290 cmpl %a0@,%d1
4c7ec: 6614 bnes 4c802 <rtems_string_to_long+0x6a> <== NEVER TAKEN
4c7ee: 4a82 tstl %d2
4c7f0: 671e beqs 4c810 <rtems_string_to_long+0x78> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
4c7f2: 0c82 7fff ffff cmpil #2147483647,%d2
4c7f8: 6716 beqs 4c810 <rtems_string_to_long+0x78> <== NEVER TAKEN
4c7fa: 0c82 8000 0000 cmpil #-2147483648,%d2
4c800: 670e beqs 4c810 <rtems_string_to_long+0x78> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
4c802: 2482 movel %d2,%a2@
return RTEMS_SUCCESSFUL;
4c804: 4280 clrl %d0
4c806: 600a bras 4c812 <rtems_string_to_long+0x7a>
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c808: 7009 moveq #9,%d0
4c80a: 6006 bras 4c812 <rtems_string_to_long+0x7a>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c80c: 700b moveq #11,%d0
4c80e: 6002 bras 4c812 <rtems_string_to_long+0x7a>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4c810: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4c812: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c818: 4e5e unlk %fp <== NOT EXECUTED
0004c6f8 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
4c6f8: 4e56 ffe8 linkw %fp,#-24
4c6fc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
4c700: 282e 0008 movel %fp@(8),%d4
4c704: 246e 000c moveal %fp@(12),%a2
4c708: 266e 0010 moveal %fp@(16),%a3
long long result;
char *end;
if ( !n )
4c70c: 4a8a tstl %a2
4c70e: 6774 beqs 4c784 <rtems_string_to_long_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c710: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c716: 2040 moveal %d0,%a0
*n = 0;
4c718: 4280 clrl %d0
4c71a: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c71c: 4290 clrl %a0@
*n = 0;
4c71e: 2480 movel %d0,%a2@
4c720: 2541 0004 movel %d1,%a2@(4)
result = strtoll( s, &end, base );
4c724: 2f2e 0014 movel %fp@(20),%sp@-
4c728: 486e fffc pea %fp@(-4)
4c72c: 2f04 movel %d4,%sp@-
4c72e: 4eb9 0005 0ff4 jsr 50ff4 <strtoll>
if ( endptr )
4c734: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
4c738: 2400 movel %d0,%d2
4c73a: 2601 movel %d1,%d3
if ( endptr )
4c73c: 4a8b tstl %a3
4c73e: 6704 beqs 4c744 <rtems_string_to_long_long+0x4c>
*endptr = end;
4c740: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c744: b8ae fffc cmpl %fp@(-4),%d4
4c748: 673e beqs 4c788 <rtems_string_to_long_long+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c74a: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c750: 7222 moveq #34,%d1
4c752: 2040 moveal %d0,%a0
4c754: b290 cmpl %a0@,%d1
4c756: 6622 bnes 4c77a <rtems_string_to_long_long+0x82>
4c758: 2002 movel %d2,%d0
4c75a: 8083 orl %d3,%d0
4c75c: 672e beqs 4c78c <rtems_string_to_long_long+0x94> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
4c75e: 203c 7fff ffff movel #2147483647,%d0
4c764: 72ff moveq #-1,%d1
4c766: 9283 subl %d3,%d1
4c768: 9182 subxl %d2,%d0
4c76a: 6720 beqs 4c78c <rtems_string_to_long_long+0x94>
4c76c: 203c 8000 0000 movel #-2147483648,%d0
4c772: 4281 clrl %d1
4c774: 9283 subl %d3,%d1
4c776: 9182 subxl %d2,%d0
4c778: 6712 beqs 4c78c <rtems_string_to_long_long+0x94> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4c77a: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4c77c: 2482 movel %d2,%a2@
4c77e: 2543 0004 movel %d3,%a2@(4)
4c782: 600a bras 4c78e <rtems_string_to_long_long+0x96>
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c784: 7009 moveq #9,%d0
4c786: 6006 bras 4c78e <rtems_string_to_long_long+0x96>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c788: 700b moveq #11,%d0
4c78a: 6002 bras 4c78e <rtems_string_to_long_long+0x96>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4c78c: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4c78e: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
4c794: 4e5e unlk %fp <== NOT EXECUTED
00058450 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
58450: 4e56 ffec linkw %fp,#-20
58454: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
58458: 262e 0008 movel %fp@(8),%d3
5845c: 246e 000c moveal %fp@(12),%a2
58460: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
58464: 4a8a tstl %a2
58466: 6764 beqs 584cc <rtems_string_to_unsigned_char+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
58468: 4eb9 0006 da4c jsr 6da4c <__errno>
5846e: 2040 moveal %d0,%a0
58470: 4290 clrl %a0@
*n = 0;
58472: 4212 clrb %a2@
result = strtoul( s, &end, base );
58474: 2f2e 0014 movel %fp@(20),%sp@-
58478: 486e fffc pea %fp@(-4)
5847c: 2f03 movel %d3,%sp@-
5847e: 4eb9 0007 51fa jsr 751fa <strtoul>
if ( endptr )
58484: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
58488: 2400 movel %d0,%d2
if ( endptr )
5848a: 4a8b tstl %a3
5848c: 6704 beqs 58492 <rtems_string_to_unsigned_char+0x42>
*endptr = end;
5848e: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
58492: b6ae fffc cmpl %fp@(-4),%d3
58496: 6738 beqs 584d0 <rtems_string_to_unsigned_char+0x80>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
58498: 4eb9 0006 da4c jsr 6da4c <__errno>
5849e: 7222 moveq #34,%d1
584a0: 2040 moveal %d0,%a0
584a2: b290 cmpl %a0@,%d1
584a4: 660a bnes 584b0 <rtems_string_to_unsigned_char+0x60>
(( result == 0 ) || ( result == ULONG_MAX )))
584a6: 2002 movel %d2,%d0
584a8: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
584aa: 72fd moveq #-3,%d1
584ac: b280 cmpl %d0,%d1
584ae: 6524 bcss 584d4 <rtems_string_to_unsigned_char+0x84><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
584b0: 0c82 0000 00ff cmpil #255,%d2
584b6: 630e blss 584c6 <rtems_string_to_unsigned_char+0x76>
errno = ERANGE;
584b8: 4eb9 0006 da4c jsr 6da4c <__errno>
584be: 2040 moveal %d0,%a0
584c0: 7022 moveq #34,%d0
584c2: 2080 movel %d0,%a0@
584c4: 600e bras 584d4 <rtems_string_to_unsigned_char+0x84>
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
584c6: 4280 clrl %d0
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
584c8: 1482 moveb %d2,%a2@
584ca: 600a bras 584d6 <rtems_string_to_unsigned_char+0x86>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
584cc: 7009 moveq #9,%d0
584ce: 6006 bras 584d6 <rtems_string_to_unsigned_char+0x86>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
584d0: 700b moveq #11,%d0
584d2: 6002 bras 584d6 <rtems_string_to_unsigned_char+0x86>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
584d4: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
584d6: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
584dc: 4e5e unlk %fp <== NOT EXECUTED
0004c8c8 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
4c8c8: 4e56 ffec linkw %fp,#-20
4c8cc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4c8d0: 242e 0008 movel %fp@(8),%d2
4c8d4: 246e 000c moveal %fp@(12),%a2
4c8d8: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4c8dc: 4a8a tstl %a2
4c8de: 674e beqs 4c92e <rtems_string_to_unsigned_int+0x66>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c8e0: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c8e6: 2040 moveal %d0,%a0
4c8e8: 4290 clrl %a0@
*n = 0;
4c8ea: 4292 clrl %a2@
result = strtoul( s, &end, base );
4c8ec: 2f2e 0014 movel %fp@(20),%sp@-
4c8f0: 486e fffc pea %fp@(-4)
4c8f4: 2f02 movel %d2,%sp@-
4c8f6: 4eb9 0005 1476 jsr 51476 <strtoul>
if ( endptr )
4c8fc: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4c900: 2600 movel %d0,%d3
if ( endptr )
4c902: 4a8b tstl %a3
4c904: 6704 beqs 4c90a <rtems_string_to_unsigned_int+0x42>
*endptr = end;
4c906: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c90a: b4ae fffc cmpl %fp@(-4),%d2
4c90e: 6722 beqs 4c932 <rtems_string_to_unsigned_int+0x6a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c910: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c916: 7222 moveq #34,%d1
4c918: 2040 moveal %d0,%a0
4c91a: b290 cmpl %a0@,%d1
4c91c: 660a bnes 4c928 <rtems_string_to_unsigned_int+0x60>
(( result == 0 ) || ( result == ULONG_MAX )))
4c91e: 2003 movel %d3,%d0
4c920: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c922: 72fd moveq #-3,%d1
4c924: b280 cmpl %d0,%d1
4c926: 650e bcss 4c936 <rtems_string_to_unsigned_int+0x6e><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4c928: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4c92a: 4280 clrl %d0
4c92c: 600a bras 4c938 <rtems_string_to_unsigned_int+0x70>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c92e: 7009 moveq #9,%d0
4c930: 6006 bras 4c938 <rtems_string_to_unsigned_int+0x70>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c932: 700b moveq #11,%d0
4c934: 6002 bras 4c938 <rtems_string_to_unsigned_int+0x70>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4c936: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4c938: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c93e: 4e5e unlk %fp
...
00049b54 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
49b54: 4e56 ffec linkw %fp,#-20
49b58: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
49b5c: 242e 0008 movel %fp@(8),%d2
49b60: 246e 000c moveal %fp@(12),%a2
49b64: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
49b68: 4a8a tstl %a2
49b6a: 674e beqs 49bba <rtems_string_to_unsigned_long+0x66>
return RTEMS_INVALID_ADDRESS;
errno = 0;
49b6c: 4eb9 0006 da4c jsr 6da4c <__errno>
49b72: 2040 moveal %d0,%a0
49b74: 4290 clrl %a0@
*n = 0;
49b76: 4292 clrl %a2@
result = strtoul( s, &end, base );
49b78: 2f2e 0014 movel %fp@(20),%sp@-
49b7c: 486e fffc pea %fp@(-4)
49b80: 2f02 movel %d2,%sp@-
49b82: 4eb9 0007 51fa jsr 751fa <strtoul>
if ( endptr )
49b88: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
49b8c: 2600 movel %d0,%d3
if ( endptr )
49b8e: 4a8b tstl %a3
49b90: 6704 beqs 49b96 <rtems_string_to_unsigned_long+0x42>
*endptr = end;
49b92: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
49b96: b4ae fffc cmpl %fp@(-4),%d2
49b9a: 6722 beqs 49bbe <rtems_string_to_unsigned_long+0x6a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
49b9c: 4eb9 0006 da4c jsr 6da4c <__errno>
49ba2: 7222 moveq #34,%d1
49ba4: 2040 moveal %d0,%a0
49ba6: b290 cmpl %a0@,%d1
49ba8: 660a bnes 49bb4 <rtems_string_to_unsigned_long+0x60>
(( result == 0 ) || ( result == ULONG_MAX )))
49baa: 2003 movel %d3,%d0
49bac: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
49bae: 72fd moveq #-3,%d1
49bb0: b280 cmpl %d0,%d1
49bb2: 650e bcss 49bc2 <rtems_string_to_unsigned_long+0x6e><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
49bb4: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
49bb6: 4280 clrl %d0
49bb8: 600a bras 49bc4 <rtems_string_to_unsigned_long+0x70>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
49bba: 7009 moveq #9,%d0
49bbc: 6006 bras 49bc4 <rtems_string_to_unsigned_long+0x70>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
49bbe: 700b moveq #11,%d0
49bc0: 6002 bras 49bc4 <rtems_string_to_unsigned_long+0x70>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
49bc2: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
49bc4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
49bca: 4e5e unlk %fp
...
0004c944 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
4c944: 4e56 ffe4 linkw %fp,#-28
4c948: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4c94c: 282e 0008 movel %fp@(8),%d4
4c950: 246e 000c moveal %fp@(12),%a2
4c954: 266e 0010 moveal %fp@(16),%a3
unsigned long long result;
char *end;
if ( !n )
4c958: 4a8a tstl %a2
4c95a: 6764 beqs 4c9c0 <rtems_string_to_unsigned_long_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c95c: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c962: 2040 moveal %d0,%a0
*n = 0;
4c964: 4280 clrl %d0
4c966: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c968: 4290 clrl %a0@
*n = 0;
4c96a: 2480 movel %d0,%a2@
4c96c: 2541 0004 movel %d1,%a2@(4)
result = strtoull( s, &end, base );
4c970: 2f2e 0014 movel %fp@(20),%sp@-
4c974: 486e fffc pea %fp@(-4)
4c978: 2f04 movel %d4,%sp@-
4c97a: 4eb9 0005 1498 jsr 51498 <strtoull>
if ( endptr )
4c980: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
4c984: 2400 movel %d0,%d2
4c986: 2601 movel %d1,%d3
if ( endptr )
4c988: 4a8b tstl %a3
4c98a: 6704 beqs 4c990 <rtems_string_to_unsigned_long_long+0x4c>
*endptr = end;
4c98c: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c990: b8ae fffc cmpl %fp@(-4),%d4
4c994: 672e beqs 4c9c4 <rtems_string_to_unsigned_long_long+0x80>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c996: 4eb9 0004 e3a0 jsr 4e3a0 <__errno>
4c99c: 7222 moveq #34,%d1
4c99e: 2040 moveal %d0,%a0
4c9a0: b290 cmpl %a0@,%d1
4c9a2: 6612 bnes 4c9b6 <rtems_string_to_unsigned_long_long+0x72>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4c9a4: 70ff moveq #-1,%d0
4c9a6: 72ff moveq #-1,%d1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c9a8: 78ff moveq #-1,%d4
4c9aa: 7afd moveq #-3,%d5
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4c9ac: d283 addl %d3,%d1
4c9ae: d182 addxl %d2,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c9b0: 9a81 subl %d1,%d5
4c9b2: 9980 subxl %d0,%d4
4c9b4: 6512 bcss 4c9c8 <rtems_string_to_unsigned_long_long+0x84><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4c9b6: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4c9b8: 2482 movel %d2,%a2@
4c9ba: 2543 0004 movel %d3,%a2@(4)
4c9be: 600a bras 4c9ca <rtems_string_to_unsigned_long_long+0x86>
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c9c0: 7009 moveq #9,%d0
4c9c2: 6006 bras 4c9ca <rtems_string_to_unsigned_long_long+0x86>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c9c4: 700b moveq #11,%d0
4c9c6: 6002 bras 4c9ca <rtems_string_to_unsigned_long_long+0x86>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
4c9c8: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4c9ca: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3
4c9d0: 4e5e unlk %fp <== NOT EXECUTED
000425d0 <rtems_tarfs_load>:
int rtems_tarfs_load(
const char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
425d0: 4e56 fe1c linkw %fp,#-484
425d4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%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 =
425d8: 4878 0018 pea 18 <OPER2+0x4>
rtems_filesystem_eval_path_start( &ctx, mountpoint, eval_flags );
425dc: 45ee fe64 lea %fp@(-412),%a2
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 =
425e0: 2f2e 0008 movel %fp@(8),%sp@-
425e4: 2f0a movel %a2,%sp@-
425e6: 4eb9 0004 428a jsr 4428a <rtems_filesystem_eval_path_start>
static inline void rtems_filesystem_eval_path_extract_currentloc(
rtems_filesystem_eval_path_context_t *ctx,
rtems_filesystem_location_info_t *get
)
{
rtems_filesystem_location_copy_and_detach(
425ec: 486a 0018 pea %a2@(24)
425f0: 2640 moveal %d0,%a3
425f2: 486e fe4c pea %fp@(-436)
425f6: 4eb9 0004 46b0 jsr 446b0 <rtems_filesystem_location_copy_and_detach>
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
rootloc.mt_entry->ops != &IMFS_ops
425fc: 206e fe60 moveal %fp@(-416),%a0
static inline void rtems_filesystem_eval_path_set_flags(
rtems_filesystem_eval_path_context_t *ctx,
int flags
)
{
ctx->flags = flags;
42600: 7060 moveq #96,%d0
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
42602: 4fef 0014 lea %sp@(20),%sp
42606: 2d40 fe74 movel %d0,%fp@(-396)
rootloc.mt_entry->ops != &IMFS_ops
4260a: 2028 000c movel %a0@(12),%d0
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
4260e: 0c80 0005 fa48 cmpil #391752,%d0
42614: 670a beqs 42620 <rtems_tarfs_load+0x50>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
42616: 0c80 0006 0432 cmpil #394290,%d0
4261c: 6600 01b2 bnew 427d0 <rtems_tarfs_load+0x200>
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42620: 280e movel %fp,%d4
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
rtems_filesystem_location_free( currentloc );
rtems_filesystem_location_clone( currentloc, &rootloc );
42622: 2c0e movel %fp,%d6
rtems_filesystem_eval_path_set_path(
&ctx,
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
42624: 2e0e movel %fp,%d7
* - 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);
42626: 260e movel %fp,%d3
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
42628: 95ca subal %a2,%a2
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
4262a: 4bf9 0005 028c lea 5028c <strncmp>,%a5
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42630: 0684 ffff fe9c addil #-356,%d4
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
rtems_filesystem_location_free( currentloc );
rtems_filesystem_location_clone( currentloc, &rootloc );
42636: 0686 ffff fe4c addil #-436,%d6
rtems_filesystem_eval_path_set_path(
&ctx,
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
4263c: 0687 ffff fe64 addil #-412,%d7
* - 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);
42642: 0683 ffff ff00 addil #-256,%d3
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while ( rv == 0 ) {
if (offset + 512 > tar_size)
42648: 240a movel %a2,%d2
4264a: 0682 0000 0200 addil #512,%d2
42650: b4ae 0010 cmpl %fp@(16),%d2
42654: 6200 017e bhiw 427d4 <rtems_tarfs_load+0x204>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
42658: 4878 0005 pea 5 <COMPARE>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
4265c: d5ee 000c addal %fp@(12),%a2
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
42660: 4879 0005 facc pea 5facc <IMFS_node_control_default+0x14>
42666: 486a 0101 pea %a2@(257)
4266a: 4e95 jsr %a5@
4266c: 4fef 000c lea %sp@(12),%sp
42670: 4a80 tstl %d0
42672: 6600 0160 bnew 427d4 <rtems_tarfs_load+0x204>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42676: 4878 0063 pea 63 <DBL_MANT_DIG+0x2e>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
4267a: 49f9 0004 9d44 lea 49d44 <_rtems_octal2ulong>,%a4
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42680: 2f0a movel %a2,%sp@-
42682: 2f04 movel %d4,%sp@-
42684: 4eb9 0005 0388 jsr 50388 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
4268a: 4201 clrb %d1
4268c: 1d41 feff moveb %d1,%fp@(-257)
linkflag = hdr_ptr[156];
42690: 122a 009c moveb %a2@(156),%d1
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42694: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
42698: 486a 0064 pea %a2@(100)
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
4269c: 1d41 fe4b moveb %d1,%fp@(-437)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
426a0: 4e94 jsr %a4@
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
426a2: 4878 000c pea c <OPER1>
426a6: 486a 007c pea %a2@(124)
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);
426aa: 2d40 fe46 movel %d0,%fp@(-442)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
426ae: 4e94 jsr %a4@
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
426b0: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
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);
426b4: 2a00 movel %d0,%d5
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
426b6: 486a 0094 pea %a2@(148)
426ba: 4e94 jsr %a4@
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
426bc: 4fef 0020 lea %sp@(32),%sp
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);
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
426c0: 2840 moveal %d0,%a4
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
426c2: 2e8a movel %a2,%sp@
426c4: 4eb9 0004 9d88 jsr 49d88 <_rtems_tar_header_checksum>
426ca: 588f addql #4,%sp
426cc: b9c0 cmpal %d0,%a4
426ce: 6600 0104 bnew 427d4 <rtems_tarfs_load+0x204>
* 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) {
426d2: 4280 clrl %d0
426d4: 102e fe4b moveb %fp@(-437),%d0
426d8: 7235 moveq #53,%d1
426da: b280 cmpl %d0,%d1
426dc: 6656 bnes 42734 <rtems_tarfs_load+0x164>
strcpy(full_filename, mountpoint);
426de: 2f2e 0008 movel %fp@(8),%sp@-
426e2: 2f03 movel %d3,%sp@-
426e4: 4eb9 0004 fd68 jsr 4fd68 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
426ea: 2f03 movel %d3,%sp@-
426ec: 4eb9 0005 0270 jsr 50270 <strlen>
426f2: 4fef 000c lea %sp@(12),%sp
426f6: 722f moveq #47,%d1
426f8: 41f6 0800 lea %fp@(00000000,%d0:l),%a0
426fc: 1028 feff moveb %a0@(-257),%d0
42700: 49c0 extbl %d0
42702: b280 cmpl %d0,%d1
42704: 6710 beqs 42716 <rtems_tarfs_load+0x146> <== ALWAYS TAKEN
strcat(full_filename, "/");
42706: 4879 0005 c949 pea 5c949 <_rodata_start+0x19> <== NOT EXECUTED
4270c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4270e: 4eb9 0004 fc40 jsr 4fc40 <strcat> <== NOT EXECUTED
42714: 508f addql #8,%sp <== NOT EXECUTED
strcat(full_filename, filename);
42716: 2f04 movel %d4,%sp@-
42718: 2f03 movel %d3,%sp@-
4271a: 4eb9 0004 fc40 jsr 4fc40 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
42720: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
42724: 2f03 movel %d3,%sp@-
42726: 4eb9 0004 3534 jsr 43534 <mkdir>
4272c: 4fef 0010 lea %sp@(16),%sp
42730: 6000 0098 braw 427ca <rtems_tarfs_load+0x1fa>
}
/*
* Create a LINEAR_FILE node
*/
else if (linkflag == REGTYPE) {
42734: 7230 moveq #48,%d1
42736: b280 cmpl %d0,%d1
42738: 6600 0090 bnew 427ca <rtems_tarfs_load+0x1fa>
rtems_filesystem_location_free( currentloc );
4273c: 2f0b movel %a3,%sp@-
4273e: 4eb9 0004 2f7c jsr 42f7c <rtems_filesystem_location_free>
rtems_filesystem_location_clone( currentloc, &rootloc );
42744: 2f06 movel %d6,%sp@-
42746: 2f0b movel %a3,%sp@-
42748: 4eb9 0004 2cac jsr 42cac <rtems_filesystem_location_clone>
rtems_filesystem_eval_path_set_path(
4274e: 2f04 movel %d4,%sp@-
42750: 4eb9 0005 0270 jsr 50270 <strlen>
&ctx,
filename,
strlen( filename )
);
rtems_filesystem_eval_path_continue( &ctx );
42756: 2e87 movel %d7,%sp@
const char *path,
size_t pathlen
)
{
ctx->path = path;
ctx->pathlen = pathlen;
42758: 2d40 fe68 movel %d0,%fp@(-408)
rtems_filesystem_eval_path_context_t *ctx,
const char *path,
size_t pathlen
)
{
ctx->path = path;
4275c: 2d44 fe64 movel %d4,%fp@(-412)
42760: 4eb9 0004 4108 jsr 44108 <rtems_filesystem_eval_path_continue>
if ( !rtems_filesystem_location_is_null( currentloc ) ) {
42766: 4fef 0010 lea %sp@(16),%sp
4276a: 203c 0006 01be movel #393662,%d0
42770: b0ab 0010 cmpl %a3@(16),%d0
42774: 6746 beqs 427bc <rtems_tarfs_load+0x1ec> <== NEVER TAKEN
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,
42776: 202e fe46 movel %fp@(-442),%d0
4277a: 0280 0000 01ff andil #511,%d0
42780: 42a7 clrl %sp@-
42782: 08c0 000f bset #15,%d0
42786: 2f00 movel %d0,%sp@-
42788: 2f2e fe70 movel %fp@(-400),%sp@-
4278c: 2f2e fe6c movel %fp@(-404),%sp@-
size_t namelen,
mode_t mode,
const IMFS_types_union *info
)
{
const IMFS_fs_info_t *fs_info =
42790: 206b 0014 moveal %a3@(20),%a0
(const IMFS_fs_info_t *) parentloc->mt_entry->fs_info;
return IMFS_create_node_with_control(
42794: 2068 0008 moveal %a0@(8),%a0
42798: 2f28 001c movel %a0@(28),%sp@-
4279c: 2f0b movel %a3,%sp@-
4279e: 4eb9 0004 a3ac jsr 4a3ac <IMFS_create_node_with_control>
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
427a4: 222e 000c movel %fp@(12),%d1
427a8: 2040 moveal %d0,%a0
427aa: d282 addl %d2,%d1
427ac: 4fef 0018 lea %sp@(24),%sp
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;
427b0: 2145 0052 movel %d5,%a0@(82)
427b4: 42a8 004e clrl %a0@(78)
node->info.linearfile.direct = &tar_image[offset];
427b8: 2141 0056 movel %d1,%a0@(86)
}
nblocks = (((file_size) + 511) & ~511) / 512;
427bc: 0685 0000 01ff addil #511,%d5
offset += 512 * nblocks;
427c2: 0285 ffff fe00 andil #-512,%d5
427c8: d485 addl %d5,%d2
rtems_filesystem_eval_path_set_flags(
&ctx,
RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE
);
if (
427ca: 2442 moveal %d2,%a2
427cc: 6000 fe7a braw 42648 <rtems_tarfs_load+0x78>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
) {
rv = -1;
427d0: 74ff moveq #-1,%d2
427d2: 6002 bras 427d6 <rtems_tarfs_load+0x206>
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)
427d4: 4282 clrl %d2
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
rtems_filesystem_location_free( &rootloc );
427d6: 486e fe4c pea %fp@(-436)
427da: 4eb9 0004 2f7c jsr 42f7c <rtems_filesystem_location_free>
rtems_filesystem_eval_path_cleanup( &ctx );
427e0: 486e fe64 pea %fp@(-412)
427e4: 4eb9 0004 437c jsr 4437c <rtems_filesystem_eval_path_cleanup>
return rv;
}
427ea: 2002 movel %d2,%d0
427ec: 4cee 3cfc fe1c moveml %fp@(-484),%d2-%d7/%a2-%a5
427f2: 4e5e unlk %fp
...
0004e1b0 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4e1b0: 4e56 ffe4 linkw %fp,#-28
4e1b4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4e1b8: 262e 0008 movel %fp@(8),%d3
4e1bc: 282e 000c movel %fp@(12),%d4
4e1c0: 286e 0010 moveal %fp@(16),%a4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4e1c4: 4a8c tstl %a4
4e1c6: 6700 0108 beqw 4e2d0 <rtems_task_mode+0x120>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4e1ca: 2679 0006 16a2 moveal 616a2 <_Per_CPU_Information+0xe>,%a3
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4e1d0: 4a2b 0070 tstb %a3@(112)
4e1d4: 57c2 seq %d2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4e1d6: 246b 00f8 moveal %a3@(248),%a2
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4e1da: 49c2 extbl %d2
4e1dc: 0282 0000 0100 andil #256,%d2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4e1e2: 4aab 0076 tstl %a3@(118)
4e1e6: 6704 beqs 4e1ec <rtems_task_mode+0x3c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4e1e8: 08c2 0009 bset #9,%d2
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4e1ec: 4a2a 0008 tstb %a2@(8)
4e1f0: 57c5 seq %d5
old_mode |= _ISR_Get_level();
4e1f2: 4eb9 0004 a760 jsr 4a760 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4e1f8: 49c5 extbl %d5
4e1fa: 0285 0000 0400 andil #1024,%d5
4e200: 8085 orl %d5,%d0
old_mode |= _ISR_Get_level();
4e202: 8082 orl %d2,%d0
4e204: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4e206: 0804 0008 btst #8,%d4
4e20a: 670e beqs 4e21a <rtems_task_mode+0x6a>
4e20c: 2203 movel %d3,%d1
4e20e: 7001 moveq #1,%d0
4e210: e089 lsrl #8,%d1
4e212: b181 eorl %d0,%d1
4e214: c280 andl %d0,%d1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4e216: 1741 0070 moveb %d1,%a3@(112)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4e21a: 0804 0009 btst #9,%d4
4e21e: 671c beqs 4e23c <rtems_task_mode+0x8c>
if ( _Modes_Is_timeslice(mode_set) ) {
4e220: 0803 0009 btst #9,%d3
4e224: 6712 beqs 4e238 <rtems_task_mode+0x88>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4e226: 41f9 0006 14e2 lea 614e2 <_Thread_Ticks_per_timeslice>,%a0
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;
4e22c: 7201 moveq #1,%d1
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4e22e: 2750 0072 movel %a0@,%a3@(114)
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;
4e232: 2741 0076 movel %d1,%a3@(118)
4e236: 6004 bras 4e23c <rtems_task_mode+0x8c>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4e238: 42ab 0076 clrl %a3@(118)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4e23c: 7007 moveq #7,%d0
4e23e: c084 andl %d4,%d0
4e240: 6712 beqs 4e254 <rtems_task_mode+0xa4>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4e242: 40c1 movew %sr,%d1
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4e244: 7007 moveq #7,%d0
4e246: c083 andl %d3,%d0
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4e248: 0281 0000 f8ff andil #63743,%d1
4e24e: e188 lsll #8,%d0
4e250: 8280 orl %d0,%d1
4e252: 46c1 movew %d1,%sr
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4e254: 0804 000a btst #10,%d4
4e258: 6742 beqs 4e29c <rtems_task_mode+0xec>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
4e25a: 720a moveq #10,%d1
4e25c: 2003 movel %d3,%d0
4e25e: e2a8 lsrl %d1,%d0
4e260: 123c 0001 moveb #1,%d1
4e264: b380 eorl %d1,%d0
4e266: c081 andl %d1,%d0
if ( is_asr_enabled != asr->is_enabled ) {
4e268: 4281 clrl %d1
4e26a: 122a 0008 moveb %a2@(8),%d1
4e26e: b280 cmpl %d0,%d1
4e270: 672a beqs 4e29c <rtems_task_mode+0xec>
asr->is_enabled = is_asr_enabled;
4e272: 1540 0008 moveb %d0,%a2@(8)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4e276: 203c 0000 0700 movel #1792,%d0
4e27c: 40c1 movew %sr,%d1
4e27e: 8081 orl %d1,%d0
4e280: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4e282: 202a 0016 movel %a2@(22),%d0
information->signals_pending = information->signals_posted;
4e286: 256a 0012 0016 movel %a2@(18),%a2@(22)
information->signals_posted = _signals;
4e28c: 2540 0012 movel %d0,%a2@(18)
_ISR_Enable( _level );
4e290: 46c1 movew %d1,%sr
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
4e292: 4aaa 0012 tstl %a2@(18)
4e296: 56c0 sne %d0
4e298: 4480 negl %d0
4e29a: 6002 bras 4e29e <rtems_task_mode+0xee>
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4e29c: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4e29e: 7203 moveq #3,%d1
4e2a0: b2b9 0006 1690 cmpl 61690 <_System_state_Current>,%d1
4e2a6: 662c bnes 4e2d4 <rtems_task_mode+0x124>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4e2a8: 2079 0006 16a2 moveal 616a2 <_Per_CPU_Information+0xe>,%a0
if ( are_signals_pending ||
4e2ae: 4a00 tstb %d0
4e2b0: 660e bnes 4e2c0 <rtems_task_mode+0x110>
4e2b2: b1f9 0006 16a6 cmpal 616a6 <_Per_CPU_Information+0x12>,%a0
4e2b8: 671a beqs 4e2d4 <rtems_task_mode+0x124>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
4e2ba: 4a28 0070 tstb %a0@(112)
4e2be: 6714 beqs 4e2d4 <rtems_task_mode+0x124> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
4e2c0: 7001 moveq #1,%d0
4e2c2: 13c0 0006 16a0 moveb %d0,616a0 <_Per_CPU_Information+0xc>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
4e2c8: 4eb9 0004 9748 jsr 49748 <_Thread_Dispatch>
4e2ce: 6004 bras 4e2d4 <rtems_task_mode+0x124>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
4e2d0: 7009 moveq #9,%d0
4e2d2: 6002 bras 4e2d6 <rtems_task_mode+0x126>
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4e2d4: 4280 clrl %d0
}
4e2d6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4e2dc: 4e5e unlk %fp <== NOT EXECUTED
00049df0 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
49df0: 4e56 fffc linkw %fp,#-4
49df4: 2f0a movel %a2,%sp@-
49df6: 246e 0010 moveal %fp@(16),%a2
49dfa: 2f02 movel %d2,%sp@-
49dfc: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
49e00: 670c beqs 49e0e <rtems_task_set_priority+0x1e>
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 ) );
49e02: 4280 clrl %d0
49e04: 1039 0005 fbbc moveb 5fbbc <rtems_maximum_priority>,%d0
49e0a: b082 cmpl %d2,%d0
49e0c: 654e bcss 49e5c <rtems_task_set_priority+0x6c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
49e0e: 4a8a tstl %a2
49e10: 674e beqs 49e60 <rtems_task_set_priority+0x70>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
49e12: 486e fffc pea %fp@(-4)
49e16: 2f2e 0008 movel %fp@(8),%sp@-
49e1a: 4eb9 0004 bf04 jsr 4bf04 <_Thread_Get>
switch ( location ) {
49e20: 508f addql #8,%sp
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
49e22: 2040 moveal %d0,%a0
switch ( location ) {
49e24: 4aae fffc tstl %fp@(-4)
49e28: 663a bnes 49e64 <rtems_task_set_priority+0x74>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
49e2a: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
49e2e: 4a82 tstl %d2
49e30: 6720 beqs 49e52 <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
49e32: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
49e36: 4aa8 001c tstl %a0@(28)
49e3a: 6706 beqs 49e42 <rtems_task_set_priority+0x52>
49e3c: b4a8 0014 cmpl %a0@(20),%d2
49e40: 6410 bccs 49e52 <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
49e42: 42a7 clrl %sp@-
49e44: 2f02 movel %d2,%sp@-
49e46: 2f08 movel %a0,%sp@-
49e48: 4eb9 0004 ba94 jsr 4ba94 <_Thread_Change_priority>
49e4e: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
49e52: 4eb9 0004 bee4 jsr 4bee4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
49e58: 4280 clrl %d0
49e5a: 600a bras 49e66 <rtems_task_set_priority+0x76>
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
49e5c: 7013 moveq #19,%d0
49e5e: 6006 bras 49e66 <rtems_task_set_priority+0x76>
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
49e60: 7009 moveq #9,%d0
49e62: 6002 bras 49e66 <rtems_task_set_priority+0x76>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
49e64: 7004 moveq #4,%d0
}
49e66: 242e fff4 movel %fp@(-12),%d2
49e6a: 246e fff8 moveal %fp@(-8),%a2
49e6e: 4e5e unlk %fp
...
00044984 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
44984: 4e56 fffc linkw %fp,#-4
44988: 2f0a movel %a2,%sp@-
4498a: 246e 0010 moveal %fp@(16),%a2
4498e: 2f02 movel %d2,%sp@-
44990: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
44994: 6742 beqs 449d8 <rtems_task_variable_get+0x54> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( !result )
44996: 4a8a tstl %a2
44998: 673e beqs 449d8 <rtems_task_variable_get+0x54> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
4499a: 486e fffc pea %fp@(-4)
4499e: 2f2e 0008 movel %fp@(8),%sp@-
449a2: 4eb9 0004 63ac jsr 463ac <_Thread_Get>
switch (location) {
449a8: 508f addql #8,%sp
449aa: 4aae fffc tstl %fp@(-4)
449ae: 662c bnes 449dc <rtems_task_variable_get+0x58>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
449b0: 2240 moveal %d0,%a1
449b2: 2069 0104 moveal %a1@(260),%a0
while (tvp) {
449b6: 6016 bras 449ce <rtems_task_variable_get+0x4a>
if (tvp->ptr == ptr) {
449b8: b4a8 0004 cmpl %a0@(4),%d2
449bc: 660e bnes 449cc <rtems_task_variable_get+0x48>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
449be: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
449c2: 4eb9 0004 638c jsr 4638c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
449c8: 4280 clrl %d0
449ca: 6012 bras 449de <rtems_task_variable_get+0x5a>
}
tvp = (rtems_task_variable_t *)tvp->next;
449cc: 2050 moveal %a0@,%a0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
449ce: 4a88 tstl %a0
449d0: 66e6 bnes 449b8 <rtems_task_variable_get+0x34>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
449d2: 4eb9 0004 638c jsr 4638c <_Thread_Enable_dispatch>
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
449d8: 7009 moveq #9,%d0
449da: 6002 bras 449de <rtems_task_variable_get+0x5a>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
449dc: 7004 moveq #4,%d0
}
449de: 242e fff4 movel %fp@(-12),%d2
449e2: 246e fff8 moveal %fp@(-8),%a2
449e6: 4e5e unlk %fp
...
00045330 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45330: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
45332: 4e56 0000 linkw %fp,#0
45336: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
4533a: b280 cmpl %d0,%d1
4533c: 6700 00be beqw 453fc <rtems_termios_baud_to_index+0xcc>
45340: 654a bcss 4538c <rtems_termios_baud_to_index+0x5c>
45342: 123c 0004 moveb #4,%d1
45346: b280 cmpl %d0,%d1
45348: 6700 009e beqw 453e8 <rtems_termios_baud_to_index+0xb8>
4534c: 6522 bcss 45370 <rtems_termios_baud_to_index+0x40>
4534e: 123c 0001 moveb #1,%d1
45352: b280 cmpl %d0,%d1
45354: 6700 00d6 beqw 4542c <rtems_termios_baud_to_index+0xfc>
45358: 6200 0082 bhiw 453dc <rtems_termios_baud_to_index+0xac>
4535c: 123c 0002 moveb #2,%d1
45360: b280 cmpl %d0,%d1
45362: 677c beqs 453e0 <rtems_termios_baud_to_index+0xb0>
45364: 123c 0003 moveb #3,%d1
45368: b280 cmpl %d0,%d1
4536a: 6600 00bc bnew 45428 <rtems_termios_baud_to_index+0xf8>
4536e: 6074 bras 453e4 <rtems_termios_baud_to_index+0xb4>
45370: 7206 moveq #6,%d1
45372: b280 cmpl %d0,%d1
45374: 677a beqs 453f0 <rtems_termios_baud_to_index+0xc0>
45376: 6274 bhis 453ec <rtems_termios_baud_to_index+0xbc>
45378: 123c 0007 moveb #7,%d1
4537c: b280 cmpl %d0,%d1
4537e: 6774 beqs 453f4 <rtems_termios_baud_to_index+0xc4>
45380: 123c 0008 moveb #8,%d1
45384: b280 cmpl %d0,%d1
45386: 6600 00a0 bnew 45428 <rtems_termios_baud_to_index+0xf8>
4538a: 606c bras 453f8 <rtems_termios_baud_to_index+0xc8>
4538c: 720e moveq #14,%d1
4538e: b280 cmpl %d0,%d1
45390: 677e beqs 45410 <rtems_termios_baud_to_index+0xe0><== NEVER TAKEN
45392: 651c bcss 453b0 <rtems_termios_baud_to_index+0x80>
45394: 123c 000b moveb #11,%d1
45398: b280 cmpl %d0,%d1
4539a: 6768 beqs 45404 <rtems_termios_baud_to_index+0xd4><== NEVER TAKEN
4539c: 6262 bhis 45400 <rtems_termios_baud_to_index+0xd0><== NEVER TAKEN
4539e: 123c 000c moveb #12,%d1
453a2: b280 cmpl %d0,%d1
453a4: 6762 beqs 45408 <rtems_termios_baud_to_index+0xd8><== NEVER TAKEN
453a6: 123c 000d moveb #13,%d1
453aa: b280 cmpl %d0,%d1
453ac: 667a bnes 45428 <rtems_termios_baud_to_index+0xf8><== NEVER TAKEN
453ae: 605c bras 4540c <rtems_termios_baud_to_index+0xdc>
453b0: 0c80 0000 1002 cmpil #4098,%d0
453b6: 6764 beqs 4541c <rtems_termios_baud_to_index+0xec><== NEVER TAKEN
453b8: 6210 bhis 453ca <rtems_termios_baud_to_index+0x9a>
453ba: 720f moveq #15,%d1
453bc: b280 cmpl %d0,%d1
453be: 6754 beqs 45414 <rtems_termios_baud_to_index+0xe4><== NEVER TAKEN
453c0: 0c80 0000 1001 cmpil #4097,%d0
453c6: 6660 bnes 45428 <rtems_termios_baud_to_index+0xf8><== NEVER TAKEN
453c8: 604e bras 45418 <rtems_termios_baud_to_index+0xe8>
453ca: 0c80 0000 1003 cmpil #4099,%d0
453d0: 674e beqs 45420 <rtems_termios_baud_to_index+0xf0><== NEVER TAKEN
453d2: 0c80 0000 1004 cmpil #4100,%d0
453d8: 664e bnes 45428 <rtems_termios_baud_to_index+0xf8><== NEVER TAKEN
453da: 6048 bras 45424 <rtems_termios_baud_to_index+0xf4>
case B0: baud_index = 0; break;
453dc: 4280 clrl %d0
453de: 604e bras 4542e <rtems_termios_baud_to_index+0xfe>
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
453e0: 7002 moveq #2,%d0
453e2: 604a bras 4542e <rtems_termios_baud_to_index+0xfe>
case B110: baud_index = 3; break;
453e4: 7003 moveq #3,%d0
453e6: 6046 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B134: baud_index = 4; break;
453e8: 7004 moveq #4,%d0
453ea: 6042 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B150: baud_index = 5; break;
453ec: 7005 moveq #5,%d0
453ee: 603e bras 4542e <rtems_termios_baud_to_index+0xfe>
case B200: baud_index = 6; break;
453f0: 7006 moveq #6,%d0
453f2: 603a bras 4542e <rtems_termios_baud_to_index+0xfe>
case B300: baud_index = 7; break;
453f4: 7007 moveq #7,%d0
453f6: 6036 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B600: baud_index = 8; break;
453f8: 7008 moveq #8,%d0
453fa: 6032 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B1200: baud_index = 9; break;
453fc: 7009 moveq #9,%d0
453fe: 602e bras 4542e <rtems_termios_baud_to_index+0xfe>
case B1800: baud_index = 10; break;
45400: 700a moveq #10,%d0
45402: 602a bras 4542e <rtems_termios_baud_to_index+0xfe>
case B2400: baud_index = 11; break;
45404: 700b moveq #11,%d0
45406: 6026 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B4800: baud_index = 12; break;
45408: 700c moveq #12,%d0
4540a: 6022 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B9600: baud_index = 13; break;
4540c: 700d moveq #13,%d0
4540e: 601e bras 4542e <rtems_termios_baud_to_index+0xfe>
case B19200: baud_index = 14; break;
45410: 700e moveq #14,%d0
45412: 601a bras 4542e <rtems_termios_baud_to_index+0xfe>
case B38400: baud_index = 15; break;
45414: 700f moveq #15,%d0
45416: 6016 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B57600: baud_index = 16; break;
45418: 7010 moveq #16,%d0
4541a: 6012 bras 4542e <rtems_termios_baud_to_index+0xfe>
case B115200: baud_index = 17; break;
4541c: 7011 moveq #17,%d0
4541e: 600e bras 4542e <rtems_termios_baud_to_index+0xfe>
case B230400: baud_index = 18; break;
45420: 7012 moveq #18,%d0
45422: 600a bras 4542e <rtems_termios_baud_to_index+0xfe>
case B460800: baud_index = 19; break;
45424: 7013 moveq #19,%d0
45426: 6006 bras 4542e <rtems_termios_baud_to_index+0xfe>
default: baud_index = -1; break;
45428: 70ff moveq #-1,%d0
4542a: 6002 bras 4542e <rtems_termios_baud_to_index+0xfe>
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
4542c: 7001 moveq #1,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4542e: 4e5e unlk %fp
...
000447a0 <rtems_termios_close>:
rtems_interrupt_enable (level);
}
rtems_status_code
rtems_termios_close (void *arg)
{
447a0: 4e56 fff4 linkw %fp,#-12
447a4: 48d7 1c00 moveml %a2-%a4,%sp@
447a8: 266e 0008 moveal %fp@(8),%a3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
447ac: 49f9 0004 62c4 lea 462c4 <rtems_semaphore_obtain>,%a4
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
447b2: 2053 moveal %a3@,%a0
447b4: 2468 002c moveal %a0@(44),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain(
447b8: 42a7 clrl %sp@-
447ba: 42a7 clrl %sp@-
447bc: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
447c2: 4e94 jsr %a4@
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
447c4: 4fef 000c lea %sp@(12),%sp
447c8: 4a80 tstl %d0
447ca: 6704 beqs 447d0 <rtems_termios_close+0x30> <== ALWAYS TAKEN
447cc: 6000 0088 braw 44856 <rtems_termios_close+0xb6> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
447d0: 202a 0008 movel %a2@(8),%d0
447d4: 5380 subql #1,%d0
447d6: 2540 0008 movel %d0,%a2@(8)
447da: 6600 0124 bnew 44900 <rtems_termios_close+0x160>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
447de: 222a 00cc movel %a2@(204),%d1
447e2: eb89 lsll #5,%d1
447e4: 0681 0005 d2f0 addil #381680,%d1
447ea: 2241 moveal %d1,%a1
447ec: 2051 moveal %a1@,%a0
447ee: 4a88 tstl %a0
447f0: 6706 beqs 447f8 <rtems_termios_close+0x58>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
447f2: 2f0a movel %a2,%sp@-
447f4: 4e90 jsr %a0@
447f6: 602c bras 44824 <rtems_termios_close+0x84>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
447f8: 42a7 clrl %sp@-
447fa: 42a7 clrl %sp@-
447fc: 2f2a 0018 movel %a2@(24),%sp@-
44800: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
44802: 4fef 000c lea %sp@(12),%sp
44806: 4a80 tstl %d0
44808: 6702 beqs 4480c <rtems_termios_close+0x6c> <== ALWAYS TAKEN
4480a: 604a bras 44856 <rtems_termios_close+0xb6> <== NOT EXECUTED
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
4480c: 4aaa 00b4 tstl %a2@(180)
44810: 6708 beqs 4481a <rtems_termios_close+0x7a>
44812: 2f0a movel %a2,%sp@-
44814: 4eba fb38 jsr %pc@(4434e <drainOutput.part.0>)
44818: 588f addql #4,%sp
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);
4481a: 2f2a 0018 movel %a2@(24),%sp@-
4481e: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
44824: 588f addql #4,%sp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44826: 7002 moveq #2,%d0
44828: b0aa 00b4 cmpl %a2@(180),%d0
4482c: 6630 bnes 4485e <rtems_termios_close+0xbe>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
4482e: 4878 0001 pea 1 <ADD>
44832: 49f9 0004 5e8c lea 45e8c <rtems_event_send>,%a4
44838: 2f2a 00c4 movel %a2@(196),%sp@-
4483c: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
4483e: 508f addql #8,%sp
44840: 4a80 tstl %d0
44842: 6702 beqs 44846 <rtems_termios_close+0xa6> <== ALWAYS TAKEN
44844: 6010 bras 44856 <rtems_termios_close+0xb6> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
44846: 4878 0001 pea 1 <ADD>
4484a: 2f2a 00c8 movel %a2@(200),%sp@-
4484e: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
44850: 508f addql #8,%sp
44852: 4a80 tstl %d0
44854: 6708 beqs 4485e <rtems_termios_close+0xbe> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
44856: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44858: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
4485e: 206a 009c moveal %a2@(156),%a0
44862: 4a88 tstl %a0
44864: 6710 beqs 44876 <rtems_termios_close+0xd6>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
44866: 2f0b movel %a3,%sp@-
44868: 2f2a 0010 movel %a2@(16),%sp@-
4486c: 2f2a 000c movel %a2@(12),%sp@-
44870: 4e90 jsr %a0@
44872: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
44876: 2252 moveal %a2@,%a1
44878: 206a 0004 moveal %a2@(4),%a0
4487c: 4a89 tstl %a1
4487e: 660c bnes 4488c <rtems_termios_close+0xec>
rtems_termios_ttyTail = tty->back;
44880: 23c8 0005 db20 movel %a0,5db20 <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
44886: 6708 beqs 44890 <rtems_termios_close+0xf0> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
44888: 4290 clrl %a0@ <== NOT EXECUTED
4488a: 6004 bras 44890 <rtems_termios_close+0xf0> <== NOT EXECUTED
}
} else {
tty->forw->back = tty->back;
4488c: 2348 0004 movel %a0,%a1@(4)
}
if (tty->back == NULL) {
44890: 226a 0004 moveal %a2@(4),%a1
44894: 2052 moveal %a2@,%a0
44896: 4a89 tstl %a1
44898: 660e bnes 448a8 <rtems_termios_close+0x108> <== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
4489a: 23c8 0005 db24 movel %a0,5db24 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
448a0: 6708 beqs 448aa <rtems_termios_close+0x10a>
rtems_termios_ttyHead->back = NULL;
448a2: 42a8 0004 clrl %a0@(4)
448a6: 6002 bras 448aa <rtems_termios_close+0x10a>
}
} else {
tty->back->forw = tty->forw;
448a8: 2288 movel %a0,%a1@ <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
448aa: 2f2a 0014 movel %a2@(20),%sp@-
448ae: 47f9 0004 6228 lea 46228 <rtems_semaphore_delete>,%a3
448b4: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
448b6: 2f2a 0018 movel %a2@(24),%sp@-
448ba: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
448bc: 2f2a 008c movel %a2@(140),%sp@-
448c0: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
448c2: 4fef 000c lea %sp@(12),%sp
448c6: 4aaa 00a0 tstl %a2@(160)
448ca: 6708 beqs 448d4 <rtems_termios_close+0x134>
448cc: 7002 moveq #2,%d0
448ce: b0aa 00b4 cmpl %a2@(180),%d0
448d2: 660c bnes 448e0 <rtems_termios_close+0x140>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
448d4: 2f2a 0068 movel %a2@(104),%sp@-
448d8: 4eb9 0004 6228 jsr 46228 <rtems_semaphore_delete>
448de: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
448e0: 2f2a 0058 movel %a2@(88),%sp@-
448e4: 47f9 0004 2a60 lea 42a60 <free>,%a3
448ea: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
448ec: 2f2a 007c movel %a2@(124),%sp@-
448f0: 4e93 jsr %a3@
free (tty->cbuf);
448f2: 2f2a 001c movel %a2@(28),%sp@-
448f6: 4e93 jsr %a3@
free (tty);
448f8: 2f0a movel %a2,%sp@-
448fa: 4e93 jsr %a3@
448fc: 4fef 0010 lea %sp@(16),%sp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
44900: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
44906: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
4490c: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
44912: 4280 clrl %d0
44914: 4e5e unlk %fp <== NOT EXECUTED
00045960 <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)
{
45960: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45964: 202e 000c movel %fp@(12),%d0
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
45968: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
4596c: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
45970: 7002 moveq #2,%d0
45972: b0a8 00b4 cmpl %a0@(180),%d0
45976: 661c bnes 45994 <rtems_termios_dequeue_characters+0x34>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
45978: 4878 0002 pea 2 <DOUBLE_FLOAT>
4597c: 2f28 00c8 movel %a0@(200),%sp@-
45980: 4eb9 0004 5e8c jsr 45e8c <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
45986: 508f addql #8,%sp
45988: 4a80 tstl %d0
4598a: 672c beqs 459b8 <rtems_termios_dequeue_characters+0x58><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
4598c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4598e: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
45994: 7005 moveq #5,%d0
45996: b0a8 00cc cmpl %a0@(204),%d0
4599a: 6612 bnes 459ae <rtems_termios_dequeue_characters+0x4e>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4599c: 2279 0005 d3a0 moveal 5d3a0 <rtems_termios_linesw+0xb4>,%a1
459a2: 4a89 tstl %a1
459a4: 6712 beqs 459b8 <rtems_termios_dequeue_characters+0x58><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
459a6: 2f08 movel %a0,%sp@-
459a8: 4e91 jsr %a1@
459aa: 588f addql #4,%sp
459ac: 600a bras 459b8 <rtems_termios_dequeue_characters+0x58>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
459ae: 2d48 0008 movel %a0,%fp@(8)
}
459b2: 4e5e unlk %fp
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
459b4: 6000 e77e braw 44134 <rtems_termios_refill_transmitter>
}
459b8: 4280 clrl %d0
459ba: 4e5e unlk %fp
...
00045696 <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)
{
45696: 4e56 ffcc linkw %fp,#-52
4569a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4569e: 246e 0008 moveal %fp@(8),%a2
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) {
456a2: 202a 00cc movel %a2@(204),%d0
* 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)
{
456a6: 266e 000c moveal %fp@(12),%a3
456aa: 280b movel %a3,%d4
456ac: d8ae 0010 addl %fp@(16),%d4
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) {
456b0: eb88 lsll #5,%d0
456b2: 0680 0005 d2fc addil #381692,%d0
456b8: 2040 moveal %d0,%a0
456ba: 4a90 tstl %a0@
456bc: 6636 bnes 456f4 <rtems_termios_enqueue_raw_characters+0x5e>
/*
* 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);
456be: 43ea 0030 lea %a2@(48),%a1
* 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)
456c2: 4282 clrl %d2
}
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);
456c4: 2a3c 0000 0700 movel #1792,%d5
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
456ca: 49ea 004a lea %a2@(74),%a4
/*
* 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);
456ce: 2d49 fffc movel %a1,%fp@(-4)
* 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)
456d2: 4203 clrb %d3
456d4: 6000 01ec braw 458c2 <rtems_termios_enqueue_raw_characters+0x22c>
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
456d8: 202a 00cc movel %a2@(204),%d0
456dc: 2f0a movel %a2,%sp@-
456de: 121b moveb %a3@+,%d1
456e0: eb88 lsll #5,%d0
456e2: 49c1 extbl %d1
456e4: 0680 0005 d2fc addil #381692,%d0
456ea: 2240 moveal %d0,%a1
456ec: 2f01 movel %d1,%sp@-
456ee: 2051 moveal %a1@,%a0
456f0: 4e90 jsr %a0@
456f2: 508f addql #8,%sp
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--) {
456f4: b88b cmpl %a3,%d4
456f6: 66e0 bnes 456d8 <rtems_termios_enqueue_raw_characters+0x42>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
456f8: 4aaa 00e4 tstl %a2@(228)
456fc: 6600 01dc bnew 458da <rtems_termios_enqueue_raw_characters+0x244>
45700: 206a 00dc moveal %a2@(220),%a0
45704: 4a88 tstl %a0
45706: 6700 01d2 beqw 458da <rtems_termios_enqueue_raw_characters+0x244>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4570a: 2f2a 00e0 movel %a2@(224),%sp@-
4570e: 486a 0030 pea %a2@(48)
45712: 4e90 jsr %a0@
tty->tty_rcvwakeup = 1;
45714: 508f addql #8,%sp
45716: 7001 moveq #1,%d0
45718: 2540 00e4 movel %d0,%a2@(228)
4571c: 6000 01bc braw 458da <rtems_termios_enqueue_raw_characters+0x244>
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
45720: 202a 00b8 movel %a2@(184),%d0
}
return 0;
}
while (len--) {
c = *buf++;
45724: 1c1b moveb %a3@+,%d6
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
45726: 0800 0009 btst #9,%d0
4572a: 6740 beqs 4576c <rtems_termios_enqueue_raw_characters+0xd6>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
4572c: 4287 clrl %d7
4572e: 1e2a 004a moveb %a2@(74),%d7
45732: 4281 clrl %d1
45734: 122a 0049 moveb %a2@(73),%d1
45738: 1006 moveb %d6,%d0
4573a: 49c0 extbl %d0
4573c: be80 cmpl %d0,%d7
4573e: 661e bnes 4575e <rtems_termios_enqueue_raw_characters+0xc8>
if (c == tty->termios.c_cc[VSTART]) {
45740: b280 cmpl %d0,%d1
45742: 660a bnes 4574e <rtems_termios_enqueue_raw_characters+0xb8><== ALWAYS TAKEN
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
45744: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45748: 7210 moveq #16,%d1 <== NOT EXECUTED
4574a: b380 eorl %d1,%d0 <== NOT EXECUTED
4574c: 6008 bras 45756 <rtems_termios_enqueue_raw_characters+0xc0><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
4574e: 202a 00b8 movel %a2@(184),%d0
45752: 7e10 moveq #16,%d7
45754: 8087 orl %d7,%d0
45756: 2540 00b8 movel %d0,%a2@(184)
4575a: 6000 0182 braw 458de <rtems_termios_enqueue_raw_characters+0x248>
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
4575e: b280 cmpl %d0,%d1
45760: 660a bnes 4576c <rtems_termios_enqueue_raw_characters+0xd6><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
45762: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45766: 72ef moveq #-17,%d1 <== NOT EXECUTED
45768: c081 andl %d1,%d0 <== NOT EXECUTED
4576a: 60ea bras 45756 <rtems_termios_enqueue_raw_characters+0xc0><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
4576c: 4a03 tstb %d3
4576e: 674c beqs 457bc <rtems_termios_enqueue_raw_characters+0x126><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
45770: 202a 00b8 movel %a2@(184),%d0
45774: 7e30 moveq #48,%d7
45776: 7220 moveq #32,%d1
45778: c087 andl %d7,%d0
4577a: b280 cmpl %d0,%d1
4577c: 6600 0144 bnew 458c2 <rtems_termios_enqueue_raw_characters+0x22c>
/* disable interrupts */
rtems_interrupt_disable(level);
45780: 2005 movel %d5,%d0 <== NOT EXECUTED
45782: 40c6 movew %sr,%d6 <== NOT EXECUTED
45784: 8086 orl %d6,%d0 <== NOT EXECUTED
45786: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
45788: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4578c: 7edf moveq #-33,%d7 <== NOT EXECUTED
4578e: c087 andl %d7,%d0 <== NOT EXECUTED
45790: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
45794: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
45798: 671c beqs 457b6 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
4579a: 202a 0084 movel %a2@(132),%d0 <== 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)(
4579e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
457a2: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED
457a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
457a8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
457ac: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
457b0: 4e90 jsr %a0@ <== NOT EXECUTED
457b2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
457b6: 46c6 movew %d6,%sr <== NOT EXECUTED
457b8: 6000 0108 braw 458c2 <rtems_termios_enqueue_raw_characters+0x22c><== NOT EXECUTED
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
457bc: 206a 0060 moveal %a2@(96),%a0
457c0: 2208 movel %a0,%d1
457c2: 5281 addql #1,%d1
457c4: 202a 0064 movel %a2@(100),%d0
457c8: 4c40 1007 remul %d0,%d7,%d1
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
457cc: 2005 movel %d5,%d0
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
457ce: 2a47 moveal %d7,%a5
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
457d0: 40c1 movew %sr,%d1
457d2: 8081 orl %d1,%d0
457d4: 46c0 movew %d0,%sr
457d6: 2d41 fff4 movel %d1,%fp@(-12)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
457da: 226a 005c moveal %a2@(92),%a1
457de: 202a 0064 movel %a2@(100),%d0
457e2: 9089 subl %a1,%d0
457e4: 43f5 0800 lea %a5@(00000000,%d0:l),%a1
% tty->rawInBuf.Size) > tty->highwater) &&
457e8: 2e09 movel %a1,%d7
457ea: 206a 0064 moveal %a2@(100),%a0
457ee: 2008 movel %a0,%d0
457f0: 4c40 7001 remul %d0,%d1,%d7
}
} 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)
457f4: b2aa 00c0 cmpl %a2@(192),%d1
457f8: 6300 008a blsw 45884 <rtems_termios_enqueue_raw_characters+0x1ee>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
457fc: 202a 00b8 movel %a2@(184),%d0 <== 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) &&
45800: 0800 0000 btst #0,%d0 <== NOT EXECUTED
45804: 667e bnes 45884 <rtems_termios_enqueue_raw_characters+0x1ee><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
45806: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4580a: 7e01 moveq #1,%d7 <== NOT EXECUTED
4580c: 8087 orl %d7,%d0 <== NOT EXECUTED
4580e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
45812: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45816: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED
4581c: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED
45822: 6632 bnes 45856 <rtems_termios_enqueue_raw_characters+0x1c0><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
45824: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45828: 0800 0005 btst #5,%d0 <== NOT EXECUTED
4582c: 6606 bnes 45834 <rtems_termios_enqueue_raw_characters+0x19e><== NOT EXECUTED
4582e: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
45832: 6650 bnes 45884 <rtems_termios_enqueue_raw_characters+0x1ee><== 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;
45834: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45838: 7202 moveq #2,%d1 <== NOT EXECUTED
4583a: 8081 orl %d1,%d0 <== NOT EXECUTED
4583c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
45840: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
45844: 2f0c movel %a4,%sp@- <== NOT EXECUTED
45846: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
4584a: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
4584e: 4e90 jsr %a0@ <== NOT EXECUTED
45850: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
45854: 602e bras 45884 <rtems_termios_enqueue_raw_characters+0x1ee><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
45856: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4585a: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED
45860: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED
45866: 661c bnes 45884 <rtems_termios_enqueue_raw_characters+0x1ee><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
45868: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4586c: 7e04 moveq #4,%d7 <== NOT EXECUTED
4586e: 8087 orl %d7,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
45870: 206a 00ac moveal %a2@(172),%a0 <== 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;
45874: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
45878: 4a88 tstl %a0 <== NOT EXECUTED
4587a: 6708 beqs 45884 <rtems_termios_enqueue_raw_characters+0x1ee><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
4587c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45880: 4e90 jsr %a0@ <== NOT EXECUTED
45882: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
45884: 222e fff4 movel %fp@(-12),%d1
45888: 46c1 movew %d1,%sr
if (newTail == tty->rawInBuf.Head) {
4588a: 202a 005c movel %a2@(92),%d0
4588e: b08d cmpl %a5,%d0
45890: 6604 bnes 45896 <rtems_termios_enqueue_raw_characters+0x200><== ALWAYS TAKEN
dropped++;
45892: 5282 addql #1,%d2 <== NOT EXECUTED
45894: 602c bras 458c2 <rtems_termios_enqueue_raw_characters+0x22c><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
45896: 206a 0058 moveal %a2@(88),%a0
4589a: 1186 d800 moveb %d6,%a0@(00000000,%a5:l)
tty->rawInBuf.Tail = newTail;
4589e: 254d 0060 movel %a5,%a2@(96)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
458a2: 4aaa 00e4 tstl %a2@(228)
458a6: 661a bnes 458c2 <rtems_termios_enqueue_raw_characters+0x22c><== NEVER TAKEN
458a8: 206a 00dc moveal %a2@(220),%a0
458ac: 4a88 tstl %a0
458ae: 6712 beqs 458c2 <rtems_termios_enqueue_raw_characters+0x22c><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
458b0: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
458b4: 7e01 moveq #1,%d7 <== NOT EXECUTED
/*
* 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);
458b6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
458ba: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
458bc: 508f addql #8,%sp <== NOT EXECUTED
458be: 2547 00e4 movel %d7,%a2@(228) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
458c2: b88b cmpl %a3,%d4
458c4: 6600 fe5a bnew 45720 <rtems_termios_enqueue_raw_characters+0x8a>
}
}
}
}
tty->rawInBufDropped += dropped;
458c8: d5aa 0078 addl %d2,%a2@(120)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
458cc: 2f2a 0068 movel %a2@(104),%sp@-
458d0: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return dropped;
458d6: 588f addql #4,%sp
458d8: 600a bras 458e4 <rtems_termios_enqueue_raw_characters+0x24e>
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
458da: 4282 clrl %d2
458dc: 6006 bras 458e4 <rtems_termios_enqueue_raw_characters+0x24e>
* 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)
{
458de: 7601 moveq #1,%d3
458e0: 6000 fe8e braw 45770 <rtems_termios_enqueue_raw_characters+0xda>
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
458e4: 2002 movel %d2,%d0
458e6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
458ec: 4e5e unlk %fp <== NOT EXECUTED
00044940 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
44940: 4e56 ffec linkw %fp,#-20
44944: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
44948: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4494c: 2053 moveal %a3@,%a0
4494e: 2468 002c moveal %a0@(44),%a2
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
44952: 286b 0008 moveal %a3@(8),%a4
rtems_status_code sc;
args->ioctl_return = 0;
44956: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4495a: 42a7 clrl %sp@-
4495c: 42a7 clrl %sp@-
4495e: 2f2a 0018 movel %a2@(24),%sp@-
44962: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
44968: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4496c: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
4496e: 6600 0358 bnew 44cc8 <rtems_termios_ioctl+0x388>
return sc;
}
switch (args->command) {
44972: 222b 0004 movel %a3@(4),%d1
44976: 7005 moveq #5,%d0
44978: b081 cmpl %d1,%d0
4497a: 6700 02ac beqw 44c28 <rtems_termios_ioctl+0x2e8>
4497e: 6526 bcss 449a6 <rtems_termios_ioctl+0x66>
44980: 7602 moveq #2,%d3
44982: b681 cmpl %d1,%d3
44984: 6700 008a beqw 44a10 <rtems_termios_ioctl+0xd0>
44988: 650a bcss 44994 <rtems_termios_ioctl+0x54>
4498a: 103c 0001 moveb #1,%d0
4498e: b081 cmpl %d1,%d0
44990: 6642 bnes 449d4 <rtems_termios_ioctl+0x94> <== NEVER TAKEN
44992: 6062 bras 449f6 <rtems_termios_ioctl+0xb6>
44994: 7603 moveq #3,%d3
44996: b681 cmpl %d1,%d3
44998: 6700 0212 beqw 44bac <rtems_termios_ioctl+0x26c>
4499c: 7004 moveq #4,%d0
4499e: b081 cmpl %d1,%d0
449a0: 6632 bnes 449d4 <rtems_termios_ioctl+0x94> <== NEVER TAKEN
449a2: 6000 0296 braw 44c3a <rtems_termios_ioctl+0x2fa>
449a6: 0c81 4004 667f cmpil #1074030207,%d1
449ac: 6700 02e4 beqw 44c92 <rtems_termios_ioctl+0x352>
449b0: 620a bhis 449bc <rtems_termios_ioctl+0x7c>
449b2: 7606 moveq #6,%d3
449b4: b681 cmpl %d1,%d3
449b6: 661c bnes 449d4 <rtems_termios_ioctl+0x94>
449b8: 6000 0204 braw 44bbe <rtems_termios_ioctl+0x27e>
449bc: 202a 00cc movel %a2@(204),%d0
449c0: 0c81 4004 741a cmpil #1074033690,%d1
449c6: 6700 02c2 beqw 44c8a <rtems_termios_ioctl+0x34a>
449ca: 0c81 8004 741b cmpil #-2147191781,%d1
449d0: 6700 0278 beqw 44c4a <rtems_termios_ioctl+0x30a>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
449d4: 202a 00cc movel %a2@(204),%d0
449d8: eb88 lsll #5,%d0
449da: 0680 0005 d304 addil #381700,%d0
449e0: 2240 moveal %d0,%a1
449e2: 2051 moveal %a1@,%a0
449e4: 4a88 tstl %a0
449e6: 6700 02ce beqw 44cb6 <rtems_termios_ioctl+0x376>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
449ea: 2f0b movel %a3,%sp@-
449ec: 2f0a movel %a2,%sp@-
449ee: 4e90 jsr %a0@
449f0: 2400 movel %d0,%d2
449f2: 6000 01b2 braw 44ba6 <rtems_termios_ioctl+0x266>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
449f6: 4878 0024 pea 24 <OPER2+0x10>
449fa: 486a 0030 pea %a2@(48)
449fe: 2f2b 0008 movel %a3@(8),%sp@-
44a02: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
break;
44a08: 4fef 000c lea %sp@(12),%sp
44a0c: 6000 02ae braw 44cbc <rtems_termios_ioctl+0x37c>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
44a10: 4878 0024 pea 24 <OPER2+0x10>
44a14: 2f2b 0008 movel %a3@(8),%sp@-
44a18: 486a 0030 pea %a2@(48)
44a1c: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
44a22: 202a 00b8 movel %a2@(184),%d0
44a26: 4fef 000c lea %sp@(12),%sp
44a2a: 0800 0009 btst #9,%d0
44a2e: 6760 beqs 44a90 <rtems_termios_ioctl+0x150>
!(tty->termios.c_iflag & IXON)) {
44a30: 202a 0030 movel %a2@(48),%d0
44a34: 0280 0000 0400 andil #1024,%d0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
44a3a: 6654 bnes 44a90 <rtems_termios_ioctl+0x150>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
44a3c: 202a 00b8 movel %a2@(184),%d0
44a40: 0280 ffff fdef andil #-529,%d0
44a46: 2540 00b8 movel %d0,%a2@(184)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
44a4a: 202a 00b8 movel %a2@(184),%d0
44a4e: 0800 0005 btst #5,%d0
44a52: 673c beqs 44a90 <rtems_termios_ioctl+0x150> <== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
44a54: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
44a5a: 40c3 movew %sr,%d3 <== NOT EXECUTED
44a5c: 8083 orl %d3,%d0 <== NOT EXECUTED
44a5e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
44a60: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a64: 72df moveq #-33,%d1 <== NOT EXECUTED
44a66: c081 andl %d1,%d0 <== NOT EXECUTED
44a68: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
44a6c: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
44a70: 671c beqs 44a8e <rtems_termios_ioctl+0x14e> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44a72: 202a 0084 movel %a2@(132),%d0 <== 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)(
44a76: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44a7a: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED
44a7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44a80: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44a84: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44a88: 4e90 jsr %a0@ <== NOT EXECUTED
44a8a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
44a8e: 46c3 movew %d3,%sr <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
44a90: 202a 00b8 movel %a2@(184),%d0
44a94: 0800 000a btst #10,%d0
44a98: 6724 beqs 44abe <rtems_termios_ioctl+0x17e>
44a9a: 202a 0030 movel %a2@(48),%d0
44a9e: 0280 0000 1000 andil #4096,%d0
44aa4: 6618 bnes 44abe <rtems_termios_ioctl+0x17e> <== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
44aa6: 202a 00b8 movel %a2@(184),%d0
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
44aaa: 76fd moveq #-3,%d3
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
44aac: 0880 000a bclr #10,%d0
44ab0: 2540 00b8 movel %d0,%a2@(184)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
44ab4: 202a 00b8 movel %a2@(184),%d0
44ab8: c083 andl %d3,%d0
44aba: 2540 00b8 movel %d0,%a2@(184)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
44abe: 202a 00b8 movel %a2@(184),%d0
44ac2: 0800 0008 btst #8,%d0
44ac6: 6736 beqs 44afe <rtems_termios_ioctl+0x1be> <== ALWAYS TAKEN
44ac8: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED
44acc: 6d30 blts 44afe <rtems_termios_ioctl+0x1be> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
44ace: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44ad2: 0880 0008 bclr #8,%d0 <== NOT EXECUTED
44ad6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
44ada: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44ade: 44c0 movew %d0,%ccr <== NOT EXECUTED
44ae0: 6610 bnes 44af2 <rtems_termios_ioctl+0x1b2> <== NOT EXECUTED
44ae2: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
44ae6: 4a88 tstl %a0 <== NOT EXECUTED
44ae8: 6708 beqs 44af2 <rtems_termios_ioctl+0x1b2> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
44aea: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44aee: 4e90 jsr %a0@ <== NOT EXECUTED
44af0: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
44af2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44af6: 72fb moveq #-5,%d1 <== NOT EXECUTED
44af8: c081 andl %d1,%d0 <== NOT EXECUTED
44afa: 2540 00b8 movel %d0,%a2@(184) <== 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) {
44afe: 4aaa 0038 tstl %a2@(56)
44b02: 6c0c bges 44b10 <rtems_termios_ioctl+0x1d0> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
44b04: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b08: 08c0 0008 bset #8,%d0 <== NOT EXECUTED
44b0c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
44b10: 222a 0030 movel %a2@(48),%d1
44b14: 0801 000c btst #12,%d1
44b18: 670c beqs 44b26 <rtems_termios_ioctl+0x1e6>
tty->flow_ctrl |= FL_MDXOF;
44b1a: 202a 00b8 movel %a2@(184),%d0
44b1e: 08c0 000a bset #10,%d0
44b22: 2540 00b8 movel %d0,%a2@(184)
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
44b26: 0801 000a btst #10,%d1
44b2a: 670c beqs 44b38 <rtems_termios_ioctl+0x1f8>
tty->flow_ctrl |= FL_MDXON;
44b2c: 202a 00b8 movel %a2@(184),%d0
44b30: 08c0 0009 bset #9,%d0
44b34: 2540 00b8 movel %d0,%a2@(184)
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) {
44b38: 7002 moveq #2,%d0
44b3a: c0aa 003c andl %a2@(60),%d0
44b3e: 6702 beqs 44b42 <rtems_termios_ioctl+0x202>
44b40: 603c bras 44b7e <rtems_termios_ioctl+0x23e>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
44b42: 4283 clrl %d3
44b44: 162a 0046 moveb %a2@(70),%d3
rtems_clock_get_ticks_per_second() / 10;
44b48: 4eb9 0004 5ca0 jsr 45ca0 <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
44b4e: 4c03 0800 mulsl %d3,%d0
rtems_clock_get_ticks_per_second() / 10;
44b52: 760a moveq #10,%d3
44b54: 4c43 0000 remul %d3,%d0,%d0
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] *
44b58: 2540 0054 movel %d0,%a2@(84)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
44b5c: 4a2a 0046 tstb %a2@(70)
44b60: 6716 beqs 44b78 <rtems_termios_ioctl+0x238>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44b62: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
44b66: 2540 0070 movel %d0,%a2@(112)
if (tty->termios.c_cc[VMIN])
44b6a: 4a2a 0047 tstb %a2@(71)
44b6e: 6702 beqs 44b72 <rtems_termios_ioctl+0x232>
44b70: 6014 bras 44b86 <rtems_termios_ioctl+0x246>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
44b72: 2540 0074 movel %d0,%a2@(116)
44b76: 601a bras 44b92 <rtems_termios_ioctl+0x252>
} else {
if (tty->termios.c_cc[VMIN]) {
44b78: 4a2a 0047 tstb %a2@(71)
44b7c: 670e beqs 44b8c <rtems_termios_ioctl+0x24c> <== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44b7e: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
44b82: 42aa 0070 clrl %a2@(112)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
44b86: 42aa 0074 clrl %a2@(116)
44b8a: 6006 bras 44b92 <rtems_termios_ioctl+0x252>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
44b8c: 7001 moveq #1,%d0
44b8e: 2540 006c movel %d0,%a2@(108)
}
}
}
if (tty->device.setAttributes)
44b92: 206a 00a8 moveal %a2@(168),%a0
44b96: 4a88 tstl %a0
44b98: 6700 0122 beqw 44cbc <rtems_termios_ioctl+0x37c>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
44b9c: 486a 0030 pea %a2@(48)
44ba0: 2f2a 0010 movel %a2@(16),%sp@-
44ba4: 4e90 jsr %a0@
44ba6: 508f addql #8,%sp
44ba8: 6000 0112 braw 44cbc <rtems_termios_ioctl+0x37c>
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
44bac: 4aaa 00b4 tstl %a2@(180)
44bb0: 6700 010a beqw 44cbc <rtems_termios_ioctl+0x37c>
44bb4: 2f0a movel %a2,%sp@-
44bb6: 4eba f796 jsr %pc@(4434e <drainOutput.part.0>)
44bba: 6000 00ca braw 44c86 <rtems_termios_ioctl+0x346>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_TCFLUSH:
switch ((intptr_t) args->buffer) {
44bbe: 202b 0008 movel %a3@(8),%d0
44bc2: 7201 moveq #1,%d1
44bc4: b280 cmpl %d0,%d1
44bc6: 6712 beqs 44bda <rtems_termios_ioctl+0x29a>
44bc8: 7602 moveq #2,%d3
44bca: b680 cmpl %d0,%d3
44bcc: 6726 beqs 44bf4 <rtems_termios_ioctl+0x2b4>
44bce: 4a80 tstl %d0
44bd0: 6600 00e8 bnew 44cba <rtems_termios_ioctl+0x37a>
static void
flushInput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
44bd4: 303c 0700 movew #1792,%d0
44bd8: 603a bras 44c14 <rtems_termios_ioctl+0x2d4>
static void
flushOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
44bda: 203c 0000 0700 movel #1792,%d0
44be0: 40c1 movew %sr,%d1
44be2: 8081 orl %d1,%d0
44be4: 46c0 movew %d0,%sr
tty->rawOutBuf.Tail = 0;
44be6: 42aa 0084 clrl %a2@(132)
tty->rawOutBuf.Head = 0;
tty->rawOutBufState = rob_idle;
44bea: 42aa 0094 clrl %a2@(148)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
tty->rawOutBuf.Tail = 0;
tty->rawOutBuf.Head = 0;
44bee: 42aa 0080 clrl %a2@(128)
44bf2: 602e bras 44c22 <rtems_termios_ioctl+0x2e2>
static void
flushOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
44bf4: 203c 0000 0700 movel #1792,%d0
44bfa: 40c1 movew %sr,%d1
44bfc: 8081 orl %d1,%d0
44bfe: 46c0 movew %d0,%sr
tty->rawOutBuf.Tail = 0;
44c00: 42aa 0084 clrl %a2@(132)
tty->rawOutBuf.Head = 0;
tty->rawOutBufState = rob_idle;
44c04: 42aa 0094 clrl %a2@(148)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
tty->rawOutBuf.Tail = 0;
tty->rawOutBuf.Head = 0;
44c08: 42aa 0080 clrl %a2@(128)
tty->rawOutBufState = rob_idle;
rtems_interrupt_enable (level);
44c0c: 46c1 movew %d1,%sr
static void
flushInput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_interrupt_disable (level);
44c0e: 203c 0000 0700 movel #1792,%d0
44c14: 40c1 movew %sr,%d1
44c16: 8081 orl %d1,%d0
44c18: 46c0 movew %d0,%sr
tty->rawInBuf.Tail = 0;
44c1a: 42aa 0060 clrl %a2@(96)
tty->rawInBuf.Head = 0;
44c1e: 42aa 005c clrl %a2@(92)
rtems_interrupt_enable (level);
44c22: 46c1 movew %d1,%sr
44c24: 6000 0096 braw 44cbc <rtems_termios_ioctl+0x37c>
break;
}
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
44c28: 2014 movel %a4@,%d0
44c2a: 222c 0004 movel %a4@(4),%d1
44c2e: 2540 00d4 movel %d0,%a2@(212)
44c32: 2541 00d8 movel %d1,%a2@(216)
break;
44c36: 6000 0084 braw 44cbc <rtems_termios_ioctl+0x37c>
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
44c3a: 2014 movel %a4@,%d0
44c3c: 222c 0004 movel %a4@(4),%d1
44c40: 2540 00dc movel %d0,%a2@(220)
44c44: 2541 00e0 movel %d1,%a2@(224)
break;
44c48: 6072 bras 44cbc <rtems_termios_ioctl+0x37c>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
44c4a: eb88 lsll #5,%d0
44c4c: 0680 0005 d2f0 addil #381680,%d0
44c52: 2240 moveal %d0,%a1
44c54: 2051 moveal %a1@,%a0
44c56: 4a88 tstl %a0
44c58: 6708 beqs 44c62 <rtems_termios_ioctl+0x322>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
44c5a: 2f0a movel %a2,%sp@-
44c5c: 4e90 jsr %a0@
44c5e: 588f addql #4,%sp
44c60: 2400 movel %d0,%d2
}
tty->t_line=*(int*)(args->buffer);
44c62: 206b 0008 moveal %a3@(8),%a0
44c66: 2010 movel %a0@,%d0
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
44c68: 41f9 0005 d2ec lea 5d2ec <rtems_termios_linesw>,%a0
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
44c6e: 2540 00cc movel %d0,%a2@(204)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
44c72: eb88 lsll #5,%d0
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
44c74: 42aa 00d0 clrl %a2@(208)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
44c78: 2070 0800 moveal %a0@(00000000,%d0:l),%a0
44c7c: 4a88 tstl %a0
44c7e: 673c beqs 44cbc <rtems_termios_ioctl+0x37c>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
44c80: 2f0a movel %a2,%sp@-
44c82: 4e90 jsr %a0@
44c84: 2400 movel %d0,%d2
44c86: 588f addql #4,%sp
44c88: 6032 bras 44cbc <rtems_termios_ioctl+0x37c>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
44c8a: 206b 0008 moveal %a3@(8),%a0
44c8e: 2080 movel %d0,%a0@
break;
44c90: 602a bras 44cbc <rtems_termios_ioctl+0x37c>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
44c92: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED
44c96: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED
44c9a: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
44c9c: 6a06 bpls 44ca4 <rtems_termios_ioctl+0x364> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
44c9e: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED
44ca2: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
44ca4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
44ca8: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED
44cac: d280 addl %d0,%d1 <== NOT EXECUTED
44cae: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED
44cb2: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
break;
44cb4: 6006 bras 44cbc <rtems_termios_ioctl+0x37c> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
44cb6: 740a moveq #10,%d2
44cb8: 6002 bras 44cbc <rtems_termios_ioctl+0x37c>
case TCIOFLUSH:
flushOutput (tty);
flushInput (tty);
break;
default:
sc = RTEMS_INVALID_NAME;
44cba: 7403 moveq #3,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44cbc: 2f2a 0018 movel %a2@(24),%sp@-
44cc0: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return sc;
44cc6: 588f addql #4,%sp
}
44cc8: 2002 movel %d2,%d0
44cca: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
44cd0: 4e5e unlk %fp <== NOT EXECUTED
000443b2 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
443b2: 4e56 ffdc linkw %fp,#-36
443b6: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
443ba: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
443bc: 282e 0008 movel %fp@(8),%d4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
443c0: 42a7 clrl %sp@-
443c2: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
443c8: 2a2e 000c movel %fp@(12),%d5
443cc: 2a6e 0010 moveal %fp@(16),%a5
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
443d0: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
443d6: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
443da: 2400 movel %d0,%d2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
443dc: 6600 03b6 bnew 44794 <rtems_termios_open+0x3e2>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
443e0: 2679 0005 db24 moveal 5db24 <rtems_termios_ttyHead>,%a3
443e6: 244b moveal %a3,%a2
443e8: 6010 bras 443fa <rtems_termios_open+0x48>
if ((tty->major == major) && (tty->minor == minor))
443ea: b8aa 000c cmpl %a2@(12),%d4
443ee: 6608 bnes 443f8 <rtems_termios_open+0x46>
443f0: baaa 0010 cmpl %a2@(16),%d5
443f4: 6700 0308 beqw 446fe <rtems_termios_open+0x34c>
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) {
443f8: 2452 moveal %a2@,%a2
443fa: 4a8a tstl %a2
443fc: 66ec bnes 443ea <rtems_termios_open+0x38>
443fe: 6000 0378 braw 44778 <rtems_termios_open+0x3c6>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
44402: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
44408: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
4440e: 588f addql #4,%sp
44410: 6000 00aa braw 444bc <rtems_termios_open+0x10a>
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
44414: 41f9 0005 c48c lea 5c48c <rtems_termios_raw_input_size>,%a0
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4441a: 49f9 0004 2d30 lea 42d30 <malloc>,%a4
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
44420: 2550 0064 movel %a0@,%a2@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
44424: 202a 0064 movel %a2@(100),%d0
44428: 2f00 movel %d0,%sp@-
4442a: 4e94 jsr %a4@
if (tty->rawInBuf.theBuf == NULL) {
4442c: 588f addql #4,%sp
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4442e: 2600 movel %d0,%d3
44430: 2540 0058 movel %d0,%a2@(88)
if (tty->rawInBuf.theBuf == NULL) {
44434: 6618 bnes 4444e <rtems_termios_open+0x9c>
free(tty);
44436: 2f0a movel %a2,%sp@-
44438: 4eb9 0004 2a60 jsr 42a60 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
4443e: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
44444: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
4444a: 508f addql #8,%sp
4444c: 606e bras 444bc <rtems_termios_open+0x10a>
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
4444e: 41f9 0005 c490 lea 5c490 <rtems_termios_raw_output_size>,%a0
44454: 2550 0088 movel %a0@,%a2@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
44458: 202a 0088 movel %a2@(136),%d0
4445c: 2f00 movel %d0,%sp@-
4445e: 4e94 jsr %a4@
if (tty->rawOutBuf.theBuf == NULL) {
44460: 588f addql #4,%sp
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
44462: 2c00 movel %d0,%d6
44464: 2540 007c movel %d0,%a2@(124)
if (tty->rawOutBuf.theBuf == NULL) {
44468: 6620 bnes 4448a <rtems_termios_open+0xd8>
free((void *)(tty->rawInBuf.theBuf));
4446a: 2f03 movel %d3,%sp@-
4446c: 47f9 0004 2a60 lea 42a60 <free>,%a3
44472: 4e93 jsr %a3@
free(tty);
44474: 2f0a movel %a2,%sp@-
44476: 4e93 jsr %a3@
rtems_semaphore_release (rtems_termios_ttyMutex);
44478: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
4447e: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
44484: 4fef 000c lea %sp@(12),%sp
44488: 6032 bras 444bc <rtems_termios_open+0x10a>
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
4448a: 2f39 0005 c494 movel 5c494 <rtems_termios_cbufsize>,%sp@-
44490: 4e94 jsr %a4@
if (tty->cbuf == NULL) {
44492: 588f addql #4,%sp
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
44494: 2540 001c movel %d0,%a2@(28)
if (tty->cbuf == NULL) {
44498: 6628 bnes 444c2 <rtems_termios_open+0x110>
free((void *)(tty->rawOutBuf.theBuf));
4449a: 2f06 movel %d6,%sp@-
4449c: 47f9 0004 2a60 lea 42a60 <free>,%a3
444a2: 4e93 jsr %a3@
free((void *)(tty->rawInBuf.theBuf));
444a4: 2f03 movel %d3,%sp@-
444a6: 4e93 jsr %a3@
free(tty);
444a8: 2f0a movel %a2,%sp@-
444aa: 4e93 jsr %a3@
rtems_semaphore_release (rtems_termios_ttyMutex);
444ac: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
444b2: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
444b8: 4fef 0010 lea %sp@(16),%sp
444bc: 741a moveq #26,%d2
444be: 6000 02d4 braw 44794 <rtems_termios_open+0x3e2>
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
444c2: 42aa 00d4 clrl %a2@(212)
tty->tty_snd.sw_arg = NULL;
444c6: 42aa 00d8 clrl %a2@(216)
tty->tty_rcv.sw_pfn = NULL;
444ca: 42aa 00dc clrl %a2@(220)
tty->tty_rcv.sw_arg = NULL;
444ce: 42aa 00e0 clrl %a2@(224)
tty->tty_rcvwakeup = 0;
444d2: 42aa 00e4 clrl %a2@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
444d6: 248b movel %a3,%a2@
tty->back = NULL;
444d8: 42aa 0004 clrl %a2@(4)
if (rtems_termios_ttyHead != NULL)
444dc: 4a8b tstl %a3
444de: 6704 beqs 444e4 <rtems_termios_open+0x132>
rtems_termios_ttyHead->back = tty;
444e0: 274a 0004 movel %a2,%a3@(4)
rtems_termios_ttyHead = tty;
444e4: 23ca 0005 db24 movel %a2,5db24 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
444ea: 4ab9 0005 db20 tstl 5db20 <rtems_termios_ttyTail>
444f0: 6606 bnes 444f8 <rtems_termios_open+0x146>
rtems_termios_ttyTail = tty;
444f2: 23ca 0005 db20 movel %a2,5db20 <rtems_termios_ttyTail>
tty->minor = minor;
444f8: 2545 0010 movel %d5,%a2@(16)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
444fc: 47f9 0004 6088 lea 46088 <rtems_semaphore_create>,%a3
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
44502: 2544 000c movel %d4,%a2@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44506: 486a 0014 pea %a2@(20)
rtems_build_name ('T', 'R', 'i', c),
4450a: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44510: 42a7 clrl %sp@-
44512: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'i', c),
44516: 49c0 extbl %d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44518: 4878 0001 pea 1 <ADD>
4451c: 0080 5452 6900 oril #1414686976,%d0
44522: 2f00 movel %d0,%sp@-
44524: 4e93 jsr %a3@
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)
44526: 4fef 0014 lea %sp@(20),%sp
4452a: 4a80 tstl %d0
4452c: 6704 beqs 44532 <rtems_termios_open+0x180>
4452e: 6000 0230 braw 44760 <rtems_termios_open+0x3ae>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44532: 486a 0018 pea %a2@(24)
rtems_build_name ('T', 'R', 'o', c),
44536: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
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 (
4453c: 42a7 clrl %sp@-
4453e: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'o', c),
44542: 49c0 extbl %d0
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 (
44544: 4878 0001 pea 1 <ADD>
44548: 0080 5452 6f00 oril #1414688512,%d0
4454e: 2f00 movel %d0,%sp@-
44550: 4e93 jsr %a3@
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)
44552: 4fef 0014 lea %sp@(20),%sp
44556: 4a80 tstl %d0
44558: 6704 beqs 4455e <rtems_termios_open+0x1ac>
4455a: 6000 0204 braw 44760 <rtems_termios_open+0x3ae>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4455e: 486a 008c pea %a2@(140)
rtems_build_name ('T', 'R', 'x', c),
44562: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
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 (
44568: 42a7 clrl %sp@-
4456a: 4878 0020 pea 20 <OPER2+0xc>
rtems_build_name ('T', 'R', 'x', c),
4456e: 49c0 extbl %d0
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 (
44570: 0080 5452 7800 oril #1414690816,%d0
44576: 42a7 clrl %sp@-
44578: 2f00 movel %d0,%sp@-
4457a: 4e93 jsr %a3@
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
4457c: 4fef 0014 lea %sp@(20),%sp
44580: 4a80 tstl %d0
44582: 6704 beqs 44588 <rtems_termios_open+0x1d6>
44584: 6000 01da braw 44760 <rtems_termios_open+0x3ae>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
44588: 42aa 0094 clrl %a2@(148)
/*
* Set callbacks
*/
tty->device = *callbacks;
4458c: 4878 0020 pea 20 <OPER2+0xc>
44590: 2f2e 0014 movel %fp@(20),%sp@-
44594: 486a 0098 pea %a2@(152)
44598: 4eb9 0004 cb50 jsr 4cb50 <memcpy>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4459e: 4fef 000c lea %sp@(12),%sp
445a2: 7002 moveq #2,%d0
445a4: b0aa 00b4 cmpl %a2@(180),%d0
445a8: 6666 bnes 44610 <rtems_termios_open+0x25e>
sc = rtems_task_create (
445aa: 486a 00c8 pea %a2@(200)
445ae: 47f9 0004 64c8 lea 464c8 <rtems_task_create>,%a3
rtems_build_name ('T', 'x', 'T', c),
445b4: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
445ba: 42a7 clrl %sp@-
445bc: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('T', 'x', 'T', c),
445c0: 49c0 extbl %d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
445c2: 4878 0400 pea 400 <D_BIAS+0x2>
445c6: 4878 000a pea a <LASTO>
445ca: 0080 5478 5400 oril #1417171968,%d0
445d0: 2f00 movel %d0,%sp@-
445d2: 4e93 jsr %a3@
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
445d4: 4fef 0018 lea %sp@(24),%sp
445d8: 4a80 tstl %d0
445da: 6704 beqs 445e0 <rtems_termios_open+0x22e> <== ALWAYS TAKEN
445dc: 6000 0182 braw 44760 <rtems_termios_open+0x3ae> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
445e0: 486a 00c4 pea %a2@(196)
rtems_build_name ('R', 'x', 'T', c),
445e4: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
445ea: 42a7 clrl %sp@-
445ec: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('R', 'x', 'T', c),
445f0: 49c0 extbl %d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
445f2: 4878 0400 pea 400 <D_BIAS+0x2>
445f6: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1>
445fa: 0080 5278 5400 oril #1383617536,%d0
44600: 2f00 movel %d0,%sp@-
44602: 4e93 jsr %a3@
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
44604: 4fef 0018 lea %sp@(24),%sp
44608: 4a80 tstl %d0
4460a: 6704 beqs 44610 <rtems_termios_open+0x25e> <== ALWAYS TAKEN
4460c: 6000 0152 braw 44760 <rtems_termios_open+0x3ae> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
44610: 4aaa 00a0 tstl %a2@(160)
44614: 6708 beqs 4461e <rtems_termios_open+0x26c>
44616: 7202 moveq #2,%d1
44618: b2aa 00b4 cmpl %a2@(180),%d1
4461c: 662e bnes 4464c <rtems_termios_open+0x29a>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
4461e: 486a 0068 pea %a2@(104)
rtems_build_name ('T', 'R', 'r', c),
44622: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44628: 42a7 clrl %sp@-
4462a: 4878 0024 pea 24 <OPER2+0x10>
rtems_build_name ('T', 'R', 'r', c),
4462e: 49c0 extbl %d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44630: 0080 5452 7200 oril #1414689280,%d0
44636: 42a7 clrl %sp@-
44638: 2f00 movel %d0,%sp@-
4463a: 4eb9 0004 6088 jsr 46088 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
44640: 4fef 0014 lea %sp@(20),%sp
44644: 4a80 tstl %d0
44646: 6704 beqs 4464c <rtems_termios_open+0x29a>
44648: 6000 0116 braw 44760 <rtems_termios_open+0x3ae>
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4464c: 203c 0000 08bd movel #2237,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
44652: 263c 0000 2502 movel #9474,%d3
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44658: 307c 1805 moveaw #6149,%a0
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
4465c: 2540 0038 movel %d0,%a2@(56)
tty->termios.c_lflag =
44660: 223c 0000 823b movel #33339,%d1
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
44666: 701c moveq #28,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
44668: 2543 0030 movel %d3,%a2@(48)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
4466c: 1540 0042 moveb %d0,%a2@(66)
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
44670: 7004 moveq #4,%d0
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;
44672: 42aa 00b8 clrl %a2@(184)
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';
44676: 1540 0045 moveb %d0,%a2@(69)
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
4467a: 7013 moveq #19,%d0
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
4467c: 2541 003c movel %d1,%a2@(60)
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
44680: 1540 004a moveb %d0,%a2@(74)
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
44684: 700f moveq #15,%d0
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44686: 2548 0034 movel %a0,%a2@(52)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
4468a: 7603 moveq #3,%d3
tty->termios.c_cc[VEOL2] = '\000';
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';
4468c: 1540 004e moveb %d0,%a2@(78)
/* 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;
44690: 202a 0064 movel %a2@(100),%d0
44694: e288 lsrl #1,%d0
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
44696: 727f moveq #127,%d1
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
44698: 1543 0041 moveb %d3,%a2@(65)
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;
4469c: 206a 0064 moveal %a2@(100),%a0
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
446a0: 7615 moveq #21,%d3
tty->termios.c_lflag =
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
446a2: 1541 0043 moveb %d1,%a2@(67)
/* 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;
446a6: 2540 00bc movel %d0,%a2@(188)
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';
446aa: 4201 clrb %d1
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
446ac: 1543 0044 moveb %d3,%a2@(68)
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;
446b0: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0
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';
tty->termios.c_cc[VSTART] = '\021';
446b4: 7611 moveq #17,%d3
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';
446b6: 1541 004c moveb %d1,%a2@(76)
tty->termios.c_cc[VEOL2] = '\000';
446ba: 1541 0051 moveb %d1,%a2@(81)
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;
446be: 2008 movel %a0,%d0
446c0: e488 lsrl #2,%d0
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
446c2: 721a moveq #26,%d1
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';
tty->termios.c_cc[VSTART] = '\021';
446c4: 1543 0049 moveb %d3,%a2@(73)
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
446c8: 7612 moveq #18,%d3
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;
446ca: 2540 00c0 movel %d0,%a2@(192)
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
446ce: 1541 004b moveb %d1,%a2@(75)
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
446d2: 7217 moveq #23,%d1
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
446d4: 1039 0005 c498 moveb 5c498 <c.6708>,%d0
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
446da: 1543 004d moveb %d3,%a2@(77)
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
446de: 7616 moveq #22,%d3
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';
446e0: 1541 004f moveb %d1,%a2@(79)
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
446e4: 1200 moveb %d0,%d1
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';
446e6: 1543 0050 moveb %d3,%a2@(80)
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
446ea: 767a moveq #122,%d3
446ec: 49c1 extbl %d1
446ee: b681 cmpl %d1,%d3
446f0: 6704 beqs 446f6 <rtems_termios_open+0x344>
446f2: 5280 addql #1,%d0
446f4: 6002 bras 446f8 <rtems_termios_open+0x346>
c = 'a';
446f6: 7061 moveq #97,%d0
446f8: 13c0 0005 c498 moveb %d0,5c498 <c.6708>
}
args->iop->data1 = tty;
446fe: 2055 moveal %a5@,%a0
if (!tty->refcount++) {
44700: 202a 0008 movel %a2@(8),%d0
44704: 2200 movel %d0,%d1
44706: 5281 addql #1,%d1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
44708: 214a 002c movel %a2,%a0@(44)
if (!tty->refcount++) {
4470c: 2541 0008 movel %d1,%a2@(8)
44710: 4a80 tstl %d0
44712: 6654 bnes 44768 <rtems_termios_open+0x3b6>
if (tty->device.firstOpen)
44714: 206a 0098 moveal %a2@(152),%a0
44718: 4a88 tstl %a0
4471a: 670c beqs 44728 <rtems_termios_open+0x376>
(*tty->device.firstOpen)(major, minor, arg);
4471c: 2f0d movel %a5,%sp@-
4471e: 2f05 movel %d5,%sp@-
44720: 2f04 movel %d4,%sp@-
44722: 4e90 jsr %a0@
44724: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44728: 7602 moveq #2,%d3
4472a: b6aa 00b4 cmpl %a2@(180),%d3
4472e: 6638 bnes 44768 <rtems_termios_open+0x3b6>
sc = rtems_task_start(
44730: 2f0a movel %a2,%sp@-
44732: 487a 11bc pea %pc@(458f0 <rtems_termios_rxdaemon>)
44736: 47f9 0004 6754 lea 46754 <rtems_task_start>,%a3
4473c: 2f2a 00c4 movel %a2@(196),%sp@-
44740: 4e93 jsr %a3@
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
44742: 4fef 000c lea %sp@(12),%sp
44746: 4a80 tstl %d0
44748: 6702 beqs 4474c <rtems_termios_open+0x39a> <== ALWAYS TAKEN
4474a: 6014 bras 44760 <rtems_termios_open+0x3ae> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
4474c: 2f0a movel %a2,%sp@-
4474e: 487a fb98 pea %pc@(442e8 <rtems_termios_txdaemon>)
44752: 2f2a 00c8 movel %a2@(200),%sp@-
44756: 4e93 jsr %a3@
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
44758: 4fef 000c lea %sp@(12),%sp
4475c: 4a80 tstl %d0
4475e: 6708 beqs 44768 <rtems_termios_open+0x3b6> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
44760: 2f00 movel %d0,%sp@-
44762: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
44768: 2f39 0005 db1c movel 5db1c <rtems_termios_ttyMutex>,%sp@-
4476e: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
44774: 588f addql #4,%sp
44776: 601c bras 44794 <rtems_termios_open+0x3e2>
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
44778: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3>
4477c: 4878 0001 pea 1 <ADD>
44780: 4eb9 0004 2818 jsr 42818 <calloc>
if (tty == NULL) {
44786: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
44788: 2440 moveal %d0,%a2
if (tty == NULL) {
4478a: 4a80 tstl %d0
4478c: 6600 fc86 bnew 44414 <rtems_termios_open+0x62>
44790: 6000 fc70 braw 44402 <rtems_termios_open+0x50>
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
44794: 2002 movel %d2,%d0
44796: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4479c: 4e5e unlk %fp <== NOT EXECUTED
00044cd4 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, size_t len, struct rtems_termios_tty *tty)
{
44cd4: 4e56 ffe0 linkw %fp,#-32
44cd8: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
44cdc: 266e 0008 moveal %fp@(8),%a3
44ce0: 2c2e 000c movel %fp@(12),%d6
44ce4: 246e 0010 moveal %fp@(16),%a2
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
44ce8: 4aaa 00b4 tstl %a2@(180)
44cec: 661c bnes 44d0a <rtems_termios_puts+0x36>
(*tty->device.write)(tty->minor, buf, len);
44cee: 2d46 0010 movel %d6,%fp@(16)
44cf2: 2d4b 000c movel %a3,%fp@(12)
44cf6: 2d6a 0010 0008 movel %a2@(16),%fp@(8)
44cfc: 226a 00a4 moveal %a2@(164),%a1
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44d00: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
44d06: 4e5e unlk %fp
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
44d08: 4ed1 jmp %a1@
return;
}
newHead = tty->rawOutBuf.Head;
44d0a: 282a 0080 movel %a2@(128),%d4
/*
* Send characters to device-specific code
*/
void
rtems_termios_puts (
44d0e: dc8b addl %a3,%d6
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
44d10: 2a3c 0000 0700 movel #1792,%d5
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
44d16: 49f9 0004 62c4 lea 462c4 <rtems_semaphore_obtain>,%a4
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
44d1c: 6000 0094 braw 44db2 <rtems_termios_puts+0xde>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44d20: 202a 0088 movel %a2@(136),%d0
44d24: 5284 addql #1,%d4
44d26: 4c40 4003 remul %d0,%d3,%d4
44d2a: 2803 movel %d3,%d4
44d2c: 6022 bras 44d50 <rtems_termios_puts+0x7c>
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
44d2e: 7002 moveq #2,%d0
44d30: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44d34: 46c2 movew %d2,%sr
sc = rtems_semaphore_obtain(
44d36: 42a7 clrl %sp@-
44d38: 42a7 clrl %sp@-
44d3a: 2f2a 008c movel %a2@(140),%sp@-
44d3e: 4e94 jsr %a4@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44d40: 4fef 000c lea %sp@(12),%sp
44d44: 4a80 tstl %d0
44d46: 6708 beqs 44d50 <rtems_termios_puts+0x7c> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
44d48: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44d4a: 4eb9 0004 69ec jsr 469ec <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
44d50: 2005 movel %d5,%d0
44d52: 40c2 movew %sr,%d2
44d54: 8082 orl %d2,%d0
44d56: 46c0 movew %d0,%sr
* 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) {
44d58: 202a 0084 movel %a2@(132),%d0
44d5c: b083 cmpl %d3,%d0
44d5e: 67ce beqs 44d2e <rtems_termios_puts+0x5a>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
44d60: 202a 0080 movel %a2@(128),%d0
44d64: 206a 007c moveal %a2@(124),%a0
44d68: 119b 0800 moveb %a3@+,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
44d6c: 2543 0080 movel %d3,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
44d70: 4aaa 0094 tstl %a2@(148)
44d74: 663a bnes 44db0 <rtems_termios_puts+0xdc>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
44d76: 202a 00b8 movel %a2@(184),%d0
44d7a: 0800 0004 btst #4,%d0
44d7e: 661e bnes 44d9e <rtems_termios_puts+0xca> <== NEVER TAKEN
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44d80: 202a 0084 movel %a2@(132),%d0
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)(
44d84: 4878 0001 pea 1 <ADD>
44d88: d0aa 007c addl %a2@(124),%d0
44d8c: 2f00 movel %d0,%sp@-
44d8e: 2f2a 0010 movel %a2@(16),%sp@-
44d92: 206a 00a4 moveal %a2@(164),%a0
44d96: 4e90 jsr %a0@
44d98: 4fef 000c lea %sp@(12),%sp
44d9c: 600c bras 44daa <rtems_termios_puts+0xd6>
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;
44d9e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44da2: 7220 moveq #32,%d1 <== NOT EXECUTED
44da4: 8081 orl %d1,%d0 <== NOT EXECUTED
44da6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
44daa: 7001 moveq #1,%d0
44dac: 2540 0094 movel %d0,%a2@(148)
}
rtems_interrupt_enable (level);
44db0: 46c2 movew %d2,%sr
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
44db2: bc8b cmpl %a3,%d6
44db4: 6600 ff6a bnew 44d20 <rtems_termios_puts+0x4c>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44db8: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
44dbe: 4e5e unlk %fp <== NOT EXECUTED
000453a2 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
453a2: 4e56 ffd4 linkw %fp,#-44
453a6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
453aa: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
453ae: 2053 moveal %a3@,%a0
uint32_t count = args->count;
453b0: 242b 0010 movel %a3@(16),%d2
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
453b4: 2468 002c moveal %a0@(44),%a2
uint32_t count = args->count;
char *buffer = args->buffer;
453b8: 286b 000c moveal %a3@(12),%a4
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
453bc: 42a7 clrl %sp@-
453be: 42a7 clrl %sp@-
453c0: 2f2a 0014 movel %a2@(20),%sp@-
453c4: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
453ca: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
453ce: 2600 movel %d0,%d3
if (sc != RTEMS_SUCCESSFUL)
453d0: 6600 029c bnew 4566e <rtems_termios_read+0x2cc>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
453d4: 222a 00cc movel %a2@(204),%d1
453d8: eb89 lsll #5,%d1
453da: 0681 0005 d2f4 addil #381684,%d1
453e0: 2241 moveal %d1,%a1
453e2: 2051 moveal %a1@,%a0
453e4: 4a88 tstl %a0
453e6: 671e beqs 45406 <rtems_termios_read+0x64>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
453e8: 2f0b movel %a3,%sp@-
453ea: 2f0a movel %a2,%sp@-
453ec: 4e90 jsr %a0@
453ee: 2600 movel %d0,%d3
tty->tty_rcvwakeup = 0;
453f0: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
453f4: 2f2a 0014 movel %a2@(20),%sp@-
453f8: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return sc;
453fe: 4fef 000c lea %sp@(12),%sp
45402: 6000 026a braw 4566e <rtems_termios_read+0x2cc>
}
if (tty->cindex == tty->ccount) {
45406: 202a 0020 movel %a2@(32),%d0
4540a: b0aa 0024 cmpl %a2@(36),%d0
4540e: 6600 0236 bnew 45646 <rtems_termios_read+0x2a4>
tty->cindex = tty->ccount = 0;
45412: 42aa 0020 clrl %a2@(32)
tty->read_start_column = tty->column;
45416: 256a 0028 002c movel %a2@(40),%a2@(44)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
4541c: 42aa 0024 clrl %a2@(36)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
45420: 4aaa 00a0 tstl %a2@(160)
45424: 6700 00da beqw 45500 <rtems_termios_read+0x15e>
45428: 4aaa 00b4 tstl %a2@(180)
4542c: 6600 00d2 bnew 45500 <rtems_termios_read+0x15e>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45430: 7002 moveq #2,%d0
45432: c0aa 003c andl %a2@(60),%d0
45436: 673c beqs 45474 <rtems_termios_read+0xd2>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
45438: 4bfa fe40 lea %pc@(4527a <siproc>),%a5
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4543c: 283c 0004 67fc movel #288764,%d4
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45442: 2f2a 0010 movel %a2@(16),%sp@-
45446: 206a 00a0 moveal %a2@(160),%a0
4544a: 4e90 jsr %a0@
if (n < 0) {
4544c: 588f addql #4,%sp
4544e: 4a80 tstl %d0
45450: 6c0c bges 4545e <rtems_termios_read+0xbc>
rtems_task_wake_after (1);
45452: 4878 0001 pea 1 <ADD>
45456: 2044 moveal %d4,%a0
45458: 4e90 jsr %a0@
4545a: 588f addql #4,%sp
4545c: 60e4 bras 45442 <rtems_termios_read+0xa0>
} else {
if (siproc (n, tty))
4545e: 2f0a movel %a2,%sp@-
45460: 0280 0000 00ff andil #255,%d0
45466: 2f00 movel %d0,%sp@-
45468: 4e95 jsr %a5@
4546a: 508f addql #8,%sp
4546c: 4a80 tstl %d0
4546e: 67d2 beqs 45442 <rtems_termios_read+0xa0>
45470: 6000 01d4 braw 45646 <rtems_termios_read+0x2a4>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
45474: 4bf9 0004 5cb8 lea 45cb8 <rtems_clock_get_ticks_since_boot>,%a5
4547a: 4e95 jsr %a5@
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
4547c: 2a3c 0004 67fc movel #288764,%d5
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
45482: 2800 movel %d0,%d4
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
45484: 2c3c 0004 527a movel #283258,%d6
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
4548a: 2f2a 0010 movel %a2@(16),%sp@-
4548e: 206a 00a0 moveal %a2@(160),%a0
45492: 4e90 jsr %a0@
if (n < 0) {
45494: 588f addql #4,%sp
45496: 4a80 tstl %d0
45498: 6c36 bges 454d0 <rtems_termios_read+0x12e>
if (tty->termios.c_cc[VMIN]) {
4549a: 4a2a 0047 tstb %a2@(71)
4549e: 671a beqs 454ba <rtems_termios_read+0x118> <== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
454a0: 4a2a 0046 tstb %a2@(70)
454a4: 660c bnes 454b2 <rtems_termios_read+0x110> <== ALWAYS TAKEN
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
454a6: 4878 0001 pea 1 <ADD>
454aa: 2245 moveal %d5,%a1
454ac: 4e91 jsr %a1@
454ae: 588f addql #4,%sp
454b0: 60d8 bras 4548a <rtems_termios_read+0xe8>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
if (tty->termios.c_cc[VTIME] && tty->ccount) {
454b2: 4aaa 0020 tstl %a2@(32)
454b6: 67ee beqs 454a6 <rtems_termios_read+0x104>
454b8: 6008 bras 454c2 <rtems_termios_read+0x120>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
454ba: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED
454be: 6700 0186 beqw 45646 <rtems_termios_read+0x2a4> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
454c2: 4e95 jsr %a5@
if ((now - then) > tty->vtimeTicks) {
454c4: 9084 subl %d4,%d0
454c6: b0aa 0054 cmpl %a2@(84),%d0
454ca: 63da blss 454a6 <rtems_termios_read+0x104>
454cc: 6000 0178 braw 45646 <rtems_termios_read+0x2a4>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
454d0: 2f0a movel %a2,%sp@-
454d2: 2046 moveal %d6,%a0
454d4: 0280 0000 00ff andil #255,%d0
454da: 2f00 movel %d0,%sp@-
454dc: 4e90 jsr %a0@
if (tty->ccount >= tty->termios.c_cc[VMIN])
454de: 508f addql #8,%sp
454e0: 4281 clrl %d1
454e2: 102a 0047 moveb %a2@(71),%d0
454e6: 1200 moveb %d0,%d1
454e8: b2aa 0020 cmpl %a2@(32),%d1
454ec: 6f00 0158 blew 45646 <rtems_termios_read+0x2a4>
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
454f0: 4a00 tstb %d0
454f2: 6796 beqs 4548a <rtems_termios_read+0xe8> <== NEVER TAKEN
454f4: 4a2a 0046 tstb %a2@(70)
454f8: 6790 beqs 4548a <rtems_termios_read+0xe8> <== NEVER TAKEN
then = rtems_clock_get_ticks_since_boot();
454fa: 4e95 jsr %a5@
454fc: 2800 movel %d0,%d4
454fe: 608a bras 4548a <rtems_termios_read+0xe8>
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
45500: 2c0a movel %a2,%d6
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = 1;
45502: 7801 moveq #1,%d4
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain(
45504: 2a3c 0004 62c4 movel #287428,%d5
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
4550a: 4bfa fd6e lea %pc@(4527a <siproc>),%a5
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
4550e: 0686 0000 0049 addil #73,%d6
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
45514: 2e2a 0074 movel %a2@(116),%d7
45518: 6000 00e0 braw 455fa <rtems_termios_read+0x258>
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
4551c: 2e2a 005c movel %a2@(92),%d7
45520: 5287 addql #1,%d7
45522: 202a 0064 movel %a2@(100),%d0
c = tty->rawInBuf.theBuf[newHead];
45526: 206a 0058 moveal %a2@(88),%a0
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
4552a: 4c40 7001 remul %d0,%d1,%d7
c = tty->rawInBuf.theBuf[newHead];
4552e: 1e30 1800 moveb %a0@(00000000,%d1:l),%d7
tty->rawInBuf.Head = newHead;
45532: 2541 005c movel %d1,%a2@(92)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
45536: 202a 0060 movel %a2@(96),%d0
4553a: 226a 0064 moveal %a2@(100),%a1
4553e: 43f1 0800 lea %a1@(00000000,%d0:l),%a1
45542: 93c1 subal %d1,%a1
% tty->rawInBuf.Size)
45544: 2009 movel %a1,%d0
45546: 206a 0064 moveal %a2@(100),%a0
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
4554a: 1d47 ffff moveb %d7,%fp@(-1)
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
4554e: 2e08 movel %a0,%d7
45550: 4c47 0001 remul %d7,%d1,%d0
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)
45554: b2aa 00bc cmpl %a2@(188),%d1
45558: 646a bccs 455c4 <rtems_termios_read+0x222> <== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
4555a: 202a 00b8 movel %a2@(184),%d0
4555e: 72fe moveq #-2,%d1
45560: c081 andl %d1,%d0
45562: 2540 00b8 movel %d0,%a2@(184)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
45566: 202a 00b8 movel %a2@(184),%d0
4556a: 0280 0000 0202 andil #514,%d0
45570: 0c80 0000 0202 cmpil #514,%d0
45576: 6626 bnes 4559e <rtems_termios_read+0x1fc> <== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
45578: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
4557c: 670a beqs 45588 <rtems_termios_read+0x1e6> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
4557e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
45582: 0800 0005 btst #5,%d0 <== NOT EXECUTED
45586: 6716 beqs 4559e <rtems_termios_read+0x1fc> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
45588: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4558c: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4558e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45592: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
45596: 4e90 jsr %a0@ <== NOT EXECUTED
45598: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4559c: 6026 bras 455c4 <rtems_termios_read+0x222> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
4559e: 202a 00b8 movel %a2@(184),%d0
455a2: 0800 0008 btst #8,%d0
455a6: 671c beqs 455c4 <rtems_termios_read+0x222> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
455a8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
455ac: 7efb moveq #-5,%d7 <== NOT EXECUTED
455ae: c087 andl %d7,%d0 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
455b0: 206a 00b0 moveal %a2@(176),%a0 <== 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;
455b4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
455b8: 4a88 tstl %a0 <== NOT EXECUTED
455ba: 6708 beqs 455c4 <rtems_termios_read+0x222> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
455bc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
455c0: 4e90 jsr %a0@ <== NOT EXECUTED
455c2: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
455c4: 7002 moveq #2,%d0
455c6: 4287 clrl %d7
455c8: 1e2e ffff moveb %fp@(-1),%d7
455cc: c0aa 003c andl %a2@(60),%d0
455d0: 6710 beqs 455e2 <rtems_termios_read+0x240> <== NEVER TAKEN
if (siproc (c, tty))
455d2: 2f0a movel %a2,%sp@-
455d4: 2f07 movel %d7,%sp@-
455d6: 4e95 jsr %a5@
455d8: 508f addql #8,%sp
455da: 4a80 tstl %d0
455dc: 6718 beqs 455f6 <rtems_termios_read+0x254>
wait = 0;
455de: 4284 clrl %d4
455e0: 6014 bras 455f6 <rtems_termios_read+0x254>
} else {
siproc (c, tty);
455e2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
455e4: 2f07 movel %d7,%sp@- <== NOT EXECUTED
455e6: 4e95 jsr %a5@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
455e8: 508f addql #8,%sp <== NOT EXECUTED
455ea: 4280 clrl %d0 <== NOT EXECUTED
455ec: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED
455f0: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED
455f4: 6fe8 bles 455de <rtems_termios_read+0x23c> <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
455f6: 2e2a 0070 movel %a2@(112),%d7
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
455fa: 222a 005c movel %a2@(92),%d1
455fe: 202a 0060 movel %a2@(96),%d0
45602: b081 cmpl %d1,%d0
45604: 6606 bnes 4560c <rtems_termios_read+0x26a>
}
/*
* Wait for characters
*/
if ( wait ) {
45606: 4a84 tstl %d4
45608: 673c beqs 45646 <rtems_termios_read+0x2a4>
4560a: 6012 bras 4561e <rtems_termios_read+0x27c>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
4560c: 2039 0005 c494 movel 5c494 <rtems_termios_cbufsize>,%d0
45612: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45614: b0aa 0020 cmpl %a2@(32),%d0
45618: 6200 ff02 bhiw 4551c <rtems_termios_read+0x17a>
4561c: 60e8 bras 45606 <rtems_termios_read+0x264> <== NOT EXECUTED
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain(
4561e: 2f07 movel %d7,%sp@-
45620: 2f2a 006c movel %a2@(108),%sp@-
45624: 2045 moveal %d5,%a0
45626: 2f2a 0068 movel %a2@(104),%sp@-
4562a: 4e90 jsr %a0@
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
4562c: 4fef 000c lea %sp@(12),%sp
45630: 4a80 tstl %d0
45632: 67c6 beqs 455fa <rtems_termios_read+0x258>
45634: 6010 bras 45646 <rtems_termios_read+0x2a4>
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
45636: 206a 001c moveal %a2@(28),%a0
count--;
4563a: 5382 subql #1,%d2
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
4563c: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+
45640: 5280 addql #1,%d0
45642: 2540 0024 movel %d0,%a2@(36)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
45646: 4a82 tstl %d2
45648: 670a beqs 45654 <rtems_termios_read+0x2b2>
4564a: 202a 0024 movel %a2@(36),%d0
4564e: b0aa 0020 cmpl %a2@(32),%d0
45652: 6de2 blts 45636 <rtems_termios_read+0x294>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
45654: 202b 0010 movel %a3@(16),%d0
45658: 9082 subl %d2,%d0
4565a: 2740 0018 movel %d0,%a3@(24)
tty->tty_rcvwakeup = 0;
4565e: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
45662: 2f2a 0014 movel %a2@(20),%sp@-
45666: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return sc;
4566c: 588f addql #4,%sp
}
4566e: 2003 movel %d3,%d0
45670: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
45676: 4e5e unlk %fp <== NOT EXECUTED
00044134 <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)
{
44134: 4e56 fff4 linkw %fp,#-12
44138: 48d7 040c moveml %d2-%d3/%a2,%sp@
4413c: 246e 0008 moveal %fp@(8),%a2
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
44140: 202a 00b8 movel %a2@(184),%d0
44144: 0280 0000 0403 andil #1027,%d0
4414a: 0c80 0000 0401 cmpil #1025,%d0
44150: 663c bnes 4418e <rtems_termios_refill_transmitter+0x5a><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
44152: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44156: 486a 004a pea %a2@(74) <== NOT EXECUTED
4415a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
4415e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44162: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
44164: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
4416a: 40c1 movew %sr,%d1 <== NOT EXECUTED
4416c: 8081 orl %d1,%d0 <== NOT EXECUTED
4416e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
44170: 7402 moveq #2,%d2 <== 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--;
44172: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
44176: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4417a: 8082 orl %d2,%d0 <== NOT EXECUTED
4417c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
44180: 46c1 movew %d1,%sr <== NOT EXECUTED
44182: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
nToSend = 1;
44186: 143c 0001 moveb #1,%d2 <== NOT EXECUTED
4418a: 6000 0150 braw 442dc <rtems_termios_refill_transmitter+0x1a8><== NOT EXECUTED
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
4418e: 202a 00b8 movel %a2@(184),%d0
44192: 7203 moveq #3,%d1
44194: 7402 moveq #2,%d2
44196: c081 andl %d1,%d0
44198: b480 cmpl %d0,%d2
4419a: 663a bnes 441d6 <rtems_termios_refill_transmitter+0xa2><== ALWAYS TAKEN
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
4419c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
441a0: 486a 0049 pea %a2@(73) <== NOT EXECUTED
441a4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
441a8: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
441ac: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
441ae: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
441b4: 40c1 movew %sr,%d1 <== NOT EXECUTED
441b6: 8081 orl %d1,%d0 <== NOT EXECUTED
441b8: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
441ba: 74fd moveq #-3,%d2 <== 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--;
441bc: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
441c0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
441c4: c082 andl %d2,%d0 <== NOT EXECUTED
441c6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
441ca: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
441cc: 7401 moveq #1,%d2 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
441ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
441d2: 6000 0108 braw 442dc <rtems_termios_refill_transmitter+0x1a8><== NOT EXECUTED
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
441d6: 222a 0080 movel %a2@(128),%d1
441da: 202a 0084 movel %a2@(132),%d0
441de: b081 cmpl %d1,%d0
441e0: 661a bnes 441fc <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
441e2: 7002 moveq #2,%d0
441e4: b0aa 0094 cmpl %a2@(148),%d0
441e8: 6600 00f0 bnew 442da <rtems_termios_refill_transmitter+0x1a6>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
441ec: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED
441f0: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release> <== NOT EXECUTED
441f6: 588f addql #4,%sp <== NOT EXECUTED
441f8: 6000 00e0 braw 442da <rtems_termios_refill_transmitter+0x1a6><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
441fc: 203c 0000 0700 movel #1792,%d0
44202: 40c1 movew %sr,%d1
44204: 8081 orl %d1,%d0
44206: 46c0 movew %d0,%sr
len = tty->t_dqlen;
44208: 206a 0090 moveal %a2@(144),%a0
tty->t_dqlen = 0;
4420c: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
44210: 46c1 movew %d1,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
44212: 222a 0084 movel %a2@(132),%d1
44216: d288 addl %a0,%d1
44218: 202a 0088 movel %a2@(136),%d0
4421c: 4c40 1003 remul %d0,%d3,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
44220: 7202 moveq #2,%d1
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
44222: 2543 0084 movel %d3,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
44226: b2aa 0094 cmpl %a2@(148),%d1
4422a: 660c bnes 44238 <rtems_termios_refill_transmitter+0x104>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
4422c: 2f2a 008c movel %a2@(140),%sp@-
44230: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
44236: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
44238: 202a 0080 movel %a2@(128),%d0
4423c: b083 cmpl %d3,%d0
4423e: 661c bnes 4425c <rtems_termios_refill_transmitter+0x128>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
44240: 206a 00d4 moveal %a2@(212),%a0
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
44244: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
44248: 4a88 tstl %a0
4424a: 6700 0086 beqw 442d2 <rtems_termios_refill_transmitter+0x19e>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
4424e: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED
44252: 486a 0030 pea %a2@(48) <== NOT EXECUTED
44256: 4e90 jsr %a0@ <== NOT EXECUTED
44258: 508f addql #8,%sp <== NOT EXECUTED
4425a: 6076 bras 442d2 <rtems_termios_refill_transmitter+0x19e><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
4425c: 202a 00b8 movel %a2@(184),%d0
44260: 0280 0000 0210 andil #528,%d0
44266: 0c80 0000 0210 cmpil #528,%d0
4426c: 6622 bnes 44290 <rtems_termios_refill_transmitter+0x15c><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
4426e: 303c 0700 movew #1792,%d0 <== NOT EXECUTED
44272: 40c1 movew %sr,%d1 <== NOT EXECUTED
44274: 8081 orl %d1,%d0 <== NOT EXECUTED
44276: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
44278: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
4427c: 7420 moveq #32,%d2 <== NOT EXECUTED
4427e: 8082 orl %d2,%d0 <== NOT EXECUTED
44280: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
44284: 7001 moveq #1,%d0 <== NOT EXECUTED
44286: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
4428a: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 0;
4428c: 4202 clrb %d2 <== NOT EXECUTED
4428e: 6044 bras 442d4 <rtems_termios_refill_transmitter+0x1a0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
44290: 202a 0080 movel %a2@(128),%d0
44294: b083 cmpl %d3,%d0
44296: 6406 bccs 4429e <rtems_termios_refill_transmitter+0x16a>
nToSend = tty->rawOutBuf.Size - newTail;
44298: 242a 0088 movel %a2@(136),%d2
4429c: 6004 bras 442a2 <rtems_termios_refill_transmitter+0x16e>
else
nToSend = tty->rawOutBuf.Head - newTail;
4429e: 242a 0080 movel %a2@(128),%d2
/* 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)) {
442a2: 202a 00b8 movel %a2@(184),%d0
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
442a6: 9483 subl %d3,%d2
/* 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)) {
442a8: 0280 0000 0600 andil #1536,%d0
442ae: 6702 beqs 442b2 <rtems_termios_refill_transmitter+0x17e>
nToSend = 1;
442b0: 7401 moveq #1,%d2
}
tty->rawOutBufState = rob_busy; /*apm*/
442b2: 7201 moveq #1,%d1
442b4: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
442b8: 2f02 movel %d2,%sp@-
442ba: 202a 007c movel %a2@(124),%d0
442be: d083 addl %d3,%d0
442c0: 2f00 movel %d0,%sp@-
442c2: 2f2a 0010 movel %a2@(16),%sp@-
442c6: 206a 00a4 moveal %a2@(164),%a0
442ca: 4e90 jsr %a0@
442cc: 4fef 000c lea %sp@(12),%sp
442d0: 6002 bras 442d4 <rtems_termios_refill_transmitter+0x1a0>
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
442d2: 4282 clrl %d2
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
442d4: 2543 0084 movel %d3,%a2@(132)
442d8: 6002 bras 442dc <rtems_termios_refill_transmitter+0x1a8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
442da: 4282 clrl %d2
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
442dc: 2002 movel %d2,%d0
442de: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
442e4: 4e5e unlk %fp <== NOT EXECUTED
000458f0 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
458f0: 4e56 ffe0 linkw %fp,#-32
458f4: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
458f8: 260e movel %fp,%d3
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
458fa: 240e movel %fp,%d2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
458fc: 5983 subql #4,%d3
458fe: 49f9 0004 5d20 lea 45d20 <rtems_event_receive>,%a4
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
tty->rxTaskId = 0;
rtems_task_delete(RTEMS_SELF);
45904: 4bf9 0004 65f4 lea 465f4 <rtems_task_delete>,%a5
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
4590a: 5b82 subql #5,%d2
4590c: 47f9 0004 5696 lea 45696 <rtems_termios_enqueue_raw_characters>,%a3
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
45912: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45916: 2f03 movel %d3,%sp@-
45918: 42a7 clrl %sp@-
4591a: 4878 0002 pea 2 <DOUBLE_FLOAT>
4591e: 4878 0003 pea 3 <DIVIDE>
45922: 4e94 jsr %a4@
(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) {
45924: 4fef 0010 lea %sp@(16),%sp
45928: 7001 moveq #1,%d0
4592a: c0ae fffc andl %fp@(-4),%d0
4592e: 670a beqs 4593a <rtems_termios_rxdaemon+0x4a> <== ALWAYS TAKEN
tty->rxTaskId = 0;
45930: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45934: 42a7 clrl %sp@- <== NOT EXECUTED
45936: 4e95 jsr %a5@ <== NOT EXECUTED
45938: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4593a: 2f2a 0010 movel %a2@(16),%sp@-
4593e: 206a 00a0 moveal %a2@(160),%a0
45942: 4e90 jsr %a0@
if (c != EOF) {
45944: 588f addql #4,%sp
45946: 72ff moveq #-1,%d1
45948: b280 cmpl %d0,%d1
4594a: 67ca beqs 45916 <rtems_termios_rxdaemon+0x26>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
4594c: 4878 0001 pea 1 <ADD>
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
45950: 1d40 fffb moveb %d0,%fp@(-5)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45954: 2f02 movel %d2,%sp@-
45956: 2f0a movel %a2,%sp@-
45958: 4e93 jsr %a3@
4595a: 4fef 000c lea %sp@(12),%sp
4595e: 60b6 bras 45916 <rtems_termios_rxdaemon+0x26>
000442e8 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
442e8: 4e56 ffe8 linkw %fp,#-24
442ec: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
442f0: 240e movel %fp,%d2
442f2: 5982 subql #4,%d2
442f4: 49f9 0004 5d20 lea 45d20 <rtems_event_receive>,%a4
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
rtems_task_delete(RTEMS_SELF);
442fa: 4bf9 0004 65f4 lea 465f4 <rtems_task_delete>,%a5
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
44300: 47fa fe32 lea %pc@(44134 <rtems_termios_refill_transmitter>),%a3
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
44304: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
44308: 2f02 movel %d2,%sp@-
4430a: 42a7 clrl %sp@-
4430c: 4878 0002 pea 2 <DOUBLE_FLOAT>
44310: 4878 0003 pea 3 <DIVIDE>
44314: 4e94 jsr %a4@
(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) {
44316: 4fef 0010 lea %sp@(16),%sp
4431a: 7001 moveq #1,%d0
4431c: c0ae fffc andl %fp@(-4),%d0
44320: 670a beqs 4432c <rtems_termios_txdaemon+0x44> <== ALWAYS TAKEN
tty->txTaskId = 0;
44322: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
44326: 42a7 clrl %sp@- <== NOT EXECUTED
44328: 4e95 jsr %a5@ <== NOT EXECUTED
4432a: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4432c: 202a 00cc movel %a2@(204),%d0
44330: eb88 lsll #5,%d0
44332: 0680 0005 d300 addil #381696,%d0
44338: 2240 moveal %d0,%a1
4433a: 2051 moveal %a1@,%a0
4433c: 4a88 tstl %a0
4433e: 6706 beqs 44346 <rtems_termios_txdaemon+0x5e> <== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
44340: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44342: 4e90 jsr %a0@ <== NOT EXECUTED
44344: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
44346: 2f0a movel %a2,%sp@-
44348: 4e93 jsr %a3@
}
4434a: 588f addql #4,%sp
4434c: 60ba bras 44308 <rtems_termios_txdaemon+0x20>
000452ea <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
452ea: 4e56 ffe8 linkw %fp,#-24
452ee: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
452f2: 246e 0008 moveal %fp@(8),%a2
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
452f6: 2052 moveal %a2@,%a0
452f8: 2668 002c moveal %a0@(44),%a3
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
452fc: 42a7 clrl %sp@-
452fe: 42a7 clrl %sp@-
45300: 2f2b 0018 movel %a3@(24),%sp@-
45304: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
4530a: 4fef 000c lea %sp@(12),%sp
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4530e: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
45310: 6600 0084 bnew 45396 <rtems_termios_write+0xac>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
45314: 222b 00cc movel %a3@(204),%d1
45318: eb89 lsll #5,%d1
4531a: 0681 0005 d2f8 addil #381688,%d1
45320: 2241 moveal %d1,%a1
45322: 2051 moveal %a1@,%a0
45324: 4a88 tstl %a0
45326: 6718 beqs 45340 <rtems_termios_write+0x56>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
45328: 2f0a movel %a2,%sp@-
4532a: 2f0b movel %a3,%sp@-
4532c: 4e90 jsr %a0@
rtems_semaphore_release (tty->osem);
4532e: 2f2b 0018 movel %a3@(24),%sp@-
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
45332: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
45334: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return sc;
4533a: 4fef 000c lea %sp@(12),%sp
4533e: 6056 bras 45396 <rtems_termios_write+0xac>
}
if (tty->termios.c_oflag & OPOST) {
45340: 7001 moveq #1,%d0
45342: c0ab 0034 andl %a3@(52),%d0
45346: 6728 beqs 45370 <rtems_termios_write+0x86> <== NEVER TAKEN
uint32_t count = args->count;
char *buffer = args->buffer;
45348: 286a 000c moveal %a2@(12),%a4
}
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
4534c: 260c movel %a4,%d3
4534e: d6aa 0010 addl %a2@(16),%d3
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
45352: 4bfa fa6e lea %pc@(44dc2 <oproc>),%a5
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
45356: 600c bras 45364 <rtems_termios_write+0x7a>
oproc (*buffer++, tty);
45358: 4280 clrl %d0
4535a: 101c moveb %a4@+,%d0
4535c: 2f0b movel %a3,%sp@-
4535e: 2f00 movel %d0,%sp@-
45360: 4e95 jsr %a5@
45362: 508f addql #8,%sp
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
45364: b68c cmpl %a4,%d3
45366: 66f0 bnes 45358 <rtems_termios_write+0x6e>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
45368: 256a 0010 0018 movel %a2@(16),%a2@(24)
4536e: 601a bras 4538a <rtems_termios_write+0xa0>
} else {
rtems_termios_puts (args->buffer, args->count, tty);
45370: 2f0b movel %a3,%sp@- <== NOT EXECUTED
45372: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
45376: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4537a: 4eb9 0004 4cd4 jsr 44cd4 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
45380: 256a 0010 0018 movel %a2@(16),%a2@(24) <== NOT EXECUTED
45386: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
4538a: 2f2b 0018 movel %a3@(24),%sp@-
4538e: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
return sc;
45394: 588f addql #4,%sp
}
45396: 2002 movel %d2,%d0
45398: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4539e: 4e5e unlk %fp <== NOT EXECUTED
00052028 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
52028: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
5202c: 486e fffc pea %fp@(-4)
52030: 2f2e 0008 movel %fp@(8),%sp@-
52034: 4879 0007 623c pea 7623c <_Timer_Information>
5203a: 4eb9 0005 4b30 jsr 54b30 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
52040: 4fef 000c lea %sp@(12),%sp
52044: 4aae fffc tstl %fp@(-4)
52048: 6620 bnes 5206a <rtems_timer_cancel+0x42>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
5204a: 7204 moveq #4,%d1
5204c: 2040 moveal %d0,%a0
5204e: b2a8 0038 cmpl %a0@(56),%d1
52052: 670c beqs 52060 <rtems_timer_cancel+0x38> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
52054: 4868 0010 pea %a0@(16)
52058: 4eb9 0005 64c8 jsr 564c8 <_Watchdog_Remove>
5205e: 588f addql #4,%sp
_Thread_Enable_dispatch();
52060: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
52066: 4280 clrl %d0
52068: 6002 bras 5206c <rtems_timer_cancel+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5206a: 7004 moveq #4,%d0
}
5206c: 4e5e unlk %fp <== NOT EXECUTED
000523a0 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
523a0: 4e56 fffc linkw %fp,#-4
523a4: 2f0b movel %a3,%sp@-
523a6: 2f0a movel %a2,%sp@-
523a8: 486e fffc pea %fp@(-4)
523ac: 2f2e 0008 movel %fp@(8),%sp@-
523b0: 4879 0007 623c pea 7623c <_Timer_Information>
523b6: 4eb9 0005 4b30 jsr 54b30 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
523bc: 4fef 000c lea %sp@(12),%sp
523c0: 2440 moveal %d0,%a2
523c2: 4aae fffc tstl %fp@(-4)
523c6: 6656 bnes 5241e <rtems_timer_reset+0x7e> <== NEVER TAKEN
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
523c8: 202a 0038 movel %a2@(56),%d0
523cc: 661c bnes 523ea <rtems_timer_reset+0x4a>
_Watchdog_Remove( &the_timer->Ticker );
523ce: 45ea 0010 lea %a2@(16),%a2
523d2: 2f0a movel %a2,%sp@-
523d4: 4eb9 0005 64c8 jsr 564c8 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
523da: 2f0a movel %a2,%sp@-
523dc: 4879 0007 60de pea 760de <_Watchdog_Ticks_chain>
523e2: 4eb9 0005 63a4 jsr 563a4 <_Watchdog_Insert>
523e8: 6020 bras 5240a <rtems_timer_reset+0x6a>
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
523ea: 7201 moveq #1,%d1
523ec: b280 cmpl %d0,%d1
523ee: 6622 bnes 52412 <rtems_timer_reset+0x72> <== NEVER TAKEN
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
523f0: 486a 0010 pea %a2@(16)
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
523f4: 2679 0007 6274 moveal 76274 <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
523fa: 4eb9 0005 64c8 jsr 564c8 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
52400: 2f0a movel %a2,%sp@-
52402: 2f0b movel %a3,%sp@-
52404: 206b 0004 moveal %a3@(4),%a0
52408: 4e90 jsr %a0@
5240a: 4fef 000c lea %sp@(12),%sp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
5240e: 95ca subal %a2,%a2
52410: 6004 bras 52416 <rtems_timer_reset+0x76>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
52412: 347c 000b moveaw #11,%a2
}
_Thread_Enable_dispatch();
52416: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch>
5241c: 6004 bras 52422 <rtems_timer_reset+0x82>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5241e: 347c 0004 moveaw #4,%a2
}
52422: 200a movel %a2,%d0
52424: 246e fff4 moveal %fp@(-12),%a2
52428: 266e fff8 moveal %fp@(-8),%a3
5242c: 4e5e unlk %fp <== NOT EXECUTED
000524f0 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
524f0: 4e56 ffe4 linkw %fp,#-28
524f4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
524f8: 262e 0008 movel %fp@(8),%d3
524fc: 242e 000c movel %fp@(12),%d2
52500: 282e 0010 movel %fp@(16),%d4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
52504: 2679 0007 6274 moveal 76274 <_Timer_server>,%a3
if ( !timer_server )
5250a: 4a8b tstl %a3
5250c: 6700 00cc beqw 525da <rtems_timer_server_fire_when+0xea>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
52510: 4a39 0007 5ff8 tstb 75ff8 <_TOD+0x14>
52516: 6700 00c6 beqw 525de <rtems_timer_server_fire_when+0xee>
return RTEMS_NOT_DEFINED;
if ( !routine )
5251a: 4a84 tstl %d4
5251c: 6700 00c4 beqw 525e2 <rtems_timer_server_fire_when+0xf2>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
52520: 2f02 movel %d2,%sp@-
52522: 4eb9 0004 f77c jsr 4f77c <_TOD_Validate>
52528: 588f addql #4,%sp
5252a: 4a00 tstb %d0
5252c: 6606 bnes 52534 <rtems_timer_server_fire_when+0x44>
return RTEMS_INVALID_CLOCK;
5252e: 7014 moveq #20,%d0
52530: 6000 00b6 braw 525e8 <rtems_timer_server_fire_when+0xf8>
seconds = _TOD_To_seconds( wall_time );
52534: 2f02 movel %d2,%sp@-
52536: 49f9 0006 618c lea 6618c <__divdi3>,%a4
5253c: 4eb9 0004 f6d8 jsr 4f6d8 <_TOD_To_seconds>
52542: 2400 movel %d0,%d2
52544: 2f3c 3b9a ca00 movel #1000000000,%sp@-
5254a: 42a7 clrl %sp@-
5254c: 2f39 0007 5fe8 movel 75fe8 <_TOD+0x4>,%sp@-
52552: 2f39 0007 5fe4 movel 75fe4 <_TOD>,%sp@-
52558: 4e94 jsr %a4@
if ( seconds <= _TOD_Seconds_since_epoch() )
5255a: 4fef 0014 lea %sp@(20),%sp
5255e: b282 cmpl %d2,%d1
52560: 64cc bccs 5252e <rtems_timer_server_fire_when+0x3e>
52562: 486e fffc pea %fp@(-4)
52566: 2f03 movel %d3,%sp@-
52568: 4879 0007 623c pea 7623c <_Timer_Information>
5256e: 4eb9 0005 4b30 jsr 54b30 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
52574: 4fef 000c lea %sp@(12),%sp
52578: 2440 moveal %d0,%a2
5257a: 4aae fffc tstl %fp@(-4)
5257e: 6666 bnes 525e6 <rtems_timer_server_fire_when+0xf6>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
52580: 486a 0010 pea %a2@(16)
52584: 4eb9 0005 64c8 jsr 564c8 <_Watchdog_Remove>
the_watchdog->user_data = user_data;
5258a: 256e 0014 0034 movel %fp@(20),%a2@(52)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
52590: 7003 moveq #3,%d0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
52592: 42aa 0018 clrl %a2@(24)
52596: 2540 0038 movel %d0,%a2@(56)
the_watchdog->routine = routine;
5259a: 2544 002c movel %d4,%a2@(44)
the_watchdog->id = id;
5259e: 2543 0030 movel %d3,%a2@(48)
525a2: 2f3c 3b9a ca00 movel #1000000000,%sp@-
525a8: 42a7 clrl %sp@-
525aa: 2f39 0007 5fe8 movel 75fe8 <_TOD+0x4>,%sp@-
525b0: 2f39 0007 5fe4 movel 75fe4 <_TOD>,%sp@-
525b6: 4e94 jsr %a4@
525b8: 4fef 0010 lea %sp@(16),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
525bc: 9481 subl %d1,%d2
525be: 2542 001c movel %d2,%a2@(28)
(*timer_server->schedule_operation)( timer_server, the_timer );
525c2: 2f0a movel %a2,%sp@-
525c4: 2f0b movel %a3,%sp@-
525c6: 206b 0004 moveal %a3@(4),%a0
525ca: 4e90 jsr %a0@
_Thread_Enable_dispatch();
525cc: 4eb9 0005 5774 jsr 55774 <_Thread_Enable_dispatch>
525d2: 4fef 000c lea %sp@(12),%sp
return RTEMS_SUCCESSFUL;
525d6: 4280 clrl %d0
525d8: 600e bras 525e8 <rtems_timer_server_fire_when+0xf8>
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
525da: 700e moveq #14,%d0
525dc: 600a bras 525e8 <rtems_timer_server_fire_when+0xf8>
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
525de: 700b moveq #11,%d0 <== NOT EXECUTED
525e0: 6006 bras 525e8 <rtems_timer_server_fire_when+0xf8><== NOT EXECUTED
if ( !routine )
return RTEMS_INVALID_ADDRESS;
525e2: 7009 moveq #9,%d0
525e4: 6002 bras 525e8 <rtems_timer_server_fire_when+0xf8>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
525e6: 7004 moveq #4,%d0
}
525e8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
525ee: 4e5e unlk %fp
...
0004287c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
4287c: 4e56 fff0 linkw %fp,#-16
42880: 48d7 041c moveml %d2-%d4/%a2,%sp@
42884: 242e 0008 movel %fp@(8),%d2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
42888: 0802 001d btst #29,%d2
4288c: 6624 bnes 428b2 <rtems_verror+0x36>
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
4288e: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
status = error_flag & ~RTEMS_ERROR_MASK;
42894: 2802 movel %d2,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
42896: 2f28 0008 movel %a0@(8),%sp@-
status = error_flag & ~RTEMS_ERROR_MASK;
4289a: 0284 8fff ffff andil #-1879048193,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
428a0: 4eb9 0004 c6ae jsr 4c6ae <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
428a6: 588f addql #4,%sp
428a8: 0802 001e btst #30,%d2
428ac: 6634 bnes 428e2 <rtems_verror+0x66>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
428ae: 4283 clrl %d3
428b0: 603a bras 428ec <rtems_verror+0x70>
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
if (rtems_panic_in_progress++)
428b2: 2039 0005 dae0 movel 5dae0 <rtems_panic_in_progress>,%d0
428b8: 2200 movel %d0,%d1
428ba: 5281 addql #1,%d1
428bc: 23c1 0005 dae0 movel %d1,5dae0 <rtems_panic_in_progress>
428c2: 4a80 tstl %d0
428c4: 670e beqs 428d4 <rtems_verror+0x58> <== ALWAYS TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
428c6: 2039 0005 dbf6 movel 5dbf6 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED
++level;
428cc: 5280 addql #1,%d0 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
428ce: 23c0 0005 dbf6 movel %d0,5dbf6 <_Thread_Dispatch_disable_level><== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
428d4: 7002 moveq #2,%d0
428d6: b0b9 0005 dae0 cmpl 5dae0 <rtems_panic_in_progress>,%d0
428dc: 6cb0 bges 4288e <rtems_verror+0x12> <== ALWAYS TAKEN
428de: 6000 00dc braw 429bc <rtems_verror+0x140> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
428e2: 4eb9 0004 c330 jsr 4c330 <__errno>
428e8: 2040 moveal %d0,%a0
428ea: 2610 movel %a0@,%d3
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
428ec: 2f2e 0010 movel %fp@(16),%sp@-
428f0: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
428f6: 2f2e 000c movel %fp@(12),%sp@-
428fa: 2f28 000c movel %a0@(12),%sp@-
428fe: 4eb9 0005 3300 jsr 53300 <vfprintf>
if (status)
42904: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42908: 2400 movel %d0,%d2
if (status)
4290a: 4a84 tstl %d4
4290c: 6726 beqs 42934 <rtems_verror+0xb8>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
4290e: 2f04 movel %d4,%sp@-
42910: 4eb9 0004 2864 jsr 42864 <rtems_status_text>
42916: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
4291c: 2f00 movel %d0,%sp@-
4291e: 4879 0005 af9f pea 5af9f <IMFS_node_control_default+0x19>
42924: 2f28 000c movel %a0@(12),%sp@-
42928: 4eb9 0004 ca5e jsr 4ca5e <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
4292e: 4fef 0010 lea %sp@(16),%sp
42932: d480 addl %d0,%d2
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
42934: 4a83 tstl %d3
42936: 6756 beqs 4298e <rtems_verror+0x112>
if ((local_errno > 0) && *strerror(local_errno))
42938: 6f36 bles 42970 <rtems_verror+0xf4>
4293a: 2f03 movel %d3,%sp@-
4293c: 45f9 0004 d674 lea 4d674 <strerror>,%a2
42942: 4e92 jsr %a2@
42944: 588f addql #4,%sp
42946: 2040 moveal %d0,%a0
42948: 4a10 tstb %a0@
4294a: 6724 beqs 42970 <rtems_verror+0xf4> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
4294c: 2f03 movel %d3,%sp@-
4294e: 4e92 jsr %a2@
42950: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
42956: 2f00 movel %d0,%sp@-
42958: 4879 0005 afad pea 5afad <IMFS_node_control_default+0x27>
4295e: 2f28 000c movel %a0@(12),%sp@-
42962: 4eb9 0004 ca5e jsr 4ca5e <fprintf>
42968: 4fef 0010 lea %sp@(16),%sp
4296c: d480 addl %d0,%d2
4296e: 601e bras 4298e <rtems_verror+0x112>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
42970: 2f03 movel %d3,%sp@-
42972: 4879 0005 afba pea 5afba <IMFS_node_control_default+0x34>
42978: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
4297e: 2f28 000c movel %a0@(12),%sp@-
42982: 4eb9 0004 ca5e jsr 4ca5e <fprintf>
42988: 4fef 000c lea %sp@(12),%sp
4298c: d480 addl %d0,%d2
}
chars_written += fprintf(stderr, "\n");
4298e: 4879 0005 ab85 pea 5ab85 <Configuration_Initial_Extensions+0x351>
42994: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
4299a: 2f28 000c movel %a0@(12),%sp@-
4299e: 4eb9 0004 ca5e jsr 4ca5e <fprintf>
(void) fflush(stderr);
429a4: 2079 0005 c5c0 moveal 5c5c0 <_impure_ptr>,%a0
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
429aa: d480 addl %d0,%d2
(void) fflush(stderr);
429ac: 2f28 000c movel %a0@(12),%sp@-
429b0: 4eb9 0004 c6ae jsr 4c6ae <fflush>
return chars_written;
429b6: 4fef 000c lea %sp@(12),%sp
429ba: 6002 bras 429be <rtems_verror+0x142>
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
429bc: 4282 clrl %d2 <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
429be: 2002 movel %d2,%d0
429c0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
429c6: 4e5e unlk %fp <== NOT EXECUTED
00046d18 <rtems_workspace_greedy_free>:
void rtems_workspace_greedy_free( void *opaque )
{
46d18: 4e56 0000 linkw %fp,#0
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
46d1c: 2239 0005 e6fa movel 5e6fa <_Thread_Dispatch_disable_level>,%d1
++level;
46d22: 5281 addql #1,%d1
46d24: 202e 0008 movel %fp@(8),%d0
_Thread_Dispatch_disable_level = level;
46d28: 23c1 0005 e6fa movel %d1,5e6fa <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_Heap_Greedy_free( &_Workspace_Area, opaque );
46d2e: 2f00 movel %d0,%sp@-
46d30: 4879 0005 e70a pea 5e70a <_Workspace_Area>
46d36: 4eb9 0004 7764 jsr 47764 <_Heap_Greedy_free>
_Thread_Enable_dispatch();
46d3c: 508f addql #8,%sp
}
46d3e: 4e5e unlk %fp
void rtems_workspace_greedy_free( void *opaque )
{
_Thread_Disable_dispatch();
_Heap_Greedy_free( &_Workspace_Area, opaque );
_Thread_Enable_dispatch();
46d40: 4ef9 0004 8bd0 jmp 48bd0 <_Thread_Enable_dispatch>
...
0005dd84 <scanInt>:
/**
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
5dd84: 4e56 ffe4 linkw %fp,#-28
5dd88: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
5dd8c: 246e 0008 moveal %fp@(8),%a2
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
5dd90: 4283 clrl %d3
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
5dd92: 283c 7fff ffff movel #2147483647,%d4
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
5dd98: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
5dd9a: 47f9 0007 28d8 lea 728d8 <__srget_r>,%a3
5dda0: 202a 0004 movel %a2@(4),%d0
5dda4: 5380 subql #1,%d0
5dda6: 2540 0004 movel %d0,%a2@(4)
5ddaa: 6c0e bges 5ddba <scanInt+0x36> <== ALWAYS TAKEN
5ddac: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ddae: 2f39 0009 1ea8 movel 91ea8 <_impure_ptr>,%sp@- <== NOT EXECUTED
5ddb4: 4e93 jsr %a3@ <== NOT EXECUTED
5ddb6: 508f addql #8,%sp <== NOT EXECUTED
5ddb8: 600a bras 5ddc4 <scanInt+0x40> <== NOT EXECUTED
5ddba: 2052 moveal %a2@,%a0
5ddbc: 4280 clrl %d0
5ddbe: 1010 moveb %a0@,%d0
5ddc0: 5288 addql #1,%a0
5ddc2: 2488 movel %a0,%a2@
if (c == ':')
5ddc4: 723a moveq #58,%d1
5ddc6: b280 cmpl %d0,%d1
5ddc8: 6752 beqs 5de1c <scanInt+0x98>
break;
if (sign == 0) {
5ddca: 4a83 tstl %d3
5ddcc: 660e bnes 5dddc <scanInt+0x58>
if (c == '-') {
5ddce: 7a2d moveq #45,%d5
5ddd0: ba80 cmpl %d0,%d5
5ddd2: 6606 bnes 5ddda <scanInt+0x56>
sign = -1;
limit++;
5ddd4: 5284 addql #1,%d4
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
5ddd6: 76ff moveq #-1,%d3
limit++;
continue;
5ddd8: 60c6 bras 5dda0 <scanInt+0x1c>
}
sign = 1;
5ddda: 7601 moveq #1,%d3
}
if (!isdigit(c))
5dddc: 2079 0009 1e9c moveal 91e9c <__ctype_ptr__>,%a0
5dde2: 7c04 moveq #4,%d6
5dde4: 1230 0801 moveb %a0@(00000001,%d0:l),%d1
5dde8: c286 andl %d6,%d1
5ddea: 4a01 tstb %d1
5ddec: 6740 beqs 5de2e <scanInt+0xaa>
return 0;
d = c - '0';
if ((i > (limit / 10))
5ddee: 2204 movel %d4,%d1
5ddf0: 1c3c 000a moveb #10,%d6
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
5ddf4: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
5ddfa: 4c46 1005 remul %d6,%d5,%d1
5ddfe: 4c46 1001 remul %d6,%d1,%d1
5de02: b282 cmpl %d2,%d1
5de04: 6528 bcss 5de2e <scanInt+0xaa>
|| ((i == (limit / 10)) && (d > (limit % 10))))
5de06: 6604 bnes 5de0c <scanInt+0x88>
5de08: ba80 cmpl %d0,%d5
5de0a: 6522 bcss 5de2e <scanInt+0xaa> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
5de0c: 2202 movel %d2,%d1
5de0e: e789 lsll #3,%d1
5de10: 2241 moveal %d1,%a1
5de12: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0
5de16: 2400 movel %d0,%d2
5de18: d488 addl %a0,%d2
5de1a: 6084 bras 5dda0 <scanInt+0x1c>
}
if (sign == 0)
5de1c: 4a83 tstl %d3
5de1e: 670e beqs 5de2e <scanInt+0xaa> <== NEVER TAKEN
return 0;
*val = i * sign;
5de20: 4c02 3800 mulsl %d2,%d3
return 1;
5de24: 7001 moveq #1,%d0
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
5de26: 206e 000c moveal %fp@(12),%a0
5de2a: 2083 movel %d3,%a0@
return 1;
5de2c: 6002 bras 5de30 <scanInt+0xac>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
5de2e: 4280 clrl %d0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
5de30: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
5de36: 4e5e unlk %fp <== NOT EXECUTED
0005dec8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
5dec8: 4e56 ffe4 linkw %fp,#-28
5decc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
5ded0: 42a7 clrl %sp@-
5ded2: 280e movel %fp,%d4
5ded4: 0684 0000 0014 addil #20,%d4
5deda: 260e movel %fp,%d3
5dedc: 0683 0000 0010 addil #16,%d3
5dee2: 47fa ff56 lea %pc@(5de3a <scanString>),%a3
5dee6: 2f04 movel %d4,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
5dee8: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
5deec: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
5deee: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
5def2: 2f0a movel %a2,%sp@-
5def4: 2f02 movel %d2,%sp@-
5def6: 4e93 jsr %a3@
5def8: 4fef 0014 lea %sp@(20),%sp
5defc: 4a80 tstl %d0
5defe: 6606 bnes 5df06 <scangr+0x3e>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
5df00: 4280 clrl %d0
5df02: 6000 00b0 braw 5dfb4 <scangr+0xec>
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
5df06: 42a7 clrl %sp@-
5df08: 2f04 movel %d4,%sp@-
5df0a: 2f03 movel %d3,%sp@-
5df0c: 486a 0004 pea %a2@(4)
5df10: 2f02 movel %d2,%sp@-
5df12: 4e93 jsr %a3@
5df14: 4fef 0014 lea %sp@(20),%sp
5df18: 4a80 tstl %d0
5df1a: 67e4 beqs 5df00 <scangr+0x38> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
5df1c: 486e fff8 pea %fp@(-8)
5df20: 2f02 movel %d2,%sp@-
5df22: 4eba fe60 jsr %pc@(5dd84 <scanInt>)
5df26: 508f addql #8,%sp
5df28: 4a80 tstl %d0
5df2a: 67d4 beqs 5df00 <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
5df2c: 4878 0001 pea 1 <ADD>
5df30: 2f04 movel %d4,%sp@-
5df32: 2f03 movel %d3,%sp@-
5df34: 486e fffc pea %fp@(-4)
5df38: 2f02 movel %d2,%sp@-
5df3a: 4e93 jsr %a3@
5df3c: 4fef 0014 lea %sp@(20),%sp
5df40: 4a80 tstl %d0
5df42: 67bc beqs 5df00 <scangr+0x38> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5df44: 222e fffc movel %fp@(-4),%d1
5df48: 7001 moveq #1,%d0
5df4a: 2041 moveal %d1,%a0
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;
5df4c: 356e fffa 0008 movew %fp@(-6),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5df52: 600a bras 5df5e <scangr+0x96>
if(*cp == ',')
5df54: 49c2 extbl %d2
5df56: 762c moveq #44,%d3
5df58: b682 cmpl %d2,%d3
5df5a: 6602 bnes 5df5e <scangr+0x96>
memcount++;
5df5c: 5280 addql #1,%d0
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5df5e: 1418 moveb %a0@+,%d2
5df60: 66f2 bnes 5df54 <scangr+0x8c>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
5df62: e588 lsll #2,%d0
5df64: 0680 0000 0013 addil #19,%d0
5df6a: b0ae 0014 cmpl %fp@(20),%d0
5df6e: 6290 bhis 5df00 <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
5df70: 202e 0010 movel %fp@(16),%d0
5df74: 74f0 moveq #-16,%d2
5df76: 0680 0000 000f addil #15,%d0
5df7c: c082 andl %d2,%d0
5df7e: 2540 000a movel %d0,%a2@(10)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
5df82: 2040 moveal %d0,%a0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5df84: 7001 moveq #1,%d0
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
5df86: 2081 movel %d1,%a0@
5df88: 206e fffc moveal %fp@(-4),%a0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5df8c: 6018 bras 5dfa6 <scangr+0xde>
if(*cp == ',') {
5df8e: 49c1 extbl %d1
5df90: 742c moveq #44,%d2
5df92: b481 cmpl %d1,%d2
5df94: 6610 bnes 5dfa6 <scangr+0xde>
*cp = '\0';
5df96: 4203 clrb %d3
5df98: 1143 ffff moveb %d3,%a0@(-1)
grp->gr_mem[memcount++] = cp + 1;
5df9c: 226a 000a moveal %a2@(10),%a1
5dfa0: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4)
5dfa4: 5280 addql #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5dfa6: 1218 moveb %a0@+,%d1
5dfa8: 66e4 bnes 5df8e <scangr+0xc6>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
5dfaa: 206a 000a moveal %a2@(10),%a0
5dfae: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
return 1;
5dfb2: 7001 moveq #1,%d0
}
5dfb4: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3
5dfba: 4e5e unlk %fp <== NOT EXECUTED
0005dfbe <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
5dfbe: 4e56 ffe0 linkw %fp,#-32
5dfc2: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
5dfc6: 42a7 clrl %sp@-
5dfc8: 280e movel %fp,%d4
5dfca: 0684 0000 0014 addil #20,%d4
5dfd0: 260e movel %fp,%d3
5dfd2: 0683 0000 0010 addil #16,%d3
5dfd8: 47fa fe60 lea %pc@(5de3a <scanString>),%a3
5dfdc: 2f04 movel %d4,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
5dfde: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
5dfe2: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
5dfe4: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
5dfe8: 2f0a movel %a2,%sp@-
5dfea: 2f02 movel %d2,%sp@-
5dfec: 4e93 jsr %a3@
5dfee: 4fef 0014 lea %sp@(20),%sp
5dff2: 4a80 tstl %d0
5dff4: 6606 bnes 5dffc <scanpw+0x3e>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
5dff6: 4280 clrl %d0
5dff8: 6000 00a2 braw 5e09c <scanpw+0xde>
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
5dffc: 42a7 clrl %sp@-
5dffe: 2f04 movel %d4,%sp@-
5e000: 2f03 movel %d3,%sp@-
5e002: 486a 0004 pea %a2@(4)
5e006: 2f02 movel %d2,%sp@-
5e008: 4e93 jsr %a3@
5e00a: 4fef 0014 lea %sp@(20),%sp
5e00e: 4a80 tstl %d0
5e010: 67e4 beqs 5dff6 <scanpw+0x38> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
5e012: 486e fff8 pea %fp@(-8)
5e016: 49fa fd6c lea %pc@(5dd84 <scanInt>),%a4
5e01a: 2f02 movel %d2,%sp@-
5e01c: 4e94 jsr %a4@
5e01e: 508f addql #8,%sp
5e020: 4a80 tstl %d0
5e022: 67d2 beqs 5dff6 <scanpw+0x38>
|| !scanInt(fp, &pwgid)
5e024: 486e fffc pea %fp@(-4)
5e028: 2f02 movel %d2,%sp@-
5e02a: 4e94 jsr %a4@
5e02c: 508f addql #8,%sp
5e02e: 4a80 tstl %d0
5e030: 67c4 beqs 5dff6 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
5e032: 42a7 clrl %sp@-
5e034: 2f04 movel %d4,%sp@-
5e036: 2f03 movel %d3,%sp@-
5e038: 486a 000c pea %a2@(12)
5e03c: 2f02 movel %d2,%sp@-
5e03e: 4e93 jsr %a3@
5e040: 4fef 0014 lea %sp@(20),%sp
5e044: 4a80 tstl %d0
5e046: 67ae beqs 5dff6 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
5e048: 42a7 clrl %sp@-
5e04a: 2f04 movel %d4,%sp@-
5e04c: 2f03 movel %d3,%sp@-
5e04e: 486a 0010 pea %a2@(16)
5e052: 2f02 movel %d2,%sp@-
5e054: 4e93 jsr %a3@
5e056: 4fef 0014 lea %sp@(20),%sp
5e05a: 4a80 tstl %d0
5e05c: 6798 beqs 5dff6 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
5e05e: 42a7 clrl %sp@-
5e060: 2f04 movel %d4,%sp@-
5e062: 2f03 movel %d3,%sp@-
5e064: 486a 0014 pea %a2@(20)
5e068: 2f02 movel %d2,%sp@-
5e06a: 4e93 jsr %a3@
5e06c: 4fef 0014 lea %sp@(20),%sp
5e070: 4a80 tstl %d0
5e072: 6782 beqs 5dff6 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
5e074: 4878 0001 pea 1 <ADD>
5e078: 2f04 movel %d4,%sp@-
5e07a: 2f03 movel %d3,%sp@-
5e07c: 486a 0018 pea %a2@(24)
5e080: 2f02 movel %d2,%sp@-
5e082: 4e93 jsr %a3@
5e084: 4fef 0014 lea %sp@(20),%sp
5e088: 4a80 tstl %d0
5e08a: 6700 ff6a beqw 5dff6 <scanpw+0x38>
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
5e08e: 7001 moveq #1,%d0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
5e090: 356e fffa 0008 movew %fp@(-6),%a2@(8)
pwd->pw_gid = pwgid;
5e096: 356e fffe 000a movew %fp@(-2),%a2@(10)
return 1;
}
5e09c: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
5e0a2: 4e5e unlk %fp <== NOT EXECUTED
0004527a <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
4527a: 4e56 0000 linkw %fp,#0
4527e: 2f0a movel %a2,%sp@-
45280: 246e 000c moveal %fp@(12),%a2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
45284: 202a 003c movel %a2@(60),%d0
45288: 0280 0000 0e78 andil #3704,%d0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
4528e: 2f02 movel %d2,%sp@-
45290: 142e 000b moveb %fp@(11),%d2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
45294: 4a80 tstl %d0
45296: 6618 bnes 452b0 <siproc+0x36> <== ALWAYS TAKEN
}
else {
i = iproc (c, tty);
}
return i;
}
45298: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
4529c: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED
452a2: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
return i;
}
452a6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
452aa: 4e5e unlk %fp <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
452ac: 6000 fe20 braw 450ce <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
452b0: 42a7 clrl %sp@-
i = iproc (c, tty);
452b2: 0282 0000 00ff andil #255,%d2
/*
* 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);
452b8: 42a7 clrl %sp@-
452ba: 2f2a 0018 movel %a2@(24),%sp@-
452be: 4eb9 0004 62c4 jsr 462c4 <rtems_semaphore_obtain>
i = iproc (c, tty);
452c4: 2f0a movel %a2,%sp@-
452c6: 2f02 movel %d2,%sp@-
452c8: 4eba fe04 jsr %pc@(450ce <iproc>)
rtems_semaphore_release (tty->osem);
452cc: 2f2a 0018 movel %a2@(24),%sp@-
/*
* 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);
i = iproc (c, tty);
452d0: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
452d2: 4eb9 0004 63cc jsr 463cc <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
452d8: 246e fffc moveal %fp@(-4),%a2
452dc: 2002 movel %d2,%d0
* 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);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
452de: 4fef 0018 lea %sp@(24),%sp
}
else {
i = iproc (c, tty);
}
return i;
}
452e2: 242e fff8 movel %fp@(-8),%d2
452e6: 4e5e unlk %fp <== NOT EXECUTED
0004c2c2 <sparse_disk_ioctl>:
/*
* ioctl handler to be passed to the block device handler
*/
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
{
4c2c2: 4e56 ffc4 linkw %fp,#-60
4c2c6: 206e 0008 moveal %fp@(8),%a0
4c2ca: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c2ce: 202e 000c movel %fp@(12),%d0
4c2d2: 266e 0010 moveal %fp@(16),%a3
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c2d6: 2468 003c moveal %a0@(60),%a2
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
{
rtems_status_code sc;
rtems_sparse_disk *sd = rtems_disk_get_driver_data( dd );
if ( RTEMS_BLKIO_REQUEST == req ) {
4c2da: 0c80 c018 4201 cmpil #-1072152063,%d0
4c2e0: 6600 0186 bnew 4c468 <sparse_disk_ioctl+0x1a6>
rtems_blkdev_request *r = argp;
switch ( r->req ) {
4c2e4: 2d53 fff4 movel %a3@,%fp@(-12)
4c2e8: 7001 moveq #1,%d0
4c2ea: b0ae fff4 cmpl %fp@(-12),%d0
4c2ee: 6500 01be bcsw 4c4ae <sparse_disk_ioctl+0x1ec>
rtems_blkdev_bnum block;
uint8_t *buff;
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4c2f2: 42a7 clrl %sp@-
static int sparse_disk_read_write(
rtems_sparse_disk *sparse_disk,
rtems_blkdev_request *req,
const bool read )
{
int rv = 0;
4c2f4: 4286 clrl %d6
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
4c2f6: 4285 clrl %d5
/* we only need to write the block if it is different from the fill pattern.
* If the read method does not find a block it will deliver the fill pattern anyway.
*/
key = bsearch(
4c2f8: 49f9 0005 675c lea 5675c <bsearch>,%a4
key = sparse_disk_get_new_block( sparse_disk, block );
}
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
4c2fe: 4bf9 0005 7168 lea 57168 <memcpy>,%a5
rtems_blkdev_bnum block;
uint8_t *buff;
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4c304: 42a7 clrl %sp@-
4c306: 2f12 movel %a2@,%sp@-
4c308: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
4c30e: 4fef 000c lea %sp@(12),%sp
4c312: 6000 0128 braw 4c43c <sparse_disk_ioctl+0x17a>
for ( req_buffer = 0;
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
4c316: 2005 movel %d5,%d0
bytes_handled = 0;
4c318: 4287 clrl %d7
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
4c31a: e988 lsll #4,%d0
4c31c: 41f3 0818 lea %a3@(00000018,%d0:l),%a0
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
4c320: 2228 0008 movel %a0@(8),%d1
block = scatter_gather->block;
4c324: 2610 movel %a0@,%d3
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
4c326: 2d41 fff0 movel %d1,%fp@(-16)
block = scatter_gather->block;
buff_size = scatter_gather->length;
4c32a: 2428 0004 movel %a0@(4),%d2
4c32e: 6000 0100 braw 4c430 <sparse_disk_ioctl+0x16e>
4c332: 282e fff0 movel %fp@(-16),%d4
4c336: d887 addl %d7,%d4
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
if ( read )
4c338: 4aae fff4 tstl %fp@(-12)
4c33c: 6656 bnes 4c394 <sparse_disk_ioctl+0xd2>
const rtems_blkdev_bnum block,
uint8_t *buffer,
const size_t buffer_size )
{
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
4c33e: 2d43 fff8 movel %d3,%fp@(-8)
.block = block,
.data = NULL
};
size_t bytes_to_copy = sparse_disk->media_block_size;
4c342: 202a 000c movel %a2@(12),%d0
const rtems_blkdev_bnum block,
uint8_t *buffer,
const size_t buffer_size )
{
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
4c346: 42ae fffc clrl %fp@(-4)
4c34a: 2c02 movel %d2,%d6
4c34c: b082 cmpl %d2,%d0
4c34e: 6402 bccs 4c352 <sparse_disk_ioctl+0x90>
4c350: 2c00 movel %d0,%d6
size_t bytes_to_copy = sparse_disk->media_block_size;
if ( buffer_size < bytes_to_copy )
bytes_to_copy = buffer_size;
key = bsearch(
4c352: 487a ff40 pea %pc@(4c294 <sparse_disk_compare>)
4c356: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4c35a: 2f2a 0008 movel %a2@(8),%sp@-
4c35e: 2f2a 0016 movel %a2@(22),%sp@-
4c362: 486e fff8 pea %fp@(-8)
4c366: 4e94 jsr %a4@
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL != key )
4c368: 4fef 0014 lea %sp@(20),%sp
4c36c: 4a80 tstl %d0
4c36e: 670e beqs 4c37e <sparse_disk_ioctl+0xbc>
memcpy( buffer, key->data, bytes_to_copy );
4c370: 2040 moveal %d0,%a0
4c372: 2f06 movel %d6,%sp@-
4c374: 2f28 0004 movel %a0@(4),%sp@-
4c378: 2f04 movel %d4,%sp@-
4c37a: 6000 00a4 braw 4c420 <sparse_disk_ioctl+0x15e>
else
memset( buffer, sparse_disk->fill_pattern, buffer_size );
4c37e: 2f02 movel %d2,%sp@-
4c380: 4280 clrl %d0
4c382: 102a 0014 moveb %a2@(20),%d0
4c386: 2f00 movel %d0,%sp@-
4c388: 2f04 movel %d4,%sp@-
4c38a: 4eb9 0005 71d8 jsr 571d8 <memset>
4c390: 6000 0090 braw 4c422 <sparse_disk_ioctl+0x160>
const size_t buffer_size )
{
unsigned int i;
bool block_needs_writing = false;
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
4c394: 2d43 fff8 movel %d3,%fp@(-8)
.block = block,
.data = NULL
};
size_t bytes_to_copy = sparse_disk->media_block_size;
4c398: 202a 000c movel %a2@(12),%d0
const size_t buffer_size )
{
unsigned int i;
bool block_needs_writing = false;
rtems_sparse_disk_key *key;
rtems_sparse_disk_key block_key = {
4c39c: 42ae fffc clrl %fp@(-4)
4c3a0: 2c02 movel %d2,%d6
4c3a2: b082 cmpl %d2,%d0
4c3a4: 6402 bccs 4c3a8 <sparse_disk_ioctl+0xe6>
4c3a6: 2c00 movel %d0,%d6
/* we only need to write the block if it is different from the fill pattern.
* If the read method does not find a block it will deliver the fill pattern anyway.
*/
key = bsearch(
4c3a8: 487a feea pea %pc@(4c294 <sparse_disk_compare>)
4c3ac: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4c3b0: 2f2a 0008 movel %a2@(8),%sp@-
4c3b4: 2f2a 0016 movel %a2@(22),%sp@-
4c3b8: 486e fff8 pea %fp@(-8)
4c3bc: 4e94 jsr %a4@
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL == key ) {
4c3be: 4fef 0014 lea %sp@(20),%sp
4c3c2: 4a80 tstl %d0
4c3c4: 6650 bnes 4c416 <sparse_disk_ioctl+0x154>
}
/*
* ioctl handler to be passed to the block device handler
*/
static int sparse_disk_ioctl( rtems_disk_device *dd, uint32_t req, void *argp )
4c3c6: 2004 movel %d4,%d0
4c3c8: 2044 moveal %d4,%a0
4c3ca: d086 addl %d6,%d0
4c3cc: 6010 bras 4c3de <sparse_disk_ioctl+0x11c>
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL == key ) {
for ( i = 0; ( !block_needs_writing ) && ( i < bytes_to_copy ); ++i ) {
4c3ce: 4281 clrl %d1
4c3d0: 1218 moveb %a0@+,%d1
4c3d2: 2241 moveal %d1,%a1
4c3d4: 122a 0014 moveb %a2@(20),%d1
4c3d8: b289 cmpl %a1,%d1
4c3da: 6600 00e2 bnew 4c4be <sparse_disk_ioctl+0x1fc>
4c3de: b088 cmpl %a0,%d0
4c3e0: 66ec bnes 4c3ce <sparse_disk_ioctl+0x10c>
4c3e2: 6042 bras 4c426 <sparse_disk_ioctl+0x164>
const rtems_blkdev_bnum block )
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
key = &sparse_disk->key_table[sparse_disk->used_count];
4c3e4: 2001 movel %d1,%d0
key->block = block;
++sparse_disk->used_count;
4c3e6: 5281 addql #1,%d1
const rtems_blkdev_bnum block )
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
key = &sparse_disk->key_table[sparse_disk->used_count];
4c3e8: e788 lsll #3,%d0
4c3ea: 206a 0016 moveal %a2@(22),%a0
4c3ee: d088 addl %a0,%d0
key->block = block;
4c3f0: 2240 moveal %d0,%a1
4c3f2: 2283 movel %d3,%a1@
++sparse_disk->used_count;
4c3f4: 2541 0008 movel %d1,%a2@(8)
qsort( sparse_disk->key_table, sparse_disk->used_count,
4c3f8: 487a fe9a pea %pc@(4c294 <sparse_disk_compare>)
4c3fc: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4c400: 2f01 movel %d1,%sp@-
4c402: 2d40 ffec movel %d0,%fp@(-20)
4c406: 2f08 movel %a0,%sp@-
4c408: 4eb9 0005 7244 jsr 57244 <qsort>
4c40e: 202e ffec movel %fp@(-20),%d0
4c412: 4fef 0010 lea %sp@(16),%sp
key = sparse_disk_get_new_block( sparse_disk, block );
}
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
4c416: 2f06 movel %d6,%sp@-
4c418: 2040 moveal %d0,%a0
4c41a: 2f04 movel %d4,%sp@-
4c41c: 2f28 0004 movel %a0@(4),%sp@-
4c420: 4e95 jsr %a5@
4c422: 4fef 000c lea %sp@(12),%sp
rv = sparse_disk_write_block( sparse_disk,
block,
&buff[bytes_handled],
buff_size );
++block;
4c426: 5283 addql #1,%d3
bytes_handled += rv;
4c428: de86 addl %d6,%d7
buff_size -= rv;
4c42a: 9486 subl %d6,%d2
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
block = scatter_gather->block;
buff_size = scatter_gather->length;
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
4c42c: 4a86 tstl %d6
4c42e: 6d06 blts 4c436 <sparse_disk_ioctl+0x174> <== NEVER TAKEN
4c430: 4a82 tstl %d2
4c432: 6600 fefe bnew 4c332 <sparse_disk_ioctl+0x70>
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
4c436: 5285 addql #1,%d5
size_t buff_size;
unsigned int bytes_handled;
rtems_semaphore_obtain( sparse_disk->mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
for ( req_buffer = 0;
4c438: 4a86 tstl %d6
4c43a: 6d08 blts 4c444 <sparse_disk_ioctl+0x182> <== NEVER TAKEN
( 0 <= rv ) && ( req_buffer < req->bufnum );
4c43c: baab 0010 cmpl %a3@(16),%d5
4c440: 6500 fed4 bcsw 4c316 <sparse_disk_ioctl+0x54>
bytes_handled += rv;
buff_size -= rv;
}
}
rtems_semaphore_release( sparse_disk->mutex );
4c444: 2f12 movel %a2@,%sp@-
4c446: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
4c44c: 206b 0004 moveal %a3@(4),%a0
if ( 0 > rv )
4c450: 588f addql #4,%sp
4c452: 4a86 tstl %d6
4c454: 6c06 bges 4c45c <sparse_disk_ioctl+0x19a> <== ALWAYS TAKEN
static inline void rtems_blkdev_request_done(
rtems_blkdev_request *req,
rtems_status_code status
)
{
(*req->done)(req, status);
4c456: 4878 001b pea 1b <OPER2+0x7> <== NOT EXECUTED
4c45a: 6002 bras 4c45e <sparse_disk_ioctl+0x19c> <== NOT EXECUTED
4c45c: 42a7 clrl %sp@-
4c45e: 2f0b movel %a3,%sp@-
4c460: 4e90 jsr %a0@
4c462: 508f addql #8,%sp
rtems_blkdev_request *r = argp;
switch ( r->req ) {
case RTEMS_BLKDEV_REQ_READ:
case RTEMS_BLKDEV_REQ_WRITE:
return sparse_disk_read_write( sd, r, r->req == RTEMS_BLKDEV_REQ_READ );
4c464: 4280 clrl %d0
4c466: 6068 bras 4c4d0 <sparse_disk_ioctl+0x20e>
default:
break;
}
} else if ( RTEMS_BLKIO_DELETED == req ) {
4c468: 0c80 2000 4207 cmpil #536887815,%d0
4c46e: 662c bnes 4c49c <sparse_disk_ioctl+0x1da>
sc = rtems_semaphore_delete( sd->mutex );
4c470: 2f12 movel %a2@,%sp@-
4c472: 4eb9 0004 7c20 jsr 47c20 <rtems_semaphore_delete>
if ( RTEMS_SUCCESSFUL != sc )
4c478: 588f addql #4,%sp
4c47a: 4a80 tstl %d0
4c47c: 670c beqs 4c48a <sparse_disk_ioctl+0x1c8> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
4c47e: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4c484: 4eb9 0004 8420 jsr 48420 <rtems_fatal_error_occurred> <== NOT EXECUTED
sd->mutex = RTEMS_ID_NONE;
if ( NULL != sd->delete_handler )
4c48a: 206a 0010 moveal %a2@(16),%a0
sc = rtems_semaphore_delete( sd->mutex );
if ( RTEMS_SUCCESSFUL != sc )
rtems_fatal_error_occurred( 0xdeadbeef );
sd->mutex = RTEMS_ID_NONE;
4c48e: 4292 clrl %a2@
if ( NULL != sd->delete_handler )
4c490: 4a88 tstl %a0
4c492: 67d0 beqs 4c464 <sparse_disk_ioctl+0x1a2> <== NEVER TAKEN
( *sd->delete_handler )( sd );
4c494: 2f0a movel %a2,%sp@-
4c496: 4e90 jsr %a0@
4c498: 588f addql #4,%sp
4c49a: 60c8 bras 4c464 <sparse_disk_ioctl+0x1a2>
return 0;
} else {
return rtems_blkdev_ioctl( dd, req, argp );
4c49c: 2f0b movel %a3,%sp@-
4c49e: 2f00 movel %d0,%sp@-
4c4a0: 2f08 movel %a0,%sp@-
4c4a2: 4eb9 0004 eac8 jsr 4eac8 <rtems_blkdev_ioctl>
4c4a8: 4fef 000c lea %sp@(12),%sp
4c4ac: 6022 bras 4c4d0 <sparse_disk_ioctl+0x20e>
}
errno = EINVAL;
4c4ae: 4eb9 0005 67c0 jsr 567c0 <__errno> <== NOT EXECUTED
4c4b4: 2240 moveal %d0,%a1 <== NOT EXECUTED
4c4b6: 7016 moveq #22,%d0 <== NOT EXECUTED
4c4b8: 2280 movel %d0,%a1@ <== NOT EXECUTED
return -1;
4c4ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
4c4bc: 6012 bras 4c4d0 <sparse_disk_ioctl+0x20e> <== NOT EXECUTED
rtems_sparse_disk *sparse_disk,
const rtems_blkdev_bnum block )
{
rtems_sparse_disk_key *key;
if ( sparse_disk->used_count < sparse_disk->blocks_with_buffer ) {
4c4be: 222a 0008 movel %a2@(8),%d1
4c4c2: b2aa 0004 cmpl %a2@(4),%d1
4c4c6: 6500 ff1c bcsw 4c3e4 <sparse_disk_ioctl+0x122>
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
else if ( block_needs_writing )
return -1;
4c4ca: 7cff moveq #-1,%d6 <== NOT EXECUTED
4c4cc: 6000 ff58 braw 4c426 <sparse_disk_ioctl+0x164> <== NOT EXECUTED
return rtems_blkdev_ioctl( dd, req, argp );
}
errno = EINVAL;
return -1;
}
4c4d0: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
4c4d6: 4e5e unlk %fp <== NOT EXECUTED
00044e64 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
44e64: 4e56 0000 linkw %fp,#0
44e68: 206e 0008 moveal %fp@(8),%a0
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
44e6c: 2028 00f4 movel %a0@(244),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
44e70: 2f02 movel %d2,%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;
if ( this_reent ) {
44e72: 4a80 tstl %d0
44e74: 6728 beqs 44e9e <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
44e76: 2279 0005 f55e moveal 5f55e <_Per_CPU_Information+0xe>,%a1
44e7c: 2429 00f4 movel %a1@(244),%d2
_Thread_Executing->libc_reent = this_reent;
44e80: 2340 00f4 movel %d0,%a1@(244)
_fwalk (t->libc_reent, sync_wrapper);
44e84: 487a 0020 pea %pc@(44ea6 <sync_wrapper>)
44e88: 2f28 00f4 movel %a0@(244),%sp@-
44e8c: 4eb9 0004 df30 jsr 4df30 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
44e92: 2079 0005 f55e moveal 5f55e <_Per_CPU_Information+0xe>,%a0
44e98: 508f addql #8,%sp
44e9a: 2142 00f4 movel %d2,%a0@(244)
}
}
44e9e: 242e fffc movel %fp@(-4),%d2
44ea2: 4e5e unlk %fp <== NOT EXECUTED
000501b0 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
501b0: 4e56 0000 linkw %fp,#0
501b4: 202e 000c movel %fp@(12),%d0
501b8: 2f03 movel %d3,%sp@-
501ba: 262e 0010 movel %fp@(16),%d3
501be: 2f02 movel %d2,%sp@-
501c0: 242e 0008 movel %fp@(8),%d2
switch (opt) {
501c4: 4a80 tstl %d0
501c6: 672c beqs 501f4 <tcsetattr+0x44>
501c8: 7201 moveq #1,%d1
501ca: b280 cmpl %d0,%d1
501cc: 6710 beqs 501de <tcsetattr+0x2e>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
501ce: 4eb9 0005 31ac jsr 531ac <__errno>
501d4: 2040 moveal %d0,%a0
501d6: 20bc 0000 0086 movel #134,%a0@
501dc: 6034 bras 50212 <tcsetattr+0x62>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
501de: 42a7 clrl %sp@-
501e0: 4878 0003 pea 3 <DIVIDE>
501e4: 2f02 movel %d2,%sp@-
501e6: 4eb9 0005 2a98 jsr 52a98 <ioctl>
501ec: 4fef 000c lea %sp@(12),%sp
501f0: 4a80 tstl %d0
501f2: 6d1e blts 50212 <tcsetattr+0x62> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
501f4: 2d43 0010 movel %d3,%fp@(16)
501f8: 7002 moveq #2,%d0
501fa: 2d42 0008 movel %d2,%fp@(8)
}
}
501fe: 242e fff8 movel %fp@(-8),%d2
50202: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
50206: 2d40 000c movel %d0,%fp@(12)
}
}
5020a: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
5020c: 4ef9 0005 2a98 jmp 52a98 <ioctl>
}
}
50212: 242e fff8 movel %fp@(-8),%d2
50216: 70ff moveq #-1,%d0
50218: 262e fffc movel %fp@(-4),%d3
5021c: 4e5e unlk %fp <== NOT EXECUTED
00045dac <unmount>:
* in some form is supported on most UNIX and POSIX systems. This
* routine is necessary to mount instantiations of a file system
* into the file system name space.
*/
int unmount( const char *path )
{
45dac: 4e56 ffb8 linkw %fp,#-72
45db0: 48d7 040c moveml %d2-%d3/%a2,%sp@
int rv = 0;
rtems_filesystem_eval_path_context_t ctx;
int eval_flags = RTEMS_FS_FOLLOW_LINK;
const rtems_filesystem_location_info_t *currentloc =
45db4: 4878 0018 pea 18 <OPER2+0x4>
45db8: 2f2e 0008 movel %fp@(8),%sp@-
45dbc: 486e ffc8 pea %fp@(-56)
45dc0: 4eb9 0004 3e66 jsr 43e66 <rtems_filesystem_eval_path_start>
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
45dc6: 2040 moveal %d0,%a0
45dc8: 2468 0014 moveal %a0@(20),%a2
const rtems_filesystem_location_info_t *loc
)
{
const rtems_filesystem_mount_table_entry_t *mt_entry = loc->mt_entry;
return (*mt_entry->ops->are_nodes_equal_h)(
45dcc: 206a 000c moveal %a2@(12),%a0
45dd0: 2f2a 0024 movel %a2@(36),%sp@-
45dd4: 2f00 movel %d0,%sp@-
45dd6: 2068 0010 moveal %a0@(16),%a0
45dda: 4e90 jsr %a0@
if ( rtems_filesystem_location_is_instance_root( currentloc ) ) {
45ddc: 4fef 0014 lea %sp@(20),%sp
45de0: 4a00 tstb %d0
45de2: 676e beqs 45e52 <unmount+0xa6>
static bool contains_root_or_current_directory(
const rtems_filesystem_mount_table_entry_t *mt_entry
)
{
const rtems_filesystem_location_info_t *root =
&rtems_filesystem_root->location;
45de4: 2079 0005 ca4c moveal 5ca4c <rtems_current_user_env>,%a0
const rtems_filesystem_location_info_t *current =
&rtems_filesystem_current->location;
45dea: 2250 moveal %a0@,%a1
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
45dec: 2068 0004 moveal %a0@(4),%a0
45df0: b5e8 0014 cmpal %a0@(20),%a2
45df4: 670c beqs 45e02 <unmount+0x56>
45df6: b5e9 0014 cmpal %a1@(20),%a2
45dfa: 57c0 seq %d0
45dfc: 49c0 extbl %d0
45dfe: 4480 negl %d0
45e00: 6002 bras 45e04 <unmount+0x58>
45e02: 7001 moveq #1,%d0
const rtems_filesystem_location_info_t *currentloc =
rtems_filesystem_eval_path_start( &ctx, path, eval_flags );
rtems_filesystem_mount_table_entry_t *mt_entry = currentloc->mt_entry;
if ( rtems_filesystem_location_is_instance_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
45e04: 0800 0000 btst #0,%d0
45e08: 663a bnes 45e44 <unmount+0x98>
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
45e0a: 206a 0020 moveal %a2@(32),%a0
45e0e: 2068 0014 moveal %a0@(20),%a0
rv = (*mt_point_ops->unmount_h)( mt_entry );
45e12: 2068 000c moveal %a0@(12),%a0
45e16: 2f0a movel %a2,%sp@-
45e18: 2068 0038 moveal %a0@(56),%a0
45e1c: 4e90 jsr %a0@
if ( rv == 0 ) {
45e1e: 588f addql #4,%sp
if ( rtems_filesystem_location_is_instance_root( currentloc ) ) {
if ( !contains_root_or_current_directory( mt_entry ) ) {
const rtems_filesystem_operations_table *mt_point_ops =
mt_entry->mt_point_node->location.mt_entry->ops;
rv = (*mt_point_ops->unmount_h)( mt_entry );
45e20: 2400 movel %d0,%d2
if ( rv == 0 ) {
45e22: 663c bnes 45e60 <unmount+0xb4>
rtems_id self_task_id = rtems_task_self();
45e24: 4eb9 0004 6c60 jsr 46c60 <rtems_task_self>
rtems_filesystem_mt_entry_declare_lock_context( lock_context );
rtems_filesystem_mt_entry_lock( lock_context );
45e2a: 223c 0000 0700 movel #1792,%d1
45e30: 40c3 movew %sr,%d3
45e32: 8283 orl %d3,%d1
45e34: 46c1 movew %d1,%sr
mt_entry->unmount_task = self_task_id;
45e36: 2540 003a movel %d0,%a2@(58)
mt_entry->mounted = false;
45e3a: 4200 clrb %d0
45e3c: 1540 0028 moveb %d0,%a2@(40)
rtems_filesystem_mt_entry_unlock( lock_context );
45e40: 46c3 movew %d3,%sr
45e42: 601c bras 45e60 <unmount+0xb4>
}
} else {
errno = EBUSY;
45e44: 4eb9 0004 c828 jsr 4c828 <__errno>
45e4a: 7210 moveq #16,%d1
45e4c: 2040 moveal %d0,%a0
45e4e: 2081 movel %d1,%a0@
45e50: 600c bras 45e5e <unmount+0xb2>
rv = -1;
}
} else {
errno = EACCES;
45e52: 4eb9 0004 c828 jsr 4c828 <__errno>
45e58: 2040 moveal %d0,%a0
45e5a: 700d moveq #13,%d0
45e5c: 2080 movel %d0,%a0@
rv = -1;
45e5e: 74ff moveq #-1,%d2
}
rtems_filesystem_eval_path_cleanup( &ctx );
45e60: 486e ffc8 pea %fp@(-56)
45e64: 4eb9 0004 3f58 jsr 43f58 <rtems_filesystem_eval_path_cleanup>
if ( rv == 0 ) {
45e6a: 588f addql #4,%sp
45e6c: 4a82 tstl %d2
45e6e: 6628 bnes 45e98 <unmount+0xec>
rtems_interval ticks
)
{
rtems_event_set event_out;
return rtems_event_system_receive(
45e70: 486e ffc4 pea %fp@(-60)
45e74: 42a7 clrl %sp@-
45e76: 42a7 clrl %sp@-
45e78: 2f3c 8000 0000 movel #-2147483648,%sp@-
45e7e: 4eb9 0004 695c jsr 4695c <rtems_event_system_receive>
rtems_status_code sc = rtems_event_transient_receive(
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if ( sc != RTEMS_SUCCESSFUL ) {
45e84: 4fef 0010 lea %sp@(16),%sp
45e88: 4a80 tstl %d0
45e8a: 670c beqs 45e98 <unmount+0xec> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
45e8c: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
45e92: 4eb9 0004 6f0c jsr 46f0c <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
return rv;
}
45e98: 2002 movel %d2,%d0
45e9a: 4cee 040c ffb8 moveml %fp@(-72),%d2-%d3/%a2
45ea0: 4e5e unlk %fp <== NOT EXECUTED
00045a70 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45a70: 4e56 ffc4 linkw %fp,#-60
45a74: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
45a78: 246e 0008 moveal %fp@(8),%a2
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
45a7c: 49f9 0004 a3dc lea 4a3dc <rtems_putc>,%a4
for (n = 0; n < count; n++) {
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45a82: 4bf9 0005 b680 lea 5b680 <null_ops+0x54>,%a5
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45a88: 266e 000c moveal %fp@(12),%a3
for (; *fmt != '\0'; fmt++) {
45a8c: 6000 0200 braw 45c8e <vprintk+0x21e>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
45a90: 49c0 extbl %d0
45a92: 7225 moveq #37,%d1
45a94: b280 cmpl %d0,%d1
45a96: 6706 beqs 45a9e <vprintk+0x2e>
rtems_putc(*fmt);
45a98: 2f00 movel %d0,%sp@-
45a9a: 6000 014c braw 45be8 <vprintk+0x178>
continue;
}
fmt++;
if (*fmt == '0' ) {
45a9e: 7430 moveq #48,%d2
45aa0: 102a 0001 moveb %a2@(1),%d0
45aa4: 49c0 extbl %d0
45aa6: b480 cmpl %d0,%d2
45aa8: 6706 beqs 45ab0 <vprintk+0x40>
if (*fmt != '%') {
rtems_putc(*fmt);
continue;
}
fmt++;
45aaa: 528a addql #1,%a2
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
45aac: 7a20 moveq #32,%d5
45aae: 6004 bras 45ab4 <vprintk+0x44>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
45ab0: 548a addql #2,%a2
rtems_putc(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
45ab2: 7a30 moveq #48,%d5
fmt++;
}
if (*fmt == '-' ) {
45ab4: 782d moveq #45,%d4
45ab6: 1012 moveb %a2@,%d0
45ab8: 49c0 extbl %d0
45aba: b880 cmpl %d0,%d4
45abc: 6606 bnes 45ac4 <vprintk+0x54>
minus = true;
fmt++;
45abe: 528a addql #1,%a2
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
45ac0: 7c01 moveq #1,%d6
45ac2: 6002 bras 45ac6 <vprintk+0x56>
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
45ac4: 4206 clrb %d6
45ac6: 200a movel %a2,%d0
45ac8: 4283 clrl %d3
45aca: 6010 bras 45adc <vprintk+0x6c>
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
45acc: 2403 movel %d3,%d2
width += ((unsigned) *fmt - '0');
45ace: 49c1 extbl %d1
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
45ad0: e78a lsll #3,%d2
45ad2: 2042 moveal %d2,%a0
width += ((unsigned) *fmt - '0');
45ad4: 41f0 3ad0 lea %a0@(ffffffd0,%d3:l:2),%a0
45ad8: 2608 movel %a0,%d3
45ada: d681 addl %d1,%d3
45adc: 2440 moveal %d0,%a2
45ade: 5280 addql #1,%d0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45ae0: 7809 moveq #9,%d4
45ae2: 1212 moveb %a2@,%d1
45ae4: 2401 movel %d1,%d2
45ae6: 0682 ffff ffd0 addil #-48,%d2
45aec: 0282 0000 00ff andil #255,%d2
45af2: b882 cmpl %d2,%d4
45af4: 64d6 bccs 45acc <vprintk+0x5c>
45af6: 2e03 movel %d3,%d7
45af8: 204a moveal %a2,%a0
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45afa: 183c 006c moveb #108,%d4
45afe: 1401 moveb %d1,%d2
45b00: 49c2 extbl %d2
45b02: b882 cmpl %d2,%d4
45b04: 6606 bnes 45b0c <vprintk+0x9c>
lflag = true;
c = *++fmt;
45b06: 2440 moveal %d0,%a2
45b08: 1228 0001 moveb %a0@(1),%d1
}
if ( c == 'c' ) {
45b0c: 7463 moveq #99,%d2
45b0e: 1001 moveb %d1,%d0
45b10: 49c0 extbl %d0
45b12: b480 cmpl %d0,%d2
45b14: 6612 bnes 45b28 <vprintk+0xb8>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
45b16: 2013 movel %a3@,%d0
rtems_putc(chr);
45b18: 49c0 extbl %d0
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);
45b1a: 280b movel %a3,%d4
45b1c: 5884 addql #4,%d4
rtems_putc(chr);
45b1e: 2f00 movel %d0,%sp@-
45b20: 4e94 jsr %a4@
continue;
45b22: 588f addql #4,%sp
45b24: 6000 0164 braw 45c8a <vprintk+0x21a>
}
if ( c == 's' ) {
45b28: 7473 moveq #115,%d2
45b2a: b480 cmpl %d0,%d2
45b2c: 6664 bnes 45b92 <vprintk+0x122>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
45b2e: 280b movel %a3,%d4
45b30: 5884 addql #4,%d4
45b32: 2013 movel %a3@,%d0
if ( str == NULL ) {
45b34: 6606 bnes 45b3c <vprintk+0xcc>
str = "";
45b36: 203c 0005 b5fe movel #374270,%d0
45b3c: 2640 moveal %d0,%a3
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45b3e: 2040 moveal %d0,%a0
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45b40: 2408 movel %a0,%d2
45b42: 9480 subl %d0,%d2
if ( str == NULL ) {
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45b44: 4a18 tstb %a0@+
45b46: 66f8 bnes 45b40 <vprintk+0xd0>
;
/* leading spaces */
if ( !minus )
45b48: 4a06 tstb %d6
45b4a: 6604 bnes 45b50 <vprintk+0xe0>
45b4c: 2a02 movel %d2,%d5
45b4e: 6010 bras 45b60 <vprintk+0xf0>
for ( i=len ; i<width ; i++ )
rtems_putc(' ');
/* no width option */
if (width == 0) {
45b50: 4a83 tstl %d3
45b52: 6712 beqs 45b66 <vprintk+0xf6>
45b54: 6024 bras 45b7a <vprintk+0x10a>
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
rtems_putc(' ');
45b56: 4878 0020 pea 20 <OPER2+0xc>
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45b5a: 5285 addql #1,%d5
rtems_putc(' ');
45b5c: 4e94 jsr %a4@
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45b5e: 588f addql #4,%sp
45b60: b685 cmpl %d5,%d3
45b62: 62f2 bhis 45b56 <vprintk+0xe6>
45b64: 60ea bras 45b50 <vprintk+0xe0>
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45b66: 2602 movel %d2,%d3
45b68: 6610 bnes 45b7a <vprintk+0x10a>
rtems_putc(*str);
/* trailing spaces */
if ( minus )
45b6a: 4a06 tstb %d6
45b6c: 6700 011c beqw 45c8a <vprintk+0x21a>
45b70: 6018 bras 45b8a <vprintk+0x11a>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
rtems_putc(*str);
45b72: 49c0 extbl %d0
45b74: 2f00 movel %d0,%sp@-
45b76: 4e94 jsr %a4@
45b78: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45b7a: 101b moveb %a3@+,%d0
45b7c: 66f4 bnes 45b72 <vprintk+0x102>
45b7e: 60ea bras 45b6a <vprintk+0xfa>
rtems_putc(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
rtems_putc(' ');
45b80: 4878 0020 pea 20 <OPER2+0xc>
for ( i=0 ; i<width && *str ; str++ )
rtems_putc(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45b84: 5282 addql #1,%d2
rtems_putc(' ');
45b86: 4e94 jsr %a4@
for ( i=0 ; i<width && *str ; str++ )
rtems_putc(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45b88: 588f addql #4,%sp
45b8a: b682 cmpl %d2,%d3
45b8c: 62f2 bhis 45b80 <vprintk+0x110>
45b8e: 6000 00fa braw 45c8a <vprintk+0x21a>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
45b92: 7c6f moveq #111,%d6
45b94: bc80 cmpl %d0,%d6
45b96: 675a beqs 45bf2 <vprintk+0x182>
45b98: 744f moveq #79,%d2
45b9a: b480 cmpl %d0,%d2
45b9c: 6754 beqs 45bf2 <vprintk+0x182>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
45b9e: 1c3c 0069 moveb #105,%d6
45ba2: bc80 cmpl %d0,%d6
45ba4: 6752 beqs 45bf8 <vprintk+0x188> <== NEVER TAKEN
45ba6: 143c 0049 moveb #73,%d2
45baa: b480 cmpl %d0,%d2
45bac: 674a beqs 45bf8 <vprintk+0x188> <== NEVER TAKEN
45bae: 1c3c 0064 moveb #100,%d6
45bb2: bc80 cmpl %d0,%d6
45bb4: 6742 beqs 45bf8 <vprintk+0x188>
c == 'd' || c == 'D' ) {
45bb6: 143c 0044 moveb #68,%d2
45bba: b480 cmpl %d0,%d2
45bbc: 673a beqs 45bf8 <vprintk+0x188> <== NEVER TAKEN
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
45bbe: 1c3c 0075 moveb #117,%d6
45bc2: bc80 cmpl %d0,%d6
45bc4: 6736 beqs 45bfc <vprintk+0x18c>
45bc6: 143c 0055 moveb #85,%d2
45bca: b480 cmpl %d0,%d2
45bcc: 672e beqs 45bfc <vprintk+0x18c> <== NEVER TAKEN
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
45bce: 49c1 extbl %d1
45bd0: 1c3c 0078 moveb #120,%d6
45bd4: bc81 cmpl %d1,%d6
45bd6: 672a beqs 45c02 <vprintk+0x192>
45bd8: 7058 moveq #88,%d0
45bda: b081 cmpl %d1,%d0
45bdc: 6724 beqs 45c02 <vprintk+0x192> <== NEVER TAKEN
base = 16; sign = false;
} else if ( c == 'p' ) {
45bde: 143c 0070 moveb #112,%d2
45be2: b481 cmpl %d1,%d2
45be4: 671c beqs 45c02 <vprintk+0x192>
base = 16; sign = false; lflag = true;
} else {
rtems_putc(c);
45be6: 2f01 movel %d1,%sp@-
45be8: 4e94 jsr %a4@
continue;
45bea: 588f addql #4,%sp
45bec: 280b movel %a3,%d4
45bee: 6000 009a braw 45c8a <vprintk+0x21a>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
45bf2: 7408 moveq #8,%d2
45bf4: 4200 clrb %d0
45bf6: 600e bras 45c06 <vprintk+0x196>
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
45bf8: 7001 moveq #1,%d0
45bfa: 6002 bras 45bfe <vprintk+0x18e>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
45bfc: 4200 clrb %d0
45bfe: 740a moveq #10,%d2
45c00: 6004 bras 45c06 <vprintk+0x196>
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
45c02: 7410 moveq #16,%d2
45c04: 4200 clrb %d0
rtems_putc(c);
continue;
}
printNum(
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
45c06: 280b movel %a3,%d4
45c08: 5884 addql #4,%d4
} else {
rtems_putc(c);
continue;
}
printNum(
45c0a: 2c13 movel %a3@,%d6
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
45c0c: 4a00 tstb %d0
45c0e: 671a beqs 45c2a <vprintk+0x1ba>
45c10: 4a86 tstl %d6
45c12: 6c16 bges 45c2a <vprintk+0x1ba>
rtems_putc('-');
45c14: 4878 002d pea 2d <OPER2+0x19>
45c18: 4e94 jsr %a4@
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45c1a: 588f addql #4,%sp
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
rtems_putc('-');
unsigned_num = (unsigned long) -num;
45c1c: 2006 movel %d6,%d0
45c1e: 4480 negl %d0
if (maxwidth) maxwidth--;
45c20: 4a83 tstl %d3
45c22: 670a beqs 45c2e <vprintk+0x1be>
45c24: 2e03 movel %d3,%d7
45c26: 5387 subql #1,%d7
45c28: 6004 bras 45c2e <vprintk+0x1be>
} else {
unsigned_num = (unsigned long) num;
45c2a: 2006 movel %d6,%d0
45c2c: 2e03 movel %d3,%d7
}
count = 0;
45c2e: 4283 clrl %d3
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
45c30: 3242 moveaw %d2,%a1
45c32: 6010 bras 45c44 <vprintk+0x1d4>
45c34: 3c09 movew %a1,%d6
45c36: cdc1 mulsw %d1,%d6
45c38: 3046 moveaw %d6,%a0
45c3a: 9088 subl %a0,%d0
45c3c: 1d80 38ec moveb %d0,%fp@(ffffffec,%d3:l)
45c40: 5283 addql #1,%d3
45c42: 2001 movel %d1,%d0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45c44: 2200 movel %d0,%d1
45c46: 4c42 1001 remul %d2,%d1,%d1
45c4a: 66e8 bnes 45c34 <vprintk+0x1c4>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45c4c: 2c03 movel %d3,%d6
45c4e: 5286 addql #1,%d6
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
45c50: 49c5 extbl %d5
count = 0;
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45c52: 1d80 38ec moveb %d0,%fp@(ffffffec,%d3:l)
45c56: 6008 bras 45c60 <vprintk+0x1f0>
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
45c58: 2f05 movel %d5,%sp@-
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45c5a: 5387 subql #1,%d7
rtems_putc(lead);
45c5c: 4e94 jsr %a4@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45c5e: 588f addql #4,%sp
45c60: bc87 cmpl %d7,%d6
45c62: 65f4 bcss 45c58 <vprintk+0x1e8>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45c64: 47ee ffec lea %fp@(-20),%a3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45c68: 4282 clrl %d2
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45c6a: d7c3 addal %d3,%a3
45c6c: 6018 bras 45c86 <vprintk+0x216>
45c6e: 2002 movel %d2,%d0
45c70: 4480 negl %d0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
45c72: 5282 addql #1,%d2
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45c74: 1033 0800 moveb %a3@(00000000,%d0:l),%d0
45c78: 49c0 extbl %d0
45c7a: 1035 0800 moveb %a5@(00000000,%d0:l),%d0
45c7e: 49c0 extbl %d0
45c80: 2f00 movel %d0,%sp@-
45c82: 4e94 jsr %a4@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
rtems_putc(lead);
for (n = 0; n < count; n++) {
45c84: 588f addql #4,%sp
45c86: bc82 cmpl %d2,%d6
45c88: 62e4 bhis 45c6e <vprintk+0x1fe>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45c8a: 528a addql #1,%a2
45c8c: 2644 moveal %d4,%a3
45c8e: 1012 moveb %a2@,%d0
45c90: 6600 fdfe bnew 45a90 <vprintk+0x20>
sign,
width,
lead
);
}
}
45c94: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
45c9a: 4e5e unlk %fp
...
0005a284 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5a284: 4e56 0000 linkw %fp,#0
5a288: 202e 0008 movel %fp@(8),%d0
5a28c: 2f0a movel %a2,%sp@-
5a28e: 222e 000c movel %fp@(12),%d1
5a292: 226e 0010 moveal %fp@(16),%a1
5a296: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5a298: b0b9 0005 c450 cmpl 5c450 <rtems_libio_number_iops>,%d0
5a29e: 6502 bcss 5a2a2 <write+0x1e>
5a2a0: 6036 bras 5a2d8 <write+0x54>
iop = rtems_libio_iop( fd );
5a2a2: 2400 movel %d0,%d2
5a2a4: ed88 lsll #6,%d0
5a2a6: e98a lsll #4,%d2
5a2a8: 2079 0005 dae4 moveal 5dae4 <rtems_libio_iops>,%a0
5a2ae: 9082 subl %d2,%d0
5a2b0: d1c0 addal %d0,%a0
rtems_libio_check_is_open( iop );
5a2b2: 2028 000c movel %a0@(12),%d0
5a2b6: 0800 0008 btst #8,%d0
5a2ba: 6602 bnes 5a2be <write+0x3a>
5a2bc: 601a bras 5a2d8 <write+0x54>
rtems_libio_check_buffer( buffer );
5a2be: 4a81 tstl %d1
5a2c0: 660e bnes 5a2d0 <write+0x4c> <== ALWAYS TAKEN
5a2c2: 4eb9 0004 c330 jsr 4c330 <__errno> <== NOT EXECUTED
5a2c8: 7216 moveq #22,%d1 <== NOT EXECUTED
5a2ca: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a2cc: 2081 movel %d1,%a0@ <== NOT EXECUTED
5a2ce: 6014 bras 5a2e4 <write+0x60> <== NOT EXECUTED
rtems_libio_check_count( count );
5a2d0: 4a89 tstl %a1
5a2d2: 6734 beqs 5a308 <write+0x84>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
5a2d4: 44c0 movew %d0,%ccr
5a2d6: 6710 beqs 5a2e8 <write+0x64>
5a2d8: 4eb9 0004 c330 jsr 4c330 <__errno>
5a2de: 2040 moveal %d0,%a0
5a2e0: 7009 moveq #9,%d0
5a2e2: 2080 movel %d0,%a0@
5a2e4: 70ff moveq #-1,%d0
5a2e6: 6022 bras 5a30a <write+0x86>
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5a2e8: 2468 0020 moveal %a0@(32),%a2
5a2ec: 2d49 0010 movel %a1,%fp@(16)
}
5a2f0: 242e fff8 movel %fp@(-8),%d2
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5a2f4: 2d41 000c movel %d1,%fp@(12)
5a2f8: 2d48 0008 movel %a0,%fp@(8)
5a2fc: 226a 000c moveal %a2@(12),%a1
}
5a300: 246e fffc moveal %fp@(-4),%a2
5a304: 4e5e unlk %fp
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5a306: 4ed1 jmp %a1@
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 );
5a308: 4280 clrl %d0
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
}
5a30a: 242e fff8 movel %fp@(-8),%d2
5a30e: 246e fffc moveal %fp@(-4),%a2
5a312: 4e5e unlk %fp
...
0004690c <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
4690c: 4e56 ffe8 linkw %fp,#-24
46910: 222e 0008 movel %fp@(8),%d1
46914: 202e 000c movel %fp@(12),%d0
46918: 226e 0010 moveal %fp@(16),%a1
4691c: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
46920: b2b9 0005 cc60 cmpl 5cc60 <rtems_libio_number_iops>,%d1
46926: 6502 bcss 4692a <writev+0x1e>
46928: 6020 bras 4694a <writev+0x3e>
iop = rtems_libio_iop( fd );
4692a: 2401 movel %d1,%d2
4692c: ed89 lsll #6,%d1
4692e: e98a lsll #4,%d2
46930: 2679 0005 e2f4 moveal 5e2f4 <rtems_libio_iops>,%a3
46936: 9282 subl %d2,%d1
46938: d7c1 addal %d1,%a3
rtems_libio_check_is_open( iop );
4693a: 222b 000c movel %a3@(12),%d1
4693e: 0801 0008 btst #8,%d1
46942: 6602 bnes 46946 <writev+0x3a>
46944: 6004 bras 4694a <writev+0x3e>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
46946: 44c1 movew %d1,%ccr
46948: 6710 beqs 4695a <writev+0x4e> <== ALWAYS TAKEN
4694a: 4eb9 0004 cdf4 jsr 4cdf4 <__errno>
46950: 7209 moveq #9,%d1
46952: 2040 moveal %d0,%a0
46954: 2081 movel %d1,%a0@
46956: 6000 0092 braw 469ea <writev+0xde>
/*
* Argument validation on IO vector
*/
if ( !iov )
4695a: 4a80 tstl %d0
4695c: 6602 bnes 46960 <writev+0x54>
4695e: 6032 bras 46992 <writev+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
46960: 4a89 tstl %a1
46962: 6e02 bgts 46966 <writev+0x5a>
46964: 602c bras 46992 <writev+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
46966: b3fc 0000 0400 cmpal #1024,%a1
4696c: 6f02 bles 46970 <writev+0x64> <== ALWAYS TAKEN
4696e: 6022 bras 46992 <writev+0x86> <== NOT EXECUTED
46970: 2440 moveal %d0,%a2
46972: 2040 moveal %d0,%a0
46974: 4281 clrl %d1
46976: 4283 clrl %d3
46978: 7401 moveq #1,%d2
4697a: 6002 bras 4697e <writev+0x72>
* 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++ ) {
4697c: 2604 movel %d4,%d3
/*
* 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 )
4697e: 4a90 tstl %a0@
46980: 6602 bnes 46984 <writev+0x78>
46982: 600e bras 46992 <writev+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
46984: 2828 0004 movel %a0@(4),%d4
all_zeros = false;
46988: 57c5 seq %d5
/* check for wrap */
old = total;
total += iov[v].iov_len;
4698a: d883 addl %d3,%d4
*/
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
4698c: c485 andl %d5,%d2
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
4698e: b684 cmpl %d4,%d3
46990: 6f0e bles 469a0 <writev+0x94> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
46992: 4eb9 0004 cdf4 jsr 4cdf4 <__errno>
46998: 2040 moveal %d0,%a0
4699a: 7016 moveq #22,%d0
4699c: 2080 movel %d0,%a0@
4699e: 604a bras 469ea <writev+0xde>
* 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++ ) {
469a0: 5281 addql #1,%d1
469a2: 5088 addql #8,%a0
469a4: b3c1 cmpal %d1,%a1
469a6: 66d4 bnes 4697c <writev+0x70> <== NEVER TAKEN
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
469a8: 4a02 tstb %d2
469aa: 663a bnes 469e6 <writev+0xda>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
469ac: 2600 movel %d0,%d3
469ae: 4282 clrl %d2
469b0: e789 lsll #3,%d1
469b2: d681 addl %d1,%d3
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
469b4: 206a 0004 moveal %a2@(4),%a0
469b8: 4a88 tstl %a0
469ba: 6722 beqs 469de <writev+0xd2> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
469bc: 226b 0020 moveal %a3@(32),%a1
469c0: 2f08 movel %a0,%sp@-
469c2: 2f12 movel %a2@,%sp@-
469c4: 2f0b movel %a3,%sp@-
469c6: 2069 000c moveal %a1@(12),%a0
469ca: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
469cc: 4fef 000c lea %sp@(12),%sp
469d0: 4a80 tstl %d0
469d2: 6d16 blts 469ea <writev+0xde> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
469d4: 6702 beqs 469d8 <writev+0xcc> <== NEVER TAKEN
total += bytes;
469d6: d480 addl %d0,%d2
}
if (bytes != iov[ v ].iov_len)
469d8: b0aa 0004 cmpl %a2@(4),%d0
469dc: 660e bnes 469ec <writev+0xe0> <== NEVER TAKEN
469de: 508a addql #8,%a2
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
469e0: b68a cmpl %a2,%d3
469e2: 66d0 bnes 469b4 <writev+0xa8>
469e4: 6006 bras 469ec <writev+0xe0>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
469e6: 4282 clrl %d2
469e8: 6002 bras 469ec <writev+0xe0>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
469ea: 74ff moveq #-1,%d2
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
469ec: 2002 movel %d2,%d0
469ee: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
469f4: 4e5e unlk %fp <== NOT EXECUTED