RTEMS 4.11Annotated Report
Sat Dec 22 21:30:34 2012
00049800 <IMFS_chown>:
int IMFS_chown(
const rtems_filesystem_location_info_t *loc,
uid_t owner,
gid_t group
)
{
49800: 4e56 ffe8 linkw %fp,#-24
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) loc->node_access;
49804: 206e 0008 moveal %fp@(8),%a0
int IMFS_chown(
const rtems_filesystem_location_info_t *loc,
uid_t owner,
gid_t group
)
{
49808: 48d7 041c moveml %d2-%d4/%a2,%sp@
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) loc->node_access;
4980c: 2468 0008 moveal %a0@(8),%a2
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
49810: 4284 clrl %d4
int IMFS_chown(
const rtems_filesystem_location_info_t *loc,
uid_t owner,
gid_t group
)
{
49812: 362e 000e movew %fp@(14),%d3
49816: 342e 0012 movew %fp@(18),%d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4981a: 4eb9 0004 a1a4 jsr 4a1a4 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
49820: 4281 clrl %d1
49822: 3800 movew %d0,%d4
49824: 322a 003a movew %a2@(58),%d1
49828: b284 cmpl %d4,%d1
4982a: 6714 beqs 49840 <IMFS_chown+0x40>
4982c: 4a40 tstw %d0
4982e: 6710 beqs 49840 <IMFS_chown+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
49830: 4eb9 0004 cf98 jsr 4cf98 <__errno>
49836: 2040 moveal %d0,%a0
49838: 7001 moveq #1,%d0
4983a: 2080 movel %d0,%a0@
4983c: 70ff moveq #-1,%d0
4983e: 601e bras 4985e <IMFS_chown+0x5e>
#endif
jnode->st_uid = owner;
49840: 3543 003a movew %d3,%a2@(58)
jnode->st_gid = group;
49844: 3542 003c movew %d2,%a2@(60)
IMFS_update_ctime( jnode );
49848: 42a7 clrl %sp@-
4984a: 486e fff8 pea %fp@(-8)
4984e: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
49854: 256e fff8 0046 movel %fp@(-8),%a2@(70)
return 0;
4985a: 508f addql #8,%sp
4985c: 4280 clrl %d0
}
4985e: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
49864: 4e5e unlk %fp <== NOT EXECUTED
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 0e4a lea 50e4a <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 0cf6 lea 50cf6 <fprintf>,%a4
return;
}
puts("");
4491a: 4bf9 0005 2640 lea 52640 <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 0d74 movel #331124,%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 1449 pea 61449 <map.6809+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 2f2c moveal 62f2c <_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 2f2c moveal 62f2c <_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 144e pea 6144e <map.6809+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 1461 pea 61461 <map.6809+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 1470 pea 61470 <map.6809+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 147c pea 6147c <map.6809+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 1490 pea 61490 <map.6809+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 14a3 pea 614a3 <map.6809+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 1c8a pea 61c8a <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
000499ba <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(
499ba: 4280 clrl %d0
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
499bc: 4e56 ffe4 linkw %fp,#-28
499c0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
499c4: 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;
499c8: 286b 0020 moveal %a3@(32),%a4
bool access_ok = rtems_filesystem_eval_path_check_access(
499cc: 302c 003c movew %a4@(60),%d0
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
499d0: 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(
499d4: 2f00 movel %d0,%sp@-
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
499d6: 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(
499da: 302c 003a movew %a4@(58),%d0
499de: 2f00 movel %d0,%sp@-
499e0: 2f2c 002e movel %a4@(46),%sp@-
499e4: 4878 0001 pea 1 <ADD>
499e8: 2f0b movel %a3,%sp@-
499ea: 4eb9 0004 a5aa jsr 4a5aa <rtems_filesystem_eval_path_check_access>
dir->st_mode,
dir->st_uid,
dir->st_gid
);
if ( access_ok ) {
499f0: 4fef 0014 lea %sp@(20),%sp
499f4: 4a00 tstb %d0
499f6: 6604 bnes 499fc <IMFS_eval_token+0x42>
499f8: 6000 013c braw 49b36 <IMFS_eval_token+0x17c>
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
499fc: 7001 moveq #1,%d0
499fe: b082 cmpl %d2,%d0
49a00: 6610 bnes 49a12 <IMFS_eval_token+0x58>
49a02: 722e moveq #46,%d1
49a04: 1015 moveb %a5@,%d0
49a06: b380 eorl %d1,%d0
49a08: 4a00 tstb %d0
49a0a: 57c0 seq %d0
49a0c: 49c0 extbl %d0
49a0e: 4480 negl %d0
49a10: 6002 bras 49a14 <IMFS_eval_token+0x5a>
49a12: 4280 clrl %d0
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
49a14: 0800 0000 btst #0,%d0
49a18: 667c bnes 49a96 <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] == '.';
49a1a: 7602 moveq #2,%d3
49a1c: b682 cmpl %d2,%d3
49a1e: 661a bnes 49a3a <IMFS_eval_token+0x80>
49a20: 722e moveq #46,%d1
49a22: 1015 moveb %a5@,%d0
49a24: 49c0 extbl %d0
49a26: b280 cmpl %d0,%d1
49a28: 6610 bnes 49a3a <IMFS_eval_token+0x80>
49a2a: 102d 0001 moveb %a5@(1),%d0
49a2e: b380 eorl %d1,%d0
49a30: 4a00 tstb %d0
49a32: 57c0 seq %d0
49a34: 49c0 extbl %d0
49a36: 4480 negl %d0
49a38: 6002 bras 49a3c <IMFS_eval_token+0x82>
49a3a: 4280 clrl %d0
return dir;
} else {
if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) {
49a3c: 0800 0000 btst #0,%d0
49a40: 6706 beqs 49a48 <IMFS_eval_token+0x8e>
return dir->Parent;
49a42: 246c 0008 moveal %a4@(8),%a2
49a46: 6046 bras 49a8e <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 );
49a48: 260c movel %a4,%d3
49a4a: 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
49a50: 283c 0004 e314 movel #320276,%d4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
49a56: 246c 004e moveal %a4@(78),%a2
49a5a: 602a bras 49a86 <IMFS_eval_token+0xcc>
49a5c: 2f02 movel %d2,%sp@-
49a5e: 2044 moveal %d4,%a0
49a60: 2f0d movel %a5,%sp@-
49a62: 486a 000c pea %a2@(12)
49a66: 4e90 jsr %a0@
49a68: 4fef 000c lea %sp@(12),%sp
&& entry->name [tokenlen] == '\0';
49a6c: 4a80 tstl %d0
49a6e: 660c bnes 49a7c <IMFS_eval_token+0xc2>
49a70: 4a32 280c tstb %a2@(0000000c,%d2:l)
49a74: 57c0 seq %d0
49a76: 49c0 extbl %d0
49a78: 4480 negl %d0
49a7a: 6002 bras 49a7e <IMFS_eval_token+0xc4>
49a7c: 4280 clrl %d0
if ( match ) {
49a7e: 0800 0000 btst #0,%d0
49a82: 660a bnes 49a8e <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 );
}
49a84: 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 ) {
49a86: b68a cmpl %a2,%d3
49a88: 66d2 bnes 49a5c <IMFS_eval_token+0xa2>
49a8a: 6000 00ae braw 49b3a <IMFS_eval_token+0x180>
);
if ( access_ok ) {
IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen );
if ( entry != NULL ) {
49a8e: 4a8a tstl %a2
49a90: 6606 bnes 49a98 <IMFS_eval_token+0xde>
49a92: 6000 00a6 braw 49b3a <IMFS_eval_token+0x180>
IMFS_jnode_t *dir,
const char *token,
size_t tokenlen
)
{
if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) {
49a96: 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;
49a98: 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)) {
49a9c: 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 );
49a9e: 4aab 0004 tstl %a3@(4)
49aa2: 57c0 seq %d0
49aa4: 2210 movel %a0@,%d1
49aa6: 4480 negl %d0
};
void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx )
{
rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
}
49aa8: 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;
49aac: 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)) {
49ab0: b681 cmpl %d1,%d3
49ab2: 6610 bnes 49ac4 <IMFS_eval_token+0x10a>
49ab4: 44c2 movew %d2,%ccr
49ab6: 6b06 bmis 49abe <IMFS_eval_token+0x104>
49ab8: 4a00 tstb %d0
49aba: 6600 0082 bnew 49b3e <IMFS_eval_token+0x184>
entry = entry->info.hard_link.link_node;
49abe: 246a 004e moveal %a2@(78),%a2
49ac2: 607a bras 49b3e <IMFS_eval_token+0x184>
}
if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) {
49ac4: 7603 moveq #3,%d3
49ac6: b681 cmpl %d1,%d3
49ac8: 6628 bnes 49af2 <IMFS_eval_token+0x138>
49aca: 0802 0004 btst #4,%d2
49ace: 6604 bnes 49ad4 <IMFS_eval_token+0x11a>
49ad0: 4a00 tstb %d0
49ad2: 666a bnes 49b3e <IMFS_eval_token+0x184>
const char *target = entry->info.sym_link.name;
49ad4: 242a 004e movel %a2@(78),%d2
rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) );
49ad8: 2f02 movel %d2,%sp@-
49ada: 4eb9 0004 e2f8 jsr 4e2f8 <strlen>
49ae0: 2e80 movel %d0,%sp@
49ae2: 2f02 movel %d2,%sp@-
49ae4: 2f0b movel %a3,%sp@-
49ae6: 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)) {
49aec: 4fef 000c lea %sp@(12),%sp
49af0: 6044 bras 49b36 <IMFS_eval_token+0x17c>
IMFS_jnode_types_t type
)
{
rtems_filesystem_global_location_t **fs_root_ptr = NULL;
if ( type == IMFS_DIRECTORY ) {
49af2: 4a81 tstl %d1
49af4: 6648 bnes 49b3e <IMFS_eval_token+0x184>
if ( node->info.directory.mt_fs != NULL ) {
49af6: 222a 005a movel %a2@(90),%d1
49afa: 6742 beqs 49b3e <IMFS_eval_token+0x184>
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
49afc: 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;
49afe: 2401 movel %d1,%d2
49b00: 0682 0000 0024 addil #36,%d2
if ( !terminal ) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
access_ok = rtems_filesystem_eval_path_check_access(
49b06: 302a 003c movew %a2@(60),%d0
49b0a: 2f00 movel %d0,%sp@-
49b0c: 302a 003a movew %a2@(58),%d0
49b10: 2f00 movel %d0,%sp@-
49b12: 2f2a 002e movel %a2@(46),%sp@-
49b16: 4878 0001 pea 1 <ADD>
49b1a: 2f0b movel %a3,%sp@-
49b1c: 4eb9 0004 a5aa jsr 4a5aa <rtems_filesystem_eval_path_check_access>
RTEMS_FS_PERMS_EXEC,
entry->st_mode,
entry->st_uid,
entry->st_gid
);
if ( access_ok ) {
49b22: 4fef 0014 lea %sp@(20),%sp
49b26: 4a00 tstb %d0
49b28: 670c beqs 49b36 <IMFS_eval_token+0x17c> <== NEVER TAKEN
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
49b2a: 2f02 movel %d2,%sp@-
49b2c: 2f0b movel %a3,%sp@-
49b2e: 4eb9 0004 3bd6 jsr 43bd6 <rtems_filesystem_eval_path_restart>
49b34: 508f addql #8,%sp
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
49b36: 7001 moveq #1,%d0
49b38: 602c bras 49b66 <IMFS_eval_token+0x1ac>
rtems_filesystem_eval_path_restart( ctx, fs_root_ptr );
}
}
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
49b3a: 7002 moveq #2,%d0
49b3c: 6028 bras 49b66 <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;
49b3e: 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;
49b42: 322c 0032 movew %a4@(50),%d1
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
49b46: 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;
49b4c: 5381 subql #1,%d1
49b4e: 3941 0032 movew %d1,%a4@(50)
++entry->reference_count;
49b52: 322a 0032 movew %a2@(50),%d1
49b56: 5281 addql #1,%d1
49b58: 3541 0032 movew %d1,%a2@(50)
currentloc->node_access = entry;
49b5c: 274a 0020 movel %a2,%a3@(32)
49b60: 2768 0004 0028 movel %a0@(4),%a3@(40)
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
}
}
return status;
}
49b66: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
49b6c: 4e5e unlk %fp <== NOT EXECUTED
00049b90 <IMFS_fchmod>:
int IMFS_fchmod(
const rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
49b90: 4e56 fff8 linkw %fp,#-8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
49b94: 206e 0008 moveal %fp@(8),%a0
int IMFS_fchmod(
const rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
49b98: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
49b9a: 2468 0008 moveal %a0@(8),%a2
int IMFS_fchmod(
const rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
49b9e: 2f02 movel %d2,%sp@-
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
49ba0: 4282 clrl %d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
49ba2: 4eb9 0004 a1a4 jsr 4a1a4 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
49ba8: 4281 clrl %d1
49baa: 3400 movew %d0,%d2
49bac: 322a 003a movew %a2@(58),%d1
49bb0: b282 cmpl %d2,%d1
49bb2: 6714 beqs 49bc8 <IMFS_fchmod+0x38>
49bb4: 4a40 tstw %d0
49bb6: 6710 beqs 49bc8 <IMFS_fchmod+0x38> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
49bb8: 4eb9 0004 cf98 jsr 4cf98 <__errno>
49bbe: 2040 moveal %d0,%a0
49bc0: 7001 moveq #1,%d0
49bc2: 2080 movel %d0,%a0@
49bc4: 70ff moveq #-1,%d0
49bc6: 6030 bras 49bf8 <IMFS_fchmod+0x68>
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
49bc8: 202a 002e movel %a2@(46),%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
49bcc: 222e 000c movel %fp@(12),%d1
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
49bd0: 0280 ffff f000 andil #-4096,%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
49bd6: 0281 0000 0fff andil #4095,%d1
49bdc: 8280 orl %d0,%d1
49bde: 2541 002e movel %d1,%a2@(46)
IMFS_update_ctime( jnode );
49be2: 42a7 clrl %sp@-
49be4: 486e fff8 pea %fp@(-8)
49be8: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
49bee: 256e fff8 0046 movel %fp@(-8),%a2@(70)
return 0;
49bf4: 508f addql #8,%sp
49bf6: 4280 clrl %d0
}
49bf8: 242e fff0 movel %fp@(-16),%d2
49bfc: 246e fff4 moveal %fp@(-12),%a2
49c00: 4e5e unlk %fp <== NOT EXECUTED
00042c60 <IMFS_fifo_write>:
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42c60: 4e56 fff8 linkw %fp,#-8
42c64: 206e 0008 moveal %fp@(8),%a0
42c68: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
42c6a: 2468 0018 moveal %a0@(24),%a2
static ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42c6e: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
42c70: 2f08 movel %a0,%sp@-
42c72: 2f2e 0010 movel %fp@(16),%sp@-
42c76: 2f2e 000c movel %fp@(12),%sp@-
42c7a: 2f2a 004e movel %a2@(78),%sp@-
42c7e: 4eb9 0004 c07e jsr 4c07e <pipe_write>
if (err > 0) {
42c84: 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);
42c88: 2400 movel %d0,%d2
if (err > 0) {
42c8a: 6f1c bles 42ca8 <IMFS_fifo_write+0x48>
IMFS_mtime_ctime_update(jnode);
42c8c: 42a7 clrl %sp@-
42c8e: 486e fff8 pea %fp@(-8)
42c92: 4eb9 0004 3c44 jsr 43c44 <gettimeofday>
42c98: 202e fff8 movel %fp@(-8),%d0
42c9c: 508f addql #8,%sp
42c9e: 2540 0042 movel %d0,%a2@(66)
42ca2: 2540 0046 movel %d0,%a2@(70)
42ca6: 6012 bras 42cba <IMFS_fifo_write+0x5a>
}
IMFS_FIFO_RETURN(err);
42ca8: 4a80 tstl %d0
42caa: 670e beqs 42cba <IMFS_fifo_write+0x5a> <== NEVER TAKEN
42cac: 4eb9 0004 ecec jsr 4ecec <__errno>
42cb2: 4482 negl %d2
42cb4: 2040 moveal %d0,%a0
42cb6: 2082 movel %d2,%a0@
42cb8: 74ff moveq #-1,%d2
}
42cba: 2002 movel %d2,%d0
42cbc: 242e fff0 movel %fp@(-16),%d2
42cc0: 246e fff4 moveal %fp@(-12),%a2
42cc4: 4e5e unlk %fp <== NOT EXECUTED
00049c04 <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
)
{
49c04: 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;
49c08: 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
)
{
49c0c: 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;
49c10: 2668 0024 moveal %a0@(36),%a3
49c14: 4878 0018 pea 18 <OPER2+0x4>
49c18: 240e movel %fp,%d2
49c1a: 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 );
49c20: 49f9 0004 25d0 lea 425d0 <IMFS_rmnod>,%a4
if ( result != 0 )
rtems_fatal_error_occurred( 0xdeadbeef );
IMFS_node_destroy( jnode );
49c26: 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;
49c2c: 2f0b movel %a3,%sp@-
49c2e: 2f02 movel %d2,%sp@-
49c30: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
jnode = (IMFS_jnode_t *)loc.node_access;
49c36: 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;
49c3a: 4fef 000c lea %sp@(12),%sp
49c3e: 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 );
49c42: 2642 moveal %d2,%a3
49c44: 6002 bras 49c48 <IMFS_fsunmount+0x44>
if ( IMFS_is_directory( jnode ) ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
49c46: 2440 moveal %d0,%a2
*/
temp_mt_entry->mt_fs_root->location.node_access = NULL;
do {
next = jnode->Parent;
49c48: 242a 0008 movel %a2@(8),%d2
49c4c: 206a 004a moveal %a2@(74),%a0
49c50: 2d68 0004 fff8 movel %a0@(4),%fp@(-8)
loc.node_access = (void *)jnode;
49c56: 2d4a fff0 movel %a2,%fp@(-16)
IMFS_Set_handlers( &loc );
if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {
49c5a: 4a90 tstl %a0@
49c5c: 660e bnes 49c6c <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 );
49c5e: 200a movel %a2,%d0
49c60: 0680 0000 0052 addil #82,%d0
49c66: b0aa 004e cmpl %a2@(78),%d0
49c6a: 6624 bnes 49c90 <IMFS_fsunmount+0x8c>
result = IMFS_rmnod( NULL, &loc );
49c6c: 2f0b movel %a3,%sp@-
49c6e: 42a7 clrl %sp@-
49c70: 4e94 jsr %a4@
if ( result != 0 )
49c72: 508f addql #8,%sp
49c74: 4a80 tstl %d0
49c76: 670c beqs 49c84 <IMFS_fsunmount+0x80> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
49c78: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
49c7e: 4eb9 0004 69f0 jsr 469f0 <rtems_fatal_error_occurred> <== NOT EXECUTED
IMFS_node_destroy( jnode );
49c84: 2f0a movel %a2,%sp@-
49c86: 4e95 jsr %a5@
jnode = next;
}
if ( jnode != NULL ) {
49c88: 588f addql #4,%sp
49c8a: 4a82 tstl %d2
49c8c: 671e beqs 49cac <IMFS_fsunmount+0xa8>
49c8e: 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;
49c90: 206a 004a moveal %a2@(74),%a0
if ( IMFS_is_directory( jnode ) ) {
49c94: 4a90 tstl %a0@
49c96: 66b0 bnes 49c48 <IMFS_fsunmount+0x44> <== NEVER TAKEN
49c98: 220a movel %a2,%d1
49c9a: 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;
49ca0: 202a 004e movel %a2@(78),%d0
if ( jnode_has_children( jnode ) )
49ca4: b280 cmpl %d0,%d1
49ca6: 67a0 beqs 49c48 <IMFS_fsunmount+0x44>
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
49ca8: 4a80 tstl %d0
49caa: 669a bnes 49c46 <IMFS_fsunmount+0x42> <== ALWAYS TAKEN
}
49cac: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5
49cb2: 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 e5c0 movel 5e5c0 <imfs_instance.6498>,%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 e5c0 movel %d0,5e5c0 <imfs_instance.6498>
memcpy(
421f4: 4eb9 0004 d7b8 jsr 4d7b8 <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 c68e pea 5c68e <rtems_termios_baud_table+0x10a>
42208: 2f2a 0008 movel %a2@(8),%sp@-
4220c: 2f0a movel %a2,%sp@-
4220e: 4eb9 0004 9868 jsr 49868 <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 c8ca movel #379082,%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 d69c movel 5d69c <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 cf98 jsr 4cf98 <__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 cf98 jsr 4cf98 <__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 e5bc movel %d0,5e5bc <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 15d8 moveal 615d8 <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 d9d8 jsr 4d9d8 <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 11bc jsr 511bc <__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
0004bdac <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4bdac: 4e56 0000 linkw %fp,#0
4bdb0: 2f0a movel %a2,%sp@-
4bdb2: 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 );
4bdb4: 4878 0001 pea 1 <ADD>
if ( *block_entry_ptr )
return 0;
4bdb8: 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 );
4bdba: 2f2e 000c movel %fp@(12),%sp@-
4bdbe: 2f2e 0008 movel %fp@(8),%sp@-
4bdc2: 4eb9 0004 ba6c jsr 4ba6c <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
4bdc8: 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 );
4bdcc: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
4bdce: 4a92 tstl %a2@
4bdd0: 6610 bnes 4bde2 <IMFS_memfile_addblock+0x36>
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
4bdd2: 4eb9 0004 ba48 jsr 4ba48 <memfile_alloc_block>
if ( !memory )
4bdd8: 4a80 tstl %d0
4bdda: 6704 beqs 4bde0 <IMFS_memfile_addblock+0x34> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
4bddc: 2480 movel %d0,%a2@
return 0;
4bdde: 6002 bras 4bde2 <IMFS_memfile_addblock+0x36>
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
4bde0: 7401 moveq #1,%d2 <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
4bde2: 2002 movel %d2,%d0
4bde4: 242e fff8 movel %fp@(-8),%d2
4bde8: 246e fffc moveal %fp@(-4),%a2
4bdec: 4e5e unlk %fp <== NOT EXECUTED
0004bf4c <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 )
4bf4c: 4280 clrl %d0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
4bf4e: 4e56 ffc8 linkw %fp,#-56
4bf52: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4bf56: 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 )
4bf5a: 2a79 0005 e5bc moveal 5e5bc <imfs_memfile_bytes_per_block>,%a5
4bf60: 2a0d movel %a5,%d5
4bf62: e48d lsrl #2,%d5
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
4bf64: 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 )
4bf68: 2805 movel %d5,%d4
4bf6a: 5284 addql #1,%d4
4bf6c: 4c05 4800 mulsl %d5,%d4
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
bool zero_fill,
off_t new_length
)
{
4bf70: 242e 0010 movel %fp@(16),%d2
4bf74: 262e 0014 movel %fp@(20),%d3
4bf78: 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 )
4bf7c: 5284 addql #1,%d4
4bf7e: 4c05 4800 mulsl %d5,%d4
4bf82: 2a0d movel %a5,%d5
4bf84: 5384 subql #1,%d4
4bf86: 4c05 4800 mulsl %d5,%d4
4bf8a: 2204 movel %d4,%d1
4bf8c: 2802 movel %d2,%d4
4bf8e: 2a03 movel %d3,%d5
4bf90: 9a81 subl %d1,%d5
4bf92: 9980 subxl %d0,%d4
4bf94: 6d10 blts 4bfa6 <IMFS_memfile_extend+0x5a>
rtems_set_errno_and_return_minus_one( EFBIG );
4bf96: 4eb9 0004 cf98 jsr 4cf98 <__errno>
4bf9c: 721b moveq #27,%d1
4bf9e: 2040 moveal %d0,%a0
4bfa0: 2081 movel %d1,%a0@
4bfa2: 6000 00c4 braw 4c068 <IMFS_memfile_extend+0x11c>
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
4bfa6: 282a 004e movel %a2@(78),%d4
4bfaa: 2a2a 0052 movel %a2@(82),%d5
4bfae: 2002 movel %d2,%d0
4bfb0: 2203 movel %d3,%d1
4bfb2: 9285 subl %d5,%d1
4bfb4: 9184 subxl %d4,%d0
4bfb6: 6f00 00e8 blew 4c0a0 <IMFS_memfile_extend+0x154>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4bfba: 49f9 0005 9654 lea 59654 <__divdi3>,%a4
4bfc0: 2e0d movel %a5,%d7
4bfc2: 5bc6 smi %d6
4bfc4: 49c6 extbl %d6
4bfc6: 2f07 movel %d7,%sp@-
4bfc8: 2f06 movel %d6,%sp@-
4bfca: 2f03 movel %d3,%sp@-
4bfcc: 2f02 movel %d2,%sp@-
4bfce: 4e94 jsr %a4@
4bfd0: 4fef 0010 lea %sp@(16),%sp
4bfd4: 2641 moveal %d1,%a3
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4bfd6: 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);
4bfd8: 2e3c 0004 d828 movel #317480,%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;
4bfde: 2f06 movel %d6,%sp@-
4bfe0: 2f05 movel %d5,%sp@-
4bfe2: 2f04 movel %d4,%sp@-
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
4bfe4: 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 =
4bfe6: 2a3c 0004 ba6c movel #309868,%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;
4bfec: 4e94 jsr %a4@
4bfee: 4fef 0010 lea %sp@(16),%sp
offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK;
4bff2: 200d movel %a5,%d0
4bff4: 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;
4bff8: 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++ ) {
4bffa: 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;
4bffc: 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 ) ) {
4bffe: 4bf9 0004 bdac lea 4bdac <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++ ) {
4c004: 6068 bras 4c06e <IMFS_memfile_extend+0x122>
if ( !IMFS_memfile_addblock( the_jnode, block ) ) {
4c006: 2f0c movel %a4,%sp@-
4c008: 2f0a movel %a2,%sp@-
4c00a: 4e95 jsr %a5@
4c00c: 508f addql #8,%sp
4c00e: 4a80 tstl %d0
4c010: 6640 bnes 4c052 <IMFS_memfile_extend+0x106> <== NEVER TAKEN
if ( zero_fill ) {
4c012: 4a2e fff3 tstb %fp@(-13)
4c016: 6754 beqs 4c06c <IMFS_memfile_extend+0x120>
size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset;
block_p *block_ptr =
4c018: 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;
4c01a: 2239 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%d1
4c020: 9284 subl %d4,%d1
block_p *block_ptr =
4c022: 2045 moveal %d5,%a0
4c024: 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;
4c026: 2d41 fff4 movel %d1,%fp@(-12)
block_p *block_ptr =
4c02a: 2f0a movel %a2,%sp@-
4c02c: 4e90 jsr %a0@
IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
memset( &(*block_ptr) [offset], 0, count);
4c02e: 2f2e fff4 movel %fp@(-12),%sp@-
4c032: 2040 moveal %d0,%a0
4c034: 42a7 clrl %sp@-
4c036: d890 addl %a0@,%d4
4c038: 2047 moveal %d7,%a0
4c03a: 2f04 movel %d4,%sp@-
offset = 0;
4c03c: 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);
4c03e: 4e90 jsr %a0@
4c040: 4fef 0018 lea %sp@(24),%sp
4c044: 6026 bras 4c06c <IMFS_memfile_extend+0x120>
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
4c046: 2f0c movel %a4,%sp@- <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
4c048: 538c subql #1,%a4 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4c04a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c04c: 4e93 jsr %a3@ <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
4c04e: 508f addql #8,%sp <== NOT EXECUTED
4c050: 6006 bras 4c058 <IMFS_memfile_extend+0x10c> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4c052: 47f9 0004 bf24 lea 4bf24 <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
memset( &(*block_ptr) [offset], 0, count);
offset = 0;
}
} else {
for ( ; block>=old_blocks ; block-- ) {
4c058: bc8c cmpl %a4,%d6 <== NOT EXECUTED
4c05a: 63ea blss 4c046 <IMFS_memfile_extend+0xfa> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4c05c: 4eb9 0004 cf98 jsr 4cf98 <__errno> <== NOT EXECUTED
4c062: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c064: 701c moveq #28,%d0 <== NOT EXECUTED
4c066: 2080 movel %d0,%a0@ <== NOT EXECUTED
4c068: 70ff moveq #-1,%d0
4c06a: 6036 bras 4c0a2 <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++ ) {
4c06c: 528c addql #1,%a4
4c06e: b7cc cmpal %a4,%a3
4c070: 6494 bccs 4c006 <IMFS_memfile_extend+0xba>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
4c072: 47f9 0004 2ae8 lea 42ae8 <gettimeofday>,%a3
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4c078: 2542 004e movel %d2,%a2@(78)
4c07c: 2543 0052 movel %d3,%a2@(82)
IMFS_update_ctime(the_jnode);
4c080: 240e movel %fp,%d2
4c082: 5182 subql #8,%d2
4c084: 42a7 clrl %sp@-
4c086: 2f02 movel %d2,%sp@-
4c088: 4e93 jsr %a3@
4c08a: 256e fff8 0046 movel %fp@(-8),%a2@(70)
IMFS_update_mtime(the_jnode);
4c090: 42a7 clrl %sp@-
4c092: 2f02 movel %d2,%sp@-
4c094: 4e93 jsr %a3@
4c096: 256e fff8 0042 movel %fp@(-8),%a2@(66)
return 0;
4c09c: 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;
4c0a0: 4280 clrl %d0
the_jnode->info.file.size = new_length;
IMFS_update_ctime(the_jnode);
IMFS_update_mtime(the_jnode);
return 0;
}
4c0a2: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4c0a8: 4e5e unlk %fp <== NOT EXECUTED
0004ba6c <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4ba6c: 4e56 fff0 linkw %fp,#-16
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4ba70: 2239 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%d1
4ba76: e489 lsrl #2,%d1
4ba78: 2001 movel %d1,%d0
4ba7a: 5380 subql #1,%d0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4ba7c: 48d7 041c moveml %d2-%d4/%a2,%sp@
4ba80: 246e 0008 moveal %fp@(8),%a2
4ba84: 242e 000c movel %fp@(12),%d2
4ba88: 206e 0010 moveal %fp@(16),%a0
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4ba8c: b082 cmpl %d2,%d0
4ba8e: 6538 bcss 4bac8 <IMFS_memfile_get_block_pointer+0x5c>
p = info->indirect;
4ba90: 226a 0056 moveal %a2@(86),%a1
if ( malloc_it ) {
4ba94: 4a88 tstl %a0
4ba96: 6724 beqs 4babc <IMFS_memfile_get_block_pointer+0x50>
if ( !p ) {
4ba98: 4a89 tstl %a1
4ba9a: 6614 bnes 4bab0 <IMFS_memfile_get_block_pointer+0x44>
p = memfile_alloc_block();
4ba9c: 4eb9 0004 ba48 jsr 4ba48 <memfile_alloc_block>
if ( !p )
4baa2: 4a80 tstl %d0
4baa4: 6606 bnes 4baac <IMFS_memfile_get_block_pointer+0x40><== ALWAYS TAKEN
return 0;
4baa6: 91c8 subal %a0,%a0 <== NOT EXECUTED
4baa8: 6000 00fc braw 4bba6 <IMFS_memfile_get_block_pointer+0x13a><== NOT EXECUTED
info->indirect = p;
4baac: 2540 0056 movel %d0,%a2@(86)
}
return &info->indirect[ my_block ];
4bab0: 206a 0056 moveal %a2@(86),%a0
4bab4: e58a lsll #2,%d2
4bab6: d1c2 addal %d2,%a0
4bab8: 6000 00ec braw 4bba6 <IMFS_memfile_get_block_pointer+0x13a>
}
if ( !p )
4babc: 4a89 tstl %a1
4babe: 67e6 beqs 4baa6 <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
4bac0: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0
4bac4: 6000 00e0 braw 4bba6 <IMFS_memfile_get_block_pointer+0x13a>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4bac8: 2001 movel %d1,%d0
4baca: 5280 addql #1,%d0
4bacc: 4c01 0800 mulsl %d1,%d0
4bad0: 2240 moveal %d0,%a1
4bad2: 5389 subql #1,%a1
4bad4: b3c2 cmpal %d2,%a1
4bad6: 653a bcss 4bb12 <IMFS_memfile_get_block_pointer+0xa6>
my_block -= FIRST_DOUBLY_INDIRECT;
4bad8: 9481 subl %d1,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4bada: 202a 005a movel %a2@(90),%d0
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4bade: 4c41 2003 remul %d1,%d3,%d2
4bae2: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
4bae6: 4a88 tstl %a0
4bae8: 671a beqs 4bb04 <IMFS_memfile_get_block_pointer+0x98>
if ( !p ) {
4baea: 4a80 tstl %d0
4baec: 660e bnes 4bafc <IMFS_memfile_get_block_pointer+0x90>
p = memfile_alloc_block();
4baee: 4eb9 0004 ba48 jsr 4ba48 <memfile_alloc_block>
if ( !p )
4baf4: 4a80 tstl %d0
4baf6: 67ae beqs 4baa6 <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
4baf8: 2540 005a movel %d0,%a2@(90)
}
p1 = (block_p *)p[ doubly ];
4bafc: 2040 moveal %d0,%a0
4bafe: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2
4bb02: 6068 bras 4bb6c <IMFS_memfile_get_block_pointer+0x100>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
4bb04: 4a80 tstl %d0
4bb06: 679e beqs 4baa6 <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
4bb08: 2240 moveal %d0,%a1
4bb0a: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
4bb0e: 6000 008c braw 4bb9c <IMFS_memfile_get_block_pointer+0x130>
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4bb12: 2600 movel %d0,%d3
4bb14: 5283 addql #1,%d3
4bb16: 4c01 3800 mulsl %d1,%d3
4bb1a: 5383 subql #1,%d3
4bb1c: b682 cmpl %d2,%d3
4bb1e: 6586 bcss 4baa6 <IMFS_memfile_get_block_pointer+0x3a><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
4bb20: 9480 subl %d0,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4bb22: 4c41 2003 remul %d1,%d3,%d2
4bb26: 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;
4bb2a: 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;
4bb2e: 4c41 2004 remul %d1,%d4,%d2
4bb32: 4c41 2002 remul %d1,%d2,%d2
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
4bb36: 4a88 tstl %a0
4bb38: 674c beqs 4bb86 <IMFS_memfile_get_block_pointer+0x11a>
if ( !p ) {
4bb3a: 4a80 tstl %d0
4bb3c: 6610 bnes 4bb4e <IMFS_memfile_get_block_pointer+0xe2>
p = memfile_alloc_block();
4bb3e: 4eb9 0004 ba48 jsr 4ba48 <memfile_alloc_block>
if ( !p )
4bb44: 4a80 tstl %d0
4bb46: 6700 ff5e beqw 4baa6 <IMFS_memfile_get_block_pointer+0x3a>
return 0;
info->triply_indirect = p;
4bb4a: 2540 005e movel %d0,%a2@(94)
}
p1 = (block_p *) p[ triply ];
4bb4e: 2040 moveal %d0,%a0
4bb50: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2
4bb54: 2012 movel %a2@,%d0
if ( !p1 ) {
4bb56: 660e bnes 4bb66 <IMFS_memfile_get_block_pointer+0xfa>
p1 = memfile_alloc_block();
4bb58: 4eb9 0004 ba48 jsr 4ba48 <memfile_alloc_block>
if ( !p1 )
4bb5e: 4a80 tstl %d0
4bb60: 6700 ff44 beqw 4baa6 <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p[ triply ] = (block_p) p1;
4bb64: 2480 movel %d0,%a2@
}
p2 = (block_p *)p1[ doubly ];
4bb66: 2240 moveal %d0,%a1
4bb68: 45f1 4c00 lea %a1@(00000000,%d4:l:4),%a2
4bb6c: 2012 movel %a2@,%d0
if ( !p2 ) {
4bb6e: 660e bnes 4bb7e <IMFS_memfile_get_block_pointer+0x112>
p2 = memfile_alloc_block();
4bb70: 4eb9 0004 ba48 jsr 4ba48 <memfile_alloc_block>
if ( !p2 )
4bb76: 4a80 tstl %d0
4bb78: 6700 ff2c beqw 4baa6 <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p1[ doubly ] = (block_p) p2;
4bb7c: 2480 movel %d0,%a2@
}
return (block_p *)&p2[ singly ];
4bb7e: 2240 moveal %d0,%a1
4bb80: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
4bb84: 6020 bras 4bba6 <IMFS_memfile_get_block_pointer+0x13a>
}
if ( !p )
4bb86: 4a80 tstl %d0
4bb88: 6700 ff1c beqw 4baa6 <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p1 = (block_p *) p[ triply ];
4bb8c: 2240 moveal %d0,%a1
4bb8e: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p1 )
4bb92: 4a88 tstl %a0
4bb94: 6700 ff10 beqw 4baa6 <IMFS_memfile_get_block_pointer+0x3a>
return 0;
p2 = (block_p *)p1[ doubly ];
4bb98: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0
if ( !p2 )
4bb9c: 4a88 tstl %a0
4bb9e: 6700 ff06 beqw 4baa6 <IMFS_memfile_get_block_pointer+0x3a>
return 0;
return (block_p *)&p2[ singly ];
4bba2: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4bba6: 2008 movel %a0,%d0
4bba8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4bbae: 4e5e unlk %fp <== NOT EXECUTED
0004bbb2 <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 ) {
4bbb2: 7005 moveq #5,%d0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4bbb4: 4e56 ffd0 linkw %fp,#-48
4bbb8: 226e 0018 moveal %fp@(24),%a1
4bbbc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4bbc0: 246e 0008 moveal %fp@(8),%a2
4bbc4: 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;
4bbc8: 206a 004a moveal %a2@(74),%a0
4bbcc: 242e 000c movel %fp@(12),%d2
4bbd0: 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 ) {
4bbd4: b090 cmpl %a0@,%d0
4bbd6: 6654 bnes 4bc2c <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))
4bbd8: 2a49 moveal %a1,%a5
4bbda: 99cc subal %a4,%a4
4bbdc: 282a 004e movel %a2@(78),%d4
4bbe0: 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;
4bbe4: 206a 0056 moveal %a2@(86),%a0
if (my_length > (the_jnode->info.linearfile.size - start))
4bbe8: 2004 movel %d4,%d0
4bbea: 2205 movel %d5,%d1
4bbec: 2c0c movel %a4,%d6
4bbee: 2e0d movel %a5,%d7
4bbf0: 9283 subl %d3,%d1
4bbf2: 9182 subxl %d2,%d0
4bbf4: 9e81 subl %d1,%d7
4bbf6: 9d80 subxl %d0,%d6
4bbf8: 6f06 bles 4bc00 <IMFS_memfile_read+0x4e> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
4bbfa: 2805 movel %d5,%d4
4bbfc: 9883 subl %d3,%d4
4bbfe: 6002 bras 4bc02 <IMFS_memfile_read+0x50>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4bc00: 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);
4bc02: 2f04 movel %d4,%sp@-
4bc04: 4870 3800 pea %a0@(00000000,%d3:l)
4bc08: 2f0b movel %a3,%sp@-
4bc0a: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
IMFS_update_atime( the_jnode );
4bc10: 42a7 clrl %sp@-
4bc12: 486e fff8 pea %fp@(-8)
4bc16: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4bc1c: 256e fff8 003e movel %fp@(-8),%a2@(62)
return my_length;
4bc22: 2004 movel %d4,%d0
4bc24: 4fef 0014 lea %sp@(20),%sp
4bc28: 6000 012c braw 4bd56 <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;
4bc2c: 2c09 movel %a1,%d6
4bc2e: dc83 addl %d3,%d6
if ( last_byte > the_jnode->info.file.size )
4bc30: 2a06 movel %d6,%d5
4bc32: 4284 clrl %d4
4bc34: 202a 004e movel %a2@(78),%d0
4bc38: 222a 0052 movel %a2@(82),%d1
4bc3c: 2c04 movel %d4,%d6
4bc3e: 2e05 movel %d5,%d7
4bc40: 9e81 subl %d1,%d7
4bc42: 9d80 subxl %d0,%d6
4bc44: 6f06 bles 4bc4c <IMFS_memfile_read+0x9a>
my_length = the_jnode->info.file.size - start;
4bc46: 2c01 movel %d1,%d6
4bc48: 9c83 subl %d3,%d6
4bc4a: 6002 bras 4bc4e <IMFS_memfile_read+0x9c>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
4bc4c: 2c09 movel %a1,%d6
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4bc4e: 2879 0005 e5bc moveal 5e5bc <imfs_memfile_bytes_per_block>,%a4
4bc54: 2a0c movel %a4,%d5
4bc56: 5bc4 smi %d4
4bc58: 49c4 extbl %d4
4bc5a: 2f05 movel %d5,%sp@-
4bc5c: 2f04 movel %d4,%sp@-
4bc5e: 2f03 movel %d3,%sp@-
4bc60: 2f02 movel %d2,%sp@-
4bc62: 4eb9 0005 9ab4 jsr 59ab4 <__moddi3>
4bc68: 4fef 0010 lea %sp@(16),%sp
4bc6c: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4bc6e: 2f05 movel %d5,%sp@-
4bc70: 2f04 movel %d4,%sp@-
4bc72: 2f03 movel %d3,%sp@-
4bc74: 2f02 movel %d2,%sp@-
4bc76: 4eb9 0005 9654 jsr 59654 <__divdi3>
4bc7c: 4fef 0010 lea %sp@(16),%sp
4bc80: 2601 movel %d1,%d3
if ( start_offset ) {
4bc82: 4a87 tstl %d7
4bc84: 673c beqs 4bcc2 <IMFS_memfile_read+0x110>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4bc86: 99c7 subal %d7,%a4
4bc88: 2406 movel %d6,%d2
4bc8a: b9c6 cmpal %d6,%a4
4bc8c: 6402 bccs 4bc90 <IMFS_memfile_read+0xde>
4bc8e: 240c movel %a4,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4bc90: 42a7 clrl %sp@-
4bc92: 2f03 movel %d3,%sp@-
4bc94: 2f0a movel %a2,%sp@-
4bc96: 4eb9 0004 ba6c jsr 4ba6c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4bc9c: 4fef 000c lea %sp@(12),%sp
4bca0: 4a80 tstl %d0
4bca2: 6700 00b0 beqw 4bd54 <IMFS_memfile_read+0x1a2>
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4bca6: 2f02 movel %d2,%sp@-
4bca8: 2040 moveal %d0,%a0
4bcaa: de90 addl %a0@,%d7
dest += to_copy;
block++;
4bcac: 5283 addql #1,%d3
my_length -= to_copy;
4bcae: 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 );
4bcb0: 2f07 movel %d7,%sp@-
4bcb2: 2f0b movel %a3,%sp@-
dest += to_copy;
4bcb4: 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 );
4bcb6: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4bcbc: 4fef 000c lea %sp@(12),%sp
4bcc0: 6002 bras 4bcc4 <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;
4bcc2: 4282 clrl %d2
}
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
4bcc4: 2839 0005 e5bc movel 5e5bc <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(
4bcca: 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 );
4bccc: 49f9 0004 ba6c lea 4ba6c <IMFS_memfile_get_block_pointer>,%a4
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4bcd2: 4bf9 0004 d7b8 lea 4d7b8 <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 ) {
4bcd8: 6026 bras 4bd00 <IMFS_memfile_read+0x14e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4bcda: 42a7 clrl %sp@-
4bcdc: 2f03 movel %d3,%sp@-
4bcde: 2f0a movel %a2,%sp@-
4bce0: 4e94 jsr %a4@
if ( !block_ptr )
4bce2: 4fef 000c lea %sp@(12),%sp
4bce6: 4a80 tstl %d0
4bce8: 6602 bnes 4bcec <IMFS_memfile_read+0x13a> <== ALWAYS TAKEN
4bcea: 6038 bras 4bd24 <IMFS_memfile_read+0x172> <== NOT EXECUTED
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4bcec: 2040 moveal %d0,%a0
dest += to_copy;
block++;
4bcee: 5283 addql #1,%d3
my_length -= to_copy;
4bcf0: 9c84 subl %d4,%d6
copied += to_copy;
4bcf2: 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 );
4bcf4: 2f04 movel %d4,%sp@-
4bcf6: 2f10 movel %a0@,%sp@-
4bcf8: 2f05 movel %d5,%sp@-
4bcfa: 4e95 jsr %a5@
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4bcfc: 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(
4bd00: 2a0b movel %a3,%d5
4bd02: 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 ) {
4bd04: bcb9 0005 e5bc cmpl 5e5bc <imfs_memfile_bytes_per_block>,%d6
4bd0a: 64ce bccs 4bcda <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 ) {
4bd0c: 4a86 tstl %d6
4bd0e: 672c beqs 4bd3c <IMFS_memfile_read+0x18a>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4bd10: 42a7 clrl %sp@-
4bd12: 2f03 movel %d3,%sp@-
4bd14: 2f0a movel %a2,%sp@-
4bd16: 4eb9 0004 ba6c jsr 4ba6c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4bd1c: 4fef 000c lea %sp@(12),%sp
4bd20: 4a80 tstl %d0
4bd22: 6604 bnes 4bd28 <IMFS_memfile_read+0x176> <== ALWAYS TAKEN
return copied;
4bd24: 2002 movel %d2,%d0 <== NOT EXECUTED
4bd26: 602e bras 4bd56 <IMFS_memfile_read+0x1a4> <== NOT EXECUTED
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4bd28: 2040 moveal %d0,%a0
copied += my_length;
4bd2a: 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 );
4bd2c: 2f06 movel %d6,%sp@-
4bd2e: 2f10 movel %a0@,%sp@-
4bd30: 2f05 movel %d5,%sp@-
4bd32: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
copied += my_length;
4bd38: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4bd3c: 42a7 clrl %sp@-
4bd3e: 486e fff8 pea %fp@(-8)
4bd42: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4bd48: 256e fff8 003e movel %fp@(-8),%a2@(62)
return copied;
4bd4e: 2002 movel %d2,%d0
4bd50: 508f addql #8,%sp
4bd52: 6002 bras 4bd56 <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;
4bd54: 4280 clrl %d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4bd56: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4bd5c: 4e5e unlk %fp <== NOT EXECUTED
0004be4e <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4be4e: 4e56 ffe4 linkw %fp,#-28
4be52: 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;
4be56: 2439 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%d2
4be5c: 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
)
{
4be5e: 246e 0008 moveal %fp@(8),%a2
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
4be62: 4aaa 0056 tstl %a2@(86)
4be66: 670c beqs 4be74 <IMFS_memfile_remove+0x26>
memfile_free_blocks_in_table( &info->indirect, to_free );
4be68: 2f02 movel %d2,%sp@-
4be6a: 486a 0056 pea %a2@(86)
4be6e: 4eba ff9a jsr %pc@(4be0a <memfile_free_blocks_in_table>)
4be72: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4be74: 4aaa 005a tstl %a2@(90)
4be78: 661c bnes 4be96 <IMFS_memfile_remove+0x48>
4be7a: 6038 bras 4beb4 <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(
4be7c: 2003 movel %d3,%d0
4be7e: 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] ) {
4be80: 206a 005a moveal %a2@(90),%a0
4be84: d1c0 addal %d0,%a0
4be86: 4a90 tstl %a0@
4be88: 6708 beqs 4be92 <IMFS_memfile_remove+0x44> <== NEVER TAKEN
memfile_free_blocks_in_table(
4be8a: 2f02 movel %d2,%sp@-
4be8c: 2f08 movel %a0,%sp@-
4be8e: 4e93 jsr %a3@
4be90: 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++ ) {
4be92: 5283 addql #1,%d3
4be94: 6006 bras 4be9c <IMFS_memfile_remove+0x4e>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
4be96: 4283 clrl %d3
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
4be98: 47fa ff70 lea %pc@(4be0a <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++ ) {
4be9c: 2039 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%d0
4bea2: e488 lsrl #2,%d0
4bea4: b083 cmpl %d3,%d0
4bea6: 62d4 bhis 4be7c <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 );
4bea8: 2f02 movel %d2,%sp@-
4beaa: 486a 005a pea %a2@(90)
4beae: 4eba ff5a jsr %pc@(4be0a <memfile_free_blocks_in_table>)
4beb2: 508f addql #8,%sp
}
if ( info->triply_indirect ) {
4beb4: 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);
4beb6: 47fa ff52 lea %pc@(4be0a <memfile_free_blocks_in_table>),%a3
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
4beba: 4aaa 005e tstl %a2@(94)
4bebe: 6640 bnes 4bf00 <IMFS_memfile_remove+0xb2>
4bec0: 6056 bras 4bf18 <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(
4bec2: 2c03 movel %d3,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4bec4: 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(
4bec8: e58e lsll #2,%d6
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4beca: 2a30 6800 movel %a0@(00000000,%d6:l),%d5
if ( !p ) /* ensure we have a valid pointer */
4bece: 673c beqs 4bf0c <IMFS_memfile_remove+0xbe> <== NEVER TAKEN
4bed0: 4284 clrl %d4
4bed2: 6012 bras 4bee6 <IMFS_memfile_remove+0x98>
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
4bed4: 2045 moveal %d5,%a0
4bed6: 5885 addql #4,%d5
4bed8: 4a90 tstl %a0@
4beda: 6708 beqs 4bee4 <IMFS_memfile_remove+0x96> <== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4bedc: 2f02 movel %d2,%sp@-
4bede: 2f08 movel %a0,%sp@-
4bee0: 4e93 jsr %a3@
4bee2: 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++ ) {
4bee4: 5284 addql #1,%d4
4bee6: 2039 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%d0
4beec: e488 lsrl #2,%d0
4beee: b084 cmpl %d4,%d0
4bef0: 62e2 bhis 4bed4 <IMFS_memfile_remove+0x86>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4bef2: 2f02 movel %d2,%sp@-
4bef4: 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++ ) {
4bef8: 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(
4befa: 2f06 movel %d6,%sp@-
4befc: 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++ ) {
4befe: 508f addql #8,%sp
4bf00: 2039 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%d0
4bf06: e488 lsrl #2,%d0
4bf08: b083 cmpl %d3,%d0
4bf0a: 62b6 bhis 4bec2 <IMFS_memfile_remove+0x74>
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4bf0c: 2f02 movel %d2,%sp@-
4bf0e: 486a 005e pea %a2@(94)
4bf12: 4eba fef6 jsr %pc@(4be0a <memfile_free_blocks_in_table>)
4bf16: 508f addql #8,%sp
(block_p **)&info->triply_indirect, to_free );
}
return the_jnode;
}
4bf18: 200a movel %a2,%d0
4bf1a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4bf20: 4e5e unlk %fp <== NOT EXECUTED
0004bf24 <IMFS_memfile_remove_block>:
*/
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4bf24: 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 );
4bf28: 42a7 clrl %sp@- <== NOT EXECUTED
4bf2a: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4bf2e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4bf32: 4eb9 0004 ba6c jsr 4ba6c <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
IMFS_assert( block_ptr );
ptr = *block_ptr;
4bf38: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bf3a: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
4bf3c: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
4bf3e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4bf40: 4eb9 0004 bdf0 jsr 4bdf0 <memfile_free_block> <== NOT EXECUTED
return 1;
}
4bf46: 7001 moveq #1,%d0 <== NOT EXECUTED
4bf48: 4e5e unlk %fp <== NOT EXECUTED
0004c0ac <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 ) {
4c0ac: 4280 clrl %d0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4c0ae: 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;
4c0b2: 206e 0010 moveal %fp@(16),%a0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4c0b6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4c0ba: 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;
4c0be: d1c6 addal %d6,%a0
if ( last_byte > the_jnode->info.file.size ) {
4c0c0: 2208 movel %a0,%d1
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4c0c2: 246e 0008 moveal %fp@(8),%a2
4c0c6: 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 ) {
4c0ca: 282a 004e movel %a2@(78),%d4
4c0ce: 2a2a 0052 movel %a2@(82),%d5
4c0d2: 2400 movel %d0,%d2
4c0d4: 2601 movel %d1,%d3
4c0d6: 9685 subl %d5,%d3
4c0d8: 9584 subxl %d4,%d2
4c0da: 6e44 bgts 4c120 <IMFS_memfile_write+0x74>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4c0dc: 2879 0005 e5bc moveal 5e5bc <imfs_memfile_bytes_per_block>,%a4
4c0e2: 2a0c movel %a4,%d5
4c0e4: 5bc4 smi %d4
4c0e6: 49c4 extbl %d4
4c0e8: 2f05 movel %d5,%sp@-
4c0ea: 2f04 movel %d4,%sp@-
4c0ec: 2f2e 0010 movel %fp@(16),%sp@-
4c0f0: 2f2e 000c movel %fp@(12),%sp@-
4c0f4: 4eb9 0005 9ab4 jsr 59ab4 <__moddi3>
4c0fa: 4fef 0010 lea %sp@(16),%sp
4c0fe: 2641 moveal %d1,%a3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4c100: 2f05 movel %d5,%sp@-
4c102: 2f04 movel %d4,%sp@-
4c104: 2f2e 0010 movel %fp@(16),%sp@-
4c108: 2f2e 000c movel %fp@(12),%sp@-
4c10c: 4eb9 0005 9654 jsr 59654 <__divdi3>
4c112: 4fef 0010 lea %sp@(16),%sp
4c116: 2601 movel %d1,%d3
if ( start_offset ) {
4c118: 4a8b tstl %a3
4c11a: 6632 bnes 4c14e <IMFS_memfile_write+0xa2>
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
if ( status )
return status;
}
copied = 0;
4c11c: 4282 clrl %d2
4c11e: 6068 bras 4c188 <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 );
4c120: 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;
4c122: b8ae 000c cmpl %fp@(12),%d4
4c126: 6608 bnes 4c130 <IMFS_memfile_write+0x84> <== NEVER TAKEN
4c128: baae 0010 cmpl %fp@(16),%d5
4c12c: 55c4 scs %d4
4c12e: 6002 bras 4c132 <IMFS_memfile_write+0x86>
4c130: 5dc4 slt %d4 <== NOT EXECUTED
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
4c132: 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;
4c134: 49c4 extbl %d4
status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte );
4c136: 4484 negl %d4
4c138: 2f04 movel %d4,%sp@-
4c13a: 2f0a movel %a2,%sp@-
4c13c: 4eb9 0004 bf4c jsr 4bf4c <IMFS_memfile_extend>
if ( status )
4c142: 4fef 0010 lea %sp@(16),%sp
4c146: 4a80 tstl %d0
4c148: 6792 beqs 4c0dc <IMFS_memfile_write+0x30>
4c14a: 6000 00d0 braw 4c21c <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;
4c14e: 240c movel %a4,%d2
4c150: 948b subl %a3,%d2
4c152: bc82 cmpl %d2,%d6
4c154: 6402 bccs 4c158 <IMFS_memfile_write+0xac>
4c156: 2406 movel %d6,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c158: 42a7 clrl %sp@-
4c15a: 2f03 movel %d3,%sp@-
4c15c: 2f0a movel %a2,%sp@-
4c15e: 4eb9 0004 ba6c jsr 4ba6c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4c164: 4fef 000c lea %sp@(12),%sp
4c168: 4a80 tstl %d0
4c16a: 6700 00aa beqw 4c216 <IMFS_memfile_write+0x16a>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4c16e: 2f02 movel %d2,%sp@-
4c170: 2040 moveal %d0,%a0
src += to_copy;
block++;
4c172: 5283 addql #1,%d3
my_length -= to_copy;
4c174: 9c82 subl %d2,%d6
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4c176: 2f07 movel %d7,%sp@-
4c178: d7d0 addal %a0@,%a3
src += to_copy;
4c17a: de82 addl %d2,%d7
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4c17c: 2f0b movel %a3,%sp@-
4c17e: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4c184: 4fef 000c lea %sp@(12),%sp
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
4c188: 2839 0005 e5bc movel 5e5bc <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(
4c18e: 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 );
4c190: 47f9 0004 ba6c lea 4ba6c <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 );
4c196: 49f9 0004 d7b8 lea 4d7b8 <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 ) {
4c19c: 6024 bras 4c1c2 <IMFS_memfile_write+0x116>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c19e: 42a7 clrl %sp@-
4c1a0: 2f03 movel %d3,%sp@-
4c1a2: 2f0a movel %a2,%sp@-
4c1a4: 4e93 jsr %a3@
if ( !block_ptr )
4c1a6: 4fef 000c lea %sp@(12),%sp
4c1aa: 4a80 tstl %d0
4c1ac: 676c beqs 4c21a <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 );
4c1ae: 2f04 movel %d4,%sp@-
4c1b0: 2040 moveal %d0,%a0
src += to_copy;
block++;
4c1b2: 5283 addql #1,%d3
my_length -= to_copy;
4c1b4: 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(
4c1b6: 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 );
4c1b8: 2f05 movel %d5,%sp@-
4c1ba: 2f10 movel %a0@,%sp@-
4c1bc: 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(
4c1be: 4fef 000c lea %sp@(12),%sp
4c1c2: 2a07 movel %d7,%d5
4c1c4: 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 ) {
4c1c6: bcb9 0005 e5bc cmpl 5e5bc <imfs_memfile_bytes_per_block>,%d6
4c1cc: 64d0 bccs 4c19e <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 ) {
4c1ce: 4a86 tstl %d6
4c1d0: 6728 beqs 4c1fa <IMFS_memfile_write+0x14e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4c1d2: 42a7 clrl %sp@-
4c1d4: 2f03 movel %d3,%sp@-
4c1d6: 2f0a movel %a2,%sp@-
4c1d8: 4eb9 0004 ba6c jsr 4ba6c <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4c1de: 4fef 000c lea %sp@(12),%sp
4c1e2: 4a80 tstl %d0
4c1e4: 6734 beqs 4c21a <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 );
4c1e6: 2f06 movel %d6,%sp@-
4c1e8: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4c1ea: 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 );
4c1ec: 2f05 movel %d5,%sp@-
4c1ee: 2f10 movel %a0@,%sp@-
4c1f0: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
my_length = 0;
copied += to_copy;
4c1f6: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4c1fa: 42a7 clrl %sp@-
4c1fc: 486e fff8 pea %fp@(-8)
4c200: 4eb9 0004 2ae8 jsr 42ae8 <gettimeofday>
4c206: 202e fff8 movel %fp@(-8),%d0
return copied;
4c20a: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4c20c: 2540 0042 movel %d0,%a2@(66)
4c210: 2540 0046 movel %d0,%a2@(70)
4c214: 6004 bras 4c21a <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;
4c216: 4280 clrl %d0 <== NOT EXECUTED
4c218: 6002 bras 4c21c <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 )
4c21a: 2002 movel %d2,%d0
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4c21c: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4
4c222: 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 993c jsr 4993c <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 cf98 jsr 4cf98 <__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 cf98 jsr 4cf98 <__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
00049d6a <IMFS_node_remove_directory>:
}
static IMFS_jnode_t *IMFS_node_remove_directory(
IMFS_jnode_t *node
)
{
49d6a: 4e56 0000 linkw %fp,#0
49d6e: 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 );
49d72: 2200 movel %d0,%d1
49d74: 0681 0000 0052 addil #82,%d1
if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) {
49d7a: 2040 moveal %d0,%a0
49d7c: b2a8 004e cmpl %a0@(78),%d1
49d80: 670e beqs 49d90 <IMFS_node_remove_directory+0x26>
errno = ENOTEMPTY;
49d82: 4eb9 0004 cf98 jsr 4cf98 <__errno>
49d88: 725a moveq #90,%d1
49d8a: 2040 moveal %d0,%a0
49d8c: 2081 movel %d1,%a0@
49d8e: 6014 bras 49da4 <IMFS_node_remove_directory+0x3a>
node = NULL;
} else if ( IMFS_is_mount_point( node ) ) {
49d90: 2040 moveal %d0,%a0
49d92: 4aa8 005a tstl %a0@(90)
49d96: 670e beqs 49da6 <IMFS_node_remove_directory+0x3c><== ALWAYS TAKEN
errno = EBUSY;
49d98: 4eb9 0004 cf98 jsr 4cf98 <__errno> <== NOT EXECUTED
49d9e: 2040 moveal %d0,%a0 <== NOT EXECUTED
49da0: 7010 moveq #16,%d0 <== NOT EXECUTED
49da2: 2080 movel %d0,%a0@ <== NOT EXECUTED
49da4: 4280 clrl %d0
node = NULL;
}
return node;
}
49da6: 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 d7b8 jsr 4d7b8 <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 cf98 jsr 4cf98 <__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 cf98 jsr 4cf98 <__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
...
00049cd4 <IMFS_stat_device>:
static int IMFS_stat_device(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49cd4: 4e56 0000 linkw %fp,#0
49cd8: 226e 0008 moveal %fp@(8),%a1
49cdc: 2f0a movel %a2,%sp@-
const IMFS_jnode_t *node = loc->node_access;
49cde: 2469 0008 moveal %a1@(8),%a2
static int IMFS_stat_device(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49ce2: 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 );
49ce6: 202a 0052 movel %a2@(82),%d0
49cea: 216a 004e 0016 movel %a2@(78),%a0@(22)
return IMFS_stat( loc, buf );
}
49cf0: 245f moveal %sp@+,%a2
49cf2: 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 );
49cf4: 2140 001a movel %d0,%a0@(26)
return IMFS_stat( loc, buf );
49cf8: 4ef9 0004 9f0c jmp 49f0c <IMFS_stat>
...
00049ed4 <IMFS_stat_file>:
static int IMFS_stat_file(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49ed4: 4e56 0000 linkw %fp,#0
49ed8: 226e 0008 moveal %fp@(8),%a1
49edc: 2f0a movel %a2,%sp@-
const IMFS_jnode_t *node = loc->node_access;
buf->st_size = node->info.file.size;
49ede: 2469 0008 moveal %a1@(8),%a2
static int IMFS_stat_file(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
49ee2: 206e 000c moveal %fp@(12),%a0
const IMFS_jnode_t *node = loc->node_access;
buf->st_size = node->info.file.size;
49ee6: 202a 004e movel %a2@(78),%d0
49eea: 222a 0052 movel %a2@(82),%d1
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
49eee: 45f9 0005 d69c lea 5d69c <imfs_rq_memfile_bytes_per_block>,%a2
49ef4: 2152 003e movel %a2@,%a0@(62)
return IMFS_stat( loc, buf );
}
49ef8: 245f moveal %sp@+,%a2
49efa: 4e5e unlk %fp
struct stat *buf
)
{
const IMFS_jnode_t *node = loc->node_access;
buf->st_size = node->info.file.size;
49efc: 2140 001e movel %d0,%a0@(30)
49f00: 2141 0022 movel %d1,%a0@(34)
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return IMFS_stat( loc, buf );
49f04: 4ef9 0004 9f0c jmp 49f0c <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 cf98 jsr 4cf98 <__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 cf98 jsr 4cf98 <__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 d65c movel 5d65c <RTEMS_Malloc_Heap>,%d3
if ( !rtems_configuration_get_unified_work_area() ) {
42cae: 4a39 0005 b885 tstb 5b885 <Configuration+0x31>
42cb4: 664a bnes 42d00 <RTEMS_Malloc_Initialize+0x60>
42cb6: 246e 0008 moveal %fp@(8),%a2
42cba: 4282 clrl %d2
42cbc: 47f9 0004 735c lea 4735c <_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 735c cmpal #291676,%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 7550 jsr 47550 <_Internal_error_Occurred>
}
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
42d00: 2079 0005 dd90 moveal 5dd90 <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 edcc movel 5edcc <rtems_malloc_statistics>,%d2
42d14: 2f03 movel %d3,%sp@-
42d16: 4eb9 0004 7d9c jsr 47d9c <_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 edcc movel %d0,5edcc <rtems_malloc_statistics>
}
42d2c: 4e5e unlk %fp <== NOT EXECUTED
0005cef0 <Stack_check_Dump_threads_usage>:
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
5cef0: 70ff moveq #-1,%d0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
static void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
5cef2: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED
5cef6: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
5cefa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
5cefe: b08a cmpl %a2,%d0 <== NOT EXECUTED
5cf00: 6616 bnes 5cf18 <Stack_check_Dump_threads_usage+0x28><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
5cf02: 4ab9 0009 7eb4 tstl 97eb4 <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED
5cf08: 6700 00fe beqw 5d008 <Stack_check_Dump_threads_usage+0x118><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
5cf0c: 47f9 0009 7eb0 lea 97eb0 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED
the_thread = 0;
current = 0;
5cf12: 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;
5cf14: 95ca subal %a2,%a2 <== NOT EXECUTED
5cf16: 6008 bras 5cf20 <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 );
5cf18: 282a 00ee movel %a2@(238),%d4 <== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
5cf1c: 47ea 00ae lea %a2@(174),%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);
5cf20: 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++)
5cf22: 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);
5cf24: 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);
5cf2a: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
5cf2e: 2408 movel %a0,%d2 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
5cf30: 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);
5cf34: 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++)
5cf3a: c083 andl %d3,%d0 <== NOT EXECUTED
5cf3c: d088 addl %a0,%d0 <== NOT EXECUTED
5cf3e: 600c bras 5cf4c <Stack_check_Dump_threads_usage+0x5c><== NOT EXECUTED
if (*base != U32_PATTERN)
5cf40: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED
5cf46: b290 cmpl %a0@,%d1 <== NOT EXECUTED
5cf48: 6608 bnes 5cf52 <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++)
5cf4a: 5888 addql #4,%a0 <== NOT EXECUTED
5cf4c: b088 cmpl %a0,%d0 <== NOT EXECUTED
5cf4e: 62f0 bhis 5cf40 <Stack_check_Dump_threads_usage+0x50><== NOT EXECUTED
5cf50: 600a bras 5cf5c <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 )
5cf52: 4a88 tstl %a0 <== NOT EXECUTED
5cf54: 6706 beqs 5cf5c <Stack_check_Dump_threads_usage+0x6c><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
5cf56: d483 addl %d3,%d2 <== NOT EXECUTED
5cf58: 9488 subl %a0,%d2 <== NOT EXECUTED
5cf5a: 6002 bras 5cf5e <Stack_check_Dump_threads_usage+0x6e><== NOT EXECUTED
else
used = 0;
5cf5c: 4282 clrl %d2 <== NOT EXECUTED
5cf5e: 2879 0009 68f4 moveal 968f4 <print_handler>,%a4 <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
5cf64: 4a8a tstl %a2 <== NOT EXECUTED
5cf66: 672c beqs 5cf94 <Stack_check_Dump_threads_usage+0xa4><== NOT EXECUTED
#endif
{
(*print_handler)(
5cf68: 486e fffb pea %fp@(-5) <== NOT EXECUTED
5cf6c: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
5cf70: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5cf74: 4eb9 0004 ce20 jsr 4ce20 <rtems_object_get_name> <== NOT EXECUTED
5cf7a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5cf7c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5cf80: 4879 0008 e04e pea 8e04e <RTEMS_BDPART_MBR_MASTER_TYPE+0x2a7><== NOT EXECUTED
5cf86: 2f39 0009 68f0 movel 968f0 <print_context>,%sp@- <== NOT EXECUTED
5cf8c: 4e94 jsr %a4@ <== NOT EXECUTED
5cf8e: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
5cf92: 6016 bras 5cfaa <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 );
5cf94: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
5cf98: 4879 0008 e05b pea 8e05b <RTEMS_BDPART_MBR_MASTER_TYPE+0x2b4><== NOT EXECUTED
5cf9e: 2f39 0009 68f0 movel 968f0 <print_context>,%sp@- <== NOT EXECUTED
5cfa4: 4e94 jsr %a4@ <== NOT EXECUTED
5cfa6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
5cfaa: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
5cfae: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5cfb0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
5cfb2: 2013 movel %a3@,%d0 <== NOT EXECUTED
5cfb4: 5380 subql #1,%d0 <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
5cfb6: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
5cfba: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5cfbc: 4879 0008 e069 pea 8e069 <RTEMS_BDPART_MBR_MASTER_TYPE+0x2c2><== NOT EXECUTED
5cfc2: 2f39 0009 68f0 movel 968f0 <print_context>,%sp@- <== NOT EXECUTED
5cfc8: 2079 0009 68f4 moveal 968f4 <print_handler>,%a0 <== NOT EXECUTED
5cfce: 4e90 jsr %a0@ <== NOT EXECUTED
5cfd0: 2079 0009 68f4 moveal 968f4 <print_handler>,%a0 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
5cfd6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5cfda: 4ab9 0009 68ec tstl 968ec <Stack_check_Initialized> <== NOT EXECUTED
5cfe0: 6612 bnes 5cff4 <Stack_check_Dump_threads_usage+0x104><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
5cfe2: 4879 0008 e087 pea 8e087 <RTEMS_BDPART_MBR_MASTER_TYPE+0x2e0><== NOT EXECUTED
5cfe8: 2f39 0009 68f0 movel 968f0 <print_context>,%sp@- <== NOT EXECUTED
5cfee: 4e90 jsr %a0@ <== NOT EXECUTED
5cff0: 508f addql #8,%sp <== NOT EXECUTED
5cff2: 6014 bras 5d008 <Stack_check_Dump_threads_usage+0x118><== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
5cff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5cff6: 4879 0008 e094 pea 8e094 <RTEMS_BDPART_MBR_MASTER_TYPE+0x2ed><== NOT EXECUTED
5cffc: 2f39 0009 68f0 movel 968f0 <print_context>,%sp@- <== NOT EXECUTED
5d002: 4e90 jsr %a0@ <== NOT EXECUTED
5d004: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
5d008: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED
5d00e: 4e5e unlk %fp <== NOT EXECUTED
0005d0de <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)
{
5d0de: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
5d0e2: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED
5d0e6: 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");
5d0ea: 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);
5d0f0: 286a 00b2 moveal %a2@(178),%a4 <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
5d0f4: 4879 0008 e09a pea 8e09a <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)
{
5d0fa: 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");
5d0fe: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
5d100: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5d102: 4879 0008 e0aa pea 8e0aa <RTEMS_BDPART_MBR_MASTER_TYPE+0x303><== NOT EXECUTED
5d108: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
5d10a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5d10e: 4879 0008 e0c7 pea 8e0c7 <RTEMS_BDPART_MBR_MASTER_TYPE+0x320><== NOT EXECUTED
5d114: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
5d116: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
5d11a: 4879 0008 e0d9 pea 8e0d9 <RTEMS_BDPART_MBR_MASTER_TYPE+0x332><== NOT EXECUTED
5d120: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
5d122: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED
5d126: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5d12a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5d12e: 4eb9 0004 ce20 jsr 4ce20 <rtems_object_get_name> <== NOT EXECUTED
5d134: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
5d138: 2e80 movel %d0,%sp@ <== NOT EXECUTED
5d13a: 4879 0008 e0ed pea 8e0ed <RTEMS_BDPART_MBR_MASTER_TYPE+0x346><== NOT EXECUTED
5d140: 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)
5d142: 206a 00b2 moveal %a2@(178),%a0 <== NOT EXECUTED
5d146: 202a 00ae movel %a2@(174),%d0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
5d14a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
5d14e: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5d150: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5d152: 4879 0008 e103 pea 8e103 <RTEMS_BDPART_MBR_MASTER_TYPE+0x35c><== NOT EXECUTED
5d158: 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) {
5d15a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5d15e: 4a02 tstb %d2 <== NOT EXECUTED
5d160: 6618 bnes 5d17a <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
printk(
5d162: 486c 0018 pea %a4@(24) <== NOT EXECUTED
5d166: 486c 0008 pea %a4@(8) <== NOT EXECUTED
5d16a: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
5d16e: 4879 0008 e134 pea 8e134 <RTEMS_BDPART_MBR_MASTER_TYPE+0x38d><== NOT EXECUTED
5d174: 4e93 jsr %a3@ <== NOT EXECUTED
5d176: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal(
5d17a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
5d17e: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
5d182: 4eb9 0004 67c8 jsr 467c8 <rtems_fatal> <== NOT EXECUTED
0004b674 <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;
4b674: 41f9 0006 0484 lea 60484 <Configuration+0xc>,%a0
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
4b67a: 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;
4b67e: 202e 0008 movel %fp@(8),%d0
4b682: 4c50 0001 remul %a0@,%d1,%d0
4b686: 4c50 0000 remul %a0@,%d0,%d0
if ( (microseconds % microseconds_per_tick) != 0 )
4b68a: 4a81 tstl %d1
4b68c: 6702 beqs 4b690 <TOD_MICROSECONDS_TO_TICKS+0x1c> <== ALWAYS TAKEN
ticks += 1;
4b68e: 5280 addql #1,%d0 <== NOT EXECUTED
return ticks;
}
4b690: 4e5e unlk %fp <== NOT EXECUTED
000477b4 <TOD_MILLISECONDS_TO_TICKS>:
#include <rtems/score/tod.h>
uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds
)
{
477b4: 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();
477b8: 2039 0005 c6f4 movel 5c6f4 <Configuration+0xc>,%d0
#include <rtems/score/tod.h>
uint32_t TOD_MILLISECONDS_TO_TICKS(
uint32_t milliseconds
)
{
477be: 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();
477c0: 243c 0000 03e8 movel #1000,%d2
477c6: 4c42 0000 remul %d2,%d0,%d0
ticks = milliseconds / milliseconds_per_tick;
477ca: 242e 0008 movel %fp@(8),%d2
477ce: 4c40 2001 remul %d0,%d1,%d2
477d2: 4c40 2002 remul %d0,%d2,%d2
477d6: 2002 movel %d2,%d0
if ( (milliseconds % milliseconds_per_tick) != 0 )
477d8: 4a81 tstl %d1
477da: 6702 beqs 477de <TOD_MILLISECONDS_TO_TICKS+0x2a> <== ALWAYS TAKEN
ticks += 1;
477dc: 5280 addql #1,%d0 <== NOT EXECUTED
return ticks;
}
477de: 241f movel %sp@+,%d2
477e0: 4e5e unlk %fp <== NOT EXECUTED
00046cf0 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
46cf0: 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;
46cf4: 2039 0005 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0
++level;
46cfa: 5280 addql #1,%d0
46cfc: 206e 0008 moveal %fp@(8),%a0
_Thread_Dispatch_disable_level = level;
46d00: 23c0 0005 eed6 movel %d0,5eed6 <_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(
46d06: 42a7 clrl %sp@-
46d08: 2f28 0008 movel %a0@(8),%sp@-
46d0c: 4868 0010 pea %a0@(16)
46d10: 4eb9 0004 6fa4 jsr 46fa4 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
46d16: 4fef 000c lea %sp@(12),%sp
}
46d1a: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
46d1c: 4ef9 0004 86fc jmp 486fc <_Thread_Enable_dispatch>
...
00048e64 <_CORE_RWLock_Release>:
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
48e64: 223c 0000 0700 movel #1792,%d1
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
48e6a: 4e56 fff0 linkw %fp,#-16
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
48e6e: 2079 0006 1de2 moveal 61de2 <_Per_CPU_Information+0xe>,%a0
#include <rtems/score/watchdog.h>
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
48e74: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
48e78: 246e 0008 moveal %fp@(8),%a2
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
48e7c: 40c0 movew %sr,%d0
48e7e: 8280 orl %d0,%d1
48e80: 46c1 movew %d1,%sr
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
48e82: 222a 0044 movel %a2@(68),%d1
48e86: 660a bnes 48e92 <_CORE_RWLock_Release+0x2e>
_ISR_Enable( level );
48e88: 46c0 movew %d0,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
48e8a: 7002 moveq #2,%d0
48e8c: 2140 0034 movel %d0,%a0@(52)
return CORE_RWLOCK_SUCCESSFUL;
48e90: 6078 bras 48f0a <_CORE_RWLock_Release+0xa6>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
48e92: 7401 moveq #1,%d2
48e94: b481 cmpl %d1,%d2
48e96: 6610 bnes 48ea8 <_CORE_RWLock_Release+0x44>
the_rwlock->number_of_readers -= 1;
48e98: 222a 0048 movel %a2@(72),%d1
48e9c: 5381 subql #1,%d1
48e9e: 2541 0048 movel %d1,%a2@(72)
if ( the_rwlock->number_of_readers != 0 ) {
48ea2: 6704 beqs 48ea8 <_CORE_RWLock_Release+0x44>
/* must be unlocked again */
_ISR_Enable( level );
48ea4: 46c0 movew %d0,%sr
return CORE_RWLOCK_SUCCESSFUL;
48ea6: 6062 bras 48f0a <_CORE_RWLock_Release+0xa6>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
48ea8: 42a8 0034 clrl %a0@(52)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
48eac: 42aa 0044 clrl %a2@(68)
_ISR_Enable( level );
48eb0: 46c0 movew %d0,%sr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
48eb2: 2f0a movel %a2,%sp@-
48eb4: 4eb9 0004 a8c0 jsr 4a8c0 <_Thread_queue_Dequeue>
if ( next ) {
48eba: 588f addql #4,%sp
48ebc: 4a80 tstl %d0
48ebe: 674a beqs 48f0a <_CORE_RWLock_Release+0xa6>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
48ec0: 7201 moveq #1,%d1
48ec2: 2040 moveal %d0,%a0
48ec4: b2a8 0030 cmpl %a0@(48),%d1
48ec8: 6608 bnes 48ed2 <_CORE_RWLock_Release+0x6e>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
48eca: 7002 moveq #2,%d0
48ecc: 2540 0044 movel %d0,%a2@(68)
return CORE_RWLOCK_SUCCESSFUL;
48ed0: 6038 bras 48f0a <_CORE_RWLock_Release+0xa6>
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
48ed2: 7201 moveq #1,%d1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
48ed4: 52aa 0048 addql #1,%a2@(72)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
48ed8: 49f9 0004 acf8 lea 4acf8 <_Thread_queue_First>,%a4
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
48ede: 47f9 0004 abc8 lea 4abc8 <_Thread_queue_Extract>,%a3
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
48ee4: 2541 0044 movel %d1,%a2@(68)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
48ee8: 2f0a movel %a2,%sp@-
48eea: 4e94 jsr %a4@
if ( !next ||
48eec: 588f addql #4,%sp
48eee: 4a80 tstl %d0
48ef0: 6718 beqs 48f0a <_CORE_RWLock_Release+0xa6>
48ef2: 7401 moveq #1,%d2
48ef4: 2040 moveal %d0,%a0
48ef6: b4a8 0030 cmpl %a0@(48),%d2
48efa: 670e beqs 48f0a <_CORE_RWLock_Release+0xa6> <== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
48efc: 52aa 0048 addql #1,%a2@(72)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
48f00: 2f00 movel %d0,%sp@-
48f02: 2f0a movel %a2,%sp@-
48f04: 4e93 jsr %a3@
}
48f06: 508f addql #8,%sp
48f08: 60de bras 48ee8 <_CORE_RWLock_Release+0x84>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
48f0a: 4280 clrl %d0
48f0c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
48f12: 4e5e unlk %fp
...
00048f18 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
48f18: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48f1c: 486e fffc pea %fp@(-4)
48f20: 2f2e 0008 movel %fp@(8),%sp@-
48f24: 4eb9 0004 a5d0 jsr 4a5d0 <_Thread_Get>
switch ( location ) {
48f2a: 508f addql #8,%sp
48f2c: 4aae fffc tstl %fp@(-4)
48f30: 6618 bnes 48f4a <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
48f32: 2f00 movel %d0,%sp@-
48f34: 4eb9 0004 addc jsr 4addc <_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;
48f3a: 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;
48f3c: 2039 0006 199a movel 6199a <_Thread_Dispatch_disable_level>,%d0
--level;
48f42: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
48f44: 23c0 0006 199a movel %d0,6199a <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
48f4a: 4e5e unlk %fp
...
00047ba8 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
47ba8: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
47bae: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
47bb2: 2279 0006 0692 moveal 60692 <_Per_CPU_Information+0xe>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
47bb8: 48d7 001c moveml %d2-%d4,%sp@
47bbc: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
47bc0: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
47bc4: 242e 000c movel %fp@(12),%d2
47bc8: 262e 0014 movel %fp@(20),%d3
47bcc: 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 );
47bd0: 40c1 movew %sr,%d1
47bd2: 8081 orl %d1,%d0
47bd4: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
47bd6: 2028 0048 movel %a0@(72),%d0
47bda: 5280 addql #1,%d0
47bdc: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
47be0: 4aa8 0040 tstl %a0@(64)
47be4: 6626 bnes 47c0c <_CORE_barrier_Wait+0x64>
if ( the_barrier->number_of_waiting_threads ==
47be6: b0a8 0044 cmpl %a0@(68),%d0
47bea: 6620 bnes 47c0c <_CORE_barrier_Wait+0x64>
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
47bec: 7001 moveq #1,%d0
47bee: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
47bf2: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
47bf4: 2d44 0010 movel %d4,%fp@(16)
47bf8: 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 );
}
47bfc: 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 );
47c00: 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 );
}
47c04: 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 );
47c06: 4ef9 0004 c1a4 jmp 4c1a4 <_CORE_barrier_Release>
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;
47c0c: 7001 moveq #1,%d0
47c0e: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
47c12: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
47c16: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
47c1a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
47c1c: 2d43 000c movel %d3,%fp@(12)
47c20: 203c 0004 9c28 movel #302120,%d0
47c26: 2d48 0008 movel %a0,%fp@(8)
}
47c2a: 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 );
47c2e: 2d40 0010 movel %d0,%fp@(16)
}
47c32: 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 );
47c34: 4ef9 0004 9938 jmp 49938 <_Thread_queue_Enqueue_with_handler>
...
0004e754 <_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)) {
4e754: 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
)
{
4e756: 4e56 ffe4 linkw %fp,#-28
4e75a: 222e 0014 movel %fp@(20),%d1
4e75e: 48d7 04fc moveml %d2-%d7/%a2,%sp@
4e762: 246e 0008 moveal %fp@(8),%a2
4e766: 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)) {
4e76a: c081 andl %d1,%d0
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
4e76c: 2544 0044 movel %d4,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
4e770: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
4e774: 2541 004c movel %d1,%a2@(76)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
4e778: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
4e77c: 42aa 0064 clrl %a2@(100)
/*
* 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)) {
4e780: 4a80 tstl %d0
4e782: 6712 beqs 4e796 <_CORE_message_queue_Initialize+0x42>
allocated_message_size += sizeof(uintptr_t);
4e784: 2001 movel %d1,%d0
4e786: 5880 addql #4,%d0
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
4e788: 74fc moveq #-4,%d2
4e78a: 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)
4e78c: b280 cmpl %d0,%d1
4e78e: 6308 blss 4e798 <_CORE_message_queue_Initialize+0x44>
return false;
4e790: 4200 clrb %d0
4e792: 6000 0086 braw 4e81a <_CORE_message_queue_Initialize+0xc6>
/*
* 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)) {
4e796: 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(
4e798: 2a00 movel %d0,%d5
4e79a: 0685 0000 0014 addil #20,%d5
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
4e7a0: 2f05 movel %d5,%sp@-
if ( x > SIZE_MAX )
4e7a2: 4286 clrl %d6
4e7a4: 7eff moveq #-1,%d7
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
4e7a6: 42a7 clrl %sp@-
4e7a8: 2f04 movel %d4,%sp@-
4e7aa: 42a7 clrl %sp@-
4e7ac: 4eb9 0006 1704 jsr 61704 <__muldi3>
4e7b2: 4fef 0010 lea %sp@(16),%sp
4e7b6: 2400 movel %d0,%d2
4e7b8: 2601 movel %d1,%d3
if ( x > SIZE_MAX )
4e7ba: 9e83 subl %d3,%d7
4e7bc: 9d82 subxl %d2,%d6
4e7be: 6dd0 blts 4e790 <_CORE_message_queue_Initialize+0x3c><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
4e7c0: 2f01 movel %d1,%sp@-
4e7c2: 4eb9 0005 11cc jsr 511cc <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
4e7c8: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4e7ca: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4e7ce: 67c0 beqs 4e790 <_CORE_message_queue_Initialize+0x3c>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
4e7d0: 2f05 movel %d5,%sp@-
4e7d2: 2f04 movel %d4,%sp@-
4e7d4: 2f00 movel %d0,%sp@-
4e7d6: 486a 0068 pea %a2@(104)
4e7da: 4eb9 0004 e710 jsr 4e710 <_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 );
4e7e0: 41ea 0054 lea %a2@(84),%a0
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
4e7e4: 7001 moveq #1,%d0
4e7e6: 2548 0050 movel %a0,%a2@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4e7ea: 41ea 0050 lea %a2@(80),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4e7ee: 42aa 0054 clrl %a2@(84)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4e7f2: 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(
4e7f6: 4878 0006 pea 6 <EXTENDSFDF>
4e7fa: 206e 000c moveal %fp@(12),%a0
4e7fe: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
4e802: b090 cmpl %a0@,%d0
4e804: 57c0 seq %d0
4e806: 49c0 extbl %d0
4e808: 4480 negl %d0
4e80a: 2f00 movel %d0,%sp@-
4e80c: 2f0a movel %a2,%sp@-
4e80e: 4eb9 0005 0a80 jsr 50a80 <_Thread_queue_Initialize>
4e814: 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;
4e818: 7001 moveq #1,%d0
}
4e81a: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2
4e820: 4e5e unlk %fp <== NOT EXECUTED
0004e824 <_CORE_message_queue_Seize>:
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4e824: 223c 0000 0700 movel #1792,%d1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4e82a: 4e56 ffe4 linkw %fp,#-28
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
4e82e: 2079 0006 7c86 moveal 67c86 <_Per_CPU_Information+0xe>,%a0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4e834: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4e838: 246e 0008 moveal %fp@(8),%a2
4e83c: 262e 000c movel %fp@(12),%d3
4e840: 286e 0010 moveal %fp@(16),%a4
4e844: 226e 0014 moveal %fp@(20),%a1
4e848: 242e 001c movel %fp@(28),%d2
4e84c: 182e 001b moveb %fp@(27),%d4
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
4e850: 42a8 0034 clrl %a0@(52)
_ISR_Disable( level );
4e854: 40c0 movew %sr,%d0
4e856: 8280 orl %d0,%d1
4e858: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4e85a: 220a movel %a2,%d1
4e85c: 2a0a movel %a2,%d5
4e85e: 0681 0000 0050 addil #80,%d1
4e864: 0685 0000 0054 addil #84,%d5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4e86a: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
4e86e: ba8b cmpl %a3,%d5
4e870: 6700 009c beqw 4e90e <_CORE_message_queue_Seize+0xea>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
4e874: 2053 moveal %a3@,%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
4e876: 2141 0004 movel %d1,%a0@(4)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
4e87a: 53aa 0048 subql #1,%a2@(72)
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
4e87e: 2548 0050 movel %a0,%a2@(80)
_ISR_Enable( level );
4e882: 46c0 movew %d0,%sr
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
4e884: 2079 0006 7c86 moveal 67c86 <_Per_CPU_Information+0xe>,%a0
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
4e88a: 240b movel %a3,%d2
4e88c: 0682 0000 0010 addil #16,%d2
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
4e892: 22ab 000c movel %a3@(12),%a1@
_Thread_Executing->Wait.count =
4e896: 216b 0008 0024 movel %a3@(8),%a0@(36)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
4e89c: 2f11 movel %a1@,%sp@-
4e89e: 2f02 movel %d2,%sp@-
4e8a0: 2f0c movel %a4,%sp@-
4e8a2: 49f9 0005 581c lea 5581c <memcpy>,%a4
4e8a8: 4e94 jsr %a4@
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
4e8aa: 2f0a movel %a2,%sp@-
4e8ac: 4eb9 0005 0720 jsr 50720 <_Thread_queue_Dequeue>
if ( !the_thread ) {
4e8b2: 4fef 0010 lea %sp@(16),%sp
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
4e8b6: 2040 moveal %d0,%a0
if ( !the_thread ) {
4e8b8: 4a80 tstl %d0
4e8ba: 661a bnes 4e8d6 <_CORE_message_queue_Seize+0xb2> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
4e8bc: 45ea 0068 lea %a2@(104),%a2
4e8c0: 2d4b 000c movel %a3,%fp@(12)
4e8c4: 2d4a 0008 movel %a2,%fp@(8)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
4e8c8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4e8ce: 4e5e unlk %fp
4e8d0: 4ef9 0004 e6a4 jmp 4e6a4 <_Chain_Append>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
4e8d6: 2028 0030 movel %a0@(48),%d0
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
4e8da: 2768 0024 0008 movel %a0@(36),%a3@(8)
4e8e0: 2740 000c movel %d0,%a3@(12)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
4e8e4: 2f00 movel %d0,%sp@-
4e8e6: 2f28 002c movel %a0@(44),%sp@-
4e8ea: 2f02 movel %d2,%sp@-
4e8ec: 4e94 jsr %a4@
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
4e8ee: 2d6b 0008 0010 movel %a3@(8),%fp@(16)
4e8f4: 4fef 000c lea %sp@(12),%sp
4e8f8: 2d4b 000c movel %a3,%fp@(12)
4e8fc: 2d4a 0008 movel %a2,%fp@(8)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
4e900: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4e906: 4e5e unlk %fp
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
4e908: 4ef9 0005 315c jmp 5315c <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
4e90e: 4a04 tstb %d4
4e910: 660a bnes 4e91c <_CORE_message_queue_Seize+0xf8>
_ISR_Enable( level );
4e912: 46c0 movew %d0,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4e914: 7004 moveq #4,%d0
4e916: 2140 0034 movel %d0,%a0@(52)
return;
4e91a: 6038 bras 4e954 <_CORE_message_queue_Seize+0x130>
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;
4e91c: 7201 moveq #1,%d1
4e91e: 2541 0030 movel %d1,%a2@(48)
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
4e922: 214c 002c movel %a4,%a0@(44)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
4e926: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
4e92a: 2143 0020 movel %d3,%a0@(32)
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
4e92e: 2149 0028 movel %a1,%a0@(40)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
4e932: 46c0 movew %d0,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4e934: 2d42 000c movel %d2,%fp@(12)
4e938: 203c 0005 0b48 movel #330568,%d0
4e93e: 2d4a 0008 movel %a2,%fp@(8)
}
4e942: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4e948: 2d40 0010 movel %d0,%fp@(16)
}
4e94c: 4e5e unlk %fp
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4e94e: 4ef9 0005 0858 jmp 50858 <_Thread_queue_Enqueue_with_handler>
}
4e954: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4e95a: 4e5e unlk %fp
...
0004e960 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
4e960: 4e56 ffe8 linkw %fp,#-24
4e964: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4e968: 246e 0008 moveal %fp@(8),%a2
4e96c: 282e 000c movel %fp@(12),%d4
4e970: 242e 0010 movel %fp@(16),%d2
4e974: 262e 001c movel %fp@(28),%d3
4e978: 1a2e 0023 moveb %fp@(35),%d5
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
4e97c: b4aa 004c cmpl %a2@(76),%d2
4e980: 6200 00c8 bhiw 4ea4a <_CORE_message_queue_Submit+0xea>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
4e984: 4aaa 0048 tstl %a2@(72)
4e988: 662e bnes 4e9b8 <_CORE_message_queue_Submit+0x58>
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
4e98a: 2f0a movel %a2,%sp@-
4e98c: 4eb9 0005 0720 jsr 50720 <_Thread_queue_Dequeue>
if ( the_thread ) {
4e992: 588f addql #4,%sp
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
4e994: 2640 moveal %d0,%a3
if ( the_thread ) {
4e996: 4a80 tstl %d0
4e998: 671e beqs 4e9b8 <_CORE_message_queue_Submit+0x58>
4e99a: 2f02 movel %d2,%sp@-
4e99c: 2f04 movel %d4,%sp@-
4e99e: 2f2b 002c movel %a3@(44),%sp@-
4e9a2: 4eb9 0005 581c jsr 5581c <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
4e9a8: 206b 0028 moveal %a3@(40),%a0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
4e9ac: 4fef 000c lea %sp@(12),%sp
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
4e9b0: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
4e9b2: 2743 0024 movel %d3,%a3@(36)
4e9b6: 6038 bras 4e9f0 <_CORE_message_queue_Submit+0x90>
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
4e9b8: 486a 0068 pea %a2@(104)
4e9bc: 4eb9 0004 e6dc jsr 4e6dc <_Chain_Get>
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
the_message =
_CORE_message_queue_Allocate_message_buffer( the_message_queue );
if ( the_message ) {
4e9c2: 588f addql #4,%sp
4e9c4: 2640 moveal %d0,%a3
4e9c6: 4a80 tstl %d0
4e9c8: 672a beqs 4e9f4 <_CORE_message_queue_Submit+0x94>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
4e9ca: 2f02 movel %d2,%sp@-
4e9cc: 2f04 movel %d4,%sp@-
4e9ce: 486b 0010 pea %a3@(16)
4e9d2: 4eb9 0005 581c jsr 5581c <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
4e9d8: 2742 000c movel %d2,%a3@(12)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
4e9dc: 2743 0008 movel %d3,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
4e9e0: 2f03 movel %d3,%sp@-
4e9e2: 2f0b movel %a3,%sp@-
4e9e4: 2f0a movel %a2,%sp@-
4e9e6: 4eb9 0005 315c jsr 5315c <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
4e9ec: 4fef 0018 lea %sp@(24),%sp
4e9f0: 4280 clrl %d0
4e9f2: 6060 bras 4ea54 <_CORE_message_queue_Submit+0xf4>
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
4e9f4: 4a05 tstb %d5
4e9f6: 6756 beqs 4ea4e <_CORE_message_queue_Submit+0xee>
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
4e9f8: 4ab9 0006 7c80 tstl 67c80 <_Per_CPU_Information+0x8>
4e9fe: 6652 bnes 4ea52 <_CORE_message_queue_Submit+0xf2><== NEVER TAKEN
* Thus the unusual choice to open a new scope and declare
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
4ea00: 2079 0006 7c86 moveal 67c86 <_Per_CPU_Information+0xe>,%a0
ISR_Level level;
_ISR_Disable( level );
4ea06: 203c 0000 0700 movel #1792,%d0
4ea0c: 40c1 movew %sr,%d1
4ea0e: 8081 orl %d1,%d0
4ea10: 46c0 movew %d0,%sr
4ea12: 7001 moveq #1,%d0
4ea14: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
4ea18: 216e 0014 0020 movel %fp@(20),%a0@(32)
Thread_Control *executing = _Thread_Executing;
ISR_Level level;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
4ea1e: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
4ea22: 2144 002c movel %d4,%a0@(44)
executing->Wait.option = (uint32_t) size;
4ea26: 2142 0030 movel %d2,%a0@(48)
executing->Wait.count = submit_type;
4ea2a: 2143 0024 movel %d3,%a0@(36)
_ISR_Enable( level );
4ea2e: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4ea30: 4879 0005 0b48 pea 50b48 <_Thread_queue_Timeout>
4ea36: 2f2e 0024 movel %fp@(36),%sp@-
4ea3a: 2f0a movel %a2,%sp@-
4ea3c: 4eb9 0005 0858 jsr 50858 <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
4ea42: 4fef 000c lea %sp@(12),%sp
4ea46: 7007 moveq #7,%d0
4ea48: 600a bras 4ea54 <_CORE_message_queue_Submit+0xf4>
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
4ea4a: 7001 moveq #1,%d0
4ea4c: 6006 bras 4ea54 <_CORE_message_queue_Submit+0xf4>
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
4ea4e: 7002 moveq #2,%d0
4ea50: 6002 bras 4ea54 <_CORE_message_queue_Submit+0xf4>
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
4ea52: 7003 moveq #3,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
4ea54: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
4ea5a: 4e5e unlk %fp
...
000470dc <_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
)
{
470dc: 4e56 0000 linkw %fp,#0
470e0: 2f0a movel %a2,%sp@-
470e2: 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)) ) {
470e6: 2f0a movel %a2,%sp@-
470e8: 4eb9 0004 8a0c jsr 48a0c <_Thread_queue_Dequeue>
470ee: 588f addql #4,%sp
470f0: 4a80 tstl %d0
470f2: 6624 bnes 47118 <_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 );
470f4: 303c 0700 movew #1792,%d0
470f8: 40c1 movew %sr,%d1
470fa: 8081 orl %d1,%d0
470fc: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
470fe: 202a 0048 movel %a2@(72),%d0
47102: b0aa 0040 cmpl %a2@(64),%d0
47106: 640a bccs 47112 <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN
the_semaphore->count += 1;
47108: 5280 addql #1,%d0
4710a: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
4710e: 4280 clrl %d0
47110: 6002 bras 47114 <_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;
47112: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
47114: 46c1 movew %d1,%sr
47116: 6002 bras 4711a <_CORE_semaphore_Surrender+0x3e>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
47118: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
4711a: 246e fffc moveal %fp@(-4),%a2
4711e: 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 f318 tstl 5f318 <_Per_CPU_Information+0x8>
45f1c: 6736 beqs 45f54 <_Event_Surrender+0x7c>
45f1e: b5f9 0005 f31e cmpal 5f31e <_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 92f8 jsr 492f8 <_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 8388 jmp 48388 <_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 871c jsr 4871c <_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 f31e cmpl 5f31e <_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 8388 jsr 48388 <_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 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0
--level;
46032: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
46034: 23c0 0005 eed6 movel %d0,5eed6 <_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
...
0004745a <_Heap_Block_allocate>:
- 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;
4745a: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4745c: 4e56 ffe4 linkw %fp,#-28
47460: 222e 0010 movel %fp@(16),%d1
47464: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
47468: 246e 000c moveal %fp@(12),%a2
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;
4746c: 7401 moveq #1,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4746e: 2841 moveal %d1,%a4
47470: 518c subql #8,%a4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
47472: 2a4c moveal %a4,%a5
47474: 9bca subal %a2,%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;
47476: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4747a: 266e 0008 moveal %fp@(8),%a3
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;
4747e: c4b2 0804 andl %a2@(00000004,%d0:l),%d2
47482: 282e 0014 movel %fp@(20),%d4
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47486: 4a82 tstl %d2
47488: 6626 bnes 474b0 <_Heap_Block_allocate+0x56>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4748a: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4748e: 2240 moveal %d0,%a1
free_list_anchor = block->prev;
47490: 206a 000c moveal %a2@(12),%a0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
47494: 2140 0008 movel %d0,%a0@(8)
- 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;
47498: 70fe moveq #-2,%d0
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4749a: 2348 000c movel %a0,%a1@(12)
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
4749e: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks;
474a2: 52ab 0040 addql #1,%a3@(64)
- 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;
474a6: c0aa 0004 andl %a2@(4),%d0
stats->free_size -= _Heap_Block_size( block );
474aa: 91ab 0030 subl %d0,%a3@(48)
474ae: 6002 bras 474b2 <_Heap_Block_allocate+0x58>
} else {
free_list_anchor = _Heap_Free_list_head( heap );
474b0: 204b moveal %a3,%a0
}
if ( alloc_area_offset < heap->page_size ) {
474b2: 202b 0010 movel %a3@(16),%d0
474b6: b08d cmpl %a5,%d0
474b8: 6314 blss 474ce <_Heap_Block_allocate+0x74>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
474ba: 4875 4800 pea %a5@(00000000,%d4:l)
474be: 2f08 movel %a0,%sp@-
474c0: 2f0a movel %a2,%sp@-
474c2: 2f0b movel %a3,%sp@-
474c4: 4eba fd62 jsr %pc@(47228 <_Heap_Block_split>)
474c8: 4fef 0010 lea %sp@(16),%sp
474cc: 6066 bras 47534 <_Heap_Block_allocate+0xda>
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
474ce: 242a 0004 movel %a2@(4),%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
474d2: 4c40 1003 remul %d0,%d3,%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;
474d6: 72fe moveq #-2,%d1
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
474d8: 99c3 subal %d3,%a4
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
474da: 200c movel %a4,%d0
474dc: 908a subl %a2,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
474de: d1ab 0030 addl %d0,%a3@(48)
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
474e2: c282 andl %d2,%d1
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
474e4: d28a addl %a2,%d1
Heap_Block *const new_block =
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
474e6: 928c subl %a4,%d1
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
474e8: 0802 0000 btst #0,%d2
474ec: 671c beqs 4750a <_Heap_Block_allocate+0xb0> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
474ee: 2a68 0008 moveal %a0@(8),%a5
new_block->next = next;
new_block->prev = block_before;
474f2: 2548 000c movel %a0,%a2@(12)
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
474f6: 254d 0008 movel %a5,%a2@(8)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
474fa: 2b4a 000c movel %a2,%a5@(12)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
474fe: 214a 0008 movel %a2,%a0@(8)
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47502: 52ab 0038 addql #1,%a3@(56)
47506: 204a moveal %a2,%a0
47508: 600a bras 47514 <_Heap_Block_allocate+0xba>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
4750a: 95d2 subal %a2@,%a2
- 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;
4750c: 74fe moveq #-2,%d2
4750e: c4aa 0004 andl %a2@(4),%d2
} else {
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_size += prev_block_size;
47512: d082 addl %d2,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47514: 7401 moveq #1,%d2
47516: 8480 orl %d0,%d2
new_block->prev_size = block_size;
47518: 2880 movel %d0,%a4@
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4751a: 2542 0004 movel %d2,%a2@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
4751e: 244c moveal %a4,%a2
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47520: 2941 0004 movel %d1,%a4@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47524: 2f04 movel %d4,%sp@-
47526: 2f08 movel %a0,%sp@-
47528: 2f0c movel %a4,%sp@-
4752a: 2f0b movel %a3,%sp@-
4752c: 4eba fcfa jsr %pc@(47228 <_Heap_Block_split>)
47530: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
47534: 202b 0030 movel %a3@(48),%d0
47538: b0ab 0034 cmpl %a3@(52),%d0
4753c: 6404 bccs 47542 <_Heap_Block_allocate+0xe8>
stats->min_free_size = stats->free_size;
4753e: 2740 0034 movel %d0,%a3@(52)
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
47542: 200a movel %a2,%d0
47544: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4754a: 4e5e unlk %fp
...
0004b55c <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4b55c: 4e56 ffe8 linkw %fp,#-24
4b560: 206e 0008 moveal %fp@(8),%a0
4b564: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4b568: 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 ) {
4b56c: 6700 0154 beqw 4b6c2 <_Heap_Free+0x166>
4b570: 2240 moveal %d0,%a1
4b572: 5189 subql #8,%a1
4b574: 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
4b57a: 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);
4b57e: 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;
4b580: b889 cmpl %a1,%d4
4b582: 620c bhis 4b590 <_Heap_Free+0x34>
4b584: b3e8 0024 cmpal %a0@(36),%a1
4b588: 53c0 sls %d0
4b58a: 49c0 extbl %d0
4b58c: 4480 negl %d0
4b58e: 6002 bras 4b592 <_Heap_Free+0x36>
4b590: 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 ) ) {
4b592: 0800 0000 btst #0,%d0
4b596: 6700 012e beqw 4b6c6 <_Heap_Free+0x16a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4b59a: 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;
4b59e: 70fe moveq #-2,%d0
4b5a0: 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);
4b5a2: 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;
4b5a6: b88a cmpl %a2,%d4
4b5a8: 620c bhis 4b5b6 <_Heap_Free+0x5a> <== NEVER TAKEN
4b5aa: b5e8 0024 cmpal %a0@(36),%a2
4b5ae: 53c1 sls %d1
4b5b0: 49c1 extbl %d1
4b5b2: 4481 negl %d1
4b5b4: 6002 bras 4b5b8 <_Heap_Free+0x5c>
4b5b6: 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 ) ) {
4b5b8: 0801 0000 btst #0,%d1
4b5bc: 6700 0108 beqw 4b6c6 <_Heap_Free+0x16a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4b5c0: 242a 0004 movel %a2@(4),%d2
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
4b5c4: 0802 0000 btst #0,%d2
4b5c8: 6700 00fc beqw 4b6c6 <_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;
4b5cc: 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
4b5ce: 2668 0024 moveal %a0@(36),%a3
4b5d2: c481 andl %d1,%d2
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4b5d4: b7ca cmpal %a2,%a3
4b5d6: 670c beqs 4b5e4 <_Heap_Free+0x88>
4b5d8: 2232 2804 movel %a2@(00000004,%d2:l),%d1
4b5dc: 7a01 moveq #1,%d5
4b5de: bb81 eorl %d5,%d1
4b5e0: c285 andl %d5,%d1
4b5e2: 6002 bras 4b5e6 <_Heap_Free+0x8a>
4b5e4: 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
4b5e6: 1a01 moveb %d1,%d5
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4b5e8: 0803 0000 btst #0,%d3
4b5ec: 6662 bnes 4b650 <_Heap_Free+0xf4>
uintptr_t const prev_size = block->prev_size;
4b5ee: 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);
4b5f0: 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;
4b5f2: b889 cmpl %a1,%d4
4b5f4: 620a bhis 4b600 <_Heap_Free+0xa4> <== NEVER TAKEN
4b5f6: b3cb cmpal %a3,%a1
4b5f8: 53c1 sls %d1
4b5fa: 49c1 extbl %d1
4b5fc: 4481 negl %d1
4b5fe: 6002 bras 4b602 <_Heap_Free+0xa6>
4b600: 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 ) ) {
4b602: 0801 0000 btst #0,%d1
4b606: 6700 00be beqw 4b6c6 <_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;
4b60a: 7201 moveq #1,%d1
4b60c: 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) ) {
4b610: 6700 00b4 beqw 4b6c6 <_Heap_Free+0x16a>
4b614: d680 addl %d0,%d3
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4b616: 4a05 tstb %d5
4b618: 6724 beqs 4b63e <_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;
4b61a: 266a 0008 moveal %a2@(8),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
4b61e: d483 addl %d3,%d2
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b620: 7201 moveq #1,%d1
Heap_Block *prev = block->prev;
4b622: 246a 000c moveal %a2@(12),%a2
prev->next = next;
4b626: 254b 0008 movel %a3,%a2@(8)
4b62a: 8282 orl %d2,%d1
next->prev = prev;
4b62c: 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;
4b630: 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;
4b634: 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;
4b638: 2341 0004 movel %d1,%a1@(4)
4b63c: 6078 bras 4b6b6 <_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;
4b63e: 7401 moveq #1,%d2
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b640: 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;
4b642: 8483 orl %d3,%d2
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4b644: 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;
4b646: 2342 0004 movel %d2,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b64a: cbaa 0004 andl %d5,%a2@(4)
4b64e: 6066 bras 4b6b6 <_Heap_Free+0x15a>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4b650: 4a01 tstb %d1
4b652: 672a beqs 4b67e <_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;
4b654: 266a 0008 moveal %a2@(8),%a3
uintptr_t const size = block_size + next_block_size;
4b658: 2202 movel %d2,%d1
4b65a: d280 addl %d0,%d1
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b65c: 7401 moveq #1,%d2
Heap_Block *prev = old_block->prev;
4b65e: 246a 000c moveal %a2@(12),%a2
new_block->next = next;
4b662: 234b 0008 movel %a3,%a1@(8)
4b666: 8481 orl %d1,%d2
new_block->prev = prev;
4b668: 234a 000c movel %a2,%a1@(12)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4b66c: 2381 1800 movel %d1,%a1@(00000000,%d1:l)
next->prev = new_block;
4b670: 2749 000c movel %a1,%a3@(12)
prev->next = new_block;
4b674: 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;
4b678: 2342 0004 movel %d2,%a1@(4)
4b67c: 6038 bras 4b6b6 <_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;
4b67e: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b680: 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;
4b682: 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;
4b684: 2668 0008 moveal %a0@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4b688: 2348 000c movel %a0,%a1@(12)
4b68c: 2345 0004 movel %d5,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b690: c3aa 0004 andl %d1,%a2@(4)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4b694: 2228 0038 movel %a0@(56),%d1
4b698: 5281 addql #1,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4b69a: 234b 0008 movel %a3,%a1@(8)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
4b69e: 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;
4b6a2: 2480 movel %d0,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4b6a4: 2149 0008 movel %a1,%a0@(8)
/* Statistics */
++stats->free_blocks;
4b6a8: 2141 0038 movel %d1,%a0@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4b6ac: b2a8 003c cmpl %a0@(60),%d1
4b6b0: 6304 blss 4b6b6 <_Heap_Free+0x15a>
stats->max_free_blocks = stats->free_blocks;
4b6b2: 2141 003c movel %d1,%a0@(60)
}
}
/* Statistics */
--stats->used_blocks;
4b6b6: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4b6ba: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4b6be: 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;
4b6c2: 7001 moveq #1,%d0
4b6c4: 6002 bras 4b6c8 <_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;
4b6c6: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4b6c8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
4b6cc: 4e5e unlk %fp <== NOT EXECUTED
00048f78 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
48f78: 4e56 ffe8 linkw %fp,#-24
48f7c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
48f80: 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) {
48f84: 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;
48f86: 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 );
48f88: 4bf9 0004 f5c8 lea 4f5c8 <_Heap_Allocate_aligned_with_boundary>,%a5
48f8e: 286e 000c moveal %fp@(12),%a4
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
48f92: 6026 bras 48fba <_Heap_Greedy_allocate+0x42>
48f94: 42a7 clrl %sp@-
48f96: 42a7 clrl %sp@-
48f98: 2f1c movel %a4@+,%sp@-
48f9a: 2f0a movel %a2,%sp@-
48f9c: 4e95 jsr %a5@
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
48f9e: 4fef 0010 lea %sp@(16),%sp
48fa2: 4a80 tstl %d0
48fa4: 6712 beqs 48fb8 <_Heap_Greedy_allocate+0x40> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
48fa6: 2040 moveal %d0,%a0
48fa8: 5188 subql #8,%a0
48faa: 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);
48fb0: 91c1 subal %d1,%a0
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
48fb2: 214b 0008 movel %a3,%a0@(8)
48fb6: 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) {
48fb8: 5282 addql #1,%d2
48fba: b4ae 0010 cmpl %fp@(16),%d2
48fbe: 66d4 bnes 48f94 <_Heap_Greedy_allocate+0x1c>
48fc0: 4282 clrl %d2
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
48fc2: 4bf9 0004 9286 lea 49286 <_Heap_Block_allocate>,%a5
48fc8: 6020 bras 48fea <_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;
48fca: 70fe moveq #-2,%d0
48fcc: c0ac 0004 andl %a4@(4),%d0
48fd0: 2040 moveal %d0,%a0
48fd2: 4868 fff8 pea %a0@(-8)
48fd6: 486c 0008 pea %a4@(8)
48fda: 2f0c movel %a4,%sp@-
48fdc: 2f0a movel %a2,%sp@-
48fde: 4e95 jsr %a5@
48fe0: 4fef 0010 lea %sp@(16),%sp
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
48fe4: 2942 0008 movel %d2,%a4@(8)
48fe8: 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;
48fea: 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 ) {
48fee: b5cc cmpal %a4,%a2
48ff0: 66d8 bnes 48fca <_Heap_Greedy_allocate+0x52>
48ff2: 6012 bras 49006 <_Heap_Greedy_allocate+0x8e>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
48ff4: 262b 0008 movel %a3@(8),%d3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
48ff8: 486b 0008 pea %a3@(8)
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
48ffc: 2643 moveal %d3,%a3
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
48ffe: 2f0a movel %a2,%sp@-
49000: 4e94 jsr %a4@
49002: 508f addql #8,%sp
49004: 6006 bras 4900c <_Heap_Greedy_allocate+0x94>
49006: 49f9 0004 f728 lea 4f728 <_Heap_Free>,%a4
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
4900c: 4a8b tstl %a3
4900e: 66e4 bnes 48ff4 <_Heap_Greedy_allocate+0x7c>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
49010: 2002 movel %d2,%d0
49012: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
49018: 4e5e unlk %fp <== NOT EXECUTED
0004fcac <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
4fcac: 4e56 0000 linkw %fp,#0
4fcb0: 226e 0008 moveal %fp@(8),%a1
4fcb4: 2f0a movel %a2,%sp@-
Heap_Block *current = heap->first_block;
4fcb6: 2069 0020 moveal %a1@(32),%a0
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
4fcba: 2f02 movel %d2,%sp@-
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
4fcbc: 2429 0024 movel %a1@(36),%d2
4fcc0: 602a bras 4fcec <_Heap_Iterate+0x40>
4fcc2: 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 );
4fcc4: 7201 moveq #1,%d1
4fcc6: c0a8 0004 andl %a0@(4),%d0
4fcca: 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);
4fcce: 45f0 0800 lea %a0@(00000000,%d0:l),%a2
4fcd2: c2aa 0004 andl %a2@(4),%d1
4fcd6: 2f01 movel %d1,%sp@-
4fcd8: 2f00 movel %d0,%sp@-
4fcda: 2f08 movel %a0,%sp@-
4fcdc: 206e 000c moveal %fp@(12),%a0
4fce0: 4e90 jsr %a0@
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
4fce2: 4fef 0010 lea %sp@(16),%sp
4fce6: 204a moveal %a2,%a0
4fce8: 4a00 tstb %d0
4fcea: 6604 bnes 4fcf0 <_Heap_Iterate+0x44> <== NEVER TAKEN
4fcec: b488 cmpl %a0,%d2
4fcee: 66d2 bnes 4fcc2 <_Heap_Iterate+0x16>
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
4fcf0: 242e fff8 movel %fp@(-8),%d2
4fcf4: 246e fffc moveal %fp@(-4),%a2
4fcf8: 4e5e unlk %fp <== NOT EXECUTED
0005b510 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5b510: 4e56 0000 linkw %fp,#0
5b514: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5b518: 2040 moveal %d0,%a0
5b51a: 5188 subql #8,%a0
5b51c: 226e 0008 moveal %fp@(8),%a1
5b520: 2f02 movel %d2,%sp@-
5b522: 2400 movel %d0,%d2
5b524: 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
5b52a: 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);
5b52e: 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;
5b530: b488 cmpl %a0,%d2
5b532: 620c bhis 5b540 <_Heap_Size_of_alloc_area+0x30>
5b534: b1e9 0024 cmpal %a1@(36),%a0
5b538: 53c1 sls %d1
5b53a: 49c1 extbl %d1
5b53c: 4481 negl %d1
5b53e: 6002 bras 5b542 <_Heap_Size_of_alloc_area+0x32>
5b540: 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 ) ) {
5b542: 0801 0000 btst #0,%d1
5b546: 673c beqs 5b584 <_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;
5b548: 72fe moveq #-2,%d1
5b54a: 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);
5b54e: 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;
5b552: b488 cmpl %a0,%d2
5b554: 620c bhis 5b562 <_Heap_Size_of_alloc_area+0x52> <== NEVER TAKEN
5b556: b1e9 0024 cmpal %a1@(36),%a0
5b55a: 53c1 sls %d1
5b55c: 49c1 extbl %d1
5b55e: 4481 negl %d1
5b560: 6002 bras 5b564 <_Heap_Size_of_alloc_area+0x54>
5b562: 4281 clrl %d1 <== NOT EXECUTED
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5b564: 0801 0000 btst #0,%d1
5b568: 671a beqs 5b584 <_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;
5b56a: 7201 moveq #1,%d1
5b56c: c2a8 0004 andl %a0@(4),%d1
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
5b570: 6712 beqs 5b584 <_Heap_Size_of_alloc_area+0x74> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5b572: 7204 moveq #4,%d1
5b574: 9280 subl %d0,%d1
5b576: 2001 movel %d1,%d0
5b578: d088 addl %a0,%d0
5b57a: 226e 0010 moveal %fp@(16),%a1
5b57e: 2280 movel %d0,%a1@
return true;
5b580: 7001 moveq #1,%d0
5b582: 6002 bras 5b586 <_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;
5b584: 4200 clrb %d0
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
5b586: 241f movel %sp@+,%d2
5b588: 4e5e unlk %fp <== NOT EXECUTED
00047d72 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
47d72: 4e56 ffd0 linkw %fp,#-48
47d76: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47d7a: 266e 0008 moveal %fp@(8),%a3
47d7e: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
47d82: 282b 0010 movel %a3@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
47d86: 2a2b 0014 movel %a3@(20),%d5
Heap_Block *const first_block = heap->first_block;
47d8a: 286b 0020 moveal %a3@(32),%a4
Heap_Block *const last_block = heap->last_block;
47d8e: 2c2b 0024 movel %a3@(36),%d6
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
47d92: 4a2e 0013 tstb %fp@(19)
47d96: 6706 beqs 47d9e <_Heap_Walk+0x2c>
47d98: 45fa ff9a lea %pc@(47d34 <_Heap_Walk_print>),%a2
47d9c: 6004 bras 47da2 <_Heap_Walk+0x30>
47d9e: 45fa ff8c lea %pc@(47d2c <_Heap_Walk_print_nothing>),%a2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
47da2: 7003 moveq #3,%d0
47da4: b0b9 0006 1442 cmpl 61442 <_System_state_Current>,%d0
47daa: 6706 beqs 47db2 <_Heap_Walk+0x40>
return true;
47dac: 7001 moveq #1,%d0
47dae: 6000 02fc braw 480ac <_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)(
47db2: 2f2b 000c movel %a3@(12),%sp@-
47db6: 2f2b 0008 movel %a3@(8),%sp@-
47dba: 2f06 movel %d6,%sp@-
47dbc: 2f0c movel %a4,%sp@-
47dbe: 2f2b 001c movel %a3@(28),%sp@-
47dc2: 2f2b 0018 movel %a3@(24),%sp@-
47dc6: 2f05 movel %d5,%sp@-
47dc8: 2f04 movel %d4,%sp@-
47dca: 4879 0005 d476 pea 5d476 <_Copyright_Notice+0x94>
47dd0: 42a7 clrl %sp@-
47dd2: 2f02 movel %d2,%sp@-
47dd4: 4e92 jsr %a2@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
47dd6: 4fef 002c lea %sp@(44),%sp
47dda: 4a84 tstl %d4
47ddc: 6608 bnes 47de6 <_Heap_Walk+0x74>
(*printer)( source, true, "page size is zero\n" );
47dde: 4879 0005 d507 pea 5d507 <_Copyright_Notice+0x125>
47de4: 6076 bras 47e5c <_Heap_Walk+0xea>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
47de6: 7003 moveq #3,%d0
47de8: c084 andl %d4,%d0
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
47dea: 670c beqs 47df8 <_Heap_Walk+0x86>
(*printer)(
47dec: 2f04 movel %d4,%sp@-
47dee: 4879 0005 d51a pea 5d51a <_Copyright_Notice+0x138>
47df4: 6000 02a8 braw 4809e <_Heap_Walk+0x32c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47df8: 2205 movel %d5,%d1
47dfa: 4c44 1000 remul %d4,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
47dfe: 4a80 tstl %d0
47e00: 670c beqs 47e0e <_Heap_Walk+0x9c>
(*printer)(
47e02: 2f05 movel %d5,%sp@-
47e04: 4879 0005 d538 pea 5d538 <_Copyright_Notice+0x156>
47e0a: 6000 0292 braw 4809e <_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;
47e0e: 200c movel %a4,%d0
47e10: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47e12: 4c44 0001 remul %d4,%d1,%d0
);
return false;
}
if (
47e16: 4a81 tstl %d1
47e18: 670c beqs 47e26 <_Heap_Walk+0xb4>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
47e1a: 2f0c movel %a4,%sp@-
47e1c: 4879 0005 d55c pea 5d55c <_Copyright_Notice+0x17a>
47e22: 6000 027a braw 4809e <_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;
47e26: 7001 moveq #1,%d0
47e28: c0ac 0004 andl %a4@(4),%d0
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
47e2c: 6608 bnes 47e36 <_Heap_Walk+0xc4>
(*printer)(
47e2e: 4879 0005 d58d pea 5d58d <_Copyright_Notice+0x1ab>
47e34: 6026 bras 47e5c <_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;
47e36: 70fe moveq #-2,%d0
47e38: 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);
47e3a: 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;
47e3c: 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);
47e40: 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;
47e42: 7001 moveq #1,%d0
47e44: c0ad 0004 andl %a5@(4),%d0
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
47e48: 6608 bnes 47e52 <_Heap_Walk+0xe0>
(*printer)(
47e4a: 4879 0005 d5bb pea 5d5bb <_Copyright_Notice+0x1d9>
47e50: 600a bras 47e5c <_Heap_Walk+0xea>
);
return false;
}
if (
47e52: b9cd cmpal %a5,%a4
47e54: 6716 beqs 47e6c <_Heap_Walk+0xfa>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
47e56: 4879 0005 d5d0 pea 5d5d0 <_Copyright_Notice+0x1ee>
47e5c: 4878 0001 pea 1 <ADD>
47e60: 2f02 movel %d2,%sp@-
47e62: 4e92 jsr %a2@
47e64: 4fef 000c lea %sp@(12),%sp
47e68: 6000 0228 braw 48092 <_Heap_Walk+0x320>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
47e6c: 222b 0010 movel %a3@(16),%d1
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
47e70: 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;
47e72: 206b 0008 moveal %a3@(8),%a0
47e76: 6074 bras 47eec <_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;
47e78: b1eb 0020 cmpal %a3@(32),%a0
47e7c: 650c bcss 47e8a <_Heap_Walk+0x118>
47e7e: b1eb 0024 cmpal %a3@(36),%a0
47e82: 53c0 sls %d0
47e84: 49c0 extbl %d0
47e86: 4480 negl %d0
47e88: 6002 bras 47e8c <_Heap_Walk+0x11a>
47e8a: 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 ) ) {
47e8c: 0800 0000 btst #0,%d0
47e90: 660c bnes 47e9e <_Heap_Walk+0x12c>
(*printer)(
47e92: 2f08 movel %a0,%sp@-
47e94: 4879 0005 d5ff pea 5d5ff <_Copyright_Notice+0x21d>
47e9a: 6000 0202 braw 4809e <_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;
47e9e: 2008 movel %a0,%d0
47ea0: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47ea2: 4c41 0003 remul %d1,%d3,%d0
);
return false;
}
if (
47ea6: 4a83 tstl %d3
47ea8: 670c beqs 47eb6 <_Heap_Walk+0x144>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
47eaa: 2f08 movel %a0,%sp@-
47eac: 4879 0005 d61f pea 5d61f <_Copyright_Notice+0x23d>
47eb2: 6000 01ea braw 4809e <_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;
47eb6: 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;
47eb8: 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;
47eba: 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;
47ebe: c6b0 0804 andl %a0@(00000004,%d0:l),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
47ec2: 670c beqs 47ed0 <_Heap_Walk+0x15e>
(*printer)(
47ec4: 2f08 movel %a0,%sp@-
47ec6: 4879 0005 d64f pea 5d64f <_Copyright_Notice+0x26d>
47ecc: 6000 01d0 braw 4809e <_Heap_Walk+0x32c>
);
return false;
}
if ( free_block->prev != prev_block ) {
47ed0: 2028 000c movel %a0@(12),%d0
47ed4: b3c0 cmpal %d0,%a1
47ed6: 670e beqs 47ee6 <_Heap_Walk+0x174>
(*printer)(
47ed8: 2f00 movel %d0,%sp@-
47eda: 2f08 movel %a0,%sp@-
47edc: 4879 0005 d66b pea 5d66b <_Copyright_Notice+0x289>
47ee2: 6000 00aa braw 47f8e <_Heap_Walk+0x21c>
return false;
}
prev_block = free_block;
free_block = free_block->next;
47ee6: 2248 moveal %a0,%a1
47ee8: 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 ) {
47eec: b7c8 cmpal %a0,%a3
47eee: 6688 bnes 47e78 <_Heap_Walk+0x106>
47ef0: 284d moveal %a5,%a4
block = next_block;
} while ( block != first_block );
return true;
}
47ef2: 202c 0004 movel %a4@(4),%d0
47ef6: 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;
47ef8: 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;
47efa: 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;
47efc: 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;
47efe: 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;
47f02: bc8c cmpl %a4,%d6
47f04: 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);
47f06: 2e03 movel %d3,%d7
47f08: de8c addl %a4,%d7
47f0a: 2001 movel %d1,%d0
47f0c: 4480 negl %d0
47f0e: 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;
47f12: beab 0020 cmpl %a3@(32),%d7
47f16: 650c bcss 47f24 <_Heap_Walk+0x1b2> <== NEVER TAKEN
47f18: beab 0024 cmpl %a3@(36),%d7
47f1c: 53c0 sls %d0
47f1e: 49c0 extbl %d0
47f20: 4480 negl %d0
47f22: 6002 bras 47f26 <_Heap_Walk+0x1b4>
47f24: 4280 clrl %d0 <== NOT EXECUTED
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
47f26: 0800 0000 btst #0,%d0
47f2a: 660c bnes 47f38 <_Heap_Walk+0x1c6>
(*printer)(
47f2c: 2f07 movel %d7,%sp@-
47f2e: 2f0c movel %a4,%sp@-
47f30: 4879 0005 d69d pea 5d69d <_Copyright_Notice+0x2bb>
47f36: 6056 bras 47f8e <_Heap_Walk+0x21c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
47f38: 2203 movel %d3,%d1
47f3a: 4c44 1000 remul %d4,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
47f3e: 4a80 tstl %d0
47f40: 6712 beqs 47f54 <_Heap_Walk+0x1e2>
47f42: 4a2e fffb tstb %fp@(-5)
47f46: 6756 beqs 47f9e <_Heap_Walk+0x22c>
(*printer)(
47f48: 2f03 movel %d3,%sp@-
47f4a: 2f0c movel %a4,%sp@-
47f4c: 4879 0005 d6ca pea 5d6ca <_Copyright_Notice+0x2e8>
47f52: 603a bras 47f8e <_Heap_Walk+0x21c>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
47f54: ba83 cmpl %d3,%d5
47f56: 6322 blss 47f7a <_Heap_Walk+0x208>
47f58: 4a2e fffb tstb %fp@(-5)
47f5c: 6740 beqs 47f9e <_Heap_Walk+0x22c> <== NEVER TAKEN
(*printer)(
47f5e: 2f05 movel %d5,%sp@-
47f60: 2f03 movel %d3,%sp@-
47f62: 2f0c movel %a4,%sp@-
47f64: 4879 0005 d6f8 pea 5d6f8 <_Copyright_Notice+0x316>
47f6a: 4878 0001 pea 1 <ADD>
47f6e: 2f02 movel %d2,%sp@-
47f70: 4e92 jsr %a2@
block,
block_size,
min_block_size
);
return false;
47f72: 4fef 0018 lea %sp@(24),%sp
47f76: 6000 011a braw 48092 <_Heap_Walk+0x320>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
47f7a: b9c7 cmpal %d7,%a4
47f7c: 6520 bcss 47f9e <_Heap_Walk+0x22c>
47f7e: 4a2e fffb tstb %fp@(-5)
47f82: 671a beqs 47f9e <_Heap_Walk+0x22c>
(*printer)(
47f84: 2f07 movel %d7,%sp@-
47f86: 2f0c movel %a4,%sp@-
47f88: 4879 0005 d723 pea 5d723 <_Copyright_Notice+0x341>
47f8e: 4878 0001 pea 1 <ADD>
47f92: 2f02 movel %d2,%sp@-
47f94: 4e92 jsr %a2@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
47f96: 4fef 0014 lea %sp@(20),%sp
47f9a: 6000 00f6 braw 48092 <_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;
47f9e: 7001 moveq #1,%d0
47fa0: 2047 moveal %d7,%a0
47fa2: c0a8 0004 andl %a0@(4),%d0
}
if ( !_Heap_Is_prev_used( next_block ) ) {
47fa6: 6600 00ac bnew 48054 <_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;
47faa: 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 ?
47fae: 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)(
47fb2: b1eb 000c cmpal %a3@(12),%a0
47fb6: 6712 beqs 47fca <_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)" : "")
47fb8: 43f9 0005 d31e lea 5d31e <rtems_termios_baud_table+0x10a>,%a1
47fbe: b7c8 cmpal %a0,%a3
47fc0: 660e bnes 47fd0 <_Heap_Walk+0x25e>
47fc2: 43f9 0005 d452 lea 5d452 <_Copyright_Notice+0x70>,%a1
47fc8: 6006 bras 47fd0 <_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)(
47fca: 43f9 0005 d443 lea 5d443 <_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 ?
47fd0: 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)(
47fd4: b280 cmpl %d0,%d1
47fd6: 6712 beqs 47fea <_Heap_Walk+0x278>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
47fd8: 223c 0005 d31e movel #381726,%d1
47fde: b7c0 cmpal %d0,%a3
47fe0: 660e bnes 47ff0 <_Heap_Walk+0x27e>
47fe2: 223c 0005 d46c movel #382060,%d1
47fe8: 6006 bras 47ff0 <_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)(
47fea: 223c 0005 d45c movel #382044,%d1
47ff0: 2f09 movel %a1,%sp@-
47ff2: 2f08 movel %a0,%sp@-
47ff4: 2f01 movel %d1,%sp@-
47ff6: 2f00 movel %d0,%sp@-
47ff8: 2f03 movel %d3,%sp@-
47ffa: 2f0c movel %a4,%sp@-
47ffc: 4879 0005 d757 pea 5d757 <_Copyright_Notice+0x375>
48002: 42a7 clrl %sp@-
48004: 2f02 movel %d2,%sp@-
48006: 4e92 jsr %a2@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
48008: 4fef 0024 lea %sp@(36),%sp
4800c: 2047 moveal %d7,%a0
4800e: 2010 movel %a0@,%d0
48010: b083 cmpl %d3,%d0
48012: 671c beqs 48030 <_Heap_Walk+0x2be>
(*printer)(
48014: 2f07 movel %d7,%sp@-
48016: 2f00 movel %d0,%sp@-
48018: 2f03 movel %d3,%sp@-
4801a: 2f0c movel %a4,%sp@-
4801c: 4879 0005 d78c pea 5d78c <_Copyright_Notice+0x3aa>
48022: 4878 0001 pea 1 <ADD>
48026: 2f02 movel %d2,%sp@-
48028: 4e92 jsr %a2@
4802a: 4fef 001c lea %sp@(28),%sp
4802e: 6062 bras 48092 <_Heap_Walk+0x320>
);
return false;
}
if ( !prev_used ) {
48030: 4aae fffc tstl %fp@(-4)
48034: 660a bnes 48040 <_Heap_Walk+0x2ce>
(*printer)(
48036: 2f0c movel %a4,%sp@-
48038: 4879 0005 d7c5 pea 5d7c5 <_Copyright_Notice+0x3e3>
4803e: 605e bras 4809e <_Heap_Walk+0x32c>
48040: 206b 0008 moveal %a3@(8),%a0
48044: 6008 bras 4804e <_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 ) {
48046: b9c8 cmpal %a0,%a4
48048: 673c beqs 48086 <_Heap_Walk+0x314>
return true;
}
free_block = free_block->next;
4804a: 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 ) {
4804e: b7c8 cmpal %a0,%a3
48050: 66f4 bnes 48046 <_Heap_Walk+0x2d4>
48052: 6042 bras 48096 <_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) {
48054: 4aae fffc tstl %fp@(-4)
48058: 6716 beqs 48070 <_Heap_Walk+0x2fe>
(*printer)(
4805a: 2f03 movel %d3,%sp@-
4805c: 2f0c movel %a4,%sp@-
4805e: 4879 0005 d7f4 pea 5d7f4 <_Copyright_Notice+0x412>
48064: 42a7 clrl %sp@-
48066: 2f02 movel %d2,%sp@-
48068: 4e92 jsr %a2@
4806a: 4fef 0014 lea %sp@(20),%sp
4806e: 6016 bras 48086 <_Heap_Walk+0x314>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
48070: 2f14 movel %a4@,%sp@-
48072: 2f03 movel %d3,%sp@-
48074: 2f0c movel %a4,%sp@-
48076: 4879 0005 d80b pea 5d80b <_Copyright_Notice+0x429>
4807c: 42a7 clrl %sp@-
4807e: 2f02 movel %d2,%sp@-
48080: 4e92 jsr %a2@
48082: 4fef 0018 lea %sp@(24),%sp
48086: 2847 moveal %d7,%a4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
48088: bbc7 cmpal %d7,%a5
4808a: 6600 fe66 bnew 47ef2 <_Heap_Walk+0x180>
4808e: 6000 fd1c braw 47dac <_Heap_Walk+0x3a>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48092: 4200 clrb %d0
48094: 6016 bras 480ac <_Heap_Walk+0x33a>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48096: 2f0c movel %a4,%sp@-
48098: 4879 0005 d830 pea 5d830 <_Copyright_Notice+0x44e>
4809e: 4878 0001 pea 1 <ADD>
480a2: 2f02 movel %d2,%sp@-
480a4: 4e92 jsr %a2@
480a6: 4fef 0010 lea %sp@(16),%sp
480aa: 60e6 bras 48092 <_Heap_Walk+0x320>
block = next_block;
} while ( block != first_block );
return true;
}
480ac: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
480b2: 4e5e unlk %fp
...
00047550 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47550: 4e56 ffe8 linkw %fp,#-24
47554: 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 );
47558: 4879 0004 90c6 pea 490c6 <_User_extensions_Fatal_visitor>
4755e: 262e 0008 movel %fp@(8),%d3
47562: 486e fff6 pea %fp@(-10)
47566: 242e 0010 movel %fp@(16),%d2
4756a: 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 };
4756e: 2d43 fff6 movel %d3,%fp@(-10)
47572: 1d44 fffa moveb %d4,%fp@(-6)
47576: 2d42 fffc movel %d2,%fp@(-4)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
4757a: 4eb9 0004 90f6 jsr 490f6 <_User_extensions_Iterate>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47580: 7005 moveq #5,%d0 <== NOT EXECUTED
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
47582: 23c3 0005 f300 movel %d3,5f300 <_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 );
47588: 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;
4758e: 13c4 0005 f304 moveb %d4,5f304 <_Internal_errors_What_happened+0x4><== NOT EXECUTED
_Internal_errors_What_happened.the_error = the_error;
47594: 23c2 0005 f306 movel %d2,5f306 <_Internal_errors_What_happened+0x6><== NOT EXECUTED
4759a: 23c0 0005 f30a movel %d0,5f30a <_System_state_Current> <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
475a0: 40c0 movew %sr,%d0 <== NOT EXECUTED
475a2: 8083 orl %d3,%d0 <== NOT EXECUTED
475a4: 46c0 movew %d0,%sr <== NOT EXECUTED
475a6: 2002 movel %d2,%d0 <== NOT EXECUTED
475a8: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED
475ae: 4ac8 halt <== NOT EXECUTED
475b0: 508f addql #8,%sp <== NOT EXECUTED
475b2: 60fe bras 475b2 <_Internal_error_Occurred+0x62> <== NOT EXECUTED
00047614 <_Objects_Allocate>:
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47614: 4e56 fff0 linkw %fp,#-16
47618: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4761c: 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 )
47620: 4aaa 0014 tstl %a2@(20)
47624: 6604 bnes 4762a <_Objects_Allocate+0x16> <== ALWAYS TAKEN
return NULL;
47626: 4280 clrl %d0
47628: 6066 bras 47690 <_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 );
4762a: 240a movel %a2,%d2
4762c: 0682 0000 001c addil #28,%d2
47632: 47f9 0004 6d5c lea 46d5c <_Chain_Get>,%a3
47638: 2f02 movel %d2,%sp@-
4763a: 4e93 jsr %a3@
if ( information->auto_extend ) {
4763c: 588f addql #4,%sp
4763e: 4a2a 0010 tstb %a2@(16)
47642: 674c beqs 47690 <_Objects_Allocate+0x7c>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47644: 4a80 tstl %d0
47646: 6612 bnes 4765a <_Objects_Allocate+0x46>
_Objects_Extend_information( information );
47648: 2f0a movel %a2,%sp@-
4764a: 4eb9 0004 76c8 jsr 476c8 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47650: 2f02 movel %d2,%sp@-
47652: 4e93 jsr %a3@
}
if ( the_object ) {
47654: 508f addql #8,%sp
47656: 4a80 tstl %d0
47658: 67cc beqs 47626 <_Objects_Allocate+0x12>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
4765a: 2040 moveal %d0,%a0
4765c: 242a 0006 movel %a2@(6),%d2
47660: 2228 0008 movel %a0@(8),%d1
47664: 0282 0000 ffff andil #65535,%d2
4766a: 0281 0000 ffff andil #65535,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47670: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47674: 9282 subl %d2,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47676: 4282 clrl %d2
47678: 342a 0012 movew %a2@(18),%d2
4767c: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
47680: e589 lsll #2,%d1
47682: d1c1 addal %d1,%a0
47684: 5390 subql #1,%a0@
information->inactive--;
47686: 322a 0028 movew %a2@(40),%d1
4768a: 5381 subql #1,%d1
4768c: 3541 0028 movew %d1,%a2@(40)
);
}
#endif
return the_object;
}
47690: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47696: 4e5e unlk %fp
...
0004769c <_Objects_Close>:
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
4769c: 4e56 0000 linkw %fp,#0
476a0: 226e 000c moveal %fp@(12),%a1
476a4: 206e 0008 moveal %fp@(8),%a0
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
476a8: 2029 0008 movel %a1@(8),%d0
476ac: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
476ae: 2468 0018 moveal %a0@(24),%a2
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
476b2: 0280 0000 ffff andil #65535,%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
476b8: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
476bc: 245f moveal %sp@+,%a2
476be: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
476c0: 4ef9 0004 7bd4 jmp 47bd4 <_Objects_Namespace_remove>
...
000479dc <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
479dc: 4e56 0000 linkw %fp,#0
479e0: 2f03 movel %d3,%sp@-
479e2: 362e 000e movew %fp@(14),%d3
479e6: 2f02 movel %d2,%sp@-
479e8: 242e 0008 movel %fp@(8),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
479ec: 4a43 tstw %d3
479ee: 6604 bnes 479f4 <_Objects_Get_information+0x18>
return NULL;
479f0: 4280 clrl %d0
479f2: 6034 bras 47a28 <_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 );
479f4: 2f02 movel %d2,%sp@-
479f6: 4eb9 0004 b6d0 jsr 4b6d0 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
479fc: 588f addql #4,%sp
479fe: 4a80 tstl %d0
47a00: 67ee beqs 479f0 <_Objects_Get_information+0x14>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47a02: 0283 0000 ffff andil #65535,%d3
47a08: b083 cmpl %d3,%d0
47a0a: 65e4 bcss 479f0 <_Objects_Get_information+0x14>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47a0c: 41f9 0005 ee92 lea 5ee92 <_Objects_Information_table>,%a0
47a12: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0
47a16: 4a88 tstl %a0
47a18: 67d6 beqs 479f0 <_Objects_Get_information+0x14> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47a1a: 2030 3c00 movel %a0@(00000000,%d3:l:4),%d0
if ( !info )
47a1e: 67d0 beqs 479f0 <_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 )
47a20: 2040 moveal %d0,%a0
47a22: 4a68 000e tstw %a0@(14)
47a26: 67c8 beqs 479f0 <_Objects_Get_information+0x14>
return NULL;
#endif
return info;
}
47a28: 242e fff8 movel %fp@(-8),%d2
47a2c: 262e fffc movel %fp@(-4),%d3
47a30: 4e5e unlk %fp <== NOT EXECUTED
000516c8 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
516c8: 4e56 ffe4 linkw %fp,#-28
516cc: 48d7 041c moveml %d2-%d4/%a2,%sp@
516d0: 262e 0008 movel %fp@(8),%d3
516d4: 282e 000c movel %fp@(12),%d4
516d8: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
516dc: 4a84 tstl %d4
516de: 6604 bnes 516e4 <_Objects_Get_name_as_string+0x1c>
516e0: 6000 00ba braw 5179c <_Objects_Get_name_as_string+0xd4>
return NULL;
if ( name == NULL )
516e4: 4a82 tstl %d2
516e6: 6700 00b4 beqw 5179c <_Objects_Get_name_as_string+0xd4>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
516ea: 4a83 tstl %d3
516ec: 660a bnes 516f8 <_Objects_Get_name_as_string+0x30>
516ee: 2079 0006 a5d2 moveal 6a5d2 <_Per_CPU_Information+0xe>,%a0
516f4: 2628 0008 movel %a0@(8),%d3
information = _Objects_Get_information_id( tmpId );
516f8: 2f03 movel %d3,%sp@-
516fa: 4eb9 0004 aee8 jsr 4aee8 <_Objects_Get_information_id>
if ( !information )
51700: 588f addql #4,%sp
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
information = _Objects_Get_information_id( tmpId );
51702: 2440 moveal %d0,%a2
if ( !information )
51704: 4a80 tstl %d0
51706: 6700 0094 beqw 5179c <_Objects_Get_name_as_string+0xd4>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
5170a: 486e fff6 pea %fp@(-10)
5170e: 2f03 movel %d3,%sp@-
51710: 2f00 movel %d0,%sp@-
51712: 4eb9 0004 afc4 jsr 4afc4 <_Objects_Get>
switch ( location ) {
51718: 4fef 000c lea %sp@(12),%sp
5171c: 4aae fff6 tstl %fp@(-10)
51720: 667a bnes 5179c <_Objects_Get_name_as_string+0xd4>
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
s = the_object->name.name_p;
51722: 2040 moveal %d0,%a0
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
51724: 4a2a 0032 tstb %a2@(50)
51728: 670a beqs 51734 <_Objects_Get_name_as_string+0x6c>
s = the_object->name.name_p;
5172a: 2028 000c movel %a0@(12),%d0
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
5172e: 6632 bnes 51762 <_Objects_Get_name_as_string+0x9a><== NEVER TAKEN
51730: 2042 moveal %d2,%a0
51732: 605e bras 51792 <_Objects_Get_name_as_string+0xca>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
51734: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
51738: 7618 moveq #24,%d3
5173a: 2200 movel %d0,%d1
5173c: e6a9 lsrl %d3,%d1
5173e: 1d41 fffb moveb %d1,%fp@(-5)
lname[ 1 ] = (u32_name >> 16) & 0xff;
51742: 2200 movel %d0,%d1
51744: 4241 clrw %d1
51746: 4841 swap %d1
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
51748: 1d40 fffe moveb %d0,%fp@(-2)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
5174c: 1d41 fffc moveb %d1,%fp@(-4)
lname[ 2 ] = (u32_name >> 8) & 0xff;
51750: 2200 movel %d0,%d1
51752: e089 lsrl #8,%d1
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
51754: 4200 clrb %d0
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
51756: 1d41 fffd moveb %d1,%fp@(-3)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
5175a: 1d40 ffff moveb %d0,%fp@(-1)
s = lname;
5175e: 200e movel %fp,%d0
51760: 5b80 subql #5,%d0
51762: 2240 moveal %d0,%a1
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
51764: 2042 moveal %d2,%a0
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
51766: 5384 subql #1,%d4
51768: 601c bras 51786 <_Objects_Get_name_as_string+0xbe>
*d = (isprint((unsigned char)*s)) ? *s : '*';
5176a: 4281 clrl %d1
5176c: 1200 moveb %d0,%d1
5176e: 2479 0006 83e0 moveal 683e0 <__ctype_ptr__>,%a2
51774: 1232 1801 moveb %a2@(00000001,%d1:l),%d1
51778: 49c1 extbl %d1
5177a: 0281 0000 0097 andil #151,%d1
51780: 6602 bnes 51784 <_Objects_Get_name_as_string+0xbc>
51782: 702a moveq #42,%d0
51784: 10c0 moveb %d0,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
51786: 2008 movel %a0,%d0
51788: 9082 subl %d2,%d0
5178a: b880 cmpl %d0,%d4
5178c: 6304 blss 51792 <_Objects_Get_name_as_string+0xca>
5178e: 1019 moveb %a1@+,%d0
51790: 66d8 bnes 5176a <_Objects_Get_name_as_string+0xa2>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
51792: 4210 clrb %a0@
_Thread_Enable_dispatch();
51794: 4eb9 0004 bcc0 jsr 4bcc0 <_Thread_Enable_dispatch>
5179a: 6002 bras 5179e <_Objects_Get_name_as_string+0xd6>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
5179c: 4282 clrl %d2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
5179e: 2002 movel %d2,%d0
517a0: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2
517a6: 4e5e unlk %fp
...
00054c10 <_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;
54c10: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
54c12: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
54c14: 4e56 0000 linkw %fp,#0
54c18: 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;
54c1c: 90a8 0006 subl %a0@(6),%d0
54c20: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
54c24: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
54c28: 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 ) {
54c2c: b081 cmpl %d1,%d0
54c2e: 620e bhis 54c3e <_Objects_Get_no_protection+0x2e>
if ( (the_object = information->local_table[ index ]) != NULL ) {
54c30: 2068 0018 moveal %a0@(24),%a0
54c34: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
54c38: 6704 beqs 54c3e <_Objects_Get_no_protection+0x2e><== NEVER TAKEN
*location = OBJECTS_LOCAL;
54c3a: 4291 clrl %a1@
return the_object;
54c3c: 6006 bras 54c44 <_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;
54c3e: 7001 moveq #1,%d0
54c40: 2280 movel %d0,%a1@
return NULL;
54c42: 4280 clrl %d0
}
54c44: 4e5e unlk %fp <== NOT EXECUTED
0004b024 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
4b024: 4e56 fffc linkw %fp,#-4
4b028: 222e 0008 movel %fp@(8),%d1
4b02c: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
4b02e: 4a81 tstl %d1
4b030: 660a bnes 4b03c <_Objects_Id_to_name+0x18>
4b032: 2079 0006 a5d2 moveal 6a5d2 <_Per_CPU_Information+0xe>,%a0
4b038: 2228 0008 movel %a0@(8),%d1
4b03c: 7418 moveq #24,%d2
4b03e: 2001 movel %d1,%d0
4b040: e4a8 lsrl %d2,%d0
4b042: 143c 0007 moveb #7,%d2
4b046: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
4b048: 143c 0002 moveb #2,%d2
4b04c: 2040 moveal %d0,%a0
4b04e: 5388 subql #1,%a0
4b050: b488 cmpl %a0,%d2
4b052: 6442 bccs 4b096 <_Objects_Id_to_name+0x72>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
4b054: 7003 moveq #3,%d0
4b056: 604e bras 4b0a6 <_Objects_Id_to_name+0x82>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
4b058: 2001 movel %d1,%d0
4b05a: 741b moveq #27,%d2
4b05c: 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 ];
4b05e: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !information )
4b062: 4a88 tstl %a0
4b064: 67ee beqs 4b054 <_Objects_Id_to_name+0x30> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
4b066: 4a28 0032 tstb %a0@(50)
4b06a: 66e8 bnes 4b054 <_Objects_Id_to_name+0x30> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
4b06c: 486e fffc pea %fp@(-4)
4b070: 2f01 movel %d1,%sp@-
4b072: 2f08 movel %a0,%sp@-
4b074: 4eb9 0004 afc4 jsr 4afc4 <_Objects_Get>
if ( !the_object )
4b07a: 4fef 000c lea %sp@(12),%sp
4b07e: 4a80 tstl %d0
4b080: 67d2 beqs 4b054 <_Objects_Id_to_name+0x30>
return OBJECTS_INVALID_ID;
*name = the_object->name;
4b082: 206e 000c moveal %fp@(12),%a0
4b086: 2240 moveal %d0,%a1
4b088: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
4b08c: 4eb9 0004 bcc0 jsr 4bcc0 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
4b092: 4280 clrl %d0
4b094: 6010 bras 4b0a6 <_Objects_Id_to_name+0x82>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
4b096: 41f9 0006 a10e lea 6a10e <_Objects_Information_table>,%a0
4b09c: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
4b0a0: 4a88 tstl %a0
4b0a2: 66b4 bnes 4b058 <_Objects_Id_to_name+0x34>
4b0a4: 60ae bras 4b054 <_Objects_Id_to_name+0x30>
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
4b0a6: 242e fff8 movel %fp@(-8),%d2
4b0aa: 4e5e unlk %fp
...
000461e4 <_POSIX_Keys_Free_memory>:
#include <rtems/posix/key.h>
void _POSIX_Keys_Free_memory(
POSIX_Keys_Control *the_key
)
{
461e4: 4e56 0000 linkw %fp,#0
461e8: 2f0b movel %a3,%sp@-
uint32_t the_api;
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
_Workspace_Free( the_key->Values[ the_api ] );
461ea: 47f9 0004 a20c lea 4a20c <_Workspace_Free>,%a3
#include <rtems/posix/key.h>
void _POSIX_Keys_Free_memory(
POSIX_Keys_Control *the_key
)
{
461f0: 2f0a movel %a2,%sp@-
461f2: 246e 0008 moveal %fp@(8),%a2
uint32_t the_api;
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
_Workspace_Free( the_key->Values[ the_api ] );
461f6: 2f2a 0018 movel %a2@(24),%sp@-
461fa: 4e93 jsr %a3@
461fc: 2f2a 001c movel %a2@(28),%sp@-
46200: 4e93 jsr %a3@
46202: 2d6a 0020 0008 movel %a2@(32),%fp@(8)
46208: 508f addql #8,%sp
}
4620a: 246e fff8 moveal %fp@(-8),%a2
4620e: 266e fffc moveal %fp@(-4),%a3
46212: 4e5e unlk %fp
)
{
uint32_t the_api;
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
_Workspace_Free( the_key->Values[ the_api ] );
46214: 4ef9 0004 a20c jmp 4a20c <_Workspace_Free>
...
0004c8f8 <_POSIX_Keys_Run_destructors>:
4c8f8: 7218 moveq #24,%d1
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4c8fa: 4e56 ffe8 linkw %fp,#-24
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
4c8fe: 206e 0008 moveal %fp@(8),%a0
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4c902: 48d7 047c moveml %d2-%d6/%a2,%sp@
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
4c906: 2428 0008 movel %a0@(8),%d2
4c90a: 2002 movel %d2,%d0
4c90c: e2a8 lsrl %d1,%d0
4c90e: 123c 0007 moveb #7,%d1
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
4c912: 0282 0000 ffff andil #65535,%d2
4c918: c081 andl %d1,%d0
4c91a: e58a lsll #2,%d2
4c91c: 2a00 movel %d0,%d5
4c91e: 5a85 addql #5,%d5
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4c920: 4286 clrl %d6
4c922: 7601 moveq #1,%d3
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
4c924: 7201 moveq #1,%d1
for ( index = 1 ; index <= max ; ++index ) {
4c926: 3c39 0005 f200 movew 5f200 <_POSIX_Keys_Information+0xe>,%d6
4c92c: 6030 bras 4c95e <_POSIX_Keys_Run_destructors+0x66>
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
4c92e: 2079 0005 f20a moveal 5f20a <_POSIX_Keys_Information+0x18>,%a0
4c934: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
4c938: 4a88 tstl %a0
4c93a: 6720 beqs 4c95c <_POSIX_Keys_Run_destructors+0x64>
4c93c: 4aa8 0010 tstl %a0@(16)
4c940: 671a beqs 4c95c <_POSIX_Keys_Run_destructors+0x64>
void *value = key->Values [ thread_api ][ thread_index ];
4c942: 2470 5c00 moveal %a0@(00000000,%d5:l:4),%a2
4c946: d5c2 addal %d2,%a2
4c948: 2252 moveal %a2@,%a1
if ( value != NULL ) {
4c94a: 4a89 tstl %a1
4c94c: 670e beqs 4c95c <_POSIX_Keys_Run_destructors+0x64><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
4c94e: 4292 clrl %a2@ <== NOT EXECUTED
(*key->destructor)( value );
4c950: 2f09 movel %a1,%sp@- <== NOT EXECUTED
4c952: 2068 0010 moveal %a0@(16),%a0 <== NOT EXECUTED
4c956: 4e90 jsr %a0@ <== NOT EXECUTED
4c958: 588f addql #4,%sp <== NOT EXECUTED
done = false;
4c95a: 4201 clrb %d1 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4c95c: 5283 addql #1,%d3
4c95e: 4284 clrl %d4
4c960: 3803 movew %d3,%d4
4c962: bc84 cmpl %d4,%d6
4c964: 64c8 bccs 4c92e <_POSIX_Keys_Run_destructors+0x36>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
4c966: 4a01 tstb %d1
4c968: 67b6 beqs 4c920 <_POSIX_Keys_Run_destructors+0x28><== NEVER TAKEN
done = false;
}
}
}
}
}
4c96a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
4c970: 4e5e unlk %fp <== NOT EXECUTED
0004a750 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4a750: 4e56 ffe4 linkw %fp,#-28
4a754: 48d7 043c moveml %d2-%d5/%a2,%sp@
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
4a758: 486e fff8 pea %fp@(-8)
4a75c: 242e 0008 movel %fp@(8),%d2
4a760: 2f02 movel %d2,%sp@-
4a762: 4879 0006 70ca pea 670ca <_POSIX_Message_queue_Information_fds>
4a768: 246e 0014 moveal %fp@(20),%a2
4a76c: 162e 001b moveb %fp@(27),%d3
4a770: 4eb9 0004 d6b0 jsr 4d6b0 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4a776: 4fef 000c lea %sp@(12),%sp
4a77a: 4aae fff8 tstl %fp@(-8)
4a77e: 6600 00c0 bnew 4a840 <_POSIX_Message_queue_Receive_support+0xf0>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
4a782: 2040 moveal %d0,%a0
4a784: 7803 moveq #3,%d4
4a786: 7a01 moveq #1,%d5
4a788: 2228 0014 movel %a0@(20),%d1
4a78c: c881 andl %d1,%d4
4a78e: ba84 cmpl %d4,%d5
4a790: 660a bnes 4a79c <_POSIX_Message_queue_Receive_support+0x4c>
_Thread_Enable_dispatch();
4a792: 4eb9 0004 e324 jsr 4e324 <_Thread_Enable_dispatch>
4a798: 6000 00a6 braw 4a840 <_POSIX_Message_queue_Receive_support+0xf0>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4a79c: 2068 0010 moveal %a0@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4a7a0: 2028 0066 movel %a0@(102),%d0
4a7a4: b0ae 0010 cmpl %fp@(16),%d0
4a7a8: 6316 blss 4a7c0 <_POSIX_Message_queue_Receive_support+0x70>
_Thread_Enable_dispatch();
4a7aa: 4eb9 0004 e324 jsr 4e324 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4a7b0: 4eb9 0005 31a0 jsr 531a0 <__errno>
4a7b6: 727a moveq #122,%d1
4a7b8: 2040 moveal %d0,%a0
4a7ba: 2081 movel %d1,%a0@
4a7bc: 6000 008e braw 4a84c <_POSIX_Message_queue_Receive_support+0xfc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4a7c0: 70ff moveq #-1,%d0
4a7c2: 2d40 fffc movel %d0,%fp@(-4)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4a7c6: 4a03 tstb %d3
4a7c8: 670e beqs 4a7d8 <_POSIX_Message_queue_Receive_support+0x88>
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
4a7ca: 2001 movel %d1,%d0
4a7cc: 760e moveq #14,%d3
4a7ce: 7a01 moveq #1,%d5
4a7d0: e6a8 lsrl %d3,%d0
4a7d2: bb80 eorl %d5,%d0
4a7d4: c085 andl %d5,%d0
4a7d6: 6002 bras 4a7da <_POSIX_Message_queue_Receive_support+0x8a>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4a7d8: 4200 clrb %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4a7da: 2f2e 001c movel %fp@(28),%sp@-
4a7de: 7201 moveq #1,%d1
4a7e0: c280 andl %d0,%d1
4a7e2: 2f01 movel %d1,%sp@-
4a7e4: 486e fffc pea %fp@(-4)
4a7e8: 2f2e 000c movel %fp@(12),%sp@-
4a7ec: 2f02 movel %d2,%sp@-
4a7ee: 4868 001a pea %a0@(26)
4a7f2: 4eb9 0004 c75c jsr 4c75c <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4a7f8: 4eb9 0004 e324 jsr 4e324 <_Thread_Enable_dispatch>
4a7fe: 2079 0006 714e moveal 6714e <_Per_CPU_Information+0xe>,%a0
if (msg_prio) {
4a804: 4fef 0018 lea %sp@(24),%sp
4a808: 4a8a tstl %a2
4a80a: 670a beqs 4a816 <_POSIX_Message_queue_Receive_support+0xc6><== NEVER TAKEN
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return (unsigned int) ((priority >= 0) ? priority : -priority);
4a80c: 2028 0024 movel %a0@(36),%d0
4a810: 6c02 bges 4a814 <_POSIX_Message_queue_Receive_support+0xc4>
4a812: 4480 negl %d0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
4a814: 2480 movel %d0,%a2@
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
4a816: 4aa8 0034 tstl %a0@(52)
4a81a: 6606 bnes 4a822 <_POSIX_Message_queue_Receive_support+0xd2>
return length_out;
4a81c: 202e fffc movel %fp@(-4),%d0
4a820: 602c bras 4a84e <_POSIX_Message_queue_Receive_support+0xfe>
rtems_set_errno_and_return_minus_one(
4a822: 4eb9 0005 31a0 jsr 531a0 <__errno>
4a828: 2079 0006 714e moveal 6714e <_Per_CPU_Information+0xe>,%a0
4a82e: 2440 moveal %d0,%a2
4a830: 2f28 0034 movel %a0@(52),%sp@-
4a834: 4eb9 0004 aa68 jsr 4aa68 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
4a83a: 588f addql #4,%sp
4a83c: 2480 movel %d0,%a2@
4a83e: 600c bras 4a84c <_POSIX_Message_queue_Receive_support+0xfc>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4a840: 4eb9 0005 31a0 jsr 531a0 <__errno>
4a846: 2040 moveal %d0,%a0
4a848: 7009 moveq #9,%d0
4a84a: 2080 movel %d0,%a0@
4a84c: 70ff moveq #-1,%d0
}
4a84e: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2
4a854: 4e5e unlk %fp <== NOT EXECUTED
0004c93c <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
4c93c: 4e56 0000 linkw %fp,#0
4c940: 2f0a movel %a2,%sp@-
4c942: 2f02 movel %d2,%sp@-
4c944: 242e 0008 movel %fp@(8),%d2
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
4c948: 4aae 0010 tstl %fp@(16)
4c94c: 670e beqs 4c95c <_POSIX_Semaphore_Create_support+0x20>
rtems_set_errno_and_return_minus_one( ENOSYS );
4c94e: 4eb9 0004 ea90 jsr 4ea90 <__errno>
4c954: 7458 moveq #88,%d2
4c956: 2040 moveal %d0,%a0
4c958: 2082 movel %d2,%a0@
4c95a: 6034 bras 4c990 <_POSIX_Semaphore_Create_support+0x54>
*
* 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;
4c95c: 2039 0006 3440 movel 63440 <_Thread_Dispatch_disable_level>,%d0
++level;
4c962: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
4c964: 23c0 0006 3440 movel %d0,63440 <_Thread_Dispatch_disable_level>
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
4c96a: 4879 0006 365c pea 6365c <_POSIX_Semaphore_Information>
4c970: 4eb9 0004 8ea0 jsr 48ea0 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
4c976: 588f addql #4,%sp
4c978: 2440 moveal %d0,%a2
4c97a: 4a80 tstl %d0
4c97c: 6618 bnes 4c996 <_POSIX_Semaphore_Create_support+0x5a>
_Thread_Enable_dispatch();
4c97e: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
4c984: 4eb9 0004 ea90 jsr 4ea90 <__errno>
4c98a: 721c moveq #28,%d1
4c98c: 2040 moveal %d0,%a0
4c98e: 2081 movel %d1,%a0@
4c990: 70ff moveq #-1,%d0
4c992: 6000 00a8 braw 4ca3c <_POSIX_Semaphore_Create_support+0x100>
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
4c996: 4a82 tstl %d2
4c998: 6736 beqs 4c9d0 <_POSIX_Semaphore_Create_support+0x94>
name = _Workspace_String_duplicate( name_arg, name_len );
4c99a: 2f2e 000c movel %fp@(12),%sp@-
4c99e: 2f02 movel %d2,%sp@-
4c9a0: 4eb9 0004 d6f8 jsr 4d6f8 <_Workspace_String_duplicate>
if ( !name ) {
4c9a6: 508f addql #8,%sp
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
name = _Workspace_String_duplicate( name_arg, name_len );
4c9a8: 2400 movel %d0,%d2
if ( !name ) {
4c9aa: 6626 bnes 4c9d2 <_POSIX_Semaphore_Create_support+0x96><== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
4c9ac: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c9ae: 4879 0006 365c pea 6365c <_POSIX_Semaphore_Information> <== NOT EXECUTED
4c9b4: 4eb9 0004 91b0 jsr 491b0 <_Objects_Free> <== NOT EXECUTED
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4c9ba: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
4c9c0: 4eb9 0004 ea90 jsr 4ea90 <__errno> <== NOT EXECUTED
4c9c6: 508f addql #8,%sp <== NOT EXECUTED
4c9c8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c9ca: 700c moveq #12,%d0 <== NOT EXECUTED
4c9cc: 2080 movel %d0,%a0@ <== NOT EXECUTED
4c9ce: 60c0 bras 4c990 <_POSIX_Semaphore_Create_support+0x54><== NOT EXECUTED
}
} else {
name = NULL;
4c9d0: 4282 clrl %d2
}
the_semaphore->process_shared = pshared;
4c9d2: 42aa 0010 clrl %a2@(16)
if ( name ) {
4c9d6: 4a82 tstl %d2
4c9d8: 670e beqs 4c9e8 <_POSIX_Semaphore_Create_support+0xac>
the_semaphore->named = true;
4c9da: 7001 moveq #1,%d0
4c9dc: 1540 0014 moveb %d0,%a2@(20)
the_semaphore->open_count = 1;
4c9e0: 7001 moveq #1,%d0
4c9e2: 2540 0016 movel %d0,%a2@(22)
4c9e6: 600a bras 4c9f2 <_POSIX_Semaphore_Create_support+0xb6>
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
the_semaphore->open_count = 0;
4c9e8: 42aa 0016 clrl %a2@(22)
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
4c9ec: 4200 clrb %d0
4c9ee: 1540 0014 moveb %d0,%a2@(20)
* blocking tasks on this semaphore should be. It could somehow
* be derived from the current scheduling policy. One
* thing is certain, no matter what we decide, it won't be
* the same as all other POSIX implementations. :)
*/
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
4c9f2: 42aa 005e clrl %a2@(94)
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
the_semaphore->open_count = 0;
the_semaphore->linked = false;
4c9f6: 1540 0015 moveb %d0,%a2@(21)
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
4c9fa: 70ff moveq #-1,%d0
4c9fc: 2540 005a movel %d0,%a2@(90)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
4ca00: 2f2e 0014 movel %fp@(20),%sp@-
4ca04: 486a 005a pea %a2@(90)
4ca08: 486a 001a pea %a2@(26)
4ca0c: 4eb9 0004 8900 jsr 48900 <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
4ca12: 202a 0008 movel %a2@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4ca16: 2079 0006 3674 moveal 63674 <_POSIX_Semaphore_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
4ca1c: 0280 0000 ffff andil #65535,%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4ca22: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
4ca26: 206e 0018 moveal %fp@(24),%a0
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
4ca2a: 2542 000c movel %d2,%a2@(12)
4ca2e: 208a movel %a2,%a0@
_Thread_Enable_dispatch();
4ca30: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
return 0;
4ca36: 4fef 000c lea %sp@(12),%sp
4ca3a: 4280 clrl %d0
}
4ca3c: 242e fff8 movel %fp@(-8),%d2
4ca40: 246e fffc moveal %fp@(-4),%a2
4ca44: 4e5e unlk %fp <== NOT EXECUTED
0004a9a0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
4a9a0: 4e56 0000 linkw %fp,#0
4a9a4: 226e 0008 moveal %fp@(8),%a1
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4a9a8: 2069 00fe moveal %a1@(254),%a0
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4a9ac: 4aa8 00d8 tstl %a0@(216)
4a9b0: 662c bnes 4a9de <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3e><== NEVER TAKEN
4a9b2: 7001 moveq #1,%d0
4a9b4: b0a8 00dc cmpl %a0@(220),%d0
4a9b8: 6624 bnes 4a9de <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3e>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
4a9ba: 4aa8 00e0 tstl %a0@(224)
4a9be: 671e beqs 4a9de <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3e>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
4a9c0: 4878 ffff pea ffffffff <LESS>
*
* 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;
4a9c4: 2039 0005 f31a movel 5f31a <_Thread_Dispatch_disable_level>,%d0
--level;
4a9ca: 5380 subql #1,%d0
4a9cc: 2f09 movel %a1,%sp@-
_Thread_Dispatch_disable_level = level;
4a9ce: 23c0 0005 f31a movel %d0,5f31a <_Thread_Dispatch_disable_level>
4a9d4: 4eb9 0004 b000 jsr 4b000 <_POSIX_Thread_Exit>
4a9da: 508f addql #8,%sp
4a9dc: 6008 bras 4a9e6 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x46>
} else
_Thread_Enable_dispatch();
}
4a9de: 4e5e unlk %fp
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
4a9e0: 4ef9 0004 8860 jmp 48860 <_Thread_Enable_dispatch>
}
4a9e6: 4e5e unlk %fp
...
0004bab8 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4bab8: 4e56 ffec linkw %fp,#-20
4babc: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4bac0: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4bac4: 2f12 movel %a2@,%sp@-
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4bac6: 242e 0008 movel %fp@(8),%d2
4baca: 266e 0010 moveal %fp@(16),%a3
4bace: 286e 0014 moveal %fp@(20),%a4
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4bad2: 4eb9 0004 ba90 jsr 4ba90 <_POSIX_Priority_Is_valid>
4bad8: 588f addql #4,%sp
4bada: 4a00 tstb %d0
4badc: 6604 bnes 4bae2 <_POSIX_Thread_Translate_sched_param+0x2a><== ALWAYS TAKEN
return EINVAL;
4bade: 7016 moveq #22,%d0
4bae0: 6078 bras 4bb5a <_POSIX_Thread_Translate_sched_param+0xa2>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4bae2: 4293 clrl %a3@
*budget_callout = NULL;
4bae4: 4294 clrl %a4@
if ( policy == SCHED_OTHER ) {
4bae6: 4a82 tstl %d2
4bae8: 6606 bnes 4baf0 <_POSIX_Thread_Translate_sched_param+0x38>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4baea: 7401 moveq #1,%d2
4baec: 2682 movel %d2,%a3@
4baee: 6068 bras 4bb58 <_POSIX_Thread_Translate_sched_param+0xa0>
return 0;
}
if ( policy == SCHED_FIFO ) {
4baf0: 7001 moveq #1,%d0
4baf2: b082 cmpl %d2,%d0
4baf4: 6762 beqs 4bb58 <_POSIX_Thread_Translate_sched_param+0xa0>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
4baf6: 103c 0002 moveb #2,%d0
4bafa: b082 cmpl %d2,%d0
4bafc: 6608 bnes 4bb06 <_POSIX_Thread_Translate_sched_param+0x4e>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4bafe: 7202 moveq #2,%d1
return 0;
4bb00: 4200 clrb %d0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4bb02: 2681 movel %d1,%a3@
return 0;
4bb04: 6054 bras 4bb5a <_POSIX_Thread_Translate_sched_param+0xa2>
}
if ( policy == SCHED_SPORADIC ) {
4bb06: 7004 moveq #4,%d0
4bb08: b082 cmpl %d2,%d0
4bb0a: 66d2 bnes 4bade <_POSIX_Thread_Translate_sched_param+0x26>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
4bb0c: 4aaa 0008 tstl %a2@(8)
4bb10: 6606 bnes 4bb18 <_POSIX_Thread_Translate_sched_param+0x60>
4bb12: 4aaa 000c tstl %a2@(12)
4bb16: 67c6 beqs 4bade <_POSIX_Thread_Translate_sched_param+0x26>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4bb18: 4aaa 0010 tstl %a2@(16)
4bb1c: 6606 bnes 4bb24 <_POSIX_Thread_Translate_sched_param+0x6c>
4bb1e: 4aaa 0014 tstl %a2@(20)
4bb22: 67ba beqs 4bade <_POSIX_Thread_Translate_sched_param+0x26>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4bb24: 486a 0008 pea %a2@(8)
4bb28: 4bf9 0004 9d80 lea 49d80 <_Timespec_To_ticks>,%a5
4bb2e: 4e95 jsr %a5@
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4bb30: 486a 0010 pea %a2@(16)
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4bb34: 2400 movel %d0,%d2
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4bb36: 4e95 jsr %a5@
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4bb38: 508f addql #8,%sp
4bb3a: b082 cmpl %d2,%d0
4bb3c: 62a0 bhis 4bade <_POSIX_Thread_Translate_sched_param+0x26>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4bb3e: 2f2a 0004 movel %a2@(4),%sp@-
4bb42: 4eb9 0004 ba90 jsr 4ba90 <_POSIX_Priority_Is_valid>
4bb48: 588f addql #4,%sp
4bb4a: 4a00 tstb %d0
4bb4c: 6790 beqs 4bade <_POSIX_Thread_Translate_sched_param+0x26>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4bb4e: 7003 moveq #3,%d0
4bb50: 2680 movel %d0,%a3@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4bb52: 28bc 0004 67e8 movel #288744,%a4@
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
4bb58: 4280 clrl %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4bb5a: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4bb60: 4e5e unlk %fp <== NOT EXECUTED
0004abf2 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
4abf2: 4e56 ffec linkw %fp,#-20
4abf6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4abfa: 246e 000c moveal %fp@(12),%a2
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
4abfe: 49f9 0004 8a0c lea 48a0c <_Thread_queue_Dequeue>,%a4
{
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
4ac04: 266a 00fe moveal %a2@(254),%a3
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
4ac08: 240b movel %a3,%d2
4ac0a: 0682 0000 0044 addil #68,%d2
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
4ac10: 2f0a movel %a2,%sp@-
4ac12: 4eb9 0004 c890 jsr 4c890 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
4ac18: 2f0a movel %a2,%sp@-
4ac1a: 4eb9 0004 c8f8 jsr 4c8f8 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
4ac20: 262a 0028 movel %a2@(40),%d3
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
4ac24: 508f addql #8,%sp
4ac26: 6008 bras 4ac30 <_POSIX_Threads_Delete_extension+0x3e>
*(void **)the_thread->Wait.return_argument = value_ptr;
4ac28: 2240 moveal %d0,%a1 <== NOT EXECUTED
4ac2a: 2069 0028 moveal %a1@(40),%a0 <== NOT EXECUTED
4ac2e: 2083 movel %d3,%a0@ <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
4ac30: 2f02 movel %d2,%sp@-
4ac32: 4e94 jsr %a4@
4ac34: 588f addql #4,%sp
4ac36: 4a80 tstl %d0
4ac38: 66ee bnes 4ac28 <_POSIX_Threads_Delete_extension+0x36><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
4ac3a: 103c 0004 moveb #4,%d0
4ac3e: b0ab 0084 cmpl %a3@(132),%d0
4ac42: 660c bnes 4ac50 <_POSIX_Threads_Delete_extension+0x5e>
(void) _Watchdog_Remove( &api->Sporadic_timer );
4ac44: 486b 00a8 pea %a3@(168)
4ac48: 4eb9 0004 92f8 jsr 492f8 <_Watchdog_Remove>
4ac4e: 588f addql #4,%sp
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
4ac50: 42aa 00fe clrl %a2@(254)
_Workspace_Free( api );
4ac54: 2d4b 0008 movel %a3,%fp@(8)
}
4ac58: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4ac5e: 4e5e unlk %fp
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
4ac60: 4ef9 0004 94d4 jmp 494d4 <_Workspace_Free>
00046528 <_POSIX_Threads_Initialize_user_threads_body>:
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
void _POSIX_Threads_Initialize_user_threads_body(void)
{
46528: 4e56 ff98 linkw %fp,#-104
4652c: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
46530: 2479 0005 e526 moveal 5e526 <Configuration_POSIX_API+0x34>,%a2
maximum = Configuration_POSIX_API.number_of_initialization_threads;
46536: 2839 0005 e522 movel 5e522 <Configuration_POSIX_API+0x30>,%d4
if ( !user_threads || maximum == 0 )
4653c: 4a8a tstl %a2
4653e: 676e beqs 465ae <_POSIX_Threads_Initialize_user_threads_body+0x86><== NEVER TAKEN
46540: 4a84 tstl %d4
46542: 676a beqs 465ae <_POSIX_Threads_Initialize_user_threads_body+0x86><== NEVER TAKEN
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
46544: 240e movel %fp,%d2
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
46546: 2a0e movel %fp,%d5
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
maximum = Configuration_POSIX_API.number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
46548: 4283 clrl %d3
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
4654a: 0682 ffff ffc0 addil #-64,%d2
46550: 47f9 0004 bb64 lea 4bb64 <pthread_attr_init>,%a3
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
46556: 49f9 0004 bb90 lea 4bb90 <pthread_attr_setinheritsched>,%a4
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
4655c: 4bf9 0004 bbc8 lea 4bbc8 <pthread_attr_setstacksize>,%a5
status = pthread_create(
46562: 0685 ffff ffbc addil #-68,%d5
46568: 2c3c 0004 6208 movel #287240,%d6
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
4656e: 2f02 movel %d2,%sp@-
46570: 4e93 jsr %a3@
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
46572: 4878 0002 pea 2 <DOUBLE_FLOAT>
46576: 2f02 movel %d2,%sp@-
46578: 4e94 jsr %a4@
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
4657a: 2f2a 0004 movel %a2@(4),%sp@-
4657e: 2f02 movel %d2,%sp@-
46580: 4e95 jsr %a5@
status = pthread_create(
46582: 2046 moveal %d6,%a0
46584: 42a7 clrl %sp@-
46586: 2f12 movel %a2@,%sp@-
46588: 508a addql #8,%a2
4658a: 2f02 movel %d2,%sp@-
4658c: 2f05 movel %d5,%sp@-
4658e: 4e90 jsr %a0@
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
46590: 4fef 0024 lea %sp@(36),%sp
46594: 4a80 tstl %d0
46596: 6710 beqs 465a8 <_POSIX_Threads_Initialize_user_threads_body+0x80>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
46598: 2f00 movel %d0,%sp@-
4659a: 4878 0001 pea 1 <ADD>
4659e: 4878 0002 pea 2 <DOUBLE_FLOAT>
465a2: 4eb9 0004 82f8 jsr 482f8 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
465a8: 5283 addql #1,%d3
465aa: b883 cmpl %d3,%d4
465ac: 66c0 bnes 4656e <_POSIX_Threads_Initialize_user_threads_body+0x46><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
465ae: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5
465b4: 4e5e unlk %fp <== NOT EXECUTED
0004ad60 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
4ad60: 4e56 0000 linkw %fp,#0
4ad64: 2f0b movel %a3,%sp@-
4ad66: 2f0a movel %a2,%sp@-
4ad68: 246e 000c moveal %fp@(12),%a2
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4ad6c: 266a 00fe moveal %a2@(254),%a3
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4ad70: 486b 0098 pea %a3@(152)
4ad74: 4eb9 0004 b9bc jsr 4b9bc <_Timespec_To_ticks>
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
4ad7a: 588f addql #4,%sp
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
4ad7c: 2540 0072 movel %d0,%a2@(114)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4ad80: 4280 clrl %d0
4ad82: 1039 0005 d5dc moveb 5d5dc <rtems_maximum_priority>,%d0
4ad88: 90ab 0088 subl %a3@(136),%d0
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
4ad8c: 2540 0018 movel %d0,%a2@(24)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
4ad90: 4aaa 001c tstl %a2@(28)
4ad94: 6618 bnes 4adae <_POSIX_Threads_Sporadic_budget_TSR+0x4e><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
4ad96: b0aa 0014 cmpl %a2@(20),%d0
4ad9a: 6412 bccs 4adae <_POSIX_Threads_Sporadic_budget_TSR+0x4e>
_Thread_Change_priority( the_thread, new_priority, true );
4ad9c: 4878 0001 pea 1 <ADD>
4ada0: 2f00 movel %d0,%sp@-
4ada2: 2f0a movel %a2,%sp@-
4ada4: 4eb9 0004 82ac jsr 482ac <_Thread_Change_priority>
4adaa: 4fef 000c lea %sp@(12),%sp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
4adae: 486b 0090 pea %a3@(144)
4adb2: 4eb9 0004 b9bc jsr 4b9bc <_Timespec_To_ticks>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
4adb8: 246e fff8 moveal %fp@(-8),%a2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4adbc: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4adbe: 2740 00b4 movel %d0,%a3@(180)
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
4adc2: 47eb 00a8 lea %a3@(168),%a3
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4adc6: 203c 0005 ef72 movel #388978,%d0
4adcc: 2d4b 000c movel %a3,%fp@(12)
}
4add0: 266e fffc moveal %fp@(-4),%a3
4add4: 2d40 0008 movel %d0,%fp@(8)
4add8: 4e5e unlk %fp
4adda: 4ef9 0004 91d4 jmp 491d4 <_Watchdog_Insert>
0004ade0 <_POSIX_Threads_Sporadic_budget_callout>:
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
4ade0: 70ff moveq #-1,%d0
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
4ade2: 4e56 0000 linkw %fp,#0
4ade6: 206e 0008 moveal %fp@(8),%a0
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
4adea: 2140 0072 movel %d0,%a0@(114)
4adee: 4280 clrl %d0
4adf0: 1039 0005 d5dc moveb 5d5dc <rtems_maximum_priority>,%d0
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4adf6: 2268 00fe moveal %a0@(254),%a1
4adfa: 90a9 008c subl %a1@(140),%d0
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
4adfe: 2140 0018 movel %d0,%a0@(24)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
4ae02: 4aa8 001c tstl %a0@(28)
4ae06: 6618 bnes 4ae20 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
4ae08: b0a8 0014 cmpl %a0@(20),%d0
4ae0c: 6312 blss 4ae20 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
4ae0e: 4878 0001 pea 1 <ADD>
4ae12: 2f00 movel %d0,%sp@-
4ae14: 2f08 movel %a0,%sp@-
4ae16: 4eb9 0004 82ac jsr 482ac <_Thread_Change_priority>
4ae1c: 4fef 000c lea %sp@(12),%sp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4ae20: 4e5e unlk %fp <== NOT EXECUTED
000460cc <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
460cc: 4e56 ffec linkw %fp,#-20
460d0: 48d7 040c moveml %d2-%d3/%a2,%sp@
460d4: 246e 000c moveal %fp@(12),%a2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
460d8: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
460dc: 4aaa 0052 tstl %a2@(82)
460e0: 6606 bnes 460e8 <_POSIX_Timer_TSR+0x1c>
460e2: 4aaa 0056 tstl %a2@(86)
460e6: 6776 beqs 4615e <_POSIX_Timer_TSR+0x92> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
460e8: 2f0a movel %a2,%sp@-
460ea: 4879 0004 60cc pea 460cc <_POSIX_Timer_TSR>
460f0: 2f2a 0008 movel %a2@(8),%sp@-
460f4: 2f2a 0062 movel %a2@(98),%sp@-
460f8: 486a 0010 pea %a2@(16)
460fc: 4eb9 0004 b624 jsr 4b624 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
46102: 4fef 0014 lea %sp@(20),%sp
46106: 4a00 tstb %d0
46108: 676e beqs 46178 <_POSIX_Timer_TSR+0xac> <== NEVER TAKEN
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
4610a: 4879 0005 f8d8 pea 5f8d8 <_TOD>
46110: 486e fff8 pea %fp@(-8)
46114: 4eb9 0004 7718 jsr 47718 <_TOD_Get_with_nanoseconds>
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
4611a: 2040 moveal %d0,%a0
4611c: 2410 movel %a0@,%d2
4611e: 2628 0004 movel %a0@(4),%d3
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
46122: 2f3c 3b9a ca00 movel #1000000000,%sp@-
46128: 42a7 clrl %sp@-
4612a: 2f03 movel %d3,%sp@-
4612c: 2f02 movel %d2,%sp@-
4612e: 4eb9 0005 a1d4 jsr 5a1d4 <__divdi3>
46134: 4fef 0010 lea %sp@(16),%sp
46138: 2541 006a movel %d1,%a2@(106)
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
4613c: 2f3c 3b9a ca00 movel #1000000000,%sp@-
46142: 42a7 clrl %sp@-
46144: 2f03 movel %d3,%sp@-
46146: 2f02 movel %d2,%sp@-
46148: 4eb9 0005 a634 jsr 5a634 <__moddi3>
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
4614e: 4fef 0018 lea %sp@(24),%sp
46152: 7003 moveq #3,%d0
46154: 2541 006e movel %d1,%a2@(110)
46158: 1540 003c moveb %d0,%a2@(60)
4615c: 6006 bras 46164 <_POSIX_Timer_TSR+0x98>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
4615e: 7004 moveq #4,%d0 <== NOT EXECUTED
46160: 1540 003c moveb %d0,%a2@(60) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
46164: 2f2a 0042 movel %a2@(66),%sp@-
46168: 2f2a 0038 movel %a2@(56),%sp@-
4616c: 4eb9 0004 b218 jsr 4b218 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
46172: 508f addql #8,%sp
46174: 42aa 0066 clrl %a2@(102)
}
46178: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
4617e: 4e5e unlk %fp
...
0004c974 <_POSIX_signals_Check_signal>:
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c974: 4280 clrl %d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c976: 4e56 ffb4 linkw %fp,#-76
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c97a: 102e 0013 moveb %fp@(19),%d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c97e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c982: 4878 0001 pea 1 <ADD>
4c986: 2a0e movel %fp,%d5
4c988: 0685 ffff ffcc addil #-52,%d5
4c98e: 2f00 movel %d0,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c990: 242e 000c movel %fp@(12),%d2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c994: 2f05 movel %d5,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c996: 246e 0008 moveal %fp@(8),%a2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c99a: 2f02 movel %d2,%sp@-
4c99c: 2f0a movel %a2,%sp@-
4c99e: 4eb9 0004 ca4c jsr 4ca4c <_POSIX_signals_Clear_signals>
4c9a4: 4fef 0014 lea %sp@(20),%sp
4c9a8: 4a00 tstb %d0
4c9aa: 6700 0092 beqw 4ca3e <_POSIX_signals_Check_signal+0xca>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
4c9ae: 2002 movel %d2,%d0
4c9b0: 2602 movel %d2,%d3
4c9b2: e588 lsll #2,%d0
4c9b4: e98b lsll #4,%d3
4c9b6: 9680 subl %d0,%d3
4c9b8: 2043 moveal %d3,%a0
4c9ba: d1fc 0005 f358 addal #389976,%a0
4c9c0: 7001 moveq #1,%d0
4c9c2: 2668 0008 moveal %a0@(8),%a3
4c9c6: b08b cmpl %a3,%d0
4c9c8: 6774 beqs 4ca3e <_POSIX_signals_Check_signal+0xca><== NEVER TAKEN
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4c9ca: 2028 0004 movel %a0@(4),%d0
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
4c9ce: 282a 00d0 movel %a2@(208),%d4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4c9d2: 8084 orl %d4,%d0
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
4c9d4: 2079 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a0
4c9da: 41e8 0020 lea %a0@(32),%a0
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4c9de: 2540 00d0 movel %d0,%a2@(208)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
4c9e2: 4878 0028 pea 28 <OPER2+0x14>
4c9e6: 2f08 movel %a0,%sp@-
4c9e8: 486e ffd8 pea %fp@(-40)
4c9ec: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4c9f2: 4fef 000c lea %sp@(12),%sp
4c9f6: 41f9 0005 f358 lea 5f358 <_POSIX_signals_Vectors>,%a0
4c9fc: 7002 moveq #2,%d0
4c9fe: b0b0 3800 cmpl %a0@(00000000,%d3:l),%d0
4ca02: 660e bnes 4ca12 <_POSIX_signals_Check_signal+0x9e>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
4ca04: 42a7 clrl %sp@-
4ca06: 2f05 movel %d5,%sp@-
4ca08: 2f02 movel %d2,%sp@-
4ca0a: 4e93 jsr %a3@
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
4ca0c: 4fef 000c lea %sp@(12),%sp
4ca10: 6006 bras 4ca18 <_POSIX_signals_Check_signal+0xa4>
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
4ca12: 2f02 movel %d2,%sp@-
4ca14: 4e93 jsr %a3@
break;
4ca16: 588f addql #4,%sp
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
4ca18: 4878 0028 pea 28 <OPER2+0x14>
4ca1c: 486e ffd8 pea %fp@(-40)
4ca20: 2079 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a0
4ca26: 41e8 0020 lea %a0@(32),%a0
4ca2a: 2f08 movel %a0,%sp@-
4ca2c: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4ca32: 4fef 000c lea %sp@(12),%sp
4ca36: 2544 00d0 movel %d4,%a2@(208)
return true;
4ca3a: 7001 moveq #1,%d0
4ca3c: 6002 bras 4ca40 <_POSIX_signals_Check_signal+0xcc>
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
is_global, true ) )
return false;
4ca3e: 4200 clrb %d0
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
4ca40: 4cee 0c3c ffb4 moveml %fp@(-76),%d2-%d5/%a2-%a3
4ca46: 4e5e unlk %fp
...
0004cf0c <_POSIX_signals_Clear_process_signals>:
4cf0c: 7201 moveq #1,%d1
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
4cf0e: 4e56 0000 linkw %fp,#0
4cf12: 202e 0008 movel %fp@(8),%d0
4cf16: 2f03 movel %d3,%sp@-
4cf18: 2f02 movel %d2,%sp@-
4cf1a: 2400 movel %d0,%d2
4cf1c: 5382 subql #1,%d2
4cf1e: e5a9 lsll %d2,%d1
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4cf20: 243c 0000 0700 movel #1792,%d2
4cf26: 40c3 movew %sr,%d3
4cf28: 8483 orl %d3,%d2
4cf2a: 46c2 movew %d2,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4cf2c: 2400 movel %d0,%d2
4cf2e: 41f9 0005 f358 lea 5f358 <_POSIX_signals_Vectors>,%a0
4cf34: e58a lsll #2,%d2
4cf36: e988 lsll #4,%d0
4cf38: 9082 subl %d2,%d0
4cf3a: 7402 moveq #2,%d2
4cf3c: b4b0 0800 cmpl %a0@(00000000,%d0:l),%d2
4cf40: 6614 bnes 4cf56 <_POSIX_signals_Clear_process_signals+0x4a>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
4cf42: 2040 moveal %d0,%a0
4cf44: d1fc 0005 f550 addal #390480,%a0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4cf4a: 2008 movel %a0,%d0
4cf4c: 5880 addql #4,%d0
4cf4e: b090 cmpl %a0@,%d0
4cf50: 6704 beqs 4cf56 <_POSIX_signals_Clear_process_signals+0x4a><== ALWAYS TAKEN
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
4cf52: 46c3 movew %d3,%sr
4cf54: 600a bras 4cf60 <_POSIX_signals_Clear_process_signals+0x54>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
4cf56: 4681 notl %d1
4cf58: c3b9 0005 f54c andl %d1,5f54c <_POSIX_signals_Pending>
4cf5e: 60f2 bras 4cf52 <_POSIX_signals_Clear_process_signals+0x46>
}
_ISR_Enable( level );
}
4cf60: 241f movel %sp@+,%d2
4cf62: 261f movel %sp@+,%d3
4cf64: 4e5e unlk %fp <== NOT EXECUTED
0004ca4c <_POSIX_signals_Clear_signals>:
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
4ca4c: 7001 moveq #1,%d0
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
4ca4e: 4e56 ffec linkw %fp,#-20
4ca52: 206e 0008 moveal %fp@(8),%a0
4ca56: 48d7 043c moveml %d2-%d5/%a2,%sp@
4ca5a: 242e 000c movel %fp@(12),%d2
4ca5e: 2202 movel %d2,%d1
4ca60: 5381 subql #1,%d1
4ca62: 1a2e 0017 moveb %fp@(23),%d5
4ca66: e3a8 lsll %d1,%d0
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
4ca68: 4a2e 001b tstb %fp@(27)
4ca6c: 6708 beqs 4ca76 <_POSIX_signals_Clear_signals+0x2a>
signals_blocked = ~api->signals_blocked;
4ca6e: 2628 00d0 movel %a0@(208),%d3
4ca72: 4683 notl %d3
4ca74: 6002 bras 4ca78 <_POSIX_signals_Clear_signals+0x2c>
else
signals_blocked = SIGNAL_ALL_MASK;
4ca76: 76ff moveq #-1,%d3
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
4ca78: 223c 0000 0700 movel #1792,%d1
4ca7e: 40c4 movew %sr,%d4
4ca80: 8284 orl %d4,%d1
4ca82: 46c1 movew %d1,%sr
if ( is_global ) {
4ca84: 4a05 tstb %d5
4ca86: 6700 008a beqw 4cb12 <_POSIX_signals_Clear_signals+0xc6>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
4ca8a: c0b9 0005 f54c andl 5f54c <_POSIX_signals_Pending>,%d0
4ca90: c083 andl %d3,%d0
4ca92: 6700 0096 beqw 4cb2a <_POSIX_signals_Clear_signals+0xde>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4ca96: 2202 movel %d2,%d1
4ca98: 2002 movel %d2,%d0
4ca9a: 41f9 0005 f358 lea 5f358 <_POSIX_signals_Vectors>,%a0
4caa0: e589 lsll #2,%d1
4caa2: e988 lsll #4,%d0
4caa4: 9081 subl %d1,%d0
4caa6: 7202 moveq #2,%d1
4caa8: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1
4caac: 6658 bnes 4cb06 <_POSIX_signals_Clear_signals+0xba>
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
4caae: 2040 moveal %d0,%a0
4cab0: d1fc 0005 f550 addal #390480,%a0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4cab6: 2248 moveal %a0,%a1
4cab8: 2459 moveal %a1@+,%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
4caba: b3ca cmpal %a2,%a1
4cabc: 670a beqs 4cac8 <_POSIX_signals_Clear_signals+0x7c>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
4cabe: 2252 moveal %a2@,%a1
head->next = new_first;
4cac0: 2089 movel %a1,%a0@
new_first->previous = head;
4cac2: 2348 0004 movel %a0,%a1@(4)
4cac6: 6002 bras 4caca <_POSIX_signals_Clear_signals+0x7e>
)
{
if ( !_Chain_Is_empty(the_chain))
return _Chain_Get_first_unprotected(the_chain);
else
return NULL;
4cac8: 95ca subal %a2,%a2
_POSIX_signals_Clear_process_signals( signo );
4caca: 2f02 movel %d2,%sp@-
4cacc: 4eb9 0004 cf0c jsr 4cf0c <_POSIX_signals_Clear_process_signals>
/*
* It may be impossible to get here with an empty chain
* BUT until that is proven we need to be defensive and
* protect against it.
*/
if ( psiginfo ) {
4cad2: 588f addql #4,%sp
4cad4: 4a8a tstl %a2
4cad6: 672e beqs 4cb06 <_POSIX_signals_Clear_signals+0xba><== NEVER TAKEN
*info = psiginfo->Info;
4cad8: 4878 000c pea c <OPER1>
4cadc: 486a 0008 pea %a2@(8)
4cae0: 2f2e 0010 movel %fp@(16),%sp@-
4cae4: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
4caea: 2079 0005 f4e0 moveal 5f4e0 <_POSIX_signals_Inactive_siginfo+0x8>,%a0
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
4caf0: 4fef 000c lea %sp@(12),%sp
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
4caf4: 24bc 0005 f4dc movel #390364,%a2@
tail->previous = the_node;
4cafa: 23ca 0005 f4e0 movel %a2,5f4e0 <_POSIX_signals_Inactive_siginfo+0x8>
old_last->next = the_node;
4cb00: 208a movel %a2,%a0@
the_node->previous = old_last;
4cb02: 2548 0004 movel %a0,%a2@(4)
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4cb06: 2f02 movel %d2,%sp@-
4cb08: 4eb9 0004 cf0c jsr 4cf0c <_POSIX_signals_Clear_process_signals>
4cb0e: 588f addql #4,%sp
4cb10: 6014 bras 4cb26 <_POSIX_signals_Clear_signals+0xda>
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
4cb12: 2428 00d4 movel %a0@(212),%d2
4cb16: 2200 movel %d0,%d1
4cb18: c282 andl %d2,%d1
4cb1a: c283 andl %d3,%d1
4cb1c: 670c beqs 4cb2a <_POSIX_signals_Clear_signals+0xde>
api->signals_pending &= ~mask;
4cb1e: 4680 notl %d0
4cb20: c082 andl %d2,%d0
4cb22: 2140 00d4 movel %d0,%a0@(212)
do_callout = true;
4cb26: 7001 moveq #1,%d0
4cb28: 6002 bras 4cb2c <_POSIX_signals_Clear_signals+0xe0>
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
4cb2a: 4200 clrb %d0
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
4cb2c: 46c4 movew %d4,%sr
return do_callout;
}
4cb2e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4cb34: 4e5e unlk %fp <== NOT EXECUTED
00046c6c <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
46c6c: 701b moveq #27,%d0
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
sigset_t set
)
{
46c6e: 4e56 fff4 linkw %fp,#-12
46c72: 48d7 001c moveml %d2-%d4,%sp@
46c76: 242e 0008 movel %fp@(8),%d2
46c7a: 7601 moveq #1,%d3
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
46c7c: 2200 movel %d0,%d1
46c7e: 5381 subql #1,%d1
46c80: 2803 movel %d3,%d4
46c82: e3ac lsll %d1,%d4
46c84: 2204 movel %d4,%d1
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
46c86: c282 andl %d2,%d1
46c88: 6626 bnes 46cb0 <_POSIX_signals_Get_lowest+0x44> <== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
46c8a: 5280 addql #1,%d0
46c8c: 123c 0020 moveb #32,%d1
46c90: b280 cmpl %d0,%d1
46c92: 66e8 bnes 46c7c <_POSIX_signals_Get_lowest+0x10>
46c94: 7001 moveq #1,%d0
46c96: 7601 moveq #1,%d3
#include <rtems/posix/psignalimpl.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
46c98: 2200 movel %d0,%d1
46c9a: 5381 subql #1,%d1
46c9c: 2803 movel %d3,%d4
46c9e: e3ac lsll %d1,%d4
46ca0: 2204 movel %d4,%d1
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
46ca2: c282 andl %d2,%d1
46ca4: 660a bnes 46cb0 <_POSIX_signals_Get_lowest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
46ca6: 5280 addql #1,%d0
46ca8: 123c 001b moveb #27,%d1
46cac: b280 cmpl %d0,%d1
46cae: 66e8 bnes 46c98 <_POSIX_signals_Get_lowest+0x2c> <== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
46cb0: 4cd7 001c moveml %sp@,%d2-%d4
46cb4: 4e5e unlk %fp <== NOT EXECUTED
0004a9cc <_POSIX_signals_Post_switch_hook>:
*/
static void _POSIX_signals_Post_switch_hook(
Thread_Control *the_thread
)
{
4a9cc: 4e56 ffec linkw %fp,#-20
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4a9d0: 206e 0008 moveal %fp@(8),%a0
*/
static void _POSIX_signals_Post_switch_hook(
Thread_Control *the_thread
)
{
4a9d4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4a9d8: 2468 00fe moveal %a0@(254),%a2
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
4a9dc: 2079 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a0
4a9e2: 2628 0034 movel %a0@(52),%d3
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
4a9e6: 4a8a tstl %a2
4a9e8: 677a beqs 4aa64 <_POSIX_signals_Post_switch_hook+0x98><== NEVER TAKEN
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
4a9ea: 283c 0000 0700 movel #1792,%d4
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
4a9f0: 47f9 0004 c974 lea 4c974 <_POSIX_signals_Check_signal>,%a3
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
4a9f6: 2004 movel %d4,%d0
4a9f8: 40c1 movew %sr,%d1
4a9fa: 8081 orl %d1,%d0
4a9fc: 46c0 movew %d0,%sr
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
4a9fe: 2039 0005 f54c movel 5f54c <_POSIX_signals_Pending>,%d0
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
4aa04: 242a 00d0 movel %a2@(208),%d2
4aa08: 4682 notl %d2
(api->signals_pending | _POSIX_signals_Pending)) ) {
4aa0a: 80aa 00d4 orl %a2@(212),%d0
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
4aa0e: c082 andl %d2,%d0
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
4aa10: 46c1 movew %d1,%sr
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
4aa12: 4a80 tstl %d0
4aa14: 660c bnes 4aa22 <_POSIX_signals_Post_switch_hook+0x56>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
4aa16: 2079 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a0
4aa1c: 2143 0034 movel %d3,%a0@(52)
4aa20: 6042 bras 4aa64 <_POSIX_signals_Post_switch_hook+0x98>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4aa22: 741b moveq #27,%d2
_POSIX_signals_Check_signal( api, signo, false );
4aa24: 42a7 clrl %sp@-
4aa26: 2f02 movel %d2,%sp@-
4aa28: 2f0a movel %a2,%sp@-
4aa2a: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4aa2c: 4878 0001 pea 1 <ADD>
4aa30: 2f02 movel %d2,%sp@-
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4aa32: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4aa34: 2f0a movel %a2,%sp@-
4aa36: 4e93 jsr %a3@
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4aa38: 4fef 0018 lea %sp@(24),%sp
4aa3c: 7020 moveq #32,%d0
4aa3e: b082 cmpl %d2,%d0
4aa40: 66e2 bnes 4aa24 <_POSIX_signals_Post_switch_hook+0x58>
4aa42: 7401 moveq #1,%d2
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
4aa44: 42a7 clrl %sp@-
4aa46: 2f02 movel %d2,%sp@-
4aa48: 2f0a movel %a2,%sp@-
4aa4a: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4aa4c: 4878 0001 pea 1 <ADD>
4aa50: 2f02 movel %d2,%sp@-
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4aa52: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4aa54: 2f0a movel %a2,%sp@-
4aa56: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4aa58: 4fef 0018 lea %sp@(24),%sp
4aa5c: 701b moveq #27,%d0
4aa5e: b082 cmpl %d2,%d0
4aa60: 66e2 bnes 4aa44 <_POSIX_signals_Post_switch_hook+0x78>
4aa62: 6092 bras 4a9f6 <_POSIX_signals_Post_switch_hook+0x2a>
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
}
4aa64: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
4aa6a: 4e5e unlk %fp <== NOT EXECUTED
0005b1d0 <_POSIX_signals_Unblock_thread>:
5b1d0: 7201 moveq #1,%d1
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
5b1d2: 4e56 fff4 linkw %fp,#-12
5b1d6: 226e 0010 moveal %fp@(16),%a1
5b1da: 48d7 040c moveml %d2-%d3/%a2,%sp@
5b1de: 242e 000c movel %fp@(12),%d2
5b1e2: 2002 movel %d2,%d0
5b1e4: 5380 subql #1,%d0
5b1e6: 246e 0008 moveal %fp@(8),%a2
5b1ea: e1a9 lsll %d0,%d1
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5b1ec: 202a 0010 movel %a2@(16),%d0
5b1f0: 2600 movel %d0,%d3
5b1f2: 0283 1000 8000 andil #268468224,%d3
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5b1f8: 206a 00fe moveal %a2@(254),%a0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5b1fc: 0c83 1000 8000 cmpil #268468224,%d3
5b202: 6652 bnes 5b256 <_POSIX_signals_Unblock_thread+0x86>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
5b204: 2001 movel %d1,%d0
5b206: c0aa 0030 andl %a2@(48),%d0
5b20a: 660e bnes 5b21a <_POSIX_signals_Unblock_thread+0x4a>
5b20c: 2028 00d0 movel %a0@(208),%d0
5b210: 4680 notl %d0
5b212: c280 andl %d0,%d1
5b214: 6604 bnes 5b21a <_POSIX_signals_Unblock_thread+0x4a>
5b216: 6000 00a8 braw 5b2c0 <_POSIX_signals_Unblock_thread+0xf0>
the_thread->Wait.return_code = EINTR;
5b21a: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
5b21c: 206a 0028 moveal %a2@(40),%a0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
5b220: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
5b224: 4a89 tstl %a1
5b226: 660e bnes 5b236 <_POSIX_signals_Unblock_thread+0x66>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
5b228: 7201 moveq #1,%d1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
5b22a: 2082 movel %d2,%a0@
the_info->si_code = SI_USER;
5b22c: 2141 0004 movel %d1,%a0@(4)
the_info->si_value.sival_int = 0;
5b230: 42a8 0008 clrl %a0@(8)
5b234: 6012 bras 5b248 <_POSIX_signals_Unblock_thread+0x78>
} else {
*the_info = *info;
5b236: 4878 000c pea c <OPER1>
5b23a: 2f09 movel %a1,%sp@-
5b23c: 2f08 movel %a0,%sp@-
5b23e: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
5b244: 4fef 000c lea %sp@(12),%sp
}
_Thread_queue_Extract_with_proxy( the_thread );
5b248: 2f0a movel %a2,%sp@-
5b24a: 4eb9 0004 8d14 jsr 48d14 <_Thread_queue_Extract_with_proxy>
return true;
5b250: 588f addql #4,%sp
5b252: 7001 moveq #1,%d0
5b254: 606c bras 5b2c2 <_POSIX_signals_Unblock_thread+0xf2>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
5b256: 2428 00d0 movel %a0@(208),%d2
5b25a: 4682 notl %d2
5b25c: c282 andl %d2,%d1
5b25e: 6760 beqs 5b2c0 <_POSIX_signals_Unblock_thread+0xf0>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
5b260: 0800 001c btst #28,%d0
5b264: 673e beqs 5b2a4 <_POSIX_signals_Unblock_thread+0xd4>
the_thread->Wait.return_code = EINTR;
5b266: 7204 moveq #4,%d1
5b268: 2541 0034 movel %d1,%a2@(52)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
5b26c: 2200 movel %d0,%d1
5b26e: 0281 0003 bee0 andil #245472,%d1
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
5b274: 670c beqs 5b282 <_POSIX_signals_Unblock_thread+0xb2>
_Thread_queue_Extract_with_proxy( the_thread );
5b276: 2f0a movel %a2,%sp@-
5b278: 4eb9 0004 8d14 jsr 48d14 <_Thread_queue_Extract_with_proxy>
5b27e: 588f addql #4,%sp
5b280: 603e bras 5b2c0 <_POSIX_signals_Unblock_thread+0xf0>
else if ( _States_Is_delaying(the_thread->current_state) ) {
5b282: 44c0 movew %d0,%ccr
5b284: 6a3a bpls 5b2c0 <_POSIX_signals_Unblock_thread+0xf0><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
5b286: 486a 0048 pea %a2@(72)
5b28a: 4eb9 0004 92f8 jsr 492f8 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
5b290: 2f3c 1007 fff8 movel #268959736,%sp@-
5b296: 2f0a movel %a2,%sp@-
5b298: 4eb9 0004 8388 jsr 48388 <_Thread_Clear_state>
5b29e: 4fef 000c lea %sp@(12),%sp
5b2a2: 601c bras 5b2c0 <_POSIX_signals_Unblock_thread+0xf0>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
5b2a4: 4a80 tstl %d0
5b2a6: 6618 bnes 5b2c0 <_POSIX_signals_Unblock_thread+0xf0><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5b2a8: 4ab9 0005 f318 tstl 5f318 <_Per_CPU_Information+0x8>
5b2ae: 6710 beqs 5b2c0 <_POSIX_signals_Unblock_thread+0xf0>
5b2b0: b5f9 0005 f31e cmpal 5f31e <_Per_CPU_Information+0xe>,%a2
5b2b6: 6608 bnes 5b2c0 <_POSIX_signals_Unblock_thread+0xf0><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
5b2b8: 7001 moveq #1,%d0
5b2ba: 13c0 0005 f31c moveb %d0,5f31c <_Per_CPU_Information+0xc>
}
}
return false;
5b2c0: 4200 clrb %d0
}
5b2c2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5b2c8: 4e5e unlk %fp <== NOT EXECUTED
00048812 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
48812: 4e56 ffec linkw %fp,#-20
48816: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4881a: 2a6e 0008 moveal %fp@(8),%a5
4881e: 246e 000c moveal %fp@(12),%a2
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
48822: 4a8a tstl %a2
48824: 6700 00fe beqw 48924 <_RBTree_Extract_unprotected+0x112>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
48828: b5ed 0008 cmpal %a5@(8),%a2
4882c: 6612 bnes 48840 <_RBTree_Extract_unprotected+0x2e>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
4882e: 4878 0001 pea 1 <ADD>
48832: 2f0a movel %a2,%sp@-
48834: 4eb9 0004 8ba4 jsr 48ba4 <_RBTree_Next_unprotected>
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
4883a: 508f addql #8,%sp
4883c: 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]) {
48840: b5ed 000c cmpal %a5@(12),%a2
48844: 6610 bnes 48856 <_RBTree_Extract_unprotected+0x44>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
48846: 42a7 clrl %sp@-
48848: 2f0a movel %a2,%sp@-
4884a: 4eb9 0004 8ba4 jsr 48ba4 <_RBTree_Next_unprotected>
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
48850: 508f addql #8,%sp
48852: 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]) {
48856: 266a 0004 moveal %a2@(4),%a3
4885a: 4a8b tstl %a3
4885c: 6776 beqs 488d4 <_RBTree_Extract_unprotected+0xc2>
4885e: 4aaa 0008 tstl %a2@(8)
48862: 6604 bnes 48868 <_RBTree_Extract_unprotected+0x56>
48864: 6078 bras 488de <_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];
48866: 2640 moveal %d0,%a3
48868: 202b 0008 movel %a3@(8),%d0
4886c: 66f8 bnes 48866 <_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];
4886e: 286b 0004 moveal %a3@(4),%a4
if(leaf) {
48872: 4a8c tstl %a4
48874: 6704 beqs 4887a <_RBTree_Extract_unprotected+0x68>
leaf->parent = target->parent;
48876: 2893 movel %a3@,%a4@
48878: 6008 bras 48882 <_RBTree_Extract_unprotected+0x70>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
4887a: 2f0b movel %a3,%sp@-
4887c: 4eba fe60 jsr %pc@(486de <_RBTree_Extract_validate_unprotected>)
48880: 588f addql #4,%sp
}
victim_color = target->color;
dir = target != target->parent->child[0];
48882: 2053 moveal %a3@,%a0
48884: b7e8 0004 cmpal %a0@(4),%a3
48888: 56c1 sne %d1
target->parent->child[dir] = leaf;
4888a: 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];
4888c: 49c1 extbl %d1
target->parent->child[dir] = leaf;
4888e: 9481 subl %d1,%d2
48890: 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;
48894: 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];
48896: 2052 moveal %a2@,%a0
48898: b5e8 0004 cmpal %a0@(4),%a2
4889c: 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;
4889e: 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];
488a2: 49c1 extbl %d1
the_node->parent->child[dir] = target;
488a4: 9481 subl %d1,%d2
488a6: 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];
488aa: 276a 0008 0008 movel %a2@(8),%a3@(8)
if (the_node->child[RBT_RIGHT])
488b0: 206a 0008 moveal %a2@(8),%a0
488b4: 4a88 tstl %a0
488b6: 6702 beqs 488ba <_RBTree_Extract_unprotected+0xa8><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
488b8: 208b movel %a3,%a0@
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
488ba: 276a 0004 0004 movel %a2@(4),%a3@(4)
if (the_node->child[RBT_LEFT])
488c0: 206a 0004 moveal %a2@(4),%a0
488c4: 4a88 tstl %a0
488c6: 6702 beqs 488ca <_RBTree_Extract_unprotected+0xb8>
the_node->child[RBT_LEFT]->parent = target;
488c8: 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;
488ca: 2692 movel %a2@,%a3@
target->color = the_node->color;
488cc: 276a 000c 000c movel %a2@(12),%a3@(12)
488d2: 602e bras 48902 <_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];
488d4: 286a 0008 moveal %a2@(8),%a4
if( leaf ) {
488d8: 4a8c tstl %a4
488da: 6604 bnes 488e0 <_RBTree_Extract_unprotected+0xce>
488dc: 6006 bras 488e4 <_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]) {
488de: 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;
488e0: 2892 movel %a2@,%a4@
488e2: 6008 bras 488ec <_RBTree_Extract_unprotected+0xda>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
488e4: 2f0a movel %a2,%sp@-
488e6: 4eba fdf6 jsr %pc@(486de <_RBTree_Extract_validate_unprotected>)
488ea: 588f addql #4,%sp
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
488ec: 2052 moveal %a2@,%a0
488ee: b5e8 0004 cmpal %a0@(4),%a2
488f2: 56c1 sne %d1
the_node->parent->child[dir] = leaf;
488f4: 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];
488f6: 49c1 extbl %d1
the_node->parent->child[dir] = leaf;
488f8: 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;
488fa: 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;
488fe: 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 */
48902: 4a80 tstl %d0
48904: 6608 bnes 4890e <_RBTree_Extract_unprotected+0xfc>
if (leaf) {
48906: 4a8c tstl %a4
48908: 6704 beqs 4890e <_RBTree_Extract_unprotected+0xfc>
leaf->color = RBT_BLACK; /* case 2 */
4890a: 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;
4890e: 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;
48912: 42aa 0008 clrl %a2@(8)
48916: 42aa 0004 clrl %a2@(4)
4891a: 4292 clrl %a2@
4891c: 4a88 tstl %a0
4891e: 6704 beqs 48924 <_RBTree_Extract_unprotected+0x112>
48920: 42a8 000c clrl %a0@(12)
}
48924: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4892a: 4e5e unlk %fp <== NOT EXECUTED
000494d4 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
494d4: 4e56 fff0 linkw %fp,#-16
494d8: 202e 001c movel %fp@(28),%d0
494dc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
494e0: 246e 0008 moveal %fp@(8),%a2
494e4: 242e 0014 movel %fp@(20),%d2
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
494e8: 4a8a tstl %a2
494ea: 6736 beqs 49522 <_RBTree_Initialize+0x4e> <== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
494ec: 4292 clrl %a2@
the_rbtree->root = NULL;
the_rbtree->first[0] = NULL;
the_rbtree->first[1] = NULL;
the_rbtree->compare_function = compare_function;
494ee: 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;
494f4: 262e 0010 movel %fp@(16),%d3
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
the_rbtree->root = NULL;
494f8: 42aa 0004 clrl %a2@(4)
while ( count-- ) {
_RBTree_Insert_unprotected(the_rbtree, next);
494fc: 47f9 0004 92b4 lea 492b4 <_RBTree_Insert_unprotected>,%a3
the_rbtree->first[0] = NULL;
49502: 42aa 0008 clrl %a2@(8)
the_rbtree->first[1] = NULL;
49506: 42aa 000c clrl %a2@(12)
the_rbtree->compare_function = compare_function;
the_rbtree->is_unique = is_unique;
4950a: 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-- ) {
4950e: 600e bras 4951e <_RBTree_Initialize+0x4a>
_RBTree_Insert_unprotected(the_rbtree, next);
49510: 2f03 movel %d3,%sp@-
49512: 5382 subql #1,%d2
49514: 2f0a movel %a2,%sp@-
49516: 4e93 jsr %a3@
49518: 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(
4951a: 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-- ) {
4951e: 4a82 tstl %d2
49520: 66ee bnes 49510 <_RBTree_Initialize+0x3c>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
49522: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
49528: 4e5e unlk %fp <== NOT EXECUTED
000489b8 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
489b8: 4e56 ffec linkw %fp,#-20
489bc: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
489c0: 266e 0008 moveal %fp@(8),%a3
489c4: 246e 000c moveal %fp@(12),%a2
if(!the_node) return (RBTree_Node*)-1;
489c8: 4a8a tstl %a2
489ca: 6700 013a beqw 48b06 <_RBTree_Insert_unprotected+0x14e>
RBTree_Node *iter_node = the_rbtree->root;
489ce: 286b 0004 moveal %a3@(4),%a4
int compare_result;
if (!iter_node) { /* special case: first node inserted */
489d2: 2a4c moveal %a4,%a5
489d4: 4a8c tstl %a4
489d6: 6620 bnes 489f8 <_RBTree_Insert_unprotected+0x40>
the_node->color = RBT_BLACK;
489d8: 42aa 000c clrl %a2@(12)
the_rbtree->root = the_node;
489dc: 274a 0004 movel %a2,%a3@(4)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
489e0: 274a 000c movel %a2,%a3@(12)
489e4: 274a 0008 movel %a2,%a3@(8)
the_node->parent = (RBTree_Node *) the_rbtree;
489e8: 248b movel %a3,%a2@
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
489ea: 42aa 0008 clrl %a2@(8)
489ee: 42aa 0004 clrl %a2@(4)
489f2: 6000 0126 braw 48b1a <_RBTree_Insert_unprotected+0x162>
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
489f6: 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);
489f8: 2f0c movel %a4,%sp@-
489fa: 2f0a movel %a2,%sp@-
489fc: 206b 0010 moveal %a3@(16),%a0
48a00: 4e90 jsr %a0@
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
48a02: 508f addql #8,%sp
48a04: 4a2b 0014 tstb %a3@(20)
48a08: 6706 beqs 48a10 <_RBTree_Insert_unprotected+0x58>
48a0a: 4a80 tstl %d0
48a0c: 6700 010c beqw 48b1a <_RBTree_Insert_unprotected+0x162>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
48a10: 2400 movel %d0,%d2
48a12: 4682 notl %d2
48a14: d482 addl %d2,%d2
48a16: 9582 subxl %d2,%d2
48a18: 4482 negl %d2
if (!iter_node->child[dir]) {
48a1a: 2002 movel %d2,%d0
48a1c: 5280 addql #1,%d0
48a1e: 2874 0c00 moveal %a4@(00000000,%d0:l:4),%a4
48a22: 4a8c tstl %a4
48a24: 66d0 bnes 489f6 <_RBTree_Insert_unprotected+0x3e>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
48a26: 42aa 0008 clrl %a2@(8)
the_node->color = RBT_RED;
48a2a: 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;
48a2c: 42aa 0004 clrl %a2@(4)
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
48a30: 2b8a 0c00 movel %a2,%a5@(00000000,%d0:l:4)
the_node->parent = iter_node;
48a34: 248d movel %a5,%a2@
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
48a36: 2a42 moveal %d2,%a5
48a38: 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;
48a3a: 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(
48a3e: 2f33 dc00 movel %a3@(00000000,%a5:l:4),%sp@-
48a42: 2f0a movel %a2,%sp@-
48a44: 206b 0010 moveal %a3@(16),%a0
48a48: 4e90 jsr %a0@
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
48a4a: 508f addql #8,%sp
48a4c: 4a82 tstl %d2
48a4e: 6608 bnes 48a58 <_RBTree_Insert_unprotected+0xa0>
48a50: 4a80 tstl %d0
48a52: 6c00 0092 bgew 48ae6 <_RBTree_Insert_unprotected+0x12e>
48a56: 6006 bras 48a5e <_RBTree_Insert_unprotected+0xa6>
(dir && _RBTree_Is_greater(compare_result)) ) {
48a58: 4a80 tstl %d0
48a5a: 6f00 008a blew 48ae6 <_RBTree_Insert_unprotected+0x12e>
the_rbtree->first[dir] = the_node;
48a5e: 278a dc00 movel %a2,%a3@(00000000,%a5:l:4)
48a62: 6000 0082 braw 48ae6 <_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;
48a66: 4a8b tstl %a3
48a68: 671e beqs 48a88 <_RBTree_Insert_unprotected+0xd0><== NEVER TAKEN
if(!(the_node->parent->parent->parent)) return NULL;
48a6a: 4a93 tstl %a3@
48a6c: 671a beqs 48a88 <_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])
48a6e: 226b 0004 moveal %a3@(4),%a1
48a72: b3c8 cmpal %a0,%a1
48a74: 6604 bnes 48a7a <_RBTree_Insert_unprotected+0xc2>
return the_node->parent->child[RBT_RIGHT];
48a76: 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);
48a7a: 4a89 tstl %a1
48a7c: 670c beqs 48a8a <_RBTree_Insert_unprotected+0xd2>
48a7e: 7001 moveq #1,%d0
48a80: b0a9 000c cmpl %a1@(12),%d0
48a84: 6604 bnes 48a8a <_RBTree_Insert_unprotected+0xd2>
48a86: 6006 bras 48a8e <_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;
48a88: 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);
48a8a: 4280 clrl %d0
48a8c: 6002 bras 48a90 <_RBTree_Insert_unprotected+0xd8>
48a8e: 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)) {
48a90: 4a80 tstl %d0
48a92: 6710 beqs 48aa4 <_RBTree_Insert_unprotected+0xec>
the_node->parent->color = RBT_BLACK;
48a94: 42a8 000c clrl %a0@(12)
u->color = RBT_BLACK;
g->color = RBT_RED;
48a98: 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;
48a9a: 42a9 000c clrl %a1@(12)
g->color = RBT_RED;
48a9e: 2741 000c movel %d1,%a3@(12)
48aa2: 603e bras 48ae2 <_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];
48aa4: b1eb 0004 cmpal %a3@(4),%a0
48aa8: 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];
48aaa: b5e8 0004 cmpal %a0@(4),%a2
48aae: 56c1 sne %d1
RBTree_Direction pdir = the_node->parent != g->child[0];
48ab0: 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];
48ab2: 2400 movel %d0,%d2
48ab4: 49c1 extbl %d1
48ab6: 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) {
48ab8: b081 cmpl %d1,%d0
48aba: 670c beqs 48ac8 <_RBTree_Insert_unprotected+0x110>
_RBTree_Rotate(the_node->parent, pdir);
48abc: 2f02 movel %d2,%sp@-
48abe: 2f08 movel %a0,%sp@-
48ac0: 4e95 jsr %a5@
the_node = the_node->child[pdir];
48ac2: 508f addql #8,%sp
48ac4: 2472 2c04 moveal %a2@(00000004,%d2:l:4),%a2
}
the_node->parent->color = RBT_BLACK;
48ac8: 2052 moveal %a2@,%a0
g->color = RBT_RED;
48aca: 7001 moveq #1,%d0
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
48acc: 7201 moveq #1,%d1
48ace: 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;
48ad0: 42a8 000c clrl %a0@(12)
g->color = RBT_RED;
48ad4: 2740 000c movel %d0,%a3@(12)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
48ad8: 2f01 movel %d1,%sp@-
48ada: 2f0b movel %a3,%sp@-
48adc: 264a moveal %a2,%a3
48ade: 4e95 jsr %a5@
48ae0: 508f addql #8,%sp
48ae2: 244b moveal %a3,%a2
48ae4: 6004 bras 48aea <_RBTree_Insert_unprotected+0x132>
48ae6: 4bfa fe74 lea %pc@(4895c <_RBTree_Rotate>),%a5
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
48aea: 2052 moveal %a2@,%a0
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
48aec: 2650 moveal %a0@,%a3
48aee: 4a8b tstl %a3
48af0: 661a bnes 48b0c <_RBTree_Insert_unprotected+0x154>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
48af2: 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))) {
48af4: 0800 0000 btst #0,%d0
48af8: 6600 ff6c bnew 48a66 <_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;
48afc: 4a8b tstl %a3
48afe: 661a bnes 48b1a <_RBTree_Insert_unprotected+0x162>
48b00: 42aa 000c clrl %a2@(12)
48b04: 6014 bras 48b1a <_RBTree_Insert_unprotected+0x162>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
48b06: 387c ffff moveaw #-1,%a4
48b0a: 600e bras 48b1a <_RBTree_Insert_unprotected+0x162>
48b0c: 7001 moveq #1,%d0
48b0e: b0a8 000c cmpl %a0@(12),%d0
48b12: 57c0 seq %d0
48b14: 49c0 extbl %d0
48b16: 4480 negl %d0
48b18: 60da bras 48af4 <_RBTree_Insert_unprotected+0x13c>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
48b1a: 200c movel %a4,%d0
48b1c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
48b22: 4e5e unlk %fp <== NOT EXECUTED
00048b50 <_RBTree_Iterate_unprotected>:
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
48b50: 7202 moveq #2,%d1
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
48b52: 4e56 fff0 linkw %fp,#-16
48b56: 206e 0008 moveal %fp@(8),%a0
48b5a: 48d7 041c moveml %d2-%d4/%a2,%sp@
48b5e: 262e 000c movel %fp@(12),%d3
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
48b62: 57c0 seq %d0
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
48b64: 45f9 0004 8ba4 lea 48ba4 <_RBTree_Next_unprotected>,%a2
48b6a: 49c0 extbl %d0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
48b6c: 9280 subl %d0,%d1
48b6e: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2
48b72: 6020 bras 48b94 <_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 );
48b74: 2f2e 0014 movel %fp@(20),%sp@-
48b78: 206e 0010 moveal %fp@(16),%a0
48b7c: 2f03 movel %d3,%sp@-
48b7e: 2f02 movel %d2,%sp@-
48b80: 4e90 jsr %a0@
current = _RBTree_Next_unprotected( current, dir );
48b82: 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 );
48b84: 1800 moveb %d0,%d4
current = _RBTree_Next_unprotected( current, dir );
48b86: 2f02 movel %d2,%sp@-
48b88: 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 ) {
48b8a: 4fef 0014 lea %sp@(20),%sp
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
48b8e: 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 ) {
48b90: 4a04 tstb %d4
48b92: 6604 bnes 48b98 <_RBTree_Iterate_unprotected+0x48><== NEVER TAKEN
48b94: 4a82 tstl %d2
48b96: 66dc bnes 48b74 <_RBTree_Iterate_unprotected+0x24>
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
48b98: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
48b9e: 4e5e unlk %fp
...
00048682 <_RBTree_Rotate>:
*/
RTEMS_INLINE_ROUTINE void _RBTree_Rotate(
RBTree_Node *the_node,
RBTree_Direction dir
)
{
48682: 4e56 0000 linkw %fp,#0
48686: 206e 0008 moveal %fp@(8),%a0
4868a: 2f0a movel %a2,%sp@-
4868c: 202e 000c movel %fp@(12),%d0
48690: 2f02 movel %d2,%sp@-
RBTree_Node *c;
if (the_node == NULL) return;
48692: 4a88 tstl %a0
48694: 6740 beqs 486d6 <_RBTree_Rotate+0x54> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
48696: 4a80 tstl %d0
48698: 57c1 seq %d1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
4869a: 7401 moveq #1,%d2
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
4869c: 49c1 extbl %d1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
4869e: 9481 subl %d1,%d2
486a0: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1
486a4: 4a89 tstl %a1
486a6: 672e beqs 486d6 <_RBTree_Rotate+0x54> <== NEVER TAKEN
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
486a8: 5280 addql #1,%d0
486aa: 45f1 0c00 lea %a1@(00000000,%d0:l:4),%a2
486ae: 2192 2c00 movel %a2@,%a0@(00000000,%d2:l:4)
if (c->child[dir])
486b2: 2471 0c00 moveal %a1@(00000000,%d0:l:4),%a2
486b6: 4a8a tstl %a2
486b8: 6702 beqs 486bc <_RBTree_Rotate+0x3a>
c->child[dir]->parent = the_node;
486ba: 2488 movel %a0,%a2@
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
486bc: 2450 moveal %a0@,%a2
486be: 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;
486c0: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
486c4: b1ea 0004 cmpal %a2@(4),%a0
486c8: 56c0 sne %d0
c->parent = the_node->parent;
486ca: 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;
486cc: 49c0 extbl %d0
486ce: 9280 subl %d0,%d1
486d0: 2589 1c00 movel %a1,%a2@(00000000,%d1:l:4)
c->parent = the_node->parent;
the_node->parent = c;
486d4: 2089 movel %a1,%a0@
}
486d6: 241f movel %sp@+,%d2
486d8: 245f moveal %sp@+,%a2
486da: 4e5e unlk %fp <== NOT EXECUTED
00048658 <_RBTree_Sibling>:
* exists, and NULL if not.
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
48658: 4e56 0000 linkw %fp,#0
4865c: 226e 0008 moveal %fp@(8),%a1
if(!the_node) return NULL;
48660: 4a89 tstl %a1
48662: 6718 beqs 4867c <_RBTree_Sibling+0x24> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
48664: 2051 moveal %a1@,%a0
48666: 4a88 tstl %a0
48668: 6712 beqs 4867c <_RBTree_Sibling+0x24> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
4866a: 4a90 tstl %a0@
4866c: 670e beqs 4867c <_RBTree_Sibling+0x24>
if(the_node == the_node->parent->child[RBT_LEFT])
4866e: 2028 0004 movel %a0@(4),%d0
48672: b089 cmpl %a1,%d0
48674: 6608 bnes 4867e <_RBTree_Sibling+0x26>
return the_node->parent->child[RBT_RIGHT];
48676: 2028 0008 movel %a0@(8),%d0
4867a: 6002 bras 4867e <_RBTree_Sibling+0x26>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
4867c: 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];
}
4867e: 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 00fa moveal %a0@(250),%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
00058390 <_Region_Process_queue>:
#include <rtems/score/apimutex.h>
void _Region_Process_queue(
Region_Control *the_region
)
{
58390: 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;
58394: 2039 0007 747a movel 7747a <_Thread_Dispatch_disable_level>,%d0
++level;
5839a: 5280 addql #1,%d0
5839c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
583a0: 266e 0008 moveal %fp@(8),%a3
_Thread_Dispatch_disable_level = level;
583a4: 23c0 0007 747a movel %d0,7747a <_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();
583aa: 2f39 0007 74fe movel 774fe <_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 );
583b0: 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 );
583b2: 260b movel %a3,%d3
583b4: 0682 0000 0010 addil #16,%d2
583ba: 4bf9 0005 8acc lea 58acc <_Thread_queue_First>,%a5
583c0: 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 );
583c6: 49f9 0005 89c8 lea 589c8 <_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();
583cc: 4eb9 0005 31b4 jsr 531b4 <_API_Mutex_Unlock>
583d2: 588f addql #4,%sp
583d4: 283c 0005 3c3c movel #343100,%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 );
583da: 2f02 movel %d2,%sp@-
583dc: 4e95 jsr %a5@
if ( the_thread == NULL )
583de: 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 );
583e0: 2440 moveal %d0,%a2
if ( the_thread == NULL )
583e2: 4a80 tstl %d0
583e4: 672e beqs 58414 <_Region_Process_queue+0x84>
583e6: 42a7 clrl %sp@-
583e8: 2044 moveal %d4,%a0
583ea: 42a7 clrl %sp@-
583ec: 2f2a 0024 movel %a2@(36),%sp@-
583f0: 2f03 movel %d3,%sp@-
583f2: 4e90 jsr %a0@
the_segment = (void **) _Region_Allocate_segment(
the_region,
the_thread->Wait.count
);
if ( the_segment == NULL )
583f4: 4fef 0010 lea %sp@(16),%sp
583f8: 4a80 tstl %d0
583fa: 6718 beqs 58414 <_Region_Process_queue+0x84>
break;
*(void **)the_thread->Wait.return_argument = the_segment;
583fc: 206a 0028 moveal %a2@(40),%a0
58400: 2080 movel %d0,%a0@
the_region->number_of_used_blocks += 1;
58402: 52ab 0064 addql #1,%a3@(100)
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
58406: 2f0a movel %a2,%sp@-
58408: 2f02 movel %d2,%sp@-
5840a: 4e94 jsr %a4@
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
5840c: 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;
5840e: 42aa 0034 clrl %a2@(52)
}
58412: 60c6 bras 583da <_Region_Process_queue+0x4a>
_Thread_Enable_dispatch();
}
58414: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
5841a: 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();
5841c: 4ef9 0005 58b8 jmp 558b8 <_Thread_Enable_dispatch>
...
00048520 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
48520: 4e56 0000 linkw %fp,#0
48524: 2f0a movel %a2,%sp@-
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
48526: 4878 001c pea 1c <OPER2+0x8>
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
4852a: 246e 0008 moveal %fp@(8),%a2
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
4852e: 4eb9 0004 9c4c jsr 49c4c <_Workspace_Allocate>
if ( sched ) {
48534: 588f addql #4,%sp
48536: 4a80 tstl %d0
48538: 6712 beqs 4854c <_Scheduler_CBS_Allocate+0x2c> <== NEVER TAKEN
the_thread->scheduler_info = sched;
4853a: 2540 0086 movel %d0,%a2@(134)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
4853e: 2040 moveal %d0,%a0
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
48540: 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;
48542: 208a movel %a2,%a0@
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
48544: 2141 0014 movel %d1,%a0@(20)
schinfo->cbs_server = NULL;
48548: 42a8 0018 clrl %a0@(24)
}
return sched;
}
4854c: 246e fffc moveal %fp@(-4),%a2
48550: 4e5e unlk %fp <== NOT EXECUTED
000499e8 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
499e8: 4e56 fffc linkw %fp,#-4
499ec: 2f0a movel %a2,%sp@-
499ee: 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;
499f2: 202a 00a8 movel %a2@(168),%d0
if ( the_thread->real_priority != new_priority )
499f6: b0aa 0018 cmpl %a2@(24),%d0
499fa: 6704 beqs 49a00 <_Scheduler_CBS_Budget_callout+0x18><== NEVER TAKEN
the_thread->real_priority = new_priority;
499fc: 2540 0018 movel %d0,%a2@(24)
if ( the_thread->current_priority != new_priority )
49a00: b0aa 0014 cmpl %a2@(20),%d0
49a04: 6712 beqs 49a18 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
49a06: 4878 0001 pea 1 <ADD>
49a0a: 2f00 movel %d0,%sp@-
49a0c: 2f0a movel %a2,%sp@-
49a0e: 4eb9 0004 9f44 jsr 49f44 <_Thread_Change_priority>
49a14: 4fef 000c lea %sp@(12),%sp
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
49a18: 246a 0086 moveal %a2@(134),%a2
if ( sched_info->cbs_server->cbs_budget_overrun ) {
49a1c: 206a 0018 moveal %a2@(24),%a0
49a20: 4aa8 000c tstl %a0@(12)
49a24: 671e beqs 49a44 <_Scheduler_CBS_Budget_callout+0x5c>
_Scheduler_CBS_Get_server_id(
49a26: 486e fffc pea %fp@(-4)
49a2a: 2f10 movel %a0@,%sp@-
49a2c: 4eb9 0004 99ac jsr 499ac <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
49a32: 206a 0018 moveal %a2@(24),%a0
49a36: 2f2e fffc movel %fp@(-4),%sp@-
49a3a: 2068 000c moveal %a0@(12),%a0
49a3e: 4e90 jsr %a0@
49a40: 4fef 000c lea %sp@(12),%sp
}
}
49a44: 246e fff8 moveal %fp@(-8),%a2
49a48: 4e5e unlk %fp <== NOT EXECUTED
000496bc <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
496bc: 4e56 fff4 linkw %fp,#-12
496c0: 48d7 1c00 moveml %a2-%a4,%sp@
496c4: 246e 0008 moveal %fp@(8),%a2
496c8: 266e 0010 moveal %fp@(16),%a3
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
496cc: 4aaa 0004 tstl %a2@(4)
496d0: 6f3e bles 49710 <_Scheduler_CBS_Create_server+0x54>
496d2: 4a92 tstl %a2@
496d4: 6f3a bles 49710 <_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++ ) {
496d6: 2239 0006 079c movel 6079c <_Scheduler_CBS_Maximum_servers>,%d1
if ( !_Scheduler_CBS_Server_list[i] )
496dc: 4280 clrl %d0
496de: 2079 0006 24d2 moveal 624d2 <_Scheduler_CBS_Server_list>,%a0
496e4: 6006 bras 496ec <_Scheduler_CBS_Create_server+0x30>
496e6: 4a98 tstl %a0@+
496e8: 672e beqs 49718 <_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++ ) {
496ea: 5280 addql #1,%d0
496ec: b280 cmpl %d0,%d1
496ee: 66f6 bnes 496e6 <_Scheduler_CBS_Create_server+0x2a>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
496f0: 70e6 moveq #-26,%d0
496f2: 6050 bras 49744 <_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;
496f4: 2012 movel %a2@,%d0
496f6: 222a 0004 movel %a2@(4),%d1
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
496fa: 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;
49700: 2140 0004 movel %d0,%a0@(4)
49704: 2141 0008 movel %d1,%a0@(8)
the_server->task_id = -1;
49708: 70ff moveq #-1,%d0
4970a: 2080 movel %d0,%a0@
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
4970c: 4280 clrl %d0
4970e: 6034 bras 49744 <_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;
49710: 70ee moveq #-18,%d0
49712: 6030 bras 49744 <_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;
49714: 70ef moveq #-17,%d0 <== NOT EXECUTED
49716: 602c bras 49744 <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
49718: 2680 movel %d0,%a3@
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
4971a: 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 *)
4971e: 2879 0006 24d2 moveal 624d2 <_Scheduler_CBS_Server_list>,%a4
49724: e588 lsll #2,%d0
49726: d9c0 addal %d0,%a4
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
49728: 4eb9 0004 b150 jsr 4b150 <_Workspace_Allocate>
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
4972e: 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 *)
49730: 2880 movel %d0,%a4@
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
49732: 2013 movel %a3@,%d0
49734: 2079 0006 24d2 moveal 624d2 <_Scheduler_CBS_Server_list>,%a0
4973a: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !the_server )
4973e: 4a88 tstl %a0
49740: 66b2 bnes 496f4 <_Scheduler_CBS_Create_server+0x38><== ALWAYS TAKEN
49742: 60d0 bras 49714 <_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;
}
49744: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
4974a: 4e5e unlk %fp
...
000497c8 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
497c8: 4e56 fff0 linkw %fp,#-16
497cc: 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);
497d0: 486e fffc pea %fp@(-4)
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
497d4: 242e 000c movel %fp@(12),%d2
497d8: 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);
497dc: 2f02 movel %d2,%sp@-
497de: 4eb9 0004 a3b4 jsr 4a3b4 <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
497e4: 508f addql #8,%sp
{
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
497e6: 2440 moveal %d0,%a2
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
497e8: 4a80 tstl %d0
497ea: 6706 beqs 497f2 <_Scheduler_CBS_Detach_thread+0x2a>
_Thread_Enable_dispatch();
497ec: 4eb9 0004 a394 jsr 4a394 <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
497f2: b6b9 0006 079c cmpl 6079c <_Scheduler_CBS_Maximum_servers>,%d3
497f8: 643c bccs 49836 <_Scheduler_CBS_Detach_thread+0x6e>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
497fa: 4a8a tstl %a2
497fc: 6738 beqs 49836 <_Scheduler_CBS_Detach_thread+0x6e>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
497fe: 2079 0006 24d2 moveal 624d2 <_Scheduler_CBS_Server_list>,%a0
49804: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0
49808: 4a88 tstl %a0
4980a: 6726 beqs 49832 <_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 )
4980c: b490 cmpl %a0@,%d2
4980e: 6626 bnes 49836 <_Scheduler_CBS_Detach_thread+0x6e><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
49810: 70ff moveq #-1,%d0
49812: 2080 movel %d0,%a0@
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
49814: 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;
49818: 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;
4981a: 42a8 0018 clrl %a0@(24)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4981e: 256a 009c 0076 movel %a2@(156),%a2@(118)
the_thread->budget_callout = the_thread->Start.budget_callout;
49824: 256a 00a0 007a movel %a2@(160),%a2@(122)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4982a: 156a 009a 0070 moveb %a2@(154),%a2@(112)
49830: 6006 bras 49838 <_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;
49832: 70e7 moveq #-25,%d0
49834: 6002 bras 49838 <_Scheduler_CBS_Detach_thread+0x70>
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
49836: 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;
}
49838: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
4983e: 4e5e unlk %fp
...
00049a4c <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
49a4c: 4e56 0000 linkw %fp,#0
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
49a50: 2039 0006 079c movel 6079c <_Scheduler_CBS_Maximum_servers>,%d0
49a56: e588 lsll #2,%d0
49a58: 2f00 movel %d0,%sp@-
49a5a: 4eb9 0004 b150 jsr 4b150 <_Workspace_Allocate>
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
49a60: 588f addql #4,%sp
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
49a62: 23c0 0006 24d2 movel %d0,624d2 <_Scheduler_CBS_Server_list>
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
49a68: 671e beqs 49a88 <_Scheduler_CBS_Initialize+0x3c> <== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
49a6a: 2239 0006 079c movel 6079c <_Scheduler_CBS_Maximum_servers>,%d1
49a70: 4280 clrl %d0
49a72: 600c bras 49a80 <_Scheduler_CBS_Initialize+0x34>
_Scheduler_CBS_Server_list[i] = NULL;
49a74: 2079 0006 24d2 moveal 624d2 <_Scheduler_CBS_Server_list>,%a0
49a7a: 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++) {
49a7e: 5280 addql #1,%d0
49a80: b280 cmpl %d0,%d1
49a82: 66f0 bnes 49a74 <_Scheduler_CBS_Initialize+0x28>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
49a84: 4280 clrl %d0
49a86: 6002 bras 49a8a <_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;
49a88: 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;
}
49a8a: 4e5e unlk %fp
...
00048554 <_Scheduler_CBS_Release_job>:
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
48554: 4e56 0000 linkw %fp,#0
48558: 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;
4855c: 2268 0086 moveal %a0@(134),%a1
void _Scheduler_CBS_Release_job(
Thread_Control *the_thread,
uint32_t deadline
)
{
48560: 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 =
48564: 2269 0018 moveal %a1@(24),%a1
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
48568: 6722 beqs 4858c <_Scheduler_CBS_Release_job+0x38>
/* Initializing or shifting deadline. */
if (serv_info)
4856a: 4a89 tstl %a1
4856c: 6710 beqs 4857e <_Scheduler_CBS_Release_job+0x2a>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
4856e: 2039 0006 0574 movel 60574 <_Watchdog_Ticks_since_boot>,%d0
48574: d0a9 0004 addl %a1@(4),%d0
48578: 0880 001f bclr #31,%d0
4857c: 6016 bras 48594 <_Scheduler_CBS_Release_job+0x40>
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
4857e: 2239 0006 0574 movel 60574 <_Watchdog_Ticks_since_boot>,%d1
48584: d081 addl %d1,%d0
48586: 0880 001f bclr #31,%d0
4858a: 600e bras 4859a <_Scheduler_CBS_Release_job+0x46>
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
4858c: 2028 00a8 movel %a0@(168),%d0
}
/* Budget replenishment for the next job. */
if (serv_info)
48590: 4a89 tstl %a1
48592: 6706 beqs 4859a <_Scheduler_CBS_Release_job+0x46><== NEVER TAKEN
the_thread->cpu_time_budget = serv_info->parameters.budget;
48594: 2169 0008 0072 movel %a1@(8),%a0@(114)
the_thread->real_priority = new_priority;
4859a: 2140 0018 movel %d0,%a0@(24)
_Thread_Change_priority(the_thread, new_priority, true);
4859e: 4878 0001 pea 1 <ADD>
485a2: 2f00 movel %d0,%sp@-
485a4: 2f08 movel %a0,%sp@-
485a6: 4eb9 0004 89c0 jsr 489c0 <_Thread_Change_priority>
485ac: 4fef 000c lea %sp@(12),%sp
}
485b0: 4e5e unlk %fp <== NOT EXECUTED
000485b4 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
485b4: 4e56 0000 linkw %fp,#0
485b8: 2f0a movel %a2,%sp@-
485ba: 246e 0008 moveal %fp@(8),%a2
485be: 2f02 movel %d2,%sp@-
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
485c0: 2f0a movel %a2,%sp@-
485c2: 4eb9 0004 86b4 jsr 486b4 <_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;
485c8: 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) {
485cc: 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;
485ce: 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) {
485d2: 4a88 tstl %a0
485d4: 674c beqs 48622 <_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 -
485d6: 222a 0018 movel %a2@(24),%d1
485da: 2401 movel %d1,%d2
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
485dc: 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 -
485e0: 2039 0006 0574 movel 60574 <_Watchdog_Ticks_since_boot>,%d0
485e6: 9480 subl %d0,%d2
485e8: 2002 movel %d2,%d0
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
485ea: 4c11 0800 mulsl %a1@,%d0
485ee: 43ea 0072 lea %a2@(114),%a1
485f2: 2428 0008 movel %a0@(8),%d2
485f6: 4c11 2800 mulsl %a1@,%d2
485fa: b480 cmpl %d0,%d2
485fc: 6c24 bges 48622 <_Scheduler_CBS_Unblock+0x6e>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
485fe: 202a 00a8 movel %a2@(168),%d0
if ( the_thread->real_priority != new_priority )
48602: b081 cmpl %d1,%d0
48604: 6704 beqs 4860a <_Scheduler_CBS_Unblock+0x56>
the_thread->real_priority = new_priority;
48606: 2540 0018 movel %d0,%a2@(24)
if ( the_thread->current_priority != new_priority )
4860a: b0aa 0014 cmpl %a2@(20),%d0
4860e: 6712 beqs 48622 <_Scheduler_CBS_Unblock+0x6e>
_Thread_Change_priority(the_thread, new_priority, true);
48610: 4878 0001 pea 1 <ADD>
48614: 2f00 movel %d0,%sp@-
48616: 2f0a movel %a2,%sp@-
48618: 4eb9 0004 89c0 jsr 489c0 <_Thread_Change_priority>
4861e: 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,
48622: 2079 0006 08da moveal 608da <_Per_CPU_Information+0x12>,%a0
48628: 2f28 0014 movel %a0@(20),%sp@-
4862c: 2f2a 0014 movel %a2@(20),%sp@-
48630: 2079 0005 ebe0 moveal 5ebe0 <_Scheduler+0x30>,%a0
48636: 4e90 jsr %a0@
48638: 508f addql #8,%sp
4863a: 4a80 tstl %d0
4863c: 6f20 bles 4865e <_Scheduler_CBS_Unblock+0xaa>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4863e: 2079 0006 08d6 moveal 608d6 <_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;
48644: 23ca 0006 08da movel %a2,608da <_Per_CPU_Information+0x12>
if ( _Thread_Executing->is_preemptible ||
4864a: 4a28 0070 tstb %a0@(112)
4864e: 6606 bnes 48656 <_Scheduler_CBS_Unblock+0xa2>
48650: 4aaa 0014 tstl %a2@(20)
48654: 6608 bnes 4865e <_Scheduler_CBS_Unblock+0xaa> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
48656: 7001 moveq #1,%d0
48658: 13c0 0006 08d4 moveb %d0,608d4 <_Per_CPU_Information+0xc>
}
}
4865e: 242e fff8 movel %fp@(-8),%d2
48662: 246e fffc moveal %fp@(-4),%a2
48666: 4e5e unlk %fp
...
00048520 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
48520: 4e56 0000 linkw %fp,#0
48524: 2f0a movel %a2,%sp@-
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
48526: 4878 0018 pea 18 <OPER2+0x4>
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
4852a: 246e 0008 moveal %fp@(8),%a2
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
4852e: 4eb9 0004 9bc4 jsr 49bc4 <_Workspace_Allocate>
if ( sched ) {
48534: 588f addql #4,%sp
48536: 4a80 tstl %d0
48538: 670e beqs 48548 <_Scheduler_EDF_Allocate+0x28> <== NEVER TAKEN
the_thread->scheduler_info = sched;
4853a: 2540 0086 movel %d0,%a2@(134)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
4853e: 2040 moveal %d0,%a0
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
48540: 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;
48542: 208a movel %a2,%a0@
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
48544: 2141 0014 movel %d1,%a0@(20)
}
return sched;
}
48548: 246e fffc moveal %fp@(-4),%a2
4854c: 4e5e unlk %fp <== NOT EXECUTED
00048710 <_Scheduler_EDF_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_EDF_Free(
Thread_Control *the_thread
)
{
48710: 4e56 0000 linkw %fp,#0
_Workspace_Free( the_thread->scheduler_info );
48714: 206e 0008 moveal %fp@(8),%a0
48718: 2d68 0086 0008 movel %a0@(134),%fp@(8)
}
4871e: 4e5e unlk %fp
void _Scheduler_EDF_Free(
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
48720: 4ef9 0004 9c68 jmp 49c68 <_Workspace_Free>
...
000486fc <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
486fc: 4e56 0000 linkw %fp,#0
48700: 2f0a movel %a2,%sp@-
48702: 246e 0008 moveal %fp@(8),%a2
_Scheduler_EDF_Enqueue(the_thread);
48706: 2f0a movel %a2,%sp@-
48708: 4eb9 0004 8598 jsr 48598 <_Scheduler_EDF_Enqueue>
4870e: 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(
48712: 2079 0006 084a moveal 6084a <_Per_CPU_Information+0x12>,%a0
48718: 2f28 0014 movel %a0@(20),%sp@-
4871c: 2079 0005 eb50 moveal 5eb50 <_Scheduler+0x30>,%a0
48722: 4e90 jsr %a0@
48724: 4fef 000c lea %sp@(12),%sp
48728: 4a80 tstl %d0
4872a: 6c20 bges 4874c <_Scheduler_EDF_Unblock+0x50>
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4872c: 2079 0006 0846 moveal 60846 <_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;
48732: 23ca 0006 084a movel %a2,6084a <_Per_CPU_Information+0x12>
if ( _Thread_Executing->is_preemptible ||
48738: 4a28 0070 tstb %a0@(112)
4873c: 6606 bnes 48744 <_Scheduler_EDF_Unblock+0x48>
4873e: 4aaa 0014 tstl %a2@(20)
48742: 6608 bnes 4874c <_Scheduler_EDF_Unblock+0x50> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
48744: 7001 moveq #1,%d0
48746: 13c0 0006 0844 moveb %d0,60844 <_Per_CPU_Information+0xc>
}
}
4874c: 246e fffc moveal %fp@(-4),%a2
48750: 4e5e unlk %fp <== NOT EXECUTED
00047dac <_Scheduler_Handler_initialization>:
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
47dac: 4e56 0000 linkw %fp,#0
(*_Scheduler.Operations.initialize)();
}
47db0: 4e5e unlk %fp
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
(*_Scheduler.Operations.initialize)();
47db2: 2279 0005 d664 moveal 5d664 <_Scheduler+0x4>,%a1
47db8: 4ed1 jmp %a1@
...
00047f84 <_Scheduler_priority_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
47f84: 4e56 0000 linkw %fp,#0
_Workspace_Free( the_thread->scheduler_info );
47f88: 206e 0008 moveal %fp@(8),%a0
47f8c: 2d68 0086 0008 movel %a0@(134),%fp@(8)
}
47f92: 4e5e unlk %fp
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
47f94: 4ef9 0004 94d4 jmp 494d4 <_Workspace_Free>
...
00048080 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
48080: 4e56 0000 linkw %fp,#0
48084: 2f0a movel %a2,%sp@-
Thread_Control *executing;
executing = _Thread_Executing;
48086: 2479 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a2
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
4808c: 4a2a 0070 tstb %a2@(112)
48090: 6758 beqs 480ea <_Scheduler_priority_Tick+0x6a>
return;
if ( !_States_Is_ready( executing->current_state ) )
48092: 4aaa 0010 tstl %a2@(16)
48096: 6652 bnes 480ea <_Scheduler_priority_Tick+0x6a>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
48098: 202a 0076 movel %a2@(118),%d0
4809c: 7201 moveq #1,%d1
4809e: b280 cmpl %d0,%d1
480a0: 6248 bhis 480ea <_Scheduler_priority_Tick+0x6a>
480a2: 123c 0002 moveb #2,%d1
480a6: b280 cmpl %d0,%d1
480a8: 640a bccs 480b4 <_Scheduler_priority_Tick+0x34>
480aa: 123c 0003 moveb #3,%d1
480ae: b280 cmpl %d0,%d1
480b0: 6638 bnes 480ea <_Scheduler_priority_Tick+0x6a> <== NEVER TAKEN
480b2: 6020 bras 480d4 <_Scheduler_priority_Tick+0x54>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
480b4: 202a 0072 movel %a2@(114),%d0
480b8: 5380 subql #1,%d0
480ba: 2540 0072 movel %d0,%a2@(114)
480be: 6e2a bgts 480ea <_Scheduler_priority_Tick+0x6a>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
480c0: 2079 0005 d66c moveal 5d66c <_Scheduler+0xc>,%a0
480c6: 4e90 jsr %a0@
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
480c8: 41f9 0005 ee8e lea 5ee8e <_Thread_Ticks_per_timeslice>,%a0
480ce: 2550 0072 movel %a0@,%a2@(114)
480d2: 6016 bras 480ea <_Scheduler_priority_Tick+0x6a>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
480d4: 202a 0072 movel %a2@(114),%d0
480d8: 5380 subql #1,%d0
480da: 2540 0072 movel %d0,%a2@(114)
480de: 660a bnes 480ea <_Scheduler_priority_Tick+0x6a>
(*executing->budget_callout)( executing );
480e0: 2f0a movel %a2,%sp@-
480e2: 206a 007a moveal %a2@(122),%a0
480e6: 4e90 jsr %a0@
480e8: 588f addql #4,%sp
break;
#endif
}
}
480ea: 246e fffc moveal %fp@(-4),%a2
480ee: 4e5e unlk %fp
...
00048300 <_TOD_Set_with_timestamp>:
#include <rtems/score/watchdog.h>
void _TOD_Set_with_timestamp(
const Timestamp_Control *tod
)
{
48300: 4e56 ffec linkw %fp,#-20
48304: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
48308: 246e 0008 moveal %fp@(8),%a2
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
4830c: 47f9 0005 b0a8 lea 5b0a8 <__divdi3>,%a3
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
48312: 2412 movel %a2@,%d2
48314: 262a 0004 movel %a2@(4),%d3
static inline uint32_t _Timestamp64_implementation_Get_nanoseconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time % 1000000000L);
48318: 2f3c 3b9a ca00 movel #1000000000,%sp@-
4831e: 42a7 clrl %sp@-
48320: 2f03 movel %d3,%sp@-
48322: 2f02 movel %d2,%sp@-
48324: 4eb9 0005 b508 jsr 5b508 <__moddi3>
4832a: 4fef 0010 lea %sp@(16),%sp
4832e: 2801 movel %d1,%d4
static inline uint32_t _Timestamp64_implementation_Get_seconds(
const Timestamp64_Control *_time
)
{
return (uint32_t) (*_time / 1000000000L);
48330: 2f3c 3b9a ca00 movel #1000000000,%sp@-
48336: 42a7 clrl %sp@-
48338: 2f03 movel %d3,%sp@-
4833a: 2f02 movel %d2,%sp@-
4833c: 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;
4833e: 2039 0006 1316 movel 61316 <_Thread_Dispatch_disable_level>,%d0
++level;
48344: 5280 addql #1,%d0
48346: 4fef 0010 lea %sp@(16),%sp
4834a: 2401 movel %d1,%d2
_Thread_Dispatch_disable_level = level;
4834c: 23c0 0006 1316 movel %d0,61316 <_Thread_Dispatch_disable_level>
48352: 2f3c 3b9a ca00 movel #1000000000,%sp@-
48358: 42a7 clrl %sp@-
4835a: 2f39 0006 12bc movel 612bc <_TOD+0x4>,%sp@-
48360: 2f39 0006 12b8 movel 612b8 <_TOD>,%sp@-
48366: 4e93 jsr %a3@
48368: 4fef 0010 lea %sp@(16),%sp
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds_now = _TOD_Seconds_since_epoch();
if ( seconds_next < seconds_now )
4836c: b282 cmpl %d2,%d1
4836e: 630a blss 4837a <_TOD_Set_with_timestamp+0x7a>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48370: 9282 subl %d2,%d1
48372: 2f01 movel %d1,%sp@-
48374: 4878 0001 pea 1 <ADD>
48378: 6006 bras 48380 <_TOD_Set_with_timestamp+0x80>
4837a: 9481 subl %d1,%d2
4837c: 2f02 movel %d2,%sp@-
4837e: 42a7 clrl %sp@-
48380: 4879 0006 13a6 pea 613a6 <_Watchdog_Seconds_chain>
48386: 4eb9 0004 a584 jsr 4a584 <_Watchdog_Adjust>
4838c: 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;
48390: 2012 movel %a2@,%d0
48392: 222a 0004 movel %a2@(4),%d1
_TOD.seconds_trigger = nanoseconds;
48396: 23c4 0006 12c8 movel %d4,612c8 <_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;
4839c: 23c0 0006 12b8 movel %d0,612b8 <_TOD>
483a2: 23c1 0006 12bc movel %d1,612bc <_TOD+0x4>
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
483a8: 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;
483ae: 7201 moveq #1,%d1
_TOD_Activate();
_Thread_Enable_dispatch();
}
483b0: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, seconds_next - seconds_now );
_TOD.now = *tod;
_TOD.seconds_trigger = nanoseconds;
_TOD.is_set = true;
483b2: 13c1 0006 12cc moveb %d1,612cc <_TOD+0x14>
_TOD_Activate();
_Thread_Enable_dispatch();
483b8: 4ef9 0004 99dc jmp 499dc <_Thread_Enable_dispatch>
...
00046c1c <_TOD_Validate>:
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
46c1c: 43f9 0005 d33e lea 5d33e <Configuration+0xc>,%a1
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46c22: 4e56 0000 linkw %fp,#0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
46c26: 203c 000f 4240 movel #1000000,%d0
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46c2c: 2f03 movel %d3,%sp@-
46c2e: 206e 0008 moveal %fp@(8),%a0
46c32: 2f02 movel %d2,%sp@-
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
46c34: 4c51 0000 remul %a1@,%d0,%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
46c38: 4a88 tstl %a0
46c3a: 6758 beqs 46c94 <_TOD_Validate+0x78> <== NEVER TAKEN
46c3c: b0a8 0018 cmpl %a0@(24),%d0
46c40: 6352 blss 46c94 <_TOD_Validate+0x78>
(the_tod->ticks >= ticks_per_second) ||
46c42: 703b moveq #59,%d0
46c44: b0a8 0014 cmpl %a0@(20),%d0
46c48: 654a bcss 46c94 <_TOD_Validate+0x78>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
46c4a: b0a8 0010 cmpl %a0@(16),%d0
46c4e: 6544 bcss 46c94 <_TOD_Validate+0x78>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
46c50: 7217 moveq #23,%d1
46c52: b2a8 000c cmpl %a0@(12),%d1
46c56: 653c bcss 46c94 <_TOD_Validate+0x78>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
46c58: 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) ||
46c5c: 6736 beqs 46c94 <_TOD_Validate+0x78> <== NEVER TAKEN
(the_tod->month == 0) ||
46c5e: 760c moveq #12,%d3
46c60: b680 cmpl %d0,%d3
46c62: 6530 bcss 46c94 <_TOD_Validate+0x78>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
46c64: 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) ||
46c66: 0c82 0000 07c3 cmpil #1987,%d2
46c6c: 6326 blss 46c94 <_TOD_Validate+0x78>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
46c6e: 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) ||
46c72: 6720 beqs 46c94 <_TOD_Validate+0x78> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
46c74: 163c 0003 moveb #3,%d3
46c78: 41f9 0005 e6c8 lea 5e6c8 <_TOD_Days_per_month>,%a0
46c7e: c483 andl %d3,%d2
46c80: 6606 bnes 46c88 <_TOD_Validate+0x6c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
46c82: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0
46c86: 6004 bras 46c8c <_TOD_Validate+0x70>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
46c88: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( the_tod->day > days_in_month )
46c8c: b081 cmpl %d1,%d0
46c8e: 54c0 scc %d0
46c90: 4480 negl %d0
46c92: 6002 bras 46c96 <_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;
46c94: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
46c96: 241f movel %sp@+,%d2
46c98: 261f movel %sp@+,%d3
46c9a: 4e5e unlk %fp
...
000482ac <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
482ac: 4e56 fff0 linkw %fp,#-16
482b0: 48d7 041c moveml %d2-%d4/%a2,%sp@
482b4: 246e 0008 moveal %fp@(8),%a2
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
482b8: 282a 0010 movel %a2@(16),%d4
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
482bc: 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 );
482c0: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
482c2: 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 );
482c6: 4eb9 0004 8ec8 jsr 48ec8 <_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 )
482cc: 588f addql #4,%sp
482ce: b4aa 0014 cmpl %a2@(20),%d2
482d2: 670c beqs 482e0 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
482d4: 2f02 movel %d2,%sp@-
482d6: 2f0a movel %a2,%sp@-
482d8: 4eb9 0004 8e6c jsr 48e6c <_Thread_Set_priority>
482de: 508f addql #8,%sp
_ISR_Disable( level );
482e0: 203c 0000 0700 movel #1792,%d0
482e6: 40c2 movew %sr,%d2
482e8: 8082 orl %d2,%d0
482ea: 46c0 movew %d0,%sr
482ec: 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;
482ee: 202a 0010 movel %a2@(16),%d0
482f2: c284 andl %d4,%d1
if ( state != STATES_TRANSIENT ) {
482f4: 7804 moveq #4,%d4
482f6: b880 cmpl %d0,%d4
482f8: 672e beqs 48328 <_Thread_Change_priority+0x7c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
482fa: 4a81 tstl %d1
482fc: 6608 bnes 48306 <_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);
482fe: 72fb moveq #-5,%d1
48300: c280 andl %d0,%d1
48302: 2541 0010 movel %d1,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
48306: 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);
48308: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
4830e: 676c beqs 4837c <_Thread_Change_priority+0xd0>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
48310: 2d4a 000c movel %a2,%fp@(12)
48314: 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 );
}
4831a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
48320: 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 );
48322: 4ef9 0004 8dd0 jmp 48dd0 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
48328: 4a81 tstl %d1
4832a: 661e bnes 4834a <_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 );
4832c: 42aa 0010 clrl %a2@(16)
if ( prepend_it )
48330: 4a03 tstb %d3
48332: 670a beqs 4833e <_Thread_Change_priority+0x92>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
48334: 2f0a movel %a2,%sp@-
48336: 2079 0005 d688 moveal 5d688 <_Scheduler+0x28>,%a0
4833c: 6008 bras 48346 <_Thread_Change_priority+0x9a>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
4833e: 2079 0005 d684 moveal 5d684 <_Scheduler+0x24>,%a0
48344: 2f0a movel %a2,%sp@-
48346: 4e90 jsr %a0@
48348: 588f addql #4,%sp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
4834a: 203c 0000 0700 movel #1792,%d0
48350: 46c2 movew %d2,%sr
48352: 8082 orl %d2,%d0
48354: 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();
48356: 2079 0005 d668 moveal 5d668 <_Scheduler+0x8>,%a0
4835c: 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 );
4835e: 2079 0005 f31e moveal 5f31e <_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() &&
48364: b1f9 0005 f322 cmpal 5f322 <_Per_CPU_Information+0x12>,%a0
4836a: 670e beqs 4837a <_Thread_Change_priority+0xce>
4836c: 4a28 0070 tstb %a0@(112)
48370: 6708 beqs 4837a <_Thread_Change_priority+0xce>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
48372: 7801 moveq #1,%d4
48374: 13c4 0005 f31c moveb %d4,5f31c <_Per_CPU_Information+0xc>
_ISR_Enable( level );
4837a: 46c2 movew %d2,%sr
}
4837c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
48382: 4e5e unlk %fp
...
00048554 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48554: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48558: 486e fffc pea %fp@(-4)
4855c: 2f2e 0008 movel %fp@(8),%sp@-
48560: 4eb9 0004 871c jsr 4871c <_Thread_Get>
switch ( location ) {
48566: 508f addql #8,%sp
48568: 4aae fffc tstl %fp@(-4)
4856c: 661e bnes 4858c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
4856e: 2f3c 1000 0018 movel #268435480,%sp@-
48574: 2f00 movel %d0,%sp@-
48576: 4eb9 0004 8388 jsr 48388 <_Thread_Clear_state>
4857c: 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;
4857e: 2039 0005 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0
--level;
48584: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
48586: 23c0 0005 eed6 movel %d0,5eed6 <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
4858c: 4e5e unlk %fp <== NOT EXECUTED
00048590 <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
48590: 4e56 ffd0 linkw %fp,#-48
48594: 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 );
48598: 283c 0000 0700 movel #1792,%d4
4859e: 2204 movel %d4,%d1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
485a0: 2479 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a2
_ISR_Disable( level );
485a6: 40c0 movew %sr,%d0
485a8: 8280 orl %d0,%d1
485aa: 46c1 movew %d1,%sr
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
485ac: 240e movel %fp,%d2
485ae: 5182 subql #8,%d2
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
485b0: 2a3c 0004 7124 movel #291108,%d5
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
485b6: 49f9 0004 9524 lea 49524 <_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 );
485bc: 4bf9 0004 968c lea 4968c <_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 );
485c2: 263c 0004 966a movel #300650,%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 ) {
485c8: 6000 0104 braw 486ce <_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;
485cc: 7201 moveq #1,%d1
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
485ce: 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;
485d0: 2679 0005 f322 moveal 5f322 <_Per_CPU_Information+0x12>,%a3
485d6: 23c1 0005 eed6 movel %d1,5eed6 <_Thread_Dispatch_disable_level>
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
485dc: 13c6 0005 f31c moveb %d6,5f31c <_Per_CPU_Information+0xc>
_Thread_Executing = heir;
485e2: 23cb 0005 f31e movel %a3,5f31e <_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 )
485e8: b5cb cmpal %a3,%a2
485ea: 6612 bnes 485fe <_Thread_Dispatch+0x6e>
485ec: 42b9 0005 eed6 clrl 5eed6 <_Thread_Dispatch_disable_level>
post_switch:
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 0 );
#endif
_ISR_Enable( level );
485f2: 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;
485f4: 2679 0005 ef4a moveal 5ef4a <_API_extensions_Post_switch_list>,%a3
485fa: 6000 00ec braw 486e8 <_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 )
485fe: 7201 moveq #1,%d1
48600: b2ab 0076 cmpl %a3@(118),%d1
48604: 660a bnes 48610 <_Thread_Dispatch+0x80>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
48606: 41f9 0005 ee8e lea 5ee8e <_Thread_Ticks_per_timeslice>,%a0
4860c: 2750 0072 movel %a0@,%a3@(114)
_ISR_Enable( level );
48610: 46c0 movew %d0,%sr
48612: 4879 0005 ee80 pea 5ee80 <_TOD+0x8>
48618: 2245 moveal %d5,%a1
4861a: 2f02 movel %d2,%sp@-
4861c: 4e91 jsr %a1@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
4861e: 508f addql #8,%sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
48620: 206e fff8 moveal %fp@(-8),%a0
48624: 226e fffc moveal %fp@(-4),%a1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
48628: 2008 movel %a0,%d0
4862a: 2209 movel %a1,%d1
4862c: 2c39 0005 f32a movel 5f32a <_Per_CPU_Information+0x1a>,%d6
48632: 92b9 0005 f32e subl 5f32e <_Per_CPU_Information+0x1e>,%d1
48638: 9186 subxl %d6,%d0
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
4863a: d3aa 0082 addl %d1,%a2@(130)
4863e: 2c2a 007e movel %a2@(126),%d6
48642: dd80 addxl %d0,%d6
48644: 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;
48648: 23c8 0005 f32a movel %a0,5f32a <_Per_CPU_Information+0x1a>
4864e: 23c9 0005 f32e movel %a1,5f32e <_Per_CPU_Information+0x1e>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48654: 2079 0005 ef46 moveal 5ef46 <_Thread_libc_reent>,%a0
4865a: 4a88 tstl %a0
4865c: 6708 beqs 48666 <_Thread_Dispatch+0xd6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
4865e: 2550 00f6 movel %a0@,%a2@(246)
*_Thread_libc_reent = heir->libc_reent;
48662: 20ab 00f6 movel %a3@(246),%a0@
48666: 2c39 0005 d788 movel 5d788 <_User_extensions_Switches_list>,%d6
4866c: 6012 bras 48680 <_Thread_Dispatch+0xf0>
while ( node != tail ) {
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
4866e: 2f0b movel %a3,%sp@-
48670: 2246 moveal %d6,%a1
48672: 2f0a movel %a2,%sp@-
48674: 2069 0008 moveal %a1@(8),%a0
48678: 4e90 jsr %a0@
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
4867a: 508f addql #8,%sp
4867c: 2046 moveal %d6,%a0
4867e: 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 ) {
48680: 0c86 0005 d78c cmpil #382860,%d6
48686: 66e6 bnes 4866e <_Thread_Dispatch+0xde>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
48688: 486b 00be pea %a3@(190)
4868c: 486a 00be pea %a2@(190)
48690: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
48692: 508f addql #8,%sp
48694: 4aaa 00f2 tstl %a2@(242)
48698: 6726 beqs 486c0 <_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 );
4869a: 2079 0005 ef42 moveal 5ef42 <_Thread_Allocated_fp>,%a0
486a0: b1ca cmpal %a2,%a0
486a2: 671c beqs 486c0 <_Thread_Dispatch+0x130>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
486a4: 4a88 tstl %a0
486a6: 670a beqs 486b2 <_Thread_Dispatch+0x122>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
486a8: 4868 00f2 pea %a0@(242)
486ac: 2243 moveal %d3,%a1
486ae: 4e91 jsr %a1@
486b0: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
486b2: 486a 00f2 pea %a2@(242)
486b6: 4e95 jsr %a5@
_Thread_Allocated_fp = executing;
486b8: 588f addql #4,%sp
486ba: 23ca 0005 ef42 movel %a2,5ef42 <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
486c0: 2479 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a2
_ISR_Disable( level );
486c6: 2204 movel %d4,%d1
486c8: 40c0 movew %sr,%d0
486ca: 8280 orl %d0,%d1
486cc: 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 ) {
486ce: 1239 0005 f31c moveb 5f31c <_Per_CPU_Information+0xc>,%d1
486d4: 6600 fef6 bnew 485cc <_Thread_Dispatch+0x3c>
486d8: 6000 ff12 braw 485ec <_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 );
486dc: 2f0a movel %a2,%sp@-
486de: 206b 0008 moveal %a3@(8),%a0
486e2: 4e90 jsr %a0@
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
486e4: 2653 moveal %a3@,%a3
486e6: 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 ) {
486e8: b7fc 0005 ef4e cmpal #388942,%a3
486ee: 66ec bnes 486dc <_Thread_Dispatch+0x14c>
486f0: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
486f6: 4e5e unlk %fp
...
0004cda4 <_Thread_Handler>:
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
4cda4: 4e56 0000 linkw %fp,#0
4cda8: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
4cdaa: 2479 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a2
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
4cdb0: 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;
4cdb2: 222a 00a4 movel %a2@(164),%d1
_ISR_Set_level(level);
4cdb6: 40c0 movew %sr,%d0
4cdb8: e189 lsll #8,%d1
4cdba: 0280 0000 f8ff andil #63743,%d0
4cdc0: 8081 orl %d1,%d0
4cdc2: 46c0 movew %d0,%sr
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
doneConstructors = true;
4cdc4: 7001 moveq #1,%d0
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
4cdc6: 1439 0005 e6d4 moveb 5e6d4 <doneConstructors.3726>,%d2
doneConstructors = true;
4cdcc: 13c0 0005 e6d4 moveb %d0,5e6d4 <doneConstructors.3726>
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4cdd2: 4aaa 00f2 tstl %a2@(242)
4cdd6: 6720 beqs 4cdf8 <_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 );
4cdd8: 2079 0005 ef42 moveal 5ef42 <_Thread_Allocated_fp>,%a0
4cdde: b1ca cmpal %a2,%a0
4cde0: 6716 beqs 4cdf8 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4cde2: 4a88 tstl %a0
4cde4: 670c beqs 4cdf2 <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4cde6: 4868 00f2 pea %a0@(242)
4cdea: 4eb9 0004 966a jsr 4966a <_CPU_Context_save_fp>
4cdf0: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4cdf2: 23ca 0005 ef42 movel %a2,5ef42 <_Thread_Allocated_fp>
);
}
static inline void _User_extensions_Thread_begin( Thread_Control *executing )
{
_User_extensions_Iterate(
4cdf8: 4879 0004 9096 pea 49096 <_User_extensions_Thread_begin_visitor>
4cdfe: 2f0a movel %a2,%sp@-
4ce00: 4eb9 0004 90f6 jsr 490f6 <_User_extensions_Iterate>
_User_extensions_Thread_begin( executing );
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4ce06: 4eb9 0004 86fc jsr 486fc <_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) */ {
4ce0c: 508f addql #8,%sp
4ce0e: 4a02 tstb %d2
4ce10: 6606 bnes 4ce18 <_Thread_Handler+0x74>
INIT_NAME ();
4ce12: 4eb9 0005 b620 jsr 5b620 <_init>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4ce18: 202a 008e movel %a2@(142),%d0
4ce1c: 6606 bnes 4ce24 <_Thread_Handler+0x80>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4ce1e: 2f2a 0096 movel %a2@(150),%sp@-
4ce22: 600a bras 4ce2e <_Thread_Handler+0x8a>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
4ce24: 7201 moveq #1,%d1
4ce26: b280 cmpl %d0,%d1
4ce28: 6610 bnes 4ce3a <_Thread_Handler+0x96> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
4ce2a: 2f2a 0092 movel %a2@(146),%sp@-
4ce2e: 206a 008a moveal %a2@(138),%a0
4ce32: 4e90 jsr %a0@
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
4ce34: 588f addql #4,%sp
4ce36: 2540 0028 movel %d0,%a2@(40)
}
}
static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
{
_User_extensions_Iterate(
4ce3a: 4879 0004 90ae pea 490ae <_User_extensions_Thread_exitted_visitor>
4ce40: 2f0a movel %a2,%sp@-
4ce42: 4eb9 0004 90f6 jsr 490f6 <_User_extensions_Iterate>
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
_Internal_error_Occurred(
4ce48: 4878 0005 pea 5 <COMPARE>
4ce4c: 4878 0001 pea 1 <ADD>
4ce50: 42a7 clrl %sp@-
4ce52: 4eb9 0004 7550 jsr 47550 <_Internal_error_Occurred>
00048978 <_Thread_Handler_initialization>:
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
48978: 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 =
4897c: 2079 0005 b878 moveal 5b878 <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 ||
48982: 4ab9 0005 b87c tstl 5b87c <Configuration+0x28>
48988: 6708 beqs 48992 <_Thread_Handler_initialization+0x1a><== NEVER TAKEN
4898a: 4ab9 0005 b880 tstl 5b880 <Configuration+0x2c>
48990: 6610 bnes 489a2 <_Thread_Handler_initialization+0x2a>
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
48992: 4878 000e pea e <OPER1+0x2>
48996: 4878 0001 pea 1 <ADD>
4899a: 42a7 clrl %sp@-
4899c: 4eb9 0004 7550 jsr 47550 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
489a2: 4a88 tstl %a0
489a4: 670a beqs 489b0 <_Thread_Handler_initialization+0x38>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
489a6: 2f39 0005 b858 movel 5b858 <Configuration+0x4>,%sp@-
489ac: 4e90 jsr %a0@
489ae: 588f addql #4,%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
489b0: 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;
489b4: 41f9 0005 b85c lea 5b85c <Configuration+0x8>,%a0
489ba: 23d0 0005 ef56 movel %a0@,5ef56 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
489c0: 41f9 0005 b868 lea 5b868 <Configuration+0x14>,%a0
489c6: 23d0 0005 ee8e movel %a0@,5ee8e <_Thread_Ticks_per_timeslice>
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
489cc: 4200 clrb %d0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
489ce: 42a7 clrl %sp@-
489d0: 4878 010a pea 10a <DBL_MANT_DIG+0xd5>
489d4: 4878 0001 pea 1 <ADD>
489d8: 4878 0001 pea 1 <ADD>
489dc: 4878 0001 pea 1 <ADD>
489e0: 4879 0005 efc4 pea 5efc4 <_Thread_Internal_information>
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
489e6: 13c0 0005 f31c moveb %d0,5f31c <_Per_CPU_Information+0xc>
_Thread_Executing = NULL;
489ec: 42b9 0005 f31e clrl 5f31e <_Per_CPU_Information+0xe>
_Thread_Heir = NULL;
489f2: 42b9 0005 f322 clrl 5f322 <_Per_CPU_Information+0x12>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
489f8: 42b9 0005 ef42 clrl 5ef42 <_Thread_Allocated_fp>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
489fe: 4eb9 0004 7aec jsr 47aec <_Objects_Initialize_information>
48a04: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48a08: 4e5e unlk %fp <== NOT EXECUTED
00049468 <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
49468: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4946a: 4e56 0000 linkw %fp,#0
4946e: 2f0a movel %a2,%sp@-
49470: 246e 0008 moveal %fp@(8),%a2
49474: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49478: 666e bnes 494e8 <_Thread_Restart+0x80>
_Thread_Set_transient( the_thread );
4947a: 2f0a movel %a2,%sp@-
4947c: 4eb9 0004 9550 jsr 49550 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
49482: 2f2e 0010 movel %fp@(16),%sp@-
49486: 2f2e 000c movel %fp@(12),%sp@-
4948a: 2f0a movel %a2,%sp@-
4948c: 4eb9 0004 c044 jsr 4c044 <_Thread_Reset>
_Thread_Load_environment( the_thread );
49492: 2f0a movel %a2,%sp@-
49494: 4eb9 0004 bd80 jsr 4bd80 <_Thread_Load_environment>
_Thread_Ready( the_thread );
4949a: 2f0a movel %a2,%sp@-
4949c: 4eb9 0004 c014 jsr 4c014 <_Thread_Ready>
);
}
static inline void _User_extensions_Thread_restart( Thread_Control *restarted )
{
_User_extensions_Iterate(
494a2: 4879 0004 9706 pea 49706 <_User_extensions_Thread_restart_visitor>
494a8: 2f0a movel %a2,%sp@-
494aa: 4eb9 0004 977e jsr 4977e <_User_extensions_Iterate>
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
494b0: 4fef 0020 lea %sp@(32),%sp
_Thread_Restart_self();
return true;
494b4: 7001 moveq #1,%d0
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
494b6: b5f9 0005 fbd6 cmpal 5fbd6 <_Per_CPU_Information+0xe>,%a2
494bc: 662c bnes 494ea <_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 )
494be: 4aaa 00f2 tstl %a2@(242)
494c2: 670c beqs 494d0 <_Thread_Restart+0x68>
_Context_Restore_fp( &_Thread_Executing->fp_context );
494c4: 486a 00f2 pea %a2@(242)
494c8: 4eb9 0004 9d14 jsr 49d14 <_CPU_Context_restore_fp>
494ce: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
494d0: 2079 0005 fbd6 moveal 5fbd6 <_Per_CPU_Information+0xe>,%a0
494d6: 41e8 00be lea %a0@(190),%a0
494da: 2f08 movel %a0,%sp@-
494dc: 4eb9 0004 9bc2 jsr 49bc2 <_CPU_Context_Restart_self>
494e2: 588f addql #4,%sp <== NOT EXECUTED
_Thread_Restart_self();
return true;
494e4: 7001 moveq #1,%d0 <== NOT EXECUTED
494e6: 6002 bras 494ea <_Thread_Restart+0x82> <== NOT EXECUTED
}
return false;
494e8: 4200 clrb %d0
}
494ea: 246e fffc moveal %fp@(-4),%a2
494ee: 4e5e unlk %fp
...
00048f40 <_Thread_Stack_Free>:
#include <rtems/config.h>
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
48f40: 4e56 0000 linkw %fp,#0
48f44: 206e 0008 moveal %fp@(8),%a0
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
48f48: 4a28 00ac tstb %a0@(172)
48f4c: 6710 beqs 48f5e <_Thread_Stack_Free+0x1e> <== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
48f4e: 2279 0005 b880 moveal 5b880 <Configuration+0x2c>,%a1
48f54: 2d68 00b2 0008 movel %a0@(178),%fp@(8)
}
48f5a: 4e5e unlk %fp
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
48f5c: 4ed1 jmp %a1@
}
48f5e: 4e5e unlk %fp <== NOT EXECUTED
...
0004825c <_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 ) ) {
4825c: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
4825e: 4e56 0000 linkw %fp,#0
48262: 202e 0010 movel %fp@(16),%d0
48266: 2f0a movel %a2,%sp@-
48268: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
4826c: 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 ) ) {
48270: b2aa 0050 cmpl %a2@(80),%d1
48274: 6618 bnes 4828e <_Thread_blocking_operation_Cancel+0x32>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
48276: 123c 0003 moveb #3,%d1
4827a: 2541 0050 movel %d1,%a2@(80)
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4827e: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
48280: 486a 0048 pea %a2@(72)
48284: 4eb9 0004 92f8 jsr 492f8 <_Watchdog_Remove>
4828a: 588f addql #4,%sp
4828c: 6002 bras 48290 <_Thread_blocking_operation_Cancel+0x34>
} else
_ISR_Enable( level );
4828e: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
48290: 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
}
48294: 246e fffc moveal %fp@(-4),%a2
48298: 203c 1007 fff8 movel #268959736,%d0
4829e: 2d40 000c movel %d0,%fp@(12)
482a2: 4e5e unlk %fp
482a4: 4ef9 0004 8388 jmp 48388 <_Thread_Clear_state>
...
0004b948 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4b948: 4e56 0000 linkw %fp,#0
4b94c: 226e 0008 moveal %fp@(8),%a1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4b950: 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 &&
4b954: 2028 0030 movel %a0@(48),%d0
4b958: 671c beqs 4b976 <_Thread_queue_Process_timeout+0x2e>
4b95a: b3f9 0005 f31e cmpal 5f31e <_Per_CPU_Information+0xe>,%a1
4b960: 6614 bnes 4b976 <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
4b962: 7203 moveq #3,%d1
4b964: b280 cmpl %d0,%d1
4b966: 6720 beqs 4b988 <_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;
4b968: 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;
4b96a: 2368 003c 0034 movel %a0@(60),%a1@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4b970: 2140 0030 movel %d0,%a0@(48)
4b974: 6012 bras 4b988 <_Thread_queue_Process_timeout+0x40>
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4b976: 2368 003c 0034 movel %a0@(60),%a1@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4b97c: 2f09 movel %a1,%sp@-
4b97e: 2f08 movel %a0,%sp@-
4b980: 4eb9 0004 b844 jsr 4b844 <_Thread_queue_Extract>
4b986: 508f addql #8,%sp
}
}
4b988: 4e5e unlk %fp <== NOT EXECUTED
00048dd0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
48dd0: 4e56 fff0 linkw %fp,#-16
48dd4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
48dd8: 246e 0008 moveal %fp@(8),%a2
48ddc: 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 )
48de0: 4a8a tstl %a2
48de2: 6746 beqs 48e2a <_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 ) {
48de4: 7001 moveq #1,%d0
48de6: b0aa 0034 cmpl %a2@(52),%d0
48dea: 663e bnes 48e2a <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
48dec: 303c 0700 movew #1792,%d0
48df0: 40c2 movew %sr,%d2
48df2: 8082 orl %d2,%d0
48df4: 46c0 movew %d0,%sr
48df6: 202b 0010 movel %a3@(16),%d0
48dfa: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
48e00: 6726 beqs 48e28 <_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;
48e02: 7001 moveq #1,%d0
48e04: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
48e08: 4878 0001 pea 1 <ADD>
48e0c: 2f0b movel %a3,%sp@-
48e0e: 2f0a movel %a2,%sp@-
48e10: 4eb9 0004 b880 jsr 4b880 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
48e16: 486e fffc pea %fp@(-4)
48e1a: 2f0b movel %a3,%sp@-
48e1c: 2f0a movel %a2,%sp@-
48e1e: 4eb9 0004 8bdc jsr 48bdc <_Thread_queue_Enqueue_priority>
48e24: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
48e28: 46c2 movew %d2,%sr
}
}
48e2a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
48e30: 4e5e unlk %fp <== NOT EXECUTED
00048e34 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48e34: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48e38: 486e fffc pea %fp@(-4)
48e3c: 2f2e 0008 movel %fp@(8),%sp@-
48e40: 4eb9 0004 871c jsr 4871c <_Thread_Get>
switch ( location ) {
48e46: 508f addql #8,%sp
48e48: 4aae fffc tstl %fp@(-4)
48e4c: 6618 bnes 48e66 <_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 );
48e4e: 2f00 movel %d0,%sp@-
48e50: 4eb9 0004 b948 jsr 4b948 <_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;
48e56: 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;
48e58: 2039 0005 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0
--level;
48e5e: 5380 subql #1,%d0
_Thread_Dispatch_disable_level = level;
48e60: 23c0 0005 eed6 movel %d0,5eed6 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
48e66: 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 649c lea 5649c <_Watchdog_Adjust_to_chain>,%a3
52712: 4bf9 0006 6f48 lea 66f48 <__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 7560 movel 77560 <_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 7420 movel 77420 <_TOD+0x4>,%sp@-
52742: 2f39 0007 741c movel 7741c <_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 641c jsr 5641c <_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 6520 lea 56520 <_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 3220 movel #340512,%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 747a movel 7747a <_Thread_Dispatch_disable_level>,%d0
++level;
52832: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
52834: 23c0 0007 747a movel %d0,7747a <_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 6644 lea 56644 <_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 60cc jsr 560cc <_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 58b8 jsr 558b8 <_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 747a movel 7747a <_Thread_Dispatch_disable_level>,%d0
++level;
52896: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
52898: 23c0 0007 747a movel %d0,7747a <_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 7560 movel 77560 <_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 6520 jsr 56520 <_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 7420 movel 77420 <_TOD+0x4>,%sp@-
5292a: 2f39 0007 741c movel 7741c <_TOD>,%sp@-
52930: 4eb9 0006 6f48 jsr 66f48 <__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 6520 jsr 56520 <_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><== NEVER TAKEN
_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 58b8 jmp 558b8 <_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 31e8 jmp 531e8 <_Chain_Append>
0004a2f0 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
4a2f0: 4e56 ffec linkw %fp,#-20
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
4a2f4: 206e 000c moveal %fp@(12),%a0
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
4a2f8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4a2fc: 266e 0010 moveal %fp@(16),%a3
4a300: 246e 0014 moveal %fp@(20),%a2
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
4a304: 2410 movel %a0@,%d2
4a306: 2628 0004 movel %a0@(4),%d3
4a30a: 2002 movel %d2,%d0
4a30c: 8083 orl %d3,%d0
4a30e: 6606 bnes 4a316 <_Timestamp64_Divide+0x26> <== ALWAYS TAKEN
*_ival_percentage = 0;
4a310: 4293 clrl %a3@ <== NOT EXECUTED
*_fval_percentage = 0;
4a312: 4292 clrl %a2@ <== NOT EXECUTED
return;
4a314: 605c bras 4a372 <_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;
4a316: 206e 0008 moveal %fp@(8),%a0
4a31a: 49f9 0005 b0a8 lea 5b0a8 <__divdi3>,%a4
4a320: 2f3c 0001 86a0 movel #100000,%sp@-
4a326: 42a7 clrl %sp@-
4a328: 2f28 0004 movel %a0@(4),%sp@-
4a32c: 2f10 movel %a0@,%sp@-
4a32e: 4eb9 0005 aff8 jsr 5aff8 <__muldi3>
4a334: 4fef 0010 lea %sp@(16),%sp
4a338: 2f03 movel %d3,%sp@-
4a33a: 2f02 movel %d2,%sp@-
4a33c: 2f01 movel %d1,%sp@-
4a33e: 2f00 movel %d0,%sp@-
4a340: 4e94 jsr %a4@
4a342: 4fef 0010 lea %sp@(16),%sp
4a346: 2400 movel %d0,%d2
*_ival_percentage = answer / 1000;
4a348: 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;
4a34c: 2601 movel %d1,%d3
*_ival_percentage = answer / 1000;
4a34e: 42a7 clrl %sp@-
4a350: 2f01 movel %d1,%sp@-
4a352: 2f02 movel %d2,%sp@-
4a354: 4e94 jsr %a4@
4a356: 4fef 0010 lea %sp@(16),%sp
4a35a: 2681 movel %d1,%a3@
*_fval_percentage = answer % 1000;
4a35c: 4878 03e8 pea 3e8 <DBL_MANT_DIG+0x3b3>
4a360: 42a7 clrl %sp@-
4a362: 2f03 movel %d3,%sp@-
4a364: 2f02 movel %d2,%sp@-
4a366: 4eb9 0005 b508 jsr 5b508 <__moddi3>
4a36c: 4fef 0010 lea %sp@(16),%sp
4a370: 2481 movel %d1,%a2@
}
4a372: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4a378: 4e5e unlk %fp <== NOT EXECUTED
000491a0 <_User_extensions_Handler_initialization>:
void _User_extensions_Handler_initialization(void)
{
491a0: 4e56 fffc linkw %fp,#-4
uint32_t number_of_initial_extensions =
491a4: 2039 0005 b894 movel 5b894 <Configuration+0x40>,%d0
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
491aa: 6724 beqs 491d0 <_User_extensions_Handler_initialization+0x30><== NEVER TAKEN
User_extensions_Switch_control *initial_extension_switch_controls =
_Workspace_Allocate_or_fatal_error(
491ac: 2200 movel %d0,%d1
491ae: e988 lsll #4,%d0
491b0: 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 =
491b2: 9081 subl %d1,%d0
491b4: 2f00 movel %d0,%sp@-
491b6: 4eb9 0004 94ee jsr 494ee <_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 };
491bc: 204e moveal %fp,%a0
491be: 2100 movel %d0,%a0@-
_User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor );
491c0: 487a ff9e pea %pc@(49160 <_User_extensions_Switch_visitor>)
491c4: 2f08 movel %a0,%sp@-
491c6: 4eb9 0004 90f6 jsr 490f6 <_User_extensions_Iterate>
491cc: 4fef 000c lea %sp@(12),%sp
}
}
491d0: 4e5e unlk %fp <== NOT EXECUTED
0004a584 <_Watchdog_Adjust>:
Watchdog_Interval units
)
{
ISR_Level level;
_ISR_Disable( level );
4a584: 327c 0700 moveaw #1792,%a1
4a588: 2209 movel %a1,%d1
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4a58a: 4e56 ffec linkw %fp,#-20
4a58e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4a592: 246e 0008 moveal %fp@(8),%a2
4a596: 262e 000c movel %fp@(12),%d3
4a59a: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4a59e: 40c0 movew %sr,%d0
4a5a0: 8280 orl %d0,%d1
4a5a2: 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;
4a5a4: 264a moveal %a2,%a3
4a5a6: 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 ) ) {
4a5a8: b7c8 cmpal %a0,%a3
4a5aa: 674c beqs 4a5f8 <_Watchdog_Adjust+0x74>
switch ( direction ) {
4a5ac: 4a83 tstl %d3
4a5ae: 673c beqs 4a5ec <_Watchdog_Adjust+0x68>
4a5b0: 7201 moveq #1,%d1
4a5b2: b283 cmpl %d3,%d1
4a5b4: 6642 bnes 4a5f8 <_Watchdog_Adjust+0x74> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4a5b6: d5a8 0010 addl %d2,%a0@(16)
break;
4a5ba: 603c bras 4a5f8 <_Watchdog_Adjust+0x74>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4a5bc: 2052 moveal %a2@,%a0
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
4a5be: 2228 0010 movel %a0@(16),%d1
4a5c2: b282 cmpl %d2,%d1
4a5c4: 6308 blss 4a5ce <_Watchdog_Adjust+0x4a>
_Watchdog_First( header )->delta_interval -= units;
4a5c6: 9282 subl %d2,%d1
4a5c8: 2141 0010 movel %d1,%a0@(16)
break;
4a5cc: 602a bras 4a5f8 <_Watchdog_Adjust+0x74>
} else {
units -= _Watchdog_First( header )->delta_interval;
4a5ce: 9481 subl %d1,%d2
_Watchdog_First( header )->delta_interval = 1;
4a5d0: 7201 moveq #1,%d1
4a5d2: 2141 0010 movel %d1,%a0@(16)
_ISR_Enable( level );
4a5d6: 46c0 movew %d0,%sr
_Watchdog_Tickle( header );
4a5d8: 2f0a movel %a2,%sp@-
4a5da: 4e94 jsr %a4@
_ISR_Disable( level );
4a5dc: 2203 movel %d3,%d1
4a5de: 40c0 movew %sr,%d0
4a5e0: 8280 orl %d0,%d1
4a5e2: 46c1 movew %d1,%sr
if ( _Chain_Is_empty( header ) )
4a5e4: 588f addql #4,%sp
4a5e6: b7d2 cmpal %a2@,%a3
4a5e8: 660a bnes 4a5f4 <_Watchdog_Adjust+0x70>
4a5ea: 600c bras 4a5f8 <_Watchdog_Adjust+0x74>
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
4a5ec: 49f9 0004 a7a4 lea 4a7a4 <_Watchdog_Tickle>,%a4
_ISR_Disable( level );
4a5f2: 2609 movel %a1,%d3
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4a5f4: 4a82 tstl %d2
4a5f6: 66c4 bnes 4a5bc <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
4a5f8: 46c0 movew %d0,%sr
}
4a5fa: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4a600: 4e5e unlk %fp <== NOT EXECUTED
000492f8 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
492f8: 203c 0000 0700 movel #1792,%d0
#include <rtems/score/watchdog.h>
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
492fe: 4e56 0000 linkw %fp,#0
49302: 206e 0008 moveal %fp@(8),%a0
49306: 2f0a movel %a2,%sp@-
49308: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4930a: 40c1 movew %sr,%d1
4930c: 8081 orl %d1,%d0
4930e: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49310: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49314: 7401 moveq #1,%d2
49316: b480 cmpl %d0,%d2
49318: 670c beqs 49326 <_Watchdog_Remove+0x2e>
4931a: 6242 bhis 4935e <_Watchdog_Remove+0x66>
4931c: 143c 0003 moveb #3,%d2
49320: b480 cmpl %d0,%d2
49322: 653a bcss 4935e <_Watchdog_Remove+0x66> <== NEVER TAKEN
49324: 6006 bras 4932c <_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;
49326: 42a8 0008 clrl %a0@(8)
break;
4932a: 6032 bras 4935e <_Watchdog_Remove+0x66>
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
4932c: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
4932e: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49332: 4a91 tstl %a1@
49334: 6708 beqs 4933e <_Watchdog_Remove+0x46>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49336: 2428 0010 movel %a0@(16),%d2
4933a: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
4933e: 2479 0005 efb8 moveal 5efb8 <_Watchdog_Sync_count>,%a2
49344: 4a8a tstl %a2
49346: 670c beqs 49354 <_Watchdog_Remove+0x5c>
_Watchdog_Sync_level = _ISR_Nest_level;
49348: 45f9 0005 f318 lea 5f318 <_Per_CPU_Information+0x8>,%a2
4934e: 23d2 0005 ef5e movel %a2@,5ef5e <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49354: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
49358: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
4935c: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4935e: 2439 0005 efbc movel 5efbc <_Watchdog_Ticks_since_boot>,%d2
49364: 2142 0018 movel %d2,%a0@(24)
_ISR_Enable( level );
49368: 46c1 movew %d1,%sr
return( previous_state );
}
4936a: 241f movel %sp@+,%d2
4936c: 245f moveal %sp@+,%a2
4936e: 4e5e unlk %fp
...
00049374 <_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 );
49374: 203c 0000 0700 movel #1792,%d0
#include <rtems/score/watchdog.h>
void _Watchdog_Tickle(
Chain_Control *header
)
{
4937a: 4e56 ffe8 linkw %fp,#-24
4937e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
49382: 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 );
49386: 40c2 movew %sr,%d2
49388: 8082 orl %d2,%d0
4938a: 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;
4938c: 264c moveal %a4,%a3
4938e: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
49390: b7ca cmpal %a2,%a3
49392: 674c beqs 493e0 <_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) {
49394: 202a 0010 movel %a2@(16),%d0
49398: 6708 beqs 493a2 <_Watchdog_Tickle+0x2e> <== NEVER TAKEN
the_watchdog->delta_interval--;
4939a: 5380 subql #1,%d0
4939c: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
493a0: 663e bnes 493e0 <_Watchdog_Tickle+0x6c>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
493a2: 4bf9 0004 92f8 lea 492f8 <_Watchdog_Remove>,%a5
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
493a8: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
493ae: 2f0a movel %a2,%sp@-
493b0: 4e95 jsr %a5@
_ISR_Enable( level );
493b2: 46c2 movew %d2,%sr
switch( watchdog_state ) {
493b4: 7202 moveq #2,%d1
493b6: 588f addql #4,%sp
493b8: b280 cmpl %d0,%d1
493ba: 6610 bnes 493cc <_Watchdog_Tickle+0x58> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
493bc: 2f2a 0024 movel %a2@(36),%sp@-
493c0: 2f2a 0020 movel %a2@(32),%sp@-
493c4: 206a 001c moveal %a2@(28),%a0
493c8: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
493ca: 508f addql #8,%sp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
493cc: 2003 movel %d3,%d0
493ce: 40c2 movew %sr,%d2
493d0: 8082 orl %d2,%d0
493d2: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
493d4: 2454 moveal %a4@,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
493d6: b7ca cmpal %a2,%a3
493d8: 6706 beqs 493e0 <_Watchdog_Tickle+0x6c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
493da: 4aaa 0010 tstl %a2@(16)
493de: 67ce beqs 493ae <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
493e0: 46c2 movew %d2,%sr
}
493e2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
493e8: 4e5e unlk %fp <== NOT EXECUTED
000493ec <_Workspace_Handler_initialization>:
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
493ec: 4e56 ffe4 linkw %fp,#-28
493f0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
493f4: 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();
493f8: 4a39 0005 b886 tstb 5b886 <Configuration+0x32>
493fe: 6608 bnes 49408 <_Workspace_Handler_initialization+0x1c>
49400: 2439 0005 b858 movel 5b858 <Configuration+0x4>,%d2
49406: 6002 bras 4940a <_Workspace_Handler_initialization+0x1e>
49408: 4282 clrl %d2
4940a: d4b9 0005 b854 addl 5b854 <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) {
49410: 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;
49412: 47f9 0004 735c lea 4735c <_Heap_Initialize>,%a3
for (i = 0; i < area_count; ++i) {
Heap_Area *area = &areas [i];
if ( do_zero ) {
memset( area->begin, 0, area->size );
49418: 49f9 0004 d828 lea 4d828 <memset>,%a4
4941e: 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) {
49422: 6070 bras 49494 <_Workspace_Handler_initialization+0xa8>
Heap_Area *area = &areas [i];
if ( do_zero ) {
49424: 4a39 0005 b884 tstb 5b884 <Configuration+0x30>
4942a: 670e beqs 4943a <_Workspace_Handler_initialization+0x4e>
memset( area->begin, 0, area->size );
4942c: 2f2a 0004 movel %a2@(4),%sp@-
49430: 42a7 clrl %sp@-
49432: 2f12 movel %a2@,%sp@-
49434: 4e94 jsr %a4@
49436: 4fef 000c lea %sp@(12),%sp
}
if ( area->size > overhead ) {
4943a: 262a 0004 movel %a2@(4),%d3
4943e: 700e moveq #14,%d0
49440: b083 cmpl %d3,%d0
49442: 644c bccs 49490 <_Workspace_Handler_initialization+0xa4>
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
49444: 4a39 0005 b885 tstb 5b885 <Configuration+0x31>
4944a: 661c bnes 49468 <_Workspace_Handler_initialization+0x7c>
size = area->size;
} else {
if ( remaining > 0 ) {
4944c: 4a82 tstl %d2
4944e: 6716 beqs 49466 <_Workspace_Handler_initialization+0x7a><== NEVER TAKEN
size = remaining < area->size - overhead ?
49450: 2003 movel %d3,%d0
49452: 0680 ffff fff2 addil #-14,%d0
remaining + overhead : area->size;
49458: b082 cmpl %d2,%d0
4945a: 630c blss 49468 <_Workspace_Handler_initialization+0x7c><== NEVER TAKEN
4945c: 2602 movel %d2,%d3
4945e: 0683 0000 000e addil #14,%d3
49464: 6002 bras 49468 <_Workspace_Handler_initialization+0x7c>
} else {
size = 0;
49466: 4283 clrl %d3 <== NOT EXECUTED
}
}
space_available = (*init_or_extend)(
49468: 4878 0004 pea 4 <CONTEXT_ARG>
4946c: 2f03 movel %d3,%sp@-
4946e: 2f12 movel %a2@,%sp@-
49470: 4879 0005 eee6 pea 5eee6 <_Workspace_Area>
49476: 4e93 jsr %a3@
);
area->begin = (char *) area->begin + size;
area->size -= size;
if ( space_available < remaining ) {
49478: 4fef 0010 lea %sp@(16),%sp
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
4947c: d792 addl %d3,%a2@
area->size -= size;
4947e: 97aa 0004 subl %d3,%a2@(4)
if ( space_available < remaining ) {
49482: b480 cmpl %d0,%d2
49484: 6306 blss 4948c <_Workspace_Handler_initialization+0xa0><== ALWAYS TAKEN
remaining -= space_available;
49486: 9480 subl %d0,%d2 <== NOT EXECUTED
} else {
remaining = 0;
}
init_or_extend = extend;
49488: 2645 moveal %d5,%a3 <== NOT EXECUTED
4948a: 6004 bras 49490 <_Workspace_Handler_initialization+0xa4><== NOT EXECUTED
4948c: 2645 moveal %d5,%a3
area->size -= size;
if ( space_available < remaining ) {
remaining -= space_available;
} else {
remaining = 0;
4948e: 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) {
49490: 5284 addql #1,%d4
49492: 508a addql #8,%a2
49494: b8ae 000c cmpl %fp@(12),%d4
49498: 668a bnes 49424 <_Workspace_Handler_initialization+0x38>
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
4949a: 4a82 tstl %d2
4949c: 6710 beqs 494ae <_Workspace_Handler_initialization+0xc2>
_Internal_error_Occurred(
4949e: 4878 0002 pea 2 <DOUBLE_FLOAT>
494a2: 4878 0001 pea 1 <ADD>
494a6: 42a7 clrl %sp@-
494a8: 4eb9 0004 7550 jsr 47550 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
}
494ae: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
494b4: 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 f660 movel #390752,%d0
4534a: 2200 movel %d0,%d1
4534c: 6008 bras 45356 <__assert_func+0x1e>
4534e: 2002 movel %d2,%d0
45350: 223c 0005 efc0 movel #389056,%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 efcd pea 5efcd <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 997c jsr 4997c <rtems_fatal>
...
0005aab4 <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5aab4: 4e56 0000 linkw %fp,#0
5aab8: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5aabc: 2d6e 0010 000c movel %fp@(16),%fp@(12)
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5aac2: 2d40 0008 movel %d0,%fp@(8)
return calloc( elements, size );
}
5aac6: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
5aac8: 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 b634 jsr 5b634 <_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 6968 jsr 46968 <rtems_shutdown_executive>
...
0004fdfc <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
4fdfc: 4e56 ffd8 linkw %fp,#-40
4fe00: 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);
4fe04: 2e0e movel %fp,%d7
uint32_t count,
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
4fe06: 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);
4fe08: 5987 subql #4,%d7
4fe0a: 47f9 0004 fd48 lea 4fd48 <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);
4fe10: 49f9 0005 7dd0 lea 57dd0 <memcpy>,%a4
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
4fe16: 246e 0008 moveal %fp@(8),%a2
4fe1a: 262e 0014 movel %fp@(20),%d3
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
uint32_t ofs = offset;
4fe1e: 2c2e 0010 movel %fp@(16),%d6
void *buff
)
{
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
4fe22: 2a2e 000c movel %fp@(12),%d5
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
4fe26: 603e bras 4fe66 <_fat_block_read+0x6a>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fe28: 2f07 movel %d7,%sp@-
4fe2a: 4878 0001 pea 1 <ADD>
4fe2e: 2f05 movel %d5,%sp@-
4fe30: 2f0a movel %a2,%sp@-
4fe32: 4e93 jsr %a3@
if (rc != RC_OK)
4fe34: 4fef 0010 lea %sp@(16),%sp
4fe38: 4a80 tstl %d0
4fe3a: 6630 bnes 4fe6c <_fat_block_read+0x70> <== NEVER TAKEN
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
4fe3c: 4282 clrl %d2
4fe3e: 3412 movew %a2@,%d2
4fe40: 9486 subl %d6,%d2
4fe42: b682 cmpl %d2,%d3
4fe44: 6402 bccs 4fe48 <_fat_block_read+0x4c> <== ALWAYS TAKEN
4fe46: 2403 movel %d3,%d2 <== NOT EXECUTED
memcpy((buff + cmpltd), (sec_buf + ofs), c);
4fe48: dcae fffc addl %fp@(-4),%d6
count -= c;
4fe4c: 9682 subl %d2,%d3
cmpltd += c;
sec_num++;
4fe4e: 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);
4fe50: 2f02 movel %d2,%sp@-
4fe52: 206e 0018 moveal %fp@(24),%a0
4fe56: 2f06 movel %d6,%sp@-
4fe58: 4870 4800 pea %a0@(00000000,%d4:l)
count -= c;
cmpltd += c;
sec_num++;
ofs = 0;
4fe5c: 4286 clrl %d6
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (sec_buf + ofs), c);
count -= c;
cmpltd += c;
4fe5e: 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);
4fe60: 4e94 jsr %a4@
count -= c;
cmpltd += c;
sec_num++;
ofs = 0;
4fe62: 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)
4fe66: 4a83 tstl %d3
4fe68: 66be bnes 4fe28 <_fat_block_read+0x2c>
4fe6a: 6002 bras 4fe6e <_fat_block_read+0x72>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
4fe6c: 78ff moveq #-1,%d4 <== NOT EXECUTED
cmpltd += c;
sec_num++;
ofs = 0;
}
return cmpltd;
}
4fe6e: 2004 movel %d4,%d0
4fe70: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
4fe76: 4e5e unlk %fp <== NOT EXECUTED
0005ab48 <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
5ab48: 4e56 0000 linkw %fp,#0
free( ptr );
5ab4c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5ab52: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
5ab54: 4ef9 0004 2a60 jmp 42a60 <free>
...
00042b8a <_gettimeofday>:
*/
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
42b8a: 4e56 0000 linkw %fp,#0
return gettimeofday( tp, tzp );
}
42b8e: 4e5e unlk %fp
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
42b90: 4ef9 0004 2ae8 jmp 42ae8 <gettimeofday>
...
0005ac1c <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
5ac1c: 4e56 0000 linkw %fp,#0
return isatty( fd );
5ac20: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5ac26: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
5ac28: 4ef9 0005 b58c jmp 5b58c <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>
...
0005acac <_lseek_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
off_t offset,
int whence
)
{
5acac: 4e56 0000 linkw %fp,#0
5acb0: 202e 000c movel %fp@(12),%d0
5acb4: 2d40 0008 movel %d0,%fp@(8)
5acb8: 202e 0010 movel %fp@(16),%d0
5acbc: 222e 0014 movel %fp@(20),%d1
return lseek( fd, offset, whence );
5acc0: 2d6e 0018 0014 movel %fp@(24),%fp@(20)
5acc6: 2d40 000c movel %d0,%fp@(12)
5acca: 2d41 0010 movel %d1,%fp@(16)
}
5acce: 4e5e unlk %fp
int fd,
off_t offset,
int whence
)
{
return lseek( fd, offset, whence );
5acd0: 4ef9 0005 ac30 jmp 5ac30 <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
...
0005acd8 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5acd8: 4e56 0000 linkw %fp,#0
return malloc( size );
5acdc: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5ace2: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5ace4: 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>
...
0005ad80 <_read_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
void *buf,
size_t nbytes
)
{
5ad80: 4e56 0000 linkw %fp,#0
5ad84: 202e 000c movel %fp@(12),%d0
5ad88: 2d40 0008 movel %d0,%fp@(8)
5ad8c: 202e 0010 movel %fp@(16),%d0
return read( fd, buf, nbytes );
5ad90: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
struct _reent *ptr __attribute__((unused)),
int fd,
void *buf,
size_t nbytes
)
{
5ad96: 2d40 000c movel %d0,%fp@(12)
return read( fd, buf, nbytes );
}
5ad9a: 4e5e unlk %fp
int fd,
void *buf,
size_t nbytes
)
{
return read( fd, buf, nbytes );
5ad9c: 4ef9 0005 acec jmp 5acec <read>
...
0005ada4 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5ada4: 4e56 0000 linkw %fp,#0
5ada8: 202e 000c movel %fp@(12),%d0
return realloc( ptr, size );
5adac: 2d6e 0010 000c movel %fp@(16),%fp@(12)
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5adb2: 2d40 0008 movel %d0,%fp@(8)
return realloc( ptr, size );
}
5adb6: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5adb8: 4ef9 0005 ae04 jmp 5ae04 <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
...
0005adc0 <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5adc0: 4e56 0000 linkw %fp,#0
5adc4: 202e 000c movel %fp@(12),%d0
5adc8: 2d40 0008 movel %d0,%fp@(8)
5adcc: 202e 0010 movel %fp@(16),%d0
return write( fd, buf, nbytes );
5add0: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5add6: 2d40 000c movel %d0,%fp@(12)
return write( fd, buf, nbytes );
}
5adda: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5addc: 4ef9 0005 aeec jmp 5aeec <write>
...
000462f4 <aio_cancel>:
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
462f4: 4e56 ffe8 linkw %fp,#-24
462f8: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
462fc: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46302: 47f9 0004 740c lea 4740c <pthread_mutex_lock>,%a3
#include <stdlib.h>
#include <rtems/system.h>
#include <rtems/seterr.h>
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
46308: 242e 0008 movel %fp@(8),%d2
4630c: 246e 000c moveal %fp@(12),%a2
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
46310: 4e93 jsr %a3@
if (fcntl (fildes, F_GETFD) < 0) {
46312: 4878 0001 pea 1 <ADD>
46316: 2f02 movel %d2,%sp@-
46318: 4eb9 0004 c2b0 jsr 4c2b0 <fcntl>
4631e: 4fef 000c lea %sp@(12),%sp
46322: 4a80 tstl %d0
46324: 6c1c bges 46342 <aio_cancel+0x4e>
pthread_mutex_unlock(&aio_request_queue.mutex);
46326: 4879 0006 0f6c pea 60f6c <aio_request_queue>
4632c: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
46332: 4eb9 0004 f05c jsr 4f05c <__errno>
46338: 7209 moveq #9,%d1
4633a: 2040 moveal %d0,%a0
4633c: 2081 movel %d1,%a0@
4633e: 6000 0134 braw 46474 <aio_cancel+0x180>
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
46342: 4a8a tstl %a2
46344: 6600 00ce bnew 46414 <aio_cancel+0x120>
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
46348: 42a7 clrl %sp@-
4634a: 49f9 0004 693e lea 4693e <rtems_aio_search_fd>,%a4
46350: 2f02 movel %d2,%sp@-
46352: 4879 0006 0fb4 pea 60fb4 <aio_request_queue+0x48>
46358: 4e94 jsr %a4@
if (r_chain == NULL) {
4635a: 4fef 000c lea %sp@(12),%sp
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
4635e: 2440 moveal %d0,%a2
if (r_chain == NULL) {
46360: 4a80 tstl %d0
46362: 6678 bnes 463dc <aio_cancel+0xe8> <== NEVER TAKEN
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
46364: 203c 0006 0fc4 movel #397252,%d0
4636a: b0b9 0006 0fc0 cmpl 60fc0 <aio_request_queue+0x54>,%d0
46370: 6714 beqs 46386 <aio_cancel+0x92> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
46372: 42a7 clrl %sp@-
46374: 2f02 movel %d2,%sp@-
46376: 4879 0006 0fc0 pea 60fc0 <aio_request_queue+0x54>
4637c: 4e94 jsr %a4@
if (r_chain == NULL) {
4637e: 4fef 000c lea %sp@(12),%sp
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
46382: 2400 movel %d0,%d2
if (r_chain == NULL) {
46384: 6614 bnes 4639a <aio_cancel+0xa6>
pthread_mutex_unlock(&aio_request_queue.mutex);
46386: 4879 0006 0f6c pea 60f6c <aio_request_queue>
return AIO_ALLDONE;
4638c: 7402 moveq #2,%d2
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock(&aio_request_queue.mutex);
4638e: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
return AIO_ALLDONE;
46394: 588f addql #4,%sp
46396: 6000 0134 braw 464cc <aio_cancel+0x1d8>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4639a: 2f00 movel %d0,%sp@-
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
4639c: 2602 movel %d2,%d3
4639e: 0683 0000 001c addil #28,%d3
463a4: 4eb9 0004 8d18 jsr 48d18 <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
463aa: 2f02 movel %d2,%sp@-
463ac: 4eb9 0004 69ce jsr 469ce <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
463b2: 2f03 movel %d3,%sp@-
463b4: 4eb9 0004 71d0 jsr 471d0 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
463ba: 2f03 movel %d3,%sp@-
463bc: 4eb9 0004 6ec4 jsr 46ec4 <pthread_cond_destroy>
free (r_chain);
463c2: 2f02 movel %d2,%sp@-
463c4: 4eb9 0004 2e98 jsr 42e98 <free>
pthread_mutex_unlock (&aio_request_queue.mutex);
463ca: 4879 0006 0f6c pea 60f6c <aio_request_queue>
463d0: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
return AIO_CANCELED;
463d6: 4fef 0018 lea %sp@(24),%sp
463da: 6032 bras 4640e <aio_cancel+0x11a>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
463dc: 2400 movel %d0,%d2
463de: 0682 0000 001c addil #28,%d2
463e4: 2f02 movel %d2,%sp@-
463e6: 4e93 jsr %a3@
463e8: 2f0a movel %a2,%sp@-
463ea: 4eb9 0004 8d18 jsr 48d18 <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
463f0: 2f0a movel %a2,%sp@-
pthread_mutex_unlock (&r_chain->mutex);
463f2: 45f9 0004 74a4 lea 474a4 <pthread_mutex_unlock>,%a2
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
463f8: 4eb9 0004 69ce jsr 469ce <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
463fe: 2f02 movel %d2,%sp@-
46400: 4e92 jsr %a2@
pthread_mutex_unlock (&aio_request_queue.mutex);
46402: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46408: 4e92 jsr %a2@
return AIO_CANCELED;
4640a: 4fef 0014 lea %sp@(20),%sp
4640e: 4282 clrl %d2
46410: 6000 00ba braw 464cc <aio_cancel+0x1d8>
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
46414: 2612 movel %a2@,%d3
46416: b483 cmpl %d3,%d2
46418: 6702 beqs 4641c <aio_cancel+0x128>
4641a: 6040 bras 4645c <aio_cancel+0x168>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
4641c: 42a7 clrl %sp@-
4641e: 4bf9 0004 693e lea 4693e <rtems_aio_search_fd>,%a5
46424: 2f03 movel %d3,%sp@-
46426: 4879 0006 0fb4 pea 60fb4 <aio_request_queue+0x48>
4642c: 4e95 jsr %a5@
if (r_chain == NULL) {
4642e: 4fef 000c lea %sp@(12),%sp
if (aiocbp->aio_fildes != fildes) {
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
46432: 2840 moveal %d0,%a4
if (r_chain == NULL) {
46434: 4a80 tstl %d0
46436: 6664 bnes 4649c <aio_cancel+0x1a8>
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
46438: 203c 0006 0fc4 movel #397252,%d0
4643e: b0b9 0006 0fc0 cmpl 60fc0 <aio_request_queue+0x54>,%d0
46444: 6700 ff40 beqw 46386 <aio_cancel+0x92>
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
46448: 42a7 clrl %sp@-
4644a: 2f03 movel %d3,%sp@-
4644c: 4879 0006 0fc0 pea 60fc0 <aio_request_queue+0x54>
46452: 4e95 jsr %a5@
if (r_chain == NULL) {
46454: 4fef 000c lea %sp@(12),%sp
46458: 4a80 tstl %d0
4645a: 661e bnes 4647a <aio_cancel+0x186>
pthread_mutex_unlock (&aio_request_queue.mutex);
4645c: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46462: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
46468: 4eb9 0004 f05c jsr 4f05c <__errno>
4646e: 2040 moveal %d0,%a0
46470: 7016 moveq #22,%d0
46472: 2080 movel %d0,%a0@
46474: 588f addql #4,%sp
46476: 74ff moveq #-1,%d2
46478: 6052 bras 464cc <aio_cancel+0x1d8>
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
4647a: 2f0a movel %a2,%sp@-
4647c: 2040 moveal %d0,%a0
4647e: 4868 0008 pea %a0@(8)
46482: 4eb9 0004 6a24 jsr 46a24 <rtems_aio_remove_req>
pthread_mutex_unlock (&aio_request_queue.mutex);
46488: 4879 0006 0f6c pea 60f6c <aio_request_queue>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
4648e: 2400 movel %d0,%d2
pthread_mutex_unlock (&aio_request_queue.mutex);
46490: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
return result;
46496: 4fef 000c lea %sp@(12),%sp
4649a: 6030 bras 464cc <aio_cancel+0x1d8>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
4649c: 2600 movel %d0,%d3
4649e: 0683 0000 001c addil #28,%d3
464a4: 2f03 movel %d3,%sp@-
464a6: 4e93 jsr %a3@
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
464a8: 2f0a movel %a2,%sp@-
464aa: 486c 0008 pea %a4@(8)
pthread_mutex_unlock (&r_chain->mutex);
464ae: 45f9 0004 74a4 lea 474a4 <pthread_mutex_unlock>,%a2
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
464b4: 4eb9 0004 6a24 jsr 46a24 <rtems_aio_remove_req>
464ba: 2400 movel %d0,%d2
pthread_mutex_unlock (&r_chain->mutex);
464bc: 2f03 movel %d3,%sp@-
464be: 4e92 jsr %a2@
pthread_mutex_unlock (&aio_request_queue.mutex);
464c0: 4879 0006 0f6c pea 60f6c <aio_request_queue>
464c6: 4e92 jsr %a2@
return result;
464c8: 4fef 0014 lea %sp@(20),%sp
}
return AIO_ALLDONE;
}
464cc: 2002 movel %d2,%d0
464ce: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
464d4: 4e5e unlk %fp <== NOT EXECUTED
000464e8 <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
464e8: 203c 0000 2000 movel #8192,%d0
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
464ee: 4e56 0000 linkw %fp,#0
464f2: 2f0a movel %a2,%sp@-
464f4: 246e 000c moveal %fp@(12),%a2
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
464f8: b0ae 0008 cmpl %fp@(8),%d0
464fc: 671a beqs 46518 <aio_fsync+0x30>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
464fe: 7216 moveq #22,%d1
46500: 70ff moveq #-1,%d0
46502: 2541 0030 movel %d1,%a2@(48)
46506: 2540 0034 movel %d0,%a2@(52)
4650a: 4eb9 0004 f05c jsr 4f05c <__errno>
46510: 2040 moveal %d0,%a0
46512: 7016 moveq #22,%d0
46514: 2080 movel %d0,%a0@
46516: 607e bras 46596 <aio_fsync+0xae>
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
46518: 4878 0003 pea 3 <DIVIDE>
4651c: 2f12 movel %a2@,%sp@-
4651e: 4eb9 0004 c2b0 jsr 4c2b0 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
46524: 508f addql #8,%sp
46526: 7203 moveq #3,%d1
46528: c081 andl %d1,%d0
4652a: 123c 0001 moveb #1,%d1
4652e: 5380 subql #1,%d0
46530: b280 cmpl %d0,%d1
46532: 641a bccs 4654e <aio_fsync+0x66>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
46534: 72ff moveq #-1,%d1
46536: 7009 moveq #9,%d0
46538: 2541 0034 movel %d1,%a2@(52)
4653c: 2540 0030 movel %d0,%a2@(48)
46540: 4eb9 0004 f05c jsr 4f05c <__errno>
46546: 7209 moveq #9,%d1
46548: 2040 moveal %d0,%a0
4654a: 2081 movel %d1,%a0@
4654c: 6048 bras 46596 <aio_fsync+0xae>
req = malloc (sizeof (rtems_aio_request));
4654e: 4878 0018 pea 18 <OPER2+0x4>
46552: 4eb9 0004 32b0 jsr 432b0 <malloc>
if (req == NULL)
46558: 588f addql #4,%sp
4655a: 4a80 tstl %d0
4655c: 661c bnes 4657a <aio_fsync+0x92> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
4655e: 103c 000b moveb #11,%d0 <== NOT EXECUTED
46562: 72ff moveq #-1,%d1 <== NOT EXECUTED
46564: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED
46568: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED
4656c: 4eb9 0004 f05c jsr 4f05c <__errno> <== NOT EXECUTED
46572: 2040 moveal %d0,%a0 <== NOT EXECUTED
46574: 700b moveq #11,%d0 <== NOT EXECUTED
46576: 2080 movel %d0,%a0@ <== NOT EXECUTED
46578: 601c bras 46596 <aio_fsync+0xae> <== NOT EXECUTED
req->aiocbp = aiocbp;
4657a: 2040 moveal %d0,%a0
req->aiocbp->aio_lio_opcode = LIO_SYNC;
4657c: 7203 moveq #3,%d1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
4657e: 214a 0014 movel %a2,%a0@(20)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
46582: 2541 002c movel %d1,%a2@(44)
return rtems_aio_enqueue (req);
}
46586: 246e fffc moveal %fp@(-4),%a2
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
4658a: 2d40 0008 movel %d0,%fp@(8)
}
4658e: 4e5e unlk %fp
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
46590: 4ef9 0004 6a84 jmp 46a84 <rtems_aio_enqueue>
}
46596: 246e fffc moveal %fp@(-4),%a2
4659a: 70ff moveq #-1,%d0
4659c: 4e5e unlk %fp <== NOT EXECUTED
00046c84 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
46c84: 4e56 0000 linkw %fp,#0
46c88: 2f0a movel %a2,%sp@-
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
46c8a: 4878 0003 pea 3 <DIVIDE>
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
46c8e: 246e 0008 moveal %fp@(8),%a2
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
46c92: 2f12 movel %a2@,%sp@-
46c94: 4eb9 0004 c2b0 jsr 4c2b0 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
46c9a: 508f addql #8,%sp
46c9c: 7203 moveq #3,%d1
46c9e: c081 andl %d1,%d0
46ca0: 6722 beqs 46cc4 <aio_read+0x40> <== NEVER TAKEN
46ca2: 123c 0002 moveb #2,%d1
46ca6: b280 cmpl %d0,%d1
46ca8: 671a beqs 46cc4 <aio_read+0x40>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
46caa: 7009 moveq #9,%d0
46cac: 72ff moveq #-1,%d1
46cae: 2540 0030 movel %d0,%a2@(48)
46cb2: 2541 0034 movel %d1,%a2@(52)
46cb6: 4eb9 0004 f05c jsr 4f05c <__errno>
46cbc: 2040 moveal %d0,%a0
46cbe: 7009 moveq #9,%d0
46cc0: 2080 movel %d0,%a0@
46cc2: 6070 bras 46d34 <aio_read+0xb0>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
46cc4: 4aaa 0014 tstl %a2@(20)
46cc8: 6702 beqs 46ccc <aio_read+0x48>
46cca: 6006 bras 46cd2 <aio_read+0x4e>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
46ccc: 4aaa 0004 tstl %a2@(4)
46cd0: 6a1a bpls 46cec <aio_read+0x68>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
46cd2: 72ff moveq #-1,%d1
46cd4: 7016 moveq #22,%d0
46cd6: 2541 0034 movel %d1,%a2@(52)
46cda: 2540 0030 movel %d0,%a2@(48)
46cde: 4eb9 0004 f05c jsr 4f05c <__errno>
46ce4: 7216 moveq #22,%d1
46ce6: 2040 moveal %d0,%a0
46ce8: 2081 movel %d1,%a0@
46cea: 6048 bras 46d34 <aio_read+0xb0>
req = malloc (sizeof (rtems_aio_request));
46cec: 4878 0018 pea 18 <OPER2+0x4>
46cf0: 4eb9 0004 32b0 jsr 432b0 <malloc>
if (req == NULL)
46cf6: 588f addql #4,%sp
46cf8: 4a80 tstl %d0
46cfa: 661c bnes 46d18 <aio_read+0x94> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
46cfc: 103c 000b moveb #11,%d0 <== NOT EXECUTED
46d00: 72ff moveq #-1,%d1 <== NOT EXECUTED
46d02: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED
46d06: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED
46d0a: 4eb9 0004 f05c jsr 4f05c <__errno> <== NOT EXECUTED
46d10: 2040 moveal %d0,%a0 <== NOT EXECUTED
46d12: 700b moveq #11,%d0 <== NOT EXECUTED
46d14: 2080 movel %d0,%a0@ <== NOT EXECUTED
46d16: 601c bras 46d34 <aio_read+0xb0> <== NOT EXECUTED
req->aiocbp = aiocbp;
46d18: 2040 moveal %d0,%a0
req->aiocbp->aio_lio_opcode = LIO_READ;
46d1a: 7201 moveq #1,%d1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
46d1c: 214a 0014 movel %a2,%a0@(20)
req->aiocbp->aio_lio_opcode = LIO_READ;
46d20: 2541 002c movel %d1,%a2@(44)
return rtems_aio_enqueue (req);
}
46d24: 246e fffc moveal %fp@(-4),%a2
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
46d28: 2d40 0008 movel %d0,%fp@(8)
}
46d2c: 4e5e unlk %fp
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
46d2e: 4ef9 0004 6a84 jmp 46a84 <rtems_aio_enqueue>
}
46d34: 246e fffc moveal %fp@(-4),%a2
46d38: 70ff moveq #-1,%d0
46d3a: 4e5e unlk %fp
...
00046d50 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
46d50: 4e56 0000 linkw %fp,#0
46d54: 2f0a movel %a2,%sp@-
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
46d56: 4878 0003 pea 3 <DIVIDE>
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
46d5a: 246e 0008 moveal %fp@(8),%a2
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
46d5e: 2f12 movel %a2@,%sp@-
46d60: 4eb9 0004 c2b0 jsr 4c2b0 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
46d66: 508f addql #8,%sp
46d68: 7203 moveq #3,%d1
46d6a: c081 andl %d1,%d0
46d6c: 123c 0001 moveb #1,%d1
46d70: 5380 subql #1,%d0
46d72: b280 cmpl %d0,%d1
46d74: 641a bccs 46d90 <aio_write+0x40>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
46d76: 7009 moveq #9,%d0
46d78: 72ff moveq #-1,%d1
46d7a: 2540 0030 movel %d0,%a2@(48)
46d7e: 2541 0034 movel %d1,%a2@(52)
46d82: 4eb9 0004 f05c jsr 4f05c <__errno>
46d88: 2040 moveal %d0,%a0
46d8a: 7009 moveq #9,%d0
46d8c: 2080 movel %d0,%a0@
46d8e: 6070 bras 46e00 <aio_write+0xb0>
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
46d90: 4aaa 0014 tstl %a2@(20)
46d94: 6702 beqs 46d98 <aio_write+0x48>
46d96: 6006 bras 46d9e <aio_write+0x4e>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
46d98: 4aaa 0004 tstl %a2@(4)
46d9c: 6a1a bpls 46db8 <aio_write+0x68>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
46d9e: 72ff moveq #-1,%d1
46da0: 7016 moveq #22,%d0
46da2: 2541 0034 movel %d1,%a2@(52)
46da6: 2540 0030 movel %d0,%a2@(48)
46daa: 4eb9 0004 f05c jsr 4f05c <__errno>
46db0: 7216 moveq #22,%d1
46db2: 2040 moveal %d0,%a0
46db4: 2081 movel %d1,%a0@
46db6: 6048 bras 46e00 <aio_write+0xb0>
req = malloc (sizeof (rtems_aio_request));
46db8: 4878 0018 pea 18 <OPER2+0x4>
46dbc: 4eb9 0004 32b0 jsr 432b0 <malloc>
if (req == NULL)
46dc2: 588f addql #4,%sp
46dc4: 4a80 tstl %d0
46dc6: 661c bnes 46de4 <aio_write+0x94> <== ALWAYS TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
46dc8: 103c 000b moveb #11,%d0 <== NOT EXECUTED
46dcc: 72ff moveq #-1,%d1 <== NOT EXECUTED
46dce: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED
46dd2: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED
46dd6: 4eb9 0004 f05c jsr 4f05c <__errno> <== NOT EXECUTED
46ddc: 2040 moveal %d0,%a0 <== NOT EXECUTED
46dde: 700b moveq #11,%d0 <== NOT EXECUTED
46de0: 2080 movel %d0,%a0@ <== NOT EXECUTED
46de2: 601c bras 46e00 <aio_write+0xb0> <== NOT EXECUTED
req->aiocbp = aiocbp;
46de4: 2040 moveal %d0,%a0
req->aiocbp->aio_lio_opcode = LIO_WRITE;
46de6: 7202 moveq #2,%d1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
46de8: 214a 0014 movel %a2,%a0@(20)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
46dec: 2541 002c movel %d1,%a2@(44)
return rtems_aio_enqueue (req);
}
46df0: 246e fffc moveal %fp@(-4),%a2
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
46df4: 2d40 0008 movel %d0,%fp@(8)
}
46df8: 4e5e unlk %fp
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
46dfa: 4ef9 0004 6a84 jmp 46a84 <rtems_aio_enqueue>
}
46e00: 246e fffc moveal %fp@(-4),%a2
46e04: 70ff moveq #-1,%d0
46e06: 4e5e unlk %fp
...
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 c598 pea 5c598 <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 c59c pea 5c59c <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 b534 movel #374068,%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 c594 moveal 5c594 <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 c594 movel 5c594 <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 995c jsr 4995c <__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 b534 movel #374068,%d0
4251e: b0aa 0010 cmpl %a2@(16),%d0
42522: 6730 beqs 42554 <chroot+0xf8> <== NEVER TAKEN
errno = eno;
42524: 4eb9 0004 995c jsr 4995c <__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
...
00045f98 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
45f98: 4e56 ffec linkw %fp,#-20
45f9c: 222e 0008 movel %fp@(8),%d1
45fa0: 48d7 040c moveml %d2-%d3/%a2,%sp@
45fa4: 246e 000c moveal %fp@(12),%a2
if ( !tp )
45fa8: 4a8a tstl %a2
45faa: 660a bnes 45fb6 <clock_gettime+0x1e>
rtems_set_errno_and_return_minus_one( EINVAL );
45fac: 4eb9 0004 dd90 jsr 4dd90 <__errno>
45fb2: 6000 0088 braw 4603c <clock_gettime+0xa4>
if ( clock_id == CLOCK_REALTIME ) {
45fb6: 7001 moveq #1,%d0
45fb8: b081 cmpl %d1,%d0
45fba: 664c bnes 46008 <clock_gettime+0x70>
)
{
Timestamp_Control tod_as_timestamp;
Timestamp_Control *tod_as_timestamp_ptr;
tod_as_timestamp_ptr =
45fbc: 4879 0006 0a18 pea 60a18 <_TOD>
45fc2: 486e fff8 pea %fp@(-8)
45fc6: 4eb9 0004 7d50 jsr 47d50 <_TOD_Get_with_nanoseconds>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
45fcc: 2040 moveal %d0,%a0
45fce: 2410 movel %a0@,%d2
45fd0: 2628 0004 movel %a0@(4),%d3
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
45fd4: 2f3c 3b9a ca00 movel #1000000000,%sp@-
45fda: 42a7 clrl %sp@-
45fdc: 2f03 movel %d3,%sp@-
45fde: 2f02 movel %d2,%sp@-
45fe0: 4eb9 0005 b250 jsr 5b250 <__divdi3>
45fe6: 4fef 0010 lea %sp@(16),%sp
45fea: 2481 movel %d1,%a2@
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
45fec: 2f3c 3b9a ca00 movel #1000000000,%sp@-
45ff2: 42a7 clrl %sp@-
45ff4: 2f03 movel %d3,%sp@-
45ff6: 2f02 movel %d2,%sp@-
45ff8: 4eb9 0005 b6b0 jsr 5b6b0 <__moddi3>
45ffe: 4fef 0018 lea %sp@(24),%sp
46002: 2541 0004 movel %d1,%a2@(4)
46006: 6010 bras 46018 <clock_gettime+0x80>
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
46008: 7004 moveq #4,%d0
4600a: b081 cmpl %d1,%d0
4600c: 660e bnes 4601c <clock_gettime+0x84> <== ALWAYS TAKEN
_TOD_Get_uptime_as_timespec( tp );
4600e: 2f0a movel %a2,%sp@-
46010: 4eb9 0004 7d9c jsr 47d9c <_TOD_Get_uptime_as_timespec>
return 0;
46016: 588f addql #4,%sp
46018: 4280 clrl %d0
4601a: 6028 bras 46044 <clock_gettime+0xac>
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
4601c: 7002 moveq #2,%d0
4601e: b081 cmpl %d1,%d0
46020: 67ec beqs 4600e <clock_gettime+0x76>
46022: 41f9 0004 dd90 lea 4dd90 <__errno>,%a0
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
46028: 103c 0003 moveb #3,%d0
4602c: b081 cmpl %d1,%d0
4602e: 660a bnes 4603a <clock_gettime+0xa2>
rtems_set_errno_and_return_minus_one( ENOSYS );
46030: 4e90 jsr %a0@
46032: 7258 moveq #88,%d1
46034: 2040 moveal %d0,%a0
46036: 2081 movel %d1,%a0@
46038: 6008 bras 46042 <clock_gettime+0xaa>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
4603a: 4e90 jsr %a0@
4603c: 2040 moveal %d0,%a0
4603e: 7016 moveq #22,%d0
46040: 2080 movel %d0,%a0@
46042: 70ff moveq #-1,%d0
return 0;
}
46044: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
4604a: 4e5e unlk %fp
...
0005fdac <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
5fdac: 4e56 ffec linkw %fp,#-20
5fdb0: 202e 0008 movel %fp@(8),%d0
5fdb4: 48d7 040c moveml %d2-%d3/%a2,%sp@
5fdb8: 246e 000c moveal %fp@(12),%a2
if ( !tp )
5fdbc: 4a8a tstl %a2
5fdbe: 6602 bnes 5fdc2 <clock_settime+0x16> <== ALWAYS TAKEN
5fdc0: 6010 bras 5fdd2 <clock_settime+0x26> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
5fdc2: 7201 moveq #1,%d1
5fdc4: b280 cmpl %d0,%d1
5fdc6: 6660 bnes 5fe28 <clock_settime+0x7c>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
5fdc8: 207c 21da e4ff moveal #567993599,%a0
5fdce: b1d2 cmpal %a2@,%a0
5fdd0: 6508 bcss 5fdda <clock_settime+0x2e>
rtems_set_errno_and_return_minus_one( EINVAL );
5fdd2: 4eb9 0006 e674 jsr 6e674 <__errno>
5fdd8: 606e bras 5fe48 <clock_settime+0x9c>
*
* 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;
5fdda: 2039 0009 756a movel 9756a <_Thread_Dispatch_disable_level>,%d0
++level;
5fde0: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
5fde2: 23c0 0009 756a movel %d0,9756a <_Thread_Dispatch_disable_level>
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
5fde8: 2f3c 3b9a ca00 movel #1000000000,%sp@-
5fdee: 42a7 clrl %sp@-
5fdf0: 2f12 movel %a2@,%sp@-
5fdf2: 5bc0 smi %d0
5fdf4: 49c0 extbl %d0
5fdf6: 2f00 movel %d0,%sp@-
5fdf8: 4eb9 0008 6408 jsr 86408 <__muldi3>
5fdfe: 4fef 0010 lea %sp@(16),%sp
5fe02: 204e moveal %fp,%a0
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
5fe04: 262a 0004 movel %a2@(4),%d3
5fe08: 5bc2 smi %d2
5fe0a: 49c2 extbl %d2
5fe0c: d283 addl %d3,%d1
5fe0e: d182 addxl %d2,%d0
5fe10: 2101 movel %d1,%a0@-
5fe12: 2100 movel %d0,%a0@-
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
5fe14: 2f08 movel %a0,%sp@-
5fe16: 4eb9 0006 0c10 jsr 60c10 <_TOD_Set_with_timestamp>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
5fe1c: 4eb9 0004 8474 jsr 48474 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
5fe22: 588f addql #4,%sp
5fe24: 4280 clrl %d0
5fe26: 6028 bras 5fe50 <clock_settime+0xa4>
5fe28: 41f9 0006 e674 lea 6e674 <__errno>,%a0
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
5fe2e: 7202 moveq #2,%d1
5fe30: b280 cmpl %d0,%d1
5fe32: 6602 bnes 5fe36 <clock_settime+0x8a>
5fe34: 6006 bras 5fe3c <clock_settime+0x90>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
5fe36: 7203 moveq #3,%d1
5fe38: b280 cmpl %d0,%d1
5fe3a: 660a bnes 5fe46 <clock_settime+0x9a>
rtems_set_errno_and_return_minus_one( ENOSYS );
5fe3c: 4e90 jsr %a0@
5fe3e: 7258 moveq #88,%d1
5fe40: 2040 moveal %d0,%a0
5fe42: 2081 movel %d1,%a0@
5fe44: 6008 bras 5fe4e <clock_settime+0xa2>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
5fe46: 4e90 jsr %a0@
5fe48: 2040 moveal %d0,%a0
5fe4a: 7016 moveq #22,%d0
5fe4c: 2080 movel %d0,%a0@
5fe4e: 70ff moveq #-1,%d0
return 0;
}
5fe50: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
5fe56: 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 1e52 movel 61e52 <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 1e56 movel 61e56 <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 13b4 jsr 513b4 <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 1e56 movel %a3,61e56 <disktab> <== NOT EXECUTED
disktab_size = new_size;
428b0: 23c4 0006 1e52 movel %d4,61e52 <disktab_size> <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
428b6: 2479 0006 1e56 moveal 61e56 <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 13b4 jsr 513b4 <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 1998 jsr 51998 <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 0006 0aa5 pea 60aa5 <fat_part_types.7670>
43a70: 4eb9 0005 2358 jsr 52358 <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 9a4e movel #367182,%d0
#include "devfs.h"
void devFS_Show(void)
{
rtems_filesystem_location_info_t *rootloc = &rtems_filesystem_root->location;
42072: 2079 0005 afbc moveal 5afbc <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 9aa2 pea 59aa2 <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 9aa4 pea 59aa4 <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 9aa7 pea 59aa7 <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
...
0004ad94 <devFS_eval_path>:
}
void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
)
{
4ad94: 4e56 ffdc linkw %fp,#-36
4ad98: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4ad9c: 246e 0008 moveal %fp@(8),%a2
)
{
size_t i = 0;
size_t n = data->count;
devFS_node *nodes = data->nodes;
devFS_node *node = NULL;
4ada0: 4282 clrl %d2
devFS_node *free_node = NULL;
4ada2: 97cb subal %a3,%a3
for (i = 0; (free_node == NULL || node == NULL) && i < n; ++i) {
4ada4: 4284 clrl %d4
devFS_node *current = nodes + i;
if (current->name != NULL) {
if (
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
4ada6: 4bf9 0004 dc88 lea 4dc88 <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;
4adac: 206a 002c moveal %a2@(44),%a0
4adb0: 2068 0010 moveal %a0@(16),%a0
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
4adb4: 262a 0004 movel %a2@(4),%d3
4adb8: 2a12 movel %a2@,%d5
size_t pathlen,
devFS_node **free_node_ptr
)
{
size_t i = 0;
size_t n = data->count;
4adba: 2c28 0004 movel %a0@(4),%d6
4adbe: 2850 moveal %a0@,%a4
4adc0: 6034 bras 4adf6 <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) {
4adc2: 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;
4adc4: 200c movel %a4,%d0
if (current->name != NULL) {
4adc6: 4a81 tstl %d1
4adc8: 671c beqs 4ade6 <devFS_eval_path+0x52>
if (
4adca: b6ac 0004 cmpl %a4@(4),%d3
4adce: 6614 bnes 4ade4 <devFS_eval_path+0x50>
current->namelen == pathlen
&& memcmp(current->name, path, pathlen) == 0
4add0: 2f03 movel %d3,%sp@-
4add2: 2f05 movel %d5,%sp@-
4add4: 2f01 movel %d1,%sp@-
4add6: 4e95 jsr %a5@
4add8: 4fef 000c lea %sp@(12),%sp
4addc: 4a80 tstl %d0
4adde: 6702 beqs 4ade2 <devFS_eval_path+0x4e>
4ade0: 6002 bras 4ade4 <devFS_eval_path+0x50>
4ade2: 240c movel %a4,%d2
4ade4: 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) {
4ade6: 5284 addql #1,%d4
4ade8: 4a80 tstl %d0
4adea: 6704 beqs 4adf0 <devFS_eval_path+0x5c>
4adec: 4a82 tstl %d2
4adee: 660c bnes 4adfc <devFS_eval_path+0x68>
4adf0: 49ec 0014 lea %a4@(20),%a4
4adf4: 2640 moveal %d0,%a3
4adf6: bc84 cmpl %d4,%d6
4adf8: 66c8 bnes 4adc2 <devFS_eval_path+0x2e>
4adfa: 6002 bras 4adfe <devFS_eval_path+0x6a>
4adfc: 2640 moveal %d0,%a3
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
}
}
}
4adfe: 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) {
4ae02: 4a82 tstl %d2
4ae04: 6712 beqs 4ae18 <devFS_eval_path+0x84>
if ((eval_flags & RTEMS_FS_EXCLUSIVE) == 0) {
4ae06: 0800 0006 btst #6,%d0
4ae0a: 6606 bnes 4ae12 <devFS_eval_path+0x7e>
currentloc->node_access = node;
4ae0c: 2542 0020 movel %d2,%a2@(32)
4ae10: 6026 bras 4ae38 <devFS_eval_path+0xa4>
rtems_filesystem_eval_path_clear_path(ctx);
} else {
rtems_filesystem_eval_path_error(ctx, EEXIST);
4ae12: 4878 0011 pea 11 <INVALID_OPERATION+0x1>
4ae16: 6030 bras 4ae48 <devFS_eval_path+0xb4>
}
} else {
if ((eval_flags & RTEMS_FS_MAKE) != 0) {
4ae18: 0800 0005 btst #5,%d0
4ae1c: 6726 beqs 4ae44 <devFS_eval_path+0xb0> <== NEVER TAKEN
if (free_node != NULL) {
4ae1e: 4a8b tstl %a3
4ae20: 671c beqs 4ae3e <devFS_eval_path+0xaa>
free_node->mode = S_IRWXU | S_IRWXG | S_IRWXO;
4ae22: 203c 0000 01ff movel #511,%d0
4ae28: 2740 0010 movel %d0,%a3@(16)
currentloc->node_access = free_node;
4ae2c: 254b 0020 movel %a3,%a2@(32)
rtems_filesystem_eval_path_context_t *ctx,
const char *token,
size_t tokenlen
)
{
ctx->token = token;
4ae30: 2545 0008 movel %d5,%a2@(8)
ctx->tokenlen = tokenlen;
4ae34: 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;
4ae38: 42aa 0004 clrl %a2@(4)
4ae3c: 6014 bras 4ae52 <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);
4ae3e: 4878 001c pea 1c <FLT_MANT_DIG+0x4>
4ae42: 6004 bras 4ae48 <devFS_eval_path+0xb4>
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOENT);
4ae44: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4ae48: 2f0a movel %a2,%sp@-
4ae4a: 4eb9 0004 4bda jsr 44bda <rtems_filesystem_eval_path_error>
4ae50: 508f addql #8,%sp
}
}
}
4ae52: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4ae58: 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 dd18 jsr 4dd18 <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 ceec jsr 4ceec <__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 ceec jsr 4ceec <__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 1e4e movel 61e4e <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 1e4c moveb %d0,61e4c <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 1e4e movel 61e4e <diskdevs_mutex>,%sp@-
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
42820: 13c0 0006 1e4c moveb %d0,61e4c <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 7a84 jsr 47a84 <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 69f0 jsr 469f0 <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 d858 moveal 5d858 <__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
0005edb0 <endgrent>:
void endgrent(void)
{
5edb0: 4e56 0000 linkw %fp,#0
if (group_fp != NULL)
5edb4: 2039 0009 6ac8 movel 96ac8 <group_fp>,%d0
5edba: 670a beqs 5edc6 <endgrent+0x16> <== NEVER TAKEN
fclose(group_fp);
5edbc: 2f00 movel %d0,%sp@-
5edbe: 4eb9 0006 e7b0 jsr 6e7b0 <fclose>
5edc4: 588f addql #4,%sp
}
5edc6: 4e5e unlk %fp
...
0005ec6c <endpwent>:
void endpwent(void)
{
5ec6c: 4e56 0000 linkw %fp,#0
if (passwd_fp != NULL)
5ec70: 2039 0009 69ee movel 969ee <passwd_fp>,%d0
5ec76: 670a beqs 5ec82 <endpwent+0x16> <== NEVER TAKEN
fclose(passwd_fp);
5ec78: 2f00 movel %d0,%sp@-
5ec7a: 4eb9 0006 e7b0 jsr 6e7b0 <fclose>
5ec80: 588f addql #4,%sp
}
5ec82: 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 d858 moveal 5d858 <__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 c68d pea 5c68d <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 c68b pea 5c68b <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 d858 moveal 5d858 <__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 c68b pea 5c68b <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
0004fd48 <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);
4fd48: 4281 clrl %d1
4fd4a: 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)
{
4fd4c: 4e56 fff0 linkw %fp,#-16
4fd50: 48d7 041c moveml %d2-%d4/%a2,%sp@
4fd54: 246e 0008 moveal %fp@(8),%a2
4fd58: 122a 0002 moveb %a2@(2),%d1
4fd5c: 102a 000c moveb %a2@(12),%d0
4fd60: 9081 subl %d1,%d0
4fd62: 242e 000c movel %fp@(12),%d2
4fd66: 2802 movel %d2,%d4
4fd68: 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);
4fd6a: 2604 movel %d4,%d3
4fd6c: e1ab lsll %d0,%d3
4fd6e: 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 -
4fd70: 2602 movel %d2,%d3
4fd72: 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);
4fd74: 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)
4fd76: 4a2a 007f tstb %a2@(127)
4fd7a: 6706 beqs 4fd82 <fat_buf_access+0x3a>
4fd7c: b4aa 007a cmpl %a2@(122),%d2
4fd80: 6760 beqs 4fde2 <fat_buf_access+0x9a>
{
fat_buf_release(fs_info);
4fd82: 2f0a movel %a2,%sp@-
4fd84: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release>
if (op_type == FAT_OP_TYPE_READ)
4fd8a: 588f addql #4,%sp
4fd8c: 200a movel %a2,%d0
4fd8e: 0680 0000 0080 addil #128,%d0
4fd94: 7201 moveq #1,%d1
4fd96: b2ae 0010 cmpl %fp@(16),%d1
4fd9a: 6610 bnes 4fdac <fat_buf_access+0x64>
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
4fd9c: 2f00 movel %d0,%sp@-
4fd9e: 2f04 movel %d4,%sp@-
4fda0: 2f2a 005a movel %a2@(90),%sp@-
4fda4: 4eb9 0004 e088 jsr 4e088 <rtems_bdbuf_read>
4fdaa: 600e bras 4fdba <fat_buf_access+0x72>
else
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
4fdac: 2f00 movel %d0,%sp@-
4fdae: 2f04 movel %d4,%sp@-
4fdb0: 2f2a 005a movel %a2@(90),%sp@-
4fdb4: 4eb9 0004 dfca jsr 4dfca <rtems_bdbuf_get>
4fdba: 4fef 000c lea %sp@(12),%sp
if (sc != RTEMS_SUCCESSFUL)
4fdbe: 4a80 tstl %d0
4fdc0: 6710 beqs 4fdd2 <fat_buf_access+0x8a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
4fdc2: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4fdc8: 7405 moveq #5,%d2 <== NOT EXECUTED
4fdca: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fdcc: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fdce: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fdd0: 6020 bras 4fdf2 <fat_buf_access+0xaa> <== NOT EXECUTED
fs_info->c.blk_num = sec_num;
4fdd2: 2542 007a movel %d2,%a2@(122)
fs_info->c.modified = 0;
4fdd6: 4200 clrb %d0
fs_info->c.state = FAT_CACHE_ACTUAL;
4fdd8: 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;
4fdda: 1540 007e moveb %d0,%a2@(126)
fs_info->c.state = FAT_CACHE_ACTUAL;
4fdde: 1541 007f moveb %d1,%a2@(127)
}
*sec_buf = &fs_info->c.buf->buffer[blk_ofs];
4fde2: 226a 0080 moveal %a2@(128),%a1
4fde6: d6a9 001a addl %a1@(26),%d3
return RC_OK;
4fdea: 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];
4fdec: 206e 0014 moveal %fp@(20),%a0
4fdf0: 2083 movel %d3,%a0@
return RC_OK;
}
4fdf2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4fdf8: 4e5e unlk %fp <== NOT EXECUTED
0004fbaa <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
4fbaa: 4e56 ffd4 linkw %fp,#-44
4fbae: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4fbb2: 246e 0008 moveal %fp@(8),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (fs_info->c.state == FAT_CACHE_EMPTY)
4fbb6: 4a2a 007f tstb %a2@(127)
4fbba: 6700 0180 beqw 4fd3c <fat_buf_release+0x192>
return RC_OK;
if (fs_info->c.modified)
4fbbe: 4a2a 007e tstb %a2@(126)
4fbc2: 6700 0152 beqw 4fd16 <fat_buf_release+0x16c>
{
uint32_t sec_num = fs_info->c.blk_num;
bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) &&
4fbc6: 4281 clrl %d1
4fbc8: 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;
4fbcc: 202a 007a movel %a2@(122),%d0
bool sec_of_fat = ((sec_num >= fs_info->vol.fat_loc) &&
4fbd0: b280 cmpl %d0,%d1
4fbd2: 620c bhis 4fbe0 <fat_buf_release+0x36> <== NEVER TAKEN
4fbd4: b0aa 001e cmpl %a2@(30),%d0
4fbd8: 55c1 scs %d1
4fbda: 49c1 extbl %d1
4fbdc: 4481 negl %d1
4fbde: 6002 bras 4fbe2 <fat_buf_release+0x38>
4fbe0: 4281 clrl %d1 <== NOT EXECUTED
4fbe2: 7601 moveq #1,%d3
4fbe4: c681 andl %d1,%d3
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
4fbe6: 182a 0002 moveb %a2@(2),%d4
4fbea: 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)
4fbee: 4a03 tstb %d3
4fbf0: 673c beqs 4fc2e <fat_buf_release+0x84>
4fbf2: 4a2a 004e tstb %a2@(78)
4fbf6: 6636 bnes 4fc2e <fat_buf_release+0x84> <== NEVER TAKEN
4fbf8: 2400 movel %d0,%d2
memcpy(fs_info->sec_buf,
4fbfa: 4285 clrl %d5
4fbfc: 0284 0000 00ff andil #255,%d4
4fc02: 0281 0000 00ff andil #255,%d1
fs_info->c.buf->buffer + blk_ofs,
4fc08: 206a 0080 moveal %a2@(128),%a0
4fc0c: 9284 subl %d4,%d1
4fc0e: 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);
4fc10: 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,
4fc12: 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 -
4fc14: 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);
4fc16: e9a8 lsll %d4,%d0
4fc18: 2f05 movel %d5,%sp@-
4fc1a: d0a8 001a addl %a0@(26),%d0
4fc1e: 2f00 movel %d0,%sp@-
4fc20: 2f2a 0084 movel %a2@(132),%sp@-
4fc24: 4eb9 0005 7dd0 jsr 57dd0 <memcpy>
4fc2a: 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);
4fc2e: 2f2a 0080 movel %a2@(128),%sp@-
4fc32: 2a3c 0004 e2b6 movel #320182,%d5
4fc38: 2045 moveal %d5,%a0
4fc3a: 4e90 jsr %a0@
if (sc != RTEMS_SUCCESSFUL)
4fc3c: 588f addql #4,%sp
4fc3e: 4a80 tstl %d0
4fc40: 6704 beqs 4fc46 <fat_buf_release+0x9c> <== ALWAYS TAKEN
4fc42: 6000 00e2 braw 4fd26 <fat_buf_release+0x17c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
4fc46: 4200 clrb %d0
4fc48: 1540 007e moveb %d0,%a2@(126)
if (sec_of_fat && !fs_info->vol.mirror)
4fc4c: 4a03 tstb %d3
4fc4e: 6700 00e6 beqw 4fd36 <fat_buf_release+0x18c>
4fc52: 4a2a 004e tstb %a2@(78)
4fc56: 6700 0094 beqw 4fcec <fat_buf_release+0x142>
4fc5a: 6000 00da braw 4fd36 <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,
4fc5e: 41ea 001a lea %a2@(26),%a0
4fc62: 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);
4fc66: 4286 clrl %d6
4fc68: 4280 clrl %d0
4fc6a: 1c2a 0002 moveb %a2@(2),%d6
4fc6e: 102a 000c moveb %a2@(12),%d0
4fc72: d4aa 007a addl %a2@(122),%d2
4fc76: 9086 subl %d6,%d0
4fc78: 2202 movel %d2,%d1
4fc7a: 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);
4fc7c: 2e01 movel %d1,%d7
4fc7e: 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 -
4fc80: 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);
4fc82: 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
4fc84: 661a bnes 4fca0 <fat_buf_release+0xf6> <== ALWAYS TAKEN
&& fs_info->vol.bps == fs_info->vol.bytes_per_block)
4fc86: 4286 clrl %d6 <== NOT EXECUTED
4fc88: 4280 clrl %d0 <== NOT EXECUTED
4fc8a: 3c12 movew %a2@,%d6 <== NOT EXECUTED
4fc8c: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED
4fc90: b086 cmpl %d6,%d0 <== NOT EXECUTED
4fc92: 660c bnes 4fca0 <fat_buf_release+0xf6> <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &bd);
4fc94: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4fc96: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4fc98: 2f2a 005a movel %a2@(90),%sp@- <== NOT EXECUTED
4fc9c: 4e94 jsr %a4@ <== NOT EXECUTED
4fc9e: 600a bras 4fcaa <fat_buf_release+0x100> <== NOT EXECUTED
}
else
{
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &bd);
4fca0: 2f04 movel %d4,%sp@-
4fca2: 2f01 movel %d1,%sp@-
4fca4: 2f2a 005a movel %a2@(90),%sp@-
4fca8: 4e93 jsr %a3@
4fcaa: 4fef 000c lea %sp@(12),%sp
}
if ( sc != RTEMS_SUCCESSFUL)
4fcae: 4a80 tstl %d0
4fcb0: 6702 beqs 4fcb4 <fat_buf_release+0x10a> <== ALWAYS TAKEN
4fcb2: 6026 bras 4fcda <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);
4fcb4: 4280 clrl %d0
4fcb6: 3012 movew %a2@,%d0
4fcb8: 206e fffc moveal %fp@(-4),%a0
4fcbc: 2f00 movel %d0,%sp@-
4fcbe: 2f2a 0084 movel %a2@(132),%sp@-
4fcc2: d4a8 001a addl %a0@(26),%d2
4fcc6: 2f02 movel %d2,%sp@-
4fcc8: 4e95 jsr %a5@
sc = rtems_bdbuf_release_modified(bd);
4fcca: 2f2e fffc movel %fp@(-4),%sp@-
4fcce: 2045 moveal %d5,%a0
4fcd0: 4e90 jsr %a0@
if ( sc != RTEMS_SUCCESSFUL)
4fcd2: 4fef 0010 lea %sp@(16),%sp
4fcd6: 4a80 tstl %d0
4fcd8: 670e beqs 4fce8 <fat_buf_release+0x13e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
4fcda: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4fce0: 720c moveq #12,%d1 <== NOT EXECUTED
4fce2: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fce4: 2081 movel %d1,%a0@ <== NOT EXECUTED
4fce6: 604a bras 4fd32 <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++)
4fce8: 5283 addql #1,%d3
4fcea: 6018 bras 4fd04 <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);
4fcec: 280e movel %fp,%d4
4fcee: 5984 subql #4,%d4
4fcf0: 47f9 0004 e088 lea 4e088 <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);
4fcf6: 49f9 0004 dfca lea 4dfca <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);
4fcfc: 4bf9 0005 7dd0 lea 57dd0 <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)
4fd02: 7601 moveq #1,%d3
{
uint8_t i;
for (i = 1; i < fs_info->vol.fats; i++)
4fd04: 4280 clrl %d0
4fd06: 102a 000d moveb %a2@(13),%d0
4fd0a: 4282 clrl %d2
4fd0c: 1403 moveb %d3,%d2
4fd0e: b082 cmpl %d2,%d0
4fd10: 6200 ff4c bhiw 4fc5e <fat_buf_release+0xb4>
4fd14: 6020 bras 4fd36 <fat_buf_release+0x18c>
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
4fd16: 2f2a 0080 movel %a2@(128),%sp@-
4fd1a: 4eb9 0004 e214 jsr 4e214 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
4fd20: 588f addql #4,%sp
4fd22: 4a80 tstl %d0
4fd24: 6710 beqs 4fd36 <fat_buf_release+0x18c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
4fd26: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4fd2c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fd2e: 7005 moveq #5,%d0 <== NOT EXECUTED
4fd30: 2080 movel %d0,%a0@ <== NOT EXECUTED
4fd32: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fd34: 6008 bras 4fd3e <fat_buf_release+0x194> <== NOT EXECUTED
}
fs_info->c.state = FAT_CACHE_EMPTY;
4fd36: 4200 clrb %d0
4fd38: 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;
4fd3c: 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;
}
4fd3e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4fd44: 4e5e unlk %fp <== NOT EXECUTED
0004fb50 <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)
{
4fb50: 4e56 0000 linkw %fp,#0
4fb54: 206e 0008 moveal %fp@(8),%a0
4fb58: 2f03 movel %d3,%sp@-
4fb5a: 202e 000c movel %fp@(12),%d0
4fb5e: 2f02 movel %d2,%sp@-
4fb60: 4282 clrl %d2
4fb62: 1428 0002 moveb %a0@(2),%d2
uint32_t blk;
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4fb66: 4a80 tstl %d0
4fb68: 661c bnes 4fb86 <fat_cluster_num_to_block_num+0x36>
4fb6a: 7603 moveq #3,%d3
4fb6c: 1228 000e moveb %a0@(14),%d1
4fb70: c283 andl %d3,%d1
4fb72: 4a01 tstb %d1
4fb74: 6710 beqs 4fb86 <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);
4fb76: 4281 clrl %d1
4fb78: 1228 000c moveb %a0@(12),%d1
4fb7c: 9282 subl %d2,%d1
4fb7e: 2028 001e movel %a0@(30),%d0
4fb82: e2a8 lsrl %d1,%d0
4fb84: 601c bras 4fba2 <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);
4fb86: 4283 clrl %d3
4fb88: 4281 clrl %d1
4fb8a: 1628 000c moveb %a0@(12),%d3
4fb8e: 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;
4fb92: 5580 subql #2,%d0
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4fb94: 9283 subl %d3,%d1
4fb96: 9682 subl %d2,%d3
4fb98: e3a8 lsll %d1,%d0
4fb9a: 2228 0030 movel %a0@(48),%d1
4fb9e: e6a9 lsrl %d3,%d1
blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec);
4fba0: d081 addl %d1,%d0
}
return blk;
}
4fba2: 241f movel %sp@+,%d2
4fba4: 261f movel %sp@+,%d3
4fba6: 4e5e unlk %fp <== NOT EXECUTED
0004f05c <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
)
{
4f05c: 4e56 0000 linkw %fp,#0
4f060: 206e 0008 moveal %fp@(8),%a0
4f064: 202e 000c movel %fp@(12),%d0
4f068: 2f02 movel %d2,%sp@-
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4f06a: 4a80 tstl %d0
4f06c: 6612 bnes 4f080 <fat_cluster_num_to_sector_num+0x24><== NEVER TAKEN
4f06e: 7403 moveq #3,%d2
4f070: 1228 000e moveb %a0@(14),%d1
4f074: c282 andl %d2,%d1
4f076: 4a01 tstb %d1
4f078: 6706 beqs 4f080 <fat_cluster_num_to_sector_num+0x24><== NEVER TAKEN
return fs_info->vol.rdir_loc;
4f07a: 2028 001e movel %a0@(30),%d0
4f07e: 600e bras 4f08e <fat_cluster_num_to_sector_num+0x32>
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
4f080: 4281 clrl %d1 <== NOT EXECUTED
4f082: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED
4f086: 5580 subql #2,%d0 <== NOT EXECUTED
4f088: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4f08a: d0a8 0030 addl %a0@(48),%d0 <== NOT EXECUTED
fs_info->vol.data_fsec);
}
4f08e: 241f movel %sp@+,%d2
4f090: 4e5e unlk %fp <== NOT EXECUTED
0004ff10 <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));
4ff10: 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)
{
4ff12: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
4ff16: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
4ff1a: 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));
4ff1e: 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)
{
4ff22: 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));
4ff26: 9087 subl %d7,%d0 <== NOT EXECUTED
4ff28: 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)
{
4ff2c: 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));
4ff30: b082 cmpl %d2,%d0 <== NOT EXECUTED
4ff32: 6402 bccs 4ff36 <fat_cluster_set+0x26> <== NOT EXECUTED
4ff34: 2400 movel %d0,%d2 <== NOT EXECUTED
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
4ff36: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
4ff3a: 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;
4ff3c: 4286 clrl %d6 <== NOT EXECUTED
4ff3e: 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);
4ff42: 4bf9 0005 7e40 lea 57e40 <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);
4ff48: 49f9 0004 fd48 lea 4fd48 <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);
4ff4e: 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);
4ff50: 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);
4ff56: 4eba fbf8 jsr %pc@(4fb50 <fat_cluster_num_to_block_num>)<== NOT EXECUTED
4ff5a: 508f addql #8,%sp <== NOT EXECUTED
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
4ff5c: 4281 clrl %d1 <== NOT EXECUTED
4ff5e: 122a 000c moveb %a2@(12),%d1 <== NOT EXECUTED
4ff62: e2ad lsrl %d1,%d5 <== NOT EXECUTED
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4ff64: 2805 movel %d5,%d4 <== NOT EXECUTED
ssize_t bytes_written = 0;
ssize_t ret;
cur_blk += blocks_in_offset;
4ff66: 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);
4ff68: 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);
4ff6a: 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);
4ff6e: 9e84 subl %d4,%d7 <== NOT EXECUTED
4ff70: 6000 0082 braw 4fff4 <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));
4ff74: 4280 clrl %d0 <== NOT EXECUTED
4ff76: 302a 000a movew %a2@(10),%d0 <== NOT EXECUTED
4ff7a: 2240 moveal %d0,%a1 <== NOT EXECUTED
4ff7c: 9087 subl %d7,%d0 <== NOT EXECUTED
4ff7e: 2600 movel %d0,%d3 <== NOT EXECUTED
4ff80: b480 cmpl %d0,%d2 <== NOT EXECUTED
4ff82: 6402 bccs 4ff86 <fat_cluster_set+0x76> <== NOT EXECUTED
4ff84: 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));
4ff86: 2803 movel %d3,%d4 <== NOT EXECUTED
4ff88: b083 cmpl %d3,%d0 <== NOT EXECUTED
4ff8a: 6402 bccs 4ff8e <fat_cluster_set+0x7e> <== NOT EXECUTED
4ff8c: 2800 movel %d0,%d4 <== NOT EXECUTED
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
4ff8e: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED
4ff92: 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)
4ff96: 4a84 tstl %d4 <== NOT EXECUTED
4ff98: 6768 beqs 50002 <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);
4ff9a: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
4ffa0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
4ffa6: 9081 subl %d1,%d0 <== NOT EXECUTED
4ffa8: 2205 movel %d5,%d1 <== NOT EXECUTED
4ffaa: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4ffac: 2001 movel %d1,%d0 <== NOT EXECUTED
{
if (bytes_to_write == fs_info->vol.bytes_per_block)
4ffae: b3c4 cmpal %d4,%a1 <== NOT EXECUTED
4ffb0: 6608 bnes 4ffba <fat_cluster_set+0xaa> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4ffb2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4ffb4: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4ffb8: 6006 bras 4ffc0 <fat_cluster_set+0xb0> <== NOT EXECUTED
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
4ffba: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4ffbc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4ffc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ffc2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ffc4: 4e94 jsr %a4@ <== NOT EXECUTED
4ffc6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
if (RC_OK == rc)
4ffca: 4a80 tstl %d0 <== NOT EXECUTED
4ffcc: 661a bnes 4ffe8 <fat_cluster_set+0xd8> <== NOT EXECUTED
{
memset(blk_buf + offset, pattern, bytes_to_write);
4ffce: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4ffd0: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
4ffd4: deae fffc addl %fp@(-4),%d7 <== NOT EXECUTED
4ffd8: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4ffda: 4e95 jsr %a5@ <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
4ffdc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ffe0: 7001 moveq #1,%d0 <== NOT EXECUTED
4ffe2: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED
4ffe6: 601a bras 50002 <fat_cluster_set+0xf2> <== NOT EXECUTED
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
4ffe8: b083 cmpl %d3,%d0 <== NOT EXECUTED
4ffea: 6612 bnes 4fffe <fat_cluster_set+0xee> <== NOT EXECUTED
rc = -1;
else
{
bytes_to_write -= ret;
4ffec: 9483 subl %d3,%d2 <== NOT EXECUTED
bytes_written += ret;
4ffee: dc83 addl %d3,%d6 <== NOT EXECUTED
++cur_blk;
4fff0: 5285 addql #1,%d5 <== NOT EXECUTED
4fff2: 4287 clrl %d7 <== NOT EXECUTED
ssize_t ret;
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
4fff4: 4a82 tstl %d2 <== NOT EXECUTED
4fff6: 6600 ff7c bnew 4ff74 <fat_cluster_set+0x64> <== NOT EXECUTED
4fffa: 2006 movel %d6,%d0 <== NOT EXECUTED
4fffc: 6008 bras 50006 <fat_cluster_set+0xf6> <== NOT EXECUTED
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
4fffe: 70ff moveq #-1,%d0 <== NOT EXECUTED
50000: 6004 bras 50006 <fat_cluster_set+0xf6> <== NOT EXECUTED
}
}
if (RC_OK != rc)
return rc;
else
return bytes_to_write;
50002: 2004 movel %d4,%d0 <== NOT EXECUTED
50004: 60e2 bras 4ffe8 <fat_cluster_set+0xd8> <== NOT EXECUTED
}
if (RC_OK != rc)
return rc;
else
return bytes_written;
}
50006: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5000c: 4e5e unlk %fp <== NOT EXECUTED
00050010 <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));
50010: 4280 clrl %d0
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
50012: 4e56 ffd0 linkw %fp,#-48
50016: 122e 001f moveb %fp@(31),%d1
5001a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
5001e: 246e 0008 moveal %fp@(8),%a2
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
50022: 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)
{
50026: 2e2e 0010 movel %fp@(16),%d7
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
5002a: 9087 subl %d7,%d0
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff,
const bool overwrite_cluster)
{
5002c: 1d41 fffb moveb %d1,%fp@(-5)
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
50030: 242e 0014 movel %fp@(20),%d2
50034: b082 cmpl %d2,%d0
50036: 6402 bccs 5003a <fat_cluster_write+0x2a> <== ALWAYS TAKEN
50038: 2400 movel %d0,%d2 <== NOT EXECUTED
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
5003a: 2f2e 000c movel %fp@(12),%sp@-
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
5003e: 2c07 movel %d7,%d6
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
ssize_t bytes_written = 0;
50040: 4285 clrl %d5
50042: 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);
50046: 4bf9 0005 7dd0 lea 57dd0 <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);
5004c: 49f9 0004 fd48 lea 4fd48 <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);
50052: 2f0a movel %a2,%sp@-
50054: 4eba fafa jsr %pc@(4fb50 <fat_cluster_num_to_block_num>)
50058: 508f addql #8,%sp
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
5005a: 4281 clrl %d1
5005c: 122a 000c moveb %a2@(12),%d1
50060: e2ae lsrl %d1,%d6
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
50062: 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;
50064: 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);
50066: e3ab lsll %d1,%d3
50068: 9e83 subl %d3,%d7
5006a: 6000 008c braw 500f8 <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));
5006e: 4280 clrl %d0
50070: 302a 000a movew %a2@(10),%d0
50074: 2240 moveal %d0,%a1
50076: 9087 subl %d7,%d0
50078: 2600 movel %d0,%d3
5007a: b480 cmpl %d0,%d2
5007c: 6402 bccs 50080 <fat_cluster_write+0x70>
5007e: 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));
50080: 2803 movel %d3,%d4
50082: b083 cmpl %d3,%d0
50084: 6402 bccs 50088 <fat_cluster_write+0x78> <== ALWAYS TAKEN
50086: 2800 movel %d0,%d4 <== NOT EXECUTED
uint32_t ino
)
{
return (ino >= fs_info->uino_base);
}
50088: 122a 0002 moveb %a2@(2),%d1
5008c: 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)
50090: 4a84 tstl %d4
50092: 6772 beqs 50106 <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);
50094: 0281 0000 00ff andil #255,%d1
5009a: 0280 0000 00ff andil #255,%d0
500a0: 9081 subl %d1,%d0
500a2: 2206 movel %d6,%d1
500a4: e1a9 lsll %d0,%d1
500a6: 2001 movel %d1,%d0
{
if ( overwrite_block
500a8: 4a2e fffb tstb %fp@(-5)
500ac: 6604 bnes 500b2 <fat_cluster_write+0xa2>
|| (bytes_to_write == fs_info->vol.bytes_per_block))
500ae: b3c4 cmpal %d4,%a1
500b0: 6608 bnes 500ba <fat_cluster_write+0xaa>
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
500b2: 2f0b movel %a3,%sp@-
500b4: 4878 0002 pea 2 <DOUBLE_FLOAT>
500b8: 6006 bras 500c0 <fat_cluster_write+0xb0>
}
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
500ba: 2f0b movel %a3,%sp@-
500bc: 4878 0001 pea 1 <ADD>
500c0: 2f00 movel %d0,%sp@-
500c2: 2f0a movel %a2,%sp@-
500c4: 4e94 jsr %a4@
500c6: 4fef 0010 lea %sp@(16),%sp
if (RC_OK == rc)
500ca: 4a80 tstl %d0
500cc: 661e bnes 500ec <fat_cluster_write+0xdc> <== NEVER TAKEN
{
memcpy(blk_buf + offset, buf, bytes_to_write);
500ce: 206e 0018 moveal %fp@(24),%a0
500d2: deae fffc addl %fp@(-4),%d7
500d6: 2f04 movel %d4,%sp@-
500d8: 4870 5800 pea %a0@(00000000,%d5:l)
500dc: 2f07 movel %d7,%sp@-
500de: 4e95 jsr %a5@
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
500e0: 4fef 000c lea %sp@(12),%sp
500e4: 7001 moveq #1,%d0
500e6: 1540 007e moveb %d0,%a2@(126)
500ea: 601a bras 50106 <fat_cluster_write+0xf6>
cur_blk,
ofs_blk,
c,
&buffer[bytes_written],
overwrite_cluster);
if (c != ret)
500ec: b083 cmpl %d3,%d0
500ee: 6612 bnes 50102 <fat_cluster_write+0xf2> <== NEVER TAKEN
rc = -1;
else
{
bytes_to_write -= ret;
500f0: 9483 subl %d3,%d2
bytes_written += ret;
500f2: da83 addl %d3,%d5
++cur_blk;
500f4: 5286 addql #1,%d6
500f6: 4287 clrl %d7
uint32_t c;
cur_blk += blocks_in_offset;
while ( (RC_OK == rc)
&& (0 < bytes_to_write))
500f8: 4a82 tstl %d2
500fa: 6600 ff72 bnew 5006e <fat_cluster_write+0x5e>
500fe: 2005 movel %d5,%d0
50100: 6008 bras 5010a <fat_cluster_write+0xfa>
cur_blk,
ofs_blk,
c,
&buffer[bytes_written],
overwrite_cluster);
if (c != ret)
50102: 70ff moveq #-1,%d0 <== NOT EXECUTED
50104: 6004 bras 5010a <fat_cluster_write+0xfa> <== NOT EXECUTED
}
}
if (RC_OK != rc)
return rc;
else
return bytes_to_write;
50106: 2004 movel %d4,%d0
50108: 60e2 bras 500ec <fat_cluster_write+0xdc>
}
if (RC_OK != rc)
return rc;
else
return bytes_written;
}
5010a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
50110: 4e5e unlk %fp <== NOT EXECUTED
0004f51e <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)
4f51e: 7201 moveq #1,%d1
int
fat_file_close(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4f520: 4e56 0000 linkw %fp,#0
4f524: 2f0a movel %a2,%sp@-
4f526: 246e 000c moveal %fp@(12),%a2
4f52a: 2f02 movel %d2,%sp@-
4f52c: 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)
4f530: 202a 0008 movel %a2@(8),%d0
4f534: b280 cmpl %d0,%d1
4f536: 640c bccs 4f544 <fat_file_close+0x26>
{
fat_fd->links_num--;
4f538: 5380 subql #1,%d0
4f53a: 2540 0008 movel %d0,%a2@(8)
return rc;
4f53e: 4280 clrl %d0
4f540: 6000 0094 braw 4f5d6 <fat_file_close+0xb8>
}
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
4f544: 102a 0030 moveb %a2@(48),%d0
4f548: 0800 0000 btst #0,%d0
4f54c: 674a beqs 4f598 <fat_file_close+0x7a> <== ALWAYS TAKEN
{
rc = fat_file_truncate(fs_info, fat_fd, 0);
4f54e: 42a7 clrl %sp@- <== NOT EXECUTED
4f550: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f552: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f554: 4eb9 0004 f432 jsr 4f432 <fat_file_truncate> <== NOT EXECUTED
if ( rc != RC_OK )
4f55a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f55e: 4a80 tstl %d0 <== NOT EXECUTED
4f560: 6674 bnes 4f5d6 <fat_file_close+0xb8> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4f562: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f564: 4eb9 0005 2b90 jsr 52b90 <_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) )
4f56a: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4f56e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f570: 4eb9 0005 0b78 jsr 50b78 <fat_ino_is_unique> <== NOT EXECUTED
4f576: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f57a: 4a00 tstb %d0 <== NOT EXECUTED
4f57c: 670e beqs 4f58c <fat_file_close+0x6e> <== NOT EXECUTED
fat_free_unique_ino(fs_info, fat_fd->ino);
4f57e: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4f582: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f584: 4eb9 0005 0b4a jsr 50b4a <fat_free_unique_ino> <== NOT EXECUTED
4f58a: 508f addql #8,%sp <== NOT EXECUTED
free(fat_fd);
4f58c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f58e: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4f594: 588f addql #4,%sp <== NOT EXECUTED
4f596: 602a bras 4f5c2 <fat_file_close+0xa4> <== NOT EXECUTED
}
else
{
if (fat_ino_is_unique(fs_info, fat_fd->ino))
4f598: 2f2a 000c movel %a2@(12),%sp@-
4f59c: 2f02 movel %d2,%sp@-
4f59e: 4eb9 0005 0b78 jsr 50b78 <fat_ino_is_unique>
4f5a4: 508f addql #8,%sp
4f5a6: 4a00 tstb %d0
4f5a8: 6706 beqs 4f5b0 <fat_file_close+0x92> <== ALWAYS TAKEN
{
fat_fd->links_num = 0;
4f5aa: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
4f5ae: 6012 bras 4f5c2 <fat_file_close+0xa4> <== NOT EXECUTED
4f5b0: 2f0a movel %a2,%sp@-
4f5b2: 4eb9 0005 2b90 jsr 52b90 <_Chain_Extract>
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
4f5b8: 2f0a movel %a2,%sp@-
4f5ba: 4eb9 0004 3f4c jsr 43f4c <free>
4f5c0: 508f addql #8,%sp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
4f5c2: 2d42 0008 movel %d2,%fp@(8)
return rc;
}
4f5c6: 242e fff8 movel %fp@(-8),%d2
4f5ca: 246e fffc moveal %fp@(-4),%a2
4f5ce: 4e5e unlk %fp
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
4f5d0: 4ef9 0004 fbaa jmp 4fbaa <fat_buf_release>
return rc;
}
4f5d6: 242e fff8 movel %fp@(-8),%d2
4f5da: 246e fffc moveal %fp@(-4),%a2
4f5de: 4e5e unlk %fp <== NOT EXECUTED
0004f678 <fat_file_extend>:
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
4f678: 4e56 ffcc linkw %fp,#-52
4f67c: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4f680: 262e 0014 movel %fp@(20),%d3
4f684: 286e 0018 moveal %fp@(24),%a4
4f688: 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;
4f68c: 2883 movel %d3,%a4@
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
4f68e: 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)
4f692: 202b 0018 movel %a3@(24),%d0
fat_file_fd_t *fat_fd,
bool zero_fill,
uint32_t new_length,
uint32_t *a_length
)
{
4f696: 1e2e 0013 moveb %fp@(19),%d7
int rc = RC_OK;
uint32_t chain = 0;
4f69a: 42ae fff0 clrl %fp@(-16)
uint32_t bytes2add = 0;
uint32_t cls2add = 0;
uint32_t old_last_cl;
uint32_t last_cl = 0;
4f69e: 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)
4f6a2: b083 cmpl %d3,%d0
4f6a4: 6506 bcss 4f6ac <fat_file_extend+0x34>
return RC_OK;
4f6a6: 4282 clrl %d2
4f6a8: 6000 01a2 braw 4f84c <fat_file_extend+0x1d4>
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f6ac: 7201 moveq #1,%d1
4f6ae: b2ab 0020 cmpl %a3@(32),%d1
4f6b2: 6616 bnes 4f6ca <fat_file_extend+0x52> <== ALWAYS TAKEN
4f6b4: 4aab 0024 tstl %a3@(36) <== NOT EXECUTED
4f6b8: 6610 bnes 4f6ca <fat_file_extend+0x52> <== NOT EXECUTED
4f6ba: 7403 moveq #3,%d2 <== NOT EXECUTED
4f6bc: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED
4f6c0: c282 andl %d2,%d1 <== NOT EXECUTED
4f6c2: 4a01 tstb %d1 <== NOT EXECUTED
4f6c4: 6704 beqs 4f6ca <fat_file_extend+0x52> <== NOT EXECUTED
4f6c6: 6000 00ac braw 4f774 <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))) &
4f6ca: 4284 clrl %d4
(fs_info->vol.bpc - 1);
bytes2add = new_length - fat_fd->fat_file_size;
4f6cc: 2a03 movel %d3,%d5
4f6ce: 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))) &
4f6d0: 382a 0006 movew %a2@(6),%d4
4f6d4: 2204 movel %d4,%d1
4f6d6: 5381 subql #1,%d1
4f6d8: 2c01 movel %d1,%d6
4f6da: 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 -
4f6dc: 9886 subl %d6,%d4
4f6de: 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)
4f6e0: b885 cmpl %d5,%d4
4f6e2: 6404 bccs 4f6e8 <fat_file_extend+0x70> <== NEVER TAKEN
bytes2add -= bytes_remain;
4f6e4: 9a84 subl %d4,%d5
4f6e6: 6002 bras 4f6ea <fat_file_extend+0x72>
else
bytes2add = 0;
4f6e8: 4285 clrl %d5 <== NOT EXECUTED
if (zero_fill && bytes_remain > 0) {
4f6ea: 4a07 tstb %d7
4f6ec: 6740 beqs 4f72e <fat_file_extend+0xb6> <== ALWAYS TAKEN
4f6ee: 4a84 tstl %d4 <== NOT EXECUTED
4f6f0: 673c beqs 4f72e <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);
4f6f2: 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;
4f6f6: 4281 clrl %d1 <== NOT EXECUTED
4f6f8: 122a 0008 moveb %a2@(8),%d1 <== NOT EXECUTED
4f6fc: 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);
4f6fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f700: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f702: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f704: 4eba f9dc jsr %pc@(4f0e2 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f708: 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);
4f70c: 2401 movel %d1,%d2 <== NOT EXECUTED
if (rc != RC_OK)
4f70e: 6600 013c bnew 4f84c <fat_file_extend+0x1d4> <== NOT EXECUTED
return rc;
bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0);
4f712: 42a7 clrl %sp@- <== NOT EXECUTED
4f714: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f716: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f718: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4f71c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f71e: 4eb9 0004 ff10 jsr 4ff10 <fat_cluster_set> <== NOT EXECUTED
if (bytes_remain != bytes_written)
4f724: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4f728: b084 cmpl %d4,%d0 <== NOT EXECUTED
4f72a: 6702 beqs 4f72e <fat_file_extend+0xb6> <== NOT EXECUTED
4f72c: 6052 bras 4f780 <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)
4f72e: 4a85 tstl %d5
4f730: 6700 ff74 beqw 4f6a6 <fat_file_extend+0x2e>
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
4f734: 4280 clrl %d0
4f736: 102a 0008 moveb %a2@(8),%d0
4f73a: 2c05 movel %d5,%d6
4f73c: 5386 subql #1,%d6
4f73e: e0ae lsrl %d0,%d6
4f740: 5286 addql #1,%d6
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
4f742: 0287 0000 00ff andil #255,%d7
4f748: 2f07 movel %d7,%sp@-
4f74a: 486e fff8 pea %fp@(-8)
4f74e: 486e fffc pea %fp@(-4)
4f752: 2f06 movel %d6,%sp@-
4f754: 486e fff0 pea %fp@(-16)
4f758: 2f0a movel %a2,%sp@-
4f75a: 4eb9 0005 5c40 jsr 55c40 <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)
4f760: 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,
4f764: 2400 movel %d0,%d2
&cls_added, &last_cl, zero_fill);
/* this means that low level I/O error occured */
if (rc != RC_OK)
4f766: 6600 00e4 bnew 4f84c <fat_file_extend+0x1d4>
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
4f76a: 202e fffc movel %fp@(-4),%d0
4f76e: 6616 bnes 4f786 <fat_file_extend+0x10e> <== ALWAYS TAKEN
4f770: 4a84 tstl %d4 <== NOT EXECUTED
4f772: 6612 bnes 4f786 <fat_file_extend+0x10e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
4f774: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4f77a: 721c moveq #28,%d1 <== NOT EXECUTED
4f77c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f77e: 2081 movel %d1,%a0@ <== NOT EXECUTED
4f780: 74ff moveq #-1,%d2 <== NOT EXECUTED
4f782: 6000 00c8 braw 4f84c <fat_file_extend+0x1d4> <== NOT EXECUTED
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
4f786: b086 cmpl %d6,%d0
4f788: 6718 beqs 4f7a2 <fat_file_extend+0x12a> <== ALWAYS TAKEN
{
new_length -= bytes2add & (fs_info->vol.bpc - 1);
4f78a: 4281 clrl %d1 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
4f78c: 9c80 subl %d0,%d6 <== NOT EXECUTED
4f78e: 4280 clrl %d0 <== NOT EXECUTED
4f790: 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);
4f794: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
4f798: 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);
4f79a: 5381 subql #1,%d1 <== NOT EXECUTED
4f79c: ca81 andl %d1,%d5 <== NOT EXECUTED
4f79e: 9685 subl %d5,%d3 <== NOT EXECUTED
new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
4f7a0: 9686 subl %d6,%d3 <== NOT EXECUTED
}
/* add new chain to the end of existed */
if ( fat_fd->fat_file_size == 0 )
4f7a2: 206b 0018 moveal %a3@(24),%a0
4f7a6: 4a88 tstl %a0
4f7a8: 6612 bnes 4f7bc <fat_file_extend+0x144>
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
4f7aa: 202e fff0 movel %fp@(-16),%d0
fat_fd->map.file_cln = 0;
4f7ae: 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;
4f7b2: 2740 001c movel %d0,%a3@(28)
4f7b6: 2740 0036 movel %d0,%a3@(54)
4f7ba: 6054 bras 4f810 <fat_file_extend+0x198>
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
4f7bc: 202b 003a movel %a3@(58),%d0
4f7c0: 72ff moveq #-1,%d1
4f7c2: b280 cmpl %d0,%d1
4f7c4: 6706 beqs 4f7cc <fat_file_extend+0x154> <== NEVER TAKEN
{
old_last_cl = fat_fd->map.last_cln;
4f7c6: 2d40 fff4 movel %d0,%fp@(-12)
4f7ca: 6020 bras 4f7ec <fat_file_extend+0x174>
}
else
{
rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM,
4f7cc: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
4f7d0: 4868 ffff pea %a0@(-1) <== NOT EXECUTED
4f7d4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f7d8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f7da: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f7dc: 4eb9 0004 f5e2 jsr 4f5e2 <fat_file_ioctl> <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
4f7e2: 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,
4f7e6: 2800 movel %d0,%d4 <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
4f7e8: 6702 beqs 4f7ec <fat_file_extend+0x174> <== NOT EXECUTED
4f7ea: 6048 bras 4f834 <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);
4f7ec: 2f2e fff0 movel %fp@(-16),%sp@-
4f7f0: 2f2e fff4 movel %fp@(-12),%sp@-
4f7f4: 2f0a movel %a2,%sp@-
4f7f6: 4eb9 0005 5968 jsr 55968 <fat_set_fat_cluster>
if ( rc != RC_OK )
4f7fc: 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);
4f800: 2800 movel %d0,%d4
if ( rc != RC_OK )
4f802: 6702 beqs 4f806 <fat_file_extend+0x18e> <== ALWAYS TAKEN
4f804: 602e bras 4f834 <fat_file_extend+0x1bc> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(fs_info, chain);
return rc;
}
fat_buf_release(fs_info);
4f806: 2f0a movel %a2,%sp@-
4f808: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release>
4f80e: 588f addql #4,%sp
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
4f810: 4aae fffc tstl %fp@(-4)
4f814: 6730 beqs 4f846 <fat_file_extend+0x1ce> <== NEVER TAKEN
{
fat_fd->map.last_cln = last_cl;
4f816: 276e fff8 003a movel %fp@(-8),%a3@(58)
if (fat_fd->fat_file_type == FAT_DIRECTORY)
4f81c: 4aab 0010 tstl %a3@(16)
4f820: 6624 bnes 4f846 <fat_file_extend+0x1ce> <== ALWAYS TAKEN
{
rc = fat_init_clusters_chain(fs_info, chain);
4f822: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
4f826: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f828: 4eb9 0005 0a40 jsr 50a40 <fat_init_clusters_chain> <== NOT EXECUTED
if ( rc != RC_OK )
4f82e: 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);
4f830: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
4f832: 6712 beqs 4f846 <fat_file_extend+0x1ce> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(fs_info, chain);
4f834: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
4f838: 2404 movel %d4,%d2 <== NOT EXECUTED
4f83a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f83c: 4eb9 0005 5b9c jsr 55b9c <fat_free_fat_clusters_chain> <== NOT EXECUTED
4f842: 508f addql #8,%sp <== NOT EXECUTED
4f844: 6006 bras 4f84c <fat_file_extend+0x1d4> <== NOT EXECUTED
return rc;
}
}
}
*a_length = new_length;
4f846: 2883 movel %d3,%a4@
fat_fd->fat_file_size = new_length;
4f848: 2743 0018 movel %d3,%a3@(24)
return RC_OK;
}
4f84c: 2002 movel %d2,%d0
4f84e: 4cee 1cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a4
4f854: 4e5e unlk %fp <== NOT EXECUTED
0004f5e2 <fat_file_ioctl>:
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
4f5e2: 7001 moveq #1,%d0
fat_file_ioctl(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
4f5e4: 4e56 fffc linkw %fp,#-4
4f5e8: 226e 0008 moveal %fp@(8),%a1
4f5ec: 2f0a movel %a2,%sp@-
4f5ee: 206e 000c moveal %fp@(12),%a0
4f5f2: 2f02 movel %d2,%sp@-
int rc = RC_OK;
uint32_t cur_cln = 0;
4f5f4: 42ae fffc clrl %fp@(-4)
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
4f5f8: b0ae 0010 cmpl %fp@(16),%d0
4f5fc: 6660 bnes 4f65e <fat_file_ioctl+0x7c> <== NEVER TAKEN
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t);
4f5fe: 202e 0014 movel %fp@(20),%d0
ret = va_arg(ap, uint32_t *);
4f602: 246e 0018 moveal %fp@(24),%a2
/* sanity check */
if ( pos >= fat_fd->fat_file_size ) {
4f606: b0a8 0018 cmpl %a0@(24),%d0
4f60a: 650e bcss 4f61a <fat_file_ioctl+0x38> <== ALWAYS TAKEN
va_end(ap);
rtems_set_errno_and_return_minus_one( EIO );
4f60c: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4f612: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f614: 7005 moveq #5,%d0 <== NOT EXECUTED
4f616: 2080 movel %d0,%a0@ <== NOT EXECUTED
4f618: 6050 bras 4f66a <fat_file_ioctl+0x88> <== NOT EXECUTED
}
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f61a: 7201 moveq #1,%d1
4f61c: b2a8 0020 cmpl %a0@(32),%d1
4f620: 6618 bnes 4f63a <fat_file_ioctl+0x58> <== NEVER TAKEN
4f622: 4aa8 0024 tstl %a0@(36)
4f626: 6612 bnes 4f63a <fat_file_ioctl+0x58> <== NEVER TAKEN
4f628: 7403 moveq #3,%d2
4f62a: 1229 000e moveb %a1@(14),%d1
4f62e: c282 andl %d2,%d1
4f630: 4a01 tstb %d1
4f632: 6706 beqs 4f63a <fat_file_ioctl+0x58> <== NEVER TAKEN
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
4f634: 4292 clrl %a2@
rc = RC_OK;
4f636: 4280 clrl %d0
break;
4f638: 6032 bras 4f66c <fat_file_ioctl+0x8a>
}
cl_start = pos >> fs_info->vol.bpc_log2;
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f63a: 486e fffc pea %fp@(-4) <== NOT EXECUTED
*ret = 0;
rc = RC_OK;
break;
}
cl_start = pos >> fs_info->vol.bpc_log2;
4f63e: 4281 clrl %d1 <== NOT EXECUTED
4f640: 1229 0008 moveb %a1@(8),%d1 <== NOT EXECUTED
4f644: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f646: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f648: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4f64a: 2f09 movel %a1,%sp@- <== NOT EXECUTED
4f64c: 4eba fa94 jsr %pc@(4f0e2 <fat_file_lseek>) <== NOT EXECUTED
if ( rc != RC_OK )
4f650: 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);
4f654: 2001 movel %d1,%d0 <== NOT EXECUTED
if ( rc != RC_OK )
4f656: 6614 bnes 4f66c <fat_file_ioctl+0x8a> <== NOT EXECUTED
break;
*ret = cur_cln;
4f658: 24ae fffc movel %fp@(-4),%a2@ <== NOT EXECUTED
break;
4f65c: 600e bras 4f66c <fat_file_ioctl+0x8a> <== NOT EXECUTED
default:
errno = EINVAL;
4f65e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4f664: 7416 moveq #22,%d2 <== NOT EXECUTED
4f666: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f668: 2082 movel %d2,%a0@ <== NOT EXECUTED
rc = -1;
4f66a: 70ff moveq #-1,%d0 <== NOT EXECUTED
break;
}
va_end(ap);
return rc;
}
4f66c: 242e fff4 movel %fp@(-12),%d2
4f670: 246e fff8 moveal %fp@(-8),%a2
4f674: 4e5e unlk %fp <== NOT EXECUTED
0004f0e2 <fat_file_lseek>:
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
4f0e2: 4e56 ffe0 linkw %fp,#-32
4f0e6: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4f0ea: 246e 000c moveal %fp@(12),%a2
4f0ee: 262e 0010 movel %fp@(16),%d3
4f0f2: 266e 0014 moveal %fp@(20),%a3
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
4f0f6: 202a 0032 movel %a2@(50),%d0
4f0fa: b083 cmpl %d3,%d0
4f0fc: 6606 bnes 4f104 <fat_file_lseek+0x22>
*disk_cln = fat_fd->map.disk_cln;
4f0fe: 26aa 0036 movel %a2@(54),%a3@
4f102: 6056 bras 4f15a <fat_file_lseek+0x78>
{
uint32_t cur_cln;
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
4f104: b083 cmpl %d3,%d0
4f106: 640c bccs 4f114 <fat_file_lseek+0x32> <== NEVER TAKEN
{
cur_cln = fat_fd->map.disk_cln;
count = file_cln - fat_fd->map.file_cln;
4f108: 2a03 movel %d3,%d5
4f10a: 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;
4f10c: 2d6a 0036 fffc movel %a2@(54),%fp@(-4)
4f112: 6008 bras 4f11c <fat_file_lseek+0x3a>
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
4f114: 2a03 movel %d3,%d5 <== NOT EXECUTED
4f116: 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);
4f11c: 240e movel %fp,%d2
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
4f11e: 4284 clrl %d4
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f120: 5982 subql #4,%d2
4f122: 49f9 0005 57fc lea 557fc <fat_get_fat_cluster>,%a4
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
4f128: 601e bras 4f148 <fat_file_lseek+0x66>
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f12a: 2f02 movel %d2,%sp@-
4f12c: 2f2e fffc movel %fp@(-4),%sp@-
4f130: 2f2e 0008 movel %fp@(8),%sp@-
4f134: 4e94 jsr %a4@
if ( rc != RC_OK )
4f136: 4fef 000c lea %sp@(12),%sp
4f13a: 4a80 tstl %d0
4f13c: 6708 beqs 4f146 <fat_file_lseek+0x64> <== ALWAYS TAKEN
return rc;
4f13e: 2600 movel %d0,%d3 <== NOT EXECUTED
4f140: 5bc2 smi %d2 <== NOT EXECUTED
4f142: 49c2 extbl %d2 <== NOT EXECUTED
4f144: 6018 bras 4f15e <fat_file_lseek+0x7c> <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
4f146: 5284 addql #1,%d4
4f148: ba84 cmpl %d4,%d5
4f14a: 66de bnes 4f12a <fat_file_lseek+0x48>
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
4f14c: 202e fffc movel %fp@(-4),%d0
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
4f150: 2543 0032 movel %d3,%a2@(50)
fat_fd->map.disk_cln = cur_cln;
4f154: 2540 0036 movel %d0,%a2@(54)
*disk_cln = cur_cln;
4f158: 2680 movel %d0,%a3@
}
return RC_OK;
4f15a: 4282 clrl %d2
4f15c: 4283 clrl %d3
}
4f15e: 2002 movel %d2,%d0
4f160: 2203 movel %d3,%d1
4f162: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4
4f168: 4e5e unlk %fp <== NOT EXECUTED
0004fa38 <fat_file_mark_removed>:
void
fat_file_mark_removed(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4fa38: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
4fa3c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
4fa40: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
uint32_t key = 0;
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
4fa44: 486a 0020 pea %a2@(32) <== NOT EXECUTED
void
fat_file_mark_removed(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4fa48: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
uint32_t key = 0;
key = fat_construct_key(fs_info, &fat_fd->dir_pos.sname);
4fa4c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fa4e: 4eba f644 jsr %pc@(4f094 <fat_construct_key>) <== NOT EXECUTED
4fa52: 508f addql #8,%sp <== NOT EXECUTED
4fa54: 2400 movel %d0,%d2 <== NOT EXECUTED
4fa56: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fa58: 4eb9 0005 2b90 jsr 52b90 <_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);
4fa5e: 7001 moveq #1,%d0 <== NOT EXECUTED
4fa60: 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 );
4fa62: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fa64: 2200 movel %d0,%d1 <== NOT EXECUTED
4fa66: e988 lsll #4,%d0 <== NOT EXECUTED
4fa68: e589 lsll #2,%d1 <== NOT EXECUTED
4fa6a: 9081 subl %d1,%d0 <== NOT EXECUTED
4fa6c: d0ab 0066 addl %a3@(102),%d0 <== NOT EXECUTED
4fa70: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4fa72: 4eb9 0004 8758 jsr 48758 <_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;
4fa78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fa7c: 7201 moveq #1,%d1 <== NOT EXECUTED
4fa7e: 102a 0030 moveb %a2@(48),%d0 <== NOT EXECUTED
4fa82: 8081 orl %d1,%d0 <== NOT EXECUTED
4fa84: 1540 0030 moveb %d0,%a2@(48) <== NOT EXECUTED
}
4fa88: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
4fa8e: 4e5e unlk %fp <== NOT EXECUTED
0004f16c <fat_file_open>:
fat_file_open(
fat_fs_info_t *fs_info,
fat_dir_pos_t *dir_pos,
fat_file_fd_t **fat_fd
)
{
4f16c: 4e56 ffe0 linkw %fp,#-32
4f170: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4f174: 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);
4f178: 283c 0004 f094 movel #323732,%d4
4f17e: 2044 moveal %d4,%a0
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
4f180: 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);
4f182: 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
)
{
4f184: 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);
4f188: 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
)
{
4f18a: 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);
4f18e: 4e90 jsr %a0@
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4f190: 2a6b 0062 moveal %a3@(98),%a5
4f194: 2400 movel %d0,%d2
4f196: 508f addql #8,%sp
uint32_t key1,
uint32_t key2,
fat_file_fd_t **ret
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
4f198: c680 andl %d0,%d3
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
4f19a: 2003 movel %d3,%d0
4f19c: e98b lsll #4,%d3
4f19e: e588 lsll #2,%d0
4f1a0: 9680 subl %d0,%d3
4f1a2: dbc3 addal %d3,%a5
4f1a4: 245d moveal %a5@+,%a2
4f1a6: 601c bras 4f1c4 <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);
4f1a8: 486a 0020 pea %a2@(32)
4f1ac: 2044 moveal %d4,%a0
4f1ae: 2f0b movel %a3,%sp@-
4f1b0: 4e90 jsr %a0@
4f1b2: 508f addql #8,%sp
if ( (key1) == ck)
4f1b4: b082 cmpl %d2,%d0
4f1b6: 660a bnes 4f1c2 <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;
4f1b8: 288a movel %a2,%a4@ <== NOT EXECUTED
lfat_fd->links_num++;
4f1ba: 52aa 0008 addql #1,%a2@(8) <== NOT EXECUTED
4f1be: 6000 00d0 braw 4f290 <fat_file_open+0x124> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
4f1c2: 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) ; )
4f1c4: bbca cmpal %a2,%a5
4f1c6: 66e0 bnes 4f1a8 <fat_file_open+0x3c>
4f1c8: 6000 00ca braw 4f294 <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);
4f1cc: 486a 0020 pea %a2@(32) <== NOT EXECUTED
4f1d0: 2044 moveal %d4,%a0 <== NOT EXECUTED
4f1d2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f1d4: 4e90 jsr %a0@ <== NOT EXECUTED
4f1d6: 508f addql #8,%sp <== NOT EXECUTED
if ( (key1) == ck)
4f1d8: b082 cmpl %d2,%d0 <== NOT EXECUTED
4f1da: 660a bnes 4f1e6 <fat_file_open+0x7a> <== NOT EXECUTED
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
4f1dc: 4a82 tstl %d2 <== NOT EXECUTED
4f1de: 6710 beqs 4f1f0 <fat_file_open+0x84> <== NOT EXECUTED
4f1e0: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
4f1e4: 670a beqs 4f1f0 <fat_file_open+0x84> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
4f1e6: 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) ; )
4f1e8: bbca cmpal %a2,%a5
4f1ea: 66e0 bnes 4f1cc <fat_file_open+0x60> <== NEVER TAKEN
return 0;
}
}
the_node = the_node->next;
}
return -1;
4f1ec: 78ff moveq #-1,%d4
4f1ee: 6002 bras 4f1f2 <fat_file_open+0x86>
if ( (key1) == ck)
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
{
*ret = (void *)the_node;
return 0;
4f1f0: 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));
4f1f2: 4878 0042 pea 42 <DBL_MANT_DIG+0xd>
4f1f6: 4eb9 0004 4410 jsr 44410 <malloc>
if ( lfat_fd == NULL )
4f1fc: 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));
4f1fe: 2440 moveal %d0,%a2
4f200: 2880 movel %d0,%a4@
if ( lfat_fd == NULL )
4f202: 660e bnes 4f212 <fat_file_open+0xa6> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
4f204: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4f20a: 720c moveq #12,%d1 <== NOT EXECUTED
4f20c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f20e: 2081 movel %d1,%a0@ <== NOT EXECUTED
4f210: 606a bras 4f27c <fat_file_open+0x110> <== NOT EXECUTED
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
4f212: 4878 0042 pea 42 <DBL_MANT_DIG+0xd>
4f216: 42a7 clrl %sp@-
4f218: 2f00 movel %d0,%sp@-
4f21a: 4eb9 0005 7e40 jsr 57e40 <memset>
lfat_fd->links_num = 1;
4f220: 7001 moveq #1,%d0
lfat_fd->flags &= ~FAT_FILE_REMOVED;
4f222: 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;
4f224: 2540 0008 movel %d0,%a2@(8)
lfat_fd->flags &= ~FAT_FILE_REMOVED;
4f228: 102a 0030 moveb %a2@(48),%d0
4f22c: c081 andl %d1,%d0
4f22e: 1540 0030 moveb %d0,%a2@(48)
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
4f232: 70ff moveq #-1,%d0
4f234: 2540 003a movel %d0,%a2@(58)
lfat_fd->dir_pos = *dir_pos;
4f238: 4878 0010 pea 10 <INVALID_OPERATION>
4f23c: 2f05 movel %d5,%sp@-
4f23e: 486a 0020 pea %a2@(32)
4f242: 4eb9 0005 7dd0 jsr 57dd0 <memcpy>
if ( rc != RC_OK )
4f248: 4fef 0018 lea %sp@(24),%sp
4f24c: 4a84 tstl %d4
4f24e: 6706 beqs 4f256 <fat_file_open+0xea> <== NEVER TAKEN
lfat_fd->ino = key;
4f250: 2542 000c movel %d2,%a2@(12)
4f254: 602a bras 4f280 <fat_file_open+0x114>
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
4f256: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f258: 4eb9 0005 0ab2 jsr 50ab2 <fat_get_unique_ino> <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
4f25e: 588f addql #4,%sp <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(fs_info);
4f260: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
4f264: 661a bnes 4f280 <fat_file_open+0x114> <== NOT EXECUTED
{
free((*fat_fd));
4f266: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
4f268: 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 );
4f26e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4f274: 588f addql #4,%sp <== NOT EXECUTED
4f276: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f278: 700c moveq #12,%d0 <== NOT EXECUTED
4f27a: 2080 movel %d0,%a0@ <== NOT EXECUTED
4f27c: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f27e: 6026 bras 4f2a6 <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 );
4f280: 2f0a movel %a2,%sp@-
4f282: d6ab 0062 addl %a3@(98),%d3
4f286: 2f03 movel %d3,%sp@-
4f288: 4eb9 0004 8758 jsr 48758 <_Chain_Append>
4f28e: 508f addql #8,%sp
/*
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
4f290: 4280 clrl %d0
4f292: 6012 bras 4f2a6 <fat_file_open+0x13a>
4f294: 2a6b 0066 moveal %a3@(102),%a5
4f298: 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);
4f29a: 283c 0004 f094 movel #323732,%d4
4f2a0: 245d moveal %a5@+,%a2
4f2a2: 6000 ff44 braw 4f1e8 <fat_file_open+0x7c>
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
4f2a6: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
4f2ac: 4e5e unlk %fp <== NOT EXECUTED
0004f2c2 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
4f2c2: 4e56 ffd4 linkw %fp,#-44
4f2c6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4f2ca: 246e 0008 moveal %fp@(8),%a2
4f2ce: 266e 000c moveal %fp@(12),%a3
4f2d2: 282e 0010 movel %fp@(16),%d4
4f2d6: 242e 0014 movel %fp@(20),%d2
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cmpltd = 0;
uint32_t cur_cln = 0;
4f2da: 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)
4f2de: 4a82 tstl %d2
4f2e0: 6700 013c beqw 4f41e <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 )
4f2e4: 202b 0018 movel %a3@(24),%d0
4f2e8: b084 cmpl %d4,%d0
4f2ea: 6300 0132 blsw 4f41e <fat_file_read+0x15c>
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
4f2ee: b082 cmpl %d2,%d0
4f2f0: 6508 bcss 4f2fa <fat_file_read+0x38> <== NEVER TAKEN
(start > fat_fd->fat_file_size - count))
4f2f2: 2200 movel %d0,%d1
4f2f4: 9282 subl %d2,%d1
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
4f2f6: b284 cmpl %d4,%d1
4f2f8: 6404 bccs 4f2fe <fat_file_read+0x3c> <== ALWAYS TAKEN
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
4f2fa: 2400 movel %d0,%d2 <== NOT EXECUTED
4f2fc: 9484 subl %d4,%d2 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
4f2fe: 7001 moveq #1,%d0
4f300: b0ab 0020 cmpl %a3@(32),%d0
4f304: 6652 bnes 4f358 <fat_file_read+0x96> <== NEVER TAKEN
4f306: 4aab 0024 tstl %a3@(36)
4f30a: 664c bnes 4f358 <fat_file_read+0x96> <== NEVER TAKEN
4f30c: 7203 moveq #3,%d1
4f30e: 102a 000e moveb %a2@(14),%d0
4f312: c081 andl %d1,%d0
4f314: 4a00 tstb %d0
4f316: 6740 beqs 4f358 <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);
4f318: 2f2b 001c movel %a3@(28),%sp@-
4f31c: 2f0a movel %a2,%sp@-
4f31e: 4eba fd3c jsr %pc@(4f05c <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);
4f322: 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);
4f324: 4281 clrl %d1
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f326: 2040 moveal %d0,%a0
4f328: 2eae 0018 movel %fp@(24),%sp@
4f32c: 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);
4f32e: 3212 movew %a2@,%d1
4f330: 5381 subql #1,%d1
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f332: c284 andl %d4,%d1
4f334: 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);
4f336: 4281 clrl %d1
4f338: 122a 0002 moveb %a2@(2),%d1
4f33c: e2ac lsrl %d1,%d4
byte = start & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4f33e: 4870 4800 pea %a0@(00000000,%d4:l)
4f342: 2f0a movel %a2,%sp@-
4f344: 4eb9 0004 fdfc jsr 4fdfc <_fat_block_read>
if ( ret < 0 )
4f34a: 4fef 0014 lea %sp@(20),%sp
4f34e: 4a80 tstl %d0
4f350: 6c00 00d6 bgew 4f428 <fat_file_read+0x166>
4f354: 6000 00d0 braw 4f426 <fat_file_read+0x164> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
4f358: 4280 clrl %d0 <== NOT EXECUTED
4f35a: 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);
4f35e: 2c0e movel %fp,%d6 <== NOT EXECUTED
4f360: 5986 subql #4,%d6 <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
4f362: 2604 movel %d4,%d3 <== NOT EXECUTED
4f364: e0ab lsrl %d0,%d3 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
4f366: 3a2a 0006 movew %a2@(6),%d5 <== NOT EXECUTED
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f36a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f36c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f36e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f370: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f372: 4eba fd6e jsr %pc@(4f0e2 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f376: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4f37a: 4a81 tstl %d1 <== NOT EXECUTED
4f37c: 6600 00a4 bnew 4f422 <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);
4f380: 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);
4f382: 4bfa fcd8 lea %pc@(4f05c <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);
4f386: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
4f38c: 5385 subql #1,%d5 <== NOT EXECUTED
4f38e: c885 andl %d5,%d4 <== NOT EXECUTED
4f390: 4285 clrl %d5 <== NOT EXECUTED
4f392: 2e04 movel %d4,%d7 <== NOT EXECUTED
4f394: 6068 bras 4f3fe <fat_file_read+0x13c> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
4f396: 4285 clrl %d5 <== NOT EXECUTED
4f398: 3a2a 0006 movew %a2@(6),%d5 <== NOT EXECUTED
4f39c: 9a87 subl %d7,%d5 <== NOT EXECUTED
4f39e: b485 cmpl %d5,%d2 <== NOT EXECUTED
4f3a0: 6402 bccs 4f3a4 <fat_file_read+0xe2> <== NOT EXECUTED
4f3a2: 2a02 movel %d2,%d5 <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
4f3a4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4f3a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f3aa: 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);
4f3ac: 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);
4f3b0: 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);
4f3b2: 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);
4f3b6: 4281 clrl %d1 <== NOT EXECUTED
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f3b8: 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);
4f3ba: 3212 movew %a2@,%d1 <== NOT EXECUTED
4f3bc: 5381 subql #1,%d1 <== NOT EXECUTED
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f3be: c287 andl %d7,%d1 <== NOT EXECUTED
4f3c0: 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);
4f3c2: 4281 clrl %d1 <== NOT EXECUTED
4f3c4: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED
4f3c8: e2af lsrl %d1,%d7 <== NOT EXECUTED
4f3ca: 2047 moveal %d7,%a0 <== NOT EXECUTED
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4f3cc: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
4f3d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f3d2: 4eb9 0004 fdfc jsr 4fdfc <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
4f3d8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4f3dc: 4a80 tstl %d0 <== NOT EXECUTED
4f3de: 6d46 blts 4f426 <fat_file_read+0x164> <== NOT EXECUTED
return -1;
count -= c;
4f3e0: 9485 subl %d5,%d2 <== NOT EXECUTED
cmpltd += c;
4f3e2: 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;
4f3e4: 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);
4f3e6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
4f3e8: 2a2e fffc movel %fp@(-4),%d5 <== NOT EXECUTED
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4f3ec: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f3ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f3f0: 4eb9 0005 57fc jsr 557fc <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
4f3f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f3fa: 4a80 tstl %d0 <== NOT EXECUTED
4f3fc: 662a bnes 4f428 <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)
4f3fe: 4a82 tstl %d2 <== NOT EXECUTED
4f400: 6694 bnes 4f396 <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);
4f402: 4282 clrl %d2 <== NOT EXECUTED
4f404: 142a 0008 moveb %a2@(8),%d2 <== NOT EXECUTED
4f408: 41f4 48ff lea %a4@(ffffffff,%d4:l),%a0 <== NOT EXECUTED
fat_fd->map.disk_cln = save_cln;
4f40c: 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);
4f410: 2008 movel %a0,%d0 <== NOT EXECUTED
4f412: e4a8 lsrl %d2,%d0 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
4f414: d083 addl %d3,%d0 <== NOT EXECUTED
4f416: 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;
4f41a: 200c movel %a4,%d0 <== NOT EXECUTED
4f41c: 600a bras 4f428 <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;
4f41e: 4280 clrl %d0 <== NOT EXECUTED
4f420: 6006 bras 4f428 <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)
4f422: 2001 movel %d1,%d0 <== NOT EXECUTED
4f424: 6002 bras 4f428 <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;
4f426: 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;
}
4f428: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4f42e: 4e5e unlk %fp <== NOT EXECUTED
0004fa92 <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)) &&
4fa92: 7001 moveq #1,%d0 <== NOT EXECUTED
int
fat_file_size(
fat_fs_info_t *fs_info,
fat_file_fd_t *fat_fd
)
{
4fa94: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4fa98: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ <== NOT EXECUTED
4fa9c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4faa0: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
int rc = RC_OK;
uint32_t cur_cln = fat_fd->cln;
4faa4: 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)) &&
4faaa: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED
4faae: 661a bnes 4faca <fat_file_size+0x38> <== NOT EXECUTED
4fab0: 4aaa 0024 tstl %a2@(36) <== NOT EXECUTED
4fab4: 6614 bnes 4faca <fat_file_size+0x38> <== NOT EXECUTED
4fab6: 7203 moveq #3,%d1 <== NOT EXECUTED
4fab8: 102b 000e moveb %a3@(14),%d0 <== NOT EXECUTED
4fabc: c081 andl %d1,%d0 <== NOT EXECUTED
4fabe: 4a00 tstb %d0 <== NOT EXECUTED
4fac0: 6708 beqs 4faca <fat_file_size+0x38> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
4fac2: 256b 0028 0018 movel %a3@(40),%a2@(24) <== NOT EXECUTED
4fac8: 6042 bras 4fb0c <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);
4faca: 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;
4facc: 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);
4face: 5983 subql #4,%d3 <== NOT EXECUTED
4fad0: 49f9 0005 57fc lea 557fc <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;
4fad6: 42aa 0018 clrl %a2@(24) <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
4fada: 601c bras 4faf8 <fat_file_size+0x66> <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4fadc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fade: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fae0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fae2: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
4fae4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4fae8: 4a80 tstl %d0 <== NOT EXECUTED
4faea: 6622 bnes 4fb0e <fat_file_size+0x7c> <== NOT EXECUTED
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
4faec: 4280 clrl %d0 <== NOT EXECUTED
4faee: 302b 0006 movew %a3@(6),%d0 <== NOT EXECUTED
4faf2: 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;
4faf6: 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)
4faf8: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4fafc: 2202 movel %d2,%d1 <== NOT EXECUTED
4fafe: c2ab 0010 andl %a3@(16),%d1 <== NOT EXECUTED
4fb02: b2ab 0014 cmpl %a3@(20),%d1 <== NOT EXECUTED
4fb06: 65d4 bcss 4fadc <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;
4fb08: 2540 003a movel %d0,%a2@(58) <== NOT EXECUTED
4fb0c: 4280 clrl %d0 <== NOT EXECUTED
return rc;
}
4fb0e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED
4fb14: 4e5e unlk %fp <== NOT EXECUTED
0004f432 <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;
4f432: 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
)
{
4f434: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4f438: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
4f43c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
4f440: 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;
4f444: 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
)
{
4f448: 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 )
4f44c: 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;
4f450: 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 )
4f454: b088 cmpl %a0,%d0 <== NOT EXECUTED
4f456: 6206 bhis 4f45e <fat_file_truncate+0x2c> <== NOT EXECUTED
return rc;
4f458: 4280 clrl %d0 <== NOT EXECUTED
4f45a: 6000 00b8 braw 4f514 <fat_file_truncate+0xe2> <== NOT EXECUTED
assert(fat_fd->fat_file_size);
4f45e: 4a80 tstl %d0 <== NOT EXECUTED
4f460: 661c bnes 4f47e <fat_file_truncate+0x4c> <== NOT EXECUTED
4f462: 4879 0006 6e52 pea 66e52 <rtems_filesystem_handlers_default+0x2c><== NOT EXECUTED
4f468: 4879 0006 6eb0 pea 66eb0 <__FUNCTION__.7507> <== NOT EXECUTED
4f46e: 4878 02d1 pea 2d1 <DBL_MANT_DIG+0x29c> <== NOT EXECUTED
4f472: 4879 0006 6e68 pea 66e68 <rtems_filesystem_handlers_default+0x42><== NOT EXECUTED
4f478: 4eb9 0005 147c jsr 5147c <__assert_func> <== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
4f47e: 4282 clrl %d2 <== NOT EXECUTED
4f480: 4281 clrl %d1 <== NOT EXECUTED
4f482: 122b 0008 moveb %a3@(8),%d1 <== NOT EXECUTED
4f486: 342b 0006 movew %a3@(6),%d2 <== NOT EXECUTED
4f48a: 41f0 28ff lea %a0@(ffffffff,%d2:l),%a0 <== NOT EXECUTED
4f48e: 2408 movel %a0,%d2 <== NOT EXECUTED
4f490: e2aa lsrl %d1,%d2 <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
4f492: 2602 movel %d2,%d3 <== NOT EXECUTED
4f494: e3ab lsll %d1,%d3 <== NOT EXECUTED
4f496: b083 cmpl %d3,%d0 <== NOT EXECUTED
4f498: 63be blss 4f458 <fat_file_truncate+0x26> <== NOT EXECUTED
return RC_OK;
if (cl_start != 0)
4f49a: 4a82 tstl %d2 <== NOT EXECUTED
4f49c: 6618 bnes 4f4b6 <fat_file_truncate+0x84> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
}
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
4f49e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
4f4a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f4a4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f4a6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f4a8: 4eba fc38 jsr %pc@(4f0e2 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f4ac: 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);
4f4b0: 2001 movel %d1,%d0 <== NOT EXECUTED
if (rc != RC_OK)
4f4b2: 6660 bnes 4f514 <fat_file_truncate+0xe2> <== NOT EXECUTED
4f4b4: 601c bras 4f4d2 <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);
4f4b6: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f4ba: 2042 moveal %d2,%a0 <== NOT EXECUTED
4f4bc: 4868 ffff pea %a0@(-1) <== NOT EXECUTED
4f4c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f4c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f4c4: 4eba fc1c jsr %pc@(4f0e2 <fat_file_lseek>) <== NOT EXECUTED
if (rc != RC_OK)
4f4c8: 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);
4f4cc: 2001 movel %d1,%d0 <== NOT EXECUTED
if (rc != RC_OK)
4f4ce: 67ce beqs 4f49e <fat_file_truncate+0x6c> <== NOT EXECUTED
4f4d0: 6042 bras 4f514 <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);
4f4d2: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
4f4d6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f4d8: 4eb9 0005 5b9c jsr 55b9c <fat_free_fat_clusters_chain> <== NOT EXECUTED
if (rc != RC_OK)
4f4de: 508f addql #8,%sp <== NOT EXECUTED
4f4e0: 4a80 tstl %d0 <== NOT EXECUTED
4f4e2: 6630 bnes 4f514 <fat_file_truncate+0xe2> <== NOT EXECUTED
return rc;
if (cl_start != 0)
4f4e4: 4a82 tstl %d2 <== NOT EXECUTED
4f4e6: 6700 ff70 beqw 4f458 <fat_file_truncate+0x26> <== NOT EXECUTED
{
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
4f4ea: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4f4ee: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4f4f2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f4f4: 4eb9 0005 5968 jsr 55968 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
4f4fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f4fe: 4a80 tstl %d0 <== NOT EXECUTED
4f500: 6612 bnes 4f514 <fat_file_truncate+0xe2> <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
4f502: 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;
4f506: 5382 subql #1,%d2 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
4f508: 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;
4f50c: 2542 0032 movel %d2,%a2@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
4f510: 2541 003a movel %d1,%a2@(58) <== NOT EXECUTED
}
return RC_OK;
}
4f514: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4f51a: 4e5e unlk %fp <== NOT EXECUTED
0004f858 <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
4f858: 4e56 ffc4 linkw %fp,#-60
4f85c: 202e 0014 movel %fp@(20),%d0
4f860: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4f864: 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;
4f868: 2a2a 0032 movel %a2@(50),%d5
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
4f86c: 266e 0008 moveal %fp@(8),%a3
4f870: 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;
4f874: 222a 0018 movel %a2@(24),%d1
{
int rc = RC_OK;
ssize_t ret;
uint32_t cmpltd = 0;
uint32_t byte;
uint32_t c = 0;
4f878: 42ae fff8 clrl %fp@(-8)
bool zero_fill = start > fat_fd->fat_file_size;
uint32_t file_cln_initial = fat_fd->map.file_cln;
4f87c: 2d45 fff0 movel %d5,%fp@(-16)
uint32_t cln;
if ( count == 0 )
4f880: 4a80 tstl %d0
4f882: 6700 0192 beqw 4fa16 <fat_file_write+0x1be>
return cmpltd;
if (start >= fat_fd->size_limit)
4f886: 242a 0014 movel %a2@(20),%d2
4f88a: b484 cmpl %d4,%d2
4f88c: 6210 bhis 4f89e <fat_file_write+0x46> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EFBIG);
4f88e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4f894: 741b moveq #27,%d2 <== NOT EXECUTED
4f896: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f898: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f89a: 6000 0190 braw 4fa2c <fat_file_write+0x1d4> <== NOT EXECUTED
if (count > fat_fd->size_limit - start)
4f89e: 9484 subl %d4,%d2
4f8a0: b082 cmpl %d2,%d0
4f8a2: 6402 bccs 4f8a6 <fat_file_write+0x4e> <== NEVER TAKEN
4f8a4: 2400 movel %d0,%d2
count = fat_fd->size_limit - start;
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
4f8a6: 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;
4f8aa: b284 cmpl %d4,%d1
4f8ac: 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);
4f8ae: 2602 movel %d2,%d3
4f8b0: 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;
4f8b2: 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);
4f8b4: 4480 negl %d0
4f8b6: 2f03 movel %d3,%sp@-
4f8b8: 2f00 movel %d0,%sp@-
4f8ba: 2f0a movel %a2,%sp@-
4f8bc: 2f0b movel %a3,%sp@-
4f8be: 4eb9 0004 f678 jsr 4f678 <fat_file_extend>
if (RC_OK == rc)
4f8c4: 4fef 0014 lea %sp@(20),%sp
4f8c8: 4a80 tstl %d0
4f8ca: 6600 0162 bnew 4fa2e <fat_file_write+0x1d6>
{
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
4f8ce: 202e fff8 movel %fp@(-8),%d0
4f8d2: b680 cmpl %d0,%d3
4f8d4: 6704 beqs 4f8da <fat_file_write+0x82> <== ALWAYS TAKEN
count = c - start;
4f8d6: 2400 movel %d0,%d2 <== NOT EXECUTED
4f8d8: 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));
4f8da: 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))
4f8dc: 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));
4f8e0: b2aa 0020 cmpl %a2@(32),%d1
4f8e4: 6614 bnes 4f8fa <fat_file_write+0xa2>
4f8e6: 4aaa 0024 tstl %a2@(36)
4f8ea: 660e bnes 4f8fa <fat_file_write+0xa2> <== NEVER TAKEN
4f8ec: 7a03 moveq #3,%d5
4f8ee: c085 andl %d5,%d0
4f8f0: 4a00 tstb %d0
4f8f2: 56c0 sne %d0
4f8f4: 49c0 extbl %d0
4f8f6: 4480 negl %d0
4f8f8: 6002 bras 4f8fc <fat_file_write+0xa4>
4f8fa: 4280 clrl %d0
4f8fc: 4285 clrl %d5
4f8fe: 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))
4f902: 0800 0000 btst #0,%d0
4f906: 6732 beqs 4f93a <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,
4f908: 42a7 clrl %sp@-
4f90a: 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);
4f90e: 4280 clrl %d0
ret = fat_cluster_write(fs_info,
4f910: 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);
4f912: 302b 0006 movew %a3@(6),%d0
4f916: 5380 subql #1,%d0
ret = fat_cluster_write(fs_info,
4f918: 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);
4f91a: eaac lsrl %d5,%d4
byte = start & (fs_info->vol.bpc -1);
ret = fat_cluster_write(fs_info,
4f91c: 2f00 movel %d0,%sp@-
4f91e: d8aa 001c addl %a2@(28),%d4
4f922: 2f04 movel %d4,%sp@-
4f924: 2f0b movel %a3,%sp@-
4f926: 4eb9 0005 0010 jsr 50010 <fat_cluster_write>
cln,
byte,
count,
buf,
false);
if (0 > ret)
4f92c: 4fef 0018 lea %sp@(24),%sp
4f930: 4a80 tstl %d0
4f932: 6d00 00f8 bltw 4fa2c <fat_file_write+0x1d4>
4f936: 6000 00f6 braw 4fa2e <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;
4f93a: 2e0e movel %fp,%d7
4f93c: 5987 subql #4,%d7
4f93e: 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;
4f940: 2604 movel %d4,%d3
4f942: 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;
4f944: 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);
4f946: 2f07 movel %d7,%sp@-
4f948: 2f03 movel %d3,%sp@-
4f94a: 2f0a movel %a2,%sp@-
4f94c: 2f0b movel %a3,%sp@-
4f94e: 4eba f792 jsr %pc@(4f0e2 <fat_file_lseek>)
if (RC_OK == rc)
4f952: 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);
4f956: 2a41 moveal %d1,%a5
if (RC_OK == rc)
4f958: 4a81 tstl %d1
4f95a: 6600 00b2 bnew 4fa0e <fat_file_write+0x1b6>
{
file_cln_cnt = cur_cln - fat_fd->cln;
4f95e: 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);
4f962: 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;
4f964: 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);
4f968: 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 */
4f96a: 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;
4f96c: 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);
4f96e: 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;
4f970: 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;
4f972: 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);
4f976: 99c0 subal %d0,%a4
4f978: 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;
4f97a: 1d45 fff7 moveb %d5,%fp@(-9)
4f97e: 6062 bras 4f9e2 <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));
4f980: 4281 clrl %d1
4f982: 322b 0006 movew %a3@(6),%d1
4f986: 9280 subl %d0,%d1
4f988: b481 cmpl %d1,%d2
4f98a: 6402 bccs 4f98e <fat_file_write+0x136>
4f98c: 2202 movel %d2,%d1
if (file_cln_initial < file_cln_cnt)
4f98e: 2e2e ffec movel %fp@(-20),%d7
4f992: beae fff0 cmpl %fp@(-16),%d7
4f996: 6306 blss 4f99e <fat_file_write+0x146>
overwrite_cluster = true;
4f998: 7a01 moveq #1,%d5
4f99a: 1d45 fff7 moveb %d5,%fp@(-9)
ret = fat_cluster_write(fs_info,
4f99e: 7a01 moveq #1,%d5
4f9a0: 1e2e fff7 moveb %fp@(-9),%d7
4f9a4: 206e 0018 moveal %fp@(24),%a0
4f9a8: ce85 andl %d5,%d7
4f9aa: 2f07 movel %d7,%sp@-
4f9ac: 4870 6800 pea %a0@(00000000,%d6:l)
4f9b0: 2f01 movel %d1,%sp@-
4f9b2: 2f00 movel %d0,%sp@-
4f9b4: 2f2e fffc movel %fp@(-4),%sp@-
4f9b8: 2f0b movel %a3,%sp@-
4f9ba: 4eb9 0005 0010 jsr 50010 <fat_cluster_write>
cur_cln,
ofs_cln,
c,
&buf[cmpltd],
overwrite_cluster);
if (0 > ret)
4f9c0: 4fef 0018 lea %sp@(24),%sp
4f9c4: 4a80 tstl %d0
4f9c6: 6c52 bges 4fa1a <fat_file_write+0x1c2> <== ALWAYS TAKEN
4f9c8: 601e bras 4f9e8 <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);
4f9ca: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f9ce: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f9d0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f9d2: 4eb9 0005 57fc jsr 557fc <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)
4f9d8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4f9dc: 4a80 tstl %d0 <== NOT EXECUTED
4f9de: 660e bnes 4f9ee <fat_file_write+0x196> <== NOT EXECUTED
4f9e0: 4280 clrl %d0
&& (bytes_to_write > 0))
4f9e2: 4a82 tstl %d2
4f9e4: 669a bnes 4f980 <fat_file_write+0x128>
4f9e6: 6008 bras 4f9f0 <fat_file_write+0x198>
cur_cln,
ofs_cln,
c,
&buf[cmpltd],
overwrite_cluster);
if (0 > ret)
4f9e8: 3a7c ffff moveaw #-1,%a5 <== NOT EXECUTED
4f9ec: 6002 bras 4f9f0 <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)
4f9ee: 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);
4f9f0: 4282 clrl %d2
4f9f2: 142b 0008 moveb %a3@(8),%d2
4f9f6: 49f4 68ff lea %a4@(ffffffff,%d6:l),%a4
fat_fd->map.disk_cln = save_cln;
4f9fa: 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);
4f9fe: 200c movel %a4,%d0
4fa00: e4a8 lsrl %d2,%d0
}
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = start_cln +
4fa02: d083 addl %d3,%d0
4fa04: 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)
4fa08: 4a8d tstl %a5
4fa0a: 6602 bnes 4fa0e <fat_file_write+0x1b6> <== NEVER TAKEN
return rc;
else
return cmpltd;
4fa0c: 2a46 moveal %d6,%a5
fat_fd,
start,
count,
buf,
file_cln_initial);
if (0 > ret)
4fa0e: 4a8d tstl %a5
4fa10: 6d1a blts 4fa2c <fat_file_write+0x1d4> <== NEVER TAKEN
rc = -1;
else
cmpltd = ret;
4fa12: 200d movel %a5,%d0
4fa14: 6018 bras 4fa2e <fat_file_write+0x1d6>
uint32_t file_cln_initial = fat_fd->map.file_cln;
uint32_t cln;
if ( count == 0 )
return cmpltd;
4fa16: 4280 clrl %d0 <== NOT EXECUTED
4fa18: 6014 bras 4fa2e <fat_file_write+0x1d6> <== NOT EXECUTED
if (RC_OK == rc)
{
++file_cln_cnt;
bytes_to_write -= ret;
cmpltd += ret;
save_cln = cur_cln;
4fa1a: 282e fffc movel %fp@(-4),%d4
if (0 > ret)
rc = -1;
if (RC_OK == rc)
{
++file_cln_cnt;
4fa1e: 52ae ffec addql #1,%fp@(-20)
bytes_to_write -= ret;
4fa22: 9480 subl %d0,%d2
cmpltd += ret;
4fa24: dc80 addl %d0,%d6
save_cln = cur_cln;
if (0 < bytes_to_write)
4fa26: 4a82 tstl %d2
4fa28: 67b6 beqs 4f9e0 <fat_file_write+0x188> <== ALWAYS TAKEN
4fa2a: 609e bras 4f9ca <fat_file_write+0x172> <== NOT EXECUTED
start,
count,
buf,
file_cln_initial);
if (0 > ret)
rc = -1;
4fa2c: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
if (RC_OK != rc)
return rc;
else
return cmpltd;
}
4fa2e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
4fa34: 4e5e unlk %fp <== NOT EXECUTED
00055b9c <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
55b9c: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED
55ba0: 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;
55ba4: 264e moveal %fp,%a3 <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
55ba6: 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;
55ba8: 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);
55baa: 49f9 0005 57fc lea 557fc <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);
55bb0: 4bf9 0005 5968 lea 55968 <fat_set_fat_cluster>,%a5 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
55bb6: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
uint32_t cur_cln = chain;
55bba: 2606 movel %d6,%d3 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t chain
)
{
55bbc: 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;
55bc0: 42a3 clrl %a3@- <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
55bc2: 6044 bras 55c08 <fat_free_fat_clusters_chain+0x6c><== NOT EXECUTED
{
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
55bc4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55bc6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55bc8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55bca: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
55bcc: 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);
55bd0: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
55bd2: 671c beqs 55bf0 <fat_free_fat_clusters_chain+0x54><== NOT EXECUTED
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
55bd4: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED
55bd8: 72ff moveq #-1,%d1 <== NOT EXECUTED
55bda: b280 cmpl %d0,%d1 <== NOT EXECUTED
55bdc: 6706 beqs 55be4 <fat_free_fat_clusters_chain+0x48><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
55bde: d480 addl %d0,%d2 <== NOT EXECUTED
55be0: 2542 003e movel %d2,%a2@(62) <== NOT EXECUTED
fat_buf_release(fs_info);
55be4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55be6: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release> <== NOT EXECUTED
55bec: 588f addql #4,%sp <== NOT EXECUTED
55bee: 6044 bras 55c34 <fat_free_fat_clusters_chain+0x98><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
55bf0: 42a7 clrl %sp@- <== NOT EXECUTED
55bf2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55bf4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55bf6: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
55bf8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55bfc: 4a80 tstl %d0 <== NOT EXECUTED
55bfe: 6702 beqs 55c02 <fat_free_fat_clusters_chain+0x66><== NOT EXECUTED
55c00: 2a00 movel %d0,%d5 <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
cur_cln = next_cln;
55c02: 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++;
55c06: 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)
55c08: 2003 movel %d3,%d0 <== NOT EXECUTED
55c0a: c0aa 0010 andl %a2@(16),%d0 <== NOT EXECUTED
55c0e: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED
55c12: 65b0 bcss 55bc4 <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)
55c14: 202a 003e movel %a2@(62),%d0 <== NOT EXECUTED
55c18: 72ff moveq #-1,%d1 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
55c1a: 2546 0046 movel %d6,%a2@(70) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
55c1e: b280 cmpl %d0,%d1 <== NOT EXECUTED
55c20: 6706 beqs 55c28 <fat_free_fat_clusters_chain+0x8c><== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
55c22: d480 addl %d0,%d2 <== NOT EXECUTED
55c24: 2542 003e movel %d2,%a2@(62) <== NOT EXECUTED
fat_buf_release(fs_info);
55c28: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55c2a: 2805 movel %d5,%d4 <== NOT EXECUTED
55c2c: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release> <== NOT EXECUTED
55c32: 588f addql #4,%sp <== NOT EXECUTED
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
55c34: 2004 movel %d4,%d0 <== NOT EXECUTED
55c36: 4cee 3c7c ffd8 moveml %fp@(-40),%d2-%d6/%a2-%a5 <== NOT EXECUTED
55c3c: 4e5e unlk %fp <== NOT EXECUTED
00050b4a <fat_free_unique_ino>:
void
fat_free_unique_ino(
fat_fs_info_t *fs_info,
uint32_t ino
)
{
50b4a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
50b4e: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
50b52: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
50b56: 90a9 0076 subl %a1@(118),%d0 <== NOT EXECUTED
50b5a: 2200 movel %d0,%d1 <== NOT EXECUTED
50b5c: e689 lsrl #3,%d1 <== NOT EXECUTED
50b5e: 2069 006a moveal %a1@(106),%a0 <== NOT EXECUTED
50b62: d1c1 addal %d1,%a0 <== NOT EXECUTED
50b64: 7207 moveq #7,%d1 <== NOT EXECUTED
50b66: c280 andl %d0,%d1 <== NOT EXECUTED
50b68: 7001 moveq #1,%d0 <== NOT EXECUTED
50b6a: e3a8 lsll %d1,%d0 <== NOT EXECUTED
50b6c: 1210 moveb %a0@,%d1 <== NOT EXECUTED
50b6e: 4680 notl %d0 <== NOT EXECUTED
50b70: c081 andl %d1,%d0 <== NOT EXECUTED
50b72: 1080 moveb %d0,%a0@ <== NOT EXECUTED
}
50b74: 4e5e unlk %fp <== NOT EXECUTED
000557fc <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)) )
557fc: 7001 moveq #1,%d0
fat_get_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t *ret_val
)
{
557fe: 4e56 ffd8 linkw %fp,#-40
55802: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
55806: 266e 0008 moveal %fp@(8),%a3
5580a: 242e 000c movel %fp@(12),%d2
5580e: 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)) )
55812: b082 cmpl %d2,%d0
55814: 6400 0134 bccw 5594a <fat_get_fat_cluster+0x14e>
55818: 202b 0034 movel %a3@(52),%d0
5581c: 5280 addql #1,%d0
5581e: b082 cmpl %d2,%d0
55820: 6404 bccs 55826 <fat_get_fat_cluster+0x2a> <== ALWAYS TAKEN
55822: 6000 0126 braw 5594a <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) +
55826: 7201 moveq #1,%d1
55828: 102b 000e moveb %a3@(14),%d0
5582c: c280 andl %d0,%d1
5582e: 4a01 tstb %d1
55830: 6708 beqs 5583a <fat_get_fat_cluster+0x3e> <== NEVER TAKEN
55832: 2802 movel %d2,%d4
55834: e28c lsrl #1,%d4
55836: d882 addl %d2,%d4
55838: 6010 bras 5584a <fat_get_fat_cluster+0x4e>
5583a: 7602 moveq #2,%d3 <== NOT EXECUTED
5583c: 2802 movel %d2,%d4 <== NOT EXECUTED
5583e: c680 andl %d0,%d3 <== NOT EXECUTED
55840: 4a03 tstb %d3 <== NOT EXECUTED
55842: 6704 beqs 55848 <fat_get_fat_cluster+0x4c> <== NOT EXECUTED
55844: d884 addl %d4,%d4 <== NOT EXECUTED
55846: 6002 bras 5584a <fat_get_fat_cluster+0x4e> <== NOT EXECUTED
55848: e58c lsll #2,%d4 <== NOT EXECUTED
5584a: 4283 clrl %d3
5584c: 162b 0002 moveb %a3@(2),%d3
55850: e6ac lsrl %d3,%d4
55852: 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);
55856: 4a01 tstb %d1
55858: 6708 beqs 55862 <fat_get_fat_cluster+0x66> <== NEVER TAKEN
5585a: 2a02 movel %d2,%d5
5585c: e28d lsrl #1,%d5
5585e: da82 addl %d2,%d5
55860: 6010 bras 55872 <fat_get_fat_cluster+0x76>
55862: 7202 moveq #2,%d1 <== NOT EXECUTED
55864: 2a02 movel %d2,%d5 <== NOT EXECUTED
55866: c081 andl %d1,%d0 <== NOT EXECUTED
55868: 4a00 tstb %d0 <== NOT EXECUTED
5586a: 6704 beqs 55870 <fat_get_fat_cluster+0x74> <== NOT EXECUTED
5586c: da85 addl %d5,%d5 <== NOT EXECUTED
5586e: 6002 bras 55872 <fat_get_fat_cluster+0x76> <== NOT EXECUTED
55870: e58d lsll #2,%d5 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
55872: 2c0e movel %fp,%d6
55874: 5986 subql #4,%d6
55876: 49f9 0004 fd48 lea 4fd48 <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);
5587c: 3e13 movew %a3@,%d7
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
5587e: 2f06 movel %d6,%sp@-
55880: 4878 0001 pea 1 <ADD>
55884: 2f04 movel %d4,%sp@-
55886: 2f0b movel %a3,%sp@-
55888: 4e94 jsr %a4@
if (rc != RC_OK)
5588a: 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);
5588e: 2600 movel %d0,%d3
if (rc != RC_OK)
55890: 6600 00ca bnew 5595c <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);
55894: 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 )
55896: 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);
55898: 3207 movew %d7,%d1
5589a: 5381 subql #1,%d1
5589c: 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 )
5589e: 4285 clrl %d5
558a0: 1a2b 000e moveb %a3@(14),%d5
558a4: b085 cmpl %d5,%d0
558a6: 6772 beqs 5591a <fat_get_fat_cluster+0x11e> <== NEVER TAKEN
558a8: 103c 0004 moveb #4,%d0
558ac: b085 cmpl %d5,%d0
558ae: 6700 0088 beqw 55938 <fat_get_fat_cluster+0x13c>
558b2: 103c 0001 moveb #1,%d0
558b6: b085 cmpl %d5,%d0
558b8: 6600 0090 bnew 5594a <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));
558bc: 206e fffc moveal %fp@(-4),%a0
558c0: 4285 clrl %d5
558c2: 1a30 1800 moveb %a0@(00000000,%d1:l),%d5
if ( ofs == (fs_info->vol.bps - 1) )
558c6: 4280 clrl %d0
558c8: 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));
558ca: 2485 movel %d5,%a2@
if ( ofs == (fs_info->vol.bps - 1) )
558cc: 5380 subql #1,%d0
558ce: b081 cmpl %d1,%d0
558d0: 6626 bnes 558f8 <fat_get_fat_cluster+0xfc> <== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
558d2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
558d4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
558d8: 2044 moveal %d4,%a0 <== NOT EXECUTED
558da: 4868 0001 pea %a0@(1) <== NOT EXECUTED
558de: 2f0b movel %a3,%sp@- <== NOT EXECUTED
558e0: 4e94 jsr %a4@ <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
558e2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
558e6: 4a80 tstl %d0 <== NOT EXECUTED
558e8: 6670 bnes 5595a <fat_get_fat_cluster+0x15e> <== NOT EXECUTED
return rc;
*ret_val |= *sec_buf << 8;
558ea: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
558ee: 4280 clrl %d0 <== NOT EXECUTED
558f0: 1010 moveb %a0@,%d0 <== NOT EXECUTED
558f2: e188 lsll #8,%d0 <== NOT EXECUTED
558f4: 8192 orl %d0,%a2@ <== NOT EXECUTED
558f6: 600c bras 55904 <fat_get_fat_cluster+0x108> <== NOT EXECUTED
}
else
{
*ret_val |= *(sec_buf + ofs + 1) << 8;
558f8: 4280 clrl %d0
558fa: 1030 1801 moveb %a0@(00000001,%d1:l),%d0
558fe: e188 lsll #8,%d0
55900: 8085 orl %d5,%d0
55902: 2480 movel %d0,%a2@
}
if ( FAT_CLUSTER_IS_ODD(cln) )
55904: 0802 0000 btst #0,%d2
55908: 6706 beqs 55910 <fat_get_fat_cluster+0x114>
*ret_val = (*ret_val) >> FAT12_SHIFT;
5590a: 2012 movel %a2@,%d0
5590c: e888 lsrl #4,%d0
5590e: 6036 bras 55946 <fat_get_fat_cluster+0x14a>
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
55910: 203c 0000 0fff movel #4095,%d0
55916: c192 andl %d0,%a2@
55918: 6042 bras 5595c <fat_get_fat_cluster+0x160>
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
5591a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
5591e: 3230 1800 movew %a0@(00000000,%d1:l),%d1 <== NOT EXECUTED
55922: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
55928: 2001 movel %d1,%d0 <== NOT EXECUTED
5592a: e089 lsrl #8,%d1 <== NOT EXECUTED
5592c: e188 lsll #8,%d0 <== NOT EXECUTED
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(sec_buf + ofs));
*ret_val = CF_LE_W(*ret_val);
5592e: 0280 0000 ff00 andil #65280,%d0 <== NOT EXECUTED
55934: 8081 orl %d1,%d0 <== NOT EXECUTED
55936: 600e bras 55946 <fat_get_fat_cluster+0x14a> <== NOT EXECUTED
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(sec_buf + ofs));
55938: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
*ret_val = CF_LE_L(*ret_val);
5593c: 2f30 1800 movel %a0@(00000000,%d1:l),%sp@- <== NOT EXECUTED
55940: 4eba fe82 jsr %pc@(557c4 <m68k_swap_u32>) <== NOT EXECUTED
55944: 588f addql #4,%sp <== NOT EXECUTED
55946: 2480 movel %d0,%a2@
break;
55948: 6012 bras 5595c <fat_get_fat_cluster+0x160>
default:
rtems_set_errno_and_return_minus_one(EIO);
5594a: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
55950: 76ff moveq #-1,%d3 <== NOT EXECUTED
55952: 2040 moveal %d0,%a0 <== NOT EXECUTED
55954: 7005 moveq #5,%d0 <== NOT EXECUTED
55956: 2080 movel %d0,%a0@ <== NOT EXECUTED
55958: 6002 bras 5595c <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)
5595a: 2600 movel %d0,%d3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
break;
}
return RC_OK;
}
5595c: 2003 movel %d3,%d0
5595e: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
55964: 4e5e unlk %fp <== NOT EXECUTED
00050ab2 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
50ab2: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
50ab6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
50aba: 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);
50abe: 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)
50ac4: 6072 bras 50b38 <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))
50ac6: 222a 006e movel %a2@(110),%d1 <== NOT EXECUTED
50aca: 2401 movel %d1,%d2 <== NOT EXECUTED
50acc: e68a lsrl #3,%d2 <== NOT EXECUTED
50ace: 7607 moveq #7,%d3 <== NOT EXECUTED
50ad0: 226a 006a moveal %a2@(106),%a1 <== NOT EXECUTED
50ad4: d3c2 addal %d2,%a1 <== NOT EXECUTED
50ad6: 1411 moveb %a1@,%d2 <== NOT EXECUTED
50ad8: c681 andl %d1,%d3 <== NOT EXECUTED
50ada: 1802 moveb %d2,%d4 <== NOT EXECUTED
50adc: 49c4 extbl %d4 <== NOT EXECUTED
50ade: 0704 btst %d3,%d4 <== NOT EXECUTED
50ae0: 6612 bnes 50af4 <fat_get_unique_ino+0x42> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
50ae2: 7001 moveq #1,%d0 <== NOT EXECUTED
50ae4: e7a8 lsll %d3,%d0 <== NOT EXECUTED
50ae6: 8082 orl %d2,%d0 <== NOT EXECUTED
50ae8: 1280 moveb %d0,%a1@ <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
50aea: 202a 006e movel %a2@(110),%d0 <== NOT EXECUTED
50aee: d0aa 0076 addl %a2@(118),%d0 <== NOT EXECUTED
50af2: 604c bras 50b40 <fat_get_unique_ino+0x8e> <== NOT EXECUTED
}
fs_info->index++;
50af4: 5281 addql #1,%d1 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
50af6: b1c1 cmpal %d1,%a0 <== NOT EXECUTED
50af8: 6306 blss 50b00 <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++;
50afa: 2541 006e movel %d1,%a2@(110) <== NOT EXECUTED
50afe: 6004 bras 50b04 <fat_get_unique_ino+0x52> <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
50b00: 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++)
50b04: 5280 addql #1,%d0 <== NOT EXECUTED
50b06: b1c0 cmpal %d0,%a0 <== NOT EXECUTED
50b08: 66bc bnes 50ac6 <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))
50b0a: 223c 0fff ffff movel #268435455,%d1 <== NOT EXECUTED
50b10: 92aa 0076 subl %a2@(118),%d1 <== NOT EXECUTED
50b14: d080 addl %d0,%d0 <== NOT EXECUTED
50b16: b280 cmpl %d0,%d1 <== NOT EXECUTED
50b18: 6204 bhis 50b1e <fat_get_unique_ino+0x6c> <== NOT EXECUTED
resrc_unsuff = true;
}
else
resrc_unsuff = true;
}
return 0;
50b1a: 4280 clrl %d0 <== NOT EXECUTED
50b1c: 6022 bras 50b40 <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;
50b1e: 2540 0072 movel %d0,%a2@(114) <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
50b22: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50b24: 2f2a 006a movel %a2@(106),%sp@- <== NOT EXECUTED
50b28: 4e93 jsr %a3@ <== NOT EXECUTED
if (fs_info->uino != NULL)
50b2a: 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);
50b2c: 2540 006a movel %d0,%a2@(106) <== NOT EXECUTED
if (fs_info->uino != NULL)
50b30: 67e8 beqs 50b1a <fat_get_unique_ino+0x68> <== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
50b32: 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++)
50b38: 206a 0072 moveal %a2@(114),%a0 <== NOT EXECUTED
50b3c: 4280 clrl %d0 <== NOT EXECUTED
50b3e: 60c6 bras 50b06 <fat_get_unique_ino+0x54> <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
50b40: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED
50b46: 4e5e unlk %fp <== NOT EXECUTED
00050a40 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
50a40: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
50a44: 48d7 3c00 moveml %a2-%a5,%sp@ <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
50a48: 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);
50a4a: 49f9 0004 ff10 lea 4ff10 <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);
50a50: 4bf9 0005 57fc lea 557fc <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;
50a56: 272e 000c movel %fp@(12),%a3@- <== NOT EXECUTED
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
50a5a: 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)
50a5e: 6032 bras 50a92 <fat_init_clusters_chain+0x52> <== NOT EXECUTED
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
50a60: 4281 clrl %d1 <== NOT EXECUTED
50a62: 42a7 clrl %sp@- <== NOT EXECUTED
50a64: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED
50a68: 2f01 movel %d1,%sp@- <== NOT EXECUTED
50a6a: 42a7 clrl %sp@- <== NOT EXECUTED
50a6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50a6e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50a70: 4e94 jsr %a4@ <== NOT EXECUTED
if ( ret != fs_info->vol.bpc )
50a72: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50a76: 4281 clrl %d1 <== NOT EXECUTED
50a78: 322a 0006 movew %a2@(6),%d1 <== NOT EXECUTED
50a7c: b280 cmpl %d0,%d1 <== NOT EXECUTED
50a7e: 6626 bnes 50aa6 <fat_init_clusters_chain+0x66> <== NOT EXECUTED
{
return -1;
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
50a80: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50a82: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
50a86: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50a88: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
50a8a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
50a8e: 4a80 tstl %d0 <== NOT EXECUTED
50a90: 6616 bnes 50aa8 <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)
50a92: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
50a96: 2200 movel %d0,%d1 <== NOT EXECUTED
50a98: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED
50a9c: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED
50aa0: 65be bcss 50a60 <fat_init_clusters_chain+0x20> <== NOT EXECUTED
return rc;
}
}
return rc;
50aa2: 4280 clrl %d0 <== NOT EXECUTED
50aa4: 6002 bras 50aa8 <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;
50aa6: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
return rc;
}
50aa8: 4cee 3c00 ffec moveml %fp@(-20),%a2-%a5 <== NOT EXECUTED
50aae: 4e5e unlk %fp <== NOT EXECUTED
00050114 <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)
{
50114: 4e56 ff64 linkw %fp,#-156
50118: 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);
5011c: 4878 0002 pea 2 <DOUBLE_FLOAT>
50120: 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)
{
50124: 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;
50128: 42ae ffaa clrl %fp@(-86)
vol->fd = open(device, O_RDWR);
5012c: 4eb9 0004 4c34 jsr 44c34 <open>
if (vol->fd < 0)
50132: 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);
50134: 2740 0056 movel %d0,%a3@(86)
if (vol->fd < 0)
50138: 6c10 bges 5014a <fat_init_volume_info+0x36> <== ALWAYS TAKEN
{
rtems_set_errno_and_return_minus_one(ENXIO);
5013a: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
50140: 7606 moveq #6,%d3 <== NOT EXECUTED
50142: 2040 moveal %d0,%a0 <== NOT EXECUTED
50144: 2083 movel %d3,%a0@ <== NOT EXECUTED
50146: 6000 06fc braw 50844 <fat_init_volume_info+0x730> <== NOT EXECUTED
}
rc = fstat(vol->fd, &stat_buf);
5014a: 486e ffba pea %fp@(-70)
5014e: 2f00 movel %d0,%sp@-
50150: 4eb9 0004 3fd4 jsr 43fd4 <fstat>
if (rc != 0)
50156: 508f addql #8,%sp
50158: 4a80 tstl %d0
5015a: 6702 beqs 5015e <fat_init_volume_info+0x4a> <== ALWAYS TAKEN
5015c: 6030 bras 5018e <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))
5015e: 202e ffc6 movel %fp@(-58),%d0
50162: 0280 0000 f000 andil #61440,%d0
50168: 0c80 0000 6000 cmpil #24576,%d0
5016e: 6702 beqs 50172 <fat_init_volume_info+0x5e> <== ALWAYS TAKEN
50170: 601c bras 5018e <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);
50172: 486b 005a pea %a3@(90)
50176: 2f3c 4004 4209 movel #1074020873,%sp@-
5017c: 2f2b 0056 movel %a3@(86),%sp@-
50180: 4eb9 0005 1750 jsr 51750 <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) {
50186: 4fef 000c lea %sp@(12),%sp
5018a: 4a80 tstl %d0
5018c: 671a beqs 501a8 <fat_init_volume_info+0x94> <== ALWAYS TAKEN
close(vol->fd);
5018e: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
50192: 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);
50194: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
5019a: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
501a0: 2040 moveal %d0,%a0 <== NOT EXECUTED
501a2: 2082 movel %d2,%a0@ <== NOT EXECUTED
501a4: 6000 05ac braw 50752 <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);
501a8: 486e ffaa pea %fp@(-86)
501ac: 42a7 clrl %sp@-
501ae: 2f2b 005a movel %a3@(90),%sp@-
501b2: 4eb9 0004 e088 jsr 4e088 <rtems_bdbuf_read>
if (sc != RTEMS_SUCCESSFUL)
501b8: 4fef 000c lea %sp@(12),%sp
501bc: 4a80 tstl %d0
501be: 6704 beqs 501c4 <fat_init_volume_info+0xb0> <== ALWAYS TAKEN
501c0: 6000 00d6 braw 50298 <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);
501c4: 206e ffaa moveal %fp@(-86),%a0
501c8: 2268 001a moveal %a0@(26),%a1
501cc: 1229 000e moveb %a1@(14),%d1
501d0: 1e29 0013 moveb %a1@(19),%d7
501d4: 1829 000f moveb %a1@(15),%d4
501d8: 3441 moveaw %d1,%a2
501da: 1229 0014 moveb %a1@(20),%d1
501de: 1d47 ff95 moveb %d7,%fp@(-107)
501e2: 1e29 0016 moveb %a1@(22),%d7
501e6: 1d41 ff94 moveb %d1,%fp@(-108)
501ea: 1229 0017 moveb %a1@(23),%d1
501ee: 1d47 ff93 moveb %d7,%fp@(-109)
501f2: 1e29 0020 moveb %a1@(32),%d7
501f6: 1d41 ff92 moveb %d1,%fp@(-110)
501fa: 1229 0021 moveb %a1@(33),%d1
501fe: 1d47 ff91 moveb %d7,%fp@(-111)
50202: 1e29 0022 moveb %a1@(34),%d7
50206: 1d41 ff9c moveb %d1,%fp@(-100)
5020a: 1229 0023 moveb %a1@(35),%d1
5020e: 1d47 ff9b moveb %d7,%fp@(-101)
50212: 1e29 0024 moveb %a1@(36),%d7
50216: 1d41 ff99 moveb %d1,%fp@(-103)
5021a: 1229 0025 moveb %a1@(37),%d1
5021e: 1a29 0011 moveb %a1@(17),%d5
50222: 1d47 ff9a moveb %d7,%fp@(-102)
50226: 1e29 0026 moveb %a1@(38),%d7
5022a: 1d41 ffa2 moveb %d1,%fp@(-94)
5022e: 1229 0027 moveb %a1@(39),%d1
50232: 1d44 ff90 moveb %d4,%fp@(-112)
50236: 3845 moveaw %d5,%a4
50238: 1029 000c moveb %a1@(12),%d0
5023c: 1c29 000b moveb %a1@(11),%d6
50240: 1429 000d moveb %a1@(13),%d2
50244: 1829 0010 moveb %a1@(16),%d4
50248: 1a29 0012 moveb %a1@(18),%d5
5024c: 1d47 ff9d moveb %d7,%fp@(-99)
50250: 1d41 ff8f moveb %d1,%fp@(-113)
50254: 1e29 002c moveb %a1@(44),%d7
50258: 1229 002d moveb %a1@(45),%d1
5025c: 1d47 ffa5 moveb %d7,%fp@(-91)
50260: 1d41 ffa4 moveb %d1,%fp@(-92)
50264: 1e29 002e moveb %a1@(46),%d7
50268: 1229 002f moveb %a1@(47),%d1
5026c: 1d47 ffa3 moveb %d7,%fp@(-93)
50270: 1d41 ffa1 moveb %d1,%fp@(-95)
50274: 1e29 0030 moveb %a1@(48),%d7
50278: 1229 0031 moveb %a1@(49),%d1
5027c: 1629 0028 moveb %a1@(40),%d3
sc = rtems_bdbuf_release( block);
50280: 2f08 movel %a0,%sp@-
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
50282: 3a40 moveaw %d0,%a5
50284: 1d47 ffa7 moveb %d7,%fp@(-89)
50288: 1d41 ffa6 moveb %d1,%fp@(-90)
sc = rtems_bdbuf_release( block);
5028c: 4eb9 0004 e214 jsr 4e214 <rtems_bdbuf_release>
if (sc != RTEMS_SUCCESSFUL)
50292: 588f addql #4,%sp
50294: 4a80 tstl %d0
50296: 671a beqs 502b2 <fat_init_volume_info+0x19e> <== ALWAYS TAKEN
{
close(vol->fd);
50298: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
5029c: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
502a2: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
502a8: 7205 moveq #5,%d1 <== NOT EXECUTED
502aa: 2040 moveal %d0,%a0 <== NOT EXECUTED
502ac: 2081 movel %d1,%a0@ <== NOT EXECUTED
502ae: 6000 04a2 braw 50752 <fat_init_volume_info+0x63e> <== NOT EXECUTED
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
502b2: 4280 clrl %d0
502b4: 320d movew %a5,%d1
502b6: 1001 moveb %d1,%d0
502b8: 4281 clrl %d1
502ba: 1206 moveb %d6,%d1
502bc: e188 lsll #8,%d0
502be: 8081 orl %d1,%d0
502c0: 3240 moveaw %d0,%a1
502c2: 3680 movew %d0,%a3@
if ( (vol->bps != 512) &&
502c4: 4280 clrl %d0
502c6: 3009 movew %a1,%d0
502c8: 0c80 0000 0200 cmpil #512,%d0
502ce: 671c beqs 502ec <fat_init_volume_info+0x1d8> <== ALWAYS TAKEN
502d0: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED
502d6: 6714 beqs 502ec <fat_init_volume_info+0x1d8> <== NOT EXECUTED
(vol->bps != 1024) &&
502d8: 0c80 0000 0800 cmpil #2048,%d0 <== NOT EXECUTED
502de: 670c beqs 502ec <fat_init_volume_info+0x1d8> <== NOT EXECUTED
(vol->bps != 2048) &&
502e0: 0c80 0000 1000 cmpil #4096,%d0 <== NOT EXECUTED
502e6: 6704 beqs 502ec <fat_init_volume_info+0x1d8> <== NOT EXECUTED
502e8: 6000 0296 braw 50580 <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;
502ec: 7209 moveq #9,%d1
502ee: 4200 clrb %d0
502f0: 1740 0003 moveb %d0,%a3@(3)
502f4: 4280 clrl %d0
502f6: 3009 movew %a1,%d0
502f8: e2a8 lsrl %d1,%d0
502fa: 600c bras 50308 <fat_init_volume_info+0x1f4>
i >>= 1, vol->sec_mul++);
502fc: e280 asrl #1,%d0 <== NOT EXECUTED
502fe: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED
50302: 5281 addql #1,%d1 <== NOT EXECUTED
50304: 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;
50308: 0800 0000 btst #0,%d0
5030c: 67ee beqs 502fc <fat_init_volume_info+0x1e8> <== NEVER TAKEN
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
5030e: 4280 clrl %d0
50310: 4206 clrb %d6
50312: 3009 movew %a1,%d0
50314: 1746 0002 moveb %d6,%a3@(2)
50318: 2c00 movel %d0,%d6
5031a: 6008 bras 50324 <fat_init_volume_info+0x210>
i >>= 1, vol->sec_log2++);
5031c: 5281 addql #1,%d1
5031e: e286 asrl #1,%d6
50320: 1741 0002 moveb %d1,%a3@(2)
50324: 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;
50328: 0806 0000 btst #0,%d6
5032c: 67ee beqs 5031c <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;
5032e: 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;
50330: 3749 000a movew %a1,%a3@(10)
vol->bytes_per_block_log2 = vol->sec_log2;
50334: 1741 000c moveb %d1,%a3@(12)
vol->sectors_per_block = 1;
50338: 1747 0009 moveb %d7,%a3@(9)
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
5033c: 1742 0004 moveb %d2,%a3@(4)
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
50340: 6604 bnes 50346 <fat_init_volume_info+0x232> <== ALWAYS TAKEN
50342: 6000 023c braw 50580 <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;
50346: 4206 clrb %d6
50348: 1746 0005 moveb %d6,%a3@(5)
5034c: 4286 clrl %d6
5034e: 1c02 moveb %d2,%d6
50350: 6010 bras 50362 <fat_init_volume_info+0x24e>
i >>= 1, vol->spc_log2++);
50352: e286 asrl #1,%d6
50354: 1e2b 0005 moveb %a3@(5),%d7
50358: 3a47 moveaw %d7,%a5
5035a: 528d addql #1,%a5
5035c: 3e0d movew %a5,%d7
5035e: 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;
50362: 0806 0000 btst #0,%d6
50366: 67ea beqs 50352 <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)
50368: 4286 clrl %d6
5036a: 1c2b 0005 moveb %a3@(5),%d6
5036e: 2e00 movel %d0,%d7
50370: edaf lsll %d6,%d7
50372: 2c07 movel %d7,%d6
50374: 3747 0006 movew %d7,%a3@(6)
50378: 4287 clrl %d7
5037a: 3e06 movew %d6,%d7
5037c: 2a47 moveal %d7,%a5
5037e: bbfc 0000 8000 cmpal #32768,%a5
50384: 6304 blss 5038a <fat_init_volume_info+0x276> <== ALWAYS TAKEN
50386: 6000 01f8 braw 50580 <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;
5038a: 4207 clrb %d7
5038c: 0286 0000 ffff andil #65535,%d6
50392: 1747 0008 moveb %d7,%a3@(8)
50396: 6010 bras 503a8 <fat_init_volume_info+0x294>
i >>= 1, vol->bpc_log2++);
50398: e286 asrl #1,%d6
5039a: 1e2b 0008 moveb %a3@(8),%d7
5039e: 3a47 moveaw %d7,%a5
503a0: 528d addql #1,%a5
503a2: 3e0d movew %a5,%d7
503a4: 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;
503a8: 0806 0000 btst #0,%d6
503ac: 67ea beqs 50398 <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);
503ae: 4286 clrl %d6
503b0: 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)) /
503b4: 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);
503b6: 3e0a movew %a2,%d7
503b8: 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);
503ba: 1744 000d moveb %d4,%a3@(13)
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
503be: 0287 0000 00ff andil #255,%d7
503c4: 8c87 orl %d7,%d6
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
503c6: 4287 clrl %d7
503c8: 1e05 moveb %d5,%d7
503ca: 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);
503cc: 3246 moveaw %d6,%a1
503ce: 3746 0018 movew %d6,%a3@(24)
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
503d2: e18f lsll #8,%d7
503d4: 4286 clrl %d6
503d6: 1c05 moveb %d5,%d6
503d8: 8e86 orl %d6,%d7
503da: 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)) /
503de: eb8f lsll #5,%d7
503e0: 41f0 78ff lea %a0@(ffffffff,%d7:l),%a0
503e4: 2c08 movel %a0,%d6
503e6: 4c40 6806 remsl %d0,%d6,%d6
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
503ea: 4280 clrl %d0
503ec: 1001 moveb %d1,%d0
503ee: 2206 movel %d6,%d1
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
503f0: 4287 clrl %d7
503f2: 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;
503f6: e1a9 lsll %d0,%d1
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
503f8: 4280 clrl %d0
503fa: 102e ff92 moveb %fp@(-110),%d0
503fe: 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)) /
50400: 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)
50404: 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;
50406: 2741 0028 movel %d1,%a3@(40)
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
5040a: 4a40 tstw %d0
5040c: 6708 beqs 50416 <fat_init_volume_info+0x302> <== NEVER TAKEN
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
5040e: 0280 0000 ffff andil #65535,%d0
50414: 6026 bras 5043c <fat_init_volume_info+0x328>
else
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
50416: 4280 clrl %d0 <== NOT EXECUTED
50418: 4287 clrl %d7 <== NOT EXECUTED
5041a: 102e ffa2 moveb %fp@(-94),%d0 <== NOT EXECUTED
5041e: 1e2e ff9d moveb %fp@(-99),%d7 <== NOT EXECUTED
50422: e188 lsll #8,%d0 <== NOT EXECUTED
50424: 4847 swap %d7 <== NOT EXECUTED
50426: 4247 clrw %d7 <== NOT EXECUTED
50428: 1a2e ff8f moveb %fp@(-113),%d5 <== NOT EXECUTED
5042c: 8087 orl %d7,%d0 <== NOT EXECUTED
5042e: 4287 clrl %d7 <== NOT EXECUTED
50430: 1e2e ff9a moveb %fp@(-102),%d7 <== NOT EXECUTED
50434: 8087 orl %d7,%d0 <== NOT EXECUTED
50436: 7e18 moveq #24,%d7 <== NOT EXECUTED
50438: efad lsll %d7,%d5 <== NOT EXECUTED
5043a: 8085 orl %d5,%d0 <== NOT EXECUTED
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
5043c: 4281 clrl %d1
5043e: 1204 moveb %d4,%d1
50440: 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);
50444: 2740 001a movel %d0,%a3@(26)
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
50448: 4c10 1800 mulsl %a0@,%d1
5044c: 4280 clrl %d0
5044e: 3009 movew %a1,%d0
50450: 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)
50452: 4280 clrl %d0
50454: 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 +
50458: 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;
5045a: 2741 001e movel %d1,%a3@(30)
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
5045e: 4281 clrl %d1
50460: 122e ff95 moveb %fp@(-107),%d1
50464: 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 +
50466: 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)
5046a: 8081 orl %d1,%d0
5046c: 4a40 tstw %d0
5046e: 6708 beqs 50478 <fat_init_volume_info+0x364> <== NEVER TAKEN
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
50470: 0280 0000 ffff andil #65535,%d0
50476: 6026 bras 5049e <fat_init_volume_info+0x38a>
else
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
50478: 4280 clrl %d0 <== NOT EXECUTED
5047a: 4281 clrl %d1 <== NOT EXECUTED
5047c: 102e ff9c moveb %fp@(-100),%d0 <== NOT EXECUTED
50480: 122e ff9b moveb %fp@(-101),%d1 <== NOT EXECUTED
50484: 7818 moveq #24,%d4 <== NOT EXECUTED
50486: 4841 swap %d1 <== NOT EXECUTED
50488: 4241 clrw %d1 <== NOT EXECUTED
5048a: e188 lsll #8,%d0 <== NOT EXECUTED
5048c: 8081 orl %d1,%d0 <== NOT EXECUTED
5048e: 4281 clrl %d1 <== NOT EXECUTED
50490: 122e ff91 moveb %fp@(-111),%d1 <== NOT EXECUTED
50494: 8081 orl %d1,%d0 <== NOT EXECUTED
50496: 122e ff99 moveb %fp@(-103),%d1 <== NOT EXECUTED
5049a: e9a9 lsll %d4,%d1 <== NOT EXECUTED
5049c: 8081 orl %d1,%d0 <== NOT EXECUTED
5049e: 2740 002c movel %d0,%a3@(44)
data_secs = vol->tot_secs - vol->data_fsec;
504a2: 2a2b 002c movel %a3@(44),%d5
504a6: 9a86 subl %d6,%d5
504a8: 2c05 movel %d5,%d6
vol->data_cls = data_secs / vol->spc;
504aa: 0282 0000 00ff andil #255,%d2
504b0: 4c42 6006 remul %d2,%d6,%d6
504b4: 2746 0034 movel %d6,%a3@(52)
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
504b8: 0c86 0000 0ff4 cmpil #4084,%d6
504be: 621a bhis 504da <fat_init_volume_info+0x3c6> <== NEVER TAKEN
{
vol->type = FAT_FAT12;
vol->mask = FAT_FAT12_MASK;
504c0: 2e3c 0000 0fff movel #4095,%d7
vol->eoc_val = FAT_FAT12_EOC;
504c6: 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;
504ca: 7c01 moveq #1,%d6
vol->mask = FAT_FAT12_MASK;
504cc: 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;
504d0: 1746 000e moveb %d6,%a3@(14)
vol->mask = FAT_FAT12_MASK;
vol->eoc_val = FAT_FAT12_EOC;
504d4: 2748 0014 movel %a0,%a3@(20)
504d8: 603e bras 50518 <fat_init_volume_info+0x404>
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
504da: 0c86 0000 fff4 cmpil #65524,%d6 <== NOT EXECUTED
504e0: 621c bhis 504fe <fat_init_volume_info+0x3ea> <== NOT EXECUTED
{
vol->type = FAT_FAT16;
vol->mask = FAT_FAT16_MASK;
504e2: 223c 0000 ffff movel #65535,%d1 <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
504e8: 243c 0000 fff8 movel #65528,%d2 <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
504ee: 7002 moveq #2,%d0 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
504f0: 2741 0010 movel %d1,%a3@(16) <== NOT EXECUTED
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
{
vol->type = FAT_FAT16;
504f4: 1740 000e moveb %d0,%a3@(14) <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
504f8: 2742 0014 movel %d2,%a3@(20) <== NOT EXECUTED
504fc: 601a bras 50518 <fat_init_volume_info+0x404> <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
504fe: 7804 moveq #4,%d4 <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
50500: 2a3c 0fff ffff movel #268435455,%d5 <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
50506: 2c3c 0fff fff8 movel #268435448,%d6 <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
vol->eoc_val = FAT_FAT16_EOC;
}
else
{
vol->type = FAT_FAT32;
5050c: 1744 000e moveb %d4,%a3@(14) <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
50510: 2745 0010 movel %d5,%a3@(16) <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
50514: 2746 0014 movel %d6,%a3@(20) <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
50518: 4280 clrl %d0
5051a: 102b 000e moveb %a3@(14),%d0
5051e: 7e04 moveq #4,%d7
50520: be80 cmpl %d0,%d7
50522: 6600 018c bnew 506b0 <fat_init_volume_info+0x59c>
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
50526: 4280 clrl %d0 <== NOT EXECUTED
50528: 4281 clrl %d1 <== NOT EXECUTED
5052a: 102e ffa4 moveb %fp@(-92),%d0 <== NOT EXECUTED
5052e: 122e ffa3 moveb %fp@(-93),%d1 <== NOT EXECUTED
50532: e188 lsll #8,%d0 <== NOT EXECUTED
50534: 4841 swap %d1 <== NOT EXECUTED
50536: 4241 clrw %d1 <== NOT EXECUTED
50538: 182e ffa1 moveb %fp@(-95),%d4 <== NOT EXECUTED
5053c: 8081 orl %d1,%d0 <== NOT EXECUTED
5053e: 4281 clrl %d1 <== NOT EXECUTED
50540: 122e ffa5 moveb %fp@(-91),%d1 <== NOT EXECUTED
50544: 8081 orl %d1,%d0 <== NOT EXECUTED
50546: 7218 moveq #24,%d1 <== NOT EXECUTED
50548: e3ac lsll %d1,%d4 <== NOT EXECUTED
5054a: 8084 orl %d4,%d0 <== NOT EXECUTED
5054c: 2740 0038 movel %d0,%a3@(56) <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
50550: 7080 moveq #-128,%d0 <== NOT EXECUTED
50552: c083 andl %d3,%d0 <== NOT EXECUTED
50554: 1740 004e moveb %d0,%a3@(78) <== NOT EXECUTED
if (vol->mirror)
50558: 670a beqs 50564 <fat_init_volume_info+0x450> <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
5055a: 740f moveq #15,%d2 <== NOT EXECUTED
5055c: c682 andl %d2,%d3 <== NOT EXECUTED
5055e: 1743 0054 moveb %d3,%a3@(84) <== NOT EXECUTED
50562: 6006 bras 5056a <fat_init_volume_info+0x456> <== NOT EXECUTED
else
vol->afat = 0;
50564: 4204 clrb %d4 <== NOT EXECUTED
50566: 1744 0054 moveb %d4,%a3@(84) <== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
5056a: 4280 clrl %d0 <== NOT EXECUTED
5056c: 102e ffa6 moveb %fp@(-90),%d0 <== NOT EXECUTED
50570: 4281 clrl %d1 <== NOT EXECUTED
50572: 122e ffa7 moveb %fp@(-89),%d1 <== NOT EXECUTED
50576: e188 lsll #8,%d0 <== NOT EXECUTED
50578: 8081 orl %d1,%d0 <== NOT EXECUTED
5057a: 3740 003c movew %d0,%a3@(60) <== NOT EXECUTED
if( vol->info_sec == 0 )
5057e: 661a bnes 5059a <fat_init_volume_info+0x486> <== NOT EXECUTED
{
close(vol->fd);
50580: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
50584: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
5058a: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
50590: 2040 moveal %d0,%a0 <== NOT EXECUTED
50592: 7016 moveq #22,%d0 <== NOT EXECUTED
50594: 2080 movel %d0,%a0@ <== NOT EXECUTED
50596: 6000 01ba braw 50752 <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);
5059a: 260e movel %fp,%d3 <== NOT EXECUTED
5059c: 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,
505a2: 45f9 0004 fdfc lea 4fdfc <_fat_block_read>,%a2 <== NOT EXECUTED
505a8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
505aa: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
505ae: 42a7 clrl %sp@- <== NOT EXECUTED
505b0: 3f00 movew %d0,%sp@- <== NOT EXECUTED
505b2: 4267 clrw %sp@- <== NOT EXECUTED
505b4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
505b6: 4e92 jsr %a2@ <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
505b8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
505bc: 4a80 tstl %d0 <== NOT EXECUTED
505be: 6c0e bges 505ce <fat_init_volume_info+0x4ba> <== NOT EXECUTED
{
close(vol->fd);
505c0: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
505c4: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
505ca: 6000 0186 braw 50752 <fat_init_volume_info+0x63e> <== NOT EXECUTED
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
505ce: 4281 clrl %d1 <== NOT EXECUTED
505d0: 4282 clrl %d2 <== NOT EXECUTED
505d2: 122e ffaf moveb %fp@(-81),%d1 <== NOT EXECUTED
505d6: 142e ffb0 moveb %fp@(-80),%d2 <== NOT EXECUTED
505da: 4280 clrl %d0 <== NOT EXECUTED
505dc: 102e ffae moveb %fp@(-82),%d0 <== NOT EXECUTED
505e0: 4842 swap %d2 <== NOT EXECUTED
505e2: 4242 clrw %d2 <== NOT EXECUTED
505e4: e189 lsll #8,%d1 <== NOT EXECUTED
505e6: 8282 orl %d2,%d1 <== NOT EXECUTED
505e8: 4282 clrl %d2 <== NOT EXECUTED
505ea: 142e ffb1 moveb %fp@(-79),%d2 <== NOT EXECUTED
505ee: 8280 orl %d0,%d1 <== NOT EXECUTED
505f0: 7018 moveq #24,%d0 <== NOT EXECUTED
505f2: e1aa lsll %d0,%d2 <== NOT EXECUTED
505f4: 8282 orl %d2,%d1 <== NOT EXECUTED
505f6: 0c81 4161 5252 cmpil #1096897106,%d1 <== NOT EXECUTED
505fc: 6722 beqs 50620 <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);
505fe: 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 );
50600: 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);
50602: 4eb9 0004 fbaa jsr 4fbaa <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);
50608: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
5060c: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
50612: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
50618: 2040 moveal %d0,%a0 <== NOT EXECUTED
5061a: 2087 movel %d7,%a0@ <== NOT EXECUTED
5061c: 6000 01ae braw 507cc <fat_init_volume_info+0x6b8> <== NOT EXECUTED
}
else
{
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
50620: 2f03 movel %d3,%sp@- <== NOT EXECUTED
50622: 4878 000c pea c <OPER1> <== NOT EXECUTED
50626: 4280 clrl %d0 <== NOT EXECUTED
50628: 4878 01e4 pea 1e4 <DBL_MANT_DIG+0x1af> <== NOT EXECUTED
5062c: 302b 003c movew %a3@(60),%d0 <== NOT EXECUTED
50630: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50632: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50634: 4e92 jsr %a2@ <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
50636: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5063a: 4a80 tstl %d0 <== NOT EXECUTED
5063c: 6c16 bges 50654 <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);
5063e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50640: 4eb9 0004 fbaa jsr 4fbaa <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);
50646: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
5064a: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
50650: 6000 017a braw 507cc <fat_init_volume_info+0x6b8> <== NOT EXECUTED
return -1;
}
vol->free_cls_in_fs_info =
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
50654: 4280 clrl %d0 <== NOT EXECUTED
50656: 4281 clrl %d1 <== NOT EXECUTED
50658: 102e ffb3 moveb %fp@(-77),%d0 <== NOT EXECUTED
5065c: 122e ffb4 moveb %fp@(-76),%d1 <== NOT EXECUTED
50660: 7418 moveq #24,%d2 <== NOT EXECUTED
50662: 4841 swap %d1 <== NOT EXECUTED
50664: 4241 clrw %d1 <== NOT EXECUTED
50666: e188 lsll #8,%d0 <== NOT EXECUTED
50668: 8081 orl %d1,%d0 <== NOT EXECUTED
5066a: 4281 clrl %d1 <== NOT EXECUTED
5066c: 122e ffb2 moveb %fp@(-78),%d1 <== NOT EXECUTED
50670: 8081 orl %d1,%d0 <== NOT EXECUTED
50672: 122e ffb5 moveb %fp@(-75),%d1 <== NOT EXECUTED
50676: e5a9 lsll %d2,%d1 <== NOT EXECUTED
50678: 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);
5067a: 4281 clrl %d1 <== NOT EXECUTED
5067c: 122e ffb8 moveb %fp@(-72),%d1 <== NOT EXECUTED
_fat_block_release(fs_info);
close(vol->fd);
return -1;
}
vol->free_cls_in_fs_info =
50680: 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);
50684: 4841 swap %d1 <== NOT EXECUTED
50686: 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;
50688: 2740 003e movel %d0,%a3@(62) <== NOT EXECUTED
vol->next_cl_in_fs_info =
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
5068c: 4280 clrl %d0 <== NOT EXECUTED
5068e: 102e ffb7 moveb %fp@(-73),%d0 <== NOT EXECUTED
50692: e188 lsll #8,%d0 <== NOT EXECUTED
50694: 8081 orl %d1,%d0 <== NOT EXECUTED
50696: 4281 clrl %d1 <== NOT EXECUTED
50698: 122e ffb6 moveb %fp@(-74),%d1 <== NOT EXECUTED
5069c: 8081 orl %d1,%d0 <== NOT EXECUTED
5069e: 122e ffb9 moveb %fp@(-71),%d1 <== NOT EXECUTED
506a2: e5a9 lsll %d2,%d1 <== NOT EXECUTED
506a4: 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 =
506a6: 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;
506aa: 2740 0046 movel %d0,%a3@(70) <== NOT EXECUTED
506ae: 6018 bras 506c8 <fat_init_volume_info+0x5b4> <== NOT EXECUTED
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = FAT_UNDEFINED_VALUE;
506b0: 7aff moveq #-1,%d5
}
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
506b2: 4204 clrb %d4
}
}
}
else
{
vol->rdir_cl = 0;
506b4: 42ab 0038 clrl %a3@(56)
vol->mirror = 0;
506b8: 1744 004e moveb %d4,%a3@(78)
vol->afat = 0;
506bc: 1744 0054 moveb %d4,%a3@(84)
vol->free_cls = FAT_UNDEFINED_VALUE;
506c0: 2745 003e movel %d5,%a3@(62)
vol->next_cl = FAT_UNDEFINED_VALUE;
506c4: 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);
506c8: 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));
506ca: 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);
506d0: 4eb9 0004 fbaa jsr 4fbaa <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;
506d6: 4280 clrl %d0
506d8: 102b 0054 moveb %a3@(84),%d0
506dc: 41eb 001a lea %a3@(26),%a0
506e0: 4c10 0800 mulsl %a0@,%d0
506e4: 4281 clrl %d1
506e6: 322b 0018 movew %a3@(24),%d1
506ea: d081 addl %d1,%d0
506ec: 2740 0050 movel %d0,%a3@(80)
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
506f0: 4878 000c pea c <OPER1>
506f4: 4878 0002 pea 2 <DOUBLE_FLOAT>
506f8: 4e92 jsr %a2@
if ( fs_info->vhash == NULL )
506fa: 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));
506fe: 2240 moveal %d0,%a1
50700: 2740 0062 movel %d0,%a3@(98)
if ( fs_info->vhash == NULL )
50704: 6736 beqs 5073c <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 );
50706: 41e9 0010 lea %a1@(16),%a0
5070a: 5880 addql #4,%d0
5070c: 2348 000c movel %a0,%a1@(12)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50710: 41e9 000c lea %a1@(12),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
50714: 2280 movel %d0,%a1@
head->next = tail;
head->previous = NULL;
50716: 42a9 0004 clrl %a1@(4)
tail->previous = head;
5071a: 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;
5071e: 42a9 0010 clrl %a1@(16)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50722: 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));
50726: 4878 000c pea c <OPER1>
5072a: 4878 0002 pea 2 <DOUBLE_FLOAT>
5072e: 4e92 jsr %a2@
if ( fs_info->rhash == NULL )
50730: 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));
50732: 2240 moveal %d0,%a1
50734: 2740 0066 movel %d0,%a3@(102)
if ( fs_info->rhash == NULL )
50738: 661e bnes 50758 <fat_init_volume_info+0x644> <== ALWAYS TAKEN
5073a: 6070 bras 507ac <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);
5073c: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
50740: 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);
50742: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
50748: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
5074e: 2040 moveal %d0,%a0 <== NOT EXECUTED
50750: 2086 movel %d6,%a0@ <== NOT EXECUTED
50752: 588f addql #4,%sp <== NOT EXECUTED
50754: 6000 00ee braw 50844 <fat_init_volume_info+0x730> <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
50758: 41e9 0010 lea %a1@(16),%a0
5075c: 5880 addql #4,%d0
5075e: 2348 000c movel %a0,%a1@(12)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50762: 41e9 000c lea %a1@(12),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
50766: 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;
50768: 203c 0000 0100 movel #256,%d0
head->next = tail;
head->previous = NULL;
5076e: 42a9 0004 clrl %a1@(4)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
50772: 222b 002c movel %a3@(44),%d1
tail->previous = head;
50776: 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;
5077a: 42a9 0010 clrl %a1@(16)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5077e: 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;
50782: 2740 0072 movel %d0,%a3@(114)
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
50786: 4280 clrl %d0
50788: 102b 0003 moveb %a3@(3),%d0
5078c: e1a9 lsll %d0,%d1
fs_info->index = 0;
5078e: 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;
50792: e989 lsll #4,%d1
50794: 2741 0076 movel %d1,%a3@(118)
fs_info->index = 0;
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
50798: 4878 0001 pea 1 <ADD>
5079c: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
507a0: 4e92 jsr %a2@
if ( fs_info->uino == NULL )
507a2: 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));
507a4: 2740 006a movel %d0,%a3@(106)
if ( fs_info->uino == NULL )
507a8: 6654 bnes 507fe <fat_init_volume_info+0x6ea> <== ALWAYS TAKEN
507aa: 6024 bras 507d0 <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);
507ac: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
507b0: 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);
507b2: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
free(fs_info->vhash);
507b8: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED
507bc: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
507c2: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
507c8: 2040 moveal %d0,%a0 <== NOT EXECUTED
507ca: 2085 movel %d5,%a0@ <== NOT EXECUTED
507cc: 508f addql #8,%sp <== NOT EXECUTED
507ce: 6074 bras 50844 <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);
507d0: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
507d4: 45f9 0004 3f4c lea 43f4c <free>,%a2 <== NOT EXECUTED
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
507da: 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);
507dc: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
free(fs_info->vhash);
507e2: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED
507e6: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->rhash);
507e8: 2f2b 0066 movel %a3@(102),%sp@- <== NOT EXECUTED
507ec: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
507ee: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
507f4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
507f8: 2040 moveal %d0,%a0 <== NOT EXECUTED
507fa: 2084 movel %d4,%a0@ <== NOT EXECUTED
507fc: 6046 bras 50844 <fat_init_volume_info+0x730> <== NOT EXECUTED
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
507fe: 4878 0001 pea 1 <ADD>
50802: 4280 clrl %d0
50804: 3013 movew %a3@,%d0
50806: 2f00 movel %d0,%sp@-
50808: 4e92 jsr %a2@
if (fs_info->sec_buf == NULL)
5080a: 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));
5080c: 2740 0084 movel %d0,%a3@(132)
if (fs_info->sec_buf == NULL)
50810: 6636 bnes 50848 <fat_init_volume_info+0x734> <== ALWAYS TAKEN
{
close(vol->fd);
50812: 2f2b 0056 movel %a3@(86),%sp@- <== NOT EXECUTED
free(fs_info->vhash);
50816: 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 );
5081c: 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);
5081e: 4eb9 0004 3cd8 jsr 43cd8 <close> <== NOT EXECUTED
free(fs_info->vhash);
50824: 2f2b 0062 movel %a3@(98),%sp@- <== NOT EXECUTED
50828: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->rhash);
5082a: 2f2b 0066 movel %a3@(102),%sp@- <== NOT EXECUTED
5082e: 4e92 jsr %a2@ <== NOT EXECUTED
free(fs_info->uino);
50830: 2f2b 006a movel %a3@(106),%sp@- <== NOT EXECUTED
50834: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
50836: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
5083c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
50840: 2040 moveal %d0,%a0 <== NOT EXECUTED
50842: 2083 movel %d3,%a0@ <== NOT EXECUTED
50844: 70ff moveq #-1,%d0 <== NOT EXECUTED
50846: 6056 bras 5089e <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;
50848: 4280 clrl %d0
5084a: 102b 0004 moveb %a3@(4),%d0
5084e: 5380 subql #1,%d0
50850: 2200 movel %d0,%d1
50852: 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)
50856: 6704 beqs 5085c <fat_init_volume_info+0x748> <== ALWAYS TAKEN
vol->bytes_per_block_log2 = vol->bpc_log2;
vol->sectors_per_block = vol->spc;
}
}
return RC_OK;
50858: 4280 clrl %d0 <== NOT EXECUTED
5085a: 6042 bras 5089e <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)))
5085c: 4281 clrl %d1
5085e: 122b 000e moveb %a3@(14),%d1
50862: 7404 moveq #4,%d2
50864: b481 cmpl %d1,%d2
50866: 6706 beqs 5086e <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;
50868: 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)))
5086c: 66ea bnes 50858 <fat_init_volume_info+0x744> <== NEVER TAKEN
{
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
5086e: 4878 0001 pea 1 <ADD>
50872: 4280 clrl %d0
50874: 302b 0006 movew %a3@(6),%d0
50878: 2f00 movel %d0,%sp@-
5087a: 2f2b 005a movel %a3@(90),%sp@-
5087e: 4eb9 0004 e5c2 jsr 4e5c2 <rtems_bdbuf_set_block_size>
if (sc == RTEMS_SUCCESSFUL)
50884: 4fef 000c lea %sp@(12),%sp
50888: 4a80 tstl %d0
5088a: 66cc bnes 50858 <fat_init_volume_info+0x744> <== NEVER TAKEN
{
vol->bytes_per_block = vol->bpc;
5088c: 376b 0006 000a movew %a3@(6),%a3@(10)
vol->bytes_per_block_log2 = vol->bpc_log2;
50892: 176b 0008 000c moveb %a3@(8),%a3@(12)
vol->sectors_per_block = vol->spc;
50898: 176b 0004 0009 moveb %a3@(4),%a3@(9)
}
}
return RC_OK;
}
5089e: 4cee 3cfc ff64 moveml %fp@(-156),%d2-%d7/%a2-%a5
508a4: 4e5e unlk %fp <== NOT EXECUTED
00055c40 <fat_scan_fat_for_free_clusters>:
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
55c40: 4e56 ffd0 linkw %fp,#-48
55c44: 122e 001f moveb %fp@(31),%d1
55c48: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
55c4c: 2a6e 0008 moveal %fp@(8),%a5
55c50: 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;
55c54: 2a2d 0034 movel %a5@(52),%d5
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl,
bool zero_fill
)
{
55c58: 266e 000c moveal %fp@(12),%a3
55c5c: 1d41 fffb moveb %d1,%fp@(-5)
int rc = RC_OK;
uint32_t cl4find = 2;
uint32_t next_cln = 0;
55c60: 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;
55c64: 4292 clrl %a2@
if (count == 0)
55c66: 4aae 0010 tstl %fp@(16)
55c6a: 6700 0166 beqw 55dd2 <fat_scan_fat_for_free_clusters+0x192>
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
55c6e: 2e2d 0046 movel %a5@(70),%d7
55c72: 70ff moveq #-1,%d0
55c74: b087 cmpl %d7,%d0
55c76: 6602 bnes 55c7a <fat_scan_fat_for_free_clusters+0x3a>
uint32_t *last_cl,
bool zero_fill
)
{
int rc = RC_OK;
uint32_t cl4find = 2;
55c78: 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;
55c7a: 5485 addql #2,%d5
55c7c: 7802 moveq #2,%d4
55c7e: 4283 clrl %d3
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
55c80: 49f9 0005 5968 lea 55968 <fat_set_fat_cluster>,%a4
55c86: 6000 00f6 braw 55d7e <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);
55c8a: 486e fffc pea %fp@(-4)
55c8e: 2f07 movel %d7,%sp@-
55c90: 2f0d movel %a5,%sp@-
55c92: 4eb9 0005 57fc jsr 557fc <fat_get_fat_cluster>
if ( rc != RC_OK )
55c98: 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);
55c9c: 2400 movel %d0,%d2
if ( rc != RC_OK )
55c9e: 6716 beqs 55cb6 <fat_scan_fat_for_free_clusters+0x76><== ALWAYS TAKEN
{
if (*cls_added != 0)
55ca0: 4a92 tstl %a2@ <== NOT EXECUTED
55ca2: 6700 0134 beqw 55dd8 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
55ca6: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
55ca8: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55caa: 4eb9 0005 5b9c jsr 55b9c <fat_free_fat_clusters_chain> <== NOT EXECUTED
55cb0: 508f addql #8,%sp <== NOT EXECUTED
55cb2: 6000 0124 braw 55dd8 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
55cb6: 4aae fffc tstl %fp@(-4)
55cba: 6600 00b8 bnew 55d74 <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)
55cbe: 4a92 tstl %a2@
55cc0: 661e bnes 55ce0 <fat_scan_fat_for_free_clusters+0xa0><== NEVER TAKEN
{
*chain = cl4find;
55cc2: 2687 movel %d7,%a3@
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
55cc4: 4878 ffff pea ffffffff <LESS>
55cc8: 2f07 movel %d7,%sp@-
55cca: 2f0d movel %a5,%sp@-
55ccc: 4e94 jsr %a4@
if ( rc != RC_OK )
55cce: 4fef 000c lea %sp@(12),%sp
55cd2: 4a80 tstl %d0
55cd4: 6600 0100 bnew 55dd6 <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)
55cd8: 4a2e fffb tstb %fp@(-5)
55cdc: 673a beqs 55d18 <fat_scan_fat_for_free_clusters+0xd8><== ALWAYS TAKEN
55cde: 6048 bras 55d28 <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);
55ce0: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
55ce4: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55ce6: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55ce8: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
55cea: 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);
55cee: 2c00 movel %d0,%d6 <== NOT EXECUTED
if ( rc != RC_OK )
55cf0: 6712 beqs 55d04 <fat_scan_fat_for_free_clusters+0xc4><== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
55cf2: 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);
55cf4: 2406 movel %d6,%d2 <== NOT EXECUTED
if ( rc != RC_OK )
{
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
55cf6: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55cf8: 4eb9 0005 5b9c jsr 55b9c <fat_free_fat_clusters_chain> <== NOT EXECUTED
55cfe: 508f addql #8,%sp <== NOT EXECUTED
55d00: 6000 00d6 braw 55dd8 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
return rc;
}
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
55d04: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55d06: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55d08: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55d0a: 4e94 jsr %a4@ <== NOT EXECUTED
if ( rc != RC_OK )
55d0c: 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);
55d10: 2600 movel %d0,%d3 <== NOT EXECUTED
if ( rc != RC_OK )
55d12: 67c4 beqs 55cd8 <fat_scan_fat_for_free_clusters+0x98><== NOT EXECUTED
55d14: 6000 0096 braw 55dac <fat_scan_fat_for_free_clusters+0x16c><== NOT EXECUTED
goto cleanup;
}
}
save_cln = cl4find;
(*cls_added)++;
55d18: 2012 movel %a2@,%d0
55d1a: 5280 addql #1,%d0
55d1c: 2480 movel %d0,%a2@
/* have we satisfied request ? */
if (*cls_added == count)
55d1e: b0ae 0010 cmpl %fp@(16),%d0
55d22: 672a beqs 55d4e <fat_scan_fat_for_free_clusters+0x10e><== ALWAYS TAKEN
55d24: 2607 movel %d7,%d3 <== NOT EXECUTED
55d26: 604c bras 55d74 <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);
55d28: 4280 clrl %d0 <== NOT EXECUTED
if (fs_info->vol.bpc != bytes_written)
55d2a: 4283 clrl %d3 <== NOT EXECUTED
goto cleanup;
}
if (zero_fill)
{
bytes_written = fat_cluster_set (fs_info, cl4find, 0, fs_info->vol.bpc, 0);
55d2c: 42a7 clrl %sp@- <== NOT EXECUTED
55d2e: 302d 0006 movew %a5@(6),%d0 <== NOT EXECUTED
55d32: 2f00 movel %d0,%sp@- <== NOT EXECUTED
55d34: 42a7 clrl %sp@- <== NOT EXECUTED
55d36: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55d38: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55d3a: 4eb9 0004 ff10 jsr 4ff10 <fat_cluster_set> <== NOT EXECUTED
if (fs_info->vol.bpc != bytes_written)
55d40: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
55d44: 362d 0006 movew %a5@(6),%d3 <== NOT EXECUTED
55d48: b083 cmpl %d3,%d0 <== NOT EXECUTED
55d4a: 67cc beqs 55d18 <fat_scan_fat_for_free_clusters+0xd8><== NOT EXECUTED
55d4c: 605c bras 55daa <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)
55d4e: 202d 003e movel %a5@(62),%d0
55d52: 72ff moveq #-1,%d1
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
55d54: 2b47 0046 movel %d7,%a5@(70)
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
55d58: b280 cmpl %d0,%d1
55d5a: 6706 beqs 55d62 <fat_scan_fat_for_free_clusters+0x122><== ALWAYS TAKEN
fs_info->vol.free_cls -= (*cls_added);
55d5c: 9092 subl %a2@,%d0 <== NOT EXECUTED
55d5e: 2b40 003e movel %d0,%a5@(62) <== NOT EXECUTED
*last_cl = save_cln;
55d62: 206e 0018 moveal %fp@(24),%a0
55d66: 2087 movel %d7,%a0@
fat_buf_release(fs_info);
55d68: 2f0d movel %a5,%sp@-
55d6a: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release>
55d70: 588f addql #4,%sp
55d72: 6064 bras 55dd8 <fat_scan_fat_for_free_clusters+0x198>
return rc;
}
}
i++;
55d74: 5284 addql #1,%d4
cl4find++;
55d76: 5287 addql #1,%d7
if (cl4find >= data_cls_val)
55d78: ba87 cmpl %d7,%d5
55d7a: 6202 bhis 55d7e <fat_scan_fat_for_free_clusters+0x13e><== ALWAYS TAKEN
cl4find = 2;
55d7c: 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)
55d7e: ba84 cmpl %d4,%d5
55d80: 6200 ff08 bhiw 55c8a <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)
55d84: 202d 003e movel %a5@(62),%d0 <== NOT EXECUTED
55d88: 72ff moveq #-1,%d1 <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
55d8a: 2b43 0046 movel %d3,%a5@(70) <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
55d8e: b280 cmpl %d0,%d1 <== NOT EXECUTED
55d90: 6706 beqs 55d98 <fat_scan_fat_for_free_clusters+0x158><== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
55d92: 9092 subl %a2@,%d0 <== NOT EXECUTED
55d94: 2b40 003e movel %d0,%a5@(62) <== NOT EXECUTED
*last_cl = save_cln;
55d98: 206e 0018 moveal %fp@(24),%a0 <== NOT EXECUTED
55d9c: 2083 movel %d3,%a0@ <== NOT EXECUTED
fat_buf_release(fs_info);
55d9e: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55da0: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release> <== NOT EXECUTED
55da6: 588f addql #4,%sp <== NOT EXECUTED
55da8: 6028 bras 55dd2 <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;
55daa: 76ff moveq #-1,%d3 <== NOT EXECUTED
return RC_OK;
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
55dac: 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;
55dae: 2403 movel %d3,%d2 <== NOT EXECUTED
return RC_OK;
cleanup:
/* cleanup activity */
fat_free_fat_clusters_chain(fs_info, (*chain));
55db0: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55db2: 4eb9 0005 5b9c jsr 55b9c <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);
55db8: 42a7 clrl %sp@- <== NOT EXECUTED
55dba: 2f07 movel %d7,%sp@- <== NOT EXECUTED
55dbc: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55dbe: 4eb9 0005 5968 jsr 55968 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
55dc4: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55dc6: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release> <== NOT EXECUTED
55dcc: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
55dd0: 6006 bras 55dd8 <fat_scan_fat_for_free_clusters+0x198><== NOT EXECUTED
ssize_t bytes_written;
*cls_added = 0;
if (count == 0)
return rc;
55dd2: 4282 clrl %d2 <== NOT EXECUTED
55dd4: 6002 bras 55dd8 <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);
55dd6: 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;
}
55dd8: 2002 movel %d2,%d0
55dda: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
55de0: 4e5e unlk %fp <== NOT EXECUTED
0004fe7a <fat_sector_write>:
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
4fe7a: 4e56 ffd8 linkw %fp,#-40
4fe7e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
4fe82: 2e0e movel %fp,%d7
int rc = RC_OK;
ssize_t cmpltd = 0;
4fe84: 4283 clrl %d3
4fe86: 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);
4fe88: 47f9 0004 fd48 lea 4fd48 <fat_buf_access>,%a3
if (rc != RC_OK)
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fe8e: 49f9 0005 7dd0 lea 57dd0 <memcpy>,%a4
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
4fe94: 246e 0008 moveal %fp@(8),%a2
4fe98: 282e 0014 movel %fp@(20),%d4
int rc = RC_OK;
ssize_t cmpltd = 0;
uint32_t sec_num = start;
uint32_t ofs = offset;
4fe9c: 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;
4fea0: 2a2e 000c movel %fp@(12),%d5
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while(count > 0)
4fea4: 6056 bras 4fefc <fat_sector_write+0x82>
{
c = MIN(count, (fs_info->vol.bps - ofs));
4fea6: 4282 clrl %d2
4fea8: 3412 movew %a2@,%d2
4feaa: 9486 subl %d6,%d2
4feac: b882 cmpl %d2,%d4
4feae: 6402 bccs 4feb2 <fat_sector_write+0x38> <== NEVER TAKEN
4feb0: 2404 movel %d4,%d2
if (c == fs_info->vol.bytes_per_block)
4feb2: 4280 clrl %d0
4feb4: 302a 000a movew %a2@(10),%d0
4feb8: b082 cmpl %d2,%d0
4feba: 6608 bnes 4fec4 <fat_sector_write+0x4a> <== ALWAYS TAKEN
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
4febc: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4febe: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4fec2: 6006 bras 4feca <fat_sector_write+0x50> <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4fec4: 2f07 movel %d7,%sp@-
4fec6: 4878 0001 pea 1 <ADD>
4feca: 2f05 movel %d5,%sp@-
4fecc: 2f0a movel %a2,%sp@-
4fece: 4e93 jsr %a3@
4fed0: 4fef 0010 lea %sp@(16),%sp
if (rc != RC_OK)
4fed4: 4a80 tstl %d0
4fed6: 662a bnes 4ff02 <fat_sector_write+0x88> <== NEVER TAKEN
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4fed8: 206e 0018 moveal %fp@(24),%a0
4fedc: dcae fffc addl %fp@(-4),%d6
fat_buf_mark_modified(fs_info);
count -= c;
4fee0: 9882 subl %d2,%d4
cmpltd +=c;
sec_num++;
4fee2: 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);
4fee4: 2f02 movel %d2,%sp@-
4fee6: 4870 3800 pea %a0@(00000000,%d3:l)
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
4feea: 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);
4feec: 2f06 movel %d6,%sp@-
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
sec_num++;
ofs = 0;
4feee: 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);
4fef0: 4e94 jsr %a4@
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
sec_num++;
ofs = 0;
4fef2: 4fef 000c lea %sp@(12),%sp
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
4fef6: 7001 moveq #1,%d0
4fef8: 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)
4fefc: 4a84 tstl %d4
4fefe: 66a6 bnes 4fea6 <fat_sector_write+0x2c>
4ff00: 6002 bras 4ff04 <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;
4ff02: 76ff moveq #-1,%d3 <== NOT EXECUTED
cmpltd +=c;
sec_num++;
ofs = 0;
}
return cmpltd;
}
4ff04: 2003 movel %d3,%d0
4ff06: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
4ff0c: 4e5e unlk %fp <== NOT EXECUTED
00055968 <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)) )
55968: 7001 moveq #1,%d0
fat_set_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t in_val
)
{
5596a: 4e56 ffd8 linkw %fp,#-40
5596e: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
55972: 246e 0008 moveal %fp@(8),%a2
55976: 242e 000c movel %fp@(12),%d2
5597a: 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;
5597e: 42ae fffc clrl %fp@(-4)
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
55982: b082 cmpl %d2,%d0
55984: 6400 01fc bccw 55b82 <fat_set_fat_cluster+0x21a>
55988: 202a 0034 movel %a2@(52),%d0
5598c: 5280 addql #1,%d0
5598e: b082 cmpl %d2,%d0
55990: 6404 bccs 55996 <fat_set_fat_cluster+0x2e> <== ALWAYS TAKEN
55992: 6000 01ee braw 55b82 <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) +
55996: 7601 moveq #1,%d3
55998: 102a 000e moveb %a2@(14),%d0
5599c: c680 andl %d0,%d3
5599e: 4a03 tstb %d3
559a0: 6708 beqs 559aa <fat_set_fat_cluster+0x42> <== NEVER TAKEN
559a2: 2202 movel %d2,%d1
559a4: e289 lsrl #1,%d1
559a6: d282 addl %d2,%d1
559a8: 6012 bras 559bc <fat_set_fat_cluster+0x54>
559aa: 7202 moveq #2,%d1 <== NOT EXECUTED
559ac: c280 andl %d0,%d1 <== NOT EXECUTED
559ae: 4a01 tstb %d1 <== NOT EXECUTED
559b0: 6706 beqs 559b8 <fat_set_fat_cluster+0x50> <== NOT EXECUTED
559b2: 2202 movel %d2,%d1 <== NOT EXECUTED
559b4: d281 addl %d1,%d1 <== NOT EXECUTED
559b6: 6004 bras 559bc <fat_set_fat_cluster+0x54> <== NOT EXECUTED
559b8: 2202 movel %d2,%d1 <== NOT EXECUTED
559ba: e589 lsll #2,%d1 <== NOT EXECUTED
559bc: 4284 clrl %d4
559be: 182a 0002 moveb %a2@(2),%d4
559c2: e8a9 lsrl %d4,%d1
559c4: 2641 moveal %d1,%a3
559c6: 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);
559ca: 4a03 tstb %d3
559cc: 6708 beqs 559d6 <fat_set_fat_cluster+0x6e> <== NEVER TAKEN
559ce: 2e02 movel %d2,%d7
559d0: e28f lsrl #1,%d7
559d2: de82 addl %d2,%d7
559d4: 6010 bras 559e6 <fat_set_fat_cluster+0x7e>
559d6: 7202 moveq #2,%d1 <== NOT EXECUTED
559d8: 2e02 movel %d2,%d7 <== NOT EXECUTED
559da: c081 andl %d1,%d0 <== NOT EXECUTED
559dc: 4a00 tstb %d0 <== NOT EXECUTED
559de: 6704 beqs 559e4 <fat_set_fat_cluster+0x7c> <== NOT EXECUTED
559e0: de87 addl %d7,%d7 <== NOT EXECUTED
559e2: 6002 bras 559e6 <fat_set_fat_cluster+0x7e> <== NOT EXECUTED
559e4: e58f lsll #2,%d7 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
559e6: 2c0e movel %fp,%d6
559e8: 5986 subql #4,%d6
559ea: 49f9 0004 fd48 lea 4fd48 <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);
559f0: 3612 movew %a2@,%d3
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
559f2: 2f06 movel %d6,%sp@-
559f4: 4878 0001 pea 1 <ADD>
559f8: 2f0b movel %a3,%sp@-
559fa: 2f0a movel %a2,%sp@-
559fc: 4e94 jsr %a4@
if (rc != RC_OK)
559fe: 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);
55a02: 2800 movel %d0,%d4
if (rc != RC_OK)
55a04: 6600 018a bnew 55b90 <fat_set_fat_cluster+0x228>
return rc;
switch ( fs_info->vol.type )
55a08: 4280 clrl %d0
55a0a: 102a 000e moveb %a2@(14),%d0
55a0e: 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);
55a10: 0283 0000 ffff andil #65535,%d3
55a16: 5383 subql #1,%d3
55a18: 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 )
55a1a: b280 cmpl %d0,%d1
55a1c: 6700 011e beqw 55b3c <fat_set_fat_cluster+0x1d4>
55a20: 123c 0004 moveb #4,%d1
55a24: b280 cmpl %d0,%d1
55a26: 6700 0132 beqw 55b5a <fat_set_fat_cluster+0x1f2>
55a2a: 123c 0001 moveb #1,%d1
55a2e: b280 cmpl %d0,%d1
55a30: 6600 0150 bnew 55b82 <fat_set_fat_cluster+0x21a>
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
55a34: 0802 0000 btst #0,%d2
55a38: 677a beqs 55ab4 <fat_set_fat_cluster+0x14c>
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*(sec_buf + ofs) &= 0x0F;
55a3a: 206e fffc moveal %fp@(-4),%a0
55a3e: d1c3 addal %d3,%a0
55a40: 123c 000f moveb #15,%d1
55a44: 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;
55a46: e98d lsll #4,%d5
*(sec_buf + ofs) &= 0x0F;
55a48: c081 andl %d1,%d0
55a4a: 1080 moveb %d0,%a0@
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0);
55a4c: 206e fffc moveal %fp@(-4),%a0
55a50: d1c3 addal %d3,%a0
55a52: 1010 moveb %a0@,%d0
55a54: 8085 orl %d5,%d0
55a56: 1080 moveb %d0,%a0@
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
55a58: 7001 moveq #1,%d0
55a5a: 1540 007e moveb %d0,%a2@(126)
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
55a5e: 4280 clrl %d0
55a60: 3012 movew %a2@,%d0
55a62: 5380 subql #1,%d0
55a64: b083 cmpl %d3,%d0
55a66: 6628 bnes 55a90 <fat_set_fat_cluster+0x128> <== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
55a68: 2f06 movel %d6,%sp@- <== NOT EXECUTED
55a6a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55a6e: 486b 0001 pea %a3@(1) <== NOT EXECUTED
55a72: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55a74: 4e94 jsr %a4@ <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
55a76: 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,
55a7a: 2800 movel %d0,%d4 <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
55a7c: 6600 0112 bnew 55b90 <fat_set_fat_cluster+0x228> <== NOT EXECUTED
return rc;
*sec_buf &= 0x00;
55a80: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
55a84: 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;
55a86: 4210 clrb %a0@ <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
55a88: 3005 movew %d5,%d0 <== NOT EXECUTED
55a8a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55a8e: 607e bras 55b0e <fat_set_fat_cluster+0x1a6> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0x00;
55a90: 206e fffc moveal %fp@(-4),%a0
55a94: 5283 addql #1,%d3
55a96: 4201 clrb %d1
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
55a98: 0285 0000 ffff andil #65535,%d5
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0x00;
55a9e: 1181 3800 moveb %d1,%a0@(00000000,%d3:l)
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
55aa2: e08d lsrl #8,%d5
55aa4: 206e fffc moveal %fp@(-4),%a0
55aa8: d1c3 addal %d3,%a0
55aaa: 1010 moveb %a0@,%d0
55aac: 8a80 orl %d0,%d5
55aae: 1085 moveb %d5,%a0@
55ab0: 6000 00de braw 55b90 <fat_set_fat_cluster+0x228>
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*(sec_buf + ofs) &= 0x00;
55ab4: 206e fffc moveal %fp@(-4),%a0
55ab8: 4201 clrb %d1
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
55aba: 0285 0000 0fff andil #4095,%d5
*(sec_buf + ofs) &= 0x00;
55ac0: 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;
55ac4: 3405 movew %d5,%d2
*(sec_buf + ofs) &= 0x00;
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF);
55ac6: 206e fffc moveal %fp@(-4),%a0
55aca: d1c3 addal %d3,%a0
55acc: 1010 moveb %a0@,%d0
55ace: 7201 moveq #1,%d1
55ad0: 8a80 orl %d0,%d5
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
55ad2: 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);
55ad4: 1085 moveb %d5,%a0@
55ad6: 1541 007e moveb %d1,%a2@(126)
fat_buf_mark_modified(fs_info);
if ( ofs == (fs_info->vol.bps - 1) )
55ada: 3012 movew %a2@,%d0
55adc: 5380 subql #1,%d0
55ade: b083 cmpl %d3,%d0
55ae0: 6636 bnes 55b18 <fat_set_fat_cluster+0x1b0> <== ALWAYS TAKEN
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
55ae2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
55ae4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55ae8: 486b 0001 pea %a3@(1) <== NOT EXECUTED
55aec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55aee: 4e94 jsr %a4@ <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
55af0: 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,
55af4: 2800 movel %d0,%d4 <== NOT EXECUTED
&sec_buf);
if (rc != RC_OK)
55af6: 6600 0098 bnew 55b90 <fat_set_fat_cluster+0x228> <== NOT EXECUTED
return rc;
*sec_buf &= 0xF0;
55afa: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55afe: 72f0 moveq #-16,%d1 <== NOT EXECUTED
55b00: 1010 moveb %a0@,%d0 <== NOT EXECUTED
55b02: c081 andl %d1,%d0 <== NOT EXECUTED
55b04: 1080 moveb %d0,%a0@ <== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
55b06: 4280 clrl %d0 <== NOT EXECUTED
55b08: 3002 movew %d2,%d0 <== NOT EXECUTED
55b0a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55b0e: e088 lsrl #8,%d0 <== NOT EXECUTED
55b10: 1210 moveb %a0@,%d1 <== NOT EXECUTED
55b12: 8081 orl %d1,%d0 <== NOT EXECUTED
55b14: 1080 moveb %d0,%a0@ <== NOT EXECUTED
55b16: 603a bras 55b52 <fat_set_fat_cluster+0x1ea> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*(sec_buf + ofs + 1) &= 0xF0;
55b18: 206e fffc moveal %fp@(-4),%a0
55b1c: 5283 addql #1,%d3
55b1e: d1c3 addal %d3,%a0
55b20: 72f0 moveq #-16,%d1
55b22: 1010 moveb %a0@,%d0
55b24: c081 andl %d1,%d0
55b26: 1080 moveb %d0,%a0@
*(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8);
55b28: 4280 clrl %d0
55b2a: 206e fffc moveal %fp@(-4),%a0
55b2e: d1c3 addal %d3,%a0
55b30: 3002 movew %d2,%d0
55b32: 1210 moveb %a0@,%d1
55b34: e088 lsrl #8,%d0
55b36: 8081 orl %d1,%d0
55b38: 1080 moveb %d0,%a0@
55b3a: 6054 bras 55b90 <fat_set_fat_cluster+0x228>
}
}
break;
case FAT_FAT16:
*((uint16_t *)(sec_buf + ofs)) =
55b3c: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
break;
}
return RC_OK;
}
55b40: 0285 0000 ffff andil #65535,%d5 <== NOT EXECUTED
55b46: 2205 movel %d5,%d1 <== NOT EXECUTED
55b48: e089 lsrl #8,%d1 <== NOT EXECUTED
55b4a: e18d lsll #8,%d5 <== NOT EXECUTED
55b4c: 8285 orl %d5,%d1 <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(sec_buf + ofs)) =
55b4e: 3181 3800 movew %d1,%a0@(00000000,%d3:l) <== NOT EXECUTED
55b52: 7001 moveq #1,%d0 <== NOT EXECUTED
55b54: 1540 007e moveb %d0,%a2@(126) <== NOT EXECUTED
55b58: 6036 bras 55b90 <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));
55b5a: 0285 0fff ffff andil #268435455,%d5 <== NOT EXECUTED
55b60: 2f05 movel %d5,%sp@- <== NOT EXECUTED
55b62: 4eba fc60 jsr %pc@(557c4 <m68k_swap_u32>) <== NOT EXECUTED
*((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000);
55b66: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55b6a: 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));
55b6c: 588f addql #4,%sp <== NOT EXECUTED
*((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000);
55b6e: 2210 movel %a0@,%d1 <== NOT EXECUTED
55b70: 0281 0000 00f0 andil #240,%d1 <== NOT EXECUTED
*((uint32_t *)(sec_buf + ofs)) |= fat32_clv;
55b76: 8081 orl %d1,%d0 <== NOT EXECUTED
55b78: 7201 moveq #1,%d1 <== NOT EXECUTED
55b7a: 2080 movel %d0,%a0@ <== NOT EXECUTED
55b7c: 1541 007e moveb %d1,%a2@(126) <== NOT EXECUTED
55b80: 600e bras 55b90 <fat_set_fat_cluster+0x228> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
55b82: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
55b88: 78ff moveq #-1,%d4 <== NOT EXECUTED
55b8a: 7205 moveq #5,%d1 <== NOT EXECUTED
55b8c: 2040 moveal %d0,%a0 <== NOT EXECUTED
55b8e: 2081 movel %d1,%a0@ <== NOT EXECUTED
break;
}
return RC_OK;
}
55b90: 2004 movel %d4,%d0
55b92: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
55b98: 4e5e unlk %fp <== NOT EXECUTED
00050978 <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)
{
50978: 4e56 ffe8 linkw %fp,#-24
5097c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
50980: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
int i = 0;
rc = fat_sync(fs_info);
50984: 2f0a movel %a2,%sp@-
50986: 4eb9 0005 08a8 jsr 508a8 <fat_sync>
if ( rc != RC_OK )
5098c: 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);
5098e: 2400 movel %d0,%d2
if ( rc != RC_OK )
50990: 6702 beqs 50994 <fat_shutdown_drive+0x1c> <== ALWAYS TAKEN
rc = -1;
50992: 74ff moveq #-1,%d2 <== NOT EXECUTED
50994: 97cb subal %a3,%a3
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
50996: 49f9 0004 8790 lea 48790 <_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);
5099c: 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;
509a2: 262a 0062 movel %a2@(98),%d3
509a6: d68b addl %a3,%d3
while ( (node = rtems_chain_get(the_chain)) != NULL )
509a8: 6006 bras 509b0 <fat_shutdown_drive+0x38>
free(node);
509aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED
509ac: 4e95 jsr %a5@ <== NOT EXECUTED
509ae: 588f addql #4,%sp <== NOT EXECUTED
509b0: 2f03 movel %d3,%sp@-
509b2: 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 )
509b4: 588f addql #4,%sp
509b6: 4a80 tstl %d0
509b8: 66f0 bnes 509aa <fat_shutdown_drive+0x32> <== NEVER TAKEN
509ba: 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++)
509be: 103c 0018 moveb #24,%d0
509c2: b08b cmpl %a3,%d0
509c4: 66dc bnes 509a2 <fat_shutdown_drive+0x2a>
509c6: 97cb subal %a3,%a3
509c8: 49f9 0004 8790 lea 48790 <_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);
509ce: 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;
509d4: 262a 0066 movel %a2@(102),%d3
509d8: d68b addl %a3,%d3
while ( (node = rtems_chain_get(the_chain)) != NULL )
509da: 6006 bras 509e2 <fat_shutdown_drive+0x6a>
free(node);
509dc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
509de: 4e95 jsr %a5@ <== NOT EXECUTED
509e0: 588f addql #4,%sp <== NOT EXECUTED
509e2: 2f03 movel %d3,%sp@-
509e4: 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 )
509e6: 588f addql #4,%sp
509e8: 4a80 tstl %d0
509ea: 66f0 bnes 509dc <fat_shutdown_drive+0x64> <== NEVER TAKEN
509ec: 47eb 000c lea %a3@(12),%a3
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
509f0: 103c 0018 moveb #24,%d0
509f4: b08b cmpl %a3,%d0
509f6: 66dc bnes 509d4 <fat_shutdown_drive+0x5c>
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
509f8: 2f2a 0062 movel %a2@(98),%sp@-
509fc: 47f9 0004 3f4c lea 43f4c <free>,%a3
50a02: 4e93 jsr %a3@
free(fs_info->rhash);
50a04: 2f2a 0066 movel %a2@(102),%sp@-
50a08: 4e93 jsr %a3@
free(fs_info->uino);
50a0a: 2f2a 006a movel %a2@(106),%sp@-
50a0e: 4e93 jsr %a3@
free(fs_info->sec_buf);
50a10: 2f2a 0084 movel %a2@(132),%sp@-
50a14: 4e93 jsr %a3@
close(fs_info->vol.fd);
50a16: 2f2a 0056 movel %a2@(86),%sp@-
50a1a: 4eb9 0004 3cd8 jsr 43cd8 <close>
if (rc)
50a20: 4fef 0014 lea %sp@(20),%sp
50a24: 4a82 tstl %d2
50a26: 670c beqs 50a34 <fat_shutdown_drive+0xbc> <== ALWAYS TAKEN
errno = EIO;
50a28: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
50a2e: 2040 moveal %d0,%a0 <== NOT EXECUTED
50a30: 7005 moveq #5,%d0 <== NOT EXECUTED
50a32: 2080 movel %d0,%a0@ <== NOT EXECUTED
return rc;
}
50a34: 2002 movel %d2,%d0
50a36: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
50a3c: 4e5e unlk %fp <== NOT EXECUTED
000508a8 <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)
508a8: 4280 clrl %d0
508aa: 7204 moveq #4,%d1
return RC_OK;
}
int
fat_sync(fat_fs_info_t *fs_info)
{
508ac: 4e56 fff0 linkw %fp,#-16
508b0: 48d7 040c moveml %d2-%d3/%a2,%sp@
508b4: 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)
508b8: 102a 000e moveb %a2@(14),%d0
508bc: b280 cmpl %d0,%d1
508be: 6706 beqs 508c6 <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;
508c0: 4282 clrl %d2
508c2: 6000 0084 braw 50948 <fat_sync+0xa0>
if (fs_info->vol.type == FAT_FAT32)
{
uint32_t free_count = fs_info->vol.free_cls;
508c6: 262a 003e movel %a2@(62),%d3 <== NOT EXECUTED
uint32_t next_free = fs_info->vol.next_cl;
508ca: 242a 0046 movel %a2@(70),%d2 <== NOT EXECUTED
if (free_count != fs_info->vol.free_cls_in_fs_info)
508ce: b6aa 0042 cmpl %a2@(66),%d3 <== NOT EXECUTED
508d2: 6730 beqs 50904 <fat_sync+0x5c> <== NOT EXECUTED
{
uint32_t le_free_count = CT_LE_L(free_count);
508d4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
508d6: 4eba f240 jsr %pc@(4fb18 <m68k_swap_u32>) <== NOT EXECUTED
508da: 204e moveal %fp,%a0 <== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
508dc: 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);
508e0: 2100 movel %d0,%a0@- <== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
ret1 = fat_sector_write(fs_info,
508e2: 4280 clrl %d0 <== NOT EXECUTED
508e4: 2e88 movel %a0,%sp@ <== NOT EXECUTED
508e6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
508ea: 4878 01e8 pea 1e8 <DBL_MANT_DIG+0x1b3> <== NOT EXECUTED
508ee: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED
508f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
508f4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
508f6: 4eb9 0004 fe7a jsr 4fe7a <fat_sector_write> <== NOT EXECUTED
508fc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50900: 2600 movel %d0,%d3 <== NOT EXECUTED
50902: 6002 bras 50906 <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;
50904: 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)
50906: b4aa 004a cmpl %a2@(74),%d2 <== NOT EXECUTED
5090a: 6758 beqs 50964 <fat_sync+0xbc> <== NOT EXECUTED
{
uint32_t le_next_free = CT_LE_L(next_free);
5090c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5090e: 4eba f208 jsr %pc@(4fb18 <m68k_swap_u32>) <== NOT EXECUTED
50912: 204e moveal %fp,%a0 <== NOT EXECUTED
fs_info->vol.next_cl_in_fs_info = next_free;
50914: 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);
50918: 2100 movel %d0,%a0@- <== NOT EXECUTED
fs_info->vol.next_cl_in_fs_info = next_free;
ret2 = fat_sector_write(fs_info,
5091a: 4280 clrl %d0 <== NOT EXECUTED
5091c: 2e88 movel %a0,%sp@ <== NOT EXECUTED
5091e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
50922: 4878 01ec pea 1ec <DBL_MANT_DIG+0x1b7> <== NOT EXECUTED
50926: 302a 003c movew %a2@(60),%d0 <== NOT EXECUTED
5092a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5092c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5092e: 4eb9 0004 fe7a jsr 4fe7a <fat_sector_write> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
50934: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50938: 4a83 tstl %d3 <== NOT EXECUTED
5093a: 6c04 bges 50940 <fat_sync+0x98> <== NOT EXECUTED
{
int rc = RC_OK;
rc = fat_fat32_update_fsinfo_sector(fs_info);
if ( rc != RC_OK )
rc = -1;
5093c: 74ff moveq #-1,%d2 <== NOT EXECUTED
5093e: 6008 bras 50948 <fat_sync+0xa0> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
50940: 4a80 tstl %d0 <== NOT EXECUTED
50942: 6c00 ff7c bgew 508c0 <fat_sync+0x18> <== NOT EXECUTED
50946: 60f4 bras 5093c <fat_sync+0x94> <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(fs_info);
if ( rc != RC_OK )
rc = -1;
fat_buf_release(fs_info);
50948: 2f0a movel %a2,%sp@-
5094a: 4eb9 0004 fbaa jsr 4fbaa <fat_buf_release>
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
50950: 2f2a 005a movel %a2@(90),%sp@-
50954: 4eb9 0004 e402 jsr 4e402 <rtems_bdbuf_syncdev>
5095a: 508f addql #8,%sp
5095c: 4a80 tstl %d0
5095e: 670c beqs 5096c <fat_sync+0xc4> <== ALWAYS TAKEN
rc = -1;
50960: 74ff moveq #-1,%d2 <== NOT EXECUTED
50962: 6008 bras 5096c <fat_sync+0xc4> <== NOT EXECUTED
sizeof(le_next_free),
&le_next_free);
}
}
if ( (ret1 < 0) || (ret2 < 0) )
50964: 4a83 tstl %d3 <== NOT EXECUTED
50966: 6c00 ff58 bgew 508c0 <fat_sync+0x18> <== NOT EXECUTED
5096a: 60d0 bras 5093c <fat_sync+0x94> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
rc = -1;
return rc;
}
5096c: 2002 movel %d2,%d0
5096e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
50974: 4e5e unlk %fp <== NOT EXECUTED
0006accc <fchdir>:
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
6accc: 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;
6acd0: 4241 clrw %d1
/**
* compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
*/
int fchdir( int fd )
{
6acd2: 202e 0008 movel %fp@(8),%d0
6acd6: 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;
6acda: 42ae ffc6 clrl %fp@(-58)
st.st_uid = 0;
6acde: 3d41 ffcc movew %d1,%fp@(-52)
st.st_gid = 0;
6ace2: 3d41 ffce movew %d1,%fp@(-50)
rtems_libio_check_fd( fd );
6ace6: b0b9 0009 282c cmpl 9282c <rtems_libio_number_iops>,%d0
6acec: 6502 bcss 6acf0 <fchdir+0x24>
6acee: 601c bras 6ad0c <fchdir+0x40>
iop = rtems_libio_iop( fd );
6acf0: 2200 movel %d0,%d1
6acf2: ed88 lsll #6,%d0
6acf4: e989 lsll #4,%d1
6acf6: 2479 0009 7454 moveal 97454 <rtems_libio_iops>,%a2
6acfc: 9081 subl %d1,%d0
6acfe: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
6ad00: 202a 000c movel %a2@(12),%d0
6ad04: 0280 0000 0100 andil #256,%d0
6ad0a: 6612 bnes 6ad1e <fchdir+0x52>
6ad0c: 4eb9 0006 e674 jsr 6e674 <__errno>
6ad12: 74ff moveq #-1,%d2
6ad14: 7209 moveq #9,%d1
6ad16: 2040 moveal %d0,%a0
6ad18: 2081 movel %d1,%a0@
6ad1a: 6000 0096 braw 6adb2 <fchdir+0xe6>
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
6ad1e: 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 );
6ad22: 260a movel %a2,%d3
6ad24: 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 );
6ad2a: 2268 000c moveal %a0@(12),%a1
6ad2e: 2f08 movel %a0,%sp@-
6ad30: 2051 moveal %a1@,%a0
6ad32: 4e90 jsr %a0@
6ad34: 206a 0020 moveal %a2@(32),%a0
6ad38: 486e ffba pea %fp@(-70)
6ad3c: 2f03 movel %d3,%sp@-
6ad3e: 2068 0018 moveal %a0@(24),%a0
6ad42: 4e90 jsr %a0@
if ( rv == 0 ) {
6ad44: 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 );
6ad48: 2400 movel %d0,%d2
if ( rv == 0 ) {
6ad4a: 6642 bnes 6ad8e <fchdir+0xc2> <== NEVER TAKEN
bool access_ok = rtems_filesystem_check_access(
6ad4c: 4280 clrl %d0
6ad4e: 302e ffce movew %fp@(-50),%d0
6ad52: 2f00 movel %d0,%sp@-
6ad54: 302e ffcc movew %fp@(-52),%d0
6ad58: 2f00 movel %d0,%sp@-
6ad5a: 2f2e ffc6 movel %fp@(-58),%sp@-
6ad5e: 4878 0001 pea 1 <ADD>
6ad62: 4eb9 0004 c334 jsr 4c334 <rtems_filesystem_check_access>
st.st_mode,
st.st_uid,
st.st_gid
);
if ( access_ok ) {
6ad68: 4fef 0010 lea %sp@(16),%sp
6ad6c: 4a00 tstb %d0
6ad6e: 6710 beqs 6ad80 <fchdir+0xb4>
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
6ad70: 2f03 movel %d3,%sp@-
6ad72: 486e ffa2 pea %fp@(-94)
6ad76: 4eb9 0004 bd64 jsr 4bd64 <rtems_filesystem_location_clone>
6ad7c: 508f addql #8,%sp
6ad7e: 600e bras 6ad8e <fchdir+0xc2>
} else {
errno = EACCES;
6ad80: 4eb9 0006 e674 jsr 6e674 <__errno>
rv = -1;
6ad86: 74ff moveq #-1,%d2
);
if ( access_ok ) {
rtems_filesystem_location_clone( &loc, &iop->pathinfo );
} else {
errno = EACCES;
6ad88: 2040 moveal %d0,%a0
6ad8a: 700d moveq #13,%d0
6ad8c: 2080 movel %d0,%a0@
if ( rv == 0 ) {
rv = rtems_filesystem_chdir( &loc );
}
return rv;
}
6ad8e: 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 );
6ad92: 2268 000c moveal %a0@(12),%a1
6ad96: 2f08 movel %a0,%sp@-
6ad98: 2069 0004 moveal %a1@(4),%a0
6ad9c: 4e90 jsr %a0@
rv = -1;
}
}
rtems_filesystem_instance_unlock( &iop->pathinfo );
if ( rv == 0 ) {
6ad9e: 588f addql #4,%sp
6ada0: 4a82 tstl %d2
6ada2: 660e bnes 6adb2 <fchdir+0xe6>
rv = rtems_filesystem_chdir( &loc );
6ada4: 486e ffa2 pea %fp@(-94)
6ada8: 4eb9 0005 e06c jsr 5e06c <rtems_filesystem_chdir>
6adae: 588f addql #4,%sp
6adb0: 2400 movel %d0,%d2
}
return rv;
}
6adb2: 2002 movel %d2,%d0
6adb4: 4cee 040c ff94 moveml %fp@(-108),%d2-%d3/%a2
6adba: 4e5e unlk %fp
...
0005e378 <fchmod>:
/**
* POSIX 1003.1b 5.6.4 - Change File Modes
*/
int fchmod( int fd, mode_t mode )
{
5e378: 4e56 fffc linkw %fp,#-4
5e37c: 202e 0008 movel %fp@(8),%d0
5e380: 2f0a movel %a2,%sp@-
int rv;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5e382: b0b9 0009 282c cmpl 9282c <rtems_libio_number_iops>,%d0
5e388: 6502 bcss 5e38c <fchmod+0x14>
5e38a: 601c bras 5e3a8 <fchmod+0x30>
iop = rtems_libio_iop( fd );
5e38c: 2200 movel %d0,%d1
5e38e: ed88 lsll #6,%d0
5e390: e989 lsll #4,%d1
5e392: 2479 0009 7454 moveal 97454 <rtems_libio_iops>,%a2
5e398: 9081 subl %d1,%d0
5e39a: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
5e39c: 202a 000c movel %a2@(12),%d0
5e3a0: 0280 0000 0100 andil #256,%d0
5e3a6: 660e bnes 5e3b6 <fchmod+0x3e>
5e3a8: 4eb9 0006 e674 jsr 6e674 <__errno>
5e3ae: 7209 moveq #9,%d1
5e3b0: 2040 moveal %d0,%a0
5e3b2: 2081 movel %d1,%a0@
5e3b4: 6054 bras 5e40a <fchmod+0x92>
if (iop->pathinfo.mt_entry->writeable) {
5e3b6: 206a 0024 moveal %a2@(36),%a0
5e3ba: 4a28 0029 tstb %a0@(41)
5e3be: 673e beqs 5e3fe <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 );
5e3c0: 2268 000c moveal %a0@(12),%a1
5e3c4: 2f08 movel %a0,%sp@-
5e3c6: 2051 moveal %a1@,%a0
5e3c8: 4e90 jsr %a0@
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->fchmod_h)( &iop->pathinfo, mode );
5e3ca: 206a 0024 moveal %a2@(36),%a0
5e3ce: 2068 000c moveal %a0@(12),%a0
5e3d2: 2f2e 000c movel %fp@(12),%sp@-
5e3d6: 486a 0010 pea %a2@(16)
5e3da: 2068 0020 moveal %a0@(32),%a0
5e3de: 4e90 jsr %a0@
errno = EROFS;
rv = -1;
}
return rv;
}
5e3e0: 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 );
5e3e4: 2268 000c moveal %a0@(12),%a1
5e3e8: 2f08 movel %a0,%sp@-
5e3ea: 2069 0004 moveal %a1@(4),%a0
5e3ee: 2d40 fffc movel %d0,%fp@(-4)
5e3f2: 4e90 jsr %a0@
5e3f4: 202e fffc movel %fp@(-4),%d0
5e3f8: 4fef 0010 lea %sp@(16),%sp
5e3fc: 600e bras 5e40c <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;
5e3fe: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5e404: 2040 moveal %d0,%a0 <== NOT EXECUTED
5e406: 701e moveq #30,%d0 <== NOT EXECUTED
5e408: 2080 movel %d0,%a0@ <== NOT EXECUTED
rv = -1;
5e40a: 70ff moveq #-1,%d0
}
return rv;
}
5e40c: 246e fff8 moveal %fp@(-8),%a2
5e410: 4e5e unlk %fp <== NOT EXECUTED
0005e414 <fchown>:
/**
* POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
*/
int fchown( int fd, uid_t owner, gid_t group )
{
5e414: 4e56 fff0 linkw %fp,#-16
5e418: 202e 0008 movel %fp@(8),%d0
5e41c: 48d7 040c moveml %d2-%d3/%a2,%sp@
5e420: 342e 000e movew %fp@(14),%d2
5e424: 362e 0012 movew %fp@(18),%d3
int rv = 0;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5e428: b0b9 0009 282c cmpl 9282c <rtems_libio_number_iops>,%d0
5e42e: 6502 bcss 5e432 <fchown+0x1e>
5e430: 601c bras 5e44e <fchown+0x3a>
iop = rtems_libio_iop( fd );
5e432: 2200 movel %d0,%d1
5e434: ed88 lsll #6,%d0
5e436: e989 lsll #4,%d1
5e438: 2479 0009 7454 moveal 97454 <rtems_libio_iops>,%a2
5e43e: 9081 subl %d1,%d0
5e440: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
5e442: 202a 000c movel %a2@(12),%d0
5e446: 0280 0000 0100 andil #256,%d0
5e44c: 660e bnes 5e45c <fchown+0x48>
5e44e: 4eb9 0006 e674 jsr 6e674 <__errno>
5e454: 7209 moveq #9,%d1
5e456: 2040 moveal %d0,%a0
5e458: 2081 movel %d1,%a0@
5e45a: 6058 bras 5e4b4 <fchown+0xa0>
if (iop->pathinfo.mt_entry->writeable) {
5e45c: 206a 0024 moveal %a2@(36),%a0
5e460: 4a28 0029 tstb %a0@(41)
5e464: 6742 beqs 5e4a8 <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 );
5e466: 2268 000c moveal %a0@(12),%a1
5e46a: 2f08 movel %a0,%sp@-
5e46c: 2051 moveal %a1@,%a0
5e46e: 4e90 jsr %a0@
rtems_filesystem_instance_lock( &iop->pathinfo );
rv = (*iop->pathinfo.mt_entry->ops->chown_h)(
5e470: 206a 0024 moveal %a2@(36),%a0
5e474: 2068 000c moveal %a0@(12),%a0
5e478: 3f03 movew %d3,%sp@-
5e47a: 4267 clrw %sp@-
5e47c: 3f02 movew %d2,%sp@-
5e47e: 4267 clrw %sp@-
5e480: 486a 0010 pea %a2@(16)
5e484: 2068 0024 moveal %a0@(36),%a0
5e488: 4e90 jsr %a0@
errno = EROFS;
rv = -1;
}
return rv;
}
5e48a: 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 );
5e48e: 2268 000c moveal %a0@(12),%a1
5e492: 2f08 movel %a0,%sp@-
5e494: 2069 0004 moveal %a1@(4),%a0
5e498: 2d40 fffc movel %d0,%fp@(-4)
5e49c: 4e90 jsr %a0@
5e49e: 202e fffc movel %fp@(-4),%d0
5e4a2: 4fef 0014 lea %sp@(20),%sp
5e4a6: 600e bras 5e4b6 <fchown+0xa2>
owner,
group
);
rtems_filesystem_instance_unlock( &iop->pathinfo );
} else {
errno = EROFS;
5e4a8: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5e4ae: 2040 moveal %d0,%a0 <== NOT EXECUTED
5e4b0: 701e moveq #30,%d0 <== NOT EXECUTED
5e4b2: 2080 movel %d0,%a0@ <== NOT EXECUTED
rv = -1;
5e4b4: 70ff moveq #-1,%d0
}
return rv;
}
5e4b6: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
5e4bc: 4e5e unlk %fp <== NOT EXECUTED
0006a51c <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
6a51c: 4e56 ffec linkw %fp,#-20
6a520: 202e 0008 movel %fp@(8),%d0
6a524: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
6a528: 262e 000c movel %fp@(12),%d3
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
6a52c: b0b9 0007 0018 cmpl 70018 <rtems_libio_number_iops>,%d0
6a532: 6502 bcss 6a536 <fcntl+0x1a>
6a534: 601a bras 6a550 <fcntl+0x34>
iop = rtems_libio_iop( fd );
6a536: 2200 movel %d0,%d1
6a538: ed88 lsll #6,%d0
6a53a: e989 lsll #4,%d1
6a53c: 2479 0008 1890 moveal 81890 <rtems_libio_iops>,%a2
6a542: 9081 subl %d1,%d0
6a544: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
6a546: 242a 000c movel %a2@(12),%d2
6a54a: 0802 0008 btst #8,%d2
6a54e: 6610 bnes 6a560 <fcntl+0x44>
6a550: 4eb9 0005 bd98 jsr 5bd98 <__errno>
6a556: 7209 moveq #9,%d1
6a558: 2040 moveal %d0,%a0
6a55a: 2081 movel %d1,%a0@
6a55c: 6000 0152 braw 6a6b0 <fcntl+0x194>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
6a560: 7009 moveq #9,%d0
6a562: b083 cmpl %d3,%d0
6a564: 6500 011a bcsw 6a680 <fcntl+0x164>
6a568: 303b 3a08 movew %pc@(6a572 <fcntl+0x56>,%d3:l:2),%d0
6a56c: 48c0 extl %d0
6a56e: 4efb 0802 jmp %pc@(6a572 <fcntl+0x56>,%d0:l)
6a572: 0014 .short 0x0014 <== NOT EXECUTED
6a574: 00a8 00b4 00ca oril #11796682,%d0 <== NOT EXECUTED
6a57a: 00d8 .short 0x00d8 <== NOT EXECUTED
6a57c: 00fe .short 0x00fe <== NOT EXECUTED
6a57e: 00fe .short 0x00fe <== NOT EXECUTED
6a580: 00fe .short 0x00fe <== NOT EXECUTED
6a582: 00fe .short 0x00fe <== NOT EXECUTED
6a584: 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();
6a586: 4eb9 0004 66b0 jsr 466b0 <rtems_libio_allocate>
6a58c: 2640 moveal %d0,%a3
if (diop != NULL) {
6a58e: 4a80 tstl %d0
6a590: 6700 011e beqw 6a6b0 <fcntl+0x194>
int oflag = rtems_libio_to_fcntl_flags( iop->flags );
6a594: 2f2a 000c movel %a2@(12),%sp@-
6a598: 4eb9 0004 6660 jsr 46660 <rtems_libio_to_fcntl_flags>
oflag &= ~O_CREAT;
diop->flags |= rtems_libio_fcntl_flags( oflag );
6a59e: 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;
6a5a2: 2400 movel %d0,%d2
6a5a4: 0882 0009 bclr #9,%d2
diop->flags |= rtems_libio_fcntl_flags( oflag );
6a5a8: 2f02 movel %d2,%sp@-
6a5aa: 4eb9 0004 6620 jsr 46620 <rtems_libio_fcntl_flags>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
6a5b0: 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 );
6a5b4: 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 );
6a5b6: 2268 000c moveal %a0@(12),%a1
6a5ba: 2740 000c movel %d0,%a3@(12)
6a5be: 2f08 movel %a0,%sp@-
6a5c0: 2051 moveal %a1@,%a0
6a5c2: 4e90 jsr %a0@
rtems_filesystem_instance_lock( &iop->pathinfo );
rtems_filesystem_location_clone( &diop->pathinfo, &iop->pathinfo );
6a5c4: 486a 0010 pea %a2@(16)
6a5c8: 486b 0010 pea %a3@(16)
6a5cc: 4eb9 0005 329c jsr 5329c <rtems_filesystem_location_clone>
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
}
6a5d2: 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 );
6a5d6: 2268 000c moveal %a0@(12),%a1
6a5da: 2f08 movel %a0,%sp@-
6a5dc: 2069 0004 moveal %a1@(4),%a0
6a5e0: 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 );
6a5e2: 206b 0020 moveal %a3@(32),%a0
6a5e6: 42a7 clrl %sp@-
6a5e8: 2f02 movel %d2,%sp@-
6a5ea: 42a7 clrl %sp@-
6a5ec: 2f0b movel %a3,%sp@-
6a5ee: 2050 moveal %a0@,%a0
6a5f0: 4e90 jsr %a0@
if ( rv == 0 ) {
6a5f2: 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 );
6a5f6: 2400 movel %d0,%d2
if ( rv == 0 ) {
6a5f8: 6616 bnes 6a610 <fcntl+0xf4> <== NEVER TAKEN
rv = diop - rtems_libio_iops;
6a5fa: 240b movel %a3,%d2
6a5fc: 94b9 0008 1890 subl 81890 <rtems_libio_iops>,%d2
6a602: 203c aaaa aaab movel #-1431655765,%d0
6a608: e882 asrl #4,%d2
6a60a: 4c00 2800 mulsl %d0,%d2
6a60e: 607e bras 6a68e <fcntl+0x172>
} else {
rtems_libio_free( diop );
6a610: 2f0b movel %a3,%sp@- <== NOT EXECUTED
6a612: 4eb9 0004 6710 jsr 46710 <rtems_libio_free> <== NOT EXECUTED
6a618: 602c bras 6a646 <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);
6a61a: 700b moveq #11,%d0
6a61c: e0aa lsrl %d0,%d2
6a61e: 103c 0001 moveb #1,%d0
6a622: c480 andl %d0,%d2
6a624: 606c bras 6a692 <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 ) )
6a626: 4aae 0010 tstl %fp@(16)
6a62a: 6706 beqs 6a632 <fcntl+0x116>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
6a62c: 08c2 000b bset #11,%d2
6a630: 6004 bras 6a636 <fcntl+0x11a>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
6a632: 0882 000b bclr #11,%d2
6a636: 2542 000c movel %d2,%a2@(12)
6a63a: 6030 bras 6a66c <fcntl+0x150>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
6a63c: 2f02 movel %d2,%sp@-
6a63e: 4eb9 0004 6660 jsr 46660 <rtems_libio_to_fcntl_flags>
6a644: 2400 movel %d0,%d2
6a646: 588f addql #4,%sp
6a648: 6044 bras 6a68e <fcntl+0x172>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
6a64a: 2f2e 0010 movel %fp@(16),%sp@-
6a64e: 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);
6a654: 222a 000c movel %a2@(12),%d1
6a658: 588f addql #4,%sp
6a65a: 0280 0000 0201 andil #513,%d0
6a660: 0281 ffff fdfe andil #-514,%d1
6a666: 8081 orl %d1,%d0
6a668: 2540 000c movel %d0,%a2@(12)
{
rtems_libio_t *iop;
int fd2;
int flags;
int mask;
int ret = 0;
6a66c: 4282 clrl %d2
6a66e: 6022 bras 6a692 <fcntl+0x176>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
6a670: 4eb9 0005 bd98 jsr 5bd98 <__errno>
6a676: 2040 moveal %d0,%a0
6a678: 20bc 0000 0086 movel #134,%a0@
6a67e: 6030 bras 6a6b0 <fcntl+0x194>
ret = -1;
break;
default:
errno = EINVAL;
6a680: 4eb9 0005 bd98 jsr 5bd98 <__errno>
6a686: 2040 moveal %d0,%a0
6a688: 7016 moveq #22,%d0
6a68a: 2080 movel %d0,%a0@
6a68c: 6022 bras 6a6b0 <fcntl+0x194>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
6a68e: 4a82 tstl %d2
6a690: 6d20 blts 6a6b2 <fcntl+0x196> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( iop, cmd );
6a692: 206a 0020 moveal %a2@(32),%a0
6a696: 2f03 movel %d3,%sp@-
6a698: 2f0a movel %a2,%sp@-
6a69a: 2068 0028 moveal %a0@(40),%a0
6a69e: 4e90 jsr %a0@
if (err) {
6a6a0: 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 );
6a6a2: 2600 movel %d0,%d3
if (err) {
6a6a4: 670c beqs 6a6b2 <fcntl+0x196> <== ALWAYS TAKEN
errno = err;
6a6a6: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
6a6ac: 2040 moveal %d0,%a0 <== NOT EXECUTED
6a6ae: 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);
6a6b0: 74ff moveq #-1,%d2
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
6a6b2: 2002 movel %d2,%d0
6a6b4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
6a6ba: 4e5e unlk %fp <== NOT EXECUTED
0004bb2c <fifo_open>:
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4bb2c: 4e56 ffd8 linkw %fp,#-40
4bb30: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4bb34: 266e 0008 moveal %fp@(8),%a3
4bb38: 286e 000c moveal %fp@(12),%a4
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4bb3c: 4ab9 0006 07d4 tstl 607d4 <pipe_semaphore>
4bb42: 671c beqs 4bb60 <fifo_open+0x34>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4bb44: 42a7 clrl %sp@-
4bb46: 42a7 clrl %sp@-
4bb48: 2f39 0006 07d4 movel 607d4 <pipe_semaphore>,%sp@-
4bb4e: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
4bb54: 4fef 000c lea %sp@(12),%sp
4bb58: 4a80 tstl %d0
4bb5a: 6700 0392 beqw 4beee <fifo_open+0x3c2>
4bb5e: 6054 bras 4bbb4 <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 );
4bb60: 42a7 clrl %sp@-
4bb62: 42a7 clrl %sp@-
4bb64: 2f39 0006 0ecc movel 60ecc <rtems_libio_semaphore>,%sp@-
4bb6a: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
4bb70: 4fef 000c lea %sp@(12),%sp
4bb74: 4ab9 0006 07d4 tstl 607d4 <pipe_semaphore>
4bb7a: 6624 bnes 4bba0 <fifo_open+0x74> <== NEVER TAKEN
sc = rtems_semaphore_create(
4bb7c: 4879 0006 07d4 pea 607d4 <pipe_semaphore>
4bb82: 42a7 clrl %sp@-
4bb84: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4bb88: 4878 0001 pea 1 <ADD>
4bb8c: 2f3c 5049 5045 movel #1346981957,%sp@-
4bb92: 4eb9 0004 7784 jsr 47784 <rtems_semaphore_create>
4bb98: 4fef 0014 lea %sp@(20),%sp
4bb9c: 2400 movel %d0,%d2
4bb9e: 6002 bras 4bba2 <fifo_open+0x76>
free(pipe);
}
static int pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
4bba0: 4282 clrl %d2 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bba2: 2f39 0006 0ecc movel 60ecc <rtems_libio_semaphore>,%sp@-
4bba8: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4bbae: 588f addql #4,%sp
4bbb0: 4a82 tstl %d2
4bbb2: 6790 beqs 4bb44 <fifo_open+0x18>
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
4bbb4: 74f4 moveq #-12,%d2
4bbb6: 6000 0354 braw 4bf0c <fifo_open+0x3e0>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4bbba: 4878 0034 pea 34 <OPER2+0x20>
4bbbe: 4bf9 0004 3fa8 lea 43fa8 <malloc>,%a5
4bbc4: 4e95 jsr %a5@
if (pipe == NULL)
4bbc6: 588f addql #4,%sp
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4bbc8: 2440 moveal %d0,%a2
if (pipe == NULL)
4bbca: 4a80 tstl %d0
4bbcc: 6700 032c beqw 4befa <fifo_open+0x3ce>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4bbd0: 4878 0034 pea 34 <OPER2+0x20>
4bbd4: 42a7 clrl %sp@-
4bbd6: 2f00 movel %d0,%sp@-
4bbd8: 4eb9 0004 fcd4 jsr 4fcd4 <memset>
pipe->Size = PIPE_BUF;
4bbde: 203c 0000 0200 movel #512,%d0
4bbe4: 2540 0004 movel %d0,%a2@(4)
pipe->Buffer = malloc(pipe->Size);
4bbe8: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4bbec: 4e95 jsr %a5@
if (! pipe->Buffer)
4bbee: 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);
4bbf2: 2480 movel %d0,%a2@
if (! pipe->Buffer)
4bbf4: 6700 0106 beqw 4bcfc <fifo_open+0x1d0>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4bbf8: 486a 002c pea %a2@(44)
4bbfc: 4bf9 0004 d30c lea 4d30c <rtems_barrier_create>,%a5
rtems_build_name ('P', 'I', 'r', c),
4bc02: 1039 0005 f888 moveb 5f888 <c.7046>,%d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4bc08: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'r', c),
4bc0a: 49c0 extbl %d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4bc0c: 42a7 clrl %sp@-
4bc0e: 0080 5049 7200 oril #1346990592,%d0
4bc14: 2f00 movel %d0,%sp@-
4bc16: 4e95 jsr %a5@
4bc18: 4fef 0010 lea %sp@(16),%sp
4bc1c: 4a80 tstl %d0
4bc1e: 6600 00d2 bnew 4bcf2 <fifo_open+0x1c6>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4bc22: 486a 0030 pea %a2@(48)
rtems_build_name ('P', 'I', 'w', c),
4bc26: 1039 0005 f888 moveb 5f888 <c.7046>,%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(
4bc2c: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'w', c),
4bc2e: 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(
4bc30: 42a7 clrl %sp@-
4bc32: 0080 5049 7700 oril #1346991872,%d0
4bc38: 2f00 movel %d0,%sp@-
4bc3a: 4e95 jsr %a5@
4bc3c: 4fef 0010 lea %sp@(16),%sp
4bc40: 4a80 tstl %d0
4bc42: 6600 00a2 bnew 4bce6 <fifo_open+0x1ba>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4bc46: 486a 0028 pea %a2@(40)
rtems_build_name ('P', 'I', 's', c), 1,
4bc4a: 1039 0005 f888 moveb 5f888 <c.7046>,%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(
4bc50: 42a7 clrl %sp@-
4bc52: 4878 0010 pea 10 <INVALID_OPERATION>
rtems_build_name ('P', 'I', 's', c), 1,
4bc56: 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(
4bc58: 4878 0001 pea 1 <ADD>
4bc5c: 0080 5049 7300 oril #1346990848,%d0
4bc62: 2f00 movel %d0,%sp@-
4bc64: 4eb9 0004 7784 jsr 47784 <rtems_semaphore_create>
4bc6a: 4fef 0014 lea %sp@(20),%sp
4bc6e: 4a80 tstl %d0
4bc70: 6668 bnes 4bcda <fifo_open+0x1ae> <== NEVER TAKEN
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
4bc72: 260e movel %fp,%d3
4bc74: 5983 subql #4,%d3
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
4bc76: 243c 0004 9218 movel #299544,%d2
4bc7c: 2042 moveal %d2,%a0
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4bc7e: 4bf9 0004 9e14 lea 49e14 <_Thread_Enable_dispatch>,%a5
4bc84: 2f03 movel %d3,%sp@-
4bc86: 2f2a 002c movel %a2@(44),%sp@-
4bc8a: 4879 0006 17fc pea 617fc <_Barrier_Information>
4bc90: 4e90 jsr %a0@
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4bc92: 223c 1000 0000 movel #268435456,%d1
4bc98: 2040 moveal %d0,%a0
4bc9a: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4bc9e: 4e95 jsr %a5@
4bca0: 2042 moveal %d2,%a0
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4bca2: 747a moveq #122,%d2
4bca4: 2f03 movel %d3,%sp@-
4bca6: 2f2a 0030 movel %a2@(48),%sp@-
4bcaa: 4879 0006 17fc pea 617fc <_Barrier_Information>
4bcb0: 4e90 jsr %a0@
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4bcb2: 223c 1000 0000 movel #268435456,%d1
4bcb8: 2040 moveal %d0,%a0
4bcba: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4bcbe: 4e95 jsr %a5@
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4bcc0: 4fef 0018 lea %sp@(24),%sp
4bcc4: 1039 0005 f888 moveb 5f888 <c.7046>,%d0
4bcca: 1200 moveb %d0,%d1
4bccc: 49c1 extbl %d1
4bcce: b481 cmpl %d1,%d2
4bcd0: 6600 022e bnew 4bf00 <fifo_open+0x3d4>
c = 'a';
4bcd4: 7061 moveq #97,%d0
4bcd6: 6000 022a braw 4bf02 <fifo_open+0x3d6>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4bcda: 2f2a 0030 movel %a2@(48),%sp@-
4bcde: 4eb9 0004 d3c4 jsr 4d3c4 <rtems_barrier_delete>
4bce4: 588f addql #4,%sp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
4bce6: 2f2a 002c movel %a2@(44),%sp@-
4bcea: 4eb9 0004 d3c4 jsr 4d3c4 <rtems_barrier_delete>
4bcf0: 588f addql #4,%sp
err_rbar:
free(pipe->Buffer);
4bcf2: 2f12 movel %a2@,%sp@-
4bcf4: 4eb9 0004 3ba8 jsr 43ba8 <free>
4bcfa: 588f addql #4,%sp
err_buf:
free(pipe);
4bcfc: 2f0a movel %a2,%sp@-
4bcfe: 4eb9 0004 3ba8 jsr 43ba8 <free>
4bd04: 588f addql #4,%sp
4bd06: 6000 01f2 braw 4befa <fifo_open+0x3ce>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4bd0a: 42a7 clrl %sp@-
4bd0c: 42a7 clrl %sp@-
4bd0e: 2f2a 0028 movel %a2@(40),%sp@-
4bd12: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_obtain>
4bd18: 4fef 000c lea %sp@(12),%sp
4bd1c: 4a80 tstl %d0
4bd1e: 6604 bnes 4bd24 <fifo_open+0x1f8> <== NEVER TAKEN
4bd20: 4282 clrl %d2
4bd22: 6002 bras 4bd26 <fifo_open+0x1fa>
err = -EINTR;
4bd24: 74fc moveq #-4,%d2 <== NOT EXECUTED
if (*pipep == NULL) {
4bd26: 4a93 tstl %a3@
4bd28: 6610 bnes 4bd3a <fifo_open+0x20e>
if (err)
4bd2a: 4a82 tstl %d2
4bd2c: 670a beqs 4bd38 <fifo_open+0x20c> <== ALWAYS TAKEN
pipe_free(pipe);
4bd2e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bd30: 4eba fd1e jsr %pc@(4ba50 <pipe_free>) <== NOT EXECUTED
4bd34: 588f addql #4,%sp <== NOT EXECUTED
4bd36: 6002 bras 4bd3a <fifo_open+0x20e> <== NOT EXECUTED
else
*pipep = pipe;
4bd38: 268a movel %a2,%a3@
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
4bd3a: 2f39 0006 07d4 movel 607d4 <pipe_semaphore>,%sp@-
4bd40: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4bd46: 588f addql #4,%sp
4bd48: 4a82 tstl %d2
4bd4a: 6600 01c0 bnew 4bf0c <fifo_open+0x3e0>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4bd4e: 7006 moveq #6,%d0
4bd50: 7204 moveq #4,%d1
4bd52: c0ac 000c andl %a4@(12),%d0
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4bd56: 2453 moveal %a3@,%a2
switch (LIBIO_ACCMODE(iop)) {
4bd58: b280 cmpl %d0,%d1
4bd5a: 6700 009c beqw 4bdf8 <fifo_open+0x2cc>
4bd5e: 123c 0006 moveb #6,%d1
4bd62: b280 cmpl %d0,%d1
4bd64: 6700 0122 beqw 4be88 <fifo_open+0x35c>
4bd68: 123c 0002 moveb #2,%d1
4bd6c: b280 cmpl %d0,%d1
4bd6e: 6600 0160 bnew 4bed0 <fifo_open+0x3a4>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4bd72: 202a 0010 movel %a2@(16),%d0
4bd76: 2040 moveal %d0,%a0
4bd78: 5288 addql #1,%a0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4bd7a: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4bd7e: 2548 0010 movel %a0,%a2@(16)
4bd82: 4a80 tstl %d0
4bd84: 6610 bnes 4bd96 <fifo_open+0x26a> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
4bd86: 486e fff8 pea %fp@(-8)
4bd8a: 2f2a 0030 movel %a2@(48),%sp@-
4bd8e: 4eb9 0004 d460 jsr 4d460 <rtems_barrier_release>
4bd94: 508f addql #8,%sp
if (pipe->Writers == 0) {
4bd96: 4aaa 0014 tstl %a2@(20)
4bd9a: 6600 0134 bnew 4bed0 <fifo_open+0x3a4>
/* Not an error */
if (LIBIO_NODELAY(iop))
4bd9e: 7001 moveq #1,%d0
4bda0: c0ac 000c andl %a4@(12),%d0
4bda4: 6600 012a bnew 4bed0 <fifo_open+0x3a4>
break;
prevCounter = pipe->writerCounter;
4bda8: 262a 0024 movel %a2@(36),%d3
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4bdac: 4bf9 0004 7ac8 lea 47ac8 <rtems_semaphore_release>,%a5
if (! PIPE_READWAIT(pipe))
4bdb2: 283c 0004 d4c4 movel #316612,%d4
goto out_error;
if (! PIPE_LOCK(pipe))
4bdb8: 2a3c 0004 79c0 movel #293312,%d5
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4bdbe: 2f2a 0028 movel %a2@(40),%sp@-
4bdc2: 4e95 jsr %a5@
if (! PIPE_READWAIT(pipe))
4bdc4: 2044 moveal %d4,%a0
4bdc6: 42a7 clrl %sp@-
4bdc8: 2f2a 002c movel %a2@(44),%sp@-
4bdcc: 4e90 jsr %a0@
4bdce: 4fef 000c lea %sp@(12),%sp
4bdd2: 4a80 tstl %d0
4bdd4: 6600 0108 bnew 4bede <fifo_open+0x3b2>
goto out_error;
if (! PIPE_LOCK(pipe))
4bdd8: 42a7 clrl %sp@-
4bdda: 2045 moveal %d5,%a0
4bddc: 42a7 clrl %sp@-
4bdde: 2f2a 0028 movel %a2@(40),%sp@-
4bde2: 4e90 jsr %a0@
4bde4: 4fef 000c lea %sp@(12),%sp
4bde8: 4a80 tstl %d0
4bdea: 6600 00f2 bnew 4bede <fifo_open+0x3b2>
goto out_error;
} while (prevCounter == pipe->writerCounter);
4bdee: b6aa 0024 cmpl %a2@(36),%d3
4bdf2: 67ca beqs 4bdbe <fifo_open+0x292> <== NEVER TAKEN
4bdf4: 6000 00da braw 4bed0 <fifo_open+0x3a4>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4bdf8: 202a 0014 movel %a2@(20),%d0
4bdfc: 2200 movel %d0,%d1
4bdfe: 5281 addql #1,%d1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4be00: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4be04: 2541 0014 movel %d1,%a2@(20)
4be08: 4a80 tstl %d0
4be0a: 6610 bnes 4be1c <fifo_open+0x2f0> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4be0c: 486e fff8 pea %fp@(-8)
4be10: 2f2a 002c movel %a2@(44),%sp@-
4be14: 4eb9 0004 d460 jsr 4d460 <rtems_barrier_release>
4be1a: 508f addql #8,%sp
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4be1c: 4aaa 0010 tstl %a2@(16)
4be20: 6600 00ae bnew 4bed0 <fifo_open+0x3a4>
4be24: 7001 moveq #1,%d0
4be26: c0ac 000c andl %a4@(12),%d0
4be2a: 6712 beqs 4be3e <fifo_open+0x312>
PIPE_UNLOCK(pipe);
4be2c: 2f2a 0028 movel %a2@(40),%sp@-
err = -ENXIO;
4be30: 74fa moveq #-6,%d2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4be32: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
4be38: 588f addql #4,%sp
4be3a: 6000 00a4 braw 4bee0 <fifo_open+0x3b4>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4be3e: 262a 0020 movel %a2@(32),%d3
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4be42: 4bf9 0004 7ac8 lea 47ac8 <rtems_semaphore_release>,%a5
if (! PIPE_WRITEWAIT(pipe))
4be48: 283c 0004 d4c4 movel #316612,%d4
goto out_error;
if (! PIPE_LOCK(pipe))
4be4e: 2a3c 0004 79c0 movel #293312,%d5
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4be54: 2f2a 0028 movel %a2@(40),%sp@-
4be58: 4e95 jsr %a5@
if (! PIPE_WRITEWAIT(pipe))
4be5a: 2044 moveal %d4,%a0
4be5c: 42a7 clrl %sp@-
4be5e: 2f2a 0030 movel %a2@(48),%sp@-
4be62: 4e90 jsr %a0@
4be64: 4fef 000c lea %sp@(12),%sp
4be68: 4a80 tstl %d0
4be6a: 6672 bnes 4bede <fifo_open+0x3b2> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
4be6c: 42a7 clrl %sp@-
4be6e: 2045 moveal %d5,%a0
4be70: 42a7 clrl %sp@-
4be72: 2f2a 0028 movel %a2@(40),%sp@-
4be76: 4e90 jsr %a0@
4be78: 4fef 000c lea %sp@(12),%sp
4be7c: 4a80 tstl %d0
4be7e: 665e bnes 4bede <fifo_open+0x3b2> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
4be80: b6aa 0020 cmpl %a2@(32),%d3
4be84: 67ce beqs 4be54 <fifo_open+0x328> <== NEVER TAKEN
4be86: 6048 bras 4bed0 <fifo_open+0x3a4>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4be88: 202a 0010 movel %a2@(16),%d0
4be8c: 2200 movel %d0,%d1
4be8e: 5281 addql #1,%d1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4be90: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4be94: 2541 0010 movel %d1,%a2@(16)
4be98: 4a80 tstl %d0
4be9a: 6610 bnes 4beac <fifo_open+0x380> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
4be9c: 486e fff8 pea %fp@(-8)
4bea0: 2f2a 0030 movel %a2@(48),%sp@-
4bea4: 4eb9 0004 d460 jsr 4d460 <rtems_barrier_release>
4beaa: 508f addql #8,%sp
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4beac: 202a 0014 movel %a2@(20),%d0
4beb0: 2040 moveal %d0,%a0
4beb2: 5288 addql #1,%a0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4beb4: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4beb8: 2548 0014 movel %a0,%a2@(20)
4bebc: 4a80 tstl %d0
4bebe: 6610 bnes 4bed0 <fifo_open+0x3a4> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4bec0: 486e fff8 pea %fp@(-8)
4bec4: 2f2a 002c movel %a2@(44),%sp@-
4bec8: 4eb9 0004 d460 jsr 4d460 <rtems_barrier_release>
4bece: 508f addql #8,%sp
break;
}
PIPE_UNLOCK(pipe);
4bed0: 2f2a 0028 movel %a2@(40),%sp@-
4bed4: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
return 0;
4beda: 588f addql #4,%sp
4bedc: 602e bras 4bf0c <fifo_open+0x3e0>
/* Not an error */
if (LIBIO_NODELAY(iop))
break;
prevCounter = pipe->writerCounter;
err = -EINTR;
4bede: 74fc moveq #-4,%d2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4bee0: 2f0c movel %a4,%sp@-
4bee2: 2f0b movel %a3,%sp@-
4bee4: 4eb9 0004 ba98 jsr 4ba98 <pipe_release>
return err;
4beea: 508f addql #8,%sp
4beec: 601e bras 4bf0c <fifo_open+0x3e0>
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
4beee: 2453 moveal %a3@,%a2
if (pipe == NULL) {
4bef0: 4a8a tstl %a2
4bef2: 6600 fe16 bnew 4bd0a <fifo_open+0x1de>
4bef6: 6000 fcc2 braw 4bbba <fifo_open+0x8e>
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
4befa: 74f4 moveq #-12,%d2
4befc: 6000 fe3c braw 4bd3a <fifo_open+0x20e>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4bf00: 5280 addql #1,%d0
4bf02: 13c0 0005 f888 moveb %d0,5f888 <c.7046>
4bf08: 6000 fe00 braw 4bd0a <fifo_open+0x1de>
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4bf0c: 2002 movel %d2,%d0
4bf0e: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5
4bf14: 4e5e unlk %fp <== NOT EXECUTED
000475ec <fpathconf>:
*/
long fpathconf(
int fd,
int name
)
{
475ec: 4e56 0000 linkw %fp,#0
475f0: 202e 0008 movel %fp@(8),%d0
475f4: 222e 000c movel %fp@(12),%d1
475f8: 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);
475fa: b0b9 0005 c584 cmpl 5c584 <rtems_libio_number_iops>,%d0
47600: 6502 bcss 47604 <fpathconf+0x18> <== NEVER TAKEN
47602: 601c bras 47620 <fpathconf+0x34>
iop = rtems_libio_iop(fd);
47604: 2400 movel %d0,%d2 <== NOT EXECUTED
47606: ed88 lsll #6,%d0 <== NOT EXECUTED
47608: e98a lsll #4,%d2 <== NOT EXECUTED
4760a: 2079 0005 d608 moveal 5d608 <rtems_libio_iops>,%a0 <== NOT EXECUTED
47610: 9082 subl %d2,%d0 <== NOT EXECUTED
47612: d1c0 addal %d0,%a0 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
47614: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED
47618: 0280 0000 0100 andil #256,%d0 <== NOT EXECUTED
4761e: 6610 bnes 47630 <fpathconf+0x44> <== NOT EXECUTED
47620: 4eb9 0004 995c jsr 4995c <__errno>
47626: 7209 moveq #9,%d1
47628: 2040 moveal %d0,%a0
4762a: 2081 movel %d1,%a0@
4762c: 6000 0084 braw 476b2 <fpathconf+0xc6>
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
47630: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED
switch ( name ) {
47634: 700b moveq #11,%d0 <== NOT EXECUTED
/*
* Now process the information request.
*/
the_limits = iop->pathinfo.mt_entry->pathconf_limits_and_options;
47636: 2068 002a moveal %a0@(42),%a0 <== NOT EXECUTED
switch ( name ) {
4763a: b081 cmpl %d1,%d0 <== NOT EXECUTED
4763c: 6568 bcss 476a6 <fpathconf+0xba> <== NOT EXECUTED
4763e: 303b 1a08 movew %pc@(47648 <fpathconf+0x5c>,%d1:l:2),%d0<== NOT EXECUTED
47642: 48c0 extl %d0 <== NOT EXECUTED
47644: 4efb 0802 jmp %pc@(47648 <fpathconf+0x5c>,%d0:l) <== NOT EXECUTED
47648: 0018 .short 0x0018 <== NOT EXECUTED
4764a: 001c .short 0x001c <== NOT EXECUTED
4764c: 0022 .short 0x0022 <== NOT EXECUTED
4764e: 0028 .short 0x0028 <== NOT EXECUTED
47650: 002e .short 0x002e <== NOT EXECUTED
47652: 0034 .short 0x0034 <== NOT EXECUTED
47654: 003a .short 0x003a <== NOT EXECUTED
47656: 0040 .short 0x0040 <== NOT EXECUTED
47658: 0046 .short 0x0046 <== NOT EXECUTED
4765a: 004c .short 0x004c <== NOT EXECUTED
4765c: 0052 .short 0x0052 <== NOT EXECUTED
4765e: 0058 .short 0x0058 <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
47660: 2010 movel %a0@,%d0 <== NOT EXECUTED
break;
47662: 6050 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
47664: 2028 0004 movel %a0@(4),%d0 <== NOT EXECUTED
break;
47668: 604a bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
4766a: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
break;
4766e: 6044 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_NAME_MAX:
return_value = the_limits->name_max;
47670: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED
break;
47674: 603e bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_PATH_MAX:
return_value = the_limits->path_max;
47676: 2028 0010 movel %a0@(16),%d0 <== NOT EXECUTED
break;
4767a: 6038 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
4767c: 2028 0014 movel %a0@(20),%d0 <== NOT EXECUTED
break;
47680: 6032 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
47682: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED
break;
47686: 602c bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
47688: 2028 0020 movel %a0@(32),%d0 <== NOT EXECUTED
break;
4768c: 6026 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
4768e: 2028 002c movel %a0@(44),%d0 <== NOT EXECUTED
break;
47692: 6020 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
47694: 2028 0018 movel %a0@(24),%d0 <== NOT EXECUTED
break;
47698: 601a bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
4769a: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED
break;
4769e: 6014 bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
476a0: 2028 0028 movel %a0@(40),%d0 <== NOT EXECUTED
break;
476a4: 600e bras 476b4 <fpathconf+0xc8> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( EINVAL );
476a6: 4eb9 0004 995c jsr 4995c <__errno> <== NOT EXECUTED
476ac: 2040 moveal %d0,%a0 <== NOT EXECUTED
476ae: 7016 moveq #22,%d0 <== NOT EXECUTED
476b0: 2080 movel %d0,%a0@ <== NOT EXECUTED
476b2: 70ff moveq #-1,%d0
break;
}
return return_value;
}
476b4: 242e fffc movel %fp@(-4),%d2
476b8: 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 edd8 addql #1,5edd8 <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 f30a cmpl 5f30a <_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 dd90 moveal 5dd90 <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 d65c movel 5d65c <RTEMS_Malloc_Heap>,%sp@-
42ab2: 4eb9 0004 7d64 jsr 47d64 <_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 d65c moveal 5d65c <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 c4a4 pea 5c4a4 <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
...
0005ab5c <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
5ab5c: 4e56 0000 linkw %fp,#0
5ab60: 202e 0008 movel %fp@(8),%d0
5ab64: 2f0a movel %a2,%sp@-
5ab66: 2f02 movel %d2,%sp@-
5ab68: 242e 000c movel %fp@(12),%d2
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
5ab6c: 660e bnes 5ab7c <fstat+0x20> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
5ab6e: 4eb9 0004 cf98 jsr 4cf98 <__errno> <== NOT EXECUTED
5ab74: 720e moveq #14,%d1 <== NOT EXECUTED
5ab76: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ab78: 2081 movel %d1,%a0@ <== NOT EXECUTED
5ab7a: 6064 bras 5abe0 <fstat+0x84> <== NOT EXECUTED
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
5ab7c: b0b9 0005 d6a0 cmpl 5d6a0 <rtems_libio_number_iops>,%d0
5ab82: 641c bccs 5aba0 <fstat+0x44>
5ab84: 2200 movel %d0,%d1
5ab86: ed88 lsll #6,%d0
5ab88: e989 lsll #4,%d1
5ab8a: 2479 0005 edc0 moveal 5edc0 <rtems_libio_iops>,%a2
5ab90: 9081 subl %d1,%d0
5ab92: d5c0 addal %d0,%a2
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
5ab94: 202a 000c movel %a2@(12),%d0
5ab98: 0280 0000 0100 andil #256,%d0
5ab9e: 660e bnes 5abae <fstat+0x52>
5aba0: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5aba6: 2040 moveal %d0,%a0
5aba8: 7009 moveq #9,%d0
5abaa: 2080 movel %d0,%a0@
5abac: 6032 bras 5abe0 <fstat+0x84>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
5abae: 4878 0046 pea 46 <DBL_MANT_DIG+0x11>
5abb2: 42a7 clrl %sp@-
5abb4: 2f02 movel %d2,%sp@-
5abb6: 4eb9 0004 d828 jsr 4d828 <memset>
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
5abbc: 206a 0020 moveal %a2@(32),%a0
5abc0: 45ea 0010 lea %a2@(16),%a2
5abc4: 4fef 000c lea %sp@(12),%sp
5abc8: 2d42 000c movel %d2,%fp@(12)
}
5abcc: 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 );
5abd0: 2d4a 0008 movel %a2,%fp@(8)
}
5abd4: 246e fffc moveal %fp@(-4),%a2
5abd8: 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 );
5abda: 2268 0018 moveal %a0@(24),%a1
5abde: 4ed1 jmp %a1@
}
5abe0: 242e fff8 movel %fp@(-8),%d2
5abe4: 70ff moveq #-1,%d0
5abe6: 246e fffc moveal %fp@(-4),%a2
5abea: 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 1e52 cmpl 61e52 <disktab_size>,%d2
4274e: 6432 bccs 42782 <get_disk_entry+0x4e> <== NEVER TAKEN
42750: 2239 0006 1e56 movel 61e56 <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
0006a6f4 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
6a6f4: 4e56 fff4 linkw %fp,#-12
6a6f8: 202e 0008 movel %fp@(8),%d0
6a6fc: 48d7 040c moveml %d2-%d3/%a2,%sp@
6a700: 242e 000c movel %fp@(12),%d2
6a704: 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 );
6a708: b0b9 0007 0018 cmpl 70018 <rtems_libio_number_iops>,%d0
6a70e: 6412 bccs 6a722 <getdents+0x2e> <== NEVER TAKEN
6a710: 2200 movel %d0,%d1
6a712: ed88 lsll #6,%d0
6a714: e989 lsll #4,%d1
6a716: 2479 0008 1890 moveal 81890 <rtems_libio_iops>,%a2
6a71c: 9081 subl %d1,%d0
6a71e: d5c0 addal %d0,%a2
6a720: 6002 bras 6a724 <getdents+0x30>
6a722: 95ca subal %a2,%a2 <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
type = rtems_filesystem_node_type( &iop->pathinfo );
6a724: 486a 0010 pea %a2@(16)
6a728: 4eb9 0004 80d4 jsr 480d4 <rtems_filesystem_node_type>
if ( type != RTEMS_FILESYSTEM_DIRECTORY )
6a72e: 588f addql #4,%sp
6a730: 4a80 tstl %d0
6a732: 661e bnes 6a752 <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 );
6a734: 206a 0020 moveal %a2@(32),%a0
6a738: 2d43 0010 movel %d3,%fp@(16)
6a73c: 2d42 000c movel %d2,%fp@(12)
6a740: 2d4a 0008 movel %a2,%fp@(8)
6a744: 2268 0008 moveal %a0@(8),%a1
}
6a748: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
6a74e: 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 );
6a750: 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 );
6a752: 4eb9 0005 bd98 jsr 5bd98 <__errno>
6a758: 2040 moveal %d0,%a0
6a75a: 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 );
}
6a75c: 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 );
6a762: 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 );
}
6a764: 70ff moveq #-1,%d0
6a766: 4e5e unlk %fp
...
0005e8f6 <init_etc_passwd_group>:
/**
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
5e8f6: 4e56 0000 linkw %fp,#0
5e8fa: 2f0a movel %a2,%sp@-
5e8fc: 2f02 movel %d2,%sp@-
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
5e8fe: 4a39 0009 6908 tstb 96908 <etc_passwd_initted.6945>
5e904: 6600 00c4 bnew 5e9ca <init_etc_passwd_group+0xd4>
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
5e908: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
5e90c: 45f9 0006 f04e lea 6f04e <fopen>,%a2
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
5e912: 4879 0008 e454 pea 8e454 <RTEMS_BDPART_MBR_MASTER_TYPE+0x6ad>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
5e918: 7001 moveq #1,%d0
5e91a: 13c0 0009 6908 moveb %d0,96908 <etc_passwd_initted.6945>
mkdir("/etc", 0777);
5e920: 4eb9 0004 2c14 jsr 42c14 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
5e926: 4879 0008 ac8f pea 8ac8f <rtems_bdpart_shell_usage+0x313>
5e92c: 4879 0008 e459 pea 8e459 <RTEMS_BDPART_MBR_MASTER_TYPE+0x6b2>
5e932: 4e92 jsr %a2@
5e934: 4fef 0010 lea %sp@(16),%sp
5e938: 4a80 tstl %d0
5e93a: 670c beqs 5e948 <init_etc_passwd_group+0x52>
fclose(fp);
5e93c: 2f00 movel %d0,%sp@-
5e93e: 4eb9 0006 e7b0 jsr 6e7b0 <fclose>
5e944: 588f addql #4,%sp
5e946: 602e bras 5e976 <init_etc_passwd_group+0x80>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
5e948: 4879 0008 ac8c pea 8ac8c <rtems_bdpart_shell_usage+0x310>
5e94e: 4879 0008 e459 pea 8e459 <RTEMS_BDPART_MBR_MASTER_TYPE+0x6b2>
5e954: 4e92 jsr %a2@
5e956: 508f addql #8,%sp
5e958: 2400 movel %d0,%d2
5e95a: 671a beqs 5e976 <init_etc_passwd_group+0x80> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
5e95c: 2f00 movel %d0,%sp@-
5e95e: 4879 0008 e465 pea 8e465 <RTEMS_BDPART_MBR_MASTER_TYPE+0x6be>
5e964: 4eb9 0006 f1de jsr 6f1de <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
5e96a: 2f02 movel %d2,%sp@-
5e96c: 4eb9 0006 e7b0 jsr 6e7b0 <fclose>
5e972: 4fef 000c lea %sp@(12),%sp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
5e976: 4879 0008 ac8f pea 8ac8f <rtems_bdpart_shell_usage+0x313>
5e97c: 45f9 0006 f04e lea 6f04e <fopen>,%a2
5e982: 4879 0008 e4cc pea 8e4cc <RTEMS_BDPART_MBR_MASTER_TYPE+0x725>
5e988: 4e92 jsr %a2@
5e98a: 508f addql #8,%sp
5e98c: 4a80 tstl %d0
5e98e: 670c beqs 5e99c <init_etc_passwd_group+0xa6>
fclose(fp);
5e990: 2f00 movel %d0,%sp@-
5e992: 4eb9 0006 e7b0 jsr 6e7b0 <fclose>
5e998: 588f addql #4,%sp
5e99a: 602e bras 5e9ca <init_etc_passwd_group+0xd4>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
5e99c: 4879 0008 ac8c pea 8ac8c <rtems_bdpart_shell_usage+0x310>
5e9a2: 4879 0008 e4cc pea 8e4cc <RTEMS_BDPART_MBR_MASTER_TYPE+0x725>
5e9a8: 4e92 jsr %a2@
5e9aa: 508f addql #8,%sp
5e9ac: 2400 movel %d0,%d2
5e9ae: 671a beqs 5e9ca <init_etc_passwd_group+0xd4> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
5e9b0: 2f00 movel %d0,%sp@-
5e9b2: 4879 0008 e4d7 pea 8e4d7 <RTEMS_BDPART_MBR_MASTER_TYPE+0x730>
5e9b8: 4eb9 0006 f1de jsr 6f1de <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
5e9be: 2f02 movel %d2,%sp@-
5e9c0: 4eb9 0006 e7b0 jsr 6e7b0 <fclose>
5e9c6: 4fef 000c lea %sp@(12),%sp
}
}
5e9ca: 242e fff8 movel %fp@(-8),%d2
5e9ce: 246e fffc moveal %fp@(-4),%a2
5e9d2: 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 d858 moveal 5d858 <__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 d6e4 movel 5d6e4 <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
0005af80 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
5af80: 4e56 ffcc linkw %fp,#-52
5af84: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
5af88: 242e 000c movel %fp@(12),%d2
5af8c: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
5af90: 4eb9 0005 ac08 jsr 5ac08 <getpid>
5af96: b0ae 0008 cmpl %fp@(8),%d0
5af9a: 6710 beqs 5afac <killinfo+0x2c>
rtems_set_errno_and_return_minus_one( ESRCH );
5af9c: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5afa2: 7603 moveq #3,%d3
5afa4: 2040 moveal %d0,%a0
5afa6: 2083 movel %d3,%a0@
5afa8: 6000 01ce braw 5b178 <killinfo+0x1f8>
/*
* Validate the signal passed.
*/
if ( !sig )
5afac: 4a82 tstl %d2
5afae: 6610 bnes 5afc0 <killinfo+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
5afb0: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5afb6: 7416 moveq #22,%d2
5afb8: 2a40 moveal %d0,%a5
5afba: 2a82 movel %d2,%a5@
5afbc: 6000 01ba braw 5b178 <killinfo+0x1f8>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5afc0: 2002 movel %d2,%d0
5afc2: 5380 subql #1,%d0
if ( !is_valid_signo(sig) )
5afc4: 721f moveq #31,%d1
5afc6: b280 cmpl %d0,%d1
5afc8: 6410 bccs 5afda <killinfo+0x5a>
rtems_set_errno_and_return_minus_one( EINVAL );
5afca: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5afd0: 7216 moveq #22,%d1
5afd2: 2040 moveal %d0,%a0
5afd4: 2081 movel %d1,%a0@
5afd6: 6000 01a0 braw 5b178 <killinfo+0x1f8>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
5afda: 2202 movel %d2,%d1
5afdc: 2802 movel %d2,%d4
5afde: e589 lsll #2,%d1
5afe0: e98c lsll #4,%d4
5afe2: 9881 subl %d1,%d4
5afe4: 2044 moveal %d4,%a0
5afe6: d1fc 0005 f360 addal #389984,%a0
5afec: 7201 moveq #1,%d1
5afee: b290 cmpl %a0@,%d1
5aff0: 6700 01b2 beqw 5b1a4 <killinfo+0x224>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
5aff4: 123c 0008 moveb #8,%d1
5aff8: b282 cmpl %d2,%d1
5affa: 6710 beqs 5b00c <killinfo+0x8c>
5affc: 123c 0004 moveb #4,%d1
5b000: b282 cmpl %d2,%d1
5b002: 6708 beqs 5b00c <killinfo+0x8c>
5b004: 123c 000b moveb #11,%d1
5b008: b282 cmpl %d2,%d1
5b00a: 6616 bnes 5b022 <killinfo+0xa2>
return pthread_kill( pthread_self(), sig );
5b00c: 4eb9 0005 b38c jsr 5b38c <pthread_self>
5b012: 2f02 movel %d2,%sp@-
5b014: 2f00 movel %d0,%sp@-
5b016: 4eb9 0005 b2cc jsr 5b2cc <pthread_kill>
5b01c: 508f addql #8,%sp
5b01e: 6000 0186 braw 5b1a6 <killinfo+0x226>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
5b022: 7601 moveq #1,%d3
5b024: e1ab lsll %d0,%d3
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
5b026: 7001 moveq #1,%d0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
5b028: 2d42 fff4 movel %d2,%fp@(-12)
siginfo->si_code = SI_USER;
5b02c: 2d40 fff8 movel %d0,%fp@(-8)
if ( !value ) {
5b030: 4a8a tstl %a2
5b032: 6606 bnes 5b03a <killinfo+0xba>
siginfo->si_value.sival_int = 0;
5b034: 42ae fffc clrl %fp@(-4)
5b038: 6004 bras 5b03e <killinfo+0xbe>
} else {
siginfo->si_value = *value;
5b03a: 2d52 fffc movel %a2@,%fp@(-4)
*
* 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;
5b03e: 2039 0005 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0
++level;
5b044: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
5b046: 23c0 0005 eed6 movel %d0,5eed6 <_Thread_Dispatch_disable_level>
*/
void _POSIX_signals_Manager_Initialization(void);
static inline void _POSIX_signals_Add_post_switch_extension(void)
{
_API_extensions_Add_post_switch( &_POSIX_signals_Post_switch );
5b04c: 4879 0005 d7a4 pea 5d7a4 <_POSIX_signals_Post_switch>
5b052: 4eb9 0004 6bc6 jsr 46bc6 <_API_extensions_Add_post_switch>
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
5b058: 2079 0005 f31e moveal 5f31e <_Per_CPU_Information+0xe>,%a0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
5b05e: 588f addql #4,%sp
5b060: 2268 00fe moveal %a0@(254),%a1
5b064: 2029 00d0 movel %a1@(208),%d0
5b068: 4680 notl %d0
5b06a: c083 andl %d3,%d0
5b06c: 6600 00ae bnew 5b11c <killinfo+0x19c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
5b070: 2079 0005 f4e4 moveal 5f4e4 <_POSIX_signals_Wait_queue>,%a0
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
5b076: 601c bras 5b094 <killinfo+0x114>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5b078: 2003 movel %d3,%d0
5b07a: c0a8 0030 andl %a0@(48),%d0
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5b07e: 2268 00fe moveal %a0@(254),%a1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5b082: 6600 0098 bnew 5b11c <killinfo+0x19c>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
5b086: 2029 00d0 movel %a1@(208),%d0
5b08a: 4680 notl %d0
5b08c: c083 andl %d3,%d0
5b08e: 6600 008c bnew 5b11c <killinfo+0x19c>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
5b092: 2050 moveal %a0@,%a0
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
5b094: b1fc 0005 f4e8 cmpal #390376,%a0
5b09a: 66dc bnes 5b078 <killinfo+0xf8>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
5b09c: 4280 clrl %d0
5b09e: 1039 0005 d5dc moveb 5d5dc <rtems_maximum_priority>,%d0
5b0a4: 45f9 0005 ee9a lea 5ee9a <_Objects_Information_table+0x8>,%a2
5b0aa: 5280 addql #1,%d0
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
5b0ac: 91c8 subal %a0,%a0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
5b0ae: 225a moveal %a2@+,%a1
5b0b0: 4a89 tstl %a1
5b0b2: 675c beqs 5b110 <killinfo+0x190> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
5b0b4: 2269 0004 moveal %a1@(4),%a1
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5b0b8: 4281 clrl %d1
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5b0ba: 7a01 moveq #1,%d5
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5b0bc: 3229 000e movew %a1@(14),%d1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
5b0c0: 2669 0018 moveal %a1@(24),%a3
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5b0c4: 2841 moveal %d1,%a4
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
5b0c6: 588b addql #4,%a3
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5b0c8: 6042 bras 5b10c <killinfo+0x18c>
the_thread = (Thread_Control *) object_table[ index ];
5b0ca: 225b moveal %a3@+,%a1
if ( !the_thread )
5b0cc: 4a89 tstl %a1
5b0ce: 673a beqs 5b10a <killinfo+0x18a>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
5b0d0: 2229 0014 movel %a1@(20),%d1
5b0d4: b081 cmpl %d1,%d0
5b0d6: 6532 bcss 5b10a <killinfo+0x18a>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
5b0d8: 2a69 00fe moveal %a1@(254),%a5
5b0dc: 2c2d 00d0 movel %a5@(208),%d6
5b0e0: 4686 notl %d6
5b0e2: cc83 andl %d3,%d6
5b0e4: 6724 beqs 5b10a <killinfo+0x18a>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
5b0e6: b081 cmpl %d1,%d0
5b0e8: 621c bhis 5b106 <killinfo+0x186>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
5b0ea: 4a88 tstl %a0
5b0ec: 671c beqs 5b10a <killinfo+0x18a> <== NEVER TAKEN
5b0ee: 2e28 0010 movel %a0@(16),%d7
5b0f2: 6716 beqs 5b10a <killinfo+0x18a> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5b0f4: 2c29 0010 movel %a1@(16),%d6
5b0f8: 670c beqs 5b106 <killinfo+0x186>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
5b0fa: 0807 001c btst #28,%d7
5b0fe: 660a bnes 5b10a <killinfo+0x18a>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
5b100: 0806 001c btst #28,%d6
5b104: 6704 beqs 5b10a <killinfo+0x18a>
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5b106: 2001 movel %d1,%d0
5b108: 2049 moveal %a1,%a0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5b10a: 5285 addql #1,%d5
5b10c: b9c5 cmpal %d5,%a4
5b10e: 64ba bccs 5b0ca <killinfo+0x14a>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
5b110: b5fc 0005 eea2 cmpal #388770,%a2
5b116: 6696 bnes 5b0ae <killinfo+0x12e>
}
}
}
}
if ( interested ) {
5b118: 4a88 tstl %a0
5b11a: 671e beqs 5b13a <killinfo+0x1ba>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
5b11c: 486e fff4 pea %fp@(-12)
5b120: 2f02 movel %d2,%sp@-
5b122: 2f08 movel %a0,%sp@-
5b124: 4eb9 0005 b1d0 jsr 5b1d0 <_POSIX_signals_Unblock_thread>
5b12a: 4fef 000c lea %sp@(12),%sp
5b12e: 4a00 tstb %d0
5b130: 6708 beqs 5b13a <killinfo+0x1ba>
_Thread_Enable_dispatch();
5b132: 4eb9 0004 86fc jsr 486fc <_Thread_Enable_dispatch>
5b138: 606a bras 5b1a4 <killinfo+0x224>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
5b13a: 2f03 movel %d3,%sp@-
5b13c: 4eb9 0005 b1b0 jsr 5b1b0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
5b142: 588f addql #4,%sp
5b144: 41f9 0005 f358 lea 5f358 <_POSIX_signals_Vectors>,%a0
5b14a: 7002 moveq #2,%d0
5b14c: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0
5b150: 66e0 bnes 5b132 <killinfo+0x1b2>
psiginfo = (POSIX_signals_Siginfo_node *)
5b152: 4879 0005 f4d8 pea 5f4d8 <_POSIX_signals_Inactive_siginfo>
5b158: 4eb9 0004 6d5c jsr 46d5c <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
5b15e: 588f addql #4,%sp
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
5b160: 2440 moveal %d0,%a2
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
5b162: 4a80 tstl %d0
5b164: 6616 bnes 5b17c <killinfo+0x1fc>
_Thread_Enable_dispatch();
5b166: 4eb9 0004 86fc jsr 486fc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
5b16c: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5b172: 2040 moveal %d0,%a0
5b174: 700b moveq #11,%d0
5b176: 2080 movel %d0,%a0@
5b178: 70ff moveq #-1,%d0
5b17a: 602a bras 5b1a6 <killinfo+0x226>
}
psiginfo->Info = *siginfo;
5b17c: 4878 000c pea c <OPER1>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5b180: 0684 0005 f550 addil #390480,%d4
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
5b186: 486e fff4 pea %fp@(-12)
5b18a: 486a 0008 pea %a2@(8)
5b18e: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5b194: 2f0a movel %a2,%sp@-
5b196: 2f04 movel %d4,%sp@-
5b198: 4eb9 0004 6d24 jsr 46d24 <_Chain_Append>
5b19e: 4fef 0014 lea %sp@(20),%sp
5b1a2: 608e bras 5b132 <killinfo+0x1b2>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
5b1a4: 4280 clrl %d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5b1a6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
5b1ac: 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 f30a cmpl 5f30a <_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 ce0e moveal 5ce0e <_global_impure_ptr>,%a2
43222: b5f9 0005 d85c cmpal 5d85c <_impure_ptr>,%a2
43228: 6710 beqs 4323a <libc_wrapup+0x2e>
_wrapup_reent(_global_impure_ptr);
4322a: 2f0a movel %a2,%sp@-
4322c: 4eb9 0004 d9e6 jsr 4d9e6 <_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 d85c movel %a2,5d85c <_impure_ptr>
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
4323a: 2079 0005 d85c moveal 5d85c <_impure_ptr>,%a0
43240: 45f9 0004 d0d4 lea 4d0d4 <fclose>,%a2
43246: 2f28 0004 movel %a0@(4),%sp@-
4324a: 4e92 jsr %a2@
fclose (stdout);
4324c: 2079 0005 d85c moveal 5d85c <_impure_ptr>,%a0
43252: 2f28 0008 movel %a0@(8),%sp@-
43256: 4e92 jsr %a2@
fclose (stderr);
43258: 2079 0005 d85c moveal 5d85c <_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 edd0 addql #1,5edd0 <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 f30a cmpl 5f30a <_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 d65c movel 5d65c <RTEMS_Malloc_Heap>,%sp@-
42d66: 4eb9 0004 7d24 jsr 47d24 <_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 d65c movel 5d65c <RTEMS_Malloc_Heap>,%sp@-
42d8a: 2079 0005 b89c moveal 5b89c <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 cf98 jsr 4cf98 <__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 dd8c moveal 5dd8c <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 dd90 moveal 5dd90 <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
...
0004ba48 <memfile_alloc_block>:
* Allocate a block for an in-memory file.
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
4ba48: 4e56 0000 linkw %fp,#0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
4ba4c: 2f39 0005 e5bc movel 5e5bc <imfs_memfile_bytes_per_block>,%sp@-
4ba52: 4878 0001 pea 1 <ADD>
4ba56: 4eb9 0004 2818 jsr 42818 <calloc>
if ( memory )
4ba5c: 508f addql #8,%sp
4ba5e: 4a80 tstl %d0
4ba60: 6706 beqs 4ba68 <memfile_alloc_block+0x20> <== NEVER TAKEN
memfile_blocks_allocated++;
4ba62: 52b9 0005 e6d0 addql #1,5e6d0 <memfile_blocks_allocated>
return memory;
}
4ba68: 4e5e unlk %fp <== NOT EXECUTED
0004c290 <memfile_open>:
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
4c290: 7004 moveq #4,%d0
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
4c292: 4e56 0000 linkw %fp,#0
4c296: 226e 0008 moveal %fp@(8),%a1
4c29a: 2f03 movel %d3,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4c29c: 2069 0018 moveal %a1@(24),%a0
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
4c2a0: c0a9 000c andl %a1@(12),%d0
rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode
)
{
4c2a4: 2f02 movel %d2,%sp@-
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & LIBIO_FLAGS_WRITE)
4c2a6: 4a80 tstl %d0
4c2a8: 6604 bnes 4c2ae <memfile_open+0x1e>
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
return 0;
4c2aa: 4280 clrl %d0
4c2ac: 6054 bras 4c302 <memfile_open+0x72>
4c2ae: 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)) {
4c2b2: 7005 moveq #5,%d0
4c2b4: b091 cmpl %a1@,%d0
4c2b6: 66f2 bnes 4c2aa <memfile_open+0x1a> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
4c2b8: 2028 0052 movel %a0@(82),%d0 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->control = &IMFS_node_control_memfile;
4c2bc: 243c 0005 c9ea movel #379370,%d2 <== NOT EXECUTED
4c2c2: 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;
4c2c6: 2228 0056 movel %a0@(86),%d1 <== NOT EXECUTED
the_jnode->control = &IMFS_node_control_memfile;
the_jnode->info.file.size = 0;
4c2ca: 4282 clrl %d2 <== NOT EXECUTED
4c2cc: 4283 clrl %d3 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
4c2ce: 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;
4c2d2: 2142 004e movel %d2,%a0@(78) <== NOT EXECUTED
4c2d6: 2143 0052 movel %d3,%a0@(82) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
4c2da: 42a8 005a clrl %a0@(90) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4c2de: 42a8 005e clrl %a0@(94) <== NOT EXECUTED
if ((count != 0)
4c2e2: 4a80 tstl %d0 <== NOT EXECUTED
4c2e4: 67c4 beqs 4c2aa <memfile_open+0x1a> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4c2e6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
return -1;
4c2e8: 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))
4c2ea: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4c2ec: 42a7 clrl %sp@- <== NOT EXECUTED
4c2ee: 42a7 clrl %sp@- <== NOT EXECUTED
4c2f0: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4c2f2: 4eb9 0004 c0ac jsr 4c0ac <IMFS_memfile_write> <== NOT EXECUTED
4c2f8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
return -1;
4c2fc: b680 cmpl %d0,%d3 <== NOT EXECUTED
4c2fe: 57c0 seq %d0 <== NOT EXECUTED
4c300: 49c0 extbl %d0 <== NOT EXECUTED
}
return 0;
}
4c302: 242e fff8 movel %fp@(-8),%d2
4c306: 262e fffc movel %fp@(-4),%d3
4c30a: 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 a3d8 jsr 4a3d8 <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 c4dc movel #378076,%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 e2f8 lea 4e2f8 <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 e2f8 jsr 4e2f8 <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 d7b8 movel #317368,%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 d7b8 jsr 4d7b8 <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 c4de lea 5c4de <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 6d90 jsr 46d90 <_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 edc8 movel 5edc8 <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 d6d4 moveal 5d6d4 <rtems_filesystem_mount_table+0x8>,%a0
the_node->next = tail;
430d2: 24bc 0005 d6d0 movel #382672,%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 edc8 movel 5edc8 <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 d6d4 movel %a2,5d6d4 <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 edc8 movel 5edc8 <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 d6d0 movel #382672,%d0
4313c: b0b9 0005 d6cc cmpl 5d6cc <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 d6d4 moveal 5d6d4 <rtems_filesystem_mount_table+0x8>,%a0
the_node->next = tail;
4314a: 2480 movel %d0,%a2@
tail->previous = the_node;
4314c: 23ca 0005 d6d4 movel %a2,5d6d4 <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 cf98 jsr 4cf98 <__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 edc8 movel 5edc8 <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 d6ec moveal 5d6ec <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 d6ec movel 5d6ec <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 cf98 jsr 4cf98 <__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 cf98 jsr 4cf98 <__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 cf98 jsr 4cf98 <__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 bd98 jsr 5bd98 <__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
00053d7c <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;
53d7c: 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)
{
53d7e: 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;
53d82: 4240 clrw %d0
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
53d84: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
53d88: 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);
53d8c: 2c0e movel %fp,%d6
53d8e: 0686 ffff ff80 addil #-128,%d6
53d94: 2a3c 0005 7e40 movel #360000,%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;
53d9a: 206b 0014 moveal %a3@(20),%a0
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
53d9e: 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;
53da2: 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);
53da6: 4878 0020 pea 20 <OPER2+0xc>
53daa: 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)
{
53dac: 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);
53db0: 42a7 clrl %sp@-
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
53db2: 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);
53db6: 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)
{
53db8: 242e 0014 movel %fp@(20),%d2
53dbc: 2d41 ff78 movel %d1,%fp@(-136)
53dc0: 2a6e 001c moveal %fp@(28),%a5
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
53dc4: 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;
53dc8: 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;
53dcc: 42ae ff6c clrl %fp@(-148)
time_t time_ret = 0;
uint16_t time_val = 0;
uint16_t date = 0;
53dd0: 3d40 ff6a movew %d0,%fp@(-150)
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
53dd4: 42ae ff70 clrl %fp@(-144)
dir_pos->sname.ofs = 0;
53dd8: 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);
53ddc: 4e90 jsr %a0@
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
53dde: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
53de2: 2045 moveal %d5,%a0
53de4: 42a7 clrl %sp@-
53de6: 486e ffc0 pea %fp@(-64)
53dea: 4e90 jsr %a0@
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
53dec: 4fef 0018 lea %sp@(24),%sp
53df0: 0c82 0000 0104 cmpil #260,%d2
53df6: 6f0e bles 53e06 <msdos_creat_node+0x8a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
53df8: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
53dfe: 725b moveq #91,%d1 <== NOT EXECUTED
53e00: 2040 moveal %d0,%a0 <== NOT EXECUTED
53e02: 2081 movel %d1,%a0@ <== NOT EXECUTED
53e04: 6024 bras 53e2a <msdos_creat_node+0xae> <== NOT EXECUTED
}
name_type = msdos_long_to_short (name, name_len,
53e06: 4878 000b pea b <LASTO+0x1>
53e0a: 2f06 movel %d6,%sp@-
53e0c: 2f02 movel %d2,%sp@-
53e0e: 2f07 movel %d7,%sp@-
53e10: 4eb9 0005 42cc jsr 542cc <msdos_long_to_short>
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
53e16: 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,
53e1a: 2a00 movel %d0,%d5
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
53e1c: 6612 bnes 53e30 <msdos_creat_node+0xb4> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EINVAL);
53e1e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
53e24: 2040 moveal %d0,%a0 <== NOT EXECUTED
53e26: 7016 moveq #22,%d0 <== NOT EXECUTED
53e28: 2080 movel %d0,%a0@ <== NOT EXECUTED
53e2a: 74ff moveq #-1,%d2 <== NOT EXECUTED
53e2c: 6000 02cc braw 540fa <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);
53e30: 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;
53e32: 4200 clrb %d0
53e34: 1d40 ff8c moveb %d0,%fp@(-116)
/* set up last write date and time */
time_ret = time(NULL);
53e38: 4eb9 0005 b71c jsr 5b71c <time>
if ( time_ret == -1 )
53e3e: 588f addql #4,%sp
53e40: 72ff moveq #-1,%d1
53e42: b280 cmpl %d0,%d1
53e44: 6602 bnes 53e48 <msdos_creat_node+0xcc> <== ALWAYS TAKEN
53e46: 60e2 bras 53e2a <msdos_creat_node+0xae> <== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
53e48: 486e ff68 pea %fp@(-152)
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
53e4c: 4286 clrl %d6
53e4e: 486e ff6a pea %fp@(-150)
53e52: 2f00 movel %d0,%sp@-
53e54: 4eb9 0005 66e0 jsr 566e0 <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) {
53e5a: 4fef 000c lea %sp@(12),%sp
53e5e: 4281 clrl %d1
53e60: 322e ff68 movew %fp@(-152),%d1
53e64: 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;
53e68: 42ae ff9c clrl %fp@(-100)
53e6c: 2001 movel %d1,%d0
53e6e: e089 lsrl #8,%d1
53e70: e188 lsll #8,%d0
53e72: 8081 orl %d1,%d0
53e74: 2206 movel %d6,%d1
53e76: e08e lsrl #8,%d6
53e78: 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);
53e7a: 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);
53e7e: 3d40 ff96 movew %d0,%fp@(-106)
53e82: 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);
53e84: 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);
53e88: 3d41 ff98 movew %d1,%fp@(-104)
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
53e8c: 3d41 ff92 movew %d1,%fp@(-110)
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
53e90: 4a8c tstl %a4
53e92: 660a bnes 53e9e <msdos_creat_node+0x122> <== ALWAYS TAKEN
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
53e94: 7810 moveq #16,%d4 <== NOT EXECUTED
53e96: 102e ff8b moveb %fp@(-117),%d0 <== NOT EXECUTED
53e9a: 6000 009a braw 53f36 <msdos_creat_node+0x1ba> <== NOT EXECUTED
}
else if (type == MSDOS_HARD_LINK) {
53e9e: 7002 moveq #2,%d0
53ea0: b08c cmpl %a4,%d0
53ea2: 6600 008c bnew 53f30 <msdos_creat_node+0x1b4>
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
53ea6: 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)) )
53eaa: 6612 bnes 53ebe <msdos_creat_node+0x142> <== NOT EXECUTED
53eac: 7803 moveq #3,%d4 <== NOT EXECUTED
53eae: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
53eb2: c084 andl %d4,%d0 <== NOT EXECUTED
53eb4: 4a00 tstb %d0 <== NOT EXECUTED
53eb6: 6706 beqs 53ebe <msdos_creat_node+0x142> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
53eb8: 222a 001e movel %a2@(30),%d1 <== NOT EXECUTED
53ebc: 600e bras 53ecc <msdos_creat_node+0x150> <== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
53ebe: 4280 clrl %d0 <== NOT EXECUTED
53ec0: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED
53ec4: 5581 subql #2,%d1 <== NOT EXECUTED
53ec6: e1a9 lsll %d0,%d1 <== NOT EXECUTED
53ec8: 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);
53ecc: 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,
53ed0: 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));
53ed4: 4284 clrl %d4 <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
53ed6: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
53eda: 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));
53edc: 3812 movew %a2@,%d4 <== NOT EXECUTED
53ede: 5384 subql #1,%d4 <== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
53ee0: c880 andl %d0,%d4 <== NOT EXECUTED
53ee2: 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);
53ee4: 4284 clrl %d4 <== NOT EXECUTED
53ee6: 182a 0002 moveb %a2@(2),%d4 <== NOT EXECUTED
53eea: 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,
53eec: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
53ef0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53ef2: 4eb9 0004 fdfc jsr 4fdfc <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
53ef8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
53efc: 4a80 tstl %d0 <== NOT EXECUTED
53efe: 6d00 ff2a bltw 53e2a <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;
53f02: 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);
53f04: 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;
53f0a: 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);
53f0e: 1d6e ffad ff8d moveb %fp@(-83),%fp@(-115) <== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
53f14: 3d6e ffae ff8e movew %fp@(-82),%fp@(-114) <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
53f1a: 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) =
53f20: 3d6e ffba ff9a movew %fp@(-70),%fp@(-102) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
53f26: 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;
53f2c: 8081 orl %d1,%d0 <== NOT EXECUTED
53f2e: 6008 bras 53f38 <msdos_creat_node+0x1bc> <== NOT EXECUTED
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
53f30: 7820 moveq #32,%d4
53f32: 102e ff8b moveb %fp@(-117),%d0
53f36: 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);
53f38: 280e movel %fp,%d4
53f3a: 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,
53f40: 2c0e movel %fp,%d6
53f42: 0686 ffff ff70 addil #-144,%d6
53f48: 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;
53f4a: 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,
53f4e: 2f06 movel %d6,%sp@-
53f50: 2f05 movel %d5,%sp@-
53f52: 2f02 movel %d2,%sp@-
53f54: 2f07 movel %d7,%sp@-
53f56: 4878 0001 pea 1 <ADD>
53f5a: 2f0b movel %a3,%sp@-
53f5c: 4eb9 0005 536c jsr 5536c <msdos_get_name_node>
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
53f62: 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,
53f66: 2400 movel %d0,%d2
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
53f68: 6600 0190 bnew 540fa <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)
53f6c: 4a8c tstl %a4
53f6e: 6600 018a bnew 540fa <msdos_creat_node+0x37e>
{
/* open new directory as fat-file */
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
53f72: 486e ff6c pea %fp@(-148) <== NOT EXECUTED
53f76: 2f06 movel %d6,%sp@- <== NOT EXECUTED
53f78: 2f0a movel %a2,%sp@- <== NOT EXECUTED
53f7a: 4eb9 0004 f16c jsr 4f16c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
53f80: 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);
53f84: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
53f86: 6600 015c bnew 540e4 <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;
53f8a: 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,
53f8e: 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;
53f90: 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,
53f96: 0685 ffff ffc0 addil #-64,%d5 <== NOT EXECUTED
53f9c: 49f9 0005 7dd0 lea 57dd0 <memcpy>,%a4 <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
53fa2: 240e movel %fp,%d2 <== NOT EXECUTED
53fa4: 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;
53faa: 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;
53fae: 42ad 0018 clrl %a5@(24) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
53fb2: 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,
53fb6: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
53fba: 2f04 movel %d4,%sp@- <== NOT EXECUTED
53fbc: 2f05 movel %d5,%sp@- <== NOT EXECUTED
53fbe: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
53fc0: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
53fc4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
53fc6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
53fc8: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
53fca: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
53fce: 2f39 0006 734c movel 6734c <MSDOS_DOT_NAME>,%sp@- <== NOT EXECUTED
53fd4: 2f05 movel %d5,%sp@- <== NOT EXECUTED
53fd6: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
53fd8: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
53fdc: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
53fe0: 2f39 0006 7348 movel 67348 <MSDOS_DOTDOT_NAME>,%sp@- <== NOT EXECUTED
53fe6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
53fe8: 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)) &&
53fea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
53fee: 7001 moveq #1,%d0 <== NOT EXECUTED
53ff0: 2043 moveal %d3,%a0 <== NOT EXECUTED
53ff2: b0a8 0020 cmpl %a0@(32),%d0 <== NOT EXECUTED
53ff6: 661e bnes 54016 <msdos_creat_node+0x29a> <== NOT EXECUTED
53ff8: 4aa8 0024 tstl %a0@(36) <== NOT EXECUTED
53ffc: 6618 bnes 54016 <msdos_creat_node+0x29a> <== NOT EXECUTED
53ffe: 7204 moveq #4,%d1 <== NOT EXECUTED
54000: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
54004: c081 andl %d1,%d0 <== NOT EXECUTED
54006: 4a00 tstb %d0 <== NOT EXECUTED
54008: 670c beqs 54016 <msdos_creat_node+0x29a> <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
{
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
5400a: 4244 clrw %d4 <== NOT EXECUTED
5400c: 3d44 fffa movew %d4,%fp@(-6) <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
54010: 3d44 fff4 movew %d4,%fp@(-12) <== NOT EXECUTED
54014: 602a bras 54040 <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));
54016: 2043 moveal %d3,%a0 <== NOT EXECUTED
54018: 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;
}
5401c: 2401 movel %d1,%d2 <== NOT EXECUTED
5401e: 0282 0000 ffff andil #65535,%d2 <== NOT EXECUTED
54024: 4241 clrw %d1 <== NOT EXECUTED
54026: 4841 swap %d1 <== NOT EXECUTED
54028: 2002 movel %d2,%d0 <== NOT EXECUTED
5402a: e088 lsrl #8,%d0 <== NOT EXECUTED
5402c: e18a lsll #8,%d2 <== NOT EXECUTED
5402e: 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)) =
54030: 3d40 fffa movew %d0,%fp@(-6) <== NOT EXECUTED
54034: 2001 movel %d1,%d0 <== NOT EXECUTED
54036: e088 lsrl #8,%d0 <== NOT EXECUTED
54038: e189 lsll #8,%d1 <== NOT EXECUTED
5403a: 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)) =
5403c: 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);
54040: 240e movel %fp,%d2 <== NOT EXECUTED
54042: 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,
54048: 49f9 0004 f858 lea 4f858 <fat_file_write>,%a4 <== NOT EXECUTED
5404e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54050: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> <== NOT EXECUTED
54054: 42a7 clrl %sp@- <== NOT EXECUTED
54056: 2f0d movel %a5,%sp@- <== NOT EXECUTED
54058: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5405a: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
5405c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54060: 4a80 tstl %d0 <== NOT EXECUTED
54062: 6d70 blts 540d4 <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;
54064: 4280 clrl %d0 <== NOT EXECUTED
54066: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED
5406a: 206e ff6c moveal %fp@(-148),%a0 <== NOT EXECUTED
5406e: 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));
54072: 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;
}
54076: 2600 movel %d0,%d3 <== NOT EXECUTED
54078: 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,
5407e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54080: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
54084: 2203 movel %d3,%d1 <== NOT EXECUTED
54086: e089 lsrl #8,%d1 <== NOT EXECUTED
54088: 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;
}
5408a: 4240 clrw %d0 <== NOT EXECUTED
5408c: 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,
5408e: 42a7 clrl %sp@- <== NOT EXECUTED
54090: 8283 orl %d3,%d1 <== NOT EXECUTED
54092: 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)) =
54094: 3d41 ffda movew %d1,%fp@(-38) <== NOT EXECUTED
54098: 2200 movel %d0,%d1 <== NOT EXECUTED
5409a: e089 lsrl #8,%d1 <== NOT EXECUTED
5409c: 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,
5409e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
540a0: 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)) =
540a2: 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,
540a6: 4e94 jsr %a4@ <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
540a8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
540ac: 4a80 tstl %d0 <== NOT EXECUTED
540ae: 6d24 blts 540d4 <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);
540b0: 2f2e ff6c movel %fp@(-148),%sp@- <== NOT EXECUTED
540b4: 2f2b 0014 movel %a3@(20),%sp@- <== NOT EXECUTED
540b8: 4eb9 0005 455c jsr 5455c <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
540be: 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);
540c0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
540c2: 6612 bnes 540d6 <msdos_creat_node+0x35a> <== NOT EXECUTED
goto error;
fat_file_close(&fs_info->fat, fat_fd);
540c4: 2f2e ff6c movel %fp@(-148),%sp@- <== NOT EXECUTED
540c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
540ca: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
540d0: 508f addql #8,%sp <== NOT EXECUTED
540d2: 6026 bras 540fa <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;
540d4: 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);
540d6: 2f2e ff6c movel %fp@(-148),%sp@- <== NOT EXECUTED
540da: 2f0a movel %a2,%sp@- <== NOT EXECUTED
540dc: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
540e2: 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);
540e4: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED
540e8: 486e ff70 pea %fp@(-144) <== NOT EXECUTED
540ec: 2f2b 0014 movel %a3@(20),%sp@- <== NOT EXECUTED
540f0: 4eb9 0005 467e jsr 5467e <msdos_set_first_char4file_name> <== NOT EXECUTED
540f6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return rc;
}
540fa: 2002 movel %d2,%d0
540fc: 4cee 3cfc ff40 moveml %fp@(-192),%d2-%d7/%a2-%a5
54102: 4e5e unlk %fp
...
000567dc <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)
{
567dc: 4e56 ffec linkw %fp,#-20
567e0: 222e 0008 movel %fp@(8),%d1
567e4: 48d7 043c moveml %d2-%d5/%a2,%sp@
567e8: 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;
567ec: 2003 movel %d3,%d0
567ee: 740b moveq #11,%d2
567f0: 2a3c 0000 0708 movel #1800,%d5
567f6: 0280 0000 f800 andil #63488,%d0
567fc: 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
567fe: 2403 movel %d3,%d2
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
56800: 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
56804: 0282 0000 07e0 andil #2016,%d2
5680a: ea8a lsrl #5,%d2
5680c: 2802 movel %d2,%d4
5680e: eb8a lsll #5,%d2
56810: d884 addl %d4,%d4
56812: 9484 subl %d4,%d2
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
56814: 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)
56816: 741f moveq #31,%d2
56818: 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) {
5681a: 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;
5681c: 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) {
5681e: 3439 0006 8fc8 movew 68fc8 <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)
56824: 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) {
56826: b282 cmpl %d2,%d1
56828: 6700 008a beqw 568b4 <msdos_date_dos2unix+0xd8>
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
5682c: 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;
5682e: 91c8 subal %a0,%a0
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
56830: 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;
56832: 0283 0000 fe00 andil #65024,%d3
56838: 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;
5683c: 33c1 0006 8fc8 movew %d1,68fc8 <lastdosdate>
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
56842: eaab lsrl %d5,%d3
for (y = 0; y < year; y++)
56844: 6012 bras 56858 <msdos_date_dos2unix+0x7c>
days += y & 0x03 ? 365 : 366;
56846: 4a84 tstl %d4
56848: 57c4 seq %d4
5684a: 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++)
56850: 5282 addql #1,%d2
days += y & 0x03 ? 365 : 366;
56852: 49c4 extbl %d4
56854: 9a84 subl %d4,%d5
56856: d1c5 addal %d5,%a0
56858: 7803 moveq #3,%d4
5685a: 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++)
5685c: b682 cmpl %d2,%d3
5685e: 66e6 bnes 56846 <msdos_date_dos2unix+0x6a>
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
56860: 4a84 tstl %d4
56862: 6708 beqs 5686c <msdos_date_dos2unix+0x90> <== ALWAYS TAKEN
56864: 45f9 0006 8068 lea 68068 <regyear>,%a2 <== NOT EXECUTED
5686a: 6006 bras 56872 <msdos_date_dos2unix+0x96> <== NOT EXECUTED
5686c: 45f9 0006 8080 lea 68080 <leapyear>,%a2
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
56872: 2401 movel %d1,%d2
56874: 0282 0000 01e0 andil #480,%d2
5687a: ea8a lsrl #5,%d2
if (month == 0) {
5687c: 6604 bnes 56882 <msdos_date_dos2unix+0xa6> <== ALWAYS TAKEN
month = 1;
5687e: 143c 0001 moveb #1,%d2 <== NOT EXECUTED
}
for (m = 0; m < month - 1; m++)
56882: 93c9 subal %a1,%a1
56884: 5382 subql #1,%d2
56886: 6008 bras 56890 <msdos_date_dos2unix+0xb4>
days += months[m];
56888: 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++)
5688a: 5289 addql #1,%a1 <== NOT EXECUTED
days += months[m];
5688c: 361a movew %a2@+,%d3 <== NOT EXECUTED
5688e: 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++)
56890: b489 cmpl %a1,%d2
56892: 62f4 bhis 56888 <msdos_date_dos2unix+0xac> <== NEVER TAKEN
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
56894: 741f moveq #31,%d2
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
56896: 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;
5689c: c282 andl %d2,%d1
5689e: 41f0 18ff lea %a0@(ffffffff,%d1:l),%a0
568a2: 2208 movel %a0,%d1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
568a4: 4c05 1800 mulsl %d5,%d1
568a8: 0681 12ce a600 addil #315532800,%d1
568ae: 23c1 0006 8fca movel %d1,68fca <lastseconds>
}
return seconds + lastseconds;
}
568b4: d0b9 0006 8fca addl 68fca <lastseconds>,%d0
568ba: 4cd7 043c moveml %sp@,%d2-%d5/%a2
568be: 4e5e unlk %fp <== NOT EXECUTED
000566e0 <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)
{
566e0: 4e56 fff0 linkw %fp,#-16
566e4: 202e 0008 movel %fp@(8),%d0
566e8: 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) {
566ec: b0b9 0006 8fbc cmpl 68fbc <lasttime>,%d0
566f2: 6700 00cc beqw 567c0 <msdos_date_unix2dos+0xe0>
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
566f6: 723c moveq #60,%d1
566f8: 2600 movel %d0,%d3
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
566fa: 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)
56700: 4c41 3004 remul %d1,%d4,%d3
56704: 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;
56708: 23c0 0006 8fbc movel %d0,68fbc <lasttime>
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
5670e: 4c41 3002 remul %d1,%d2,%d3
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
56712: 2600 movel %d0,%d3
56714: 4c45 3003 remul %d5,%d3,%d3
56718: 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)
5671c: eb8a lsll #5,%d2
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
5671e: 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)
56722: 760b moveq #11,%d3
56724: e7a9 lsll %d3,%d1
56726: 2604 movel %d4,%d3
56728: e28b lsrl #1,%d3
5672a: d481 addl %d1,%d2
5672c: 2202 movel %d2,%d1
5672e: 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);
56730: 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)
56736: 33c1 0006 8fc0 movew %d1,68fc0 <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);
5673c: 4c44 0000 remul %d4,%d0,%d0
if (days != lastday) {
56740: b0b9 0006 8fc2 cmpl 68fc2 <lastday>,%d0
56746: 6778 beqs 567c0 <msdos_date_unix2dos+0xe0> <== NEVER TAKEN
lastday = days;
56748: 23c0 0006 8fc2 movel %d0,68fc2 <lastday>
for (year = 1970;; year++) {
5674e: 223c 0000 07b2 movel #1970,%d1
inc = year & 0x03 ? 365 : 366;
56754: 7603 moveq #3,%d3
56756: 2a3c 0000 016d movel #365,%d5
5675c: c681 andl %d1,%d3
5675e: 57c2 seq %d2
56760: 49c2 extbl %d2
56762: 9a82 subl %d2,%d5
if (days < inc)
56764: ba80 cmpl %d0,%d5
56766: 6206 bhis 5676e <msdos_date_unix2dos+0x8e>
break;
days -= inc;
56768: 9085 subl %d5,%d0
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
5676a: 5281 addql #1,%d1
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
5676c: 60e6 bras 56754 <msdos_date_unix2dos+0x74>
months = year & 0x03 ? regyear : leapyear;
5676e: 4a83 tstl %d3
56770: 6708 beqs 5677a <msdos_date_unix2dos+0x9a> <== ALWAYS TAKEN
56772: 43f9 0006 8068 lea 68068 <regyear>,%a1 <== NOT EXECUTED
56778: 6006 bras 56780 <msdos_date_unix2dos+0xa0> <== NOT EXECUTED
5677a: 43f9 0006 8080 lea 68080 <leapyear>,%a1
for (month = 0; month < 12; month++) {
56780: 91c8 subal %a0,%a0
if (days < months[month])
56782: 4282 clrl %d2
56784: 3419 movew %a1@+,%d2
56786: b480 cmpl %d0,%d2
56788: 620a bhis 56794 <msdos_date_unix2dos+0xb4> <== ALWAYS TAKEN
break;
days -= months[month];
5678a: 9082 subl %d2,%d0 <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
5678c: 5288 addql #1,%a0 <== NOT EXECUTED
5678e: 740c moveq #12,%d2 <== NOT EXECUTED
56790: b488 cmpl %a0,%d2 <== NOT EXECUTED
56792: 66ee bnes 56782 <msdos_date_unix2dos+0xa2> <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
56794: 2408 movel %a0,%d2
56796: 5282 addql #1,%d2
56798: 2240 moveal %d0,%a1
5679a: eb8a lsll #5,%d2
5679c: 41f1 2801 lea %a1@(00000001,%d2:l),%a0
567a0: 33c8 0006 8fc6 movew %a0,68fc6 <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)
567a6: 0c81 0000 07bc cmpil #1980,%d1
567ac: 6312 blss 567c0 <msdos_date_unix2dos+0xe0> <== NEVER TAKEN
lastddate += (year - 1980) <<
567ae: 0681 ffff f844 addil #-1980,%d1
567b4: 7009 moveq #9,%d0
567b6: e1a9 lsll %d0,%d1
567b8: d288 addl %a0,%d1
567ba: 33c1 0006 8fc6 movew %d1,68fc6 <lastddate>
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
567c0: 206e 0010 moveal %fp@(16),%a0
567c4: 30b9 0006 8fc0 movew 68fc0 <lastdtime>,%a0@
*ddp = lastddate;
567ca: 206e 000c moveal %fp@(12),%a0
}
567ce: 4cd7 003c moveml %sp@,%d2-%d5
lastddate += (year - 1980) <<
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
*ddp = lastddate;
567d2: 30b9 0006 8fc6 movew 68fc6 <lastddate>,%a0@
}
567d8: 4e5e unlk %fp <== NOT EXECUTED
00054790 <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
)
{
54790: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54794: 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
)
{
54798: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED
5479c: 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;
547a0: 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,
547a2: 2a3c 0004 f2c2 movel #324290,%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,
547a8: 4bf9 0005 916c lea 5916c <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;
547ae: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
547b2: 4214 clrb %a4@ <== NOT EXECUTED
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
547b4: 6000 009a braw 54850 <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)
547b8: 721f moveq #31,%d1 <== NOT EXECUTED
547ba: b280 cmpl %d0,%d1 <== NOT EXECUTED
547bc: 6c00 00bc bgew 5487a <msdos_dir_is_empty+0xea> <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
547c0: 4281 clrl %d1 <== NOT EXECUTED
547c2: 3212 movew %a2@,%d1 <== NOT EXECUTED
547c4: b280 cmpl %d0,%d1 <== NOT EXECUTED
547c6: 677e beqs 54846 <msdos_dir_is_empty+0xb6> <== NOT EXECUTED
547c8: 4879 0006 72af pea 672af <msdos_file_handlers+0x45> <== NOT EXECUTED
547ce: 4879 0006 7350 pea 67350 <__FUNCTION__.7683> <== NOT EXECUTED
547d4: 4878 0365 pea 365 <DBL_MANT_DIG+0x330> <== NOT EXECUTED
547d8: 4879 0006 72cb pea 672cb <msdos_file_handlers+0x61> <== NOT EXECUTED
547de: 4eb9 0005 147c jsr 5147c <__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;
547e4: 266a 0094 moveal %a2@(148),%a3 <== NOT EXECUTED
547e8: 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)) ==
547ea: 4280 clrl %d0 <== NOT EXECUTED
547ec: 1813 moveb %a3@,%d4 <== NOT EXECUTED
547ee: 1004 moveb %d4,%d0 <== NOT EXECUTED
547f0: 0c80 0000 00e5 cmpil #229,%d0 <== NOT EXECUTED
547f6: 673c beqs 54834 <msdos_dir_is_empty+0xa4> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
547f8: 723f moveq #63,%d1 <== NOT EXECUTED
547fa: 102b 000b moveb %a3@(11),%d0 <== NOT EXECUTED
547fe: c081 andl %d1,%d0 <== NOT EXECUTED
54800: 123c 000f moveb #15,%d1 <== NOT EXECUTED
54804: b280 cmpl %d0,%d1 <== NOT EXECUTED
54806: 672c beqs 54834 <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,
54808: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
5480c: 4879 0006 7315 pea 67315 <msdos_file_handlers+0xab> <== NOT EXECUTED
54812: 2f0b movel %a3,%sp@- <== NOT EXECUTED
54814: 4e95 jsr %a5@ <== NOT EXECUTED
54816: 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) ||
5481a: 4a80 tstl %d0 <== NOT EXECUTED
5481c: 6716 beqs 54834 <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)),
5481e: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
54822: 4879 0006 7321 pea 67321 <msdos_file_handlers+0xb7> <== NOT EXECUTED
54828: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5482a: 4e95 jsr %a5@ <== NOT EXECUTED
5482c: 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) ||
54830: 4a80 tstl %d0 <== NOT EXECUTED
54832: 6608 bnes 5483c <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)
54834: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED
5483a: 600e bras 5484a <msdos_dir_is_empty+0xba> <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
5483c: 4a04 tstb %d4 <== NOT EXECUTED
5483e: 663e bnes 5487e <msdos_dir_is_empty+0xee> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
54840: 18bc 0001 moveb #1,%a4@ <== NOT EXECUTED
54844: 6038 bras 5487e <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);
54846: 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;
54848: 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;
5484a: bc82 cmpl %d2,%d6 <== NOT EXECUTED
5484c: 6296 bhis 547e4 <msdos_dir_is_empty+0x54> <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
5484e: 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,
54850: 4280 clrl %d0 <== NOT EXECUTED
54852: 2045 moveal %d5,%a0 <== NOT EXECUTED
54854: 3012 movew %a2@,%d0 <== NOT EXECUTED
54856: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
5485a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5485c: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED
54860: 2f00 movel %d0,%sp@- <== NOT EXECUTED
54862: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54866: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54868: 4e90 jsr %a0@ <== NOT EXECUTED
5486a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5486e: 4a80 tstl %d0 <== NOT EXECUTED
54870: 6600 ff46 bnew 547b8 <msdos_dir_is_empty+0x28> <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
54874: 18bc 0001 moveb #1,%a4@ <== NOT EXECUTED
return RC_OK;
54878: 6006 bras 54880 <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;
5487a: 70ff moveq #-1,%d0 <== NOT EXECUTED
5487c: 6002 bras 54880 <msdos_dir_is_empty+0xf0> <== NOT EXECUTED
}
/*
* Short file name entries mean not empty.
*/
return RC_OK;
5487e: 4280 clrl %d0 <== NOT EXECUTED
}
j++;
}
*ret_val = true;
return RC_OK;
}
54880: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
54886: 4e5e unlk %fp <== NOT EXECUTED
000569cc <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)
{
569cc: 4e56 fe84 linkw %fp,#-380 <== NOT EXECUTED
569d0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
569d4: 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 :
569d8: 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;
569da: 206d 0024 moveal %a5@(36),%a0 <== NOT EXECUTED
569de: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
569e2: 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);
569e6: 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)
{
569ea: 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);
569ee: 42a7 clrl %sp@- <== NOT EXECUTED
569f0: 2f2d 0008 movel %a5@(8),%sp@- <== NOT EXECUTED
569f4: 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;
569f8: 2d48 fed0 movel %a0,%fp@(-304) <== NOT EXECUTED
fat_file_fd_t *tmp_fat_fd = NULL;
569fc: 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;
56a00: 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);
56a04: 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 :
56a0a: 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);
56a0e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56a12: 2d41 fec8 movel %d1,%fp@(-312) <== NOT EXECUTED
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
56a16: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED
56a1c: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
56a20: 2002 movel %d2,%d0 <== NOT EXECUTED
56a22: e18a lsll #8,%d2 <== NOT EXECUTED
56a24: e988 lsll #4,%d0 <== NOT EXECUTED
56a26: d082 addl %d2,%d0 <== NOT EXECUTED
56a28: 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 :
56a2c: baa8 0020 cmpl %a0@(32),%d5 <== NOT EXECUTED
56a30: 661e bnes 56a50 <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) &&
56a32: 4aa8 0024 tstl %a0@(36) <== NOT EXECUTED
56a36: 6618 bnes 56a50 <msdos_dir_read+0x84> <== NOT EXECUTED
56a38: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
56a3c: 323c 0003 movew #3,%d1 <== NOT EXECUTED
56a40: c081 andl %d1,%d0 <== NOT EXECUTED
56a42: 4a00 tstb %d0 <== NOT EXECUTED
56a44: 670a beqs 56a50 <msdos_dir_read+0x84> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
56a46: 2a28 0018 movel %a0@(24),%d5 <== NOT EXECUTED
56a4a: 2d45 fec2 movel %d5,%fp@(-318) <== NOT EXECUTED
56a4e: 600a bras 56a5a <msdos_dir_read+0x8e> <== NOT EXECUTED
56a50: 4286 clrl %d6 <== NOT EXECUTED
56a52: 3c2a 0006 movew %a2@(6),%d6 <== NOT EXECUTED
56a56: 2d46 fec2 movel %d6,%fp@(-318) <== NOT EXECUTED
fs_info->fat.vol.bpc;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56a5a: 42a7 clrl %sp@- <== NOT EXECUTED
56a5c: 42a7 clrl %sp@- <== NOT EXECUTED
56a5e: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
56a62: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
56a68: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56a6c: 4a80 tstl %d0 <== NOT EXECUTED
56a6e: 6700 034c beqw 56dbc <msdos_dir_read+0x3f0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
56a72: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
56a78: 7205 moveq #5,%d1 <== NOT EXECUTED
56a7a: 2040 moveal %d0,%a0 <== NOT EXECUTED
56a7c: 2081 movel %d1,%a0@ <== NOT EXECUTED
56a7e: 603e bras 56abe <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),
56a80: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
56a84: 2f2e fec2 movel %fp@(-318),%sp@- <== NOT EXECUTED
56a88: 2f07 movel %d7,%sp@- <== NOT EXECUTED
56a8a: 2f2e fed0 movel %fp@(-304),%sp@- <== NOT EXECUTED
56a8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56a90: 4eb9 0004 f2c2 jsr 4f2c2 <fat_file_read> <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
56a96: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56a9a: 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),
56a9c: 2d40 feba movel %d0,%fp@(-326) <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
56aa0: b280 cmpl %d0,%d1 <== NOT EXECUTED
56aa2: 6d00 0308 bltw 56dac <msdos_dir_read+0x3e0> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
56aa6: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
56aaa: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
56ab0: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
56ab6: 588f addql #4,%sp <== NOT EXECUTED
56ab8: 2040 moveal %d0,%a0 <== NOT EXECUTED
56aba: 7005 moveq #5,%d0 <== NOT EXECUTED
56abc: 2080 movel %d0,%a0@ <== NOT EXECUTED
56abe: 7cff moveq #-1,%d6 <== NOT EXECUTED
56ac0: 6000 0374 braw 56e36 <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;
56ac4: 266a 0094 moveal %a2@(148),%a3 <== NOT EXECUTED
56ac8: d7c3 addal %d3,%a3 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
56aca: 1013 moveb %a3@,%d0 <== NOT EXECUTED
56acc: 6604 bnes 56ad2 <msdos_dir_read+0x106> <== NOT EXECUTED
56ace: 6000 030e braw 56dde <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)
56ad2: 4281 clrl %d1 <== NOT EXECUTED
56ad4: 1200 moveb %d0,%d1 <== NOT EXECUTED
56ad6: 0c81 0000 00e5 cmpil #229,%d1 <== NOT EXECUTED
56adc: 6700 02c6 beqw 56da4 <msdos_dir_read+0x3d8> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
56ae0: 7c08 moveq #8,%d6 <== NOT EXECUTED
56ae2: 122b 000b moveb %a3@(11),%d1 <== NOT EXECUTED
56ae6: cc81 andl %d1,%d6 <== NOT EXECUTED
56ae8: 4a06 tstb %d6 <== NOT EXECUTED
56aea: 670e beqs 56afa <msdos_dir_read+0x12e> <== NOT EXECUTED
56aec: 7c3f moveq #63,%d6 <== NOT EXECUTED
56aee: cc81 andl %d1,%d6 <== NOT EXECUTED
56af0: 2046 moveal %d6,%a0 <== NOT EXECUTED
56af2: 7c0f moveq #15,%d6 <== NOT EXECUTED
56af4: bc88 cmpl %a0,%d6 <== NOT EXECUTED
56af6: 6600 02ac bnew 56da4 <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) ==
56afa: 7c3f moveq #63,%d6 <== NOT EXECUTED
56afc: c286 andl %d6,%d1 <== NOT EXECUTED
56afe: 1c3c 000f moveb #15,%d6 <== NOT EXECUTED
56b02: bc81 cmpl %d1,%d6 <== NOT EXECUTED
56b04: 6600 00a2 bnew 56ba8 <msdos_dir_read+0x1dc> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
56b08: 72ff moveq #-1,%d1 <== NOT EXECUTED
56b0a: b285 cmpl %d5,%d1 <== NOT EXECUTED
56b0c: 6630 bnes 56b3e <msdos_dir_read+0x172> <== NOT EXECUTED
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
56b0e: 7240 moveq #64,%d1 <== NOT EXECUTED
56b10: c280 andl %d0,%d1 <== NOT EXECUTED
56b12: 4a01 tstb %d1 <== NOT EXECUTED
56b14: 6700 028e beqw 56da4 <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) &
56b18: 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)
56b1a: 2a03 movel %d3,%d5 <== NOT EXECUTED
56b1c: da87 addl %d7,%d5 <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
56b1e: 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);
56b20: 1c2b 000d moveb %a3@(13),%d6 <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
56b24: 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) &
56b28: 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));
56b2a: 42a7 clrl %sp@- <== NOT EXECUTED
56b2c: 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);
56b30: 1d46 fec7 moveb %d6,%fp@(-313) <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
56b34: 4eb9 0005 7e40 jsr 57e40 <memset> <== NOT EXECUTED
56b3a: 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) &
56b3e: 723f moveq #63,%d1 <== NOT EXECUTED
56b40: 1013 moveb %a3@,%d0 <== NOT EXECUTED
56b42: c081 andl %d1,%d0 <== NOT EXECUTED
56b44: b084 cmpl %d4,%d0 <== NOT EXECUTED
56b46: 6600 025a bnew 56da2 <msdos_dir_read+0x3d6> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
56b4a: 4281 clrl %d1 <== NOT EXECUTED
56b4c: 4280 clrl %d0 <== NOT EXECUTED
56b4e: 122e fec7 moveb %fp@(-313),%d1 <== NOT EXECUTED
56b52: 102b 000d moveb %a3@(13),%d0 <== NOT EXECUTED
56b56: b081 cmpl %d1,%d0 <== NOT EXECUTED
56b58: 6600 0248 bnew 56da2 <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--;
56b5c: 5384 subql #1,%d4 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
56b5e: 700d moveq #13,%d0 <== NOT EXECUTED
56b60: 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)
56b64: 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;
56b68: 528b addql #1,%a3 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
56b6a: 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)
56b6c: 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))
56b6e: 2208 movel %a0,%d1 <== NOT EXECUTED
56b70: d280 addl %d0,%d1 <== NOT EXECUTED
56b72: 0c81 0000 00fe cmpil #254,%d1 <== NOT EXECUTED
56b78: 6200 0220 bhiw 56d9a <msdos_dir_read+0x3ce> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
56b7c: 1193 9810 moveb %a3@,%a0@(00000010,%a1:l) <== NOT EXECUTED
if (*p == '\0')
56b80: 6700 0218 beqw 56d9a <msdos_dir_read+0x3ce> <== NOT EXECUTED
break;
switch (q)
56b84: 7c04 moveq #4,%d6 <== NOT EXECUTED
56b86: bc88 cmpl %a0,%d6 <== NOT EXECUTED
56b88: 6708 beqs 56b92 <msdos_dir_read+0x1c6> <== NOT EXECUTED
56b8a: 720a moveq #10,%d1 <== NOT EXECUTED
56b8c: b288 cmpl %a0,%d1 <== NOT EXECUTED
56b8e: 660a bnes 56b9a <msdos_dir_read+0x1ce> <== NOT EXECUTED
56b90: 6004 bras 56b96 <msdos_dir_read+0x1ca> <== NOT EXECUTED
{
case 4:
p += 5;
56b92: 5a8b addql #5,%a3 <== NOT EXECUTED
break;
56b94: 6006 bras 56b9c <msdos_dir_read+0x1d0> <== NOT EXECUTED
case 10:
p += 4;
56b96: 588b addql #4,%a3 <== NOT EXECUTED
break;
56b98: 6002 bras 56b9c <msdos_dir_read+0x1d0> <== NOT EXECUTED
default:
p += 2;
56b9a: 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++)
56b9c: 5288 addql #1,%a0 <== NOT EXECUTED
56b9e: 7c0d moveq #13,%d6 <== NOT EXECUTED
56ba0: bc88 cmpl %a0,%d6 <== NOT EXECUTED
56ba2: 66ca bnes 56b6e <msdos_dir_read+0x1a2> <== NOT EXECUTED
56ba4: 6000 01f4 braw 56d9a <msdos_dir_read+0x3ce> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
56ba8: 4aae fec8 tstl %fp@(-312) <== NOT EXECUTED
56bac: 6708 beqs 56bb6 <msdos_dir_read+0x1ea> <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
56bae: 53ae fec8 subql #1,%fp@(-312) <== NOT EXECUTED
56bb2: 6000 01ee braw 56da2 <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,
56bb6: 486e fedc pea %fp@(-292) <== NOT EXECUTED
56bba: 2f07 movel %d7,%sp@- <== NOT EXECUTED
56bbc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
56bc0: 2f2e fed0 movel %fp@(-304),%sp@- <== NOT EXECUTED
56bc4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56bc6: 4eb9 0004 f5e2 jsr 4f5e2 <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
56bcc: 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,
56bd0: 2c00 movel %d0,%d6 <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
56bd2: 6704 beqs 56bd8 <msdos_dir_read+0x20c> <== NOT EXECUTED
56bd4: 6000 01b8 braw 56d8e <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);
56bd8: 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;
56bdc: 70ff moveq #-1,%d0 <== NOT EXECUTED
56bde: 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;
56be2: 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);
56be8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56bea: 2d40 fee8 movel %d0,%fp@(-280) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
56bee: 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;
56bf2: 2d43 fee4 movel %d3,%fp@(-284) <== NOT EXECUTED
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
56bf6: 4eb9 0004 f16c jsr 4f16c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
56bfc: 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);
56c00: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc != RC_OK)
56c02: 6704 beqs 56c08 <msdos_dir_read+0x23c> <== NOT EXECUTED
56c04: 6000 0188 braw 56d8e <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;
56c08: 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)
56c0c: 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);
56c0e: 323c 0110 movew #272,%d1 <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
56c12: 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);
56c18: 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;
56c1c: 2d42 fef8 movel %d2,%fp@(-264) <== NOT EXECUTED
56c20: 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)
56c24: bc85 cmpl %d5,%d6 <== NOT EXECUTED
56c26: 6700 01c6 beqw 56dee <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)
56c2a: 43eb 000b lea %a3@(11),%a1 <== NOT EXECUTED
56c2e: 204b moveal %a3,%a0 <== NOT EXECUTED
56c30: 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;
56c32: 0800 0000 btst #0,%d0 <== NOT EXECUTED
56c36: 6704 beqs 56c3c <msdos_dir_read+0x270> <== NOT EXECUTED
56c38: 7280 moveq #-128,%d1 <== NOT EXECUTED
56c3a: 6002 bras 56c3e <msdos_dir_read+0x272> <== NOT EXECUTED
56c3c: 4201 clrb %d1 <== NOT EXECUTED
56c3e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56c44: 1c18 moveb %a0@+,%d6 <== NOT EXECUTED
56c46: e288 lsrl #1,%d0 <== NOT EXECUTED
56c48: d086 addl %d6,%d0 <== NOT EXECUTED
56c4a: 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++)
56c4c: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
56c4e: 66e2 bnes 56c32 <msdos_dir_read+0x266> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
56c50: 4a84 tstl %d4 <== NOT EXECUTED
56c52: 6600 019a bnew 56dee <msdos_dir_read+0x422> <== NOT EXECUTED
56c56: 4281 clrl %d1 <== NOT EXECUTED
56c58: 122e fec7 moveb %fp@(-313),%d1 <== NOT EXECUTED
56c5c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56c62: b081 cmpl %d1,%d0 <== NOT EXECUTED
56c64: 6600 0188 bnew 56dee <msdos_dir_read+0x422> <== NOT EXECUTED
56c68: 6000 0192 braw 56dfc <msdos_dir_read+0x430> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
56c6c: b7c8 cmpal %a0,%a3 <== NOT EXECUTED
56c6e: 6710 beqs 56c80 <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)
56c70: 2248 moveal %a0,%a1 <== NOT EXECUTED
56c72: 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) &&
56c74: 7220 moveq #32,%d1 <== NOT EXECUTED
56c76: 1020 moveb %a0@-,%d0 <== NOT EXECUTED
56c78: 49c0 extbl %d0 <== NOT EXECUTED
56c7a: b280 cmpl %d0,%d1 <== NOT EXECUTED
56c7c: 67ee beqs 56c6c <msdos_dir_read+0x2a0> <== NOT EXECUTED
56c7e: 6002 bras 56c82 <msdos_dir_read+0x2b6> <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
56c80: 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(
56c82: 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)
56c86: 2c08 movel %a0,%d6 <== NOT EXECUTED
56c88: 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++));
56c8a: 2a39 0006 8098 movel 68098 <__ctype_ptr__>,%d5 <== NOT EXECUTED
56c90: 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)
56c94: 2d46 febe movel %d6,%fp@(-322) <== NOT EXECUTED
56c98: 6028 bras 56cc2 <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++));
56c9a: 286e feae moveal %fp@(-338),%a4 <== NOT EXECUTED
56c9e: 4280 clrl %d0 <== NOT EXECUTED
56ca0: 101c moveb %a4@+,%d0 <== NOT EXECUTED
56ca2: 52ae feae addql #1,%fp@(-338) <== NOT EXECUTED
56ca6: 2845 moveal %d5,%a4 <== NOT EXECUTED
56ca8: 1234 0801 moveb %a4@(00000001,%d0:l),%d1 <== NOT EXECUTED
56cac: 1c01 moveb %d1,%d6 <== NOT EXECUTED
56cae: 7203 moveq #3,%d1 <== NOT EXECUTED
56cb0: cc81 andl %d1,%d6 <== NOT EXECUTED
56cb2: 123c 0001 moveb #1,%d1 <== NOT EXECUTED
56cb6: b286 cmpl %d6,%d1 <== NOT EXECUTED
56cb8: 6606 bnes 56cc0 <msdos_dir_read+0x2f4> <== NOT EXECUTED
56cba: 0680 0000 0020 addil #32,%d0 <== NOT EXECUTED
56cc0: 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)
56cc2: 202e febe movel %fp@(-322),%d0 <== NOT EXECUTED
56cc6: 9088 subl %a0,%d0 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
56cc8: 4a80 tstl %d0 <== NOT EXECUTED
56cca: 6ece bgts 56c9a <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) &&
56ccc: 7a20 moveq #32,%d5 <== NOT EXECUTED
56cce: 102b 000a moveb %a3@(10),%d0 <== NOT EXECUTED
56cd2: 49c0 extbl %d0 <== NOT EXECUTED
56cd4: ba80 cmpl %d0,%d5 <== NOT EXECUTED
56cd6: 6600 0138 bnew 56e10 <msdos_dir_read+0x444> <== NOT EXECUTED
56cda: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
56cde: 49c0 extbl %d0 <== NOT EXECUTED
56ce0: ba80 cmpl %d0,%d5 <== NOT EXECUTED
56ce2: 6600 0130 bnew 56e14 <msdos_dir_read+0x448> <== NOT EXECUTED
56ce6: 102b 0008 moveb %a3@(8),%d0 <== NOT EXECUTED
56cea: 49c0 extbl %d0 <== NOT EXECUTED
56cec: ba80 cmpl %d0,%d5 <== NOT EXECUTED
56cee: 6746 beqs 56d36 <msdos_dir_read+0x36a> <== NOT EXECUTED
56cf0: 7001 moveq #1,%d0 <== NOT EXECUTED
56cf2: 6000 0122 braw 56e16 <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++));
56cf6: 286e fecc moveal %fp@(-308),%a4 <== NOT EXECUTED
56cfa: 4281 clrl %d1 <== NOT EXECUTED
56cfc: 121c moveb %a4@+,%d1 <== NOT EXECUTED
56cfe: 7a03 moveq #3,%d5 <== NOT EXECUTED
56d00: 52ae fecc addql #1,%fp@(-308) <== NOT EXECUTED
56d04: 1c31 1801 moveb %a1@(00000001,%d1:l),%d6 <== NOT EXECUTED
56d08: cc85 andl %d5,%d6 <== NOT EXECUTED
56d0a: 1a3c 0001 moveb #1,%d5 <== NOT EXECUTED
56d0e: ba86 cmpl %d6,%d5 <== NOT EXECUTED
56d10: 6606 bnes 56d18 <msdos_dir_read+0x34c> <== NOT EXECUTED
56d12: 0681 0000 0020 addil #32,%d1 <== NOT EXECUTED
56d18: 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)
56d1a: 222e febe movel %fp@(-322),%d1 <== NOT EXECUTED
56d1e: 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) {
56d20: 4a81 tstl %d1 <== NOT EXECUTED
56d22: 6ed2 bgts 56cf6 <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)
56d24: 2200 movel %d0,%d1 <== NOT EXECUTED
56d26: 4681 notl %d1 <== NOT EXECUTED
56d28: d281 addl %d1,%d1 <== NOT EXECUTED
56d2a: 9381 subxl %d1,%d1 <== NOT EXECUTED
56d2c: 226e feae moveal %fp@(-338),%a1 <== NOT EXECUTED
56d30: c081 andl %d1,%d0 <== NOT EXECUTED
56d32: d1c0 addal %d0,%a0 <== NOT EXECUTED
56d34: 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(
56d36: 7aff moveq #-1,%d5 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
56d38: 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(
56d3a: 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));
56d3e: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED
56d42: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
56d46: 486e fef0 pea %fp@(-272) <== NOT EXECUTED
56d4a: 4870 2800 pea %a0@(00000000,%d2:l) <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
56d4e: 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));
56d54: 4eb9 0005 7dd0 jsr 57dd0 <memcpy> <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
56d5a: 4280 clrl %d0 <== NOT EXECUTED
56d5c: 223c 0000 0110 movel #272,%d1 <== NOT EXECUTED
56d62: d3ad 0008 addl %d1,%a5@(8) <== NOT EXECUTED
56d66: 2c2d 0004 movel %a5@(4),%d6 <== NOT EXECUTED
56d6a: dd80 addxl %d0,%d6 <== NOT EXECUTED
56d6c: 2b46 0004 movel %d6,%a5@(4) <== NOT EXECUTED
cmpltd += (sizeof(struct dirent));
count -= (sizeof(struct dirent));
56d70: 203c ffff fef0 movel #-272,%d0 <== NOT EXECUTED
56d76: d1ae feb2 addl %d0,%fp@(-334) <== NOT EXECUTED
/* inode number extracted, close fat-file */
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
56d7a: 2f2e fed8 movel %fp@(-296),%sp@- <== NOT EXECUTED
56d7e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56d80: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
56d86: 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);
56d8a: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc != RC_OK)
56d8c: 670c beqs 56d9a <msdos_dir_read+0x3ce> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
56d8e: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
56d92: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
56d98: 6050 bras 56dea <msdos_dir_read+0x41e> <== NOT EXECUTED
return rc;
}
}
if (count <= 0)
56d9a: 4aae feb2 tstl %fp@(-334) <== NOT EXECUTED
56d9e: 6604 bnes 56da4 <msdos_dir_read+0x3d8> <== NOT EXECUTED
56da0: 6014 bras 56db6 <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;
56da2: 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)
56da4: 0683 0000 0020 addil #32,%d3 <== NOT EXECUTED
56daa: 6002 bras 56dae <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)
56dac: 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)
56dae: b6ae feba cmpl %fp@(-326),%d3 <== NOT EXECUTED
56db2: 6500 fd10 bcsw 56ac4 <msdos_dir_read+0xf8> <== NOT EXECUTED
56db6: deae fec2 addl %fp@(-318),%d7 <== NOT EXECUTED
56dba: 601a bras 56dd6 <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(
56dbc: 41ee fef0 lea %fp@(-272),%a0 <== NOT EXECUTED
56dc0: 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)
56dc4: 4287 clrl %d7 <== NOT EXECUTED
56dc6: 4284 clrl %d4 <== NOT EXECUTED
56dc8: 7aff moveq #-1,%d5 <== NOT EXECUTED
56dca: 4282 clrl %d2 <== NOT EXECUTED
56dcc: 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(
56dce: 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)
56dd2: 1d41 fec7 moveb %d1,%fp@(-313) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
while (count > 0)
56dd6: 4aae feb2 tstl %fp@(-334) <== NOT EXECUTED
56dda: 6600 fca4 bnew 56a80 <msdos_dir_read+0xb4> <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
56dde: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
return cmpltd;
56de2: 2c02 movel %d2,%d6 <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
56de4: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
56dea: 588f addql #4,%sp <== NOT EXECUTED
56dec: 6048 bras 56e36 <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)
56dee: 49eb 0008 lea %a3@(8),%a4 <== NOT EXECUTED
56df2: 204c moveal %a4,%a0 <== NOT EXECUTED
56df4: 2d4c fecc movel %a4,%fp@(-308) <== NOT EXECUTED
56df8: 6000 fe76 braw 56c70 <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);
56dfc: 2f2e fed4 movel %fp@(-300),%sp@- <== NOT EXECUTED
56e00: 4eb9 0005 9150 jsr 59150 <strlen> <== NOT EXECUTED
56e06: 588f addql #4,%sp <== NOT EXECUTED
56e08: 3d40 fefe movew %d0,%fp@(-258) <== NOT EXECUTED
56e0c: 6000 ff30 braw 56d3e <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 ,
56e10: 7003 moveq #3,%d0 <== NOT EXECUTED
56e12: 6002 bras 56e16 <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--)
56e14: 7002 moveq #2,%d0 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
56e16: 10fc 002e moveb #46,%a0@+ <== NOT EXECUTED
len += i + 1; /* extension + dot */
56e1a: 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)
56e1e: 49f0 0800 lea %a0@(00000000,%d0:l),%a4 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
56e22: 2648 moveal %a0,%a3 <== NOT EXECUTED
len += i + 1; /* extension + dot */
56e24: 2d49 feae movel %a1,%fp@(-338) <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
56e28: 2279 0006 8098 moveal 68098 <__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)
56e2e: 2d4c febe movel %a4,%fp@(-322) <== NOT EXECUTED
56e32: 6000 fee6 braw 56d1a <msdos_dir_read+0x34e> <== NOT EXECUTED
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
return cmpltd;
}
56e36: 2006 movel %d6,%d0 <== NOT EXECUTED
56e38: 4cee 3cfc fe84 moveml %fp@(-380),%d2-%d7/%a2-%a5 <== NOT EXECUTED
56e3e: 4e5e unlk %fp <== NOT EXECUTED
00056e42 <msdos_dir_stat>:
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56e42: 4e56 fff4 linkw %fp,#-12
56e46: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
56e4a: 2268 0014 moveal %a0@(20),%a1
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56e4e: 48d7 1c00 moveml %a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
56e52: 2669 0008 moveal %a1@(8),%a3
fat_file_fd_t *fat_fd = loc->node_access;
56e56: 2868 0008 moveal %a0@(8),%a4
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56e5a: 42a7 clrl %sp@-
int
msdos_dir_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
56e5c: 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,
56e60: 42a7 clrl %sp@-
56e62: 2f2b 0090 movel %a3@(144),%sp@-
56e66: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
56e6c: 4fef 000c lea %sp@(12),%sp
56e70: 4a80 tstl %d0
56e72: 6710 beqs 56e84 <msdos_dir_stat+0x42> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
56e74: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
56e7a: 2040 moveal %d0,%a0 <== NOT EXECUTED
56e7c: 7005 moveq #5,%d0 <== NOT EXECUTED
56e7e: 2080 movel %d0,%a0@ <== NOT EXECUTED
56e80: 70ff moveq #-1,%d0 <== NOT EXECUTED
56e82: 605c bras 56ee0 <msdos_dir_stat+0x9e> <== NOT EXECUTED
static inline dev_t rtems_disk_get_device_identifier(
const rtems_disk_device *dd
)
{
return dd->dev;
56e84: 206b 005a moveal %a3@(90),%a0
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
56e88: 2010 movel %a0@,%d0
56e8a: 2228 0004 movel %a0@(4),%d1
buf->st_ino = fat_fd->ino;
56e8e: 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);
56e94: 2480 movel %d0,%a2@
56e96: 2541 0004 movel %d1,%a2@(4)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
56e9a: 223c 0000 41ff movel #16895,%d1
56ea0: 2541 000c movel %d1,%a2@(12)
buf->st_rdev = 0ll;
56ea4: 4280 clrl %d0
56ea6: 4281 clrl %d1
56ea8: 2540 0016 movel %d0,%a2@(22)
56eac: 2541 001a movel %d1,%a2@(26)
buf->st_size = fat_fd->fat_file_size;
56eb0: 202c 0018 movel %a4@(24),%d0
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
56eb4: 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;
56eb6: 2540 0022 movel %d0,%a2@(34)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
56eba: e2a8 lsrl %d1,%d0
56ebc: 2540 0042 movel %d0,%a2@(66)
buf->st_blksize = fs_info->fat.vol.bps;
56ec0: 4280 clrl %d0
56ec2: 3013 movew %a3@,%d0
buf->st_mtime = fat_fd->mtime;
56ec4: 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;
56eca: 42aa 001e clrl %a2@(30)
buf->st_blocks = fat_fd->fat_file_size >> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bps;
56ece: 2540 003e movel %d0,%a2@(62)
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
56ed2: 2f2b 0090 movel %a3@(144),%sp@-
56ed6: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return RC_OK;
56edc: 588f addql #4,%sp
56ede: 4280 clrl %d0
}
56ee0: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
56ee6: 4e5e unlk %fp
...
00054120 <msdos_eval_token>:
static inline bool rtems_filesystem_is_current_directory(
const char *token,
size_t tokenlen
)
{
return tokenlen == 1 && token [0] == '.';
54120: 7001 moveq #1,%d0
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
54122: 4e56 0000 linkw %fp,#0
54126: 206e 0010 moveal %fp@(16),%a0
5412a: 2f0a movel %a2,%sp@-
5412c: 246e 0008 moveal %fp@(8),%a2
54130: 222e 0014 movel %fp@(20),%d1
54134: 2f02 movel %d2,%sp@-
54136: b081 cmpl %d1,%d0
54138: 6610 bnes 5414a <msdos_eval_token+0x2a> <== ALWAYS TAKEN
5413a: 742e moveq #46,%d2 <== NOT EXECUTED
5413c: 1010 moveb %a0@,%d0 <== NOT EXECUTED
5413e: b580 eorl %d2,%d0 <== NOT EXECUTED
54140: 4a00 tstb %d0 <== NOT EXECUTED
54142: 57c0 seq %d0 <== NOT EXECUTED
54144: 49c0 extbl %d0 <== NOT EXECUTED
54146: 4480 negl %d0 <== NOT EXECUTED
54148: 6002 bras 5414c <msdos_eval_token+0x2c> <== NOT EXECUTED
5414a: 4280 clrl %d0
rtems_filesystem_eval_path_generic_status status =
RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
5414c: 0800 0000 btst #0,%d0
54150: 6708 beqs 5415a <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;
54152: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
rtems_filesystem_eval_path_clear_token(ctx);
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
54156: 4280 clrl %d0 <== NOT EXECUTED
54158: 6060 bras 541ba <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);
5415a: 2f01 movel %d1,%sp@-
5415c: 2f08 movel %a0,%sp@-
5415e: 486a 0018 pea %a2@(24)
54162: 4eb9 0005 543c jsr 5543c <msdos_find_name>
if (rc == RC_OK) {
54168: 4fef 000c lea %sp@(12),%sp
5416c: 4a80 tstl %d0
5416e: 6630 bnes 541a0 <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;
54170: 206a 002c moveal %a2@(44),%a0
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
54174: 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;
54178: 2068 0008 moveal %a0@(8),%a0
5417c: 42aa 000c clrl %a2@(12)
fat_file_fd_t *fat_fd = loc->node_access;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
54180: 4aa9 0010 tstl %a1@(16)
54184: 6608 bnes 5418e <msdos_eval_token+0x6e> <== ALWAYS TAKEN
loc->handlers = fs_info->directory_handlers;
54186: 2568 0088 0028 movel %a0@(136),%a2@(40) <== NOT EXECUTED
5418c: 6006 bras 54194 <msdos_eval_token+0x74> <== NOT EXECUTED
else
loc->handlers = fs_info->file_handlers;
5418e: 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)) {
54194: 4aaa 0004 tstl %a2@(4)
54198: 57c0 seq %d0
5419a: 49c0 extbl %d0
5419c: 4480 negl %d0
5419e: 601a bras 541ba <msdos_eval_token+0x9a>
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else if (rc == MSDOS_NAME_NOT_FOUND_ERR) {
541a0: 0c80 0000 7d01 cmpil #32001,%d0
541a6: 6710 beqs 541b8 <msdos_eval_token+0x98> <== ALWAYS TAKEN
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY;
} else {
rtems_filesystem_eval_path_error(ctx, 0);
541a8: 42a7 clrl %sp@- <== NOT EXECUTED
541aa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
541ac: 4eb9 0004 4fd2 jsr 44fd2 <rtems_filesystem_eval_path_error><== NOT EXECUTED
541b2: 508f addql #8,%sp <== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
541b4: 7001 moveq #1,%d0 <== NOT EXECUTED
541b6: 6002 bras 541ba <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;
541b8: 7002 moveq #2,%d0
rtems_filesystem_eval_path_error(ctx, 0);
}
}
return status;
}
541ba: 242e fff8 movel %fp@(-8),%d2
541be: 246e fffc moveal %fp@(-4),%a2
541c2: 4e5e unlk %fp <== NOT EXECUTED
00056f48 <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)
{
56f48: 4e56 0000 linkw %fp,#0
56f4c: 2f0b movel %a3,%sp@-
56f4e: 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;
56f52: 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)
{
56f56: 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;
56f58: 2468 0008 moveal %a0@(8),%a2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
56f5c: 42a7 clrl %sp@-
56f5e: 42a7 clrl %sp@-
56f60: 2f2a 0090 movel %a2@(144),%sp@-
56f64: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
56f6a: 4fef 000c lea %sp@(12),%sp
56f6e: 4a80 tstl %d0
56f70: 6712 beqs 56f84 <msdos_file_close+0x3c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
56f72: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
56f78: 367c ffff moveaw #-1,%a3 <== NOT EXECUTED
56f7c: 2040 moveal %d0,%a0 <== NOT EXECUTED
56f7e: 7005 moveq #5,%d0 <== NOT EXECUTED
56f80: 2080 movel %d0,%a0@ <== NOT EXECUTED
56f82: 6014 bras 56f98 <msdos_file_close+0x50> <== NOT EXECUTED
rc = msdos_file_update(iop);
56f84: 2f0b movel %a3,%sp@-
56f86: 4eba ff64 jsr %pc@(56eec <msdos_file_update>)
rtems_semaphore_release(fs_info->vol_sema);
56f8a: 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);
56f8e: 2640 moveal %d0,%a3
rtems_semaphore_release(fs_info->vol_sema);
56f90: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return rc;
56f96: 508f addql #8,%sp
}
56f98: 200b movel %a3,%d0
56f9a: 246e fff8 moveal %fp@(-8),%a2
56f9e: 266e fffc moveal %fp@(-4),%a3
56fa2: 4e5e unlk %fp <== NOT EXECUTED
000571ae <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)
{
571ae: 4e56 ffd8 linkw %fp,#-40
571b2: 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;
571b6: 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)
{
571ba: 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;
571be: 2468 0008 moveal %a0@(8),%a2
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
571c2: 2669 0018 moveal %a1@(24),%a3
uint32_t old_length;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
571c6: 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)
{
571c8: 242e 000c movel %fp@(12),%d2
571cc: 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,
571d0: 42a7 clrl %sp@-
571d2: 2f2a 0090 movel %a2@(144),%sp@-
571d6: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
571dc: 4fef 000c lea %sp@(12),%sp
571e0: 4a80 tstl %d0
571e2: 6712 beqs 571f6 <msdos_file_ftruncate+0x48> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
571e4: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
571ea: 7405 moveq #5,%d2 <== NOT EXECUTED
571ec: 7cff moveq #-1,%d6 <== NOT EXECUTED
571ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
571f0: 2082 movel %d2,%a0@ <== NOT EXECUTED
571f2: 6000 0088 braw 5727c <msdos_file_ftruncate+0xce> <== NOT EXECUTED
old_length = fat_fd->fat_file_size;
571f6: 286b 0018 moveal %a3@(24),%a4
if (length < old_length) {
571fa: 4286 clrl %d6
571fc: 2e0c movel %a4,%d7
571fe: 2002 movel %d2,%d0
57200: 2203 movel %d3,%d1
57202: 9287 subl %d7,%d1
57204: 9186 subxl %d6,%d0
57206: 6c14 bges 5721c <msdos_file_ftruncate+0x6e> <== ALWAYS TAKEN
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
57208: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5720a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5720c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5720e: 4eb9 0004 f432 jsr 4f432 <fat_file_truncate> <== NOT EXECUTED
57214: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
57218: 2c00 movel %d0,%d6 <== NOT EXECUTED
5721a: 604c bras 57268 <msdos_file_ftruncate+0xba> <== NOT EXECUTED
} else {
uint32_t new_length;
rc = fat_file_extend(&fs_info->fat,
5721c: 486e fffc pea %fp@(-4)
57220: 2f03 movel %d3,%sp@-
57222: 4878 0001 pea 1 <ADD>
57226: 2f0b movel %a3,%sp@-
57228: 2f0a movel %a2,%sp@-
5722a: 4eb9 0004 f678 jsr 4f678 <fat_file_extend>
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
57230: 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,
57234: 2c00 movel %d0,%d6
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
57236: 6630 bnes 57268 <msdos_file_ftruncate+0xba> <== NEVER TAKEN
57238: 2a2e fffc movel %fp@(-4),%d5
5723c: 4284 clrl %d4
5723e: 2002 movel %d2,%d0
57240: 2203 movel %d3,%d1
57242: 9285 subl %d5,%d1
57244: 9184 subxl %d4,%d0
57246: 6724 beqs 5726c <msdos_file_ftruncate+0xbe> <== ALWAYS TAKEN
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
57248: 2f0c movel %a4,%sp@- <== NOT EXECUTED
errno = ENOSPC;
rc = -1;
5724a: 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);
5724c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5724e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57250: 4eb9 0004 f432 jsr 4f432 <fat_file_truncate> <== NOT EXECUTED
errno = ENOSPC;
57256: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
5725c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
57260: 721c moveq #28,%d1 <== NOT EXECUTED
57262: 2040 moveal %d0,%a0 <== NOT EXECUTED
57264: 2081 movel %d1,%a0@ <== NOT EXECUTED
57266: 6008 bras 57270 <msdos_file_ftruncate+0xc2> <== NOT EXECUTED
rc = -1;
}
}
if (rc == RC_OK) {
57268: 4a86 tstl %d6 <== NOT EXECUTED
5726a: 6604 bnes 57270 <msdos_file_ftruncate+0xc2> <== NOT EXECUTED
fat_fd->fat_file_size = length;
5726c: 2743 0018 movel %d3,%a3@(24)
}
rtems_semaphore_release(fs_info->vol_sema);
57270: 2f2a 0090 movel %a2@(144),%sp@-
57274: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return rc;
5727a: 588f addql #4,%sp
}
5727c: 2006 movel %d6,%d0
5727e: 4cee 1cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a4
57284: 4e5e unlk %fp <== NOT EXECUTED
00056fa6 <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)
{
56fa6: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
56faa: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
56fae: 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;
56fb2: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
56fb6: 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;
56fba: 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,
56fbe: 42a7 clrl %sp@- <== NOT EXECUTED
56fc0: 42a7 clrl %sp@- <== NOT EXECUTED
56fc2: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
56fc6: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
56fcc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56fd0: 4a80 tstl %d0 <== NOT EXECUTED
56fd2: 6710 beqs 56fe4 <msdos_file_read+0x3e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
56fd4: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
56fda: 78ff moveq #-1,%d4 <== NOT EXECUTED
56fdc: 7205 moveq #5,%d1 <== NOT EXECUTED
56fde: 2040 moveal %d0,%a0 <== NOT EXECUTED
56fe0: 2081 movel %d1,%a0@ <== NOT EXECUTED
56fe2: 603e bras 57022 <msdos_file_read+0x7c> <== NOT EXECUTED
ret = fat_file_read(&fs_info->fat, fat_fd, iop->offset, count,
56fe4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
56fe8: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
56fec: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
56ff0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56ff2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56ff4: 4eb9 0004 f2c2 jsr 4f2c2 <fat_file_read> <== NOT EXECUTED
buffer);
if (ret > 0)
56ffa: 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,
56ffe: 2800 movel %d0,%d4 <== NOT EXECUTED
buffer);
if (ret > 0)
57000: 6f14 bles 57016 <msdos_file_read+0x70> <== NOT EXECUTED
iop->offset += ret;
57002: 2600 movel %d0,%d3 <== NOT EXECUTED
57004: 5bc2 smi %d2 <== NOT EXECUTED
57006: 49c2 extbl %d2 <== NOT EXECUTED
57008: d7aa 0008 addl %d3,%a2@(8) <== NOT EXECUTED
5700c: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
57010: d182 addxl %d2,%d0 <== NOT EXECUTED
57012: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
57016: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
5701a: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return ret;
57020: 588f addql #4,%sp <== NOT EXECUTED
}
57022: 2004 movel %d4,%d0 <== NOT EXECUTED
57024: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 <== NOT EXECUTED
5702a: 4e5e unlk %fp <== NOT EXECUTED
000570f4 <msdos_file_stat>:
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
570f4: 4e56 fff0 linkw %fp,#-16
570f8: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
570fc: 2268 0014 moveal %a0@(20),%a1
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
57100: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
57104: 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;
57108: 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;
5710a: 2868 0008 moveal %a0@(8),%a4
uint32_t cl_mask = fs_info->fat.vol.bpc - 1;
5710e: 342b 0006 movew %a3@(6),%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
57112: 42a7 clrl %sp@-
int
msdos_file_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
57114: 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;
57118: 5382 subql #1,%d2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5711a: 42a7 clrl %sp@-
5711c: 2f2b 0090 movel %a3@(144),%sp@-
57120: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
57126: 4fef 000c lea %sp@(12),%sp
5712a: 4a80 tstl %d0
5712c: 6710 beqs 5713e <msdos_file_stat+0x4a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
5712e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
57134: 2040 moveal %d0,%a0 <== NOT EXECUTED
57136: 7005 moveq #5,%d0 <== NOT EXECUTED
57138: 2080 movel %d0,%a0@ <== NOT EXECUTED
5713a: 70ff moveq #-1,%d0 <== NOT EXECUTED
5713c: 6066 bras 571a4 <msdos_file_stat+0xb0> <== NOT EXECUTED
5713e: 206b 005a moveal %a3@(90),%a0
buf->st_dev = rtems_disk_get_device_identifier(fs_info->fat.vol.dd);
57142: 2010 movel %a0@,%d0
57144: 2228 0004 movel %a0@(4),%d1
buf->st_ino = fat_fd->ino;
57148: 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);
5714e: 2480 movel %d0,%a2@
57150: 2541 0004 movel %d1,%a2@(4)
buf->st_ino = fat_fd->ino;
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
57154: 223c 0000 81ff movel #33279,%d1
5715a: 2541 000c movel %d1,%a2@(12)
buf->st_rdev = 0ll;
5715e: 4280 clrl %d0
57160: 4281 clrl %d1
57162: 2540 0016 movel %d0,%a2@(22)
57166: 2541 001a movel %d1,%a2@(26)
buf->st_size = fat_fd->fat_file_size;
5716a: 222c 0018 movel %a4@(24),%d1
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
5716e: 2002 movel %d2,%d0
57170: d481 addl %d1,%d2
57172: 4680 notl %d0
57174: 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;
57176: 2541 0022 movel %d1,%a2@(34)
buf->st_blocks = ((fat_fd->fat_file_size + cl_mask) & ~cl_mask)
>> FAT_SECTOR512_BITS;
5717a: 7209 moveq #9,%d1
5717c: 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)
5717e: 2540 0042 movel %d0,%a2@(66)
>> FAT_SECTOR512_BITS;
buf->st_blksize = fs_info->fat.vol.bpc;
57182: 4280 clrl %d0
57184: 302b 0006 movew %a3@(6),%d0
buf->st_mtime = fat_fd->mtime;
57188: 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;
5718e: 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;
57192: 2540 003e movel %d0,%a2@(62)
buf->st_mtime = fat_fd->mtime;
rtems_semaphore_release(fs_info->vol_sema);
57196: 2f2b 0090 movel %a3@(144),%sp@-
5719a: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return RC_OK;
571a0: 588f addql #4,%sp
571a2: 4280 clrl %d0
}
571a4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
571aa: 4e5e unlk %fp <== NOT EXECUTED
00057288 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
57288: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
5728c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
57290: 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;
57294: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
57298: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
5729c: 42a7 clrl %sp@- <== NOT EXECUTED
5729e: 42a7 clrl %sp@- <== NOT EXECUTED
572a0: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
572a4: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
572aa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
572ae: 4a80 tstl %d0 <== NOT EXECUTED
572b0: 6710 beqs 572c2 <msdos_file_sync+0x3a> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
572b2: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
572b8: 74ff moveq #-1,%d2 <== NOT EXECUTED
572ba: 2040 moveal %d0,%a0 <== NOT EXECUTED
572bc: 7005 moveq #5,%d0 <== NOT EXECUTED
572be: 2080 movel %d0,%a0@ <== NOT EXECUTED
572c0: 602e bras 572f0 <msdos_file_sync+0x68> <== NOT EXECUTED
rc = msdos_file_update(iop);
572c2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
572c4: 4eba fc26 jsr %pc@(56eec <msdos_file_update>) <== NOT EXECUTED
if (rc != RC_OK)
572c8: 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);
572ca: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
572cc: 670e beqs 572dc <msdos_file_sync+0x54> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
572ce: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
572d2: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
572d8: 588f addql #4,%sp <== NOT EXECUTED
572da: 6014 bras 572f0 <msdos_file_sync+0x68> <== NOT EXECUTED
}
rc = fat_sync(&fs_info->fat);
572dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
572de: 4eb9 0005 08a8 jsr 508a8 <fat_sync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
572e4: 2f2a 0090 movel %a2@(144),%sp@- <== NOT EXECUTED
572e8: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
572ee: 508f addql #8,%sp <== NOT EXECUTED
}
572f0: 2002 movel %d2,%d0 <== NOT EXECUTED
572f2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
572f8: 4e5e unlk %fp <== NOT EXECUTED
00056eec <msdos_file_update>:
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
56eec: 4e56 0000 linkw %fp,#0
56ef0: 2f0b movel %a3,%sp@-
56ef2: 2f0a movel %a2,%sp@-
56ef4: 246e 0008 moveal %fp@(8),%a2
int rc = RC_OK;
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
56ef8: 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))
56efc: 102b 0030 moveb %a3@(48),%d0
56f00: 0800 0000 btst #0,%d0
56f04: 6634 bnes 56f3a <msdos_file_update+0x4e> <== NEVER TAKEN
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
56f06: 2f0b movel %a3,%sp@-
56f08: 2f2a 0024 movel %a2@(36),%sp@-
56f0c: 4eb9 0005 455c jsr 5455c <msdos_set_first_cluster_num>
if (rc != RC_OK)
56f12: 508f addql #8,%sp
56f14: 4a80 tstl %d0
56f16: 6624 bnes 56f3c <msdos_file_update+0x50> <== NEVER TAKEN
{
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
56f18: 2f0b movel %a3,%sp@-
56f1a: 2f2a 0024 movel %a2@(36),%sp@-
56f1e: 4eb9 0005 460e jsr 5460e <msdos_set_file_size>
if (rc != RC_OK)
56f24: 508f addql #8,%sp
56f26: 4a80 tstl %d0
56f28: 6612 bnes 56f3c <msdos_file_update+0x50> <== NEVER TAKEN
{
return rc;
}
rc = msdos_set_dir_wrt_time_and_date(iop->pathinfo.mt_entry, fat_fd);
56f2a: 2f0b movel %a3,%sp@-
56f2c: 2f2a 0024 movel %a2@(36),%sp@-
56f30: 4eb9 0005 4484 jsr 54484 <msdos_set_dir_wrt_time_and_date>
56f36: 508f addql #8,%sp
56f38: 6002 bras 56f3c <msdos_file_update+0x50>
#include "msdos.h"
static int
msdos_file_update(rtems_libio_t *iop)
{
int rc = RC_OK;
56f3a: 4280 clrl %d0 <== NOT EXECUTED
return rc;
}
}
return rc;
}
56f3c: 246e fff8 moveal %fp@(-8),%a2
56f40: 266e fffc moveal %fp@(-4),%a3
56f44: 4e5e unlk %fp <== NOT EXECUTED
0005702e <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)
{
5702e: 4e56 ffe0 linkw %fp,#-32
57032: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
57036: 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;
5703a: 206a 0024 moveal %a2@(36),%a0
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
5703e: 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;
57042: 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,
57046: 42a7 clrl %sp@-
57048: 42a7 clrl %sp@-
5704a: 2f2b 0090 movel %a3@(144),%sp@-
5704e: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
57054: 4fef 000c lea %sp@(12),%sp
57058: 4a80 tstl %d0
5705a: 670e beqs 5706a <msdos_file_write+0x3c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
5705c: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
57062: 7405 moveq #5,%d2 <== NOT EXECUTED
57064: 2040 moveal %d0,%a0 <== NOT EXECUTED
57066: 2082 movel %d2,%a0@ <== NOT EXECUTED
57068: 6042 bras 570ac <msdos_file_write+0x7e> <== NOT EXECUTED
if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
5706a: 202a 000c movel %a2@(12),%d0
5706e: 0280 0000 0200 andil #512,%d0
57074: 670c beqs 57082 <msdos_file_write+0x54> <== ALWAYS TAKEN
iop->offset = fat_fd->fat_file_size;
57076: 202c 0018 movel %a4@(24),%d0 <== NOT EXECUTED
5707a: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
5707e: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
57082: 2f2e 000c movel %fp@(12),%sp@-
57086: 2f2e 0010 movel %fp@(16),%sp@-
5708a: 2f2a 0008 movel %a2@(8),%sp@-
5708e: 2f0c movel %a4,%sp@-
57090: 2f0b movel %a3,%sp@-
57092: 4eb9 0004 f858 jsr 4f858 <fat_file_write>
buffer);
if (ret < 0)
57098: 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,
5709c: 2c00 movel %d0,%d6
buffer);
if (ret < 0)
5709e: 6c10 bges 570b0 <msdos_file_write+0x82> <== ALWAYS TAKEN
{
rtems_semaphore_release(fs_info->vol_sema);
570a0: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
570a4: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release> <== NOT EXECUTED
return -1;
570aa: 588f addql #4,%sp <== NOT EXECUTED
570ac: 7cff moveq #-1,%d6 <== NOT EXECUTED
570ae: 6038 bras 570e8 <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)
570b0: 2a2c 0018 movel %a4@(24),%d5
570b4: 4284 clrl %d4
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
570b6: 2600 movel %d0,%d3
570b8: 5bc2 smi %d2
570ba: 49c2 extbl %d2
570bc: 222a 0004 movel %a2@(4),%d1
570c0: d6aa 0008 addl %a2@(8),%d3
570c4: d581 addxl %d1,%d2
if (iop->offset > fat_fd->fat_file_size)
570c6: 2002 movel %d2,%d0
570c8: 2203 movel %d3,%d1
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
570ca: 2542 0004 movel %d2,%a2@(4)
570ce: 2543 0008 movel %d3,%a2@(8)
if (iop->offset > fat_fd->fat_file_size)
570d2: 9285 subl %d5,%d1
570d4: 9184 subxl %d4,%d0
570d6: 6f04 bles 570dc <msdos_file_write+0xae> <== ALWAYS TAKEN
fat_fd->fat_file_size = iop->offset;
570d8: 2943 0018 movel %d3,%a4@(24) <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
570dc: 2f2b 0090 movel %a3@(144),%sp@-
570e0: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return ret;
570e6: 588f addql #4,%sp
}
570e8: 2006 movel %d6,%d0
570ea: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
570f0: 4e5e unlk %fp <== NOT EXECUTED
000568c2 <msdos_filename_unix2dos>:
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
568c2: 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)
{
568c4: 4e56 fff0 linkw %fp,#-16
568c8: 226e 0008 moveal %fp@(8),%a1
568cc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
568d0: 202e 000c movel %fp@(12),%d0
568d4: 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++)
568d8: 760b moveq #11,%d3
dn[i] = ' ';
568da: 7420 moveq #32,%d2
568dc: 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++)
568e0: 5281 addql #1,%d1
568e2: b681 cmpl %d1,%d3
568e4: 66f2 bnes 568d8 <msdos_filename_unix2dos+0x16>
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
568e6: 742e moveq #46,%d2
568e8: 1211 moveb %a1@,%d1
568ea: 49c1 extbl %d1
568ec: b481 cmpl %d1,%d2
568ee: 661c bnes 5690c <msdos_filename_unix2dos+0x4a> <== ALWAYS TAKEN
568f0: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
568f4: b680 cmpl %d0,%d3 <== NOT EXECUTED
568f6: 6608 bnes 56900 <msdos_filename_unix2dos+0x3e> <== NOT EXECUTED
dn[0] = '.';
568f8: 10bc 002e moveb #46,%a0@ <== NOT EXECUTED
return 0;
568fc: 6000 00c4 braw 569c2 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
56900: 742e moveq #46,%d2 <== NOT EXECUTED
56902: 1229 0001 moveb %a1@(1),%d1 <== NOT EXECUTED
56906: 49c1 extbl %d1 <== NOT EXECUTED
56908: b481 cmpl %d1,%d2 <== NOT EXECUTED
5690a: 6704 beqs 56910 <msdos_filename_unix2dos+0x4e> <== NOT EXECUTED
5690c: 2209 movel %a1,%d1
5690e: 6016 bras 56926 <msdos_filename_unix2dos+0x64>
56910: 7602 moveq #2,%d3 <== NOT EXECUTED
56912: b680 cmpl %d0,%d3 <== NOT EXECUTED
56914: 66f6 bnes 5690c <msdos_filename_unix2dos+0x4a> <== NOT EXECUTED
dn[0] = '.';
dn[1] = '.';
56916: 702e moveq #46,%d0 <== NOT EXECUTED
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
dn[0] = '.';
56918: 10bc 002e moveb #46,%a0@ <== NOT EXECUTED
dn[1] = '.';
5691c: 1140 0001 moveb %d0,%a0@(1) <== NOT EXECUTED
return 0;
56920: 6000 00a0 braw 569c2 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
unlen--;
56924: 5380 subql #1,%d0 <== NOT EXECUTED
56926: 2241 moveal %d1,%a1
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
56928: 4a80 tstl %d0
5692a: 660c bnes 56938 <msdos_filename_unix2dos+0x76> <== ALWAYS TAKEN
5692c: 2409 movel %a1,%d2
/*
* Fill the dos filename string with blanks. These are DOS's pad
* characters.
*/
for (i = 0; i <= 10; i++)
5692e: 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)
56930: 45f9 0006 73aa lea 673aa <msdos_map>,%a2
56936: 6024 bras 5695c <msdos_filename_unix2dos+0x9a>
56938: 5281 addql #1,%d1
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
5693a: 762e moveq #46,%d3
5693c: 1411 moveb %a1@,%d2
5693e: 49c2 extbl %d2
56940: b682 cmpl %d2,%d3
56942: 67e0 beqs 56924 <msdos_filename_unix2dos+0x62> <== NEVER TAKEN
56944: 60e6 bras 5692c <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)
56946: 1632 3800 moveb %a2@(00000000,%d3:l),%d3
5694a: 673c beqs 56988 <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
break;
dn[i] = msdos_map[c];
un++;
5694c: 2642 moveal %d2,%a3
unlen--;
5694e: 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++) {
56950: 7208 moveq #8,%d1
if (msdos_map[c] == 0)
break;
dn[i] = msdos_map[c];
56952: 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++) {
56956: 5289 addql #1,%a1
56958: b289 cmpl %a1,%d1
5695a: 672c beqs 56988 <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
5695c: 2642 moveal %d2,%a3
5695e: 4a80 tstl %d0
56960: 6726 beqs 56988 <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
56962: 5282 addql #1,%d2
56964: 1613 moveb %a3@,%d3
56966: 6720 beqs 56988 <msdos_filename_unix2dos+0xc6> <== NEVER TAKEN
56968: 722e moveq #46,%d1
5696a: 0283 0000 00ff andil #255,%d3
56970: b283 cmpl %d3,%d1
56972: 66d2 bnes 56946 <msdos_filename_unix2dos+0x84>
56974: 6012 bras 56988 <msdos_filename_unix2dos+0xc6>
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
un++;
56976: 2241 moveal %d1,%a1
unlen--;
56978: 5380 subql #1,%d0
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
5697a: 762e moveq #46,%d3
5697c: 0282 0000 00ff andil #255,%d2
56982: b682 cmpl %d2,%d3
56984: 6604 bnes 5698a <msdos_filename_unix2dos+0xc8> <== NEVER TAKEN
56986: 600e bras 56996 <msdos_filename_unix2dos+0xd4>
56988: 220b movel %a3,%d1
5698a: 2241 moveal %d1,%a1
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
5698c: 4a80 tstl %d0
5698e: 6706 beqs 56996 <msdos_filename_unix2dos+0xd4> <== NEVER TAKEN
56990: 5281 addql #1,%d1
56992: 1411 moveb %a1@,%d2
56994: 66e0 bnes 56976 <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)
56996: 5088 addql #8,%a0
56998: 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)
5699a: 45f9 0006 73aa lea 673aa <msdos_map>,%a2
569a0: 6016 bras 569b8 <msdos_filename_unix2dos+0xf6>
569a2: 0282 0000 00ff andil #255,%d2
569a8: 1432 2800 moveb %a2@(00000000,%d2:l),%d2
569ac: 6714 beqs 569c2 <msdos_filename_unix2dos+0x100> <== NEVER TAKEN
569ae: 5281 addql #1,%d1
break;
dn[i] = msdos_map[c];
569b0: 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++) {
569b2: 7403 moveq #3,%d2
569b4: b481 cmpl %d1,%d2
569b6: 670a beqs 569c2 <msdos_filename_unix2dos+0x100>
569b8: b081 cmpl %d1,%d0
569ba: 6706 beqs 569c2 <msdos_filename_unix2dos+0x100> <== NEVER TAKEN
569bc: 1431 1800 moveb %a1@(00000000,%d1:l),%d2
569c0: 66e0 bnes 569a2 <msdos_filename_unix2dos+0xe0> <== ALWAYS TAKEN
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
569c2: 4280 clrl %d0
569c4: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3
569c8: 4e5e unlk %fp <== NOT EXECUTED
0005543c <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
5543c: 4e56 ffb4 linkw %fp,#-76
55440: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
55444: 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);
55448: 240e movel %fp,%d2
5544a: 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,
55450: 260e movel %fp,%d3
55452: 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;
55458: 206c 0014 moveal %a4@(20),%a0
5545c: 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);
55460: 4878 0020 pea 20 <OPER2+0xc>
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
55464: 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);
55468: 42a7 clrl %sp@-
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
5546a: 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);
5546e: 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;
55470: 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);
55474: 4eb9 0005 7e40 jsr 57e40 <memset>
name_type = msdos_long_to_short (name,
5547a: 4878 000b pea b <LASTO+0x1>
5547e: 2f02 movel %d2,%sp@-
55480: 2f04 movel %d4,%sp@-
55482: 2f0b movel %a3,%sp@-
55484: 4eb9 0005 42cc jsr 542cc <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,
5548a: 2f02 movel %d2,%sp@-
5548c: 2f03 movel %d3,%sp@-
5548e: 2f00 movel %d0,%sp@-
55490: 2f04 movel %d4,%sp@-
55492: 2f0b movel %a3,%sp@-
55494: 42a7 clrl %sp@-
55496: 2f0c movel %a4,%sp@-
55498: 4eb9 0005 536c jsr 5536c <msdos_get_name_node>
&dir_pos, node_entry);
if (rc != RC_OK)
5549e: 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,
554a2: 2400 movel %d0,%d2
&dir_pos, node_entry);
if (rc != RC_OK)
554a4: 6600 0160 bnew 55606 <msdos_find_name+0x1ca>
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
554a8: 7208 moveq #8,%d1
554aa: 102e ffeb moveb %fp@(-21),%d0
((*MSDOS_DIR_ATTR(node_entry) & MSDOS_ATTR_LFN_MASK) == MSDOS_ATTR_LFN))
return MSDOS_NAME_NOT_FOUND_ERR;
554ae: 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) ||
554b2: c280 andl %d0,%d1
554b4: 4a01 tstb %d1
554b6: 6600 014e bnew 55606 <msdos_find_name+0x1ca>
554ba: 723f moveq #63,%d1
554bc: c081 andl %d1,%d0
554be: 123c 000f moveb #15,%d1
554c2: b280 cmpl %d0,%d1
554c4: 6700 0140 beqw 55606 <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);
554c8: 486e ffcc pea %fp@(-52)
554cc: 2f03 movel %d3,%sp@-
554ce: 2f0a movel %a2,%sp@-
554d0: 4eb9 0004 f16c jsr 4f16c <fat_file_open>
if (rc != RC_OK)
554d6: 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);
554da: 2400 movel %d0,%d2
if (rc != RC_OK)
554dc: 6600 0128 bnew 55606 <msdos_find_name+0x1ca>
return rc;
fat_fd->dir_pos = dir_pos;
554e0: 4878 0010 pea 10 <INVALID_OPERATION>
554e4: 266e ffcc moveal %fp@(-52),%a3
554e8: 2f03 movel %d3,%sp@-
554ea: 486b 0020 pea %a3@(32)
554ee: 4eb9 0005 7dd0 jsr 57dd0 <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)
554f4: 4fef 000c lea %sp@(12),%sp
554f8: 7001 moveq #1,%d0
554fa: b0ab 0008 cmpl %a3@(8),%d0
554fe: 6600 00e0 bnew 555e0 <msdos_find_name+0x1a4>
55502: 4281 clrl %d1
55504: 4282 clrl %d2
55506: 322e fff4 movew %fp@(-12),%d1
5550a: 342e fffa movew %fp@(-6),%d2
5550e: 2001 movel %d1,%d0
55510: e089 lsrl #8,%d1
55512: e188 lsll #8,%d0
55514: 8081 orl %d1,%d0
55516: 2202 movel %d2,%d1
55518: e08a lsrl #8,%d2
5551a: e189 lsll #8,%d1
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
5551c: 4840 swap %d0
5551e: 4240 clrw %d0
55520: 8282 orl %d2,%d1
55522: 0281 0000 ffff andil #65535,%d1
55528: 8081 orl %d1,%d0
5552a: 4281 clrl %d1
5552c: 322e fff6 movew %fp@(-10),%d1
55530: 2740 001c movel %d0,%a3@(28)
55534: 2001 movel %d1,%d0
55536: e089 lsrl #8,%d1
55538: e188 lsll #8,%d0
5553a: 8081 orl %d1,%d0
5553c: 4281 clrl %d1
5553e: 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));
55542: 3f00 movew %d0,%sp@-
55544: 2001 movel %d1,%d0
55546: e089 lsrl #8,%d1
55548: e188 lsll #8,%d0
5554a: 4267 clrw %sp@-
5554c: 8081 orl %d1,%d0
5554e: 3f00 movew %d0,%sp@-
55550: 4267 clrw %sp@-
55552: 4eb9 0005 67dc jsr 567dc <msdos_date_dos2unix>
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
55558: 508f addql #8,%sp
5555a: 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));
5555c: 2740 003e movel %d0,%a3@(62)
55560: 266e ffcc moveal %fp@(-52),%a3
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
55564: 102e ffeb moveb %fp@(-21),%d0
55568: c081 andl %d1,%d0
5556a: 4a00 tstb %d0
5556c: 672a beqs 55598 <msdos_find_name+0x15c> <== ALWAYS TAKEN
{
fat_fd->fat_file_type = FAT_DIRECTORY;
5556e: 42ab 0010 clrl %a3@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
55572: 7020 moveq #32,%d0 <== NOT EXECUTED
55574: 4840 swap %d0 <== NOT EXECUTED
55576: 2740 0014 movel %d0,%a3@(20) <== NOT EXECUTED
rc = fat_file_size(&fs_info->fat, fat_fd);
5557a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5557c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5557e: 4eb9 0004 fa92 jsr 4fa92 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
55584: 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);
55586: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
55588: 6728 beqs 555b2 <msdos_find_name+0x176> <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
5558a: 2f2e ffcc movel %fp@(-52),%sp@- <== NOT EXECUTED
5558e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55590: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
55596: 6064 bras 555fc <msdos_find_name+0x1c0> <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
55598: 2f2e fffc movel %fp@(-4),%sp@-
5559c: 4eba ecbe jsr %pc@(5425c <m68k_swap_u32>)
555a0: 588f addql #4,%sp
fat_fd->fat_file_type = FAT_FILE;
555a2: 7204 moveq #4,%d1
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
555a4: 2740 0018 movel %d0,%a3@(24)
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
555a8: 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;
555aa: 2741 0010 movel %d1,%a3@(16)
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
555ae: 2740 0014 movel %d0,%a3@(20)
}
/* these data is not actual for zero-length fat-file */
fat_fd->map.file_cln = 0;
555b2: 206e ffcc moveal %fp@(-52),%a0
fat_fd->map.disk_cln = fat_fd->cln;
555b6: 2028 001c movel %a0@(28),%d0
if ((fat_fd->fat_file_size != 0) &&
555ba: 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;
555be: 42a8 0032 clrl %a0@(50)
fat_fd->map.disk_cln = fat_fd->cln;
555c2: 2140 0036 movel %d0,%a0@(54)
if ((fat_fd->fat_file_size != 0) &&
555c6: 4a81 tstl %d1
555c8: 6710 beqs 555da <msdos_find_name+0x19e>
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
555ca: 4282 clrl %d2 <== NOT EXECUTED
555cc: 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) &&
555d0: b481 cmpl %d1,%d2 <== NOT EXECUTED
555d2: 6506 bcss 555da <msdos_find_name+0x19e> <== NOT EXECUTED
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
{
fat_fd->map.last_cln = fat_fd->cln;
555d4: 2140 003a movel %d0,%a0@(58) <== NOT EXECUTED
555d8: 6006 bras 555e0 <msdos_find_name+0x1a4> <== NOT EXECUTED
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
555da: 72ff moveq #-1,%d1
555dc: 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);
555e0: 2f2c 0008 movel %a4@(8),%sp@-
555e4: 47f9 0004 f51e lea 4f51e <fat_file_close>,%a3
555ea: 2f0a movel %a2,%sp@-
555ec: 4e93 jsr %a3@
if (rc != RC_OK)
555ee: 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);
555f0: 2400 movel %d0,%d2
if (rc != RC_OK)
555f2: 670c beqs 55600 <msdos_find_name+0x1c4> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
555f4: 2f2e ffcc movel %fp@(-52),%sp@- <== NOT EXECUTED
555f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
555fa: 4e93 jsr %a3@ <== NOT EXECUTED
555fc: 508f addql #8,%sp <== NOT EXECUTED
555fe: 6006 bras 55606 <msdos_find_name+0x1ca> <== NOT EXECUTED
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
55600: 296e ffcc 0008 movel %fp@(-52),%a4@(8)
return rc;
}
55606: 2002 movel %d2,%d0
55608: 4cee 1c1c ffb4 moveml %fp@(-76),%d2-%d4/%a2-%a4
5560e: 4e5e unlk %fp <== NOT EXECUTED
0005488a <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
)
{
5488a: 4e56 ff9c linkw %fp,#-100
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5488e: 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
)
{
54892: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
54896: 122e 0013 moveb %fp@(19),%d1
5489a: 266e 0020 moveal %fp@(32),%a3
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
5489e: 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
)
{
548a2: 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);
548a6: 4aae 0018 tstl %fp@(24)
548aa: 6e14 bgts 548c0 <msdos_find_name_in_fat_file+0x36><== ALWAYS TAKEN
548ac: 4879 0006 732d pea 6732d <msdos_file_handlers+0xc3> <== NOT EXECUTED
548b2: 4879 0006 7363 pea 67363 <__FUNCTION__.7718> <== NOT EXECUTED
548b8: 4878 03c9 pea 3c9 <DBL_MANT_DIG+0x394> <== NOT EXECUTED
548bc: 6000 00b0 braw 5496e <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;
548c0: 74ff moveq #-1,%d2
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
548c2: 4293 clrl %a3@
dir_pos->sname.ofs = 0;
548c4: 42ab 0004 clrl %a3@(4)
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
548c8: 2742 0008 movel %d2,%a3@(8)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
548cc: 2742 000c movel %d2,%a3@(12)
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
548d0: 2d42 fffc movel %d2,%fp@(-4)
548d4: 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))
548d8: 4a2e fff0 tstb %fp@(-16)
548dc: 6708 beqs 548e6 <msdos_find_name_in_fat_file+0x5c>
548de: 7801 moveq #1,%d4
548e0: b8ae 001c cmpl %fp@(28),%d4
548e4: 6714 beqs 548fa <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;
548e6: 2a6e 0018 moveal %fp@(24),%a5
548ea: 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 =
548ee: 2a0d movel %a5,%d5
548f0: 7c0d moveq #13,%d6
548f2: 4c46 5805 remsl %d6,%d5,%d5
548f6: 2a45 moveal %d5,%a5
548f8: 6002 bras 548fc <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;
548fa: 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) &&
548fc: 206e 000c moveal %fp@(12),%a0
54900: 7001 moveq #1,%d0
54902: b0a8 0020 cmpl %a0@(32),%d0
54906: 6618 bnes 54920 <msdos_find_name_in_fat_file+0x96><== NEVER TAKEN
54908: 4aa8 0024 tstl %a0@(36)
5490c: 6612 bnes 54920 <msdos_find_name_in_fat_file+0x96><== NEVER TAKEN
5490e: 7203 moveq #3,%d1
54910: 102a 000e moveb %a2@(14),%d0
54914: c081 andl %d1,%d0
54916: 4a00 tstb %d0
54918: 6706 beqs 54920 <msdos_find_name_in_fat_file+0x96><== NEVER TAKEN
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
5491a: 2428 0018 movel %a0@(24),%d2
5491e: 6006 bras 54926 <msdos_find_name_in_fat_file+0x9c>
else
bts2rd = fs_info->fat.vol.bpc;
54920: 4282 clrl %d2 <== NOT EXECUTED
54922: 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))
54926: 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;
5492a: 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;
5492c: 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;
5492e: 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;
54930: 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;
54932: 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),
54934: 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;
54938: 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;
5493c: 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;
54940: 1d46 ffdb moveb %d6,%fp@(-37)
int lfn_entries;
int lfn_entry = 0;
uint32_t empty_space_offset = 0;
54944: 42ae ffec clrl %fp@(-20)
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
54948: 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),
5494c: 6000 02c0 braw 54c0e <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)
54950: 721f moveq #31,%d1
54952: b280 cmpl %d0,%d1
54954: 6d04 blts 5495a <msdos_find_name_in_fat_file+0xd0><== ALWAYS TAKEN
54956: 6000 0628 braw 54f80 <msdos_find_name_in_fat_file+0x6f6><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
5495a: b480 cmpl %d0,%d2
5495c: 671c beqs 5497a <msdos_find_name_in_fat_file+0xf0><== ALWAYS TAKEN
5495e: 4879 0006 733a pea 6733a <msdos_file_handlers+0xd0> <== NOT EXECUTED
54964: 4879 0006 7363 pea 67363 <__FUNCTION__.7718> <== NOT EXECUTED
5496a: 4878 03f9 pea 3f9 <DBL_MANT_DIG+0x3c4> <== NOT EXECUTED
5496e: 4879 0006 72cb pea 672cb <msdos_file_handlers+0x61> <== NOT EXECUTED
54974: 4eb9 0005 147c jsr 5147c <__assert_func> <== NOT EXECUTED
5497a: 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;
5497e: 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) ==
54980: 1014 moveb %a4@,%d0
54982: 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)
54984: 4a83 tstl %d3
54986: 6608 bnes 54990 <msdos_find_name_in_fat_file+0x106><== NEVER TAKEN
54988: 2d44 ffe8 movel %d4,%fp@(-24)
5498c: 2d47 ffec movel %d7,%fp@(-20)
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
54990: 3208 movew %a0,%d1
54992: 4a01 tstb %d1
54994: 6626 bnes 549bc <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)
54996: 4a2e fff0 tstb %fp@(-16)
5499a: 660a bnes 549a6 <msdos_find_name_in_fat_file+0x11c>
return MSDOS_NAME_NOT_FOUND_ERR;
5499c: 263c 0000 7d01 movel #32001,%d3
549a2: 6000 0614 braw 54fb8 <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)
549a6: 4a2e ffd6 tstb %fp@(-42)
549aa: 6600 028a bnew 54c36 <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;
549ae: 2002 movel %d2,%d0
549b0: 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);
549b2: d680 addl %d0,%d3
549b4: 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 +=
549b6: 9684 subl %d4,%d3
549b8: 6000 027c braw 54c36 <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)
549bc: 4281 clrl %d1
549be: 3008 movew %a0,%d0
549c0: 1200 moveb %d0,%d1
549c2: 0c81 0000 00e5 cmpil #229,%d1
549c8: 6616 bnes 549e0 <msdos_find_name_in_fat_file+0x156>
{
if (create_node)
549ca: 4a2e fff0 tstb %fp@(-16) <== NOT EXECUTED
549ce: 6700 0228 beqw 54bf8 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
549d2: 5283 addql #1,%d3 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
549d4: b6ae ffce cmpl %fp@(-50),%d3 <== NOT EXECUTED
549d8: 6600 021e bnew 54bf8 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
549dc: 6000 0210 braw 54bee <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)
549e0: 4a2e fff0 tstb %fp@(-16)
549e4: 670c beqs 549f2 <msdos_find_name_in_fat_file+0x168><== ALWAYS TAKEN
549e6: 4a2e ffd6 tstb %fp@(-42) <== NOT EXECUTED
549ea: 6606 bnes 549f2 <msdos_find_name_in_fat_file+0x168><== NOT EXECUTED
{
empty_space_entry = 0;
empty_space_count = 0;
549ec: 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;
549ee: 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) ==
549f2: 703f moveq #63,%d0
549f4: 122c 000b moveb %a4@(11),%d1
549f8: c280 andl %d0,%d1
549fa: 103c 000f moveb #15,%d0
549fe: b081 cmpl %d1,%d0
54a00: 6600 0106 bnew 54b08 <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)
54a04: 72ff moveq #-1,%d1 <== NOT EXECUTED
54a06: b2ae fff8 cmpl %fp@(-8),%d1 <== NOT EXECUTED
54a0a: 662c bnes 54a38 <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) &
54a0c: 7240 moveq #64,%d1 <== NOT EXECUTED
54a0e: 2c08 movel %a0,%d6 <== NOT EXECUTED
54a10: c286 andl %d6,%d1 <== NOT EXECUTED
54a12: 4a01 tstb %d1 <== NOT EXECUTED
54a14: 6700 01e0 beqw 54bf6 <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) &
54a18: 2008 movel %a0,%d0 <== NOT EXECUTED
54a1a: 723f moveq #63,%d1 <== NOT EXECUTED
54a1c: c081 andl %d1,%d0 <== NOT EXECUTED
54a1e: b08d cmpl %a5,%d0 <== NOT EXECUTED
54a20: 6600 01d4 bnew 54bf6 <msdos_find_name_in_fat_file+0x36c><== NOT EXECUTED
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
54a24: 2d47 fff8 movel %d7,%fp@(-8) <== NOT EXECUTED
lfn_start.ofs = dir_entry;
54a28: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
54a2c: 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;
54a30: 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);
54a32: 1d45 ffdb moveb %d5,%fp@(-37) <== NOT EXECUTED
54a36: 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) &
54a38: 723f moveq #63,%d1 <== NOT EXECUTED
54a3a: 1014 moveb %a4@,%d0 <== NOT EXECUTED
54a3c: c081 andl %d1,%d0 <== NOT EXECUTED
54a3e: b085 cmpl %d5,%d0 <== NOT EXECUTED
54a40: 6610 bnes 54a52 <msdos_find_name_in_fat_file+0x1c8><== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
54a42: 4281 clrl %d1 <== NOT EXECUTED
54a44: 4280 clrl %d0 <== NOT EXECUTED
54a46: 122e ffdb moveb %fp@(-37),%d1 <== NOT EXECUTED
54a4a: 102c 000d moveb %a4@(13),%d0 <== NOT EXECUTED
54a4e: b081 cmpl %d1,%d0 <== NOT EXECUTED
54a50: 670a beqs 54a5c <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;
54a52: 70ff moveq #-1,%d0 <== NOT EXECUTED
54a54: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
continue;
54a58: 6000 019e braw 54bf8 <msdos_find_name_in_fat_file+0x36e><== NOT EXECUTED
}
lfn_entry--;
54a5c: 2005 movel %d5,%d0 <== NOT EXECUTED
54a5e: 5380 subql #1,%d0 <== NOT EXECUTED
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
54a60: 720d moveq #13,%d1 <== NOT EXECUTED
54a62: 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(
54a66: 41ec 0001 lea %a4@(1),%a0 <== NOT EXECUTED
54a6a: 226e 0014 moveal %fp@(20),%a1 <== NOT EXECUTED
54a6e: d3c1 addal %d1,%a1 <== NOT EXECUTED
54a70: 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++)
54a74: 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(
54a76: 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')
54a7a: 226e ffdc moveal %fp@(-36),%a1 <== NOT EXECUTED
54a7e: 1c11 moveb %a1@,%d6 <== NOT EXECUTED
54a80: 6610 bnes 54a92 <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) &&
54a82: bbc5 cmpal %d5,%a5 <== NOT EXECUTED
54a84: 6664 bnes 54aea <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
((o + i) != name_len))
54a86: 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) &&
54a8a: b1ee 0018 cmpal %fp@(24),%a0 <== NOT EXECUTED
54a8e: 675a beqs 54aea <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
54a90: 6028 bras 54aba <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(
54a92: 43f0 1800 lea %a0@(00000000,%d1:l),%a1 <== NOT EXECUTED
54a96: 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]))
54a9a: 226e 0018 moveal %fp@(24),%a1 <== NOT EXECUTED
54a9e: b3ee ffe0 cmpal %fp@(-32),%a1 <== NOT EXECUTED
54aa2: 6f16 bles 54aba <msdos_find_name_in_fat_file+0x230><== NOT EXECUTED
54aa4: 49c6 extbl %d6 <== NOT EXECUTED
54aa6: 226e ffd2 moveal %fp@(-46),%a1 <== NOT EXECUTED
54aaa: 2d46 ffc6 movel %d6,%fp@(-58) <== NOT EXECUTED
54aae: 1c31 8800 moveb %a1@(00000000,%a0:l),%d6 <== NOT EXECUTED
54ab2: 49c6 extbl %d6 <== NOT EXECUTED
54ab4: bcae ffc6 cmpl %fp@(-58),%d6 <== NOT EXECUTED
54ab8: 6708 beqs 54ac2 <msdos_find_name_in_fat_file+0x238><== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
54aba: 72ff moveq #-1,%d1 <== NOT EXECUTED
54abc: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED
break;
54ac0: 6028 bras 54aea <msdos_find_name_in_fat_file+0x260><== NOT EXECUTED
}
switch (i)
54ac2: 7c04 moveq #4,%d6 <== NOT EXECUTED
54ac4: bc88 cmpl %a0,%d6 <== NOT EXECUTED
54ac6: 670a beqs 54ad2 <msdos_find_name_in_fat_file+0x248><== NOT EXECUTED
54ac8: 1c3c 000a moveb #10,%d6 <== NOT EXECUTED
54acc: bc88 cmpl %a0,%d6 <== NOT EXECUTED
54ace: 660e bnes 54ade <msdos_find_name_in_fat_file+0x254><== NOT EXECUTED
54ad0: 6006 bras 54ad8 <msdos_find_name_in_fat_file+0x24e><== NOT EXECUTED
{
case 4:
p += 5;
54ad2: 5aae ffdc addql #5,%fp@(-36) <== NOT EXECUTED
break;
54ad6: 600a bras 54ae2 <msdos_find_name_in_fat_file+0x258><== NOT EXECUTED
case 10:
p += 4;
54ad8: 58ae ffdc addql #4,%fp@(-36) <== NOT EXECUTED
break;
54adc: 6004 bras 54ae2 <msdos_find_name_in_fat_file+0x258><== NOT EXECUTED
default:
p += 2;
54ade: 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++)
54ae2: 5288 addql #1,%a0 <== NOT EXECUTED
54ae4: 7c0d moveq #13,%d6 <== NOT EXECUTED
54ae6: bc88 cmpl %a0,%d6 <== NOT EXECUTED
54ae8: 6690 bnes 54a7a <msdos_find_name_in_fat_file+0x1f0><== NOT EXECUTED
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
54aea: 4a80 tstl %d0 <== NOT EXECUTED
54aec: 660e bnes 54afc <msdos_find_name_in_fat_file+0x272><== NOT EXECUTED
54aee: 72ff moveq #-1,%d1 <== NOT EXECUTED
54af0: b2ae fff8 cmpl %fp@(-8),%d1 <== NOT EXECUTED
54af4: 56c6 sne %d6 <== NOT EXECUTED
54af6: 49c6 extbl %d6 <== NOT EXECUTED
54af8: 4486 negl %d6 <== NOT EXECUTED
54afa: 6002 bras 54afe <msdos_find_name_in_fat_file+0x274><== NOT EXECUTED
54afc: 4286 clrl %d6 <== NOT EXECUTED
54afe: 7a01 moveq #1,%d5 <== NOT EXECUTED
54b00: cc85 andl %d5,%d6 <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
54b02: 2a00 movel %d0,%d5 <== NOT EXECUTED
54b04: 6000 00f2 braw 54bf8 <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)
54b08: 4a06 tstb %d6
54b0a: 6700 049e beqw 54faa <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(
54b0e: 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;
54b12: 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(
54b14: 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;
54b16: 0800 0000 btst #0,%d0 <== NOT EXECUTED
54b1a: 6704 beqs 54b20 <msdos_find_name_in_fat_file+0x296><== NOT EXECUTED
54b1c: 7280 moveq #-128,%d1 <== NOT EXECUTED
54b1e: 6002 bras 54b22 <msdos_find_name_in_fat_file+0x298><== NOT EXECUTED
54b20: 4201 clrb %d1 <== NOT EXECUTED
54b22: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
54b28: 1c18 moveb %a0@+,%d6 <== NOT EXECUTED
54b2a: e288 lsrl #1,%d0 <== NOT EXECUTED
54b2c: d086 addl %d6,%d0 <== NOT EXECUTED
54b2e: 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++)
54b30: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
54b32: 66e2 bnes 54b16 <msdos_find_name_in_fat_file+0x28c><== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
54b34: 4a85 tstl %d5 <== NOT EXECUTED
54b36: 6600 0472 bnew 54faa <msdos_find_name_in_fat_file+0x720><== NOT EXECUTED
54b3a: 4281 clrl %d1 <== NOT EXECUTED
54b3c: 122e ffdb moveb %fp@(-37),%d1 <== NOT EXECUTED
54b40: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
54b46: b081 cmpl %d1,%d0 <== NOT EXECUTED
54b48: 6600 0460 bnew 54faa <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,
54b4c: 2f0b movel %a3,%sp@-
54b4e: 2f2e ffe4 movel %fp@(-28),%sp@-
54b52: 4878 0001 pea 1 <ADD>
54b56: 4bf9 0004 f5e2 lea 4f5e2 <fat_file_ioctl>,%a5
54b5c: 2f2e 000c movel %fp@(12),%sp@-
54b60: 2f0a movel %a2,%sp@-
54b62: 4e95 jsr %a5@
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
54b64: 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,
54b68: 2600 movel %d0,%d3
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
54b6a: 6726 beqs 54b92 <msdos_find_name_in_fat_file+0x308><== ALWAYS TAKEN
54b6c: 6000 044a braw 54fb8 <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) &&
54b70: 7cff moveq #-1,%d6
54b72: bcae fff8 cmpl %fp@(-8),%d6
54b76: 666e bnes 54be6 <msdos_find_name_in_fat_file+0x35c><== NEVER TAKEN
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
54b78: 4878 000b pea b <LASTO+0x1>
54b7c: 2f2e 0024 movel %fp@(36),%sp@-
54b80: 2f0c movel %a4,%sp@-
54b82: 4eb9 0005 7d40 jsr 57d40 <memcmp>
54b88: 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) &&
54b8c: 4a80 tstl %d0
54b8e: 6656 bnes 54be6 <msdos_find_name_in_fat_file+0x35c><== NEVER TAKEN
54b90: 60ba bras 54b4c <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)
54b92: 202e fff8 movel %fp@(-8),%d0
54b96: 72ff moveq #-1,%d1
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
return rc;
dir_pos->sname.ofs = dir_entry;
54b98: 2744 0004 movel %d4,%a3@(4)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
54b9c: b280 cmpl %d0,%d1
54b9e: 6624 bnes 54bc4 <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;
54ba0: 276e fff8 0008 movel %fp@(-8),%a3@(8)
dir_pos->lname.ofs = lfn_start.ofs;
54ba6: 276e fffc 000c movel %fp@(-4),%a3@(12)
memcpy(name_dir_entry, entry,
54bac: 4878 0020 pea 20 <OPER2+0xc>
54bb0: 2f0c movel %a4,%sp@-
54bb2: 2f2e 0024 movel %fp@(36),%sp@-
54bb6: 4eb9 0005 7dd0 jsr 57dd0 <memcpy>
54bbc: 4fef 000c lea %sp@(12),%sp
54bc0: 6000 03f6 braw 54fb8 <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,
54bc4: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
54bc8: 4c00 2800 mulsl %d0,%d2 <== NOT EXECUTED
54bcc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54bce: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
54bd2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54bd6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54bd8: 4e95 jsr %a5@ <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
54bda: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54bde: 4a80 tstl %d0 <== NOT EXECUTED
54be0: 6600 03c0 bnew 54fa2 <msdos_find_name_in_fat_file+0x718><== NOT EXECUTED
54be4: 60ba bras 54ba0 <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;
54be6: 7cff moveq #-1,%d6 <== NOT EXECUTED
54be8: 2d46 fff8 movel %d6,%fp@(-8) <== NOT EXECUTED
54bec: 6008 bras 54bf6 <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;
54bee: 7201 moveq #1,%d1 <== NOT EXECUTED
54bf0: 1d41 ffd6 moveb %d1,%fp@(-42) <== NOT EXECUTED
54bf4: 6002 bras 54bf8 <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;
54bf6: 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)
54bf8: 0684 0000 0020 addil #32,%d4 <== NOT EXECUTED
54bfe: 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;
54c02: b484 cmpl %d4,%d2 <== NOT EXECUTED
54c04: 6200 fd7a bhiw 54980 <msdos_find_name_in_fat_file+0xf6><== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
54c08: 5287 addql #1,%d7 <== NOT EXECUTED
54c0a: 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),
54c0e: 2f2a 0094 movel %a2@(148),%sp@-
54c12: 2f02 movel %d2,%sp@-
54c14: 2f2e ffe4 movel %fp@(-28),%sp@-
54c18: 2f2e 000c movel %fp@(12),%sp@-
54c1c: 2f0a movel %a2,%sp@-
54c1e: 4eb9 0004 f2c2 jsr 4f2c2 <fat_file_read>
54c24: 4fef 0014 lea %sp@(20),%sp
54c28: 4a80 tstl %d0
54c2a: 6600 fd24 bnew 54950 <msdos_find_name_in_fat_file+0xc6>
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
54c2e: 4a2e fff0 tstb %fp@(-16) <== NOT EXECUTED
54c32: 6700 fd68 beqw 5499c <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)
54c36: 7802 moveq #2,%d4
54c38: b8ae 001c cmpl %fp@(28),%d4
54c3c: 6600 0088 bnew 54cc6 <msdos_find_name_in_fat_file+0x43c>
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
54c40: 202e ffec movel %fp@(-20),%d0 <== NOT EXECUTED
54c44: 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 == '.'))
54c48: 7220 moveq #32,%d1 <== NOT EXECUTED
54c4a: 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) /
54c4e: d0ae ffe8 addl %fp@(-24),%d0 <== NOT EXECUTED
54c52: ea88 lsrl #5,%d0 <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
54c54: 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 == '.'))
54c58: 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;
54c5a: 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 == '.'))
54c5c: 49c0 extbl %d0 <== NOT EXECUTED
54c5e: b280 cmpl %d0,%d1 <== NOT EXECUTED
54c60: 660a bnes 54c6c <msdos_find_name_in_fat_file+0x3e2><== NOT EXECUTED
*c = '_';
54c62: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54c66: 10bc 005f moveb #95,%a0@ <== NOT EXECUTED
54c6a: 6006 bras 54c72 <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 == '.'))
54c6c: 722e moveq #46,%d1 <== NOT EXECUTED
54c6e: b280 cmpl %d0,%d1 <== NOT EXECUTED
54c70: 67f0 beqs 54c62 <msdos_find_name_in_fat_file+0x3d8><== NOT EXECUTED
54c72: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54c76: 7220 moveq #32,%d1 <== NOT EXECUTED
54c78: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED
54c7c: 49c0 extbl %d0 <== NOT EXECUTED
54c7e: b280 cmpl %d0,%d1 <== NOT EXECUTED
54c80: 660c bnes 54c8e <msdos_find_name_in_fat_file+0x404><== NOT EXECUTED
*c = '_';
54c82: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54c86: 7a5f moveq #95,%d5 <== NOT EXECUTED
54c88: 1145 0001 moveb %d5,%a0@(1) <== NOT EXECUTED
54c8c: 6006 bras 54c94 <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 == '.'))
54c8e: 722e moveq #46,%d1 <== NOT EXECUTED
54c90: b280 cmpl %d0,%d1 <== NOT EXECUTED
54c92: 67ee beqs 54c82 <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++)
54c94: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54c98: 700c moveq #12,%d0 <== NOT EXECUTED
54c9a: 5488 addql #2,%a0 <== NOT EXECUTED
if ((*c == ' ') || (*c == '.'))
*c = '_';
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
54c9c: 43f9 0006 6ad6 lea 66ad6 <null_ops+0x54>,%a1 <== NOT EXECUTED
54ca2: 2204 movel %d4,%d1 <== NOT EXECUTED
54ca4: e0a1 asrl %d0,%d1 <== NOT EXECUTED
54ca6: 7a0f moveq #15,%d5 <== NOT EXECUTED
54ca8: 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++)
54caa: 7cfc moveq #-4,%d6 <== NOT EXECUTED
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
54cac: c285 andl %d5,%d1 <== NOT EXECUTED
54cae: 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++)
54cb2: bc80 cmpl %d0,%d6 <== NOT EXECUTED
54cb4: 66ec bnes 54ca2 <msdos_find_name_in_fat_file+0x418><== NOT EXECUTED
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
*c++ = '~';
54cb6: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54cba: 707e moveq #126,%d0 <== NOT EXECUTED
54cbc: 1140 0006 moveb %d0,%a0@(6) <== NOT EXECUTED
*c++ = '1';
54cc0: 7031 moveq #49,%d0 <== NOT EXECUTED
54cc2: 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)
54cc6: 4a8d tstl %a5
54cc8: 673a beqs 54d04 <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(
54cca: 226e 0024 moveal %fp@(36),%a1 <== NOT EXECUTED
54cce: 43e9 000b lea %a1@(11),%a1 <== NOT EXECUTED
54cd2: 4201 clrb %d1 <== NOT EXECUTED
54cd4: 206e 0024 moveal %fp@(36),%a0 <== NOT EXECUTED
54cd8: 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 =
54cdc: 182e fff3 moveb %fp@(-13),%d4 <== NOT EXECUTED
54ce0: 0804 0000 btst #0,%d4 <== NOT EXECUTED
54ce4: 6704 beqs 54cea <msdos_find_name_in_fat_file+0x460><== NOT EXECUTED
54ce6: 7280 moveq #-128,%d1 <== NOT EXECUTED
54ce8: 6002 bras 54cec <msdos_find_name_in_fat_file+0x462><== NOT EXECUTED
54cea: 4201 clrb %d1 <== NOT EXECUTED
54cec: 4280 clrl %d0 <== NOT EXECUTED
54cee: 102e fff3 moveb %fp@(-13),%d0 <== NOT EXECUTED
54cf2: e288 lsrl #1,%d0 <== NOT EXECUTED
54cf4: 1818 moveb %a0@+,%d4 <== NOT EXECUTED
54cf6: d084 addl %d4,%d0 <== NOT EXECUTED
54cf8: d081 addl %d1,%d0 <== NOT EXECUTED
54cfa: 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++)
54cfe: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
54d00: 66da bnes 54cdc <msdos_find_name_in_fat_file+0x452><== NOT EXECUTED
54d02: 6006 bras 54d0a <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;
54d04: 4206 clrb %d6
54d06: 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)
54d0a: 4a83 tstl %d3
54d0c: 670a beqs 54d18 <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;
54d0e: beae ffec cmpl %fp@(-20),%d7
54d12: 56c0 sne %d0
54d14: 4480 negl %d0
54d16: 600a bras 54d22 <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)
54d18: 2d47 ffec movel %d7,%fp@(-20) <== NOT EXECUTED
{
read_cluster = true;
54d1c: 7001 moveq #1,%d0 <== NOT EXECUTED
empty_space_offset = dir_offset;
empty_space_entry = 0;
54d1e: 42ae ffe8 clrl %fp@(-24) <== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
54d22: 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(
54d24: 780d moveq #13,%d4
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
54d26: 41ed 0001 lea %a5@(1),%a0
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
lfn_entry = 0;
54d2a: 4285 clrl %d5
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
54d2c: 2d41 fffc movel %d1,%fp@(-4)
54d30: 262e ffec movel %fp@(-20),%d3
54d34: 4c02 3800 mulsl %d2,%d3
54d38: 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(
54d3c: 220d movel %a5,%d1
54d3e: 4c04 1800 mulsl %d4,%d1
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
54d42: 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(
54d46: d2ae 0014 addl %fp@(20),%d1
54d4a: 2d41 ffdc movel %d1,%fp@(-36)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
54d4e: 6000 0248 braw 54f98 <msdos_find_name_in_fat_file+0x70e>
{
int length = 0;
if (read_cluster)
54d52: 4a00 tstb %d0
54d54: 6700 009a beqw 54df0 <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,
54d58: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
54d5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54d5e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
54d60: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54d64: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54d66: 4eb9 0004 f2c2 jsr 4f2c2 <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
54d6c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54d70: b480 cmpl %d0,%d2 <== NOT EXECUTED
54d72: 677c beqs 54df0 <msdos_find_name_in_fat_file+0x566><== NOT EXECUTED
{
if (ret != FAT_EOF)
54d74: 4a80 tstl %d0 <== NOT EXECUTED
54d76: 670e beqs 54d86 <msdos_find_name_in_fat_file+0x4fc><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
54d78: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
54d7e: 7405 moveq #5,%d2 <== NOT EXECUTED
54d80: 2240 moveal %d0,%a1 <== NOT EXECUTED
54d82: 2282 movel %d2,%a1@ <== NOT EXECUTED
54d84: 6064 bras 54dea <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,
54d86: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
54d8a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
54d8c: 42a7 clrl %sp@- <== NOT EXECUTED
54d8e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54d92: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54d94: 4eb9 0004 f678 jsr 4f678 <fat_file_extend> <== NOT EXECUTED
empty_space_offset * bts2rd, &new_length);
if (ret != RC_OK)
54d9a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54d9e: 4a80 tstl %d0 <== NOT EXECUTED
54da0: 6600 0200 bnew 54fa2 <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))
54da4: b6ae fff4 cmpl %fp@(-12),%d3 <== NOT EXECUTED
54da8: 6702 beqs 54dac <msdos_find_name_in_fat_file+0x522><== NOT EXECUTED
54daa: 6032 bras 54dde <msdos_find_name_in_fat_file+0x554><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
54dac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54dae: 42a7 clrl %sp@- <== NOT EXECUTED
54db0: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
54db4: 4eb9 0005 7e40 jsr 57e40 <memset> <== NOT EXECUTED
ret = fat_file_write(&fs_info->fat, fat_fd,
54dba: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
54dbe: 2f02 movel %d2,%sp@- <== NOT EXECUTED
54dc0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
54dc2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54dc6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54dc8: 4eb9 0004 f858 jsr 4f858 <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)
54dce: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
54dd2: 72ff moveq #-1,%d1 <== NOT EXECUTED
54dd4: b280 cmpl %d0,%d1 <== NOT EXECUTED
54dd6: 6700 01ca beqw 54fa2 <msdos_find_name_in_fat_file+0x718><== NOT EXECUTED
return ret;
else if (ret != bts2rd)
54dda: b480 cmpl %d0,%d2 <== NOT EXECUTED
54ddc: 6712 beqs 54df0 <msdos_find_name_in_fat_file+0x566><== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
54dde: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
54de4: 7205 moveq #5,%d1 <== NOT EXECUTED
54de6: 2040 moveal %d0,%a0 <== NOT EXECUTED
54de8: 2081 movel %d1,%a0@ <== NOT EXECUTED
54dea: 70ff moveq #-1,%d0 <== NOT EXECUTED
54dec: 6000 01b4 braw 54fa2 <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(
54df0: 2805 movel %d5,%d4
54df2: 700d moveq #13,%d0
54df4: 4c00 5800 mulsl %d0,%d5
54df8: 5284 addql #1,%d4
54dfa: 4287 clrl %d7
54dfc: 4286 clrl %d6
54dfe: 202e ffdc movel %fp@(-36),%d0
54e02: 9085 subl %d5,%d0
54e04: 0680 ffff fff3 addil #-13,%d0
54e0a: 2d40 ffd6 movel %d0,%fp@(-42)
54e0e: 6000 0130 braw 54f40 <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;
54e12: 286a 0094 moveal %a2@(148),%a4
char* p;
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
54e16: 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;
54e1c: d9c1 addal %d1,%a4
const char* n;
int i;
char fill = 0;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
54e1e: 2a04 movel %d4,%d5
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
54e20: b8ae ffe4 cmpl %fp@(-28),%d4
54e24: 6600 0082 bnew 54ea8 <msdos_find_name_in_fat_file+0x61e>
{
/* get current cluster number */
int rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
54e28: 2f0b movel %a3,%sp@-
54e2a: 283c 0004 f5e2 movel #325090,%d4
54e30: 2f03 movel %d3,%sp@-
54e32: 4878 0001 pea 1 <ADD>
54e36: 2044 moveal %d4,%a0
54e38: 2f2e 000c movel %fp@(12),%sp@-
54e3c: 2d41 ffca movel %d1,%fp@(-54)
54e40: 2f0a movel %a2,%sp@-
54e42: 4e90 jsr %a0@
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
54e44: 222e ffca movel %fp@(-54),%d1
54e48: 4fef 0014 lea %sp@(20),%sp
54e4c: 4a80 tstl %d0
54e4e: 6600 0152 bnew 54fa2 <msdos_find_name_in_fat_file+0x718>
return rc;
dir_pos->sname.ofs = dir_entry;
54e52: 2741 0004 movel %d1,%a3@(4)
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
54e56: 202e fff8 movel %fp@(-8),%d0
54e5a: 72ff moveq #-1,%d1
54e5c: b280 cmpl %d0,%d1
54e5e: 6624 bnes 54e84 <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;
54e60: 276e fff8 0008 movel %fp@(-8),%a3@(8)
dir_pos->lname.ofs = lfn_start.ofs;
54e66: 276e fffc 000c movel %fp@(-4),%a3@(12)
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
54e6c: 4878 0020 pea 20 <OPER2+0xc>
54e70: 2f2e 0024 movel %fp@(36),%sp@-
54e74: 2f0c movel %a4,%sp@-
54e76: 4eb9 0005 7dd0 jsr 57dd0 <memcpy>
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
54e7c: 4fef 000c lea %sp@(12),%sp
54e80: 6000 00ce braw 54f50 <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,
54e84: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
54e88: 4c02 0800 mulsl %d2,%d0 <== NOT EXECUTED
54e8c: 2044 moveal %d4,%a0 <== NOT EXECUTED
54e8e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
54e90: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
54e94: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
54e98: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54e9a: 4e90 jsr %a0@ <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
54e9c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54ea0: 4a80 tstl %d0 <== NOT EXECUTED
54ea2: 67bc beqs 54e60 <msdos_find_name_in_fat_file+0x5d6><== NOT EXECUTED
54ea4: 6000 00fc braw 54fa2 <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)
54ea8: 70ff moveq #-1,%d0 <== NOT EXECUTED
54eaa: b0ae fff8 cmpl %fp@(-8),%d0 <== NOT EXECUTED
54eae: 660c bnes 54ebc <msdos_find_name_in_fat_file+0x632><== NOT EXECUTED
{
lfn_start.cln = empty_space_offset;
54eb0: 2a2e ffec movel %fp@(-20),%d5 <== NOT EXECUTED
lfn_start.ofs = dir_entry;
54eb4: 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;
54eb8: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
54ebc: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
54ec0: 42a7 clrl %sp@- <== NOT EXECUTED
54ec2: 2f0c movel %a4,%sp@- <== NOT EXECUTED
54ec4: 4eb9 0005 7e40 jsr 57e40 <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(
54eca: 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;
54ece: 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(
54ed2: d3c7 addal %d7,%a1 <== NOT EXECUTED
54ed4: 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++)
54ed8: 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;
54eda: 122e fff3 moveb %fp@(-13),%d1 <== NOT EXECUTED
54ede: 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;
54ee2: 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)
54ee4: 1a11 moveb %a1@,%d5 <== NOT EXECUTED
54ee6: 6706 beqs 54eee <msdos_find_name_in_fat_file+0x664><== NOT EXECUTED
{
*p = *n;
n++;
54ee8: 5289 addql #1,%a1 <== NOT EXECUTED
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; i++)
{
if (*n != 0)
{
*p = *n;
54eea: 1085 moveb %d5,%a0@ <== NOT EXECUTED
54eec: 6008 bras 54ef6 <msdos_find_name_in_fat_file+0x66c><== NOT EXECUTED
n++;
}
else
{
p [0] = fill;
54eee: 1081 moveb %d1,%a0@ <== NOT EXECUTED
p [1] = fill;
54ef0: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
fill = 0xff;
54ef4: 50c1 st %d1 <== NOT EXECUTED
}
switch (i)
54ef6: 7a04 moveq #4,%d5 <== NOT EXECUTED
54ef8: ba80 cmpl %d0,%d5 <== NOT EXECUTED
54efa: 670a beqs 54f06 <msdos_find_name_in_fat_file+0x67c><== NOT EXECUTED
54efc: 1a3c 000a moveb #10,%d5 <== NOT EXECUTED
54f00: ba80 cmpl %d0,%d5 <== NOT EXECUTED
54f02: 660a bnes 54f0e <msdos_find_name_in_fat_file+0x684><== NOT EXECUTED
54f04: 6004 bras 54f0a <msdos_find_name_in_fat_file+0x680><== NOT EXECUTED
{
case 4:
p += 5;
54f06: 5a88 addql #5,%a0 <== NOT EXECUTED
break;
54f08: 6006 bras 54f10 <msdos_find_name_in_fat_file+0x686><== NOT EXECUTED
case 10:
p += 4;
54f0a: 5888 addql #4,%a0 <== NOT EXECUTED
break;
54f0c: 6002 bras 54f10 <msdos_find_name_in_fat_file+0x686><== NOT EXECUTED
default:
p += 2;
54f0e: 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++)
54f10: 5280 addql #1,%d0 <== NOT EXECUTED
54f12: 7a0d moveq #13,%d5 <== NOT EXECUTED
54f14: ba80 cmpl %d0,%d5 <== NOT EXECUTED
54f16: 66cc bnes 54ee4 <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(
54f18: 202e ffe4 movel %fp@(-28),%d0 <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
54f1c: 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(
54f1e: 9084 subl %d4,%d0 <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
54f20: b284 cmpl %d4,%d1 <== NOT EXECUTED
54f22: 6702 beqs 54f26 <msdos_find_name_in_fat_file+0x69c><== NOT EXECUTED
54f24: 6004 bras 54f2a <msdos_find_name_in_fat_file+0x6a0><== NOT EXECUTED
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
54f26: 7a40 moveq #64,%d5 <== NOT EXECUTED
54f28: 8085 orl %d5,%d0 <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
54f2a: 720f moveq #15,%d1 <== NOT EXECUTED
54f2c: 5284 addql #1,%d4 <== NOT EXECUTED
54f2e: 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;
54f34: 1880 moveb %d0,%a4@ <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
54f36: 102c 000b moveb %a4@(11),%d0 <== NOT EXECUTED
54f3a: 8081 orl %d1,%d0 <== NOT EXECUTED
54f3c: 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(
54f40: 222e ffe8 movel %fp@(-24),%d1
54f44: 2a04 movel %d4,%d5
54f46: d286 addl %d6,%d1
54f48: 5385 subql #1,%d5
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
54f4a: b481 cmpl %d1,%d2
54f4c: 6200 fec4 bhiw 54e12 <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,
54f50: 282e ffe8 movel %fp@(-24),%d4
54f54: d8aa 0094 addl %a2@(148),%d4
54f58: 2f04 movel %d4,%sp@-
54f5a: 206e ffe8 moveal %fp@(-24),%a0
54f5e: 2f06 movel %d6,%sp@-
54f60: 4870 3800 pea %a0@(00000000,%d3:l)
54f64: 2f2e 000c movel %fp@(12),%sp@-
54f68: 2f0a movel %a2,%sp@-
54f6a: 4eb9 0004 f858 jsr 4f858 <fat_file_write>
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
54f70: 4fef 0014 lea %sp@(20),%sp
54f74: 72ff moveq #-1,%d1
54f76: b280 cmpl %d0,%d1
54f78: 672c beqs 54fa6 <msdos_find_name_in_fat_file+0x71c><== NEVER TAKEN
54f7a: d682 addl %d2,%d3
return ret;
else if (ret != length)
54f7c: bc80 cmpl %d0,%d6
54f7e: 670e beqs 54f8e <msdos_find_name_in_fat_file+0x704><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
54f80: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
54f86: 2040 moveal %d0,%a0 <== NOT EXECUTED
54f88: 7005 moveq #5,%d0 <== NOT EXECUTED
54f8a: 2080 movel %d0,%a0@ <== NOT EXECUTED
54f8c: 6018 bras 54fa6 <msdos_find_name_in_fat_file+0x71c><== NOT EXECUTED
empty_space_offset++;
54f8e: 52ae ffec addql #1,%fp@(-20)
empty_space_entry = 0;
read_cluster = true;
54f92: 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;
54f94: 42ae ffe8 clrl %fp@(-24)
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
54f98: ba8d cmpl %a5,%d5
54f9a: 6f00 fdb6 blew 54d52 <msdos_find_name_in_fat_file+0x4c8>
empty_space_offset++;
empty_space_entry = 0;
read_cluster = true;
}
return 0;
54f9e: 4283 clrl %d3
54fa0: 6016 bras 54fb8 <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,
54fa2: 2600 movel %d0,%d3 <== NOT EXECUTED
54fa4: 6012 bras 54fb8 <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)
54fa6: 76ff moveq #-1,%d3 <== NOT EXECUTED
54fa8: 600e bras 54fb8 <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 ||
54faa: 7001 moveq #1,%d0
54fac: b0ae 001c cmpl %fp@(28),%d0
54fb0: 6600 fc34 bnew 54be6 <msdos_find_name_in_fat_file+0x35c>
54fb4: 6000 fbba braw 54b70 <msdos_find_name_in_fat_file+0x2e6>
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
54fb8: 2003 movel %d3,%d0
54fba: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
54fc0: 4e5e unlk %fp <== NOT EXECUTED
00054fc4 <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) &&
54fc4: 7001 moveq #1,%d0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
54fc6: 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;
54fca: 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
)
{
54fce: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ <== NOT EXECUTED
54fd2: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
54fd6: 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;
54fda: 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) &&
54fde: b0ac 0020 cmpl %a4@(32),%d0 <== NOT EXECUTED
54fe2: 6622 bnes 55006 <msdos_find_node_by_cluster_num_in_fat_file+0x42><== NOT EXECUTED
54fe4: 4aac 0024 tstl %a4@(36) <== NOT EXECUTED
54fe8: 661c bnes 55006 <msdos_find_node_by_cluster_num_in_fat_file+0x42><== NOT EXECUTED
54fea: 7203 moveq #3,%d1 <== NOT EXECUTED
54fec: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
54ff0: c081 andl %d1,%d0 <== NOT EXECUTED
54ff2: 4a00 tstb %d0 <== NOT EXECUTED
54ff4: 6710 beqs 55006 <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;
54ff6: 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;
54ffa: 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,
54ffc: 2a3c 0004 f2c2 movel #324290,%d5 <== NOT EXECUTED
55002: 6000 00de braw 550e2 <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;
55006: 4282 clrl %d2 <== NOT EXECUTED
55008: 342a 0006 movew %a2@(6),%d2 <== NOT EXECUTED
5500c: 60ec bras 54ffa <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 )
5500e: 721f moveq #31,%d1 <== NOT EXECUTED
55010: b280 cmpl %d0,%d1 <== NOT EXECUTED
55012: 6d14 blts 55028 <msdos_find_node_by_cluster_num_in_fat_file+0x64><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
55014: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
5501a: 7605 moveq #5,%d3 <== NOT EXECUTED
5501c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5501e: 347c ffff moveaw #-1,%a2 <== NOT EXECUTED
55022: 2083 movel %d3,%a0@ <== NOT EXECUTED
55024: 6000 00da braw 55100 <msdos_find_node_by_cluster_num_in_fat_file+0x13c><== NOT EXECUTED
assert(ret == bts2rd);
55028: b480 cmpl %d0,%d2 <== NOT EXECUTED
5502a: 671c beqs 55048 <msdos_find_node_by_cluster_num_in_fat_file+0x84><== NOT EXECUTED
5502c: 4879 0006 733a pea 6733a <msdos_file_handlers+0xd0> <== NOT EXECUTED
55032: 4879 0006 737f pea 6737f <__FUNCTION__.7786> <== NOT EXECUTED
55038: 4878 064e pea 64e <DBL_MAX_EXP+0x24d> <== NOT EXECUTED
5503c: 4879 0006 72cb pea 672cb <msdos_file_handlers+0x61> <== NOT EXECUTED
55042: 4eb9 0005 147c jsr 5147c <__assert_func> <== NOT EXECUTED
55048: 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;
5504c: 4284 clrl %d4 <== NOT EXECUTED
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
5504e: 1013 moveb %a3@,%d0 <== NOT EXECUTED
55050: 6700 00aa beqw 550fc <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)) ==
55054: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
5505a: 0c80 0000 00e5 cmpil #229,%d0 <== NOT EXECUTED
55060: 676e beqs 550d0 <msdos_find_node_by_cluster_num_in_fat_file+0x10c><== NOT EXECUTED
55062: 4281 clrl %d1 <== NOT EXECUTED
55064: 4286 clrl %d6 <== NOT EXECUTED
55066: 322b 0014 movew %a3@(20),%d1 <== NOT EXECUTED
5506a: 3c2b 001a movew %a3@(26),%d6 <== NOT EXECUTED
5506e: 2001 movel %d1,%d0 <== NOT EXECUTED
55070: e089 lsrl #8,%d1 <== NOT EXECUTED
55072: e188 lsll #8,%d0 <== NOT EXECUTED
55074: 8081 orl %d1,%d0 <== NOT EXECUTED
55076: 2206 movel %d6,%d1 <== NOT EXECUTED
55078: e08e lsrl #8,%d6 <== NOT EXECUTED
5507a: 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)
5507c: 4840 swap %d0 <== NOT EXECUTED
5507e: 4240 clrw %d0 <== NOT EXECUTED
55080: 8286 orl %d6,%d1 <== NOT EXECUTED
55082: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
55088: 8081 orl %d1,%d0 <== NOT EXECUTED
5508a: b0ae 0010 cmpl %fp@(16),%d0 <== NOT EXECUTED
5508e: 6640 bnes 550d0 <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,
55090: 2f0d movel %a5,%sp@- <== NOT EXECUTED
55092: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55094: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55098: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5509a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5509c: 4eb9 0004 f5e2 jsr 4f5e2 <fat_file_ioctl> <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
550a2: 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,
550a6: 2440 moveal %d0,%a2 <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
550a8: 4a80 tstl %d0 <== NOT EXECUTED
550aa: 6654 bnes 55100 <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;
550ac: 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;
550ae: 2b44 0004 movel %d4,%a5@(4) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
550b2: 2b40 0008 movel %d0,%a5@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
550b6: 2b40 000c movel %d0,%a5@(12) <== NOT EXECUTED
memcpy(dir_entry, entry,
550ba: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
550be: 2f0b movel %a3,%sp@- <== NOT EXECUTED
550c0: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
550c4: 4eb9 0005 7dd0 jsr 57dd0 <memcpy> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
550ca: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
550ce: 6030 bras 55100 <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)
550d0: 0684 0000 0020 addil #32,%d4 <== NOT EXECUTED
550d6: 47eb 0020 lea %a3@(32),%a3 <== NOT EXECUTED
550da: b484 cmpl %d4,%d2 <== NOT EXECUTED
550dc: 6200 ff70 bhiw 5504e <msdos_find_node_by_cluster_num_in_fat_file+0x8a><== NOT EXECUTED
550e0: 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,
550e2: 2f2a 0094 movel %a2@(148),%sp@- <== NOT EXECUTED
550e6: 2045 moveal %d5,%a0 <== NOT EXECUTED
550e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
550ea: 2f03 movel %d3,%sp@- <== NOT EXECUTED
550ec: 2f0c movel %a4,%sp@- <== NOT EXECUTED
550ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
550f0: 4e90 jsr %a0@ <== NOT EXECUTED
550f2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
550f6: 4a80 tstl %d0 <== NOT EXECUTED
550f8: 6600 ff14 bnew 5500e <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;
550fc: 347c 7d01 moveaw #32001,%a2 <== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
55100: 200a movel %a2,%d0 <== NOT EXECUTED
55102: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
55108: 4e5e unlk %fp <== NOT EXECUTED
0004b312 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b312: 4e56 fd20 linkw %fp,#-736
4b316: 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");
4b31a: 4879 0006 6ca3 pea 66ca3 <_CPU_m68k_BFFFO_table+0x140>
4b320: 47fa fdd6 lea %pc@(4b0f8 <msdos_format_printf>),%a3
4b324: 4878 0002 pea 2 <DOUBLE_FLOAT>
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b328: 246e 000c moveal %fp@(12),%a2
4b32c: 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");
4b330: 2f0a movel %a2,%sp@-
4b332: 4e93 jsr %a3@
fd = open(devname, O_RDWR);
4b334: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b338: 2f06 movel %d6,%sp@-
4b33a: 4eb9 0004 4c34 jsr 44c34 <open>
if (fd == -1) {
4b340: 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);
4b344: 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;
4b346: 70ff moveq #-1,%d0
4b348: b083 cmpl %d3,%d0
4b34a: 57c2 seq %d2
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b34c: 2f06 movel %d6,%sp@-
4b34e: 4879 0006 6cb0 pea 66cb0 <_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;
4b354: 49c2 extbl %d2
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b356: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b35a: 2f0a movel %a2,%sp@-
4b35c: 4e93 jsr %a3@
"stat check: %s\n", devname);
if (ret_val == 0) {
4b35e: 4fef 0010 lea %sp@(16),%sp
4b362: 4a82 tstl %d2
4b364: 6612 bnes 4b378 <msdos_format+0x66> <== NEVER TAKEN
ret_val = fstat(fd, &stat_buf);
4b366: 486e fd6a pea %fp@(-662)
4b36a: 2f03 movel %d3,%sp@-
4b36c: 4eb9 0004 3fd4 jsr 43fd4 <fstat>
4b372: 508f addql #8,%sp
4b374: 2400 movel %d0,%d2
4b376: 6002 bras 4b37a <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) {
4b378: 74ff moveq #-1,%d2 <== NOT EXECUTED
ret_val = fstat(fd, &stat_buf);
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4b37a: 2f06 movel %d6,%sp@-
4b37c: 4879 0006 6cc0 pea 66cc0 <_CPU_m68k_BFFFO_table+0x15d>
4b382: 49fa fd74 lea %pc@(4b0f8 <msdos_format_printf>),%a4
4b386: 4878 0001 pea 1 <ADD>
4b38a: 2f0a movel %a2,%sp@-
4b38c: 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))) {
4b38e: 4fef 0010 lea %sp@(16),%sp
4b392: 4a82 tstl %d2
4b394: 6600 0b78 bnew 4bf0e <msdos_format+0xbfc>
4b398: 202e fd76 movel %fp@(-650),%d0
4b39c: 0280 0000 f000 andil #61440,%d0
4b3a2: 0c80 0000 6000 cmpil #24576,%d0
4b3a8: 6700 0ad0 beqw 4be7a <msdos_format+0xb68>
errno = ENOTTY;
4b3ac: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4b3b2: 7e19 moveq #25,%d7 <== NOT EXECUTED
4b3b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b3b6: 2087 movel %d7,%a0@ <== NOT EXECUTED
4b3b8: 6000 0b82 braw 4bf3c <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);
4b3bc: 486b 0004 pea %a3@(4)
4b3c0: 2f3c 4004 4205 movel #1074020869,%sp@-
4b3c6: 2f03 movel %d3,%sp@-
4b3c8: 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) {
4b3ca: 4fef 000c lea %sp@(12),%sp
4b3ce: 2400 movel %d0,%d2
4b3d0: 6600 0412 bnew 4b7e4 <msdos_format+0x4d2>
total_size = fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
4b3d4: 222e fdb4 movel %fp@(-588),%d1
4b3d8: 2401 movel %d1,%d2
4b3da: 4284 clrl %d4
4b3dc: 202e fdb0 movel %fp@(-592),%d0
4b3e0: 4c00 2800 mulsl %d0,%d2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b3e4: 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;
4b3e6: 2a02 movel %d2,%d5
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b3e8: 2f04 movel %d4,%sp@-
4b3ea: 2f01 movel %d1,%sp@-
4b3ec: 2f00 movel %d0,%sp@-
4b3ee: 4879 0006 6ccf pea 66ccf <_CPU_m68k_BFFFO_table+0x16c>
4b3f4: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b3f8: 2f0a movel %a2,%sp@-
4b3fa: 4e94 jsr %a4@
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
4b3fc: 4fef 001c lea %sp@(28),%sp
4b400: 4a8a tstl %a2
4b402: 6706 beqs 4b40a <msdos_format+0xf8> <== NEVER TAKEN
(rqdata->fat_num == 0)) {
4b404: 202a 000c movel %a2@(12),%d0
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
4b408: 6604 bnes 4b40e <msdos_format+0xfc>
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
4b40a: 7002 moveq #2,%d0
4b40c: 6006 bras 4b414 <msdos_format+0x102>
}
else if (rqdata->fat_num <= 6) {
4b40e: 7206 moveq #6,%d1
4b410: b280 cmpl %d0,%d1
4b412: 6508 bcss 4b41c <msdos_format+0x10a> <== NEVER TAKEN
fmt_params->fat_num = rqdata->fat_num;
4b414: 1d40 fde0 moveb %d0,%fp@(-544)
4b418: 6000 0a92 braw 4beac <msdos_format+0xb9a>
}
else {
errno = EINVAL;
4b41c: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4b422: 7c16 moveq #22,%d6 <== NOT EXECUTED
ret_val = -1;
4b424: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
else if (rqdata->fat_num <= 6) {
fmt_params->fat_num = rqdata->fat_num;
}
else {
errno = EINVAL;
4b426: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b428: 2086 movel %d6,%a0@ <== NOT EXECUTED
4b42a: 6000 03b8 braw 4b7e4 <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) {
4b42e: 202a 0008 movel %a2@(8),%d0
4b432: 6608 bnes 4b43c <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;
4b434: 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;
4b436: 103c 0008 moveb #8,%d0
4b43a: 6002 bras 4b43e <msdos_format+0x12c>
uint32_t fat16_sect_per_clust = 32;
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
4b43c: 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) {
4b43e: 243c 0000 0ff5 movel #4085,%d2
4b444: 4c02 0800 mulsl %d2,%d0
4b448: 206e fdb4 moveal %fp@(-588),%a0
4b44c: b088 cmpl %a0,%d0
4b44e: 630e blss 4b45e <msdos_format+0x14c> <== NEVER TAKEN
fmt_params->fattype = FAT_FAT12;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b450: 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;
4b452: 7c01 moveq #1,%d6
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b454: 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;
4b458: 1d46 fde2 moveb %d6,%fp@(-542)
4b45c: 6054 bras 4b4b2 <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) {
4b45e: 203c 0000 fff5 movel #65525,%d0 <== NOT EXECUTED
4b464: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
4b468: b288 cmpl %a0,%d1 <== NOT EXECUTED
4b46a: 630e blss 4b47a <msdos_format+0x168> <== NOT EXECUTED
fmt_params->fattype = FAT_FAT16;
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b46c: 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;
4b46e: 7202 moveq #2,%d1 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b470: 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;
4b474: 1d41 fde2 moveb %d1,%fp@(-542) <== NOT EXECUTED
4b478: 6038 bras 4b4b2 <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;
4b47a: 7c1e moveq #30,%d6 <== NOT EXECUTED
4b47c: 4280 clrl %d0 <== NOT EXECUTED
4b47e: 223c 4000 0000 movel #1073741824,%d1 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
4b484: 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;
4b486: d285 addl %d5,%d1 <== NOT EXECUTED
4b488: d184 addxl %d4,%d0 <== NOT EXECUTED
int b;
fmt_params->fattype = FAT_FAT32;
4b48a: 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;
4b48e: 2400 movel %d0,%d2 <== NOT EXECUTED
4b490: 2001 movel %d1,%d0 <== NOT EXECUTED
4b492: 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)
4b494: 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;
4b498: e58a lsll #2,%d2 <== NOT EXECUTED
4b49a: 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--)
4b49c: 701f moveq #31,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4b49e: 2206 movel %d6,%d1 <== NOT EXECUTED
4b4a0: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b4a2: c282 andl %d2,%d1 <== NOT EXECUTED
4b4a4: 6604 bnes 4b4aa <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--)
4b4a6: 5380 subql #1,%d0 <== NOT EXECUTED
4b4a8: 66f4 bnes 4b49e <msdos_format+0x18c> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
4b4aa: 7201 moveq #1,%d1 <== NOT EXECUTED
4b4ac: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b4ae: 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);
4b4b2: 2e0e movel %fp,%d7
4b4b4: 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 );
4b4ba: 49fa fdf2 lea %pc@(4b2ae <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;
4b4be: 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 );
4b4c0: 2f07 movel %d7,%sp@-
4b4c2: 2f0a movel %a2,%sp@-
4b4c4: 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;
4b4c6: 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 );
4b4c8: 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;
4b4ca: 4280 clrl %d0
4b4cc: 0685 4000 0000 addil #1073741824,%d5
4b4d2: d980 addxl %d0,%d4
4b4d4: 2204 movel %d4,%d1
4b4d6: 2005 movel %d5,%d0
4b4d8: eca8 lsrl %d6,%d0
4b4da: e589 lsll #2,%d1
4b4dc: 4204 clrb %d4
4b4de: 2d41 fd5e movel %d1,%fp@(-674)
4b4e2: 50c1 st %d1
4b4e4: 81ae fd5e orl %d0,%fp@(-674)
4b4e8: 1d44 fd65 moveb %d4,%fp@(-667)
4b4ec: 1d41 fd4d moveb %d1,%fp@(-691)
4b4f0: 6000 02d6 braw 4b7c8 <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)
4b4f4: 4a8a tstl %a2
4b4f6: 6706 beqs 4b4fe <msdos_format+0x1ec> <== NEVER TAKEN
fmt_params->skip_alignment = rqdata->skip_alignment;
4b4f8: 1d6a 0016 fdfe moveb %a2@(22),%fp@(-514)
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b4fe: 2f2e fdbc movel %fp@(-580),%sp@-
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
4b502: 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,
4b504: 4879 0006 6d0a pea 66d0a <_CPU_m68k_BFFFO_table+0x1a7>
4b50a: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b50e: 2f0a movel %a2,%sp@-
4b510: 4eba fbe6 jsr %pc@(4b0f8 <msdos_format_printf>)
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
4b514: 4fef 0010 lea %sp@(16),%sp
4b518: 4280 clrl %d0
4b51a: 1a2e fde2 moveb %fp@(-542),%d5
4b51e: 1d45 fd4d moveb %d5,%fp@(-691)
4b522: 1005 moveb %d5,%d0
4b524: bc80 cmpl %d0,%d6
4b526: 6618 bnes 4b540 <msdos_format+0x22e> <== ALWAYS TAKEN
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
4b528: 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;
4b52a: 7006 moveq #6,%d0 <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4b52c: 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;
4b52e: 2d47 fdb8 movel %d7,%fp@(-584) <== NOT EXECUTED
/* for FAT32, always set files per root directory 0 */
fmt_params->files_per_root_dir = 0;
4b532: 42ae fdc8 clrl %fp@(-568) <== NOT EXECUTED
/* location of copy of MBR */
fmt_params->mbr_copy_sec = 6;
4b536: 2d40 fdd8 movel %d0,%fp@(-552) <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
4b53a: 2d41 fddc movel %d1,%fp@(-548) <== NOT EXECUTED
4b53e: 6050 bras 4b590 <msdos_format+0x27e> <== NOT EXECUTED
}
else {
/* recommended: for FAT12/FAT16, always set reserved sector count to 1 */
fmt_params->rsvd_sector_cnt = 1;
4b540: 7801 moveq #1,%d4
4b542: 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) &&
4b546: 4a8a tstl %a2
4b548: 670c beqs 4b556 <msdos_format+0x244> <== NEVER TAKEN
(rqdata->files_per_root_dir > 0)) {
4b54a: 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) &&
4b54e: 6706 beqs 4b556 <msdos_format+0x244>
(rqdata->files_per_root_dir > 0)) {
fmt_params->files_per_root_dir = rqdata->files_per_root_dir;
4b550: 2d40 fdc8 movel %d0,%fp@(-568)
4b554: 601e bras 4b574 <msdos_format+0x262>
}
else {
if (fmt_params->fattype == FAT_FAT16) {
4b556: 4280 clrl %d0
4b558: 102e fd4d moveb %fp@(-691),%d0
4b55c: 7a02 moveq #2,%d5
4b55e: ba80 cmpl %d0,%d5
4b560: 660c bnes 4b56e <msdos_format+0x25c> <== ALWAYS TAKEN
fmt_params->files_per_root_dir = 512;
4b562: 2c3c 0000 0200 movel #512,%d6 <== NOT EXECUTED
4b568: 2d46 fdc8 movel %d6,%fp@(-568) <== NOT EXECUTED
4b56c: 6006 bras 4b574 <msdos_format+0x262> <== NOT EXECUTED
}
else {
fmt_params->files_per_root_dir = 64;
4b56e: 7e40 moveq #64,%d7
4b570: 2d47 fdc8 movel %d7,%fp@(-568)
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
(2*fmt_params->bytes_per_sector/
4b574: 202e fdb0 movel %fp@(-592),%d0
4b578: d080 addl %d0,%d0
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
4b57a: 222e fdc8 movel %fp@(-568),%d1
(2*fmt_params->bytes_per_sector/
4b57e: ea88 lsrl #5,%d0
}
else {
fmt_params->files_per_root_dir = 64;
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
4b580: 5381 subql #1,%d1
4b582: 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 %
4b584: 2a01 movel %d1,%d5
4b586: 4c40 5004 remul %d0,%d4,%d5
4b58a: 9284 subl %d4,%d1
4b58c: 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)
4b590: 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,
4b594: 4284 clrl %d4
4b596: 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) {
4b59a: 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,
4b5a0: 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)
4b5a2: 202e fdb0 movel %fp@(-592),%d0
4b5a6: 2840 moveal %d0,%a4
4b5a8: 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)
4b5aa: 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,
4b5ac: 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,
4b5b0: 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)
4b5b4: de8c addl %a4,%d7
/ fmt_params->bytes_per_sector);
4b5b6: 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,
4b5ba: 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);
4b5be: 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,
4b5c2: 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 =
4b5c6: 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,
4b5ca: 2e2e fdb4 movel %fp@(-588),%d7
4b5ce: 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,
4b5d2: 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) {
4b5d6: 4c40 5005 remul %d0,%d5,%d5
4b5da: 6002 bras 4b5de <msdos_format+0x2cc>
sectors_per_cluster /= 2;
4b5dc: 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) {
4b5de: b285 cmpl %d5,%d1
4b5e0: 62fa bhis 4b5dc <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);
4b5e2: 2a6e fd48 moveal %fp@(-696),%a5
4b5e6: 43eb ffff lea %a3@(-1),%a1
4b5ea: 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,
4b5ec: 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);
4b5f2: 2d49 fd4e movel %a1,%fp@(-690)
4b5f6: 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,
4b5fa: 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)
4b5fe: 4a2e fd67 tstb %fp@(-665)
4b602: 660e bnes 4b612 <msdos_format+0x300>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b604: 2a2e fd4e movel %fp@(-690),%d5
4b608: 2801 movel %d1,%d4
4b60a: da81 addl %d1,%d5
4b60c: 4484 negl %d4
4b60e: c885 andl %d5,%d4
4b610: 6002 bras 4b614 <msdos_format+0x302>
else
return sectors;
4b612: 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
4b614: 2c2e fd52 movel %fp@(-686),%d6
4b618: 9c84 subl %d4,%d6
- loc_align_object (rsvd_sector_cnt, sectors_per_cluster, skip_alignment);
if (fattype == FAT_FAT12) {
4b61a: 7801 moveq #1,%d4
4b61c: b888 cmpl %a0,%d4
4b61e: 662e bnes 4b64e <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)
4b620: 4a2e fd67 tstb %fp@(-665)
4b624: 6610 bnes 4b636 <msdos_format+0x324>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b626: 226e fd56 moveal %fp@(-682),%a1
4b62a: 2a01 movel %d1,%d5
4b62c: d3c1 addal %d1,%a1
4b62e: 4485 negl %d5
4b630: 2e09 movel %a1,%d7
4b632: ca87 andl %d7,%d5
4b634: 6004 bras 4b63a <msdos_format+0x328>
else
return sectors;
4b636: 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
4b63a: 2806 movel %d6,%d4
4b63c: 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;
4b63e: 4c41 4004 remul %d1,%d4,%d4
fat_capacity = fatdata_cluster_cnt * 3 / 2;
4b642: 2244 moveal %d4,%a1
4b644: 43f1 4a00 lea %a1@(00000000,%d4:l:2),%a1
4b648: 2a09 movel %a1,%d5
4b64a: e28d lsrl #1,%d5
4b64c: 6038 bras 4b686 <msdos_format+0x374>
}
else if (fattype == FAT_FAT16) {
4b64e: 7802 moveq #2,%d4 <== NOT EXECUTED
4b650: b888 cmpl %a0,%d4 <== NOT EXECUTED
4b652: 6628 bnes 4b67c <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)
4b654: 4a2e fd67 tstb %fp@(-665) <== NOT EXECUTED
4b658: 6610 bnes 4b66a <msdos_format+0x358> <== NOT EXECUTED
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b65a: 226e fd56 moveal %fp@(-682),%a1 <== NOT EXECUTED
4b65e: 2a01 movel %d1,%d5 <== NOT EXECUTED
4b660: d3c1 addal %d1,%a1 <== NOT EXECUTED
4b662: 4485 negl %d5 <== NOT EXECUTED
4b664: 2e09 movel %a1,%d7 <== NOT EXECUTED
4b666: ca87 andl %d7,%d5 <== NOT EXECUTED
4b668: 6004 bras 4b66e <msdos_format+0x35c> <== NOT EXECUTED
else
return sectors;
4b66a: 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
4b66e: 2806 movel %d6,%d4 <== NOT EXECUTED
4b670: 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;
4b672: 4c41 4004 remul %d1,%d4,%d4 <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 2;
4b676: 2a04 movel %d4,%d5 <== NOT EXECUTED
4b678: da85 addl %d5,%d5 <== NOT EXECUTED
4b67a: 600a bras 4b686 <msdos_format+0x374> <== NOT EXECUTED
}
else { /* FAT32 */
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
4b67c: 2806 movel %d6,%d4 <== NOT EXECUTED
4b67e: 4c41 4004 remul %d1,%d4,%d4 <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 4;
4b682: 2a04 movel %d4,%d5 <== NOT EXECUTED
4b684: e58d lsll #2,%d5 <== NOT EXECUTED
}
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
4b686: 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
4b688: 4c40 5005 remul %d0,%d5,%d5
+ (bytes_per_sector - 1))
/ bytes_per_sector);
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
4b68c: 2e2e fd5a movel %fp@(-678),%d7
4b690: 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)
4b694: 4a2e fd67 tstb %fp@(-665)
4b698: 660e bnes 4b6a8 <msdos_format+0x396>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b69a: 2241 moveal %d1,%a1
4b69c: 2c01 movel %d1,%d6
4b69e: 4486 negl %d6
4b6a0: 43f1 58ff lea %a1@(ffffffff,%d5:l),%a1
4b6a4: 2a09 movel %a1,%d5
4b6a6: ca86 andl %d6,%d5
sectors_per_cluster,
skip_alignment);
*data_cluster_cnt = (fatdata_cluster_cnt -
((fat_sectors_cnt
+ (sectors_per_cluster - 1))
4b6a8: 2a41 moveal %d1,%a5
4b6aa: 43f5 58ff lea %a5@(ffffffff,%d5:l),%a1
/ sectors_per_cluster));
4b6ae: 2c09 movel %a1,%d6
4b6b0: 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 -
4b6b4: 9886 subl %d6,%d4
4b6b6: 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)) ||
4b6b8: 7801 moveq #1,%d4
4b6ba: b888 cmpl %a0,%d4
4b6bc: 660a bnes 4b6c8 <msdos_format+0x3b6> <== NEVER TAKEN
4b6be: b3fc 0000 0ff5 cmpal #4085,%a1
4b6c4: 6210 bhis 4b6d6 <msdos_format+0x3c4> <== NEVER TAKEN
4b6c6: 6018 bras 4b6e0 <msdos_format+0x3ce>
4b6c8: 7c02 moveq #2,%d6 <== NOT EXECUTED
4b6ca: bc88 cmpl %a0,%d6 <== NOT EXECUTED
4b6cc: 6622 bnes 4b6f0 <msdos_format+0x3de> <== NOT EXECUTED
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
4b6ce: b3fc 0000 fff5 cmpal #65525,%a1 <== NOT EXECUTED
4b6d4: 631a blss 4b6f0 <msdos_format+0x3de> <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if (fattype == FAT_FAT12) {
4b6d6: 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;
4b6d8: d281 addl %d1,%d1 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if (fattype == FAT_FAT12) {
4b6da: 4204 clrb %d4 <== NOT EXECUTED
4b6dc: be88 cmpl %a0,%d7 <== NOT EXECUTED
4b6de: 6612 bnes 4b6f2 <msdos_format+0x3e0> <== NOT EXECUTED
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
4b6e0: 2c01 movel %d1,%d6
4b6e2: 4c00 6800 mulsl %d0,%d6
4b6e6: 0c86 0000 1000 cmpil #4096,%d6
4b6ec: 6218 bhis 4b706 <msdos_format+0x3f4> <== NEVER TAKEN
4b6ee: 6010 bras 4b700 <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;
4b6f0: 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)
4b6f2: 2e01 movel %d1,%d7 <== NOT EXECUTED
4b6f4: 4c00 7800 mulsl %d0,%d7 <== NOT EXECUTED
4b6f8: 0c87 0000 8000 cmpil #32768,%d7 <== NOT EXECUTED
4b6fe: 6206 bhis 4b706 <msdos_format+0x3f4> <== NOT EXECUTED
> MS_BYTES_PER_CLUSTER_LIMIT) {
finished = true;
}
} while (!finished);
4b700: 4a04 tstb %d4
4b702: 6700 fefa beqw 4b5fe <msdos_format+0x2ec>
*sectors_per_cluster_adj = sectors_per_cluster;
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
4b706: 2c2e fd5a movel %fp@(-678),%d6
4b70a: 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;
4b70e: 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;
4b712: 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
4b716: b3fc 0000 0ff4 cmpal #4084,%a1
4b71c: 6210 bhis 4b72e <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 =
4b71e: 283c 0000 1001 movel #4097,%d4
4b724: 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 ) {
4b728: b881 cmpl %d1,%d4
4b72a: 650e bcss 4b73a <msdos_format+0x428> <== NEVER TAKEN
4b72c: 601e bras 4b74c <msdos_format+0x43a>
fattype = FAT_FAT12;
}
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
4b72e: b3fc 0000 fff4 cmpal #65524,%a1 <== NOT EXECUTED
4b734: 6304 blss 4b73a <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;
4b736: 7004 moveq #4,%d0 <== NOT EXECUTED
4b738: 6014 bras 4b74e <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 =
4b73a: 2e3c 0000 8001 movel #32769,%d7 <== NOT EXECUTED
4b740: 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 ) {
4b744: be81 cmpl %d1,%d7 <== NOT EXECUTED
4b746: 65ee bcss 4b736 <msdos_format+0x424> <== NOT EXECUTED
fattype = FAT_FAT16;
4b748: 7002 moveq #2,%d0 <== NOT EXECUTED
4b74a: 6002 bras 4b74e <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;
4b74c: 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) {
4b74e: 4284 clrl %d4
4b750: 182e fd4d moveb %fp@(-691),%d4
4b754: 4281 clrl %d1
4b756: 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(
4b758: 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) {
4b75c: b284 cmpl %d4,%d1
4b75e: 673e beqs 4b79e <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 ) {
4b760: 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
4b762: 7201 moveq #1,%d1 <== NOT EXECUTED
4b764: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
4b76a: b280 cmpl %d0,%d1 <== NOT EXECUTED
4b76c: 6508 bcss 4b776 <msdos_format+0x464> <== NOT EXECUTED
|| fmt_params->fattype == FAT_FAT16 ) {
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
4b76e: 7402 moveq #2,%d2 <== NOT EXECUTED
4b770: 2d42 fdbc movel %d2,%fp@(-580) <== NOT EXECUTED
4b774: 601a bras 4b790 <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
4b776: 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 )
4b778: 7401 moveq #1,%d2 <== NOT EXECUTED
4b77a: 2202 movel %d2,%d1 <== NOT EXECUTED
4b77c: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b77e: c2ae fd5e andl %fp@(-674),%d1 <== NOT EXECUTED
4b782: 6604 bnes 4b788 <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-- ) {
4b784: 5380 subql #1,%d0 <== NOT EXECUTED
4b786: 66f2 bnes 4b77a <msdos_format+0x468> <== NOT EXECUTED
if ( (gigs & ( 1 << b) ) != 0 )
break;
}
fmt_params->sectors_per_cluster = 1 << b;
4b788: 7201 moveq #1,%d1 <== NOT EXECUTED
4b78a: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4b78c: 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,
4b790: 486e fdb0 pea %fp@(-592) <== NOT EXECUTED
4b794: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b796: 4eba fb16 jsr %pc@(4b2ae <msdos_set_sectors_per_cluster_from_request>)<== NOT EXECUTED
4b79a: 508f addql #8,%sp <== NOT EXECUTED
4b79c: 2400 movel %d0,%d2 <== NOT EXECUTED
fmt_params );
}
}
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
4b79e: 4281 clrl %d1
4b7a0: 4280 clrl %d0
4b7a2: 122e fd4d moveb %fp@(-691),%d1
4b7a6: 102e fde2 moveb %fp@(-542),%d0
4b7aa: b081 cmpl %d1,%d0
4b7ac: 6710 beqs 4b7be <msdos_format+0x4ac> <== ALWAYS TAKEN
4b7ae: 4280 clrl %d0 <== NOT EXECUTED
4b7b0: 102e fd65 moveb %fp@(-667),%d0 <== NOT EXECUTED
4b7b4: 7801 moveq #1,%d4 <== NOT EXECUTED
4b7b6: b880 cmpl %d0,%d4 <== NOT EXECUTED
4b7b8: 6404 bccs 4b7be <msdos_format+0x4ac> <== NOT EXECUTED
--fmt_params->totl_sector_cnt;
4b7ba: 53ae fdb4 subql #1,%fp@(-588) <== NOT EXECUTED
}
}
++iteration_cnt;
4b7be: 1a2e fd65 moveb %fp@(-667),%d5
4b7c2: 5285 addql #1,%d5
4b7c4: 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
4b7c8: 4a82 tstl %d2
4b7ca: 6618 bnes 4b7e4 <msdos_format+0x4d2> <== NEVER TAKEN
&& fmt_params->fattype != fat_type
4b7cc: 4280 clrl %d0
4b7ce: 4286 clrl %d6
4b7d0: 102e fde2 moveb %fp@(-542),%d0
4b7d4: 1c2e fd4d moveb %fp@(-691),%d6
4b7d8: bc80 cmpl %d0,%d6
4b7da: 6708 beqs 4b7e4 <msdos_format+0x4d2>
&& fmt_params->totl_sector_cnt > 0 ) {
4b7dc: 4aae fdb4 tstl %fp@(-588)
4b7e0: 6600 fd12 bnew 4b4f4 <msdos_format+0x1e2>
}
++iteration_cnt;
}
}
if ( fmt_params->totl_sector_cnt == 0 )
4b7e4: 4aae fdb4 tstl %fp@(-588)
4b7e8: 6610 bnes 4b7fa <msdos_format+0x4e8> <== ALWAYS TAKEN
{
errno = EINVAL;
4b7ea: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4b7f0: 7a16 moveq #22,%d5 <== NOT EXECUTED
4b7f2: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b7f4: 2085 movel %d5,%a0@ <== NOT EXECUTED
4b7f6: 6000 00a2 braw 4b89a <msdos_format+0x588> <== NOT EXECUTED
ret_val = -1;
}
if (0 == ret_val)
4b7fa: 4a82 tstl %d2
4b7fc: 6600 00ac bnew 4b8aa <msdos_format+0x598>
{
if (FAT_FAT32 != fmt_params->fattype)
4b800: 4280 clrl %d0
4b802: 102e fde2 moveb %fp@(-542),%d0
4b806: 7804 moveq #4,%d4
4b808: 222e fdbc movel %fp@(-580),%d1
4b80c: b880 cmpl %d0,%d4
4b80e: 6726 beqs 4b836 <msdos_format+0x524> <== NEVER TAKEN
{
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
4b810: 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)
4b814: 4a2e fdfe tstb %fp@(-514)
4b818: 660e bnes 4b828 <msdos_format+0x516>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b81a: 2040 moveal %d0,%a0
4b81c: 2801 movel %d1,%d4
4b81e: 4484 negl %d4
4b820: 41f0 18ff lea %a0@(ffffffff,%d1:l),%a0
4b824: 2008 movel %a0,%d0
4b826: 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);
4b828: 282e fdb0 movel %fp@(-592),%d4
4b82c: ea8c lsrl #5,%d4
4b82e: 4c04 0800 mulsl %d4,%d0
4b832: 2d40 fdc8 movel %d0,%fp@(-568)
}
fmt_params->rsvd_sector_cnt = loc_align_object (fmt_params->rsvd_sector_cnt,
4b836: 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)
4b83a: 4a2e fdfe tstb %fp@(-514)
4b83e: 660c bnes 4b84c <msdos_format+0x53a>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4b840: 2240 moveal %d0,%a1
4b842: 43f1 18ff lea %a1@(ffffffff,%d1:l),%a1
4b846: 4481 negl %d1
4b848: 2009 movel %a1,%d0
4b84a: 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,
4b84c: 2d40 fdb8 movel %d0,%fp@(-584)
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
4b850: 4a8a tstl %a2
4b852: 6750 beqs 4b8a4 <msdos_format+0x592> <== NEVER TAKEN
(rqdata->media != 0)) {
4b854: 182a 0014 moveb %a2@(20),%d4
/*
* determine media code
*/
if (ret_val == 0) {
if ((rqdata != NULL) &&
4b858: 674a beqs 4b8a4 <msdos_format+0x592> <== ALWAYS TAKEN
(rqdata->media != 0)) {
const char valid_media_codes[] =
4b85a: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
4b85e: 2a0e movel %fp,%d5 <== NOT EXECUTED
4b860: 4879 0006 6d89 pea 66d89 <_CPU_m68k_BFFFO_table+0x226> <== NOT EXECUTED
4b866: 0685 ffff fe00 addil #-512,%d5 <== NOT EXECUTED
4b86c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b86e: 4eb9 0005 7dd0 jsr 57dd0 <memcpy> <== NOT EXECUTED
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
if (NULL==memchr(valid_media_codes,
4b874: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
4b878: 4280 clrl %d0 <== NOT EXECUTED
4b87a: 1004 moveb %d4,%d0 <== NOT EXECUTED
4b87c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4b87e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b880: 4eb9 0005 7c48 jsr 57c48 <memchr> <== NOT EXECUTED
4b886: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4b88a: 4a80 tstl %d0 <== NOT EXECUTED
4b88c: 6610 bnes 4b89e <msdos_format+0x58c> <== NOT EXECUTED
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
4b88e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4b894: 7816 moveq #22,%d4 <== NOT EXECUTED
4b896: 2a40 moveal %d0,%a5 <== NOT EXECUTED
4b898: 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;
4b89a: 74ff moveq #-1,%d2 <== NOT EXECUTED
4b89c: 600c bras 4b8aa <msdos_format+0x598> <== NOT EXECUTED
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
4b89e: 1d44 fde1 moveb %d4,%fp@(-543) <== NOT EXECUTED
4b8a2: 6006 bras 4b8aa <msdos_format+0x598> <== NOT EXECUTED
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
4b8a4: 70f8 moveq #-8,%d0
4b8a6: 1d40 fde1 moveb %d0,%fp@(-543)
4b8aa: 4280 clrl %d0
4b8ac: 102e fde0 moveb %fp@(-544),%d0
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
4b8b0: 222e fdcc movel %fp@(-564),%d1
4b8b4: 6716 beqs 4b8cc <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);
4b8b6: 41ee fdc0 lea %fp@(-576),%a0
4b8ba: 4c10 0800 mulsl %a0@,%d0
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
4b8be: 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);
4b8c2: d0ae fdb8 addl %fp@(-584),%d0
4b8c6: 2d40 fdd0 movel %d0,%fp@(-560)
4b8ca: 6016 bras 4b8e2 <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);
4b8cc: 43ee fdc0 lea %fp@(-576),%a1 <== NOT EXECUTED
4b8d0: 4c11 0800 mulsl %a1@,%d0 <== NOT EXECUTED
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
4b8d4: 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);
4b8da: d0ae fdb8 addl %fp@(-584),%d0 <== NOT EXECUTED
4b8de: 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) {
4b8e2: 4a82 tstl %d2
4b8e4: 6600 0628 bnew 4bf0e <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) &&
4b8e8: 4a8a tstl %a2
4b8ea: 6706 beqs 4b8f2 <msdos_format+0x5e0> <== NEVER TAKEN
(rqdata->OEMName != NULL)) {
4b8ec: 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) &&
4b8ee: 4a88 tstl %a0
4b8f0: 6606 bnes 4b8f8 <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 */
4b8f2: 41f9 0006 6c8b lea 66c8b <_CPU_m68k_BFFFO_table+0x128>,%a0
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b8f8: 2879 0006 8098 moveal 68098 <__ctype_ptr__>,%a4
4b8fe: 7009 moveq #9,%d0
/*
* determine usable OEMName
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->OEMName;
4b900: 43ee fde3 lea %fp@(-541),%a1
4b904: 6028 bras 4b92e <msdos_format+0x61c>
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b906: 4281 clrl %d1
4b908: 47e9 0001 lea %a1@(1),%a3
4b90c: 1410 moveb %a0@,%d2
4b90e: 1202 moveb %d2,%d1
4b910: 1234 1801 moveb %a4@(00000001,%d1:l),%d1
4b914: 49c1 extbl %d1
4b916: 0281 0000 0097 andil #151,%d1
4b91c: 6708 beqs 4b926 <msdos_format+0x614>
*to++ = *from++;
4b91e: 5288 addql #1,%a0
4b920: 1282 moveb %d2,%a1@
4b922: 224b moveal %a3,%a1
4b924: 6006 bras 4b92c <msdos_format+0x61a>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
4b926: 12bc 0020 moveb #32,%a1@
4b92a: 224b moveal %a3,%a1
}
*to = '\0';
4b92c: 4213 clrb %a3@
4b92e: 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;
4b930: 66d4 bnes 4b906 <msdos_format+0x5f4>
4b932: 6000 05a2 braw 4bed6 <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)) {
4b936: 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) &&
4b93a: 4a88 tstl %a0
4b93c: 6708 beqs 4b946 <msdos_format+0x634>
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
4b93e: 7001 moveq #1,%d0
4b940: 1d40 fdf8 moveb %d0,%fp@(-520)
4b944: 6006 bras 4b94c <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 */
4b946: 41f9 0006 6a55 lea 66a55 <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)) {
4b94c: 2879 0006 8098 moveal 68098 <__ctype_ptr__>,%a4
4b952: 700c moveq #12,%d0
/*
* determine usable Volume Label
*/
if (ret_val == 0) {
const char *from;
char *to = fmt_params->VolLabel;
4b954: 43ee fdec lea %fp@(-532),%a1
4b958: 6028 bras 4b982 <msdos_format+0x670>
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
4b95a: 4281 clrl %d1
4b95c: 47e9 0001 lea %a1@(1),%a3
4b960: 1410 moveb %a0@,%d2
4b962: 1202 moveb %d2,%d1
4b964: 1234 1801 moveb %a4@(00000001,%d1:l),%d1
4b968: 49c1 extbl %d1
4b96a: 0281 0000 0097 andil #151,%d1
4b970: 6708 beqs 4b97a <msdos_format+0x668>
*to++ = *from++;
4b972: 5288 addql #1,%a0
4b974: 1282 moveb %d2,%a1@
4b976: 224b moveal %a3,%a1
4b978: 6006 bras 4b980 <msdos_format+0x66e>
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
4b97a: 12bc 0020 moveb #32,%a1@
4b97e: 224b moveal %a3,%a1
}
*to = '\0';
4b980: 4213 clrb %a3@
4b982: 5380 subql #1,%d0
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
4b984: 66d4 bnes 4b95a <msdos_format+0x648>
4b986: 6000 0558 braw 4bee0 <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;
4b98a: 202e fe00 movel %fp@(-512),%d0 <== NOT EXECUTED
4b98e: d080 addl %d0,%d0 <== NOT EXECUTED
4b990: 6006 bras 4b998 <msdos_format+0x686> <== NOT EXECUTED
}
else {
*volid_ptr = rand();
4b992: 4eb9 0005 8540 jsr 58540 <rand>
4b998: 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) &&
4b99c: 4a8a tstl %a2
4b99e: 6632 bnes 4b9d2 <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,
4b9a0: 4879 0006 6d23 pea 66d23 <_CPU_m68k_BFFFO_table+0x1c0>
4b9a6: 47fa f750 lea %pc@(4b0f8 <msdos_format_printf>),%a3
4b9aa: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b9ae: 2f0a movel %a2,%sp@-
4b9b0: 4e93 jsr %a3@
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
4b9b2: 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)) {
4b9b6: 42a7 clrl %sp@-
4b9b8: 42a7 clrl %sp@-
4b9ba: 42a7 clrl %sp@-
4b9bc: 2f03 movel %d3,%sp@-
4b9be: 4eb9 0005 17ac jsr 517ac <lseek>
4b9c4: 4fef 001c lea %sp@(28),%sp
4b9c8: 4a80 tstl %d0
4b9ca: 6a00 052a bplw 4bef6 <msdos_format+0xbe4>
4b9ce: 6000 056c braw 4bf3c <msdos_format+0xc2a> <== NOT EXECUTED
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
(rqdata != NULL) &&
4b9d2: 4a2a 0015 tstb %a2@(21)
4b9d6: 66c8 bnes 4b9a0 <msdos_format+0x68e>
!(rqdata->quick_format)) {
ret_val = msdos_format_fill_sectors
4b9d8: 4878 ffe5 pea ffffffe5 <DBL_MIN_EXP+0x3e2>
4b9dc: 2f2e fdb0 movel %fp@(-592),%sp@-
4b9e0: 2f2e fdb4 movel %fp@(-588),%sp@-
4b9e4: 42a7 clrl %sp@-
4b9e6: 2f03 movel %d3,%sp@-
4b9e8: 2f0a movel %a2,%sp@-
4b9ea: 4eba f7b8 jsr %pc@(4b1a4 <msdos_format_fill_sectors>)
}
/*
* create master boot record
*/
if (ret_val == 0) {
4b9ee: 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
4b9f2: 2400 movel %d0,%d2
}
/*
* create master boot record
*/
if (ret_val == 0) {
4b9f4: 6600 0518 bnew 4bf0e <msdos_format+0xbfc>
4b9f8: 60a6 bras 4b9a0 <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) {
4b9fa: 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;
4b9fc: 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);
4b9fe: 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);
4ba02: 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);
4ba06: 49f9 0005 7e40 lea 57e40 <memset>,%a4
4ba0c: 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 */
4ba0e: 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);
4ba10: 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... */
4ba12: 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);
4ba14: 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);
4ba16: 202e fdb0 movel %fp@(-592),%d0
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
fmt_params->OEMName,
4ba1a: 43ee fdb0 lea %fp@(-592),%a1
4ba1e: 43e9 0033 lea %a1@(51),%a1
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4ba22: 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) {
4ba26: 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,
4ba2a: 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... */
4ba2c: 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,
4ba2e: 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);
4ba32: 7218 moveq #24,%d1
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
4ba34: 2091 movel %a1@,%a0@
4ba36: 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);
4ba3c: 1d40 fe0b moveb %d0,%fp@(-501)
4ba40: e088 lsrl #8,%d0
4ba42: 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);
4ba46: 202e fdb8 movel %fp@(-584),%d0
4ba4a: 1d40 fe0e moveb %d0,%fp@(-498)
4ba4e: e088 lsrl #8,%d0
4ba50: 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);
4ba54: 202e fdc8 movel %fp@(-568),%d0
4ba58: 1d40 fe11 moveb %d0,%fp@(-495)
4ba5c: e088 lsrl #8,%d0
4ba5e: 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... */
4ba62: 7001 moveq #1,%d0
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4ba64: 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);
4ba68: 1d44 fe13 moveb %d4,%fp@(-493)
4ba6c: 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... */
4ba6e: 1d40 fe1c moveb %d0,%fp@(-484)
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
4ba72: 2002 movel %d2,%d0
4ba74: e088 lsrl #8,%d0
4ba76: 1d40 fe21 moveb %d0,%fp@(-479)
4ba7a: 2002 movel %d2,%d0
4ba7c: e2aa lsrl %d1,%d2
4ba7e: 4240 clrw %d0
4ba80: 4840 swap %d0
4ba82: 1d42 fe23 moveb %d2,%fp@(-477)
if (fmt_params->fattype != FAT_FAT32) {
4ba86: 4282 clrl %d2
4ba88: 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);
4ba8c: 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);
4ba90: 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 */
4ba96: 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);
4ba9a: 1d6e fde1 fe15 moveb %fp@(-543),%fp@(-491)
4baa0: 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) {
4baa4: 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... */
4baa6: 1d46 fe18 moveb %d6,%fp@(-488)
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
4baaa: 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);
4baae: 1d40 fe22 moveb %d0,%fp@(-478)
if (fmt_params->fattype != FAT_FAT32) {
4bab2: b882 cmpl %d2,%d4
4bab4: 6766 beqs 4bb1c <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 */
4bab6: 202e fdfa movel %fp@(-518),%d0
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4baba: 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 */
4babe: 7c18 moveq #24,%d6
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4bac0: 486e fdec pea %fp@(-532)
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4bac4: 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),
4bac6: 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);
4baca: 1d41 fe16 moveb %d1,%fp@(-490)
4bace: e089 lsrl #8,%d1
4bad0: 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 */
4bad4: 2200 movel %d0,%d1
4bad6: e089 lsrl #8,%d1
4bad8: 1d41 fe28 moveb %d1,%fp@(-472)
4badc: 2200 movel %d0,%d1
4bade: 1d40 fe27 moveb %d0,%fp@(-473)
4bae2: 4241 clrw %d1
4bae4: 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);
4bae6: 7a29 moveq #41,%d5
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4bae8: 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);
4baea: 1d45 fe26 moveb %d5,%fp@(-474)
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4baee: 1d41 fe29 moveb %d1,%fp@(-471)
4baf2: 1d40 fe2a moveb %d0,%fp@(-470)
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
4baf6: 4eb9 0005 7dd0 jsr 57dd0 <memcpy>
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
4bafc: 4fef 000c lea %sp@(12),%sp
4bb00: 41f9 0006 6c9a lea 66c9a <_CPU_m68k_BFFFO_table+0x137>,%a0
4bb06: be82 cmpl %d2,%d7
4bb08: 6606 bnes 4bb10 <msdos_format+0x7fe> <== NEVER TAKEN
4bb0a: 41f9 0006 6c91 lea 66c91 <_CPU_m68k_BFFFO_table+0x12e>,%a0
4bb10: 2d50 fe36 movel %a0@,%fp@(-458)
4bb14: 2d68 0004 fe3a movel %a0@(4),%fp@(-454)
4bb1a: 606e bras 4bb8a <msdos_format+0x878>
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
4bb1c: 2001 movel %d1,%d0 <== NOT EXECUTED
4bb1e: 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);
4bb20: 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),
4bb24: 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);
4bb2a: 1d40 fe25 moveb %d0,%fp@(-475) <== NOT EXECUTED
4bb2e: 2001 movel %d1,%d0 <== NOT EXECUTED
4bb30: 4240 clrw %d0 <== NOT EXECUTED
4bb32: 4840 swap %d0 <== NOT EXECUTED
4bb34: 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);
4bb38: 42a7 clrl %sp@- <== NOT EXECUTED
4bb3a: 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);
4bb3e: 1d40 fe26 moveb %d0,%fp@(-474) <== NOT EXECUTED
4bb42: 7018 moveq #24,%d0 <== NOT EXECUTED
4bb44: 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 */
4bb46: 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);
4bb4a: 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 */
4bb4e: 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 */
4bb50: 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*/
4bb54: 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 */
4bb56: 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 */
4bb58: 1d41 fe2c moveb %d1,%fp@(-468) <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
4bb5c: 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 */
4bb60: 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);
4bb64: 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);
4bb66: 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);
4bb68: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
4bb6c: 42a7 clrl %sp@- <== NOT EXECUTED
4bb6e: 486b 0047 pea %a3@(71) <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4bb72: 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);
4bb76: 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);
4bb7a: 4e94 jsr %a4@ <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
4bb7c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4bb80: 26bc 4641 5433 movel #1178686515,%a3@ <== NOT EXECUTED
4bb86: 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,
4bb8a: 4879 0006 6d34 pea 66d34 <_CPU_m68k_BFFFO_table+0x1d1>
4bb90: 49fa f566 lea %pc@(4b0f8 <msdos_format_printf>),%a4
4bb94: 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);
4bb98: 280e movel %fp,%d4
4bb9a: 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,
4bba0: 47fa f59c lea %pc@(4b13e <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);
4bba4: 70eb moveq #-21,%d0
FAT_SET_VAL8(mbr,1,0x3c);
4bba6: 723c moveq #60,%d1
FAT_SET_VAL8(mbr,2,0x90);
4bba8: 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,
4bbaa: 2f0a movel %a2,%sp@-
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4bbac: 7c55 moveq #85,%d6
4bbae: 7eaa moveq #-86,%d7
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
4bbb0: 1d40 fe00 moveb %d0,%fp@(-512)
FAT_SET_VAL8(mbr,1,0x3c);
4bbb4: 1d41 fe01 moveb %d1,%fp@(-511)
FAT_SET_VAL8(mbr,2,0x90);
4bbb8: 1d42 fe02 moveb %d2,%fp@(-510)
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
4bbbc: 1d46 fffe moveb %d6,%fp@(-2)
4bbc0: 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,
4bbc4: 4e94 jsr %a4@
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bbc6: 2f04 movel %d4,%sp@-
4bbc8: 2f2e fdb0 movel %fp@(-592),%sp@-
4bbcc: 42a7 clrl %sp@-
4bbce: 2f03 movel %d3,%sp@-
4bbd0: 4e93 jsr %a3@
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4bbd2: 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,
4bbd6: 2400 movel %d0,%d2
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
4bbd8: 6600 0334 bnew 4bf0e <msdos_format+0xbfc>
4bbdc: 4aae fdd8 tstl %fp@(-552)
4bbe0: 660a bnes 4bbec <msdos_format+0x8da> <== NEVER TAKEN
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
4bbe2: 242e fddc movel %fp@(-548),%d2
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4bbe6: 6700 00b0 beqw 4bc98 <msdos_format+0x986>
4bbea: 6028 bras 4bc14 <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,
4bbec: 4879 0006 6d46 pea 66d46 <_CPU_m68k_BFFFO_table+0x1e3> <== NOT EXECUTED
4bbf2: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4bbf6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bbf8: 4e94 jsr %a4@ <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
4bbfa: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4bbfc: 2f2e fdb0 movel %fp@(-592),%sp@- <== NOT EXECUTED
4bc00: 2f2e fdd8 movel %fp@(-552),%sp@- <== NOT EXECUTED
4bc04: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4bc06: 4e93 jsr %a3@ <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4bc08: 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,
4bc0c: 2400 movel %d0,%d2 <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
4bc0e: 67d2 beqs 4bbe2 <msdos_format+0x8d0> <== NOT EXECUTED
4bc10: 6000 02fc braw 4bf0e <msdos_format+0xbfc> <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bc14: 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);
4bc18: 280e movel %fp,%d4 <== NOT EXECUTED
4bc1a: 0684 ffff fe00 addil #-512,%d4 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bc20: 42a7 clrl %sp@- <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bc22: 7a52 moveq #82,%d5 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bc24: 2f04 movel %d4,%sp@- <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bc26: 7c61 moveq #97,%d6 <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
4bc28: 4eb9 0005 7e40 jsr 57e40 <memset> <== NOT EXECUTED
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
4bc2e: 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,
4bc32: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4bc34: 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 );
4bc38: 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,
4bc3c: 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 );
4bc3e: 1d46 fe02 moveb %d6,%fp@(-510) <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4bc42: 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,
4bc46: 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);
4bc48: 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,
4bc4a: 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 );
4bc4c: 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);
4bc4e: 7255 moveq #85,%d1 <== NOT EXECUTED
4bc50: 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 );
4bc52: 1d47 fe03 moveb %d7,%fp@(-509) <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
4bc56: 1d40 ffe4 moveb %d0,%fp@(-28) <== NOT EXECUTED
4bc5a: 1d40 ffe5 moveb %d0,%fp@(-27) <== NOT EXECUTED
4bc5e: 1d47 ffe6 moveb %d7,%fp@(-26) <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
4bc62: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED
4bc66: 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,
4bc6a: 1d46 ffe8 moveb %d6,%fp@(-24) <== NOT EXECUTED
4bc6e: 1d46 ffe9 moveb %d6,%fp@(-23) <== NOT EXECUTED
4bc72: 1d46 ffea moveb %d6,%fp@(-22) <== NOT EXECUTED
4bc76: 1d46 ffeb moveb %d6,%fp@(-21) <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
4bc7a: 1d46 ffec moveb %d6,%fp@(-20) <== NOT EXECUTED
4bc7e: 1d46 ffed moveb %d6,%fp@(-19) <== NOT EXECUTED
4bc82: 1d46 ffee moveb %d6,%fp@(-18) <== NOT EXECUTED
4bc86: 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,
4bc8a: 4eba f4b2 jsr %pc@(4b13e <msdos_format_write_sec>) <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
4bc8e: 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,
4bc92: 2400 movel %d0,%d2 <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
4bc94: 6600 0278 bnew 4bf0e <msdos_format+0xbfc> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
(rqdata,
4bc98: 4280 clrl %d0
4bc9a: 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
4bc9e: 47fa f504 lea %pc@(4b1a4 <msdos_format_fill_sectors>),%a3
4bca2: 42a7 clrl %sp@-
4bca4: 2e2e fdc0 movel %fp@(-576),%d7
4bca8: 4c00 7800 mulsl %d0,%d7
4bcac: 2f2e fdb0 movel %fp@(-592),%sp@-
4bcb0: 2f07 movel %d7,%sp@-
4bcb2: 2f2e fdb8 movel %fp@(-584),%sp@-
4bcb6: 2f03 movel %d3,%sp@-
4bcb8: 2f0a movel %a2,%sp@-
4bcba: 4e93 jsr %a3@
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
4bcbc: 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
4bcc0: 2400 movel %d0,%d2
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
4bcc2: 6600 024a bnew 4bf0e <msdos_format+0xbfc>
ret_val = msdos_format_fill_sectors
4bcc6: 42a7 clrl %sp@-
4bcc8: 2f2e fdb0 movel %fp@(-592),%sp@-
4bccc: 2f2e fdd4 movel %fp@(-556),%sp@-
4bcd0: 2f2e fdd0 movel %fp@(-560),%sp@-
4bcd4: 2f03 movel %d3,%sp@-
4bcd6: 2f0a movel %a2,%sp@-
4bcd8: 4e93 jsr %a3@
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
4bcda: 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
4bcde: 2400 movel %d0,%d2
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
4bce0: 6600 022c bnew 4bf0e <msdos_format+0xbfc>
4bce4: 4a2e fdf8 tstb %fp@(-520)
4bce8: 6630 bnes 4bd1a <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));
4bcea: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4bcee: 42a7 clrl %sp@-
4bcf0: 486e fe00 pea %fp@(-512)
4bcf4: 4eb9 0005 7e40 jsr 57e40 <memset>
switch(fmt_params.fattype) {
4bcfa: 4fef 000c lea %sp@(12),%sp
4bcfe: 4280 clrl %d0
4bd00: 102e fde2 moveb %fp@(-542),%d0
4bd04: 7202 moveq #2,%d1
4bd06: b280 cmpl %d0,%d1
4bd08: 676c beqs 4bd76 <msdos_format+0xa64> <== NEVER TAKEN
4bd0a: 7804 moveq #4,%d4
4bd0c: b880 cmpl %d0,%d4
4bd0e: 677e beqs 4bd8e <msdos_format+0xa7c> <== NEVER TAKEN
4bd10: 7a01 moveq #1,%d5
4bd12: ba80 cmpl %d0,%d5
4bd14: 6600 00a2 bnew 4bdb8 <msdos_format+0xaa6>
4bd18: 6048 bras 4bd62 <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));
4bd1a: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4bd1e: 280e movel %fp,%d4
4bd20: 0684 ffff fe00 addil #-512,%d4
4bd26: 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;
4bd28: 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));
4bd2a: 2f04 movel %d4,%sp@-
4bd2c: 4eb9 0005 7e40 jsr 57e40 <memset>
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
4bd32: 4878 000b pea b <LASTO+0x1>
4bd36: 486e fdec pea %fp@(-532)
4bd3a: 2f04 movel %d4,%sp@-
4bd3c: 4eb9 0005 7dd0 jsr 57dd0 <memcpy>
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
4bd42: 1d46 fe0b moveb %d6,%fp@(-501)
ret_val = msdos_format_write_sec
4bd46: 2f04 movel %d4,%sp@-
4bd48: 2f2e fdb0 movel %fp@(-592),%sp@-
4bd4c: 2f2e fdd0 movel %fp@(-560),%sp@-
4bd50: 2f03 movel %d3,%sp@-
4bd52: 4eba f3ea jsr %pc@(4b13e <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) {
4bd56: 4fef 0028 lea %sp@(40),%sp
4bd5a: 4a80 tstl %d0
4bd5c: 6600 01b2 bnew 4bf10 <msdos_format+0xbfe>
4bd60: 6088 bras 4bcea <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)));
4bd62: 7e8f moveq #-113,%d7
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
4bd64: 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));
4bd66: 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)));
4bd6c: 1d47 fe01 moveb %d7,%fp@(-511)
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
4bd70: 1d40 fe02 moveb %d0,%fp@(-510)
break;
4bd74: 6050 bras 4bdc6 <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);
4bd76: 50c1 st %d1 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
4bd78: 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);
4bd7a: 1d6e fde1 fe00 moveb %fp@(-543),%fp@(-512) <== NOT EXECUTED
FAT_SET_VAL8(tmp_sec,1,0xff);
4bd80: 1d41 fe01 moveb %d1,%fp@(-511) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
4bd84: 1d44 fe02 moveb %d4,%fp@(-510) <== NOT EXECUTED
4bd88: 1d41 fe03 moveb %d1,%fp@(-509) <== NOT EXECUTED
break;
4bd8c: 6038 bras 4bdc6 <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);
4bd8e: 50c5 st %d5 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
4bd90: 7cf8 moveq #-8,%d6 <== NOT EXECUTED
4bd92: 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);
4bd94: 1d6e fde1 fe00 moveb %fp@(-543),%fp@(-512) <== NOT EXECUTED
4bd9a: 1d45 fe01 moveb %d5,%fp@(-511) <== NOT EXECUTED
4bd9e: 1d45 fe02 moveb %d5,%fp@(-510) <== NOT EXECUTED
4bda2: 1d45 fe03 moveb %d5,%fp@(-509) <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
4bda6: 1d46 fe04 moveb %d6,%fp@(-508) <== NOT EXECUTED
4bdaa: 1d45 fe05 moveb %d5,%fp@(-507) <== NOT EXECUTED
4bdae: 1d45 fe06 moveb %d5,%fp@(-506) <== NOT EXECUTED
4bdb2: 1d47 fe07 moveb %d7,%fp@(-505) <== NOT EXECUTED
break;
4bdb6: 600e bras 4bdc6 <msdos_format+0xab4> <== NOT EXECUTED
default:
ret_val = -1;
errno = EINVAL;
4bdb8: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4bdbe: 7416 moveq #22,%d2 <== NOT EXECUTED
4bdc0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bdc2: 2082 movel %d2,%a0@ <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
break;
default:
ret_val = -1;
4bdc4: 74ff moveq #-1,%d2 <== NOT EXECUTED
errno = EINVAL;
}
if (fmt_params.fattype == FAT_FAT32) {
4bdc6: 4280 clrl %d0
4bdc8: 102e fde2 moveb %fp@(-542),%d0
4bdcc: 7204 moveq #4,%d1
4bdce: b280 cmpl %d0,%d1
4bdd0: 6616 bnes 4bde8 <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);
4bdd2: 50c5 st %d5 <== NOT EXECUTED
4bdd4: 78f8 moveq #-8,%d4 <== NOT EXECUTED
4bdd6: 7c0f moveq #15,%d6 <== NOT EXECUTED
4bdd8: 1d44 fe08 moveb %d4,%fp@(-504) <== NOT EXECUTED
4bddc: 1d45 fe09 moveb %d5,%fp@(-503) <== NOT EXECUTED
4bde0: 1d45 fe0a moveb %d5,%fp@(-502) <== NOT EXECUTED
4bde4: 1d46 fe0b moveb %d6,%fp@(-501) <== NOT EXECUTED
}
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
4bde8: 202e fdbc movel %fp@(-580),%d0
4bdec: 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)
4bdf0: 4a2e fdfe tstb %fp@(-514)
4bdf4: 660c bnes 4be02 <msdos_format+0xaf0>
return (sectors + clustersize - 1) & ~(clustersize - 1);
4bdf6: 2040 moveal %d0,%a0
4bdf8: 4480 negl %d0
4bdfa: 41f0 48ff lea %a0@(ffffffff,%d4:l),%a0
4bdfe: 2808 movel %a0,%d4
4be00: 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;
4be02: 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);
4be04: 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;
4be06: 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);
4be08: 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
4be0e: 47fa f32e lea %pc@(4b13e <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;
4be12: 601e bras 4be32 <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),
4be14: 202e fdc0 movel %fp@(-576),%d0
4be18: 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++) {
4be1c: 5282 addql #1,%d2
ret_val = msdos_format_write_sec
4be1e: 2f05 movel %d5,%sp@-
4be20: 2f2e fdb0 movel %fp@(-592),%sp@-
4be24: 2240 moveal %d0,%a1
4be26: 4871 4800 pea %a1@(00000000,%d4:l)
4be2a: 2f03 movel %d3,%sp@-
4be2c: 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++) {
4be2e: 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);
4be32: 4281 clrl %d1
4be34: 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;
4be38: b282 cmpl %d2,%d1
4be3a: 6f08 bles 4be44 <msdos_format+0xb32>
(i < fmt_params.fat_num) && (ret_val == 0);
4be3c: 4a80 tstl %d0
4be3e: 67d4 beqs 4be14 <msdos_format+0xb02> <== ALWAYS TAKEN
4be40: 6000 00ce braw 4bf10 <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;
4be44: 2400 movel %d0,%d2
fmt_params.bytes_per_sector,
tmp_sec);
}
}
if (ret_val == 0 && rqdata != NULL && rqdata->sync_device) {
4be46: 661c bnes 4be64 <msdos_format+0xb52> <== NEVER TAKEN
4be48: 4a8a tstl %a2
4be4a: 6718 beqs 4be64 <msdos_format+0xb52> <== NEVER TAKEN
4be4c: 4a2a 0017 tstb %a2@(23)
4be50: 6712 beqs 4be64 <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);
4be52: 2f3c 2000 4206 movel #536887814,%sp@-
4be58: 2f03 movel %d3,%sp@-
4be5a: 4eb9 0005 1750 jsr 51750 <ioctl>
4be60: 508f addql #8,%sp
4be62: 2400 movel %d0,%d2
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
4be64: 70ff moveq #-1,%d0
4be66: b083 cmpl %d3,%d0
4be68: 6700 00d6 beqw 4bf40 <msdos_format+0xc2e>
close(fd);
4be6c: 2f03 movel %d3,%sp@-
4be6e: 4eb9 0004 3cd8 jsr 43cd8 <close>
4be74: 588f addql #4,%sp
4be76: 6000 00c8 braw 4bf40 <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));
4be7a: 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);
4be7e: 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);
4be82: 4bf9 0005 1750 lea 51750 <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));
4be88: 42a7 clrl %sp@-
4be8a: 2f0b movel %a3,%sp@-
4be8c: 4eb9 0005 7e40 jsr 57e40 <memset>
4be92: 2f0b movel %a3,%sp@-
4be94: 2f3c 4004 4202 movel #1074020866,%sp@-
4be9a: 2f03 movel %d3,%sp@-
4be9c: 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) {
4be9e: 4fef 0018 lea %sp@(24),%sp
4bea2: 2400 movel %d0,%d2
4bea4: 6600 f93e bnew 4b7e4 <msdos_format+0x4d2>
4bea8: 6000 f512 braw 4b3bc <msdos_format+0xaa>
ret_val = -1;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4beac: 4280 clrl %d0
4beae: 102e fde0 moveb %fp@(-544),%d0
4beb2: 2f00 movel %d0,%sp@-
4beb4: 4879 0006 6d60 pea 66d60 <_CPU_m68k_BFFFO_table+0x1fd>
4beba: 4878 0002 pea 2 <DOUBLE_FLOAT>
4bebe: 2f0a movel %a2,%sp@-
4bec0: 4eba f236 jsr %pc@(4b0f8 <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) {
4bec4: 4fef 0010 lea %sp@(16),%sp
4bec8: 4a8a tstl %a2
4beca: 6600 f562 bnew 4b42e <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;
4bece: 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;
4bed0: 7008 moveq #8,%d0 <== NOT EXECUTED
4bed2: 6000 f56a braw 4b43e <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) &&
4bed6: 4a8a tstl %a2
4bed8: 6600 fa5c bnew 4b936 <msdos_format+0x624>
4bedc: 6000 fa68 braw 4b946 <msdos_format+0x634> <== NOT EXECUTED
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
4bee0: 486e fe00 pea %fp@(-512)
4bee4: 4eb9 0005 25b4 jsr 525b4 <rtems_clock_get_tod_timeval>
if (rc == RTEMS_SUCCESSFUL) {
4beea: 588f addql #4,%sp
4beec: 4a80 tstl %d0
4beee: 6700 fa9a beqw 4b98a <msdos_format+0x678>
4bef2: 6000 fa9e braw 4b992 <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)) {
4bef6: 2f02 movel %d2,%sp@-
4bef8: 486e fe00 pea %fp@(-512)
4befc: 2f03 movel %d3,%sp@-
4befe: 4eb9 0005 1a80 jsr 51a80 <read>
4bf04: 4fef 000c lea %sp@(12),%sp
4bf08: 4a80 tstl %d0
4bf0a: 6c0a bges 4bf16 <msdos_format+0xc04> <== ALWAYS TAKEN
4bf0c: 602e bras 4bf3c <msdos_format+0xc2a> <== NOT EXECUTED
}
}
if ( fmt_params->totl_sector_cnt == 0 )
{
errno = EINVAL;
ret_val = -1;
4bf0e: 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;
4bf10: 2400 movel %d0,%d2 <== NOT EXECUTED
4bf12: 6000 ff50 braw 4be64 <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,
4bf16: 4879 0006 6d74 pea 66d74 <_CPU_m68k_BFFFO_table+0x211>
4bf1c: 4878 0002 pea 2 <DOUBLE_FLOAT>
4bf20: 2f0a movel %a2,%sp@-
4bf22: 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) {
4bf24: 242e fdb4 movel %fp@(-588),%d2
4bf28: 4fef 000c lea %sp@(12),%sp
4bf2c: 0c82 0000 ffff cmpil #65535,%d2
4bf32: 6300 fac6 blsw 4b9fa <msdos_format+0x6e8>
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
uint32_t total_sectors_num16 = 0;
4bf36: 4284 clrl %d4 <== NOT EXECUTED
4bf38: 6000 fac4 braw 4b9fe <msdos_format+0x6ec> <== NOT EXECUTED
}
}
if ( fmt_params->totl_sector_cnt == 0 )
{
errno = EINVAL;
ret_val = -1;
4bf3c: 74ff moveq #-1,%d2 <== NOT EXECUTED
4bf3e: 60ce bras 4bf0e <msdos_format+0xbfc> <== NOT EXECUTED
if (fd != -1) {
close(fd);
}
return ret_val;
}
4bf40: 2002 movel %d2,%d0
4bf42: 4cee 3cfc fd20 moveml %fp@(-736),%d2-%d7/%a2-%a5
4bf48: 4e5e unlk %fp <== NOT EXECUTED
0004b1a4 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b1a4: 4e56 ffd8 linkw %fp,#-40
4b1a8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b1ac: 246e 0018 moveal %fp@(24),%a2
4b1b0: 2a2e 0008 movel %fp@(8),%d5
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4b1b4: 2f0a movel %a2,%sp@-
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b1b6: 242e 0010 movel %fp@(16),%d2
4b1ba: 162e 001f moveb %fp@(31),%d3
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4b1be: 4eb9 0004 4410 jsr 44410 <malloc>
if (fill_buffer == NULL) {
4b1c4: 588f addql #4,%sp
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
4b1c6: 2800 movel %d0,%d4
if (fill_buffer == NULL) {
4b1c8: 6610 bnes 4b1da <msdos_format_fill_sectors+0x36> <== ALWAYS TAKEN
errno = ENOMEM;
4b1ca: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
ret_val = -1;
4b1d0: 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;
4b1d2: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b1d4: 700c moveq #12,%d0 <== NOT EXECUTED
4b1d6: 2080 movel %d0,%a0@ <== NOT EXECUTED
4b1d8: 6014 bras 4b1ee <msdos_format_fill_sectors+0x4a> <== NOT EXECUTED
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4b1da: 2f0a movel %a2,%sp@-
4b1dc: 49c3 extbl %d3
4b1de: 2f03 movel %d3,%sp@-
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
int ret_val = 0;
4b1e0: 4283 clrl %d3
if (fill_buffer == NULL) {
errno = ENOMEM;
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
4b1e2: 2f00 movel %d0,%sp@-
4b1e4: 4eb9 0005 7e40 jsr 57e40 <memset>
4b1ea: 4fef 000c lea %sp@(12),%sp
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b1ee: 4879 0006 6c63 pea 66c63 <_CPU_m68k_BFFFO_table+0x100>
4b1f4: 49fa ff02 lea %pc@(4b0f8 <msdos_format_printf>),%a4
4b1f8: 4878 0002 pea 2 <DOUBLE_FLOAT>
\*=========================================================================*/
{
int ret_val = 0;
char *fill_buffer = NULL;
uint32_t total_sectors = sector_cnt;
int last_percent = -1;
4b1fc: 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);
4b1fe: 4bfa ff3e lea %pc@(4b13e <msdos_format_write_sec>),%a5
else {
memset(fill_buffer,fill_byte,sector_size);
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4b202: 2f05 movel %d5,%sp@-
4b204: 4e94 jsr %a4@
4b206: 2e2e 0014 movel %fp@(20),%d7
4b20a: 7064 moveq #100,%d0
4b20c: 4c00 7800 mulsl %d0,%d7
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4b210: 4fef 000c lea %sp@(12),%sp
}
/*=========================================================================* \
| Function: |
\*-------------------------------------------------------------------------*/
static int msdos_format_fill_sectors
4b214: 266e 0014 moveal %fp@(20),%a3
4b218: d7c2 addal %d2,%a3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4b21a: 6042 bras 4b25e <msdos_format_fill_sectors+0xba>
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
4b21c: 222e 0014 movel %fp@(20),%d1
4b220: 2607 movel %d7,%d3
4b222: 4c41 3003 remul %d1,%d3,%d3
if (percent != last_percent) {
4b226: bc83 cmpl %d3,%d6
4b228: 671a beqs 4b244 <msdos_format_fill_sectors+0xa0>
if ((percent & 1) == 0)
4b22a: 0803 0000 btst #0,%d3
4b22e: 6612 bnes 4b242 <msdos_format_fill_sectors+0x9e>
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
4b230: 4879 0006 706f pea 6706f <IMFS_memfile_handlers+0x79>
4b236: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b23a: 2f05 movel %d5,%sp@-
4b23c: 4e94 jsr %a4@
4b23e: 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)
4b242: 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);
4b244: 2f04 movel %d4,%sp@-
4b246: 0687 ffff ff9c addil #-100,%d7
4b24c: 2f0a movel %a2,%sp@-
4b24e: 2f02 movel %d2,%sp@-
4b250: 2f2e 000c movel %fp@(12),%sp@-
start_sector++;
4b254: 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);
4b256: 4e95 jsr %a5@
4b258: 4fef 0010 lea %sp@(16),%sp
4b25c: 2600 movel %d0,%d3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
4b25e: 4a83 tstl %d3
4b260: 6604 bnes 4b266 <msdos_format_fill_sectors+0xc2> <== NEVER TAKEN
4b262: b7c2 cmpal %d2,%a3
4b264: 66b6 bnes 4b21c <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");
4b266: 4879 0006 5f5e pea 65f5e <Configuration_Initial_Extensions+0x286>
4b26c: 45fa fe8a lea %pc@(4b0f8 <msdos_format_printf>),%a2
4b270: 4878 0002 pea 2 <DOUBLE_FLOAT>
4b274: 2f05 movel %d5,%sp@-
4b276: 4e92 jsr %a2@
if (ret_val)
4b278: 4fef 000c lea %sp@(12),%sp
4b27c: 4a83 tstl %d3
4b27e: 6714 beqs 4b294 <msdos_format_fill_sectors+0xf0> <== ALWAYS TAKEN
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
4b280: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b282: 4879 0006 6c6e pea 66c6e <_CPU_m68k_BFFFO_table+0x10b> <== NOT EXECUTED
4b288: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4b28c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b28e: 4e92 jsr %a2@ <== NOT EXECUTED
4b290: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
4b294: 4a84 tstl %d4
4b296: 670a beqs 4b2a2 <msdos_format_fill_sectors+0xfe> <== NEVER TAKEN
free(fill_buffer);
4b298: 2f04 movel %d4,%sp@-
4b29a: 4eb9 0004 3f4c jsr 43f4c <free>
4b2a0: 588f addql #4,%sp
fill_buffer = NULL;
}
return ret_val;
}
4b2a2: 2003 movel %d3,%d0
4b2a4: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
4b2aa: 4e5e unlk %fp <== NOT EXECUTED
0004b0f8 <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
4b0f8: 4e56 0000 linkw %fp,#0
4b0fc: 206e 0008 moveal %fp@(8),%a0
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
4b100: 4a88 tstl %a0
4b102: 6736 beqs 4b13a <msdos_format_printf+0x42> <== NEVER TAKEN
4b104: 202e 000c movel %fp@(12),%d0
4b108: b0a8 0018 cmpl %a0@(24),%d0
4b10c: 6e2c bgts 4b13a <msdos_format_printf+0x42> <== ALWAYS TAKEN
{
vfprintf (stdout, format, args);
4b10e: 486e 0014 pea %fp@(20) <== NOT EXECUTED
4b112: 2079 0006 809c moveal 6809c <_impure_ptr>,%a0 <== NOT EXECUTED
4b118: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4b11c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4b120: 4eb9 0005 edc0 jsr 5edc0 <vfprintf> <== NOT EXECUTED
fflush (stdout);
4b126: 2079 0006 809c moveal 6809c <_impure_ptr>,%a0 <== NOT EXECUTED
4b12c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4b130: 4eb9 0005 77a6 jsr 577a6 <fflush> <== NOT EXECUTED
4b136: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
va_end (args);
}
4b13a: 4e5e unlk %fp <== NOT EXECUTED
0004b13e <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)) {
4b13e: 4280 clrl %d0
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b140: 4e56 0000 linkw %fp,#0
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4b144: 222e 000c movel %fp@(12),%d1
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
4b148: 2f03 movel %d3,%sp@-
4b14a: 262e 0010 movel %fp@(16),%d3
4b14e: 2f02 movel %d2,%sp@-
4b150: 242e 0008 movel %fp@(8),%d2
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
4b154: 42a7 clrl %sp@-
4b156: 2f03 movel %d3,%sp@-
4b158: 42a7 clrl %sp@-
4b15a: 2f01 movel %d1,%sp@-
4b15c: 2f00 movel %d0,%sp@-
4b15e: 4eb9 0004 1098 jsr 41098 <__muldi3>
4b164: 4fef 000c lea %sp@(12),%sp
4b168: 2e81 movel %d1,%sp@
4b16a: 2f00 movel %d0,%sp@-
4b16c: 2f02 movel %d2,%sp@-
4b16e: 4eb9 0005 17ac jsr 517ac <lseek>
4b174: 4fef 0010 lea %sp@(16),%sp
4b178: 4a80 tstl %d0
4b17a: 6a04 bpls 4b180 <msdos_format_write_sec+0x42> <== ALWAYS TAKEN
4b17c: 70ff moveq #-1,%d0 <== NOT EXECUTED
4b17e: 6018 bras 4b198 <msdos_format_write_sec+0x5a> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
4b180: 2f03 movel %d3,%sp@-
4b182: 2f2e 0014 movel %fp@(20),%sp@-
4b186: 2f02 movel %d2,%sp@-
4b188: 4eb9 0004 7604 jsr 47604 <write>
4b18e: 4fef 000c lea %sp@(12),%sp
4b192: 4a80 tstl %d0
4b194: 5dc0 slt %d0
4b196: 49c0 extbl %d0
ret_val = -1;
}
}
return ret_val;
}
4b198: 242e fff8 movel %fp@(-8),%d2
4b19c: 262e fffc movel %fp@(-4),%d3
4b1a0: 4e5e unlk %fp <== NOT EXECUTED
0005510c <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
)
{
5510c: 4e56 ffa0 linkw %fp,#-96 <== NOT EXECUTED
55110: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ <== NOT EXECUTED
55114: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
55118: 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);
5511c: 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
)
{
55120: 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);
55124: 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
)
{
55126: 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);
5512a: 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;
5512c: 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);
55130: 4eb9 0004 f16c jsr 4f16c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
55136: 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);
5513a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5513c: 6600 0222 bnew 55360 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x254><== NOT EXECUTED
return rc;
fat_fd->cln = cln;
55140: 206e ffbc moveal %fp@(-68),%a0 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
55144: 7020 moveq #32,%d0 <== NOT EXECUTED
55146: 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;
55148: 2143 001c movel %d3,%a0@(28) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
5514c: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
55150: 2140 0014 movel %d0,%a0@(20) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
55154: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
55158: 2143 0036 movel %d3,%a0@(54) <== NOT EXECUTED
rc = fat_file_size(&fs_info->fat, fat_fd);
5515c: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5515e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55160: 4eb9 0004 fa92 jsr 4fa92 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
55166: 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);
55168: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5516a: 6704 beqs 55170 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x64><== NOT EXECUTED
5516c: 6000 0184 braw 552f2 <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);
55170: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
55174: 240e movel %fp,%d2 <== NOT EXECUTED
55176: 0682 ffff ffc0 addil #-64,%d2 <== NOT EXECUTED
5517c: 283c 0005 7e40 movel #360000,%d4 <== NOT EXECUTED
55182: 2044 moveal %d4,%a0 <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
55184: 263c 0005 42cc movel #344780,%d3 <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
5518a: 4bf9 0005 488a lea 5488a <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);
55190: 42a7 clrl %sp@- <== NOT EXECUTED
55192: 2f02 movel %d2,%sp@- <== NOT EXECUTED
55194: 4e90 jsr %a0@ <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
55196: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
5519a: 2043 moveal %d3,%a0 <== NOT EXECUTED
5519c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5519e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
551a2: 4879 0006 706f pea 6706f <IMFS_memfile_handlers+0x79> <== NOT EXECUTED
551a8: 4e90 jsr %a0@ <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
551aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
551ac: 2f0b movel %a3,%sp@- <== NOT EXECUTED
551ae: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
551b2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
551b6: 4879 0006 706f pea 6706f <IMFS_memfile_handlers+0x79> <== NOT EXECUTED
551bc: 42a7 clrl %sp@- <== NOT EXECUTED
551be: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
551c2: 2f0c movel %a4,%sp@- <== NOT EXECUTED
551c4: 4e95 jsr %a5@ <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
551c6: 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,
551ca: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
551cc: 6704 beqs 551d2 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0xc6><== NOT EXECUTED
551ce: 6000 0122 braw 552f2 <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);
551d2: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
551d6: 240e movel %fp,%d2 <== NOT EXECUTED
551d8: 0682 ffff ffe0 addil #-32,%d2 <== NOT EXECUTED
551de: 2044 moveal %d4,%a0 <== NOT EXECUTED
551e0: 42a7 clrl %sp@- <== NOT EXECUTED
551e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
551e4: 4e90 jsr %a0@ <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
551e6: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
551ea: 2043 moveal %d3,%a0 <== NOT EXECUTED
551ec: 2f02 movel %d2,%sp@- <== NOT EXECUTED
551ee: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
551f2: 4879 0006 706e pea 6706e <IMFS_memfile_handlers+0x78> <== NOT EXECUTED
551f8: 4e90 jsr %a0@ <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
551fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
551fc: 2f0b movel %a3,%sp@- <== NOT EXECUTED
551fe: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
55202: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
55206: 4879 0006 706e pea 6706e <IMFS_memfile_handlers+0x78> <== NOT EXECUTED
5520c: 42a7 clrl %sp@- <== NOT EXECUTED
5520e: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
55212: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55214: 4e95 jsr %a5@ <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
55216: 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,
5521a: 2400 movel %d0,%d2 <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
5521c: 6704 beqs 55222 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x116><== NOT EXECUTED
5521e: 6000 00d2 braw 552f2 <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);
55222: 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);
55226: 362e ffda movew %fp@(-38),%d3 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
5522a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
5522c: 382e ffd4 movew %fp@(-44),%d4 <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(&fs_info->fat, fat_fd);
55230: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
if ( rc != RC_OK )
55236: 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);
55238: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( rc != RC_OK )
5523a: 6600 0124 bnew 55360 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x254><== NOT EXECUTED
5523e: 4281 clrl %d1 <== NOT EXECUTED
55240: 4282 clrl %d2 <== NOT EXECUTED
55242: 322e fff4 movew %fp@(-12),%d1 <== NOT EXECUTED
55246: 342e fffa movew %fp@(-6),%d2 <== NOT EXECUTED
5524a: 2001 movel %d1,%d0 <== NOT EXECUTED
5524c: e089 lsrl #8,%d1 <== NOT EXECUTED
5524e: e188 lsll #8,%d0 <== NOT EXECUTED
55250: 8081 orl %d1,%d0 <== NOT EXECUTED
55252: 2202 movel %d2,%d1 <== NOT EXECUTED
55254: e08a lsrl #8,%d2 <== NOT EXECUTED
55256: e189 lsll #8,%d1 <== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
55258: 4840 swap %d0 <== NOT EXECUTED
5525a: 4240 clrw %d0 <== NOT EXECUTED
5525c: 8282 orl %d2,%d1 <== NOT EXECUTED
5525e: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
55264: 8081 orl %d1,%d0 <== NOT EXECUTED
55266: 6612 bnes 5527a <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;
55268: 70ff moveq #-1,%d0 <== NOT EXECUTED
5526a: 2740 0008 movel %d0,%a3@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
5526e: 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;
55272: 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;
55274: 42ab 0004 clrl %a3@(4) <== NOT EXECUTED
55278: 2680 movel %d0,%a3@ <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
5527a: 486e ffbc pea %fp@(-68) <== NOT EXECUTED
5527e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55280: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55282: 4eb9 0004 f16c jsr 4f16c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
55288: 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);
5528c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
5528e: 6600 00d0 bnew 55360 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x254><== NOT EXECUTED
55292: 4281 clrl %d1 <== NOT EXECUTED
55294: 4282 clrl %d2 <== NOT EXECUTED
55296: 322e fff4 movew %fp@(-12),%d1 <== NOT EXECUTED
5529a: 342e fffa movew %fp@(-6),%d2 <== NOT EXECUTED
5529e: 206e ffbc moveal %fp@(-68),%a0 <== NOT EXECUTED
552a2: 2001 movel %d1,%d0 <== NOT EXECUTED
552a4: e089 lsrl #8,%d1 <== NOT EXECUTED
552a6: e188 lsll #8,%d0 <== NOT EXECUTED
552a8: 8081 orl %d1,%d0 <== NOT EXECUTED
552aa: 2202 movel %d2,%d1 <== NOT EXECUTED
552ac: e08a lsrl #8,%d2 <== NOT EXECUTED
552ae: e189 lsll #8,%d1 <== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
552b0: 4840 swap %d0 <== NOT EXECUTED
552b2: 4240 clrw %d0 <== NOT EXECUTED
552b4: 8282 orl %d2,%d1 <== NOT EXECUTED
552b6: 0281 0000 ffff andil #65535,%d1 <== NOT EXECUTED
552bc: 8081 orl %d1,%d0 <== NOT EXECUTED
552be: 6608 bnes 552c8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1bc><== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
552c0: 216a 0038 001c movel %a2@(56),%a0@(28) <== NOT EXECUTED
552c6: 6004 bras 552cc <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1c0><== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
552c8: 2140 001c movel %d0,%a0@(28) <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
552cc: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
552d0: 7020 moveq #32,%d0 <== NOT EXECUTED
552d2: 4840 swap %d0 <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
552d4: 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;
552da: 2140 0014 movel %d0,%a0@(20) <== NOT EXECUTED
fat_fd->map.file_cln = 0;
552de: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
rc = fat_file_size(&fs_info->fat, fat_fd);
552e2: 2f08 movel %a0,%sp@- <== NOT EXECUTED
552e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
552e6: 4eb9 0004 fa92 jsr 4fa92 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
552ec: 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);
552ee: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != RC_OK)
552f0: 670e beqs 55300 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1f4><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
552f2: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
552f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
552f8: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
552fe: 605e bras 5535e <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,
55300: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
55304: 0284 0000 ffff andil #65535,%d4 <== NOT EXECUTED
5530a: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED
55310: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55312: 2004 movel %d4,%d0 <== NOT EXECUTED
55314: 2203 movel %d3,%d1 <== NOT EXECUTED
55316: e08c lsrl #8,%d4 <== NOT EXECUTED
55318: e08b lsrl #8,%d3 <== NOT EXECUTED
5531a: e188 lsll #8,%d0 <== NOT EXECUTED
5531c: e189 lsll #8,%d1 <== NOT EXECUTED
5531e: 8084 orl %d4,%d0 <== NOT EXECUTED
55320: 8283 orl %d3,%d1 <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
55322: 4840 swap %d0 <== NOT EXECUTED
55324: 4240 clrw %d0 <== NOT EXECUTED
55326: 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,
5532c: 8081 orl %d1,%d0 <== NOT EXECUTED
5532e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
55330: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
55334: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55336: 4eb9 0005 4fc4 jsr 54fc4 <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
5533c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
55340: 41f9 0004 f51e lea 4f51e <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,
55346: 2400 movel %d0,%d2 <== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
55348: 670a beqs 55354 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x248><== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
5534a: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
5534e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55350: 4e90 jsr %a0@ <== NOT EXECUTED
55352: 600a bras 5535e <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x252><== NOT EXECUTED
return rc;
}
rc = fat_file_close(&fs_info->fat, fat_fd);
55354: 2f2e ffbc movel %fp@(-68),%sp@- <== NOT EXECUTED
55358: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5535a: 4e90 jsr %a0@ <== NOT EXECUTED
5535c: 2400 movel %d0,%d2 <== NOT EXECUTED
5535e: 508f addql #8,%sp <== NOT EXECUTED
return rc;
}
55360: 2002 movel %d2,%d0 <== NOT EXECUTED
55362: 4cee 3c1c ffa0 moveml %fp@(-96),%d2-%d4/%a2-%a5 <== NOT EXECUTED
55368: 4e5e unlk %fp <== NOT EXECUTED
0005536c <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,
5536c: 4280 clrl %d0
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
5536e: 4e56 ffe8 linkw %fp,#-24
55372: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
55376: 266e 0020 moveal %fp@(32),%a3
5537a: 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,
5537e: 2f0b movel %a3,%sp@-
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
55380: 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,
55384: 2f0a movel %a2,%sp@-
55386: 2f2e 0018 movel %fp@(24),%sp@-
5538a: 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
)
{
5538e: 286e 0008 moveal %fp@(8),%a4
55392: 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,
55396: 2f04 movel %d4,%sp@-
55398: 1002 moveb %d2,%d0
5539a: 2f00 movel %d0,%sp@-
5539c: 2f2c 0008 movel %a4@(8),%sp@-
553a0: 2f2c 0014 movel %a4@(20),%sp@-
553a4: 4eb9 0005 488a jsr 5488a <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))
553aa: 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,
553ae: 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))
553b0: 667e bnes 55430 <msdos_get_name_node+0xc4>
553b2: 6078 bras 5542c <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)
553b4: 4878 0002 pea 2 <DOUBLE_FLOAT>
553b8: 4879 0006 706e pea 6706e <IMFS_memfile_handlers+0x78>
553be: 2f04 movel %d4,%sp@-
553c0: 4eb9 0005 916c jsr 5916c <strncmp>
553c6: 4fef 000c lea %sp@(12),%sp
553ca: 4a80 tstl %d0
553cc: 6662 bnes 55430 <msdos_get_name_node+0xc4> <== ALWAYS TAKEN
553ce: 4280 clrl %d0 <== NOT EXECUTED
553d0: 302b 0014 movew %a3@(20),%d0 <== NOT EXECUTED
553d4: 2200 movel %d0,%d1 <== NOT EXECUTED
553d6: e088 lsrl #8,%d0 <== NOT EXECUTED
553d8: e189 lsll #8,%d1 <== NOT EXECUTED
553da: 8280 orl %d0,%d1 <== NOT EXECUTED
553dc: 4280 clrl %d0 <== NOT EXECUTED
553de: 302b 001a movew %a3@(26),%d0 <== NOT EXECUTED
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
553e2: 4841 swap %d1 <== NOT EXECUTED
553e4: 4241 clrw %d1 <== NOT EXECUTED
553e6: 2400 movel %d0,%d2 <== NOT EXECUTED
553e8: e088 lsrl #8,%d0 <== NOT EXECUTED
553ea: e18a lsll #8,%d2 <== NOT EXECUTED
553ec: 8480 orl %d0,%d2 <== NOT EXECUTED
553ee: 0282 0000 ffff andil #65535,%d2 <== NOT EXECUTED
553f4: 8282 orl %d2,%d1 <== NOT EXECUTED
/* are we right under root dir ? */
if (dotdot_cln == 0)
553f6: 6614 bnes 5540c <msdos_get_name_node+0xa0> <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
553f8: 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;
553fa: 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;
553fc: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
55400: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
55404: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
55408: 2481 movel %d1,%a2@ <== NOT EXECUTED
5540a: 6024 bras 55430 <msdos_get_name_node+0xc4> <== NOT EXECUTED
}
else
{
rc =
5540c: 2d4b 0014 movel %a3,%fp@(20) <== NOT EXECUTED
55410: 2d4a 0010 movel %a2,%fp@(16) <== NOT EXECUTED
55414: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED
55418: 2d6c 0014 0008 movel %a4@(20),%fp@(8) <== NOT EXECUTED
}
}
}
}
return rc;
}
5541e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED
55424: 4e5e unlk %fp <== NOT EXECUTED
fat_dir_pos_init(dir_pos);
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
}
else
{
rc =
55426: 4ef9 0005 510c jmp 5510c <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)
5542c: 4a02 tstb %d2
5542e: 6784 beqs 553b4 <msdos_get_name_node+0x48>
}
}
}
}
return rc;
}
55430: 2003 movel %d3,%d0
55432: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
55438: 4e5e unlk %fp <== NOT EXECUTED
0004bfe4 <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
)
{
4bfe4: 4e56 ffd8 linkw %fp,#-40
4bfe8: 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));
4bfec: 4878 0098 pea 98 <DBL_MANT_DIG+0x63>
4bff0: 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
)
{
4bff4: 266e 0008 moveal %fp@(8),%a3
4bff8: 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;
4bffc: 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));
4c000: 4eb9 0004 3c8c jsr 43c8c <calloc>
if (!fs_info)
4c006: 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));
4c008: 2440 moveal %d0,%a2
if (!fs_info)
4c00a: 4a80 tstl %d0
4c00c: 6610 bnes 4c01e <msdos_initialize_support+0x3a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
4c00e: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4c014: 740c moveq #12,%d2 <== NOT EXECUTED
4c016: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c018: 2082 movel %d2,%a0@ <== NOT EXECUTED
4c01a: 6000 0126 braw 4c142 <msdos_initialize_support+0x15e> <== NOT EXECUTED
temp_mt_entry->fs_info = fs_info;
4c01e: 2740 0008 movel %d0,%a3@(8)
rc = fat_init_volume_info(&fs_info->fat, temp_mt_entry->dev);
4c022: 2f2b 0036 movel %a3@(54),%sp@-
4c026: 2f00 movel %d0,%sp@-
4c028: 4eb9 0005 0114 jsr 50114 <fat_init_volume_info>
if (rc != RC_OK)
4c02e: 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);
4c030: 2400 movel %d0,%d2
if (rc != RC_OK)
4c032: 670e beqs 4c042 <msdos_initialize_support+0x5e> <== ALWAYS TAKEN
{
free(fs_info);
4c034: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c036: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4c03c: 588f addql #4,%sp <== NOT EXECUTED
4c03e: 6000 0170 braw 4c1b0 <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);
4c042: 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;
4c046: 70ff moveq #-1,%d0
4c048: 486e fff0 pea %fp@(-16)
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
4c04c: 256e 0010 008c movel %fp@(16),%a2@(140)
4c052: 2d40 fff8 movel %d0,%fp@(-8)
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
4c056: 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;
4c05a: 7001 moveq #1,%d0
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
4c05c: 2f0a movel %a2,%sp@-
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
fs_info->directory_handlers = directory_handlers;
4c05e: 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;
4c062: 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;
4c066: 2d40 fff0 movel %d0,%fp@(-16)
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
4c06a: 4eb9 0004 f16c jsr 4f16c <fat_file_open>
if (rc != RC_OK)
4c070: 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);
4c074: 2400 movel %d0,%d2
if (rc != RC_OK)
4c076: 6716 beqs 4c08e <msdos_initialize_support+0xaa> <== ALWAYS TAKEN
{
fat_shutdown_drive(&fs_info->fat);
4c078: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c07a: 4eb9 0005 0978 jsr 50978 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4c080: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c082: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4c088: 508f addql #8,%sp <== NOT EXECUTED
4c08a: 6000 0124 braw 4c1b0 <msdos_initialize_support+0x1cc> <== NOT EXECUTED
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4c08e: 206e ffec moveal %fp@(-20),%a0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
4c092: 7020 moveq #32,%d0
4c094: 4840 swap %d0
free(fs_info);
return rc;
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
4c096: 42a8 0010 clrl %a0@(16)
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
4c09a: 2140 0014 movel %d0,%a0@(20)
fat_fd->cln = fs_info->fat.vol.rdir_cl;
4c09e: 202a 0038 movel %a2@(56),%d0
fat_fd->map.file_cln = 0;
4c0a2: 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;
4c0a6: 2140 001c movel %d0,%a0@(28)
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
4c0aa: 2140 0036 movel %d0,%a0@(54)
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
4c0ae: 6616 bnes 4c0c6 <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 :
4c0b0: 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;
4c0b2: 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 :
4c0b6: 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;
4c0ba: 2141 0018 movel %d1,%a0@(24)
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
4c0be: b280 cmpl %d0,%d1
4c0c0: 6340 blss 4c102 <msdos_initialize_support+0x11e> <== NEVER TAKEN
4c0c2: 2001 movel %d1,%d0
4c0c4: 603c bras 4c102 <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);
4c0c6: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4c0c8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c0ca: 4eb9 0004 fa92 jsr 4fa92 <fat_file_size> <== NOT EXECUTED
if ( rc != RC_OK )
4c0d0: 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);
4c0d2: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( rc != RC_OK )
4c0d4: 6726 beqs 4c0fc <msdos_initialize_support+0x118> <== NOT EXECUTED
{
fat_file_close(&fs_info->fat, fat_fd);
4c0d6: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
free(fs_info);
4c0da: 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);
4c0dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c0de: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
4c0e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c0e6: 4eb9 0005 0978 jsr 50978 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4c0ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c0ee: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
4c0f4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c0f8: 6000 00b6 braw 4c1b0 <msdos_initialize_support+0x1cc> <== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
4c0fc: 4280 clrl %d0 <== NOT EXECUTED
4c0fe: 302a 0006 movew %a2@(6),%d0 <== NOT EXECUTED
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
4c102: 4878 0001 pea 1 <ADD>
4c106: 2f00 movel %d0,%sp@-
4c108: 4eb9 0004 3c8c jsr 43c8c <calloc>
if (fs_info->cl_buf == NULL)
4c10e: 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));
4c110: 2540 0094 movel %d0,%a2@(148)
if (fs_info->cl_buf == NULL)
4c114: 6630 bnes 4c146 <msdos_initialize_support+0x162> <== ALWAYS TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
4c116: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
4c11a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c11c: 4eb9 0004 f51e jsr 4f51e <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
4c122: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c124: 4eb9 0005 0978 jsr 50978 <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
4c12a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c12c: 4eb9 0004 3f4c jsr 43f4c <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
4c132: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4c138: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c13c: 720c moveq #12,%d1 <== NOT EXECUTED
4c13e: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c140: 2081 movel %d1,%a0@ <== NOT EXECUTED
4c142: 74ff moveq #-1,%d2
4c144: 606a bras 4c1b0 <msdos_initialize_support+0x1cc>
}
sc = rtems_semaphore_create(3,
4c146: 486a 0090 pea %a2@(144)
4c14a: 42a7 clrl %sp@-
4c14c: 4878 0010 pea 10 <INVALID_OPERATION>
4c150: 4878 0001 pea 1 <ADD>
4c154: 4878 0003 pea 3 <DIVIDE>
4c158: 4eb9 0004 7a80 jsr 47a80 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
4c15e: 4fef 0014 lea %sp@(20),%sp
4c162: 4a80 tstl %d0
4c164: 6736 beqs 4c19c <msdos_initialize_support+0x1b8> <== NEVER TAKEN
{
fat_file_close(&fs_info->fat, fat_fd);
4c166: 2f2e ffec movel %fp@(-20),%sp@-
fat_shutdown_drive(&fs_info->fat);
free(fs_info->cl_buf);
4c16a: 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);
4c170: 2f0a movel %a2,%sp@-
4c172: 4eb9 0004 f51e jsr 4f51e <fat_file_close>
fat_shutdown_drive(&fs_info->fat);
4c178: 2f0a movel %a2,%sp@-
4c17a: 4eb9 0005 0978 jsr 50978 <fat_shutdown_drive>
free(fs_info->cl_buf);
4c180: 2f2a 0094 movel %a2@(148),%sp@-
4c184: 4e93 jsr %a3@
free(fs_info);
4c186: 2f0a movel %a2,%sp@-
4c188: 4e93 jsr %a3@
rtems_set_errno_and_return_minus_one( EIO );
4c18a: 4eb9 0005 7428 jsr 57428 <__errno>
4c190: 4fef 0014 lea %sp@(20),%sp
4c194: 2040 moveal %d0,%a0
4c196: 7005 moveq #5,%d0
4c198: 2080 movel %d0,%a0@
4c19a: 60a6 bras 4c142 <msdos_initialize_support+0x15e>
}
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
4c19c: 206b 0024 moveal %a3@(36),%a0
4c1a0: 216e ffec 0008 movel %fp@(-20),%a0@(8)
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
4c1a6: 2143 0010 movel %d3,%a0@(16)
temp_mt_entry->ops = op_table;
4c1aa: 276e 000c 000c movel %fp@(12),%a3@(12)
return rc;
}
4c1b0: 2002 movel %d2,%d0
4c1b2: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3
4c1b8: 4e5e unlk %fp <== NOT EXECUTED
0004bfb2 <msdos_lock>:
.rename_h = msdos_rename,
.statvfs_h = rtems_filesystem_default_statvfs
};
void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
4bfb2: 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,
4bfb6: 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(
4bfba: 42a7 clrl %sp@-
4bfbc: 42a7 clrl %sp@-
fs_info->vol_sema,
4bfbe: 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(
4bfc2: 2f28 0090 movel %a0@(144),%sp@-
4bfc6: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
fs_info->vol_sema,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT
);
if (sc != RTEMS_SUCCESSFUL) {
4bfcc: 4fef 000c lea %sp@(12),%sp
4bfd0: 4a80 tstl %d0
4bfd2: 670c beqs 4bfe0 <msdos_lock+0x2e> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
4bfd4: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4bfda: 4eb9 0004 8424 jsr 48424 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
4bfe0: 4e5e unlk %fp <== NOT EXECUTED
000542cc <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)
{
542cc: 4e56 ffd0 linkw %fp,#-48
542d0: 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);
542d4: 2f2e 0014 movel %fp@(20),%sp@-
542d8: 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)
{
542dc: 266e 0010 moveal %fp@(16),%a3
542e0: 246e 0008 moveal %fp@(8),%a2
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
542e4: 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)
{
542e6: 262e 000c movel %fp@(12),%d3
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
542ea: 4eb9 0005 7e40 jsr 57e40 <memset>
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
542f0: 4fef 000c lea %sp@(12),%sp
542f4: 722e moveq #46,%d1
542f6: 1012 moveb %a2@,%d0
542f8: 49c0 extbl %d0
542fa: b280 cmpl %d0,%d1
542fc: 6666 bnes 54364 <msdos_long_to_short+0x98> <== ALWAYS TAKEN
542fe: 7401 moveq #1,%d2 <== NOT EXECUTED
54300: b483 cmpl %d3,%d2 <== NOT EXECUTED
54302: 6608 bnes 5430c <msdos_long_to_short+0x40> <== NOT EXECUTED
{
sfn[0] = '.';
54304: 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;
54308: 6000 016e braw 54478 <msdos_long_to_short+0x1ac> <== NOT EXECUTED
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
5430c: 7e2e moveq #46,%d7 <== NOT EXECUTED
5430e: 102a 0001 moveb %a2@(1),%d0 <== NOT EXECUTED
54312: 49c0 extbl %d0 <== NOT EXECUTED
54314: be80 cmpl %d0,%d7 <== NOT EXECUTED
54316: 664c bnes 54364 <msdos_long_to_short+0x98> <== NOT EXECUTED
54318: 7002 moveq #2,%d0 <== NOT EXECUTED
5431a: b083 cmpl %d3,%d0 <== NOT EXECUTED
5431c: 6646 bnes 54364 <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;
5431e: 7401 moveq #1,%d2 <== NOT EXECUTED
return MSDOS_NAME_SHORT;
}
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
{
sfn[0] = sfn[1] = '.';
54320: 722e moveq #46,%d1 <== NOT EXECUTED
54322: 16bc 002e moveb #46,%a3@ <== NOT EXECUTED
54326: 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;
5432a: 6000 014c braw 54478 <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] != '.'))
5432e: 7420 moveq #32,%d2
54330: 1232 0800 moveb %a2@(00000000,%d0:l),%d1
54334: 49c1 extbl %d1
54336: b481 cmpl %d1,%d2
54338: 6726 beqs 54360 <msdos_long_to_short+0x94> <== NEVER TAKEN
5433a: 7e2e moveq #46,%d7
5433c: be81 cmpl %d1,%d7
5433e: 6720 beqs 54360 <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) ||
54340: 2a79 0006 8098 moveal 68098 <__ctype_ptr__>,%a5
54346: 4282 clrl %d2
54348: 7aff moveq #-1,%d5
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
5434a: 49f9 0005 89fc lea 589fc <strchr>,%a4
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
54350: 4201 clrb %d1
54352: 4207 clrb %d7
54354: 1d41 fff9 moveb %d1,%fp@(-7)
54358: 1d47 ffff moveb %d7,%fp@(-1)
5435c: 6000 00c6 braw 54424 <msdos_long_to_short+0x158>
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
54360: 5280 addql #1,%d0 <== NOT EXECUTED
54362: 6002 bras 54366 <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))
54364: 4280 clrl %d0
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
54366: b680 cmpl %d0,%d3
54368: 6ec4 bgts 5432e <msdos_long_to_short+0x62> <== ALWAYS TAKEN
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
5436a: 66d4 bnes 54340 <msdos_long_to_short+0x74> <== NOT EXECUTED
5436c: 6000 00d8 braw 54446 <msdos_long_to_short+0x17a> <== NOT EXECUTED
*
*/
static msdos_name_type_t
msdos_is_valid_name_char(const char ch)
{
if (strchr(" +,;=[]", ch) != NULL)
54370: 1c04 moveb %d4,%d6
54372: 49c6 extbl %d6
54374: 2f06 movel %d6,%sp@-
54376: 4879 0006 7296 pea 67296 <msdos_file_handlers+0x2c>
5437c: 4e94 jsr %a4@
5437e: 508f addql #8,%sp
54380: 4a80 tstl %d0
54382: 6600 00ca bnew 5444e <msdos_long_to_short+0x182>
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
54386: 103c 002e moveb #46,%d0
5438a: b980 eorl %d4,%d0
5438c: 4a00 tstb %d0
5438e: 57c1 seq %d1
54390: 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) ||
54392: 4a01 tstb %d1
54394: 6600 00d8 bnew 5446e <msdos_long_to_short+0x1a2>
54398: 4280 clrl %d0
5439a: 1004 moveb %d4,%d0
5439c: 7e07 moveq #7,%d7
5439e: 1035 0801 moveb %a5@(00000001,%d0:l),%d0
543a2: 3040 moveaw %d0,%a0
543a4: 2008 movel %a0,%d0
543a6: c087 andl %d7,%d0
543a8: 4a00 tstb %d0
543aa: 6600 00b6 bnew 54462 <msdos_long_to_short+0x196>
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
543ae: 2f06 movel %d6,%sp@- <== NOT EXECUTED
543b0: 4879 0006 729e pea 6729e <msdos_file_handlers+0x34> <== NOT EXECUTED
543b6: 2d41 fffa movel %d1,%fp@(-6) <== NOT EXECUTED
543ba: 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))
543bc: 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))
543c0: 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))
543c2: 4a80 tstl %d0 <== NOT EXECUTED
543c4: 6600 009c bnew 54462 <msdos_long_to_short+0x196> <== NOT EXECUTED
543c8: 607c bras 54446 <msdos_long_to_short+0x17a> <== NOT EXECUTED
return type;
if (dot_at >= 0)
{
if (is_dot || ((count - dot_at) > 3))
543ca: 2002 movel %d2,%d0
543cc: 9085 subl %d5,%d0
543ce: 7203 moveq #3,%d1
543d0: b280 cmpl %d0,%d1
543d2: 6c12 bges 543e6 <msdos_long_to_short+0x11a> <== ALWAYS TAKEN
543d4: 6078 bras 5444e <msdos_long_to_short+0x182> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
543d6: 7e08 moveq #8,%d7
543d8: be82 cmpl %d2,%d7
543da: 6606 bnes 543e2 <msdos_long_to_short+0x116> <== ALWAYS TAKEN
543dc: 4a01 tstb %d1 <== NOT EXECUTED
543de: 662c bnes 5440c <msdos_long_to_short+0x140> <== NOT EXECUTED
543e0: 606c bras 5444e <msdos_long_to_short+0x182> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
543e2: 4a01 tstb %d1
543e4: 662a bnes 54410 <msdos_long_to_short+0x144>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
543e6: 2004 movel %d4,%d0
543e8: 0680 ffff ffbf addil #-65,%d0
543ee: 7219 moveq #25,%d1
543f0: 0280 0000 00ff andil #255,%d0
543f6: b280 cmpl %d0,%d1
543f8: 641a bccs 54414 <msdos_long_to_short+0x148> <== NEVER TAKEN
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
543fa: 0684 ffff ff9f addil #-97,%d4
54400: 0284 0000 00ff andil #255,%d4
54406: b284 cmpl %d4,%d1
54408: 6412 bccs 5441c <msdos_long_to_short+0x150> <== ALWAYS TAKEN
5440a: 6016 bras 54422 <msdos_long_to_short+0x156> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
5440c: 7a08 moveq #8,%d5 <== NOT EXECUTED
5440e: 6012 bras 54422 <msdos_long_to_short+0x156> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
54410: 2a02 movel %d2,%d5
54412: 600e bras 54422 <msdos_long_to_short+0x156>
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
uppercase = true;
54414: 7e01 moveq #1,%d7 <== NOT EXECUTED
54416: 1d47 fff9 moveb %d7,%fp@(-7) <== NOT EXECUTED
5441a: 6006 bras 54422 <msdos_long_to_short+0x156> <== NOT EXECUTED
else if ((*name >= 'a') && (*name <= 'z'))
lowercase = true;
5441c: 7201 moveq #1,%d1
5441e: 1d41 ffff moveb %d1,%fp@(-1)
count++;
54422: 5282 addql #1,%d2
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
54424: 1832 2800 moveb %a2@(00000000,%d2:l),%d4
54428: 6706 beqs 54430 <msdos_long_to_short+0x164>
5442a: b682 cmpl %d2,%d3
5442c: 6e00 ff42 bgtw 54370 <msdos_long_to_short+0xa4>
count++;
name++;
}
if (lowercase && uppercase)
54430: 4a2e ffff tstb %fp@(-1)
54434: 6714 beqs 5444a <msdos_long_to_short+0x17e> <== NEVER TAKEN
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
54436: 4a2e fff9 tstb %fp@(-7)
5443a: 56c2 sne %d2
5443c: 7e01 moveq #1,%d7
5443e: 49c2 extbl %d2
54440: 9e82 subl %d2,%d7
54442: 2407 movel %d7,%d2
54444: 600a bras 54450 <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;
54446: 4282 clrl %d2 <== NOT EXECUTED
54448: 602e bras 54478 <msdos_long_to_short+0x1ac> <== NOT EXECUTED
}
#if MSDOS_NAME_TYPE_PRINT
printf ("MSDOS_NAME_TYPE: SHORT[1]\n");
#endif
return MSDOS_NAME_SHORT;
5444a: 7401 moveq #1,%d2 <== NOT EXECUTED
5444c: 6002 bras 54450 <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;
5444e: 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);
54450: 2f0b movel %a3,%sp@-
54452: 2f03 movel %d3,%sp@-
54454: 2f0a movel %a2,%sp@-
54456: 4eb9 0005 68c2 jsr 568c2 <msdos_filename_unix2dos>
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
5445c: 4fef 000c lea %sp@(12),%sp
54460: 6016 bras 54478 <msdos_long_to_short+0x1ac>
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
54462: 70ff moveq #-1,%d0
54464: b085 cmpl %d5,%d0
54466: 6600 ff62 bnew 543ca <msdos_long_to_short+0xfe>
5446a: 6000 ff6a braw 543d6 <msdos_long_to_short+0x10a>
5446e: 7eff moveq #-1,%d7
54470: be85 cmpl %d5,%d7
54472: 66da bnes 5444e <msdos_long_to_short+0x182> <== NEVER TAKEN
54474: 6000 ff60 braw 543d6 <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;
}
54478: 2002 movel %d2,%d0
5447a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
54480: 4e5e unlk %fp <== NOT EXECUTED
0004c1bc <msdos_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
4c1bc: 4e56 0000 linkw %fp,#0
4c1c0: 222e 0014 movel %fp@(20),%d1
4c1c4: 2f03 movel %d3,%sp@-
4c1c6: 206e 0008 moveal %fp@(8),%a0
4c1ca: 2f02 movel %d2,%sp@-
msdos_node_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
4c1cc: 2401 movel %d1,%d2
4c1ce: 0282 0000 f000 andil #61440,%d2
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
4c1d4: 226e 000c moveal %fp@(12),%a1
4c1d8: 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))
4c1dc: 0c82 0000 4000 cmpil #16384,%d2
4c1e2: 670c beqs 4c1f0 <msdos_mknod+0x34> <== NEVER TAKEN
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
4c1e4: 7004 moveq #4,%d0
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
4c1e6: 0c82 0000 8000 cmpil #32768,%d2
4c1ec: 6704 beqs 4c1f2 <msdos_mknod+0x36> <== ALWAYS TAKEN
4c1ee: 602a bras 4c21a <msdos_mknod+0x5e> <== NOT EXECUTED
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
{
type = MSDOS_DIRECTORY;
4c1f0: 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);
4c1f2: 2d43 0014 movel %d3,%fp@(20)
return rc;
}
4c1f6: 242e fff8 movel %fp@(-8),%d2
4c1fa: 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);
4c1fe: 42ae 001c clrl %fp@(28)
4c202: 2d41 0018 movel %d1,%fp@(24)
4c206: 2d49 0010 movel %a1,%fp@(16)
4c20a: 2d40 000c movel %d0,%fp@(12)
4c20e: 2d48 0008 movel %a0,%fp@(8)
return rc;
}
4c212: 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);
4c214: 4ef9 0005 3d7c jmp 53d7c <msdos_creat_node>
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4c21a: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
4c220: 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);
4c224: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c226: 7016 moveq #22,%d0 <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
4c228: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
4c22c: 4e5e unlk %fp <== NOT EXECUTED
else if (S_ISREG(mode))
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
4c22e: 2080 movel %d0,%a0@ <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
return rc;
}
4c230: 70ff moveq #-1,%d0 <== NOT EXECUTED
0004c248 <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
)
{
4c248: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4c24c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c24e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4c252: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
4c254: 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,
4c258: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c25a: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4c260: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
4c264: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4c268: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4c26c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4c270: 4eb9 0005 3d7c jsr 53d7c <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
4c276: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4c27a: 4a80 tstl %d0 <== NOT EXECUTED
4c27c: 6628 bnes 4c2a6 <msdos_rename+0x5e> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4c27e: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED
4c284: 103c ffe5 moveb #-27,%d0 <== NOT EXECUTED
4c288: 2d42 000c movel %d2,%fp@(12) <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
4c28c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4c290: 2d40 0010 movel %d0,%fp@(16) <== NOT EXECUTED
4c294: 2d6a 0014 0008 movel %a2@(20),%fp@(8) <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
4c29a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4c29e: 4e5e unlk %fp <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
4c2a0: 4ef9 0005 467e jmp 5467e <msdos_set_first_char4file_name> <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
4c2a6: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
4c2aa: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4c2ae: 4e5e unlk %fp <== NOT EXECUTED
...
0004c2b4 <msdos_rmnod>:
#include "msdos.h"
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
4c2b4: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
4c2b8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
4c2bc: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
4c2c0: 226b 0014 moveal %a3@(20),%a1 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
4c2c4: 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;
4c2c8: 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)
4c2cc: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED
4c2d0: 6644 bnes 4c316 <msdos_rmnod+0x62> <== NOT EXECUTED
{
bool is_empty = false;
4c2d2: 204e moveal %fp,%a0 <== NOT EXECUTED
4c2d4: 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);
4c2d6: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4c2d8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c2da: 2f09 movel %a1,%sp@- <== NOT EXECUTED
4c2dc: 4eb9 0005 4790 jsr 54790 <msdos_dir_is_empty> <== NOT EXECUTED
if (rc != RC_OK)
4c2e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4c2e6: 4a80 tstl %d0 <== NOT EXECUTED
4c2e8: 665a bnes 4c344 <msdos_rmnod+0x90> <== NOT EXECUTED
{
return rc;
}
if (!is_empty)
4c2ea: 4a2e ffff tstb %fp@(-1) <== NOT EXECUTED
4c2ee: 660e bnes 4c2fe <msdos_rmnod+0x4a> <== NOT EXECUTED
{
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
4c2f0: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4c2f6: 725a moveq #90,%d1 <== NOT EXECUTED
4c2f8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c2fa: 2081 movel %d1,%a0@ <== NOT EXECUTED
4c2fc: 6014 bras 4c312 <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)
4c2fe: 7001 moveq #1,%d0 <== NOT EXECUTED
4c300: b0aa 0008 cmpl %a2@(8),%d0 <== NOT EXECUTED
4c304: 6410 bccs 4c316 <msdos_rmnod+0x62> <== NOT EXECUTED
{
rtems_set_errno_and_return_minus_one(EBUSY);
4c306: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4c30c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c30e: 7010 moveq #16,%d0 <== NOT EXECUTED
4c310: 2080 movel %d0,%a0@ <== NOT EXECUTED
4c312: 70ff moveq #-1,%d0 <== NOT EXECUTED
4c314: 602e bras 4c344 <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,
4c316: 4878 00e5 pea e5 <DBL_MANT_DIG+0xb0> <== NOT EXECUTED
4c31a: 486a 0020 pea %a2@(32) <== NOT EXECUTED
4c31e: 2f2b 0014 movel %a3@(20),%sp@- <== NOT EXECUTED
4c322: 4eb9 0005 467e jsr 5467e <msdos_set_first_char4file_name> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
4c328: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4c32c: 4a80 tstl %d0 <== NOT EXECUTED
4c32e: 6614 bnes 4c344 <msdos_rmnod+0x90> <== NOT EXECUTED
{
return rc;
}
fat_file_mark_removed(&fs_info->fat, fat_fd);
4c330: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4c332: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
4c336: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c338: 4eb9 0004 fa38 jsr 4fa38 <fat_file_mark_removed> <== NOT EXECUTED
return rc;
4c33e: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
4c342: 508f addql #8,%sp <== NOT EXECUTED
}
4c344: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED
4c34a: 4e5e unlk %fp <== NOT EXECUTED
...
00054484 <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
)
{
54484: 4e56 ffe0 linkw %fp,#-32
ssize_t ret1 = 0, ret2 = 0, ret3 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54488: 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
)
{
5448c: 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;
54490: 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);
54494: 49ee fffc lea %fp@(-4),%a4
54498: 260e movel %fp,%d3
5449a: 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);
5449c: 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);
5449e: 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
)
{
544a0: 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);
544a4: 2f03 movel %d3,%sp@-
544a6: 2f2b 003e movel %a3@(62),%sp@-
544aa: 4eb9 0005 66e0 jsr 566e0 <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);
544b0: 2f2b 0020 movel %a3@(32),%sp@-
544b4: 2f0a movel %a2,%sp@-
544b6: 4eba fddc jsr %pc@(54294 <fat_cluster_num_to_sector_num>)
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
544ba: 222b 0024 movel %a3@(36),%d1
544be: 142a 0002 moveb %a2@(2),%d2
544c2: 2801 movel %d1,%d4
544c4: e4ac lsrl %d2,%d4
544c6: 2404 movel %d4,%d2
544c8: d480 addl %d0,%d2
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
544ca: 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);
544cc: 508f addql #8,%sp
static inline uint16_t m68k_swap_u16(
uint16_t value
)
{
return (((value & 0xff) << 8) | ((value >> 8) & 0xff));
544ce: 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);
544d0: 3012 movew %a2@,%d0
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
544d2: 2f0c movel %a4,%sp@-
544d4: 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);
544d8: 2640 moveal %d0,%a3
544da: 538b subql #1,%a3
544dc: 200b movel %a3,%d0
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
544de: 49f9 0004 fe7a lea 4fe7a <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);
544e4: c081 andl %d1,%d0
544e6: 4281 clrl %d1
544e8: 2640 moveal %d0,%a3
time_val = CT_LE_W(time_val);
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
544ea: 486b 0016 pea %a3@(22)
544ee: 322e fffc movew %fp@(-4),%d1
544f2: 2f02 movel %d2,%sp@-
544f4: 2001 movel %d1,%d0
544f6: e089 lsrl #8,%d1
544f8: e188 lsll #8,%d0
544fa: 2f0a movel %a2,%sp@-
544fc: 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);
544fe: 3d40 fffc movew %d0,%fp@(-4)
ret1 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WTIME_OFFSET,
54502: 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,
54504: 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,
54508: 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,
5450a: 2e83 movel %d3,%sp@
5450c: 4878 0002 pea 2 <DOUBLE_FLOAT>
54510: 486b 0018 pea %a3@(24)
54514: 382e fffe movew %fp@(-2),%d4
54518: 2f02 movel %d2,%sp@-
5451a: 2204 movel %d4,%d1
5451c: e08c lsrl #8,%d4
5451e: e189 lsll #8,%d1
54520: 2f0a movel %a2,%sp@-
54522: 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);
54524: 3d41 fffe movew %d1,%fp@(-2)
ret2 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_WDATE_OFFSET,
54528: 4e94 jsr %a4@
5452a: 2800 movel %d0,%d4
2, (char *)(&date));
ret3 = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_ADATE_OFFSET,
5452c: 2f03 movel %d3,%sp@-
5452e: 4878 0002 pea 2 <DOUBLE_FLOAT>
54532: 486b 0012 pea %a3@(18)
54536: 2f02 movel %d2,%sp@-
54538: 2f0a movel %a2,%sp@-
5453a: 4e94 jsr %a4@
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) || (ret3 < 0) )
5453c: 4fef 0028 lea %sp@(40),%sp
54540: 4a85 tstl %d5
54542: 6c04 bges 54548 <msdos_set_dir_wrt_time_and_date+0xc4><== ALWAYS TAKEN
return -1;
54544: 70ff moveq #-1,%d0 <== NOT EXECUTED
54546: 600a bras 54552 <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) )
54548: 4a84 tstl %d4
5454a: 6df8 blts 54544 <msdos_set_dir_wrt_time_and_date+0xc0><== NEVER TAKEN
5454c: 4a80 tstl %d0
5454e: 6df4 blts 54544 <msdos_set_dir_wrt_time_and_date+0xc0><== NEVER TAKEN
return -1;
return RC_OK;
54550: 4280 clrl %d0
}
54552: 4cee 1c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a4
54558: 4e5e unlk %fp <== NOT EXECUTED
0005467e <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
)
{
5467e: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
54682: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54686: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
5468a: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
5468e: 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
)
{
54692: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
ssize_t ret;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
54696: 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;
5469a: 2410 movel %a0@,%d2 <== NOT EXECUTED
5469c: 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
)
{
546a0: 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;
546a6: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
546aa: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
fat_pos_t end = dir_pos->sname;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
546ae: b4aa 0038 cmpl %a2@(56),%d2 <== NOT EXECUTED
546b2: 6612 bnes 546c6 <msdos_set_first_char4file_name+0x48><== NOT EXECUTED
546b4: 7203 moveq #3,%d1 <== NOT EXECUTED
546b6: 102a 000e moveb %a2@(14),%d0 <== NOT EXECUTED
546ba: c081 andl %d1,%d0 <== NOT EXECUTED
546bc: 4a00 tstb %d0 <== NOT EXECUTED
546be: 6706 beqs 546c6 <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;
546c0: 262a 0028 movel %a2@(40),%d3 <== NOT EXECUTED
546c4: 6006 bras 546cc <msdos_set_first_char4file_name+0x4e><== NOT EXECUTED
else
dir_block_size = fs_info->fat.vol.bpc;
546c6: 4283 clrl %d3 <== NOT EXECUTED
546c8: 362a 0006 movew %a2@(6),%d3 <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
546cc: 7eff moveq #-1,%d7 <== NOT EXECUTED
546ce: bea8 0008 cmpl %a0@(8),%d7 <== NOT EXECUTED
546d2: 660e bnes 546e2 <msdos_set_first_char4file_name+0x64><== NOT EXECUTED
start = dir_pos->sname;
546d4: 2010 movel %a0@,%d0 <== NOT EXECUTED
546d6: 2228 0004 movel %a0@(4),%d1 <== NOT EXECUTED
546da: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
546de: 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);
546e2: 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);
546e4: 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) +
546e6: 47fa fbac lea %pc@(54294 <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);
546ea: 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,
546f0: 49f9 0004 fe7a lea 4fe7a <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);
546f6: 5186 subql #8,%d6 <== NOT EXECUTED
546f8: 4bf9 0005 57fc lea 557fc <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) +
546fe: 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));
54702: 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) +
54704: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54706: 4e93 jsr %a3@ <== NOT EXECUTED
54708: 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,
5470a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5470c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5470e: 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));
54712: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
54716: 3e12 movew %a2@,%d7 <== NOT EXECUTED
54718: 5387 subql #1,%d7 <== NOT EXECUTED
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
5471a: ce81 andl %d1,%d7 <== NOT EXECUTED
5471c: 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));
5471e: 4287 clrl %d7 <== NOT EXECUTED
54720: 1e2a 0002 moveb %a2@(2),%d7 <== NOT EXECUTED
54724: 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,
54726: 4870 1800 pea %a0@(00000000,%d1:l) <== NOT EXECUTED
5472a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5472c: 4e94 jsr %a4@ <== NOT EXECUTED
1, &fchar);
if (ret < 0)
5472e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
54732: 4a80 tstl %d0 <== NOT EXECUTED
54734: 6d4e blts 54784 <msdos_set_first_char4file_name+0x106><== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
54736: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
5473a: b480 cmpl %d0,%d2 <== NOT EXECUTED
5473c: 660a bnes 54748 <msdos_set_first_char4file_name+0xca><== NOT EXECUTED
5473e: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED
54742: 6604 bnes 54748 <msdos_set_first_char4file_name+0xca><== NOT EXECUTED
return rc;
start.ofs = 0;
}
}
return RC_OK;
54744: 4280 clrl %d0 <== NOT EXECUTED
54746: 603e bras 54786 <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;
54748: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
5474c: 0681 0000 0020 addil #32,%d1 <== NOT EXECUTED
54752: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
if (start.ofs >= dir_block_size)
54756: b681 cmpl %d1,%d3 <== NOT EXECUTED
54758: 62a4 bhis 546fe <msdos_set_first_char4file_name+0x80><== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
5475a: b4aa 0038 cmpl %a2@(56),%d2 <== NOT EXECUTED
5475e: 660c bnes 5476c <msdos_set_first_char4file_name+0xee><== NOT EXECUTED
54760: 7e03 moveq #3,%d7 <== NOT EXECUTED
54762: 122a 000e moveb %a2@(14),%d1 <== NOT EXECUTED
54766: c287 andl %d7,%d1 <== NOT EXECUTED
54768: 4a01 tstb %d1 <== NOT EXECUTED
5476a: 66d8 bnes 54744 <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);
5476c: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5476e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
54770: 2f0a movel %a2,%sp@- <== NOT EXECUTED
54772: 4e95 jsr %a5@ <== NOT EXECUTED
if ( rc != RC_OK )
54774: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
54778: 4a80 tstl %d0 <== NOT EXECUTED
5477a: 660a bnes 54786 <msdos_set_first_char4file_name+0x108><== NOT EXECUTED
return rc;
start.ofs = 0;
5477c: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
54780: 6000 ff7c braw 546fe <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;
54784: 70ff moveq #-1,%d0 <== NOT EXECUTED
start.ofs = 0;
}
}
return RC_OK;
}
54786: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5478c: 4e5e unlk %fp <== NOT EXECUTED
0005455c <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
)
{
5455c: 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;
54560: 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;
54562: 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
)
{
54566: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
5456a: 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);
5456e: 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;
54570: 2468 0008 moveal %a0@(8),%a2
uint32_t new_cln = fat_fd->cln;
54574: 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);
54578: 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;
5457c: 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);
54580: 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;
54582: 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);
54586: 4eba fd0c jsr %pc@(54294 <fat_cluster_num_to_sector_num>)
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
5458a: 222b 0024 movel %a3@(36),%d1
5458e: 142a 0002 moveb %a2@(2),%d2
54592: 2801 movel %d1,%d4
54594: 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);
54596: 508f addql #8,%sp
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
54598: d880 addl %d0,%d4
rc = fat_sync(&fs_info->fat);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
5459a: 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,
5459c: 47f9 0004 fe7a lea 4fe7a <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);
545a2: 3412 movew %a2@,%d2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
545a4: 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);
545a8: 5382 subql #1,%d2
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
ret1 = fat_sector_write(&fs_info->fat, sec,
545aa: 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);
545ae: c481 andl %d1,%d2
rc = fat_sync(&fs_info->fat);
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
545b0: 0280 0000 ffff andil #65535,%d0
545b6: 4243 clrw %d3
545b8: 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,
545ba: 2042 moveal %d2,%a0
545bc: 4868 001a pea %a0@(26)
545c0: 2200 movel %d0,%d1
545c2: e089 lsrl #8,%d1
545c4: e188 lsll #8,%d0
545c6: 2f04 movel %d4,%sp@-
545c8: 8280 orl %d0,%d1
545ca: 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));
545cc: 3d41 fffc movew %d1,%fp@(-4)
ret1 = fat_sector_write(&fs_info->fat, sec,
545d0: 4e93 jsr %a3@
545d2: 2203 movel %d3,%d1
545d4: 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));
545d6: 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,
545d8: 2a00 movel %d0,%d5
545da: e18b lsll #8,%d3
545dc: 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));
545de: 3101 movew %d1,%a0@-
ret2 = fat_sector_write(&fs_info->fat, sec,
545e0: 2f08 movel %a0,%sp@-
545e2: 4878 0002 pea 2 <DOUBLE_FLOAT>
545e6: 2042 moveal %d2,%a0
545e8: 4868 0014 pea %a0@(20)
545ec: 2f04 movel %d4,%sp@-
545ee: 2f0a movel %a2,%sp@-
545f0: 4e93 jsr %a3@
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
545f2: 4fef 0028 lea %sp@(40),%sp
545f6: 4a85 tstl %d5
545f8: 6c04 bges 545fe <msdos_set_first_cluster_num+0xa2><== ALWAYS TAKEN
return -1;
545fa: 70ff moveq #-1,%d0 <== NOT EXECUTED
545fc: 6006 bras 54604 <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) )
545fe: 4a80 tstl %d0
54600: 6df8 blts 545fa <msdos_set_first_cluster_num+0x9e><== NEVER TAKEN
return -1;
return RC_OK;
54602: 4280 clrl %d0
}
54604: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3
5460a: 4e5e unlk %fp <== NOT EXECUTED
0004b2ae <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 )
{
4b2ae: 4e56 0000 linkw %fp,#0
4b2b2: 226e 0008 moveal %fp@(8),%a1
4b2b6: 2f03 movel %d3,%sp@-
4b2b8: 206e 000c moveal %fp@(12),%a0
4b2bc: 2f02 movel %d2,%sp@-
int ret_val = -1;
uint32_t onebit;
if ( rqdata != NULL && rqdata->sectors_per_cluster > 0 ) {
4b2be: 4a89 tstl %a1
4b2c0: 670a beqs 4b2cc <msdos_set_sectors_per_cluster_from_request+0x1e><== NEVER TAKEN
4b2c2: 2029 0008 movel %a1@(8),%d0
4b2c6: 6704 beqs 4b2cc <msdos_set_sectors_per_cluster_from_request+0x1e>
fmt_params->sectors_per_cluster = rqdata->sectors_per_cluster;
4b2c8: 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 )
{
4b2cc: 223c 0000 0080 movel #128,%d1
4b2d2: 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 ) {
4b2d4: b2a8 000c cmpl %a0@(12),%d1
4b2d8: 6216 bhis 4b2f0 <msdos_set_sectors_per_cluster_from_request+0x42>
fmt_params->sectors_per_cluster = onebit;
4b2da: 2141 000c movel %d1,%a0@(12)
if ( fmt_params->sectors_per_cluster
<= 32768L / fmt_params->bytes_per_sector ) {
4b2de: 203c 0000 8000 movel #32768,%d0
4b2e4: 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
4b2e8: b081 cmpl %d1,%d0
4b2ea: 6504 bcss 4b2f0 <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;
4b2ec: 7201 moveq #1,%d1
ret_val = 0;
4b2ee: 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 ) {
4b2f0: e289 lsrl #1,%d1
4b2f2: 66e0 bnes 4b2d4 <msdos_set_sectors_per_cluster_from_request+0x26>
ret_val = 0;
}
}
}
if (ret_val != 0) {
4b2f4: 4a82 tstl %d2
4b2f6: 670c beqs 4b304 <msdos_set_sectors_per_cluster_from_request+0x56><== ALWAYS TAKEN
errno = EINVAL;
4b2f8: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4b2fe: 7216 moveq #22,%d1 <== NOT EXECUTED
4b300: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b302: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
return ret_val;
}
4b304: 2002 movel %d2,%d0
4b306: 242e fff8 movel %fp@(-8),%d2
4b30a: 262e fffc movel %fp@(-4),%d3
4b30e: 4e5e unlk %fp <== NOT EXECUTED
00054204 <msdos_shut_down>:
* temp_mt_entry - mount table entry
*
*/
void
msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry)
{
54204: 4e56 0000 linkw %fp,#0
54208: 2f0b movel %a3,%sp@-
5420a: 266e 0008 moveal %fp@(8),%a3
5420e: 2f0a movel %a2,%sp@-
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
54210: 246b 0008 moveal %a3@(8),%a2
fat_file_fd_t *fat_fd = temp_mt_entry->mt_fs_root->location.node_access;
54214: 206b 0024 moveal %a3@(36),%a0
/* close fat-file which correspondes to root directory */
fat_file_close(&fs_info->fat, fat_fd);
54218: 2f28 0008 movel %a0@(8),%sp@-
5421c: 2f0a movel %a2,%sp@-
5421e: 4eb9 0004 f51e jsr 4f51e <fat_file_close>
fat_shutdown_drive(&fs_info->fat);
54224: 2f0a movel %a2,%sp@-
54226: 4eb9 0005 0978 jsr 50978 <fat_shutdown_drive>
rtems_semaphore_delete(fs_info->vol_sema);
5422c: 2f2a 0090 movel %a2@(144),%sp@-
54230: 4eb9 0004 7c20 jsr 47c20 <rtems_semaphore_delete>
free(fs_info->cl_buf);
54236: 2f2a 0094 movel %a2@(148),%sp@-
5423a: 4eb9 0004 3f4c jsr 43f4c <free>
free(temp_mt_entry->fs_info);
54240: 2d6b 0008 0008 movel %a3@(8),%fp@(8)
54246: 4fef 0014 lea %sp@(20),%sp
}
5424a: 246e fff8 moveal %fp@(-8),%a2
5424e: 266e fffc moveal %fp@(-4),%a3
54252: 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);
54254: 4ef9 0004 3f4c jmp 43f4c <free>
...
00055612 <msdos_sync>:
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
55612: 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;
55616: 206e 0008 moveal %fp@(8),%a0
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
5561a: 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;
5561c: 2068 0024 moveal %a0@(36),%a0
return MSDOS_NAME_NOT_FOUND_ERR;
}
int
msdos_sync(rtems_libio_t *iop)
{
55620: 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;
55622: 2468 0008 moveal %a0@(8),%a2
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
55626: 42a7 clrl %sp@-
55628: 42a7 clrl %sp@-
5562a: 2f2a 0090 movel %a2@(144),%sp@-
5562e: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
55634: 4fef 000c lea %sp@(12),%sp
55638: 4a80 tstl %d0
5563a: 6710 beqs 5564c <msdos_sync+0x3a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(EIO);
5563c: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
55642: 7405 moveq #5,%d2 <== NOT EXECUTED
55644: 2040 moveal %d0,%a0 <== NOT EXECUTED
55646: 2082 movel %d2,%a0@ <== NOT EXECUTED
55648: 74ff moveq #-1,%d2 <== NOT EXECUTED
5564a: 6016 bras 55662 <msdos_sync+0x50> <== NOT EXECUTED
rc = fat_sync(&fs_info->fat);
5564c: 2f0a movel %a2,%sp@-
5564e: 4eb9 0005 08a8 jsr 508a8 <fat_sync>
rtems_semaphore_release(fs_info->vol_sema);
55654: 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);
55658: 2400 movel %d0,%d2
rtems_semaphore_release(fs_info->vol_sema);
5565a: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
return rc;
55660: 508f addql #8,%sp
}
55662: 2002 movel %d2,%d0
55664: 242e fff8 movel %fp@(-8),%d2
55668: 246e fffc moveal %fp@(-4),%a2
5566c: 4e5e unlk %fp <== NOT EXECUTED
0004bf86 <msdos_unlock>:
rtems_fatal_error_occurred(0xdeadbeef);
}
}
void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
{
4bf86: 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);
4bf8a: 206e 0008 moveal %fp@(8),%a0
4bf8e: 2068 0008 moveal %a0@(8),%a0
4bf92: 2f28 0090 movel %a0@(144),%sp@-
4bf96: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
4bf9c: 588f addql #4,%sp
4bf9e: 4a80 tstl %d0
4bfa0: 670c beqs 4bfae <msdos_unlock+0x28> <== ALWAYS TAKEN
rtems_fatal_error_occurred(0xdeadbeef);
4bfa2: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4bfa8: 4eb9 0004 8424 jsr 48424 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
4bfae: 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 d85c movel 5d85c <_impure_ptr>,%d2
434a0: 6004 bras 434a6 <newlib_delete_hook+0x20>
} else {
ptr = deleted_task->libc_reent;
434a2: 242a 00f6 movel %a2@(246),%d2
}
if (ptr && ptr != _global_impure_ptr) {
434a6: 4a82 tstl %d2
434a8: 6722 beqs 434cc <newlib_delete_hook+0x46> <== NEVER TAKEN
434aa: b4b9 0005 ce0e cmpl 5ce0e <_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 d6e8 jsr 4d6e8 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
434c0: 2f02 movel %d2,%sp@-
434c2: 4eb9 0004 94d4 jsr 494d4 <_Workspace_Free>
434c8: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
434cc: 42aa 00f6 clrl %a2@(246)
/*
* 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 d85c clrl 5d85c <_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 d34c jsr 4d34c <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 d0d4 jsr 4d0d4 <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 9442 pea 69442 <Configuration_Initial_Extensions+0x33e><== NOT EXECUTED
4143e: 4eb9 0005 bf14 jsr 5bf14 <printf> <== NOT EXECUTED
printf (" PLEASE NOTIFY KARPINKSI!\n");
41444: 508f addql #8,%sp <== NOT EXECUTED
41446: 203c 0006 9469 movel #431209,%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 c014 jmp 5c014 <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 c680 pea 5c680 <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 c682 pea 5c682 <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 d858 moveal 5d858 <__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 d858 moveal 5d858 <__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 32d0 jsr 532d0 <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 75ec jsr 475ec <fpathconf> <== NOT EXECUTED
43052: 2600 movel %d0,%d3 <== NOT EXECUTED
(void) close( fd );
43054: 2f02 movel %d2,%sp@- <== NOT EXECUTED
43056: 4eb9 0004 7574 jsr 47574 <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
...
0004ae84 <pipe_create>:
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
4ae84: 4e56 ffe4 linkw %fp,#-28
4ae88: 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)
4ae8c: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
4ae90: 4879 0005 dccf pea 5dccf <_CPU_m68k_BFFFO_table+0x100>
static uint16_t rtems_pipe_no = 0;
int pipe_create(
int filsdes[2]
)
{
4ae96: 246e 0008 moveal %fp@(8),%a2
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4ae9a: 4eb9 0004 c234 jsr 4c234 <rtems_mkdir>
4aea0: 508f addql #8,%sp
4aea2: 4a80 tstl %d0
4aea4: 6600 00ea bnew 4af90 <pipe_create+0x10c>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4aea8: 4878 000a pea a <LASTO>
4aeac: 260e movel %fp,%d3
4aeae: 4879 0005 dcd4 pea 5dcd4 <_CPU_m68k_BFFFO_table+0x105>
4aeb4: 0683 ffff fff1 addil #-15,%d3
4aeba: 2f03 movel %d3,%sp@-
4aebc: 4eb9 0004 ee30 jsr 4ee30 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4aec2: 3039 0005 f954 movew 5f954 <rtems_pipe_no>,%d0
4aec8: 2200 movel %d0,%d1
4aeca: 5281 addql #1,%d1
4aecc: 3f00 movew %d0,%sp@-
4aece: 33c1 0005 f954 movew %d1,5f954 <rtems_pipe_no>
4aed4: 4267 clrw %sp@-
4aed6: 4879 0005 dcdf pea 5dcdf <_CPU_m68k_BFFFO_table+0x110>
4aedc: 486e fffb pea %fp@(-5)
4aee0: 4eb9 0004 f290 jsr 4f290 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4aee6: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b>
4aeea: 2f03 movel %d3,%sp@-
4aeec: 4eb9 0004 bfe8 jsr 4bfe8 <mkfifo>
4aef2: 4fef 0020 lea %sp@(32),%sp
4aef6: 4a80 tstl %d0
4aef8: 670a beqs 4af04 <pipe_create+0x80> <== ALWAYS TAKEN
if (errno != EEXIST){
4aefa: 4eb9 0004 e610 jsr 4e610 <__errno> <== NOT EXECUTED
4af00: 6000 008e braw 4af90 <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);
4af04: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
4af08: 2f03 movel %d3,%sp@-
4af0a: 4eb9 0004 3fa4 jsr 43fa4 <open>
if (filsdes[0] < 0) {
4af10: 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);
4af12: 2480 movel %d0,%a2@
if (filsdes[0] < 0) {
4af14: 6c0e bges 4af24 <pipe_create+0xa0>
err = errno;
4af16: 4eb9 0004 e610 jsr 4e610 <__errno>
4af1c: 2040 moveal %d0,%a0
4af1e: 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);
4af20: 2f03 movel %d3,%sp@-
4af22: 6054 bras 4af78 <pipe_create+0xf4>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4af24: b0b9 0005 e910 cmpl 5e910 <rtems_libio_number_iops>,%d0
4af2a: 6412 bccs 4af3e <pipe_create+0xba> <== NEVER TAKEN
4af2c: 2200 movel %d0,%d1
4af2e: ed88 lsll #6,%d0
4af30: e989 lsll #4,%d1
4af32: 2079 0006 0048 moveal 60048 <rtems_libio_iops>,%a0
4af38: 9081 subl %d1,%d0
4af3a: d1c0 addal %d0,%a0
4af3c: 6002 bras 4af40 <pipe_create+0xbc>
4af3e: 91c8 subal %a0,%a0 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4af40: 70fe moveq #-2,%d0
4af42: c1a8 000c andl %d0,%a0@(12)
filsdes[1] = open(fifopath, O_WRONLY);
4af46: 4878 0001 pea 1 <ADD>
4af4a: 486e fff1 pea %fp@(-15)
4af4e: 4eb9 0004 3fa4 jsr 43fa4 <open>
if (filsdes[1] < 0) {
4af54: 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);
4af56: 2540 0004 movel %d0,%a2@(4)
if (filsdes[1] < 0) {
4af5a: 6c16 bges 4af72 <pipe_create+0xee>
err = errno;
4af5c: 4eb9 0004 e610 jsr 4e610 <__errno>
4af62: 2040 moveal %d0,%a0
4af64: 2410 movel %a0@,%d2
close(filsdes[0]);
4af66: 2f12 movel %a2@,%sp@-
4af68: 4eb9 0004 30e0 jsr 430e0 <close>
4af6e: 588f addql #4,%sp
4af70: 6002 bras 4af74 <pipe_create+0xf0>
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
4af72: 4282 clrl %d2
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4af74: 486e fff1 pea %fp@(-15)
4af78: 4eb9 0004 67a8 jsr 467a8 <unlink>
4af7e: 588f addql #4,%sp
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
4af80: 4280 clrl %d0
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
4af82: 4a82 tstl %d2
4af84: 670c beqs 4af92 <pipe_create+0x10e>
rtems_set_errno_and_return_minus_one(err);
4af86: 4eb9 0004 e610 jsr 4e610 <__errno>
4af8c: 2040 moveal %d0,%a0
4af8e: 2082 movel %d2,%a0@
{
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
4af90: 70ff moveq #-1,%d0
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4af92: 4cee 040c ffe4 moveml %fp@(-28),%d2-%d3/%a2
4af98: 4e5e unlk %fp <== NOT EXECUTED
0004c214 <pipe_ioctl>:
pipe_control_t *pipe,
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4c214: 4e56 0000 linkw %fp,#0
if (cmd == FIONREAD) {
4c218: 203c 4004 667f movel #1074030207,%d0
pipe_control_t *pipe,
ioctl_command_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4c21e: 2f0b movel %a3,%sp@-
4c220: 266e 0010 moveal %fp@(16),%a3
4c224: 2f0a movel %a2,%sp@-
4c226: 246e 0008 moveal %fp@(8),%a2
if (cmd == FIONREAD) {
4c22a: b0ae 000c cmpl %fp@(12),%d0
4c22e: 662e bnes 4c25e <pipe_ioctl+0x4a>
if (buffer == NULL)
4c230: 4a8b tstl %a3
4c232: 672e beqs 4c262 <pipe_ioctl+0x4e>
return -EFAULT;
if (! PIPE_LOCK(pipe))
4c234: 42a7 clrl %sp@-
4c236: 42a7 clrl %sp@-
4c238: 2f2a 0028 movel %a2@(40),%sp@-
4c23c: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_obtain>
4c242: 4fef 000c lea %sp@(12),%sp
4c246: 4a80 tstl %d0
4c248: 661c bnes 4c266 <pipe_ioctl+0x52> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4c24a: 26aa 000c movel %a2@(12),%a3@
PIPE_UNLOCK(pipe);
4c24e: 2f2a 0028 movel %a2@(40),%sp@-
4c252: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
return 0;
4c258: 588f addql #4,%sp
4c25a: 4280 clrl %d0
4c25c: 600a bras 4c268 <pipe_ioctl+0x54>
}
return -EINVAL;
4c25e: 70ea moveq #-22,%d0
4c260: 6006 bras 4c268 <pipe_ioctl+0x54>
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
4c262: 70f2 moveq #-14,%d0
4c264: 6002 bras 4c268 <pipe_ioctl+0x54>
if (! PIPE_LOCK(pipe))
return -EINTR;
4c266: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4c268: 246e fff8 moveal %fp@(-8),%a2
4c26c: 266e fffc moveal %fp@(-4),%a3
4c270: 4e5e unlk %fp <== NOT EXECUTED
0004bf18 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4bf18: 4e56 ffd4 linkw %fp,#-44
4bf1c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bf20: 42a7 clrl %sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4bf22: 266e 0008 moveal %fp@(8),%a3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bf26: 45f9 0004 79c0 lea 479c0 <rtems_semaphore_obtain>,%a2
4bf2c: 42a7 clrl %sp@-
4bf2e: 2f2b 0028 movel %a3@(40),%sp@-
4bf32: 4e92 jsr %a2@
4bf34: 4fef 000c lea %sp@(12),%sp
4bf38: 4a80 tstl %d0
4bf3a: 6600 0130 bnew 4c06c <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)) {
4bf3e: 280a movel %a2,%d4
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4bf40: 2a0e movel %fp,%d5
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bf42: 4282 clrl %d2
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4bf44: 49f9 0004 7ac8 lea 47ac8 <rtems_semaphore_release>,%a4
if (! PIPE_READWAIT(pipe))
4bf4a: 4bf9 0004 d4c4 lea 4d4c4 <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);
4bf50: 45f9 0004 fb70 lea 4fb70 <memcpy>,%a2
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4bf56: 5985 subql #4,%d5
4bf58: 2c3c 0004 d460 movel #316512,%d6
4bf5e: 6000 00e8 braw 4c048 <pipe_read+0x130>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4bf62: 4aab 0014 tstl %a3@(20)
4bf66: 6606 bnes 4bf6e <pipe_read+0x56>
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4bf68: 4283 clrl %d3
4bf6a: 6000 00ea braw 4c056 <pipe_read+0x13e>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4bf6e: 206e 0014 moveal %fp@(20),%a0
4bf72: 7001 moveq #1,%d0
4bf74: c0a8 000c andl %a0@(12),%d0
4bf78: 6600 00da bnew 4c054 <pipe_read+0x13c>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4bf7c: 52ab 0018 addql #1,%a3@(24)
PIPE_UNLOCK(pipe);
4bf80: 2f2b 0028 movel %a3@(40),%sp@-
4bf84: 4e94 jsr %a4@
if (! PIPE_READWAIT(pipe))
4bf86: 42a7 clrl %sp@-
4bf88: 2f2b 002c movel %a3@(44),%sp@-
4bf8c: 4e95 jsr %a5@
4bf8e: 4fef 000c lea %sp@(12),%sp
4bf92: 4a80 tstl %d0
4bf94: 6604 bnes 4bf9a <pipe_read+0x82> <== NEVER TAKEN
4bf96: 4283 clrl %d3
4bf98: 6002 bras 4bf9c <pipe_read+0x84>
ret = -EINTR;
4bf9a: 76fc moveq #-4,%d3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
4bf9c: 42a7 clrl %sp@-
4bf9e: 2044 moveal %d4,%a0
4bfa0: 42a7 clrl %sp@-
4bfa2: 2f2b 0028 movel %a3@(40),%sp@-
4bfa6: 4e90 jsr %a0@
4bfa8: 4fef 000c lea %sp@(12),%sp
4bfac: 4a80 tstl %d0
4bfae: 6600 00b4 bnew 4c064 <pipe_read+0x14c>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4bfb2: 53ab 0018 subql #1,%a3@(24)
if (ret != 0)
4bfb6: 4a83 tstl %d3
4bfb8: 6600 009c bnew 4c056 <pipe_read+0x13e>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4bfbc: 262b 000c movel %a3@(12),%d3
4bfc0: 67a0 beqs 4bf62 <pipe_read+0x4a>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4bfc2: 202e 0010 movel %fp@(16),%d0
4bfc6: 9082 subl %d2,%d0
4bfc8: b083 cmpl %d3,%d0
4bfca: 6402 bccs 4bfce <pipe_read+0xb6>
4bfcc: 2600 movel %d0,%d3
chunk1 = pipe->Size - pipe->Start;
4bfce: 226b 0008 moveal %a3@(8),%a1
4bfd2: 2e2b 0004 movel %a3@(4),%d7
4bfd6: 9e89 subl %a1,%d7
4bfd8: d3d3 addal %a3@,%a1
4bfda: 202e 000c movel %fp@(12),%d0
4bfde: d082 addl %d2,%d0
if (chunk > chunk1) {
4bfe0: be83 cmpl %d3,%d7
4bfe2: 6c24 bges 4c008 <pipe_read+0xf0>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4bfe4: 2f07 movel %d7,%sp@-
4bfe6: 2f09 movel %a1,%sp@-
4bfe8: 2f00 movel %d0,%sp@-
4bfea: 4e92 jsr %a2@
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4bfec: 206e 000c moveal %fp@(12),%a0
4bff0: 2203 movel %d3,%d1
4bff2: 9287 subl %d7,%d1
4bff4: 2002 movel %d2,%d0
4bff6: d087 addl %d7,%d0
4bff8: 2f01 movel %d1,%sp@-
4bffa: 2f13 movel %a3@,%sp@-
4bffc: 4870 0800 pea %a0@(00000000,%d0:l)
4c000: 4e92 jsr %a2@
4c002: 4fef 0018 lea %sp@(24),%sp
4c006: 600c bras 4c014 <pipe_read+0xfc>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4c008: 2f03 movel %d3,%sp@-
4c00a: 2f09 movel %a1,%sp@-
4c00c: 2f00 movel %d0,%sp@-
4c00e: 4e92 jsr %a2@
4c010: 4fef 000c lea %sp@(12),%sp
pipe->Start += chunk;
4c014: 2003 movel %d3,%d0
4c016: d0ab 0008 addl %a3@(8),%d0
pipe->Start %= pipe->Size;
4c01a: 4c6b 0001 0004 remul %a3@(4),%d1,%d0
pipe->Length -= chunk;
4c020: 202b 000c movel %a3@(12),%d0
4c024: 9083 subl %d3,%d0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4c026: 2741 0008 movel %d1,%a3@(8)
pipe->Length -= chunk;
4c02a: 2740 000c movel %d0,%a3@(12)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4c02e: 6604 bnes 4c034 <pipe_read+0x11c>
pipe->Start = 0;
4c030: 42ab 0008 clrl %a3@(8)
if (pipe->waitingWriters > 0)
4c034: 4aab 001c tstl %a3@(28)
4c038: 670c beqs 4c046 <pipe_read+0x12e>
PIPE_WAKEUPWRITERS(pipe);
4c03a: 2f05 movel %d5,%sp@-
4c03c: 2f2b 0030 movel %a3@(48),%sp@-
4c040: 2046 moveal %d6,%a0
4c042: 4e90 jsr %a0@
4c044: 508f addql #8,%sp
read += chunk;
4c046: d483 addl %d3,%d2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4c048: b4ae 0010 cmpl %fp@(16),%d2
4c04c: 6500 ff6e bcsw 4bfbc <pipe_read+0xa4>
4c050: 6000 ff16 braw 4bf68 <pipe_read+0x50>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4c054: 76f5 moveq #-11,%d3
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4c056: 2f2b 0028 movel %a3@(40),%sp@-
4c05a: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
4c060: 588f addql #4,%sp
4c062: 6002 bras 4c066 <pipe_read+0x14e>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
4c064: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4c066: 4a82 tstl %d2
4c068: 6e08 bgts 4c072 <pipe_read+0x15a>
4c06a: 6004 bras 4c070 <pipe_read+0x158>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4c06c: 74fc moveq #-4,%d2 <== NOT EXECUTED
4c06e: 6002 bras 4c072 <pipe_read+0x15a> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
4c070: 2403 movel %d3,%d2
}
4c072: 2002 movel %d2,%d0
4c074: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4c07a: 4e5e unlk %fp <== NOT EXECUTED
0004ba98 <pipe_release>:
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4ba98: 4e56 fff0 linkw %fp,#-16
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4ba9c: 206e 000c moveal %fp@(12),%a0
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4baa0: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4baa4: 266e 0008 moveal %fp@(8),%a3
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4baa8: 7406 moveq #6,%d2
4baaa: 2028 000c movel %a0@(12),%d0
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
4baae: 2453 moveal %a3@,%a2
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
4bab0: c480 andl %d0,%d2
if (mode & LIBIO_FLAGS_READ)
4bab2: 0800 0001 btst #1,%d0
4bab6: 6704 beqs 4babc <pipe_release+0x24>
pipe->Readers --;
4bab8: 53aa 0010 subql #1,%a2@(16)
if (mode & LIBIO_FLAGS_WRITE)
4babc: 44c0 movew %d0,%ccr
4babe: 6604 bnes 4bac4 <pipe_release+0x2c>
pipe->Writers --;
4bac0: 53aa 0014 subql #1,%a2@(20)
PIPE_UNLOCK(pipe);
4bac4: 2f2a 0028 movel %a2@(40),%sp@-
4bac8: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
4bace: 588f addql #4,%sp
4bad0: 4aaa 0010 tstl %a2@(16)
4bad4: 6622 bnes 4baf8 <pipe_release+0x60>
4bad6: 4aaa 0014 tstl %a2@(20)
4bada: 660c bnes 4bae8 <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);
4badc: 2f0a movel %a2,%sp@-
4bade: 4eba ff70 jsr %pc@(4ba50 <pipe_free>)
*pipep = NULL;
4bae2: 588f addql #4,%sp
4bae4: 4293 clrl %a3@
4bae6: 602c bras 4bb14 <pipe_release+0x7c>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4bae8: 7004 moveq #4,%d0
4baea: b082 cmpl %d2,%d0
4baec: 670a beqs 4baf8 <pipe_release+0x60> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4baee: 486e fffc pea %fp@(-4)
4baf2: 2f2a 0030 movel %a2@(48),%sp@-
4baf6: 6014 bras 4bb0c <pipe_release+0x74>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
4baf8: 4aaa 0014 tstl %a2@(20)
4bafc: 6616 bnes 4bb14 <pipe_release+0x7c> <== NEVER TAKEN
4bafe: 7002 moveq #2,%d0
4bb00: b082 cmpl %d2,%d0
4bb02: 6710 beqs 4bb14 <pipe_release+0x7c> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4bb04: 486e fffc pea %fp@(-4)
4bb08: 2f2a 002c movel %a2@(44),%sp@-
4bb0c: 4eb9 0004 d460 jsr 4d460 <rtems_barrier_release>
4bb12: 508f addql #8,%sp
#ifdef RTEMS_DEBUG
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc =
#endif
rtems_semaphore_release(pipe_semaphore);
4bb14: 2f39 0006 07d4 movel 607d4 <pipe_semaphore>,%sp@-
4bb1a: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
4bb20: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
4bb22: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
4bb28: 4e5e unlk %fp <== NOT EXECUTED
0004c07e <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4c07e: 4e56 ffd4 linkw %fp,#-44
4c082: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c086: 246e 0008 moveal %fp@(8),%a2
4c08a: 282e 0010 movel %fp@(16),%d4
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4c08e: 6700 016e beqw 4c1fe <pipe_write+0x180>
return 0;
if (! PIPE_LOCK(pipe))
4c092: 42a7 clrl %sp@-
4c094: 42a7 clrl %sp@-
4c096: 2f2a 0028 movel %a2@(40),%sp@-
4c09a: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_obtain>
4c0a0: 4fef 000c lea %sp@(12),%sp
4c0a4: 4a80 tstl %d0
4c0a6: 6600 015a bnew 4c202 <pipe_write+0x184>
return -EINTR;
if (pipe->Readers == 0) {
4c0aa: 4aaa 0010 tstl %a2@(16)
4c0ae: 6700 0112 beqw 4c1c2 <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;
4c0b2: b8aa 0004 cmpl %a2@(4),%d4
4c0b6: 6204 bhis 4c0bc <pipe_write+0x3e> <== NEVER TAKEN
4c0b8: 2e04 movel %d4,%d7
4c0ba: 6002 bras 4c0be <pipe_write+0x40>
4c0bc: 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);
4c0be: 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;
4c0c0: 4282 clrl %d2
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4c0c2: 49f9 0004 7ac8 lea 47ac8 <rtems_semaphore_release>,%a4
if (! PIPE_WRITEWAIT(pipe))
4c0c8: 4bf9 0004 d4c4 lea 4d4c4 <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);
4c0ce: 47f9 0004 fb70 lea 4fb70 <memcpy>,%a3
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4c0d4: 5985 subql #4,%d5
4c0d6: 2c3c 0004 d460 movel #316512,%d6
4c0dc: 6000 00da braw 4c1b8 <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)) {
4c0e0: 206e 0014 moveal %fp@(20),%a0
4c0e4: 7001 moveq #1,%d0
4c0e6: c0a8 000c andl %a0@(12),%d0
4c0ea: 6600 00dc bnew 4c1c8 <pipe_write+0x14a>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4c0ee: 52aa 001c addql #1,%a2@(28)
PIPE_UNLOCK(pipe);
4c0f2: 2f2a 0028 movel %a2@(40),%sp@-
4c0f6: 4e94 jsr %a4@
if (! PIPE_WRITEWAIT(pipe))
4c0f8: 42a7 clrl %sp@-
4c0fa: 2f2a 0030 movel %a2@(48),%sp@-
4c0fe: 4e95 jsr %a5@
4c100: 4fef 000c lea %sp@(12),%sp
4c104: 4a80 tstl %d0
4c106: 6604 bnes 4c10c <pipe_write+0x8e> <== NEVER TAKEN
4c108: 4283 clrl %d3
4c10a: 6002 bras 4c10e <pipe_write+0x90>
ret = -EINTR;
4c10c: 76fc moveq #-4,%d3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
4c10e: 42a7 clrl %sp@-
4c110: 42a7 clrl %sp@-
4c112: 2f2a 0028 movel %a2@(40),%sp@-
4c116: 4eb9 0004 79c0 jsr 479c0 <rtems_semaphore_obtain>
4c11c: 4fef 000c lea %sp@(12),%sp
4c120: 4a80 tstl %d0
4c122: 6600 00d2 bnew 4c1f6 <pipe_write+0x178>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4c126: 53aa 001c subql #1,%a2@(28)
if (ret != 0)
4c12a: 4a83 tstl %d3
4c12c: 6600 00a0 bnew 4c1ce <pipe_write+0x150>
goto out_locked;
if (pipe->Readers == 0) {
4c130: 4aaa 0010 tstl %a2@(16)
4c134: 6700 0096 beqw 4c1cc <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) {
4c138: 202a 0004 movel %a2@(4),%d0
4c13c: 2600 movel %d0,%d3
4c13e: 222a 000c movel %a2@(12),%d1
4c142: 9681 subl %d1,%d3
4c144: be83 cmpl %d3,%d7
4c146: 6298 bhis 4c0e0 <pipe_write+0x62>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4c148: 2044 moveal %d4,%a0
4c14a: 91c2 subal %d2,%a0
4c14c: b1c3 cmpal %d3,%a0
4c14e: 6402 bccs 4c152 <pipe_write+0xd4>
4c150: 2608 movel %a0,%d3
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4c152: 2e01 movel %d1,%d7
4c154: deaa 0008 addl %a2@(8),%d7
4c158: 4c40 7001 remul %d0,%d1,%d7
4c15c: 2e00 movel %d0,%d7
4c15e: 9e81 subl %d1,%d7
4c160: 2012 movel %a2@,%d0
4c162: d081 addl %d1,%d0
4c164: 222e 000c movel %fp@(12),%d1
4c168: d282 addl %d2,%d1
if (chunk > chunk1) {
4c16a: be83 cmpl %d3,%d7
4c16c: 6c24 bges 4c192 <pipe_write+0x114>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4c16e: 2f07 movel %d7,%sp@-
4c170: 2f01 movel %d1,%sp@-
4c172: 2f00 movel %d0,%sp@-
4c174: 4e93 jsr %a3@
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4c176: 206e 000c moveal %fp@(12),%a0
4c17a: 2203 movel %d3,%d1
4c17c: 9287 subl %d7,%d1
4c17e: 2007 movel %d7,%d0
4c180: d082 addl %d2,%d0
4c182: 2f01 movel %d1,%sp@-
4c184: 4870 0800 pea %a0@(00000000,%d0:l)
4c188: 2f12 movel %a2@,%sp@-
4c18a: 4e93 jsr %a3@
4c18c: 4fef 0018 lea %sp@(24),%sp
4c190: 600c bras 4c19e <pipe_write+0x120>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4c192: 2f03 movel %d3,%sp@-
4c194: 2f01 movel %d1,%sp@-
4c196: 2f00 movel %d0,%sp@-
4c198: 4e93 jsr %a3@
4c19a: 4fef 000c lea %sp@(12),%sp
pipe->Length += chunk;
4c19e: d7aa 000c addl %d3,%a2@(12)
if (pipe->waitingReaders > 0)
4c1a2: 4aaa 0018 tstl %a2@(24)
4c1a6: 670c beqs 4c1b4 <pipe_write+0x136>
PIPE_WAKEUPREADERS(pipe);
4c1a8: 2f05 movel %d5,%sp@-
4c1aa: 2f2a 002c movel %a2@(44),%sp@-
4c1ae: 2046 moveal %d6,%a0
4c1b0: 4e90 jsr %a0@
4c1b2: 508f addql #8,%sp
written += chunk;
4c1b4: d483 addl %d3,%d2
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
4c1b6: 7e01 moveq #1,%d7
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4c1b8: b882 cmpl %d2,%d4
4c1ba: 6200 ff7c bhiw 4c138 <pipe_write+0xba>
4c1be: 4283 clrl %d3
4c1c0: 600c bras 4c1ce <pipe_write+0x150>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4c1c2: 76e0 moveq #-32,%d3
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
4c1c4: 4282 clrl %d2
4c1c6: 6006 bras 4c1ce <pipe_write+0x150>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4c1c8: 76f5 moveq #-11,%d3
4c1ca: 6002 bras 4c1ce <pipe_write+0x150>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
4c1cc: 76e0 moveq #-32,%d3 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4c1ce: 2f2a 0028 movel %a2@(40),%sp@-
4c1d2: 4eb9 0004 7ac8 jsr 47ac8 <rtems_semaphore_release>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4c1d8: 588f addql #4,%sp
4c1da: 70e0 moveq #-32,%d0
4c1dc: b083 cmpl %d3,%d0
4c1de: 6618 bnes 4c1f8 <pipe_write+0x17a>
kill(getpid(), SIGPIPE);
4c1e0: 4eb9 0004 c6f0 jsr 4c6f0 <getpid>
4c1e6: 4878 000d pea d <OPER1+0x1>
4c1ea: 2f00 movel %d0,%sp@-
4c1ec: 4eb9 0004 cc9c jsr 4cc9c <kill>
4c1f2: 508f addql #8,%sp
4c1f4: 6002 bras 4c1f8 <pipe_write+0x17a>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
4c1f6: 76fc moveq #-4,%d3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4c1f8: 4a82 tstl %d2
4c1fa: 6e0c bgts 4c208 <pipe_write+0x18a>
4c1fc: 6008 bras 4c206 <pipe_write+0x188>
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
4c1fe: 4282 clrl %d2 <== NOT EXECUTED
4c200: 6006 bras 4c208 <pipe_write+0x18a> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
4c202: 74fc moveq #-4,%d2 <== NOT EXECUTED
4c204: 6002 bras 4c208 <pipe_write+0x18a> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4c206: 2403 movel %d3,%d2
return written;
return ret;
}
4c208: 2002 movel %d2,%d0
4c20a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4c210: 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 47d0 addql #1,647d0 <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
0004a7bc <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
4a7bc: 4e56 0000 linkw %fp,#0
4a7c0: 206e 0008 moveal %fp@(8),%a0
4a7c4: 222e 000c movel %fp@(12),%d1
4a7c8: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4a7ca: 4a88 tstl %a0
4a7cc: 671e beqs 4a7ec <pthread_attr_setschedpolicy+0x30>
4a7ce: 4a90 tstl %a0@
4a7d0: 671a beqs 4a7ec <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
4a7d2: 7004 moveq #4,%d0
4a7d4: b081 cmpl %d1,%d0
4a7d6: 6518 bcss 4a7f0 <pthread_attr_setschedpolicy+0x34>
4a7d8: 103c 0001 moveb #1,%d0
4a7dc: 7417 moveq #23,%d2
4a7de: e3a8 lsll %d1,%d0
4a7e0: c082 andl %d2,%d0
4a7e2: 670c beqs 4a7f0 <pthread_attr_setschedpolicy+0x34><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
4a7e4: 2141 0014 movel %d1,%a0@(20)
return 0;
4a7e8: 4280 clrl %d0
4a7ea: 600a bras 4a7f6 <pthread_attr_setschedpolicy+0x3a>
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
4a7ec: 7016 moveq #22,%d0
4a7ee: 6006 bras 4a7f6 <pthread_attr_setschedpolicy+0x3a>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
4a7f0: 203c 0000 0086 movel #134,%d0
}
}
4a7f6: 241f movel %sp@+,%d2
4a7f8: 4e5e unlk %fp <== NOT EXECUTED
000464a0 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
464a0: 4e56 ffe4 linkw %fp,#-28
464a4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
464a8: 266e 0008 moveal %fp@(8),%a3
464ac: 246e 0010 moveal %fp@(16),%a2
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
464b0: 4a8b tstl %a3
464b2: 6604 bnes 464b8 <pthread_barrier_init+0x18>
464b4: 6000 0094 braw 4654a <pthread_barrier_init+0xaa>
return EINVAL;
if ( count == 0 )
464b8: 4a8a tstl %a2
464ba: 6700 008e beqw 4654a <pthread_barrier_init+0xaa>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
464be: 206e 000c moveal %fp@(12),%a0
464c2: 4a88 tstl %a0
464c4: 6610 bnes 464d6 <pthread_barrier_init+0x36>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
464c6: 240e movel %fp,%d2
464c8: 5182 subql #8,%d2
464ca: 2f02 movel %d2,%sp@-
464cc: 4eb9 0004 63e8 jsr 463e8 <pthread_barrierattr_init>
464d2: 588f addql #4,%sp
the_attr = &my_attr;
464d4: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
464d6: 4a90 tstl %a0@
464d8: 6770 beqs 4654a <pthread_barrier_init+0xaa>
return EINVAL;
switch ( the_attr->process_shared ) {
464da: 4aa8 0004 tstl %a0@(4)
464de: 666a bnes 4654a <pthread_barrier_init+0xaa> <== 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;
464e0: 2039 0006 024a movel 6024a <_Thread_Dispatch_disable_level>,%d0
++level;
464e6: 5280 addql #1,%d0
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
464e8: 42ae fff0 clrl %fp@(-16)
the_attributes.maximum_count = count;
464ec: 2d4a fff4 movel %a2,%fp@(-12)
_Thread_Dispatch_disable_level = level;
464f0: 23c0 0006 024a movel %d0,6024a <_Thread_Dispatch_disable_level>
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
464f6: 4879 0006 0514 pea 60514 <_POSIX_Barrier_Information>
464fc: 4eb9 0004 847c jsr 4847c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
46502: 588f addql #4,%sp
46504: 2440 moveal %d0,%a2
46506: 4a80 tstl %d0
46508: 660a bnes 46514 <pthread_barrier_init+0x74>
_Thread_Enable_dispatch();
4650a: 4eb9 0004 94f0 jsr 494f0 <_Thread_Enable_dispatch>
return EAGAIN;
46510: 700b moveq #11,%d0
46512: 6038 bras 4654c <pthread_barrier_init+0xac>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
46514: 486e fff0 pea %fp@(-16)
46518: 486a 0010 pea %a2@(16)
4651c: 4eb9 0004 7b6c jsr 47b6c <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
46522: 202a 0008 movel %a2@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46526: 2200 movel %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46528: 2079 0006 052c moveal 6052c <_POSIX_Barrier_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
4652e: 0281 0000 ffff andil #65535,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46534: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
46538: 42aa 000c clrl %a2@(12)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
4653c: 2680 movel %d0,%a3@
_Thread_Enable_dispatch();
4653e: 4eb9 0004 94f0 jsr 494f0 <_Thread_Enable_dispatch>
46544: 508f addql #8,%sp
return 0;
46546: 4280 clrl %d0
46548: 6002 bras 4654c <pthread_barrier_init+0xac>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
4654a: 7016 moveq #22,%d0
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
4654c: 4cee 0c04 ffe4 moveml %fp@(-28),%d2/%a2-%a3
46552: 4e5e unlk %fp
...
000463e8 <pthread_barrierattr_init>:
#include <rtems/system.h>
int pthread_barrierattr_init(
pthread_barrierattr_t *attr
)
{
463e8: 4e56 0000 linkw %fp,#0
463ec: 206e 0008 moveal %fp@(8),%a0
if ( !attr )
463f0: 4a88 tstl %a0
463f2: 670c beqs 46400 <pthread_barrierattr_init+0x18> <== NEVER TAKEN
return EINVAL;
attr->is_initialized = true;
463f4: 7001 moveq #1,%d0
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
463f6: 42a8 0004 clrl %a0@(4)
)
{
if ( !attr )
return EINVAL;
attr->is_initialized = true;
463fa: 2080 movel %d0,%a0@
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
return 0;
463fc: 4280 clrl %d0
463fe: 6002 bras 46402 <pthread_barrierattr_init+0x1a>
int pthread_barrierattr_init(
pthread_barrierattr_t *attr
)
{
if ( !attr )
return EINVAL;
46400: 7016 moveq #22,%d0
attr->is_initialized = true;
attr->process_shared = PTHREAD_PROCESS_PRIVATE;
return 0;
}
46402: 4e5e unlk %fp
...
00045eb8 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
45eb8: 4e56 0000 linkw %fp,#0
45ebc: 2f03 movel %d3,%sp@-
45ebe: 262e 000c movel %fp@(12),%d3
45ec2: 2f02 movel %d2,%sp@-
45ec4: 242e 0008 movel %fp@(8),%d2
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
45ec8: 6754 beqs 45f1e <pthread_cleanup_push+0x66>
*
* 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;
45eca: 2039 0005 fbe0 movel 5fbe0 <_Thread_Dispatch_disable_level>,%d0
++level;
45ed0: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
45ed2: 23c0 0005 fbe0 movel %d0,5fbe0 <_Thread_Dispatch_disable_level>
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
45ed8: 4878 0010 pea 10 <INVALID_OPERATION>
45edc: 4eb9 0004 9dd0 jsr 49dd0 <_Workspace_Allocate>
if ( handler ) {
45ee2: 588f addql #4,%sp
45ee4: 4a80 tstl %d0
45ee6: 6726 beqs 45f0e <pthread_cleanup_push+0x56> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
45ee8: 2079 0006 0026 moveal 60026 <_Per_CPU_Information+0xe>,%a0
handler_stack = &thread_support->Cancellation_Handlers;
45eee: 2228 00fe movel %a0@(254),%d1
handler->routine = routine;
45ef2: 2040 moveal %d0,%a0
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
45ef4: 0681 0000 00e4 addil #228,%d1
handler->routine = routine;
45efa: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
45efe: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
45f02: 2f00 movel %d0,%sp@-
45f04: 2f01 movel %d1,%sp@-
45f06: 4eb9 0004 7624 jsr 47624 <_Chain_Append>
45f0c: 508f addql #8,%sp
}
_Thread_Enable_dispatch();
}
45f0e: 242e fff8 movel %fp@(-8),%d2
45f12: 262e fffc movel %fp@(-4),%d3
45f16: 4e5e unlk %fp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
45f18: 4ef9 0004 8f88 jmp 48f88 <_Thread_Enable_dispatch>
}
45f1e: 242e fff8 movel %fp@(-8),%d2
45f22: 262e fffc movel %fp@(-4),%d3
45f26: 4e5e unlk %fp
...
00046ca0 <pthread_cond_init>:
*/
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
46ca0: 4e56 0000 linkw %fp,#0
46ca4: 2f0b movel %a3,%sp@-
46ca6: 266e 000c moveal %fp@(12),%a3
46caa: 2f0a movel %a2,%sp@-
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
46cac: 4a8b tstl %a3
46cae: 6606 bnes 46cb6 <pthread_cond_init+0x16>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
46cb0: 47f9 0005 eb36 lea 5eb36 <_POSIX_Condition_variables_Default_attributes>,%a3
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
46cb6: 7001 moveq #1,%d0
46cb8: b0ab 0004 cmpl %a3@(4),%d0
46cbc: 677e beqs 46d3c <pthread_cond_init+0x9c> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
46cbe: 4a93 tstl %a3@
46cc0: 677a beqs 46d3c <pthread_cond_init+0x9c>
*
* 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;
46cc2: 2039 0006 12f6 movel 612f6 <_Thread_Dispatch_disable_level>,%d0
++level;
46cc8: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
46cca: 23c0 0006 12f6 movel %d0,612f6 <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
46cd0: 4879 0006 164c pea 6164c <_POSIX_Condition_variables_Information>
46cd6: 4eb9 0004 9288 jsr 49288 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
46cdc: 588f addql #4,%sp
46cde: 2440 moveal %d0,%a2
46ce0: 4a80 tstl %d0
46ce2: 660a bnes 46cee <pthread_cond_init+0x4e>
_Thread_Enable_dispatch();
46ce4: 4eb9 0004 a2fc jsr 4a2fc <_Thread_Enable_dispatch>
return ENOMEM;
46cea: 700c moveq #12,%d0
46cec: 6050 bras 46d3e <pthread_cond_init+0x9e>
}
the_cond->process_shared = the_attr->process_shared;
46cee: 256b 0004 0010 movel %a3@(4),%a2@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
46cf4: 42aa 0014 clrl %a2@(20)
_Thread_queue_Initialize(
46cf8: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f>
46cfc: 2f3c 1000 0800 movel #268437504,%sp@-
46d02: 42a7 clrl %sp@-
46d04: 486a 0018 pea %a2@(24)
46d08: 4eb9 0004 a9c0 jsr 4a9c0 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
46d0e: 202a 0008 movel %a2@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46d12: 2200 movel %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46d14: 2079 0006 1664 moveal 61664 <_POSIX_Condition_variables_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46d1a: 0281 0000 ffff andil #65535,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46d20: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
46d24: 206e 0008 moveal %fp@(8),%a0
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
46d28: 42aa 000c clrl %a2@(12)
46d2c: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
46d2e: 4eb9 0004 a2fc jsr 4a2fc <_Thread_Enable_dispatch>
return 0;
46d34: 4fef 0010 lea %sp@(16),%sp
46d38: 4280 clrl %d0
46d3a: 6002 bras 46d3e <pthread_cond_init+0x9e>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
46d3c: 7016 moveq #22,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46d3e: 246e fff8 moveal %fp@(-8),%a2
46d42: 266e fffc moveal %fp@(-4),%a3
46d46: 4e5e unlk %fp
...
00046b40 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
46b40: 4e56 0000 linkw %fp,#0
46b44: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
46b48: 4a88 tstl %a0
46b4a: 670a beqs 46b56 <pthread_condattr_destroy+0x16>
46b4c: 4a90 tstl %a0@
46b4e: 6706 beqs 46b56 <pthread_condattr_destroy+0x16> <== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
46b50: 4290 clrl %a0@
return 0;
46b52: 4280 clrl %d0
46b54: 6002 bras 46b58 <pthread_condattr_destroy+0x18>
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
46b56: 7016 moveq #22,%d0
attr->is_initialized = false;
return 0;
}
46b58: 4e5e unlk %fp <== NOT EXECUTED
0004cc1c <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
4cc1c: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4cc20: 2f2e 0008 movel %fp@(8),%sp@-
4cc24: 2f39 0005 f31e movel 5f31e <_Per_CPU_Information+0xe>,%sp@-
4cc2a: 4eb9 0004 cb38 jsr 4cb38 <_POSIX_Thread_Exit>
4cc30: 508f addql #8,%sp <== NOT EXECUTED
}
4cc32: 4e5e unlk %fp <== NOT EXECUTED
...
000483a0 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
483a0: 4e56 fff0 linkw %fp,#-16
483a4: 48d7 1c00 moveml %a2-%a4,%sp@
483a8: 266e 000c moveal %fp@(12),%a3
483ac: 246e 0010 moveal %fp@(16),%a2
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
483b0: 4a8b tstl %a3
483b2: 6750 beqs 48404 <pthread_getschedparam+0x64> <== NEVER TAKEN
483b4: 4a8a tstl %a2
483b6: 674c beqs 48404 <pthread_getschedparam+0x64> <== NEVER TAKEN
return EINVAL;
the_thread = _Thread_Get( thread, &location );
483b8: 486e fffc pea %fp@(-4)
483bc: 2f2e 0008 movel %fp@(8),%sp@-
483c0: 4eb9 0004 b2a0 jsr 4b2a0 <_Thread_Get>
switch ( location ) {
483c6: 508f addql #8,%sp
register Thread_Control *the_thread;
if ( !policy || !param )
return EINVAL;
the_thread = _Thread_Get( thread, &location );
483c8: 2840 moveal %d0,%a4
switch ( location ) {
483ca: 4aae fffc tstl %fp@(-4)
483ce: 6638 bnes 48408 <pthread_getschedparam+0x68> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
483d0: 206c 00fe moveal %a4@(254),%a0
if ( policy )
*policy = api->schedpolicy;
483d4: 26a8 0084 movel %a0@(132),%a3@
if ( param ) {
*param = api->schedparam;
483d8: 4878 001c pea 1c <OPER2+0x8>
483dc: 4868 0088 pea %a0@(136)
483e0: 2f0a movel %a2,%sp@-
483e2: 4eb9 0005 01e0 jsr 501e0 <memcpy>
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
483e8: 4280 clrl %d0
483ea: 1039 0006 1fdc moveb 61fdc <rtems_maximum_priority>,%d0
483f0: 90ac 0014 subl %a4@(20),%d0
483f4: 2480 movel %d0,%a2@
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
483f6: 4eb9 0004 b280 jsr 4b280 <_Thread_Enable_dispatch>
483fc: 4fef 000c lea %sp@(12),%sp
return 0;
48400: 4280 clrl %d0
48402: 6006 bras 4840a <pthread_getschedparam+0x6a>
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
return EINVAL;
48404: 7016 moveq #22,%d0
48406: 6002 bras 4840a <pthread_getschedparam+0x6a>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
48408: 7003 moveq #3,%d0
}
4840a: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4
48410: 4e5e unlk %fp <== NOT EXECUTED
0005b2cc <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
5b2cc: 4e56 fff0 linkw %fp,#-16
5b2d0: 48d7 040c moveml %d2-%d3/%a2,%sp@
5b2d4: 242e 000c movel %fp@(12),%d2
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
5b2d8: 6602 bnes 5b2dc <pthread_kill+0x10>
5b2da: 600a bras 5b2e6 <pthread_kill+0x1a>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5b2dc: 2602 movel %d2,%d3
5b2de: 5383 subql #1,%d3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
5b2e0: 701f moveq #31,%d0
5b2e2: b083 cmpl %d3,%d0
5b2e4: 6410 bccs 5b2f6 <pthread_kill+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
5b2e6: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5b2ec: 7216 moveq #22,%d1
5b2ee: 2040 moveal %d0,%a0
5b2f0: 2081 movel %d1,%a0@
5b2f2: 6000 008c braw 5b380 <pthread_kill+0xb4>
the_thread = _Thread_Get( thread, &location );
5b2f6: 486e fffc pea %fp@(-4)
5b2fa: 2f2e 0008 movel %fp@(8),%sp@-
5b2fe: 4eb9 0004 871c jsr 4871c <_Thread_Get>
switch ( location ) {
5b304: 508f addql #8,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
5b306: 2440 moveal %d0,%a2
switch ( location ) {
5b308: 4aae fffc tstl %fp@(-4)
5b30c: 6666 bnes 5b374 <pthread_kill+0xa8> <== NEVER TAKEN
5b30e: 4879 0005 d7a4 pea 5d7a4 <_POSIX_signals_Post_switch>
5b314: 4eb9 0004 6bc6 jsr 46bc6 <_API_extensions_Add_post_switch>
* If sig == 0 then just validate arguments
*/
_POSIX_signals_Add_post_switch_extension();
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5b31a: 206a 00fe moveal %a2@(254),%a0
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
5b31e: 2002 movel %d2,%d0
5b320: 2202 movel %d2,%d1
5b322: 588f addql #4,%sp
5b324: e588 lsll #2,%d0
5b326: e989 lsll #4,%d1
5b328: 9280 subl %d0,%d1
5b32a: 0681 0005 f360 addil #389984,%d1
5b330: 7001 moveq #1,%d0
5b332: 2241 moveal %d1,%a1
5b334: b091 cmpl %a1@,%d0
5b336: 660a bnes 5b342 <pthread_kill+0x76>
_Thread_Enable_dispatch();
5b338: 4eb9 0004 86fc jsr 486fc <_Thread_Enable_dispatch>
return 0;
5b33e: 4280 clrl %d0
5b340: 6040 bras 5b382 <pthread_kill+0xb6>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
5b342: 7001 moveq #1,%d0
5b344: e7a8 lsll %d3,%d0
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
5b346: 81a8 00d4 orl %d0,%a0@(212)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
5b34a: 42a7 clrl %sp@-
5b34c: 2f02 movel %d2,%sp@-
5b34e: 2f0a movel %a2,%sp@-
5b350: 4eb9 0005 b1d0 jsr 5b1d0 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5b356: 4fef 000c lea %sp@(12),%sp
5b35a: 4ab9 0005 f318 tstl 5f318 <_Per_CPU_Information+0x8>
5b360: 67d6 beqs 5b338 <pthread_kill+0x6c>
5b362: b5f9 0005 f31e cmpal 5f31e <_Per_CPU_Information+0xe>,%a2
5b368: 66ce bnes 5b338 <pthread_kill+0x6c>
_Thread_Dispatch_necessary = true;
5b36a: 7001 moveq #1,%d0
5b36c: 13c0 0005 f31c moveb %d0,5f31c <_Per_CPU_Information+0xc>
5b372: 60c4 bras 5b338 <pthread_kill+0x6c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
5b374: 4eb9 0004 cf98 jsr 4cf98 <__errno> <== NOT EXECUTED
5b37a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5b37c: 7003 moveq #3,%d0 <== NOT EXECUTED
5b37e: 2080 movel %d0,%a0@ <== NOT EXECUTED
5b380: 70ff moveq #-1,%d0
}
5b382: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
5b388: 4e5e unlk %fp <== NOT EXECUTED
00047ec4 <pthread_mutex_timedlock>:
*/
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
47ec4: 4e56 fffc linkw %fp,#-4
47ec8: 2f03 movel %d3,%sp@-
47eca: 2f02 movel %d2,%sp@-
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
47ecc: 486e fffc pea %fp@(-4)
47ed0: 2f2e 000c movel %fp@(12),%sp@-
47ed4: 4eb9 0004 7fa8 jsr 47fa8 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
47eda: 508f addql #8,%sp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
47edc: 2400 movel %d0,%d2
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
47ede: 7003 moveq #3,%d0
47ee0: b082 cmpl %d2,%d0
47ee2: 57c3 seq %d3
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
47ee4: 2f2e fffc movel %fp@(-4),%sp@-
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
47ee8: 4483 negl %d3
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
47eea: 4280 clrl %d0
47eec: 1003 moveb %d3,%d0
47eee: 2f00 movel %d0,%sp@-
47ef0: 2f2e 0008 movel %fp@(8),%sp@-
47ef4: 4eb9 0004 7dc8 jsr 47dc8 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
47efa: 4fef 000c lea %sp@(12),%sp
47efe: 4a03 tstb %d3
47f00: 661a bnes 47f1c <pthread_mutex_timedlock+0x58>
47f02: 7210 moveq #16,%d1
47f04: b280 cmpl %d0,%d1
47f06: 6614 bnes 47f1c <pthread_mutex_timedlock+0x58>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
47f08: 4a82 tstl %d2
47f0a: 670e beqs 47f1a <pthread_mutex_timedlock+0x56> <== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
47f0c: 5382 subql #1,%d2
47f0e: 123c 0001 moveb #1,%d1
47f12: b282 cmpl %d2,%d1
47f14: 6506 bcss 47f1c <pthread_mutex_timedlock+0x58> <== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
47f16: 7074 moveq #116,%d0
47f18: 6002 bras 47f1c <pthread_mutex_timedlock+0x58>
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
47f1a: 7016 moveq #22,%d0 <== NOT EXECUTED
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
47f1c: 242e fff4 movel %fp@(-12),%d2
47f20: 262e fff8 movel %fp@(-8),%d3
47f24: 4e5e unlk %fp <== NOT EXECUTED
00045d1c <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
45d1c: 4e56 0000 linkw %fp,#0
45d20: 206e 0008 moveal %fp@(8),%a0
45d24: 226e 000c moveal %fp@(12),%a1
if ( !attr )
45d28: 4a88 tstl %a0
45d2a: 6710 beqs 45d3c <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !attr->is_initialized )
45d2c: 4a90 tstl %a0@
45d2e: 670c beqs 45d3c <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !type )
45d30: 4a89 tstl %a1
45d32: 6708 beqs 45d3c <pthread_mutexattr_gettype+0x20> <== NEVER TAKEN
return EINVAL;
*type = attr->type;
45d34: 22a8 0010 movel %a0@(16),%a1@
return 0;
45d38: 4280 clrl %d0
45d3a: 6002 bras 45d3e <pthread_mutexattr_gettype+0x22>
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
return EINVAL;
45d3c: 7016 moveq #22,%d0
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
}
45d3e: 4e5e unlk %fp
...
00047b04 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
47b04: 4e56 0000 linkw %fp,#0
47b08: 206e 0008 moveal %fp@(8),%a0
47b0c: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
47b10: 4a88 tstl %a0
47b12: 6712 beqs 47b26 <pthread_mutexattr_setpshared+0x22>
47b14: 4a90 tstl %a0@
47b16: 670e beqs 47b26 <pthread_mutexattr_setpshared+0x22>
return EINVAL;
switch ( pshared ) {
47b18: 7201 moveq #1,%d1
47b1a: b280 cmpl %d0,%d1
47b1c: 6508 bcss 47b26 <pthread_mutexattr_setpshared+0x22><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
47b1e: 2140 0004 movel %d0,%a0@(4)
return 0;
47b22: 4280 clrl %d0
47b24: 6002 bras 47b28 <pthread_mutexattr_setpshared+0x24>
default:
return EINVAL;
47b26: 7016 moveq #22,%d0
}
}
47b28: 4e5e unlk %fp <== NOT EXECUTED
00045d70 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
45d70: 4e56 0000 linkw %fp,#0
45d74: 206e 0008 moveal %fp@(8),%a0
45d78: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
45d7c: 4a88 tstl %a0
45d7e: 6712 beqs 45d92 <pthread_mutexattr_settype+0x22>
45d80: 4a90 tstl %a0@
45d82: 670e beqs 45d92 <pthread_mutexattr_settype+0x22> <== NEVER TAKEN
return EINVAL;
switch ( type ) {
45d84: 7203 moveq #3,%d1
45d86: b280 cmpl %d0,%d1
45d88: 6508 bcss 45d92 <pthread_mutexattr_settype+0x22>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
45d8a: 2140 0010 movel %d0,%a0@(16)
return 0;
45d8e: 4280 clrl %d0
45d90: 6002 bras 45d94 <pthread_mutexattr_settype+0x24>
default:
return EINVAL;
45d92: 7016 moveq #22,%d0
}
}
45d94: 4e5e unlk %fp <== NOT EXECUTED
00046878 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
46878: 4e56 fff0 linkw %fp,#-16
4687c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
46880: 246e 0008 moveal %fp@(8),%a2
46884: 266e 000c moveal %fp@(12),%a3
if ( !once_control || !init_routine )
46888: 4a8a tstl %a2
4688a: 674a beqs 468d6 <pthread_once+0x5e>
4688c: 4a8b tstl %a3
4688e: 6746 beqs 468d6 <pthread_once+0x5e>
return EINVAL;
if ( !once_control->init_executed ) {
46890: 4aaa 0004 tstl %a2@(4)
46894: 6644 bnes 468da <pthread_once+0x62>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
46896: 240e movel %fp,%d2
46898: 5982 subql #4,%d2
4689a: 2f02 movel %d2,%sp@-
4689c: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
468a0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
468a4: 4eb9 0004 73cc jsr 473cc <rtems_task_mode>
if ( !once_control->init_executed ) {
468aa: 4fef 000c lea %sp@(12),%sp
468ae: 4aaa 0004 tstl %a2@(4)
468b2: 660c bnes 468c0 <pthread_once+0x48> <== NEVER TAKEN
once_control->is_initialized = true;
468b4: 7001 moveq #1,%d0
468b6: 2480 movel %d0,%a2@
once_control->init_executed = true;
468b8: 7001 moveq #1,%d0
468ba: 2540 0004 movel %d0,%a2@(4)
(*init_routine)();
468be: 4e93 jsr %a3@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
468c0: 2f02 movel %d2,%sp@-
468c2: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
468c6: 2f2e fffc movel %fp@(-4),%sp@-
468ca: 4eb9 0004 73cc jsr 473cc <rtems_task_mode>
468d0: 4fef 000c lea %sp@(12),%sp
468d4: 6004 bras 468da <pthread_once+0x62>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
468d6: 7016 moveq #22,%d0
468d8: 6002 bras 468dc <pthread_once+0x64>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
468da: 4280 clrl %d0
}
468dc: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
468e2: 4e5e unlk %fp
...
00046760 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
46760: 4e56 fff4 linkw %fp,#-12
46764: 2f0b movel %a3,%sp@-
46766: 266e 0008 moveal %fp@(8),%a3
4676a: 2f0a movel %a2,%sp@-
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
4676c: 4a8b tstl %a3
4676e: 6604 bnes 46774 <pthread_rwlock_init+0x14>
46770: 6000 008a braw 467fc <pthread_rwlock_init+0x9c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
46774: 206e 000c moveal %fp@(12),%a0
46778: 4a88 tstl %a0
4677a: 6610 bnes 4678c <pthread_rwlock_init+0x2c>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
4677c: 45ee fff8 lea %fp@(-8),%a2
46780: 2f0a movel %a2,%sp@-
46782: 4eb9 0004 6de8 jsr 46de8 <pthread_rwlockattr_init>
46788: 588f addql #4,%sp
the_attr = &default_attr;
4678a: 204a moveal %a2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
4678c: 4a90 tstl %a0@
4678e: 676c beqs 467fc <pthread_rwlock_init+0x9c> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
46790: 4aa8 0004 tstl %a0@(4)
46794: 6666 bnes 467fc <pthread_rwlock_init+0x9c> <== 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;
46796: 2039 0006 3440 movel 63440 <_Thread_Dispatch_disable_level>,%d0
++level;
4679c: 5280 addql #1,%d0
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
4679e: 42ae fff4 clrl %fp@(-12)
_Thread_Dispatch_disable_level = level;
467a2: 23c0 0006 3440 movel %d0,63440 <_Thread_Dispatch_disable_level>
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
467a8: 4879 0006 35ae pea 635ae <_POSIX_RWLock_Information>
467ae: 4eb9 0004 8ea0 jsr 48ea0 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
467b4: 588f addql #4,%sp
467b6: 2440 moveal %d0,%a2
467b8: 4a80 tstl %d0
467ba: 660a bnes 467c6 <pthread_rwlock_init+0x66>
_Thread_Enable_dispatch();
467bc: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
return EAGAIN;
467c2: 700b moveq #11,%d0
467c4: 6038 bras 467fe <pthread_rwlock_init+0x9e>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
467c6: 486e fff4 pea %fp@(-12)
467ca: 486a 0010 pea %a2@(16)
467ce: 4eb9 0004 88c0 jsr 488c0 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
467d4: 202a 0008 movel %a2@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
467d8: 2200 movel %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
467da: 2079 0006 35c6 moveal 635c6 <_POSIX_RWLock_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
467e0: 0281 0000 ffff andil #65535,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
467e6: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
467ea: 42aa 000c clrl %a2@(12)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
467ee: 2680 movel %d0,%a3@
_Thread_Enable_dispatch();
467f0: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
467f6: 508f addql #8,%sp
return 0;
467f8: 4280 clrl %d0
467fa: 6002 bras 467fe <pthread_rwlock_init+0x9e>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
467fc: 7016 moveq #22,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
467fe: 246e ffec moveal %fp@(-20),%a2
46802: 266e fff0 moveal %fp@(-16),%a3
46806: 4e5e unlk %fp
...
000470d8 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
470d8: 4e56 ffec linkw %fp,#-20
470dc: 48d7 040c moveml %d2-%d3/%a2,%sp@
470e0: 246e 0008 moveal %fp@(8),%a2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
470e4: 4a8a tstl %a2
470e6: 6604 bnes 470ec <pthread_rwlock_timedrdlock+0x14>
470e8: 6000 0086 braw 47170 <pthread_rwlock_timedrdlock+0x98>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
470ec: 486e fffc pea %fp@(-4)
470f0: 2f2e 000c movel %fp@(12),%sp@-
470f4: 4eb9 0004 cb58 jsr 4cb58 <_POSIX_Absolute_timeout_to_ticks>
470fa: 486e fff8 pea %fp@(-8)
470fe: 2400 movel %d0,%d2
47100: 2f12 movel %a2@,%sp@-
47102: 4879 0006 1ace pea 61ace <_POSIX_RWLock_Information>
47108: 4eb9 0004 99b4 jsr 499b4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
4710e: 4fef 0014 lea %sp@(20),%sp
47112: 4aae fff8 tstl %fp@(-8)
47116: 6658 bnes 47170 <pthread_rwlock_timedrdlock+0x98>
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
47118: 7203 moveq #3,%d1
4711a: b282 cmpl %d2,%d1
4711c: 57c3 seq %d3
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
4711e: 42a7 clrl %sp@-
47120: 2f2e fffc movel %fp@(-4),%sp@-
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
47124: 4483 negl %d3
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
47126: 4281 clrl %d1
47128: 1203 moveb %d3,%d1
4712a: 2040 moveal %d0,%a0
4712c: 2f01 movel %d1,%sp@-
4712e: 2f12 movel %a2@,%sp@-
47130: 4868 0010 pea %a0@(16)
47134: 4eb9 0004 8d2c jsr 48d2c <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
4713a: 4eb9 0004 a5b0 jsr 4a5b0 <_Thread_Enable_dispatch>
47140: 2079 0006 1de2 moveal 61de2 <_Per_CPU_Information+0xe>,%a0
if ( !do_wait ) {
47146: 4fef 0014 lea %sp@(20),%sp
4714a: 4a03 tstb %d3
4714c: 6614 bnes 47162 <pthread_rwlock_timedrdlock+0x8a>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
4714e: 7002 moveq #2,%d0
47150: b0a8 0034 cmpl %a0@(52),%d0
47154: 660c bnes 47162 <pthread_rwlock_timedrdlock+0x8a>
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
47156: 4a82 tstl %d2
47158: 6716 beqs 47170 <pthread_rwlock_timedrdlock+0x98><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
4715a: 5382 subql #1,%d2
4715c: 7201 moveq #1,%d1
4715e: b282 cmpl %d2,%d1
47160: 6412 bccs 47174 <pthread_rwlock_timedrdlock+0x9c><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47162: 2f28 0034 movel %a0@(52),%sp@-
47166: 4eb9 0004 7228 jsr 47228 <_POSIX_RWLock_Translate_core_RWLock_return_code>
4716c: 588f addql #4,%sp
4716e: 6006 bras 47176 <pthread_rwlock_timedrdlock+0x9e>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
47170: 7016 moveq #22,%d0
47172: 6002 bras 47176 <pthread_rwlock_timedrdlock+0x9e>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
47174: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47176: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
4717c: 4e5e unlk %fp <== NOT EXECUTED
00047180 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
47180: 4e56 ffec linkw %fp,#-20
47184: 48d7 040c moveml %d2-%d3/%a2,%sp@
47188: 246e 0008 moveal %fp@(8),%a2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4718c: 4a8a tstl %a2
4718e: 6604 bnes 47194 <pthread_rwlock_timedwrlock+0x14>
47190: 6000 0086 braw 47218 <pthread_rwlock_timedwrlock+0x98>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
47194: 486e fffc pea %fp@(-4)
47198: 2f2e 000c movel %fp@(12),%sp@-
4719c: 4eb9 0004 cb58 jsr 4cb58 <_POSIX_Absolute_timeout_to_ticks>
471a2: 486e fff8 pea %fp@(-8)
471a6: 2400 movel %d0,%d2
471a8: 2f12 movel %a2@,%sp@-
471aa: 4879 0006 1ace pea 61ace <_POSIX_RWLock_Information>
471b0: 4eb9 0004 99b4 jsr 499b4 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
471b6: 4fef 0014 lea %sp@(20),%sp
471ba: 4aae fff8 tstl %fp@(-8)
471be: 6658 bnes 47218 <pthread_rwlock_timedwrlock+0x98>
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
471c0: 7203 moveq #3,%d1
471c2: b282 cmpl %d2,%d1
471c4: 57c3 seq %d3
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
471c6: 42a7 clrl %sp@-
471c8: 2f2e fffc movel %fp@(-4),%sp@-
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
471cc: 4483 negl %d3
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
471ce: 4281 clrl %d1
471d0: 1203 moveb %d3,%d1
471d2: 2040 moveal %d0,%a0
471d4: 2f01 movel %d1,%sp@-
471d6: 2f12 movel %a2@,%sp@-
471d8: 4868 0010 pea %a0@(16)
471dc: 4eb9 0004 8dd8 jsr 48dd8 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
471e2: 4eb9 0004 a5b0 jsr 4a5b0 <_Thread_Enable_dispatch>
471e8: 2079 0006 1de2 moveal 61de2 <_Per_CPU_Information+0xe>,%a0
if ( !do_wait &&
471ee: 4fef 0014 lea %sp@(20),%sp
471f2: 4a03 tstb %d3
471f4: 6614 bnes 4720a <pthread_rwlock_timedwrlock+0x8a>
471f6: 7002 moveq #2,%d0
471f8: b0a8 0034 cmpl %a0@(52),%d0
471fc: 660c bnes 4720a <pthread_rwlock_timedwrlock+0x8a>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
471fe: 4a82 tstl %d2
47200: 6716 beqs 47218 <pthread_rwlock_timedwrlock+0x98><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
47202: 5382 subql #1,%d2
47204: 7201 moveq #1,%d1
47206: b282 cmpl %d2,%d1
47208: 6412 bccs 4721c <pthread_rwlock_timedwrlock+0x9c><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4720a: 2f28 0034 movel %a0@(52),%sp@-
4720e: 4eb9 0004 7228 jsr 47228 <_POSIX_RWLock_Translate_core_RWLock_return_code>
47214: 588f addql #4,%sp
47216: 6006 bras 4721e <pthread_rwlock_timedwrlock+0x9e>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
47218: 7016 moveq #22,%d0
4721a: 6002 bras 4721e <pthread_rwlock_timedwrlock+0x9e>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
4721c: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4721e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
47224: 4e5e unlk %fp <== NOT EXECUTED
00047934 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
47934: 4e56 0000 linkw %fp,#0
47938: 206e 0008 moveal %fp@(8),%a0
4793c: 202e 000c movel %fp@(12),%d0
if ( !attr )
47940: 4a88 tstl %a0
47942: 6712 beqs 47956 <pthread_rwlockattr_setpshared+0x22>
return EINVAL;
if ( !attr->is_initialized )
47944: 4a90 tstl %a0@
47946: 670e beqs 47956 <pthread_rwlockattr_setpshared+0x22>
return EINVAL;
switch ( pshared ) {
47948: 7201 moveq #1,%d1
4794a: b280 cmpl %d0,%d1
4794c: 6508 bcss 47956 <pthread_rwlockattr_setpshared+0x22><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
4794e: 2140 0004 movel %d0,%a0@(4)
return 0;
47952: 4280 clrl %d0
47954: 6002 bras 47958 <pthread_rwlockattr_setpshared+0x24>
default:
return EINVAL;
47956: 7016 moveq #22,%d0
}
}
47958: 4e5e unlk %fp <== NOT EXECUTED
00048778 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
48778: 4e56 ffe0 linkw %fp,#-32
4877c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
48780: 242e 000c movel %fp@(12),%d2
48784: 282e 0010 movel %fp@(16),%d4
int rc;
/*
* Check all the parameters
*/
if ( !param )
48788: 6700 00d8 beqw 48862 <pthread_setschedparam+0xea>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
4878c: 486e fff8 pea %fp@(-8)
48790: 486e fff4 pea %fp@(-12)
48794: 2f04 movel %d4,%sp@-
48796: 2f02 movel %d2,%sp@-
48798: 4eb9 0004 d9c4 jsr 4d9c4 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
4879e: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters
*/
if ( !param )
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
487a2: 2600 movel %d0,%d3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
487a4: 6600 00c2 bnew 48868 <pthread_setschedparam+0xf0>
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
487a8: 486e fffc pea %fp@(-4)
487ac: 2f2e 0008 movel %fp@(8),%sp@-
487b0: 4eb9 0004 b2a0 jsr 4b2a0 <_Thread_Get>
switch ( location ) {
487b6: 508f addql #8,%sp
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
487b8: 2640 moveal %d0,%a3
switch ( location ) {
487ba: 4aae fffc tstl %fp@(-4)
487be: 6600 00a6 bnew 48866 <pthread_setschedparam+0xee>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
487c2: 246b 00fe moveal %a3@(254),%a2
if ( api->schedpolicy == SCHED_SPORADIC )
487c6: 7004 moveq #4,%d0
487c8: b0aa 0084 cmpl %a2@(132),%d0
487cc: 660c bnes 487da <pthread_setschedparam+0x62>
(void) _Watchdog_Remove( &api->Sporadic_timer );
487ce: 486a 00a8 pea %a2@(168)
487d2: 4eb9 0004 c028 jsr 4c028 <_Watchdog_Remove>
487d8: 588f addql #4,%sp
api->schedpolicy = policy;
487da: 2542 0084 movel %d2,%a2@(132)
api->schedparam = *param;
487de: 4878 001c pea 1c <OPER2+0x8>
487e2: 2f04 movel %d4,%sp@-
487e4: 486a 0088 pea %a2@(136)
487e8: 4eb9 0005 01e0 jsr 501e0 <memcpy>
the_thread->budget_algorithm = budget_algorithm;
487ee: 276e fff4 0076 movel %fp@(-12),%a3@(118)
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
487f4: 4fef 000c lea %sp@(12),%sp
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
487f8: 276e fff8 007a movel %fp@(-8),%a3@(122)
switch ( api->schedpolicy ) {
487fe: 4a82 tstl %d2
48800: 6d58 blts 4885a <pthread_setschedparam+0xe2> <== NEVER TAKEN
48802: 7002 moveq #2,%d0
48804: b082 cmpl %d2,%d0
48806: 6c0a bges 48812 <pthread_setschedparam+0x9a>
48808: 103c 0004 moveb #4,%d0
4880c: b082 cmpl %d2,%d0
4880e: 664a bnes 4885a <pthread_setschedparam+0xe2> <== NEVER TAKEN
48810: 602a bras 4883c <pthread_setschedparam+0xc4>
48812: 4280 clrl %d0
48814: 1039 0006 1fdc moveb 61fdc <rtems_maximum_priority>,%d0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
4881a: 41f9 0006 38de lea 638de <_Thread_Ticks_per_timeslice>,%a0
48820: 90aa 0088 subl %a2@(136),%d0
48824: 2750 0072 movel %a0@,%a3@(114)
the_thread->real_priority =
48828: 2740 0018 movel %d0,%a3@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
4882c: 4878 0001 pea 1 <ADD>
48830: 2f00 movel %d0,%sp@-
48832: 2f0b movel %a3,%sp@-
48834: 4eb9 0004 ae30 jsr 4ae30 <_Thread_Change_priority>
4883a: 601a bras 48856 <pthread_setschedparam+0xde>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
4883c: 256a 0088 00a4 movel %a2@(136),%a2@(164)
_Watchdog_Remove( &api->Sporadic_timer );
48842: 486a 00a8 pea %a2@(168)
48846: 4eb9 0004 c028 jsr 4c028 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
4884c: 2f0b movel %a3,%sp@-
4884e: 42a7 clrl %sp@-
48850: 4eb9 0004 8654 jsr 48654 <_POSIX_Threads_Sporadic_budget_TSR>
break;
48856: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4885a: 4eb9 0004 b280 jsr 4b280 <_Thread_Enable_dispatch>
48860: 6006 bras 48868 <pthread_setschedparam+0xf0>
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
48862: 7616 moveq #22,%d3
48864: 6002 bras 48868 <pthread_setschedparam+0xf0>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
48866: 7603 moveq #3,%d3
}
48868: 2003 movel %d3,%d0
4886a: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3
48870: 4e5e unlk %fp <== NOT EXECUTED
000463cc <pthread_spin_unlock>:
*/
int pthread_spin_unlock(
pthread_spinlock_t *spinlock
)
{
463cc: 4e56 fffc linkw %fp,#-4
463d0: 206e 0008 moveal %fp@(8),%a0
463d4: 2f02 movel %d2,%sp@-
POSIX_Spinlock_Control *the_spinlock = NULL;
Objects_Locations location;
CORE_spinlock_Status status;
if ( !spinlock )
463d6: 4a88 tstl %a0
463d8: 673c beqs 46416 <pthread_spin_unlock+0x4a> <== NEVER TAKEN
463da: 486e fffc pea %fp@(-4)
463de: 2f10 movel %a0@,%sp@-
463e0: 4879 0005 fdfe pea 5fdfe <_POSIX_Spinlock_Information>
463e6: 4eb9 0004 82e0 jsr 482e0 <_Objects_Get>
return EINVAL;
the_spinlock = _POSIX_Spinlock_Get( spinlock, &location );
switch ( location ) {
463ec: 4fef 000c lea %sp@(12),%sp
463f0: 4aae fffc tstl %fp@(-4)
463f4: 6620 bnes 46416 <pthread_spin_unlock+0x4a> <== NEVER TAKEN
case OBJECTS_LOCAL:
status = _CORE_spinlock_Release( &the_spinlock->Spinlock );
463f6: 2040 moveal %d0,%a0
463f8: 4868 0010 pea %a0@(16)
463fc: 4eb9 0004 7878 jsr 47878 <_CORE_spinlock_Release>
46402: 2400 movel %d0,%d2
_Thread_Enable_dispatch();
46404: 4eb9 0004 8edc jsr 48edc <_Thread_Enable_dispatch>
return _POSIX_Spinlock_Translate_core_spinlock_return_code( status );
4640a: 2f02 movel %d2,%sp@-
4640c: 4eb9 0004 6358 jsr 46358 <_POSIX_Spinlock_Translate_core_spinlock_return_code>
46412: 508f addql #8,%sp
46414: 6002 bras 46418 <pthread_spin_unlock+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
46416: 7016 moveq #22,%d0
}
46418: 242e fff8 movel %fp@(-8),%d2
4641c: 4e5e unlk %fp <== NOT EXECUTED
00046618 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
46618: 4e56 0000 linkw %fp,#0
4661c: 2f02 movel %d2,%sp@-
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
4661e: 4ab9 0006 0020 tstl 60020 <_Per_CPU_Information+0x8>
46624: 6646 bnes 4666c <pthread_testcancel+0x54> <== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46626: 2079 0006 0026 moveal 60026 <_Per_CPU_Information+0xe>,%a0
*
* 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;
4662c: 2039 0005 fbe0 movel 5fbe0 <_Thread_Dispatch_disable_level>,%d0
++level;
46632: 5280 addql #1,%d0
46634: 2068 00fe moveal %a0@(254),%a0
_Thread_Dispatch_disable_level = level;
46638: 23c0 0005 fbe0 movel %d0,5fbe0 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4663e: 4aa8 00d8 tstl %a0@(216)
46642: 660a bnes 4664e <pthread_testcancel+0x36> <== NEVER TAKEN
46644: 4aa8 00e0 tstl %a0@(224)
46648: 56c2 sne %d2
4664a: 4482 negl %d2
4664c: 6002 bras 46650 <pthread_testcancel+0x38>
*/
void pthread_testcancel( void )
{
POSIX_API_Control *thread_support;
bool cancel = false;
4664e: 4202 clrb %d2 <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46650: 4eb9 0004 8f88 jsr 48f88 <_Thread_Enable_dispatch>
if ( cancel )
46656: 4a02 tstb %d2
46658: 6712 beqs 4666c <pthread_testcancel+0x54>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
4665a: 4878 ffff pea ffffffff <LESS>
4665e: 2f39 0006 0026 movel 60026 <_Per_CPU_Information+0xe>,%sp@-
46664: 4eb9 0004 b764 jsr 4b764 <_POSIX_Thread_Exit>
4666a: 508f addql #8,%sp <== NOT EXECUTED
}
4666c: 242e fffc movel %fp@(-4),%d2
46670: 4e5e unlk %fp <== NOT EXECUTED
0004a9ec <ramdisk_allocate>:
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
4a9ec: 4e56 ffec linkw %fp,#-20
4a9f0: 48d7 043c moveml %d2-%d5/%a2,%sp@
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4a9f4: 4878 0010 pea 10 <INVALID_OPERATION>
void *area_begin,
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
4a9f8: 242e 0008 movel %fp@(8),%d2
4a9fc: 282e 000c movel %fp@(12),%d4
4aa00: 262e 0010 movel %fp@(16),%d3
4aa04: 1a2e 0017 moveb %fp@(23),%d5
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4aa08: 4eb9 0004 3c84 jsr 43c84 <malloc>
if (rd == NULL) {
4aa0e: 588f addql #4,%sp
uint32_t media_block_size,
rtems_blkdev_bnum media_block_count,
bool trace
)
{
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
4aa10: 2440 moveal %d0,%a2
if (rd == NULL) {
4aa12: 4a80 tstl %d0
4aa14: 6740 beqs 4aa56 <ramdisk_allocate+0x6a> <== NEVER TAKEN
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
4aa16: 4200 clrb %d0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
4aa18: 4a82 tstl %d2
4aa1a: 6622 bnes 4aa3e <ramdisk_allocate+0x52>
area_begin = calloc(media_block_count, media_block_size);
4aa1c: 2f04 movel %d4,%sp@-
4aa1e: 2f03 movel %d3,%sp@-
4aa20: 4eb9 0004 3550 jsr 43550 <calloc>
if (area_begin == NULL) {
4aa26: 508f addql #8,%sp
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(media_block_count, media_block_size);
4aa28: 2400 movel %d0,%d2
if (area_begin == NULL) {
free(rd);
return NULL;
}
rd->malloced = true;
4aa2a: 7001 moveq #1,%d0
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(media_block_count, media_block_size);
if (area_begin == NULL) {
4aa2c: 4a82 tstl %d2
4aa2e: 660e bnes 4aa3e <ramdisk_allocate+0x52> <== ALWAYS TAKEN
free(rd);
4aa30: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return NULL;
4aa32: 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);
4aa34: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
return NULL;
4aa3a: 588f addql #4,%sp <== NOT EXECUTED
4aa3c: 6018 bras 4aa56 <ramdisk_allocate+0x6a> <== NOT EXECUTED
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = media_block_size;
4aa3e: 2484 movel %d4,%a2@
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
4aa40: 1540 000d moveb %d0,%a2@(13)
}
rd->block_size = media_block_size;
rd->block_num = media_block_count;
4aa44: 2543 0004 movel %d3,%a2@(4)
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
4aa48: 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;
4aa4a: 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;
4aa4e: 2542 0008 movel %d2,%a2@(8)
rd->trace = trace;
rd->initialized = true;
4aa52: 1540 000c moveb %d0,%a2@(12)
return rd;
}
4aa56: 200a movel %a2,%d0
4aa58: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4aa5e: 4e5e unlk %fp <== NOT EXECUTED
0004aa62 <ramdisk_free>:
void ramdisk_free(ramdisk *rd)
{
4aa62: 4e56 0000 linkw %fp,#0
4aa66: 2f0a movel %a2,%sp@-
4aa68: 246e 0008 moveal %fp@(8),%a2
if (rd != NULL) {
4aa6c: 4a8a tstl %a2
4aa6e: 6722 beqs 4aa92 <ramdisk_free+0x30> <== NEVER TAKEN
if (rd->malloced) {
4aa70: 4a2a 000d tstb %a2@(13)
4aa74: 670c beqs 4aa82 <ramdisk_free+0x20>
free(rd->area);
4aa76: 2f2a 0008 movel %a2@(8),%sp@-
4aa7a: 4eb9 0004 3810 jsr 43810 <free>
4aa80: 588f addql #4,%sp
}
free(rd);
4aa82: 2d4a 0008 movel %a2,%fp@(8)
}
}
4aa86: 246e fffc moveal %fp@(-4),%a2
4aa8a: 4e5e unlk %fp
{
if (rd != NULL) {
if (rd->malloced) {
free(rd->area);
}
free(rd);
4aa8c: 4ef9 0004 3810 jmp 43810 <free>
}
}
4aa92: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4aa96: 4e5e unlk %fp <== NOT EXECUTED
...
0004b998 <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
4b998: 4e56 ffcc linkw %fp,#-52
4b99c: 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();
4b9a0: 4eb9 0004 379c jsr 4379c <rtems_disk_io_initialize>
if (rc != RTEMS_SUCCESSFUL)
4b9a6: 4a80 tstl %d0
4b9a8: 6600 00ea bnew 4ba94 <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));
4b9ac: 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";
4b9b0: 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;
4b9b2: 47f9 0006 222c lea 6222c <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++)
4b9b8: 4284 clrl %d4
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
4b9ba: 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,
4b9c0: 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));
4b9c6: 2f39 0006 2228 movel 62228 <rtems_ramdisk_configuration_size>,%sp@-
4b9cc: 4eb9 0004 4584 jsr 44584 <calloc>
r->trace = false;
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
4b9d2: 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));
4b9d4: 2440 moveal %d0,%a2
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/ramdisk.h>
rtems_device_driver
ramdisk_initialize(
4b9d6: 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;
4b9da: 4200 clrb %d0
4b9dc: 1540 000e moveb %d0,%a2@(14)
for (i = 0; i < rtems_ramdisk_configuration_size; i++, c++, r++)
4b9e0: 6000 00a6 braw 4ba88 <ramdisk_initialize+0xf0>
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
4b9e4: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1>
4b9e8: 2604 movel %d4,%d3
4b9ea: 4879 0006 142b pea 6142b <_CPU_m68k_BFFFO_table+0x100>
4b9f0: 242e 0008 movel %fp@(8),%d2
4b9f4: 2f05 movel %d5,%sp@-
4b9f6: 4eb9 0005 24e0 jsr 524e0 <memcpy>
name [sizeof(RAMDISK_DEVICE_BASE_NAME)] += i;
r->block_size = c->block_size;
4b9fc: 2c13 movel %a3@,%d6
r->block_num = c->block_num;
if (c->location == NULL)
4b9fe: 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;
4ba02: 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;
4ba06: 1d44 ffff moveb %d4,%fp@(-1)
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
4ba0a: 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;
4ba0e: 2486 movel %d6,%a2@
r->block_num = c->block_num;
4ba10: 2547 0004 movel %d7,%a2@(4)
if (c->location == NULL)
4ba14: 4a80 tstl %d0
4ba16: 6624 bnes 4ba3c <ramdisk_initialize+0xa4> <== NEVER TAKEN
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
4ba18: 2007 movel %d7,%d0
4ba1a: 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;
4ba1e: 7201 moveq #1,%d1
4ba20: 1941 0001 moveb %d1,%a4@(1)
r->area = malloc(r->block_size * r->block_num);
4ba24: 2f00 movel %d0,%sp@-
4ba26: 4eb9 0004 4e0c jsr 44e0c <malloc>
if (r->area == NULL) /* No enough memory for this disk */
4ba2c: 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);
4ba2e: 2540 0008 movel %d0,%a2@(8)
if (r->area == NULL) /* No enough memory for this disk */
4ba32: 6602 bnes 4ba36 <ramdisk_initialize+0x9e> <== ALWAYS TAKEN
4ba34: 6042 bras 4ba78 <ramdisk_initialize+0xe0> <== NOT EXECUTED
r->initialized = false;
continue;
}
else
{
r->initialized = true;
4ba36: 18bc 0001 moveb #1,%a4@
4ba3a: 600e bras 4ba4a <ramdisk_initialize+0xb2>
}
}
else
{
r->malloced = false;
4ba3c: 4201 clrb %d1 <== NOT EXECUTED
r->initialized = true;
4ba3e: 18bc 0001 moveb #1,%a4@ <== NOT EXECUTED
r->initialized = true;
}
}
else
{
r->malloced = false;
4ba42: 1941 0001 moveb %d1,%a4@(1) <== NOT EXECUTED
r->initialized = true;
r->area = c->location;
4ba46: 2540 0008 movel %d0,%a2@(8) <== NOT EXECUTED
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
4ba4a: 2f05 movel %d5,%sp@-
4ba4c: 2f0a movel %a2,%sp@-
4ba4e: 4879 0004 baa0 pea 4baa0 <ramdisk_ioctl>
4ba54: 2f07 movel %d7,%sp@-
4ba56: 2f06 movel %d6,%sp@-
4ba58: 2f03 movel %d3,%sp@-
4ba5a: 2f02 movel %d2,%sp@-
4ba5c: 4e95 jsr %a5@
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
4ba5e: 4fef 001c lea %sp@(28),%sp
4ba62: 4a80 tstl %d0
4ba64: 6714 beqs 4ba7a <ramdisk_initialize+0xe2> <== ALWAYS TAKEN
{
if (r->malloced)
4ba66: 4a2c 0001 tstb %a4@(1) <== NOT EXECUTED
4ba6a: 670c beqs 4ba78 <ramdisk_initialize+0xe0> <== NOT EXECUTED
{
free(r->area);
4ba6c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ba70: 4eb9 0004 4844 jsr 44844 <free> <== NOT EXECUTED
4ba76: 588f addql #4,%sp <== NOT EXECUTED
}
r->initialized = false;
4ba78: 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++)
4ba7a: 5284 addql #1,%d4
4ba7c: 47eb 000c lea %a3@(12),%a3
4ba80: 45ea 0010 lea %a2@(16),%a2
4ba84: 49ec 0010 lea %a4@(16),%a4
4ba88: b8b9 0006 2228 cmpl 62228 <rtems_ramdisk_configuration_size>,%d4
4ba8e: 6500 ff54 bcsw 4b9e4 <ramdisk_initialize+0x4c>
free(r->area);
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
4ba92: 4280 clrl %d0
}
4ba94: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4ba9a: 4e5e unlk %fp
...
0004aa9c <ramdisk_register>:
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4aa9c: 4e56 ffe8 linkw %fp,#-24
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
4aaa0: 204e moveal %fp,%a0
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4aaa2: 48d7 007c moveml %d2-%d6,%sp@
4aaa6: 2a2e 0008 movel %fp@(8),%d5
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
4aaaa: 42a0 clrl %a0@-
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4aaac: 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);
4aab0: 2f08 movel %a0,%sp@-
4aab2: 4879 0006 01d0 pea 601d0 <ramdisk_ops>
rtems_blkdev_bnum media_block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
4aab8: 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);
4aabc: 42a7 clrl %sp@-
4aabe: 4eb9 0004 7b60 jsr 47b60 <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
4aac4: 4fef 000c lea %sp@(12),%sp
4aac8: 4a80 tstl %d0
4aaca: 6676 bnes 4ab42 <ramdisk_register+0xa6> <== NEVER TAKEN
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, media_block_size, media_block_count, trace);
4aacc: 0282 0000 00ff andil #255,%d2
4aad2: 2f02 movel %d2,%sp@-
4aad4: 2f06 movel %d6,%sp@-
4aad6: 2f05 movel %d5,%sp@-
4aad8: 42a7 clrl %sp@-
4aada: 4eb9 0004 a9ec jsr 4a9ec <ramdisk_allocate>
if (rd == NULL) {
4aae0: 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);
4aae4: 2800 movel %d0,%d4
if (rd == NULL) {
4aae6: 660e bnes 4aaf6 <ramdisk_register+0x5a> <== ALWAYS TAKEN
rtems_io_unregister_driver(major);
4aae8: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4aaec: 4eb9 0004 7c98 jsr 47c98 <rtems_io_unregister_driver> <== NOT EXECUTED
4aaf2: 588f addql #4,%sp <== NOT EXECUTED
4aaf4: 604c bras 4ab42 <ramdisk_register+0xa6> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
4aaf6: 2f2e 0014 movel %fp@(20),%sp@-
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
return temp.device;
4aafa: 4283 clrl %d3
4aafc: 242e fffc movel %fp@(-4),%d2
4ab00: 2f00 movel %d0,%sp@-
4ab02: 4879 0004 a8ec pea 4a8ec <ramdisk_ioctl>
4ab08: 2f06 movel %d6,%sp@-
4ab0a: 2f05 movel %d5,%sp@-
4ab0c: 2f03 movel %d3,%sp@-
4ab0e: 2f02 movel %d2,%sp@-
4ab10: 4eb9 0004 2b7c jsr 42b7c <rtems_disk_create_phys>
media_block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
4ab16: 4fef 001c lea %sp@(28),%sp
4ab1a: 4a80 tstl %d0
4ab1c: 6716 beqs 4ab34 <ramdisk_register+0x98> <== ALWAYS TAKEN
ramdisk_free(rd);
4ab1e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4ab20: 4eb9 0004 aa62 jsr 4aa62 <ramdisk_free> <== NOT EXECUTED
rtems_io_unregister_driver(major);
4ab26: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4ab2a: 4eb9 0004 7c98 jsr 47c98 <rtems_io_unregister_driver> <== NOT EXECUTED
4ab30: 508f addql #8,%sp <== NOT EXECUTED
4ab32: 600e bras 4ab42 <ramdisk_register+0xa6> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
4ab34: 206e 0018 moveal %fp@(24),%a0
return RTEMS_SUCCESSFUL;
4ab38: 4280 clrl %d0
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
4ab3a: 2082 movel %d2,%a0@
4ab3c: 2143 0004 movel %d3,%a0@(4)
4ab40: 6002 bras 4ab44 <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;
4ab42: 700d moveq #13,%d0 <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
4ab44: 4cee 007c ffe8 moveml %fp@(-24),%d2-%d6
4ab4a: 4e5e unlk %fp
...
0005acec <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5acec: 4e56 0000 linkw %fp,#0
5acf0: 202e 0008 movel %fp@(8),%d0
5acf4: 2f0a movel %a2,%sp@-
5acf6: 222e 000c movel %fp@(12),%d1
5acfa: 226e 0010 moveal %fp@(16),%a1
5acfe: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5ad00: b0b9 0005 d6a0 cmpl 5d6a0 <rtems_libio_number_iops>,%d0
5ad06: 6502 bcss 5ad0a <read+0x1e>
5ad08: 6038 bras 5ad42 <read+0x56>
iop = rtems_libio_iop( fd );
5ad0a: 2400 movel %d0,%d2
5ad0c: ed88 lsll #6,%d0
5ad0e: e98a lsll #4,%d2
5ad10: 2079 0005 edc0 moveal 5edc0 <rtems_libio_iops>,%a0
5ad16: 9082 subl %d2,%d0
5ad18: d1c0 addal %d0,%a0
rtems_libio_check_is_open( iop );
5ad1a: 2028 000c movel %a0@(12),%d0
5ad1e: 0800 0008 btst #8,%d0
5ad22: 6602 bnes 5ad26 <read+0x3a>
5ad24: 601c bras 5ad42 <read+0x56>
rtems_libio_check_buffer( buffer );
5ad26: 4a81 tstl %d1
5ad28: 660e bnes 5ad38 <read+0x4c> <== ALWAYS TAKEN
5ad2a: 4eb9 0004 cf98 jsr 4cf98 <__errno> <== NOT EXECUTED
5ad30: 7216 moveq #22,%d1 <== NOT EXECUTED
5ad32: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ad34: 2081 movel %d1,%a0@ <== NOT EXECUTED
5ad36: 6016 bras 5ad4e <read+0x62> <== NOT EXECUTED
rtems_libio_check_count( count );
5ad38: 4a89 tstl %a1
5ad3a: 6736 beqs 5ad72 <read+0x86>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
5ad3c: 0800 0001 btst #1,%d0
5ad40: 6610 bnes 5ad52 <read+0x66>
5ad42: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5ad48: 2040 moveal %d0,%a0
5ad4a: 7009 moveq #9,%d0
5ad4c: 2080 movel %d0,%a0@
5ad4e: 70ff moveq #-1,%d0
5ad50: 6022 bras 5ad74 <read+0x88>
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5ad52: 2468 0020 moveal %a0@(32),%a2
5ad56: 2d49 0010 movel %a1,%fp@(16)
}
5ad5a: 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 );
5ad5e: 2d41 000c movel %d1,%fp@(12)
5ad62: 2d48 0008 movel %a0,%fp@(8)
5ad66: 226a 0008 moveal %a2@(8),%a1
}
5ad6a: 246e fffc moveal %fp@(-4),%a2
5ad6e: 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 );
5ad70: 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 );
5ad72: 4280 clrl %d0
/*
* Now process the read().
*/
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
5ad74: 242e fff8 movel %fp@(-8),%d2
5ad78: 246e fffc moveal %fp@(-4),%a2
5ad7c: 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 dec0 cmpl 5dec0 <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 f5e0 moveal 5f5e0 <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 da5c jsr 4da5c <__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 da5c jsr 4da5c <__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
0005ae04 <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5ae04: 7003 moveq #3,%d0
void *realloc(
void *ptr,
size_t size
)
{
5ae06: 4e56 fff0 linkw %fp,#-16
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
5ae0a: 52b9 0005 eddc addql #1,5eddc <rtems_malloc_statistics+0x10>
void *realloc(
void *ptr,
size_t size
)
{
5ae10: 48d7 001c moveml %d2-%d4,%sp@
5ae14: 242e 0008 movel %fp@(8),%d2
5ae18: 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())) {
5ae1c: b0b9 0005 f30a cmpl 5f30a <_System_state_Current>,%d0
5ae22: 660c bnes 5ae30 <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 )
5ae24: 2039 0005 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0
5ae2a: 6700 00a6 beqw 5aed2 <realloc+0xce>
5ae2e: 604c bras 5ae7c <realloc+0x78> <== NOT EXECUTED
}
/*
* Continue with realloc().
*/
if ( !ptr )
5ae30: 4a82 tstl %d2
5ae32: 6612 bnes 5ae46 <realloc+0x42>
return malloc( size );
5ae34: 2d43 0008 movel %d3,%fp@(8)
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5ae38: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5ae3e: 4e5e unlk %fp
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5ae40: 4ef9 0004 2d30 jmp 42d30 <malloc>
if ( !size ) {
5ae46: 4a83 tstl %d3
5ae48: 660c bnes 5ae56 <realloc+0x52> <== ALWAYS TAKEN
free( ptr );
5ae4a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ae4c: 4eb9 0004 2a60 jsr 42a60 <free> <== NOT EXECUTED
5ae52: 588f addql #4,%sp <== NOT EXECUTED
5ae54: 6026 bras 5ae7c <realloc+0x78> <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5ae56: 486e fffc pea %fp@(-4)
5ae5a: 2f02 movel %d2,%sp@-
5ae5c: 2f39 0005 d65c movel 5d65c <RTEMS_Malloc_Heap>,%sp@-
5ae62: 4eb9 0005 b3a0 jsr 5b3a0 <_Protected_heap_Get_block_size>
5ae68: 4fef 000c lea %sp@(12),%sp
5ae6c: 4a00 tstb %d0
5ae6e: 6610 bnes 5ae80 <realloc+0x7c>
errno = EINVAL;
5ae70: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5ae76: 2040 moveal %d0,%a0
5ae78: 7016 moveq #22,%d0
5ae7a: 2080 movel %d0,%a0@
return (void *) 0;
5ae7c: 4282 clrl %d2
5ae7e: 605e bras 5aede <realloc+0xda>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
5ae80: 2f03 movel %d3,%sp@-
5ae82: 2f02 movel %d2,%sp@-
5ae84: 2f39 0005 d65c movel 5d65c <RTEMS_Malloc_Heap>,%sp@-
5ae8a: 4eb9 0005 b3dc jsr 5b3dc <_Protected_heap_Resize_block>
5ae90: 4fef 000c lea %sp@(12),%sp
5ae94: 4a00 tstb %d0
5ae96: 6646 bnes 5aede <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 );
5ae98: 2f03 movel %d3,%sp@-
5ae9a: 4eb9 0004 2d30 jsr 42d30 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5aea0: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5aea2: 53b9 0005 edd0 subql #1,5edd0 <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 );
5aea8: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5aeaa: 67d0 beqs 5ae7c <realloc+0x78>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5aeac: 202e fffc movel %fp@(-4),%d0
5aeb0: b083 cmpl %d3,%d0
5aeb2: 6402 bccs 5aeb6 <realloc+0xb2> <== NEVER TAKEN
5aeb4: 2600 movel %d0,%d3
5aeb6: 2f03 movel %d3,%sp@-
5aeb8: 2f02 movel %d2,%sp@-
5aeba: 2f04 movel %d4,%sp@-
5aebc: 4eb9 0004 d7b8 jsr 4d7b8 <memcpy>
free( ptr );
5aec2: 2f02 movel %d2,%sp@-
5aec4: 2404 movel %d4,%d2
5aec6: 4eb9 0004 2a60 jsr 42a60 <free>
5aecc: 4fef 0010 lea %sp@(16),%sp
5aed0: 600c bras 5aede <realloc+0xda>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_in_critical_section())
return (void *) 0;
if (_ISR_Nest_level > 0)
5aed2: 4ab9 0005 f318 tstl 5f318 <_Per_CPU_Information+0x8>
5aed8: 6700 ff56 beqw 5ae30 <realloc+0x2c>
5aedc: 609e bras 5ae7c <realloc+0x78> <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5aede: 2002 movel %d2,%d0
5aee0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
5aee6: 4e5e unlk %fp
...
00046a84 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
46a84: 4e56 ffc8 linkw %fp,#-56
46a88: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
46a8c: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46a92: 49f9 0004 740c lea 4740c <pthread_mutex_lock>,%a4
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
46a98: 246e 0008 moveal %fp@(8),%a2
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
46a9c: 4e94 jsr %a4@
if (result != 0) {
46a9e: 588f addql #4,%sp
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
46aa0: 2400 movel %d0,%d2
if (result != 0) {
46aa2: 670c beqs 46ab0 <rtems_aio_enqueue+0x2c> <== ALWAYS TAKEN
free (req);
46aa4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
46aa6: 4eb9 0004 2e98 jsr 42e98 <free> <== NOT EXECUTED
46aac: 6000 01c6 braw 46c74 <rtems_aio_enqueue+0x1f0> <== NOT EXECUTED
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
46ab0: 47f9 0004 7c20 lea 47c20 <pthread_self>,%a3
46ab6: 4e93 jsr %a3@
46ab8: 486e ffe4 pea %fp@(-28)
46abc: 486e ffe0 pea %fp@(-32)
46ac0: 2f00 movel %d0,%sp@-
46ac2: 4eb9 0004 785c jsr 4785c <pthread_getschedparam>
req->caller_thread = pthread_self ();
46ac8: 4e93 jsr %a3@
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
46aca: 206a 0014 moveal %a2@(20),%a0
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
46ace: 7277 moveq #119,%d1
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
46ad0: 4fef 000c lea %sp@(12),%sp
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
46ad4: 2540 0010 movel %d0,%a2@(16)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
46ad8: 202e ffe4 movel %fp@(-28),%d0
46adc: 90a8 0014 subl %a0@(20),%d0
req->policy = policy;
46ae0: 256e ffe0 0008 movel %fp@(-32),%a2@(8)
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
46ae6: 2540 000c movel %d0,%a2@(12)
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
46aea: 2141 0030 movel %d1,%a0@(48)
req->aiocbp->return_value = 0;
46aee: 42a8 0034 clrl %a0@(52)
if ((aio_request_queue.idle_threads == 0) &&
46af2: 4ab9 0006 0fd4 tstl 60fd4 <aio_request_queue+0x68>
46af8: 6600 00b6 bnew 46bb0 <rtems_aio_enqueue+0x12c>
46afc: 7004 moveq #4,%d0
46afe: b0b9 0006 0fd0 cmpl 60fd0 <aio_request_queue+0x64>,%d0
46b04: 6d00 00aa bltw 46bb0 <rtems_aio_enqueue+0x12c>
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
46b08: 4878 0001 pea 1 <ADD>
46b0c: 2f10 movel %a0@,%sp@-
46b0e: 4879 0006 0fb4 pea 60fb4 <aio_request_queue+0x48>
46b14: 4eb9 0004 693e jsr 4693e <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
46b1a: 4fef 000c lea %sp@(12),%sp
46b1e: 7201 moveq #1,%d1
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
46b20: 2640 moveal %d0,%a3
if (r_chain->new_fd == 1) {
46b22: b2ab 0018 cmpl %a3@(24),%d1
46b26: 6664 bnes 46b8c <rtems_aio_enqueue+0x108>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
46b28: 2f0a movel %a2,%sp@-
46b2a: 486b 0008 pea %a3@(8)
46b2e: 4eb9 0004 8d74 jsr 48d74 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
46b34: 42ab 0018 clrl %a3@(24)
pthread_mutex_init (&r_chain->mutex, NULL);
46b38: 42a7 clrl %sp@-
46b3a: 486b 001c pea %a3@(28)
46b3e: 4eb9 0004 72f0 jsr 472f0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
46b44: 42a7 clrl %sp@-
46b46: 486b 0020 pea %a3@(32)
46b4a: 4eb9 0004 6f84 jsr 46f84 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
46b50: 2f0b movel %a3,%sp@-
46b52: 487a fa4c pea %pc@(465a0 <rtems_aio_handle>)
46b56: 4879 0006 0f74 pea 60f74 <aio_request_queue+0x8>
46b5c: 486e ffdc pea %fp@(-36)
46b60: 4eb9 0004 7654 jsr 47654 <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
46b66: 4fef 0028 lea %sp@(40),%sp
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
46b6a: 2600 movel %d0,%d3
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
46b6c: 6714 beqs 46b82 <rtems_aio_enqueue+0xfe> <== ALWAYS TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
46b6e: 4879 0006 0f6c pea 60f6c <aio_request_queue> <== NOT EXECUTED
46b74: 2403 movel %d3,%d2 <== NOT EXECUTED
46b76: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock> <== NOT EXECUTED
46b7c: 588f addql #4,%sp <== NOT EXECUTED
46b7e: 6000 00f6 braw 46c76 <rtems_aio_enqueue+0x1f2> <== NOT EXECUTED
return result;
}
++aio_request_queue.active_threads;
46b82: 52b9 0006 0fd0 addql #1,60fd0 <aio_request_queue+0x64>
46b88: 6000 00de braw 46c68 <rtems_aio_enqueue+0x1e4>
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
46b8c: 2600 movel %d0,%d3
46b8e: 0683 0000 001c addil #28,%d3
46b94: 2f03 movel %d3,%sp@-
46b96: 4e94 jsr %a4@
rtems_aio_insert_prio (&r_chain->perfd, req);
46b98: 2f0a movel %a2,%sp@-
46b9a: 486b 0008 pea %a3@(8)
46b9e: 4eba fc5e jsr %pc@(467fe <rtems_aio_insert_prio>)
pthread_cond_signal (&r_chain->cond);
46ba2: 486b 0020 pea %a3@(32)
46ba6: 4eb9 0004 7030 jsr 47030 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
46bac: 2f03 movel %d3,%sp@-
46bae: 603e bras 46bee <rtems_aio_enqueue+0x16a>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
46bb0: 42a7 clrl %sp@-
46bb2: 2f10 movel %a0@,%sp@-
46bb4: 49f9 0004 693e lea 4693e <rtems_aio_search_fd>,%a4
46bba: 4879 0006 0fb4 pea 60fb4 <aio_request_queue+0x48>
46bc0: 4e94 jsr %a4@
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
46bc2: 4fef 000c lea %sp@(12),%sp
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
46bc6: 2640 moveal %d0,%a3
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
46bc8: 4a80 tstl %d0
46bca: 672e beqs 46bfa <rtems_aio_enqueue+0x176>
{
pthread_mutex_lock (&r_chain->mutex);
46bcc: 49eb 001c lea %a3@(28),%a4
46bd0: 2f0c movel %a4,%sp@-
46bd2: 4eb9 0004 740c jsr 4740c <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
46bd8: 2f0a movel %a2,%sp@-
46bda: 486b 0008 pea %a3@(8)
46bde: 4eba fc1e jsr %pc@(467fe <rtems_aio_insert_prio>)
pthread_cond_signal (&r_chain->cond);
46be2: 486b 0020 pea %a3@(32)
46be6: 4eb9 0004 7030 jsr 47030 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
46bec: 2f0c movel %a4,%sp@-
46bee: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
46bf4: 4fef 0014 lea %sp@(20),%sp
46bf8: 606e bras 46c68 <rtems_aio_enqueue+0x1e4>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
46bfa: 4878 0001 pea 1 <ADD>
46bfe: 206a 0014 moveal %a2@(20),%a0
46c02: 2f10 movel %a0@,%sp@-
46c04: 4879 0006 0fc0 pea 60fc0 <aio_request_queue+0x54>
46c0a: 4e94 jsr %a4@
if (r_chain->new_fd == 1) {
46c0c: 4fef 000c lea %sp@(12),%sp
46c10: 7201 moveq #1,%d1
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
46c12: 2640 moveal %d0,%a3
46c14: 5080 addql #8,%d0
if (r_chain->new_fd == 1) {
46c16: b2ab 0018 cmpl %a3@(24),%d1
46c1a: 662c bnes 46c48 <rtems_aio_enqueue+0x1c4>
46c1c: 2f0a movel %a2,%sp@-
46c1e: 2f00 movel %d0,%sp@-
46c20: 4eb9 0004 8d74 jsr 48d74 <_Chain_Insert>
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
46c26: 42ab 0018 clrl %a3@(24)
pthread_mutex_init (&r_chain->mutex, NULL);
46c2a: 42a7 clrl %sp@-
46c2c: 486b 001c pea %a3@(28)
46c30: 4eb9 0004 72f0 jsr 472f0 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
46c36: 42a7 clrl %sp@-
46c38: 486b 0020 pea %a3@(32)
46c3c: 4eb9 0004 6f84 jsr 46f84 <pthread_cond_init>
46c42: 4fef 0018 lea %sp@(24),%sp
46c46: 600a bras 46c52 <rtems_aio_enqueue+0x1ce>
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
46c48: 2f0a movel %a2,%sp@-
46c4a: 2f00 movel %d0,%sp@-
46c4c: 4eba fbb0 jsr %pc@(467fe <rtems_aio_insert_prio>)
46c50: 508f addql #8,%sp
if (aio_request_queue.idle_threads > 0)
46c52: 4ab9 0006 0fd4 tstl 60fd4 <aio_request_queue+0x68>
46c58: 6f0e bles 46c68 <rtems_aio_enqueue+0x1e4> <== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
46c5a: 4879 0006 0f70 pea 60f70 <aio_request_queue+0x4> <== NOT EXECUTED
46c60: 4eb9 0004 7030 jsr 47030 <pthread_cond_signal> <== NOT EXECUTED
46c66: 588f addql #4,%sp <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
46c68: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46c6e: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
46c74: 588f addql #4,%sp
return 0;
}
46c76: 2002 movel %d2,%d0
46c78: 4cee 1c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a4
46c7e: 4e5e unlk %fp
...
000465a0 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
465a0: 4e56 ffac linkw %fp,#-84
465a4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
465a8: 240e movel %fp,%d2
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
465aa: 280e movel %fp,%d4
465ac: 2a0e movel %fp,%d5
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
465ae: 4bf9 0004 740c lea 4740c <pthread_mutex_lock>,%a5
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
465b4: 49f9 0004 74a4 lea 474a4 <pthread_mutex_unlock>,%a4
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
465ba: 0682 ffff ffdc addil #-36,%d2
465c0: 263c 0004 6e0c movel #290316,%d3
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
465c6: 0684 ffff ffe4 addil #-28,%d4
465cc: 0685 ffff ffd8 addil #-40,%d5
static void *
rtems_aio_handle (void *arg)
{
rtems_aio_request_chain *r_chain = arg;
465d2: 246e 0008 moveal %fp@(8),%a2
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
465d6: 2c0a movel %a2,%d6
465d8: 0686 0000 001c addil #28,%d6
465de: 2f06 movel %d6,%sp@-
465e0: 4e95 jsr %a5@
if (result != 0)
465e2: 588f addql #4,%sp
465e4: 4a80 tstl %d0
465e6: 6600 020a bnew 467f2 <rtems_aio_handle+0x252>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
465ea: 200a movel %a2,%d0
465ec: 0680 0000 000c addil #12,%d0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
465f2: 266a 0008 moveal %a2@(8),%a3
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
465f6: b08b cmpl %a3,%d0
465f8: 6700 00d6 beqw 466d0 <rtems_aio_handle+0x130>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
465fc: 41f9 0004 7c20 lea 47c20 <pthread_self>,%a0
46602: 2d48 ffd4 movel %a0,%fp@(-44)
46606: 4e90 jsr %a0@
46608: 2f04 movel %d4,%sp@-
4660a: 2f05 movel %d5,%sp@-
4660c: 2f00 movel %d0,%sp@-
4660e: 4eb9 0004 785c jsr 4785c <pthread_getschedparam>
param.sched_priority = req->priority;
46614: 2d6b 000c ffe4 movel %a3@(12),%fp@(-28)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
4661a: 206e ffd4 moveal %fp@(-44),%a0
4661e: 2e2b 0008 movel %a3@(8),%d7
46622: 4e90 jsr %a0@
46624: 2f04 movel %d4,%sp@-
46626: 2f07 movel %d7,%sp@-
46628: 2f00 movel %d0,%sp@-
4662a: 4eb9 0004 7c34 jsr 47c34 <pthread_setschedparam>
46630: 2f0b movel %a3,%sp@-
46632: 4eb9 0004 8d18 jsr 48d18 <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
46638: 2f06 movel %d6,%sp@-
4663a: 4e94 jsr %a4@
switch (req->aiocbp->aio_lio_opcode) {
4663c: 206b 0014 moveal %a3@(20),%a0
46640: 4fef 0020 lea %sp@(32),%sp
46644: 7202 moveq #2,%d1
46646: 2028 002c movel %a0@(44),%d0
4664a: b280 cmpl %d0,%d1
4664c: 672a beqs 46678 <rtems_aio_handle+0xd8>
4664e: 123c 0003 moveb #3,%d1
46652: b280 cmpl %d0,%d1
46654: 6740 beqs 46696 <rtems_aio_handle+0xf6> <== NEVER TAKEN
46656: 123c 0001 moveb #1,%d1
4665a: b280 cmpl %d0,%d1
4665c: 6648 bnes 466a6 <rtems_aio_handle+0x106> <== NEVER TAKEN
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
4665e: 2f28 0008 movel %a0@(8),%sp@-
46662: 2f28 0004 movel %a0@(4),%sp@-
46666: 2f28 0010 movel %a0@(16),%sp@-
4666a: 2f28 000c movel %a0@(12),%sp@-
4666e: 2f10 movel %a0@,%sp@-
46670: 4eb9 0004 f9f4 jsr 4f9f4 <pread>
46676: 6018 bras 46690 <rtems_aio_handle+0xf0>
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
46678: 2f28 0008 movel %a0@(8),%sp@-
4667c: 2f28 0004 movel %a0@(4),%sp@-
46680: 2f28 0010 movel %a0@(16),%sp@-
46684: 2f28 000c movel %a0@(12),%sp@-
46688: 2f10 movel %a0@,%sp@-
4668a: 4eb9 0004 fab8 jsr 4fab8 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
46690: 4fef 0014 lea %sp@(20),%sp
46694: 600a bras 466a0 <rtems_aio_handle+0x100>
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
46696: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
46698: 4eb9 0004 c4c0 jsr 4c4c0 <fsync> <== NOT EXECUTED
break;
4669e: 588f addql #4,%sp <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
466a0: 72ff moveq #-1,%d1
466a2: b280 cmpl %d0,%d1
466a4: 661a bnes 466c0 <rtems_aio_handle+0x120> <== ALWAYS TAKEN
req->aiocbp->return_value = -1;
466a6: 266b 0014 moveal %a3@(20),%a3 <== NOT EXECUTED
466aa: 70ff moveq #-1,%d0 <== NOT EXECUTED
466ac: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED
req->aiocbp->error_code = errno;
466b0: 4eb9 0004 f05c jsr 4f05c <__errno> <== NOT EXECUTED
466b6: 2040 moveal %d0,%a0 <== NOT EXECUTED
466b8: 2750 0030 movel %a0@,%a3@(48) <== NOT EXECUTED
466bc: 6000 ff18 braw 465d6 <rtems_aio_handle+0x36> <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
466c0: 206b 0014 moveal %a3@(20),%a0
466c4: 2140 0034 movel %d0,%a0@(52)
req->aiocbp->error_code = 0;
466c8: 42a8 0030 clrl %a0@(48)
466cc: 6000 ff08 braw 465d6 <rtems_aio_handle+0x36>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
466d0: 2f06 movel %d6,%sp@-
466d2: 4e94 jsr %a4@
pthread_mutex_lock (&aio_request_queue.mutex);
466d4: 4879 0006 0f6c pea 60f6c <aio_request_queue>
466da: 4e95 jsr %a5@
if (rtems_chain_is_empty (chain))
466dc: 508f addql #8,%sp
466de: b7ea 0008 cmpal %a2@(8),%a3
466e2: 6600 0100 bnew 467e4 <rtems_aio_handle+0x244>
{
clock_gettime (CLOCK_REALTIME, &timeout);
466e6: 2f02 movel %d2,%sp@-
466e8: 4878 0001 pea 1 <ADD>
466ec: 2043 moveal %d3,%a0
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
466ee: 2e0a movel %a2,%d7
466f0: 0687 0000 0020 addil #32,%d7
466f6: 47f9 0004 70a4 lea 470a4 <pthread_cond_timedwait>,%a3
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
466fc: 4e90 jsr %a0@
timeout.tv_sec += 3;
466fe: 56ae ffdc addql #3,%fp@(-36)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
46702: 2f02 movel %d2,%sp@-
46704: 4879 0006 0f6c pea 60f6c <aio_request_queue>
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
4670a: 42ae ffe0 clrl %fp@(-32)
result = pthread_cond_timedwait (&r_chain->cond,
4670e: 2f07 movel %d7,%sp@-
46710: 4e93 jsr %a3@
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
46712: 4fef 0014 lea %sp@(20),%sp
46716: 7274 moveq #116,%d1
46718: b280 cmpl %d0,%d1
4671a: 6600 00c8 bnew 467e4 <rtems_aio_handle+0x244>
4671e: 2f0a movel %a2,%sp@-
46720: 4eb9 0004 8d18 jsr 48d18 <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
46726: 2f06 movel %d6,%sp@-
46728: 4eb9 0004 71d0 jsr 471d0 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
4672e: 2f07 movel %d7,%sp@-
46730: 4eb9 0004 6ec4 jsr 46ec4 <pthread_cond_destroy>
free (r_chain);
46736: 2f0a movel %a2,%sp@-
46738: 4eb9 0004 2e98 jsr 42e98 <free>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
4673e: 4fef 0010 lea %sp@(16),%sp
46742: 41f9 0006 0fc4 lea 60fc4 <aio_request_queue+0x58>,%a0
46748: b1f9 0006 0fc0 cmpal 60fc0 <aio_request_queue+0x54>,%a0
4674e: 664e bnes 4679e <rtems_aio_handle+0x1fe>
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
46750: 2f02 movel %d2,%sp@-
46752: 4878 0001 pea 1 <ADD>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
46756: 52b9 0006 0fd4 addql #1,60fd4 <aio_request_queue+0x68>
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
4675c: 2043 moveal %d3,%a0
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
4675e: 53b9 0006 0fd0 subql #1,60fd0 <aio_request_queue+0x64>
clock_gettime (CLOCK_REALTIME, &timeout);
46764: 4e90 jsr %a0@
timeout.tv_sec += 3;
46766: 56ae ffdc addql #3,%fp@(-36)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
4676a: 2f02 movel %d2,%sp@-
4676c: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46772: 4879 0006 0f70 pea 60f70 <aio_request_queue+0x4>
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
46778: 42ae ffe0 clrl %fp@(-32)
result = pthread_cond_timedwait (&aio_request_queue.new_req,
4677c: 4e93 jsr %a3@
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
4677e: 4fef 0014 lea %sp@(20),%sp
46782: 7274 moveq #116,%d1
46784: b280 cmpl %d0,%d1
46786: 6616 bnes 4679e <rtems_aio_handle+0x1fe> <== NEVER TAKEN
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
pthread_mutex_unlock (&aio_request_queue.mutex);
46788: 4879 0006 0f6c pea 60f6c <aio_request_queue>
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
4678e: 53b9 0006 0fd4 subql #1,60fd4 <aio_request_queue+0x68>
pthread_mutex_unlock (&aio_request_queue.mutex);
46794: 4eb9 0004 74a4 jsr 474a4 <pthread_mutex_unlock>
4679a: 588f addql #4,%sp
4679c: 6054 bras 467f2 <rtems_aio_handle+0x252>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4679e: 2479 0006 0fc0 moveal 60fc0 <aio_request_queue+0x54>,%a2
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
467a4: 53b9 0006 0fd4 subql #1,60fd4 <aio_request_queue+0x68>
++aio_request_queue.active_threads;
467aa: 52b9 0006 0fd0 addql #1,60fd0 <aio_request_queue+0x64>
467b0: 2f0a movel %a2,%sp@-
467b2: 4eb9 0004 8d18 jsr 48d18 <_Chain_Extract>
467b8: 2079 0006 0fb4 moveal 60fb4 <aio_request_queue+0x48>,%a0
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
467be: 588f addql #4,%sp
467c0: 202a 0014 movel %a2@(20),%d0
467c4: 6002 bras 467c8 <rtems_aio_handle+0x228>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
467c6: 2050 moveal %a0@,%a0
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
467c8: b0a8 0014 cmpl %a0@(20),%d0
467cc: 6f08 bles 467d6 <rtems_aio_handle+0x236>
467ce: b1fc 0006 0fb8 cmpal #397240,%a0
467d4: 66f0 bnes 467c6 <rtems_aio_handle+0x226> <== ALWAYS TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
467d6: 2f0a movel %a2,%sp@-
467d8: 2f28 0004 movel %a0@(4),%sp@-
467dc: 4eb9 0004 8d74 jsr 48d74 <_Chain_Insert>
467e2: 508f addql #8,%sp
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
467e4: 4879 0006 0f6c pea 60f6c <aio_request_queue>
467ea: 4e94 jsr %a4@
467ec: 588f addql #4,%sp
467ee: 6000 fde6 braw 465d6 <rtems_aio_handle+0x36>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
467f2: 4280 clrl %d0
467f4: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5
467fa: 4e5e unlk %fp <== NOT EXECUTED
00046854 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
46854: 4e56 0000 linkw %fp,#0
46858: 2f02 movel %d2,%sp@-
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
4685a: 4879 0006 0f74 pea 60f74 <aio_request_queue+0x8>
46860: 4eb9 0004 7600 jsr 47600 <pthread_attr_init>
if (result != 0)
46866: 588f addql #4,%sp
int
rtems_aio_init (void)
{
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
46868: 2400 movel %d0,%d2
if (result != 0)
4686a: 6600 00c8 bnew 46934 <rtems_aio_init+0xe0>
return result;
result =
4686e: 42a7 clrl %sp@-
46870: 4879 0006 0f74 pea 60f74 <aio_request_queue+0x8>
46876: 4eb9 0004 762c jsr 4762c <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
4687c: 508f addql #8,%sp
4687e: 4a80 tstl %d0
46880: 670e beqs 46890 <rtems_aio_init+0x3c> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
46882: 4879 0006 0f74 pea 60f74 <aio_request_queue+0x8> <== NOT EXECUTED
46888: 4eb9 0004 75e4 jsr 475e4 <pthread_attr_destroy> <== NOT EXECUTED
4688e: 588f addql #4,%sp <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
46890: 42a7 clrl %sp@-
46892: 4879 0006 0f6c pea 60f6c <aio_request_queue>
46898: 4eb9 0004 72f0 jsr 472f0 <pthread_mutex_init>
if (result != 0)
4689e: 508f addql #8,%sp
468a0: 4a80 tstl %d0
468a2: 670e beqs 468b2 <rtems_aio_init+0x5e> <== ALWAYS TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
468a4: 4879 0006 0f74 pea 60f74 <aio_request_queue+0x8> <== NOT EXECUTED
468aa: 4eb9 0004 75e4 jsr 475e4 <pthread_attr_destroy> <== NOT EXECUTED
468b0: 588f addql #4,%sp <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
468b2: 42a7 clrl %sp@-
468b4: 4879 0006 0f70 pea 60f70 <aio_request_queue+0x4>
468ba: 4eb9 0004 6f84 jsr 46f84 <pthread_cond_init>
if (result != 0) {
468c0: 508f addql #8,%sp
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
468c2: 2400 movel %d0,%d2
if (result != 0) {
468c4: 671a beqs 468e0 <rtems_aio_init+0x8c> <== ALWAYS TAKEN
pthread_mutex_destroy (&aio_request_queue.mutex);
468c6: 4879 0006 0f6c pea 60f6c <aio_request_queue> <== NOT EXECUTED
468cc: 4eb9 0004 71d0 jsr 471d0 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
468d2: 4879 0006 0f74 pea 60f74 <aio_request_queue+0x8> <== NOT EXECUTED
468d8: 4eb9 0004 75e4 jsr 475e4 <pthread_attr_destroy> <== NOT EXECUTED
468de: 508f addql #8,%sp <== NOT EXECUTED
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
468e0: 42b9 0006 0fb8 clrl 60fb8 <aio_request_queue+0x4c>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
468e6: 203c 0006 0fb8 movel #397240,%d0
468ec: 23c0 0006 0fb4 movel %d0,60fb4 <aio_request_queue+0x48>
head->previous = NULL;
tail->previous = head;
468f2: 203c 0006 0fb4 movel #397236,%d0
468f8: 23c0 0006 0fbc movel %d0,60fbc <aio_request_queue+0x50>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
468fe: 203c 0006 0fc4 movel #397252,%d0
46904: 23c0 0006 0fc0 movel %d0,60fc0 <aio_request_queue+0x54>
head->previous = NULL;
tail->previous = head;
4690a: 203c 0006 0fc0 movel #397248,%d0
46910: 23c0 0006 0fc8 movel %d0,60fc8 <aio_request_queue+0x5c>
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
46916: 203c 0000 b00b movel #45067,%d0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4691c: 42b9 0006 0fc4 clrl 60fc4 <aio_request_queue+0x58>
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
46922: 42b9 0006 0fd0 clrl 60fd0 <aio_request_queue+0x64>
aio_request_queue.idle_threads = 0;
46928: 42b9 0006 0fd4 clrl 60fd4 <aio_request_queue+0x68>
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
4692e: 23c0 0006 0fcc movel %d0,60fcc <aio_request_queue+0x60>
return result;
}
46934: 2002 movel %d2,%d0
46936: 242e fffc movel %fp@(-4),%d2
4693a: 4e5e unlk %fp <== NOT EXECUTED
000467fe <rtems_aio_insert_prio>:
* NONE
*/
static void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
467fe: 4e56 0000 linkw %fp,#0
46802: 202e 0008 movel %fp@(8),%d0
46806: 2240 moveal %d0,%a1
46808: 2f0b movel %a3,%sp@-
4680a: 2059 moveal %a1@+,%a0
4680c: 2f0a movel %a2,%sp@-
4680e: 246e 000c moveal %fp@(12),%a2
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
46812: b3c8 cmpal %a0,%a1
46814: 6602 bnes 46818 <rtems_aio_insert_prio+0x1a> <== ALWAYS TAKEN
46816: 602a bras 46842 <rtems_aio_insert_prio+0x44> <== NOT EXECUTED
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
46818: 2668 0014 moveal %a0@(20),%a3
4681c: 202b 0014 movel %a3@(20),%d0
while (req->aiocbp->aio_reqprio > prio &&
46820: 266a 0014 moveal %a2@(20),%a3
46824: 222b 0014 movel %a3@(20),%d1
46828: 600a bras 46834 <rtems_aio_insert_prio+0x36>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
4682a: 2050 moveal %a0@,%a0 <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
4682c: 2668 0014 moveal %a0@(20),%a3 <== NOT EXECUTED
46830: 202b 0014 movel %a3@(20),%d0 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
46834: b081 cmpl %d1,%d0
46836: 6d16 blts 4684e <rtems_aio_insert_prio+0x50> <== NEVER TAKEN
46838: 2d4a 000c movel %a2,%fp@(12)
4683c: 2d68 0004 0008 movel %a0@(4),%fp@(8)
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
46842: 245f moveal %sp@+,%a2
46844: 265f moveal %sp@+,%a3
46846: 4e5e unlk %fp
46848: 4ef9 0004 8d74 jmp 48d74 <_Chain_Insert>
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
4684e: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
46850: 66d8 bnes 4682a <rtems_aio_insert_prio+0x2c> <== NOT EXECUTED
46852: 60e4 bras 46838 <rtems_aio_insert_prio+0x3a> <== NOT EXECUTED
00046a24 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
46a24: 4e56 0000 linkw %fp,#0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
46a28: 206e 0008 moveal %fp@(8),%a0
46a2c: 2f0a movel %a2,%sp@-
46a2e: 202e 000c movel %fp@(12),%d0
46a32: 2458 moveal %a0@+,%a2
if (rtems_chain_is_empty (chain))
46a34: b1ca cmpal %a2,%a0
46a36: 660a bnes 46a42 <rtems_aio_remove_req+0x1e>
46a38: 603c bras 46a76 <rtems_aio_remove_req+0x52>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
46a3a: 2452 moveal %a2@,%a2 <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
46a3c: b1ca cmpal %a2,%a0 <== NOT EXECUTED
46a3e: 6602 bnes 46a42 <rtems_aio_remove_req+0x1e> <== NOT EXECUTED
46a40: 6038 bras 46a7a <rtems_aio_remove_req+0x56> <== NOT EXECUTED
46a42: b0aa 0014 cmpl %a2@(20),%d0
46a46: 66f2 bnes 46a3a <rtems_aio_remove_req+0x16> <== NEVER TAKEN
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
46a48: b1ca cmpal %a2,%a0
46a4a: 672e beqs 46a7a <rtems_aio_remove_req+0x56> <== NEVER TAKEN
46a4c: 2f0a movel %a2,%sp@-
46a4e: 4eb9 0004 8d18 jsr 48d18 <_Chain_Extract>
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
46a54: 206a 0014 moveal %a2@(20),%a0
46a58: 203c 0000 008c movel #140,%d0
46a5e: 2140 0030 movel %d0,%a0@(48)
current->aiocbp->return_value = -1;
46a62: 70ff moveq #-1,%d0
46a64: 2140 0034 movel %d0,%a0@(52)
free (current);
46a68: 2f0a movel %a2,%sp@-
46a6a: 4eb9 0004 2e98 jsr 42e98 <free>
}
return AIO_CANCELED;
46a70: 508f addql #8,%sp
46a72: 4280 clrl %d0
46a74: 6006 bras 46a7c <rtems_aio_remove_req+0x58>
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
46a76: 7002 moveq #2,%d0
46a78: 6002 bras 46a7c <rtems_aio_remove_req+0x58>
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
46a7a: 7001 moveq #1,%d0 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
46a7c: 246e fffc moveal %fp@(-4),%a2
46a80: 4e5e unlk %fp <== NOT EXECUTED
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 e624 lea 4e624 <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 d569 pea 5d569 <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
0004d3c4 <rtems_barrier_delete>:
#include <rtems/score/threadq.h>
rtems_status_code rtems_barrier_delete(
rtems_id id
)
{
4d3c4: 4e56 fffc linkw %fp,#-4
4d3c8: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
4d3ca: 486e fffc pea %fp@(-4)
4d3ce: 2f2e 0008 movel %fp@(8),%sp@-
4d3d2: 4879 0006 17fc pea 617fc <_Barrier_Information>
4d3d8: 4eb9 0004 9218 jsr 49218 <_Objects_Get>
Barrier_Control *the_barrier;
Objects_Locations location;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
4d3de: 4fef 000c lea %sp@(12),%sp
4d3e2: 2440 moveal %d0,%a2
4d3e4: 4aae fffc tstl %fp@(-4)
4d3e8: 663a bnes 4d424 <rtems_barrier_delete+0x60> <== NEVER TAKEN
case OBJECTS_LOCAL:
_CORE_barrier_Flush(
4d3ea: 4878 0002 pea 2 <DOUBLE_FLOAT>
4d3ee: 42a7 clrl %sp@-
4d3f0: 486a 0014 pea %a2@(20)
4d3f4: 4eb9 0004 a458 jsr 4a458 <_Thread_queue_Flush>
&the_barrier->Barrier,
NULL,
CORE_BARRIER_WAS_DELETED
);
_Objects_Close( &_Barrier_Information, &the_barrier->Object );
4d3fa: 2f0a movel %a2,%sp@-
4d3fc: 4879 0006 17fc pea 617fc <_Barrier_Information>
4d402: 4eb9 0004 8e28 jsr 48e28 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Barrier_Free (
Barrier_Control *the_barrier
)
{
_Objects_Free( &_Barrier_Information, &the_barrier->Object );
4d408: 2f0a movel %a2,%sp@-
4d40a: 4879 0006 17fc pea 617fc <_Barrier_Information>
4d410: 4eb9 0004 90b0 jsr 490b0 <_Objects_Free>
_Barrier_Free( the_barrier );
_Thread_Enable_dispatch();
4d416: 4eb9 0004 9e14 jsr 49e14 <_Thread_Enable_dispatch>
4d41c: 4fef 001c lea %sp@(28),%sp
return RTEMS_SUCCESSFUL;
4d420: 4280 clrl %d0
4d422: 6002 bras 4d426 <rtems_barrier_delete+0x62>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4d424: 7004 moveq #4,%d0
}
4d426: 246e fff8 moveal %fp@(-8),%a2
4d42a: 4e5e unlk %fp
...
0004b1a2 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
4b1a2: 4e56 0000 linkw %fp,#0
4b1a6: 2f0a movel %a2,%sp@-
4b1a8: 246e 0008 moveal %fp@(8),%a2
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dd)
4b1ac: 4a39 0006 1f9e tstb 61f9e <bdbuf_cache+0x2e>
4b1b2: 6734 beqs 4b1e8 <rtems_bdbuf_add_to_modified_list_after_access+0x46><== ALWAYS TAKEN
4b1b4: 202a 0012 movel %a2@(18),%d0 <== NOT EXECUTED
4b1b8: b0b9 0006 1fa4 cmpl 61fa4 <bdbuf_cache+0x34>,%d0 <== NOT EXECUTED
4b1be: 6628 bnes 4b1e8 <rtems_bdbuf_add_to_modified_list_after_access+0x46><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
4b1c0: 4eba fa38 jsr %pc@(4abfa <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);
4b1c4: 4878 0019 pea 19 <OPER2+0x5> <== NOT EXECUTED
4b1c8: 2f39 0006 1f9a movel 61f9a <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED
4b1ce: 4eba f9b8 jsr %pc@(4ab88 <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,
4b1d2: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED
4b1d6: 2f39 0006 1f9a movel 61f9a <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED
4b1dc: 4eba f9fc jsr %pc@(4abda <rtems_bdbuf_unlock>) <== NOT EXECUTED
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
rtems_bdbuf_lock_cache ();
4b1e0: 4eba f9cc jsr %pc@(4abae <rtems_bdbuf_lock_cache>) <== NOT EXECUTED
4b1e4: 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
4b1e8: 202a 001e movel %a2@(30),%d0
4b1ec: 7203 moveq #3,%d1
4b1ee: b280 cmpl %d0,%d1
4b1f0: 6708 beqs 4b1fa <rtems_bdbuf_add_to_modified_list_after_access+0x58>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
4b1f2: 123c 0005 moveb #5,%d1
4b1f6: b280 cmpl %d0,%d1
4b1f8: 660a bnes 4b204 <rtems_bdbuf_add_to_modified_list_after_access+0x62>
bd->hold_timer = bdbuf_config.swap_block_hold;
4b1fa: 41f9 0005 f1f2 lea 5f1f2 <rtems_bdbuf_configuration+0x10>,%a0
4b200: 2550 002a movel %a0@,%a2@(42)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b204: 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;
4b206: 2079 0006 1fc0 moveal 61fc0 <bdbuf_cache+0x50>,%a0
4b20c: 2540 001e movel %d0,%a2@(30)
the_node->next = tail;
4b210: 24bc 0006 1fbc movel #401340,%a2@
tail->previous = the_node;
4b216: 23ca 0006 1fc0 movel %a2,61fc0 <bdbuf_cache+0x50>
old_last->next = the_node;
4b21c: 208a movel %a2,%a0@
the_node->previous = old_last;
4b21e: 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)
4b222: 4aaa 0022 tstl %a2@(34)
4b226: 6714 beqs 4b23c <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 ();
}
4b228: 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);
4b22c: 223c 0006 1fd0 movel #401360,%d1
4b232: 2d41 0008 movel %d1,%fp@(8)
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
4b236: 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);
4b238: 6000 fbb2 braw 4adec <rtems_bdbuf_wake>
else if (rtems_bdbuf_has_buffer_waiters ())
4b23c: 4ab9 0006 1fe0 tstl 61fe0 <bdbuf_cache+0x70>
4b242: 670a beqs 4b24e <rtems_bdbuf_add_to_modified_list_after_access+0xac>
rtems_bdbuf_wake_swapper ();
}
4b244: 246e fffc moveal %fp@(-4),%a2
4b248: 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 ();
4b24a: 6000 f9c6 braw 4ac12 <rtems_bdbuf_wake_swapper>
}
4b24e: 246e fffc moveal %fp@(-4),%a2
4b252: 4e5e unlk %fp <== NOT EXECUTED
0004ac94 <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)
{
4ac94: 4e56 0000 linkw %fp,#0
4ac98: 2f0a movel %a2,%sp@-
4ac9a: 246e 0008 moveal %fp@(8),%a2
4ac9e: 2f02 movel %d2,%sp@-
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
4aca0: 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 ();
4aca2: 4eba ff94 jsr %pc@(4ac38 <rtems_bdbuf_disable_preemption>)
4aca6: 2400 movel %d0,%d2
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
4aca8: 4eba ff50 jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
4acac: 42a7 clrl %sp@-
4acae: 42a7 clrl %sp@-
4acb0: 2f2a 0004 movel %a2@(4),%sp@-
4acb4: 4eb9 0004 73a4 jsr 473a4 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
4acba: 4fef 000c lea %sp@(12),%sp
4acbe: 7206 moveq #6,%d1
4acc0: b280 cmpl %d0,%d1
4acc2: 6606 bnes 4acca <rtems_bdbuf_anonymous_wait+0x36><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAIT_TO);
4acc4: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
4acc8: 600a bras 4acd4 <rtems_bdbuf_anonymous_wait+0x40><== NOT EXECUTED
if (sc != RTEMS_UNSATISFIED)
4acca: 720d moveq #13,%d1
4accc: b280 cmpl %d0,%d1
4acce: 6708 beqs 4acd8 <rtems_bdbuf_anonymous_wait+0x44><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAIT_2);
4acd0: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4acd4: 4eba fea0 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4acd8: 4eba fed4 jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
rtems_bdbuf_restore_preemption (prev_mode);
4acdc: 2f02 movel %d2,%sp@-
4acde: 4eba ff88 jsr %pc@(4ac68 <rtems_bdbuf_restore_preemption>)
--waiters->count;
}
4ace2: 242e fff8 movel %fp@(-8),%d2
rtems_bdbuf_lock_cache ();
rtems_bdbuf_restore_preemption (prev_mode);
--waiters->count;
4ace6: 5392 subql #1,%a2@
4ace8: 588f addql #4,%sp
}
4acea: 246e fffc moveal %fp@(-4),%a2
4acee: 4e5e unlk %fp <== NOT EXECUTED
0004ae14 <rtems_bdbuf_create_task.constprop.14>:
return NULL;
}
static rtems_status_code
rtems_bdbuf_create_task(
4ae14: 4e56 fff4 linkw %fp,#-12
4ae18: 206e 0008 moveal %fp@(8),%a0
4ae1c: 48d7 040c moveml %d2-%d3/%a2,%sp@
4ae20: 202e 000c movel %fp@(12),%d0
4ae24: 242e 0010 movel %fp@(16),%d2
4ae28: 262e 0014 movel %fp@(20),%d3
4ae2c: 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 ?
4ae30: 2239 0005 f1fe movel 5f1fe <rtems_bdbuf_configuration+0x1c>,%d1
bdbuf_config.task_stack_size : RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT;
4ae36: 6604 bnes 4ae3c <rtems_bdbuf_create_task.constprop.14+0x28><== ALWAYS TAKEN
4ae38: 323c 1000 movew #4096,%d1 <== NOT EXECUTED
priority = priority != 0 ? priority : default_priority;
4ae3c: 4a80 tstl %d0
4ae3e: 6604 bnes 4ae44 <rtems_bdbuf_create_task.constprop.14+0x30><== ALWAYS TAKEN
4ae40: 103c 000f moveb #15,%d0 <== NOT EXECUTED
sc = rtems_task_create (name,
4ae44: 2f0a movel %a2,%sp@-
4ae46: 42a7 clrl %sp@-
4ae48: 4878 0400 pea 400 <D_BIAS+0x2>
4ae4c: 2f01 movel %d1,%sp@-
4ae4e: 2f00 movel %d0,%sp@-
4ae50: 2f08 movel %a0,%sp@-
4ae52: 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)
4ae58: 4fef 0018 lea %sp@(24),%sp
4ae5c: 4a80 tstl %d0
4ae5e: 661a bnes 4ae7a <rtems_bdbuf_create_task.constprop.14+0x66><== NEVER TAKEN
sc = rtems_task_start (*id, entry, arg);
4ae60: 2d43 0010 movel %d3,%fp@(16)
4ae64: 2d42 000c movel %d2,%fp@(12)
4ae68: 2d52 0008 movel %a2@,%fp@(8)
return sc;
}
4ae6c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4ae72: 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);
4ae74: 4ef9 0004 77e8 jmp 477e8 <rtems_task_start>
return sc;
}
4ae7a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
4ae80: 4e5e unlk %fp <== NOT EXECUTED
0004ac38 <rtems_bdbuf_disable_preemption>:
--bd->group->users;
}
static rtems_mode
rtems_bdbuf_disable_preemption (void)
{
4ac38: 4e56 fffc linkw %fp,#-4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_mode prev_mode = 0;
4ac3c: 204e moveal %fp,%a0
4ac3e: 42a0 clrl %a0@-
sc = rtems_task_mode (RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &prev_mode);
4ac40: 2f08 movel %a0,%sp@-
4ac42: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
4ac46: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
4ac4a: 4eb9 0004 e9c0 jsr 4e9c0 <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
4ac50: 4fef 000c lea %sp@(12),%sp
4ac54: 4a80 tstl %d0
4ac56: 6708 beqs 4ac60 <rtems_bdbuf_disable_preemption+0x28><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_PREEMPT_DIS);
4ac58: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4ac5c: 4eba ff18 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
return prev_mode;
}
4ac60: 202e fffc movel %fp@(-4),%d0
4ac64: 4e5e unlk %fp <== NOT EXECUTED
0004bdf8 <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) +
4bdf8: 72fe moveq #-2,%d1
sizeof (rtems_blkdev_sg_buffer) * transfer_count);
req->req = RTEMS_BLKDEV_REQ_READ;
req->done = rtems_bdbuf_transfer_done;
4bdfa: 41fa fa66 lea %pc@(4b862 <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)
{
4bdfe: 4e56 ffdc linkw %fp,#-36
4be02: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4be06: 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) +
4be0a: 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;
4be0c: 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);
4be0e: 4bfa f77c lea %pc@(4b58c <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) +
4be12: 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)
{
4be14: 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) +
4be18: 0680 0000 001c addil #28,%d0
4be1e: 9fc0 subal %d0,%sp
4be20: 45ef 0001 lea %sp@(1),%a2
4be24: 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)
{
4be26: 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) +
4be2a: 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;
4be2c: 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) +
4be30: 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;
4be32: 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;
4be36: 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;
4be3a: 4292 clrl %a2@
req->done = rtems_bdbuf_transfer_done;
4be3c: 2548 0004 movel %a0,%a2@(4)
req->io_task = rtems_task_self ();
4be40: 4eb9 0004 eaf0 jsr 4eaf0 <rtems_task_self>
req->bufnum = 0;
4be46: 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 ();
4be4a: 2540 0014 movel %d0,%a2@(20)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4be4e: 7009 moveq #9,%d0
4be50: 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;
4be54: 254b 0024 movel %a3,%a2@(36)
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
req->bufs [0].buffer = bd->buffer;
4be58: 256b 001a 0020 movel %a3@(26),%a2@(32)
4be5e: 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;
4be60: 2542 0018 movel %d2,%a2@(24)
req->bufs [0].length = block_size;
4be64: 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)
4be68: 6042 bras 4beac <rtems_bdbuf_execute_read_request+0xb4>
{
media_block += media_blocks_per_block;
4be6a: d486 addl %d6,%d2
4be6c: 47eb 0010 lea %a3@(16),%a3
bd = rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
4be70: 2f02 movel %d2,%sp@-
4be72: 2f0c movel %a4,%sp@-
4be74: 4e95 jsr %a5@
if (bd == NULL)
4be76: 508f addql #8,%sp
4be78: 4a80 tstl %d0
4be7a: 6612 bnes 4be8e <rtems_bdbuf_execute_read_request+0x96><== ALWAYS TAKEN
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
}
req->bufnum = transfer_index;
4be7c: 2543 0010 movel %d3,%a2@(16)
return rtems_bdbuf_execute_transfer_request (dd, req, true);
4be80: 4878 0001 pea 1 <ADD>
4be84: 2f0a movel %a2,%sp@-
4be86: 2f0c movel %a4,%sp@-
4be88: 4eba f9fe jsr %pc@(4b888 <rtems_bdbuf_execute_transfer_request>)
4be8c: 6024 bras 4beb2 <rtems_bdbuf_execute_read_request+0xba>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4be8e: 2040 moveal %d0,%a0
4be90: 7209 moveq #9,%d1
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
++transfer_index;
4be92: 5283 addql #1,%d3
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4be94: 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;
4be98: 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;
4be9c: 2740 0024 movel %d0,%a3@(36)
req->bufs [transfer_index].block = media_block;
4bea0: 2742 0018 movel %d2,%a3@(24)
req->bufs [transfer_index].length = block_size;
4bea4: 2745 001c movel %d5,%a3@(28)
req->bufs [transfer_index].buffer = bd->buffer;
4bea8: 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)
4beac: b883 cmpl %d3,%d4
4beae: 62ba bhis 4be6a <rtems_bdbuf_execute_read_request+0x72>
4beb0: 60ca bras 4be7c <rtems_bdbuf_execute_read_request+0x84>
}
req->bufnum = transfer_index;
return rtems_bdbuf_execute_transfer_request (dd, req, true);
}
4beb2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4beb8: 4e5e unlk %fp <== NOT EXECUTED
0004ab76 <rtems_bdbuf_fatal>:
#define RTEMS_BDBUF_AVL_MAX_HEIGHT (32)
#endif
static void
rtems_bdbuf_fatal (rtems_fatal_code error)
{
4ab76: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_fatal (RTEMS_FATAL_SOURCE_BDBUF, error);
4ab7a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4ab7e: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
4ab82: 4eb9 0004 7a70 jsr 47a70 <rtems_fatal> <== NOT EXECUTED
0004abc4 <rtems_bdbuf_fatal_with_state>:
}
static void
rtems_bdbuf_fatal_with_state (rtems_bdbuf_buf_state state,
rtems_bdbuf_fatal_code error)
{
4abc4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4abc8: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED
rtems_bdbuf_fatal ((((uint32_t) state) << 16) | error);
4abcc: 4840 swap %d0 <== NOT EXECUTED
4abce: 4240 clrw %d0 <== NOT EXECUTED
4abd0: 80ae 000c orl %fp@(12),%d0 <== NOT EXECUTED
4abd4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4abd6: 4eba ff9e jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
0004c436 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
4c436: 4e56 ffe8 linkw %fp,#-24
4c43a: 48d7 047c moveml %d2-%d6/%a2,%sp@
4c43e: 246e 0008 moveal %fp@(8),%a2
4c442: 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 ();
4c446: 4eba e766 jsr %pc@(4abae <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)
4c44a: bcaa 0028 cmpl %a2@(40),%d6
4c44e: 6400 008a bccw 4c4da <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)
4c452: 202a 0030 movel %a2@(48),%d0
4c456: 6d06 blts 4c45e <rtems_bdbuf_get+0x28> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
4c458: 2206 movel %d6,%d1
4c45a: e1a9 lsll %d0,%d1
4c45c: 6030 bras 4c48e <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);
4c45e: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED
4c462: 4284 clrl %d4 <== NOT EXECUTED
4c464: 4282 clrl %d2 <== NOT EXECUTED
4c466: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4c468: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4c46a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4c46c: 42a7 clrl %sp@- <== NOT EXECUTED
4c46e: 4eb9 0005 d130 jsr 5d130 <__muldi3> <== NOT EXECUTED
4c474: 262a 0020 movel %a2@(32),%d3 <== NOT EXECUTED
4c478: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c47c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c47e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c480: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4c482: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c484: 4eb9 0005 da2c jsr 5da2c <__udivdi3> <== NOT EXECUTED
4c48a: 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);
4c48e: d2aa 0018 addl %a2@(24),%d1
4c492: 2f01 movel %d1,%sp@-
4c494: 2f0a movel %a2,%sp@-
4c496: 4eba f142 jsr %pc@(4b5da <rtems_bdbuf_get_buffer_for_access>)
switch (bd->state)
4c49a: 508f addql #8,%sp
4c49c: 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);
4c49e: 2440 moveal %d0,%a2
switch (bd->state)
4c4a0: 202a 001e movel %a2@(30),%d0
4c4a4: b280 cmpl %d0,%d1
4c4a6: 6712 beqs 4c4ba <rtems_bdbuf_get+0x84>
4c4a8: 123c 0007 moveb #7,%d1
4c4ac: b280 cmpl %d0,%d1
4c4ae: 6718 beqs 4c4c8 <rtems_bdbuf_get+0x92>
4c4b0: 123c 0001 moveb #1,%d1
4c4b4: b280 cmpl %d0,%d1
4c4b6: 6618 bnes 4c4d0 <rtems_bdbuf_get+0x9a> <== NEVER TAKEN
4c4b8: 6004 bras 4c4be <rtems_bdbuf_get+0x88>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c4ba: 7003 moveq #3,%d0
4c4bc: 600c bras 4c4ca <rtems_bdbuf_get+0x94>
4c4be: 7205 moveq #5,%d1
4c4c0: 2541 001e movel %d1,%a2@(30)
4c4c4: 4282 clrl %d2
4c4c6: 6016 bras 4c4de <rtems_bdbuf_get+0xa8>
4c4c8: 7004 moveq #4,%d0
4c4ca: 2540 001e movel %d0,%a2@(30)
4c4ce: 60f4 bras 4c4c4 <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);
4c4d0: 4878 000f pea f <FPTRAP> <== NOT EXECUTED
4c4d4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c4d6: 4eba e6ec jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
4c4da: 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;
4c4dc: 95ca subal %a2,%a2 <== NOT EXECUTED
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
}
rtems_bdbuf_unlock_cache ();
4c4de: 4eba e71a jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
*bd_ptr = bd;
4c4e2: 206e 0010 moveal %fp@(16),%a0
return sc;
}
4c4e6: 2002 movel %d2,%d0
}
}
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
4c4e8: 208a movel %a2,%a0@
return sc;
}
4c4ea: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
4c4f0: 4e5e unlk %fp <== NOT EXECUTED
0004b5da <rtems_bdbuf_get_buffer_for_access>:
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
4b5da: 4e56 ffdc linkw %fp,#-36
4b5de: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4b5e2: 266e 0008 moveal %fp@(8),%a3
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
4b5e6: 2c3c 0004 adac movel #306604,%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);
4b5ec: 49fa f704 lea %pc@(4acf2 <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 ();
4b5f0: 4bfa f620 lea %pc@(4ac12 <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);
4b5f4: 2a3c 0004 b256 movel #307798,%d5
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b5fa: 283c 0004 b178 movel #307576,%d4
}
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (rtems_disk_device *dd,
rtems_blkdev_bnum block)
{
4b600: 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);
4b604: 263c 0004 adec movel #306668,%d3
{
rtems_bdbuf_buffer *bd = NULL;
do
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
4b60a: 2f02 movel %d2,%sp@-
4b60c: 2046 moveal %d6,%a0
4b60e: 2f0b movel %a3,%sp@-
4b610: 2f39 0006 1fa8 movel 61fa8 <bdbuf_cache+0x38>,%sp@-
4b616: 4e90 jsr %a0@
4b618: 4fef 000c lea %sp@(12),%sp
4b61c: 2440 moveal %d0,%a2
if (bd != NULL)
4b61e: 4a80 tstl %d0
4b620: 6700 00a2 beqw 4b6c4 <rtems_bdbuf_get_buffer_for_access+0xea>
{
if (bd->group->bds_per_group != dd->bds_per_group)
4b624: 206a 0026 moveal %a2@(38),%a0
4b628: 202b 0034 movel %a3@(52),%d0
4b62c: b0a8 0008 cmpl %a0@(8),%d0
4b630: 6700 00b4 beqw 4b6e6 <rtems_bdbuf_get_buffer_for_access+0x10c>
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4b634: 202a 001e movel %a2@(30),%d0
4b638: 720a moveq #10,%d1
4b63a: b280 cmpl %d0,%d1
4b63c: 657e bcss 4b6bc <rtems_bdbuf_get_buffer_for_access+0xe2><== NEVER TAKEN
4b63e: 303b 0a08 movew %pc@(4b648 <rtems_bdbuf_get_buffer_for_access+0x6e>,%d0:l:2),%d0
4b642: 48c0 extl %d0
4b644: 4efb 0802 jmp %pc@(4b648 <rtems_bdbuf_get_buffer_for_access+0x6e>,%d0:l)
4b648: 0104 btst %d0,%d4 <== NOT EXECUTED
4b64a: 0044 .short 0x0044 <== NOT EXECUTED
4b64c: 0044 .short 0x0044 <== NOT EXECUTED
4b64e: 005c .short 0x005c <== NOT EXECUTED
4b650: 005c .short 0x005c <== NOT EXECUTED
4b652: 005c .short 0x005c <== NOT EXECUTED
4b654: 005c .short 0x005c <== NOT EXECUTED
4b656: 0016 .short 0x0016 <== NOT EXECUTED
4b658: 0064 .short 0x0064 <== NOT EXECUTED
4b65a: 0064 .short 0x0064 <== NOT EXECUTED
4b65c: 0064 .short 0x0064 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b65e: 7008 moveq #8,%d0 <== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4b660: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED
4b664: 2540 001e movel %d0,%a2@(30) <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4b668: 2252 moveal %a2@,%a1 <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
4b66a: 2348 0004 movel %a0,%a1@(4) <== NOT EXECUTED
previous->next = next;
4b66e: 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;
4b670: 2079 0006 1fcc moveal 61fcc <bdbuf_cache+0x5c>,%a0 <== NOT EXECUTED
the_node->next = tail;
4b676: 24bc 0006 1fc8 movel #401352,%a2@ <== NOT EXECUTED
tail->previous = the_node;
4b67c: 23ca 0006 1fcc movel %a2,61fcc <bdbuf_cache+0x5c> <== NOT EXECUTED
old_last->next = the_node;
4b682: 208a movel %a2,%a0@ <== NOT EXECUTED
the_node->previous = old_last;
4b684: 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 ();
4b688: 4e95 jsr %a5@ <== NOT EXECUTED
4b68a: 60a8 bras 4b634 <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)
4b68c: 4aaa 0022 tstl %a2@(34)
4b690: 6700 00ba beqw 4b74c <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);
4b694: 4879 0006 1fe0 pea 61fe0 <bdbuf_cache+0x70>
4b69a: 4eba f5f8 jsr %pc@(4ac94 <rtems_bdbuf_anonymous_wait>)
4b69e: 588f addql #4,%sp
4b6a0: 6000 ff68 braw 4b60a <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);
4b6a4: 4879 0006 1fd0 pea 61fd0 <bdbuf_cache+0x60>
4b6aa: 6006 bras 4b6b2 <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);
4b6ac: 4879 0006 1fd8 pea 61fd8 <bdbuf_cache+0x68> <== NOT EXECUTED
4b6b2: 2f0a movel %a2,%sp@-
4b6b4: 4e94 jsr %a4@
4b6b6: 508f addql #8,%sp
4b6b8: 6000 ff7a braw 4b634 <rtems_bdbuf_get_buffer_for_access+0x5a>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_8);
4b6bc: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
4b6c0: 6000 0084 braw 4b746 <rtems_bdbuf_get_buffer_for_access+0x16c><== NOT EXECUTED
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
4b6c4: 2f02 movel %d2,%sp@-
4b6c6: 2f0b movel %a3,%sp@-
4b6c8: 4eba fbca jsr %pc@(4b294 <rtems_bdbuf_get_buffer_from_lru_list>)
if (bd == NULL)
4b6cc: 508f addql #8,%sp
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
4b6ce: 2440 moveal %d0,%a2
if (bd == NULL)
4b6d0: 4a80 tstl %d0
4b6d2: 6612 bnes 4b6e6 <rtems_bdbuf_get_buffer_for_access+0x10c>
}
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
4b6d4: 223c 0006 1fbc movel #401340,%d1
4b6da: b2b9 0006 1fb8 cmpl 61fb8 <bdbuf_cache+0x48>,%d1
4b6e0: 67b2 beqs 4b694 <rtems_bdbuf_get_buffer_for_access+0xba>
rtems_bdbuf_wake_swapper ();
4b6e2: 4e95 jsr %a5@
4b6e4: 60ae bras 4b694 <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);
4b6e6: 47fa f60a lea %pc@(4acf2 <rtems_bdbuf_wait>),%a3
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4b6ea: 202a 001e movel %a2@(30),%d0
4b6ee: 2200 movel %d0,%d1
4b6f0: 5381 subql #1,%d1
4b6f2: 7409 moveq #9,%d2
4b6f4: b481 cmpl %d1,%d2
4b6f6: 654a bcss 4b742 <rtems_bdbuf_get_buffer_for_access+0x168><== NEVER TAKEN
4b6f8: 303b 1a08 movew %pc@(4b702 <rtems_bdbuf_get_buffer_for_access+0x128>,%d1:l:2),%d0
4b6fc: 48c0 extl %d0
4b6fe: 4efb 0802 jmp %pc@(4b702 <rtems_bdbuf_get_buffer_for_access+0x128>,%d0:l)
4b702: 0068 .short 0x0068 <== NOT EXECUTED
4b704: 001c .short 0x001c <== NOT EXECUTED
4b706: 002a .short 0x002a <== NOT EXECUTED
4b708: 002a .short 0x002a <== NOT EXECUTED
4b70a: 002a .short 0x002a <== NOT EXECUTED
4b70c: 002a .short 0x002a <== NOT EXECUTED
4b70e: 0014 .short 0x0014 <== NOT EXECUTED
4b710: 0032 .short 0x0032 <== NOT EXECUTED
4b712: 0032 .short 0x0032 <== NOT EXECUTED
4b714: 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 ();
}
4b716: 206a 0026 moveal %a2@(38),%a0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4b71a: 53a8 000c subql #1,%a0@(12)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4b71e: 2252 moveal %a2@,%a1
previous = the_node->previous;
4b720: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4b724: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4b728: 2089 movel %a1,%a0@
4b72a: 603e bras 4b76a <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);
4b72c: 4879 0006 1fd0 pea 61fd0 <bdbuf_cache+0x60>
4b732: 6006 bras 4b73a <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);
4b734: 4879 0006 1fd8 pea 61fd8 <bdbuf_cache+0x68>
4b73a: 2f0a movel %a2,%sp@-
4b73c: 4e93 jsr %a3@
4b73e: 508f addql #8,%sp
4b740: 60a8 bras 4b6ea <rtems_bdbuf_get_buffer_for_access+0x110>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_7);
4b742: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED
4b746: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4b748: 4eba f47a jsr %pc@(4abc4 <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);
4b74c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b74e: 2045 moveal %d5,%a0 <== NOT EXECUTED
4b750: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b752: 2044 moveal %d4,%a0 <== NOT EXECUTED
4b754: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b756: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4b758: 4879 0006 1fe0 pea 61fe0 <bdbuf_cache+0x70> <== NOT EXECUTED
4b75e: 2043 moveal %d3,%a0 <== NOT EXECUTED
4b760: 4e90 jsr %a0@ <== NOT EXECUTED
4b762: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4b766: 6000 fea2 braw 4b60a <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 ();
}
4b76a: 206a 0026 moveal %a2@(38),%a0
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
4b76e: 200a movel %a2,%d0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4b770: 52a8 000c addql #1,%a0@(12)
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
4b774: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4b77a: 4e5e unlk %fp <== NOT EXECUTED
0004b58c <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)
{
4b58c: 4e56 0000 linkw %fp,#0
4b590: 2f03 movel %d3,%sp@-
4b592: 262e 000c movel %fp@(12),%d3
4b596: 2f02 movel %d2,%sp@-
4b598: 242e 0008 movel %fp@(8),%d2
rtems_bdbuf_buffer *bd = NULL;
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dd, block);
4b59c: 2f03 movel %d3,%sp@-
4b59e: 2f02 movel %d2,%sp@-
4b5a0: 2f39 0006 1fa8 movel 61fa8 <bdbuf_cache+0x38>,%sp@-
4b5a6: 4eba f804 jsr %pc@(4adac <rtems_bdbuf_avl_search.isra.1>)
4b5aa: 4fef 000c lea %sp@(12),%sp
if (bd == NULL)
4b5ae: 4a80 tstl %d0
4b5b0: 661a bnes 4b5cc <rtems_bdbuf_get_buffer_for_read_ahead+0x40><== NEVER TAKEN
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dd, block);
4b5b2: 2f03 movel %d3,%sp@-
4b5b4: 2f02 movel %d2,%sp@-
4b5b6: 4eba fcdc jsr %pc@(4b294 <rtems_bdbuf_get_buffer_from_lru_list>)
if (bd != NULL)
4b5ba: 508f addql #8,%sp
4b5bc: 4a80 tstl %d0
4b5be: 670e beqs 4b5ce <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 ();
}
4b5c0: 2240 moveal %d0,%a1
4b5c2: 2069 0026 moveal %a1@(38),%a0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4b5c6: 52a8 000c addql #1,%a0@(12)
4b5ca: 6002 bras 4b5ce <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;
4b5cc: 4280 clrl %d0 <== NOT EXECUTED
return bd;
}
4b5ce: 242e fff8 movel %fp@(-8),%d2
4b5d2: 262e fffc movel %fp@(-4),%d3
4b5d6: 4e5e unlk %fp <== NOT EXECUTED
0004b294 <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)
{
4b294: 4e56 ff58 linkw %fp,#-168
4b298: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b29c: 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);
4b2a0: 4bfa ffb4 lea %pc@(4b256 <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);
4b2a4: 2a3c 0004 b178 movel #307576,%d5
if (b > 1)
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4b2aa: 2c3c 0004 adec movel #306668,%d6
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4b2b0: 2679 0006 1fac moveal 61fac <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))
4b2b6: 6000 02bc braw 4b574 <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)
4b2ba: 4aab 0022 tstl %a3@(34)
4b2be: 6600 02b2 bnew 4b572 <rtems_bdbuf_get_buffer_from_lru_list+0x2de>
{
if (bd->group->bds_per_group == dd->bds_per_group)
4b2c2: 246b 0026 moveal %a3@(38),%a2
4b2c6: 262c 0034 movel %a4@(52),%d3
4b2ca: 202a 0008 movel %a2@(8),%d0
4b2ce: b680 cmpl %d0,%d3
4b2d0: 660e bnes 4b2e0 <rtems_bdbuf_get_buffer_from_lru_list+0x4c>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b2d2: 2f0b movel %a3,%sp@-
4b2d4: 4eba ff80 jsr %pc@(4b256 <rtems_bdbuf_remove_from_tree_and_lru_list>)
4b2d8: 588f addql #4,%sp
4b2da: 224b moveal %a3,%a1
4b2dc: 6000 0082 braw 4b360 <rtems_bdbuf_get_buffer_from_lru_list+0xcc>
empty_bd = bd;
}
else if (bd->group->users == 0)
4b2e0: 4aaa 000c tstl %a2@(12)
4b2e4: 6600 028c bnew 4b572 <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;
4b2e8: 2839 0006 1f8e movel 61f8e <bdbuf_cache+0x1e>,%d4
for (b = 0, bd = group->bdbuf;
4b2ee: 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;
4b2f0: 4c40 4004 remul %d0,%d4,%d4
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b2f4: 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;
4b2f6: 2e2a 0010 movel %a2@(16),%d7
b < group->bds_per_group;
b++, bd += bufs_per_bd)
4b2fa: 4c00 4800 mulsl %d0,%d4
4b2fe: 600a bras 4b30a <rtems_bdbuf_get_buffer_from_lru_list+0x76>
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b300: 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)
4b302: 5282 addql #1,%d2
4b304: de84 addl %d4,%d7
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
4b306: 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)
4b308: 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;
4b30a: b4aa 0008 cmpl %a2@(8),%d2
4b30e: 65f0 bcss 4b300 <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;
4b310: 2239 0006 1f8e movel 61f8e <bdbuf_cache+0x1e>,%d1
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4b316: 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;
4b318: 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;
4b31c: 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;
4b320: 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;
4b324: 2601 movel %d1,%d3
for (b = 1, bd = group->bdbuf + bufs_per_bd;
4b326: 4c02 3800 mulsl %d2,%d3
4b32a: 143c 0001 moveb #1,%d2
4b32e: de83 addl %d3,%d7
4b330: 600c bras 4b33e <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);
4b332: 2f07 movel %d7,%sp@-
4b334: 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)
4b336: 5282 addql #1,%d2
4b338: de83 addl %d3,%d7
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4b33a: 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)
4b33c: 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;
4b33e: b4aa 0008 cmpl %a2@(8),%d2
4b342: 65ee bcss 4b332 <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)
4b344: 7001 moveq #1,%d0
4b346: b082 cmpl %d2,%d0
4b348: 640c bccs 4b356 <rtems_bdbuf_get_buffer_from_lru_list+0xc2>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4b34a: 4879 0006 1fe0 pea 61fe0 <bdbuf_cache+0x70>
4b350: 2046 moveal %d6,%a0
4b352: 4e90 jsr %a0@
4b354: 588f addql #4,%sp
return group->bdbuf;
4b356: 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)
4b35a: 4a89 tstl %a1
4b35c: 6700 0214 beqw 4b572 <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;
4b360: 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;
4b364: 220e movel %fp,%d1
4b366: 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 ;
4b36c: 234c 0012 movel %a4,%a1@(18)
bd->block = block;
bd->avl.left = NULL;
4b370: 42a9 0008 clrl %a1@(8)
bd->avl.right = NULL;
4b374: 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;
4b378: 2079 0006 1fa8 moveal 61fa8 <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;
4b37e: 2340 0016 movel %d0,%a1@(22)
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
4b382: 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)
4b386: 4a88 tstl %a0
4b388: 665a bnes 4b3e4 <rtems_bdbuf_get_buffer_from_lru_list+0x150>
{
*root = node;
4b38a: 23c9 0006 1fa8 movel %a1,61fa8 <bdbuf_cache+0x38>
node->avl.left = NULL;
node->avl.right = NULL;
node->avl.bal = 0;
4b390: 4201 clrb %d1
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
4b392: 42a9 0008 clrl %a1@(8)
node->avl.right = NULL;
node->avl.bal = 0;
4b396: 1341 0011 moveb %d1,%a1@(17)
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
node->avl.right = NULL;
4b39a: 42a9 000c clrl %a1@(12)
4b39e: 6000 01ca braw 4b56a <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)))
4b3a2: b9c0 cmpal %d0,%a4
4b3a4: 6626 bnes 4b3cc <rtems_bdbuf_get_buffer_from_lru_list+0x138><== NEVER TAKEN
4b3a6: 2028 0016 movel %a0@(22),%d0
4b3aa: b0ae 000c cmpl %fp@(12),%d0
4b3ae: 6414 bccs 4b3c4 <rtems_bdbuf_get_buffer_from_lru_list+0x130>
{
p->avl.cache = 1;
q = p->avl.right;
4b3b0: 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;
4b3b4: 7401 moveq #1,%d2
4b3b6: 1142 0010 moveb %d2,%a0@(16)
q = p->avl.right;
if (q == NULL)
4b3ba: 4a80 tstl %d0
4b3bc: 6622 bnes 4b3e0 <rtems_bdbuf_get_buffer_from_lru_list+0x14c>
{
q = node;
p->avl.right = q = node;
4b3be: 2149 000c movel %a1,%a0@(12)
4b3c2: 602e bras 4b3f2 <rtems_bdbuf_get_buffer_from_lru_list+0x15e>
break;
}
}
else if ((p->dd != dd) || (p->block != block))
4b3c4: b0ae 000c cmpl %fp@(12),%d0
4b3c8: 6700 0198 beqw 4b562 <rtems_bdbuf_get_buffer_from_lru_list+0x2ce>
{
p->avl.cache = -1;
q = p->avl.left;
4b3cc: 2028 0008 movel %a0@(8),%d0
break;
}
}
else if ((p->dd != dd) || (p->block != block))
{
p->avl.cache = -1;
4b3d0: 50c3 st %d3
4b3d2: 1143 0010 moveb %d3,%a0@(16)
q = p->avl.left;
if (q == NULL)
4b3d6: 4a80 tstl %d0
4b3d8: 6606 bnes 4b3e0 <rtems_bdbuf_get_buffer_from_lru_list+0x14c>
{
q = node;
p->avl.left = q;
4b3da: 2149 0008 movel %a1,%a0@(8)
4b3de: 6012 bras 4b3f2 <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)
4b3e0: 220a movel %a2,%d1
4b3e2: 2040 moveal %d0,%a0
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4b3e4: 2441 moveal %d1,%a2
if (((uintptr_t) p->dd < (uintptr_t) dd)
4b3e6: 2028 0012 movel %a0@(18),%d0
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
4b3ea: 24c8 movel %a0,%a2@+
if (((uintptr_t) p->dd < (uintptr_t) dd)
4b3ec: b9c0 cmpal %d0,%a4
4b3ee: 62c0 bhis 4b3b0 <rtems_bdbuf_get_buffer_from_lru_list+0x11c><== NEVER TAKEN
4b3f0: 60b0 bras 4b3a2 <rtems_bdbuf_get_buffer_from_lru_list+0x10e>
4b3f2: 2841 moveal %d1,%a4
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
4b3f4: 220e movel %fp,%d1
4b3f6: 0681 ffff ff80 addil #-128,%d1
p = q;
}
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
4b3fc: 4200 clrb %d0
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4b3fe: 42a9 000c clrl %a1@(12)
q->avl.bal = 0;
4b402: 1340 0011 moveb %d0,%a1@(17)
}
p = q;
}
q->avl.left = q->avl.right = NULL;
4b406: 42a9 0008 clrl %a1@(8)
4b40a: 6002 bras 4b40e <rtems_bdbuf_get_buffer_from_lru_list+0x17a>
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
4b40c: 204a moveal %a2,%a0
{
if (p->avl.cache == -1)
4b40e: 76ff moveq #-1,%d3
4b410: 1428 0010 moveb %a0@(16),%d2
4b414: 1028 0011 moveb %a0@(17),%d0
4b418: 49c2 extbl %d2
4b41a: b682 cmpl %d2,%d3
4b41c: 6600 0086 bnew 4b4a4 <rtems_bdbuf_get_buffer_from_lru_list+0x210>
{
switch (p->avl.bal)
4b420: 4a00 tstb %d0
4b422: 671c beqs 4b440 <rtems_bdbuf_get_buffer_from_lru_list+0x1ac>
4b424: 49c0 extbl %d0
4b426: 7401 moveq #1,%d2
4b428: b480 cmpl %d0,%d2
4b42a: 6708 beqs 4b434 <rtems_bdbuf_get_buffer_from_lru_list+0x1a0>
4b42c: b680 cmpl %d0,%d3
4b42e: 6600 00fe bnew 4b52e <rtems_bdbuf_get_buffer_from_lru_list+0x29a>
4b432: 6016 bras 4b44a <rtems_bdbuf_get_buffer_from_lru_list+0x1b6>
{
case 1:
p->avl.bal = 0;
4b434: 4203 clrb %d3
modified = false;
4b436: 4200 clrb %d0
if (p->avl.cache == -1)
{
switch (p->avl.bal)
{
case 1:
p->avl.bal = 0;
4b438: 1143 0011 moveb %d3,%a0@(17)
4b43c: 6000 00f2 braw 4b530 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
modified = false;
break;
case 0:
p->avl.bal = -1;
4b440: 50c0 st %d0
4b442: 1140 0011 moveb %d0,%a0@(17)
4b446: 6000 00e6 braw 4b52e <rtems_bdbuf_get_buffer_from_lru_list+0x29a>
break;
case -1:
p1 = p->avl.left;
4b44a: 2668 0008 moveal %a0@(8),%a3
if (p1->avl.bal == -1) /* simple LL-turn */
4b44e: 74ff moveq #-1,%d2
4b450: 102b 0011 moveb %a3@(17),%d0
4b454: 49c0 extbl %d0
4b456: b480 cmpl %d0,%d2
4b458: 6612 bnes 4b46c <rtems_bdbuf_get_buffer_from_lru_list+0x1d8>
{
p->avl.left = p1->avl.right;
4b45a: 216b 000c 0008 movel %a3@(12),%a0@(8)
p1->avl.right = p;
p->avl.bal = 0;
4b460: 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;
4b462: 2748 000c movel %a0,%a3@(12)
p->avl.bal = 0;
4b466: 1143 0011 moveb %d3,%a0@(17)
4b46a: 607a bras 4b4e6 <rtems_bdbuf_get_buffer_from_lru_list+0x252>
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
4b46c: 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;
4b470: 74ff moveq #-1,%d2
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4b472: 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;
4b474: 102a 0011 moveb %a2@(17),%d0
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
4b478: 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;
4b47e: 49c0 extbl %d0
4b480: b480 cmpl %d0,%d2
4b482: 56c0 sne %d0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
4b484: 254b 0008 movel %a3,%a2@(8)
p->avl.left = p2->avl.right;
4b488: 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;
4b48e: 5280 addql #1,%d0
4b490: 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;
4b494: 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;
4b498: 102a 0011 moveb %a2@(17),%d0
4b49c: 49c0 extbl %d0
4b49e: b680 cmpl %d0,%d3
4b4a0: 57c0 seq %d0
4b4a2: 607c bras 4b520 <rtems_bdbuf_get_buffer_from_lru_list+0x28c>
break;
}
}
else
{
switch (p->avl.bal)
4b4a4: 4a00 tstb %d0
4b4a6: 6716 beqs 4b4be <rtems_bdbuf_get_buffer_from_lru_list+0x22a>
4b4a8: 49c0 extbl %d0
4b4aa: 7401 moveq #1,%d2
4b4ac: b480 cmpl %d0,%d2
4b4ae: 6716 beqs 4b4c6 <rtems_bdbuf_get_buffer_from_lru_list+0x232>
4b4b0: 76ff moveq #-1,%d3
4b4b2: b680 cmpl %d0,%d3
4b4b4: 6678 bnes 4b52e <rtems_bdbuf_get_buffer_from_lru_list+0x29a><== NEVER TAKEN
{
case -1:
p->avl.bal = 0;
4b4b6: 4200 clrb %d0
4b4b8: 1140 0011 moveb %d0,%a0@(17)
4b4bc: 6072 bras 4b530 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
modified = false;
break;
case 0:
p->avl.bal = 1;
4b4be: 7401 moveq #1,%d2
4b4c0: 1142 0011 moveb %d2,%a0@(17)
4b4c4: 6068 bras 4b52e <rtems_bdbuf_get_buffer_from_lru_list+0x29a>
break;
case 1:
p1 = p->avl.right;
4b4c6: 2668 000c moveal %a0@(12),%a3
if (p1->avl.bal == 1) /* simple RR-turn */
4b4ca: 7601 moveq #1,%d3
4b4cc: 102b 0011 moveb %a3@(17),%d0
4b4d0: 49c0 extbl %d0
4b4d2: b680 cmpl %d0,%d3
4b4d4: 6614 bnes 4b4ea <rtems_bdbuf_get_buffer_from_lru_list+0x256><== NEVER TAKEN
{
p->avl.right = p1->avl.left;
4b4d6: 216b 0008 000c movel %a3@(8),%a0@(12)
p1->avl.left = p;
p->avl.bal = 0;
4b4dc: 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;
4b4de: 2748 0008 movel %a0,%a3@(8)
p->avl.bal = 0;
4b4e2: 1140 0011 moveb %d0,%a0@(17)
4b4e6: 244b moveal %a3,%a2
4b4e8: 603a bras 4b524 <rtems_bdbuf_get_buffer_from_lru_list+0x290>
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
4b4ea: 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;
4b4ee: 7401 moveq #1,%d2 <== NOT EXECUTED
if (p2->avl.bal == -1) p1->avl.bal = +1; else p1->avl.bal = 0;
4b4f0: 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;
4b4f2: 102a 0011 moveb %a2@(17),%d0 <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
4b4f6: 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;
4b4fc: 49c0 extbl %d0 <== NOT EXECUTED
4b4fe: b480 cmpl %d0,%d2 <== NOT EXECUTED
4b500: 57c0 seq %d0 <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
4b502: 254b 000c movel %a3,%a2@(12) <== NOT EXECUTED
p->avl.right = p2->avl.left;
4b506: 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;
4b50c: 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;
4b510: 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;
4b514: 102a 0011 moveb %a2@(17),%d0 <== NOT EXECUTED
4b518: 49c0 extbl %d0 <== NOT EXECUTED
4b51a: b680 cmpl %d0,%d3 <== NOT EXECUTED
4b51c: 56c0 sne %d0 <== NOT EXECUTED
4b51e: 5280 addql #1,%d0 <== NOT EXECUTED
4b520: 1740 0011 moveb %d0,%a3@(17)
p = p2;
}
p->avl.bal = 0;
4b524: 204a moveal %a2,%a0
4b526: 4200 clrb %d0
4b528: 1540 0011 moveb %d0,%a2@(17)
4b52c: 6002 bras 4b530 <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
break;
}
}
else
{
switch (p->avl.bal)
4b52e: 7001 moveq #1,%d0
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
4b530: b28c cmpl %a4,%d1
4b532: 641c bccs 4b550 <rtems_bdbuf_get_buffer_from_lru_list+0x2bc>
{
p = *--buf_prev;
4b534: 246c fffc moveal %a4@(-4),%a2
if (p->avl.cache == -1)
4b538: 76ff moveq #-1,%d3
4b53a: 142a 0010 moveb %a2@(16),%d2
4b53e: 49c2 extbl %d2
4b540: b682 cmpl %d2,%d3
4b542: 6606 bnes 4b54a <rtems_bdbuf_get_buffer_from_lru_list+0x2b6>
{
p->avl.left = q;
4b544: 2548 0008 movel %a0,%a2@(8)
4b548: 600e bras 4b558 <rtems_bdbuf_get_buffer_from_lru_list+0x2c4>
}
else
{
p->avl.right = q;
4b54a: 2548 000c movel %a0,%a2@(12)
4b54e: 6008 bras 4b558 <rtems_bdbuf_get_buffer_from_lru_list+0x2c4>
}
}
else
{
*root = p;
4b550: 23c8 0006 1fa8 movel %a0,61fa8 <bdbuf_cache+0x38>
4b556: 6012 bras 4b56a <rtems_bdbuf_get_buffer_from_lru_list+0x2d6>
4b558: 598c subql #4,%a4
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
4b55a: 4a00 tstb %d0
4b55c: 6600 feae bnew 4b40c <rtems_bdbuf_get_buffer_from_lru_list+0x178>
4b560: 6008 bras 4b56a <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);
4b562: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
4b566: 4eba f60e jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4b56a: 7001 moveq #1,%d0
4b56c: 2340 001e movel %d0,%a1@(30)
4b570: 600e bras 4b580 <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 ();
}
4b572: 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))
4b574: b7fc 0006 1fb0 cmpal #401328,%a3
4b57a: 6600 fd3e bnew 4b2ba <rtems_bdbuf_get_buffer_from_lru_list+0x26>
}
node = rtems_chain_next (node);
}
return NULL;
4b57e: 93c9 subal %a1,%a1
}
4b580: 2009 movel %a1,%d0
4b582: 4cee 3cfc ff58 moveml %fp@(-168),%d2-%d7/%a2-%a5
4b588: 4e5e unlk %fp <== NOT EXECUTED
0004c07a <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
4c07a: 4e56 ffd8 linkw %fp,#-40
4c07e: 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())
4c082: 4ab9 0006 2c4c tstl 62c4c <_Per_CPU_Information+0x8>
4c088: 6600 039c bnew 4c426 <rtems_bdbuf_init+0x3ac>
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
4c08c: 2439 0005 f206 movel 5f206 <rtems_bdbuf_configuration+0x24>,%d2
4c092: 2839 0005 f20a movel 5f20a <rtems_bdbuf_configuration+0x28>,%d4
4c098: 4c42 4000 remul %d2,%d0,%d4
4c09c: 4c42 4004 remul %d2,%d4,%d4
4c0a0: 4a80 tstl %d0
4c0a2: 6600 0386 bnew 4c42a <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 ();
4c0a6: 4eba eb90 jsr %pc@(4ac38 <rtems_bdbuf_disable_preemption>)
4c0aa: 2600 movel %d0,%d3
if (bdbuf_cache.initialised)
4c0ac: 4a39 0006 2001 tstb 62001 <bdbuf_cache+0x91>
4c0b2: 670e beqs 4c0c2 <rtems_bdbuf_init+0x48> <== ALWAYS TAKEN
{
rtems_bdbuf_restore_preemption (prev_mode);
4c0b4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c0b6: 4eba ebb0 jsr %pc@(4ac68 <rtems_bdbuf_restore_preemption>)<== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
4c0ba: 588f addql #4,%sp <== NOT EXECUTED
4c0bc: 700c moveq #12,%d0 <== NOT EXECUTED
4c0be: 6000 036c braw 4c42c <rtems_bdbuf_init+0x3b2> <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
4c0c2: 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;
4c0c6: 2c3c 0006 1f76 movel #401270,%d6
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c0cc: 2e3c 0006 1fb0 movel #401328,%d7
4c0d2: 42a7 clrl %sp@-
4c0d4: 4879 0006 1f70 pea 61f70 <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'),
4c0da: 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));
4c0e0: 4eb9 0005 13b4 jsr 513b4 <memset>
bdbuf_cache.initialised = true;
4c0e6: 7001 moveq #1,%d0
rtems_bdbuf_restore_preemption (prev_mode);
4c0e8: 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;
4c0ea: 13c0 0006 2001 moveb %d0,62001 <bdbuf_cache+0x91>
rtems_bdbuf_restore_preemption (prev_mode);
4c0f0: 4eba eb76 jsr %pc@(4ac68 <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'),
4c0f4: 4879 0006 1f96 pea 61f96 <bdbuf_cache+0x26>
4c0fa: 223c 0006 1f7a movel #401274,%d1
head->previous = NULL;
tail->previous = head;
4c100: 203c 0006 1fac movel #401324,%d0
4c106: 42a7 clrl %sp@-
4c108: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4c10c: 4878 0001 pea 1 <ADD>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c110: 23c1 0006 1f76 movel %d1,61f76 <bdbuf_cache+0x6>
4c116: 223c 0006 1fbc movel #401340,%d1
head->previous = NULL;
tail->previous = head;
4c11c: 23c6 0006 1f7e movel %d6,61f7e <bdbuf_cache+0xe>
4c122: 2c3c 0006 1fb8 movel #401336,%d6
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c128: 23c7 0006 1fac movel %d7,61fac <bdbuf_cache+0x3c>
4c12e: 2e3c 0006 1fc8 movel #401352,%d7
head->previous = NULL;
tail->previous = head;
4c134: 23c0 0006 1fb4 movel %d0,61fb4 <bdbuf_cache+0x44>
4c13a: 203c 0006 1fc4 movel #401348,%d0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c140: 23c1 0006 1fb8 movel %d1,61fb8 <bdbuf_cache+0x48>
head->previous = NULL;
tail->previous = head;
4c146: 23c6 0006 1fc0 movel %d6,61fc0 <bdbuf_cache+0x50>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c14c: 223c 0006 1ff8 movel #401400,%d1
head->previous = NULL;
tail->previous = head;
4c152: 2c3c 0006 1ff4 movel #401396,%d6
4c158: 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;
4c15e: 42b9 0006 1fa4 clrl 61fa4 <bdbuf_cache+0x34>
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4c164: 42b9 0006 1f7a clrl 61f7a <bdbuf_cache+0xa>
4c16a: 42b9 0006 1fb0 clrl 61fb0 <bdbuf_cache+0x40>
4c170: 42b9 0006 1fbc clrl 61fbc <bdbuf_cache+0x4c>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c176: 23c7 0006 1fc4 movel %d7,61fc4 <bdbuf_cache+0x54>
head->previous = NULL;
4c17c: 42b9 0006 1fc8 clrl 61fc8 <bdbuf_cache+0x58>
tail->previous = head;
4c182: 23c0 0006 1fcc movel %d0,61fcc <bdbuf_cache+0x5c>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4c188: 23c1 0006 1ff4 movel %d1,61ff4 <bdbuf_cache+0x84>
head->previous = NULL;
4c18e: 42b9 0006 1ff8 clrl 61ff8 <bdbuf_cache+0x88>
tail->previous = head;
4c194: 23c6 0006 1ffc movel %d6,61ffc <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'),
4c19a: 4e92 jsr %a2@
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
4c19c: 4fef 0024 lea %sp@(36),%sp
4c1a0: 4a80 tstl %d0
4c1a2: 6600 01f4 bnew 4c398 <rtems_bdbuf_init+0x31e>
goto error;
rtems_bdbuf_lock_cache ();
4c1a6: 4eba ea06 jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
4c1aa: 4879 0006 1f9a pea 61f9a <bdbuf_cache+0x2a>
4c1b0: 42a7 clrl %sp@-
4c1b2: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4c1b6: 4878 0001 pea 1 <ADD>
4c1ba: 2f3c 4244 4373 movel #1111769971,%sp@-
4c1c0: 4e92 jsr %a2@
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
4c1c2: 4fef 0014 lea %sp@(20),%sp
4c1c6: 4a80 tstl %d0
4c1c8: 6600 01ce bnew 4c398 <rtems_bdbuf_init+0x31e>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
4c1cc: 4879 0006 1fd4 pea 61fd4 <bdbuf_cache+0x64>
4c1d2: 42a7 clrl %sp@-
4c1d4: 4878 0024 pea 24 <OPER2+0x10>
4c1d8: 42a7 clrl %sp@-
4c1da: 2f3c 4244 4361 movel #1111769953,%sp@-
4c1e0: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4c1e2: 4fef 0014 lea %sp@(20),%sp
4c1e6: 4a80 tstl %d0
4c1e8: 6600 01ae bnew 4c398 <rtems_bdbuf_init+0x31e>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
4c1ec: 4879 0006 1fdc pea 61fdc <bdbuf_cache+0x6c>
4c1f2: 42a7 clrl %sp@-
4c1f4: 4878 0024 pea 24 <OPER2+0x10>
4c1f8: 42a7 clrl %sp@-
4c1fa: 2f3c 4244 4374 movel #1111769972,%sp@-
4c200: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4c202: 4fef 0014 lea %sp@(20),%sp
4c206: 4a80 tstl %d0
4c208: 6600 018e bnew 4c398 <rtems_bdbuf_init+0x31e>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
4c20c: 4879 0006 1fe4 pea 61fe4 <bdbuf_cache+0x74>
4c212: 42a7 clrl %sp@-
4c214: 4878 0024 pea 24 <OPER2+0x10>
4c218: 42a7 clrl %sp@-
4c21a: 2f3c 4244 4362 movel #1111769954,%sp@-
4c220: 4e92 jsr %a2@
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
4c222: 4fef 0014 lea %sp@(20),%sp
4c226: 4a80 tstl %d0
4c228: 6600 016e bnew 4c398 <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;
4c22c: 2639 0005 f202 movel 5f202 <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),
4c232: 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;
4c238: 4c42 3003 remul %d2,%d3,%d3
bdbuf_cache.max_bds_per_group =
4c23c: 23c4 0006 1f8e movel %d4,61f8e <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;
4c242: 2e03 movel %d3,%d7
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.bds = calloc (sizeof (rtems_bdbuf_buffer),
4c244: 2f03 movel %d3,%sp@-
4c246: 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;
4c24a: 4c44 7007 remul %d4,%d7,%d7
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
4c24e: 23c3 0006 1f8a movel %d3,61f8a <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 =
4c254: 23c7 0006 1fe8 movel %d7,61fe8 <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),
4c25a: 4e92 jsr %a2@
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
4c25c: 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),
4c25e: 23c0 0006 1f82 movel %d0,61f82 <bdbuf_cache+0x12>
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
4c264: 6700 0132 beqw 4c398 <rtems_bdbuf_init+0x31e>
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
4c268: 2f07 movel %d7,%sp@-
4c26a: 4878 0014 pea 14 <OPER2>
4c26e: 4e92 jsr %a2@
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
4c270: 508f addql #8,%sp
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
4c272: 23c0 0006 1fec movel %d0,61fec <bdbuf_cache+0x7c>
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
4c278: 6700 011e beqw 4c398 <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,
4c27c: 4c02 3800 mulsl %d2,%d3
4c280: 2f03 movel %d3,%sp@-
4c282: 4878 0020 pea 20 <OPER2+0xc>
4c286: 4879 0006 1f86 pea 61f86 <bdbuf_cache+0x16>
4c28c: 4eb9 0004 dcf8 jsr 4dcf8 <rtems_memalign>
4c292: 4fef 000c lea %sp@(12),%sp
4c296: 4a80 tstl %d0
4c298: 6600 00fe bnew 4c398 <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) ==
4c29c: 2a39 0006 1f8e movel 61f8e <bdbuf_cache+0x1e>,%d5
(bdbuf_cache.max_bds_per_group - 1))
4c2a2: 2a45 moveal %d5,%a5
4c2a4: 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,
4c2a6: 2279 0006 1fec moveal 61fec <bdbuf_cache+0x7c>,%a1
4c2ac: 2609 movel %a1,%d3
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
4c2ae: 2239 0006 1f82 movel 61f82 <bdbuf_cache+0x12>,%d1
4c2b4: 2041 moveal %d1,%a0
4c2b6: 2839 0006 1f86 movel 61f86 <bdbuf_cache+0x16>,%d4
b < bdbuf_cache.buffer_min_count;
4c2bc: 2879 0006 1f8a moveal 61f8a <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,
4c2c2: 603c bras 4c300 <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;
4c2c4: 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) ==
4c2c8: 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;
4c2ca: 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) ==
4c2ce: 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;
4c2d2: 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;
4c2d6: 2479 0006 1fb4 moveal 61fb4 <bdbuf_cache+0x44>,%a2
the_node->next = tail;
4c2dc: 20bc 0006 1fb0 movel #401328,%a0@
tail->previous = the_node;
4c2e2: 23c8 0006 1fb4 movel %a0,61fb4 <bdbuf_cache+0x44>
old_last->next = the_node;
4c2e8: 2488 movel %a0,%a2@
the_node->previous = old_last;
4c2ea: 214a 0004 movel %a2,%a0@(4)
rtems_chain_append_unprotected (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
4c2ee: bbc7 cmpal %d7,%a5
4c2f0: 6606 bnes 4c2f8 <rtems_bdbuf_init+0x27e>
(bdbuf_cache.max_bds_per_group - 1))
group++;
4c2f2: 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)
4c2f8: 5280 addql #1,%d0
4c2fa: 41e8 0036 lea %a0@(54),%a0
4c2fe: 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,
4c300: b9c0 cmpal %d0,%a4
4c302: 66c0 bnes 4c2c4 <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;
4c304: 2439 0006 1f8e movel 61f8e <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)
4c30a: 7636 moveq #54,%d3
4c30c: 4c02 3800 mulsl %d2,%d3
4c310: 4280 clrl %d0
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
4c312: 2079 0006 1fe8 moveal 61fe8 <bdbuf_cache+0x78>,%a0
4c318: 6010 bras 4c32a <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;
4c31a: 2341 0010 movel %d1,%a1@(16)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
4c31e: 5280 addql #1,%d0
group++,
bd += bdbuf_cache.max_bds_per_group)
4c320: d283 addl %d3,%d1
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
4c322: 2342 0008 movel %d2,%a1@(8)
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
4c326: 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,
4c32a: b1c0 cmpal %d0,%a0
4c32c: 66ec bnes 4c31a <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'),
4c32e: 4879 0006 1f70 pea 61f70 <bdbuf_cache>
4c334: 45fa eade lea %pc@(4ae14 <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;
4c338: 7001 moveq #1,%d0
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
4c33a: 42a7 clrl %sp@-
4c33c: 487a f770 pea %pc@(4baae <rtems_bdbuf_swapout_task>)
4c340: 2f39 0005 f1ea movel 5f1ea <rtems_bdbuf_configuration+0x8>,%sp@-
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
4c346: 13c0 0006 1f74 moveb %d0,61f74 <bdbuf_cache+0x4>
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'S', 'W', 'P'),
4c34c: 2f3c 4253 5750 movel #1112758096,%sp@-
4c352: 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)
4c354: 4fef 0014 lea %sp@(20),%sp
4c358: 4a80 tstl %d0
4c35a: 663c bnes 4c398 <rtems_bdbuf_init+0x31e> <== NEVER TAKEN
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
4c35c: 4ab9 0005 f1e2 tstl 5f1e2 <rtems_bdbuf_configuration>
4c362: 660a bnes 4c36e <rtems_bdbuf_init+0x2f4>
&bdbuf_cache.read_ahead_task);
if (sc != RTEMS_SUCCESSFUL)
goto error;
}
rtems_bdbuf_unlock_cache ();
4c364: 4eba e894 jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c368: 4280 clrl %d0
4c36a: 6000 00c0 braw 4c42c <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'),
4c36e: 4879 0006 1ff0 pea 61ff0 <bdbuf_cache+0x80>
if (sc != RTEMS_SUCCESSFUL)
goto error;
if (bdbuf_config.max_read_ahead_blocks > 0)
{
bdbuf_cache.read_ahead_enabled = true;
4c374: 7201 moveq #1,%d1
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
4c376: 42a7 clrl %sp@-
4c378: 487a fb42 pea %pc@(4bebc <rtems_bdbuf_read_ahead_task>)
4c37c: 2f39 0005 f20e movel 5f20e <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;
4c382: 13c1 0006 2000 moveb %d1,62000 <bdbuf_cache+0x90>
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'R', 'D', 'A'),
4c388: 2f3c 4252 4441 movel #1112687681,%sp@-
4c38e: 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)
4c390: 4fef 0014 lea %sp@(20),%sp
4c394: 4a80 tstl %d0
4c396: 67cc beqs 4c364 <rtems_bdbuf_init+0x2ea> <== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
error:
if (bdbuf_cache.read_ahead_task != 0)
4c398: 2039 0006 1ff0 movel 61ff0 <bdbuf_cache+0x80>,%d0 <== NOT EXECUTED
4c39e: 670a beqs 4c3aa <rtems_bdbuf_init+0x330> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.read_ahead_task);
4c3a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c3a2: 4eb9 0004 76d4 jsr 476d4 <rtems_task_delete> <== NOT EXECUTED
4c3a8: 588f addql #4,%sp <== NOT EXECUTED
if (bdbuf_cache.swapout != 0)
4c3aa: 2039 0006 1f70 movel 61f70 <bdbuf_cache>,%d0 <== NOT EXECUTED
4c3b0: 670a beqs 4c3bc <rtems_bdbuf_init+0x342> <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
4c3b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c3b4: 4eb9 0004 76d4 jsr 476d4 <rtems_task_delete> <== NOT EXECUTED
4c3ba: 588f addql #4,%sp <== NOT EXECUTED
free (bdbuf_cache.buffers);
4c3bc: 2f39 0006 1f86 movel 61f86 <bdbuf_cache+0x16>,%sp@- <== NOT EXECUTED
4c3c2: 45f9 0004 3810 lea 43810 <free>,%a2 <== NOT EXECUTED
4c3c8: 4e92 jsr %a2@ <== NOT EXECUTED
free (bdbuf_cache.groups);
4c3ca: 2f39 0006 1fec movel 61fec <bdbuf_cache+0x7c>,%sp@- <== NOT EXECUTED
4c3d0: 4e92 jsr %a2@ <== NOT EXECUTED
free (bdbuf_cache.bds);
4c3d2: 2f39 0006 1f82 movel 61f82 <bdbuf_cache+0x12>,%sp@- <== NOT EXECUTED
4c3d8: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
4c3da: 2f39 0006 1fe4 movel 61fe4 <bdbuf_cache+0x74>,%sp@- <== NOT EXECUTED
4c3e0: 45f9 0004 7308 lea 47308 <rtems_semaphore_delete>,%a2 <== NOT EXECUTED
4c3e6: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
4c3e8: 2f39 0006 1fd4 movel 61fd4 <bdbuf_cache+0x64>,%sp@- <== NOT EXECUTED
4c3ee: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
4c3f0: 2f39 0006 1fdc movel 61fdc <bdbuf_cache+0x6c>,%sp@- <== NOT EXECUTED
4c3f6: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
4c3f8: 2f39 0006 1f9a movel 61f9a <bdbuf_cache+0x2a>,%sp@- <== NOT EXECUTED
4c3fe: 4e92 jsr %a2@ <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
4c400: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4c404: 4ab9 0006 1f96 tstl 61f96 <bdbuf_cache+0x26> <== NOT EXECUTED
4c40a: 670e beqs 4c41a <rtems_bdbuf_init+0x3a0> <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
4c40c: 4eba e7ec jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
4c410: 2f39 0006 1f96 movel 61f96 <bdbuf_cache+0x26>,%sp@- <== NOT EXECUTED
4c416: 4e92 jsr %a2@ <== NOT EXECUTED
4c418: 588f addql #4,%sp <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
4c41a: 700d moveq #13,%d0 <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
rtems_semaphore_delete (bdbuf_cache.lock);
}
bdbuf_cache.initialised = false;
4c41c: 4206 clrb %d6 <== NOT EXECUTED
4c41e: 13c6 0006 2001 moveb %d6,62001 <bdbuf_cache+0x91> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
4c424: 6006 bras 4c42c <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;
4c426: 7012 moveq #18,%d0 <== NOT EXECUTED
4c428: 6002 bras 4c42c <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;
4c42a: 700a moveq #10,%d0 <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
return RTEMS_UNSATISFIED;
}
4c42c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
4c432: 4e5e unlk %fp <== NOT EXECUTED
0004ab88 <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)
{
4ab88: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_semaphore_obtain (lock,
4ab8c: 42a7 clrl %sp@-
4ab8e: 42a7 clrl %sp@-
4ab90: 2f2e 0008 movel %fp@(8),%sp@-
4ab94: 4eb9 0004 73a4 jsr 473a4 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4ab9a: 4fef 000c lea %sp@(12),%sp
4ab9e: 4a80 tstl %d0
4aba0: 6708 beqs 4abaa <rtems_bdbuf_lock+0x22> <== ALWAYS TAKEN
rtems_bdbuf_fatal (fatal_error_code);
4aba2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4aba6: 4eba ffce jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4abaa: 4e5e unlk %fp <== NOT EXECUTED
0004c8c6 <rtems_bdbuf_purge_dev>:
}
}
void
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
4c8c6: 4e56 ff5c linkw %fp,#-164
4c8ca: 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;
4c8ce: 240e movel %fp,%d2
4c8d0: 0682 ffff ff74 addil #-140,%d2
4c8d6: 2002 movel %d2,%d0
4c8d8: 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;
4c8da: 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);
4c8de: 4bfa e50c lea %pc@(4adec <rtems_bdbuf_wake>),%a5
}
}
void
rtems_bdbuf_purge_dev (rtems_disk_device *dd)
{
4c8e2: 286e 0008 moveal %fp@(8),%a4
4c8e6: 2d40 ff74 movel %d0,%fp@(-140)
head->previous = NULL;
4c8ea: 42ae ff78 clrl %fp@(-136)
tail->previous = head;
4c8ee: 2d42 ff7c movel %d2,%fp@(-132)
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
4c8f2: 4eba e2ba jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
}
static void
rtems_bdbuf_read_ahead_reset (rtems_disk_device *dd)
{
rtems_bdbuf_read_ahead_cancel (dd);
4c8f6: 2f0c movel %a4,%sp@-
4c8f8: 4eba f6f4 jsr %pc@(4bfee <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;
4c8fc: 2479 0006 1fa8 moveal 61fa8 <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;
4c902: 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;
4c904: 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;
4c906: 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;
4c90a: 42ae ff80 clrl %fp@(-128)
4c90e: 6000 00ba braw 4c9ca <rtems_bdbuf_purge_dev+0x104>
while (cur != NULL)
{
if (cur->dd == dd)
4c912: b9ea 0012 cmpal %a2@(18),%a4
4c916: 6600 007e bnew 4c996 <rtems_bdbuf_purge_dev+0xd0>
{
switch (cur->state)
4c91a: 700a moveq #10,%d0
4c91c: b0aa 001e cmpl %a2@(30),%d0
4c920: 6500 006c bcsw 4c98e <rtems_bdbuf_purge_dev+0xc8>
4c924: 202a 001e movel %a2@(30),%d0
4c928: d080 addl %d0,%d0
4c92a: 303b 0808 movew %pc@(4c934 <rtems_bdbuf_purge_dev+0x6e>,%d0:l),%d0
4c92e: 48c0 extl %d0
4c930: 4efb 0802 jmp %pc@(4c934 <rtems_bdbuf_purge_dev+0x6e>,%d0:l)
4c934: 0062 .short 0x0062 <== NOT EXECUTED
4c936: 0062 .short 0x0062 <== NOT EXECUTED
4c938: 0028 .short 0x0028 <== NOT EXECUTED
4c93a: 0052 .short 0x0052 <== NOT EXECUTED
4c93c: 0052 .short 0x0052 <== NOT EXECUTED
4c93e: 0052 .short 0x0052 <== NOT EXECUTED
4c940: 0062 .short 0x0062 <== NOT EXECUTED
4c942: 0020 .short 0x0020 <== NOT EXECUTED
4c944: 0016 .short 0x0016 <== NOT EXECUTED
4c946: 004a .short 0x004a <== NOT EXECUTED
4c948: 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);
4c94a: 4879 0006 1fd8 pea 61fd8 <bdbuf_cache+0x68>
4c950: 4e95 jsr %a5@
4c952: 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 ();
}
4c954: 206a 0026 moveal %a2@(38),%a0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c958: 53a8 000c subql #1,%a0@(12)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4c95c: 206a 0004 moveal %a2@(4),%a0
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
4c960: 2202 movel %d2,%d1
4c962: 5881 addql #4,%d1
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4c964: 2252 moveal %a2@,%a1
previous = the_node->previous;
next->previous = previous;
4c966: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4c96a: 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;
4c96c: 206e ff7c moveal %fp@(-132),%a0
the_node->next = tail;
4c970: 2481 movel %d1,%a2@
tail->previous = the_node;
4c972: 2d4a ff7c movel %a2,%fp@(-132)
old_last->next = the_node;
4c976: 208a movel %a2,%a0@
the_node->previous = old_last;
4c978: 2548 0004 movel %a0,%a2@(4)
4c97c: 6018 bras 4c996 <rtems_bdbuf_purge_dev+0xd0>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c97e: 700a moveq #10,%d0
4c980: 2540 001e movel %d0,%a2@(30)
4c984: 6010 bras 4c996 <rtems_bdbuf_purge_dev+0xd0>
4c986: 7206 moveq #6,%d1
4c988: 2541 001e movel %d1,%a2@(30)
4c98c: 6008 bras 4c996 <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);
4c98e: 4878 0017 pea 17 <OPER2+0x3> <== NOT EXECUTED
4c992: 4eba e1e2 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
}
if (cur->avl.left != NULL)
4c996: 206a 0008 moveal %a2@(8),%a0
4c99a: 4a88 tstl %a0
4c99c: 6702 beqs 4c9a0 <rtems_bdbuf_purge_dev+0xda>
4c99e: 6008 bras 4c9a8 <rtems_bdbuf_purge_dev+0xe2>
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
4c9a0: 206a 000c moveal %a2@(12),%a0
4c9a4: 4a88 tstl %a0
4c9a6: 670c beqs 4c9b4 <rtems_bdbuf_purge_dev+0xee>
{
/* Right */
++prev;
*prev = cur;
4c9a8: 274a 0004 movel %a2,%a3@(4)
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
{
/* Right */
++prev;
4c9ac: 588b addql #4,%a3
4c9ae: 6018 bras 4c9c8 <rtems_bdbuf_purge_dev+0x102>
while (*prev != NULL
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
{
/* Up */
cur = *prev;
--prev;
4c9b0: 598b subql #4,%a3
4c9b2: 2448 moveal %a0,%a2
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL
4c9b4: 2053 moveal %a3@,%a0
4c9b6: 4a88 tstl %a0
4c9b8: 670e beqs 4c9c8 <rtems_bdbuf_purge_dev+0x102>
&& (cur == (*prev)->avl.right || (*prev)->avl.right == NULL))
4c9ba: 2028 000c movel %a0@(12),%d0
4c9be: b08a cmpl %a2,%d0
4c9c0: 67ee beqs 4c9b0 <rtems_bdbuf_purge_dev+0xea>
4c9c2: 4a80 tstl %d0
4c9c4: 67ea beqs 4c9b0 <rtems_bdbuf_purge_dev+0xea>
cur = *prev;
--prev;
}
if (*prev != NULL)
/* Right */
cur = (*prev)->avl.right;
4c9c6: 2040 moveal %d0,%a0
4c9c8: 2448 moveal %a0,%a2
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
4c9ca: 4a8a tstl %a2
4c9cc: 6600 ff44 bnew 4c912 <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);
4c9d0: 49ee ff74 lea %fp@(-140),%a4
4c9d4: 47fa e17a lea %pc@(4ab50 <_Chain_Get_unprotected>),%a3
{
rtems_bdbuf_make_empty (bd);
if (bd->waiters == 0)
{
rtems_bdbuf_remove_from_tree (bd);
4c9d8: 4bfa e4aa lea %pc@(4ae84 <rtems_bdbuf_remove_from_tree>),%a5
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4c9dc: 263c 0004 b178 movel #307576,%d3
}
static void
rtems_bdbuf_purge_list (rtems_chain_control *purge_list)
{
bool wake_buffer_waiters = false;
4c9e2: 4202 clrb %d2
4c9e4: 601e bras 4ca04 <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)
4c9e6: 202a 0022 movel %a2@(34),%d0
4c9ea: 6602 bnes 4c9ee <rtems_bdbuf_purge_dev+0x128>
wake_buffer_waiters = true;
4c9ec: 7401 moveq #1,%d2
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c9ee: 7201 moveq #1,%d1
4c9f0: 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)
4c9f4: 4a80 tstl %d0
4c9f6: 660c bnes 4ca04 <rtems_bdbuf_purge_dev+0x13e>
{
rtems_bdbuf_remove_from_tree (bd);
4c9f8: 2f0a movel %a2,%sp@-
4c9fa: 4e95 jsr %a5@
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4c9fc: 2043 moveal %d3,%a0
4c9fe: 2f0a movel %a2,%sp@-
4ca00: 4e90 jsr %a0@
4ca02: 508f addql #8,%sp
4ca04: 2f0c movel %a4,%sp@-
4ca06: 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)
4ca08: 588f addql #4,%sp
4ca0a: 2440 moveal %d0,%a2
4ca0c: 4a80 tstl %d0
4ca0e: 66d6 bnes 4c9e6 <rtems_bdbuf_purge_dev+0x120>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
4ca10: 4a02 tstb %d2
4ca12: 670c beqs 4ca20 <rtems_bdbuf_purge_dev+0x15a>
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4ca14: 4879 0006 1fe0 pea 61fe0 <bdbuf_cache+0x70>
4ca1a: 4eba e3d0 jsr %pc@(4adec <rtems_bdbuf_wake>)
4ca1e: 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 ();
4ca20: 4eba e1d8 jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
}
4ca24: 4cee 3c0c ff5c moveml %fp@(-164),%d2-%d3/%a2-%a5
4ca2a: 4e5e unlk %fp <== NOT EXECUTED
0004c4f4 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (rtems_disk_device *dd,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
4c4f4: 4e56 ffe4 linkw %fp,#-28
4c4f8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
4c4fc: 246e 0008 moveal %fp@(8),%a2
4c500: 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 ();
4c504: 4eba e6a8 jsr %pc@(4abae <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)
4c508: bcaa 0028 cmpl %a2@(40),%d6
4c50c: 6400 0158 bccw 4c666 <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)
4c510: 202a 0030 movel %a2@(48),%d0
4c514: 6d06 blts 4c51c <rtems_bdbuf_read+0x28> <== NEVER TAKEN
return block << dd->block_to_media_block_shift;
4c516: 2206 movel %d6,%d1
4c518: e1a9 lsll %d0,%d1
4c51a: 6030 bras 4c54c <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);
4c51c: 2a2a 0024 movel %a2@(36),%d5 <== NOT EXECUTED
4c520: 4284 clrl %d4 <== NOT EXECUTED
4c522: 4282 clrl %d2 <== NOT EXECUTED
4c524: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4c526: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4c528: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4c52a: 42a7 clrl %sp@- <== NOT EXECUTED
4c52c: 4eb9 0005 d130 jsr 5d130 <__muldi3> <== NOT EXECUTED
4c532: 262a 0020 movel %a2@(32),%d3 <== NOT EXECUTED
4c536: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c53a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c53c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c53e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4c540: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c542: 4eb9 0005 da2c jsr 5da2c <__udivdi3> <== NOT EXECUTED
4c548: 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);
4c54c: d2aa 0018 addl %a2@(24),%d1
4c550: 2f01 movel %d1,%sp@-
4c552: 2f0a movel %a2,%sp@-
4c554: 4eba f084 jsr %pc@(4b5da <rtems_bdbuf_get_buffer_for_access>)
switch (bd->state)
4c558: 508f addql #8,%sp
4c55a: 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);
4c55c: 2640 moveal %d0,%a3
switch (bd->state)
4c55e: 202b 001e movel %a3@(30),%d0
4c562: b280 cmpl %d0,%d1
4c564: 6712 beqs 4c578 <rtems_bdbuf_read+0x84>
4c566: 123c 0007 moveb #7,%d1
4c56a: b280 cmpl %d0,%d1
4c56c: 6716 beqs 4c584 <rtems_bdbuf_read+0x90>
4c56e: 123c 0001 moveb #1,%d1
4c572: b280 cmpl %d0,%d1
4c574: 666e bnes 4c5e4 <rtems_bdbuf_read+0xf0> <== NEVER TAKEN
4c576: 601a bras 4c592 <rtems_bdbuf_read+0x9e>
{
case RTEMS_BDBUF_STATE_CACHED:
++dd->stats.read_hits;
4c578: 52aa 0042 addql #1,%a2@(66)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c57c: 7003 moveq #3,%d0
4c57e: 2740 001e movel %d0,%a3@(30)
4c582: 600a bras 4c58e <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;
4c584: 52aa 0042 addql #1,%a2@(66)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c588: 7204 moveq #4,%d1
4c58a: 2741 001e movel %d1,%a3@(30)
4c58e: 4282 clrl %d2
4c590: 605e bras 4c5f0 <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;
4c592: 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)
4c596: bcaa 006a cmpl %a2@(106),%d6
4c59a: 6718 beqs 4c5b4 <rtems_bdbuf_read+0xc0>
{
rtems_bdbuf_read_ahead_cancel (dd);
4c59c: 2f0a movel %a2,%sp@-
4c59e: 4eba fa4e jsr %pc@(4bfee <rtems_bdbuf_read_ahead_cancel>)
dd->read_ahead.trigger = block + 1;
dd->read_ahead.next = block + 2;
4c5a2: 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;
4c5a4: 2006 movel %d6,%d0
dd->read_ahead.next = block + 2;
4c5a6: 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;
4c5a8: 5280 addql #1,%d0
dd->read_ahead.next = block + 2;
4c5aa: 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;
4c5ac: 2540 006a movel %d0,%a2@(106)
dd->read_ahead.next = block + 2;
4c5b0: 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);
4c5b4: 4878 0001 pea 1 <ADD>
4c5b8: 2f0b movel %a3,%sp@-
4c5ba: 2f0a movel %a2,%sp@-
4c5bc: 4eba f83a jsr %pc@(4bdf8 <rtems_bdbuf_execute_read_request>)
if (sc == RTEMS_SUCCESSFUL)
4c5c0: 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);
4c5c4: 2400 movel %d0,%d2
if (sc == RTEMS_SUCCESSFUL)
4c5c6: 6626 bnes 4c5ee <rtems_bdbuf_read+0xfa>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c5c8: 7003 moveq #3,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4c5ca: 206b 0004 moveal %a3@(4),%a0
4c5ce: 2740 001e movel %d0,%a3@(30)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4c5d2: 2253 moveal %a3@,%a1
previous = the_node->previous;
next->previous = previous;
4c5d4: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4c5d8: 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 ();
}
4c5da: 206b 0026 moveal %a3@(38),%a0
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
4c5de: 52a8 000c addql #1,%a0@(12)
4c5e2: 600c bras 4c5f0 <rtems_bdbuf_read+0xfc>
{
bd = NULL;
}
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_4);
4c5e4: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
4c5e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c5ea: 4eba e5d8 jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
rtems_chain_extract_unprotected (&bd->link);
rtems_bdbuf_group_obtain (bd);
}
else
{
bd = NULL;
4c5ee: 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
4c5f0: 2239 0006 1ff0 movel 61ff0 <bdbuf_cache+0x80>,%d1
4c5f6: 6772 beqs 4c66a <rtems_bdbuf_read+0x176>
&& dd->read_ahead.trigger == block
4c5f8: bcaa 006a cmpl %a2@(106),%d6
4c5fc: 666c bnes 4c66a <rtems_bdbuf_read+0x176>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
4c5fe: 4aaa 0062 tstl %a2@(98)
4c602: 660c bnes 4c610 <rtems_bdbuf_read+0x11c> <== NEVER TAKEN
4c604: 4aaa 0066 tstl %a2@(102)
4c608: 57c0 seq %d0
4c60a: 49c0 extbl %d0
4c60c: 4480 negl %d0
4c60e: 6002 bras 4c612 <rtems_bdbuf_read+0x11e>
4c610: 4280 clrl %d0 <== NOT EXECUTED
&& !rtems_bdbuf_is_read_ahead_active (dd))
4c612: 0800 0000 btst #0,%d0
4c616: 6752 beqs 4c66a <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))
4c618: 203c 0006 1ff8 movel #401400,%d0
4c61e: b0b9 0006 1ff4 cmpl 61ff4 <bdbuf_cache+0x84>,%d0
4c624: 661a bnes 4c640 <rtems_bdbuf_read+0x14c> <== NEVER TAKEN
{
sc = rtems_event_send (bdbuf_cache.read_ahead_task,
4c626: 4878 0002 pea 2 <DOUBLE_FLOAT>
4c62a: 2f01 movel %d1,%sp@-
4c62c: 4eb9 0004 6f6c jsr 46f6c <rtems_event_send>
RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
if (sc != RTEMS_SUCCESSFUL)
4c632: 508f addql #8,%sp
4c634: 4a80 tstl %d0
4c636: 6708 beqs 4c640 <rtems_bdbuf_read+0x14c> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_RA_WAKE_UP);
4c638: 4878 0007 pea 7 <TRUNCDFSF> <== NOT EXECUTED
4c63c: 4eba e538 jsr %pc@(4ab76 <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;
4c640: 2079 0006 1ffc moveal 61ffc <bdbuf_cache+0x8c>,%a0
}
rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
4c646: 200a movel %a2,%d0
4c648: 0680 0000 0062 addil #98,%d0
the_node->next = tail;
4c64e: 223c 0006 1ff8 movel #401400,%d1
tail->previous = the_node;
4c654: 23c0 0006 1ffc movel %d0,61ffc <bdbuf_cache+0x8c>
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
4c65a: 2541 0062 movel %d1,%a2@(98)
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
4c65e: 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;
4c662: 2080 movel %d0,%a0@
4c664: 6004 bras 4c66a <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;
4c666: 97cb subal %a3,%a3 <== NOT EXECUTED
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
4c668: 7404 moveq #4,%d2 <== NOT EXECUTED
}
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
4c66a: 4eba e58e jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
*bd_ptr = bd;
4c66e: 206e 0010 moveal %fp@(16),%a0
return sc;
}
4c672: 2002 movel %d2,%d0
rtems_bdbuf_check_read_ahead_trigger (dd, block);
}
rtems_bdbuf_unlock_cache ();
*bd_ptr = bd;
4c674: 208b movel %a3,%a0@
return sc;
}
4c676: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
4c67c: 4e5e unlk %fp <== NOT EXECUTED
0004bfee <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)
{
4bfee: 4e56 0000 linkw %fp,#0
4bff2: 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);
4bff6: 2268 0062 moveal %a0@(98),%a1
4bffa: 2f0a movel %a2,%sp@-
4bffc: 4a89 tstl %a1
4bffe: 660c bnes 4c00c <rtems_bdbuf_read_ahead_cancel+0x1e><== NEVER TAKEN
4c000: 4aa8 0066 tstl %a0@(102)
4c004: 57c0 seq %d0
4c006: 49c0 extbl %d0
4c008: 4480 negl %d0
4c00a: 6002 bras 4c00e <rtems_bdbuf_read_ahead_cancel+0x20>
4c00c: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_bdbuf_is_read_ahead_active (dd))
4c00e: 0800 0000 btst #0,%d0
4c012: 6612 bnes 4c026 <rtems_bdbuf_read_ahead_cancel+0x38><== ALWAYS TAKEN
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4c014: 2468 0066 moveal %a0@(102),%a2 <== NOT EXECUTED
next->previous = previous;
4c018: 234a 0004 movel %a2,%a1@(4) <== NOT EXECUTED
previous->next = next;
4c01c: 2489 movel %a1,%a2@ <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
4c01e: 42a8 0066 clrl %a0@(102) <== NOT EXECUTED
4c022: 42a8 0062 clrl %a0@(98) <== NOT EXECUTED
{
rtems_chain_extract_unprotected (&dd->read_ahead.node);
rtems_chain_set_off_chain (&dd->read_ahead.node);
}
}
4c026: 245f moveal %sp@+,%a2
4c028: 4e5e unlk %fp <== NOT EXECUTED
0004bebc <rtems_bdbuf_read_ahead_task>:
return sc;
}
static rtems_task
rtems_bdbuf_read_ahead_task (rtems_task_argument arg)
{
4bebc: 4e56 ffc8 linkw %fp,#-56
4bec0: 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;
4bec4: 2639 0005 f1e2 movel 5f1e2 <rtems_bdbuf_configuration>,%d3
if (transfer_count >= max_transfer_count)
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
4beca: 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);
4becc: 47fa ee58 lea %pc@(4ad26 <rtems_bdbuf_wait_for_event>),%a3
rtems_bdbuf_lock_cache ();
4bed0: 49fa ecdc lea %pc@(4abae <rtems_bdbuf_lock_cache>),%a4
4bed4: 4bfa ec7a lea %pc@(4ab50 <_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;
4bed8: 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)
4beda: 6000 00f6 braw 4bfd2 <rtems_bdbuf_read_ahead_task+0x116>
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
4bede: 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);
4bee2: 2c3c 0005 da2c movel #383532,%d6
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
{
rtems_bdbuf_buffer *bd =
4bee8: 2e3c 0004 b58c movel #308620,%d7
while (bdbuf_cache.read_ahead_enabled)
{
rtems_chain_node *node;
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
4beee: 4e93 jsr %a3@
rtems_bdbuf_lock_cache ();
4bef0: 4e94 jsr %a4@
while ((node = rtems_chain_get_unprotected (chain)) != NULL)
4bef2: 588f addql #4,%sp
4bef4: 6000 00c6 braw 4bfbc <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;
4bef8: 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)
4befc: b4aa ffc6 cmpl %a2@(-58),%d2
4bf00: 645a bccs 4bf5c <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)
4bf02: 202a ffce movel %a2@(-50),%d0
4bf06: 6d06 blts 4bf0e <rtems_bdbuf_read_ahead_task+0x52><== NEVER TAKEN
return block << dd->block_to_media_block_shift;
4bf08: 2202 movel %d2,%d1
4bf0a: e1a9 lsll %d0,%d1
4bf0c: 6046 bras 4bf54 <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);
4bf0e: 202a ffc2 movel %a2@(-62),%d0 <== NOT EXECUTED
4bf12: 91c8 subal %a0,%a0 <== NOT EXECUTED
4bf14: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4bf16: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
4bf1a: 42a7 clrl %sp@- <== NOT EXECUTED
4bf1c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4bf20: 2d48 fff8 movel %a0,%fp@(-8) <== NOT EXECUTED
4bf24: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
4bf28: 4eb9 0005 d130 jsr 5d130 <__muldi3> <== NOT EXECUTED
4bf2e: 206a ffbe moveal %a2@(-66),%a0 <== NOT EXECUTED
4bf32: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4bf36: 2d48 fff4 movel %a0,%fp@(-12) <== NOT EXECUTED
4bf3a: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
4bf3e: 91c8 subal %a0,%a0 <== NOT EXECUTED
4bf40: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED
4bf44: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
4bf48: 2046 moveal %d6,%a0 <== NOT EXECUTED
4bf4a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4bf4c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bf4e: 4e90 jsr %a0@ <== NOT EXECUTED
4bf50: 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;
4bf54: d2aa ffb6 addl %a2@(-74),%d1
4bf58: 4280 clrl %d0
4bf5a: 6004 bras 4bf60 <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;
4bf5c: 4281 clrl %d1
*/
*media_block_ptr = rtems_bdbuf_media_block (dd, block) + dd->start;
}
else
{
sc = RTEMS_INVALID_ID;
4bf5e: 7004 moveq #4,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
4bf60: 42aa 0004 clrl %a2@(4)
4bf64: 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)
4bf66: 4a80 tstl %d0
4bf68: 664c bnes 4bfb6 <rtems_bdbuf_read_ahead_task+0xfa>
{
rtems_bdbuf_buffer *bd =
4bf6a: 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 *)
4bf6c: 280a movel %a2,%d4
4bf6e: 0684 ffff ff9e addil #-98,%d4
rtems_chain_set_off_chain (&dd->read_ahead.node);
if (sc == RTEMS_SUCCESSFUL)
{
rtems_bdbuf_buffer *bd =
4bf74: 2047 moveal %d7,%a0
4bf76: 2f04 movel %d4,%sp@-
4bf78: 4e90 jsr %a0@
rtems_bdbuf_get_buffer_for_read_ahead (dd, media_block);
if (bd != NULL)
4bf7a: 508f addql #8,%sp
4bf7c: 4a80 tstl %d0
4bf7e: 673c beqs 4bfbc <rtems_bdbuf_read_ahead_task+0x100><== NEVER TAKEN
{
uint32_t transfer_count = dd->block_count - block;
4bf80: 222a ffc6 movel %a2@(-58),%d1
4bf84: 9282 subl %d2,%d1
uint32_t max_transfer_count = bdbuf_config.max_read_ahead_blocks;
if (transfer_count >= max_transfer_count)
4bf86: b681 cmpl %d1,%d3
4bf88: 6212 bhis 4bf9c <rtems_bdbuf_read_ahead_task+0xe0>
{
transfer_count = max_transfer_count;
dd->read_ahead.trigger = block + transfer_count / 2;
4bf8a: 2205 movel %d5,%d1
4bf8c: d282 addl %d2,%d1
dd->read_ahead.next = block + transfer_count;
4bf8e: 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;
4bf90: 2541 0008 movel %d1,%a2@(8)
dd->read_ahead.next = block + transfer_count;
4bf94: 2203 movel %d3,%d1
4bf96: 2542 000c movel %d2,%a2@(12)
4bf9a: 6006 bras 4bfa2 <rtems_bdbuf_read_ahead_task+0xe6>
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4bf9c: 74ff moveq #-1,%d2
4bf9e: 2542 0008 movel %d2,%a2@(8)
}
++dd->stats.read_ahead_transfers;
4bfa2: 52aa ffe8 addql #1,%a2@(-24)
rtems_bdbuf_execute_read_request (dd, bd, transfer_count);
4bfa6: 2f01 movel %d1,%sp@-
4bfa8: 2f00 movel %d0,%sp@-
4bfaa: 2f04 movel %d4,%sp@-
4bfac: 4eba fe4a jsr %pc@(4bdf8 <rtems_bdbuf_execute_read_request>)
4bfb0: 4fef 000c lea %sp@(12),%sp
4bfb4: 6006 bras 4bfbc <rtems_bdbuf_read_ahead_task+0x100>
}
}
else
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
4bfb6: 70ff moveq #-1,%d0
4bfb8: 2540 0008 movel %d0,%a2@(8)
4bfbc: 4879 0006 1ff4 pea 61ff4 <bdbuf_cache+0x84>
4bfc2: 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)
4bfc4: 588f addql #4,%sp
4bfc6: 2440 moveal %d0,%a2
4bfc8: 4a80 tstl %d0
4bfca: 6600 ff2c bnew 4bef8 <rtems_bdbuf_read_ahead_task+0x3c>
{
dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
}
}
rtems_bdbuf_unlock_cache ();
4bfce: 4eba ec2a jsr %pc@(4abfa <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)
4bfd2: 4a39 0006 2000 tstb 62000 <bdbuf_cache+0x90>
4bfd8: 6600 ff04 bnew 4bede <rtems_bdbuf_read_ahead_task+0x22>
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
4bfdc: 42ae 0008 clrl %fp@(8) <== NOT EXECUTED
}
4bfe0: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4bfe6: 4e5e unlk %fp <== NOT EXECUTED
}
rtems_bdbuf_unlock_cache ();
}
rtems_task_delete (RTEMS_SELF);
4bfe8: 4ef9 0004 76d4 jmp 476d4 <rtems_task_delete> <== NOT EXECUTED
0004c680 <rtems_bdbuf_release>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
4c680: 4e56 0000 linkw %fp,#0
4c684: 2f0a movel %a2,%sp@-
4c686: 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)
4c68a: 4a8a tstl %a2
4c68c: 6700 008a beqw 4c718 <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();
4c690: 4eba e51c jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4c694: 202a 001e movel %a2@(30),%d0
4c698: 7204 moveq #4,%d1
4c69a: b280 cmpl %d0,%d1
4c69c: 6760 beqs 4c6fe <rtems_bdbuf_release+0x7e>
4c69e: 650a bcss 4c6aa <rtems_bdbuf_release+0x2a>
4c6a0: 123c 0003 moveb #3,%d1
4c6a4: b280 cmpl %d0,%d1
4c6a6: 665e bnes 4c706 <rtems_bdbuf_release+0x86> <== NEVER TAKEN
4c6a8: 6008 bras 4c6b2 <rtems_bdbuf_release+0x32>
4c6aa: 7206 moveq #6,%d1
4c6ac: b280 cmpl %d0,%d1
4c6ae: 6556 bcss 4c706 <rtems_bdbuf_release+0x86> <== NEVER TAKEN
4c6b0: 6042 bras 4c6f4 <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 ();
}
4c6b2: 206a 0026 moveal %a2@(38),%a0
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
4c6b6: 53a8 000c subql #1,%a0@(12)
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c6ba: 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;
4c6bc: 2079 0006 1fb4 moveal 61fb4 <bdbuf_cache+0x44>,%a0
4c6c2: 2540 001e movel %d0,%a2@(30)
the_node->next = tail;
4c6c6: 24bc 0006 1fb0 movel #401328,%a2@
tail->previous = the_node;
4c6cc: 23ca 0006 1fb4 movel %a2,61fb4 <bdbuf_cache+0x44>
old_last->next = the_node;
4c6d2: 208a movel %a2,%a0@
the_node->previous = old_last;
4c6d4: 2548 0004 movel %a0,%a2@(4)
4c6d8: 41fa e712 lea %pc@(4adec <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)
4c6dc: 4aaa 0022 tstl %a2@(34)
4c6e0: 6708 beqs 4c6ea <rtems_bdbuf_release+0x6a>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c6e2: 4879 0006 1fd0 pea 61fd0 <bdbuf_cache+0x60>
4c6e8: 6006 bras 4c6f0 <rtems_bdbuf_release+0x70>
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c6ea: 4879 0006 1fe0 pea 61fe0 <bdbuf_cache+0x70>
4c6f0: 4e90 jsr %a0@
4c6f2: 6006 bras 4c6fa <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);
4c6f4: 2f0a movel %a2,%sp@-
4c6f6: 4eba f934 jsr %pc@(4c02c <rtems_bdbuf_discard_buffer_after_access>)
break;
4c6fa: 588f addql #4,%sp
4c6fc: 6012 bras 4c710 <rtems_bdbuf_release+0x90>
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
4c6fe: 2f0a movel %a2,%sp@-
4c700: 4eba eaa0 jsr %pc@(4b1a2 <rtems_bdbuf_add_to_modified_list_after_access>)
4c704: 60f4 bras 4c6fa <rtems_bdbuf_release+0x7a>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_0);
4c706: 4878 000e pea e <OPER1+0x2> <== NOT EXECUTED
4c70a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c70c: 4eba e4b6 jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4c710: 4eba e4e8 jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c714: 4280 clrl %d0
4c716: 6002 bras 4c71a <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;
4c718: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4c71a: 246e fffc moveal %fp@(-4),%a2
4c71e: 4e5e unlk %fp <== NOT EXECUTED
0004c722 <rtems_bdbuf_release_modified>:
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
4c722: 4e56 0000 linkw %fp,#0
4c726: 2f0a movel %a2,%sp@-
4c728: 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)
4c72c: 4a8a tstl %a2
4c72e: 6744 beqs 4c774 <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();
4c730: 4eba e47c jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4c734: 202a 001e movel %a2@(30),%d0
4c738: 7203 moveq #3,%d1
4c73a: b280 cmpl %d0,%d1
4c73c: 6224 bhis 4c762 <rtems_bdbuf_release_modified+0x40><== NEVER TAKEN
4c73e: 123c 0005 moveb #5,%d1
4c742: b280 cmpl %d0,%d1
4c744: 640a bccs 4c750 <rtems_bdbuf_release_modified+0x2e>
4c746: 123c 0006 moveb #6,%d1
4c74a: b280 cmpl %d0,%d1
4c74c: 6614 bnes 4c762 <rtems_bdbuf_release_modified+0x40><== NEVER TAKEN
4c74e: 6008 bras 4c758 <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);
4c750: 2f0a movel %a2,%sp@-
4c752: 4eba ea4e jsr %pc@(4b1a2 <rtems_bdbuf_add_to_modified_list_after_access>)
4c756: 6006 bras 4c75e <rtems_bdbuf_release_modified+0x3c>
break;
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
4c758: 2f0a movel %a2,%sp@-
4c75a: 4eba f8d0 jsr %pc@(4c02c <rtems_bdbuf_discard_buffer_after_access>)
break;
4c75e: 588f addql #4,%sp
4c760: 600a bras 4c76c <rtems_bdbuf_release_modified+0x4a>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_6);
4c762: 4878 0012 pea 12 <INVALID_OPERATION+0x2> <== NOT EXECUTED
4c766: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c768: 4eba e45a jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4c76c: 4eba e48c jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c770: 4280 clrl %d0
4c772: 6002 bras 4c776 <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;
4c774: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4c776: 246e fffc moveal %fp@(-4),%a2
4c77a: 4e5e unlk %fp <== NOT EXECUTED
0004ae84 <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
4ae84: 4e56 ff64 linkw %fp,#-156
4ae88: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
4ae8c: 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));
4ae90: 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;
4ae94: 242d 0012 movel %a5@(18),%d2
rtems_blkdev_bnum block = node->block;
4ae98: 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));
4ae9c: 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;
4aea0: 2479 0006 1fa8 moveal 61fa8 <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));
4aea6: 42a7 clrl %sp@-
4aea8: 2f0b movel %a3,%sp@-
4aeaa: 4eb9 0005 13b4 jsr 513b4 <memset>
4aeb0: 4fef 000c lea %sp@(12),%sp
4aeb4: 6030 bras 4aee6 <rtems_bdbuf_remove_from_tree+0x62>
while (p != NULL)
{
*buf_prev++ = p;
if (((uintptr_t) p->dd < (uintptr_t) dd)
4aeb6: 202a 0012 movel %a2@(18),%d0
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
4aeba: 26ca movel %a2,%a3@+
if (((uintptr_t) p->dd < (uintptr_t) dd)
4aebc: b480 cmpl %d0,%d2
4aebe: 620a bhis 4aeca <rtems_bdbuf_remove_from_tree+0x46><== NEVER TAKEN
|| ((p->dd == dd) && (p->block < block)))
4aec0: 661a bnes 4aedc <rtems_bdbuf_remove_from_tree+0x58><== NEVER TAKEN
4aec2: 202a 0016 movel %a2@(22),%d0
4aec6: b680 cmpl %d0,%d3
4aec8: 630c blss 4aed6 <rtems_bdbuf_remove_from_tree+0x52>
{
p->avl.cache = 1;
4aeca: 7001 moveq #1,%d0
4aecc: 1540 0010 moveb %d0,%a2@(16)
p = p->avl.right;
4aed0: 246a 000c moveal %a2@(12),%a2
4aed4: 6010 bras 4aee6 <rtems_bdbuf_remove_from_tree+0x62>
}
else if ((p->dd != dd) || (p->block != block))
4aed6: b680 cmpl %d0,%d3
4aed8: 6700 0254 beqw 4b12e <rtems_bdbuf_remove_from_tree+0x2aa>
{
p->avl.cache = -1;
4aedc: 50c1 st %d1
4aede: 1541 0010 moveb %d1,%a2@(16)
p = p->avl.left;
4aee2: 246a 0008 moveal %a2@(8),%a2
4aee6: 280b movel %a3,%d4
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
4aee8: 4a8a tstl %a2
4aeea: 66ca bnes 4aeb6 <rtems_bdbuf_remove_from_tree+0x32><== ALWAYS TAKEN
4aeec: 6000 0234 braw 4b122 <rtems_bdbuf_remove_from_tree+0x29e><== NOT EXECUTED
q = p;
buf_prev--;
if (buf_prev > buf_stack)
{
p = *(buf_prev - 1);
4aef0: 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)
4aef4: 206a 000c moveal %a2@(12),%a0
4aef8: 4a88 tstl %a0
4aefa: 6610 bnes 4af0c <rtems_bdbuf_remove_from_tree+0x88>
{
r = q->avl.left;
4aefc: 206a 0008 moveal %a2@(8),%a0
if (r != NULL)
4af00: 4a88 tstl %a0
4af02: 676c beqs 4af70 <rtems_bdbuf_remove_from_tree+0xec>
{
r->avl.bal = 0;
4af04: 4203 clrb %d3
4af06: 1143 0011 moveb %d3,%a0@(17)
4af0a: 6064 bras 4af70 <rtems_bdbuf_remove_from_tree+0xec>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
4af0c: 4aa8 0008 tstl %a0@(8)
4af10: 6708 beqs 4af1a <rtems_bdbuf_remove_from_tree+0x96>
4af12: 2248 moveal %a0,%a1
4af14: 2008 movel %a0,%d0
4af16: 280b movel %a3,%d4
4af18: 602a bras 4af44 <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;
4af1a: 2748 fffc movel %a0,%a3@(-4)
4af1e: 280b movel %a3,%d4
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
4af20: 216a 0008 0008 movel %a2@(8),%a0@(8)
r->avl.bal = q->avl.bal;
r->avl.cache = 1;
4af26: 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;
4af28: 116a 0011 0011 moveb %a2@(17),%a0@(17)
r->avl.cache = 1;
4af2e: 1140 0010 moveb %d0,%a0@(16)
4af32: 603c bras 4af70 <rtems_bdbuf_remove_from_tree+0xec>
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4af34: 2844 moveal %d4,%a4
4af36: 5884 addql #4,%d4
s = r->avl.left;
r->avl.cache = -1;
4af38: 50c0 st %d0
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
4af3a: 28c9 movel %a1,%a4@+
s = r->avl.left;
r->avl.cache = -1;
4af3c: 1340 0010 moveb %d0,%a1@(16)
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
4af40: 2009 movel %a1,%d0
4af42: 2241 moveal %d1,%a1
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
4af44: 2229 0008 movel %a1@(8),%d1
4af48: 66ea bnes 4af34 <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;
4af4a: 2840 moveal %d0,%a4
4af4c: 4be9 000c lea %a1@(12),%a5
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
4af50: 236a 0008 0008 movel %a2@(8),%a1@(8)
r->avl.left = s->avl.right;
4af56: 2955 0008 movel %a5@,%a4@(8)
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
4af5a: 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;
4af5c: 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;
4af62: 2348 000c movel %a0,%a1@(12)
s->avl.bal = q->avl.bal;
s->avl.cache = 1;
*t = q = s;
4af66: 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;
4af68: 1340 0010 moveb %d0,%a1@(16)
*t = q = s;
4af6c: 2749 fffc movel %a1,%a3@(-4)
}
}
if (p != NULL)
4af70: 4a82 tstl %d2
4af72: 672a beqs 4af9e <rtems_bdbuf_remove_from_tree+0x11a>
{
if (p->avl.cache == -1)
4af74: 2242 moveal %d2,%a1
4af76: 72ff moveq #-1,%d1
4af78: 1029 0010 moveb %a1@(16),%d0
4af7c: 49c0 extbl %d0
4af7e: b280 cmpl %d0,%d1
4af80: 6614 bnes 4af96 <rtems_bdbuf_remove_from_tree+0x112>
{
p->avl.left = q;
4af82: 2348 0008 movel %a0,%a1@(8)
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
4af86: 200e movel %fp,%d0
4af88: 0680 ffff ff80 addil #-128,%d0
4af8e: b084 cmpl %d4,%d0
4af90: 6514 bcss 4afa6 <rtems_bdbuf_remove_from_tree+0x122>
4af92: 6000 01ae braw 4b142 <rtems_bdbuf_remove_from_tree+0x2be>
{
p->avl.left = q;
}
else
{
p->avl.right = q;
4af96: 2242 moveal %d2,%a1
4af98: 2348 000c movel %a0,%a1@(12)
4af9c: 60e8 bras 4af86 <rtems_bdbuf_remove_from_tree+0x102>
}
}
else
{
*root = q;
4af9e: 23c8 0006 1fa8 movel %a0,61fa8 <bdbuf_cache+0x38>
4afa4: 60e0 bras 4af86 <rtems_bdbuf_remove_from_tree+0x102>
4afa6: 2844 moveal %d4,%a4
default:
break;
}
}
if (buf_prev > buf_stack)
4afa8: 2200 movel %d0,%d1
while (modified)
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
4afaa: 206c fffc moveal %a4@(-4),%a0
else
{
break;
}
if (p->avl.cache == -1)
4afae: 76ff moveq #-1,%d3
4afb0: 1428 0010 moveb %a0@(16),%d2
4afb4: 1028 0011 moveb %a0@(17),%d0
4afb8: 49c2 extbl %d2
4afba: b682 cmpl %d2,%d3
4afbc: 6600 0092 bnew 4b050 <rtems_bdbuf_remove_from_tree+0x1cc>
{
/* rebalance left branch */
switch (p->avl.bal)
4afc0: 4a00 tstb %d0
4afc2: 6718 beqs 4afdc <rtems_bdbuf_remove_from_tree+0x158>
4afc4: 49c0 extbl %d0
4afc6: 7401 moveq #1,%d2
4afc8: b480 cmpl %d0,%d2
4afca: 671a beqs 4afe6 <rtems_bdbuf_remove_from_tree+0x162>
4afcc: b680 cmpl %d0,%d3
4afce: 6600 011a bnew 4b0ea <rtems_bdbuf_remove_from_tree+0x266>
{
case -1:
p->avl.bal = 0;
4afd2: 4203 clrb %d3
4afd4: 1143 0011 moveb %d3,%a0@(17)
4afd8: 6000 0110 braw 4b0ea <rtems_bdbuf_remove_from_tree+0x266>
break;
case 0:
p->avl.bal = 1;
4afdc: 7001 moveq #1,%d0
4afde: 1140 0011 moveb %d0,%a0@(17)
4afe2: 6000 0090 braw 4b074 <rtems_bdbuf_remove_from_tree+0x1f0>
modified = false;
break;
case +1:
p1 = p->avl.right;
4afe6: 2268 000c moveal %a0@(12),%a1
if (p1->avl.bal >= 0) /* simple RR-turn */
4afea: 1029 0011 moveb %a1@(17),%d0
4afee: 6d26 blts 4b016 <rtems_bdbuf_remove_from_tree+0x192>
{
p->avl.right = p1->avl.left;
4aff0: 2169 0008 000c movel %a1@(8),%a0@(12)
p1->avl.left = p;
4aff6: 2348 0008 movel %a0,%a1@(8)
if (p1->avl.bal == 0)
4affa: 4a00 tstb %d0
4affc: 660a bnes 4b008 <rtems_bdbuf_remove_from_tree+0x184>
{
p1->avl.bal = -1;
4affe: 50c2 st %d2
4b000: 1342 0011 moveb %d2,%a1@(17)
4b004: 6000 0090 braw 4b096 <rtems_bdbuf_remove_from_tree+0x212>
modified = false;
}
else
{
p->avl.bal = 0;
4b008: 4203 clrb %d3
4b00a: 1143 0011 moveb %d3,%a0@(17)
p1->avl.bal = 0;
4b00e: 1343 0011 moveb %d3,%a1@(17)
4b012: 6000 0090 braw 4b0a4 <rtems_bdbuf_remove_from_tree+0x220>
}
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
4b016: 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;
4b01a: 7401 moveq #1,%d2
if (p2->avl.bal == -1) p1->avl.bal = 1; else p1->avl.bal = 0;
4b01c: 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;
4b01e: 102a 0011 moveb %a2@(17),%d0
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
4b022: 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;
4b028: 49c0 extbl %d0
4b02a: b480 cmpl %d0,%d2
4b02c: 57c0 seq %d0
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
4b02e: 2549 000c movel %a1,%a2@(12)
p->avl.right = p2->avl.left;
4b032: 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;
4b038: 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;
4b03c: 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;
4b040: 102a 0011 moveb %a2@(17),%d0
4b044: 49c0 extbl %d0
4b046: b680 cmpl %d0,%d3
4b048: 56c0 sne %d0
4b04a: 5280 addql #1,%d0
4b04c: 6000 0090 braw 4b0de <rtems_bdbuf_remove_from_tree+0x25a>
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
4b050: 4a00 tstb %d0
4b052: 671a beqs 4b06e <rtems_bdbuf_remove_from_tree+0x1ea>
4b054: 49c0 extbl %d0
4b056: 7401 moveq #1,%d2
4b058: b480 cmpl %d0,%d2
4b05a: 670a beqs 4b066 <rtems_bdbuf_remove_from_tree+0x1e2>
4b05c: 76ff moveq #-1,%d3
4b05e: b680 cmpl %d0,%d3
4b060: 6600 0088 bnew 4b0ea <rtems_bdbuf_remove_from_tree+0x266>
4b064: 6012 bras 4b078 <rtems_bdbuf_remove_from_tree+0x1f4>
{
case +1:
p->avl.bal = 0;
4b066: 4200 clrb %d0
4b068: 1140 0011 moveb %d0,%a0@(17)
4b06c: 607c bras 4b0ea <rtems_bdbuf_remove_from_tree+0x266>
break;
case 0:
p->avl.bal = -1;
4b06e: 50c2 st %d2
4b070: 1142 0011 moveb %d2,%a0@(17)
modified = false;
4b074: 4200 clrb %d0
4b076: 6074 bras 4b0ec <rtems_bdbuf_remove_from_tree+0x268>
break;
case -1:
p1 = p->avl.left;
4b078: 2268 0008 moveal %a0@(8),%a1
if (p1->avl.bal <= 0) /* simple LL-turn */
4b07c: 1029 0011 moveb %a1@(17),%d0
4b080: 6e26 bgts 4b0a8 <rtems_bdbuf_remove_from_tree+0x224>
{
p->avl.left = p1->avl.right;
4b082: 2169 000c 0008 movel %a1@(12),%a0@(8)
p1->avl.right = p;
4b088: 2348 000c movel %a0,%a1@(12)
if (p1->avl.bal == 0)
4b08c: 4a00 tstb %d0
4b08e: 660a bnes 4b09a <rtems_bdbuf_remove_from_tree+0x216><== NEVER TAKEN
{
p1->avl.bal = 1;
4b090: 7601 moveq #1,%d3
4b092: 1343 0011 moveb %d3,%a1@(17)
4b096: 2049 moveal %a1,%a0
4b098: 6052 bras 4b0ec <rtems_bdbuf_remove_from_tree+0x268>
modified = false;
}
else
{
p->avl.bal = 0;
4b09a: 4200 clrb %d0 <== NOT EXECUTED
4b09c: 1140 0011 moveb %d0,%a0@(17) <== NOT EXECUTED
p1->avl.bal = 0;
4b0a0: 1340 0011 moveb %d0,%a1@(17) <== NOT EXECUTED
4b0a4: 2049 moveal %a1,%a0
4b0a6: 6042 bras 4b0ea <rtems_bdbuf_remove_from_tree+0x266>
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
4b0a8: 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;
4b0ac: 74ff moveq #-1,%d2
if (p2->avl.bal == +1) p1->avl.bal = -1; else p1->avl.bal = 0;
4b0ae: 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;
4b0b0: 102a 0011 moveb %a2@(17),%d0
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
4b0b4: 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;
4b0ba: 49c0 extbl %d0
4b0bc: b480 cmpl %d0,%d2
4b0be: 56c0 sne %d0
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
4b0c0: 2549 0008 movel %a1,%a2@(8)
p->avl.left = p2->avl.right;
4b0c4: 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;
4b0ca: 5280 addql #1,%d0
4b0cc: 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;
4b0d0: 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;
4b0d4: 102a 0011 moveb %a2@(17),%d0
4b0d8: 49c0 extbl %d0
4b0da: b680 cmpl %d0,%d3
4b0dc: 57c0 seq %d0
p = p2;
p2->avl.bal = 0;
4b0de: 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;
4b0e0: 1340 0011 moveb %d0,%a1@(17)
p = p2;
p2->avl.bal = 0;
4b0e4: 4200 clrb %d0
4b0e6: 1540 0011 moveb %d0,%a2@(17)
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
4b0ea: 7001 moveq #1,%d0
{
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
4b0ec: 43ec fffc lea %a4@(-4),%a1
default:
break;
}
}
if (buf_prev > buf_stack)
4b0f0: b289 cmpl %a1,%d1
4b0f2: 641c bccs 4b110 <rtems_bdbuf_remove_from_tree+0x28c>
{
q = *(buf_prev - 1);
4b0f4: 226c fff8 moveal %a4@(-8),%a1
if (q->avl.cache == -1)
4b0f8: 76ff moveq #-1,%d3
4b0fa: 1429 0010 moveb %a1@(16),%d2
4b0fe: 49c2 extbl %d2
4b100: b682 cmpl %d2,%d3
4b102: 6606 bnes 4b10a <rtems_bdbuf_remove_from_tree+0x286>
{
q->avl.left = p;
4b104: 2348 0008 movel %a0,%a1@(8)
4b108: 600e bras 4b118 <rtems_bdbuf_remove_from_tree+0x294>
}
else
{
q->avl.right = p;
4b10a: 2348 000c movel %a0,%a1@(12)
4b10e: 6008 bras 4b118 <rtems_bdbuf_remove_from_tree+0x294>
}
}
else
{
*root = p;
4b110: 23c8 0006 1fa8 movel %a0,61fa8 <bdbuf_cache+0x38>
4b116: 602a bras 4b142 <rtems_bdbuf_remove_from_tree+0x2be>
4b118: 598c subql #4,%a4
*root = q;
}
modified = true;
while (modified)
4b11a: 4a00 tstb %d0
4b11c: 6600 fe8c bnew 4afaa <rtems_bdbuf_remove_from_tree+0x126>
4b120: 6020 bras 4b142 <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);
4b122: 4878 001b pea 1b <OPER2+0x7> <== NOT EXECUTED
4b126: 2f2d 001e movel %a5@(30),%sp@- <== NOT EXECUTED
4b12a: 4eba fa98 jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
4b12e: 200e movel %fp,%d0
4b130: 0680 ffff ff80 addil #-128,%d0
4b136: b084 cmpl %d4,%d0
4b138: 6500 fdb6 bcsw 4aef0 <rtems_bdbuf_remove_from_tree+0x6c>
{
p = *(buf_prev - 1);
}
else
{
p = NULL;
4b13c: 4282 clrl %d2
4b13e: 6000 fdb4 braw 4aef4 <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);
}
4b142: 4cee 3c1c ff64 moveml %fp@(-156),%d2-%d4/%a2-%a5
4b148: 4e5e unlk %fp <== NOT EXECUTED
0004b256 <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)
{
4b256: 4e56 0000 linkw %fp,#0
4b25a: 2f0a movel %a2,%sp@-
4b25c: 246e 0008 moveal %fp@(8),%a2
switch (bd->state)
4b260: 202a 001e movel %a2@(30),%d0
4b264: 671a beqs 4b280 <rtems_bdbuf_remove_from_tree_and_lru_list+0x2a>
4b266: 7202 moveq #2,%d1
4b268: b280 cmpl %d0,%d1
4b26a: 660a bnes 4b276 <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);
4b26c: 2f0a movel %a2,%sp@-
4b26e: 4eba fc14 jsr %pc@(4ae84 <rtems_bdbuf_remove_from_tree>)
break;
4b272: 588f addql #4,%sp
4b274: 600a bras 4b280 <rtems_bdbuf_remove_from_tree_and_lru_list+0x2a>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_10);
4b276: 4878 0016 pea 16 <OPER2+0x2> <== NOT EXECUTED
4b27a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4b27c: 4eba f946 jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4b280: 2252 moveal %a2@,%a1
previous = the_node->previous;
4b282: 206a 0004 moveal %a2@(4),%a0
}
rtems_chain_extract_unprotected (&bd->link);
}
4b286: 246e fffc moveal %fp@(-4),%a2
4b28a: 4e5e unlk %fp
next->previous = previous;
4b28c: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4b290: 2089 movel %a1,%a0@ <== NOT EXECUTED
0004cb1a <rtems_bdbuf_reset_device_stats>:
}
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
{
4cb1a: 4e56 0000 linkw %fp,#0
4cb1e: 2f0a movel %a2,%sp@-
4cb20: 246e 0008 moveal %fp@(8),%a2
rtems_bdbuf_lock_cache ();
4cb24: 4eba e088 jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
memset (&dd->stats, 0, sizeof(dd->stats));
4cb28: 4878 0020 pea 20 <OPER2+0xc>
4cb2c: 42a7 clrl %sp@-
4cb2e: 486a 0042 pea %a2@(66)
4cb32: 4eb9 0005 13b4 jsr 513b4 <memset>
rtems_bdbuf_unlock_cache ();
}
4cb38: 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 ();
4cb3c: 4fef 000c lea %sp@(12),%sp
}
4cb40: 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 ();
4cb42: 6000 e0b6 braw 4abfa <rtems_bdbuf_unlock_cache>
...
0004ac68 <rtems_bdbuf_restore_preemption>:
static void
rtems_bdbuf_restore_preemption (rtems_mode prev_mode)
{
4ac68: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_task_mode (prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode);
4ac6c: 486e 0008 pea %fp@(8)
4ac70: 2f3c 0000 ffff movel #65535,%sp@-
4ac76: 2f2e 0008 movel %fp@(8),%sp@-
4ac7a: 4eb9 0004 e9c0 jsr 4e9c0 <rtems_task_mode>
if (sc != RTEMS_SUCCESSFUL)
4ac80: 4fef 000c lea %sp@(12),%sp
4ac84: 4a80 tstl %d0
4ac86: 6708 beqs 4ac90 <rtems_bdbuf_restore_preemption+0x28><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_PREEMPT_RST);
4ac88: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED
4ac8c: 4eba fee8 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4ac90: 4e5e unlk %fp <== NOT EXECUTED
0004ca2e <rtems_bdbuf_set_block_size>:
rtems_status_code
rtems_bdbuf_set_block_size (rtems_disk_device *dd,
uint32_t block_size,
bool sync)
{
4ca2e: 4e56 ffe8 linkw %fp,#-24
4ca32: 48d7 047c moveml %d2-%d6/%a2,%sp@
4ca36: 246e 0008 moveal %fp@(8),%a2
4ca3a: 242e 000c movel %fp@(12),%d2
/*
* We do not care about the synchronization status since we will purge the
* device later.
*/
if (sync)
4ca3e: 4a2e 0013 tstb %fp@(19)
4ca42: 670a beqs 4ca4e <rtems_bdbuf_set_block_size+0x20>
rtems_bdbuf_syncdev (dd);
4ca44: 2f0a movel %a2,%sp@-
4ca46: 4eb9 0004 c86e jsr 4c86e <rtems_bdbuf_syncdev>
4ca4c: 588f addql #4,%sp
rtems_bdbuf_lock_cache ();
4ca4e: 4eba e15e jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
if (block_size > 0)
4ca52: 4a82 tstl %d2
4ca54: 677c beqs 4cad2 <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)
4ca56: b4b9 0005 f20a cmpl 5f20a <rtems_bdbuf_configuration+0x28>,%d2
4ca5c: 6274 bhis 4cad2 <rtems_bdbuf_set_block_size+0xa4><== NEVER TAKEN
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
4ca5e: 2002 movel %d2,%d0
4ca60: 5380 subql #1,%d0
4ca62: 41f9 0005 f206 lea 5f206 <rtems_bdbuf_configuration+0x24>,%a0
4ca68: 4c50 0000 remul %a0@,%d0,%d0
4ca6c: 2200 movel %d0,%d1
4ca6e: 5281 addql #1,%d1
for (bds_per_size = 1;
4ca70: 7001 moveq #1,%d0
4ca72: 6002 bras 4ca76 <rtems_bdbuf_set_block_size+0x48>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
4ca74: 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;
4ca76: b280 cmpl %d0,%d1
4ca78: 62fa bhis 4ca74 <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;
4ca7a: 2839 0006 1f8e movel 61f8e <bdbuf_cache+0x1e>,%d4
4ca80: 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)
4ca84: 674c beqs 4cad2 <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;
4ca86: 262a 0020 movel %a2@(32),%d3
4ca8a: 2202 movel %d2,%d1
uint32_t one = 1;
while ((one << block_to_media_block_shift) < media_blocks_per_block)
4ca8c: 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;
4ca8e: 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;
4ca92: 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)
4ca94: 6002 bras 4ca98 <rtems_bdbuf_set_block_size+0x6a>
{
++block_to_media_block_shift;
4ca96: 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)
4ca98: 2a06 movel %d6,%d5
4ca9a: e1ad lsll %d0,%d5
4ca9c: b285 cmpl %d5,%d1
4ca9e: 62f6 bhis 4ca96 <rtems_bdbuf_set_block_size+0x68>
{
++block_to_media_block_shift;
}
if ((dd->media_block_size << block_to_media_block_shift) != block_size)
4caa0: e1ab lsll %d0,%d3
4caa2: b483 cmpl %d3,%d2
4caa4: 6702 beqs 4caa8 <rtems_bdbuf_set_block_size+0x7a><== ALWAYS TAKEN
block_to_media_block_shift = -1;
4caa6: 70ff moveq #-1,%d0 <== NOT EXECUTED
dd->block_size = block_size;
dd->block_count = dd->size / media_blocks_per_block;
4caa8: 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;
4caac: 2542 0024 movel %d2,%a2@(36)
dd->block_count = dd->size / media_blocks_per_block;
4cab0: 4c41 3003 remul %d1,%d3,%d3
dd->media_blocks_per_block = media_blocks_per_block;
4cab4: 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;
4cab8: 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;
4caba: 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;
4cabe: 2540 0030 movel %d0,%a2@(48)
dd->bds_per_group = bds_per_group;
4cac2: 2544 0034 movel %d4,%a2@(52)
rtems_bdbuf_purge_dev (dd);
4cac6: 2f0a movel %a2,%sp@-
4cac8: 4eb9 0004 c8c6 jsr 4c8c6 <rtems_bdbuf_purge_dev>
4cace: 588f addql #4,%sp
4cad0: 6002 bras 4cad4 <rtems_bdbuf_set_block_size+0xa6>
sc = RTEMS_INVALID_NUMBER;
}
}
else
{
sc = RTEMS_INVALID_NUMBER;
4cad2: 740a moveq #10,%d2
}
rtems_bdbuf_unlock_cache ();
4cad4: 4eba e124 jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
return sc;
}
4cad8: 2002 movel %d2,%d0
4cada: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
4cae0: 4e5e unlk %fp <== NOT EXECUTED
0004b77e <rtems_bdbuf_swapout_modified_processing>:
rtems_chain_control* chain,
rtems_chain_control* transfer,
bool sync_active,
bool update_timers,
uint32_t timer_delta)
{
4b77e: 4e56 ffe0 linkw %fp,#-32
4b782: 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;
4b786: 2a6e 000c moveal %fp@(12),%a5
4b78a: 286e 0008 moveal %fp@(8),%a4
4b78e: 266e 0010 moveal %fp@(16),%a3
4b792: 262e 001c movel %fp@(28),%d3
4b796: 205d moveal %a5@+,%a0
4b798: 142e 0017 moveb %fp@(23),%d2
4b79c: 1a2e 001b moveb %fp@(27),%d5
if (!rtems_chain_is_empty (chain))
4b7a0: bbc8 cmpal %a0,%a5
4b7a2: 6700 00b6 beqw 4b85a <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))
4b7a6: 4a02 tstb %d2
4b7a8: 6708 beqs 4b7b2 <rtems_bdbuf_swapout_modified_processing+0x34>
4b7aa: 4a94 tstl %a4@
4b7ac: 57c1 seq %d1
4b7ae: 4481 negl %d1
4b7b0: 6002 bras 4b7b4 <rtems_bdbuf_swapout_modified_processing+0x36>
sync_all = true;
else
sync_all = false;
4b7b2: 4201 clrb %d1
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
4b7b4: 2839 0006 1fe0 movel 61fe0 <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))
4b7ba: 4a01 tstb %d1
4b7bc: 6610 bnes 4b7ce <rtems_bdbuf_swapout_modified_processing+0x50>
4b7be: 4a02 tstb %d2
4b7c0: 6708 beqs 4b7ca <rtems_bdbuf_swapout_modified_processing+0x4c>
4b7c2: 2028 0012 movel %a0@(18),%d0
4b7c6: b094 cmpl %a4@,%d0
4b7c8: 6704 beqs 4b7ce <rtems_bdbuf_swapout_modified_processing+0x50>
|| rtems_bdbuf_has_buffer_waiters ())
4b7ca: 4a84 tstl %d4
4b7cc: 6704 beqs 4b7d2 <rtems_bdbuf_swapout_modified_processing+0x54>
bd->hold_timer = 0;
4b7ce: 42a8 002a clrl %a0@(42)
if (bd->hold_timer)
4b7d2: 2028 002a movel %a0@(42),%d0
4b7d6: 671e beqs 4b7f6 <rtems_bdbuf_swapout_modified_processing+0x78>
{
if (update_timers)
4b7d8: 4a05 tstb %d5
4b7da: 6710 beqs 4b7ec <rtems_bdbuf_swapout_modified_processing+0x6e>
{
if (bd->hold_timer > timer_delta)
4b7dc: b680 cmpl %d0,%d3
4b7de: 6408 bccs 4b7e8 <rtems_bdbuf_swapout_modified_processing+0x6a>
bd->hold_timer -= timer_delta;
4b7e0: 9083 subl %d3,%d0
4b7e2: 2140 002a movel %d0,%a0@(42)
4b7e6: 6004 bras 4b7ec <rtems_bdbuf_swapout_modified_processing+0x6e>
else
bd->hold_timer = 0;
4b7e8: 42a8 002a clrl %a0@(42)
}
if (bd->hold_timer)
4b7ec: 4aa8 002a tstl %a0@(42)
4b7f0: 6704 beqs 4b7f6 <rtems_bdbuf_swapout_modified_processing+0x78>
{
node = node->next;
4b7f2: 2050 moveal %a0@,%a0
continue;
4b7f4: 604c bras 4b842 <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)
4b7f6: 4a94 tstl %a4@
4b7f8: 6604 bnes 4b7fe <rtems_bdbuf_swapout_modified_processing+0x80>
*dd_ptr = bd->dd;
4b7fa: 28a8 0012 movel %a0@(18),%a4@
4b7fe: 2450 moveal %a0@,%a2
if (bd->dd == *dd_ptr)
4b800: 2254 moveal %a4@,%a1
4b802: b3e8 0012 cmpal %a0@(18),%a1
4b806: 6638 bnes 4b840 <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;
4b808: 7009 moveq #9,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4b80a: 2268 0004 moveal %a0@(4),%a1
4b80e: 2140 001e movel %d0,%a0@(30)
next->previous = previous;
4b812: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
4b816: 228a movel %a2,%a1@
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
4b818: 226b 0008 moveal %a3@(8),%a1
4b81c: 601c bras 4b83a <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)
4b81e: 2029 0016 movel %a1@(22),%d0
4b822: b0a8 0016 cmpl %a0@(22),%d0
4b826: 640e bccs 4b836 <rtems_bdbuf_swapout_modified_processing+0xb8>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4b828: 2011 movel %a1@,%d0
after_node->next = the_node;
4b82a: 2288 movel %a0,%a1@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4b82c: 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;
4b830: 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;
4b832: 2080 movel %d0,%a0@
4b834: 601e bras 4b854 <rtems_bdbuf_swapout_modified_processing+0xd6>
{
rtems_chain_insert_unprotected (tnode, node);
node = NULL;
}
else
tnode = tnode->previous;
4b836: 2269 0004 moveal %a1@(4),%a1
rtems_chain_extract_unprotected (node);
tnode = tnode->previous;
while (node && !rtems_chain_is_head (transfer, tnode))
4b83a: b7c9 cmpal %a1,%a3
4b83c: 66e0 bnes 4b81e <rtems_bdbuf_swapout_modified_processing+0xa0>
4b83e: 600a bras 4b84a <rtems_bdbuf_swapout_modified_processing+0xcc>
node = next_node;
}
else
{
node = node->next;
4b840: 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))
4b842: bbc8 cmpal %a0,%a5
4b844: 6600 ff74 bnew 4b7ba <rtems_bdbuf_swapout_modified_processing+0x3c>
4b848: 6010 bras 4b85a <rtems_bdbuf_swapout_modified_processing+0xdc>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4b84a: 2253 moveal %a3@,%a1
after_node->next = the_node;
4b84c: 2688 movel %a0,%a3@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4b84e: 214b 0004 movel %a3,%a0@(4)
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
4b852: 2089 movel %a1,%a0@
before_node->previous = the_node;
4b854: 2348 0004 movel %a0,%a1@(4)
4b858: 60e6 bras 4b840 <rtems_bdbuf_swapout_modified_processing+0xc2>
{
node = node->next;
}
}
}
}
4b85a: 4cd7 3c3c moveml %sp@,%d2-%d5/%a2-%a5
4b85e: 4e5e unlk %fp <== NOT EXECUTED
0004baae <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
4baae: 4e56 ffb8 linkw %fp,#-72
4bab2: 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 ();
4bab6: 45fa f2a8 lea %pc@(4ad60 <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++)
4baba: 4284 clrl %d4
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
4babc: 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 ();
4bac2: 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),
4bac4: 4bfa f34e lea %pc@(4ae14 <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 ();
4bac8: 4e92 jsr %a2@
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4baca: 2439 0005 f1ee movel 5f1ee <rtems_bdbuf_configuration+0xc>,%d2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4bad0: 41ee ffee lea %fp@(-18),%a0
4bad4: 223c 0000 03e8 movel #1000,%d1
4bada: 4c01 2800 mulsl %d1,%d2
4bade: 2d48 ffea movel %a0,%fp@(-22)
head->previous = NULL;
tail->previous = head;
4bae2: 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 ();
4bae6: 2d40 fffc movel %d0,%fp@(-4)
rtems_chain_initialize_empty (&transfer.bds);
transfer.dd = BDBUF_INVALID_DEV;
transfer.syncing = false;
4baea: 4200 clrb %d0
4baec: 2d48 fff2 movel %a0,%fp@(-14)
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4baf0: 41f9 0005 f1a6 lea 5f1a6 <Configuration+0xc>,%a0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4baf6: 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;
4bafa: 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;
4bafe: 42ae fff6 clrl %fp@(-10)
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
4bb02: 4c50 2002 remul %a0@,%d2,%d2
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
4bb06: 4eba f0a6 jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
4bb0a: 6000 0086 braw 4bb92 <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));
4bb0e: 4878 0024 pea 24 <OPER2+0x10> <== NOT EXECUTED
4bb12: 4e93 jsr %a3@ <== NOT EXECUTED
if (!worker)
4bb14: 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));
4bb16: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (!worker)
4bb18: 4a80 tstl %d0 <== NOT EXECUTED
4bb1a: 6606 bnes 4bb22 <rtems_bdbuf_swapout_task+0x74> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_NOMEM);
4bb1c: 4878 000a pea a <LASTO> <== NOT EXECUTED
4bb20: 606a bras 4bb8c <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;
4bb22: 2079 0006 1f7e moveal 61f7e <bdbuf_cache+0xe>,%a0 <== NOT EXECUTED
the_node->next = tail;
4bb28: 24bc 0006 1f7a movel #401274,%a2@ <== NOT EXECUTED
tail->previous = the_node;
4bb2e: 23c0 0006 1f7e movel %d0,61f7e <bdbuf_cache+0xe> <== NOT EXECUTED
old_last->next = the_node;
4bb34: 2080 movel %d0,%a0@ <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
4bb36: 7001 moveq #1,%d0 <== NOT EXECUTED
the_node->previous = old_last;
4bb38: 2548 0004 movel %a0,%a2@(4) <== NOT EXECUTED
4bb3c: 1540 000c moveb %d0,%a2@(12) <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
4bb40: 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 );
4bb42: 41ea 0012 lea %a2@(18),%a0 <== NOT EXECUTED
4bb46: 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 );
4bb4a: 41ea 000e lea %a2@(14),%a0 <== NOT EXECUTED
4bb4e: 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)
4bb52: 2004 movel %d4,%d0 <== NOT EXECUTED
4bb54: 0680 0000 0061 addil #97,%d0 <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4bb5a: 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),
4bb5e: 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 );
4bb64: 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;
4bb68: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
sc = rtems_bdbuf_create_task (rtems_build_name('B', 'D', 'o', 'a' + w),
4bb6c: 486a 0008 pea %a2@(8) <== NOT EXECUTED
4bb70: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bb72: 487a 01f4 pea %pc@(4bd68 <rtems_bdbuf_swapout_worker_task>)<== NOT EXECUTED
4bb76: 2f39 0005 f1fa movel 5f1fa <rtems_bdbuf_configuration+0x18>,%sp@-<== NOT EXECUTED
4bb7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bb7e: 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)
4bb80: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4bb84: 4a80 tstl %d0 <== NOT EXECUTED
4bb86: 6708 beqs 4bb90 <rtems_bdbuf_swapout_task+0xe2> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
4bb88: 4878 000d pea d <OPER1+0x1> <== NOT EXECUTED
4bb8c: 4eba efe8 jsr %pc@(4ab76 <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++)
4bb90: 5284 addql #1,%d4 <== NOT EXECUTED
4bb92: b8b9 0005 f1f6 cmpl 5f1f6 <rtems_bdbuf_configuration+0x14>,%d4
4bb98: 6500 ff74 bcsw 4bb0e <rtems_bdbuf_swapout_task+0x60>
&worker->id);
if (sc != RTEMS_SUCCESSFUL)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WK_CREATE);
}
rtems_bdbuf_unlock_cache ();
4bb9c: 4bfa f05c lea %pc@(4abfa <rtems_bdbuf_unlock_cache>),%a5
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4bba0: 2c0e movel %fp,%d6
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
4bba2: 47fa f00a lea %pc@(4abae <rtems_bdbuf_lock_cache>),%a3
4bba6: 2a3c 0004 ab50 movel #306000,%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,
4bbac: 49fa fbd0 lea %pc@(4b77e <rtems_bdbuf_swapout_modified_processing>),%a4
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4bbb0: 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 ();
4bbb6: 4e95 jsr %a5@
4bbb8: 6000 013a braw 4bcf4 <rtems_bdbuf_swapout_task+0x246>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
4bbbc: 7801 moveq #1,%d4
if (sc != RTEMS_SUCCESSFUL)
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_2);
}
else
{
rtems_bdbuf_swapout_write (transfer);
4bbbe: 2e3c 0004 b9a2 movel #309666,%d7
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
4bbc4: 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)
4bbc6: 4a39 0006 1f9e tstb 61f9e <bdbuf_cache+0x2e>
4bbcc: 6708 beqs 4bbd6 <rtems_bdbuf_swapout_task+0x128>
worker = NULL;
4bbce: 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,
4bbd0: 45ee ffea lea %fp@(-22),%a2
4bbd4: 6016 bras 4bbec <rtems_bdbuf_swapout_task+0x13e>
4bbd6: 4879 0006 1f76 pea 61f76 <bdbuf_cache+0x6>
4bbdc: 2045 moveal %d5,%a0
4bbde: 4e90 jsr %a0@
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get_unprotected (&bdbuf_cache.swapout_workers);
if (worker)
4bbe0: 588f addql #4,%sp
4bbe2: 4a80 tstl %d0
4bbe4: 67e8 beqs 4bbce <rtems_bdbuf_swapout_task+0x120> <== ALWAYS TAKEN
transfer = &worker->transfer;
4bbe6: 2440 moveal %d0,%a2 <== NOT EXECUTED
4bbe8: 45ea 000e lea %a2@(14),%a2 <== NOT EXECUTED
Chain_Node *tail = _Chain_Tail( the_chain );
4bbec: 220a movel %a2,%d1
4bbee: 5881 addql #4,%d1
4bbf0: 2481 movel %d1,%a2@
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
4bbf2: 1239 0006 1f9e moveb 61f9e <bdbuf_cache+0x2e>,%d1
head->next = tail;
head->previous = NULL;
4bbf8: 42aa 0004 clrl %a2@(4)
4bbfc: 1541 0010 moveb %d1,%a2@(16)
tail->previous = head;
4bc00: 254a 0008 movel %a2,%a2@(8)
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dd = BDBUF_INVALID_DEV;
4bc04: 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)
4bc08: 4a01 tstb %d1
4bc0a: 670a beqs 4bc16 <rtems_bdbuf_swapout_task+0x168>
transfer->dd = bdbuf_cache.sync_device;
4bc0c: 41f9 0006 1fa4 lea 61fa4 <bdbuf_cache+0x34>,%a0
4bc12: 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,
4bc16: 2f39 0005 f1ee movel 5f1ee <rtems_bdbuf_configuration+0xc>,%sp@-
4bc1c: 260a movel %a2,%d3
4bc1e: 0683 0000 000c addil #12,%d3
4bc24: 42a7 clrl %sp@-
4bc26: 4878 0001 pea 1 <ADD>
4bc2a: 2f0a movel %a2,%sp@-
4bc2c: 4879 0006 1fc4 pea 61fc4 <bdbuf_cache+0x54>
4bc32: 2d40 ffe0 movel %d0,%fp@(-32)
4bc36: 2f03 movel %d3,%sp@-
4bc38: 4e94 jsr %a4@
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dd,
4bc3a: 2f39 0005 f1ee movel 5f1ee <rtems_bdbuf_configuration+0xc>,%sp@-
4bc40: 7201 moveq #1,%d1
4bc42: c284 andl %d4,%d1
4bc44: 4284 clrl %d4
4bc46: 1839 0006 1f9e moveb 61f9e <bdbuf_cache+0x2e>,%d4
4bc4c: 2f01 movel %d1,%sp@-
4bc4e: 2f04 movel %d4,%sp@-
4bc50: 2f0a movel %a2,%sp@-
4bc52: 4879 0006 1fb8 pea 61fb8 <bdbuf_cache+0x48>
4bc58: 2f03 movel %d3,%sp@-
4bc5a: 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 ();
4bc5c: 4fef 0030 lea %sp@(48),%sp
4bc60: 4e95 jsr %a5@
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
4bc62: 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 );
4bc66: 220a movel %a2,%d1
4bc68: 5881 addql #4,%d1
4bc6a: b292 cmpl %a2@,%d1
4bc6c: 672c beqs 4bc9a <rtems_bdbuf_swapout_task+0x1ec>
{
if (worker)
4bc6e: 4a80 tstl %d0
4bc70: 671e beqs 4bc90 <rtems_bdbuf_swapout_task+0x1e2> <== ALWAYS TAKEN
{
rtems_status_code sc = rtems_event_send (worker->id,
4bc72: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4bc76: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bc78: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4bc7c: 4eb9 0004 6f6c jsr 46f6c <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
4bc82: 508f addql #8,%sp <== NOT EXECUTED
4bc84: 4a80 tstl %d0 <== NOT EXECUTED
4bc86: 6716 beqs 4bc9e <rtems_bdbuf_swapout_task+0x1f0> <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_2);
4bc88: 4878 000c pea c <OPER1> <== NOT EXECUTED
4bc8c: 6000 fefe braw 4bb8c <rtems_bdbuf_swapout_task+0xde> <== NOT EXECUTED
}
else
{
rtems_bdbuf_swapout_write (transfer);
4bc90: 2f0a movel %a2,%sp@-
4bc92: 2047 moveal %d7,%a0
4bc94: 4e90 jsr %a0@
4bc96: 588f addql #4,%sp
4bc98: 6004 bras 4bc9e <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;
4bc9a: 4200 clrb %d0
4bc9c: 6002 bras 4bca0 <rtems_bdbuf_swapout_task+0x1f2>
else
{
rtems_bdbuf_swapout_write (transfer);
}
transfered_buffers = true;
4bc9e: 7001 moveq #1,%d0
4bca0: 4204 clrb %d4
}
if (bdbuf_cache.sync_active && !transfered_buffers)
4bca2: 4a39 0006 1f9e tstb 61f9e <bdbuf_cache+0x2e>
4bca8: 6734 beqs 4bcde <rtems_bdbuf_swapout_task+0x230>
4bcaa: 4a00 tstb %d0
4bcac: 6600 ff16 bnew 4bbc4 <rtems_bdbuf_swapout_task+0x116>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
4bcb0: 4e93 jsr %a3@
sync_requester = bdbuf_cache.sync_requester;
4bcb2: 2839 0006 1fa0 movel 61fa0 <bdbuf_cache+0x30>,%d4
bdbuf_cache.sync_active = false;
4bcb8: 4200 clrb %d0
bdbuf_cache.sync_requester = 0;
4bcba: 42b9 0006 1fa0 clrl 61fa0 <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;
4bcc0: 13c0 0006 1f9e moveb %d0,61f9e <bdbuf_cache+0x2e>
bdbuf_cache.sync_requester = 0;
rtems_bdbuf_unlock_cache ();
4bcc6: 4e95 jsr %a5@
if (sync_requester)
4bcc8: 4a84 tstl %d4
4bcca: 6778 beqs 4bd44 <rtems_bdbuf_swapout_task+0x296> <== NEVER TAKEN
4bccc: 2f3c 8000 0000 movel #-2147483648,%sp@-
4bcd2: 2f04 movel %d4,%sp@-
4bcd4: 4eb9 0004 7558 jsr 47558 <rtems_event_system_send>
4bcda: 508f addql #8,%sp
4bcdc: 6066 bras 4bd44 <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,
4bcde: 4a00 tstb %d0
4bce0: 6762 beqs 4bd44 <rtems_bdbuf_swapout_task+0x296>
4bce2: 6000 fee0 braw 4bbc4 <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))
4bce6: 7206 moveq #6,%d1
4bce8: b280 cmpl %d0,%d1
4bcea: 6708 beqs 4bcf4 <rtems_bdbuf_swapout_task+0x246> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SWAPOUT_RE);
4bcec: 4878 0018 pea 18 <OPER2+0x4> <== NOT EXECUTED
4bcf0: 6000 fe9a braw 4bb8c <rtems_bdbuf_swapout_task+0xde> <== NOT EXECUTED
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
4bcf4: 4a39 0006 1f74 tstb 61f74 <bdbuf_cache+0x4>
4bcfa: 6600 fec0 bnew 4bbbc <rtems_bdbuf_swapout_task+0x10e>
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
4bcfe: 4eba eeae jsr %pc@(4abae <rtems_bdbuf_lock_cache>) <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4bd02: 2479 0006 1f76 moveal 61f76 <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);
4bd08: 47f9 0004 6f6c lea 46f6c <rtems_event_send>,%a3 <== NOT EXECUTED
4bd0e: 6014 bras 4bd24 <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;
4bd10: 4200 clrb %d0 <== NOT EXECUTED
4bd12: 1540 000c moveb %d0,%a2@(12) <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
4bd16: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4bd1a: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4bd1e: 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 ();
}
4bd20: 2452 moveal %a2@,%a2 <== NOT EXECUTED
4bd22: 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))
4bd24: b5fc 0006 1f7a cmpal #401274,%a2 <== NOT EXECUTED
4bd2a: 66e4 bnes 4bd10 <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 ();
4bd2c: 4eba eecc jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>) <== NOT EXECUTED
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
4bd30: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
4bd34: 4eb9 0004 3810 jsr 43810 <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
4bd3a: 42a7 clrl %sp@- <== NOT EXECUTED
4bd3c: 4eb9 0004 76d4 jsr 476d4 <rtems_task_delete> <== NOT EXECUTED
4bd42: 601a bras 4bd5e <rtems_bdbuf_swapout_task+0x2b0> <== NOT EXECUTED
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
4bd44: 2f06 movel %d6,%sp@-
4bd46: 2f02 movel %d2,%sp@-
4bd48: 42a7 clrl %sp@-
4bd4a: 4878 0004 pea 4 <CONTEXT_ARG>
4bd4e: 4eb9 0004 6e00 jsr 46e00 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
4bd54: 4fef 0010 lea %sp@(16),%sp
4bd58: 4a80 tstl %d0
4bd5a: 668a bnes 4bce6 <rtems_bdbuf_swapout_task+0x238>
4bd5c: 6096 bras 4bcf4 <rtems_bdbuf_swapout_task+0x246>
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
rtems_task_delete (RTEMS_SELF);
}
4bd5e: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4bd64: 4e5e unlk %fp <== NOT EXECUTED
0004bd68 <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)
{
4bd68: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4bd6c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED
4bd70: 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);
4bd74: 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);
4bd76: 47fa efae lea %pc@(4ad26 <rtems_bdbuf_wait_for_event>),%a3<== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
4bd7a: 0682 0000 000e addil #14,%d2 <== NOT EXECUTED
4bd80: 49fa fc20 lea %pc@(4b9a2 <rtems_bdbuf_swapout_write>),%a4<== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4bd84: 4bfa ee28 lea %pc@(4abae <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 ();
4bd88: 263c 0004 abfa movel #306170,%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)
4bd8e: 603e bras 4bdce <rtems_bdbuf_swapout_worker_task+0x66><== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
4bd90: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4bd94: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
4bd96: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4bd98: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
4bd9a: 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 );
4bd9c: 41ea 0012 lea %a2@(18),%a0 <== NOT EXECUTED
4bda0: 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;
4bda4: 2079 0006 1f7e moveal 61f7e <bdbuf_cache+0xe>,%a0 <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dd = BDBUF_INVALID_DEV;
4bdaa: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
the_node->next = tail;
4bdae: 24bc 0006 1f7a movel #401274,%a2@ <== NOT EXECUTED
tail->previous = the_node;
4bdb4: 23ca 0006 1f7e movel %a2,61f7e <bdbuf_cache+0xe> <== NOT EXECUTED
old_last->next = the_node;
4bdba: 208a movel %a2,%a0@ <== NOT EXECUTED
the_node->previous = old_last;
4bdbc: 2548 0004 movel %a0,%a2@(4) <== NOT EXECUTED
rtems_chain_append_unprotected (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
4bdc0: 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;
4bdc2: 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 );
4bdc6: 2542 0016 movel %d2,%a2@(22) <== NOT EXECUTED
4bdca: 4e90 jsr %a0@ <== NOT EXECUTED
4bdcc: 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)
4bdce: 4a2a 000c tstb %a2@(12) <== NOT EXECUTED
4bdd2: 66bc bnes 4bd90 <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);
4bdd4: 2f2a 0020 movel %a2@(32),%sp@- <== NOT EXECUTED
4bdd8: 47f9 0004 3810 lea 43810 <free>,%a3 <== NOT EXECUTED
4bdde: 4e93 jsr %a3@ <== NOT EXECUTED
free (worker);
4bde0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bde2: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
4bde4: 508f addql #8,%sp <== NOT EXECUTED
4bde6: 42ae 0008 clrl %fp@(8) <== NOT EXECUTED
}
4bdea: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 <== NOT EXECUTED
4bdf0: 4e5e unlk %fp <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
4bdf2: 4ef9 0004 76d4 jmp 476d4 <rtems_task_delete> <== NOT EXECUTED
0004b9a2 <rtems_bdbuf_swapout_write>:
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
4b9a2: 4e56 ffdc linkw %fp,#-36
4b9a6: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
4b9aa: 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 );
4b9ae: 260a movel %a2,%d3
4b9b0: 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))
4b9b2: b692 cmpl %a2@,%d3
4b9b4: 6700 00ee beqw 4baa4 <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;
4b9b8: 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;
4b9bc: 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;
4b9be: 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;
4b9c0: 4282 clrl %d2
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get_unprotected(
rtems_chain_control *the_chain
)
{
return _Chain_Get_unprotected( the_chain );
4b9c2: 2c3c 0004 ab50 movel #306000,%d6
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
4b9c8: 4bfa febe lea %pc@(4b888 <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;
4b9cc: 206b 0008 moveal %a3@(8),%a0
4b9d0: 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;
4b9d4: 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;
4b9d8: 206a 0012 moveal %a2@(18),%a0
4b9dc: 2140 000c movel %d0,%a0@(12)
transfer->write_req->bufnum = 0;
4b9e0: 42a8 0010 clrl %a0@(16)
while ((node = rtems_chain_get_unprotected(&transfer->bds)) != NULL)
4b9e4: 6000 008a braw 4ba70 <rtems_bdbuf_swapout_write+0xce>
4b9e8: 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 &&
4b9ec: 4a85 tstl %d5
4b9ee: 6722 beqs 4ba12 <rtems_bdbuf_swapout_write+0x70>
4b9f0: 4aac 0010 tstl %a4@(16)
4b9f4: 671c beqs 4ba12 <rtems_bdbuf_swapout_write+0x70>
bd->block != last_block + media_blocks_per_block)
4b9f6: 2202 movel %d2,%d1
4b9f8: 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 &&
4b9fa: b2a8 0016 cmpl %a0@(22),%d1
4b9fe: 6712 beqs 4ba12 <rtems_bdbuf_swapout_write+0x70>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4ba00: 2252 moveal %a2@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4ba02: 214a 0004 movel %a2,%a0@(4)
bd->block != last_block + media_blocks_per_block)
{
rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
write = true;
4ba06: 7001 moveq #1,%d0
before_node = after_node->next;
after_node->next = the_node;
4ba08: 2488 movel %a0,%a2@
the_node->next = before_node;
before_node->previous = the_node;
4ba0a: 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;
4ba0e: 2089 movel %a1,%a0@
4ba10: 602a bras 4ba3c <rtems_bdbuf_swapout_write+0x9a>
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4ba12: 222c 0010 movel %a4@(16),%d1
4ba16: 2401 movel %d1,%d2
transfer->write_req->bufnum++;
4ba18: 5281 addql #1,%d1
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4ba1a: e98a lsll #4,%d2
transfer->write_req->bufnum++;
4ba1c: 2941 0010 movel %d1,%a4@(16)
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
4ba20: 43f4 2818 lea %a4@(00000018,%d2:l),%a1
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
4ba24: 2428 0016 movel %a0@(22),%d2
buf->length = dd->block_size;
4ba28: 236b 0024 0004 movel %a3@(36),%a1@(4)
buf->buffer = bd->buffer;
4ba2e: 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;
4ba34: 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;
4ba36: 2348 000c movel %a0,%a1@(12)
buf->block = bd->block;
4ba3a: 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) ||
4ba3c: b692 cmpl %a2@,%d3
4ba3e: 6714 beqs 4ba54 <rtems_bdbuf_swapout_write+0xb2>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
4ba40: 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) ||
4ba44: 2239 0005 f1e6 movel 5f1e6 <rtems_bdbuf_configuration+0x4>,%d1
4ba4a: b2a8 0010 cmpl %a0@(16),%d1
4ba4e: 6304 blss 4ba54 <rtems_bdbuf_swapout_write+0xb2>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
write = true;
if (write)
4ba50: 4a00 tstb %d0
4ba52: 671c beqs 4ba70 <rtems_bdbuf_swapout_write+0xce>
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
4ba54: 42a7 clrl %sp@-
4ba56: 2f2a 0012 movel %a2@(18),%sp@-
4ba5a: 2f0b movel %a3,%sp@-
4ba5c: 4e95 jsr %a5@
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
4ba5e: 206a 0012 moveal %a2@(18),%a0
4ba62: 700c moveq #12,%d0
transfer->write_req->bufnum = 0;
4ba64: 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;
4ba68: 2140 000c movel %d0,%a0@(12)
transfer->write_req->bufnum = 0;
4ba6c: 42a8 0010 clrl %a0@(16)
4ba70: 2f0a movel %a2,%sp@-
4ba72: 2046 moveal %d6,%a0
4ba74: 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)
4ba76: 588f addql #4,%sp
4ba78: 2040 moveal %d0,%a0
4ba7a: 4a80 tstl %d0
4ba7c: 6600 ff6a bnew 4b9e8 <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 &&
4ba80: 4a2a 0010 tstb %a2@(16)
4ba84: 671e beqs 4baa4 <rtems_bdbuf_swapout_write+0x102>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
4ba86: 206b 0008 moveal %a3@(8),%a0
4ba8a: 7002 moveq #2,%d0
4ba8c: 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 &&
4ba90: 6712 beqs 4baa4 <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);
4ba92: 42a7 clrl %sp@- <== NOT EXECUTED
4ba94: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4ba98: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4ba9a: 206b 0038 moveal %a3@(56),%a0 <== NOT EXECUTED
4ba9e: 4e90 jsr %a0@ <== NOT EXECUTED
4baa0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/* How should the error be handled ? */
}
}
}
4baa4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
4baaa: 4e5e unlk %fp <== NOT EXECUTED
0004ad60 <rtems_bdbuf_swapout_writereq_alloc>:
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
4ad60: 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)));
4ad64: 2039 0005 f1e6 movel 5f1e6 <rtems_bdbuf_configuration+0x4>,%d0
4ad6a: e988 lsll #4,%d0
*
* @return rtems_blkdev_request* The write reference memory.
*/
static rtems_blkdev_request*
rtems_bdbuf_swapout_writereq_alloc (void)
{
4ad6c: 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 =
4ad6e: 2040 moveal %d0,%a0
4ad70: 4868 0018 pea %a0@(24)
4ad74: 4eb9 0004 3c84 jsr 43c84 <malloc>
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
4ad7a: 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 =
4ad7c: 2440 moveal %d0,%a2
malloc (sizeof (rtems_blkdev_request) +
(bdbuf_config.max_write_blocks * sizeof (rtems_blkdev_sg_buffer)));
if (!write_req)
4ad7e: 4a80 tstl %d0
4ad80: 6608 bnes 4ad8a <rtems_bdbuf_swapout_writereq_alloc+0x2a><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_REQ_NOMEM);
4ad82: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED
4ad86: 4eba fdee jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
write_req->req = RTEMS_BLKDEV_REQ_WRITE;
4ad8a: 7001 moveq #1,%d0
4ad8c: 2480 movel %d0,%a2@
write_req->done = rtems_bdbuf_transfer_done;
4ad8e: 203c 0004 b862 movel #309346,%d0
4ad94: 2540 0004 movel %d0,%a2@(4)
write_req->io_task = rtems_task_self ();
4ad98: 4eb9 0004 eaf0 jsr 4eaf0 <rtems_task_self>
4ad9e: 2540 0014 movel %d0,%a2@(20)
return write_req;
}
4ada2: 200a movel %a2,%d0
4ada4: 246e fffc moveal %fp@(-4),%a2
4ada8: 4e5e unlk %fp <== NOT EXECUTED
0004c77e <rtems_bdbuf_sync>:
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
4c77e: 4e56 fff4 linkw %fp,#-12
4c782: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4c786: 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)
4c78a: 4a8a tstl %a2
4c78c: 6700 00d4 beqw 4c862 <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();
4c790: 4eba e41c jsr %pc@(4abae <rtems_bdbuf_lock_cache>)
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
4c794: 202a 001e movel %a2@(30),%d0
4c798: 7203 moveq #3,%d1
4c79a: b280 cmpl %d0,%d1
4c79c: 6200 00b2 bhiw 4c850 <rtems_bdbuf_sync+0xd2>
4c7a0: 7405 moveq #5,%d2
4c7a2: b480 cmpl %d0,%d2
4c7a4: 640e bccs 4c7b4 <rtems_bdbuf_sync+0x36>
4c7a6: 123c 0006 moveb #6,%d1
4c7aa: b280 cmpl %d0,%d1
4c7ac: 6600 00a2 bnew 4c850 <rtems_bdbuf_sync+0xd2>
4c7b0: 6000 0094 braw 4c846 <rtems_bdbuf_sync+0xc8>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
4c7b4: 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;
4c7b6: 2079 0006 1fcc moveal 61fcc <bdbuf_cache+0x5c>,%a0
4c7bc: 2542 001e movel %d2,%a2@(30)
the_node->next = tail;
4c7c0: 24bc 0006 1fc8 movel #401352,%a2@
tail->previous = the_node;
4c7c6: 23ca 0006 1fcc movel %a2,61fcc <bdbuf_cache+0x5c>
old_last->next = the_node;
4c7cc: 208a movel %a2,%a0@
the_node->previous = old_last;
4c7ce: 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)
4c7d2: 4aaa 0022 tstl %a2@(34)
4c7d6: 670c beqs 4c7e4 <rtems_bdbuf_sync+0x66>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
4c7d8: 4879 0006 1fd0 pea 61fd0 <bdbuf_cache+0x60>
4c7de: 4eba e60c jsr %pc@(4adec <rtems_bdbuf_wake>)
4c7e2: 588f addql #4,%sp
rtems_bdbuf_wake_swapper ();
4c7e4: 4eba e42c jsr %pc@(4ac12 <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);
4c7e8: 47fa e508 lea %pc@(4acf2 <rtems_bdbuf_wait>),%a3
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
4c7ec: 202a 001e movel %a2@(30),%d0
4c7f0: 7201 moveq #1,%d1
4c7f2: b280 cmpl %d0,%d1
4c7f4: 621c bhis 4c812 <rtems_bdbuf_sync+0x94> <== NEVER TAKEN
4c7f6: 7407 moveq #7,%d2
4c7f8: b480 cmpl %d0,%d2
4c7fa: 641c bccs 4c818 <rtems_bdbuf_sync+0x9a>
4c7fc: 123c 000a moveb #10,%d1
4c800: b280 cmpl %d0,%d1
4c802: 650e bcss 4c812 <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);
4c804: 4879 0006 1fd8 pea 61fd8 <bdbuf_cache+0x68>
4c80a: 2f0a movel %a2,%sp@-
4c80c: 4e93 jsr %a3@
4c80e: 508f addql #8,%sp
4c810: 60da bras 4c7ec <rtems_bdbuf_sync+0x6e>
break;
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_9);
4c812: 4878 0015 pea 15 <OPER2+0x1> <== NOT EXECUTED
4c816: 603c bras 4c854 <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
4c818: 4aaa 0022 tstl %a2@(34)
4c81c: 663c bnes 4c85a <rtems_bdbuf_sync+0xdc>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
4c81e: 2200 movel %d0,%d1
4c820: 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
4c822: 7401 moveq #1,%d2
4c824: b481 cmpl %d1,%d2
4c826: 6532 bcss 4c85a <rtems_bdbuf_sync+0xdc> <== NEVER TAKEN
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
4c828: b480 cmpl %d0,%d2
4c82a: 660e bnes 4c83a <rtems_bdbuf_sync+0xbc>
{
rtems_bdbuf_remove_from_tree (bd);
4c82c: 2f0a movel %a2,%sp@-
4c82e: 4eba e654 jsr %pc@(4ae84 <rtems_bdbuf_remove_from_tree>)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
4c832: 2f0a movel %a2,%sp@-
4c834: 4eba e942 jsr %pc@(4b178 <rtems_bdbuf_make_free_and_add_to_lru_list>)
4c838: 508f addql #8,%sp
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
4c83a: 4879 0006 1fe0 pea 61fe0 <bdbuf_cache+0x70>
4c840: 4eba e5aa jsr %pc@(4adec <rtems_bdbuf_wake>)
4c844: 6006 bras 4c84c <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);
4c846: 2f0a movel %a2,%sp@-
4c848: 4eba f7e2 jsr %pc@(4c02c <rtems_bdbuf_discard_buffer_after_access>)
break;
4c84c: 588f addql #4,%sp
4c84e: 600a bras 4c85a <rtems_bdbuf_sync+0xdc>
default:
rtems_bdbuf_fatal_with_state (bd->state, RTEMS_BDBUF_FATAL_STATE_5);
4c850: 4878 0011 pea 11 <INVALID_OPERATION+0x1> <== NOT EXECUTED
4c854: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4c856: 4eba e36c jsr %pc@(4abc4 <rtems_bdbuf_fatal_with_state>)<== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
4c85a: 4eba e39e jsr %pc@(4abfa <rtems_bdbuf_unlock_cache>)
return RTEMS_SUCCESSFUL;
4c85e: 4280 clrl %d0
4c860: 6002 bras 4c864 <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;
4c862: 7009 moveq #9,%d0 <== NOT EXECUTED
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
return RTEMS_SUCCESSFUL;
}
4c864: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4c86a: 4e5e unlk %fp <== NOT EXECUTED
0004abda <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)
{
4abda: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_semaphore_release (lock);
4abde: 2f2e 0008 movel %fp@(8),%sp@-
4abe2: 4eb9 0004 74ac jsr 474ac <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
4abe8: 588f addql #4,%sp
4abea: 4a80 tstl %d0
4abec: 6708 beqs 4abf6 <rtems_bdbuf_unlock+0x1c> <== ALWAYS TAKEN
rtems_bdbuf_fatal (fatal_error_code);
4abee: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4abf2: 4eba ff82 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4abf6: 4e5e unlk %fp <== NOT EXECUTED
0004ad26 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
4ad26: 4e56 fffc linkw %fp,#-4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
4ad2a: 204e moveal %fp,%a0
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
4ad2c: 2f02 movel %d2,%sp@-
4ad2e: 242e 0008 movel %fp@(8),%d2
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
4ad32: 42a0 clrl %a0@-
sc = rtems_event_receive (event,
4ad34: 2f08 movel %a0,%sp@-
4ad36: 42a7 clrl %sp@-
4ad38: 42a7 clrl %sp@-
4ad3a: 2f02 movel %d2,%sp@-
4ad3c: 4eb9 0004 6e00 jsr 46e00 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
4ad42: 4fef 0010 lea %sp@(16),%sp
4ad46: 4a80 tstl %d0
4ad48: 6606 bnes 4ad50 <rtems_bdbuf_wait_for_event+0x2a><== NEVER TAKEN
4ad4a: b4ae fffc cmpl %fp@(-4),%d2
4ad4e: 6708 beqs 4ad58 <rtems_bdbuf_wait_for_event+0x32><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_EVNT);
4ad50: 4878 001c pea 1c <OPER2+0x8> <== NOT EXECUTED
4ad54: 4eba fe20 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4ad58: 242e fff8 movel %fp@(-8),%d2
4ad5c: 4e5e unlk %fp <== NOT EXECUTED
0004b14c <rtems_bdbuf_wait_for_transient_event>:
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_EVNT);
}
static void
rtems_bdbuf_wait_for_transient_event (void)
{
4b14c: 4e56 fffc linkw %fp,#-4
rtems_interval ticks
)
{
rtems_event_set event_out;
return rtems_event_system_receive(
4b150: 486e fffc pea %fp@(-4)
4b154: 42a7 clrl %sp@-
4b156: 42a7 clrl %sp@-
4b158: 2f3c 8000 0000 movel #-2147483648,%sp@-
4b15e: 4eb9 0004 e94c jsr 4e94c <rtems_event_system_receive>
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_event_transient_receive (RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4b164: 4fef 0010 lea %sp@(16),%sp
4b168: 4a80 tstl %d0
4b16a: 6708 beqs 4b174 <rtems_bdbuf_wait_for_transient_event+0x28><== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_WAIT_TRANS_EVNT);
4b16c: 4878 001d pea 1d <OPER2+0x9> <== NOT EXECUTED
4b170: 4eba fa04 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4b174: 4e5e unlk %fp <== NOT EXECUTED
0004adec <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)
{
4adec: 4e56 0000 linkw %fp,#0
4adf0: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
4adf4: 4a90 tstl %a0@
4adf6: 6718 beqs 4ae10 <rtems_bdbuf_wake+0x24>
{
sc = rtems_semaphore_flush (waiters->sema);
4adf8: 2f28 0004 movel %a0@(4),%sp@-
4adfc: 4eb9 0004 e8b0 jsr 4e8b0 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
4ae02: 588f addql #4,%sp
4ae04: 4a80 tstl %d0
4ae06: 6708 beqs 4ae10 <rtems_bdbuf_wake+0x24> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_CACHE_WAKE);
4ae08: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4ae0c: 4eba fd68 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
}
4ae10: 4e5e unlk %fp <== NOT EXECUTED
0004ac12 <rtems_bdbuf_wake_swapper>:
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
4ac12: 4e56 0000 linkw %fp,#0
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
4ac16: 4878 0004 pea 4 <CONTEXT_ARG>
4ac1a: 2f39 0006 1f70 movel 61f70 <bdbuf_cache>,%sp@-
4ac20: 4eb9 0004 6f6c jsr 46f6c <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
4ac26: 508f addql #8,%sp
4ac28: 4a80 tstl %d0
4ac2a: 6708 beqs 4ac34 <rtems_bdbuf_wake_swapper+0x22> <== ALWAYS TAKEN
rtems_bdbuf_fatal (RTEMS_BDBUF_FATAL_SO_WAKE_1);
4ac2c: 4878 000b pea b <LASTO+0x1> <== NOT EXECUTED
4ac30: 4eba ff44 jsr %pc@(4ab76 <rtems_bdbuf_fatal>) <== NOT EXECUTED
}
4ac34: 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 0006 0907 pea 60907 <map.6809+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 bcc2 lea 4bcc2 <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 2930 lea 52930 <snprintf>,%a5
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
size_t i = 0;
printf(
4243a: 4eb9 0005 26a0 jsr 526a0 <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 0006 08de movel #395486,%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 0006 08fc movel #395516,%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 0006 08f5 movel #395509,%d0
break;
424b0: 603e bras 424f0 <rtems_bdpart_dump+0xe8>
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
424b2: 203c 0006 08ea movel #395498,%d0 <== NOT EXECUTED
break;
424b8: 6036 bras 424f0 <rtems_bdpart_dump+0xe8> <== NOT EXECUTED
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
424ba: 203c 0006 08e5 movel #395493,%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 0006 0a47 pea 60a47 <map.6809+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 0006 08d7 movel #395479,%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 0006 0a4e pea 60a4e <map.6809+0x188>
42504: 4eb9 0005 25dc jsr 525dc <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 0006 09f7 pea 609f7 <map.6809+0x131>
4251c: 4eb9 0005 26a0 jsr 526a0 <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
0005c120 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5c120: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED
5c124: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5c128: 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);
5c12c: 49f9 0007 47f8 lea 747f8 <strlen>,%a4 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5c132: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5c136: 2f0a movel %a2,%sp@- <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5c138: 2c2e 0014 movel %fp@(20),%d6 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5c13c: 4eb9 0007 5694 jsr 75694 <strrchr> <== NOT EXECUTED
5c142: 508f addql #8,%sp <== NOT EXECUTED
5c144: 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);
5c146: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c148: 4e94 jsr %a4@ <== NOT EXECUTED
5c14a: 2640 moveal %d0,%a3 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
5c14c: 2e86 movel %d6,%sp@ <== NOT EXECUTED
5c14e: 4e94 jsr %a4@ <== NOT EXECUTED
5c150: 588f addql #4,%sp <== NOT EXECUTED
5c152: 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);
5c154: 486b 0004 pea %a3@(4) <== NOT EXECUTED
5c158: 4eb9 0004 2b68 jsr 42b68 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
5c15e: 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);
5c160: 2400 movel %d0,%d2 <== NOT EXECUTED
if (logical_disk_name == NULL) {
5c162: 6700 0106 beqw 5c26a <rtems_bdpart_mount+0x14a> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
5c166: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5c168: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c16a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5c16c: 4eb9 0007 49a4 jsr 749a4 <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
5c172: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5c176: 4a84 tstl %d4 <== NOT EXECUTED
5c178: 670c beqs 5c186 <rtems_bdpart_mount+0x66> <== NOT EXECUTED
disk_file_name += 1;
5c17a: 5284 addql #1,%d4 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
5c17c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5c17e: 4e94 jsr %a4@ <== NOT EXECUTED
5c180: 588f addql #4,%sp <== NOT EXECUTED
5c182: 2a00 movel %d0,%d5 <== NOT EXECUTED
5c184: 6004 bras 5c18a <rtems_bdpart_mount+0x6a> <== NOT EXECUTED
} else {
disk_file_name = disk_name;
disk_file_name_size = disk_name_size;
5c186: 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;
5c188: 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);
5c18a: 2a45 moveal %d5,%a5 <== NOT EXECUTED
5c18c: dbc3 addal %d3,%a5 <== NOT EXECUTED
5c18e: 486d 0005 pea %a5@(5) <== NOT EXECUTED
5c192: 4eb9 0004 2b68 jsr 42b68 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
5c198: 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);
5c19a: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (mount_point == NULL) {
5c19c: 4a80 tstl %d0 <== NOT EXECUTED
5c19e: 6700 00ae beqw 5c24e <rtems_bdpart_mount+0x12e> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5c1a2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c1a4: 49f9 0007 49a4 lea 749a4 <strncpy>,%a4 <== NOT EXECUTED
5c1aa: 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;
5c1ac: 47f3 2800 lea %a3@(00000000,%d2:l),%a3 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
5c1b0: 2c3c 0004 2d50 movel #273744,%d6 <== NOT EXECUTED
"msdos",
0,
NULL
);
if (rv != 0) {
rmdir( mount_point);
5c1b6: 2e3c 0005 f4a0 movel #390304,%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);
5c1bc: 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;
5c1be: 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);
5c1c2: 4e94 jsr %a4@ <== NOT EXECUTED
mount_point [mount_base_size] = '/';
5c1c4: 702f moveq #47,%d0 <== NOT EXECUTED
5c1c6: 1580 3800 moveb %d0,%a2@(00000000,%d3:l) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5c1ca: 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);
5c1cc: 2a3c 0005 f548 movel #390472,%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);
5c1d2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5c1d4: 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);
5c1d8: 283c 0007 3bbc movel #474044,%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) {
5c1de: 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);
5c1e0: 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) {
5c1e2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
5c1e6: 605c bras 5c244 <rtems_bdpart_mount+0x124> <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5c1e8: 5283 addql #1,%d3 <== NOT EXECUTED
5c1ea: 2044 moveal %d4,%a0 <== NOT EXECUTED
5c1ec: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c1ee: 4879 0008 f5c4 pea 8f5c4 <e2a_32V+0x2a3> <== NOT EXECUTED
5c1f4: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5c1f8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5c1fa: 4e90 jsr %a0@ <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
5c1fc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5c200: 7203 moveq #3,%d1 <== NOT EXECUTED
5c202: b280 cmpl %d0,%d1 <== NOT EXECUTED
5c204: 6d4c blts 5c252 <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);
5c206: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5c20a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5c20c: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5c20e: 4e94 jsr %a4@ <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
5c210: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> <== NOT EXECUTED
5c214: 2045 moveal %d5,%a0 <== NOT EXECUTED
5c216: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c218: 4e90 jsr %a0@ <== NOT EXECUTED
if (rv != 0) {
5c21a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5c21e: 4a80 tstl %d0 <== NOT EXECUTED
5c220: 6634 bnes 5c256 <rtems_bdpart_mount+0x136> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
5c222: 42a7 clrl %sp@- <== NOT EXECUTED
5c224: 2046 moveal %d6,%a0 <== NOT EXECUTED
5c226: 42a7 clrl %sp@- <== NOT EXECUTED
5c228: 4879 0008 dda1 pea 8dda1 <rtems_rtc_shell_usage+0x199f> <== NOT EXECUTED
5c22e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c230: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c232: 4e90 jsr %a0@ <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
5c234: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5c238: 4a80 tstl %d0 <== NOT EXECUTED
5c23a: 6708 beqs 5c244 <rtems_bdpart_mount+0x124> <== NOT EXECUTED
rmdir( mount_point);
5c23c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c23e: 2047 moveal %d7,%a0 <== NOT EXECUTED
5c240: 4e90 jsr %a0@ <== NOT EXECUTED
5c242: 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) {
5c244: b6ae 0010 cmpl %fp@(16),%d3 <== NOT EXECUTED
5c248: 669e bnes 5c1e8 <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;
5c24a: 4283 clrl %d3 <== NOT EXECUTED
5c24c: 600a bras 5c258 <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;
5c24e: 761a moveq #26,%d3 <== NOT EXECUTED
5c250: 6006 bras 5c258 <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;
5c252: 7603 moveq #3,%d3 <== NOT EXECUTED
5c254: 6002 bras 5c258 <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;
5c256: 761b moveq #27,%d3 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
5c258: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c25a: 47f9 0004 2898 lea 42898 <free>,%a3 <== NOT EXECUTED
5c260: 4e93 jsr %a3@ <== NOT EXECUTED
free( mount_point);
5c262: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c264: 4e93 jsr %a3@ <== NOT EXECUTED
return esc;
5c266: 508f addql #8,%sp <== NOT EXECUTED
5c268: 6002 bras 5c26c <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;
5c26a: 761a moveq #26,%d3 <== NOT EXECUTED
free( logical_disk_name);
free( mount_point);
return esc;
}
5c26c: 2003 movel %d3,%d0 <== NOT EXECUTED
5c26e: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5c274: 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 d6c0 jsr 4d6c0 <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 d94a jsr 4d94a <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 2550 jsr 52550 <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 d84c jsr 4d84c <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 2550 jsr 52550 <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 d6c0 jsr 4d6c0 <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 d84c jsr 4d84c <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 31b8 jsr 531b8 <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 2930 lea 52930 <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 32d0 jsr 532d0 <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 0006 0a74 pea 60a74 <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
0005c278 <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5c278: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED
5c27c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5c280: 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);
5c284: 45f9 0007 47f8 lea 747f8 <strlen>,%a2 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5c28a: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5c28e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
5c290: 2a2e 0014 movel %fp@(20),%d5 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
5c294: 4eb9 0007 5694 jsr 75694 <strrchr> <== NOT EXECUTED
5c29a: 508f addql #8,%sp <== NOT EXECUTED
5c29c: 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);
5c29e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c2a0: 4e92 jsr %a2@ <== NOT EXECUTED
5c2a2: 2800 movel %d0,%d4 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
5c2a4: 2e85 movel %d5,%sp@ <== NOT EXECUTED
5c2a6: 4e92 jsr %a2@ <== NOT EXECUTED
5c2a8: 588f addql #4,%sp <== NOT EXECUTED
5c2aa: 2400 movel %d0,%d2 <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
5c2ac: 4a8b tstl %a3 <== NOT EXECUTED
5c2ae: 670c beqs 5c2bc <rtems_bdpart_unmount+0x44> <== NOT EXECUTED
disk_file_name += 1;
5c2b0: 260b movel %a3,%d3 <== NOT EXECUTED
5c2b2: 5283 addql #1,%d3 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
5c2b4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c2b6: 4e92 jsr %a2@ <== NOT EXECUTED
5c2b8: 588f addql #4,%sp <== NOT EXECUTED
5c2ba: 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);
5c2bc: 2644 moveal %d4,%a3 <== NOT EXECUTED
5c2be: d7c2 addal %d2,%a3 <== NOT EXECUTED
5c2c0: 486b 0005 pea %a3@(5) <== NOT EXECUTED
5c2c4: 4eb9 0004 2b68 jsr 42b68 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
5c2ca: 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);
5c2cc: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (mount_point == NULL) {
5c2ce: 4a80 tstl %d0 <== NOT EXECUTED
5c2d0: 6778 beqs 5c34a <rtems_bdpart_unmount+0xd2> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
5c2d2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c2d4: 49f9 0007 49a4 lea 749a4 <strncpy>,%a4 <== NOT EXECUTED
5c2da: 2f05 movel %d5,%sp@- <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
5c2dc: 4bf9 0005 fb44 lea 5fb44 <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);
5c2e2: 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;
5c2e4: 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);
5c2e8: 4e94 jsr %a4@ <== NOT EXECUTED
mount_point [mount_base_size] = '/';
5c2ea: 702f moveq #47,%d0 <== NOT EXECUTED
5c2ec: 1580 2800 moveb %d0,%a2@(00000000,%d2:l) <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
5c2f0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5c2f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5c2f4: 4872 2801 pea %a2@(00000001,%d2:l) <== NOT EXECUTED
/* Unmount */
rv = unmount( mount_point);
if (rv == 0) {
/* Remove mount point */
rv = rmdir( mount_point);
5c2f8: 263c 0005 f4a0 movel #390304,%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) {
5c2fe: 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);
5c300: 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) {
5c302: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5c306: 49f9 0007 3bbc lea 73bbc <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) {
5c30c: 6032 bras 5c340 <rtems_bdpart_unmount+0xc8> <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
5c30e: 5282 addql #1,%d2 <== NOT EXECUTED
5c310: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5c312: 4879 0008 f5c4 pea 8f5c4 <e2a_32V+0x2a3> <== NOT EXECUTED
5c318: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5c31c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5c31e: 4e94 jsr %a4@ <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
5c320: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5c324: 7203 moveq #3,%d1 <== NOT EXECUTED
5c326: b280 cmpl %d0,%d1 <== NOT EXECUTED
5c328: 6d24 blts 5c34e <rtems_bdpart_unmount+0xd6> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
5c32a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c32c: 4e95 jsr %a5@ <== NOT EXECUTED
if (rv == 0) {
5c32e: 588f addql #4,%sp <== NOT EXECUTED
5c330: 4a80 tstl %d0 <== NOT EXECUTED
5c332: 660c bnes 5c340 <rtems_bdpart_unmount+0xc8> <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
5c334: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c336: 2043 moveal %d3,%a0 <== NOT EXECUTED
5c338: 4e90 jsr %a0@ <== NOT EXECUTED
if (rv != 0) {
5c33a: 588f addql #4,%sp <== NOT EXECUTED
5c33c: 4a80 tstl %d0 <== NOT EXECUTED
5c33e: 6612 bnes 5c352 <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) {
5c340: b4ae 0010 cmpl %fp@(16),%d2 <== NOT EXECUTED
5c344: 66c8 bnes 5c30e <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;
5c346: 4282 clrl %d2 <== NOT EXECUTED
5c348: 600a bras 5c354 <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;
5c34a: 741a moveq #26,%d2 <== NOT EXECUTED
5c34c: 6006 bras 5c354 <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;
5c34e: 7403 moveq #3,%d2 <== NOT EXECUTED
5c350: 6002 bras 5c354 <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;
5c352: 741b moveq #27,%d2 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
5c354: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5c356: 4eb9 0004 2898 jsr 42898 <free> <== NOT EXECUTED
return esc;
}
5c35c: 2002 movel %d2,%d0 <== NOT EXECUTED
5c35e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED
5c364: 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 d94a jsr 4d94a <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
0004ce24 <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)
{
4ce24: 4e56 0000 linkw %fp,#0
4ce28: 2f0a movel %a2,%sp@-
4ce2a: 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;
4ce2e: 2052 moveal %a2@,%a0
if (args->command != RTEMS_BLKIO_REQUEST)
4ce30: 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;
4ce34: 2068 002c moveal %a0@(44),%a0
if (args->command != RTEMS_BLKIO_REQUEST)
4ce38: 0c80 c018 4201 cmpil #-1072152063,%d0
4ce3e: 6718 beqs 4ce58 <rtems_blkdev_generic_ioctl+0x34><== NEVER TAKEN
{
args->ioctl_return = dd->ioctl(dd,
4ce40: 2f2a 0008 movel %a2@(8),%sp@-
4ce44: 2f00 movel %d0,%sp@-
4ce46: 2f08 movel %a0,%sp@-
4ce48: 2068 0038 moveal %a0@(56),%a0
4ce4c: 4e90 jsr %a0@
4ce4e: 4fef 000c lea %sp@(12),%sp
4ce52: 2540 000c movel %d0,%a2@(12)
4ce56: 6006 bras 4ce5e <rtems_blkdev_generic_ioctl+0x3a>
{
/*
* It is not allowed to directly access the driver circumventing the
* cache.
*/
args->ioctl_return = -1;
4ce58: 70ff moveq #-1,%d0 <== NOT EXECUTED
4ce5a: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
4ce5e: 246e fffc moveal %fp@(-4),%a2
4ce62: 4280 clrl %d0
4ce64: 4e5e unlk %fp <== NOT EXECUTED
0004cdd6 <rtems_blkdev_generic_open>:
rtems_device_driver
rtems_blkdev_generic_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void * arg)
{
4cdd6: 4e56 0000 linkw %fp,#0
rtems_libio_open_close_args_t *oc = arg;
rtems_libio_t *iop = oc->iop;
4cdda: 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)
{
4cdde: 2f0a movel %a2,%sp@-
rtems_libio_open_close_args_t *oc = arg;
rtems_libio_t *iop = oc->iop;
4cde0: 2450 moveal %a0@,%a2
4cde2: 222e 000c movel %fp@(12),%d1
4cde6: 202e 0008 movel %fp@(8),%d0
dev_t dev = rtems_filesystem_make_dev_t(major, minor);
rtems_disk_device *dd = rtems_disk_obtain(dev);
4cdea: 2f01 movel %d1,%sp@-
4cdec: 2f00 movel %d0,%sp@-
4cdee: 4eb9 0004 2c24 jsr 42c24 <rtems_disk_obtain>
iop->data1 = dd;
if (dd != NULL)
4cdf4: 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;
4cdf6: 2540 002c movel %d0,%a2@(44)
if (dd != NULL)
4cdfa: 6704 beqs 4ce00 <rtems_blkdev_generic_open+0x2a> <== NEVER TAKEN
return RTEMS_SUCCESSFUL;
4cdfc: 4280 clrl %d0
4cdfe: 6002 bras 4ce02 <rtems_blkdev_generic_open+0x2c>
else
return RTEMS_UNSATISFIED;
4ce00: 700d moveq #13,%d0 <== NOT EXECUTED
}
4ce02: 246e fffc moveal %fp@(-4),%a2
4ce06: 4e5e unlk %fp <== NOT EXECUTED
0004cc38 <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)
{
4cc38: 4e56 ffd0 linkw %fp,#-48
4cc3c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4cc40: 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);
4cc44: 4282 clrl %d2
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cc46: 4bf9 0004 c4f4 lea 4c4f4 <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;
4cc4c: 2052 moveal %a2@,%a0
4cc4e: 2668 002c moveal %a0@(44),%a3
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
4cc52: 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;
4cc56: 286b 0024 moveal %a3@(36),%a4
char *buf = args->buffer;
uint32_t count = args->count;
4cc5a: 2c2a 0010 movel %a2@(16),%d6
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4cc5e: 282a 0004 movel %a2@(4),%d4
4cc62: 2a2a 0008 movel %a2@(8),%d5
4cc66: 2f0c movel %a4,%sp@-
4cc68: 2f02 movel %d2,%sp@-
4cc6a: 2f05 movel %d5,%sp@-
4cc6c: 2f04 movel %d4,%sp@-
4cc6e: 4eb9 0005 d1e0 jsr 5d1e0 <__divdi3>
4cc74: 4fef 0010 lea %sp@(16),%sp
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cc78: 2f0c movel %a4,%sp@-
4cc7a: 2f02 movel %d2,%sp@-
4cc7c: 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);
4cc7e: 2d41 fff8 movel %d1,%fp@(-8)
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cc82: 2f04 movel %d4,%sp@-
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cc84: 280e movel %fp,%d4
4cc86: 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);
4cc88: 4eb9 0005 d640 jsr 5d640 <__moddi3>
4cc8e: 4fef 0010 lea %sp@(16),%sp
4cc92: 2601 movel %d1,%d3
args->bytes_moved = 0;
4cc94: 42aa 0018 clrl %a2@(24)
while (count > 0)
4cc98: 604c bras 4cce6 <rtems_blkdev_generic_read+0xae>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cc9a: 2f04 movel %d4,%sp@-
4cc9c: 2f00 movel %d0,%sp@-
4cc9e: 2f0b movel %a3,%sp@-
4cca0: 4e95 jsr %a5@
if (rc != RTEMS_SUCCESSFUL)
4cca2: 4fef 000c lea %sp@(12),%sp
4cca6: 4a80 tstl %d0
4cca8: 6648 bnes 4ccf2 <rtems_blkdev_generic_read+0xba> <== NEVER TAKEN
break;
copy = block_size - blkofs;
4ccaa: 2a0c movel %a4,%d5
4ccac: 9a83 subl %d3,%d5
4ccae: bc85 cmpl %d5,%d6
4ccb0: 6402 bccs 4ccb4 <rtems_blkdev_generic_read+0x7c> <== ALWAYS TAKEN
4ccb2: 2a06 movel %d6,%d5 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
4ccb4: 206e fffc moveal %fp@(-4),%a0
4ccb8: 5282 addql #1,%d2
4ccba: 2f05 movel %d5,%sp@-
4ccbc: d6a8 001a addl %a0@(26),%d3
4ccc0: 2f03 movel %d3,%sp@-
4ccc2: 2f07 movel %d7,%sp@-
4ccc4: 4eb9 0005 1344 jsr 51344 <memcpy>
rc = rtems_bdbuf_release(diskbuf);
4ccca: 2f2e fffc movel %fp@(-4),%sp@-
4ccce: 4eb9 0004 c680 jsr 4c680 <rtems_bdbuf_release>
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
4ccd4: 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;
4ccd8: dbaa 0018 addl %d5,%a2@(24)
if (rc != RTEMS_SUCCESSFUL)
4ccdc: 4a80 tstl %d0
4ccde: 6612 bnes 4ccf2 <rtems_blkdev_generic_read+0xba> <== NEVER TAKEN
break;
count -= copy;
4cce0: 9c85 subl %d5,%d6
buf += copy;
4cce2: de85 addl %d5,%d7
blkofs = 0;
4cce4: 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(
4cce6: 202e fff8 movel %fp@(-8),%d0
4ccea: 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)
4ccec: 4a86 tstl %d6
4ccee: 66aa bnes 4cc9a <rtems_blkdev_generic_read+0x62>
4ccf0: 4280 clrl %d0
blkofs = 0;
block++;
}
return rc;
}
4ccf2: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4ccf8: 4e5e unlk %fp <== NOT EXECUTED
0004ccfc <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)
{
4ccfc: 4e56 ffd0 linkw %fp,#-48
4cd00: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4cd04: 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);
4cd08: 4282 clrl %d2
4cd0a: 260e movel %fp,%d3
4cd0c: 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);
4cd0e: 4bf9 0004 c4f4 lea 4c4f4 <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;
4cd14: 2052 moveal %a2@,%a0
4cd16: 2668 002c moveal %a0@(44),%a3
uint32_t block_size = dd->block_size;
char *buf = args->buffer;
4cd1a: 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;
4cd1e: 286b 0024 moveal %a3@(36),%a4
char *buf = args->buffer;
uint32_t count = args->count;
4cd22: 2c2a 0010 movel %a2@(16),%d6
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
4cd26: 282a 0004 movel %a2@(4),%d4
4cd2a: 2a2a 0008 movel %a2@(8),%d5
4cd2e: 2f0c movel %a4,%sp@-
4cd30: 2f02 movel %d2,%sp@-
4cd32: 2f05 movel %d5,%sp@-
4cd34: 2f04 movel %d4,%sp@-
4cd36: 4eb9 0005 d1e0 jsr 5d1e0 <__divdi3>
4cd3c: 4fef 0010 lea %sp@(16),%sp
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cd40: 2f0c movel %a4,%sp@-
4cd42: 2f02 movel %d2,%sp@-
4cd44: 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);
4cd46: 2d41 fff8 movel %d1,%fp@(-8)
uint32_t blkofs = (uint32_t) (args->offset % block_size);
4cd4a: 2f04 movel %d4,%sp@-
4cd4c: 4eb9 0005 d640 jsr 5d640 <__moddi3>
4cd52: 4fef 0010 lea %sp@(16),%sp
4cd56: 2801 movel %d1,%d4
args->bytes_moved = 0;
4cd58: 42aa 0018 clrl %a2@(24)
while (count > 0)
4cd5c: 6062 bras 4cdc0 <rtems_blkdev_generic_write+0xc4>
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
4cd5e: 4a84 tstl %d4
4cd60: 6612 bnes 4cd74 <rtems_blkdev_generic_write+0x78><== NEVER TAKEN
4cd62: b9c6 cmpal %d6,%a4
4cd64: 620e bhis 4cd74 <rtems_blkdev_generic_write+0x78><== NEVER TAKEN
rc = rtems_bdbuf_get(dd, block, &diskbuf);
4cd66: 2f03 movel %d3,%sp@-
4cd68: 2f00 movel %d0,%sp@-
4cd6a: 2f0b movel %a3,%sp@-
4cd6c: 4eb9 0004 c436 jsr 4c436 <rtems_bdbuf_get>
4cd72: 6008 bras 4cd7c <rtems_blkdev_generic_write+0x80>
else
rc = rtems_bdbuf_read(dd, block, &diskbuf);
4cd74: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4cd76: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4cd78: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4cd7a: 4e95 jsr %a5@ <== NOT EXECUTED
4cd7c: 4fef 000c lea %sp@(12),%sp
if (rc != RTEMS_SUCCESSFUL)
4cd80: 4a80 tstl %d0
4cd82: 6648 bnes 4cdcc <rtems_blkdev_generic_write+0xd0><== NEVER TAKEN
break;
copy = block_size - blkofs;
4cd84: 2a0c movel %a4,%d5
4cd86: 9a84 subl %d4,%d5
4cd88: bc85 cmpl %d5,%d6
4cd8a: 6402 bccs 4cd8e <rtems_blkdev_generic_write+0x92><== ALWAYS TAKEN
4cd8c: 2a06 movel %d6,%d5 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
4cd8e: 2f05 movel %d5,%sp@-
4cd90: 226e fffc moveal %fp@(-4),%a1
4cd94: 5282 addql #1,%d2
4cd96: 2f07 movel %d7,%sp@-
4cd98: d8a9 001a addl %a1@(26),%d4
4cd9c: 2f04 movel %d4,%sp@-
4cd9e: 4eb9 0005 1344 jsr 51344 <memcpy>
args->bytes_moved += copy;
4cda4: dbaa 0018 addl %d5,%a2@(24)
rc = rtems_bdbuf_release_modified(diskbuf);
4cda8: 2f2e fffc movel %fp@(-4),%sp@-
4cdac: 4eb9 0004 c722 jsr 4c722 <rtems_bdbuf_release_modified>
if (rc != RTEMS_SUCCESSFUL)
4cdb2: 4fef 0010 lea %sp@(16),%sp
4cdb6: 4a80 tstl %d0
4cdb8: 6612 bnes 4cdcc <rtems_blkdev_generic_write+0xd0><== NEVER TAKEN
break;
count -= copy;
4cdba: 9c85 subl %d5,%d6
buf += copy;
4cdbc: de85 addl %d5,%d7
blkofs = 0;
4cdbe: 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(
4cdc0: 202e fff8 movel %fp@(-8),%d0
4cdc4: 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)
4cdc6: 4a86 tstl %d6
4cdc8: 6694 bnes 4cd5e <rtems_blkdev_generic_write+0x62>
4cdca: 4280 clrl %d0
blkofs = 0;
block++;
}
return rc;
}
4cdcc: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4cdd2: 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 d3be jsr 4d3be <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 11bc jsr 511bc <__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 11bc jsr 511bc <__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 1a6c lea 51a6c <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 d9b4 jsr 5d9b4 <__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 de14 jsr 5de14 <__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 d044 jsr 4d044 <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 d1d0 jsr 4d1d0 <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 11bc jsr 511bc <__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 1a6c lea 51a6c <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 d9b4 jsr 5d9b4 <__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 de14 jsr 5de14 <__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 cf86 jsr 4cf86 <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 d044 jsr 4d044 <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 d272 jsr 4d272 <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 11bc jsr 511bc <__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
0004cb48 <rtems_blkdev_ioctl>:
#include <rtems/blkdev.h>
#include <rtems/bdbuf.h>
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
4cb48: 4e56 0000 linkw %fp,#0
4cb4c: 206e 0008 moveal %fp@(8),%a0
4cb50: 202e 000c movel %fp@(12),%d0
4cb54: 226e 0010 moveal %fp@(16),%a1
rtems_status_code sc;
int rc = 0;
switch (req)
4cb58: 0c80 4004 4203 cmpil #1074020867,%d0
4cb5e: 675e beqs 4cbbe <rtems_blkdev_ioctl+0x76>
4cb60: 622e bhis 4cb90 <rtems_blkdev_ioctl+0x48>
4cb62: 0c80 2000 420a cmpil #536887818,%d0
4cb68: 6700 0094 beqw 4cbfe <rtems_blkdev_ioctl+0xb6>
4cb6c: 620c bhis 4cb7a <rtems_blkdev_ioctl+0x32>
4cb6e: 0c80 2000 4206 cmpil #536887814,%d0
4cb74: 6600 00ae bnew 4cc24 <rtems_blkdev_ioctl+0xdc>
4cb78: 6064 bras 4cbde <rtems_blkdev_ioctl+0x96>
4cb7a: 0c80 2000 420c cmpil #536887820,%d0
4cb80: 6700 0094 beqw 4cc16 <rtems_blkdev_ioctl+0xce>
4cb84: 0c80 4004 4202 cmpil #1074020866,%d0
4cb8a: 6600 0098 bnew 4cc24 <rtems_blkdev_ioctl+0xdc>
4cb8e: 6028 bras 4cbb8 <rtems_blkdev_ioctl+0x70>
4cb90: 0c80 4004 4209 cmpil #1074020873,%d0
4cb96: 6762 beqs 4cbfa <rtems_blkdev_ioctl+0xb2>
4cb98: 620c bhis 4cba6 <rtems_blkdev_ioctl+0x5e>
4cb9a: 0c80 4004 4205 cmpil #1074020869,%d0
4cba0: 6600 0082 bnew 4cc24 <rtems_blkdev_ioctl+0xdc>
4cba4: 6032 bras 4cbd8 <rtems_blkdev_ioctl+0x90>
4cba6: 0c80 4004 420b cmpil #1074020875,%d0
4cbac: 675a beqs 4cc08 <rtems_blkdev_ioctl+0xc0>
4cbae: 0c80 8004 4204 cmpil #-2147204604,%d0
4cbb4: 666e bnes 4cc24 <rtems_blkdev_ioctl+0xdc> <== NEVER TAKEN
4cbb6: 600c bras 4cbc4 <rtems_blkdev_ioctl+0x7c>
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*(uint32_t *) argp = dd->media_block_size;
4cbb8: 22a8 0020 movel %a0@(32),%a1@
4cbbc: 6062 bras 4cc20 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_GETBLKSIZE:
*(uint32_t *) argp = dd->block_size;
4cbbe: 22a8 0024 movel %a0@(36),%a1@
4cbc2: 605c bras 4cc20 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_SETBLKSIZE:
sc = rtems_bdbuf_set_block_size(dd, *(uint32_t *) argp, true);
4cbc4: 4878 0001 pea 1 <ADD>
4cbc8: 2f11 movel %a1@,%sp@-
4cbca: 2f08 movel %a0,%sp@-
4cbcc: 4eb9 0004 ca2e jsr 4ca2e <rtems_bdbuf_set_block_size>
if (sc != RTEMS_SUCCESSFUL) {
4cbd2: 4fef 000c lea %sp@(12),%sp
4cbd6: 6010 bras 4cbe8 <rtems_blkdev_ioctl+0xa0>
rc = -1;
}
break;
case RTEMS_BLKIO_GETSIZE:
*(rtems_blkdev_bnum *) argp = dd->size;
4cbd8: 22a8 001c movel %a0@(28),%a1@
4cbdc: 6042 bras 4cc20 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_SYNCDEV:
sc = rtems_bdbuf_syncdev(dd);
4cbde: 2f08 movel %a0,%sp@-
4cbe0: 4eb9 0004 c86e jsr 4c86e <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL) {
4cbe6: 588f addql #4,%sp
4cbe8: 4a80 tstl %d0
4cbea: 6734 beqs 4cc20 <rtems_blkdev_ioctl+0xd8> <== ALWAYS TAKEN
errno = EIO;
4cbec: 4eb9 0005 0b24 jsr 50b24 <__errno> <== NOT EXECUTED
4cbf2: 7205 moveq #5,%d1 <== NOT EXECUTED
4cbf4: 2040 moveal %d0,%a0 <== NOT EXECUTED
4cbf6: 2081 movel %d1,%a0@ <== NOT EXECUTED
4cbf8: 6036 bras 4cc30 <rtems_blkdev_ioctl+0xe8> <== NOT EXECUTED
rc = -1;
}
break;
case RTEMS_BLKIO_GETDISKDEV:
*(rtems_disk_device **) argp = dd;
4cbfa: 2288 movel %a0,%a1@
4cbfc: 6022 bras 4cc20 <rtems_blkdev_ioctl+0xd8>
break;
case RTEMS_BLKIO_PURGEDEV:
rtems_bdbuf_purge_dev(dd);
4cbfe: 2f08 movel %a0,%sp@-
4cc00: 4eb9 0004 c8c6 jsr 4c8c6 <rtems_bdbuf_purge_dev>
4cc06: 6016 bras 4cc1e <rtems_blkdev_ioctl+0xd6>
break;
case RTEMS_BLKIO_GETDEVSTATS:
rtems_bdbuf_get_device_stats(dd, (rtems_blkdev_stats *) argp);
4cc08: 2f09 movel %a1,%sp@-
4cc0a: 2f08 movel %a0,%sp@-
4cc0c: 4eb9 0004 cae4 jsr 4cae4 <rtems_bdbuf_get_device_stats>
break;
4cc12: 508f addql #8,%sp
4cc14: 600a bras 4cc20 <rtems_blkdev_ioctl+0xd8>
case RTEMS_BLKIO_RESETDEVSTATS:
rtems_bdbuf_reset_device_stats(dd);
4cc16: 2f08 movel %a0,%sp@-
4cc18: 4eb9 0004 cb1a jsr 4cb1a <rtems_bdbuf_reset_device_stats>
break;
4cc1e: 588f addql #4,%sp
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
rtems_status_code sc;
int rc = 0;
4cc20: 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;
4cc22: 600e bras 4cc32 <rtems_blkdev_ioctl+0xea>
default:
errno = EINVAL;
4cc24: 4eb9 0005 0b24 jsr 50b24 <__errno>
4cc2a: 2040 moveal %d0,%a0
4cc2c: 7016 moveq #22,%d0
4cc2e: 2080 movel %d0,%a0@
rc = -1;
4cc30: 70ff moveq #-1,%d0
break;
}
return rc;
}
4cc32: 4e5e unlk %fp
...
0005cd54 <rtems_blkstats>:
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
void rtems_blkstats(FILE *output, const char *device, bool reset)
{
5cd54: 4e56 ff8c linkw %fp,#-116 <== NOT EXECUTED
5cd58: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
int fd = open(device, O_RDONLY);
5cd5c: 42a7 clrl %sp@- <== NOT EXECUTED
5cd5e: 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)
{
5cd62: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
5cd66: 182e 0013 moveb %fp@(19),%d4 <== NOT EXECUTED
int fd = open(device, O_RDONLY);
5cd6a: 4eb9 0004 338c jsr 4338c <open> <== NOT EXECUTED
if (fd >= 0) {
5cd70: 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);
5cd72: 2600 movel %d0,%d3 <== NOT EXECUTED
if (fd >= 0) {
5cd74: 6d00 010c bltw 5ce82 <rtems_blkstats+0x12e> <== NOT EXECUTED
struct stat st;
int rv;
rv = fstat(fd, &st);
5cd78: 486e ffba pea %fp@(-70) <== NOT EXECUTED
5cd7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5cd7e: 4eb9 0005 e4c0 jsr 5e4c0 <fstat> <== NOT EXECUTED
if (rv == 0) {
5cd84: 508f addql #8,%sp <== NOT EXECUTED
5cd86: 4a80 tstl %d0 <== NOT EXECUTED
5cd88: 6600 00ac bnew 5ce36 <rtems_blkstats+0xe2> <== NOT EXECUTED
if (S_ISBLK(st.st_mode)) {
5cd8c: 202e ffc6 movel %fp@(-58),%d0 <== NOT EXECUTED
5cd90: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5cd96: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
5cd9c: 6600 0086 bnew 5ce24 <rtems_blkstats+0xd0> <== NOT EXECUTED
if (reset) {
5cda0: 4a04 tstb %d4 <== NOT EXECUTED
5cda2: 6730 beqs 5cdd4 <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);
5cda4: 2f3c 2000 420c movel #536887820,%sp@- <== NOT EXECUTED
5cdaa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5cdac: 4eb9 0005 ede0 jsr 5ede0 <ioctl> <== NOT EXECUTED
rv = rtems_disk_fd_reset_device_stats(fd);
if (rv != 0) {
5cdb2: 508f addql #8,%sp <== NOT EXECUTED
5cdb4: 4a80 tstl %d0 <== NOT EXECUTED
5cdb6: 6700 00a2 beqw 5ce5a <rtems_blkstats+0x106> <== NOT EXECUTED
fprintf(output, "error: reset stats: %s\n", strerror(errno));
5cdba: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5cdc0: 2040 moveal %d0,%a0 <== NOT EXECUTED
5cdc2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5cdc4: 4eb9 0007 4774 jsr 74774 <strerror> <== NOT EXECUTED
5cdca: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5cdcc: 4879 0008 ddb7 pea 8ddb7 <RTEMS_BDPART_MBR_MASTER_TYPE+0x10><== NOT EXECUTED
5cdd2: 607a bras 5ce4e <rtems_blkstats+0xfa> <== NOT EXECUTED
}
} else {
rtems_blkdev_stats stats;
rv = rtems_disk_fd_get_device_stats(fd, &stats);
5cdd4: 280e movel %fp,%d4 <== NOT EXECUTED
5cdd6: 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);
5cddc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5cdde: 2f3c 4004 420b movel #1074020875,%sp@- <== NOT EXECUTED
5cde4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5cde6: 4eb9 0005 ede0 jsr 5ede0 <ioctl> <== NOT EXECUTED
if (rv == 0) {
5cdec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5cdf0: 4a80 tstl %d0 <== NOT EXECUTED
5cdf2: 6616 bnes 5ce0a <rtems_blkstats+0xb6> <== NOT EXECUTED
rtems_blkdev_print_stats(
5cdf4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5cdf6: 4879 0006 f08a pea 6f08a <fprintf> <== NOT EXECUTED
5cdfc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5cdfe: 4eb9 0005 ceb0 jsr 5ceb0 <rtems_blkdev_print_stats> <== NOT EXECUTED
5ce04: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5ce08: 6050 bras 5ce5a <rtems_blkstats+0x106> <== NOT EXECUTED
&stats,
(rtems_printk_plugin_t) fprintf,
output
);
} else {
fprintf(output, "error: get stats: %s\n", strerror(errno));
5ce0a: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5ce10: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ce12: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ce14: 4eb9 0007 4774 jsr 74774 <strerror> <== NOT EXECUTED
5ce1a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ce1c: 4879 0008 ddcf pea 8ddcf <RTEMS_BDPART_MBR_MASTER_TYPE+0x28><== NOT EXECUTED
5ce22: 602a bras 5ce4e <rtems_blkstats+0xfa> <== NOT EXECUTED
}
}
} else {
fprintf(output, "error: not a block device\n");
5ce24: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ce26: 4879 0008 dde5 pea 8dde5 <RTEMS_BDPART_MBR_MASTER_TYPE+0x3e><== NOT EXECUTED
5ce2c: 4eb9 0006 f1de jsr 6f1de <fputs> <== NOT EXECUTED
5ce32: 508f addql #8,%sp <== NOT EXECUTED
5ce34: 6024 bras 5ce5a <rtems_blkstats+0x106> <== NOT EXECUTED
}
} else {
fprintf(output, "error: get file stats: %s\n", strerror(errno));
5ce36: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5ce3c: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ce3e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ce40: 4eb9 0007 4774 jsr 74774 <strerror> <== NOT EXECUTED
5ce46: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ce48: 4879 0008 de00 pea 8de00 <RTEMS_BDPART_MBR_MASTER_TYPE+0x59><== NOT EXECUTED
5ce4e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ce50: 4eb9 0006 f08a jsr 6f08a <fprintf> <== NOT EXECUTED
5ce56: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
rv = close(fd);
5ce5a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5ce5c: 4eb9 0005 e300 jsr 5e300 <close> <== NOT EXECUTED
if (rv != 0) {
5ce62: 588f addql #4,%sp <== NOT EXECUTED
5ce64: 4a80 tstl %d0 <== NOT EXECUTED
5ce66: 673e beqs 5cea6 <rtems_blkstats+0x152> <== NOT EXECUTED
fprintf(output, "error: close device: %s\n", strerror(errno));
5ce68: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5ce6e: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ce70: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ce72: 4eb9 0007 4774 jsr 74774 <strerror> <== NOT EXECUTED
5ce78: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ce7a: 4879 0008 de1b pea 8de1b <RTEMS_BDPART_MBR_MASTER_TYPE+0x74><== NOT EXECUTED
5ce80: 6018 bras 5ce9a <rtems_blkstats+0x146> <== NOT EXECUTED
}
} else {
fprintf(output, "error: open device: %s\n", strerror(errno));
5ce82: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
5ce88: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ce8a: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ce8c: 4eb9 0007 4774 jsr 74774 <strerror> <== NOT EXECUTED
5ce92: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ce94: 4879 0008 de34 pea 8de34 <RTEMS_BDPART_MBR_MASTER_TYPE+0x8d><== NOT EXECUTED
5ce9a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ce9c: 4eb9 0006 f08a jsr 6f08a <fprintf> <== NOT EXECUTED
5cea2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
}
5cea6: 4cee 001c ff8c moveml %fp@(-116),%d2-%d4 <== NOT EXECUTED
5ceac: 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 73ec lea 473ec <_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
...
0004ced0 <rtems_deviceio_errno>:
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4ced0: 4280 clrl %d0
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
4ced2: 4e56 0000 linkw %fp,#0
4ced6: 222e 0008 movel %fp@(8),%d1
4ceda: 2f02 movel %d2,%sp@-
if (sc == RTEMS_SUCCESSFUL) {
4cedc: 4a81 tstl %d1
4cede: 6722 beqs 4cf02 <rtems_deviceio_errno+0x32>
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
4cee0: 103c 001c moveb #28,%d0
4cee4: b081 cmpl %d1,%d0
4cee6: 650c bcss 4cef4 <rtems_deviceio_errno+0x24> <== NEVER TAKEN
eno = status_code_to_errno [sc];
4cee8: 41f9 0005 cc98 lea 5cc98 <status_code_to_errno>,%a0
4ceee: 2430 1c00 movel %a0@(00000000,%d1:l:4),%d2
4cef2: 6002 bras 4cef6 <rtems_deviceio_errno+0x26>
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
4cef4: 7416 moveq #22,%d2 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4cef6: 4eb9 0004 cf98 jsr 4cf98 <__errno>
4cefc: 2040 moveal %d0,%a0
return -1;
4cefe: 70ff moveq #-1,%d0
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4cf00: 2082 movel %d2,%a0@
return -1;
}
}
4cf02: 242e fffc movel %fp@(-4),%d2
4cf06: 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 cfb8 jsr 4cfb8 <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 1e56 moveal 61e56 <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 1e52 cmpl 61e52 <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 1e56 moveal 61e56 <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 1e56 moveal 61e56 <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
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 1e56 moveal 61e56 <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 1e52 cmpl 61e52 <disktab_size>,%d2
42e6e: 65ca bcss 42e3a <rtems_disk_io_done+0x16>
free_disk_device(dd);
}
}
free(dtab->minor);
}
free(disktab);
42e70: 2f39 0006 1e56 movel 61e56 <disktab>,%sp@-
42e76: 4eb9 0004 3810 jsr 43810 <free>
rtems_semaphore_delete(diskdevs_mutex);
42e7c: 2f39 0006 1e4e movel 61e4e <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 1e4e clrl 61e4e <diskdevs_mutex>
disktab = NULL;
42e98: 42b9 0006 1e56 clrl 61e56 <disktab>
disktab_size = 0;
42e9e: 42b9 0006 1e52 clrl 61e52 <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 1e52 tstl 61e52 <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 1e56 movel %d0,61e56 <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 1e4e pea 61e4e <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 1e4c moveb %d0,61e4c <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 1e56 movel 61e56 <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 c07a jsr 4c07a <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 1e4e movel 61e4e <diskdevs_mutex>,%sp@- <== NOT EXECUTED
42df6: 4eb9 0004 7308 jsr 47308 <rtems_semaphore_delete> <== NOT EXECUTED
free(disktab);
42dfc: 2f39 0006 1e56 movel 61e56 <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 1e52 movel %d0,61e52 <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 1e52 movel 61e52 <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 1e56 movel 61e56 <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 1e4c moveb 61e4c <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
0004e94c <rtems_event_system_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
4e94c: 4e56 0000 linkw %fp,#0
4e950: 202e 0008 movel %fp@(8),%d0
4e954: 206e 0014 moveal %fp@(20),%a0
4e958: 2f0a movel %a2,%sp@-
rtems_status_code sc;
if ( event_out != NULL ) {
4e95a: 4a88 tstl %a0
4e95c: 6758 beqs 4e9b6 <rtems_event_system_receive+0x6a><== NEVER TAKEN
Thread_Control *executing = _Thread_Executing;
4e95e: 2479 0006 2c52 moveal 62c52 <_Per_CPU_Information+0xe>,%a2
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
4e964: 226a 00fa moveal %a2@(250),%a1
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
4e968: 4a80 tstl %d0
4e96a: 6742 beqs 4e9ae <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;
4e96c: 2239 0006 280a movel 6280a <_Thread_Dispatch_disable_level>,%d1
++level;
4e972: 5281 addql #1,%d1
_Thread_Dispatch_disable_level = level;
4e974: 23c1 0006 280a movel %d1,6280a <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_Event_Seize(
4e97a: 2f3c 0004 0000 movel #262144,%sp@-
4e980: 4879 0006 302c pea 6302c <_System_event_Sync_state>
4e986: 4869 0004 pea %a1@(4)
4e98a: 2f0a movel %a2,%sp@-
4e98c: 2f08 movel %a0,%sp@-
4e98e: 2f2e 0010 movel %fp@(16),%sp@-
4e992: 2f2e 000c movel %fp@(12),%sp@-
4e996: 2f00 movel %d0,%sp@-
4e998: 4eb9 0004 6e70 jsr 46e70 <_Event_Seize>
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
4e99e: 4fef 0020 lea %sp@(32),%sp
4e9a2: 4eb9 0004 9938 jsr 49938 <_Thread_Enable_dispatch>
sc = executing->Wait.return_code;
4e9a8: 202a 0034 movel %a2@(52),%d0
4e9ac: 600a bras 4e9b8 <rtems_event_system_receive+0x6c>
} else {
*event_out = event->pending_events;
4e9ae: 20a9 0004 movel %a1@(4),%a0@ <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
4e9b2: 4280 clrl %d0 <== NOT EXECUTED
4e9b4: 6002 bras 4e9b8 <rtems_event_system_receive+0x6c><== NOT EXECUTED
}
} else {
sc = RTEMS_INVALID_ADDRESS;
4e9b6: 7009 moveq #9,%d0 <== NOT EXECUTED
}
return sc;
}
4e9b8: 246e fffc moveal %fp@(-4),%a2
4e9bc: 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 871c jsr 4871c <_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 f6f8 pea 5f6f8 <_System_event_Sync_state>
464a0: 2228 00fa movel %a0@(250),%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 86fc jsr 486fc <_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 0007 01d8 moveal 701d8 <_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 c61a lea 5c61a <fputs>,%a2 <== NOT EXECUTED
45898: 4879 0006 b90d pea 6b90d <map.6809+0x57> <== NOT EXECUTED
4589e: 4e92 jsr %a2@ <== NOT EXECUTED
vfprintf (stderr, format, args);
458a0: 2079 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
458a6: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
458aa: 4879 0006 b91a pea 6b91a <map.6809+0x64> <== NOT EXECUTED
458b0: 4e92 jsr %a2@ <== NOT EXECUTED
fprintf (stderr, "\n");
458b2: 2079 0007 01d8 moveal 701d8 <_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 c544 jsr 5c544 <fputc> <== NOT EXECUTED
fflush (stderr);
458c6: 2079 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
458cc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
458d0: 4eb9 0005 c116 jsr 5c116 <fflush> <== NOT EXECUTED
va_end (args);
exit (1);
458d6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
458da: 4eb9 0005 bda8 jsr 5bda8 <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 bb6a pea 6bb6a <map.6809+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 bb7e pea 6bb7e <map.6809+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 bb95 pea 6bb95 <map.6809+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 bbb4 pea 6bbb4 <map.6809+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 bbc0 pea 6bbc0 <map.6809+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 bbf1 pea 6bbf1 <map.6809+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 bc10 pea 6bc10 <map.6809+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 bc24 pea 6bc24 <map.6809+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 df0c jsr 5df0c <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 b981 pea 6b981 <map.6809+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 ce5c jsr 5ce5c <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 0007 01d8 moveal 701d8 <_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 b8dd pea 6b8dd <map.6809+0x27> <== NOT EXECUTED
43ab2: 4eb9 0005 c61a jsr 5c61a <fputs> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
43ab8: 486e 000c pea %fp@(12) <== NOT EXECUTED
43abc: 2079 0007 01d8 moveal 701d8 <_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 3fbc jsr 63fbc <vfprintf> <== NOT EXECUTED
fprintf (stderr, "\n");
43ad0: 2079 0007 01d8 moveal 701d8 <_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 c544 jsr 5c544 <fputc> <== NOT EXECUTED
fflush (stderr);
43ae6: 2079 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
43aec: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
43af0: 4eb9 0005 c116 jsr 5c116 <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 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
4394e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43952: 4879 0006 b8c7 pea 6b8c7 <map.6809+0x11> <== NOT EXECUTED
43958: 4eb9 0005 c61a jsr 5c61a <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
4395e: 486e 0010 pea %fp@(16) <== NOT EXECUTED
43962: 2079 0007 01d8 moveal 701d8 <_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 3fbc jsr 63fbc <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
43976: 2079 0007 01d8 moveal 701d8 <_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 c544 jsr 5c544 <fputc> <== NOT EXECUTED
fflush (stdout);
4398c: 2079 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
43992: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43996: 4eb9 0005 c116 jsr 5c116 <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 0008 0f6c movel %d0,80f6c <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 c35a pea 6c35a <map.6809+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 ccf8 jsr 5ccf8 <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 0008 0f64 addal 80f64 <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 c2e7 pea 6c2e7 <map.6809+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 c2ff pea 6c2ff <map.6809+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 df0c jsr 5df0c <strerror> <== NOT EXECUTED
457c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
457c2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
457c4: 4879 0006 c316 pea 6c316 <map.6809+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 df0c jsr 5df0c <strerror> <== NOT EXECUTED
45816: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45818: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4581a: 4879 0006 c337 pea 6c337 <map.6809+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 0007 0028 movel 70028 <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 0008 0f68 movel %d0,80f68 <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 0007 0028 movel 70028 <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 0008 0f64 movel %d0,80f64 <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 af14 lea 6af14 <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 bd98 lea 5bd98 <__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 0008 0f64 moveal 80f64 <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 0008 0f68 cmpl 80f68 <rtems_flashdisk_count>,%d3
447c8: 6410 bccs 447da <rtems_fdisk_ioctl+0xae> <== NEVER TAKEN
(rtems_flashdisks[minor].device_count == 0))
447ca: 2079 0008 0f64 moveal 80f64 <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 bd98 jsr 5bd98 <__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 0008 0f64 addal 80f64 <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 bd4a pea 6bd4a <map.6809+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 bd58 pea 6bd58 <map.6809+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 bd7b pea 6bd7b <map.6809+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 ce5c jsr 5ce5c <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 dc1e movel #449566,%d1
448c6: 6006 bras 448ce <rtems_fdisk_ioctl+0x1a2>
448c8: 223c 0006 b9b9 movel #440761,%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 bd9e pea 6bd9e <map.6809+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 df0c jsr 5df0c <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 bde5 pea 6bde5 <map.6809+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 0008 0f6c moveal 80f6c <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 be1a pea 6be1a <map.6809+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 be4d pea 6be4d <map.6809+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 be81 pea 6be81 <map.6809+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 0008 0f64 addal 80f64 <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 beb1 pea 6beb1 <map.6809+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 bec0 pea 6bec0 <map.6809+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 bee4 pea 6bee4 <map.6809+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 bf05 pea 6bf05 <map.6809+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 bf2a pea 6bf2a <map.6809+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 bf58 pea 6bf58 <map.6809+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 df0c jsr 5df0c <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 bfa2 pea 6bfa2 <map.6809+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 bfde pea 6bfde <map.6809+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 bffe pea 6bffe <map.6809+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 0008 0f6c moveal 80f6c <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 dc1e movel #449566,%d1 <== NOT EXECUTED
44d7c: 6006 bras 44d84 <rtems_fdisk_ioctl+0x658> <== NOT EXECUTED
44d7e: 223c 0006 b9b9 movel #440761,%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 c024 pea 6c024 <map.6809+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 df0c jsr 5df0c <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 c073 pea 6c073 <map.6809+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 df0c jsr 5df0c <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 c0aa pea 6c0aa <map.6809+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 c0e6 pea 6c0e6 <map.6809+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 0008 0f64 addal 80f64 <rtems_flashdisks>,%a2 <== NOT EXECUTED
{
uint32_t device;
int ret;
#if RTEMS_FDISK_TRACE
rtems_fdisk_info (fd, "erase-disk");
44ef0: 4879 0006 c11a pea 6c11a <map.6809+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 c125 pea 6c125 <map.6809+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 c137 pea 6c137 <map.6809+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 0008 0f64 addl 80f64 <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 0008 0f64 addl 80f64 <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 0008 0f64 addal 80f64 <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 0008 0f64 moveal 80f64 <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 0008 0f64 addal 80f64 <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 c14b pea 6c14b <map.6809+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 c16c pea 6c16c <map.6809+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 c17b pea 6c17b <map.6809+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 c18d pea 6c18d <map.6809+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 c1a5 pea 6c1a5 <map.6809+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 c1b4 pea 6c1b4 <map.6809+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 c1ce pea 6c1ce <map.6809+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 c1e3 pea 6c1e3 <map.6809+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 c1f9 pea 6c1f9 <map.6809+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 bd42 movel #441666,%d0 <== NOT EXECUTED
451fe: b283 cmpl %d3,%d1 <== NOT EXECUTED
45200: 6606 bnes 45208 <rtems_fdisk_ioctl+0xadc> <== NOT EXECUTED
45202: 203c 0006 bd3f movel #441663,%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 c210 pea 6c210 <map.6809+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 c22b pea 6c22b <map.6809+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 c23b pea 6c23b <map.6809+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 c248 pea 6c248 <map.6809+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 c25c pea 6c25c <map.6809+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 c289 pea 6c289 <map.6809+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 c2c5 pea 6c2c5 <map.6809+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 c2d0 pea 6c2d0 <map.6809+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 2680 jsr 52680 <rtems_blkdev_ioctl>
break;
453f2: 4fef 000c lea %sp@(12),%sp
}
sc = rtems_semaphore_release (rtems_flashdisks[minor].lock);
453f6: 2079 0008 0f64 moveal 80f64 <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 bd98 jsr 5bd98 <__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 bd98 jsr 5bd98 <__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 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
439c6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439ca: 4879 0006 b8c7 pea 6b8c7 <map.6809+0x11> <== NOT EXECUTED
439d0: 4eb9 0005 c61a jsr 5c61a <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
439d6: 486e 0010 pea %fp@(16) <== NOT EXECUTED
439da: 2079 0007 01d8 moveal 701d8 <_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 3fbc jsr 63fbc <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
439ee: 2079 0007 01d8 moveal 701d8 <_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 c544 jsr 5c544 <fputc> <== NOT EXECUTED
fflush (stdout);
43a04: 2079 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
43a0a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a0e: 4eb9 0005 c116 jsr 5c116 <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 dc1e movel #449566,%d1
43f0c: 6006 bras 43f14 <rtems_fdisk_queue_segment+0x22>
43f0e: 223c 0006 b9b9 movel #440761,%d1
43f14: 4aaa 0028 tstl %a2@(40)
43f18: 6708 beqs 43f22 <rtems_fdisk_queue_segment+0x30> <== ALWAYS TAKEN
43f1a: 203c 0006 b9be movel #440766,%d0 <== NOT EXECUTED
43f20: 6006 bras 43f28 <rtems_fdisk_queue_segment+0x36> <== NOT EXECUTED
43f22: 203c 0006 db8b movel #449419,%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 b9c5 pea 6b9c5 <map.6809+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 ce5c jsr 5ce5c <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 bc45 pea 6bc45 <map.6809+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 b91a pea 6b91a <map.6809+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 df0c jsr 5df0c <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 bc66 pea 6bc66 <map.6809+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 bca7 pea 6bca7 <map.6809+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 bcc0 pea 6bcc0 <map.6809+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 bce6 pea 6bce6 <map.6809+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 bd10 pea 6bd10 <map.6809+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 b9f9 pea 6b9f9 <map.6809+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 ba1b pea 6ba1b <map.6809+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 ba4a pea 6ba4a <map.6809+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 ba72 pea 6ba72 <map.6809+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 df0c jsr 5df0c <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 baa2 pea 6baa2 <map.6809+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 df0c jsr 5df0c <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 bae5 pea 6bae5 <map.6809+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 bb26 pea 6bb26 <map.6809+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 bb4a pea 6bb4a <map.6809+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 b95d pea 6b95d <map.6809+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 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
43a3c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a40: 4879 0006 b8ce pea 6b8ce <map.6809+0x18> <== NOT EXECUTED
43a46: 4eb9 0005 c61a jsr 5c61a <fputs> <== NOT EXECUTED
ret = vfprintf (stdout, format, args);
43a4c: 486e 0010 pea %fp@(16) <== NOT EXECUTED
43a50: 2079 0007 01d8 moveal 701d8 <_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 3fbc jsr 63fbc <vfprintf> <== NOT EXECUTED
fprintf (stdout, "\n");
43a64: 2079 0007 01d8 moveal 701d8 <_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 c544 jsr 5c544 <fputc> <== NOT EXECUTED
fflush (stdout);
43a7a: 2079 0007 01d8 moveal 701d8 <_impure_ptr>,%a0 <== NOT EXECUTED
43a80: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a84: 4eb9 0005 c116 jsr 5c116 <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
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 edc8 movel 5edc8 <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 edc8 movel 5edc8 <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 69f0 jsr 469f0 <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>
0004a5f0 <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
)
{
4a5f0: 4e56 ffe4 linkw %fp,#-28
4a5f4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
4a5f8: 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 =
4a5fc: 280a movel %a2,%d4
rtems_filesystem_eval_path_context_t *ctx,
const char **token,
size_t *tokenlen
)
{
rtems_filesystem_eval_path_next_token(ctx);
4a5fe: 4bf9 0004 a7d4 lea 4a7d4 <rtems_filesystem_eval_path_next_token>,%a5
4a604: 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
)
{
4a60a: 242e 000c movel %fp@(12),%d2
4a60e: 266e 0010 moveal %fp@(16),%a3
4a612: 2f0a movel %a2,%sp@-
4a614: 4e95 jsr %a5@
*token = ctx->token;
4a616: 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) {
4a61a: 588f addql #4,%sp
*tokenlen = ctx->tokenlen;
4a61c: 262a 000c movel %a2@(12),%d3
4a620: 6700 0158 beqw 4a77a <rtems_filesystem_eval_path_generic+0x18a>
if ((*config->is_directory)(ctx, arg)) {
4a624: 2f02 movel %d2,%sp@-
4a626: 2f0a movel %a2,%sp@-
4a628: 2053 moveal %a3@,%a0
4a62a: 4e90 jsr %a0@
4a62c: 508f addql #8,%sp
4a62e: 4a00 tstb %d0
4a630: 6700 0134 beqw 4a766 <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] == '.';
4a634: 7001 moveq #1,%d0
4a636: b083 cmpl %d3,%d0
4a638: 6610 bnes 4a64a <rtems_filesystem_eval_path_generic+0x5a>
4a63a: 722e moveq #46,%d1
4a63c: 1014 moveb %a4@,%d0
4a63e: b380 eorl %d1,%d0
4a640: 4a00 tstb %d0
4a642: 57c0 seq %d0
4a644: 49c0 extbl %d0
4a646: 4480 negl %d0
4a648: 6002 bras 4a64c <rtems_filesystem_eval_path_generic+0x5c>
4a64a: 4280 clrl %d0
if (rtems_filesystem_is_current_directory(token, tokenlen)) {
4a64c: 0800 0000 btst #0,%d0
4a650: 6722 beqs 4a674 <rtems_filesystem_eval_path_generic+0x84>
if (rtems_filesystem_eval_path_has_path(ctx)) {
4a652: 4aaa 0004 tstl %a2@(4)
4a656: 6704 beqs 4a65c <rtems_filesystem_eval_path_generic+0x6c>
4a658: 6000 00b4 braw 4a70e <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) {
4a65c: 202a 0010 movel %a2@(16),%d0
4a660: 0280 0000 0100 andil #256,%d0
4a666: 6604 bnes 4a66c <rtems_filesystem_eval_path_generic+0x7c>
4a668: 6000 00a4 braw 4a70e <rtems_filesystem_eval_path_generic+0x11e>
status = (*config->eval_token)(ctx, arg, ".", 1);
} else {
rtems_filesystem_eval_path_error(ctx, EINVAL);
4a66c: 4878 0016 pea 16 <OPER2+0x2>
4a670: 6000 00f8 braw 4a76a <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] == '.';
4a674: 7002 moveq #2,%d0
4a676: b083 cmpl %d3,%d0
4a678: 661a bnes 4a694 <rtems_filesystem_eval_path_generic+0xa4>
4a67a: 722e moveq #46,%d1
4a67c: 1014 moveb %a4@,%d0
4a67e: 49c0 extbl %d0
4a680: b280 cmpl %d0,%d1
4a682: 6610 bnes 4a694 <rtems_filesystem_eval_path_generic+0xa4>
4a684: 102c 0001 moveb %a4@(1),%d0
4a688: b380 eorl %d1,%d0
4a68a: 4a00 tstb %d0
4a68c: 57c0 seq %d0
4a68e: 49c0 extbl %d0
4a690: 4480 negl %d0
4a692: 6002 bras 4a696 <rtems_filesystem_eval_path_generic+0xa6>
4a694: 4280 clrl %d0
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
} else if (rtems_filesystem_is_parent_directory(token, tokenlen)) {
4a696: 0800 0000 btst #0,%d0
4a69a: 6700 008a beqw 4a726 <rtems_filesystem_eval_path_generic+0x136>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
4a69e: 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 );
4a6a2: 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;
4a6a4: 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 );
4a6a8: b3e8 0014 cmpal %a0@(20),%a1
4a6ac: 6616 bnes 4a6c4 <rtems_filesystem_eval_path_generic+0xd4>
4a6ae: 2269 000c moveal %a1@(12),%a1
4a6b2: 2f08 movel %a0,%sp@-
4a6b4: 2f04 movel %d4,%sp@-
4a6b6: 2069 0010 moveal %a1@(16),%a0
4a6ba: 4e90 jsr %a0@
4a6bc: 508f addql #8,%sp
4a6be: 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)) {
4a6c4: 0800 0000 btst #0,%d0
4a6c8: 6702 beqs 4a6cc <rtems_filesystem_eval_path_generic+0xdc>
4a6ca: 6042 bras 4a70e <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;
4a6cc: 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 );
4a6d0: 2268 000c moveal %a0@(12),%a1
4a6d4: 2f28 0024 movel %a0@(36),%sp@-
4a6d8: 2f04 movel %d4,%sp@-
4a6da: 2069 0010 moveal %a1@(16),%a0
4a6de: 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)) {
4a6e0: 508f addql #8,%sp
4a6e2: 4a00 tstb %d0
4a6e4: 6734 beqs 4a71a <rtems_filesystem_eval_path_generic+0x12a>
if (currentloc->mt_entry->mt_point_node != NULL) {
4a6e6: 206a 002c moveal %a2@(44),%a0
4a6ea: 4aa8 0020 tstl %a0@(32)
4a6ee: 671e beqs 4a70e <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;
4a6f0: 202a 000c movel %a2@(12),%d0
ctx->path -= tokenlen;
4a6f4: 9192 subl %d0,%a2@
ctx->pathlen += tokenlen;
4a6f6: d1aa 0004 addl %d0,%a2@(4)
ctx->tokenlen = 0;
4a6fa: 42aa 000c clrl %a2@(12)
rtems_filesystem_eval_path_put_back_token(ctx);
rtems_filesystem_eval_path_restart(
4a6fe: 4868 0020 pea %a0@(32)
4a702: 2f0a movel %a2,%sp@-
4a704: 4eb9 0004 3bd6 jsr 43bd6 <rtems_filesystem_eval_path_restart>
4a70a: 508f addql #8,%sp
4a70c: 606c bras 4a77a <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);
4a70e: 4878 0001 pea 1 <ADD>
4a712: 4879 0005 cabd pea 5cabd <status_flags_assoc+0x31>
4a718: 6010 bras 4a72a <rtems_filesystem_eval_path_generic+0x13a>
}
} else {
status = (*config->eval_token)(ctx, arg, "..", 2);
4a71a: 4878 0002 pea 2 <DOUBLE_FLOAT>
4a71e: 4879 0005 cabc pea 5cabc <status_flags_assoc+0x30>
4a724: 6004 bras 4a72a <rtems_filesystem_eval_path_generic+0x13a>
}
} else {
status = (*config->eval_token)(ctx, arg, token, tokenlen);
4a726: 2f03 movel %d3,%sp@-
4a728: 2f0c movel %a4,%sp@-
4a72a: 2f02 movel %d2,%sp@-
4a72c: 2f0a movel %a2,%sp@-
4a72e: 206b 0004 moveal %a3@(4),%a0
4a732: 4e90 jsr %a0@
4a734: 4fef 0010 lea %sp@(16),%sp
}
if (status == RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY) {
4a738: 7202 moveq #2,%d1
4a73a: b280 cmpl %d0,%d1
4a73c: 6636 bnes 4a774 <rtems_filesystem_eval_path_generic+0x184>
if (rtems_filesystem_eval_path_has_path(ctx)) {
4a73e: 4aaa 0004 tstl %a2@(4)
4a742: 6736 beqs 4a77a <rtems_filesystem_eval_path_generic+0x18a>
int eval_flags;
rtems_filesystem_eval_path_eat_delimiter(ctx);
4a744: 2f0a movel %a2,%sp@-
4a746: 4eb9 0004 a784 jsr 4a784 <rtems_filesystem_eval_path_eat_delimiter>
eval_flags = rtems_filesystem_eval_path_get_flags(ctx);
if (
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
4a74c: 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 (
4a750: 588f addql #4,%sp
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
4a752: 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 (
4a758: 6706 beqs 4a760 <rtems_filesystem_eval_path_generic+0x170>
(eval_flags & RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS) == 0
|| rtems_filesystem_eval_path_has_path(ctx)
4a75a: 4aaa 0004 tstl %a2@(4)
4a75e: 671a beqs 4a77a <rtems_filesystem_eval_path_generic+0x18a>
) {
rtems_filesystem_eval_path_error(ctx, ENOENT);
4a760: 4878 0002 pea 2 <DOUBLE_FLOAT>
4a764: 6004 bras 4a76a <rtems_filesystem_eval_path_generic+0x17a>
}
}
}
} else {
rtems_filesystem_eval_path_error(ctx, ENOTDIR);
4a766: 4878 0014 pea 14 <OPER2>
4a76a: 2f0a movel %a2,%sp@-
4a76c: 4eb9 0004 380a jsr 4380a <rtems_filesystem_eval_path_error>
4a772: 6096 bras 4a70a <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) {
4a774: 4a80 tstl %d0
4a776: 6700 fe9a beqw 4a612 <rtems_filesystem_eval_path_generic+0x22>
}
} else {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE;
}
}
}
4a77a: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4a780: 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 e2f8 jsr 4e2f8 <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 cabd lea 5cabd <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 d6ec moveal 5d6ec <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 a05c jsr 4a05c <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
0004a3d8 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
4a3d8: 4e56 fff8 linkw %fp,#-8
4a3dc: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
4a3e0: 42ae fffc clrl %fp@(-4)
4a3e4: 2d40 fff8 movel %d0,%fp@(-8)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4a3e8: 6710 beqs 4a3fa <rtems_filesystem_get_mount_handler+0x22><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
4a3ea: 486e fff8 pea %fp@(-8)
4a3ee: 487a ff10 pea %pc@(4a300 <find_handler>)
4a3f2: 4eb9 0004 a36a jsr 4a36a <rtems_filesystem_iterate>
4a3f8: 508f addql #8,%sp
}
return fa.mount_h;
}
4a3fa: 202e fffc movel %fp@(-4),%d0
4a3fe: 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 b8b0 movel 5b8b0 <rtems_filesystem_root_configuration+0x10>,%sp@-
427c2: 2f39 0005 b8ac movel 5b8ac <rtems_filesystem_root_configuration+0xc>,%sp@-
427c8: 2f39 0005 b8a8 movel 5b8a8 <rtems_filesystem_root_configuration+0x8>,%sp@-
427ce: 2f39 0005 b8a4 movel 5b8a4 <rtems_filesystem_root_configuration+0x4>,%sp@-
427d4: 2f39 0005 b8a0 movel 5b8a0 <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 c02a pea 5c02a <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 69f0 jsr 469f0 <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
...
0004a36a <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4a36a: 4e56 fff0 linkw %fp,#-16
4a36e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4a372: 266e 0008 moveal %fp@(8),%a3
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
4a376: 45f9 0005 b8b4 lea 5b8b4 <rtems_filesystem_table>,%a2
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4a37c: 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;
4a380: 4202 clrb %d2
while ( table_entry->type && !stop ) {
4a382: 600c bras 4a390 <rtems_filesystem_iterate+0x26>
stop = (*routine)( table_entry, routine_arg );
4a384: 2f03 movel %d3,%sp@-
4a386: 2f0a movel %a2,%sp@-
++table_entry;
4a388: 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 );
4a38a: 4e93 jsr %a3@
++table_entry;
4a38c: 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 );
4a38e: 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 ) {
4a390: 4a92 tstl %a2@
4a392: 6706 beqs 4a39a <rtems_filesystem_iterate+0x30>
4a394: 4a02 tstb %d2
4a396: 67ec beqs 4a384 <rtems_filesystem_iterate+0x1a>
4a398: 6032 bras 4a3cc <rtems_filesystem_iterate+0x62>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
4a39a: 4a02 tstb %d2
4a39c: 662e bnes 4a3cc <rtems_filesystem_iterate+0x62>
rtems_libio_lock();
4a39e: 4eba ff98 jsr %pc@(4a338 <rtems_libio_lock>)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4a3a2: 2479 0005 d798 moveal 5d798 <filesystem_chain>,%a2
for (
4a3a8: 600e bras 4a3b8 <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 );
4a3aa: 2f03 movel %d3,%sp@-
4a3ac: 486a 0008 pea %a2@(8)
4a3b0: 4e93 jsr %a3@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4a3b2: 2452 moveal %a2@,%a2
4a3b4: 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 );
4a3b6: 1400 moveb %d0,%d2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4a3b8: b5fc 0005 d79c cmpal #382876,%a2
4a3be: 6606 bnes 4a3c6 <rtems_filesystem_iterate+0x5c>
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
4a3c0: 4eba ff92 jsr %pc@(4a354 <rtems_libio_unlock>)
4a3c4: 6006 bras 4a3cc <rtems_filesystem_iterate+0x62>
if ( !stop ) {
rtems_libio_lock();
for (
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
4a3c6: 4a02 tstb %d2
4a3c8: 67e0 beqs 4a3aa <rtems_filesystem_iterate+0x40> <== ALWAYS TAKEN
4a3ca: 60f4 bras 4a3c0 <rtems_filesystem_iterate+0x56> <== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
4a3cc: 1002 moveb %d2,%d0
4a3ce: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4a3d4: 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 a0b8 jsr 4a0b8 <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 cf98 jsr 4cf98 <__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 d6ec moveal 5d6ec <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 cf98 jsr 4cf98 <__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 4d06 cmpl 64d06 <_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 2780 movel 62780 <RTEMS_Malloc_Heap>,%sp@-
46eb2: 4eb9 0004 c0a4 jsr 4c0a4 <_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 f098 movel 5f098 <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 7d50 jsr 47d50 <_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 f06c addl %d2,5f06c <rtems_malloc_statistics>
437d4: 42a7 clrl %sp@-
437d6: 2f03 movel %d3,%sp@-
437d8: 2f04 movel %d4,%sp@-
437da: 4eb9 0004 7d10 jsr 47d10 <_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 32fe movel 632fe <_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 89e0 jsr 489e0 <_API_Mutex_Lock>
_Heap_Greedy_free( RTEMS_Malloc_Heap, opaque );
4537e: 2f02 movel %d2,%sp@-
45380: 2f39 0006 1544 movel 61544 <RTEMS_Malloc_Heap>,%sp@-
45386: 4eb9 0004 901c jsr 4901c <_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 32fe lea 632fe <_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 8a40 jmp 48a40 <_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 2266 lea 52266 <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 0006 0a78 pea 60a78 <RTEMS_BDPART_MBR_MASTER_TYPE+0x14>
43e6e: 2f04 movel %d4,%sp@-
43e70: 4eb9 0005 2a3c jsr 52a3c <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 23e4 moveal 623e4 <_impure_ptr>,%a0 <== NOT EXECUTED
43eac: 2f04 movel %d4,%sp@- <== NOT EXECUTED
43eae: 4879 0006 0a7d pea 60a7d <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
0004882c <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)
{
4882c: 4e56 fff0 linkw %fp,#-16
48830: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
48834: 286e 0008 moveal %fp@(8),%a4
48838: 45f9 0006 12d6 lea 612d6 <_Objects_Information_table+0x4>,%a2
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
4883e: 4a8c tstl %a4
48840: 6736 beqs 48878 <rtems_iterate_over_all_threads+0x4c><== NEVER TAKEN
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
48842: 205a moveal %a2@+,%a0
48844: 2668 0004 moveal %a0@(4),%a3
if ( !information )
48848: 4a8b tstl %a3
4884a: 661e bnes 4886a <rtems_iterate_over_all_threads+0x3e>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
4884c: b5fc 0006 12e2 cmpal #398050,%a2
48852: 66ee bnes 48842 <rtems_iterate_over_all_threads+0x16>
48854: 6022 bras 48878 <rtems_iterate_over_all_threads+0x4c>
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
48856: 206b 0018 moveal %a3@(24),%a0
4885a: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !the_thread )
4885e: 6706 beqs 48866 <rtems_iterate_over_all_threads+0x3a><== NEVER TAKEN
continue;
(*routine)(the_thread);
48860: 2f00 movel %d0,%sp@-
48862: 4e94 jsr %a4@
48864: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
48866: 5282 addql #1,%d2
48868: 6002 bras 4886c <rtems_iterate_over_all_threads+0x40>
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
4886a: 7401 moveq #1,%d2
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4886c: 4280 clrl %d0
4886e: 302b 000e movew %a3@(14),%d0
48872: b082 cmpl %d2,%d0
48874: 64e0 bccs 48856 <rtems_iterate_over_all_threads+0x2a>
48876: 60d4 bras 4884c <rtems_iterate_over_all_threads+0x20>
(*routine)(the_thread);
}
}
}
48878: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
4887e: 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 d6a0 movel 5d6a0 <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 edc0 movel %d0,5edc0 <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 edc4 movel %d0,5edc4 <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 edc8 pea 5edc8 <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 69f0 jsr 469f0 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
42c16: 2279 0005 d6a4 moveal 5d6a4 <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 c594 moveal 5c594 <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 c598 cmpal #378264,%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 74cc jsr 474cc <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 a17c jsr 4a17c <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 b534 movel #374068,%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 c594 pea 5c594 <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 c594 movel %a2,5c594 <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 d6d8 movel 5d6d8 <_Thread_Dispatch_disable_level>,%d0
++level;
431fa: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
431fc: 23c0 0005 d6d8 movel %d0,5d6d8 <_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 c594 pea 5c594 <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 63f4 jsr 463f4 <_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 c594 pea 5c594 <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 c594 movel 5c594 <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 c594 movel %a0@,5c594 <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
0004a1f8 <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 ) {
4a1f8: 7006 moveq #6,%d0
return flags;
}
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
4a1fa: 4e56 0000 linkw %fp,#0
4a1fe: 222e 0008 movel %fp@(8),%d1
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a202: c081 andl %d1,%d0
return flags;
}
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
4a204: 2f02 movel %d2,%sp@-
int fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4a206: 7406 moveq #6,%d2
4a208: b480 cmpl %d0,%d2
4a20a: 6712 beqs 4a21e <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4a20c: 0801 0001 btst #1,%d1
4a210: 6610 bnes 4a222 <rtems_libio_to_fcntl_flags+0x2a><== ALWAYS TAKEN
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
4a212: 2001 movel %d1,%d0 <== NOT EXECUTED
4a214: e488 lsrl #2,%d0 <== NOT EXECUTED
4a216: 143c 0001 moveb #1,%d2 <== NOT EXECUTED
4a21a: c082 andl %d2,%d0 <== NOT EXECUTED
4a21c: 6006 bras 4a224 <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;
4a21e: 7002 moveq #2,%d0
4a220: 6002 bras 4a224 <rtems_libio_to_fcntl_flags+0x2c>
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
4a222: 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 ) {
4a224: 0801 0000 btst #0,%d1
4a228: 6704 beqs 4a22e <rtems_libio_to_fcntl_flags+0x36>
fcntl_flags |= O_NONBLOCK;
4a22a: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4a22e: 0801 0009 btst #9,%d1
4a232: 6704 beqs 4a238 <rtems_libio_to_fcntl_flags+0x40>
fcntl_flags |= O_APPEND;
4a234: 7408 moveq #8,%d2
4a236: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4a238: 0801 000a btst #10,%d1
4a23c: 6704 beqs 4a242 <rtems_libio_to_fcntl_flags+0x4a>
fcntl_flags |= O_CREAT;
4a23e: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4a242: 241f movel %sp@+,%d2
4a244: 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 c598 movel #378264,%d0
43288: b0b9 0005 c594 cmpl 5c594 <rtems_current_user_env>,%d0
4328e: 672c beqs 432bc <rtems_libio_use_global_env+0x3e>
sc = rtems_task_variable_delete(
43290: 4879 0005 c594 pea 5c594 <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 4ba4 jsr 44ba4 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
rtems_current_user_env = &rtems_global_user_env;
432b0: 203c 0005 c598 movel #378264,%d0
432b6: 23c0 0005 c594 movel %d0,5c594 <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 2780 movel 62780 <RTEMS_Malloc_Heap>,%sp@-
462f2: 4eb9 0004 c164 jsr 4c164 <_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 47f0 addl %d3,647f0 <rtems_malloc_statistics+0x28>
4630c: 2039 0006 47ec movel 647ec <rtems_malloc_statistics+0x24>,%d0
46312: d182 addxl %d2,%d0
46314: 23c0 0006 47ec movel %d0,647ec <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 2780 movel 62780 <RTEMS_Malloc_Heap>,%sp@-
46348: 4eb9 0004 c164 jsr 4c164 <_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 47e4 movel 647e4 <rtems_malloc_statistics+0x1c>,%d0
4635c: d6b9 0006 47e8 addl 647e8 <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 47f0 subl 647f0 <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 47e4 movel %d2,647e4 <rtems_malloc_statistics+0x1c>
46372: 23c3 0006 47e8 movel %d3,647e8 <rtems_malloc_statistics+0x20>
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
46378: b0b9 0006 47e0 cmpl 647e0 <rtems_malloc_statistics+0x18>,%d0
4637e: 6306 blss 46386 <rtems_malloc_statistics_at_malloc+0x60>
s->max_depth = current_depth;
46380: 23c0 0006 47e0 movel %d0,647e0 <rtems_malloc_statistics+0x18>
}
46386: 242e fff4 movel %fp@(-12),%d2
4638a: 262e fff8 movel %fp@(-8),%d3
4638e: 4e5e unlk %fp <== NOT EXECUTED
0004dcf8 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
4dcf8: 4e56 0000 linkw %fp,#0
4dcfc: 2f0a movel %a2,%sp@-
4dcfe: 246e 0008 moveal %fp@(8),%a2
4dd02: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
4dd04: 4a8a tstl %a2
4dd06: 6604 bnes 4dd0c <rtems_memalign+0x14>
return EINVAL;
4dd08: 7016 moveq #22,%d0
4dd0a: 605a bras 4dd66 <rtems_memalign+0x6e>
*pointer = NULL;
4dd0c: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4dd0e: 7003 moveq #3,%d0
4dd10: b0b9 0006 2c3e cmpl 62c3e <_System_state_Current>,%d0
4dd16: 6726 beqs 4dd3e <rtems_memalign+0x46>
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4dd18: 4eb9 0004 3ba2 jsr 43ba2 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
4dd1e: 42a7 clrl %sp@-
4dd20: 2f2e 000c movel %fp@(12),%sp@-
4dd24: 2f2e 0010 movel %fp@(16),%sp@-
4dd28: 2f39 0006 0ef4 movel 60ef4 <RTEMS_Malloc_Heap>,%sp@-
4dd2e: 4eb9 0004 8ed8 jsr 48ed8 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
4dd34: 4fef 0010 lea %sp@(16),%sp
4dd38: 2400 movel %d0,%d2
4dd3a: 660e bnes 4dd4a <rtems_memalign+0x52>
4dd3c: 6026 bras 4dd64 <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() )
4dd3e: 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()) &&
4dd44: 4a00 tstb %d0
4dd46: 67c0 beqs 4dd08 <rtems_memalign+0x10> <== NEVER TAKEN
4dd48: 60ce bras 4dd18 <rtems_memalign+0x20>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
4dd4a: 2079 0006 1620 moveal 61620 <rtems_malloc_statistics_helpers>,%a0
4dd50: 4a88 tstl %a0
4dd52: 670a beqs 4dd5e <rtems_memalign+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
4dd54: 2f0a movel %a2,%sp@-
4dd56: 2068 0004 moveal %a0@(4),%a0
4dd5a: 4e90 jsr %a0@
4dd5c: 588f addql #4,%sp
*pointer = return_this;
4dd5e: 2482 movel %d2,%a2@
return 0;
4dd60: 4280 clrl %d0
4dd62: 6002 bras 4dd66 <rtems_memalign+0x6e>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
4dd64: 700c moveq #12,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4dd66: 242e fff8 movel %fp@(-8),%d2
4dd6a: 246e fffc moveal %fp@(-4),%a2
4dd6e: 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 8068 pea 68068 <_Message_queue_Information>
4d58a: 4eb9 0004 f718 jsr 4f718 <_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 e824 jsr 4e824 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
4d5be: 4eb9 0005 0410 jsr 50410 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
4d5c4: 2079 0006 7c86 moveal 67c86 <_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 da3c jsr 5da3c <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 bd98 lea 5bd98 <__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 bd98 lea 5bd98 <__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
...
0006b520 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
6b520: 4e56 ffec linkw %fp,#-20
6b524: 48d7 041c moveml %d2-%d4/%a2,%sp@
6b528: 486e fffc pea %fp@(-4)
6b52c: 282e 0008 movel %fp@(8),%d4
6b530: 2f04 movel %d4,%sp@-
6b532: 4879 0009 7f2c pea 97f2c <_Rate_monotonic_Information>
6b538: 242e 000c movel %fp@(12),%d2
6b53c: 4eb9 0004 7878 jsr 47878 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
6b542: 4fef 000c lea %sp@(12),%sp
6b546: 2440 moveal %d0,%a2
6b548: 4aae fffc tstl %fp@(-4)
6b54c: 6600 0156 bnew 6b6a4 <rtems_rate_monotonic_period+0x184>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
6b550: 2039 0009 79b2 movel 979b2 <_Per_CPU_Information+0xe>,%d0
6b556: b0aa 0040 cmpl %a2@(64),%d0
6b55a: 670c beqs 6b568 <rtems_rate_monotonic_period+0x48>
_Thread_Enable_dispatch();
6b55c: 4eb9 0004 8474 jsr 48474 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
6b562: 7417 moveq #23,%d2
6b564: 6000 0140 braw 6b6a6 <rtems_rate_monotonic_period+0x186>
}
if ( length == RTEMS_PERIOD_STATUS ) {
6b568: 4a82 tstl %d2
6b56a: 6624 bnes 6b590 <rtems_rate_monotonic_period+0x70>
switch ( the_period->state ) {
6b56c: 202a 0038 movel %a2@(56),%d0
6b570: 7204 moveq #4,%d1
6b572: b280 cmpl %d0,%d1
6b574: 650e bcss 6b584 <rtems_rate_monotonic_period+0x64><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
6b576: 41f9 0009 0fe2 lea 90fe2 <CSWTCH.24>,%a0
6b57c: 4282 clrl %d2
6b57e: 1430 0800 moveb %a0@(00000000,%d0:l),%d2
6b582: 6002 bras 6b586 <rtems_rate_monotonic_period+0x66>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
6b584: 4282 clrl %d2 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
6b586: 4eb9 0004 8474 jsr 48474 <_Thread_Enable_dispatch>
6b58c: 6000 0118 braw 6b6a6 <rtems_rate_monotonic_period+0x186>
return( return_value );
}
_ISR_Disable( level );
6b590: 203c 0000 0700 movel #1792,%d0
6b596: 40c3 movew %sr,%d3
6b598: 8083 orl %d3,%d0
6b59a: 46c0 movew %d0,%sr
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
6b59c: 202a 0038 movel %a2@(56),%d0
6b5a0: 664a bnes 6b5ec <rtems_rate_monotonic_period+0xcc>
_ISR_Enable( level );
6b5a2: 46c3 movew %d3,%sr
the_period->next_length = length;
6b5a4: 2542 003c movel %d2,%a2@(60)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
6b5a8: 2f0a movel %a2,%sp@-
6b5aa: 4eb9 0006 b49c jsr 6b49c <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
6b5b0: 7002 moveq #2,%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
6b5b2: 223c 0006 b6b4 movel #439988,%d1
6b5b8: 2540 0038 movel %d0,%a2@(56)
6b5bc: 2541 002c movel %d1,%a2@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
6b5c0: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine;
the_watchdog->id = id;
6b5c4: 2544 0030 movel %d4,%a2@(48)
the_watchdog->user_data = user_data;
6b5c8: 42aa 0034 clrl %a2@(52)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
6b5cc: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
6b5d0: 486a 0010 pea %a2@(16)
6b5d4: 4879 0009 7606 pea 97606 <_Watchdog_Ticks_chain>
6b5da: 4eb9 0004 8f4c jsr 48f4c <_Watchdog_Insert>
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
6b5e0: 4eb9 0004 8474 jsr 48474 <_Thread_Enable_dispatch>
6b5e6: 4fef 000c lea %sp@(12),%sp
6b5ea: 606a bras 6b656 <rtems_rate_monotonic_period+0x136>
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
6b5ec: 7202 moveq #2,%d1
6b5ee: b280 cmpl %d0,%d1
6b5f0: 6668 bnes 6b65a <rtems_rate_monotonic_period+0x13a>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
6b5f2: 2f0a movel %a2,%sp@-
6b5f4: 4eba fde2 jsr %pc@(6b3d8 <_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;
6b5f8: 7001 moveq #1,%d0
the_period->next_length = length;
6b5fa: 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;
6b5fe: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
6b602: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
6b604: 2079 0009 79b2 moveal 979b2 <_Per_CPU_Information+0xe>,%a0
6b60a: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
6b610: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
6b614: 2f08 movel %a0,%sp@-
6b616: 4eb9 0004 8bfc jsr 48bfc <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
6b61c: 203c 0000 0700 movel #1792,%d0
6b622: 40c1 movew %sr,%d1
6b624: 8081 orl %d1,%d0
6b626: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
6b628: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
6b62a: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
6b62e: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
6b632: 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 )
6b634: 7203 moveq #3,%d1
6b636: 4fef 000c lea %sp@(12),%sp
6b63a: b280 cmpl %d0,%d1
6b63c: 6612 bnes 6b650 <rtems_rate_monotonic_period+0x130>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
6b63e: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
6b642: 2f39 0009 79b2 movel 979b2 <_Per_CPU_Information+0xe>,%sp@-
6b648: 4eb9 0004 8100 jsr 48100 <_Thread_Clear_state>
6b64e: 508f addql #8,%sp
_Thread_Enable_dispatch();
6b650: 4eb9 0004 8474 jsr 48474 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
6b656: 4282 clrl %d2
6b658: 604c bras 6b6a6 <rtems_rate_monotonic_period+0x186>
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
6b65a: 7204 moveq #4,%d1
6b65c: b280 cmpl %d0,%d1
6b65e: 6644 bnes 6b6a4 <rtems_rate_monotonic_period+0x184><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
6b660: 2f0a movel %a2,%sp@-
6b662: 4eba fd74 jsr %pc@(6b3d8 <_Rate_monotonic_Update_statistics>)
_ISR_Enable( level );
6b666: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
6b668: 7002 moveq #2,%d0
the_period->next_length = length;
6b66a: 2542 003c movel %d2,%a2@(60)
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
6b66e: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
6b672: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
6b676: 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;
6b67a: 7406 moveq #6,%d2
6b67c: 4879 0009 7606 pea 97606 <_Watchdog_Ticks_chain>
6b682: 4eb9 0004 8f4c jsr 48f4c <_Watchdog_Insert>
6b688: 2f2a 003c movel %a2@(60),%sp@-
6b68c: 2f2a 0040 movel %a2@(64),%sp@-
6b690: 2079 0009 2820 moveal 92820 <_Scheduler+0x34>,%a0
6b696: 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();
6b698: 4eb9 0004 8474 jsr 48474 <_Thread_Enable_dispatch>
6b69e: 4fef 0014 lea %sp@(20),%sp
6b6a2: 6002 bras 6b6a6 <rtems_rate_monotonic_period+0x186>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
6b6a4: 7404 moveq #4,%d2
}
6b6a6: 2002 movel %d2,%d0
6b6a8: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
6b6ae: 4e5e unlk %fp
...
00047228 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
47228: 4e56 ffec linkw %fp,#-20
4722c: 202e 000c movel %fp@(12),%d0
47230: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
47234: 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;
47238: 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;
4723a: 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;
4723e: 4c42 3001 remul %d2,%d1,%d3
if (excess > 0) {
47242: 4a81 tstl %d1
47244: 6700 0090 beqw 472d6 <rtems_rbheap_allocate+0xae>
value += alignment - excess;
47248: d480 addl %d0,%d2 <== NOT EXECUTED
4724a: 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) {
4724c: 4a80 tstl %d0 <== NOT EXECUTED
4724e: 6606 bnes 47256 <rtems_rbheap_allocate+0x2e> <== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
47250: 4280 clrl %d0
47252: 6000 008a braw 472de <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) {
47256: b480 cmpl %d0,%d2 <== NOT EXECUTED
47258: 65f6 bcss 47250 <rtems_rbheap_allocate+0x28> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4725a: 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;
4725c: 95ca subal %a2,%a2
4725e: 2059 moveal %a1@+,%a0
47260: 600a bras 4726c <rtems_rbheap_allocate+0x44>
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
47262: b4a8 001c cmpl %a0@(28),%d2
47266: 6202 bhis 4726a <rtems_rbheap_allocate+0x42>
47268: 2448 moveal %a0,%a2
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
4726a: 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) {
4726c: b3c8 cmpal %a0,%a1
4726e: 6606 bnes 47276 <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) {
47270: 4a8a tstl %a2
47272: 6606 bnes 4727a <rtems_rbheap_allocate+0x52>
47274: 60da bras 47250 <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) {
47276: 4a8a tstl %a2
47278: 67e8 beqs 47262 <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;
4727a: 262a 001c movel %a2@(28),%d3
if (free_size > aligned_size) {
4727e: b483 cmpl %d3,%d2
47280: 643c bccs 472be <rtems_rbheap_allocate+0x96>
rtems_rbheap_chunk *new_chunk = get_chunk(control);
47282: 2f0c movel %a4,%sp@-
47284: 4eba fe50 jsr %pc@(470d6 <get_chunk>)
if (new_chunk != NULL) {
47288: 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);
4728a: 2640 moveal %d0,%a3
if (new_chunk != NULL) {
4728c: 4a80 tstl %d0
4728e: 67c0 beqs 47250 <rtems_rbheap_allocate+0x28> <== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
47290: 9682 subl %d2,%d3
free_chunk->size = new_free_size;
47292: 2543 001c movel %d3,%a2@(28)
new_chunk->begin = free_chunk->begin + new_free_size;
47296: d6aa 0018 addl %a2@(24),%d3
new_chunk->size = aligned_size;
4729a: 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;
4729e: 2743 0018 movel %d3,%a3@(24)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
472a2: 42ab 0004 clrl %a3@(4)
472a6: 4293 clrl %a3@
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
472a8: 486b 0008 pea %a3@(8)
472ac: 486c 0018 pea %a4@(24)
472b0: 4eb9 0004 89b8 jsr 489b8 <_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;
472b6: 202b 0018 movel %a3@(24),%d0
472ba: 508f addql #8,%sp
472bc: 6020 bras 472de <rtems_rbheap_allocate+0xb6>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
472be: 2252 moveal %a2@,%a1
previous = the_node->previous;
472c0: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
472c4: 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;
472c8: 202a 0018 movel %a2@(24),%d0
previous->next = next;
472cc: 2089 movel %a1,%a0@
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
472ce: 42aa 0004 clrl %a2@(4)
472d2: 4292 clrl %a2@
472d4: 6008 bras 472de <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) {
472d6: 2400 movel %d0,%d2
472d8: 6680 bnes 4725a <rtems_rbheap_allocate+0x32>
472da: 6000 ff74 braw 47250 <rtems_rbheap_allocate+0x28>
}
}
}
return ptr;
}
472de: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
472e4: 4e5e unlk %fp <== NOT EXECUTED
000473e0 <rtems_rbheap_extend_descriptors_with_malloc>:
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
473e0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
473e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
473e6: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
{
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
473ea: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
473ee: 4eb9 0004 3294 jsr 43294 <malloc> <== NOT EXECUTED
if (chunk != NULL) {
473f4: 588f addql #4,%sp <== NOT EXECUTED
473f6: 4a80 tstl %d0 <== NOT EXECUTED
473f8: 671a beqs 47414 <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);
473fa: 43ea 000c lea %a2@(12),%a1 <== NOT EXECUTED
473fe: 2040 moveal %d0,%a0 <== NOT EXECUTED
47400: 2149 0004 movel %a1,%a0@(4) <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
47404: 206a 000c moveal %a2@(12),%a0 <== NOT EXECUTED
after_node->next = the_node;
the_node->next = before_node;
47408: 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;
4740a: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
the_node->next = before_node;
before_node->previous = the_node;
4740e: 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;
47412: 2288 movel %a0,%a1@ <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
47414: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
47418: 4e5e unlk %fp <== NOT EXECUTED
000472e8 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
472e8: 4e56 ffc8 linkw %fp,#-56
472ec: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
472f0: 266e 0008 moveal %fp@(8),%a3
472f4: 246e 000c moveal %fp@(12),%a2
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
472f8: 4a8a tstl %a2
472fa: 6700 00c8 beqw 473c4 <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 };
472fe: 4878 0020 pea 20 <OPER2+0xc>
return rtems_rbheap_chunk_of_node(
47302: 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;
47304: 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;
47308: 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(
4730a: 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 };
47310: 42a7 clrl %sp@-
47312: 486e ffe0 pea %fp@(-32)
47316: 4eb9 0004 e6a8 jsr 4e6a8 <memset>
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
4731c: 4fef 000c lea %sp@(12),%sp
47320: 2d4a fff8 movel %a2,%fp@(-8)
47324: 246b 001c moveal %a3@(28),%a2
47328: 6026 bras 47350 <rtems_rbheap_free+0x68>
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
4732a: 2f0a movel %a2,%sp@-
4732c: 2f03 movel %d3,%sp@-
4732e: 206c 0010 moveal %a4@(16),%a0
47332: 4e90 jsr %a0@
if ( _RBTree_Is_equal( compare_result ) ) {
47334: 508f addql #8,%sp
47336: 4a80 tstl %d0
47338: 6608 bnes 47342 <rtems_rbheap_free+0x5a>
found = iter_node;
if ( the_rbtree->is_unique )
4733a: 4a2c 0014 tstb %a4@(20)
4733e: 6616 bnes 47356 <rtems_rbheap_free+0x6e> <== ALWAYS TAKEN
47340: 240a movel %a2,%d2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
47342: 4a80 tstl %d0
47344: 5ec0 sgt %d0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
47346: 7201 moveq #1,%d1
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
47348: 49c0 extbl %d0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
4734a: 9280 subl %d0,%d1
4734c: 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) {
47350: 4a8a tstl %a2
47352: 66d6 bnes 4732a <rtems_rbheap_free+0x42>
47354: 2442 moveal %d2,%a2
return rtems_rbheap_chunk_of_node(
47356: 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) {
47358: 70f8 moveq #-8,%d0
4735a: b08a cmpl %a2,%d0
4735c: 676a beqs 473c8 <rtems_rbheap_free+0xe0>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
4735e: 4a92 tstl %a2@
47360: 660c bnes 4736e <rtems_rbheap_free+0x86>
47362: 4aaa 0004 tstl %a2@(4)
47366: 57c0 seq %d0
47368: 49c0 extbl %d0
4736a: 4480 negl %d0
4736c: 6002 bras 47370 <rtems_rbheap_free+0x88>
4736e: 4280 clrl %d0
if (!rtems_rbheap_is_chunk_free(chunk)) {
47370: 0800 0000 btst #0,%d0
47374: 6756 beqs 473cc <rtems_rbheap_free+0xe4>
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
47376: 42a7 clrl %sp@-
47378: 240a movel %a2,%d2
4737a: 5082 addql #8,%d2
4737c: 4bf9 0004 8ba4 lea 48ba4 <_RBTree_Next_unprotected>,%a5
47382: 2f02 movel %d2,%sp@-
47384: 4e95 jsr %a5@
47386: 4878 0001 pea 1 <ADD>
4738a: 2600 movel %d0,%d3
4738c: 2f02 movel %d2,%sp@-
4738e: 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);
47390: 4bfa fcbe lea %pc@(47050 <check_and_merge>),%a5
47394: 5180 subql #8,%d0
47396: 2f00 movel %d0,%sp@-
47398: 2f0a movel %a2,%sp@-
4739a: 2f0c movel %a4,%sp@-
4739c: 2f0b movel %a3,%sp@-
4739e: 4e95 jsr %a5@
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
473a0: 2053 moveal %a3@,%a0
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
473a2: 4fef 0020 lea %sp@(32),%sp
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
473a6: 254b 0004 movel %a3,%a2@(4)
before_node = after_node->next;
after_node->next = the_node;
473aa: 268a movel %a2,%a3@
the_node->next = before_node;
before_node->previous = the_node;
473ac: 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;
473b0: 2488 movel %a0,%a2@
473b2: 2043 moveal %d3,%a0
473b4: 4868 fff8 pea %a0@(-8)
473b8: 2f0a movel %a2,%sp@-
473ba: 2f0c movel %a4,%sp@-
473bc: 2f0b movel %a3,%sp@-
473be: 4e95 jsr %a5@
473c0: 4fef 0010 lea %sp@(16),%sp
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
473c4: 4280 clrl %d0
473c6: 6006 bras 473ce <rtems_rbheap_free+0xe6>
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
473c8: 7004 moveq #4,%d0
473ca: 6002 bras 473ce <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;
473cc: 700e moveq #14,%d0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
473ce: 4cee 3c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a5
473d4: 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 74fe movel 774fe <_RTEMS_Allocator_Mutex>,%sp@-
510d4: 4eb9 0005 3154 jsr 53154 <_API_Mutex_Lock>
510da: 486e fffc pea %fp@(-4)
510de: 2f2e 0008 movel %fp@(8),%sp@-
510e2: 4879 0007 736e pea 7736e <_Region_Information>
510e8: 4eb9 0005 4c10 jsr 54c10 <_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 4658 jsr 54658 <_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 74fe movel 774fe <_RTEMS_Allocator_Mutex>,%sp@-
51128: 4eb9 0005 31b4 jsr 531b4 <_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
...
00055cba <rtems_rfs_bitmap_create_search>:
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
55cba: 4e56 ffdc linkw %fp,#-36
55cbe: 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);
55cc2: 486e fffc pea %fp@(-4)
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
55cc6: 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);
55cca: 2f0a movel %a2,%sp@-
55ccc: 4eba fb12 jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
55cd0: 508f addql #8,%sp
55cd2: 4a80 tstl %d0
55cd4: 6e74 bgts 55d4a <rtems_rfs_bitmap_create_search+0x90><== NEVER TAKEN
return rc;
control->free = 0;
55cd6: 42aa 0010 clrl %a2@(16)
search_map = control->search_bits;
55cda: 266a 0014 moveal %a2@(20),%a3
size = control->size;
55cde: 242a 000c movel %a2@(12),%d2
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55ce2: 76ff moveq #-1,%d3
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
{
bits = rtems_rfs_bitmap_merge (*map,
55ce4: 4bf9 0005 59da lea 559da <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);
55cea: 7801 moveq #1,%d4
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55cec: 2683 movel %d3,%a3@
55cee: 286e fffc moveal %fp@(-4),%a4
return rc;
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
55cf2: 4283 clrl %d3
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
55cf4: 604e bras 55d44 <rtems_rfs_bitmap_create_search+0x8a>
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
55cf6: 701f moveq #31,%d0
55cf8: b082 cmpl %d2,%d0
55cfa: 650e bcss 55d0a <rtems_rfs_bitmap_create_search+0x50>
{
bits = rtems_rfs_bitmap_merge (*map,
55cfc: 2f02 movel %d2,%sp@-
55cfe: 42a7 clrl %sp@-
55d00: 4e95 jsr %a5@
55d02: 508f addql #8,%sp
RTEMS_RFS_BITMAP_ELEMENT_SET,
rtems_rfs_bitmap_mask_section (0, size));
available = size;
55d04: 2042 moveal %d2,%a0
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
55d06: c094 andl %a4@,%d0
55d08: 6006 bras 55d10 <rtems_rfs_bitmap_create_search+0x56>
rtems_rfs_bitmap_mask_section (0, size));
available = size;
}
else
{
bits = *map;
55d0a: 2014 movel %a4@,%d0
available = rtems_rfs_bitmap_element_bits ();
55d0c: 307c 0020 moveaw #32,%a0
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
55d10: 4a80 tstl %d0
55d12: 660a bnes 55d1e <rtems_rfs_bitmap_create_search+0x64>
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
55d14: 9488 subl %a0,%d2
if (bit == rtems_rfs_bitmap_element_bits ())
55d16: 7020 moveq #32,%d0
55d18: b083 cmpl %d3,%d0
55d1a: 6624 bnes 55d40 <rtems_rfs_bitmap_create_search+0x86><== ALWAYS TAKEN
55d1c: 6016 bras 55d34 <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))
55d1e: 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);
55d20: 2a04 movel %d4,%d5
55d22: e3ad lsll %d1,%d5
55d24: 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))
55d26: 6704 beqs 55d2c <rtems_rfs_bitmap_create_search+0x72>
control->free++;
55d28: 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++)
55d2c: 5281 addql #1,%d1
55d2e: b1c1 cmpal %d1,%a0
55d30: 6eee bgts 55d20 <rtems_rfs_bitmap_create_search+0x66>
55d32: 60e0 bras 55d14 <rtems_rfs_bitmap_create_search+0x5a>
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55d34: 70ff moveq #-1,%d0 <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
55d36: 4283 clrl %d3 <== NOT EXECUTED
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55d38: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
{
bit = 0;
search_map++;
55d3c: 588b addql #4,%a3 <== NOT EXECUTED
55d3e: 6002 bras 55d42 <rtems_rfs_bitmap_create_search+0x88><== NOT EXECUTED
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
}
else
bit++;
55d40: 5283 addql #1,%d3
55d42: 588c addql #4,%a4
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
55d44: 4a82 tstl %d2
55d46: 66ae bnes 55cf6 <rtems_rfs_bitmap_create_search+0x3c>
else
bit++;
map++;
}
return 0;
55d48: 4280 clrl %d0
}
55d4a: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5
55d50: 4e5e unlk %fp <== NOT EXECUTED
000557e0 <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)
{
557e0: 4e56 0000 linkw %fp,#0
557e4: 2f0b movel %a3,%sp@-
557e6: 266e 000c moveal %fp@(12),%a3
557ea: 2f0a movel %a2,%sp@-
557ec: 246e 0008 moveal %fp@(8),%a2
int rc;
if (!control->buffer)
557f0: 4a92 tstl %a2@
557f2: 672a beqs 5581e <rtems_rfs_bitmap_load_map+0x3e> <== NEVER TAKEN
return ENXIO;
*map = NULL;
557f4: 4293 clrl %a3@
rc = rtems_rfs_buffer_handle_request (control->fs,
557f6: 4878 0001 pea 1 <ADD>
557fa: 2f2a 0008 movel %a2@(8),%sp@-
557fe: 2f12 movel %a2@,%sp@-
55800: 2f2a 0004 movel %a2@(4),%sp@-
55804: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request>
control->buffer,
control->block,
true);
if (rc)
5580a: 4fef 0010 lea %sp@(16),%sp
5580e: 4a80 tstl %d0
55810: 660e bnes 55820 <rtems_rfs_bitmap_load_map+0x40> <== NEVER TAKEN
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
55812: 2052 moveal %a2@,%a0
55814: 2068 0006 moveal %a0@(6),%a0
55818: 26a8 001a movel %a0@(26),%a3@
5581c: 6002 bras 55820 <rtems_rfs_bitmap_load_map+0x40>
rtems_rfs_bitmap_map* map)
{
int rc;
if (!control->buffer)
return ENXIO;
5581e: 7006 moveq #6,%d0 <== NOT EXECUTED
if (rc)
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
return 0;
}
55820: 246e fff8 moveal %fp@(-8),%a2
55824: 266e fffc moveal %fp@(-4),%a3
55828: 4e5e unlk %fp <== NOT EXECUTED
00055c1c <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)
{
55c1c: 4e56 ffe8 linkw %fp,#-24
55c20: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
55c24: 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,
55c28: 4bfa fc02 lea %pc@(5582c <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;
55c2c: 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;
55c30: 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)
{
55c32: 246e 0008 moveal %fp@(8),%a2
55c36: 286e 0014 moveal %fp@(20),%a4
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
55c3a: 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))
55c3c: 605c bras 55c9a <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)
55c3e: b6aa 000c cmpl %a2@(12),%d3
55c42: 6506 bcss 55c4a <rtems_rfs_bitmap_map_alloc+0x2e><== ALWAYS TAKEN
window, 1);
if ((rc > 0) || *allocated)
break;
}
if (lower_seed >= 0)
55c44: 4a82 tstl %d2 <== NOT EXECUTED
55c46: 6c26 bges 55c6e <rtems_rfs_bitmap_map_alloc+0x52><== NOT EXECUTED
55c48: 601c bras 55c66 <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;
55c4a: 2883 movel %d3,%a4@
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
55c4c: 4878 0001 pea 1 <ADD>
55c50: 2f0b movel %a3,%sp@-
55c52: 2f0c movel %a4,%sp@-
55c54: 2f0a movel %a2,%sp@-
55c56: 4e95 jsr %a5@
window, 1);
if ((rc > 0) || *allocated)
55c58: 4fef 0010 lea %sp@(16),%sp
55c5c: 4a80 tstl %d0
55c5e: 6e4e bgts 55cae <rtems_rfs_bitmap_map_alloc+0x92><== NEVER TAKEN
55c60: 4a13 tstb %a3@
55c62: 67e0 beqs 55c44 <rtems_rfs_bitmap_map_alloc+0x28><== NEVER TAKEN
55c64: 6048 bras 55cae <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)
55c66: b6aa 000c cmpl %a2@(12),%d3 <== NOT EXECUTED
55c6a: 651e bcss 55c8a <rtems_rfs_bitmap_map_alloc+0x6e><== NOT EXECUTED
55c6c: 6022 bras 55c90 <rtems_rfs_bitmap_map_alloc+0x74><== NOT EXECUTED
break;
}
if (lower_seed >= 0)
{
*bit = lower_seed;
55c6e: 2882 movel %d2,%a4@ <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
55c70: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
55c74: 2f0b movel %a3,%sp@- <== NOT EXECUTED
55c76: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55c78: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55c7a: 4e95 jsr %a5@ <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
55c7c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
55c80: 4a80 tstl %d0 <== NOT EXECUTED
55c82: 6e2a bgts 55cae <rtems_rfs_bitmap_map_alloc+0x92><== NOT EXECUTED
55c84: 4a13 tstb %a3@ <== NOT EXECUTED
55c86: 67de beqs 55c66 <rtems_rfs_bitmap_map_alloc+0x4a><== NOT EXECUTED
55c88: 6024 bras 55cae <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;
55c8a: 0683 0000 0800 addil #2048,%d3 <== NOT EXECUTED
if (lower_seed >= 0)
55c90: 4a82 tstl %d2 <== NOT EXECUTED
55c92: 6d06 blts 55c9a <rtems_rfs_bitmap_map_alloc+0x7e><== NOT EXECUTED
lower_seed -= window;
55c94: 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))
55c9a: 4a83 tstl %d3
55c9c: 6d06 blts 55ca4 <rtems_rfs_bitmap_map_alloc+0x88><== NEVER TAKEN
55c9e: b6aa 000c cmpl %a2@(12),%d3
55ca2: 659a bcss 55c3e <rtems_rfs_bitmap_map_alloc+0x22><== ALWAYS TAKEN
|| ((lower_seed >= 0) && (lower_seed < control->size)))
55ca4: 4a82 tstl %d2 <== NOT EXECUTED
55ca6: 6d06 blts 55cae <rtems_rfs_bitmap_map_alloc+0x92><== NOT EXECUTED
55ca8: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
55cac: 6590 bcss 55c3e <rtems_rfs_bitmap_map_alloc+0x22><== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
55cae: 4280 clrl %d0
55cb0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
55cb6: 4e5e unlk %fp <== NOT EXECUTED
00055a7e <rtems_rfs_bitmap_map_clear>:
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
55a7e: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
55a82: 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);
55a86: 486e fffc pea %fp@(-4) <== NOT EXECUTED
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
55a8a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
55a8e: 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);
55a92: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55a94: 4eba fd4a jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
55a98: 508f addql #8,%sp <== NOT EXECUTED
55a9a: 4a80 tstl %d0 <== NOT EXECUTED
55a9c: 6e42 bgts 55ae0 <rtems_rfs_bitmap_map_clear+0x62><== NOT EXECUTED
return rc;
if (bit >= control->size)
55a9e: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
55aa2: 643a bccs 55ade <rtems_rfs_bitmap_map_clear+0x60><== NOT EXECUTED
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
55aa4: 2202 movel %d2,%d1 <== NOT EXECUTED
55aa6: ea81 asrl #5,%d1 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
55aa8: 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);
55aaa: 761f moveq #31,%d3 <== NOT EXECUTED
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
55aac: e588 lsll #2,%d0 <== NOT EXECUTED
55aae: 226e fffc moveal %fp@(-4),%a1 <== NOT EXECUTED
55ab2: d3c0 addal %d0,%a1 <== NOT EXECUTED
55ab4: 7001 moveq #1,%d0 <== NOT EXECUTED
55ab6: 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);
55ab8: 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;
55aba: 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);
55abe: e7ac lsll %d3,%d4 <== NOT EXECUTED
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
55ac0: 760a moveq #10,%d3 <== NOT EXECUTED
55ac2: 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);
55ac4: 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);
55ac6: 781f moveq #31,%d4 <== NOT EXECUTED
55ac8: c284 andl %d4,%d1 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset);
55aca: 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);
55acc: 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);
55ad0: 2052 moveal %a2@,%a0 <== NOT EXECUTED
control->free++;
return 0;
55ad2: 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);
55ad4: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
control->free++;
55ad8: 52aa 0010 addql #1,%a2@(16) <== NOT EXECUTED
55adc: 6002 bras 55ae0 <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;
55ade: 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;
}
55ae0: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED
55ae6: 4e5e unlk %fp <== NOT EXECUTED
00055b9e <rtems_rfs_bitmap_map_clear_all>:
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
55b9e: 4e56 fff0 linkw %fp,#-16
55ba2: 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);
55ba6: 486e fffc pea %fp@(-4)
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
55baa: 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);
55bae: 2f0a movel %a2,%sp@-
55bb0: 4eba fc2e jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
55bb4: 508f addql #8,%sp
55bb6: 4a80 tstl %d0
55bb8: 6e58 bgts 55c12 <rtems_rfs_bitmap_map_clear_all+0x74><== NEVER TAKEN
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
55bba: 202a 000c movel %a2@(12),%d0
55bbe: 5380 subql #1,%d0
55bc0: ea88 lsrl #5,%d0
55bc2: 2200 movel %d0,%d1
55bc4: 5281 addql #1,%d1
control->free = elements;
for (e = 0; e < elements; e++)
55bc6: 91c8 subal %a0,%a0
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
55bc8: 2541 0010 movel %d1,%a2@(16)
55bcc: 226e fffc moveal %fp@(-4),%a1
for (e = 0; e < elements; e++)
55bd0: 6006 bras 55bd8 <rtems_rfs_bitmap_map_clear_all+0x3a>
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55bd2: 74ff moveq #-1,%d2
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
55bd4: 5288 addql #1,%a0
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55bd6: 22c2 movel %d2,%a1@+
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
55bd8: b288 cmpl %a0,%d1
55bda: 62f6 bhis 55bd2 <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);
55bdc: 741f moveq #31,%d2
55bde: c282 andl %d2,%d1
if (last_search_bit == 0)
55be0: 6604 bnes 55be6 <rtems_rfs_bitmap_map_clear_all+0x48>
last_search_bit = rtems_rfs_bitmap_element_bits ();
55be2: 123c 0020 moveb #32,%d1
elements = rtems_rfs_bitmap_elements (elements);
55be6: 2400 movel %d0,%d2
55be8: ea8a lsrl #5,%d2
for (e = 0; e < (elements - 1); e++)
55bea: 4280 clrl %d0
55bec: 6008 bras 55bf6 <rtems_rfs_bitmap_map_clear_all+0x58>
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
55bee: 76ff moveq #-1,%d3 <== NOT EXECUTED
55bf0: 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++)
55bf4: 5280 addql #1,%d0 <== NOT EXECUTED
55bf6: 206a 0014 moveal %a2@(20),%a0
55bfa: b480 cmpl %d0,%d2
55bfc: 66f0 bnes 55bee <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);
55bfe: 7420 moveq #32,%d2
55c00: 9481 subl %d1,%d2
55c02: 72ff moveq #-1,%d1
55c04: 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] =
55c06: 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;
55c0a: 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);
55c0c: 2052 moveal %a2@,%a0
55c0e: 10bc 0001 moveb #1,%a0@
return 0;
}
55c12: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
55c18: 4e5e unlk %fp <== NOT EXECUTED
00055a02 <rtems_rfs_bitmap_map_set>:
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
55a02: 4e56 ffec linkw %fp,#-20
55a06: 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);
55a0a: 486e fffc pea %fp@(-4)
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
55a0e: 246e 0008 moveal %fp@(8),%a2
55a12: 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);
55a16: 2f0a movel %a2,%sp@-
55a18: 4eba fdc6 jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
55a1c: 508f addql #8,%sp
55a1e: 4a80 tstl %d0
55a20: 6e52 bgts 55a74 <rtems_rfs_bitmap_map_set+0x72> <== NEVER TAKEN
return rc;
if (bit >= control->size)
55a22: b4aa 000c cmpl %a2@(12),%d2
55a26: 6446 bccs 55a6e <rtems_rfs_bitmap_map_set+0x6c> <== NEVER TAKEN
return EINVAL;
search_map = control->search_bits;
index = rtems_rfs_bitmap_map_index (bit);
55a28: 2602 movel %d2,%d3
55a2a: ea83 asrl #5,%d3
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_set (map[index], 1 << offset);
55a2c: 2003 movel %d3,%d0
55a2e: 7201 moveq #1,%d1
55a30: 2801 movel %d1,%d4
55a32: e588 lsll #2,%d0
55a34: 226e fffc moveal %fp@(-4),%a1
55a38: 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);
55a3a: 701f moveq #31,%d0
55a3c: 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;
55a3e: 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);
55a42: e1ac lsll %d0,%d4
55a44: 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);
55a46: 4680 notl %d0
55a48: 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);
55a4a: 2280 movel %d0,%a1@
if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET))
55a4c: 6624 bnes 55a72 <rtems_rfs_bitmap_map_set+0x70> <== ALWAYS TAKEN
{
bit = index;
index = rtems_rfs_bitmap_map_index (bit);
offset = rtems_rfs_bitmap_map_offset (bit);
55a4e: 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);
55a50: 103c 000a moveb #10,%d0 <== NOT EXECUTED
55a54: 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);
55a56: 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);
55a58: c684 andl %d4,%d3 <== NOT EXECUTED
search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset);
55a5a: 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);
55a5c: 4680 notl %d0 <== NOT EXECUTED
55a5e: 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);
55a62: 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--;
55a64: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
55a68: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
55a6c: 6004 bras 55a72 <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;
55a6e: 7016 moveq #22,%d0 <== NOT EXECUTED
55a70: 6002 bras 55a74 <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;
55a72: 4280 clrl %d0
}
55a74: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
55a7a: 4e5e unlk %fp <== NOT EXECUTED
00055b3c <rtems_rfs_bitmap_map_set_all>:
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
55b3c: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
55b40: 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);
55b42: 486e fffc pea %fp@(-4) <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
55b46: 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);
55b4a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55b4c: 4eba fc92 jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
55b50: 508f addql #8,%sp <== NOT EXECUTED
55b52: 4a80 tstl %d0 <== NOT EXECUTED
55b54: 6e40 bgts 55b96 <rtems_rfs_bitmap_map_set_all+0x5a><== NOT EXECUTED
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
55b56: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED
55b5a: 5380 subql #1,%d0 <== NOT EXECUTED
55b5c: ea88 lsrl #5,%d0 <== NOT EXECUTED
55b5e: 2240 moveal %d0,%a1 <== NOT EXECUTED
55b60: 5289 addql #1,%a1 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
55b62: 4281 clrl %d1 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
55b64: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
55b68: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
for (e = 0; e < elements; e++)
55b6c: 6004 bras 55b72 <rtems_rfs_bitmap_map_set_all+0x36><== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
55b6e: 4298 clrl %a0@+ <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
55b70: 5281 addql #1,%d1 <== NOT EXECUTED
55b72: b3c1 cmpal %d1,%a1 <== NOT EXECUTED
55b74: 62f8 bhis 55b6e <rtems_rfs_bitmap_map_set_all+0x32><== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
55b76: ea88 lsrl #5,%d0 <== NOT EXECUTED
55b78: 2200 movel %d0,%d1 <== NOT EXECUTED
55b7a: 5281 addql #1,%d1 <== NOT EXECUTED
for (e = 0; e < elements; e++)
55b7c: 4280 clrl %d0 <== NOT EXECUTED
55b7e: 600a bras 55b8a <rtems_rfs_bitmap_map_set_all+0x4e><== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
55b80: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED
55b84: 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++)
55b88: 5280 addql #1,%d0 <== NOT EXECUTED
55b8a: b280 cmpl %d0,%d1 <== NOT EXECUTED
55b8c: 62f2 bhis 55b80 <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);
55b8e: 2052 moveal %a2@,%a0 <== NOT EXECUTED
return 0;
55b90: 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);
55b92: 10bc 0001 moveb #1,%a0@ <== NOT EXECUTED
return 0;
}
55b96: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
55b9a: 4e5e unlk %fp <== NOT EXECUTED
00055aea <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
55aea: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
55aee: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55af0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
55af4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
55af6: 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)
{
55afa: 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);
55afe: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55b00: 4eba fcde jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>) <== NOT EXECUTED
if (rc > 0)
55b04: 508f addql #8,%sp <== NOT EXECUTED
55b06: 4a80 tstl %d0 <== NOT EXECUTED
55b08: 6e26 bgts 55b30 <rtems_rfs_bitmap_map_test+0x46> <== NOT EXECUTED
return rc;
if (bit >= control->size)
55b0a: b4aa 000c cmpl %a2@(12),%d2 <== NOT EXECUTED
55b0e: 641e bccs 55b2e <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);
55b10: 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);
55b12: 2202 movel %d2,%d1 <== NOT EXECUTED
55b14: 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);
55b16: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
55b1a: e5a8 lsll %d2,%d0 <== NOT EXECUTED
55b1c: 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);
55b20: 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);
55b24: 57c0 seq %d0 <== NOT EXECUTED
55b26: 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);
55b28: 1080 moveb %d0,%a0@ <== NOT EXECUTED
return 0;
55b2a: 4280 clrl %d0 <== NOT EXECUTED
55b2c: 6002 bras 55b30 <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;
55b2e: 7016 moveq #22,%d0 <== NOT EXECUTED
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
return 0;
}
55b30: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
55b34: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
55b38: 4e5e unlk %fp <== NOT EXECUTED
000559c8 <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);
559c8: 7220 moveq #32,%d1 <== NOT EXECUTED
return mask;
}
559ca: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
559cc: 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);
559d0: 92ae 0008 subl %fp@(8),%d1 <== NOT EXECUTED
return mask;
}
559d4: 4e5e unlk %fp <== NOT EXECUTED
559d6: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
000559da <rtems_rfs_bitmap_mask_section>:
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask_section (unsigned int start, unsigned int end)
{
559da: 4e56 0000 linkw %fp,#0
559de: 222e 0008 movel %fp@(8),%d1
559e2: 202e 000c movel %fp@(12),%d0
559e6: 2f02 movel %d2,%sp@-
rtems_rfs_bitmap_element mask = 0;
if (end > start)
559e8: b280 cmpl %d0,%d1
559ea: 640e bccs 559fa <rtems_rfs_bitmap_mask_section+0x20><== NEVER TAKEN
mask = rtems_rfs_bitmap_mask (end - start) << start;
559ec: 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);
559ee: 7420 moveq #32,%d2
559f0: 9480 subl %d0,%d2
559f2: 70ff moveq #-1,%d0
559f4: 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;
559f6: e3a8 lsll %d1,%d0
559f8: 6002 bras 559fc <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;
559fa: 4280 clrl %d0 <== NOT EXECUTED
if (end > start)
mask = rtems_rfs_bitmap_mask (end - start) << start;
return mask;
}
559fc: 241f movel %sp@+,%d2
559fe: 4e5e unlk %fp <== NOT EXECUTED
00055d54 <rtems_rfs_bitmap_open>:
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
55d54: 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)
{
55d56: 4e56 0000 linkw %fp,#0
55d5a: 202e 0014 movel %fp@(20),%d0
55d5e: 2f0a movel %a2,%sp@-
55d60: 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;
55d64: 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);
55d68: 5380 subql #1,%d0
control->buffer = buffer;
control->fs = fs;
control->block = block;
control->size = size;
elements = rtems_rfs_bitmap_elements (elements);
55d6a: e2a8 lsrl %d1,%d0
control->search_bits = malloc (elements * sizeof (rtems_rfs_bitmap_element));
55d6c: e588 lsll #2,%d0
size_t size,
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
55d6e: 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));
55d72: 2040 moveal %d0,%a0
rtems_rfs_buffer_block block)
{
size_t elements = rtems_rfs_bitmap_elements (size);
control->buffer = buffer;
control->fs = fs;
55d74: 256e 000c 0004 movel %fp@(12),%a2@(4)
control->block = block;
55d7a: 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));
55d80: 4868 0004 pea %a0@(4)
55d84: 4eb9 0004 6910 jsr 46910 <malloc>
if (!control->search_bits)
55d8a: 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));
55d8c: 2540 0014 movel %d0,%a2@(20)
if (!control->search_bits)
55d90: 6710 beqs 55da2 <rtems_rfs_bitmap_open+0x4e> <== NEVER TAKEN
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
55d92: 2d4a 0008 movel %a2,%fp@(8)
}
55d96: 246e fffc moveal %fp@(-4),%a2
55d9a: 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);
55d9c: 4ef9 0005 5cba jmp 55cba <rtems_rfs_bitmap_create_search>
}
55da2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
55da6: 700c moveq #12,%d0 <== NOT EXECUTED
55da8: 4e5e unlk %fp <== NOT EXECUTED
00055eec <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)
{
55eec: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
55ef0: 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);
55ef4: 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)
{
55ef8: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
55efc: 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);
55f00: 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)
{
55f02: 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);
55f06: 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)
{
55f08: 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);
55f0c: 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)
{
55f0e: 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);
55f12: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
55f18: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
55f1c: 4a80 tstl %d0 <== NOT EXECUTED
55f1e: 6e78 bgts 55f98 <rtems_rfs_block_find_indirect+0xac><== NOT EXECUTED
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
55f20: 206c 0006 moveal %a4@(6),%a0 <== NOT EXECUTED
55f24: 2204 movel %d4,%d1 <== NOT EXECUTED
55f26: 4282 clrl %d2 <== NOT EXECUTED
55f28: 4280 clrl %d0 <== NOT EXECUTED
55f2a: 7a18 moveq #24,%d5 <== NOT EXECUTED
55f2c: e589 lsll #2,%d1 <== NOT EXECUTED
55f2e: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
55f32: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED
55f36: 1030 1803 moveb %a0@(00000003,%d1:l),%d0 <== NOT EXECUTED
55f3a: ebaa lsll %d5,%d2 <== NOT EXECUTED
55f3c: 8082 orl %d2,%d0 <== NOT EXECUTED
55f3e: 4282 clrl %d2 <== NOT EXECUTED
55f40: 1430 1801 moveb %a0@(00000001,%d1:l),%d2 <== NOT EXECUTED
55f44: 1230 1802 moveb %a0@(00000002,%d1:l),%d1 <== NOT EXECUTED
55f48: 4842 swap %d2 <== NOT EXECUTED
55f4a: 4242 clrw %d2 <== NOT EXECUTED
55f4c: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
55f52: 8082 orl %d2,%d0 <== NOT EXECUTED
55f54: e189 lsll #8,%d1 <== NOT EXECUTED
55f56: 8081 orl %d1,%d0 <== NOT EXECUTED
if ((*result + 1) == 0)
55f58: 72ff moveq #-1,%d1 <== NOT EXECUTED
55f5a: b280 cmpl %d0,%d1 <== NOT EXECUTED
55f5c: 6704 beqs 55f62 <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);
55f5e: 2480 movel %d0,%a2@ <== NOT EXECUTED
55f60: 6002 bras 55f64 <rtems_rfs_block_find_indirect+0x78><== NOT EXECUTED
if ((*result + 1) == 0)
*result = 0;
55f62: 4292 clrl %a2@ <== NOT EXECUTED
if (*result >= rtems_rfs_fs_blocks (fs))
55f64: 266b 0004 moveal %a3@(4),%a3 <== NOT EXECUTED
55f68: b7d2 cmpal %a2@,%a3 <== NOT EXECUTED
55f6a: 622a bhis 55f96 <rtems_rfs_block_find_indirect+0xaa><== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_FIND))
55f6c: 4878 1000 pea 1000 <D_MAX_EXP+0x801> <== NOT EXECUTED
55f70: 42a7 clrl %sp@- <== NOT EXECUTED
55f72: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
55f78: 508f addql #8,%sp <== NOT EXECUTED
55f7a: 4a00 tstb %d0 <== NOT EXECUTED
55f7c: 6716 beqs 55f94 <rtems_rfs_block_find_indirect+0xa8><== NOT EXECUTED
printf ("rtems-rfs: block-find: invalid block in table:"
55f7e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
55f80: 2f03 movel %d3,%sp@- <== NOT EXECUTED
55f82: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
55f84: 4879 0006 e04b pea 6e04b <CSWTCH.2+0x37> <== NOT EXECUTED
55f8a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
55f90: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
" block=%" PRId32 ", indirect=%" PRId32 "/%d\n", *result, block, offset);
*result = 0;
55f94: 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))
55f96: 4280 clrl %d0 <== NOT EXECUTED
*result = 0;
rc = EIO;
}
return 0;
}
55f98: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
55f9e: 4e5e unlk %fp <== NOT EXECUTED
000560b0 <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)
{
560b0: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
560b4: 48d7 043c moveml %d2-%d5/%a2,%sp@ <== NOT EXECUTED
560b8: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
560bc: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
560c0: 246e 0014 moveal %fp@(20),%a2 <== NOT EXECUTED
if (pos == 0)
560c4: 2002 movel %d2,%d0 <== NOT EXECUTED
560c6: 8083 orl %d3,%d0 <== NOT EXECUTED
560c8: 6608 bnes 560d2 <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;
560ca: 4292 clrl %a2@ <== NOT EXECUTED
size->offset = 0;
560cc: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
560d0: 6036 bras 56108 <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;
560d2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
560d6: 4284 clrl %d4 <== NOT EXECUTED
560d8: 2a28 0008 movel %a0@(8),%d5 <== NOT EXECUTED
560dc: 2f05 movel %d5,%sp@- <== NOT EXECUTED
560de: 2f04 movel %d4,%sp@- <== NOT EXECUTED
560e0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
560e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
560e4: 4eb9 0006 98ec jsr 698ec <__udivdi3> <== NOT EXECUTED
560ea: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
560ee: 5281 addql #1,%d1 <== NOT EXECUTED
560f0: 2481 movel %d1,%a2@ <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
560f2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
560f4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
560f6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
560f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
560fa: 4eb9 0006 9cf0 jsr 69cf0 <__umoddi3> <== NOT EXECUTED
56100: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56104: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
}
}
56108: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED
5610e: 4e5e unlk %fp <== NOT EXECUTED
00056040 <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)
{
56040: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
56044: 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)
{
56048: 48d7 043c moveml %d2-%d5/%a2,%sp@ <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
5604c: 2628 0008 movel %a0@(8),%d3 <== NOT EXECUTED
56050: 4282 clrl %d2 <== NOT EXECUTED
56052: 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)
{
56054: 246e 0014 moveal %fp@(20),%a2 <== NOT EXECUTED
56058: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
5605c: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
56060: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56062: 2f05 movel %d5,%sp@- <== NOT EXECUTED
56064: 2f04 movel %d4,%sp@- <== NOT EXECUTED
56066: 4eb9 0006 98ec jsr 698ec <__udivdi3> <== NOT EXECUTED
5606c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56070: 2481 movel %d1,%a2@ <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
56072: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56074: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56076: 2f05 movel %d5,%sp@- <== NOT EXECUTED
56078: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5607a: 4eb9 0006 9cf0 jsr 69cf0 <__umoddi3> <== NOT EXECUTED
56080: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56084: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
}
56088: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED
5608e: 4e5e unlk %fp <== NOT EXECUTED
00056092 <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;
}
56092: 4280 clrl %d0 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
56094: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
56098: 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)
{
5609c: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
}
560a0: 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;
560a2: 2229 0008 movel %a1@(8),%d1 <== NOT EXECUTED
560a6: 4c10 1800 mulsl %a0@,%d1 <== NOT EXECUTED
}
560aa: d2a8 0004 addl %a0@(4),%d1 <== NOT EXECUTED
00056112 <rtems_rfs_block_get_size>:
rtems_rfs_pos
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
56112: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
56116: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
5611a: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
5611e: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
56122: 2810 movel %a0@,%d4 <== NOT EXECUTED
56124: 6730 beqs 56156 <rtems_rfs_block_get_size+0x44> <== NOT EXECUTED
return 0;
if (size->offset == 0)
56126: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED
5612a: 4a88 tstl %a0 <== NOT EXECUTED
5612c: 6604 bnes 56132 <rtems_rfs_block_get_size+0x20> <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
5612e: 2069 0008 moveal %a1@(8),%a0 <== NOT EXECUTED
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
56132: 2229 0008 movel %a1@(8),%d1 <== NOT EXECUTED
56136: 4280 clrl %d0 <== NOT EXECUTED
return (((uint64_t) (size->count - 1)) * block_size) + offset;
56138: 5384 subql #1,%d4 <== NOT EXECUTED
5613a: 2608 movel %a0,%d3 <== NOT EXECUTED
5613c: 4282 clrl %d2 <== NOT EXECUTED
5613e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
56140: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56142: 2f04 movel %d4,%sp@- <== NOT EXECUTED
56144: 42a7 clrl %sp@- <== NOT EXECUTED
56146: 4eb9 0006 8ff0 jsr 68ff0 <__muldi3> <== NOT EXECUTED
5614c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56150: d681 addl %d1,%d3 <== NOT EXECUTED
56152: d580 addxl %d0,%d2 <== NOT EXECUTED
56154: 6004 bras 5615a <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;
56156: 4282 clrl %d2 <== NOT EXECUTED
56158: 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;
}
5615a: 2002 movel %d2,%d0 <== NOT EXECUTED
5615c: 2203 movel %d3,%d1 <== NOT EXECUTED
5615e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED
56164: 4e5e unlk %fp <== NOT EXECUTED
000562ea <rtems_rfs_block_map_close>:
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
562ea: 4e56 ffe8 linkw %fp,#-24
562ee: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
562f2: 262e 0008 movel %fp@(8),%d3
562f6: 246e 000c moveal %fp@(12),%a2
int rc = 0;
int brc;
if (map->dirty && map->inode)
562fa: 4a12 tstb %a2@
562fc: 6700 0166 beqw 56464 <rtems_rfs_block_map_close+0x17a>
56300: 202a 0002 movel %a2@(2),%d0
56304: 6700 015e beqw 56464 <rtems_rfs_block_map_close+0x17a>
{
brc = rtems_rfs_inode_load (fs, map->inode);
56308: 2f00 movel %d0,%sp@-
5630a: 2f03 movel %d3,%sp@-
5630c: 4eb9 0004 eb08 jsr 4eb08 <rtems_rfs_inode_load>
if (brc > 0)
56312: 508f addql #8,%sp
56314: 4a80 tstl %d0
56316: 6e00 0150 bgtw 56468 <rtems_rfs_block_map_close+0x17e>
5631a: 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]);
5631c: 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);
56320: 2001 movel %d1,%d0
56322: 5e80 addql #7,%d0
56324: 2802 movel %d2,%d4
56326: 7a18 moveq #24,%d5
56328: eaac lsrl %d5,%d4
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5632a: 5281 addql #1,%d1
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
5632c: 206a 0002 moveal %a2@(2),%a0
56330: e588 lsll #2,%d0
56332: 2268 000c moveal %a0@(12),%a1
56336: 1384 0800 moveb %d4,%a1@(00000000,%d0:l)
5633a: 2802 movel %d2,%d4
5633c: 2268 000c moveal %a0@(12),%a1
56340: 4244 clrw %d4
56342: 4844 swap %d4
56344: 1384 0801 moveb %d4,%a1@(00000001,%d0:l)
56348: 2802 movel %d2,%d4
5634a: e08c lsrl #8,%d4
5634c: 2268 000c moveal %a0@(12),%a1
56350: 1384 0802 moveb %d4,%a1@(00000002,%d0:l)
56354: 2268 000c moveal %a0@(12),%a1
56358: 1382 0803 moveb %d2,%a1@(00000003,%d0:l)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5635c: 7001 moveq #1,%d0
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5635e: 7405 moveq #5,%d2
56360: 1140 0010 moveb %d0,%a0@(16)
56364: b481 cmpl %d1,%d2
56366: 66b4 bnes 5631c <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);
56368: 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);
5636c: 143c 0018 moveb #24,%d2
56370: 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);
56374: 2200 movel %d0,%d1
56376: eaa9 lsrl %d5,%d1
56378: 2268 000c moveal %a0@(12),%a1
5637c: 1341 000c moveb %d1,%a1@(12)
56380: 2200 movel %d0,%d1
56382: 2268 000c moveal %a0@(12),%a1
56386: 4241 clrw %d1
56388: 4841 swap %d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5638a: 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);
5638c: 1341 000d moveb %d1,%a1@(13)
56390: 2200 movel %d0,%d1
56392: e089 lsrl #8,%d1
56394: 2268 000c moveal %a0@(12),%a1
56398: 1341 000e moveb %d1,%a1@(14)
5639c: 2268 000c moveal %a0@(12),%a1
563a0: 1340 000f moveb %d0,%a1@(15)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
563a4: 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);
}
563a8: 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);
563ac: 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);
}
563b0: 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);
563b6: 2268 000c moveal %a0@(12),%a1
563ba: 2200 movel %d0,%d1
563bc: e089 lsrl #8,%d1
563be: 1341 000a moveb %d1,%a1@(10)
563c2: 2268 000c moveal %a0@(12),%a1
563c6: 1340 000b moveb %d0,%a1@(11)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
563ca: 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);
563ce: 206a 0002 moveal %a2@(2),%a0
563d2: 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);
563d6: 2200 movel %d0,%d1
563d8: e4a9 lsrl %d2,%d1
563da: 2268 000c moveal %a0@(12),%a1
563de: 1341 0030 moveb %d1,%a1@(48)
563e2: 2200 movel %d0,%d1
563e4: 2268 000c moveal %a0@(12),%a1
563e8: 4241 clrw %d1
563ea: 4841 swap %d1
563ec: 1341 0031 moveb %d1,%a1@(49)
563f0: 2200 movel %d0,%d1
563f2: e089 lsrl #8,%d1
563f4: 2268 000c moveal %a0@(12),%a1
563f8: 1341 0032 moveb %d1,%a1@(50)
563fc: 2268 000c moveal %a0@(12),%a1
56400: 1340 0033 moveb %d0,%a1@(51)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
56404: 1145 0010 moveb %d5,%a0@(16)
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
56408: 206a 0002 moveal %a2@(2),%a0
5640c: 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);
56410: 2200 movel %d0,%d1
56412: e4a9 lsrl %d2,%d1
56414: 2268 000c moveal %a0@(12),%a1
56418: 1341 0034 moveb %d1,%a1@(52)
5641c: 2200 movel %d0,%d1
5641e: 2268 000c moveal %a0@(12),%a1
56422: 4241 clrw %d1
56424: 4841 swap %d1
56426: 1341 0035 moveb %d1,%a1@(53)
5642a: 2268 000c moveal %a0@(12),%a1
5642e: 2200 movel %d0,%d1
56430: e089 lsrl #8,%d1
56432: 1341 0036 moveb %d1,%a1@(54)
56436: 2268 000c moveal %a0@(12),%a1
5643a: 1340 0037 moveb %d0,%a1@(55)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5643e: 1145 0010 moveb %d5,%a0@(16)
brc = rtems_rfs_inode_unload (fs, map->inode, true);
56442: 4878 0001 pea 1 <ADD>
56446: 2f2a 0002 movel %a2@(2),%sp@-
5644a: 2f03 movel %d3,%sp@-
5644c: 4eb9 0004 ec5e jsr 4ec5e <rtems_rfs_inode_unload>
56452: 4fef 000c lea %sp@(12),%sp
56456: 2400 movel %d0,%d2
56458: 4680 notl %d0
5645a: d080 addl %d0,%d0
5645c: 9180 subxl %d0,%d0
if (brc > 0)
rc = brc;
map->dirty = false;
5645e: 4212 clrb %a2@
56460: c480 andl %d0,%d2
56462: 6006 bras 5646a <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;
56464: 4282 clrl %d2 <== NOT EXECUTED
56466: 6002 bras 5646a <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)
56468: 2400 movel %d0,%d2 <== NOT EXECUTED
map->dirty = false;
}
}
map->inode = NULL;
5646a: 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);
5646e: 486a 0036 pea %a2@(54)
56472: 47f9 0005 6d08 lea 56d08 <rtems_rfs_buffer_handle_release>,%a3
56478: 2f03 movel %d3,%sp@-
handle->dirty = false;
5647a: 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);
5647c: 4e93 jsr %a3@
handle->dirty = false;
5647e: 1545 0036 moveb %d5,%a2@(54)
handle->bnum = 0;
56482: 42aa 0038 clrl %a2@(56)
handle->buffer = NULL;
56486: 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);
5648a: 486a 0040 pea %a2@(64)
5648e: 2f03 movel %d3,%sp@-
56490: 4e93 jsr %a3@
rc = brc;
brc = rtems_rfs_buffer_handle_close (fs, &map->doubly_buffer);
if ((brc > 0) && (rc == 0))
rc = brc;
return rc;
}
56492: 2002 movel %d2,%d0
handle->dirty = false;
56494: 1545 0040 moveb %d5,%a2@(64)
handle->bnum = 0;
56498: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
5649c: 42aa 0046 clrl %a2@(70)
564a0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
564a6: 4e5e unlk %fp <== NOT EXECUTED
000564aa <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)
{
564aa: 4e56 ffe0 linkw %fp,#-32
564ae: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
564b2: 266e 0014 moveal %fp@(20),%a3
564b6: 2a6e 0010 moveal %fp@(16),%a5
int rc = 0;
*block = 0;
564ba: 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)
{
564bc: 286e 0008 moveal %fp@(8),%a4
564c0: 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))
564c4: 2015 movel %a5@,%d0
564c6: 6708 beqs 564d0 <rtems_rfs_block_map_find+0x26> <== ALWAYS TAKEN
564c8: 4aaa 0006 tstl %a2@(6) <== NOT EXECUTED
564cc: 6700 00bc beqw 5658a <rtems_rfs_block_map_find+0xe0> <== NOT EXECUTED
564d0: 222a 0006 movel %a2@(6),%d1
564d4: b280 cmpl %d0,%d1
564d6: 6300 00b2 blsw 5658a <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))
564da: b0aa 000e cmpl %a2@(14),%d0 <== NOT EXECUTED
564de: 660e bnes 564ee <rtems_rfs_block_map_find+0x44> <== NOT EXECUTED
564e0: 206a 0016 moveal %a2@(22),%a0 <== NOT EXECUTED
564e4: 4a88 tstl %a0 <== NOT EXECUTED
564e6: 6706 beqs 564ee <rtems_rfs_block_map_find+0x44> <== NOT EXECUTED
{
*block = map->bpos.block;
564e8: 2688 movel %a0,%a3@ <== NOT EXECUTED
564ea: 6000 0086 braw 56572 <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)
564ee: 7405 moveq #5,%d2 <== NOT EXECUTED
564f0: b481 cmpl %d1,%d2 <== NOT EXECUTED
564f2: 6506 bcss 564fa <rtems_rfs_block_map_find+0x50> <== NOT EXECUTED
{
*block = map->blocks[bpos->bno];
564f4: 26b2 0c22 movel %a2@(00000022,%d0:l:4),%a3@ <== NOT EXECUTED
564f8: 6078 bras 56572 <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;
564fa: 242c 0034 movel %a4@(52),%d2 <== NOT EXECUTED
564fe: 4c42 0003 remul %d2,%d3,%d0 <== NOT EXECUTED
56502: 4c42 0000 remul %d2,%d0,%d0 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
56506: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
5650a: b2ac 0038 cmpl %a4@(56),%d1 <== NOT EXECUTED
5650e: 6214 bhis 56524 <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,
56510: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56512: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56514: 2f32 0c22 movel %a2@(00000022,%d0:l:4),%sp@- <== NOT EXECUTED
56518: 486a 0036 pea %a2@(54) <== NOT EXECUTED
5651c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5651e: 4eba f9cc jsr %pc@(55eec <rtems_rfs_block_find_indirect>)<== NOT EXECUTED
56522: 6046 bras 5656a <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;
56524: 4c42 0004 remul %d2,%d4,%d0 <== NOT EXECUTED
56528: 4c42 0000 remul %d2,%d0,%d0 <== NOT EXECUTED
5652c: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
56530: b2ac 003c cmpl %a4@(60),%d1 <== NOT EXECUTED
56534: 6454 bccs 5658a <rtems_rfs_block_map_find+0xe0> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
56536: 486e fffc pea %fp@(-4) <== NOT EXECUTED
5653a: 243c 0005 5eec movel #351980,%d2 <== NOT EXECUTED
56540: 2042 moveal %d2,%a0 <== NOT EXECUTED
56542: 2f04 movel %d4,%sp@- <== NOT EXECUTED
56544: 2f32 0c22 movel %a2@(00000022,%d0:l:4),%sp@- <== NOT EXECUTED
56548: 486a 0040 pea %a2@(64) <== NOT EXECUTED
5654c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5654e: 4e90 jsr %a0@ <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
56550: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56554: 4a80 tstl %d0 <== NOT EXECUTED
56556: 6616 bnes 5656e <rtems_rfs_block_map_find+0xc4> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
56558: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5655a: 2042 moveal %d2,%a0 <== NOT EXECUTED
5655c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5655e: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
56562: 486a 0036 pea %a2@(54) <== NOT EXECUTED
56566: 2f0c movel %a4,%sp@- <== NOT EXECUTED
56568: 4e90 jsr %a0@ <== NOT EXECUTED
5656a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
}
}
}
if (rc == 0)
5656e: 4a80 tstl %d0 <== NOT EXECUTED
56570: 661a bnes 5658c <rtems_rfs_block_map_find+0xe2> <== NOT EXECUTED
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
56572: 2555 000e movel %a5@,%a2@(14) <== NOT EXECUTED
map->bpos.block = *block;
56576: 4280 clrl %d0 <== NOT EXECUTED
}
}
if (rc == 0)
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
56578: 256d 0004 0012 movel %a5@(4),%a2@(18) <== NOT EXECUTED
5657e: 256d 0008 0016 movel %a5@(8),%a2@(22) <== NOT EXECUTED
map->bpos.block = *block;
56584: 2553 0016 movel %a3@,%a2@(22) <== NOT EXECUTED
56588: 6002 bras 5658c <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;
5658a: 7006 moveq #6,%d0
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
map->bpos.block = *block;
}
return rc;
}
5658c: 4cee 3c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a5
56592: 4e5e unlk %fp <== NOT EXECUTED
00056b8c <rtems_rfs_block_map_free_all>:
int
rtems_rfs_block_map_free_all (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
56b8c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
56b90: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
return rtems_rfs_block_map_shrink (fs, map, map->size.count);
56b94: 2f28 0006 movel %a0@(6),%sp@- <== NOT EXECUTED
56b98: 2f08 movel %a0,%sp@- <== NOT EXECUTED
56b9a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
56b9e: 4eb9 0005 691a jsr 5691a <rtems_rfs_block_map_shrink> <== NOT EXECUTED
}
56ba4: 4e5e unlk %fp <== NOT EXECUTED
00056646 <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)
{
56646: 4e56 ffcc linkw %fp,#-52
5664a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
5664e: 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)
{
56652: 246e 0008 moveal %fp@(8),%a2
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
56656: 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)
{
56658: 2a6e 000c moveal %fp@(12),%a5
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
5665c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56662: 508f addql #8,%sp
56664: 4a00 tstb %d0
56666: 6718 beqs 56680 <rtems_rfs_block_map_grow+0x3a> <== ALWAYS TAKEN
printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n",
56668: 2f2d 0006 movel %a5@(6),%sp@- <== NOT EXECUTED
5666c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
56670: 4879 0006 e096 pea 6e096 <CSWTCH.2+0x82> <== NOT EXECUTED
56676: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5667c: 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))
56680: 202e 0010 movel %fp@(16),%d0
56684: d0ad 0006 addl %a5@(6),%d0
56688: b0aa 003c cmpl %a2@(60),%d0
5668c: 6400 027e bccw 5690c <rtems_rfs_block_map_grow+0x2c6>
56690: 6000 0250 braw 568e2 <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,
56694: 486e fff8 pea %fp@(-8)
56698: 42a7 clrl %sp@-
5669a: 2f2d 001e movel %a5@(30),%sp@-
5669e: 2f0a movel %a2,%sp@-
566a0: 4e94 jsr %a4@
false, &block);
if (rc > 0)
566a2: 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,
566a6: 2e00 movel %d0,%d7
false, &block);
if (rc > 0)
566a8: 6e00 0264 bgtw 5690e <rtems_rfs_block_map_grow+0x2c8>
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
566ac: 202d 0006 movel %a5@(6),%d0
566b0: 7204 moveq #4,%d1
566b2: b280 cmpl %d0,%d1
566b4: 650c bcss 566c2 <rtems_rfs_block_map_grow+0x7c> <== NEVER TAKEN
map->blocks[map->size.count] = block;
566b6: 41ee fff8 lea %fp@(-8),%a0
566ba: 2b90 0c22 movel %a0@,%a5@(00000022,%d0:l:4)
566be: 6000 0200 braw 568c0 <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;
566c2: 2e2a 0034 movel %a2@(52),%d7 <== NOT EXECUTED
566c6: 2200 movel %d0,%d1 <== NOT EXECUTED
566c8: 4c47 1004 remul %d7,%d4,%d1 <== NOT EXECUTED
566cc: 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)
566d0: b0aa 0038 cmpl %a2@(56),%d0 <== NOT EXECUTED
566d4: 643e bccs 56714 <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) ||
566d6: 4a84 tstl %d4 <== NOT EXECUTED
566d8: 670a beqs 566e4 <rtems_rfs_block_map_grow+0x9e> <== NOT EXECUTED
566da: 4a81 tstl %d1 <== NOT EXECUTED
566dc: 662a bnes 56708 <rtems_rfs_block_map_grow+0xc2> <== NOT EXECUTED
((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS)))
566de: 7a05 moveq #5,%d5 <== NOT EXECUTED
566e0: ba84 cmpl %d4,%d5 <== NOT EXECUTED
566e2: 6624 bnes 56708 <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;
566e4: 7e05 moveq #5,%d7 <== NOT EXECUTED
566e6: be80 cmpl %d0,%d7 <== NOT EXECUTED
566e8: 57c0 seq %d0 <== NOT EXECUTED
566ea: 49c0 extbl %d0 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
566ec: 4480 negl %d0 <== NOT EXECUTED
566ee: 2f00 movel %d0,%sp@- <== NOT EXECUTED
566f0: 4875 1c22 pea %a5@(00000022,%d1:l:4) <== NOT EXECUTED
566f4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
566f6: 2f0d movel %a5,%sp@- <== NOT EXECUTED
566f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
566fa: 4eba f6c8 jsr %pc@(55dc4 <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)))
{
566fe: 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,
56702: 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)))
{
56704: 6000 0158 braw 5685e <rtems_rfs_block_map_grow+0x218> <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56708: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5670c: 2f35 1c22 movel %a5@(00000022,%d1:l:4),%sp@- <== NOT EXECUTED
56710: 6000 0140 braw 56852 <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;
56714: 4c47 1005 remul %d7,%d5,%d1 <== NOT EXECUTED
56718: 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)
5671c: 4a84 tstl %d4 <== NOT EXECUTED
5671e: 6600 00de bnew 567fe <rtems_rfs_block_map_grow+0x1b8> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
56722: 42a7 clrl %sp@- <== NOT EXECUTED
56724: 486e fffc pea %fp@(-4) <== NOT EXECUTED
56728: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5672a: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5672c: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED
56730: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56732: 4eba f690 jsr %pc@(55dc4 <rtems_rfs_block_map_indirect_alloc>)<== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
56736: 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,
5673a: 2e00 movel %d0,%d7 <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
5673c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56740: 6f04 bles 56746 <rtems_rfs_block_map_grow+0x100> <== NOT EXECUTED
56742: 6000 011e braw 56862 <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) ||
56746: 4a85 tstl %d5 <== NOT EXECUTED
56748: 670a beqs 56754 <rtems_rfs_block_map_grow+0x10e> <== NOT EXECUTED
5674a: 4a81 tstl %d1 <== NOT EXECUTED
5674c: 662c bnes 5677a <rtems_rfs_block_map_grow+0x134> <== NOT EXECUTED
((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS)))
5674e: 7005 moveq #5,%d0 <== NOT EXECUTED
56750: b085 cmpl %d5,%d0 <== NOT EXECUTED
56752: 6626 bnes 5677a <rtems_rfs_block_map_grow+0x134> <== NOT EXECUTED
{
bool upping;
upping = map->size.count == fs->block_map_singly_blocks;
56754: 2e2a 0038 movel %a2@(56),%d7 <== NOT EXECUTED
56758: bead 0006 cmpl %a5@(6),%d7 <== NOT EXECUTED
5675c: 57c0 seq %d0 <== NOT EXECUTED
5675e: 49c0 extbl %d0 <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
56760: 4480 negl %d0 <== NOT EXECUTED
56762: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56764: 4875 1c22 pea %a5@(00000022,%d1:l:4) <== NOT EXECUTED
56768: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5676a: 2f0d movel %a5,%sp@- <== NOT EXECUTED
5676c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5676e: 4eba f654 jsr %pc@(55dc4 <rtems_rfs_block_map_indirect_alloc>)<== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
56772: 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,
56776: 2e00 movel %d0,%d7 <== NOT EXECUTED
56778: 6014 bras 5678e <rtems_rfs_block_map_grow+0x148> <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5677a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5677e: 2f35 1c22 movel %a5@(00000022,%d1:l:4),%sp@- <== NOT EXECUTED
56782: 2f06 movel %d6,%sp@- <== NOT EXECUTED
56784: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56786: 4e93 jsr %a3@ <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
56788: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
5678c: 2e00 movel %d0,%d7 <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
5678e: 4a87 tstl %d7 <== NOT EXECUTED
56790: 6f22 bles 567b4 <rtems_rfs_block_map_grow+0x16e> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
56792: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
56796: 47f9 0004 e902 lea 4e902 <rtems_rfs_group_bitmap_free>,%a3 <== NOT EXECUTED
5679c: 42a7 clrl %sp@- <== NOT EXECUTED
5679e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
567a0: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
567a2: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
567a6: 42a7 clrl %sp@- <== NOT EXECUTED
567a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
567aa: 4e93 jsr %a3@ <== NOT EXECUTED
567ac: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
567b0: 6000 015c braw 5690e <rtems_rfs_block_map_grow+0x2c8> <== NOT EXECUTED
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
567b4: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
567b8: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
567bc: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
567c0: e58d lsll #2,%d5 <== NOT EXECUTED
567c2: 7001 moveq #1,%d0 <== NOT EXECUTED
567c4: 1390 5800 moveb %a0@,%a1@(00000000,%d5:l) <== NOT EXECUTED
567c8: 41ee fffd lea %fp@(-3),%a0 <== NOT EXECUTED
567cc: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
567d0: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
567d4: 1390 5801 moveb %a0@,%a1@(00000001,%d5:l) <== NOT EXECUTED
567d8: 41ee fffe lea %fp@(-2),%a0 <== NOT EXECUTED
567dc: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
567e0: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
567e4: 1390 5802 moveb %a0@,%a1@(00000002,%d5:l) <== NOT EXECUTED
567e8: 41ee ffff lea %fp@(-1),%a0 <== NOT EXECUTED
567ec: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
567f0: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
567f4: 1390 5803 moveb %a0@,%a1@(00000003,%d5:l) <== NOT EXECUTED
567f8: 1b40 0040 moveb %d0,%a5@(64) <== NOT EXECUTED
567fc: 607a bras 56878 <rtems_rfs_block_map_grow+0x232> <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
567fe: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
56802: 2f35 1c22 movel %a5@(00000022,%d1:l:4),%sp@- <== NOT EXECUTED
56806: 2f06 movel %d6,%sp@- <== NOT EXECUTED
56808: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5680a: 4e93 jsr %a3@ <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
5680c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
56810: 2e00 movel %d0,%d7 <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
56812: 6f02 bles 56816 <rtems_rfs_block_map_grow+0x1d0> <== NOT EXECUTED
56814: 604c bras 56862 <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,
56816: 226d 0046 moveal %a5@(70),%a1 <== NOT EXECUTED
5681a: 4281 clrl %d1 <== NOT EXECUTED
5681c: 4280 clrl %d0 <== NOT EXECUTED
5681e: 7e18 moveq #24,%d7 <== NOT EXECUTED
56820: e58d lsll #2,%d5 <== NOT EXECUTED
56822: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
56826: 1231 5800 moveb %a1@(00000000,%d5:l),%d1 <== NOT EXECUTED
5682a: 1031 5803 moveb %a1@(00000003,%d5:l),%d0 <== NOT EXECUTED
5682e: efa9 lsll %d7,%d1 <== NOT EXECUTED
56830: 8081 orl %d1,%d0 <== NOT EXECUTED
56832: 4281 clrl %d1 <== NOT EXECUTED
56834: 1231 5801 moveb %a1@(00000001,%d5:l),%d1 <== NOT EXECUTED
56838: 4841 swap %d1 <== NOT EXECUTED
5683a: 4241 clrw %d1 <== NOT EXECUTED
5683c: 8081 orl %d1,%d0 <== NOT EXECUTED
5683e: 4281 clrl %d1 <== NOT EXECUTED
56840: 1231 5802 moveb %a1@(00000002,%d5:l),%d1 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56844: 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,
56848: e189 lsll #8,%d1 <== NOT EXECUTED
5684a: 8081 orl %d1,%d0 <== NOT EXECUTED
5684c: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
56850: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56852: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56854: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56856: 4e93 jsr %a3@ <== NOT EXECUTED
singly_block, true);
if (rc > 0)
56858: 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,
5685c: 2e00 movel %d0,%d7 <== NOT EXECUTED
singly_block, true);
if (rc > 0)
5685e: 4a87 tstl %d7 <== NOT EXECUTED
56860: 6f16 bles 56878 <rtems_rfs_block_map_grow+0x232> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
56862: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
56866: 42a7 clrl %sp@- <== NOT EXECUTED
56868: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5686a: 4eb9 0004 e902 jsr 4e902 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
56870: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56874: 6000 0098 braw 5690e <rtems_rfs_block_map_grow+0x2c8> <== NOT EXECUTED
return rc;
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
56878: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
5687c: 41ee fff8 lea %fp@(-8),%a0 <== NOT EXECUTED
56880: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
56884: e58c lsll #2,%d4 <== NOT EXECUTED
56886: 7001 moveq #1,%d0 <== NOT EXECUTED
56888: 1390 4800 moveb %a0@,%a1@(00000000,%d4:l) <== NOT EXECUTED
5688c: 41ee fff9 lea %fp@(-7),%a0 <== NOT EXECUTED
56890: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
56894: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
56898: 1390 4801 moveb %a0@,%a1@(00000001,%d4:l) <== NOT EXECUTED
5689c: 41ee fffa lea %fp@(-6),%a0 <== NOT EXECUTED
568a0: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
568a4: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
568a8: 1390 4802 moveb %a0@,%a1@(00000002,%d4:l) <== NOT EXECUTED
568ac: 41ee fffb lea %fp@(-5),%a0 <== NOT EXECUTED
568b0: 226d 003c moveal %a5@(60),%a1 <== NOT EXECUTED
568b4: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
568b8: 1390 4803 moveb %a0@,%a1@(00000003,%d4:l) <== NOT EXECUTED
568bc: 1b40 0036 moveb %d0,%a5@(54) <== NOT EXECUTED
}
map->size.count++;
568c0: 52ad 0006 addql #1,%a5@(6)
map->size.offset = 0;
568c4: 42ad 000a clrl %a5@(10)
if (b == 0)
568c8: 4a82 tstl %d2
568ca: 6608 bnes 568d4 <rtems_rfs_block_map_grow+0x28e> <== NEVER TAKEN
*new_block = block;
568cc: 206e 0014 moveal %fp@(20),%a0
568d0: 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++)
568d4: 5282 addql #1,%d2
map->size.count++;
map->size.offset = 0;
if (b == 0)
*new_block = block;
map->last_data_block = block;
568d6: 2b6e fff8 001e movel %fp@(-8),%a5@(30)
map->dirty = true;
568dc: 1abc 0001 moveb #1,%a5@
568e0: 601e bras 56900 <rtems_rfs_block_map_grow+0x2ba>
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
568e2: 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,
568e4: 260d movel %a5,%d3
map->last_map_block = new_block;
return 0;
}
int
rtems_rfs_block_map_grow (rtems_rfs_file_system* fs,
568e6: 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,
568e8: 49f9 0004 e784 lea 4e784 <rtems_rfs_group_bitmap_alloc>,%a4
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
568ee: 0686 0000 0040 addil #64,%d6
568f4: 47f9 0005 6e84 lea 56e84 <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,
568fa: 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++)
56900: b4ae 0010 cmpl %fp@(16),%d2
56904: 6600 fd8e bnew 56694 <rtems_rfs_block_map_grow+0x4e>
*new_block = block;
map->last_data_block = block;
map->dirty = true;
}
return 0;
56908: 4287 clrl %d7
5690a: 6002 bras 5690e <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;
5690c: 7e1b moveq #27,%d7 <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
5690e: 2007 movel %d7,%d0
56910: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
56916: 4e5e unlk %fp <== NOT EXECUTED
00055dc4 <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)
{
55dc4: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
55dc8: 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);
55dcc: 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)
{
55dd0: 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);
55dd4: 42a7 clrl %sp@- <== NOT EXECUTED
55dd6: 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)
{
55dda: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
55dde: 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);
55de2: 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)
{
55de4: 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);
55de8: 4eb9 0004 e784 jsr 4e784 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
if (rc > 0)
55dee: 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);
55df2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
55df4: 6e00 00ea bgtw 55ee0 <rtems_rfs_block_map_indirect_alloc+0x11c><== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
55df8: 42a7 clrl %sp@- <== NOT EXECUTED
55dfa: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
55dfe: 2f0a movel %a2,%sp@- <== NOT EXECUTED
55e00: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55e02: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
55e08: 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);
55e0c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
55e0e: 6f16 bles 55e26 <rtems_rfs_block_map_indirect_alloc+0x62><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
55e10: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
55e14: 42a7 clrl %sp@- <== NOT EXECUTED
55e16: 2f0c movel %a4,%sp@- <== NOT EXECUTED
55e18: 4eb9 0004 e902 jsr 4e902 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
55e1e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55e22: 6000 00bc braw 55ee0 <rtems_rfs_block_map_indirect_alloc+0x11c><== NOT EXECUTED
return rc;
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
55e26: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
55e2a: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
55e2e: 206a 0006 moveal %a2@(6),%a0 <== NOT EXECUTED
55e32: 2f28 001a movel %a0@(26),%sp@- <== NOT EXECUTED
55e36: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
if (upping)
55e3c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
55e40: 4a03 tstb %d3 <== NOT EXECUTED
55e42: 6700 0088 beqw 55ecc <rtems_rfs_block_map_indirect_alloc+0x108><== NOT EXECUTED
{
int b;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW))
55e46: 4878 2000 pea 2000 <D_MAX_EXP+0x1801> <== NOT EXECUTED
55e4a: 42a7 clrl %sp@- <== NOT EXECUTED
55e4c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
55e52: 508f addql #8,%sp <== NOT EXECUTED
55e54: 4a00 tstb %d0 <== NOT EXECUTED
55e56: 6712 beqs 55e6a <rtems_rfs_block_map_indirect_alloc+0xa6><== NOT EXECUTED
printf ("rtems-rfs: block-map-grow: upping: block-count=%" PRId32 "\n",
55e58: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
55e5c: 4879 0006 e017 pea 6e017 <CSWTCH.2+0x3> <== NOT EXECUTED
55e62: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
55e68: 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,
55e6a: 41eb 0022 lea %a3@(34),%a0 <== NOT EXECUTED
55e6e: 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]);
55e70: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
55e74: 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,
55e78: 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]);
55e7a: 568c addql #3,%a4 <== NOT EXECUTED
55e7c: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55e80: 1390 0800 moveb %a0@,%a1@(00000000,%d0:l) <== NOT EXECUTED
55e84: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
55e88: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55e8c: 1395 0801 moveb %a5@,%a1@(00000001,%d0:l) <== NOT EXECUTED
55e90: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
55e94: 2218 movel %a0@+,%d1 <== NOT EXECUTED
55e96: e089 lsrl #8,%d1 <== NOT EXECUTED
55e98: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55e9c: 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++)
55ea0: 7214 moveq #20,%d1 <== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
55ea2: 226a 0006 moveal %a2@(6),%a1 <== NOT EXECUTED
55ea6: 2269 001a moveal %a1@(26),%a1 <== NOT EXECUTED
55eaa: 1394 0803 moveb %a4@,%a1@(00000003,%d0:l) <== NOT EXECUTED
55eae: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
55eb2: 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++)
55eb4: b280 cmpl %d0,%d1 <== NOT EXECUTED
55eb6: 66b8 bnes 55e70 <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));
55eb8: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
55ebc: 42a7 clrl %sp@- <== NOT EXECUTED
55ebe: 486b 0022 pea %a3@(34) <== NOT EXECUTED
55ec2: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
55ec8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
55ecc: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
map->last_map_block = new_block;
return 0;
55ed0: 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;
55ed2: 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);
55ed6: 14bc 0001 moveb #1,%a2@ <== NOT EXECUTED
*block = new_block;
55eda: 2080 movel %d0,%a0@ <== NOT EXECUTED
map->last_map_block = new_block;
55edc: 2740 001a movel %d0,%a3@(26) <== NOT EXECUTED
return 0;
}
55ee0: 2002 movel %d2,%d0 <== NOT EXECUTED
55ee2: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5 <== NOT EXECUTED
55ee8: 4e5e unlk %fp <== NOT EXECUTED
00055fa2 <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,
55fa2: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
55fa6: 202e 0014 movel %fp@(20),%d0 <== NOT EXECUTED
55faa: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
55fae: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
55fb2: 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) ||
55fb6: 670a beqs 55fc2 <rtems_rfs_block_map_indirect_shrink.isra.7+0x20><== NOT EXECUTED
55fb8: 4a80 tstl %d0 <== NOT EXECUTED
55fba: 6678 bnes 56034 <rtems_rfs_block_map_indirect_shrink.isra.7+0x92><== NOT EXECUTED
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
55fbc: 7405 moveq #5,%d2 <== NOT EXECUTED
55fbe: b481 cmpl %d1,%d2 <== NOT EXECUTED
55fc0: 6672 bnes 56034 <rtems_rfs_block_map_indirect_shrink.isra.7+0x92><== NOT EXECUTED
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
55fc2: 2632 0c22 movel %a2@(00000022,%d0:l:4),%d3 <== NOT EXECUTED
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
55fc6: 4a80 tstl %d0 <== NOT EXECUTED
55fc8: 664a bnes 56014 <rtems_rfs_block_map_indirect_shrink.isra.7+0x72><== NOT EXECUTED
55fca: 7805 moveq #5,%d4 <== NOT EXECUTED
55fcc: b881 cmpl %d1,%d4 <== NOT EXECUTED
55fce: 6644 bnes 56014 <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);
55fd0: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
55fd4: 2050 moveal %a0@,%a0 <== NOT EXECUTED
55fd6: 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,
55fda: 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);
55fde: 4282 clrl %d2 <== NOT EXECUTED
55fe0: 1431 0800 moveb %a1@(00000000,%d0:l),%d2 <== NOT EXECUTED
55fe4: 4281 clrl %d1 <== NOT EXECUTED
55fe6: 7818 moveq #24,%d4 <== NOT EXECUTED
55fe8: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
55fec: e9aa lsll %d4,%d2 <== NOT EXECUTED
55fee: 8282 orl %d2,%d1 <== NOT EXECUTED
55ff0: 4282 clrl %d2 <== NOT EXECUTED
55ff2: 1410 moveb %a0@,%d2 <== NOT EXECUTED
55ff4: 4842 swap %d2 <== NOT EXECUTED
55ff6: 4242 clrw %d2 <== NOT EXECUTED
55ff8: 8282 orl %d2,%d1 <== NOT EXECUTED
55ffa: 4282 clrl %d2 <== NOT EXECUTED
55ffc: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
56000: 5888 addql #4,%a0 <== NOT EXECUTED
56002: e18a lsll #8,%d2 <== NOT EXECUTED
56004: 8282 orl %d2,%d1 <== NOT EXECUTED
56006: 2581 0822 movel %d1,%a2@(00000022,%d0:l) <== NOT EXECUTED
5600a: 5880 addql #4,%d0 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
5600c: 7214 moveq #20,%d1 <== NOT EXECUTED
5600e: b280 cmpl %d0,%d1 <== NOT EXECUTED
56010: 66cc bnes 55fde <rtems_rfs_block_map_indirect_shrink.isra.7+0x3c><== NOT EXECUTED
56012: 6004 bras 56018 <rtems_rfs_block_map_indirect_shrink.isra.7+0x76><== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
56014: 42b2 0c22 clrl %a2@(00000022,%d0:l:4) <== NOT EXECUTED
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
56018: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5601a: 42a7 clrl %sp@- <== NOT EXECUTED
5601c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
56020: 4eb9 0004 e902 jsr 4e902 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
56026: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5602a: 4a80 tstl %d0 <== NOT EXECUTED
5602c: 6e08 bgts 56036 <rtems_rfs_block_map_indirect_shrink.isra.7+0x94><== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
5602e: 2543 001a movel %d3,%a2@(26) <== NOT EXECUTED
56032: 6002 bras 56036 <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;
56034: 4280 clrl %d0 <== NOT EXECUTED
map->last_map_block = block_to_free;
}
return rc;
}
56036: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
5603c: 4e5e unlk %fp <== NOT EXECUTED
00056614 <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)
{
56614: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
56618: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
5661c: 2028 000e movel %a0@(14),%d0 <== NOT EXECUTED
56620: 5280 addql #1,%d0 <== NOT EXECUTED
bpos.boff = 0;
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
56622: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
56626: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
5662a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5662c: 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;
56630: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED
bpos.boff = 0;
56634: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
bpos.block = 0;
56638: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
return rtems_rfs_block_map_find (fs, map, &bpos, block);
5663c: 4eb9 0005 64aa jsr 564aa <rtems_rfs_block_map_find> <== NOT EXECUTED
}
56642: 4e5e unlk %fp <== NOT EXECUTED
00056168 <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)
{
56168: 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;
5616c: 4200 clrb %d0
5616e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
56172: 246e 0010 moveal %fp@(16),%a2
56176: 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;
5617a: 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)
{
5617e: 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;
56182: 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;
56186: 4212 clrb %a2@
size->offset = 0;
56188: 42aa 000a clrl %a2@(10)
5618c: 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;
56190: 42aa 000e clrl %a2@(14)
56194: 1540 0040 moveb %d0,%a2@(64)
bpos->boff = 0;
56198: 42aa 0012 clrl %a2@(18)
bpos->block = 0;
5619c: 42aa 0016 clrl %a2@(22)
handle->bnum = 0;
561a0: 42aa 0038 clrl %a2@(56)
handle->buffer = NULL;
561a4: 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;
561a8: 42aa 0042 clrl %a2@(66)
handle->buffer = NULL;
561ac: 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);
561b0: 2f0b movel %a3,%sp@-
561b2: 2f02 movel %d2,%sp@-
561b4: 4eb9 0004 eb08 jsr 4eb08 <rtems_rfs_inode_load>
if (rc > 0)
561ba: 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);
561bc: 2600 movel %d0,%d3
if (rc > 0)
561be: 6e00 00e8 bgtw 562a8 <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);
}
561c2: 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++)
561c6: 4281 clrl %d1
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
561c8: 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]);
561cc: 4280 clrl %d0
561ce: 7618 moveq #24,%d3
561d0: 43f0 1c1c lea %a0@(0000001c,%d1:l:4),%a1
561d4: 1011 moveb %a1@,%d0
561d6: e7a8 lsll %d3,%d0
561d8: 4283 clrl %d3
561da: 1629 0001 moveb %a1@(1),%d3
561de: 4843 swap %d3
561e0: 4243 clrw %d3
561e2: 8083 orl %d3,%d0
561e4: 4283 clrl %d3
561e6: 1629 0003 moveb %a1@(3),%d3
561ea: 8083 orl %d3,%d0
561ec: 1629 0002 moveb %a1@(2),%d3
561f0: e18b lsll #8,%d3
561f2: 8083 orl %d3,%d0
561f4: 2580 1c22 movel %d0,%a2@(00000022,%d1:l:4)
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
561f8: 5281 addql #1,%d1
561fa: 7005 moveq #5,%d0
561fc: b081 cmpl %d1,%d0
561fe: 66cc bnes 561cc <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);
56200: 4280 clrl %d0
56202: 1028 000c moveb %a0@(12),%d0
56206: 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);
56208: 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);
5620a: e3a8 lsll %d1,%d0
5620c: 4281 clrl %d1
5620e: 1228 000d moveb %a0@(13),%d1
56212: 4841 swap %d1
56214: 4241 clrw %d1
56216: 8081 orl %d1,%d0
56218: 4281 clrl %d1
5621a: 1228 000f moveb %a0@(15),%d1
5621e: 8081 orl %d1,%d0
56220: 1228 000e moveb %a0@(14),%d1
56224: e189 lsll #8,%d1
56226: 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);
56228: 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);
5622a: 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);
5622e: 4280 clrl %d0
56230: 1028 000a moveb %a0@(10),%d0
56234: 1228 000b moveb %a0@(11),%d1
56238: 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);
5623a: 8081 orl %d1,%d0
5623c: 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);
56240: 4280 clrl %d0
56242: 1028 0030 moveb %a0@(48),%d0
56246: 1228 0031 moveb %a0@(49),%d1
5624a: e7a8 lsll %d3,%d0
5624c: 4841 swap %d1
5624e: 4241 clrw %d1
56250: 8081 orl %d1,%d0
56252: 4281 clrl %d1
56254: 1228 0033 moveb %a0@(51),%d1
56258: 8081 orl %d1,%d0
5625a: 1228 0032 moveb %a0@(50),%d1
5625e: e189 lsll #8,%d1
56260: 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);
56262: 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);
56264: 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);
56268: 4280 clrl %d0
5626a: 1028 0034 moveb %a0@(52),%d0
5626e: 1228 0035 moveb %a0@(53),%d1
56272: e7a8 lsll %d3,%d0
56274: 4841 swap %d1
56276: 4241 clrw %d1
56278: 8081 orl %d1,%d0
5627a: 4281 clrl %d1
5627c: 1228 0037 moveb %a0@(55),%d1
56280: 8081 orl %d1,%d0
56282: 1228 0036 moveb %a0@(54),%d1
56286: e189 lsll #8,%d1
56288: 8081 orl %d1,%d0
5628a: 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);
5628e: 2d4b 000c movel %a3,%fp@(12)
56292: 2d42 0008 movel %d2,%fp@(8)
return rc;
}
56296: 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);
5629c: 42ae 0010 clrl %fp@(16)
return rc;
}
562a0: 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);
562a2: 4ef9 0004 ec5e jmp 4ec5e <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);
562a8: 486a 0036 pea %a2@(54) <== NOT EXECUTED
562ac: 47f9 0005 6d08 lea 56d08 <rtems_rfs_buffer_handle_release>,%a3<== NOT EXECUTED
562b2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
562b4: 4e93 jsr %a3@ <== NOT EXECUTED
handle->dirty = false;
562b6: 4201 clrb %d1 <== NOT EXECUTED
562b8: 1541 0036 moveb %d1,%a2@(54) <== NOT EXECUTED
handle->bnum = 0;
562bc: 42aa 0038 clrl %a2@(56) <== NOT EXECUTED
handle->buffer = NULL;
562c0: 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);
562c4: 486a 0040 pea %a2@(64) <== NOT EXECUTED
562c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
562ca: 4e93 jsr %a3@ <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
562cc: 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;
562d0: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
562d2: 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;
562d6: 1540 0040 moveb %d0,%a2@(64) <== NOT EXECUTED
return rc;
}
562da: 2003 movel %d3,%d0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
562dc: 42aa 0046 clrl %a2@(70) <== NOT EXECUTED
562e0: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
562e6: 4e5e unlk %fp <== NOT EXECUTED
00056596 <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)
{
56596: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
5659a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED
5659e: 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);
565a2: 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;
565a4: 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)
{
565a6: 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;
565aa: 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);
}
565ae: 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;
565b2: 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);
565b6: 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;
565b8: d0aa 0012 addl %a2@(18),%d0 <== NOT EXECUTED
565bc: 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);
565be: 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,
565c0: 202e 0010 movel %fp@(16),%d0 <== NOT EXECUTED
565c4: d6ae 0014 addl %fp@(20),%d3 <== NOT EXECUTED
565c8: d580 addxl %d0,%d2 <== NOT EXECUTED
565ca: 2f04 movel %d4,%sp@- <== NOT EXECUTED
565cc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
565ce: 2f02 movel %d2,%sp@- <== NOT EXECUTED
565d0: 4eb9 0006 98ec jsr 698ec <__udivdi3> <== NOT EXECUTED
565d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
565da: 2f05 movel %d5,%sp@- <== NOT EXECUTED
565dc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
565de: 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);
565e0: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
565e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
565e6: 4eb9 0006 9cf0 jsr 69cf0 <__umoddi3> <== NOT EXECUTED
565ec: 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);
565f0: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
565f4: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
565f8: 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);
565fa: 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);
565fe: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
56600: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
56604: 4eb9 0005 64aa jsr 564aa <rtems_rfs_block_map_find> <== NOT EXECUTED
}
5660a: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 <== NOT EXECUTED
56610: 4e5e unlk %fp <== NOT EXECUTED
0005691a <rtems_rfs_block_map_shrink>:
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
5691a: 4e56 ffc4 linkw %fp,#-60 <== NOT EXECUTED
5691e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
56922: 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)
{
56926: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
5692a: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
5692c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
56930: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK))
56934: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5693a: 508f addql #8,%sp <== NOT EXECUTED
5693c: 4a00 tstb %d0 <== NOT EXECUTED
5693e: 6716 beqs 56956 <rtems_rfs_block_map_shrink+0x3c><== NOT EXECUTED
printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n",
56940: 2f2a 0006 movel %a2@(6),%sp@- <== NOT EXECUTED
56944: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56946: 4879 0006 e0ce pea 6e0ce <CSWTCH.2+0xba> <== NOT EXECUTED
5694c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56952: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
blocks, map->size.count);
if (map->size.count == 0)
56956: 202a 0006 movel %a2@(6),%d0 <== NOT EXECUTED
5695a: 6604 bnes 56960 <rtems_rfs_block_map_shrink+0x46><== NOT EXECUTED
5695c: 6000 0222 braw 56b80 <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
56960: b083 cmpl %d3,%d0 <== NOT EXECUTED
56962: 6400 01a2 bccw 56b06 <rtems_rfs_block_map_shrink+0x1ec><== NOT EXECUTED
56966: 2600 movel %d0,%d3 <== NOT EXECUTED
56968: 6000 019c braw 56b06 <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;
5696c: 202a 0006 movel %a2@(6),%d0 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
56970: 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;
56972: 5380 subql #1,%d0 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
56974: b280 cmpl %d0,%d1 <== NOT EXECUTED
56976: 650c bcss 56984 <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];
56978: 2432 0c22 movel %a2@(00000022,%d0:l:4),%d2 <== NOT EXECUTED
map->blocks[block] = 0;
5697c: 42b2 0c22 clrl %a2@(00000022,%d0:l:4) <== NOT EXECUTED
56980: 6000 015e braw 56ae0 <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;
56984: 222b 0034 movel %a3@(52),%d1 <== NOT EXECUTED
56988: 2c00 movel %d0,%d6 <== NOT EXECUTED
5698a: 4c41 6004 remul %d1,%d4,%d6 <== NOT EXECUTED
5698e: 4c41 6006 remul %d1,%d6,%d6 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
if (block < fs->block_map_singly_blocks)
56992: b0ab 0038 cmpl %a3@(56),%d0 <== NOT EXECUTED
56996: 645e bccs 569f6 <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,
56998: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5699c: 2f32 6c22 movel %a2@(00000022,%d6:l:4),%sp@- <== NOT EXECUTED
569a0: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
569a4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
569a6: 4e94 jsr %a4@ <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
569a8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
569ac: 4a80 tstl %d0 <== NOT EXECUTED
569ae: 6e00 01d2 bgtw 56b82 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
569b2: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED
569b6: 2004 movel %d4,%d0 <== NOT EXECUTED
569b8: 4281 clrl %d1 <== NOT EXECUTED
569ba: 4282 clrl %d2 <== NOT EXECUTED
569bc: 7a18 moveq #24,%d5 <== NOT EXECUTED
569be: e588 lsll #2,%d0 <== NOT EXECUTED
569c0: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
569c4: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 <== NOT EXECUTED
569c8: 1430 0803 moveb %a0@(00000003,%d0:l),%d2 <== NOT EXECUTED
569cc: eba9 lsll %d5,%d1 <== NOT EXECUTED
569ce: 8481 orl %d1,%d2 <== NOT EXECUTED
569d0: 4281 clrl %d1 <== NOT EXECUTED
569d2: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
569d6: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
569da: 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,
569dc: 4841 swap %d1 <== NOT EXECUTED
569de: 4241 clrw %d1 <== NOT EXECUTED
569e0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
569e6: 2f06 movel %d6,%sp@- <== NOT EXECUTED
569e8: 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,
569ec: 8481 orl %d1,%d2 <== NOT EXECUTED
569ee: e188 lsll #8,%d0 <== NOT EXECUTED
569f0: 8480 orl %d0,%d2 <== NOT EXECUTED
569f2: 6000 00da braw 56ace <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)
569f6: b0ab 003c cmpl %a3@(60),%d0 <== NOT EXECUTED
569fa: 6400 013c bccw 56b38 <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,
569fe: 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;
56a02: 4c41 6007 remul %d1,%d7,%d6 <== NOT EXECUTED
56a06: 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,
56a0a: 2f32 6c22 movel %a2@(00000022,%d6:l:4),%sp@- <== NOT EXECUTED
56a0e: 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;
56a12: 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,
56a16: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56a18: 4e94 jsr %a4@ <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
56a1a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56a1e: 4a80 tstl %d0 <== NOT EXECUTED
56a20: 6e00 0160 bgtw 56b82 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
singly = rtems_rfs_block_get_number (&map->doubly_buffer,
56a24: 206a 0046 moveal %a2@(70),%a0 <== NOT EXECUTED
56a28: 2007 movel %d7,%d0 <== NOT EXECUTED
56a2a: 4282 clrl %d2 <== NOT EXECUTED
56a2c: 4285 clrl %d5 <== NOT EXECUTED
56a2e: 7c18 moveq #24,%d6 <== NOT EXECUTED
56a30: e588 lsll #2,%d0 <== NOT EXECUTED
56a32: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
56a36: 1430 0800 moveb %a0@(00000000,%d0:l),%d2 <== NOT EXECUTED
56a3a: 1a30 0803 moveb %a0@(00000003,%d0:l),%d5 <== NOT EXECUTED
56a3e: edaa lsll %d6,%d2 <== NOT EXECUTED
56a40: 8a82 orl %d2,%d5 <== NOT EXECUTED
56a42: 4282 clrl %d2 <== NOT EXECUTED
56a44: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED
56a48: 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,
56a4c: 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,
56a50: 4842 swap %d2 <== NOT EXECUTED
56a52: 4242 clrw %d2 <== NOT EXECUTED
56a54: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56a5a: 8a82 orl %d2,%d5 <== NOT EXECUTED
56a5c: e188 lsll #8,%d0 <== NOT EXECUTED
56a5e: 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,
56a60: 2f05 movel %d5,%sp@- <== NOT EXECUTED
56a62: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
56a66: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56a68: 4e94 jsr %a4@ <== NOT EXECUTED
singly, true);
if (rc > 0)
56a6a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
56a6e: 4a80 tstl %d0 <== NOT EXECUTED
56a70: 6e00 0110 bgtw 56b82 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
56a74: 206a 003c moveal %a2@(60),%a0 <== NOT EXECUTED
56a78: 2004 movel %d4,%d0 <== NOT EXECUTED
56a7a: 4281 clrl %d1 <== NOT EXECUTED
56a7c: 4282 clrl %d2 <== NOT EXECUTED
56a7e: e588 lsll #2,%d0 <== NOT EXECUTED
56a80: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
56a84: 1230 0800 moveb %a0@(00000000,%d0:l),%d1 <== NOT EXECUTED
56a88: 1430 0803 moveb %a0@(00000003,%d0:l),%d2 <== NOT EXECUTED
56a8c: eda9 lsll %d6,%d1 <== NOT EXECUTED
56a8e: 8481 orl %d1,%d2 <== NOT EXECUTED
56a90: 4281 clrl %d1 <== NOT EXECUTED
56a92: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
56a96: 1030 0802 moveb %a0@(00000002,%d0:l),%d0 <== NOT EXECUTED
56a9a: 4841 swap %d1 <== NOT EXECUTED
56a9c: 4241 clrw %d1 <== NOT EXECUTED
56a9e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
56aa4: 8481 orl %d1,%d2 <== NOT EXECUTED
56aa6: e188 lsll #8,%d0 <== NOT EXECUTED
56aa8: 8480 orl %d0,%d2 <== NOT EXECUTED
direct);
if (direct == 0)
56aaa: 4a84 tstl %d4 <== NOT EXECUTED
56aac: 6632 bnes 56ae0 <rtems_rfs_block_map_shrink+0x1c6><== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
56aae: 2f05 movel %d5,%sp@- <== NOT EXECUTED
56ab0: 42a7 clrl %sp@- <== NOT EXECUTED
56ab2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56ab4: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc > 0)
56ab6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56aba: 4a80 tstl %d0 <== NOT EXECUTED
56abc: 6e00 00c4 bgtw 56b82 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
map->last_map_block = singly;
56ac0: 2545 001a movel %d5,%a2@(26) <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
56ac4: 2f07 movel %d7,%sp@- <== NOT EXECUTED
56ac6: 2f2e ffec movel %fp@(-20),%sp@- <== NOT EXECUTED
56aca: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
56ace: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56ad0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56ad2: 4eba f4ce jsr %pc@(55fa2 <rtems_rfs_block_map_indirect_shrink.isra.7>)<== NOT EXECUTED
doubly, doubly_singly);
if (rc)
56ad6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
56ada: 4a80 tstl %d0 <== NOT EXECUTED
56adc: 6600 00a4 bnew 56b82 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
56ae0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56ae2: 42a7 clrl %sp@- <== NOT EXECUTED
56ae4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
56ae6: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc > 0)
56ae8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56aec: 4a80 tstl %d0 <== NOT EXECUTED
56aee: 6e00 0092 bgtw 56b82 <rtems_rfs_block_map_shrink+0x268><== NOT EXECUTED
return rc;
map->size.count--;
56af2: 53aa 0006 subql #1,%a2@(6) <== NOT EXECUTED
map->size.offset = 0;
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
56af6: 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;
56af8: 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;
56afc: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
map->last_data_block = block_to_free;
56b00: 2542 001e movel %d2,%a2@(30) <== NOT EXECUTED
56b04: 602c bras 56b32 <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,
56b06: 41ea 0040 lea %a2@(64),%a0 <== NOT EXECUTED
56b0a: 49f9 0005 6e84 lea 56e84 <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);
56b10: 4bf9 0004 e902 lea 4e902 <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,
56b16: 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,
56b1a: 41ea 0036 lea %a2@(54),%a0 <== NOT EXECUTED
56b1e: 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);
}
56b22: 41ea 0046 lea %a2@(70),%a0 <== NOT EXECUTED
56b26: 2d48 fff4 movel %a0,%fp@(-12) <== NOT EXECUTED
56b2a: 41ea 003c lea %a2@(60),%a0 <== NOT EXECUTED
56b2e: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
56b32: 4a83 tstl %d3 <== NOT EXECUTED
56b34: 6600 fe36 bnew 5696c <rtems_rfs_block_map_shrink+0x52><== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
56b38: 202a 0006 movel %a2@(6),%d0 <== NOT EXECUTED
56b3c: 6608 bnes 56b46 <rtems_rfs_block_map_shrink+0x22c><== NOT EXECUTED
{
map->last_map_block = 0;
56b3e: 42aa 001a clrl %a2@(26) <== NOT EXECUTED
map->last_data_block = 0;
56b42: 42aa 001e clrl %a2@(30) <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
56b46: 222a 000e movel %a2@(14),%d1 <== NOT EXECUTED
56b4a: 6704 beqs 56b50 <rtems_rfs_block_map_shrink+0x236><== NOT EXECUTED
56b4c: 4a80 tstl %d0 <== NOT EXECUTED
56b4e: 6716 beqs 56b66 <rtems_rfs_block_map_shrink+0x24c><== NOT EXECUTED
56b50: b081 cmpl %d1,%d0 <== NOT EXECUTED
56b52: 6312 blss 56b66 <rtems_rfs_block_map_shrink+0x24c><== NOT EXECUTED
56b54: 2040 moveal %d0,%a0 <== NOT EXECUTED
56b56: 5388 subql #1,%a0 <== NOT EXECUTED
56b58: b1c1 cmpal %d1,%a0 <== NOT EXECUTED
56b5a: 6624 bnes 56b80 <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
56b5c: 222a 000a movel %a2@(10),%d1 <== NOT EXECUTED
56b60: b2aa 0012 cmpl %a2@(18),%d1 <== NOT EXECUTED
56b64: 641a bccs 56b80 <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
56b66: 222a 000a movel %a2@(10),%d1 <== NOT EXECUTED
56b6a: 2540 000e movel %d0,%a2@(14) <== NOT EXECUTED
56b6e: 2541 0012 movel %d1,%a2@(18) <== NOT EXECUTED
56b72: 42aa 0016 clrl %a2@(22) <== NOT EXECUTED
56b76: 4a81 tstl %d1 <== NOT EXECUTED
56b78: 6706 beqs 56b80 <rtems_rfs_block_map_shrink+0x266><== NOT EXECUTED
56b7a: 5380 subql #1,%d0 <== NOT EXECUTED
56b7c: 2540 000e movel %d0,%a2@(14) <== NOT EXECUTED
return 0;
56b80: 4280 clrl %d0 <== NOT EXECUTED
}
56b82: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 <== NOT EXECUTED
56b88: 4e5e unlk %fp <== NOT EXECUTED
0005b9b6 <rtems_rfs_buffer_bdbuf_release>:
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
5b9b6: 4e56 0000 linkw %fp,#0
5b9ba: 2f0a movel %a2,%sp@-
5b9bc: 246e 0008 moveal %fp@(8),%a2
5b9c0: 2f02 movel %d2,%sp@-
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5b9c2: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
5b9c6: 142e 000f moveb %fp@(15),%d2
rtems_status_code sc;
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5b9ca: 42a7 clrl %sp@-
5b9cc: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
5b9d2: 508f addql #8,%sp
5b9d4: 4a00 tstb %d0
5b9d6: 672c beqs 5ba04 <rtems_rfs_buffer_bdbuf_release+0x4e><== ALWAYS TAKEN
printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n",
5b9d8: 4a02 tstb %d2 <== NOT EXECUTED
5b9da: 6708 beqs 5b9e4 <rtems_rfs_buffer_bdbuf_release+0x2e><== NOT EXECUTED
5b9dc: 203c 0006 f5ba movel #456122,%d0 <== NOT EXECUTED
5b9e2: 6006 bras 5b9ea <rtems_rfs_buffer_bdbuf_release+0x34><== NOT EXECUTED
5b9e4: 203c 0006 cb0e movel #445198,%d0 <== NOT EXECUTED
5b9ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5b9ec: 2f2a 0016 movel %a2@(22),%sp@- <== NOT EXECUTED
5b9f0: 2f2a 0032 movel %a2@(50),%sp@- <== NOT EXECUTED
5b9f4: 4879 0006 f5c5 pea 6f5c5 <rtems_rfs_rtems_file_handlers+0x37><== NOT EXECUTED
5b9fa: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5ba00: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
((intptr_t) buffer->user),
buffer->block, modified ? "(modified)" : "");
if (modified)
5ba04: 4a02 tstb %d2
5ba06: 670a beqs 5ba12 <rtems_rfs_buffer_bdbuf_release+0x5c>
sc = rtems_bdbuf_release_modified (buffer);
5ba08: 2f0a movel %a2,%sp@-
5ba0a: 4eb9 0005 225a jsr 5225a <rtems_bdbuf_release_modified>
5ba10: 6008 bras 5ba1a <rtems_rfs_buffer_bdbuf_release+0x64>
else
sc = rtems_bdbuf_release (buffer);
5ba12: 2f0a movel %a2,%sp@-
5ba14: 4eb9 0005 21b8 jsr 521b8 <rtems_bdbuf_release>
5ba1a: 588f addql #4,%sp
if (sc != RTEMS_SUCCESSFUL)
5ba1c: 4a80 tstl %d0
5ba1e: 6702 beqs 5ba22 <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;
5ba20: 7005 moveq #5,%d0 <== NOT EXECUTED
}
return rc;
}
5ba22: 242e fff8 movel %fp@(-8),%d2
5ba26: 246e fffc moveal %fp@(-4),%a2
5ba2a: 4e5e unlk %fp
...
0005b974 <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)
{
5b974: 4e56 0000 linkw %fp,#0
5b978: 206e 0008 moveal %fp@(8),%a0
5b97c: 202e 000c movel %fp@(12),%d0
5b980: 222e 0014 movel %fp@(20),%d1
rtems_status_code sc;
int rc = 0;
if (read)
5b984: 4a2e 0013 tstb %fp@(19)
5b988: 6710 beqs 5b99a <rtems_rfs_buffer_bdbuf_request+0x26>
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
5b98a: 2f01 movel %d1,%sp@-
5b98c: 2f00 movel %d0,%sp@-
5b98e: 2f28 0010 movel %a0@(16),%sp@-
5b992: 4eb9 0005 202c jsr 5202c <rtems_bdbuf_read>
5b998: 600e bras 5b9a8 <rtems_rfs_buffer_bdbuf_request+0x34>
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
5b99a: 2f01 movel %d1,%sp@-
5b99c: 2f00 movel %d0,%sp@-
5b99e: 2f28 0010 movel %a0@(16),%sp@-
5b9a2: 4eb9 0005 1f6e jsr 51f6e <rtems_bdbuf_get>
5b9a8: 4fef 000c lea %sp@(12),%sp
if (sc != RTEMS_SUCCESSFUL)
5b9ac: 4a80 tstl %d0
5b9ae: 6702 beqs 5b9b2 <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;
5b9b0: 7005 moveq #5,%d0 <== NOT EXECUTED
}
return rc;
}
5b9b2: 4e5e unlk %fp <== NOT EXECUTED
000573e4 <rtems_rfs_buffer_close>:
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
573e4: 4e56 0000 linkw %fp,#0
573e8: 2f0a movel %a2,%sp@-
573ea: 246e 0008 moveal %fp@(8),%a2
573ee: 2f02 movel %d2,%sp@-
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
573f0: 4878 0010 pea 10 <INVALID_OPERATION>
573f4: 42a7 clrl %sp@-
573f6: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
573fc: 508f addql #8,%sp
573fe: 4a00 tstb %d0
57400: 670e beqs 57410 <rtems_rfs_buffer_close+0x2c> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-close: closing\n");
57402: 4879 0006 e552 pea 6e552 <CSWTCH.2+0x53e> <== NOT EXECUTED
57408: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
5740e: 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));
57410: 206a 0010 moveal %a2@(16),%a0
57414: 2f28 0020 movel %a0@(32),%sp@-
57418: 2f0a movel %a2,%sp@-
5741a: 4eb9 0005 7308 jsr 57308 <rtems_rfs_buffer_setblksize>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
57420: 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));
57422: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
57424: 6f2e bles 57454 <rtems_rfs_buffer_close+0x70> <== ALWAYS TAKEN
57426: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
5742a: 42a7 clrl %sp@- <== NOT EXECUTED
5742c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57432: 508f addql #8,%sp <== NOT EXECUTED
57434: 4a00 tstb %d0 <== NOT EXECUTED
57436: 671c beqs 57454 <rtems_rfs_buffer_close+0x70> <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n",
57438: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5743a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57440: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57442: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57444: 4879 0006 e573 pea 6e573 <CSWTCH.2+0x55f> <== NOT EXECUTED
5744a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57450: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
if (close (fs->device) < 0)
57454: 2f2a 000c movel %a2@(12),%sp@-
57458: 4eb9 0004 60d4 jsr 460d4 <close>
5745e: 588f addql #4,%sp
57460: 4a80 tstl %d0
57462: 6c38 bges 5749c <rtems_rfs_buffer_close+0xb8> <== ALWAYS TAKEN
{
rc = errno;
57464: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5746a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5746c: 2410 movel %a0@,%d2 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE))
5746e: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
57472: 42a7 clrl %sp@- <== NOT EXECUTED
57474: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5747a: 508f addql #8,%sp <== NOT EXECUTED
5747c: 4a00 tstb %d0 <== NOT EXECUTED
5747e: 671c beqs 5749c <rtems_rfs_buffer_close+0xb8> <== NOT EXECUTED
printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n",
57480: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57482: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57488: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5748a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5748c: 4879 0006 e5b1 pea 6e5b1 <CSWTCH.2+0x59d> <== NOT EXECUTED
57492: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57498: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
}
return rc;
}
5749c: 2002 movel %d2,%d0
5749e: 242e fff8 movel %fp@(-8),%d2
574a2: 246e fffc moveal %fp@(-4),%a2
574a6: 4e5e unlk %fp
...
00056d08 <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
56d08: 4e56 fff4 linkw %fp,#-12
56d0c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
56d10: 246e 0008 moveal %fp@(8),%a2
56d14: 266e 000c moveal %fp@(12),%a3
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
56d18: 4aab 0006 tstl %a3@(6)
56d1c: 6700 0158 beqw 56e76 <rtems_rfs_buffer_handle_release+0x16e>
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE))
56d20: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
56d24: 42a7 clrl %sp@-
56d26: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56d2c: 508f addql #8,%sp
56d2e: 4a00 tstb %d0
56d30: 6744 beqs 56d76 <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" : "");
56d32: 206b 0006 moveal %a3@(6),%a0 <== NOT EXECUTED
56d36: 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",
56d3a: 6608 bnes 56d44 <rtems_rfs_buffer_handle_release+0x3c><== NOT EXECUTED
56d3c: 41f9 0006 e180 lea 6e180 <CSWTCH.2+0x16c>,%a0 <== NOT EXECUTED
56d42: 6006 bras 56d4a <rtems_rfs_buffer_handle_release+0x42><== NOT EXECUTED
56d44: 41f9 0006 cb0e lea 6cb0e <rtems_termios_baud_table+0x10a>,%a0<== NOT EXECUTED
56d4a: 4a13 tstb %a3@ <== NOT EXECUTED
56d4c: 6708 beqs 56d56 <rtems_rfs_buffer_handle_release+0x4e><== NOT EXECUTED
56d4e: 203c 0006 e18e movel #450958,%d0 <== NOT EXECUTED
56d54: 6006 bras 56d5c <rtems_rfs_buffer_handle_release+0x54><== NOT EXECUTED
56d56: 203c 0006 cb0e movel #445198,%d0 <== NOT EXECUTED
56d5c: 2f08 movel %a0,%sp@- <== NOT EXECUTED
56d5e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
56d60: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56d62: 2f2b 0002 movel %a3@(2),%sp@- <== NOT EXECUTED
56d66: 4879 0006 e196 pea 6e196 <CSWTCH.2+0x182> <== NOT EXECUTED
56d6c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56d72: 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)
56d76: 206b 0006 moveal %a3@(6),%a0
56d7a: 2028 002e movel %a0@(46),%d0
56d7e: 6f06 bles 56d86 <rtems_rfs_buffer_handle_release+0x7e><== NEVER TAKEN
rtems_rfs_buffer_refs_down (handle);
56d80: 5380 subql #1,%d0
56d82: 2140 002e movel %d0,%a0@(46)
if (rtems_rfs_buffer_refs (handle) == 0)
56d86: 4aa8 002e tstl %a0@(46)
56d8a: 6600 00e2 bnew 56e6e <rtems_rfs_buffer_handle_release+0x166>
56d8e: 2f08 movel %a0,%sp@-
56d90: 4eb9 0005 45f4 jsr 545f4 <_Chain_Extract>
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
if (rtems_rfs_fs_no_local_cache (fs))
56d96: 588f addql #4,%sp
56d98: 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--;
56d9a: 53aa 0050 subql #1,%a2@(80)
if (rtems_rfs_fs_no_local_cache (fs))
56d9e: c092 andl %a2@,%d0
56da0: 671c beqs 56dbe <rtems_rfs_buffer_handle_release+0xb6><== NEVER TAKEN
{
handle->buffer->user = (void*) 0;
56da2: 206b 0006 moveal %a3@(6),%a0
rc = rtems_rfs_buffer_io_release (handle->buffer,
56da6: 4280 clrl %d0
56da8: 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;
56daa: 42a8 0032 clrl %a0@(50)
rc = rtems_rfs_buffer_io_release (handle->buffer,
56dae: 2f00 movel %d0,%sp@-
56db0: 2f08 movel %a0,%sp@-
56db2: 4eb9 0005 b9b6 jsr 5b9b6 <rtems_rfs_buffer_bdbuf_release>
56db8: 2400 movel %d0,%d2
56dba: 6000 00ae braw 56e6a <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 +
56dbe: 202a 0070 movel %a2@(112),%d0 <== NOT EXECUTED
56dc2: d0aa 0060 addl %a2@(96),%d0 <== NOT EXECUTED
56dc6: b0aa 0040 cmpl %a2@(64),%d0 <== NOT EXECUTED
56dca: 6572 bcss 56e3e <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))
56dcc: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> <== NOT EXECUTED
56dd0: 42a7 clrl %sp@- <== NOT EXECUTED
56dd2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
56dd8: 508f addql #8,%sp <== NOT EXECUTED
56dda: 4a00 tstb %d0 <== NOT EXECUTED
56ddc: 6718 beqs 56df6 <rtems_rfs_buffer_handle_release+0xee><== NOT EXECUTED
printf ("rtems-rfs: buffer-release: local cache overflow:"
56dde: 202a 0070 movel %a2@(112),%d0 <== NOT EXECUTED
56de2: d0aa 0060 addl %a2@(96),%d0 <== NOT EXECUTED
56de6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56de8: 4879 0006 e1ca pea 6e1ca <CSWTCH.2+0x1b6> <== NOT EXECUTED
56dee: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56df4: 508f addql #8,%sp <== NOT EXECUTED
" %" PRIu32 "\n", fs->release_count + fs->release_modified_count);
if (fs->release_count > fs->release_modified_count)
56df6: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED
56dfa: 41f9 0004 b048 lea 4b048 <_Chain_Get>,%a0 <== NOT EXECUTED
56e00: b4aa 0060 cmpl %a2@(96),%d2 <== NOT EXECUTED
56e04: 6410 bccs 56e16 <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 );
56e06: 486a 0054 pea %a2@(84) <== NOT EXECUTED
56e0a: 4e90 jsr %a0@ <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
56e0c: 588f addql #4,%sp <== NOT EXECUTED
56e0e: 53aa 0060 subql #1,%a2@(96) <== NOT EXECUTED
modified = false;
56e12: 4201 clrb %d1 <== NOT EXECUTED
56e14: 600e bras 56e24 <rtems_rfs_buffer_handle_release+0x11c><== NOT EXECUTED
56e16: 486a 0064 pea %a2@(100) <== NOT EXECUTED
56e1a: 4e90 jsr %a0@ <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
56e1c: 588f addql #4,%sp <== NOT EXECUTED
56e1e: 53aa 0070 subql #1,%a2@(112) <== NOT EXECUTED
modified = true;
56e22: 7201 moveq #1,%d1 <== NOT EXECUTED
}
buffer->user = (void*) 0;
56e24: 2040 moveal %d0,%a0 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
56e26: 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;
56e28: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
56e2c: c481 andl %d1,%d2 <== NOT EXECUTED
56e2e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56e30: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56e32: 4eb9 0005 b9b6 jsr 5b9b6 <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
56e38: 508f addql #8,%sp <== NOT EXECUTED
56e3a: 2400 movel %d0,%d2 <== NOT EXECUTED
56e3c: 6002 bras 56e40 <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;
56e3e: 4282 clrl %d2 <== NOT EXECUTED
}
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
}
if (rtems_rfs_buffer_dirty (handle))
56e40: 4a13 tstb %a3@ <== NOT EXECUTED
56e42: 6714 beqs 56e58 <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 );
56e44: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
56e48: 486a 0064 pea %a2@(100) <== NOT EXECUTED
56e4c: 4eb9 0004 b010 jsr 4b010 <_Chain_Append> <== NOT EXECUTED
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
56e52: 52aa 0070 addql #1,%a2@(112) <== NOT EXECUTED
56e56: 6012 bras 56e6a <rtems_rfs_buffer_handle_release+0x162><== NOT EXECUTED
56e58: 2f2b 0006 movel %a3@(6),%sp@- <== NOT EXECUTED
56e5c: 486a 0054 pea %a2@(84) <== NOT EXECUTED
56e60: 4eb9 0004 b010 jsr 4b010 <_Chain_Append> <== NOT EXECUTED
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
56e66: 52aa 0060 addql #1,%a2@(96) <== NOT EXECUTED
56e6a: 508f addql #8,%sp
56e6c: 6002 bras 56e70 <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;
56e6e: 4282 clrl %d2 <== NOT EXECUTED
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
}
}
}
handle->buffer = NULL;
56e70: 42ab 0006 clrl %a3@(6)
56e74: 6002 bras 56e78 <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;
56e76: 4282 clrl %d2
}
handle->buffer = NULL;
}
return rc;
}
56e78: 2002 movel %d2,%d0
56e7a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
56e80: 4e5e unlk %fp <== NOT EXECUTED
00056e84 <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)
{
56e84: 4e56 ffec linkw %fp,#-20
56e88: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
56e8c: 266e 0008 moveal %fp@(8),%a3
56e90: 246e 000c moveal %fp@(12),%a2
56e94: 242e 0010 movel %fp@(16),%d2
56e98: 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))
56e9c: 4aaa 0006 tstl %a2@(6)
56ea0: 674a beqs 56eec <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))
56ea2: 4a82 tstl %d2
56ea4: 670a beqs 56eb0 <rtems_rfs_buffer_handle_request+0x2c><== NEVER TAKEN
56ea6: b4aa 0002 cmpl %a2@(2),%d2
56eaa: 6604 bnes 56eb0 <rtems_rfs_buffer_handle_request+0x2c>
56eac: 6000 01de braw 5708c <rtems_rfs_buffer_handle_request+0x208>
return 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
56eb0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
56eb4: 42a7 clrl %sp@-
56eb6: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56ebc: 508f addql #8,%sp
56ebe: 4a00 tstb %d0
56ec0: 6712 beqs 56ed4 <rtems_rfs_buffer_handle_request+0x50><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n",
56ec2: 2f2a 0002 movel %a2@(2),%sp@- <== NOT EXECUTED
56ec6: 4879 0006 e204 pea 6e204 <CSWTCH.2+0x1f0> <== NOT EXECUTED
56ecc: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56ed2: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_buffer_bnum (handle));
rc = rtems_rfs_buffer_handle_release (fs, handle);
56ed4: 2f0a movel %a2,%sp@-
56ed6: 2f0b movel %a3,%sp@-
56ed8: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release>
if (rc > 0)
56ede: 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);
56ee0: 2600 movel %d0,%d3
if (rc > 0)
56ee2: 6e00 01aa bgtw 5708e <rtems_rfs_buffer_handle_request+0x20a>
return rc;
handle->dirty = false;
handle->bnum = 0;
56ee6: 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;
56eea: 4212 clrb %a2@
handle->bnum = 0;
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
56eec: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
56ef0: 42a7 clrl %sp@-
56ef2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56ef8: 508f addql #8,%sp
56efa: 4a00 tstb %d0
56efc: 6710 beqs 56f0e <rtems_rfs_buffer_handle_request+0x8a><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block);
56efe: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56f00: 4879 0006 e237 pea 6e237 <CSWTCH.2+0x223> <== NOT EXECUTED
56f06: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56f0c: 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)
56f0e: 4aab 0050 tstl %a3@(80)
56f12: 6744 beqs 56f58 <rtems_rfs_buffer_handle_request+0xd4>
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
56f14: 2f02 movel %d2,%sp@-
56f16: 486b 0050 pea %a3@(80)
56f1a: 486b 0044 pea %a3@(68)
56f1e: 4eba fd08 jsr %pc@(56c28 <rtems_rfs_scan_chain>)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
56f22: 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,
56f26: 2540 0006 movel %d0,%a2@(6)
&fs->buffers_count,
block);
if (rtems_rfs_buffer_handle_has_block (handle) &&
56f2a: 672c beqs 56f58 <rtems_rfs_buffer_handle_request+0xd4><== ALWAYS TAKEN
rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
56f2c: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED
56f30: 42a7 clrl %sp@- <== NOT EXECUTED
56f32: 4eb9 0005 044c jsr 5044c <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) &&
56f38: 508f addql #8,%sp <== NOT EXECUTED
56f3a: 4a00 tstb %d0 <== NOT EXECUTED
56f3c: 671a beqs 56f58 <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);
56f3e: 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",
56f42: 2068 002e moveal %a0@(46),%a0 <== NOT EXECUTED
56f46: 5288 addql #1,%a0 <== NOT EXECUTED
56f48: 2f08 movel %a0,%sp@- <== NOT EXECUTED
56f4a: 4879 0006 e25d pea 6e25d <CSWTCH.2+0x249> <== NOT EXECUTED
56f50: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56f56: 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) &&
56f58: 7002 moveq #2,%d0
56f5a: c093 andl %a3@,%d0
56f5c: 664a bnes 56fa8 <rtems_rfs_buffer_handle_request+0x124><== ALWAYS TAKEN
56f5e: 4aaa 0006 tstl %a2@(6) <== NOT EXECUTED
56f62: 6644 bnes 56fa8 <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)
56f64: 4aab 0060 tstl %a3@(96) <== NOT EXECUTED
56f68: 6716 beqs 56f80 <rtems_rfs_buffer_handle_request+0xfc><== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->release,
56f6a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56f6c: 486b 0060 pea %a3@(96) <== NOT EXECUTED
56f70: 486b 0054 pea %a3@(84) <== NOT EXECUTED
56f74: 4eba fcb2 jsr %pc@(56c28 <rtems_rfs_scan_chain>) <== NOT EXECUTED
56f78: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56f7c: 2540 0006 movel %d0,%a2@(6) <== NOT EXECUTED
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
56f80: 4aaa 0006 tstl %a2@(6) <== NOT EXECUTED
56f84: 6622 bnes 56fa8 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
56f86: 4aab 0070 tstl %a3@(112) <== NOT EXECUTED
56f8a: 671c beqs 56fa8 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
56f8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56f8e: 486b 0070 pea %a3@(112) <== NOT EXECUTED
56f92: 486b 0064 pea %a3@(100) <== NOT EXECUTED
56f96: 4eba fc90 jsr %pc@(56c28 <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))
56f9a: 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,
56f9e: 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))
56fa2: 6704 beqs 56fa8 <rtems_rfs_buffer_handle_request+0x124><== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (handle);
56fa4: 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))
56fa8: 4aaa 0006 tstl %a2@(6)
56fac: 6670 bnes 5701e <rtems_rfs_buffer_handle_request+0x19a><== NEVER TAKEN
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
56fae: 486a 0006 pea %a2@(6)
56fb2: 4280 clrl %d0
56fb4: 1004 moveb %d4,%d0
56fb6: 2f00 movel %d0,%sp@-
56fb8: 2f02 movel %d2,%sp@-
56fba: 2f0b movel %a3,%sp@-
56fbc: 4eb9 0005 b974 jsr 5b974 <rtems_rfs_buffer_bdbuf_request>
if (rc > 0)
56fc2: 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);
56fc6: 2600 movel %d0,%d3
if (rc > 0)
56fc8: 6f4a bles 57014 <rtems_rfs_buffer_handle_request+0x190><== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
56fca: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED
56fce: 42a7 clrl %sp@- <== NOT EXECUTED
56fd0: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
56fd6: 508f addql #8,%sp <== NOT EXECUTED
56fd8: 4a00 tstb %d0 <== NOT EXECUTED
56fda: 6700 00b2 beqw 5708e <rtems_rfs_buffer_handle_request+0x20a><== NOT EXECUTED
printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n",
56fde: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56fe0: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
56fe6: 588f addql #4,%sp <== NOT EXECUTED
56fe8: 4a04 tstb %d4 <== NOT EXECUTED
56fea: 6708 beqs 56ff4 <rtems_rfs_buffer_handle_request+0x170><== NOT EXECUTED
56fec: 223c 0006 dbf7 movel #449527,%d1 <== NOT EXECUTED
56ff2: 6006 bras 56ffa <rtems_rfs_buffer_handle_request+0x176><== NOT EXECUTED
56ff4: 223c 0006 e200 movel #451072,%d1 <== NOT EXECUTED
56ffa: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56ffc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
56ffe: 2f01 movel %d1,%sp@- <== NOT EXECUTED
57000: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57002: 4879 0006 e291 pea 6e291 <CSWTCH.2+0x27d> <== NOT EXECUTED
57008: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5700e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
57012: 607a bras 5708e <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));
57014: 206a 0006 moveal %a2@(6),%a0
57018: 42a8 0004 clrl %a0@(4)
5701c: 4290 clrl %a0@
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
5701e: 206a 0006 moveal %a2@(6),%a0
57022: 52a8 002e addql #1,%a0@(46)
57026: 2f08 movel %a0,%sp@-
57028: 486b 0044 pea %a3@(68)
5702c: 4eb9 0004 b010 jsr 4b010 <_Chain_Append>
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
handle->buffer->user = (void*) ((intptr_t) block);
57032: 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++;
57036: 52ab 0050 addql #1,%a3@(80)
handle->buffer->user = (void*) ((intptr_t) block);
5703a: 2142 0032 movel %d2,%a0@(50)
handle->bnum = block;
5703e: 2542 0002 movel %d2,%a2@(2)
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST))
57042: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
57046: 42a7 clrl %sp@-
57048: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
5704e: 4fef 0010 lea %sp@(16),%sp
57052: 4a00 tstb %d0
57054: 6736 beqs 5708c <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);
57056: 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",
5705a: 2268 002e moveal %a0@(46),%a1 <== NOT EXECUTED
5705e: 2228 0016 movel %a0@(22),%d1 <== NOT EXECUTED
57062: 4a04 tstb %d4 <== NOT EXECUTED
57064: 6708 beqs 5706e <rtems_rfs_buffer_handle_request+0x1ea><== NOT EXECUTED
57066: 203c 0006 dbf7 movel #449527,%d0 <== NOT EXECUTED
5706c: 6006 bras 57074 <rtems_rfs_buffer_handle_request+0x1f0><== NOT EXECUTED
5706e: 203c 0006 e200 movel #451072,%d0 <== NOT EXECUTED
57074: 2f09 movel %a1,%sp@- <== NOT EXECUTED
57076: 2f01 movel %d1,%sp@- <== NOT EXECUTED
57078: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5707a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5707c: 4879 0006 e2c9 pea 6e2c9 <CSWTCH.2+0x2b5> <== NOT EXECUTED
57082: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57088: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
block, read ? "read" : "get", handle->buffer->block,
handle->buffer->references);
return 0;
5708c: 4283 clrl %d3
}
5708e: 2003 movel %d3,%d0
57090: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
57096: 4e5e unlk %fp <== NOT EXECUTED
0005709a <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
5709a: 4e56 ffb8 linkw %fp,#-72
5709e: 2f0a movel %a2,%sp@-
570a0: 246e 000c moveal %fp@(12),%a2
570a4: 2f02 movel %d2,%sp@-
struct stat st;
#if RTEMS_RFS_USE_LIBBLOCK
int rv;
#endif
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
570a6: 4878 0020 pea 20 <OPER2+0xc>
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
570aa: 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))
570ae: 42a7 clrl %sp@-
570b0: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
570b6: 508f addql #8,%sp
570b8: 4a00 tstb %d0
570ba: 6710 beqs 570cc <rtems_rfs_buffer_open+0x32> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-open: opening: %s\n", name);
570bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
570be: 4879 0006 e304 pea 6e304 <CSWTCH.2+0x2f0> <== NOT EXECUTED
570c4: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
570ca: 508f addql #8,%sp <== NOT EXECUTED
fs->device = open (name, O_RDWR);
570cc: 4878 0002 pea 2 <DOUBLE_FLOAT>
570d0: 2f02 movel %d2,%sp@-
570d2: 4eb9 0004 71a0 jsr 471a0 <open>
if (fs->device < 0)
570d8: 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);
570da: 2540 000c movel %d0,%a2@(12)
if (fs->device < 0)
570de: 6c28 bges 57108 <rtems_rfs_buffer_open+0x6e> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
570e0: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
570e4: 42a7 clrl %sp@- <== NOT EXECUTED
570e6: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
570ec: 508f addql #8,%sp <== NOT EXECUTED
570ee: 4a00 tstb %d0 <== NOT EXECUTED
570f0: 6602 bnes 570f4 <rtems_rfs_buffer_open+0x5a> <== NOT EXECUTED
570f2: 600e bras 57102 <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot open file\n");
570f4: 4879 0006 e329 pea 6e329 <CSWTCH.2+0x315> <== NOT EXECUTED
570fa: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
57100: 588f addql #4,%sp <== NOT EXECUTED
return ENXIO;
57102: 7006 moveq #6,%d0 <== NOT EXECUTED
57104: 6000 00ec braw 571f2 <rtems_rfs_buffer_open+0x158> <== NOT EXECUTED
}
if (fstat (fs->device, &st) < 0)
57108: 486e ffba pea %fp@(-70)
5710c: 2f00 movel %d0,%sp@-
5710e: 4eb9 0004 63d0 jsr 463d0 <fstat>
57114: 508f addql #8,%sp
57116: 4a80 tstl %d0
57118: 6c38 bges 57152 <rtems_rfs_buffer_open+0xb8> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
5711a: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
5711e: 42a7 clrl %sp@- <== NOT EXECUTED
57120: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57126: 508f addql #8,%sp <== NOT EXECUTED
57128: 4a00 tstb %d0 <== NOT EXECUTED
5712a: 67d6 beqs 57102 <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n",
name, strerror (errno));
5712c: 4eb9 0005 bd98 jsr 5bd98 <__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",
57132: 2040 moveal %d0,%a0 <== NOT EXECUTED
57134: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
57136: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
5713c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5713e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57140: 4879 0006 e352 pea 6e352 <CSWTCH.2+0x33e> <== NOT EXECUTED
57146: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5714c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57150: 60b0 bras 57102 <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
57152: 202e ffc6 movel %fp@(-58),%d0
57156: 0280 0000 f000 andil #61440,%d0
5715c: 0c80 0000 6000 cmpil #24576,%d0
57162: 6726 beqs 5718a <rtems_rfs_buffer_open+0xf0> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
57164: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
57168: 42a7 clrl %sp@- <== NOT EXECUTED
5716a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57170: 508f addql #8,%sp <== NOT EXECUTED
57172: 4a00 tstb %d0 <== NOT EXECUTED
57174: 678c beqs 57102 <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name);
57176: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57178: 4879 0006 e380 pea 6e380 <CSWTCH.2+0x36c> <== NOT EXECUTED
5717e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57184: 508f addql #8,%sp <== NOT EXECUTED
57186: 6000 ff7a braw 57102 <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);
5718a: 486a 0010 pea %a2@(16)
5718e: 2f3c 4004 4209 movel #1074020873,%sp@-
57194: 2f2a 000c movel %a2@(12),%sp@-
57198: 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)
5719e: 4fef 000c lea %sp@(12),%sp
571a2: 41f9 0005 044c lea 5044c <rtems_rfs_trace>,%a0
571a8: 4a80 tstl %d0
571aa: 671a beqs 571c6 <rtems_rfs_buffer_open+0x12c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN))
571ac: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
571b0: 42a7 clrl %sp@- <== NOT EXECUTED
571b2: 4e90 jsr %a0@ <== NOT EXECUTED
571b4: 508f addql #8,%sp <== NOT EXECUTED
571b6: 4a00 tstb %d0 <== NOT EXECUTED
571b8: 6700 ff48 beqw 57102 <rtems_rfs_buffer_open+0x68> <== NOT EXECUTED
printf ("rtems-rfs: buffer-open: cannot obtain the disk\n");
571bc: 4879 0006 e3b4 pea 6e3b4 <CSWTCH.2+0x3a0> <== NOT EXECUTED
571c2: 6000 ff36 braw 570fa <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))
571c6: 4878 0020 pea 20 <OPER2+0xc>
571ca: 42a7 clrl %sp@-
571cc: 4e90 jsr %a0@
571ce: 508f addql #8,%sp
571d0: 4a00 tstb %d0
571d2: 671c beqs 571f0 <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));
571d4: 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",
571d8: 2f28 0020 movel %a0@(32),%sp@- <== NOT EXECUTED
571dc: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED
571e0: 4879 0006 e3e3 pea 6e3e3 <CSWTCH.2+0x3cf> <== NOT EXECUTED
571e6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
571ec: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_fs_media_blocks (fs),
rtems_rfs_fs_media_block_size (fs));
return 0;
571f0: 4280 clrl %d0
}
571f2: 242e ffb0 movel %fp@(-80),%d2
571f6: 246e ffb4 moveal %fp@(-76),%a2
571fa: 4e5e unlk %fp <== NOT EXECUTED
00057308 <rtems_rfs_buffer_setblksize>:
return result;
}
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
57308: 4e56 0000 linkw %fp,#0
5730c: 2f0a movel %a2,%sp@-
5730e: 246e 0008 moveal %fp@(8),%a2
57312: 2f02 movel %d2,%sp@-
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
57314: 4878 0400 pea 400 <D_BIAS+0x2>
57318: 42a7 clrl %sp@-
5731a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
57320: 508f addql #8,%sp
57322: 4a00 tstb %d0
57324: 6712 beqs 57338 <rtems_rfs_buffer_setblksize+0x30><== ALWAYS TAKEN
printf ("rtems-rfs: buffer-setblksize: block size: %zu\n", size);
57326: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5732a: 4879 0006 e4ac pea 6e4ac <CSWTCH.2+0x498> <== NOT EXECUTED
57330: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57336: 508f addql #8,%sp <== NOT EXECUTED
rc = rtems_rfs_buffers_release (fs);
57338: 2f0a movel %a2,%sp@-
5733a: 4eb9 0005 7286 jsr 57286 <rtems_rfs_buffers_release>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
57340: 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);
57342: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
57344: 6f2e bles 57374 <rtems_rfs_buffer_setblksize+0x6c><== ALWAYS TAKEN
57346: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED
5734a: 42a7 clrl %sp@- <== NOT EXECUTED
5734c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57352: 508f addql #8,%sp <== NOT EXECUTED
57354: 4a00 tstb %d0 <== NOT EXECUTED
57356: 671c beqs 57374 <rtems_rfs_buffer_setblksize+0x6c><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n",
57358: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5735a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57360: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57362: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57364: 4879 0006 e4db pea 6e4db <CSWTCH.2+0x4c7> <== NOT EXECUTED
5736a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57370: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_buffer_sync (fs);
57374: 2f0a movel %a2,%sp@-
57376: 4eb9 0005 71fe jsr 571fe <rtems_rfs_buffer_sync>
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
5737c: 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);
5737e: 2400 movel %d0,%d2
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE))
57380: 6f2e bles 573b0 <rtems_rfs_buffer_setblksize+0xa8><== ALWAYS TAKEN
57382: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED
57386: 42a7 clrl %sp@- <== NOT EXECUTED
57388: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5738e: 508f addql #8,%sp <== NOT EXECUTED
57390: 4a00 tstb %d0 <== NOT EXECUTED
57392: 671c beqs 573b0 <rtems_rfs_buffer_setblksize+0xa8><== NOT EXECUTED
printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n",
57394: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57396: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
5739c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5739e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
573a0: 4879 0006 e518 pea 6e518 <CSWTCH.2+0x504> <== NOT EXECUTED
573a6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
573ac: 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);
573b0: 206a 0010 moveal %a2@(16),%a0
573b4: 486e 000c pea %fp@(12)
573b8: 2f3c 8004 4204 movel #-2147204604,%sp@-
573be: 2f08 movel %a0,%sp@-
573c0: 2068 0038 moveal %a0@(56),%a0
573c4: 4e90 jsr %a0@
if (rc < 0)
573c6: 4fef 000c lea %sp@(12),%sp
573ca: 4a80 tstl %d0
573cc: 6c0a bges 573d8 <rtems_rfs_buffer_setblksize+0xd0><== ALWAYS TAKEN
rc = errno;
573ce: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
573d4: 2040 moveal %d0,%a0 <== NOT EXECUTED
573d6: 2010 movel %a0@,%d0 <== NOT EXECUTED
#endif
return rc;
}
573d8: 242e fff8 movel %fp@(-8),%d2
573dc: 246e fffc moveal %fp@(-4),%a2
573e0: 4e5e unlk %fp <== NOT EXECUTED
000571fe <rtems_rfs_buffer_sync>:
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
571fe: 4e56 0000 linkw %fp,#0
57202: 2f0a movel %a2,%sp@-
57204: 246e 0008 moveal %fp@(8),%a2
57208: 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))
5720a: 4878 0020 pea 20 <OPER2+0xc>
5720e: 42a7 clrl %sp@-
57210: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
57216: 508f addql #8,%sp
57218: 4a00 tstb %d0
5721a: 670e beqs 5722a <rtems_rfs_buffer_sync+0x2c> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-sync: syncing\n");
5721c: 4879 0006 e413 pea 6e413 <CSWTCH.2+0x3ff> <== NOT EXECUTED
57222: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
57228: 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));
5722a: 2f2a 0010 movel %a2@(16),%sp@-
5722e: 4eb9 0005 23a6 jsr 523a6 <rtems_bdbuf_syncdev>
if (sc != RTEMS_SUCCESSFUL)
57234: 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));
57236: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
57238: 672e beqs 57268 <rtems_rfs_buffer_sync+0x6a> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC))
5723a: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5723e: 42a7 clrl %sp@- <== NOT EXECUTED
57240: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57246: 508f addql #8,%sp <== NOT EXECUTED
57248: 4a00 tstb %d0 <== NOT EXECUTED
5724a: 6720 beqs 5726c <rtems_rfs_buffer_sync+0x6e> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: device sync failed: %s\n",
5724c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5724e: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
57254: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57256: 4879 0006 e433 pea 6e433 <CSWTCH.2+0x41f> <== NOT EXECUTED
5725c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57262: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
57266: 6004 bras 5726c <rtems_rfs_buffer_sync+0x6e> <== NOT EXECUTED
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
int result = 0;
57268: 4282 clrl %d2
5726a: 6002 bras 5726e <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;
5726c: 7405 moveq #5,%d2 <== NOT EXECUTED
}
rtems_disk_release (fs->disk);
5726e: 2f2a 0010 movel %a2@(16),%sp@-
57272: 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;
}
57278: 246e fffc moveal %fp@(-4),%a2
5727c: 2002 movel %d2,%d0
5727e: 242e fff8 movel %fp@(-8),%d2
57282: 4e5e unlk %fp <== NOT EXECUTED
00057286 <rtems_rfs_buffers_release>:
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
57286: 4e56 fff4 linkw %fp,#-12
5728a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
5728e: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
57292: 246e 0008 moveal %fp@(8),%a2
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE))
57296: 42a7 clrl %sp@-
57298: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
5729e: 508f addql #8,%sp
572a0: 4a00 tstb %d0
572a2: 671c beqs 572c0 <rtems_rfs_buffers_release+0x3a> <== ALWAYS TAKEN
printf ("rtems-rfs: buffers-release: active:%" PRIu32 " "
572a4: 2f2a 0070 movel %a2@(112),%sp@- <== NOT EXECUTED
572a8: 2f2a 0060 movel %a2@(96),%sp@- <== NOT EXECUTED
572ac: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED
572b0: 4879 0006 e463 pea 6e463 <CSWTCH.2+0x44f> <== NOT EXECUTED
572b6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
572bc: 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,
572c0: 42a7 clrl %sp@-
572c2: 486a 0060 pea %a2@(96)
572c6: 47fa f8e0 lea %pc@(56ba8 <rtems_rfs_release_chain>),%a3
572ca: 486a 0054 pea %a2@(84)
572ce: 4e93 jsr %a3@
572d0: 4fef 000c lea %sp@(12),%sp
572d4: 2200 movel %d0,%d1
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
572d6: 4878 0001 pea 1 <ADD>
572da: 4681 notl %d1
572dc: 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,
572e0: 2400 movel %d0,%d2
&fs->release_count,
false);
if ((rc > 0) && (rrc == 0))
rrc = rc;
rc = rtems_rfs_release_chain (&fs->release_modified,
572e2: 486a 0064 pea %a2@(100)
572e6: d281 addl %d1,%d1
572e8: 9381 subxl %d1,%d1
572ea: c481 andl %d1,%d2
572ec: 4e93 jsr %a3@
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
572ee: 4fef 000c lea %sp@(12),%sp
572f2: 4a80 tstl %d0
572f4: 6f06 bles 572fc <rtems_rfs_buffers_release+0x76> <== ALWAYS TAKEN
572f6: 4a82 tstl %d2 <== NOT EXECUTED
572f8: 6602 bnes 572fc <rtems_rfs_buffers_release+0x76> <== NOT EXECUTED
572fa: 2400 movel %d0,%d2 <== NOT EXECUTED
rrc = rc;
return rrc;
}
572fc: 2002 movel %d2,%d0
572fe: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
57304: 4e5e unlk %fp <== NOT EXECUTED
0005792a <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)
{
5792a: 4e56 ff6c linkw %fp,#-148
5792e: 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))
57932: 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)
{
57938: 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))
5793c: 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)
{
5793e: 286e 000c moveal %fp@(12),%a4
57942: 2a2e 0010 movel %fp@(16),%d5
57946: 282e 0014 movel %fp@(20),%d4
5794a: 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))
5794e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
57954: 508f addql #8,%sp
57956: 4a00 tstb %d0
57958: 673e beqs 57998 <rtems_rfs_dir_add_entry+0x6e> <== ALWAYS TAKEN
{
int c;
printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=",
5795a: 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,
5795e: 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=",
57960: 4879 0006 e88d pea 6e88d <CSWTCH.2+0x879> <== NOT EXECUTED
57966: 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,
57968: 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]);
5796a: 4bf9 0005 d13c lea 5d13c <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=",
57970: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
rtems_rfs_inode_ino (dir));
for (c = 0; c < length; c++)
57976: 508f addql #8,%sp <== NOT EXECUTED
57978: 600a bras 57984 <rtems_rfs_dir_add_entry+0x5a> <== NOT EXECUTED
printf ("%c", name[c]);
5797a: 101a moveb %a2@+,%d0 <== NOT EXECUTED
5797c: 49c0 extbl %d0 <== NOT EXECUTED
5797e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57980: 4e95 jsr %a5@ <== NOT EXECUTED
57982: 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++)
57984: b48a cmpl %a2,%d2 <== NOT EXECUTED
57986: 66f2 bnes 5797a <rtems_rfs_dir_add_entry+0x50> <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%zd\n", length);
57988: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5798a: 4879 0006 e8b6 pea 6e8b6 <CSWTCH.2+0x8a2> <== NOT EXECUTED
57990: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57996: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, dir, &map);
57998: 4bee ffb6 lea %fp@(-74),%a5
5799c: 2f0d movel %a5,%sp@-
5799e: 2f0c movel %a4,%sp@-
579a0: 2f0b movel %a3,%sp@-
579a2: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open>
if (rc > 0)
579a8: 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);
579ac: 2400 movel %d0,%d2
if (rc > 0)
579ae: 6e00 02ba bgtw 57c6a <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) <
579b2: 2044 moveal %d4,%a0
579b4: 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);
579b8: 2e0e movel %fp,%d7
579ba: 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;
579c0: 4201 clrb %d1
handle->bnum = 0;
579c2: 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;
579c6: 1d41 ffa0 moveb %d1,%fp@(-96)
handle->bnum = 0;
handle->buffer = NULL;
579ca: 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;
579ce: 42ae ffaa clrl %fp@(-86)
bpos->boff = 0;
579d2: 42ae ffae clrl %fp@(-82)
bpos->block = 0;
579d6: 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) <
579da: 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);
579de: 2f07 movel %d7,%sp@-
579e0: 486e ffaa pea %fp@(-86)
579e4: 2f0d movel %a5,%sp@-
579e6: 2f0b movel %a3,%sp@-
579e8: 4eb9 0005 64aa jsr 564aa <rtems_rfs_block_map_find>
if (rc > 0)
579ee: 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);
579f2: 2400 movel %d0,%d2
if (rc > 0)
579f4: 6f00 0088 blew 57a7e <rtems_rfs_dir_add_entry+0x154>
{
if (rc != ENXIO)
579f8: 7006 moveq #6,%d0
579fa: b082 cmpl %d2,%d0
579fc: 672e beqs 57a2c <rtems_rfs_dir_add_entry+0x102> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
579fe: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57a04: 42a7 clrl %sp@- <== NOT EXECUTED
57a06: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57a0c: 508f addql #8,%sp <== NOT EXECUTED
57a0e: 4a00 tstb %d0 <== NOT EXECUTED
57a10: 6700 023e beqw 57c50 <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57a14: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57a16: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57a1c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57a1e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57a20: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57a24: 4879 0006 e8c1 pea 6e8c1 <CSWTCH.2+0x8ad> <== NOT EXECUTED
57a2a: 6044 bras 57a70 <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);
57a2c: 2f07 movel %d7,%sp@-
57a2e: 4878 0001 pea 1 <ADD>
57a32: 2f0d movel %a5,%sp@-
57a34: 2f0b movel %a3,%sp@-
57a36: 4eb9 0005 6646 jsr 56646 <rtems_rfs_block_map_grow>
if (rc > 0)
57a3c: 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);
57a40: 2400 movel %d0,%d2
if (rc > 0)
57a42: 6f3e bles 57a82 <rtems_rfs_dir_add_entry+0x158> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
57a44: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57a4a: 42a7 clrl %sp@- <== NOT EXECUTED
57a4c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57a52: 508f addql #8,%sp <== NOT EXECUTED
57a54: 4a00 tstb %d0 <== NOT EXECUTED
57a56: 6700 01f8 beqw 57c50 <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57a5a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57a5c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57a62: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57a64: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57a66: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57a6a: 4879 0006 e906 pea 6e906 <CSWTCH.2+0x8f2> <== NOT EXECUTED
57a70: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57a76: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
57a7a: 6000 01d4 braw 57c50 <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
while (true)
{
rtems_rfs_block_no block;
uint8_t* entry;
int offset;
bool read = true;
57a7e: 7601 moveq #1,%d3 <== NOT EXECUTED
57a80: 6002 bras 57a84 <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;
57a82: 4203 clrb %d3
}
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
57a84: 7201 moveq #1,%d1
}
read = false;
}
bpos.bno++;
57a86: 52ae ffaa addql #1,%fp@(-86)
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
57a8a: c283 andl %d3,%d1
57a8c: 2f01 movel %d1,%sp@-
57a8e: 2f2e ff9c movel %fp@(-100),%sp@-
57a92: 486e ffa0 pea %fp@(-96)
57a96: 2f0b movel %a3,%sp@-
57a98: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request>
if (rc > 0)
57a9e: 4fef 0010 lea %sp@(16),%sp
read = false;
}
bpos.bno++;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
57aa2: 2400 movel %d0,%d2
if (rc > 0)
57aa4: 6f2e bles 57ad4 <rtems_rfs_dir_add_entry+0x1aa> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
57aa6: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57aac: 42a7 clrl %sp@- <== NOT EXECUTED
57aae: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57ab4: 508f addql #8,%sp <== NOT EXECUTED
57ab6: 4a00 tstb %d0 <== NOT EXECUTED
57ab8: 6700 0196 beqw 57c50 <rtems_rfs_dir_add_entry+0x326> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57abc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57abe: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57ac4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57ac6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57ac8: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57acc: 4879 0006 e94b pea 6e94b <CSWTCH.2+0x937> <== NOT EXECUTED
57ad2: 609c bras 57a70 <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);
57ad4: 206e ffa6 moveal %fp@(-90),%a0
57ad8: 2468 001a moveal %a0@(26),%a2
if (!read)
57adc: 4a03 tstb %d3
57ade: 6614 bnes 57af4 <rtems_rfs_dir_add_entry+0x1ca> <== NEVER TAKEN
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
57ae0: 2f2b 0008 movel %a3@(8),%sp@-
57ae4: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
57ae8: 2f0a movel %a2,%sp@-
57aea: 4eb9 0005 ce5c jsr 5ce5c <memset>
57af0: 4fef 000c lea %sp@(12),%sp
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57af4: 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;
57af8: 4281 clrl %d1
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57afa: 43e8 fff6 lea %a0@(-10),%a1
57afe: 6000 0146 braw 57c46 <rtems_rfs_dir_add_entry+0x31c>
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
57b02: 4283 clrl %d3
57b04: 162a 0008 moveb %a2@(8),%d3
57b08: 4280 clrl %d0
57b0a: 102a 0009 moveb %a2@(9),%d0
eino = rtems_rfs_dir_entry_ino (entry);
57b0e: 4282 clrl %d2
57b10: 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);
57b12: e18b lsll #8,%d3
57b14: 8680 orl %d0,%d3
eino = rtems_rfs_dir_entry_ino (entry);
57b16: 7018 moveq #24,%d0
57b18: e1aa lsll %d0,%d2
57b1a: 4280 clrl %d0
57b1c: 102a 0001 moveb %a2@(1),%d0
57b20: 4840 swap %d0
57b22: 4240 clrw %d0
57b24: 8480 orl %d0,%d2
57b26: 4280 clrl %d0
57b28: 102a 0003 moveb %a2@(3),%d0
57b2c: 8480 orl %d0,%d2
57b2e: 102a 0002 moveb %a2@(2),%d0
57b32: e188 lsll #8,%d0
57b34: 8480 orl %d0,%d2
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
57b36: 0c83 0000 ffff cmpil #65535,%d3
57b3c: 6600 009a bnew 57bd8 <rtems_rfs_dir_add_entry+0x2ae>
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
(rtems_rfs_fs_block_size (fs) - offset))
57b40: 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) <
57b42: b1ee ff98 cmpal %fp@(-104),%a0
57b46: 6300 fe96 blsw 579de <rtems_rfs_dir_add_entry+0xb4>
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
57b4a: 2f04 movel %d4,%sp@-
rtems_rfs_dir_set_entry_hash (entry, hash);
57b4c: 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);
57b4e: 2f05 movel %d5,%sp@-
57b50: 4eb9 0005 ba30 jsr 5ba30 <rtems_rfs_dir_hash>
rtems_rfs_dir_set_entry_hash (entry, hash);
rtems_rfs_dir_set_entry_ino (entry, ino);
57b56: 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);
57b5a: 2200 movel %d0,%d1
57b5c: e4a9 lsrl %d2,%d1
57b5e: 1541 0004 moveb %d1,%a2@(4)
57b62: 2200 movel %d0,%d1
57b64: 4241 clrw %d1
57b66: 4841 swap %d1
57b68: 1540 0007 moveb %d0,%a2@(7)
57b6c: 1541 0005 moveb %d1,%a2@(5)
57b70: 2200 movel %d0,%d1
rtems_rfs_dir_set_entry_ino (entry, ino);
57b72: 2006 movel %d6,%d0
57b74: 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);
57b76: 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;
57b78: 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);
57b7a: 1480 moveb %d0,%a2@
57b7c: 2006 movel %d6,%d0
57b7e: 4240 clrw %d0
57b80: 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);
57b82: 1541 0006 moveb %d1,%a2@(6)
rtems_rfs_dir_set_entry_ino (entry, ino);
57b86: 1540 0001 moveb %d0,%a2@(1)
57b8a: 2006 movel %d6,%d0
57b8c: e088 lsrl #8,%d0
57b8e: 1540 0002 moveb %d0,%a2@(2)
rtems_rfs_dir_set_entry_length (entry,
57b92: 2004 movel %d4,%d0
57b94: 0680 0000 000a addil #10,%d0
57b9a: 2200 movel %d0,%d1
57b9c: e089 lsrl #8,%d1
57b9e: 1540 0009 moveb %d0,%a2@(9)
57ba2: 1541 0008 moveb %d1,%a2@(8)
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
57ba6: 2f04 movel %d4,%sp@-
57ba8: 2f05 movel %d5,%sp@-
57baa: 486a 000a pea %a2@(10)
57bae: 4eb9 0005 ccf8 jsr 5ccf8 <memcpy>
rtems_rfs_buffer_mark_dirty (&buffer);
rtems_rfs_buffer_handle_close (fs, &buffer);
57bb4: 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);
57bb8: 7001 moveq #1,%d0
rtems_rfs_buffer_handle_close (fs, &buffer);
57bba: 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);
57bbc: 1d40 ffa0 moveb %d0,%fp@(-96)
rtems_rfs_buffer_handle_close (fs, &buffer);
57bc0: 4eba f8ea jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)
rtems_rfs_block_map_close (fs, &map);
57bc4: 486e ffb6 pea %fp@(-74)
57bc8: 2f0b movel %a3,%sp@-
57bca: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close>
57bd0: 4fef 0024 lea %sp@(36),%sp
57bd4: 6000 0094 braw 57c6a <rtems_rfs_dir_add_entry+0x340>
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
57bd8: 700a moveq #10,%d0 <== NOT EXECUTED
57bda: b083 cmpl %d3,%d0 <== NOT EXECUTED
57bdc: 6c10 bges 57bee <rtems_rfs_dir_add_entry+0x2c4> <== NOT EXECUTED
57bde: b6ab 001c cmpl %a3@(28),%d3 <== NOT EXECUTED
57be2: 640a bccs 57bee <rtems_rfs_dir_add_entry+0x2c4> <== NOT EXECUTED
57be4: 4a82 tstl %d2 <== NOT EXECUTED
57be6: 6706 beqs 57bee <rtems_rfs_dir_add_entry+0x2c4> <== NOT EXECUTED
57be8: b4ab 0014 cmpl %a3@(20),%d2 <== NOT EXECUTED
57bec: 6354 blss 57c42 <rtems_rfs_dir_add_entry+0x318> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY))
57bee: 2d41 ff94 movel %d1,%fp@(-108) <== NOT EXECUTED
57bf2: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED
57bf8: 42a7 clrl %sp@- <== NOT EXECUTED
57bfa: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57c00: 222e ff94 movel %fp@(-108),%d1 <== NOT EXECUTED
57c04: 508f addql #8,%sp <== NOT EXECUTED
57c06: 4a00 tstb %d0 <== NOT EXECUTED
57c08: 671a beqs 57c24 <rtems_rfs_dir_add_entry+0x2fa> <== NOT EXECUTED
printf ("rtems-rfs: dir-add-entry: "
57c0a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
57c0c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57c0e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57c10: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57c14: 4879 0006 e992 pea 6e992 <CSWTCH.2+0x97e> <== NOT EXECUTED
57c1a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57c20: 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);
57c24: 486e ffa0 pea %fp@(-96) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return EIO;
57c28: 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);
57c2a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57c2c: 4eba f87e jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57c30: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57c34: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57c36: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
57c3c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57c40: 6028 bras 57c6a <rtems_rfs_dir_add_entry+0x340> <== NOT EXECUTED
return EIO;
}
entry += elength;
57c42: d5c3 addal %d3,%a2 <== NOT EXECUTED
offset += elength;
57c44: 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))
57c46: b3c1 cmpal %d1,%a1
57c48: 6200 feb8 bhiw 57b02 <rtems_rfs_dir_add_entry+0x1d8>
57c4c: 6000 fd90 braw 579de <rtems_rfs_dir_add_entry+0xb4> <== NOT EXECUTED
entry += elength;
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
57c50: 486e ffa0 pea %fp@(-96) <== NOT EXECUTED
57c54: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57c56: 4eba f854 jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57c5a: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57c5e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57c60: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
57c66: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return rc;
}
57c6a: 2002 movel %d2,%d0
57c6c: 4cee 3cfc ff6c moveml %fp@(-148),%d2-%d7/%a2-%a5
57c72: 4e5e unlk %fp <== NOT EXECUTED
00057c76 <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)
{
57c76: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED
57c7a: 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))
57c7e: 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)
{
57c84: 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))
57c88: 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)
{
57c8a: 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))
57c8e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57c94: 508f addql #8,%sp <== NOT EXECUTED
57c96: 4a00 tstb %d0 <== NOT EXECUTED
57c98: 671c beqs 57cb6 <rtems_rfs_dir_del_entry+0x40> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n",
57c9a: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
57c9e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
57ca2: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57ca6: 4879 0006 e9da pea 6e9da <CSWTCH.2+0x9c6> <== NOT EXECUTED
57cac: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57cb2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), ino, offset);
rc = rtems_rfs_block_map_open (fs, dir, &map);
57cb6: 260e movel %fp,%d3 <== NOT EXECUTED
57cb8: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
57cbe: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57cc0: 2f0c movel %a4,%sp@- <== NOT EXECUTED
57cc2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57cc4: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
57cca: 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);
57cce: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57cd0: 6e00 02ea bgtw 57fbc <rtems_rfs_dir_del_entry+0x346> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
57cd4: 280e movel %fp,%d4 <== NOT EXECUTED
57cd6: 0684 ffff ffa8 addil #-88,%d4 <== NOT EXECUTED
57cdc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57cde: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
57ce2: 42a7 clrl %sp@- <== NOT EXECUTED
57ce4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57ce6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57ce8: 4eb9 0005 6596 jsr 56596 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
57cee: 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);
57cf2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57cf4: 6f1a bles 57d10 <rtems_rfs_dir_del_entry+0x9a> <== NOT EXECUTED
{
if (rc == ENXIO)
57cf6: 7006 moveq #6,%d0 <== NOT EXECUTED
57cf8: b082 cmpl %d2,%d0 <== NOT EXECUTED
57cfa: 6602 bnes 57cfe <rtems_rfs_dir_del_entry+0x88> <== NOT EXECUTED
rc = ENOENT;
57cfc: 7402 moveq #2,%d2 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57cfe: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57d02: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57d04: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
57d0a: 508f addql #8,%sp <== NOT EXECUTED
57d0c: 6000 02ae braw 57fbc <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;
57d10: 4aae 0014 tstl %fp@(20) <== NOT EXECUTED
57d14: 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;
57d16: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
57d18: 42ae ffae clrl %fp@(-82) <== NOT EXECUTED
57d1c: 4487 negl %d7 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
return rc;
}
rc = rtems_rfs_buffer_handle_open (fs, &buffer);
57d1e: 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))
57d20: 4bf9 0005 044c lea 5044c <rtems_rfs_trace>,%a5 <== NOT EXECUTED
handle->buffer = NULL;
57d26: 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;
57d2a: 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)
57d2e: 6000 0262 braw 57f92 <rtems_rfs_dir_del_entry+0x31c> <== NOT EXECUTED
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
57d32: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57d36: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57d3a: 486e ffac pea %fp@(-84) <== NOT EXECUTED
57d3e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57d40: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
57d46: 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);
57d4a: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
57d4c: 6f3a bles 57d88 <rtems_rfs_dir_del_entry+0x112> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57d4e: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
57d54: 42a7 clrl %sp@- <== NOT EXECUTED
57d56: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57d5c: 508f addql #8,%sp <== NOT EXECUTED
57d5e: 4a00 tstb %d0 <== NOT EXECUTED
57d60: 6700 0238 beqw 57f9a <rtems_rfs_dir_del_entry+0x324> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
57d64: 2f05 movel %d5,%sp@- <== NOT EXECUTED
57d66: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57d6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57d6e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
57d70: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57d74: 4879 0006 ea13 pea 6ea13 <CSWTCH.2+0x9ff> <== NOT EXECUTED
57d7a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57d80: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
57d84: 6000 0214 braw 57f9a <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)
57d88: 4a07 tstb %d7 <== NOT EXECUTED
57d8a: 660c bnes 57d98 <rtems_rfs_dir_del_entry+0x122> <== NOT EXECUTED
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
57d8c: 202e 0014 movel %fp@(20),%d0 <== NOT EXECUTED
57d90: 4c6a 0006 0008 remul %a2@(8),%d6,%d0 <== NOT EXECUTED
57d96: 6002 bras 57d9a <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;
57d98: 4286 clrl %d6 <== NOT EXECUTED
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
57d9a: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
57d9e: 2668 001a moveal %a0@(26),%a3 <== NOT EXECUTED
57da2: d7c6 addal %d6,%a3 <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
57da4: 206a 0008 moveal %a2@(8),%a0 <== NOT EXECUTED
57da8: 43e8 fff6 lea %a0@(-10),%a1 <== NOT EXECUTED
57dac: 6000 01b8 braw 57f66 <rtems_rfs_dir_del_entry+0x2f0> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
57db0: 4283 clrl %d3 <== NOT EXECUTED
57db2: 162b 0008 moveb %a3@(8),%d3 <== NOT EXECUTED
57db6: 4280 clrl %d0 <== NOT EXECUTED
57db8: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
57dbc: 4284 clrl %d4 <== NOT EXECUTED
57dbe: 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);
57dc0: e18b lsll #8,%d3 <== NOT EXECUTED
57dc2: 8680 orl %d0,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
57dc4: 7018 moveq #24,%d0 <== NOT EXECUTED
57dc6: e1ac lsll %d0,%d4 <== NOT EXECUTED
57dc8: 4280 clrl %d0 <== NOT EXECUTED
57dca: 102b 0001 moveb %a3@(1),%d0 <== NOT EXECUTED
57dce: 4840 swap %d0 <== NOT EXECUTED
57dd0: 4240 clrw %d0 <== NOT EXECUTED
57dd2: 8880 orl %d0,%d4 <== NOT EXECUTED
57dd4: 4280 clrl %d0 <== NOT EXECUTED
57dd6: 102b 0003 moveb %a3@(3),%d0 <== NOT EXECUTED
57dda: 8880 orl %d0,%d4 <== NOT EXECUTED
57ddc: 102b 0002 moveb %a3@(2),%d0 <== NOT EXECUTED
57de0: e188 lsll #8,%d0 <== NOT EXECUTED
57de2: 8880 orl %d0,%d4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
57de4: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED
57dea: 6700 0180 beqw 57f6c <rtems_rfs_dir_del_entry+0x2f6> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
57dee: 700a moveq #10,%d0 <== NOT EXECUTED
57df0: b083 cmpl %d3,%d0 <== NOT EXECUTED
57df2: 6c10 bges 57e04 <rtems_rfs_dir_del_entry+0x18e> <== NOT EXECUTED
57df4: b6aa 001c cmpl %a2@(28),%d3 <== NOT EXECUTED
57df8: 640a bccs 57e04 <rtems_rfs_dir_del_entry+0x18e> <== NOT EXECUTED
57dfa: 4a84 tstl %d4 <== NOT EXECUTED
57dfc: 6706 beqs 57e04 <rtems_rfs_dir_del_entry+0x18e> <== NOT EXECUTED
57dfe: b8aa 0014 cmpl %a2@(20),%d4 <== NOT EXECUTED
57e02: 6334 blss 57e38 <rtems_rfs_dir_del_entry+0x1c2> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57e04: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
57e0a: 42a7 clrl %sp@- <== NOT EXECUTED
57e0c: 4e95 jsr %a5@ <== NOT EXECUTED
57e0e: 508f addql #8,%sp <== NOT EXECUTED
57e10: 4a00 tstb %d0 <== NOT EXECUTED
57e12: 6700 01a4 beqw 57fb8 <rtems_rfs_dir_del_entry+0x342> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
57e16: 2f06 movel %d6,%sp@- <== NOT EXECUTED
57e18: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57e1c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57e1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57e20: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57e24: 4879 0006 ea5a pea 6ea5a <CSWTCH.2+0xa46> <== NOT EXECUTED
57e2a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57e30: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
57e34: 6000 0182 braw 57fb8 <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))
57e38: b8ae 0010 cmpl %fp@(16),%d4 <== NOT EXECUTED
57e3c: 6600 0120 bnew 57f5e <rtems_rfs_dir_del_entry+0x2e8> <== NOT EXECUTED
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
57e40: 2006 movel %d6,%d0 <== NOT EXECUTED
57e42: 2808 movel %a0,%d4 <== NOT EXECUTED
57e44: d083 addl %d3,%d0 <== NOT EXECUTED
57e46: 9880 subl %d0,%d4 <== NOT EXECUTED
memmove (entry, entry + elength, remaining);
57e48: 2f04 movel %d4,%sp@- <== NOT EXECUTED
57e4a: 4873 3800 pea %a3@(00000000,%d3:l) <== NOT EXECUTED
57e4e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57e50: 4eb9 0005 cd68 jsr 5cd68 <memmove> <== NOT EXECUTED
memset (entry + remaining, 0xff, elength);
57e56: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57e58: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
57e5c: 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);
57e60: 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);
57e62: 4eb9 0005 ce5c jsr 5ce5c <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);
57e68: 4280 clrl %d0 <== NOT EXECUTED
57e6a: 162b 0008 moveb %a3@(8),%d3 <== NOT EXECUTED
57e6e: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57e72: 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);
57e78: e18b lsll #8,%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57e7a: 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);
57e7c: 8680 orl %d0,%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57e7e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57e84: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
57e88: 4a00 tstb %d0 <== NOT EXECUTED
57e8a: 6742 beqs 57ece <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");
57e8c: 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: "
57e90: 660e bnes 57ea0 <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");
57e92: 4aae ffbc tstl %fp@(-68) <== NOT EXECUTED
57e96: 6608 bnes 57ea0 <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: "
57e98: 203c 0006 d750 movel #448336,%d0 <== NOT EXECUTED
57e9e: 6010 bras 57eb0 <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");
57ea0: 206e ffbc moveal %fp@(-68),%a0 <== NOT EXECUTED
57ea4: 5388 subql #1,%a0 <== NOT EXECUTED
57ea6: b1c0 cmpal %d0,%a0 <== NOT EXECUTED
57ea8: 67ee beqs 57e98 <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: "
57eaa: 203c 0006 db8b movel #449419,%d0 <== NOT EXECUTED
57eb0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57eb2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
57eb4: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57eb8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57eba: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
57ebe: 4879 0006 eaa6 pea 6eaa6 <CSWTCH.2+0xa92> <== NOT EXECUTED
57ec4: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57eca: 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) &&
57ece: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED
57ed4: 6666 bnes 57f3c <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
57ed6: 4a86 tstl %d6 <== NOT EXECUTED
57ed8: 6662 bnes 57f3c <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
57eda: 202e ffc4 movel %fp@(-60),%d0 <== NOT EXECUTED
57ede: 6606 bnes 57ee6 <rtems_rfs_dir_del_entry+0x270> <== NOT EXECUTED
57ee0: 4aae ffbc tstl %fp@(-68) <== NOT EXECUTED
57ee4: 670a beqs 57ef0 <rtems_rfs_dir_del_entry+0x27a> <== NOT EXECUTED
57ee6: 222e ffbc movel %fp@(-68),%d1 <== NOT EXECUTED
57eea: 5381 subql #1,%d1 <== NOT EXECUTED
57eec: b280 cmpl %d0,%d1 <== NOT EXECUTED
57eee: 664c bnes 57f3c <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
57ef0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57ef4: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57ef8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57efa: 4eb9 0005 691a jsr 5691a <rtems_rfs_block_map_shrink> <== NOT EXECUTED
if (rc > 0)
57f00: 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);
57f04: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
57f06: 6f34 bles 57f3c <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY))
57f08: 2f3c 4000 0000 movel #1073741824,%sp@- <== NOT EXECUTED
57f0e: 42a7 clrl %sp@- <== NOT EXECUTED
57f10: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57f16: 508f addql #8,%sp <== NOT EXECUTED
57f18: 4a00 tstb %d0 <== NOT EXECUTED
57f1a: 6720 beqs 57f3c <rtems_rfs_dir_del_entry+0x2c6> <== NOT EXECUTED
printf ("rtems-rfs: dir-del-entry: "
57f1c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57f1e: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57f24: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57f26: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57f28: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57f2c: 4879 0006 eb05 pea 6eb05 <CSWTCH.2+0xaf1> <== NOT EXECUTED
57f32: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57f38: 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);
57f3c: 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);
57f40: 7001 moveq #1,%d0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
57f42: 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);
57f44: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
57f48: 4eba f562 jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57f4c: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57f50: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57f52: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
57f58: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57f5c: 605e bras 57fbc <rtems_rfs_dir_del_entry+0x346> <== NOT EXECUTED
return 0;
}
if (!search)
57f5e: 4a07 tstb %d7 <== NOT EXECUTED
57f60: 6756 beqs 57fb8 <rtems_rfs_dir_del_entry+0x342> <== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
57f62: d7c3 addal %d3,%a3 <== NOT EXECUTED
eoffset += elength;
57f64: 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))
57f66: b3c6 cmpal %d6,%a1 <== NOT EXECUTED
57f68: 6200 fe46 bhiw 57db0 <rtems_rfs_dir_del_entry+0x13a> <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
57f6c: 4a85 tstl %d5 <== NOT EXECUTED
57f6e: 6620 bnes 57f90 <rtems_rfs_dir_del_entry+0x31a> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
57f70: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
57f74: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57f78: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57f7a: 4eb9 0005 6614 jsr 56614 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
57f80: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
57f84: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc == ENXIO)
57f86: 7006 moveq #6,%d0 <== NOT EXECUTED
57f88: b082 cmpl %d2,%d0 <== NOT EXECUTED
57f8a: 6606 bnes 57f92 <rtems_rfs_dir_del_entry+0x31c> <== NOT EXECUTED
rc = ENOENT;
57f8c: 7402 moveq #2,%d2 <== NOT EXECUTED
57f8e: 6008 bras 57f98 <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);
57f90: 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)
57f92: 4a82 tstl %d2 <== NOT EXECUTED
57f94: 6700 fd9c beqw 57d32 <rtems_rfs_dir_del_entry+0xbc> <== NOT EXECUTED
57f98: 2a02 movel %d2,%d5 <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
57f9a: 486e ffac pea %fp@(-84) <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
57f9e: 2405 movel %d5,%d2 <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
57fa0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57fa2: 4eba f508 jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
57fa6: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57faa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
57fac: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
57fb2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57fb6: 6004 bras 57fbc <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);
57fb8: 7a05 moveq #5,%d5 <== NOT EXECUTED
57fba: 60d4 bras 57f90 <rtems_rfs_dir_del_entry+0x31a> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
57fbc: 2002 movel %d2,%d0 <== NOT EXECUTED
57fbe: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED
57fc4: 4e5e unlk %fp <== NOT EXECUTED
0005830e <rtems_rfs_dir_empty>:
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
5830e: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED
58312: 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))
58316: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
5831c: 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))
58320: 42a7 clrl %sp@- <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
58322: 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))
58326: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5832c: 508f addql #8,%sp <== NOT EXECUTED
5832e: 4a00 tstb %d0 <== NOT EXECUTED
58330: 6712 beqs 58344 <rtems_rfs_dir_empty+0x36> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir));
58332: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
58336: 4879 0006 ec25 pea 6ec25 <CSWTCH.2+0xc11> <== NOT EXECUTED
5833c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58342: 508f addql #8,%sp <== NOT EXECUTED
empty = true;
rc = rtems_rfs_block_map_open (fs, dir, &map);
58344: 260e movel %fp,%d3 <== NOT EXECUTED
58346: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
5834c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5834e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58350: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58352: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
58358: 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);
5835c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5835e: 6e00 0186 bgtw 584e6 <rtems_rfs_dir_empty+0x1d8> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
58362: 2a0e movel %fp,%d5 <== NOT EXECUTED
58364: 0685 ffff ffa8 addil #-88,%d5 <== NOT EXECUTED
5836a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5836c: 42a7 clrl %sp@- <== NOT EXECUTED
5836e: 42a7 clrl %sp@- <== NOT EXECUTED
58370: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58372: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58374: 4eb9 0005 6596 jsr 56596 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
5837a: 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);
5837e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
58380: 6f10 bles 58392 <rtems_rfs_dir_empty+0x84> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
58382: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58384: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58386: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
5838c: 508f addql #8,%sp <== NOT EXECUTED
5838e: 6000 0156 braw 584e6 <rtems_rfs_dir_empty+0x1d8> <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
58392: 2c0e movel %fp,%d6 <== NOT EXECUTED
58394: 0686 ffff ffac addil #-84,%d6 <== NOT EXECUTED
5839a: 49f9 0005 6e84 lea 56e84 <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))
583a0: 4bf9 0005 044c lea 5044c <rtems_rfs_trace>,%a5 <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
583a6: 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;
583a8: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
583aa: 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;
583ae: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
583b2: 42ae ffb2 clrl %fp@(-78) <== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
583b6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
583ba: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
583be: 2f06 movel %d6,%sp@- <== NOT EXECUTED
583c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
583c2: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
583c4: 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);
583c8: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
583ca: 6e00 00e4 bgtw 584b0 <rtems_rfs_dir_empty+0x1a2> <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
583ce: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
offset = 0;
583d2: 4285 clrl %d5 <== NOT EXECUTED
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
583d4: 226a 0008 moveal %a2@(8),%a1 <== NOT EXECUTED
583d8: 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);
583dc: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
583e0: 6000 00b2 braw 58494 <rtems_rfs_dir_empty+0x186> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
583e4: 4283 clrl %d3 <== NOT EXECUTED
583e6: 1628 0008 moveb %a0@(8),%d3 <== NOT EXECUTED
583ea: 4280 clrl %d0 <== NOT EXECUTED
583ec: 1028 0009 moveb %a0@(9),%d0 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
583f0: 4284 clrl %d4 <== NOT EXECUTED
583f2: 1810 moveb %a0@,%d4 <== NOT EXECUTED
583f4: 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);
583f6: e18b lsll #8,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
583f8: 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);
583fa: 8680 orl %d0,%d3 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
583fc: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED
58400: 4840 swap %d0 <== NOT EXECUTED
58402: 4240 clrw %d0 <== NOT EXECUTED
58404: 8880 orl %d0,%d4 <== NOT EXECUTED
58406: 4280 clrl %d0 <== NOT EXECUTED
58408: 1028 0003 moveb %a0@(3),%d0 <== NOT EXECUTED
5840c: 8880 orl %d0,%d4 <== NOT EXECUTED
5840e: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
58412: e188 lsll #8,%d0 <== NOT EXECUTED
58414: 8880 orl %d0,%d4 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
58416: 0c83 0000 ffff cmpil #65535,%d3 <== NOT EXECUTED
5841c: 6700 00ae beqw 584cc <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
58420: 700a moveq #10,%d0 <== NOT EXECUTED
58422: b083 cmpl %d3,%d0 <== NOT EXECUTED
58424: 6c10 bges 58436 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
58426: b6aa 001c cmpl %a2@(28),%d3 <== NOT EXECUTED
5842a: 640a bccs 58436 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
5842c: 4a84 tstl %d4 <== NOT EXECUTED
5842e: 6706 beqs 58436 <rtems_rfs_dir_empty+0x128> <== NOT EXECUTED
58430: b8aa 0014 cmpl %a2@(20),%d4 <== NOT EXECUTED
58434: 632c blss 58462 <rtems_rfs_dir_empty+0x154> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY))
58436: 42a7 clrl %sp@- <== NOT EXECUTED
58438: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5843c: 4e95 jsr %a5@ <== NOT EXECUTED
5843e: 508f addql #8,%sp <== NOT EXECUTED
58440: 4a00 tstb %d0 <== NOT EXECUTED
58442: 6700 0088 beqw 584cc <rtems_rfs_dir_empty+0x1be> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: "
58446: 2f05 movel %d5,%sp@- <== NOT EXECUTED
58448: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5844a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5844c: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
58450: 4879 0006 ec44 pea 6ec44 <CSWTCH.2+0xc30> <== NOT EXECUTED
58456: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5845c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
58460: 606a bras 584cc <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)) ||
58462: 720b moveq #11,%d1 <== NOT EXECUTED
58464: b283 cmpl %d3,%d1 <== NOT EXECUTED
58466: 660c bnes 58474 <rtems_rfs_dir_empty+0x166> <== NOT EXECUTED
58468: 4280 clrl %d0 <== NOT EXECUTED
5846a: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
5846e: 123c 002e moveb #46,%d1 <== NOT EXECUTED
58472: 6018 bras 5848c <rtems_rfs_dir_empty+0x17e> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
58474: 700c moveq #12,%d0 <== NOT EXECUTED
58476: b083 cmpl %d3,%d0 <== NOT EXECUTED
58478: 662e bnes 584a8 <rtems_rfs_dir_empty+0x19a> <== NOT EXECUTED
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
5847a: 4280 clrl %d0 <== NOT EXECUTED
5847c: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
58480: 722e moveq #46,%d1 <== NOT EXECUTED
58482: b280 cmpl %d0,%d1 <== NOT EXECUTED
58484: 6622 bnes 584a8 <rtems_rfs_dir_empty+0x19a> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
58486: 4280 clrl %d0 <== NOT EXECUTED
58488: 1028 000b moveb %a0@(11),%d0 <== NOT EXECUTED
5848c: b280 cmpl %d0,%d1 <== NOT EXECUTED
5848e: 6618 bnes 584a8 <rtems_rfs_dir_empty+0x19a> <== NOT EXECUTED
{
empty = false;
break;
}
entry += elength;
58490: d1c3 addal %d3,%a0 <== NOT EXECUTED
offset += elength;
58492: 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))
58494: b3c5 cmpal %d5,%a1 <== NOT EXECUTED
58496: 6200 ff4c bhiw 583e4 <rtems_rfs_dir_empty+0xd6> <== NOT EXECUTED
5849a: 6030 bras 584cc <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)
5849c: 7006 moveq #6,%d0 <== NOT EXECUTED
5849e: b082 cmpl %d2,%d0 <== NOT EXECUTED
584a0: 56c0 sne %d0 <== NOT EXECUTED
584a2: 49c0 extbl %d0 <== NOT EXECUTED
584a4: c480 andl %d0,%d2 <== NOT EXECUTED
584a6: 6008 bras 584b0 <rtems_rfs_dir_empty+0x1a2> <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
584a8: 4a82 tstl %d2 <== NOT EXECUTED
584aa: 6604 bnes 584b0 <rtems_rfs_dir_empty+0x1a2> <== NOT EXECUTED
rc = ENOTEMPTY;
584ac: 143c 005a moveb #90,%d2 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
584b0: 486e ffac pea %fp@(-84) <== NOT EXECUTED
584b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
584b6: 4eba eff4 jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
584ba: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
584be: 2f0a movel %a2,%sp@- <== NOT EXECUTED
584c0: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
584c6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
584ca: 601a bras 584e6 <rtems_rfs_dir_empty+0x1d8> <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
584cc: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
584d0: 2f07 movel %d7,%sp@- <== NOT EXECUTED
584d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
584d4: 4eb9 0005 6614 jsr 56614 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc > 0)
584da: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
584de: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
584e0: 6f00 fed4 blew 583b6 <rtems_rfs_dir_empty+0xa8> <== NOT EXECUTED
584e4: 60b6 bras 5849c <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;
}
584e6: 2002 movel %d2,%d0 <== NOT EXECUTED
584e8: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED
584ee: 4e5e unlk %fp <== NOT EXECUTED
...
0005ba30 <rtems_rfs_dir_hash>:
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
5ba30: 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;
5ba34: 206e 0008 moveal %fp@(8),%a0
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
5ba38: 48d7 007c moveml %d2-%d6,%sp@
5ba3c: 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;
5ba40: 2004 movel %d4,%d0
5ba42: 0680 dfdf 169f addil #-539027809,%d0
5ba48: 2200 movel %d0,%d1
5ba4a: 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)
5ba4c: 6000 00f2 braw 5bb40 <rtems_rfs_dir_hash+0x110>
{
a += k[0];
5ba50: 4282 clrl %d2 <== NOT EXECUTED
5ba52: 1410 moveb %a0@,%d2 <== NOT EXECUTED
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
5ba54: 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];
5ba56: 43f1 2800 lea %a1@(00000000,%d2:l),%a1 <== NOT EXECUTED
a += ((uint32_t)k[1])<<8;
5ba5a: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
5ba5e: 1628 0002 moveb %a0@(2),%d3 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
5ba62: 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);
5ba64: 7c1c moveq #28,%d6 <== NOT EXECUTED
length -= 12;
5ba66: 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;
5ba6c: e18a lsll #8,%d2 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
5ba6e: 4843 swap %d3 <== NOT EXECUTED
5ba70: 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;
5ba72: d489 addl %a1,%d2 <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
5ba74: d483 addl %d3,%d2 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
5ba76: 4283 clrl %d3 <== NOT EXECUTED
5ba78: 1628 0003 moveb %a0@(3),%d3 <== NOT EXECUTED
5ba7c: ebab lsll %d5,%d3 <== NOT EXECUTED
5ba7e: d483 addl %d3,%d2 <== NOT EXECUTED
b += k[4];
5ba80: 4283 clrl %d3 <== NOT EXECUTED
5ba82: 1628 0004 moveb %a0@(4),%d3 <== NOT EXECUTED
5ba86: d283 addl %d3,%d1 <== NOT EXECUTED
b += ((uint32_t)k[5])<<8;
5ba88: 1628 0005 moveb %a0@(5),%d3 <== NOT EXECUTED
5ba8c: e18b lsll #8,%d3 <== NOT EXECUTED
5ba8e: d283 addl %d3,%d1 <== NOT EXECUTED
b += ((uint32_t)k[6])<<16;
5ba90: 4283 clrl %d3 <== NOT EXECUTED
5ba92: 1628 0006 moveb %a0@(6),%d3 <== NOT EXECUTED
5ba96: 4843 swap %d3 <== NOT EXECUTED
5ba98: 4243 clrw %d3 <== NOT EXECUTED
5ba9a: d283 addl %d3,%d1 <== NOT EXECUTED
b += ((uint32_t)k[7])<<24;
5ba9c: 4283 clrl %d3 <== NOT EXECUTED
5ba9e: 1628 0007 moveb %a0@(7),%d3 <== NOT EXECUTED
5baa2: ebab lsll %d5,%d3 <== NOT EXECUTED
5baa4: d283 addl %d3,%d1 <== NOT EXECUTED
c += k[8];
5baa6: 4283 clrl %d3 <== NOT EXECUTED
5baa8: 1628 0008 moveb %a0@(8),%d3 <== NOT EXECUTED
5baac: d083 addl %d3,%d0 <== NOT EXECUTED
c += ((uint32_t)k[9])<<8;
5baae: 1628 0009 moveb %a0@(9),%d3 <== NOT EXECUTED
5bab2: e18b lsll #8,%d3 <== NOT EXECUTED
5bab4: d083 addl %d3,%d0 <== NOT EXECUTED
c += ((uint32_t)k[10])<<16;
5bab6: 4283 clrl %d3 <== NOT EXECUTED
5bab8: 1628 000a moveb %a0@(10),%d3 <== NOT EXECUTED
5babc: 4843 swap %d3 <== NOT EXECUTED
5babe: 4243 clrw %d3 <== NOT EXECUTED
5bac0: d083 addl %d3,%d0 <== NOT EXECUTED
c += ((uint32_t)k[11])<<24;
5bac2: 4283 clrl %d3 <== NOT EXECUTED
5bac4: 1628 000b moveb %a0@(11),%d3 <== NOT EXECUTED
mix(a,b,c);
length -= 12;
k += 12;
5bac8: 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;
5bacc: ebab lsll %d5,%d3 <== NOT EXECUTED
5bace: d083 addl %d3,%d0 <== NOT EXECUTED
mix(a,b,c);
5bad0: 2600 movel %d0,%d3 <== NOT EXECUTED
5bad2: 2a00 movel %d0,%d5 <== NOT EXECUTED
5bad4: ecad lsrl %d6,%d5 <== NOT EXECUTED
5bad6: 9480 subl %d0,%d2 <== NOT EXECUTED
5bad8: 2240 moveal %d0,%a1 <== NOT EXECUTED
5bada: d3c1 addal %d1,%a1 <== NOT EXECUTED
5badc: 1c3c 0018 moveb #24,%d6 <== NOT EXECUTED
5bae0: e98b lsll #4,%d3 <== NOT EXECUTED
5bae2: 8685 orl %d5,%d3 <== NOT EXECUTED
5bae4: 7a1a moveq #26,%d5 <== NOT EXECUTED
5bae6: b782 eorl %d3,%d2 <== NOT EXECUTED
5bae8: 2002 movel %d2,%d0 <== NOT EXECUTED
5baea: 2602 movel %d2,%d3 <== NOT EXECUTED
5baec: eaab lsrl %d5,%d3 <== NOT EXECUTED
5baee: 9282 subl %d2,%d1 <== NOT EXECUTED
5baf0: d489 addl %a1,%d2 <== NOT EXECUTED
5baf2: ed88 lsll #6,%d0 <== NOT EXECUTED
5baf4: 8083 orl %d3,%d0 <== NOT EXECUTED
5baf6: 2609 movel %a1,%d3 <== NOT EXECUTED
5baf8: b380 eorl %d1,%d0 <== NOT EXECUTED
5bafa: 2200 movel %d0,%d1 <== NOT EXECUTED
5bafc: 2a00 movel %d0,%d5 <== NOT EXECUTED
5bafe: ecad lsrl %d6,%d5 <== NOT EXECUTED
5bb00: 9680 subl %d0,%d3 <== NOT EXECUTED
5bb02: d082 addl %d2,%d0 <== NOT EXECUTED
5bb04: 1c3c 000d moveb #13,%d6 <== NOT EXECUTED
5bb08: e189 lsll #8,%d1 <== NOT EXECUTED
5bb0a: 8285 orl %d5,%d1 <== NOT EXECUTED
5bb0c: 7a13 moveq #19,%d5 <== NOT EXECUTED
5bb0e: b781 eorl %d3,%d1 <== NOT EXECUTED
5bb10: 2601 movel %d1,%d3 <== NOT EXECUTED
5bb12: 9481 subl %d1,%d2 <== NOT EXECUTED
5bb14: 4843 swap %d3 <== NOT EXECUTED
5bb16: b583 eorl %d2,%d3 <== NOT EXECUTED
5bb18: 2401 movel %d1,%d2 <== NOT EXECUTED
5bb1a: d480 addl %d0,%d2 <== NOT EXECUTED
5bb1c: 2203 movel %d3,%d1 <== NOT EXECUTED
5bb1e: 9083 subl %d3,%d0 <== NOT EXECUTED
5bb20: 2243 moveal %d3,%a1 <== NOT EXECUTED
5bb22: d3c2 addal %d2,%a1 <== NOT EXECUTED
5bb24: eba9 lsll %d5,%d1 <== NOT EXECUTED
5bb26: 2a03 movel %d3,%d5 <== NOT EXECUTED
5bb28: ecad lsrl %d6,%d5 <== NOT EXECUTED
5bb2a: 8285 orl %d5,%d1 <== NOT EXECUTED
5bb2c: 7a1c moveq #28,%d5 <== NOT EXECUTED
5bb2e: b181 eorl %d0,%d1 <== NOT EXECUTED
5bb30: 2001 movel %d1,%d0 <== NOT EXECUTED
5bb32: 2601 movel %d1,%d3 <== NOT EXECUTED
5bb34: eaab lsrl %d5,%d3 <== NOT EXECUTED
5bb36: 9481 subl %d1,%d2 <== NOT EXECUTED
5bb38: d289 addl %a1,%d1 <== NOT EXECUTED
5bb3a: e988 lsll #4,%d0 <== NOT EXECUTED
5bb3c: 8083 orl %d3,%d0 <== NOT EXECUTED
5bb3e: 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)
5bb40: 7c0c moveq #12,%d6
5bb42: bc84 cmpl %d4,%d6
5bb44: 6500 ff0a bcsw 5ba50 <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 */
5bb48: 5384 subql #1,%d4
5bb4a: 740b moveq #11,%d2
5bb4c: b484 cmpl %d4,%d2
5bb4e: 6500 0118 bcsw 5bc68 <rtems_rfs_dir_hash+0x238>
5bb52: 343b 4a08 movew %pc@(5bb5c <rtems_rfs_dir_hash+0x12c>,%d4:l:2),%d2
5bb56: 48c2 extl %d2
5bb58: 4efb 2802 jmp %pc@(5bb5c <rtems_rfs_dir_hash+0x12c>,%d2:l)
5bb5c: 0090 0086 007a oril #8781946,%d0 <== NOT EXECUTED
5bb62: 006c .short 0x006c <== NOT EXECUTED
5bb64: 0064 .short 0x0064 <== NOT EXECUTED
5bb66: 005a .short 0x005a <== NOT EXECUTED
5bb68: 004e .short 0x004e <== NOT EXECUTED
5bb6a: 0042 .short 0x0042 <== NOT EXECUTED
5bb6c: 003a .short 0x003a <== NOT EXECUTED
5bb6e: 0030 .short 0x0030 <== NOT EXECUTED
5bb70: 0024 .short 0x0024 <== NOT EXECUTED
5bb72: 0018 .short 0x0018 <== NOT EXECUTED
{
case 12: c+=((uint32_t)k[11])<<24;
5bb74: 4282 clrl %d2 <== NOT EXECUTED
5bb76: 1428 000b moveb %a0@(11),%d2 <== NOT EXECUTED
5bb7a: 7618 moveq #24,%d3 <== NOT EXECUTED
5bb7c: e7aa lsll %d3,%d2 <== NOT EXECUTED
5bb7e: d082 addl %d2,%d0 <== NOT EXECUTED
case 11: c+=((uint32_t)k[10])<<16;
5bb80: 4282 clrl %d2 <== NOT EXECUTED
5bb82: 1428 000a moveb %a0@(10),%d2 <== NOT EXECUTED
5bb86: 4842 swap %d2 <== NOT EXECUTED
5bb88: 4242 clrw %d2 <== NOT EXECUTED
5bb8a: d082 addl %d2,%d0 <== NOT EXECUTED
case 10: c+=((uint32_t)k[9])<<8;
5bb8c: 4282 clrl %d2 <== NOT EXECUTED
5bb8e: 1428 0009 moveb %a0@(9),%d2 <== NOT EXECUTED
5bb92: e18a lsll #8,%d2 <== NOT EXECUTED
5bb94: d082 addl %d2,%d0 <== NOT EXECUTED
case 9 : c+=k[8];
5bb96: 4282 clrl %d2 <== NOT EXECUTED
5bb98: 1428 0008 moveb %a0@(8),%d2 <== NOT EXECUTED
5bb9c: d082 addl %d2,%d0 <== NOT EXECUTED
case 8 : b+=((uint32_t)k[7])<<24;
5bb9e: 4282 clrl %d2 <== NOT EXECUTED
5bba0: 1428 0007 moveb %a0@(7),%d2 <== NOT EXECUTED
5bba4: 7818 moveq #24,%d4 <== NOT EXECUTED
5bba6: e9aa lsll %d4,%d2 <== NOT EXECUTED
5bba8: d282 addl %d2,%d1 <== NOT EXECUTED
case 7 : b+=((uint32_t)k[6])<<16;
5bbaa: 4282 clrl %d2 <== NOT EXECUTED
5bbac: 1428 0006 moveb %a0@(6),%d2 <== NOT EXECUTED
5bbb0: 4842 swap %d2 <== NOT EXECUTED
5bbb2: 4242 clrw %d2 <== NOT EXECUTED
5bbb4: d282 addl %d2,%d1 <== NOT EXECUTED
case 6 : b+=((uint32_t)k[5])<<8;
5bbb6: 4282 clrl %d2 <== NOT EXECUTED
5bbb8: 1428 0005 moveb %a0@(5),%d2 <== NOT EXECUTED
5bbbc: e18a lsll #8,%d2 <== NOT EXECUTED
5bbbe: d282 addl %d2,%d1 <== NOT EXECUTED
case 5 : b+=k[4];
5bbc0: 4282 clrl %d2 <== NOT EXECUTED
5bbc2: 1428 0004 moveb %a0@(4),%d2 <== NOT EXECUTED
5bbc6: d282 addl %d2,%d1 <== NOT EXECUTED
case 4 : a+=((uint32_t)k[3])<<24;
5bbc8: 4282 clrl %d2 <== NOT EXECUTED
5bbca: 1428 0003 moveb %a0@(3),%d2 <== NOT EXECUTED
5bbce: 7a18 moveq #24,%d5 <== NOT EXECUTED
5bbd0: ebaa lsll %d5,%d2 <== NOT EXECUTED
5bbd2: 43f1 2800 lea %a1@(00000000,%d2:l),%a1 <== NOT EXECUTED
case 3 : a+=((uint32_t)k[2])<<16;
5bbd6: 4282 clrl %d2 <== NOT EXECUTED
5bbd8: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED
5bbdc: 4842 swap %d2 <== NOT EXECUTED
5bbde: 4242 clrw %d2 <== NOT EXECUTED
5bbe0: d3c2 addal %d2,%a1 <== NOT EXECUTED
case 2 : a+=((uint32_t)k[1])<<8;
5bbe2: 4282 clrl %d2 <== NOT EXECUTED
5bbe4: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
5bbe8: e18a lsll #8,%d2 <== NOT EXECUTED
5bbea: d3c2 addal %d2,%a1 <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
5bbec: 2801 movel %d1,%d4
5bbee: 7a0e moveq #14,%d5
5bbf0: 2601 movel %d1,%d3
5bbf2: 7c12 moveq #18,%d6
5bbf4: 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];
5bbf6: 4282 clrl %d2
break;
case 0 : return c;
}
}
final(a,b,c);
5bbf8: 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];
5bbfc: 1410 moveb %a0@,%d2
5bbfe: d489 addl %a1,%d2
break;
case 0 : return c;
}
}
final(a,b,c);
5bc00: ebac lsll %d5,%d4
5bc02: b380 eorl %d1,%d0
5bc04: 1a3c 0015 moveb #21,%d5
5bc08: 8684 orl %d4,%d3
5bc0a: 9083 subl %d3,%d0
5bc0c: 2600 movel %d0,%d3
5bc0e: 2800 movel %d0,%d4
5bc10: eaac lsrl %d5,%d4
5bc12: 1a3c 001c moveb #28,%d5
5bc16: edab lsll %d6,%d3
5bc18: b182 eorl %d0,%d2
5bc1a: 1c3c 0019 moveb #25,%d6
5bc1e: 8684 orl %d4,%d3
5bc20: 9483 subl %d3,%d2
5bc22: 2602 movel %d2,%d3
5bc24: 2802 movel %d2,%d4
5bc26: ee8c lsrl #7,%d4
5bc28: edab lsll %d6,%d3
5bc2a: b581 eorl %d2,%d1
5bc2c: 1c3c 000e moveb #14,%d6
5bc30: 8684 orl %d4,%d3
5bc32: 9283 subl %d3,%d1
5bc34: 2601 movel %d1,%d3
5bc36: 4843 swap %d3
5bc38: b380 eorl %d1,%d0
5bc3a: 9083 subl %d3,%d0
5bc3c: 2600 movel %d0,%d3
5bc3e: 2800 movel %d0,%d4
5bc40: eaac lsrl %d5,%d4
5bc42: 1a3c 0018 moveb #24,%d5
5bc46: e98b lsll #4,%d3
5bc48: b182 eorl %d0,%d2
5bc4a: 8684 orl %d4,%d3
5bc4c: 7812 moveq #18,%d4
5bc4e: 9483 subl %d3,%d2
5bc50: 2602 movel %d2,%d3
5bc52: b581 eorl %d2,%d1
5bc54: edab lsll %d6,%d3
5bc56: e8aa lsrl %d4,%d2
5bc58: 8682 orl %d2,%d3
5bc5a: 9283 subl %d3,%d1
5bc5c: 2401 movel %d1,%d2
5bc5e: b380 eorl %d1,%d0
5bc60: ebaa lsll %d5,%d2
5bc62: e089 lsrl #8,%d1
5bc64: 8481 orl %d1,%d2
5bc66: 9082 subl %d2,%d0
return c;
}
5bc68: 4cd7 007c moveml %sp@,%d2-%d6
5bc6c: 4e5e unlk %fp <== NOT EXECUTED
000574d6 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
574d6: 4e56 ff7c linkw %fp,#-132 <== NOT EXECUTED
574da: 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))
574de: 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)
{
574e4: 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))
574e8: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
574ea: 286e 000c moveal %fp@(12),%a4 <== NOT EXECUTED
574ee: 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))
574f2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
574f8: 508f addql #8,%sp <== NOT EXECUTED
574fa: 4a00 tstb %d0 <== NOT EXECUTED
574fc: 6748 beqs 57546 <rtems_rfs_dir_lookup_ino+0x70> <== NOT EXECUTED
{
int c;
printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=",
574fe: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57502: 4879 0006 e5e5 pea 6e5e5 <CSWTCH.2+0x5d1> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
printf ("%c", name[c]);
57508: 243c 0005 d13c movel #381244,%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=",
5750e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
inode->ino);
for (c = 0; c < length; c++)
57514: 246e 0010 moveal %fp@(16),%a2 <== NOT EXECUTED
57518: 508f addql #8,%sp <== NOT EXECUTED
5751a: 600c bras 57528 <rtems_rfs_dir_lookup_ino+0x52> <== NOT EXECUTED
printf ("%c", name[c]);
5751c: 2042 moveal %d2,%a0 <== NOT EXECUTED
5751e: 101a moveb %a2@+,%d0 <== NOT EXECUTED
57520: 49c0 extbl %d0 <== NOT EXECUTED
57522: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57524: 4e90 jsr %a0@ <== NOT EXECUTED
57526: 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,
57528: 200a movel %a2,%d0 <== NOT EXECUTED
5752a: 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++)
5752e: b0ae 0014 cmpl %fp@(20),%d0 <== NOT EXECUTED
57532: 6de8 blts 5751c <rtems_rfs_dir_lookup_ino+0x46> <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
57534: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
57538: 4879 0006 e61c pea 6e61c <CSWTCH.2+0x608> <== NOT EXECUTED
5753e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57544: 508f addql #8,%sp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
57546: 4295 clrl %a5@ <== NOT EXECUTED
*offset = 0;
57548: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
5754c: 260e movel %fp,%d3 <== NOT EXECUTED
5754e: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
57554: 4290 clrl %a0@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
57556: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57558: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5755a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5755c: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
57562: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
57566: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
57568: 6f3a bles 575a4 <rtems_rfs_dir_lookup_ino+0xce> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
5756a: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
57570: 42a7 clrl %sp@- <== NOT EXECUTED
57572: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57578: 508f addql #8,%sp <== NOT EXECUTED
5757a: 4a00 tstb %d0 <== NOT EXECUTED
5757c: 6700 03a0 beqw 5791e <rtems_rfs_dir_lookup_ino+0x448> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s",
57580: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57582: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57588: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5758a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5758c: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57590: 4879 0006 e626 pea 6e626 <CSWTCH.2+0x612> <== NOT EXECUTED
57596: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5759c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
575a0: 6000 037c braw 5791e <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);
575a4: 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);
575a8: 2e0e movel %fp,%d7 <== NOT EXECUTED
575aa: 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);
575b0: 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;
575b4: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
575b6: 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;
575ba: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
575be: 42ae ffb2 clrl %fp@(-78) <== NOT EXECUTED
575c2: 4eb9 0005 ba30 jsr 5ba30 <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);
575c8: 2f07 movel %d7,%sp@- <== NOT EXECUTED
575ca: 42a7 clrl %sp@- <== NOT EXECUTED
575cc: 42a7 clrl %sp@- <== NOT EXECUTED
575ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
575d0: 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);
575d4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
575d6: 4eb9 0005 6596 jsr 56596 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
575dc: 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);
575e0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
575e2: 6f00 02be blew 578a2 <rtems_rfs_dir_lookup_ino+0x3cc> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
575e6: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
575ec: 42a7 clrl %sp@- <== NOT EXECUTED
575ee: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
575f4: 508f addql #8,%sp <== NOT EXECUTED
575f6: 4a00 tstb %d0 <== NOT EXECUTED
575f8: 671c beqs 57616 <rtems_rfs_dir_lookup_ino+0x140> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n",
575fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
575fc: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57602: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57604: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57606: 4879 0006 e665 pea 6e665 <CSWTCH.2+0x651> <== NOT EXECUTED
5760c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57612: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
if (rc == ENXIO)
57616: 7206 moveq #6,%d1 <== NOT EXECUTED
57618: b282 cmpl %d2,%d1 <== NOT EXECUTED
5761a: 6600 02c6 bnew 578e2 <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
rc = ENOENT;
5761e: 7402 moveq #2,%d2 <== NOT EXECUTED
57620: 6000 02c0 braw 578e2 <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))
57624: 2044 moveal %d4,%a0 <== NOT EXECUTED
57626: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
5762c: 42a7 clrl %sp@- <== NOT EXECUTED
5762e: 4e90 jsr %a0@ <== NOT EXECUTED
57630: 508f addql #8,%sp <== NOT EXECUTED
57632: 4a00 tstb %d0 <== NOT EXECUTED
57634: 6716 beqs 5764c <rtems_rfs_dir_lookup_ino+0x176> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n",
57636: 2f2e ffc4 movel %fp@(-60),%sp@- <== NOT EXECUTED
5763a: 2045 moveal %d5,%a0 <== NOT EXECUTED
5763c: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57640: 4879 0006 e69f pea 6e69f <CSWTCH.2+0x68b> <== NOT EXECUTED
57646: 4e90 jsr %a0@ <== NOT EXECUTED
57648: 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);
5764c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
57650: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
57654: 486e ffac pea %fp@(-84) <== NOT EXECUTED
57658: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5765a: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
57660: 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);
57664: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
57666: 6f3e bles 576a6 <rtems_rfs_dir_lookup_ino+0x1d0> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
57668: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
5766e: 42a7 clrl %sp@- <== NOT EXECUTED
57670: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57676: 508f addql #8,%sp <== NOT EXECUTED
57678: 4a00 tstb %d0 <== NOT EXECUTED
5767a: 6700 029e beqw 5791a <rtems_rfs_dir_lookup_ino+0x444> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n",
5767e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
57680: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57686: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57688: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5768a: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
5768e: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
57692: 4879 0006 e6d7 pea 6e6d7 <CSWTCH.2+0x6c3> <== NOT EXECUTED
57698: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5769e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
576a2: 6000 0276 braw 5791a <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);
576a6: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
map.bpos.boff = 0;
576aa: 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);
576ae: 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))
576b2: 6000 0180 braw 57834 <rtems_rfs_dir_lookup_ino+0x35e> <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
576b6: 4281 clrl %d1 <== NOT EXECUTED
576b8: 122a 0004 moveb %a2@(4),%d1 <== NOT EXECUTED
576bc: 7018 moveq #24,%d0 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
576be: 4287 clrl %d7 <== NOT EXECUTED
576c0: 1e2a 0008 moveb %a2@(8),%d7 <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
576c4: 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);
576c6: e1a9 lsll %d0,%d1 <== NOT EXECUTED
576c8: 4280 clrl %d0 <== NOT EXECUTED
576ca: 102a 0005 moveb %a2@(5),%d0 <== NOT EXECUTED
576ce: 4840 swap %d0 <== NOT EXECUTED
576d0: 4240 clrw %d0 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
576d2: 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);
576d4: 8280 orl %d0,%d1 <== NOT EXECUTED
576d6: 4280 clrl %d0 <== NOT EXECUTED
576d8: 102a 0007 moveb %a2@(7),%d0 <== NOT EXECUTED
576dc: 8280 orl %d0,%d1 <== NOT EXECUTED
576de: 102a 0006 moveb %a2@(6),%d0 <== NOT EXECUTED
576e2: e188 lsll #8,%d0 <== NOT EXECUTED
576e4: 8280 orl %d0,%d1 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
576e6: 4280 clrl %d0 <== NOT EXECUTED
576e8: 102a 0009 moveb %a2@(9),%d0 <== NOT EXECUTED
576ec: 8e80 orl %d0,%d7 <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
576ee: 1012 moveb %a2@,%d0 <== NOT EXECUTED
576f0: eda8 lsll %d6,%d0 <== NOT EXECUTED
576f2: 4286 clrl %d6 <== NOT EXECUTED
576f4: 1c2a 0001 moveb %a2@(1),%d6 <== NOT EXECUTED
576f8: 4846 swap %d6 <== NOT EXECUTED
576fa: 4246 clrw %d6 <== NOT EXECUTED
576fc: 8086 orl %d6,%d0 <== NOT EXECUTED
576fe: 4286 clrl %d6 <== NOT EXECUTED
57700: 1c2a 0003 moveb %a2@(3),%d6 <== NOT EXECUTED
57704: 8086 orl %d6,%d0 <== NOT EXECUTED
57706: 1c2a 0002 moveb %a2@(2),%d6 <== NOT EXECUTED
5770a: e18e lsll #8,%d6 <== NOT EXECUTED
5770c: 8086 orl %d6,%d0 <== NOT EXECUTED
5770e: 2a80 movel %d0,%a5@ <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
57710: 0c87 0000 ffff cmpil #65535,%d7 <== NOT EXECUTED
57716: 660a bnes 57722 <rtems_rfs_dir_lookup_ino+0x24c> <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
57718: 4a83 tstl %d3 <== NOT EXECUTED
5771a: 6600 0182 bnew 5789e <rtems_rfs_dir_lookup_ino+0x3c8> <== NOT EXECUTED
5771e: 6000 012a braw 5784a <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))
57722: 7c0a moveq #10,%d6 <== NOT EXECUTED
57724: bc87 cmpl %d7,%d6 <== NOT EXECUTED
57726: 6d16 blts 5773e <rtems_rfs_dir_lookup_ino+0x268> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
57728: 2044 moveal %d4,%a0 <== NOT EXECUTED
5772a: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
57730: 42a7 clrl %sp@- <== NOT EXECUTED
57732: 4e90 jsr %a0@ <== NOT EXECUTED
57734: 508f addql #8,%sp <== NOT EXECUTED
57736: 4a00 tstb %d0 <== NOT EXECUTED
57738: 6700 01c4 beqw 578fe <rtems_rfs_dir_lookup_ino+0x428> <== NOT EXECUTED
5773c: 6012 bras 57750 <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))
5773e: beab 001c cmpl %a3@(28),%d7 <== NOT EXECUTED
57742: 64e4 bccs 57728 <rtems_rfs_dir_lookup_ino+0x252> <== NOT EXECUTED
57744: 4a80 tstl %d0 <== NOT EXECUTED
57746: 67e0 beqs 57728 <rtems_rfs_dir_lookup_ino+0x252> <== NOT EXECUTED
57748: b0ab 0014 cmpl %a3@(20),%d0 <== NOT EXECUTED
5774c: 6320 blss 5776e <rtems_rfs_dir_lookup_ino+0x298> <== NOT EXECUTED
5774e: 60d8 bras 57728 <rtems_rfs_dir_lookup_ino+0x252> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
printf ("rtems-rfs: dir-lookup-ino: "
57750: 2f2e ffc8 movel %fp@(-56),%sp@- <== NOT EXECUTED
57754: 2045 moveal %d5,%a0 <== NOT EXECUTED
57756: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
57758: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5775a: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
5775e: 4879 0006 e719 pea 6e719 <CSWTCH.2+0x705> <== NOT EXECUTED
57764: 4e90 jsr %a0@ <== NOT EXECUTED
57766: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5776a: 6000 0192 braw 578fe <rtems_rfs_dir_lookup_ino+0x428> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
5776e: b2ae ffa4 cmpl %fp@(-92),%d1 <== NOT EXECUTED
57772: 6600 00ba bnew 5782e <rtems_rfs_dir_lookup_ino+0x358> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK))
57776: 2044 moveal %d4,%a0 <== NOT EXECUTED
57778: 2f3c 0800 0000 movel #134217728,%sp@- <== NOT EXECUTED
5777e: 42a7 clrl %sp@- <== NOT EXECUTED
57780: 4e90 jsr %a0@ <== NOT EXECUTED
57782: 508f addql #8,%sp <== NOT EXECUTED
57784: 4a00 tstb %d0 <== NOT EXECUTED
57786: 6742 beqs 577ca <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));
57788: 4280 clrl %d0 <== NOT EXECUTED
5778a: 1012 moveb %a2@,%d0 <== NOT EXECUTED
5778c: 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: "
5778e: 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));
57790: e3a8 lsll %d1,%d0 <== NOT EXECUTED
57792: 4281 clrl %d1 <== NOT EXECUTED
57794: 122a 0001 moveb %a2@(1),%d1 <== NOT EXECUTED
57798: 4841 swap %d1 <== NOT EXECUTED
5779a: 4241 clrw %d1 <== NOT EXECUTED
5779c: 8081 orl %d1,%d0 <== NOT EXECUTED
5779e: 4281 clrl %d1 <== NOT EXECUTED
577a0: 122a 0003 moveb %a2@(3),%d1 <== NOT EXECUTED
577a4: 8081 orl %d1,%d0 <== NOT EXECUTED
577a6: 122a 0002 moveb %a2@(2),%d1 <== NOT EXECUTED
577aa: 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: "
577ac: 8081 orl %d1,%d0 <== NOT EXECUTED
577ae: 2f00 movel %d0,%sp@- <== NOT EXECUTED
577b0: 2f07 movel %d7,%sp@- <== NOT EXECUTED
577b2: 2f2e ffc8 movel %fp@(-56),%sp@- <== NOT EXECUTED
577b6: 2f2e ffc4 movel %fp@(-60),%sp@- <== NOT EXECUTED
577ba: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
577be: 4879 0006 e763 pea 6e763 <CSWTCH.2+0x74f> <== NOT EXECUTED
577c4: 4e90 jsr %a0@ <== NOT EXECUTED
577c6: 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)
577ca: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
577ce: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
577d2: 486a 000a pea %a2@(10) <== NOT EXECUTED
577d6: 4eb9 0005 cc68 jsr 5cc68 <memcmp> <== NOT EXECUTED
577dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
577e0: 4a80 tstl %d0 <== NOT EXECUTED
577e2: 664a bnes 5782e <rtems_rfs_dir_lookup_ino+0x358> <== NOT EXECUTED
{
*offset = rtems_rfs_block_map_pos (fs, &map);
577e4: 486e ffc4 pea %fp@(-60) <== NOT EXECUTED
577e8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
577ea: 4eb9 0005 6092 jsr 56092 <rtems_rfs_block_get_pos> <== NOT EXECUTED
577f0: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
577f4: 2081 movel %d1,%a0@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
577f6: 2f3c 1000 0000 movel #268435456,%sp@- <== NOT EXECUTED
577fc: 42a7 clrl %sp@- <== NOT EXECUTED
577fe: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57804: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
57808: 4a00 tstb %d0 <== NOT EXECUTED
5780a: 6700 00d6 beqw 578e2 <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
5780e: 206e 001c moveal %fp@(28),%a0 <== NOT EXECUTED
57812: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
57814: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
57816: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
5781a: 4879 0006 e7c1 pea 6e7c1 <CSWTCH.2+0x7ad> <== NOT EXECUTED
57820: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
57826: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5782a: 6000 00b6 braw 578e2 <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return 0;
}
}
map.bpos.boff += elength;
5782e: dfae ffc8 addl %d7,%fp@(-56) <== NOT EXECUTED
entry += elength;
57832: 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))
57834: 202b 0008 movel %a3@(8),%d0 <== NOT EXECUTED
57838: 0680 ffff fff6 addil #-10,%d0 <== NOT EXECUTED
5783e: b0ae ffc8 cmpl %fp@(-56),%d0 <== NOT EXECUTED
57842: 6200 fe72 bhiw 576b6 <rtems_rfs_dir_lookup_ino+0x1e0> <== NOT EXECUTED
57846: 6000 fed0 braw 57718 <rtems_rfs_dir_lookup_ino+0x242> <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5784a: 486e ffa8 pea %fp@(-88) <== NOT EXECUTED
5784e: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
57852: 2f0b movel %a3,%sp@- <== NOT EXECUTED
57854: 4eb9 0005 6614 jsr 56614 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if ((rc > 0) && (rc != ENXIO))
5785a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
5785e: 2400 movel %d0,%d2 <== NOT EXECUTED
if ((rc > 0) && (rc != ENXIO))
57860: 6f4c bles 578ae <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
57862: 7006 moveq #6,%d0 <== NOT EXECUTED
57864: b082 cmpl %d2,%d0 <== NOT EXECUTED
57866: 6732 beqs 5789a <rtems_rfs_dir_lookup_ino+0x3c4> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO))
57868: 2044 moveal %d4,%a0 <== NOT EXECUTED
5786a: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
57870: 42a7 clrl %sp@- <== NOT EXECUTED
57872: 4e90 jsr %a0@ <== NOT EXECUTED
57874: 508f addql #8,%sp <== NOT EXECUTED
57876: 4a00 tstb %d0 <== NOT EXECUTED
57878: 6734 beqs 578ae <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
printf ("rtems-rfs: dir-lookup-ino: "
5787a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5787c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
57882: 2045 moveal %d5,%a0 <== NOT EXECUTED
57884: 2f00 movel %d0,%sp@- <== NOT EXECUTED
57886: 2f02 movel %d2,%sp@- <== NOT EXECUTED
57888: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
5788c: 4879 0006 e808 pea 6e808 <CSWTCH.2+0x7f4> <== NOT EXECUTED
57892: 4e90 jsr %a0@ <== NOT EXECUTED
57894: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
57898: 6014 bras 578ae <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;
5789a: 7402 moveq #2,%d2 <== NOT EXECUTED
5789c: 607a bras 57918 <rtems_rfs_dir_lookup_ino+0x442> <== NOT EXECUTED
5789e: 2403 movel %d3,%d2 <== NOT EXECUTED
578a0: 600c bras 578ae <rtems_rfs_dir_lookup_ino+0x3d8> <== NOT EXECUTED
578a2: 283c 0005 044c movel #328780,%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",
578a8: 2a3c 0005 cfac movel #380844,%d5 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
578ae: 4a82 tstl %d2 <== NOT EXECUTED
578b0: 6666 bnes 57918 <rtems_rfs_dir_lookup_ino+0x442> <== NOT EXECUTED
578b2: 4aae ffa8 tstl %fp@(-88) <== NOT EXECUTED
578b6: 6600 fd6c bnew 57624 <rtems_rfs_dir_lookup_ino+0x14e> <== NOT EXECUTED
578ba: 6046 bras 57902 <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",
578bc: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
578c0: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
578c6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
578c8: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
578cc: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
578d0: 4879 0006 e853 pea 6e853 <CSWTCH.2+0x83f> <== NOT EXECUTED
578d6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
578dc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
}
if ((rc == 0) && (block == 0))
{
rc = EIO;
578e0: 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);
578e2: 486e ffac pea %fp@(-84) <== NOT EXECUTED
578e6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
578e8: 4eba fbc2 jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
578ec: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
578f0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
578f2: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
578f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
578fc: 6020 bras 5791e <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;
578fe: 7605 moveq #5,%d3 <== NOT EXECUTED
57900: 609c bras 5789e <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))
57902: 2f3c 0400 0000 movel #67108864,%sp@- <== NOT EXECUTED
57908: 42a7 clrl %sp@- <== NOT EXECUTED
5790a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57910: 508f addql #8,%sp <== NOT EXECUTED
57912: 4a00 tstb %d0 <== NOT EXECUTED
57914: 66a6 bnes 578bc <rtems_rfs_dir_lookup_ino+0x3e6> <== NOT EXECUTED
57916: 60c8 bras 578e0 <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)
57918: 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;
5791a: 2403 movel %d3,%d2 <== NOT EXECUTED
5791c: 60c4 bras 578e2 <rtems_rfs_dir_lookup_ino+0x40c> <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
5791e: 2002 movel %d2,%d0 <== NOT EXECUTED
57920: 4cee 3cfc ff7c moveml %fp@(-132),%d2-%d7/%a2-%a5 <== NOT EXECUTED
57926: 4e5e unlk %fp <== NOT EXECUTED
00057fc8 <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)
{
57fc8: 4e56 ff80 linkw %fp,#-128 <== NOT EXECUTED
57fcc: 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))
57fd0: 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)
{
57fd6: 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))
57fda: 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)
{
57fdc: 286e 0018 moveal %fp@(24),%a4 <== NOT EXECUTED
57fe0: 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))
57fe4: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
57fea: 508f addql #8,%sp <== NOT EXECUTED
57fec: 4a00 tstb %d0 <== NOT EXECUTED
57fee: 6720 beqs 58010 <rtems_rfs_dir_read+0x48> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n",
57ff0: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
57ff4: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
57ff8: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
57ffc: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
58000: 4879 0006 eb4c pea 6eb4c <CSWTCH.2+0xb38> <== NOT EXECUTED
58006: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5800c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_rfs_inode_ino (dir), offset);
*length = 0;
58010: 4295 clrl %a5@ <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
58012: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
58016: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5801a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5801c: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
58022: 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);
58026: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
58028: 6e00 02d8 bgtw 58302 <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))
5802c: 262a 0008 movel %a2@(8),%d3 <== NOT EXECUTED
58030: 4282 clrl %d2 <== NOT EXECUTED
58032: 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) -
58034: 2802 movel %d2,%d4 <== NOT EXECUTED
58036: 2a03 movel %d3,%d5 <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
58038: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5803a: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5803e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
58042: 4eb9 0006 9500 jsr 69500 <__moddi3> <== NOT EXECUTED
58048: 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) -
5804c: 9a81 subl %d1,%d5 <== NOT EXECUTED
5804e: 9980 subxl %d0,%d4 <== NOT EXECUTED
58050: 2004 movel %d4,%d0 <== NOT EXECUTED
58052: 2205 movel %d5,%d1 <== NOT EXECUTED
58054: 4285 clrl %d5 <== NOT EXECUTED
58056: 7c0a moveq #10,%d6 <== NOT EXECUTED
58058: 9c81 subl %d1,%d6 <== NOT EXECUTED
5805a: 9b80 subxl %d0,%d5 <== NOT EXECUTED
5805c: 6d36 blts 58094 <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) *
5805e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58060: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58062: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
58066: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5806a: 4eb9 0006 90a0 jsr 690a0 <__divdi3> <== NOT EXECUTED
58070: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
58074: 2e83 movel %d3,%sp@ <== NOT EXECUTED
58076: 4286 clrl %d6 <== NOT EXECUTED
58078: 5281 addql #1,%d1 <== NOT EXECUTED
5807a: d186 addxl %d6,%d0 <== NOT EXECUTED
5807c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5807e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
58080: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58082: 4eb9 0006 8ff0 jsr 68ff0 <__muldi3> <== NOT EXECUTED
58088: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5808c: 2d40 0010 movel %d0,%fp@(16) <== NOT EXECUTED
58090: 2d41 0014 movel %d1,%fp@(20) <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
58094: 260e movel %fp,%d3 <== NOT EXECUTED
58096: 0683 ffff ffa8 addil #-88,%d3 <== NOT EXECUTED
5809c: 240e movel %fp,%d2 <== NOT EXECUTED
5809e: 0682 ffff ffb6 addil #-74,%d2 <== NOT EXECUTED
580a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
580a6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
580aa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
580ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
580b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
580b2: 4eb9 0005 6596 jsr 56596 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
580b8: 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);
580bc: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
580be: 6f18 bles 580d8 <rtems_rfs_dir_read+0x110> <== NOT EXECUTED
{
if (rc == ENXIO)
580c0: 7e06 moveq #6,%d7 <== NOT EXECUTED
580c2: be80 cmpl %d0,%d7 <== NOT EXECUTED
580c4: 6602 bnes 580c8 <rtems_rfs_dir_read+0x100> <== NOT EXECUTED
rc = ENOENT;
580c6: 7802 moveq #2,%d4 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
580c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
580ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED
580cc: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
580d2: 508f addql #8,%sp <== NOT EXECUTED
580d4: 6000 022c braw 58302 <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);
580d8: 2a0e movel %fp,%d5 <== NOT EXECUTED
580da: 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);
580e0: 2c03 movel %d3,%d6 <== NOT EXECUTED
580e2: 2e02 movel %d2,%d7 <== NOT EXECUTED
580e4: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
580e6: 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;
580ea: 1d40 ffac moveb %d0,%fp@(-84) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
580ee: 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);
580f2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
580f6: 2f2e ffa8 movel %fp@(-88),%sp@- <== NOT EXECUTED
580fa: 2f05 movel %d5,%sp@- <== NOT EXECUTED
580fc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
580fe: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
58104: 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);
58108: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
5810a: 6f06 bles 58112 <rtems_rfs_dir_read+0x14a> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &buffer);
5810c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5810e: 6000 01dc braw 582ec <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;
58112: 206e ffb2 moveal %fp@(-78),%a0 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
58116: 4282 clrl %d2 <== NOT EXECUTED
58118: 4280 clrl %d0 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
5811a: 2668 001a moveal %a0@(26),%a3 <== NOT EXECUTED
5811e: 262e ffc8 movel %fp@(-56),%d3 <== NOT EXECUTED
58122: d7c3 addal %d3,%a3 <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
58124: 142b 0008 moveb %a3@(8),%d2 <== NOT EXECUTED
58128: 102b 0009 moveb %a3@(9),%d0 <== NOT EXECUTED
5812c: e18a lsll #8,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
5812e: 1213 moveb %a3@,%d1 <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
58130: 8480 orl %d0,%d2 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
58132: 102b 0001 moveb %a3@(1),%d0 <== NOT EXECUTED
58136: 3241 moveaw %d1,%a1 <== NOT EXECUTED
58138: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED
5813c: 3040 moveaw %d0,%a0 <== NOT EXECUTED
5813e: 102b 0002 moveb %a3@(2),%d0 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
58142: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED
58148: 6700 0142 beqw 5828c <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);
5814c: 7c18 moveq #24,%d6 <== NOT EXECUTED
5814e: 2a09 movel %a1,%d5 <== NOT EXECUTED
58150: 3e08 movew %a0,%d7 <== NOT EXECUTED
58152: edad lsll %d6,%d5 <== NOT EXECUTED
58154: 4286 clrl %d6 <== NOT EXECUTED
58156: 1c07 moveb %d7,%d6 <== NOT EXECUTED
58158: 4846 swap %d6 <== NOT EXECUTED
5815a: 4246 clrw %d6 <== NOT EXECUTED
5815c: 0281 0000 00ff andil #255,%d1 <== NOT EXECUTED
58162: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
58168: 8a86 orl %d6,%d5 <== NOT EXECUTED
5816a: e188 lsll #8,%d0 <== NOT EXECUTED
5816c: 8a81 orl %d1,%d5 <== NOT EXECUTED
5816e: 8a80 orl %d0,%d5 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
58170: 700a moveq #10,%d0 <== NOT EXECUTED
58172: b082 cmpl %d2,%d0 <== NOT EXECUTED
58174: 6c10 bges 58186 <rtems_rfs_dir_read+0x1be> <== NOT EXECUTED
58176: b4aa 001c cmpl %a2@(28),%d2 <== NOT EXECUTED
5817a: 640a bccs 58186 <rtems_rfs_dir_read+0x1be> <== NOT EXECUTED
5817c: 4a85 tstl %d5 <== NOT EXECUTED
5817e: 6706 beqs 58186 <rtems_rfs_dir_read+0x1be> <== NOT EXECUTED
58180: baaa 0014 cmpl %a2@(20),%d5 <== NOT EXECUTED
58184: 633a blss 581c0 <rtems_rfs_dir_read+0x1f8> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
58186: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
5818c: 42a7 clrl %sp@- <== NOT EXECUTED
5818e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58194: 508f addql #8,%sp <== NOT EXECUTED
58196: 4a00 tstb %d0 <== NOT EXECUTED
58198: 6700 0148 beqw 582e2 <rtems_rfs_dir_read+0x31a> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: "
5819c: 2f2e ffc8 movel %fp@(-56),%sp@- <== NOT EXECUTED
581a0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
581a4: 2f05 movel %d5,%sp@- <== NOT EXECUTED
581a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
581a8: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
581ac: 4879 0006 eb76 pea 6eb76 <CSWTCH.2+0xb62> <== NOT EXECUTED
581b2: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
581b8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
581bc: 6000 0124 braw 582e2 <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));
581c0: 4878 0110 pea 110 <DBL_MANT_DIG+0xdb> <== NOT EXECUTED
581c4: 42a7 clrl %sp@- <== NOT EXECUTED
581c6: 2f0c movel %a4,%sp@- <== NOT EXECUTED
581c8: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
581ce: 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;
581d2: 2002 movel %d2,%d0 <== NOT EXECUTED
581d4: d095 addl %a5@,%d0 <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
581d6: 720a moveq #10,%d1 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
581d8: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
581dc: 2c2e 0014 movel %fp@(20),%d6 <== NOT EXECUTED
581e0: 2945 0004 movel %d5,%a4@(4) <== NOT EXECUTED
581e4: 2946 0008 movel %d6,%a4@(8) <== NOT EXECUTED
dirent->d_reclen = sizeof (struct dirent);
581e8: 3c3c 0110 movew #272,%d6 <== NOT EXECUTED
581ec: 3946 000c movew %d6,%a4@(12) <== NOT EXECUTED
*length += elength;
581f0: 2a80 movel %d0,%a5@ <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
581f2: 2e2a 0008 movel %a2@(8),%d7 <== NOT EXECUTED
581f6: 9e83 subl %d3,%d7 <== NOT EXECUTED
581f8: 2607 movel %d7,%d3 <== NOT EXECUTED
581fa: 9682 subl %d2,%d3 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
581fc: b283 cmpl %d3,%d1 <== NOT EXECUTED
581fe: 6d04 blts 58204 <rtems_rfs_dir_read+0x23c> <== NOT EXECUTED
*length += remaining;
58200: d680 addl %d0,%d3 <== NOT EXECUTED
58202: 2a83 movel %d3,%a5@ <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
58204: 0682 ffff fff6 addil #-10,%d2 <== NOT EXECUTED
5820a: 0c82 0000 00ff cmpil #255,%d2 <== NOT EXECUTED
58210: 6f06 bles 58218 <rtems_rfs_dir_read+0x250> <== NOT EXECUTED
58212: 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);
58218: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5821a: 486b 000a pea %a3@(10) <== NOT EXECUTED
5821e: 260c movel %a4,%d3 <== NOT EXECUTED
58220: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
58226: 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);
58228: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5822a: 4eb9 0005 ccf8 jsr 5ccf8 <memcpy> <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
58230: 4280 clrl %d0 <== NOT EXECUTED
58232: 4281 clrl %d1 <== NOT EXECUTED
58234: 1013 moveb %a3@,%d0 <== NOT EXECUTED
58236: 122b 0001 moveb %a3@(1),%d1 <== NOT EXECUTED
5823a: eba8 lsll %d5,%d0 <== NOT EXECUTED
5823c: 4841 swap %d1 <== NOT EXECUTED
5823e: 4241 clrw %d1 <== NOT EXECUTED
58240: 8081 orl %d1,%d0 <== NOT EXECUTED
58242: 4281 clrl %d1 <== NOT EXECUTED
58244: 122b 0003 moveb %a3@(3),%d1 <== NOT EXECUTED
58248: 8081 orl %d1,%d0 <== NOT EXECUTED
5824a: 122b 0002 moveb %a3@(2),%d1 <== NOT EXECUTED
5824e: e189 lsll #8,%d1 <== NOT EXECUTED
dirent->d_namlen = elength;
58250: 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);
58254: 8081 orl %d1,%d0 <== NOT EXECUTED
58256: 2880 movel %d0,%a4@ <== NOT EXECUTED
dirent->d_namlen = elength;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
58258: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
5825e: 42a7 clrl %sp@- <== NOT EXECUTED
58260: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58266: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5826a: 4a00 tstb %d0 <== NOT EXECUTED
5826c: 677a beqs 582e8 <rtems_rfs_dir_read+0x320> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: found off:%" PRIooff_t " ino:%ld name=%s\n",
5826e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58270: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
58272: 2f2c 0008 movel %a4@(8),%sp@- <== NOT EXECUTED
58276: 2f2c 0004 movel %a4@(4),%sp@- <== NOT EXECUTED
5827a: 4879 0006 ebba pea 6ebba <CSWTCH.2+0xba6> <== NOT EXECUTED
58280: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58286: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5828a: 605c bras 582e8 <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;
5828c: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED
58290: 9083 subl %d3,%d0 <== NOT EXECUTED
58292: d195 addl %d0,%a5@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ))
58294: 2f3c 8000 0000 movel #-2147483648,%sp@- <== NOT EXECUTED
5829a: 42a7 clrl %sp@- <== NOT EXECUTED
5829c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
582a2: 508f addql #8,%sp <== NOT EXECUTED
582a4: 4a00 tstb %d0 <== NOT EXECUTED
582a6: 671a beqs 582c2 <rtems_rfs_dir_read+0x2fa> <== NOT EXECUTED
printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n",
582a8: 2f15 movel %a5@,%sp@- <== NOT EXECUTED
582aa: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
582ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
582b2: 4879 0006 ebef pea 6ebef <CSWTCH.2+0xbdb> <== NOT EXECUTED
582b8: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
582be: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
offset, *length);
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
582c2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
582c4: 2f07 movel %d7,%sp@- <== NOT EXECUTED
582c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
582c8: 4eb9 0005 6614 jsr 56614 <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
582ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
582d2: 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);
582d4: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc == ENXIO)
582d6: b280 cmpl %d0,%d1 <== NOT EXECUTED
582d8: 670c beqs 582e6 <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)
582da: 4a80 tstl %d0 <== NOT EXECUTED
582dc: 6700 fe14 beqw 580f2 <rtems_rfs_dir_read+0x12a> <== NOT EXECUTED
582e0: 6006 bras 582e8 <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;
582e2: 7805 moveq #5,%d4 <== NOT EXECUTED
582e4: 6002 bras 582e8 <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;
582e6: 7802 moveq #2,%d4 <== NOT EXECUTED
}
rtems_rfs_buffer_handle_close (fs, &buffer);
582e8: 486e ffac pea %fp@(-84) <== NOT EXECUTED
582ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
582ee: 4eba f1bc jsr %pc@(574ac <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
582f2: 486e ffb6 pea %fp@(-74) <== NOT EXECUTED
582f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
582f8: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
582fe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return rc;
}
58302: 2004 movel %d4,%d0 <== NOT EXECUTED
58304: 4cee 3cfc ff80 moveml %fp@(-128),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5830a: 4e5e unlk %fp <== NOT EXECUTED
000584f4 <rtems_rfs_file_close>:
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
584f4: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
584f8: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
584fc: 42a7 clrl %sp@- <== NOT EXECUTED
584fe: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
58502: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
58506: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rrc;
int rc;
rrc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
5850a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58510: 508f addql #8,%sp <== NOT EXECUTED
58512: 4a00 tstb %d0 <== NOT EXECUTED
58514: 6716 beqs 5852c <rtems_rfs_file_close+0x38> <== NOT EXECUTED
printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n",
handle->shared->inode.ino);
58516: 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",
5851a: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED
5851e: 4879 0006 ec88 pea 6ec88 <CSWTCH.2+0xc74> <== NOT EXECUTED
58524: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5852a: 508f addql #8,%sp <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
5852c: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58530: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
58534: 6f06 bles 5853c <rtems_rfs_file_close+0x48> <== NOT EXECUTED
handle->shared->references--;
58536: 5380 subql #1,%d0 <== NOT EXECUTED
58538: 2140 0008 movel %d0,%a0@(8) <== NOT EXECUTED
if (handle->shared->references == 0)
5853c: 4aa8 0008 tstl %a0@(8) <== NOT EXECUTED
58540: 6600 01bc bnew 586fe <rtems_rfs_file_close+0x20a> <== NOT EXECUTED
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
58544: 4aa8 0018 tstl %a0@(24) <== NOT EXECUTED
58548: 6614 bnes 5855e <rtems_rfs_file_close+0x6a> <== NOT EXECUTED
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
5854a: 4868 000c pea %a0@(12) <== NOT EXECUTED
5854e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58550: 4eb9 0004 eb08 jsr 4eb08 <rtems_rfs_inode_load> <== NOT EXECUTED
if (rrc == 0)
58556: 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);
58558: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rrc == 0)
5855a: 6600 00e2 bnew 5863e <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);
5855e: 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);
58562: 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,
58564: 2028 0084 movel %a0@(132),%d0 <== NOT EXECUTED
58568: 2200 movel %d0,%d1 <== NOT EXECUTED
5856a: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
5856c: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
58570: 1341 0010 moveb %d1,%a1@(16) <== NOT EXECUTED
58574: 2200 movel %d0,%d1 <== NOT EXECUTED
58576: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
5857a: 4241 clrw %d1 <== NOT EXECUTED
5857c: 4841 swap %d1 <== NOT EXECUTED
5857e: 1341 0011 moveb %d1,%a1@(17) <== NOT EXECUTED
58582: 2200 movel %d0,%d1 <== NOT EXECUTED
58584: e089 lsrl #8,%d1 <== NOT EXECUTED
58586: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
5858a: 1341 0012 moveb %d1,%a1@(18) <== NOT EXECUTED
5858e: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
58592: 1340 0013 moveb %d0,%a1@(19) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
58596: 7001 moveq #1,%d0 <== NOT EXECUTED
58598: 1140 001c moveb %d0,%a0@(28) <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
handle->shared->mtime);
5859c: 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,
585a0: 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);
585a4: 2200 movel %d0,%d1 <== NOT EXECUTED
585a6: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
585a8: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
585ac: 1341 0014 moveb %d1,%a1@(20) <== NOT EXECUTED
585b0: 2200 movel %d0,%d1 <== NOT EXECUTED
585b2: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
585b6: 4241 clrw %d1 <== NOT EXECUTED
585b8: 4841 swap %d1 <== NOT EXECUTED
585ba: 1341 0015 moveb %d1,%a1@(21) <== NOT EXECUTED
585be: 2200 movel %d0,%d1 <== NOT EXECUTED
585c0: e089 lsrl #8,%d1 <== NOT EXECUTED
585c2: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
585c6: 1341 0016 moveb %d1,%a1@(22) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
585ca: 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);
585cc: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
585d0: 1340 0017 moveb %d0,%a1@(23) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
585d4: 1141 001c moveb %d1,%a0@(28) <== NOT EXECUTED
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
handle->shared->ctime);
585d8: 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,
585dc: 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);
585e0: 2200 movel %d0,%d1 <== NOT EXECUTED
585e2: e4a9 lsrl %d2,%d1 <== NOT EXECUTED
585e4: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
585e8: 1341 0018 moveb %d1,%a1@(24) <== NOT EXECUTED
585ec: 2200 movel %d0,%d1 <== NOT EXECUTED
585ee: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
585f2: 4241 clrw %d1 <== NOT EXECUTED
585f4: 4841 swap %d1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
585f6: 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);
585f8: 1341 0019 moveb %d1,%a1@(25) <== NOT EXECUTED
585fc: 2200 movel %d0,%d1 <== NOT EXECUTED
585fe: e089 lsrl #8,%d1 <== NOT EXECUTED
58600: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
58604: 1341 001a moveb %d1,%a1@(26) <== NOT EXECUTED
58608: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
5860c: 1340 001b moveb %d0,%a1@(27) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
58610: 1142 001c moveb %d2,%a0@(28) <== NOT EXECUTED
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
58614: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58618: 2028 007c movel %a0@(124),%d0 <== NOT EXECUTED
5861c: b0a8 0038 cmpl %a0@(56),%d0 <== NOT EXECUTED
58620: 660a bnes 5862c <rtems_rfs_file_close+0x138> <== NOT EXECUTED
58622: 2228 003c movel %a0@(60),%d1 <== NOT EXECUTED
58626: b2a8 0080 cmpl %a0@(128),%d1 <== NOT EXECUTED
5862a: 6710 beqs 5863c <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);
5862c: 2140 0038 movel %d0,%a0@(56) <== NOT EXECUTED
map->dirty = true;
58630: 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);
58632: 2168 0080 003c movel %a0@(128),%a0@(60) <== NOT EXECUTED
map->dirty = true;
58638: 1142 0032 moveb %d2,%a0@(50) <== NOT EXECUTED
5863c: 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);
5863e: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58642: 41e8 0032 lea %a0@(50),%a0 <== NOT EXECUTED
58646: 2f08 movel %a0,%sp@- <== NOT EXECUTED
58648: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5864a: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
58650: 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);
58652: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
58654: 6f3c bles 58692 <rtems_rfs_file_close+0x19e> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
58656: 42a7 clrl %sp@- <== NOT EXECUTED
58658: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
5865c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58662: 508f addql #8,%sp <== NOT EXECUTED
58664: 4a00 tstb %d0 <== NOT EXECUTED
58666: 6724 beqs 5868c <rtems_rfs_file_close+0x198> <== NOT EXECUTED
printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n",
58668: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5866a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
58670: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58672: 2f04 movel %d4,%sp@- <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
58674: 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",
58678: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED
5867c: 4879 0006 ecaf pea 6ecaf <CSWTCH.2+0xc9b> <== NOT EXECUTED
58682: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58688: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
5868c: 4a82 tstl %d2 <== NOT EXECUTED
5868e: 6602 bnes 58692 <rtems_rfs_file_close+0x19e> <== NOT EXECUTED
58690: 2404 movel %d4,%d2 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
58692: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58696: 41e8 000c lea %a0@(12),%a0 <== NOT EXECUTED
5869a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5869c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5869e: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
586a4: 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);
586a6: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
586a8: 6f3c bles 586e6 <rtems_rfs_file_close+0x1f2> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
586aa: 42a7 clrl %sp@- <== NOT EXECUTED
586ac: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
586b0: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
586b6: 508f addql #8,%sp <== NOT EXECUTED
586b8: 4a00 tstb %d0 <== NOT EXECUTED
586ba: 6724 beqs 586e0 <rtems_rfs_file_close+0x1ec> <== NOT EXECUTED
printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n",
586bc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
586be: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
586c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
586c6: 2f04 movel %d4,%sp@- <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
586c8: 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",
586cc: 2f28 0014 movel %a0@(20),%sp@- <== NOT EXECUTED
586d0: 4879 0006 ece8 pea 6ece8 <CSWTCH.2+0xcd4> <== NOT EXECUTED
586d6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
586dc: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
handle->shared->inode.ino, rc, strerror (rc));
if (rrc == 0)
586e0: 4a82 tstl %d2 <== NOT EXECUTED
586e2: 6602 bnes 586e6 <rtems_rfs_file_close+0x1f2> <== NOT EXECUTED
586e4: 2404 movel %d4,%d2 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
586e6: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED
586ea: 4eb9 0005 45f4 jsr 545f4 <_Chain_Extract> <== NOT EXECUTED
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
586f0: 2f2a 001a movel %a2@(26),%sp@- <== NOT EXECUTED
586f4: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
586fa: 508f addql #8,%sp <== NOT EXECUTED
586fc: 6002 bras 58700 <rtems_rfs_file_close+0x20c> <== NOT EXECUTED
rtems_rfs_file_handle* handle)
{
int rrc;
int rc;
rrc = 0;
586fe: 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);
58700: 486a 0004 pea %a2@(4) <== NOT EXECUTED
58704: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58706: 4eb9 0005 6d08 jsr 56d08 <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)
5870c: 508f addql #8,%sp <== NOT EXECUTED
handle->dirty = false;
5870e: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
58710: 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;
58714: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
58718: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
5871c: 4a82 tstl %d2 <== NOT EXECUTED
5871e: 6f2e bles 5874e <rtems_rfs_file_close+0x25a> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE))
58720: 42a7 clrl %sp@- <== NOT EXECUTED
58722: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
58726: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5872c: 508f addql #8,%sp <== NOT EXECUTED
5872e: 4a00 tstb %d0 <== NOT EXECUTED
58730: 671c beqs 5874e <rtems_rfs_file_close+0x25a> <== NOT EXECUTED
printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc));
58732: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58734: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
5873a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5873c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5873e: 4879 0006 ed23 pea 6ed23 <CSWTCH.2+0xd0f> <== NOT EXECUTED
58744: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5874a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
free (handle);
5874e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58750: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return rrc;
}
58756: 2002 movel %d2,%d0 <== NOT EXECUTED
58758: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
5875e: 4e5e unlk %fp <== NOT EXECUTED
00058ed0 <rtems_rfs_file_get_shared>:
rtems_rfs_file_shared*
rtems_rfs_file_get_shared (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
58ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
58ed4: 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;
58ed8: 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 ));
58edc: 43e9 0078 lea %a1@(120),%a1 <== NOT EXECUTED
58ee0: 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))
58ee4: 6008 bras 58eee <rtems_rfs_file_get_shared+0x1e> <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
58ee6: b0a8 0014 cmpl %a0@(20),%d0 <== NOT EXECUTED
58eea: 670a beqs 58ef6 <rtems_rfs_file_get_shared+0x26> <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
58eec: 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))
58eee: b3c8 cmpal %a0,%a1 <== NOT EXECUTED
58ef0: 66f4 bnes 58ee6 <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;
58ef2: 4280 clrl %d0 <== NOT EXECUTED
58ef4: 6002 bras 58ef8 <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)
58ef6: 2008 movel %a0,%d0 <== NOT EXECUTED
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
58ef8: 4e5e unlk %fp <== NOT EXECUTED
0005892e <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
5892e: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
58932: 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))
58936: 42a7 clrl %sp@- <== NOT EXECUTED
58938: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
5893c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
58940: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
58944: 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))
58948: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5894e: 508f addql #8,%sp <== NOT EXECUTED
58950: 4a00 tstb %d0 <== NOT EXECUTED
58952: 6726 beqs 5897a <rtems_rfs_file_io_end+0x4c> <== NOT EXECUTED
printf ("rtems-rfs: file-io: end: %s size=%zu\n",
58954: 4a03 tstb %d3 <== NOT EXECUTED
58956: 6708 beqs 58960 <rtems_rfs_file_io_end+0x32> <== NOT EXECUTED
58958: 203c 0006 dbf7 movel #449527,%d0 <== NOT EXECUTED
5895e: 6006 bras 58966 <rtems_rfs_file_io_end+0x38> <== NOT EXECUTED
58960: 203c 0006 ed4a movel #453962,%d0 <== NOT EXECUTED
58966: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58968: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5896a: 4879 0006 ee01 pea 6ee01 <CSWTCH.2+0xded> <== NOT EXECUTED
58970: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58976: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
read ? "read" : "write", size);
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
5897a: 4aaa 000a tstl %a2@(10) <== NOT EXECUTED
5897e: 675a beqs 589da <rtems_rfs_file_io_end+0xac> <== NOT EXECUTED
{
if (!read)
58980: 4a03 tstb %d3 <== NOT EXECUTED
58982: 6606 bnes 5898a <rtems_rfs_file_io_end+0x5c> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
58984: 7001 moveq #1,%d0 <== NOT EXECUTED
58986: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
5898a: 486a 0004 pea %a2@(4) <== NOT EXECUTED
5898e: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58992: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58996: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
5899c: 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),
5899e: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
589a0: 6f3a bles 589dc <rtems_rfs_file_io_end+0xae> <== NOT EXECUTED
{
printf (
589a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
589a4: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
589aa: 588f addql #4,%sp <== NOT EXECUTED
589ac: 4a03 tstb %d3 <== NOT EXECUTED
589ae: 6708 beqs 589b8 <rtems_rfs_file_io_end+0x8a> <== NOT EXECUTED
589b0: 223c 0006 dbf7 movel #449527,%d1 <== NOT EXECUTED
589b6: 6006 bras 589be <rtems_rfs_file_io_end+0x90> <== NOT EXECUTED
589b8: 223c 0006 ed4a movel #453962,%d1 <== NOT EXECUTED
589be: 2f00 movel %d0,%sp@- <== NOT EXECUTED
589c0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
589c2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
589c4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
589c6: 4879 0006 ee29 pea 6ee29 <CSWTCH.2+0xe15> <== NOT EXECUTED
589cc: 4eb9 0005 cfac jsr 5cfac <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;
589d2: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
589d6: 6000 011e braw 58af6 <rtems_rfs_file_io_end+0x1c8> <== NOT EXECUTED
bool read)
{
bool atime;
bool mtime;
bool length;
int rc = 0;
589da: 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)))
589dc: 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;
589e0: d8aa 0012 addl %a2@(18),%d4 <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
589e4: 2268 0090 moveal %a0@(144),%a1 <== NOT EXECUTED
589e8: 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;
589ec: 2544 0012 movel %d4,%a2@(18) <== NOT EXECUTED
if (handle->bpos.boff >=
589f0: b084 cmpl %d4,%d0 <== NOT EXECUTED
589f2: 620a bhis 589fe <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));
589f4: 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++;
589f6: 52aa 000e addql #1,%a2@(14) <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
589fa: 2544 0012 movel %d4,%a2@(18) <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
589fe: 4a03 tstb %d3 <== NOT EXECUTED
58a00: 6634 bnes 58a36 <rtems_rfs_file_io_end+0x108> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
58a02: 202a 000e movel %a2@(14),%d0 <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
58a06: 6706 beqs 58a0e <rtems_rfs_file_io_end+0xe0> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
58a08: 4aa8 0038 tstl %a0@(56) <== NOT EXECUTED
58a0c: 6718 beqs 58a26 <rtems_rfs_file_io_end+0xf8> <== NOT EXECUTED
58a0e: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED
58a12: b280 cmpl %d0,%d1 <== NOT EXECUTED
58a14: 6310 blss 58a26 <rtems_rfs_file_io_end+0xf8> <== NOT EXECUTED
58a16: 5381 subql #1,%d1 <== NOT EXECUTED
58a18: b280 cmpl %d0,%d1 <== NOT EXECUTED
58a1a: 661a bnes 58a36 <rtems_rfs_file_io_end+0x108> <== NOT EXECUTED
58a1c: 2828 003c movel %a0@(60),%d4 <== NOT EXECUTED
58a20: b8aa 0012 cmpl %a2@(18),%d4 <== NOT EXECUTED
58a24: 6410 bccs 58a36 <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;
58a26: 216a 0012 003c movel %a2@(18),%a0@(60) <== NOT EXECUTED
map->dirty = true;
58a2c: 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;
58a2e: 7001 moveq #1,%d0 <== NOT EXECUTED
58a30: 1146 0032 moveb %d6,%a0@(50) <== NOT EXECUTED
58a34: 6002 bras 58a38 <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;
58a36: 4200 clrb %d0 <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
58a38: 2212 movel %a2@,%d1 <== NOT EXECUTED
58a3a: 2a01 movel %d1,%d5 <== NOT EXECUTED
58a3c: 7801 moveq #1,%d4 <== NOT EXECUTED
58a3e: 4685 notl %d5 <== NOT EXECUTED
58a40: ca84 andl %d4,%d5 <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
58a42: 4284 clrl %d4 <== NOT EXECUTED
58a44: 0801 0001 btst #1,%d1 <== NOT EXECUTED
58a48: 6602 bnes 58a4c <rtems_rfs_file_io_end+0x11e> <== NOT EXECUTED
58a4a: 1800 moveb %d0,%d4 <== NOT EXECUTED
58a4c: 7c01 moveq #1,%d6 <== NOT EXECUTED
58a4e: c886 andl %d6,%d4 <== NOT EXECUTED
length = rtems_rfs_file_update_length (handle) && length;
58a50: 4286 clrl %d6 <== NOT EXECUTED
58a52: 44c1 movew %d1,%ccr <== NOT EXECUTED
58a54: 6702 beqs 58a58 <rtems_rfs_file_io_end+0x12a> <== NOT EXECUTED
58a56: 1c00 moveb %d0,%d6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58a58: 42a7 clrl %sp@- <== NOT EXECUTED
58a5a: 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;
58a5e: 7001 moveq #1,%d0 <== NOT EXECUTED
58a60: cc80 andl %d0,%d6 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58a62: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58a68: 508f addql #8,%sp <== NOT EXECUTED
58a6a: 4a00 tstb %d0 <== NOT EXECUTED
58a6c: 6740 beqs 58aae <rtems_rfs_file_io_end+0x180> <== NOT EXECUTED
printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n",
58a6e: 4a06 tstb %d6 <== NOT EXECUTED
58a70: 6706 beqs 58a78 <rtems_rfs_file_io_end+0x14a> <== NOT EXECUTED
58a72: 307c 004c moveaw #76,%a0 <== NOT EXECUTED
58a76: 6004 bras 58a7c <rtems_rfs_file_io_end+0x14e> <== NOT EXECUTED
58a78: 307c 002d moveaw #45,%a0 <== NOT EXECUTED
58a7c: 4a04 tstb %d4 <== NOT EXECUTED
58a7e: 6704 beqs 58a84 <rtems_rfs_file_io_end+0x156> <== NOT EXECUTED
58a80: 724d moveq #77,%d1 <== NOT EXECUTED
58a82: 6002 bras 58a86 <rtems_rfs_file_io_end+0x158> <== NOT EXECUTED
58a84: 722d moveq #45,%d1 <== NOT EXECUTED
58a86: 4a05 tstb %d5 <== NOT EXECUTED
58a88: 6704 beqs 58a8e <rtems_rfs_file_io_end+0x160> <== NOT EXECUTED
58a8a: 7041 moveq #65,%d0 <== NOT EXECUTED
58a8c: 6002 bras 58a90 <rtems_rfs_file_io_end+0x162> <== NOT EXECUTED
58a8e: 702d moveq #45,%d0 <== NOT EXECUTED
58a90: 2f08 movel %a0,%sp@- <== NOT EXECUTED
58a92: 2f01 movel %d1,%sp@- <== NOT EXECUTED
58a94: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58a96: 2f2a 0012 movel %a2@(18),%sp@- <== NOT EXECUTED
58a9a: 2f2a 000e movel %a2@(14),%sp@- <== NOT EXECUTED
58a9e: 4879 0006 ee6b pea 6ee6b <CSWTCH.2+0xe57> <== NOT EXECUTED
58aa4: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58aaa: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
handle->bpos.bno, handle->bpos.boff,
atime ? 'A' : '-', mtime ? 'M' : '-', length ? 'L' : '-');
if (atime || mtime)
58aae: 4a05 tstb %d5 <== NOT EXECUTED
58ab0: 6604 bnes 58ab6 <rtems_rfs_file_io_end+0x188> <== NOT EXECUTED
58ab2: 4a04 tstb %d4 <== NOT EXECUTED
58ab4: 6724 beqs 58ada <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
{
time_t now = time (NULL);
58ab6: 42a7 clrl %sp@- <== NOT EXECUTED
58ab8: 4eb9 0006 0918 jsr 60918 <time> <== NOT EXECUTED
if (read && atime)
58abe: 588f addql #4,%sp <== NOT EXECUTED
58ac0: 4a03 tstb %d3 <== NOT EXECUTED
58ac2: 672c beqs 58af0 <rtems_rfs_file_io_end+0x1c2> <== NOT EXECUTED
58ac4: 4a05 tstb %d5 <== NOT EXECUTED
58ac6: 6712 beqs 58ada <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
handle->shared->atime = now;
58ac8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58acc: 2140 0084 movel %d0,%a0@(132) <== NOT EXECUTED
58ad0: 6008 bras 58ada <rtems_rfs_file_io_end+0x1ac> <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
58ad2: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58ad6: 2140 0088 movel %d0,%a0@(136) <== NOT EXECUTED
}
if (length)
58ada: 4a06 tstb %d6 <== NOT EXECUTED
58adc: 6718 beqs 58af6 <rtems_rfs_file_io_end+0x1c8> <== NOT EXECUTED
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
58ade: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
58ae2: 2168 0038 007c movel %a0@(56),%a0@(124) <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
58ae8: 2168 003c 0080 movel %a0@(60),%a0@(128) <== NOT EXECUTED
58aee: 6006 bras 58af6 <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)
58af0: 4a04 tstb %d4 <== NOT EXECUTED
58af2: 66de bnes 58ad2 <rtems_rfs_file_io_end+0x1a4> <== NOT EXECUTED
58af4: 60e4 bras 58ada <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;
}
58af6: 2002 movel %d2,%d0 <== NOT EXECUTED
58af8: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 <== NOT EXECUTED
58afe: 4e5e unlk %fp <== NOT EXECUTED
00058b02 <rtems_rfs_file_io_release>:
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
58b02: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
58b06: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
58b0a: 4aa8 000a tstl %a0@(10) <== NOT EXECUTED
58b0e: 6716 beqs 58b26 <rtems_rfs_file_io_release+0x24> <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
58b10: 4868 0004 pea %a0@(4) <== NOT EXECUTED
58b14: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
58b18: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58b1c: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
58b22: 508f addql #8,%sp <== NOT EXECUTED
58b24: 6002 bras 58b28 <rtems_rfs_file_io_release+0x26> <== NOT EXECUTED
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
int rc = 0;
58b26: 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;
}
58b28: 4e5e unlk %fp <== NOT EXECUTED
00058762 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
58762: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
58766: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5876a: 42a7 clrl %sp@- <== NOT EXECUTED
5876c: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
58770: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
58774: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
58778: 142e 0013 moveb %fp@(19),%d2 <== NOT EXECUTED
size_t size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
5877c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58782: 508f addql #8,%sp <== NOT EXECUTED
58784: 4a00 tstb %d0 <== NOT EXECUTED
58786: 6730 beqs 587b8 <rtems_rfs_file_io_start+0x56> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: %s pos=%" PRIu32 ":%" PRIu32 "\n",
58788: 206a 0012 moveal %a2@(18),%a0 <== NOT EXECUTED
5878c: 222a 000e movel %a2@(14),%d1 <== NOT EXECUTED
58790: 4a02 tstb %d2 <== NOT EXECUTED
58792: 6708 beqs 5879c <rtems_rfs_file_io_start+0x3a> <== NOT EXECUTED
58794: 203c 0006 dbf7 movel #449527,%d0 <== NOT EXECUTED
5879a: 6006 bras 587a2 <rtems_rfs_file_io_start+0x40> <== NOT EXECUTED
5879c: 203c 0006 ed4a movel #453962,%d0 <== NOT EXECUTED
587a2: 2f08 movel %a0,%sp@- <== NOT EXECUTED
587a4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
587a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
587a8: 4879 0006 ed50 pea 6ed50 <CSWTCH.2+0xd3c> <== NOT EXECUTED
587ae: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
587b4: 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))
587b8: 4aaa 000a tstl %a2@(10) <== NOT EXECUTED
587bc: 6600 0106 bnew 588c4 <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),
587c0: 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),
587c4: 486e fffc pea %fp@(-4) <== NOT EXECUTED
587c8: 486a 000e pea %a2@(14) <== NOT EXECUTED
587cc: 4868 0032 pea %a0@(50) <== NOT EXECUTED
587d0: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
587d4: 4eb9 0005 64aa jsr 564aa <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
587da: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
587de: 4a80 tstl %d0 <== NOT EXECUTED
587e0: 6f60 bles 58842 <rtems_rfs_file_io_start+0xe0> <== NOT EXECUTED
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
587e2: 7206 moveq #6,%d1 <== NOT EXECUTED
587e4: 4a02 tstb %d2 <== NOT EXECUTED
587e6: 670c beqs 587f4 <rtems_rfs_file_io_start+0x92> <== NOT EXECUTED
587e8: b280 cmpl %d0,%d1 <== NOT EXECUTED
587ea: 6600 0138 bnew 58924 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
{
*available = 0;
587ee: 4293 clrl %a3@ <== NOT EXECUTED
587f0: 6000 0130 braw 58922 <rtems_rfs_file_io_start+0x1c0> <== NOT EXECUTED
return 0;
}
if (rc != ENXIO)
587f4: b280 cmpl %d0,%d1 <== NOT EXECUTED
587f6: 6600 012c bnew 58924 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
return rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
587fa: 42a7 clrl %sp@- <== NOT EXECUTED
587fc: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
58800: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58806: 508f addql #8,%sp <== NOT EXECUTED
58808: 4a00 tstb %d0 <== NOT EXECUTED
5880a: 670e beqs 5881a <rtems_rfs_file_io_start+0xb8> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: grow\n");
5880c: 4879 0006 ed7b pea 6ed7b <CSWTCH.2+0xd67> <== NOT EXECUTED
58812: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
58818: 588f addql #4,%sp <== NOT EXECUTED
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
rtems_rfs_file_map (handle),
5881a: 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),
5881e: 486e fffc pea %fp@(-4) <== NOT EXECUTED
58822: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58826: 4868 0032 pea %a0@(50) <== NOT EXECUTED
5882a: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5882e: 4eb9 0005 6646 jsr 56646 <rtems_rfs_block_map_grow> <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
58834: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58838: 4a80 tstl %d0 <== NOT EXECUTED
5883a: 6e00 00e8 bgtw 58924 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
return rc;
request_read = false;
5883e: 4203 clrb %d3 <== NOT EXECUTED
58840: 6022 bras 58864 <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 &&
58842: 4a02 tstb %d2 <== NOT EXECUTED
58844: 6618 bnes 5885e <rtems_rfs_file_io_start+0xfc> <== NOT EXECUTED
58846: 4aaa 0012 tstl %a2@(18) <== NOT EXECUTED
5884a: 6616 bnes 58862 <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)))))
5884c: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58850: 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) ||
58854: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
58858: b1d3 cmpal %a3@,%a0 <== NOT EXECUTED
5885a: 63e2 blss 5883e <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
5885c: 6004 bras 58862 <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 &&
5885e: 1602 moveb %d2,%d3 <== NOT EXECUTED
58860: 6002 bras 58864 <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;
58862: 7601 moveq #1,%d3 <== NOT EXECUTED
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58864: 42a7 clrl %sp@- <== NOT EXECUTED
58866: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
5886a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58870: 508f addql #8,%sp <== NOT EXECUTED
58872: 4a00 tstb %d0 <== NOT EXECUTED
58874: 6728 beqs 5889e <rtems_rfs_file_io_start+0x13c> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: block=%" PRIu32 " request-read=%s\n",
58876: 4a03 tstb %d3 <== NOT EXECUTED
58878: 6708 beqs 58882 <rtems_rfs_file_io_start+0x120> <== NOT EXECUTED
5887a: 203c 0006 d750 movel #448336,%d0 <== NOT EXECUTED
58880: 6006 bras 58888 <rtems_rfs_file_io_start+0x126> <== NOT EXECUTED
58882: 203c 0006 db8b movel #449419,%d0 <== NOT EXECUTED
58888: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5888a: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
5888e: 4879 0006 ed9b pea 6ed9b <CSWTCH.2+0xd87> <== NOT EXECUTED
58894: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5889a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
block, request_read ? "yes" : "no");
rc = rtems_rfs_buffer_handle_request (rtems_rfs_file_fs (handle),
5889e: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED
588a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
588a6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
588aa: 486a 0004 pea %a2@(4) <== NOT EXECUTED
588ae: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
588b2: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
588b6: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
588bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
588c0: 4a80 tstl %d0 <== NOT EXECUTED
588c2: 6e60 bgts 58924 <rtems_rfs_file_io_start+0x1c2> <== NOT EXECUTED
return rc;
}
if (read
588c4: 4a02 tstb %d2 <== NOT EXECUTED
588c6: 6720 beqs 588e8 <rtems_rfs_file_io_start+0x186> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
588c8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
588cc: 2028 0040 movel %a0@(64),%d0 <== NOT EXECUTED
588d0: 6606 bnes 588d8 <rtems_rfs_file_io_start+0x176> <== NOT EXECUTED
588d2: 4aa8 0038 tstl %a0@(56) <== NOT EXECUTED
588d6: 670a beqs 588e2 <rtems_rfs_file_io_start+0x180> <== NOT EXECUTED
588d8: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED
588dc: 5381 subql #1,%d1 <== NOT EXECUTED
588de: b280 cmpl %d0,%d1 <== NOT EXECUTED
588e0: 6606 bnes 588e8 <rtems_rfs_file_io_start+0x186> <== NOT EXECUTED
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
588e2: 2428 003c movel %a0@(60),%d2 <== NOT EXECUTED
588e6: 660c bnes 588f4 <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));
588e8: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
588ec: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
588f0: 2428 0008 movel %a0@(8),%d2 <== NOT EXECUTED
*available = size - rtems_rfs_file_block_offset (handle);
588f4: 2002 movel %d2,%d0 <== NOT EXECUTED
588f6: 90aa 0012 subl %a2@(18),%d0 <== NOT EXECUTED
588fa: 2680 movel %d0,%a3@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
588fc: 42a7 clrl %sp@- <== NOT EXECUTED
588fe: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
58902: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58908: 508f addql #8,%sp <== NOT EXECUTED
5890a: 4a00 tstb %d0 <== NOT EXECUTED
5890c: 6714 beqs 58922 <rtems_rfs_file_io_start+0x1c0> <== NOT EXECUTED
printf ("rtems-rfs: file-io: start: available=%zu (%zu)\n",
5890e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58910: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
58912: 4879 0006 edd1 pea 6edd1 <CSWTCH.2+0xdbd> <== NOT EXECUTED
58918: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5891e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
*available, size);
return 0;
58922: 4280 clrl %d0 <== NOT EXECUTED
}
58924: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED
5892a: 4e5e unlk %fp <== NOT EXECUTED
00058efc <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)
{
58efc: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
58f00: 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))
58f04: 42a7 clrl %sp@- <== NOT EXECUTED
58f06: 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)
{
58f0a: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
58f0e: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
58f12: 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))
58f16: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58f1c: 508f addql #8,%sp <== NOT EXECUTED
58f1e: 4a00 tstb %d0 <== NOT EXECUTED
58f20: 6710 beqs 58f32 <rtems_rfs_file_open+0x36> <== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 "\n", ino);
58f22: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58f24: 4879 0006 eee1 pea 6eee1 <CSWTCH.2+0xecd> <== NOT EXECUTED
58f2a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58f30: 508f addql #8,%sp <== NOT EXECUTED
*file = NULL;
58f32: 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));
58f34: 4878 001e pea 1e <OPER2+0xa> <== NOT EXECUTED
58f38: 283c 0004 6910 movel #289040,%d4 <== NOT EXECUTED
58f3e: 2044 moveal %d4,%a0 <== NOT EXECUTED
58f40: 4e90 jsr %a0@ <== NOT EXECUTED
if (!handle)
58f42: 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));
58f44: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (!handle)
58f46: 4a80 tstl %d0 <== NOT EXECUTED
58f48: 6700 02b0 beqw 591fa <rtems_rfs_file_open+0x2fe> <== NOT EXECUTED
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
58f4c: 4878 001e pea 1e <OPER2+0xa> <== NOT EXECUTED
58f50: 243c 0005 ce5c movel #380508,%d2 <== NOT EXECUTED
58f56: 2042 moveal %d2,%a0 <== NOT EXECUTED
58f58: 42a7 clrl %sp@- <== NOT EXECUTED
58f5a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58f5c: 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;
58f5e: 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);
58f60: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58f62: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
58f66: 2f0c movel %a4,%sp@- <== NOT EXECUTED
handle->bnum = 0;
58f68: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
58f6c: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
58f70: 4eb9 0005 8ed0 jsr 58ed0 <rtems_rfs_file_get_shared> <== NOT EXECUTED
if (shared)
58f76: 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);
58f7a: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (shared)
58f7c: 4a80 tstl %d0 <== NOT EXECUTED
58f7e: 6724 beqs 58fa4 <rtems_rfs_file_open+0xa8> <== NOT EXECUTED
{
shared->references++;
58f80: 52ab 0008 addql #1,%a3@(8) <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
58f84: 42a7 clrl %sp@- <== NOT EXECUTED
58f86: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
58f8a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58f90: 508f addql #8,%sp <== NOT EXECUTED
58f92: 4a00 tstb %d0 <== NOT EXECUTED
58f94: 6700 0256 beqw 591ec <rtems_rfs_file_open+0x2f0> <== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 " shared\n", ino);
58f98: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58f9a: 4879 0006 ef00 pea 6ef00 <CSWTCH.2+0xeec> <== NOT EXECUTED
58fa0: 6000 0242 braw 591e4 <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));
58fa4: 4878 0094 pea 94 <DBL_MANT_DIG+0x5f> <== NOT EXECUTED
58fa8: 2044 moveal %d4,%a0 <== NOT EXECUTED
58faa: 4e90 jsr %a0@ <== NOT EXECUTED
if (!shared)
58fac: 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));
58fae: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (!shared)
58fb0: 4a80 tstl %d0 <== NOT EXECUTED
58fb2: 662a bnes 58fde <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);
58fb4: 486a 0004 pea %a2@(4) <== NOT EXECUTED
58fb8: 2f0c movel %a4,%sp@- <== NOT EXECUTED
58fba: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
58fc0: 4200 clrb %d0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
58fc2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58fc4: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
58fc8: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
58fcc: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
58fd0: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return ENOMEM;
58fd6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
58fda: 6000 021e braw 591fa <rtems_rfs_file_open+0x2fe> <== NOT EXECUTED
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
58fde: 4878 0094 pea 94 <DBL_MANT_DIG+0x5f> <== NOT EXECUTED
58fe2: 2042 moveal %d2,%a0 <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
58fe4: 280b movel %a3,%d4 <== NOT EXECUTED
58fe6: 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));
58fec: 42a7 clrl %sp@- <== NOT EXECUTED
58fee: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58ff0: 4e90 jsr %a0@ <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
58ff2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58ff6: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58ff8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58ffa: 2f0c movel %a4,%sp@- <== NOT EXECUTED
58ffc: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
59002: 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);
59006: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59008: 6f5e bles 59068 <rtems_rfs_file_open+0x16c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5900a: 42a7 clrl %sp@- <== NOT EXECUTED
5900c: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
59010: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59016: 508f addql #8,%sp <== NOT EXECUTED
59018: 4a00 tstb %d0 <== NOT EXECUTED
5901a: 671c beqs 59038 <rtems_rfs_file_open+0x13c> <== NOT EXECUTED
printf ("rtems-rfs: file-open: inode open failed: %d: %s\n",
5901c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5901e: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59024: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59026: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59028: 4879 0006 ef26 pea 6ef26 <CSWTCH.2+0xf12> <== NOT EXECUTED
5902e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59034: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
free (shared);
59038: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5903a: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
59040: 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);
59042: 486a 0004 pea %a2@(4) <== NOT EXECUTED
59046: 2f0c movel %a4,%sp@- <== NOT EXECUTED
59048: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5904e: 4200 clrb %d0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
59050: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59052: 1540 0004 moveb %d0,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
59056: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
5905a: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
5905e: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
59060: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59064: 6000 0196 braw 591fc <rtems_rfs_file_open+0x300> <== NOT EXECUTED
}
rc = rtems_rfs_block_map_open (fs, &shared->inode, &shared->map);
59068: 486b 0032 pea %a3@(50) <== NOT EXECUTED
5906c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5906e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
59070: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
59076: 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);
5907a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5907c: 6f68 bles 590e6 <rtems_rfs_file_open+0x1ea> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
5907e: 42a7 clrl %sp@- <== NOT EXECUTED
59080: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
59084: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5908a: 508f addql #8,%sp <== NOT EXECUTED
5908c: 4a00 tstb %d0 <== NOT EXECUTED
5908e: 671c beqs 590ac <rtems_rfs_file_open+0x1b0> <== NOT EXECUTED
printf ("rtems-rfs: file-open: block map open failed: %d: %s\n",
59090: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59092: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59098: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5909a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5909c: 4879 0006 ef57 pea 6ef57 <CSWTCH.2+0xf43> <== NOT EXECUTED
590a2: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
590a8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &shared->inode);
590ac: 2f04 movel %d4,%sp@- <== NOT EXECUTED
590ae: 2f0c movel %a4,%sp@- <== NOT EXECUTED
590b0: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
590b6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
590b8: 47f9 0004 6348 lea 46348 <free>,%a3 <== NOT EXECUTED
590be: 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);
590c0: 486a 0004 pea %a2@(4) <== NOT EXECUTED
590c4: 2f0c movel %a4,%sp@- <== NOT EXECUTED
590c6: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
590cc: 4201 clrb %d1 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
590ce: 2f0a movel %a2,%sp@- <== NOT EXECUTED
590d0: 1541 0004 moveb %d1,%a2@(4) <== NOT EXECUTED
handle->bnum = 0;
590d4: 42aa 0006 clrl %a2@(6) <== NOT EXECUTED
handle->buffer = NULL;
590d8: 42aa 000a clrl %a2@(10) <== NOT EXECUTED
590dc: 4e93 jsr %a3@ <== NOT EXECUTED
return rc;
590de: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
590e2: 6000 0118 braw 591fc <rtems_rfs_file_open+0x300> <== NOT EXECUTED
}
shared->references = 1;
590e6: 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);
590e8: 7218 moveq #24,%d1 <== NOT EXECUTED
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
590ea: 206b 0018 moveal %a3@(24),%a0 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return rc;
}
shared->references = 1;
590ee: 2740 0008 movel %d0,%a3@(8) <== NOT EXECUTED
590f2: 4280 clrl %d0 <== NOT EXECUTED
590f4: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
590f8: e3a8 lsll %d1,%d0 <== NOT EXECUTED
590fa: 4281 clrl %d1 <== NOT EXECUTED
590fc: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
59100: 4841 swap %d1 <== NOT EXECUTED
59102: 4241 clrw %d1 <== NOT EXECUTED
59104: 8081 orl %d1,%d0 <== NOT EXECUTED
59106: 4281 clrl %d1 <== NOT EXECUTED
59108: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
5910c: 8081 orl %d1,%d0 <== NOT EXECUTED
5910e: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
59112: e189 lsll #8,%d1 <== NOT EXECUTED
59114: 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);
59116: 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);
59118: 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);
5911c: 4280 clrl %d0 <== NOT EXECUTED
5911e: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
59122: 1228 000b moveb %a0@(11),%d1 <== NOT EXECUTED
59126: 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);
59128: 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);
5912a: 7218 moveq #24,%d1 <== NOT EXECUTED
5912c: 2740 0080 movel %d0,%a3@(128) <== NOT EXECUTED
59130: 4280 clrl %d0 <== NOT EXECUTED
59132: 1028 0010 moveb %a0@(16),%d0 <== NOT EXECUTED
59136: e3a8 lsll %d1,%d0 <== NOT EXECUTED
59138: 4281 clrl %d1 <== NOT EXECUTED
5913a: 1228 0011 moveb %a0@(17),%d1 <== NOT EXECUTED
5913e: 4841 swap %d1 <== NOT EXECUTED
59140: 4241 clrw %d1 <== NOT EXECUTED
59142: 8081 orl %d1,%d0 <== NOT EXECUTED
59144: 4281 clrl %d1 <== NOT EXECUTED
59146: 1228 0013 moveb %a0@(19),%d1 <== NOT EXECUTED
5914a: 8081 orl %d1,%d0 <== NOT EXECUTED
5914c: 1228 0012 moveb %a0@(18),%d1 <== NOT EXECUTED
59150: e189 lsll #8,%d1 <== NOT EXECUTED
59152: 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);
59154: 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);
59156: 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);
5915a: 4280 clrl %d0 <== NOT EXECUTED
5915c: 1028 0014 moveb %a0@(20),%d0 <== NOT EXECUTED
59160: e3a8 lsll %d1,%d0 <== NOT EXECUTED
59162: 4281 clrl %d1 <== NOT EXECUTED
59164: 1228 0015 moveb %a0@(21),%d1 <== NOT EXECUTED
59168: 4841 swap %d1 <== NOT EXECUTED
5916a: 4241 clrw %d1 <== NOT EXECUTED
5916c: 8081 orl %d1,%d0 <== NOT EXECUTED
5916e: 4281 clrl %d1 <== NOT EXECUTED
59170: 1228 0017 moveb %a0@(23),%d1 <== NOT EXECUTED
59174: 8081 orl %d1,%d0 <== NOT EXECUTED
59176: 1228 0016 moveb %a0@(22),%d1 <== NOT EXECUTED
5917a: e189 lsll #8,%d1 <== NOT EXECUTED
5917c: 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);
5917e: 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);
59180: 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);
59184: 4280 clrl %d0 <== NOT EXECUTED
59186: 1028 0018 moveb %a0@(24),%d0 <== NOT EXECUTED
5918a: e3a8 lsll %d1,%d0 <== NOT EXECUTED
5918c: 4281 clrl %d1 <== NOT EXECUTED
5918e: 1228 0019 moveb %a0@(25),%d1 <== NOT EXECUTED
59192: 4841 swap %d1 <== NOT EXECUTED
59194: 4241 clrw %d1 <== NOT EXECUTED
59196: 8081 orl %d1,%d0 <== NOT EXECUTED
59198: 4281 clrl %d1 <== NOT EXECUTED
5919a: 1228 001b moveb %a0@(27),%d1 <== NOT EXECUTED
5919e: 8081 orl %d1,%d0 <== NOT EXECUTED
591a0: 1228 001a moveb %a0@(26),%d1 <== NOT EXECUTED
591a4: 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;
591a6: 274c 0090 movel %a4,%a3@(144) <== NOT EXECUTED
591aa: 8081 orl %d1,%d0 <== NOT EXECUTED
591ac: 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 );
591b0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
591b2: 486c 0074 pea %a4@(116) <== NOT EXECUTED
591b6: 4eb9 0004 b010 jsr 4b010 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
591bc: 42a7 clrl %sp@- <== NOT EXECUTED
591be: 2f04 movel %d4,%sp@- <== NOT EXECUTED
591c0: 2f0c movel %a4,%sp@- <== NOT EXECUTED
591c2: 4eb9 0004 ec5e jsr 4ec5e <rtems_rfs_inode_unload> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_OPEN))
591c8: 42a7 clrl %sp@- <== NOT EXECUTED
591ca: 4878 0008 pea 8 <DIVIDE_BY_ZERO> <== NOT EXECUTED
591ce: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
591d4: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
591d8: 4a00 tstb %d0 <== NOT EXECUTED
591da: 6710 beqs 591ec <rtems_rfs_file_open+0x2f0> <== NOT EXECUTED
printf ("rtems-rfs: file-open: ino=%" PRId32 " share created\n", ino);
591dc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
591de: 4879 0006 ef8c pea 6ef8c <CSWTCH.2+0xf78> <== NOT EXECUTED
591e4: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
591ea: 508f addql #8,%sp <== NOT EXECUTED
}
handle->flags = oflag;
591ec: 24ae 0010 movel %fp@(16),%a2@ <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
591f0: 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;
591f2: 254b 001a movel %a3,%a2@(26) <== NOT EXECUTED
*file = handle;
591f6: 2a8a movel %a2,%a5@ <== NOT EXECUTED
return 0;
591f8: 6002 bras 591fc <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;
591fa: 740c moveq #12,%d2 <== NOT EXECUTED
handle->shared = shared;
*file = handle;
return 0;
}
591fc: 2002 movel %d2,%d0 <== NOT EXECUTED
591fe: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED
59204: 4e5e unlk %fp <== NOT EXECUTED
00058b2c <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
58b2c: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
58b30: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58b34: 42a7 clrl %sp@- <== NOT EXECUTED
58b36: 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)
{
58b3a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
58b3e: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
58b42: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58b46: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58b4c: 508f addql #8,%sp <== NOT EXECUTED
58b4e: 4a00 tstb %d0 <== NOT EXECUTED
58b50: 6714 beqs 58b66 <rtems_rfs_file_seek+0x3a> <== NOT EXECUTED
printf ("rtems-rfs: file-seek: new=%" PRIu64 "\n", pos);
58b52: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58b54: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58b56: 4879 0006 ee9c pea 6ee9c <CSWTCH.2+0xe88> <== NOT EXECUTED
58b5c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58b62: 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),
58b66: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58b6a: 4868 007c pea %a0@(124) <== NOT EXECUTED
58b6e: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58b72: 4eb9 0005 6112 jsr 56112 <rtems_rfs_block_get_size> <== NOT EXECUTED
58b78: 508f addql #8,%sp <== NOT EXECUTED
58b7a: 9283 subl %d3,%d1 <== NOT EXECUTED
58b7c: 9182 subxl %d2,%d0 <== NOT EXECUTED
58b7e: 6566 bcss 58be6 <rtems_rfs_file_seek+0xba> <== NOT EXECUTED
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
58b80: 280a movel %a2,%d4 <== NOT EXECUTED
58b82: 0684 0000 000e addil #14,%d4 <== NOT EXECUTED
58b88: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58b8a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58b8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58b8e: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58b92: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58b96: 4eb9 0005 6040 jsr 56040 <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))
58b9c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58ba0: 4aaa 000a tstl %a2@(10) <== NOT EXECUTED
58ba4: 674e beqs 58bf4 <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),
58ba6: 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),
58baa: 486e fffc pea %fp@(-4) <== NOT EXECUTED
58bae: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58bb0: 4868 0032 pea %a0@(50) <== NOT EXECUTED
58bb4: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58bb8: 4eb9 0005 64aa jsr 564aa <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
58bbe: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58bc2: 4a80 tstl %d0 <== NOT EXECUTED
58bc4: 6e3a bgts 58c00 <rtems_rfs_file_seek+0xd4> <== NOT EXECUTED
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
58bc6: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
58bca: b0aa 0006 cmpl %a2@(6),%d0 <== NOT EXECUTED
58bce: 6724 beqs 58bf4 <rtems_rfs_file_seek+0xc8> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
58bd0: 486a 0004 pea %a2@(4) <== NOT EXECUTED
58bd4: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
58bd8: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
58bdc: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
58be2: 508f addql #8,%sp <== NOT EXECUTED
58be4: 600a bras 58bf0 <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);
58be6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
58be8: 4eb9 0005 8b02 jsr 58b02 <rtems_rfs_file_io_release> <== NOT EXECUTED
if (rc > 0)
58bee: 588f addql #4,%sp <== NOT EXECUTED
58bf0: 4a80 tstl %d0 <== NOT EXECUTED
58bf2: 6e0c bgts 58c00 <rtems_rfs_file_seek+0xd4> <== NOT EXECUTED
return rc;
}
*new_pos = pos;
58bf4: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED
return 0;
58bf8: 4280 clrl %d0 <== NOT EXECUTED
int rc = rtems_rfs_file_io_release (handle);
if (rc > 0)
return rc;
}
*new_pos = pos;
58bfa: 2082 movel %d2,%a0@ <== NOT EXECUTED
58bfc: 2143 0004 movel %d3,%a0@(4) <== NOT EXECUTED
return 0;
}
58c00: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 <== NOT EXECUTED
58c06: 4e5e unlk %fp <== NOT EXECUTED
00058c0a <rtems_rfs_file_set_size>:
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
58c0a: 4e56 ffb0 linkw %fp,#-80 <== NOT EXECUTED
58c0e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
58c12: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
58c16: 246d 001a moveal %a5@(26),%a2 <== NOT EXECUTED
58c1a: 260a movel %a2,%d3 <== NOT EXECUTED
58c1c: 0683 0000 0032 addil #50,%d3 <== NOT EXECUTED
rtems_rfs_pos size;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO))
58c22: 42a7 clrl %sp@- <== NOT EXECUTED
58c24: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
58c28: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
58c2c: 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))
58c30: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
58c36: 508f addql #8,%sp <== NOT EXECUTED
58c38: 4a00 tstb %d0 <== NOT EXECUTED
58c3a: 6714 beqs 58c50 <rtems_rfs_file_set_size+0x46> <== NOT EXECUTED
printf ("rtems-rfs: file-set-size: size=%" PRIu64 "\n", new_size);
58c3c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
58c3e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58c40: 4879 0006 eebc pea 6eebc <CSWTCH.2+0xea8> <== NOT EXECUTED
58c46: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
58c4c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
size = rtems_rfs_file_size (handle);
58c50: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58c54: 4869 007c pea %a1@(124) <== NOT EXECUTED
58c58: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58c5c: 4eb9 0005 6112 jsr 56112 <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)
58c62: 508f addql #8,%sp <== NOT EXECUTED
58c64: 2c00 movel %d0,%d6 <== NOT EXECUTED
58c66: 2e01 movel %d1,%d7 <== NOT EXECUTED
58c68: 9e85 subl %d5,%d7 <== NOT EXECUTED
58c6a: 9d84 subxl %d4,%d6 <== NOT EXECUTED
58c6c: 6604 bnes 58c72 <rtems_rfs_file_set_size+0x68> <== NOT EXECUTED
58c6e: 6000 0254 braw 58ec4 <rtems_rfs_file_set_size+0x2ba> <== NOT EXECUTED
58c72: 266d 001a moveal %a5@(26),%a3 <== NOT EXECUTED
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
58c76: 2e04 movel %d4,%d7 <== NOT EXECUTED
58c78: 8e85 orl %d5,%d7 <== NOT EXECUTED
58c7a: 6618 bnes 58c94 <rtems_rfs_file_set_size+0x8a> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
58c7c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58c7e: 2f2b 0090 movel %a3@(144),%sp@- <== NOT EXECUTED
58c82: 4eb9 0005 6b8c jsr 56b8c <rtems_rfs_block_map_free_all> <== NOT EXECUTED
if (rc > 0)
58c88: 508f addql #8,%sp <== NOT EXECUTED
58c8a: 4a80 tstl %d0 <== NOT EXECUTED
58c8c: 6e00 0238 bgtw 58ec6 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
58c90: 6000 020c braw 58e9e <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
return rc;
}
else
{
if (size < new_size)
58c94: 2c00 movel %d0,%d6 <== NOT EXECUTED
58c96: 2e01 movel %d1,%d7 <== NOT EXECUTED
58c98: 9e85 subl %d5,%d7 <== NOT EXECUTED
58c9a: 9d84 subxl %d4,%d6 <== NOT EXECUTED
58c9c: 6400 0150 bccw 58dee <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));
58ca0: 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),
58ca4: 49f9 0005 6646 lea 56646 <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),
58caa: 47ed 0004 lea %a5@(4),%a3 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
58cae: 2c04 movel %d4,%d6 <== NOT EXECUTED
58cb0: 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),
58cb2: 2a0e movel %fp,%d5 <== NOT EXECUTED
58cb4: 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));
58cba: 2429 0008 movel %a1@(8),%d2 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
58cbe: 9e81 subl %d1,%d7 <== NOT EXECUTED
58cc0: 9d80 subxl %d0,%d6 <== NOT EXECUTED
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
58cc2: 4204 clrb %d4 <== NOT EXECUTED
while (count)
58cc4: 6000 011c braw 58de2 <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);
58cc8: 202a 0038 movel %a2@(56),%d0 <== NOT EXECUTED
58ccc: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
58cd0: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED
58cd4: 2d41 fff8 movel %d1,%fp@(-8) <== NOT EXECUTED
58cd8: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
58cdc: 4a81 tstl %d1 <== NOT EXECUTED
58cde: 6706 beqs 58ce6 <rtems_rfs_file_set_size+0xdc> <== NOT EXECUTED
58ce0: 5380 subql #1,%d0 <== NOT EXECUTED
58ce2: 2d40 fff4 movel %d0,%fp@(-12) <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
58ce6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
58ce8: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
58cec: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58cee: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58cf2: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58cf6: 4eb9 0005 64aa jsr 564aa <rtems_rfs_block_map_find> <== NOT EXECUTED
map, &bpos, &block);
if (rc > 0)
58cfc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58d00: 4a80 tstl %d0 <== NOT EXECUTED
58d02: 6e22 bgts 58d26 <rtems_rfs_file_set_size+0x11c> <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
return rc;
}
if (count < (length - bpos.boff))
58d04: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED
58d08: 2202 movel %d2,%d1 <== NOT EXECUTED
58d0a: 9289 subl %a1,%d1 <== NOT EXECUTED
58d0c: 91c8 subal %a0,%a0 <== NOT EXECUTED
58d0e: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
58d12: 2d48 ffe8 movel %a0,%fp@(-24) <== NOT EXECUTED
58d16: 202e ffe8 movel %fp@(-24),%d0 <== NOT EXECUTED
58d1a: 222e ffec movel %fp@(-20),%d1 <== NOT EXECUTED
58d1e: 9287 subl %d7,%d1 <== NOT EXECUTED
58d20: 9186 subxl %d6,%d0 <== NOT EXECUTED
58d22: 6228 bhis 58d4c <rtems_rfs_file_set_size+0x142> <== NOT EXECUTED
58d24: 6038 bras 58d5e <rtems_rfs_file_set_size+0x154> <== NOT EXECUTED
if (rc > 0)
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
58d26: 7206 moveq #6,%d1 <== NOT EXECUTED
58d28: b280 cmpl %d0,%d1 <== NOT EXECUTED
58d2a: 6600 019a bnew 58ec6 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
58d2e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
58d30: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
58d34: 2f03 movel %d3,%sp@- <== NOT EXECUTED
58d36: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58d3a: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58d3e: 4e94 jsr %a4@ <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
58d40: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58d44: 4a80 tstl %d0 <== NOT EXECUTED
58d46: 6fbc bles 58d04 <rtems_rfs_file_set_size+0xfa> <== NOT EXECUTED
58d48: 6000 017c braw 58ec6 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
{
length = count + bpos.boff;
58d4c: 2409 movel %a1,%d2 <== NOT EXECUTED
58d4e: d487 addl %d7,%d2 <== NOT EXECUTED
58d50: 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;
58d52: 2542 003c movel %d2,%a2@(60) <== NOT EXECUTED
map->dirty = true;
58d56: 1540 0032 moveb %d0,%a2@(50) <== NOT EXECUTED
read_block = true;
58d5a: 7801 moveq #1,%d4 <== NOT EXECUTED
58d5c: 600a bras 58d68 <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;
58d5e: 42aa 003c clrl %a2@(60) <== NOT EXECUTED
map->dirty = true;
58d62: 7201 moveq #1,%d1 <== NOT EXECUTED
58d64: 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),
58d68: 7001 moveq #1,%d0 <== NOT EXECUTED
58d6a: c084 andl %d4,%d0 <== NOT EXECUTED
58d6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58d6e: 2f2e fff0 movel %fp@(-16),%sp@- <== NOT EXECUTED
58d72: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58d74: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58d78: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58d7c: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
58d82: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58d86: 4a80 tstl %d0 <== NOT EXECUTED
58d88: 6e00 013c bgtw 58ec6 <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);
58d8c: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
58d90: 2202 movel %d2,%d1 <== NOT EXECUTED
58d92: 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);
58d94: 226d 000a moveal %a5@(10),%a1 <== NOT EXECUTED
memset (dst + bpos.boff, 0, length - bpos.boff);
58d98: 2f01 movel %d1,%sp@- <== NOT EXECUTED
58d9a: 42a7 clrl %sp@- <== NOT EXECUTED
58d9c: d0a9 001a addl %a1@(26),%d0 <== NOT EXECUTED
58da0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58da2: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
58da8: 7001 moveq #1,%d0 <== NOT EXECUTED
58daa: 1b40 0004 moveb %d0,%a5@(4) <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
58dae: 2f0b movel %a3,%sp@- <== NOT EXECUTED
58db0: 226d 001a moveal %a5@(26),%a1 <== NOT EXECUTED
58db4: 2f29 0090 movel %a1@(144),%sp@- <== NOT EXECUTED
58db8: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
58dbe: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
58dc2: 4a80 tstl %d0 <== NOT EXECUTED
58dc4: 6e00 0100 bgtw 58ec6 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
return rc;
count -= length - bpos.boff;
58dc8: 2002 movel %d2,%d0 <== NOT EXECUTED
58dca: 90ae fff8 subl %fp@(-8),%d0 <== NOT EXECUTED
58dce: 91c8 subal %a0,%a0 <== NOT EXECUTED
58dd0: 2d40 ffe4 movel %d0,%fp@(-28) <== NOT EXECUTED
58dd4: 2d48 ffe0 movel %a0,%fp@(-32) <== NOT EXECUTED
58dd8: 202e ffe0 movel %fp@(-32),%d0 <== NOT EXECUTED
58ddc: 9eae ffe4 subl %fp@(-28),%d7 <== NOT EXECUTED
58de0: 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)
58de2: 2206 movel %d6,%d1 <== NOT EXECUTED
58de4: 8287 orl %d7,%d1 <== NOT EXECUTED
58de6: 6600 fee0 bnew 58cc8 <rtems_rfs_file_set_size+0xbe> <== NOT EXECUTED
58dea: 6000 00b2 braw 58e9e <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);
58dee: 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) /
58df2: 91c8 subal %a0,%a0 <== NOT EXECUTED
58df4: 242c 0008 movel %a4@(8),%d2 <== NOT EXECUTED
58df8: 2d42 ffdc movel %d2,%fp@(-36) <== NOT EXECUTED
58dfc: 2f2e ffdc movel %fp@(-36),%sp@- <== NOT EXECUTED
58e00: 70ff moveq #-1,%d0 <== NOT EXECUTED
58e02: 72ff moveq #-1,%d1 <== NOT EXECUTED
58e04: 2d48 ffd8 movel %a0,%fp@(-40) <== NOT EXECUTED
58e08: 2f2e ffd8 movel %fp@(-40),%sp@- <== NOT EXECUTED
58e0c: d285 addl %d5,%d1 <== NOT EXECUTED
58e0e: d184 addxl %d4,%d0 <== NOT EXECUTED
58e10: 2f01 movel %d1,%sp@- <== NOT EXECUTED
58e12: 2f00 movel %d0,%sp@- <== NOT EXECUTED
58e14: 4eb9 0006 98ec jsr 698ec <__udivdi3> <== NOT EXECUTED
58e1a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
58e1e: 2401 movel %d1,%d2 <== NOT EXECUTED
58e20: 4682 notl %d2 <== NOT EXECUTED
58e22: 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));
58e26: 2f2e ffdc movel %fp@(-36),%sp@- <== NOT EXECUTED
58e2a: 2f2e ffd8 movel %fp@(-40),%sp@- <== NOT EXECUTED
58e2e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
58e30: 2f04 movel %d4,%sp@- <== NOT EXECUTED
58e32: 4eb9 0006 9cf0 jsr 69cf0 <__umoddi3> <== NOT EXECUTED
58e38: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
58e3c: 2601 movel %d1,%d3 <== NOT EXECUTED
if (blocks)
58e3e: 4a82 tstl %d2 <== NOT EXECUTED
58e40: 6616 bnes 58e58 <rtems_rfs_file_set_size+0x24e> <== NOT EXECUTED
58e42: 202a 0038 movel %a2@(56),%d0 <== NOT EXECUTED
58e46: 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;
58e48: 2543 003c movel %d3,%a2@(60) <== NOT EXECUTED
map->dirty = true;
58e4c: 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),
58e50: 222d 000e movel %a5@(14),%d1 <== NOT EXECUTED
58e54: 661a bnes 58e70 <rtems_rfs_file_set_size+0x266> <== NOT EXECUTED
58e56: 601e bras 58e76 <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),
58e58: 2f02 movel %d2,%sp@- <== NOT EXECUTED
58e5a: 486b 0032 pea %a3@(50) <== NOT EXECUTED
58e5e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
58e60: 4eb9 0005 691a jsr 5691a <rtems_rfs_block_map_shrink> <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
58e66: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
58e6a: 4a80 tstl %d0 <== NOT EXECUTED
58e6c: 6e58 bgts 58ec6 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
58e6e: 60d2 bras 58e42 <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),
58e70: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED
58e74: 6712 beqs 58e88 <rtems_rfs_file_set_size+0x27e> <== NOT EXECUTED
58e76: b081 cmpl %d1,%d0 <== NOT EXECUTED
58e78: 630e blss 58e88 <rtems_rfs_file_set_size+0x27e> <== NOT EXECUTED
58e7a: 2240 moveal %d0,%a1 <== NOT EXECUTED
58e7c: 5389 subql #1,%a1 <== NOT EXECUTED
58e7e: b3c1 cmpal %d1,%a1 <== NOT EXECUTED
58e80: 661c bnes 58e9e <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
58e82: b6ad 0012 cmpl %a5@(18),%d3 <== NOT EXECUTED
58e86: 6416 bccs 58e9e <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),
58e88: 2b40 000e movel %d0,%a5@(14) <== NOT EXECUTED
58e8c: 2b43 0012 movel %d3,%a5@(18) <== NOT EXECUTED
58e90: 42ad 0016 clrl %a5@(22) <== NOT EXECUTED
58e94: 4a83 tstl %d3 <== NOT EXECUTED
58e96: 6706 beqs 58e9e <rtems_rfs_file_set_size+0x294> <== NOT EXECUTED
58e98: 5380 subql #1,%d0 <== NOT EXECUTED
58e9a: 2b40 000e movel %d0,%a5@(14) <== NOT EXECUTED
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
58e9e: 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))
58ea2: 7002 moveq #2,%d0 <== NOT EXECUTED
58ea4: 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);
58ea6: 276a 0038 007c movel %a2@(56),%a3@(124) <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
58eac: 276a 003c 0080 movel %a2@(60),%a3@(128) <== NOT EXECUTED
if (rtems_rfs_file_update_mtime (handle))
58eb2: 4a80 tstl %d0 <== NOT EXECUTED
58eb4: 660e bnes 58ec4 <rtems_rfs_file_set_size+0x2ba> <== NOT EXECUTED
handle->shared->mtime = time (NULL);
58eb6: 42a7 clrl %sp@- <== NOT EXECUTED
58eb8: 4eb9 0006 0918 jsr 60918 <time> <== NOT EXECUTED
58ebe: 588f addql #4,%sp <== NOT EXECUTED
58ec0: 2740 0088 movel %d0,%a3@(136) <== NOT EXECUTED
}
return 0;
58ec4: 4280 clrl %d0 <== NOT EXECUTED
}
58ec6: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED
58ecc: 4e5e unlk %fp <== NOT EXECUTED
0004d9fe <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
4d9fe: 4e56 fefc linkw %fp,#-260
4da02: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4da06: 246e 000c moveal %fp@(12),%a2
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
4da0a: 4a2a 0015 tstb %a2@(21)
4da0e: 6712 beqs 4da22 <rtems_rfs_format+0x24> <== ALWAYS TAKEN
printf ("rtems-rfs: format: %s\n", name);
4da10: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4da14: 4879 0006 cd1d pea 6cd1d <_CPU_m68k_BFFFO_table+0x100> <== NOT EXECUTED
4da1a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4da20: 508f addql #8,%sp <== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
4da22: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f>
4da26: 240e movel %fp,%d2
4da28: 0682 ffff ff7c addil #-132,%d2
4da2e: 42a7 clrl %sp@-
4da30: 2f02 movel %d2,%sp@-
4da32: 4eb9 0005 ce5c jsr 5ce5c <memset>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4da38: 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;
4da3c: 7005 moveq #5,%d0
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
4da3e: 7202 moveq #2,%d1
4da40: 2d48 ffc0 movel %a0,%fp@(-64)
head->previous = NULL;
tail->previous = head;
4da44: 41ee ffc0 lea %fp@(-64),%a0
4da48: 2d48 ffc8 movel %a0,%fp@(-56)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4da4c: 41ee ffd4 lea %fp@(-44),%a0
4da50: 2d48 ffd0 movel %a0,%fp@(-48)
head->previous = NULL;
tail->previous = head;
4da54: 41ee ffd0 lea %fp@(-48),%a0
4da58: 2d48 ffd8 movel %a0,%fp@(-40)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4da5c: 41ee ffe4 lea %fp@(-28),%a0
4da60: 2d48 ffe0 movel %a0,%fp@(-32)
head->previous = NULL;
tail->previous = head;
4da64: 41ee ffe0 lea %fp@(-32),%a0
4da68: 2d48 ffe8 movel %a0,%fp@(-24)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
4da6c: 41ee fff4 lea %fp@(-12),%a0
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4da70: 2f02 movel %d2,%sp@-
4da72: 2f2e 0008 movel %fp@(8),%sp@-
4da76: 2d48 fff0 movel %a0,%fp@(-16)
head->previous = NULL;
tail->previous = head;
4da7a: 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;
4da7e: 2d40 ffbc movel %d0,%fp@(-68)
4da82: 2d48 fff8 movel %a0,%fp@(-8)
fs.release_count = 0;
fs.release_modified_count = 0;
fs.flags = RTEMS_RFS_FS_NO_LOCAL_CACHE;
4da86: 2d41 ff7c movel %d1,%fp@(-132)
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
4da8a: 4eb9 0005 709a jsr 5709a <rtems_rfs_buffer_open>
if (rc > 0)
4da90: 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);
4da94: 2600 movel %d0,%d3
if (rc > 0)
4da96: 6f16 bles 4daae <rtems_rfs_format+0xb0> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
4da98: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4da9a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4daa0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4daa2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4daa4: 4879 0006 cd34 pea 6cd34 <_CPU_m68k_BFFFO_table+0x117> <== NOT EXECUTED
4daaa: 6000 0a22 braw 4e4ce <rtems_rfs_format+0xad0> <== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
4daae: 206e ff8c moveal %fp@(-116),%a0
4dab2: 4aa8 0020 tstl %a0@(32)
4dab6: 660c bnes 4dac4 <rtems_rfs_format+0xc6> <== ALWAYS TAKEN
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
4dab8: 42a7 clrl %sp@- <== NOT EXECUTED
4daba: 4879 0006 cd63 pea 6cd63 <_CPU_m68k_BFFFO_table+0x146> <== NOT EXECUTED
4dac0: 6000 04ce braw 4df90 <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;
4dac4: 2012 movel %a2@,%d0
4dac6: 2d40 ff84 movel %d0,%fp@(-124)
if (!fs->block_size)
4daca: 666c bnes 4db38 <rtems_rfs_format+0x13a>
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
4dacc: 2f02 movel %d2,%sp@-
if (total_size >= GIGS (1))
4dace: 4282 clrl %d2
4dad0: 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);
4dad6: 4eb9 0005 9262 jsr 59262 <rtems_rfs_fs_media_size>
if (total_size >= GIGS (1))
4dadc: 588f addql #4,%sp
4dade: 9681 subl %d1,%d3
4dae0: 9580 subxl %d0,%d2
4dae2: 6430 bccs 4db14 <rtems_rfs_format+0x116> <== ALWAYS TAKEN
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
4dae4: 780c moveq #12,%d4 <== NOT EXECUTED
4dae6: 7a14 moveq #20,%d5 <== NOT EXECUTED
4dae8: 4283 clrl %d3 <== NOT EXECUTED
4daea: 0681 0010 0000 addil #1048576,%d1 <== NOT EXECUTED
4daf0: d183 addxl %d3,%d0 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
4daf2: 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);
4daf4: 2400 movel %d0,%d2 <== NOT EXECUTED
4daf6: 2001 movel %d1,%d0 <== NOT EXECUTED
4daf8: eaa8 lsrl %d5,%d0 <== NOT EXECUTED
4dafa: e9aa lsll %d4,%d2 <== NOT EXECUTED
4dafc: 8480 orl %d0,%d2 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
4dafe: 701f moveq #31,%d0 <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
4db00: 2203 movel %d3,%d1 <== NOT EXECUTED
4db02: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4db04: c282 andl %d2,%d1 <== NOT EXECUTED
4db06: 6604 bnes 4db0c <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--)
4db08: 5380 subql #1,%d0 <== NOT EXECUTED
4db0a: 66f4 bnes 4db00 <rtems_rfs_format+0x102> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
4db0c: 7201 moveq #1,%d1 <== NOT EXECUTED
4db0e: e1a9 lsll %d0,%d1 <== NOT EXECUTED
4db10: 2d41 ff84 movel %d1,%fp@(-124) <== NOT EXECUTED
}
if (fs->block_size < 512)
4db14: 307c 01ff moveaw #511,%a0
4db18: b1ee ff84 cmpal %fp@(-124),%a0
4db1c: 650a bcss 4db28 <rtems_rfs_format+0x12a> <== NEVER TAKEN
fs->block_size = 512;
4db1e: 203c 0000 0200 movel #512,%d0
4db24: 2d40 ff84 movel %d0,%fp@(-124)
if (fs->block_size > (4 * 1024))
4db28: 223c 0000 1000 movel #4096,%d1
4db2e: b2ae ff84 cmpl %fp@(-124),%d1
4db32: 6404 bccs 4db38 <rtems_rfs_format+0x13a> <== ALWAYS TAKEN
fs->block_size = (4 * 1024);
4db34: 2d41 ff84 movel %d1,%fp@(-124) <== NOT EXECUTED
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
4db38: 206e ff8c moveal %fp@(-116),%a0
4db3c: 202e ff84 movel %fp@(-124),%d0
4db40: 2600 movel %d0,%d3
4db42: 2228 0020 movel %a0@(32),%d1
4db46: 4c41 3002 remul %d1,%d2,%d3
4db4a: 4a82 tstl %d2
4db4c: 6718 beqs 4db66 <rtems_rfs_format+0x168> <== ALWAYS TAKEN
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
4db4e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4db50: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4db52: 4879 0006 cd8b pea 6cd8b <_CPU_m68k_BFFFO_table+0x16e> <== NOT EXECUTED
4db58: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4db5e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4db62: 6000 097a braw 4e4de <rtems_rfs_format+0xae0> <== NOT EXECUTED
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
4db66: 222a 0004 movel %a2@(4),%d1
4db6a: e788 lsll #3,%d0
if (!fs->group_blocks)
4db6c: 4a81 tstl %d1
4db6e: 6706 beqs 4db76 <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;
4db70: 2d41 ffa4 movel %d1,%fp@(-92) <== NOT EXECUTED
4db74: 6004 bras 4db7a <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);
4db76: 2d40 ffa4 movel %d0,%fp@(-92)
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
4db7a: b0ae ffa4 cmpl %fp@(-92),%d0
4db7e: 640a bccs 4db8a <rtems_rfs_format+0x18c> <== ALWAYS TAKEN
{
printf ("group block count is higher than bits in block\n");
4db80: 4879 0006 cdc9 pea 6cdc9 <_CPU_m68k_BFFFO_table+0x1ac> <== NOT EXECUTED
4db86: 6000 03d0 braw 4df58 <rtems_rfs_format+0x55a> <== NOT EXECUTED
return false;
}
fs->blocks = rtems_rfs_fs_media_size (fs) / fs->block_size;
4db8a: 486e ff7c pea %fp@(-132)
4db8e: 4eb9 0005 9262 jsr 59262 <rtems_rfs_fs_media_size>
4db94: 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));
4db98: 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;
4db9a: 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));
4db9c: 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;
4db9e: 42a7 clrl %sp@-
4dba0: 2f01 movel %d1,%sp@-
4dba2: 2f00 movel %d0,%sp@-
4dba4: 4eb9 0006 98ec jsr 698ec <__udivdi3>
4dbaa: 4fef 0010 lea %sp@(16),%sp
4dbae: 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),
4dbb0: 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;
4dbb2: 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),
4dbb6: 2f01 movel %d1,%sp@-
4dbb8: 4eb9 0004 d9da jsr 4d9da <rtems_rfs_rup_quotient>
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
4dbbe: 222a 0008 movel %a2@(8),%d1
if (!fs->group_inodes)
4dbc2: 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),
4dbc6: 2d40 ffa0 movel %d0,%fp@(-96)
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
4dbca: 2d41 ffa8 movel %d1,%fp@(-88)
if (!fs->group_inodes)
4dbce: 6634 bnes 4dc04 <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)
4dbd0: 2a2a 000c movel %a2@(12),%d5
4dbd4: 6604 bnes 4dbda <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;
4dbd6: 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) -
4dbda: 2204 movel %d4,%d1
4dbdc: 5381 subql #1,%d1
RTEMS_RFS_SUPERBLOCK_SIZE) * percentage) / 100;
4dbde: 4c05 1800 mulsl %d5,%d1
4dbe2: 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);
4dbe4: 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);
4dbe6: 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;
4dbe8: 4c44 1001 remul %d4,%d1,%d1
blocks = rtems_rfs_rup_quotient (blocks, fs->group_count);
4dbec: 2f01 movel %d1,%sp@-
4dbee: 4eb9 0004 d9da jsr 4d9da <rtems_rfs_rup_quotient>
4dbf4: 508f addql #8,%sp
return blocks * (rtems_rfs_fs_block_size (fs) / RTEMS_RFS_INODE_SIZE);
4dbf6: 2202 movel %d2,%d1
4dbf8: 4c45 1001 remul %d5,%d1,%d1
4dbfc: 4c01 0800 mulsl %d1,%d0
4dc00: 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;
4dc04: 7238 moveq #56,%d1
4dc06: 4c41 2002 remul %d1,%d2,%d2
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
4dc0a: 2f02 movel %d2,%sp@-
4dc0c: 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;
4dc10: 2d42 ffac movel %d2,%fp@(-84)
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
4dc14: 4eb9 0004 d9da jsr 4d9da <rtems_rfs_rup_quotient>
4dc1a: 508f addql #8,%sp
fs->inodes_per_block) * fs->inodes_per_block;
4dc1c: 4c02 0800 mulsl %d2,%d0
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
4dc20: b680 cmpl %d0,%d3
4dc22: 6506 bcss 4dc2a <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 =
4dc24: 2d40 ffa8 movel %d0,%fp@(-88)
4dc28: 6004 bras 4dc2e <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);
4dc2a: 2d43 ffa8 movel %d3,%fp@(-88) <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
4dc2e: 202a 0010 movel %a2@(16),%d0
if (!fs->max_name_length)
4dc32: 6600 08ae bnew 4e4e2 <rtems_rfs_format+0xae4>
{
fs->max_name_length = 512;
4dc36: 243c 0000 0200 movel #512,%d2
4dc3c: 2d42 ff98 movel %d2,%fp@(-104)
4dc40: 6000 08a4 braw 4e4e6 <rtems_rfs_format+0xae8>
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
4dc44: 240e movel %fp,%d2 <== NOT EXECUTED
4dc46: 0682 ffff ff7c addil #-132,%d2 <== NOT EXECUTED
4dc4c: 47f9 0005 cfac lea 5cfac <printf>,%a3 <== NOT EXECUTED
4dc52: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dc54: 4eb9 0005 9262 jsr 59262 <rtems_rfs_fs_media_size> <== NOT EXECUTED
4dc5a: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dc5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dc5e: 4879 0006 cdf8 pea 6cdf8 <_CPU_m68k_BFFFO_table+0x1db> <== NOT EXECUTED
4dc64: 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));
4dc66: 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",
4dc6a: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED
4dc6e: 4879 0006 ce1e pea 6ce1e <_CPU_m68k_BFFFO_table+0x201> <== NOT EXECUTED
4dc74: 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));
4dc76: 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",
4dc7a: 2f28 0020 movel %a0@(32),%sp@- <== NOT EXECUTED
4dc7e: 4879 0006 ce45 pea 6ce45 <_CPU_m68k_BFFFO_table+0x228> <== NOT EXECUTED
4dc84: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
4dc86: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4dc8a: 2e82 movel %d2,%sp@ <== NOT EXECUTED
4dc8c: 4eb9 0005 9232 jsr 59232 <rtems_rfs_fs_size> <== NOT EXECUTED
4dc92: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dc94: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dc96: 4879 0006 ce70 pea 6ce70 <_CPU_m68k_BFFFO_table+0x253> <== NOT EXECUTED
4dc9c: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
4dc9e: 2f2e ff80 movel %fp@(-128),%sp@- <== NOT EXECUTED
4dca2: 4879 0006 ce90 pea 6ce90 <_CPU_m68k_BFFFO_table+0x273> <== NOT EXECUTED
4dca8: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
4dcaa: 2f2e ff84 movel %fp@(-124),%sp@- <== NOT EXECUTED
4dcae: 4879 0006 ceb1 pea 6ceb1 <_CPU_m68k_BFFFO_table+0x294> <== NOT EXECUTED
4dcb4: 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));
4dcb6: 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",
4dcba: 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));
4dcbe: 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",
4dcc0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dcc2: 4879 0006 ced6 pea 6ced6 <_CPU_m68k_BFFFO_table+0x2b9> <== NOT EXECUTED
4dcc8: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
4dcca: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED
4dcce: 4879 0006 cefe pea 6cefe <_CPU_m68k_BFFFO_table+0x2e1> <== NOT EXECUTED
4dcd4: 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,
4dcd6: 242e ffa8 movel %fp@(-88),%d2 <== NOT EXECUTED
4dcda: 2002 movel %d2,%d0 <== NOT EXECUTED
4dcdc: 2202 movel %d2,%d1 <== NOT EXECUTED
4dcde: 262e ff84 movel %fp@(-124),%d3 <== NOT EXECUTED
4dce2: e788 lsll #3,%d0 <== NOT EXECUTED
4dce4: ed89 lsll #6,%d1 <== NOT EXECUTED
4dce6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4dce8: 9280 subl %d0,%d1 <== NOT EXECUTED
4dcea: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dcec: 4eb9 0004 d9da jsr 4d9da <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))
4dcf2: 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));
4dcf6: 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))
4dcf8: 5388 subql #1,%a0 <== NOT EXECUTED
4dcfa: 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));
4dcfe: 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))
4dd00: b1c1 cmpal %d1,%a0 <== NOT EXECUTED
4dd02: 6402 bccs 4dd06 <rtems_rfs_format+0x308> <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
4dd04: 2208 movel %a0,%d1 <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
4dd06: 263c 0000 03e8 movel #1000,%d3 <== NOT EXECUTED
4dd0c: 5280 addql #1,%d0 <== NOT EXECUTED
4dd0e: 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",
4dd12: 780a moveq #10,%d4 <== NOT EXECUTED
4dd14: 47f9 0005 cfac lea 5cfac <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;
4dd1a: 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",
4dd1e: 2a2e ffa0 movel %fp@(-96),%d5 <== NOT EXECUTED
4dd22: 4c02 5800 mulsl %d2,%d5 <== NOT EXECUTED
4dd26: 4c44 0801 remsl %d4,%d1,%d0 <== NOT EXECUTED
4dd2a: 4c44 0800 remsl %d4,%d0,%d0 <== NOT EXECUTED
4dd2e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4dd30: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dd32: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4dd34: 4879 0006 cf23 pea 6cf23 <_CPU_m68k_BFFFO_table+0x306> <== NOT EXECUTED
4dd3a: 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);
4dd3c: 2f2e ffa0 movel %fp@(-96),%sp@- <== NOT EXECUTED
4dd40: 4879 0006 cf4e pea 6cf4e <_CPU_m68k_BFFFO_table+0x331> <== NOT EXECUTED
4dd46: 4e93 jsr %a3@ <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
4dd48: 2f2e ffa4 movel %fp@(-92),%sp@- <== NOT EXECUTED
4dd4c: 4879 0006 cf6e pea 6cf6e <_CPU_m68k_BFFFO_table+0x351> <== NOT EXECUTED
4dd52: 4e93 jsr %a3@ <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
4dd54: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4dd58: 2eae ffa8 movel %fp@(-88),%sp@ <== NOT EXECUTED
4dd5c: 4879 0006 cf95 pea 6cf95 <_CPU_m68k_BFFFO_table+0x378> <== NOT EXECUTED
4dd62: 4e93 jsr %a3@ <== NOT EXECUTED
4dd64: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
4dd66: 2f2e ff84 movel %fp@(-124),%sp@-
4dd6a: 2a0e movel %fp,%d5
4dd6c: 0685 ffff ff7c addil #-132,%d5
4dd72: 2f05 movel %d5,%sp@-
4dd74: 4eb9 0005 7308 jsr 57308 <rtems_rfs_buffer_setblksize>
if (rc > 0)
4dd7a: 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));
4dd7c: 2400 movel %d0,%d2
if (rc > 0)
4dd7e: 6f16 bles 4dd96 <rtems_rfs_format+0x398> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
4dd80: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dd82: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4dd88: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4dd8a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dd8c: 4879 0006 cfbc pea 6cfbc <_CPU_m68k_BFFFO_table+0x39f> <== NOT EXECUTED
4dd92: 6000 073a braw 4e4ce <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);
4dd96: 42a7 clrl %sp@-
4dd98: 280e movel %fp,%d4
4dd9a: 0684 ffff ff34 addil #-204,%d4
4dda0: 42a7 clrl %sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
4dda2: 4200 clrb %d0
4dda4: 2f04 movel %d4,%sp@-
4dda6: 1d40 ff34 moveb %d0,%fp@(-204)
4ddaa: 2f05 movel %d5,%sp@-
handle->bnum = 0;
4ddac: 42ae ff36 clrl %fp@(-202)
handle->buffer = NULL;
4ddb0: 42ae ff3a clrl %fp@(-198)
4ddb4: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request>
if (rc > 0)
4ddba: 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);
4ddbe: 2400 movel %d0,%d2
if (rc > 0)
4ddc0: 6f1e bles 4dde0 <rtems_rfs_format+0x3e2> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4ddc2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4ddc4: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4ddc6: 4eba fbe8 jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
4ddca: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ddcc: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4ddd2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ddd4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ddd6: 4879 0006 cff2 pea 6cff2 <_CPU_m68k_BFFFO_table+0x3d5> <== NOT EXECUTED
4dddc: 6000 013e braw 4df1c <rtems_rfs_format+0x51e> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
4dde0: 206e ff3a moveal %fp@(-198),%a0
4dde4: 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));
4dde8: 2f2e ff84 movel %fp@(-124),%sp@-
4ddec: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
4ddf0: 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));
4ddf2: 2f0b movel %a3,%sp@-
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
4ddf4: 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));
4ddf6: 4eb9 0005 ce5c jsr 5ce5c <memset>
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
4ddfc: 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);
4ddfe: 7209 moveq #9,%d1
4de00: 1742 0002 moveb %d2,%a3@(2)
4de04: 1743 0003 moveb %d3,%a3@(3)
4de08: 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));
4de0c: 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);
4de0e: 16bc 0028 moveb #40,%a3@
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
4de12: 1740 0004 moveb %d0,%a3@(4)
4de16: 1740 0005 moveb %d0,%a3@(5)
4de1a: 1740 0006 moveb %d0,%a3@(6)
4de1e: 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);
4de22: 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));
4de24: 202e ff80 movel %fp@(-128),%d0
4de28: 2200 movel %d0,%d1
4de2a: e4a9 lsrl %d2,%d1
4de2c: 1741 000c moveb %d1,%a3@(12)
4de30: 2200 movel %d0,%d1
4de32: 4241 clrw %d1
4de34: 4841 swap %d1
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4de36: 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));
4de3c: 1740 000f moveb %d0,%a3@(15)
4de40: 1741 000d moveb %d1,%a3@(13)
4de44: 2200 movel %d0,%d1
4de46: e089 lsrl #8,%d1
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
4de48: 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));
4de4e: 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);
4de52: 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));
4de54: 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);
4de5a: 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));
4de5c: 176e ff87 000b moveb %fp@(-121),%a3@(11)
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
4de62: 176e ff94 0010 moveb %fp@(-108),%a3@(16)
4de68: 176e ff95 0011 moveb %fp@(-107),%a3@(17)
4de6e: 176e ff96 0012 moveb %fp@(-106),%a3@(18)
4de74: 176e ff97 0013 moveb %fp@(-105),%a3@(19)
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
4de7a: 176e ff98 0014 moveb %fp@(-104),%a3@(20)
4de80: 176e ff99 0015 moveb %fp@(-103),%a3@(21)
4de86: 176e ff9a 0016 moveb %fp@(-102),%a3@(22)
4de8c: 176e ff9b 0017 moveb %fp@(-101),%a3@(23)
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
4de92: 176e ffa0 0018 moveb %fp@(-96),%a3@(24)
4de98: 176e ffa1 0019 moveb %fp@(-95),%a3@(25)
4de9e: 176e ffa2 001a moveb %fp@(-94),%a3@(26)
4dea4: 176e ffa3 001b moveb %fp@(-93),%a3@(27)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
4deaa: 176e ffa4 001c moveb %fp@(-92),%a3@(28)
4deb0: 176e ffa5 001d moveb %fp@(-91),%a3@(29)
4deb6: 176e ffa6 001e moveb %fp@(-90),%a3@(30)
4debc: 176e ffa7 001f moveb %fp@(-89),%a3@(31)
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
4dec2: 176e ffa8 0020 moveb %fp@(-88),%a3@(32)
4dec8: 176e ffa9 0021 moveb %fp@(-87),%a3@(33)
4dece: 176e ffaa 0022 moveb %fp@(-86),%a3@(34)
4ded4: 176e ffab 0023 moveb %fp@(-85),%a3@(35)
write_sb (RTEMS_RFS_SB_OFFSET_INODE_SIZE, RTEMS_RFS_INODE_SIZE);
4deda: 1740 0027 moveb %d0,%a3@(39)
4dede: 1743 0024 moveb %d3,%a3@(36)
4dee2: 1743 0025 moveb %d3,%a3@(37)
4dee6: 1743 0026 moveb %d3,%a3@(38)
rtems_rfs_buffer_mark_dirty (&handle);
4deea: 1d41 ff34 moveb %d1,%fp@(-204)
rc = rtems_rfs_buffer_handle_release (fs, &handle);
4deee: 2f04 movel %d4,%sp@-
4def0: 2f05 movel %d5,%sp@-
4def2: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release>
if (rc > 0)
4def8: 4fef 0014 lea %sp@(20),%sp
4defc: 41fa fab2 lea %pc@(4d9b0 <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);
4df00: 2400 movel %d0,%d2
if (rc > 0)
4df02: 6f24 bles 4df28 <rtems_rfs_format+0x52a> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4df04: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4df06: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4df08: 4e90 jsr %a0@ <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
4df0a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4df0c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4df12: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4df14: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4df16: 4879 0006 d027 pea 6d027 <_CPU_m68k_BFFFO_table+0x40a> <== NOT EXECUTED
4df1c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4df22: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4df26: 602a bras 4df52 <rtems_rfs_format+0x554> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4df28: 2f04 movel %d4,%sp@-
4df2a: 2f05 movel %d5,%sp@-
4df2c: 4e90 jsr %a0@
if (rc > 0)
4df2e: 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);
4df30: 2400 movel %d0,%d2
if (rc > 0)
4df32: 6f00 033c blew 4e270 <rtems_rfs_format+0x872>
{
printf ("rtems-rfs: write-superblock: buffer handle close failed: %d: %s\n",
4df36: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4df38: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4df3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4df40: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4df42: 4879 0006 d063 pea 6d063 <_CPU_m68k_BFFFO_table+0x446> <== NOT EXECUTED
4df48: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4df4e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
4df52: 4879 0006 d0a4 pea 6d0a4 <_CPU_m68k_BFFFO_table+0x487> <== NOT EXECUTED
4df58: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
4df5e: 588f addql #4,%sp <== NOT EXECUTED
4df60: 6000 057c braw 4e4de <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);
4df64: 2c2e ffa4 movel %fp@(-92),%d6
4df68: 2002 movel %d2,%d0
4df6a: 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))
4df6e: 122a 0014 moveb %a2@(20),%d1
4df72: 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);
4df76: 2840 moveal %d0,%a4
4df78: 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))
4df7c: 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))
4df80: 202e ff80 movel %fp@(-128),%d0
4df84: b08b cmpl %a3,%d0
4df86: 6414 bccs 4df9c <rtems_rfs_format+0x59e> <== ALWAYS TAKEN
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
4df88: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4df8a: 4879 0006 d0cf pea 6d0cf <_CPU_m68k_BFFFO_table+0x4b2> <== NOT EXECUTED
4df90: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4df96: 508f addql #8,%sp <== NOT EXECUTED
4df98: 6000 0544 braw 4e4de <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))
4df9c: 220b movel %a3,%d1
4df9e: d286 addl %d6,%d1
4dfa0: b081 cmpl %d1,%d0
4dfa2: 6404 bccs 4dfa8 <rtems_rfs_format+0x5aa> <== NEVER TAKEN
group_size = rtems_rfs_fs_blocks (fs) - group_base;
4dfa4: 2c00 movel %d0,%d6
4dfa6: 9c8b subl %a3,%d6
if (verbose)
4dfa8: 4a07 tstb %d7
4dfaa: 6716 beqs 4dfc2 <rtems_rfs_format+0x5c4> <== ALWAYS TAKEN
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
4dfac: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4dfae: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4dfb0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4dfb2: 4879 0006 d108 pea 6d108 <_CPU_m68k_BFFFO_table+0x4eb> <== NOT EXECUTED
4dfb8: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4dfbe: 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;
4dfc2: 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;
4dfc6: 4201 clrb %d1
handle->bnum = 0;
handle->buffer = NULL;
4dfc8: 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;
4dfcc: 1d41 ff34 moveb %d1,%fp@(-204)
printf ("\nrtems-rfs: write-group: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
if (verbose)
4dfd0: 4a07 tstb %d7
4dfd2: 670e beqs 4dfe2 <rtems_rfs_format+0x5e4> <== ALWAYS TAKEN
printf (", blocks");
4dfd4: 4879 0006 d13e pea 6d13e <_CPU_m68k_BFFFO_table+0x521> <== NOT EXECUTED
4dfda: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4dfe0: 588f addql #4,%sp <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4dfe2: 2f0b movel %a3,%sp@-
4dfe4: 2f06 movel %d6,%sp@-
4dfe6: 2f04 movel %d4,%sp@-
4dfe8: 2f05 movel %d5,%sp@-
4dfea: 2f03 movel %d3,%sp@-
4dfec: 4eb9 0005 5d54 jsr 55d54 <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4dff2: 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,
4dff6: 2640 moveal %d0,%a3
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4dff8: 4a80 tstl %d0
4dffa: 6f20 bles 4e01c <rtems_rfs_format+0x61e> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4dffc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4dffe: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e000: 4eba f9ae jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
4e004: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e006: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e00c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e00e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e010: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e012: 4879 0006 d147 pea 6d147 <_CPU_m68k_BFFFO_table+0x52a> <== NOT EXECUTED
4e018: 6000 0192 braw 4e1ac <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));
4e01c: 2f2e ff84 movel %fp@(-124),%sp@-
4e020: 206e ff3a moveal %fp@(-198),%a0
4e024: 4878 00ff pea ff <DBL_MANT_DIG+0xca>
4e028: 2f28 001a movel %a0@(26),%sp@-
4e02c: 4eb9 0005 ce5c jsr 5ce5c <memset>
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4e032: 2f03 movel %d3,%sp@-
4e034: 4eb9 0005 5b9e jsr 55b9e <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
4e03a: 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);
4e03e: 2640 moveal %d0,%a3
if (rc > 0)
4e040: 4a80 tstl %d0
4e042: 6f28 bles 4e06c <rtems_rfs_format+0x66e> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
4e044: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e046: 4eb9 0005 5dac jsr 55dac <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
4e04c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e04e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e050: 4eba f95e jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
4e054: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e056: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e05c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e05e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e060: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e062: 4879 0006 d18d pea 6d18d <_CPU_m68k_BFFFO_table+0x570> <== NOT EXECUTED
4e068: 6000 0112 braw 4e17c <rtems_rfs_format+0x77e> <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
4e06c: 42a7 clrl %sp@-
4e06e: 47f9 0005 5a02 lea 55a02 <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++)
4e074: 9bcd subal %a5,%a5
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
4e076: 2f03 movel %d3,%sp@-
4e078: 4e93 jsr %a3@
/*
* Forced allocation of the inode bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
4e07a: 4878 0001 pea 1 <ADD>
4e07e: 2f03 movel %d3,%sp@-
4e080: 4e93 jsr %a3@
/*
* Determine the number of inodes blocks in the group.
*/
blocks = rtems_rfs_rup_quotient (fs->group_inodes, fs->inodes_per_block);
4e082: 2f2e ffac movel %fp@(-84),%sp@-
4e086: 2f2e ffa8 movel %fp@(-88),%sp@-
4e08a: 4eb9 0004 d9da jsr 4d9da <rtems_rfs_rup_quotient>
4e090: 4fef 0018 lea %sp@(24),%sp
4e094: 2d40 ff24 movel %d0,%fp@(-220)
4e098: 600c bras 4e0a6 <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);
4e09a: 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++)
4e09e: 528d addql #1,%a5
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
4e0a0: 2f03 movel %d3,%sp@-
4e0a2: 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++)
4e0a4: 508f addql #8,%sp
4e0a6: bbee ff24 cmpal %fp@(-220),%a5
4e0aa: 6dee blts 4e09a <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);
4e0ac: 2f03 movel %d3,%sp@-
4e0ae: 4eb9 0005 5dac jsr 55dac <rtems_rfs_bitmap_close>
if (rc > 0)
4e0b4: 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);
4e0b6: 2640 moveal %d0,%a3
if (rc > 0)
4e0b8: 4a80 tstl %d0
4e0ba: 6f24 bles 4e0e0 <rtems_rfs_format+0x6e2> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e0bc: 486e ff34 pea %fp@(-204) <== NOT EXECUTED
4e0c0: 486e ff7c pea %fp@(-132) <== NOT EXECUTED
4e0c4: 4eba f8ea jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
4e0c8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e0ca: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e0d0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e0d2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e0d4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e0d6: 4879 0006 d1d8 pea 6d1d8 <_CPU_m68k_BFFFO_table+0x5bb> <== NOT EXECUTED
4e0dc: 6000 00ce braw 4e1ac <rtems_rfs_format+0x7ae> <== NOT EXECUTED
group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
4e0e0: 7001 moveq #1,%d0
4e0e2: 1d40 ff34 moveb %d0,%fp@(-204)
if (verbose)
4e0e6: 4a07 tstb %d7
4e0e8: 670e beqs 4e0f8 <rtems_rfs_format+0x6fa> <== ALWAYS TAKEN
printf (", inodes");
4e0ea: 4879 0006 d21f pea 6d21f <_CPU_m68k_BFFFO_table+0x602> <== NOT EXECUTED
4e0f0: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e0f6: 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,
4e0f8: 486c 0002 pea %a4@(2)
4e0fc: 2f06 movel %d6,%sp@-
4e0fe: 2f04 movel %d4,%sp@-
4e100: 2f05 movel %d5,%sp@-
4e102: 2f03 movel %d3,%sp@-
4e104: 4eb9 0005 5d54 jsr 55d54 <rtems_rfs_bitmap_open>
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e10a: 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,
4e10e: 2c00 movel %d0,%d6
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e110: 6f1e bles 4e130 <rtems_rfs_format+0x732> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e112: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e114: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e116: 4eba f898 jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
4e11a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e11c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e122: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e124: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e126: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e128: 4879 0006 d228 pea 6d228 <_CPU_m68k_BFFFO_table+0x60b> <== NOT EXECUTED
4e12e: 607c bras 4e1ac <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));
4e130: 2f2e ff84 movel %fp@(-124),%sp@-
4e134: 4bf9 0005 ce5c lea 5ce5c <memset>,%a5
4e13a: 206e ff3a moveal %fp@(-198),%a0
4e13e: 42a7 clrl %sp@-
4e140: 2f28 001a movel %a0@(26),%sp@-
4e144: 4e95 jsr %a5@
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
4e146: 2f03 movel %d3,%sp@-
4e148: 4eb9 0005 5b9e jsr 55b9e <rtems_rfs_bitmap_map_clear_all>
if (rc > 0)
4e14e: 4fef 0010 lea %sp@(16),%sp
4e152: 41f9 0005 5dac lea 55dac <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);
4e158: 2c00 movel %d0,%d6
if (rc > 0)
4e15a: 6f2a bles 4e186 <rtems_rfs_format+0x788> <== ALWAYS TAKEN
{
rtems_rfs_bitmap_close (&bitmap);
4e15c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e15e: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
4e160: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e162: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e164: 4eba f84a jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
4e168: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e16a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e170: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e172: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e174: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e176: 4879 0006 d26e pea 6d26e <_CPU_m68k_BFFFO_table+0x651> <== NOT EXECUTED
4e17c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e182: 6000 0092 braw 4e216 <rtems_rfs_format+0x818> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4e186: 2f03 movel %d3,%sp@-
4e188: 4e90 jsr %a0@
if (rc > 0)
4e18a: 588f addql #4,%sp
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
4e18c: 2c00 movel %d0,%d6
if (rc > 0)
4e18e: 6f2a bles 4e1ba <rtems_rfs_format+0x7bc> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e190: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e192: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e194: 4eba f81a jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
4e198: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e19a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e1a0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e1a2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e1a4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e1a6: 4879 0006 d2b9 pea 6d2b9 <_CPU_m68k_BFFFO_table+0x69c> <== NOT EXECUTED
4e1ac: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e1b2: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4e1b6: 6000 0326 braw 4e4de <rtems_rfs_format+0xae0> <== NOT EXECUTED
" bitmap failed: %d: %s\n", group, rc, strerror (rc));
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
4e1ba: 7201 moveq #1,%d1
4e1bc: 1d41 ff34 moveb %d1,%fp@(-204)
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
4e1c0: 4a2e ff28 tstb %fp@(-216)
4e1c4: 6678 bnes 4e23e <rtems_rfs_format+0x840> <== NEVER TAKEN
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4e1c6: 2f04 movel %d4,%sp@-
4e1c8: 2f05 movel %d5,%sp@-
4e1ca: 4eba f7e4 jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)
if (rc > 0)
4e1ce: 508f addql #8,%sp
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
4e1d0: 2c00 movel %d0,%d6
if (rc > 0)
4e1d2: 6e00 0082 bgtw 4e256 <rtems_rfs_format+0x858>
4e1d6: 6000 0094 braw 4e26c <rtems_rfs_format+0x86e>
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
4e1da: 266e ff28 moveal %fp@(-216),%a3 <== NOT EXECUTED
4e1de: d7c6 addal %d6,%a3 <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
4e1e0: 42a7 clrl %sp@- <== NOT EXECUTED
4e1e2: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e1e4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e1e6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e1e8: 4e94 jsr %a4@ <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
4e1ea: 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,
4e1ee: 2e00 movel %d0,%d7 <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
4e1f0: 6f2c bles 4e21e <rtems_rfs_format+0x820> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
4e1f2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e1f4: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e1f6: 4eba f7b8 jsr %pc@(4d9b0 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
4e1fa: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4e1fc: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e202: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e204: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4e206: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e208: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e20a: 4879 0006 d300 pea 6d300 <_CPU_m68k_BFFFO_table+0x6e3> <== NOT EXECUTED
4e210: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e216: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
4e21a: 6000 02c2 braw 4e4de <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));
4e21e: 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++)
4e222: 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));
4e224: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
4e228: 206e ff3a moveal %fp@(-198),%a0 <== NOT EXECUTED
4e22c: 2f28 001a movel %a0@(26),%sp@- <== NOT EXECUTED
4e230: 4e95 jsr %a5@ <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
4e232: 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);
4e236: 7001 moveq #1,%d0 <== NOT EXECUTED
4e238: 1d40 ff34 moveb %d0,%fp@(-204) <== NOT EXECUTED
4e23c: 600e bras 4e24c <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,
4e23e: 568c addql #3,%a4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
4e240: 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,
4e242: 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,
4e246: 49f9 0005 6e84 lea 56e84 <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++)
4e24c: bcae ff24 cmpl %fp@(-220),%d6 <== NOT EXECUTED
4e250: 6d88 blts 4e1da <rtems_rfs_format+0x7dc> <== NOT EXECUTED
4e252: 6000 ff72 braw 4e1c6 <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",
4e256: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e258: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e25e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e260: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e262: 4879 0006 d346 pea 6d346 <_CPU_m68k_BFFFO_table+0x729> <== NOT EXECUTED
4e268: 6000 0264 braw 4e4ce <rtems_rfs_format+0xad0> <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
4e26c: 5282 addql #1,%d2
4e26e: 600a bras 4e27a <rtems_rfs_format+0x87c>
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4e270: 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))
4e272: 4282 clrl %d2
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
4e274: 0683 ffff ff3e addil #-194,%d3
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
4e27a: b4ae ffa0 cmpl %fp@(-96),%d2
4e27e: 6d00 fce4 bltw 4df64 <rtems_rfs_format+0x566>
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
4e282: 4a2a 0015 tstb %a2@(21)
4e286: 670c beqs 4e294 <rtems_rfs_format+0x896> <== ALWAYS TAKEN
printf ("\n");
4e288: 4878 000a pea a <LASTO> <== NOT EXECUTED
4e28c: 4eb9 0005 d13c jsr 5d13c <putchar> <== NOT EXECUTED
4e292: 588f addql #4,%sp <== NOT EXECUTED
rc = rtems_rfs_buffer_close (&fs);
4e294: 486e ff7c pea %fp@(-132)
4e298: 4eb9 0005 73e4 jsr 573e4 <rtems_rfs_buffer_close>
if (rc > 0)
4e29e: 588f addql #4,%sp
return -1;
if (config->verbose)
printf ("\n");
rc = rtems_rfs_buffer_close (&fs);
4e2a0: 2400 movel %d0,%d2
if (rc > 0)
4e2a2: 6f16 bles 4e2ba <rtems_rfs_format+0x8bc> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
4e2a4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e2a6: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e2ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e2ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e2b0: 4879 0006 d383 pea 6d383 <_CPU_m68k_BFFFO_table+0x766> <== NOT EXECUTED
4e2b6: 6000 0216 braw 4e4ce <rtems_rfs_format+0xad0> <== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
4e2ba: 486e ff2c pea %fp@(-212)
4e2be: 42a7 clrl %sp@-
4e2c0: 4878 0006 pea 6 <EXTENDSFDF>
4e2c4: 42a7 clrl %sp@-
4e2c6: 2f2e 0008 movel %fp@(8),%sp@-
4e2ca: 4eb9 0005 9296 jsr 59296 <rtems_rfs_fs_open>
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
4e2d0: 4fef 0014 lea %sp@(20),%sp
4e2d4: 4a80 tstl %d0
4e2d6: 6c30 bges 4e308 <rtems_rfs_format+0x90a> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
errno, strerror (errno));
4e2d8: 45f9 0005 bd98 lea 5bd98 <__errno>,%a2 <== NOT EXECUTED
4e2de: 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",
4e2e0: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e2e2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e2e4: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e2ea: 2400 movel %d0,%d2 <== NOT EXECUTED
errno, strerror (errno));
4e2ec: 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",
4e2ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e2f0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e2f2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e2f4: 4879 0006 d3b3 pea 6d3b3 <_CPU_m68k_BFFFO_table+0x796> <== NOT EXECUTED
4e2fa: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e300: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e304: 6000 01d4 braw 4e4da <rtems_rfs_format+0xadc> <== NOT EXECUTED
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
4e308: 486e ff30 pea %fp@(-208)
4e30c: 4878 0001 pea 1 <ADD>
4e310: 2f2e ff2c movel %fp@(-212),%sp@-
4e314: 4eb9 0004 eac8 jsr 4eac8 <rtems_rfs_inode_alloc>
if (rc > 0)
4e31a: 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);
4e31e: 2400 movel %d0,%d2
if (rc > 0)
4e320: 6f2a bles 4e34c <rtems_rfs_format+0x94e> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
4e322: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e324: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e32a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e32c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e32e: 4879 0006 d3e7 pea 6d3e7 <_CPU_m68k_BFFFO_table+0x7ca> <== NOT EXECUTED
4e334: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
4e33a: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e33e: 4eb9 0005 99ee jsr 599ee <rtems_rfs_fs_close> <== NOT EXECUTED
4e344: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4e348: 6000 016e braw 4e4b8 <rtems_rfs_format+0xaba> <== NOT EXECUTED
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
4e34c: 202e ff30 movel %fp@(-208),%d0
4e350: 7201 moveq #1,%d1
4e352: b280 cmpl %d0,%d1
4e354: 6720 beqs 4e376 <rtems_rfs_format+0x978> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
4e356: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e358: 4879 0006 d41b pea 6d41b <_CPU_m68k_BFFFO_table+0x7fe> <== NOT EXECUTED
4e35e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
4e364: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e368: 4eb9 0005 99ee jsr 599ee <rtems_rfs_fs_close> <== NOT EXECUTED
4e36e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4e372: 6000 0144 braw 4e4b8 <rtems_rfs_format+0xaba> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4e376: 4878 0001 pea 1 <ADD>
4e37a: 260e movel %fp,%d3
4e37c: 0683 ffff ff56 addil #-170,%d3
4e382: 2f03 movel %d3,%sp@-
4e384: 4878 0001 pea 1 <ADD>
4e388: 2f2e ff2c movel %fp@(-212),%sp@-
4e38c: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open>
if (rc > 0)
4e392: 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);
4e396: 2400 movel %d0,%d2
if (rc > 0)
4e398: 6f3c bles 4e3d6 <rtems_rfs_format+0x9d8> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
4e39a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e39c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e3a2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e3a4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e3a6: 4879 0006 d451 pea 6d451 <_CPU_m68k_BFFFO_table+0x834> <== NOT EXECUTED
4e3ac: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
4e3b2: 2f2e ff30 movel %fp@(-208),%sp@- <== NOT EXECUTED
4e3b6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4e3ba: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e3be: 4eb9 0004 e902 jsr 4e902 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
4e3c4: 2f2e ff2c movel %fp@(-212),%sp@- <== NOT EXECUTED
4e3c8: 4eb9 0005 99ee jsr 599ee <rtems_rfs_fs_close> <== NOT EXECUTED
4e3ce: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
4e3d2: 6000 00e4 braw 4e4b8 <rtems_rfs_format+0xaba> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
4e3d6: 42a7 clrl %sp@-
4e3d8: 42a7 clrl %sp@-
4e3da: 4878 41c9 pea 41c9 <D_MAX_EXP+0x39ca>
4e3de: 42a7 clrl %sp@-
4e3e0: 2f03 movel %d3,%sp@-
4e3e2: 4eb9 0004 ef38 jsr 4ef38 <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)
4e3e8: 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,
4e3ec: 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)
4e3ee: 6f1c bles 4e40c <rtems_rfs_format+0xa0e> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
4e3f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e3f2: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e3f8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e3fa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e3fc: 4879 0006 d47f pea 6d47f <_CPU_m68k_BFFFO_table+0x862> <== NOT EXECUTED
4e402: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e408: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
4e40c: 2f2e ff30 movel %fp@(-208),%sp@-
4e410: 4878 0001 pea 1 <ADD>
4e414: 4879 0006 afc7 pea 6afc7 <flashdisk_ops+0x19>
4e41a: 486e ff56 pea %fp@(-170)
4e41e: 2f2e ff2c movel %fp@(-212),%sp@-
4e422: 4eb9 0005 792a jsr 5792a <rtems_rfs_dir_add_entry>
if (rc > 0)
4e428: 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);
4e42c: 2400 movel %d0,%d2
if (rc > 0)
4e42e: 6f1c bles 4e44c <rtems_rfs_format+0xa4e> <== ALWAYS TAKEN
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
4e430: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e432: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e438: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e43a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e43c: 4879 0006 d4b3 pea 6d4b3 <_CPU_m68k_BFFFO_table+0x896> <== NOT EXECUTED
4e442: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e448: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
4e44c: 486e ff56 pea %fp@(-170)
4e450: 2f2e ff2c movel %fp@(-212),%sp@-
4e454: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close>
if (rc > 0)
4e45a: 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);
4e45c: 2400 movel %d0,%d2
if (rc > 0)
4e45e: 6f1c bles 4e47c <rtems_rfs_format+0xa7e> <== ALWAYS TAKEN
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
4e460: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e462: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e468: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e46a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e46c: 4879 0006 d4e4 pea 6d4e4 <_CPU_m68k_BFFFO_table+0x8c7> <== NOT EXECUTED
4e472: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e478: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
4e47c: 2f2e ff2c movel %fp@(-212),%sp@-
4e480: 4eb9 0005 99ee jsr 599ee <rtems_rfs_fs_close>
if (rc < 0)
4e486: 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);
4e488: 2400 movel %d0,%d2
if (rc < 0)
4e48a: 6c2c bges 4e4b8 <rtems_rfs_format+0xaba> <== ALWAYS TAKEN
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
errno, strerror (errno));
4e48c: 45f9 0005 bd98 lea 5bd98 <__errno>,%a2 <== NOT EXECUTED
4e492: 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",
4e494: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e496: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e498: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e49e: 2600 movel %d0,%d3 <== NOT EXECUTED
errno, strerror (errno));
4e4a0: 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",
4e4a2: 2040 moveal %d0,%a0 <== NOT EXECUTED
4e4a4: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e4a6: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
4e4a8: 4879 0006 d513 pea 6d513 <_CPU_m68k_BFFFO_table+0x8f6> <== NOT EXECUTED
4e4ae: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e4b4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
4e4b8: 4a82 tstl %d2
4e4ba: 6f1e bles 4e4da <rtems_rfs_format+0xadc> <== ALWAYS TAKEN
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
4e4bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e4be: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e4c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e4c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e4c8: 4879 0006 d548 pea 6d548 <_CPU_m68k_BFFFO_table+0x92b> <== NOT EXECUTED
4e4ce: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e4d4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e4d8: 6004 bras 4e4de <rtems_rfs_format+0xae0> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
4e4da: 4280 clrl %d0
4e4dc: 6014 bras 4e4f2 <rtems_rfs_format+0xaf4>
/*
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
4e4de: 70ff moveq #-1,%d0 <== NOT EXECUTED
4e4e0: 6010 bras 4e4f2 <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;
4e4e2: 2d40 ff98 movel %d0,%fp@(-104) <== NOT EXECUTED
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
4e4e6: 4a2a 0015 tstb %a2@(21)
4e4ea: 6700 f87a beqw 4dd66 <rtems_rfs_format+0x368>
4e4ee: 6000 f754 braw 4dc44 <rtems_rfs_format+0x246> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
4e4f2: 4cee 3cfc fefc moveml %fp@(-260),%d2-%d7/%a2-%a5
4e4f8: 4e5e unlk %fp <== NOT EXECUTED
000599ee <rtems_rfs_fs_close>:
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
599ee: 4e56 fff0 linkw %fp,#-16
599f2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
599f6: 4878 0002 pea 2 <DOUBLE_FLOAT>
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
599fa: 246e 0008 moveal %fp@(8),%a2
int group;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_CLOSE))
599fe: 42a7 clrl %sp@-
59a00: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
59a06: 508f addql #8,%sp
59a08: 4a00 tstb %d0
59a0a: 670e beqs 59a1a <rtems_rfs_fs_close+0x2c> <== ALWAYS TAKEN
printf ("rtems-rfs: close\n");
59a0c: 4879 0006 f2c0 pea 6f2c0 <CSWTCH.2+0x12ac> <== NOT EXECUTED
59a12: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
59a18: 588f addql #4,%sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
59a1a: 4283 clrl %d3
59a1c: 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]);
59a1e: 47f9 0004 e6e6 lea 4e6e6 <rtems_rfs_group_close>,%a3
59a24: 6016 bras 59a3c <rtems_rfs_fs_close+0x4e>
59a26: 202a 0020 movel %a2@(32),%d0
59a2a: 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++)
59a2c: 5282 addql #1,%d2
59a2e: 0683 0000 004c addil #76,%d3
rtems_rfs_group_close (fs, &fs->groups[group]);
59a34: 2f00 movel %d0,%sp@-
59a36: 2f0a movel %a2,%sp@-
59a38: 4e93 jsr %a3@
59a3a: 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++)
59a3c: b4aa 0024 cmpl %a2@(36),%d2
59a40: 6de4 blts 59a26 <rtems_rfs_fs_close+0x38>
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
59a42: 2f0a movel %a2,%sp@-
59a44: 4eb9 0005 73e4 jsr 573e4 <rtems_rfs_buffer_close>
free (fs);
59a4a: 2f0a movel %a2,%sp@-
59a4c: 4eb9 0004 6348 jsr 46348 <free>
return 0;
}
59a52: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
59a58: 4280 clrl %d0
59a5a: 4e5e unlk %fp
...
00059296 <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)
{
59296: 4e56 ff9c linkw %fp,#-100
5929a: 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))
5929e: 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)
{
592a2: 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))
592a6: 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)
{
592a8: 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))
592ac: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
592b2: 508f addql #8,%sp
592b4: 4a00 tstb %d0
592b6: 6710 beqs 592c8 <rtems_rfs_fs_open+0x32> <== ALWAYS TAKEN
printf ("rtems-rfs: open: %s\n", name);
592b8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
592ba: 4879 0006 efb9 pea 6efb9 <CSWTCH.2+0xfa5> <== NOT EXECUTED
592c0: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
592c6: 508f addql #8,%sp <== NOT EXECUTED
*fs = malloc (sizeof (rtems_rfs_file_system));
592c8: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f>
592cc: 4eb9 0004 6910 jsr 46910 <malloc>
if (!*fs)
592d2: 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));
592d4: 2880 movel %d0,%a4@
if (!*fs)
592d6: 6630 bnes 59308 <rtems_rfs_fs_open+0x72> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
592d8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
592dc: 42a7 clrl %sp@- <== NOT EXECUTED
592de: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
592e4: 508f addql #8,%sp <== NOT EXECUTED
592e6: 4a00 tstb %d0 <== NOT EXECUTED
592e8: 670e beqs 592f8 <rtems_rfs_fs_open+0x62> <== NOT EXECUTED
printf ("rtems-rfs: open: no memory for file system data\n");
592ea: 4879 0006 efce pea 6efce <CSWTCH.2+0xfba> <== NOT EXECUTED
592f0: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
592f6: 588f addql #4,%sp <== NOT EXECUTED
errno = ENOMEM;
592f8: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
592fe: 720c moveq #12,%d1 <== NOT EXECUTED
59300: 2040 moveal %d0,%a0 <== NOT EXECUTED
59302: 2081 movel %d1,%a0@ <== NOT EXECUTED
59304: 6000 00dc braw 593e2 <rtems_rfs_fs_open+0x14c> <== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
59308: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f>
5930c: 42a7 clrl %sp@-
5930e: 2f00 movel %d0,%sp@-
59310: 4eb9 0005 ce5c jsr 5ce5c <memset>
(*fs)->user = user;
59316: 2054 moveal %a4@,%a0
59318: 216e 000c 0080 movel %fp@(12),%a0@(128)
rtems_chain_initialize_empty (&(*fs)->buffers);
5931e: 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 );
59320: 43e8 0048 lea %a0@(72),%a1
59324: 2149 0044 movel %a1,%a0@(68)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
59328: 43e8 0044 lea %a0@(68),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5932c: 42a8 0048 clrl %a0@(72)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
59330: 2149 004c movel %a1,%a0@(76)
rtems_chain_initialize_empty (&(*fs)->release);
59334: 2054 moveal %a4@,%a0
Chain_Node *tail = _Chain_Tail( the_chain );
59336: 43e8 0058 lea %a0@(88),%a1
5933a: 2149 0054 movel %a1,%a0@(84)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5933e: 43e8 0054 lea %a0@(84),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
59342: 42a8 0058 clrl %a0@(88)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
59346: 2149 005c movel %a1,%a0@(92)
rtems_chain_initialize_empty (&(*fs)->release_modified);
5934a: 2054 moveal %a4@,%a0
Chain_Node *tail = _Chain_Tail( the_chain );
5934c: 43e8 0068 lea %a0@(104),%a1
59350: 2149 0064 movel %a1,%a0@(100)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
59354: 43e8 0064 lea %a0@(100),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
59358: 42a8 0068 clrl %a0@(104)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5935c: 2149 006c movel %a1,%a0@(108)
rtems_chain_initialize_empty (&(*fs)->file_shares);
59360: 2054 moveal %a4@,%a0
Chain_Node *tail = _Chain_Tail( the_chain );
59362: 43e8 0078 lea %a0@(120),%a1
59366: 2149 0074 movel %a1,%a0@(116)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
5936a: 43e8 0074 lea %a0@(116),%a1
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5936e: 42a8 0078 clrl %a0@(120)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
59372: 2149 007c movel %a1,%a0@(124)
(*fs)->max_held_buffers = max_held_buffers;
59376: 2054 moveal %a4@,%a0
59378: 216e 0014 0040 movel %fp@(20),%a0@(64)
(*fs)->buffers_count = 0;
(*fs)->release_count = 0;
(*fs)->release_modified_count = 0;
(*fs)->flags = flags;
5937e: 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;
59382: 42a8 0050 clrl %a0@(80)
(*fs)->release_count = 0;
59386: 42a8 0060 clrl %a0@(96)
(*fs)->release_modified_count = 0;
5938a: 42a8 0070 clrl %a0@(112)
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
5938e: 2f08 movel %a0,%sp@-
59390: 2f04 movel %d4,%sp@-
59392: 4eb9 0005 709a jsr 5709a <rtems_rfs_buffer_open>
if (rc > 0)
59398: 4fef 0014 lea %sp@(20),%sp
#endif
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
5939c: 2800 movel %d0,%d4
if (rc > 0)
5939e: 6f48 bles 593e8 <rtems_rfs_fs_open+0x152> <== ALWAYS TAKEN
{
free (*fs);
593a0: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
593a2: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
593a8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
593ac: 42a7 clrl %sp@- <== NOT EXECUTED
593ae: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
593b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
593b8: 4a00 tstb %d0 <== NOT EXECUTED
593ba: 671c beqs 593d8 <rtems_rfs_fs_open+0x142> <== NOT EXECUTED
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
593bc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
593be: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
593c4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
593c6: 2f04 movel %d4,%sp@- <== NOT EXECUTED
593c8: 4879 0006 effe pea 6effe <CSWTCH.2+0xfea> <== NOT EXECUTED
593ce: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
593d4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
593d8: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
593de: 2040 moveal %d0,%a0 <== NOT EXECUTED
593e0: 2084 movel %d4,%a0@ <== NOT EXECUTED
return -1;
593e2: 70ff moveq #-1,%d0 <== NOT EXECUTED
593e4: 6000 05fe braw 599e4 <rtems_rfs_fs_open+0x74e> <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
593e8: 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);
593ea: 4878 0001 pea 1 <ADD>
593ee: 2e0e movel %fp,%d7
593f0: 0687 ffff ffd0 addil #-48,%d7
593f6: 42a7 clrl %sp@-
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
593f8: 4200 clrb %d0
593fa: 2f07 movel %d7,%sp@-
593fc: 1d40 ffd0 moveb %d0,%fp@(-48)
59400: 2f0b movel %a3,%sp@-
handle->bnum = 0;
59402: 42ae ffd2 clrl %fp@(-46)
handle->buffer = NULL;
59406: 42ae ffd6 clrl %fp@(-42)
5940a: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request>
if (rc > 0)
59410: 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);
59414: 2800 movel %d0,%d4
if (rc > 0)
59416: 6f2a bles 59442 <rtems_rfs_fs_open+0x1ac> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59418: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5941c: 42a7 clrl %sp@- <== NOT EXECUTED
5941e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59424: 508f addql #8,%sp <== NOT EXECUTED
59426: 4a00 tstb %d0 <== NOT EXECUTED
59428: 6700 0436 beqw 59860 <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
5942c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5942e: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59434: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59436: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59438: 4879 0006 f02b pea 6f02b <CSWTCH.2+0x1017> <== NOT EXECUTED
5943e: 6000 0324 braw 59764 <rtems_rfs_fs_open+0x4ce> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
59442: 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)
59446: 4280 clrl %d0
59448: 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);
5944a: 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)
5944e: 1012 moveb %a2@,%d0
59450: e3a8 lsll %d1,%d0
59452: 4281 clrl %d1
59454: 122a 0001 moveb %a2@(1),%d1
59458: 4841 swap %d1
5945a: 4241 clrw %d1
5945c: 8081 orl %d1,%d0
5945e: 4281 clrl %d1
59460: 122a 0003 moveb %a2@(3),%d1
59464: 8081 orl %d1,%d0
59466: 122a 0002 moveb %a2@(2),%d1
5946a: e189 lsll #8,%d1
5946c: 8081 orl %d1,%d0
5946e: 0c80 2809 2001 cmpil #671686657,%d0
59474: 671e beqs 59494 <rtems_rfs_fs_open+0x1fe> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59476: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5947a: 42a7 clrl %sp@- <== NOT EXECUTED
5947c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59482: 508f addql #8,%sp <== NOT EXECUTED
59484: 4a00 tstb %d0 <== NOT EXECUTED
59486: 6700 014a beqw 595d2 <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
5948a: 4879 0006 f05d pea 6f05d <CSWTCH.2+0x1049> <== NOT EXECUTED
59490: 6000 00be braw 59550 <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);
59494: 4280 clrl %d0
59496: 4281 clrl %d1
59498: 102a 000c moveb %a2@(12),%d0
5949c: 122a 000d moveb %a2@(13),%d1
594a0: 7418 moveq #24,%d2
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
594a2: 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;
594a4: 4bf9 0006 8ff0 lea 68ff0 <__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);
594aa: e5a8 lsll %d2,%d0
594ac: 4841 swap %d1
594ae: 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);
594b0: 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);
594b4: 8081 orl %d1,%d0
594b6: 4281 clrl %d1
594b8: 122a 000f moveb %a2@(15),%d1
594bc: 8081 orl %d1,%d0
594be: 122a 000e moveb %a2@(14),%d1
594c2: e189 lsll #8,%d1
594c4: 8081 orl %d1,%d0
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
594c6: 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);
594c8: 2740 0004 movel %d0,%a3@(4)
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
594cc: 1c2a 0008 moveb %a2@(8),%d6
594d0: 122a 0009 moveb %a2@(9),%d1
594d4: e5ae lsll %d2,%d6
594d6: 4841 swap %d1
594d8: 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);
594da: 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);
594dc: 8c81 orl %d1,%d6
594de: 4281 clrl %d1
594e0: 122a 000b moveb %a2@(11),%d1
594e4: 8c81 orl %d1,%d6
594e6: 122a 000a moveb %a2@(10),%d1
594ea: e189 lsll #8,%d1
594ec: 8c81 orl %d1,%d6
594ee: 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;
594f2: 2f00 movel %d0,%sp@-
594f4: 42a7 clrl %sp@-
594f6: 2f06 movel %d6,%sp@-
594f8: 2d48 ffc4 movel %a0,%fp@(-60)
594fc: 42a7 clrl %sp@-
594fe: 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);
59500: 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;
59504: 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);
59508: 93c9 subal %a1,%a1
5950a: 2628 0020 movel %a0@(32),%d3
5950e: 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);
59512: 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;
59516: 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;
59518: 2800 movel %d0,%d4
5951a: 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;
5951c: 2f02 movel %d2,%sp@-
5951e: 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);
59522: 2d49 ffc8 movel %a1,%fp@(-56)
return media_blocks * media_block_size;
59526: 2f2e ffc8 movel %fp@(-56),%sp@-
5952a: 4e95 jsr %a5@
5952c: 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))
59530: 9285 subl %d5,%d1
59532: 9184 subxl %d4,%d0
59534: 6424 bccs 5955a <rtems_rfs_fs_open+0x2c4> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59536: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5953a: 42a7 clrl %sp@- <== NOT EXECUTED
5953c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59542: 508f addql #8,%sp <== NOT EXECUTED
59544: 4a00 tstb %d0 <== NOT EXECUTED
59546: 6700 008a beqw 595d2 <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
5954a: 4879 0006 f097 pea 6f097 <CSWTCH.2+0x1083> <== NOT EXECUTED
59550: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
59556: 588f addql #4,%sp <== NOT EXECUTED
59558: 6078 bras 595d2 <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)
5955a: 4280 clrl %d0
5955c: 102a 0024 moveb %a2@(36),%d0
59560: 7218 moveq #24,%d1
59562: 7438 moveq #56,%d2
59564: e3a8 lsll %d1,%d0
59566: 4281 clrl %d1
59568: 122a 0025 moveb %a2@(37),%d1
5956c: 4841 swap %d1
5956e: 4241 clrw %d1
59570: 8081 orl %d1,%d0
59572: 4281 clrl %d1
59574: 122a 0027 moveb %a2@(39),%d1
59578: 8081 orl %d1,%d0
5957a: 122a 0026 moveb %a2@(38),%d1
5957e: e189 lsll #8,%d1
59580: 8081 orl %d1,%d0
59582: b480 cmpl %d0,%d2
59584: 675c beqs 595e2 <rtems_rfs_fs_open+0x34c> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59586: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5958a: 42a7 clrl %sp@- <== NOT EXECUTED
5958c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59592: 508f addql #8,%sp <== NOT EXECUTED
59594: 4a00 tstb %d0 <== NOT EXECUTED
59596: 673a beqs 595d2 <rtems_rfs_fs_open+0x33c> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: inode size mismatch: fs:%" PRId32 " target:%" PRId32 "\n",
59598: 42a7 clrl %sp@- <== NOT EXECUTED
read_sb (RTEMS_RFS_SB_OFFSET_VERSION), RTEMS_RFS_VERSION_MASK);
5959a: 4280 clrl %d0 <== NOT EXECUTED
5959c: 4281 clrl %d1 <== NOT EXECUTED
5959e: 102a 0004 moveb %a2@(4),%d0 <== NOT EXECUTED
595a2: 122a 0005 moveb %a2@(5),%d1 <== NOT EXECUTED
595a6: 7618 moveq #24,%d3 <== NOT EXECUTED
595a8: 4841 swap %d1 <== NOT EXECUTED
595aa: 4241 clrw %d1 <== NOT EXECUTED
595ac: e7a8 lsll %d3,%d0 <== NOT EXECUTED
595ae: 8081 orl %d1,%d0 <== NOT EXECUTED
595b0: 4281 clrl %d1 <== NOT EXECUTED
595b2: 122a 0007 moveb %a2@(7),%d1 <== NOT EXECUTED
595b6: 8081 orl %d1,%d0 <== NOT EXECUTED
595b8: 122a 0006 moveb %a2@(6),%d1 <== NOT EXECUTED
595bc: 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",
595be: 8081 orl %d1,%d0 <== NOT EXECUTED
595c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
595c2: 4879 0006 f0d7 pea 6f0d7 <CSWTCH.2+0x10c3> <== NOT EXECUTED
595c8: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
595ce: 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);
595d2: 486e ffd0 pea %fp@(-48) <== NOT EXECUTED
595d6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
595d8: 4eba fc2e jsr %pc@(59208 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
595dc: 508f addql #8,%sp <== NOT EXECUTED
595de: 6000 0278 braw 59858 <rtems_rfs_fs_open+0x5c2> <== NOT EXECUTED
return EIO;
}
fs->bad_blocks = read_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS);
595e2: 4280 clrl %d0
595e4: 102a 0010 moveb %a2@(16),%d0
595e8: 7218 moveq #24,%d1
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
595ea: 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);
595ec: 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);
595ee: e3a8 lsll %d1,%d0
595f0: 4281 clrl %d1
595f2: 122a 0011 moveb %a2@(17),%d1
595f6: 4841 swap %d1
595f8: 4241 clrw %d1
595fa: 8081 orl %d1,%d0
595fc: 4281 clrl %d1
595fe: 122a 0013 moveb %a2@(19),%d1
59602: 8081 orl %d1,%d0
59604: 122a 0012 moveb %a2@(18),%d1
59608: e189 lsll #8,%d1
5960a: 8081 orl %d1,%d0
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
5960c: 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);
5960e: 2740 0018 movel %d0,%a3@(24)
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
59612: 4280 clrl %d0
59614: 102a 0014 moveb %a2@(20),%d0
59618: 122a 0015 moveb %a2@(21),%d1
5961c: e5a8 lsll %d2,%d0
5961e: 4841 swap %d1
59620: 4241 clrw %d1
59622: 8081 orl %d1,%d0
59624: 4281 clrl %d1
59626: 122a 0017 moveb %a2@(23),%d1
5962a: 8081 orl %d1,%d0
5962c: 122a 0016 moveb %a2@(22),%d1
59630: e189 lsll #8,%d1
59632: 8081 orl %d1,%d0
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
59634: 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);
59636: 2740 001c movel %d0,%a3@(28)
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
5963a: 4280 clrl %d0
5963c: 102a 0018 moveb %a2@(24),%d0
59640: 122a 0019 moveb %a2@(25),%d1
59644: e5a8 lsll %d2,%d0
59646: 4841 swap %d1
59648: 4241 clrw %d1
5964a: 8081 orl %d1,%d0
5964c: 4281 clrl %d1
5964e: 122a 001b moveb %a2@(27),%d1
59652: 8081 orl %d1,%d0
59654: 122a 001a moveb %a2@(26),%d1
59658: e189 lsll #8,%d1
5965a: 8081 orl %d1,%d0
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
5965c: 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);
5965e: 2740 0024 movel %d0,%a3@(36)
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
59662: 122a 001c moveb %a2@(28),%d1
59666: e5a9 lsll %d2,%d1
59668: 4282 clrl %d2
5966a: 142a 001d moveb %a2@(29),%d2
5966e: 4842 swap %d2
59670: 4242 clrw %d2
59672: 8282 orl %d2,%d1
59674: 4282 clrl %d2
59676: 142a 001f moveb %a2@(31),%d2
5967a: 8282 orl %d2,%d1
5967c: 142a 001e moveb %a2@(30),%d2
59680: e18a lsll #8,%d2
59682: 8282 orl %d2,%d1
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
59684: 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);
59686: 2741 0028 movel %d1,%a3@(40)
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
5968a: 142a 0020 moveb %a2@(32),%d2
5968e: e7aa lsll %d3,%d2
59690: 4283 clrl %d3
59692: 162a 0021 moveb %a2@(33),%d3
59696: 4843 swap %d3
59698: 4243 clrw %d3
5969a: 8483 orl %d3,%d2
5969c: 4283 clrl %d3
5969e: 162a 0023 moveb %a2@(35),%d3
596a2: 8483 orl %d3,%d2
596a4: 162a 0022 moveb %a2@(34),%d3
596a8: 45fa fb5e lea %pc@(59208 <rtems_rfs_buffer_handle_close>),%a2
596ac: e18b lsll #8,%d3
596ae: 8483 orl %d3,%d2
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
596b0: 2606 movel %d6,%d3
596b2: e48b lsrl #2,%d3
fs->block_map_singly_blocks =
596b4: 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 =
596b6: 2743 0034 movel %d3,%a3@(52)
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
596ba: 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;
596be: 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);
596c2: 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;
596c6: 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 =
596ca: 2243 moveal %d3,%a1
596cc: 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;
596d0: 2742 0014 movel %d2,%a3@(20)
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
596d4: 2406 movel %d6,%d2
596d6: 7638 moveq #56,%d3
596d8: 4c43 2002 remul %d3,%d2,%d2
if (fs->group_blocks >
rtems_rfs_bitmap_numof_bits (rtems_rfs_fs_block_size (fs)))
596dc: 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 =
596de: 2748 0038 movel %a0,%a3@(56)
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
596e2: 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;
596e6: 2742 0030 movel %d2,%a3@(48)
if (fs->group_blocks >
596ea: bc81 cmpl %d1,%d6
596ec: 642e bccs 5971c <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);
596ee: 2f07 movel %d7,%sp@- <== NOT EXECUTED
596f0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
596f2: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
596f4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
596f8: 42a7 clrl %sp@- <== NOT EXECUTED
596fa: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59700: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59704: 4a00 tstb %d0 <== NOT EXECUTED
59706: 6700 0150 beqw 59858 <rtems_rfs_fs_open+0x5c2> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: groups blocks larger than block bits\n");
5970a: 4879 0006 f11b pea 6f11b <CSWTCH.2+0x1107> <== NOT EXECUTED
59710: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
59716: 588f addql #4,%sp <== NOT EXECUTED
59718: 6000 013e braw 59858 <rtems_rfs_fs_open+0x5c2> <== NOT EXECUTED
return EIO;
}
rtems_rfs_buffer_handle_close (fs, &handle);
5971c: 2f07 movel %d7,%sp@-
5971e: 2f0b movel %a3,%sp@-
59720: 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));
59722: 2f2b 0008 movel %a3@(8),%sp@-
59726: 2f0b movel %a3,%sp@-
59728: 4eb9 0005 7308 jsr 57308 <rtems_rfs_buffer_setblksize>
if (rc > 0)
5972e: 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));
59732: 2800 movel %d0,%d4
if (rc > 0)
59734: 6f3c bles 59772 <rtems_rfs_fs_open+0x4dc> <== ALWAYS TAKEN
{
rtems_rfs_buffer_handle_close (fs, &handle);
59736: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59738: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5973a: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5973c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59740: 42a7 clrl %sp@- <== NOT EXECUTED
59742: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59748: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5974c: 4a00 tstb %d0 <== NOT EXECUTED
5974e: 6700 0110 beqw 59860 <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: invalid superblock block size%d: %s\n",
59752: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59754: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
5975a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5975c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5975e: 4879 0006 f15c pea 6f15c <CSWTCH.2+0x1148> <== NOT EXECUTED
59764: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5976a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5976e: 6000 00f0 braw 59860 <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
59772: 4878 004c pea 4c <DBL_MANT_DIG+0x17>
59776: 2f2b 0024 movel %a3@(36),%sp@-
5977a: 4eb9 0004 5fd0 jsr 45fd0 <calloc>
if (!fs->groups)
59780: 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));
59782: 2740 0020 movel %d0,%a3@(32)
if (!fs->groups)
59786: 6600 00bc bnew 59844 <rtems_rfs_fs_open+0x5ae>
{
rtems_rfs_buffer_handle_close (fs, &handle);
5978a: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5978c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5978e: 4e92 jsr %a2@ <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59790: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59794: 42a7 clrl %sp@- <== NOT EXECUTED
59796: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5979c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
597a0: 4a00 tstb %d0 <== NOT EXECUTED
597a2: 6700 00b8 beqw 5985c <rtems_rfs_fs_open+0x5c6> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table\n");
597a6: 4879 0006 f19d pea 6f19d <CSWTCH.2+0x1189> <== NOT EXECUTED
597ac: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
597b2: 588f addql #4,%sp <== NOT EXECUTED
597b4: 6000 00a6 braw 5985c <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,
597b8: 206b 0020 moveal %a3@(32),%a0
597bc: d1c3 addal %d3,%a0
597be: 0683 0000 004c addil #76,%d3
rtems_rfs_fs_block (fs, group, 0),
597c4: 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,
597c8: 2f08 movel %a0,%sp@-
597ca: 2f2b 002c movel %a3@(44),%sp@-
597ce: 2f00 movel %d0,%sp@-
rtems_rfs_fs_block (fs, group, 0),
597d0: 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,
597d4: 2240 moveal %d0,%a1
597d6: 4869 0001 pea %a1@(1)
597da: 2f0b movel %a3,%sp@-
597dc: 4e92 jsr %a2@
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
597de: 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,
597e2: 2800 movel %d0,%d4
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
597e4: 6f5a bles 59840 <rtems_rfs_fs_open+0x5aa> <== ALWAYS TAKEN
597e6: 4285 clrl %d5 <== NOT EXECUTED
597e8: 4283 clrl %d3 <== NOT EXECUTED
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
597ea: 45f9 0004 e6e6 lea 4e6e6 <rtems_rfs_group_close>,%a2 <== NOT EXECUTED
597f0: 6016 bras 59808 <rtems_rfs_fs_open+0x572> <== NOT EXECUTED
597f2: 202b 0020 movel %a3@(32),%d0 <== NOT EXECUTED
597f6: d085 addl %d5,%d0 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
597f8: 5283 addql #1,%d3 <== NOT EXECUTED
597fa: 0685 0000 004c addil #76,%d5 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
59800: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59802: 2f0b movel %a3,%sp@- <== NOT EXECUTED
59804: 4e92 jsr %a2@ <== NOT EXECUTED
59806: 508f addql #8,%sp <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
59808: b483 cmpl %d3,%d2 <== NOT EXECUTED
5980a: 6ee6 bgts 597f2 <rtems_rfs_fs_open+0x55c> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
5980c: 486e ffd0 pea %fp@(-48) <== NOT EXECUTED
59810: 2f0b movel %a3,%sp@- <== NOT EXECUTED
59812: 4eba f9f4 jsr %pc@(59208 <rtems_rfs_buffer_handle_close>)<== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59816: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5981a: 42a7 clrl %sp@- <== NOT EXECUTED
5981c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59822: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59826: 4a00 tstb %d0 <== NOT EXECUTED
59828: 6736 beqs 59860 <rtems_rfs_fs_open+0x5ca> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: no memory for group table%d: %s\n",
5982a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5982c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59832: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59834: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59836: 4879 0006 f1d3 pea 6f1d3 <CSWTCH.2+0x11bf> <== NOT EXECUTED
5983c: 6000 ff26 braw 59764 <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++)
59840: 5282 addql #1,%d2
59842: 600a bras 5984e <rtems_rfs_fs_open+0x5b8>
return rc;
}
fs->groups = calloc (fs->group_count, sizeof (rtems_rfs_group));
if (!fs->groups)
59844: 4283 clrl %d3
59846: 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,
59848: 45f9 0004 e4fc lea 4e4fc <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++)
5984e: b4ab 0024 cmpl %a3@(36),%d2
59852: 6d00 ff64 bltw 597b8 <rtems_rfs_fs_open+0x522>
59856: 6048 bras 598a0 <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;
59858: 7805 moveq #5,%d4 <== NOT EXECUTED
5985a: 6008 bras 59864 <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;
5985c: 780c moveq #12,%d4 <== NOT EXECUTED
5985e: 6004 bras 59864 <rtems_rfs_fs_open+0x5ce> <== NOT EXECUTED
errno = rc;
return -1;
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
59860: 4a84 tstl %d4 <== NOT EXECUTED
59862: 673c beqs 598a0 <rtems_rfs_fs_open+0x60a> <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
59864: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
59866: 4eb9 0005 73e4 jsr 573e4 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5986c: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
5986e: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59874: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59878: 42a7 clrl %sp@- <== NOT EXECUTED
5987a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59880: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59884: 4a00 tstb %d0 <== NOT EXECUTED
59886: 6700 fb50 beqw 593d8 <rtems_rfs_fs_open+0x142> <== NOT EXECUTED
printf ("rtems-rfs: open: reading superblock: %d: %s\n",
5988a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5988c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59892: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59894: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59896: 4879 0006 f210 pea 6f210 <CSWTCH.2+0x11fc> <== NOT EXECUTED
5989c: 6000 fb30 braw 593ce <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);
598a0: 4878 0001 pea 1 <ADD>
598a4: 486e ffda pea %fp@(-38)
598a8: 4878 0001 pea 1 <ADD>
598ac: 2f14 movel %a4@,%sp@-
598ae: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open>
if (rc > 0)
598b4: 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);
598b8: 2400 movel %d0,%d2
if (rc > 0)
598ba: 6f3c bles 598f8 <rtems_rfs_fs_open+0x662> <== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
598bc: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
598be: 4eb9 0005 73e4 jsr 573e4 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
598c4: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
598c6: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
598cc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
598d0: 42a7 clrl %sp@- <== NOT EXECUTED
598d2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
598d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
598dc: 4a00 tstb %d0 <== NOT EXECUTED
598de: 6700 00ea beqw 599ca <rtems_rfs_fs_open+0x734> <== NOT EXECUTED
printf ("rtems-rfs: open: reading root inode: %d: %s\n",
598e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
598e4: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
598ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED
598ec: 2f02 movel %d2,%sp@- <== NOT EXECUTED
598ee: 4879 0006 f23d pea 6f23d <CSWTCH.2+0x1229> <== NOT EXECUTED
598f4: 6000 00ca braw 599c0 <rtems_rfs_fs_open+0x72a> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
598f8: 2054 moveal %a4@,%a0
598fa: 7004 moveq #4,%d0
598fc: c090 andl %a0@,%d0
598fe: 6678 bnes 59978 <rtems_rfs_fs_open+0x6e2> <== ALWAYS TAKEN
{
mode = rtems_rfs_inode_get_mode (&inode);
59900: 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);
59904: 4280 clrl %d0 <== NOT EXECUTED
59906: 1029 0002 moveb %a1@(2),%d0 <== NOT EXECUTED
5990a: 4281 clrl %d1 <== NOT EXECUTED
5990c: 1229 0003 moveb %a1@(3),%d1 <== NOT EXECUTED
59910: e188 lsll #8,%d0 <== NOT EXECUTED
59912: 8081 orl %d1,%d0 <== NOT EXECUTED
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
59914: 0c80 0000 ffff cmpil #65535,%d0 <== NOT EXECUTED
5991a: 670e beqs 5992a <rtems_rfs_fs_open+0x694> <== NOT EXECUTED
5991c: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
59922: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
59928: 674e beqs 59978 <rtems_rfs_fs_open+0x6e2> <== NOT EXECUTED
{
rtems_rfs_inode_close (*fs, &inode);
5992a: 486e ffda pea %fp@(-38) <== NOT EXECUTED
5992e: 2f08 movel %a0,%sp@- <== NOT EXECUTED
59930: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
59936: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
59938: 4eb9 0005 73e4 jsr 573e4 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
5993e: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
59940: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
59946: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5994a: 42a7 clrl %sp@- <== NOT EXECUTED
5994c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59952: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
59956: 4a00 tstb %d0 <== NOT EXECUTED
59958: 670e beqs 59968 <rtems_rfs_fs_open+0x6d2> <== NOT EXECUTED
printf ("rtems-rfs: open: invalid root inode mode\n");
5995a: 4879 0006 f26a pea 6f26a <CSWTCH.2+0x1256> <== NOT EXECUTED
59960: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
59966: 588f addql #4,%sp <== NOT EXECUTED
errno = EIO;
59968: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5996e: 2040 moveal %d0,%a0 <== NOT EXECUTED
59970: 7005 moveq #5,%d0 <== NOT EXECUTED
59972: 2080 movel %d0,%a0@ <== NOT EXECUTED
59974: 6000 fa6c braw 593e2 <rtems_rfs_fs_open+0x14c> <== NOT EXECUTED
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
59978: 486e ffda pea %fp@(-38)
5997c: 2f08 movel %a0,%sp@-
5997e: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close>
if (rc > 0)
59984: 508f addql #8,%sp
errno = EIO;
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
59986: 2400 movel %d0,%d2
if (rc > 0)
59988: 6f4e bles 599d8 <rtems_rfs_fs_open+0x742> <== ALWAYS TAKEN
{
rtems_rfs_buffer_close (*fs);
5998a: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
5998c: 4eb9 0005 73e4 jsr 573e4 <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
59992: 2f14 movel %a4@,%sp@- <== NOT EXECUTED
59994: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
5999a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5999e: 42a7 clrl %sp@- <== NOT EXECUTED
599a0: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
599a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
599aa: 4a00 tstb %d0 <== NOT EXECUTED
599ac: 671c beqs 599ca <rtems_rfs_fs_open+0x734> <== NOT EXECUTED
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
599ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
599b0: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
599b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
599b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
599ba: 4879 0006 f293 pea 6f293 <CSWTCH.2+0x127f> <== NOT EXECUTED
599c0: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
599c6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
errno = rc;
599ca: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
599d0: 2240 moveal %d0,%a1 <== NOT EXECUTED
599d2: 2282 movel %d2,%a1@ <== NOT EXECUTED
599d4: 6000 fa0c braw 593e2 <rtems_rfs_fs_open+0x14c> <== NOT EXECUTED
return -1;
}
errno = 0;
599d8: 4eb9 0005 bd98 jsr 5bd98 <__errno>
599de: 2040 moveal %d0,%a0
return 0;
599e0: 4280 clrl %d0
printf ("rtems-rfs: open: closing root inode: %d: %s\n", rc, strerror (rc));
errno = rc;
return -1;
}
errno = 0;
599e2: 4290 clrl %a0@
return 0;
}
599e4: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
599ea: 4e5e unlk %fp <== NOT EXECUTED
00059232 <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);
59232: 91c8 subal %a0,%a0 <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
59234: 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)
{
59236: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5923a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5923c: 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);
59240: 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);
59244: 226a 0004 moveal %a2@(4),%a1 <== NOT EXECUTED
uint64_t block_size = rtems_rfs_fs_block_size (fs);
return blocks * block_size;
59248: 2f09 movel %a1,%sp@- <== NOT EXECUTED
5924a: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5924c: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5924e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59250: 4eb9 0006 8ff0 jsr 68ff0 <__muldi3> <== NOT EXECUTED
}
59256: 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;
5925a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
5925e: 4e5e unlk %fp <== NOT EXECUTED
0004e784 <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)
{
4e784: 4e56 ffc8 linkw %fp,#-56
4e788: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4e78c: 182e 0013 moveb %fp@(19),%d4
4e790: 286e 0008 moveal %fp@(8),%a4
4e794: 2e2e 000c movel %fp@(12),%d7
4e798: 246e 0014 moveal %fp@(20),%a2
rtems_rfs_bitmap_bit bit;
int offset;
bool updown;
int direction;
if (inode)
4e79c: 4a04 tstb %d4
4e79e: 6708 beqs 4e7a8 <rtems_rfs_group_bitmap_alloc+0x24>
{
size = fs->group_inodes;
4e7a0: 202c 002c movel %a4@(44),%d0
goal -= RTEMS_RFS_ROOT_INO;
4e7a4: 5387 subql #1,%d7
4e7a6: 6004 bras 4e7ac <rtems_rfs_group_bitmap_alloc+0x28>
}
else
size = fs->group_blocks;
4e7a8: 202c 0028 movel %a4@(40),%d0
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
4e7ac: 264e moveal %fp,%a3
offset = 0;
updown = true;
direction = 1;
4e7ae: 7401 moveq #1,%d2
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
4e7b0: 4283 clrl %d3
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
4e7b2: 4c40 7001 remul %d0,%d1,%d7
4e7b6: 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;
4e7ba: 5380 subql #1,%d0
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
offset = 0;
updown = true;
4e7bc: 7c01 moveq #1,%d6
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
4e7be: 2d47 fff4 movel %d7,%fp@(-12)
bit = (rtems_rfs_bitmap_bit) (goal % size);
4e7c2: 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;
4e7c4: 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);
4e7c8: 2a02 movel %d2,%d5
4e7ca: 4c03 5800 mulsl %d3,%d5
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4e7ce: 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);
4e7d0: daae fff4 addl %fp@(-12),%d5
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
4e7d4: 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)
4e7d8: 4a83 tstl %d3
4e7da: 6710 beqs 4e7ec <rtems_rfs_group_bitmap_alloc+0x68><== ALWAYS TAKEN
bit = direction > 0 ? 0 : size - 1;
4e7dc: 4a82 tstl %d2 <== NOT EXECUTED
4e7de: 6e06 bgts 4e7e6 <rtems_rfs_group_bitmap_alloc+0x62><== NOT EXECUTED
4e7e0: 202e fff0 movel %fp@(-16),%d0 <== NOT EXECUTED
4e7e4: 6002 bras 4e7e8 <rtems_rfs_group_bitmap_alloc+0x64><== NOT EXECUTED
4e7e6: 4280 clrl %d0 <== NOT EXECUTED
4e7e8: 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))
4e7ec: 4a85 tstl %d5
4e7ee: 6d06 blts 4e7f6 <rtems_rfs_group_bitmap_alloc+0x72><== NEVER TAKEN
4e7f0: baac 0024 cmpl %a4@(36),%d5
4e7f4: 6d14 blts 4e80a <rtems_rfs_group_bitmap_alloc+0x86><== ALWAYS TAKEN
{
if (!updown)
4e7f6: 4a06 tstb %d6 <== NOT EXECUTED
4e7f8: 6700 00d4 beqw 4e8ce <rtems_rfs_group_bitmap_alloc+0x14a><== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
4e7fc: 4a82 tstl %d2 <== NOT EXECUTED
4e7fe: 5ec2 sgt %d2 <== NOT EXECUTED
4e800: 7001 moveq #1,%d0 <== NOT EXECUTED
4e802: 49c2 extbl %d2 <== NOT EXECUTED
updown = false;
4e804: 4206 clrb %d6 <== NOT EXECUTED
*/
if ((group < 0) || (group >= fs->group_count))
{
if (!updown)
break;
direction = direction > 0 ? -1 : 1;
4e806: 8480 orl %d0,%d2 <== NOT EXECUTED
4e808: 60be bras 4e7c8 <rtems_rfs_group_bitmap_alloc+0x44><== NOT EXECUTED
4e80a: 7e4c moveq #76,%d7
4e80c: 4c05 7800 mulsl %d5,%d7
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4e810: 226c 0020 moveal %a4@(32),%a1
4e814: d3c7 addal %d7,%a1
direction = direction > 0 ? -1 : 1;
updown = false;
continue;
}
if (inode)
4e816: 4a04 tstb %d4
4e818: 6706 beqs 4e820 <rtems_rfs_group_bitmap_alloc+0x9c>
bitmap = &fs->groups[group].inode_bitmap;
4e81a: 4be9 002a lea %a1@(42),%a5
4e81e: 6004 bras 4e824 <rtems_rfs_group_bitmap_alloc+0xa0>
else
bitmap = &fs->groups[group].block_bitmap;
4e820: 4be9 0008 lea %a1@(8),%a5
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
4e824: 2f0b movel %a3,%sp@-
4e826: 486e fffb pea %fp@(-5)
4e82a: 2f2e fffc movel %fp@(-4),%sp@-
4e82e: 2f0d movel %a5,%sp@-
4e830: 4eb9 0005 5c1c jsr 55c1c <rtems_rfs_bitmap_map_alloc>
if (rc > 0)
4e836: 4fef 0010 lea %sp@(16),%sp
4e83a: 4a80 tstl %d0
4e83c: 6e00 00ba bgtw 4e8f8 <rtems_rfs_group_bitmap_alloc+0x174>
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
4e840: 7001 moveq #1,%d0
4e842: c094 andl %a4@,%d0
4e844: 660c bnes 4e852 <rtems_rfs_group_bitmap_alloc+0xce><== NEVER TAKEN
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e846: 2f15 movel %a5@,%sp@-
4e848: 2f0c movel %a4,%sp@-
4e84a: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release>
4e850: 508f addql #8,%sp
if (allocated)
4e852: 4a2e fffb tstb %fp@(-5)
4e856: 6762 beqs 4e8ba <rtems_rfs_group_bitmap_alloc+0x136><== NEVER TAKEN
{
if (inode)
4e858: 4a04 tstb %d4
4e85a: 6712 beqs 4e86e <rtems_rfs_group_bitmap_alloc+0xea>
*result = rtems_rfs_group_inode (fs, group, bit);
4e85c: 49ec 002c lea %a4@(44),%a4
4e860: 4c14 5800 mulsl %a4@,%d5
4e864: 202e fffc movel %fp@(-4),%d0
4e868: 5280 addql #1,%d0
4e86a: d085 addl %d5,%d0
4e86c: 600c bras 4e87a <rtems_rfs_group_bitmap_alloc+0xf6>
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
4e86e: 206c 0020 moveal %a4@(32),%a0
4e872: 202e fffc movel %fp@(-4),%d0
4e876: d0b0 7800 addl %a0@(00000000,%d7:l),%d0
4e87a: 2480 movel %d0,%a2@
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e87c: 2f3c 0002 0000 movel #131072,%sp@-
4e882: 42a7 clrl %sp@-
4e884: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4e88a: 508f addql #8,%sp
4e88c: 4a00 tstb %d0
4e88e: 6754 beqs 4e8e4 <rtems_rfs_group_bitmap_alloc+0x160><== ALWAYS TAKEN
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
4e890: 2212 movel %a2@,%d1 <== NOT EXECUTED
4e892: 4a04 tstb %d4 <== NOT EXECUTED
4e894: 6708 beqs 4e89e <rtems_rfs_group_bitmap_alloc+0x11a><== NOT EXECUTED
4e896: 203c 0006 d68d movel #448141,%d0 <== NOT EXECUTED
4e89c: 6006 bras 4e8a4 <rtems_rfs_group_bitmap_alloc+0x120><== NOT EXECUTED
4e89e: 203c 0006 cdf2 movel #445938,%d0 <== NOT EXECUTED
4e8a4: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4e8a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e8a8: 4879 0006 d693 pea 6d693 <_CPU_m68k_BFFFO_table+0xa76> <== NOT EXECUTED
4e8ae: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e8b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4e8b8: 602a bras 4e8e4 <rtems_rfs_group_bitmap_alloc+0x160><== NOT EXECUTED
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
4e8ba: 4a06 tstb %d6 <== NOT EXECUTED
4e8bc: 670a beqs 4e8c8 <rtems_rfs_group_bitmap_alloc+0x144><== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
4e8be: 4a82 tstl %d2 <== NOT EXECUTED
4e8c0: 5ec2 sgt %d2 <== NOT EXECUTED
4e8c2: 7001 moveq #1,%d0 <== NOT EXECUTED
4e8c4: 49c2 extbl %d2 <== NOT EXECUTED
4e8c6: 8480 orl %d0,%d2 <== NOT EXECUTED
offset++;
4e8c8: 5283 addql #1,%d3 <== NOT EXECUTED
4e8ca: 6000 fefc braw 4e7c8 <rtems_rfs_group_bitmap_alloc+0x44><== NOT EXECUTED
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
4e8ce: 2f3c 0002 0000 movel #131072,%sp@- <== NOT EXECUTED
4e8d4: 42a7 clrl %sp@- <== NOT EXECUTED
4e8d6: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4e8dc: 508f addql #8,%sp <== NOT EXECUTED
4e8de: 4a00 tstb %d0 <== NOT EXECUTED
4e8e0: 6606 bnes 4e8e8 <rtems_rfs_group_bitmap_alloc+0x164><== NOT EXECUTED
4e8e2: 6012 bras 4e8f6 <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;
4e8e4: 4280 clrl %d0
4e8e6: 6010 bras 4e8f8 <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");
4e8e8: 4879 0006 d6c5 pea 6d6c5 <_CPU_m68k_BFFFO_table+0xaa8> <== NOT EXECUTED
4e8ee: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
4e8f4: 588f addql #4,%sp <== NOT EXECUTED
return ENOSPC;
4e8f6: 701c moveq #28,%d0 <== NOT EXECUTED
}
4e8f8: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4e8fe: 4e5e unlk %fp <== NOT EXECUTED
0004e902 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
4e902: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
4e906: 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))
4e90a: 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)
{
4e910: 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))
4e914: 42a7 clrl %sp@- <== NOT EXECUTED
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
4e916: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
4e91a: 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))
4e91e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4e924: 508f addql #8,%sp <== NOT EXECUTED
4e926: 4a00 tstb %d0 <== NOT EXECUTED
4e928: 6726 beqs 4e950 <rtems_rfs_group_bitmap_free+0x4e><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-free: %s free: %" PRId32 "\n",
4e92a: 4a02 tstb %d2 <== NOT EXECUTED
4e92c: 6708 beqs 4e936 <rtems_rfs_group_bitmap_free+0x34><== NOT EXECUTED
4e92e: 203c 0006 d68d movel #448141,%d0 <== NOT EXECUTED
4e934: 6006 bras 4e93c <rtems_rfs_group_bitmap_free+0x3a><== NOT EXECUTED
4e936: 203c 0006 cdf2 movel #445938,%d0 <== NOT EXECUTED
4e93c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e93e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e940: 4879 0006 d6f8 pea 6d6f8 <_CPU_m68k_BFFFO_table+0xadb> <== NOT EXECUTED
4e946: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e94c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4e950: 220b movel %a3,%d1 <== NOT EXECUTED
4e952: 5381 subql #1,%d1 <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
4e954: 4a02 tstb %d2 <== NOT EXECUTED
4e956: 6706 beqs 4e95e <rtems_rfs_group_bitmap_free+0x5c><== NOT EXECUTED
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
4e958: 202a 002c movel %a2@(44),%d0 <== NOT EXECUTED
4e95c: 6004 bras 4e962 <rtems_rfs_group_bitmap_free+0x60><== NOT EXECUTED
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
4e95e: 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;
4e962: 266a 0020 moveal %a2@(32),%a3 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
4e966: 4c40 1003 remul %d0,%d3,%d1 <== NOT EXECUTED
4e96a: 4c40 1001 remul %d0,%d1,%d1 <== NOT EXECUTED
4e96e: 2001 movel %d1,%d0 <== NOT EXECUTED
4e970: 724c moveq #76,%d1 <== NOT EXECUTED
4e972: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4e976: d7c0 addal %d0,%a3 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
4e978: 4a02 tstb %d2 <== NOT EXECUTED
4e97a: 6706 beqs 4e982 <rtems_rfs_group_bitmap_free+0x80><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
4e97c: 47eb 002a lea %a3@(42),%a3 <== NOT EXECUTED
4e980: 6002 bras 4e984 <rtems_rfs_group_bitmap_free+0x82><== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
4e982: 508b addql #8,%a3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
4e984: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e986: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e988: 4eb9 0005 5a7e jsr 55a7e <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e98e: 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);
4e990: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4e992: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4e994: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
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
0004e9a6 <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)
{
4e9a6: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
4e9aa: 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))
4e9ae: 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)
{
4e9b4: 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))
4e9b8: 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)
{
4e9ba: 242e 0010 movel %fp@(16),%d2 <== NOT EXECUTED
4e9be: 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))
4e9c2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4e9c8: 508f addql #8,%sp <== NOT EXECUTED
4e9ca: 4a00 tstb %d0 <== NOT EXECUTED
4e9cc: 6726 beqs 4e9f4 <rtems_rfs_group_bitmap_test+0x4e><== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
4e9ce: 4a03 tstb %d3 <== NOT EXECUTED
4e9d0: 6708 beqs 4e9da <rtems_rfs_group_bitmap_test+0x34><== NOT EXECUTED
4e9d2: 203c 0006 d68d movel #448141,%d0 <== NOT EXECUTED
4e9d8: 6006 bras 4e9e0 <rtems_rfs_group_bitmap_test+0x3a><== NOT EXECUTED
4e9da: 203c 0006 cdf2 movel #445938,%d0 <== NOT EXECUTED
4e9e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e9e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e9e4: 4879 0006 d724 pea 6d724 <_CPU_m68k_BFFFO_table+0xb07> <== NOT EXECUTED
4e9ea: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e9f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
inode ? "inode" : "block", no);
if (inode)
4e9f4: 4a03 tstb %d3 <== NOT EXECUTED
4e9f6: 6712 beqs 4ea0a <rtems_rfs_group_bitmap_test+0x64><== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
4e9f8: 4a82 tstl %d2 <== NOT EXECUTED
4e9fa: 6f58 bles 4ea54 <rtems_rfs_group_bitmap_test+0xae><== NOT EXECUTED
4e9fc: b4aa 0014 cmpl %a2@(20),%d2 <== NOT EXECUTED
4ea00: 6252 bhis 4ea54 <rtems_rfs_group_bitmap_test+0xae><== NOT EXECUTED
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
4ea02: 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;
4ea06: 5382 subql #1,%d2 <== NOT EXECUTED
4ea08: 600a bras 4ea14 <rtems_rfs_group_bitmap_test+0x6e><== NOT EXECUTED
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
4ea0a: b4aa 0004 cmpl %a2@(4),%d2 <== NOT EXECUTED
4ea0e: 6444 bccs 4ea54 <rtems_rfs_group_bitmap_test+0xae><== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
4ea10: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
}
group = no / size;
4ea14: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED
4ea18: 4c40 2002 remul %d0,%d2,%d2 <== NOT EXECUTED
4ea1c: 704c moveq #76,%d0 <== NOT EXECUTED
4ea1e: 4c00 2800 mulsl %d0,%d2 <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
4ea22: d4aa 0020 addl %a2@(32),%d2 <== NOT EXECUTED
4ea26: 2642 moveal %d2,%a3 <== NOT EXECUTED
}
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
4ea28: 4a03 tstb %d3 <== NOT EXECUTED
4ea2a: 6706 beqs 4ea32 <rtems_rfs_group_bitmap_test+0x8c><== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
4ea2c: 47eb 002a lea %a3@(42),%a3 <== NOT EXECUTED
4ea30: 6002 bras 4ea34 <rtems_rfs_group_bitmap_test+0x8e><== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
4ea32: 508b addql #8,%a3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
4ea34: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4ea38: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4ea3a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4ea3c: 4eb9 0005 5aea jsr 55aea <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4ea42: 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);
4ea44: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
4ea46: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ea48: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
4ea4e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4ea52: 6002 bras 4ea56 <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;
4ea54: 7416 moveq #22,%d2 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
rtems_rfs_bitmap_release_buffer (fs, bitmap);
return rc;
}
4ea56: 2002 movel %d2,%d0 <== NOT EXECUTED
4ea58: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4ea5e: 4e5e unlk %fp <== NOT EXECUTED
0004e6e6 <rtems_rfs_group_close>:
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4e6e6: 4e56 fff0 linkw %fp,#-16
4e6ea: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4e6ee: 2f3c 0001 0000 movel #65536,%sp@-
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4e6f4: 242e 0008 movel %fp@(8),%d2
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4e6f8: 42a7 clrl %sp@-
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
4e6fa: 246e 000c moveal %fp@(12),%a2
int result = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_CLOSE))
4e6fe: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4e704: 508f addql #8,%sp
4e706: 4a00 tstb %d0
4e708: 6710 beqs 4e71a <rtems_rfs_group_close+0x34> <== ALWAYS TAKEN
printf ("rtems-rfs: group-close: base=%" PRId32 "\n", group->base);
4e70a: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4e70c: 4879 0006 d66b pea 6d66b <_CPU_m68k_BFFFO_table+0xa4e> <== NOT EXECUTED
4e712: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e718: 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);
4e71a: 486a 002a pea %a2@(42)
4e71e: 47f9 0005 5dac lea 55dac <rtems_rfs_bitmap_close>,%a3
4e724: 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);
4e726: 486a 0042 pea %a2@(66)
4e72a: 2600 movel %d0,%d3
4e72c: 2f02 movel %d2,%sp@-
4e72e: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
4e734: 4200 clrb %d0
4e736: 1540 0042 moveb %d0,%a2@(66)
handle->bnum = 0;
4e73a: 42aa 0044 clrl %a2@(68)
handle->buffer = NULL;
4e73e: 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);
4e742: 486a 0008 pea %a2@(8)
4e746: 4e93 jsr %a3@
if (rc > 0)
4e748: 4fef 0010 lea %sp@(16),%sp
4e74c: 4a80 tstl %d0
4e74e: 6e0c bgts 4e75c <rtems_rfs_group_close+0x76> <== NEVER TAKEN
4e750: 2203 movel %d3,%d1
4e752: 4681 notl %d1
4e754: d281 addl %d1,%d1
4e756: 9381 subxl %d1,%d1
4e758: c681 andl %d1,%d3
4e75a: 6002 bras 4e75e <rtems_rfs_group_close+0x78>
4e75c: 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);
4e75e: 486a 0020 pea %a2@(32)
4e762: 2f02 movel %d2,%sp@-
4e764: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release>
handle->dirty = false;
4e76a: 4200 clrb %d0
4e76c: 1540 0020 moveb %d0,%a2@(32)
rc = rtems_rfs_buffer_handle_close (fs, &group->block_bitmap_buffer);
if (rc > 0)
result = rc;
return result;
}
4e770: 2003 movel %d3,%d0
handle->bnum = 0;
4e772: 42aa 0022 clrl %a2@(34)
handle->buffer = NULL;
4e776: 42aa 0026 clrl %a2@(38)
4e77a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4e780: 4e5e unlk %fp <== NOT EXECUTED
0004e4fc <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)
{
4e4fc: 4e56 ffe0 linkw %fp,#-32
4e500: 222e 0014 movel %fp@(20),%d1
4e504: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
4e508: 266e 0008 moveal %fp@(8),%a3
4e50c: 262e 000c movel %fp@(12),%d3
4e510: 242e 0010 movel %fp@(16),%d2
4e514: 246e 0018 moveal %fp@(24),%a2
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
4e518: 202b 0004 movel %a3@(4),%d0
4e51c: b083 cmpl %d3,%d0
4e51e: 623a bhis 4e55a <rtems_rfs_group_open+0x5e> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4e520: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4e526: 42a7 clrl %sp@- <== NOT EXECUTED
4e528: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4e52e: 508f addql #8,%sp <== NOT EXECUTED
4e530: 4a00 tstb %d0 <== NOT EXECUTED
4e532: 6700 01a0 beqw 4e6d4 <rtems_rfs_group_open+0x1d8> <== NOT EXECUTED
printf ("rtems-rfs: group-open: base outside file system range: %d: %s\n",
4e536: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4e53a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e540: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e542: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4e546: 4879 0006 d57c pea 6d57c <_CPU_m68k_BFFFO_table+0x95f> <== NOT EXECUTED
4e54c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e552: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e556: 6000 017c braw 4e6d4 <rtems_rfs_group_open+0x1d8> <== NOT EXECUTED
EIO, strerror (EIO));
return EIO;
}
if ((base + size) >= rtems_rfs_fs_blocks (fs))
4e55a: 2042 moveal %d2,%a0
4e55c: d1c3 addal %d3,%a0
4e55e: b088 cmpl %a0,%d0
4e560: 6204 bhis 4e566 <rtems_rfs_group_open+0x6a> <== NEVER TAKEN
size = rtems_rfs_fs_blocks (fs) - base;
4e562: 2400 movel %d0,%d2
4e564: 9483 subl %d3,%d2
4e566: 2a02 movel %d2,%d5
4e568: b282 cmpl %d2,%d1
4e56a: 6402 bccs 4e56e <rtems_rfs_group_open+0x72> <== NEVER TAKEN
4e56c: 2a01 movel %d1,%d5
* the format configuration needs reviewing.
*/
if (inodes > size)
inodes = size;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_OPEN))
4e56e: 2f3c 0000 8000 movel #32768,%sp@-
4e574: 42a7 clrl %sp@-
4e576: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4e57c: 508f addql #8,%sp
4e57e: 4a00 tstb %d0
4e580: 6716 beqs 4e598 <rtems_rfs_group_open+0x9c> <== ALWAYS TAKEN
printf ("rtems-rfs: group-open: base=%" PRId32 ", blocks=%zd inodes=%zd\n",
4e582: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4e584: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e586: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e588: 4879 0006 d5bb pea 6d5bb <_CPU_m68k_BFFFO_table+0x99e> <== NOT EXECUTED
4e58e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e594: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
base, size, inodes);
group->base = base;
group->size = size;
4e598: 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,
4e59c: 280a movel %a2,%d4
4e59e: 2c0a movel %a2,%d6
4e5a0: 0684 0000 0020 addil #32,%d4
4e5a6: 5086 addql #8,%d6
4e5a8: 49f9 0005 5d54 lea 55d54 <rtems_rfs_bitmap_open>,%a4
4e5ae: 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;
4e5b0: 2483 movel %d3,%a2@
4e5b2: 1540 0020 moveb %d0,%a2@(32)
handle->bnum = 0;
4e5b6: 42aa 0022 clrl %a2@(34)
handle->buffer = NULL;
4e5ba: 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,
4e5be: 2f03 movel %d3,%sp@-
4e5c0: 2f02 movel %d2,%sp@-
4e5c2: 2f04 movel %d4,%sp@-
4e5c4: 2f0b movel %a3,%sp@-
4e5c6: 2f06 movel %d6,%sp@-
4e5c8: 4e94 jsr %a4@
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4e5ca: 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,
4e5ce: 2400 movel %d0,%d2
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
4e5d0: 6f46 bles 4e618 <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);
4e5d2: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e5d4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e5d6: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
4e5dc: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4e5de: 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;
4e5e2: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
4e5e6: 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))
4e5ea: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4e5f0: 42a7 clrl %sp@- <== NOT EXECUTED
4e5f2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4e5f8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e5fc: 4a00 tstb %d0 <== NOT EXECUTED
4e5fe: 6700 00da beqw 4e6da <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open block bitmap: %d: %s\n",
4e602: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e604: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e60a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e60c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e60e: 4879 0006 d5f3 pea 6d5f3 <_CPU_m68k_BFFFO_table+0x9d6> <== NOT EXECUTED
4e614: 6000 0090 braw 4e6a6 <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;
4e618: 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,
4e61c: 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;
4e61e: 4200 clrb %d0
handle->bnum = 0;
handle->buffer = NULL;
4e620: 42aa 0048 clrl %a2@(72)
4e624: 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;
4e62a: 1540 0042 moveb %d0,%a2@(66)
4e62e: 2012 movel %a2@,%d0
4e630: 5280 addql #1,%d0
4e632: 2f00 movel %d0,%sp@-
4e634: 2f05 movel %d5,%sp@-
4e636: 2f03 movel %d3,%sp@-
4e638: 2f0b movel %a3,%sp@-
4e63a: 486a 002a pea %a2@(42)
4e63e: 4e94 jsr %a4@
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e640: 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,
4e644: 2400 movel %d0,%d2
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
4e646: 6f6a bles 4e6b2 <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);
4e648: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4e64a: 49f9 0005 6d08 lea 56d08 <rtems_rfs_buffer_handle_release>,%a4<== NOT EXECUTED
4e650: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e652: 4e94 jsr %a4@ <== NOT EXECUTED
handle->dirty = false;
4e654: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4e656: 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;
4e65a: 1540 0042 moveb %d0,%a2@(66) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
4e65e: 42aa 0048 clrl %a2@(72) <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
4e662: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4e664: 4eb9 0005 5dac jsr 55dac <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);
4e66a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4e66c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4e66e: 4e94 jsr %a4@ <== NOT EXECUTED
handle->dirty = false;
4e670: 4200 clrb %d0 <== NOT EXECUTED
handle->bnum = 0;
4e672: 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;
4e676: 1540 0020 moveb %d0,%a2@(32) <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
4e67a: 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))
4e67e: 2f3c 0000 8000 movel #32768,%sp@- <== NOT EXECUTED
4e684: 42a7 clrl %sp@- <== NOT EXECUTED
4e686: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4e68c: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
4e690: 4a00 tstb %d0 <== NOT EXECUTED
4e692: 6746 beqs 4e6da <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
printf ("rtems-rfs: group-open: could not open inode bitmap: %d: %s\n",
4e694: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e696: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
4e69c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4e69e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4e6a0: 4879 0006 d62f pea 6d62f <_CPU_m68k_BFFFO_table+0xa12> <== NOT EXECUTED
4e6a6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4e6ac: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4e6b0: 6028 bras 4e6da <rtems_rfs_group_open+0x1de> <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
if (rtems_rfs_fs_release_bitmaps (fs))
4e6b2: 7001 moveq #1,%d0
4e6b4: c093 andl %a3@,%d0
4e6b6: 6620 bnes 4e6d8 <rtems_rfs_group_open+0x1dc> <== NEVER TAKEN
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
4e6b8: 2f2a 0008 movel %a2@(8),%sp@-
4e6bc: 49f9 0005 6d08 lea 56d08 <rtems_rfs_buffer_handle_release>,%a4
4e6c2: 2f0b movel %a3,%sp@-
4e6c4: 4e94 jsr %a4@
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
4e6c6: 2f2a 002a movel %a2@(42),%sp@-
4e6ca: 2f0b movel %a3,%sp@-
4e6cc: 4e94 jsr %a4@
4e6ce: 4fef 0010 lea %sp@(16),%sp
4e6d2: 6004 bras 4e6d8 <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;
4e6d4: 7405 moveq #5,%d2 <== NOT EXECUTED
4e6d6: 6002 bras 4e6da <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;
4e6d8: 4282 clrl %d2
}
4e6da: 2002 movel %d2,%d0
4e6dc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
4e6e2: 4e5e unlk %fp <== NOT EXECUTED
0004ea62 <rtems_rfs_group_usage>:
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4ea62: 4281 clrl %d1 <== NOT EXECUTED
4ea64: 4280 clrl %d0 <== NOT EXECUTED
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
4ea66: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
4ea6a: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
4ea6e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
4ea72: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
4ea76: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
int g;
*blocks = 0;
4ea7a: 4291 clrl %a1@ <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4ea7c: 242a 0024 movel %a2@(36),%d2 <== NOT EXECUTED
size_t* inodes)
{
int g;
*blocks = 0;
*inodes = 0;
4ea80: 4290 clrl %a0@ <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
4ea82: 6022 bras 4eaa6 <rtems_rfs_group_usage+0x44> <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
4ea84: 266a 0020 moveal %a2@(32),%a3 <== NOT EXECUTED
4ea88: d7c1 addal %d1,%a3 <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4ea8a: 5280 addql #1,%d0 <== NOT EXECUTED
4ea8c: 0681 0000 004c addil #76,%d1 <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
*blocks +=
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
4ea92: 262b 0014 movel %a3@(20),%d3 <== NOT EXECUTED
4ea96: 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 +=
4ea9a: 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) -
4ea9c: 262b 0036 movel %a3@(54),%d3 <== NOT EXECUTED
4eaa0: 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 +=
4eaa4: d790 addl %d3,%a0@ <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
4eaa6: b480 cmpl %d0,%d2 <== NOT EXECUTED
4eaa8: 6eda bgts 4ea84 <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))
4eaaa: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
4eaae: b091 cmpl %a1@,%d0 <== NOT EXECUTED
4eab0: 6402 bccs 4eab4 <rtems_rfs_group_usage+0x52> <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
4eab2: 2280 movel %d0,%a1@ <== NOT EXECUTED
if (*inodes > rtems_rfs_fs_inodes (fs))
4eab4: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED
4eab8: b090 cmpl %a0@,%d0 <== NOT EXECUTED
4eaba: 6402 bccs 4eabe <rtems_rfs_group_usage+0x5c> <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
4eabc: 2080 movel %d0,%a0@ <== NOT EXECUTED
return 0;
}
4eabe: 4280 clrl %d0 <== NOT EXECUTED
4eac0: 4cd7 0c0c moveml %sp@,%d2-%d3/%a2-%a3 <== NOT EXECUTED
4eac4: 4e5e unlk %fp <== NOT EXECUTED
0004ed36 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4ed36: 4e56 0000 linkw %fp,#0
4ed3a: 2f0a movel %a2,%sp@-
4ed3c: 246e 000c moveal %fp@(12),%a2
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
4ed40: 2f3c 0008 0000 movel #524288,%sp@-
4ed46: 42a7 clrl %sp@-
4ed48: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4ed4e: 508f addql #8,%sp
4ed50: 4a00 tstb %d0
4ed52: 6712 beqs 4ed66 <rtems_rfs_inode_close+0x30> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-close: ino: %" PRIu32 "\n", handle->ino);
4ed54: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ed58: 4879 0006 d7dd pea 6d7dd <_CPU_m68k_BFFFO_table+0xbc0> <== NOT EXECUTED
4ed5e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4ed64: 508f addql #8,%sp <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, handle, true);
4ed66: 4878 0001 pea 1 <ADD>
4ed6a: 2f0a movel %a2,%sp@-
4ed6c: 2f2e 0008 movel %fp@(8),%sp@-
4ed70: 4eb9 0004 ec5e jsr 4ec5e <rtems_rfs_inode_unload>
if ((rc == 0) && (handle->loads > 0))
4ed76: 4fef 000c lea %sp@(12),%sp
4ed7a: 4a80 tstl %d0
4ed7c: 662e bnes 4edac <rtems_rfs_inode_close+0x76> <== NEVER TAKEN
4ed7e: 4aaa 0022 tstl %a2@(34)
4ed82: 6f28 bles 4edac <rtems_rfs_inode_close+0x76> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_CLOSE))
4ed84: 2f3c 0008 0000 movel #524288,%sp@- <== NOT EXECUTED
4ed8a: 42a7 clrl %sp@- <== NOT EXECUTED
4ed8c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4ed92: 508f addql #8,%sp <== NOT EXECUTED
4ed94: 4a00 tstb %d0 <== NOT EXECUTED
4ed96: 6712 beqs 4edaa <rtems_rfs_inode_close+0x74> <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
4ed98: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED
4ed9c: 4879 0006 d7ff pea 6d7ff <_CPU_m68k_BFFFO_table+0xbe2> <== NOT EXECUTED
4eda2: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4eda8: 508f addql #8,%sp <== NOT EXECUTED
handle->loads);
rc = EIO;
4edaa: 7005 moveq #5,%d0 <== NOT EXECUTED
}
handle->ino = 0;
4edac: 42aa 0008 clrl %a2@(8)
return rc;
}
4edb0: 246e fffc moveal %fp@(-4),%a2
4edb4: 4e5e unlk %fp <== NOT EXECUTED
0004f092 <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4f092: 4e56 ff88 linkw %fp,#-120 <== NOT EXECUTED
4f096: 302e 001e movew %fp@(30),%d0 <== NOT EXECUTED
4f09a: 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))
4f09e: 2f3c 0040 0000 movel #4194304,%sp@- <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4f0a4: 282e 0018 movel %fp@(24),%d4 <== NOT EXECUTED
4f0a8: 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))
4f0ac: 42a7 clrl %sp@- <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4f0ae: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
4f0b2: 302e 0026 movew %fp@(38),%d0 <== NOT EXECUTED
4f0b6: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
4f0ba: 246e 0028 moveal %fp@(40),%a2 <== NOT EXECUTED
4f0be: 3e2e 0022 movew %fp@(34),%d7 <== NOT EXECUTED
4f0c2: 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))
4f0c6: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4f0cc: 508f addql #8,%sp <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
4f0ce: 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))
4f0d0: 4a00 tstb %d0 <== NOT EXECUTED
4f0d2: 6700 00b0 beqw 4f184 <rtems_rfs_inode_create+0xf2> <== NOT EXECUTED
{
const char* type = "unknown";
int c;
if (RTEMS_RFS_S_ISDIR (mode))
4f0d6: 2004 movel %d4,%d0 <== NOT EXECUTED
4f0d8: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4f0de: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f0e4: 6728 beqs 4f10e <rtems_rfs_inode_create+0x7c> <== NOT EXECUTED
type = "dir";
else if (RTEMS_RFS_S_ISCHR (mode))
4f0e6: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f0ec: 6728 beqs 4f116 <rtems_rfs_inode_create+0x84> <== NOT EXECUTED
type = "char";
else if (RTEMS_RFS_S_ISBLK (mode))
4f0ee: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f0f4: 6728 beqs 4f11e <rtems_rfs_inode_create+0x8c> <== NOT EXECUTED
type = "block";
else if (RTEMS_RFS_S_ISREG (mode))
4f0f6: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
4f0fc: 6728 beqs 4f126 <rtems_rfs_inode_create+0x94> <== NOT EXECUTED
type = "file";
else if (RTEMS_RFS_S_ISLNK (mode))
4f0fe: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
4f104: 6728 beqs 4f12e <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";
4f106: 2c3c 0006 d862 movel #448610,%d6 <== NOT EXECUTED
4f10c: 6026 bras 4f134 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
int c;
if (RTEMS_RFS_S_ISDIR (mode))
type = "dir";
4f10e: 2c3c 0006 d859 movel #448601,%d6 <== NOT EXECUTED
4f114: 601e bras 4f134 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode))
type = "char";
4f116: 2c3c 0006 d85d movel #448605,%d6 <== NOT EXECUTED
4f11c: 6016 bras 4f134 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISBLK (mode))
type = "block";
4f11e: 2c3c 0006 cdf2 movel #445938,%d6 <== NOT EXECUTED
4f124: 600e bras 4f134 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
type = "file";
4f126: 2c3c 0006 e34d movel #451405,%d6 <== NOT EXECUTED
4f12c: 6006 bras 4f134 <rtems_rfs_inode_create+0xa2> <== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
type = "link";
4f12e: 2c3c 0006 f8d2 movel #456914,%d6 <== NOT EXECUTED
printf("rtems-rfs: inode-create: parent:%" PRIu32 " name:", parent);
4f134: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f136: 4879 0006 d86a pea 6d86a <_CPU_m68k_BFFFO_table+0xc4d> <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
4f13c: 4bf9 0005 d13c lea 5d13c <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);
4f142: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4f148: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_inode_create (rtems_rfs_file_system* fs,
4f14c: 284b moveal %a3,%a4 <== NOT EXECUTED
4f14e: 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++)
4f152: 508f addql #8,%sp <== NOT EXECUTED
4f154: 600a bras 4f160 <rtems_rfs_inode_create+0xce> <== NOT EXECUTED
printf ("%c", name[c]);
4f156: 101b moveb %a3@+,%d0 <== NOT EXECUTED
4f158: 49c0 extbl %d0 <== NOT EXECUTED
4f15a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f15c: 4e95 jsr %a5@ <== NOT EXECUTED
4f15e: 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++)
4f160: b9cb cmpal %a3,%a4 <== NOT EXECUTED
4f162: 66f2 bnes 4f156 <rtems_rfs_inode_create+0xc4> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" type:%s mode:%04x (%03o)\n", type, mode, mode & ((1 << 10) - 1));
4f164: 2004 movel %d4,%d0 <== NOT EXECUTED
4f166: 0280 0000 03ff andil #1023,%d0 <== NOT EXECUTED
4f16c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f16e: 3f05 movew %d5,%sp@- <== NOT EXECUTED
4f170: 4267 clrw %sp@- <== NOT EXECUTED
4f172: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f174: 4879 0006 d894 pea 6d894 <_CPU_m68k_BFFFO_table+0xc77> <== NOT EXECUTED
4f17a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4f180: 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)
4f184: 4280 clrl %d0 <== NOT EXECUTED
4f186: 0284 ffff f000 andil #-4096,%d4 <== NOT EXECUTED
4f18c: 3004 movew %d4,%d0 <== NOT EXECUTED
4f18e: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f194: 6728 beqs 4f1be <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f196: 6214 bhis 4f1ac <rtems_rfs_inode_create+0x11a> <== NOT EXECUTED
4f198: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f19e: 671e beqs 4f1be <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f1a0: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f1a6: 6600 01fa bnew 4f3a2 <rtems_rfs_inode_create+0x310> <== NOT EXECUTED
4f1aa: 6012 bras 4f1be <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f1ac: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
4f1b2: 670a beqs 4f1be <rtems_rfs_inode_create+0x12c> <== NOT EXECUTED
4f1b4: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
4f1ba: 6600 01e6 bnew 4f3a2 <rtems_rfs_inode_create+0x310> <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
4f1be: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4f1c0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f1c2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f1c4: 4eb9 0004 eac8 jsr 4eac8 <rtems_rfs_inode_alloc> <== NOT EXECUTED
if (rc > 0)
4f1ca: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
4f1ce: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f1d0: 4a80 tstl %d0 <== NOT EXECUTED
4f1d2: 6e00 01d6 bgtw 4f3aa <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
4f1d6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f1da: 49ee ffda lea %fp@(-38),%a4 <== NOT EXECUTED
4f1de: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f1e0: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f1e2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f1e4: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f1ea: 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);
4f1ee: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f1f0: 4a80 tstl %d0 <== NOT EXECUTED
4f1f2: 6f04 bles 4f1f8 <rtems_rfs_inode_create+0x166> <== NOT EXECUTED
4f1f4: 6000 019e braw 4f394 <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);
4f1f8: 3f2e ffb0 movew %fp@(-80),%sp@- <== NOT EXECUTED
4f1fc: 4267 clrw %sp@- <== NOT EXECUTED
4f1fe: 3f07 movew %d7,%sp@- <== NOT EXECUTED
4f200: 4267 clrw %sp@- <== NOT EXECUTED
4f202: 3f05 movew %d5,%sp@- <== NOT EXECUTED
4f204: 4267 clrw %sp@- <== NOT EXECUTED
4f206: 3f2e ffb2 movew %fp@(-78),%sp@- <== NOT EXECUTED
4f20a: 4267 clrw %sp@- <== NOT EXECUTED
4f20c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f20e: 4eb9 0004 ef38 jsr 4ef38 <rtems_rfs_inode_initialise> <== NOT EXECUTED
if (rc > 0)
4f214: 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);
4f218: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f21a: 4a80 tstl %d0 <== NOT EXECUTED
4f21c: 6f18 bles 4f236 <rtems_rfs_inode_create+0x1a4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
4f21e: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f220: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f222: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_free (fs, *ino);
4f228: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f22a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f22c: 4eb9 0004 eaee jsr 4eaee <rtems_rfs_inode_free> <== NOT EXECUTED
4f232: 6000 014c braw 4f380 <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))
4f236: 4280 clrl %d0 <== NOT EXECUTED
4f238: 3004 movew %d4,%d0 <== NOT EXECUTED
4f23a: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f240: 6640 bnes 4f282 <rtems_rfs_inode_create+0x1f0> <== NOT EXECUTED
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
4f242: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f244: 47f9 0005 792a lea 5792a <rtems_rfs_dir_add_entry>,%a3 <== NOT EXECUTED
4f24a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f24e: 4879 0006 afc7 pea 6afc7 <flashdisk_ops+0x19> <== NOT EXECUTED
4f254: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f256: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f258: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc == 0)
4f25a: 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);
4f25e: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc == 0)
4f260: 4a80 tstl %d0 <== NOT EXECUTED
4f262: 6618 bnes 4f27c <rtems_rfs_inode_create+0x1ea> <== NOT EXECUTED
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
4f264: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f266: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4f26a: 4879 0006 afc6 pea 6afc6 <flashdisk_ops+0x18> <== NOT EXECUTED
4f270: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4f272: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f274: 4e93 jsr %a3@ <== NOT EXECUTED
4f276: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4f27a: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f27c: 4a8d tstl %a5 <== NOT EXECUTED
4f27e: 6f02 bles 4f282 <rtems_rfs_inode_create+0x1f0> <== NOT EXECUTED
4f280: 6022 bras 4f2a4 <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);
4f282: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f286: 2a0e movel %fp,%d5 <== NOT EXECUTED
4f288: 0685 ffff ffb4 addil #-76,%d5 <== NOT EXECUTED
4f28e: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f290: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f292: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f294: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f29a: 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);
4f29e: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f2a0: 4a80 tstl %d0 <== NOT EXECUTED
4f2a2: 6f20 bles 4f2c4 <rtems_rfs_inode_create+0x232> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
4f2a4: 260e movel %fp,%d3 <== NOT EXECUTED
4f2a6: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4f2ac: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2b0: 4eb9 0004 edb8 jsr 4edb8 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f2b6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2ba: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
4f2c0: 6000 00be braw 4f380 <rtems_rfs_inode_create+0x2ee> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
4f2c4: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f2c6: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4f2ca: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f2ce: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f2d0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2d2: 4eb9 0005 792a jsr 5792a <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
4f2d8: 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);
4f2dc: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f2de: 4a80 tstl %d0 <== NOT EXECUTED
4f2e0: 6f2c bles 4f30e <rtems_rfs_inode_create+0x27c> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
4f2e2: 260e movel %fp,%d3 <== NOT EXECUTED
4f2e4: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f2ea: 45f9 0004 ed36 lea 4ed36 <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);
4f2f0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2f4: 4eb9 0004 edb8 jsr 4edb8 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f2fa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f2fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f2fe: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
4f300: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f302: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f304: 4e92 jsr %a2@ <== NOT EXECUTED
4f306: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4f30a: 6000 009e braw 4f3aa <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))
4f30e: 0284 0000 ffff andil #65535,%d4 <== NOT EXECUTED
4f314: 0c84 0000 4000 cmpil #16384,%d4 <== NOT EXECUTED
4f31a: 6636 bnes 4f352 <rtems_rfs_inode_create+0x2c0> <== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
4f31c: 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);
4f320: 4280 clrl %d0 <== NOT EXECUTED
4f322: 1010 moveb %a0@,%d0 <== NOT EXECUTED
4f324: 4281 clrl %d1 <== NOT EXECUTED
4f326: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
4f32a: e188 lsll #8,%d0 <== NOT EXECUTED
4f32c: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
4f32e: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
4f330: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED
4f336: 56c1 sne %d1 <== NOT EXECUTED
4f338: 4881 extw %d1 <== NOT EXECUTED
4f33a: 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,
4f33c: 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);
4f33e: 2200 movel %d0,%d1 <== NOT EXECUTED
4f340: e089 lsrl #8,%d1 <== NOT EXECUTED
4f342: 1081 moveb %d1,%a0@ <== NOT EXECUTED
4f344: 206e ffc0 moveal %fp@(-64),%a0 <== NOT EXECUTED
4f348: 1140 0001 moveb %d0,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f34c: 7001 moveq #1,%d0 <== NOT EXECUTED
4f34e: 1d40 ffc4 moveb %d0,%fp@(-60) <== NOT EXECUTED
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
4f352: 486e ffb4 pea %fp@(-76) <== NOT EXECUTED
4f356: 47f9 0004 ed36 lea 4ed36 <rtems_rfs_inode_close>,%a3 <== NOT EXECUTED
4f35c: 260e movel %fp,%d3 <== NOT EXECUTED
4f35e: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4f364: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f366: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc > 0)
4f368: 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);
4f36a: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f36c: 4a80 tstl %d0 <== NOT EXECUTED
4f36e: 6f16 bles 4f386 <rtems_rfs_inode_create+0x2f4> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
4f370: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f372: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f374: 4eb9 0004 edb8 jsr 4edb8 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
4f37a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f37c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f37e: 4e93 jsr %a3@ <== NOT EXECUTED
4f380: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4f384: 6024 bras 4f3aa <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &inode);
4f386: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f388: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f38a: 4e93 jsr %a3@ <== NOT EXECUTED
if (rc > 0)
4f38c: 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);
4f38e: 2a40 moveal %d0,%a5 <== NOT EXECUTED
if (rc > 0)
4f390: 4a80 tstl %d0 <== NOT EXECUTED
4f392: 6f14 bles 4f3a8 <rtems_rfs_inode_create+0x316> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
4f394: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
4f396: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f398: 4eb9 0004 eaee jsr 4eaee <rtems_rfs_inode_free> <== NOT EXECUTED
4f39e: 508f addql #8,%sp <== NOT EXECUTED
4f3a0: 6008 bras 4f3aa <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;
4f3a2: 3a7c 0016 moveaw #22,%a5 <== NOT EXECUTED
4f3a6: 6002 bras 4f3aa <rtems_rfs_inode_create+0x318> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
return 0;
4f3a8: 9bcd subal %a5,%a5 <== NOT EXECUTED
}
4f3aa: 200d movel %a5,%d0 <== NOT EXECUTED
4f3ac: 4cee 3cfc ff88 moveml %fp@(-120),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4f3b2: 4e5e unlk %fp <== NOT EXECUTED
0004edb8 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4edb8: 4e56 ffa8 linkw %fp,#-88 <== NOT EXECUTED
4edbc: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
4edc0: 2f3c 0080 0000 movel #8388608,%sp@- <== NOT EXECUTED
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4edc6: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
4edca: 42a7 clrl %sp@- <== NOT EXECUTED
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4edcc: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_DELETE))
4edd0: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4edd6: 508f addql #8,%sp <== NOT EXECUTED
4edd8: 4a00 tstb %d0 <== NOT EXECUTED
4edda: 672a beqs 4ee06 <rtems_rfs_inode_delete+0x4e> <== NOT EXECUTED
printf("rtems-rfs: inode-delete: ino:%" PRIu32 " loaded:%s\n",
4eddc: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ede0: 6708 beqs 4edea <rtems_rfs_inode_delete+0x32> <== NOT EXECUTED
4ede2: 203c 0006 d750 movel #448336,%d0 <== NOT EXECUTED
4ede8: 6006 bras 4edf0 <rtems_rfs_inode_delete+0x38> <== NOT EXECUTED
4edea: 203c 0006 db8b movel #449419,%d0 <== NOT EXECUTED
4edf0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4edf2: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4edf6: 4879 0006 d82d pea 6d82d <_CPU_m68k_BFFFO_table+0xc10> <== NOT EXECUTED
4edfc: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4ee02: 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))
4ee06: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ee0a: 6774 beqs 4ee80 <rtems_rfs_inode_delete+0xc8> <== NOT EXECUTED
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
4ee0c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4ee10: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ee12: 4eb9 0004 eaee jsr 4eaee <rtems_rfs_inode_free> <== NOT EXECUTED
if (rc > 0)
4ee18: 508f addql #8,%sp <== NOT EXECUTED
4ee1a: 4a80 tstl %d0 <== NOT EXECUTED
4ee1c: 6e64 bgts 4ee82 <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);
4ee1e: 260e movel %fp,%d3 <== NOT EXECUTED
4ee20: 0683 ffff ffb6 addil #-74,%d3 <== NOT EXECUTED
4ee26: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ee28: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ee2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ee2c: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc == 0)
4ee32: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ee36: 4a80 tstl %d0 <== NOT EXECUTED
4ee38: 6648 bnes 4ee82 <rtems_rfs_inode_delete+0xca> <== NOT EXECUTED
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
4ee3a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ee3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ee3e: 4eb9 0005 6b8c jsr 56b8c <rtems_rfs_block_map_free_all> <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &map);
4ee44: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4ee46: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ee48: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
4ee4e: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED
4ee52: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
4ee56: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED
4ee5a: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ee60: 7001 moveq #1,%d0 <== NOT EXECUTED
4ee62: 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);
4ee66: 486a 0010 pea %a2@(16) <== NOT EXECUTED
4ee6a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ee6c: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
4ee72: 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;
4ee76: 42aa 0022 clrl %a2@(34) <== NOT EXECUTED
handle->node = NULL;
4ee7a: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
4ee7e: 6002 bras 4ee82 <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;
4ee80: 4280 clrl %d0 <== NOT EXECUTED
handle->loads = 0;
handle->node = NULL;
}
}
return rc;
}
4ee82: 4cee 040c ffa8 moveml %fp@(-88),%d2-%d3/%a2 <== NOT EXECUTED
4ee88: 4e5e unlk %fp <== NOT EXECUTED
0004eaee <rtems_rfs_inode_free>:
int
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
4eaee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
4eaf2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4eaf6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4eafa: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4eafe: 4eb9 0004 e902 jsr 4e902 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
}
4eb04: 4e5e unlk %fp <== NOT EXECUTED
0005a52e <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]);
5a52e: 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)
5a530: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
5a534: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
5a538: 5e80 addql #7,%d0 <== NOT EXECUTED
5a53a: e588 lsll #2,%d0 <== NOT EXECUTED
5a53c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
5a540: d1c0 addal %d0,%a0 <== NOT EXECUTED
5a542: 4280 clrl %d0 <== NOT EXECUTED
5a544: 1010 moveb %a0@,%d0 <== NOT EXECUTED
}
5a546: 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]);
5a548: e3a8 lsll %d1,%d0 <== NOT EXECUTED
5a54a: 4281 clrl %d1 <== NOT EXECUTED
5a54c: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
5a550: 4841 swap %d1 <== NOT EXECUTED
5a552: 4241 clrw %d1 <== NOT EXECUTED
5a554: 8081 orl %d1,%d0 <== NOT EXECUTED
5a556: 4281 clrl %d1 <== NOT EXECUTED
5a558: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
5a55c: 8081 orl %d1,%d0 <== NOT EXECUTED
5a55e: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
5a562: e189 lsll #8,%d1 <== NOT EXECUTED
}
5a564: 8081 orl %d1,%d0 <== NOT EXECUTED
0004fc28 <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]);
4fc28: 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)
4fc2a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
4fc2e: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
4fc32: 5e80 addql #7,%d0 <== NOT EXECUTED
4fc34: e588 lsll #2,%d0 <== NOT EXECUTED
4fc36: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4fc3a: d1c0 addal %d0,%a0 <== NOT EXECUTED
4fc3c: 4280 clrl %d0 <== NOT EXECUTED
4fc3e: 1010 moveb %a0@,%d0 <== NOT EXECUTED
}
4fc40: 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]);
4fc42: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fc44: 4281 clrl %d1 <== NOT EXECUTED
4fc46: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
4fc4a: 4841 swap %d1 <== NOT EXECUTED
4fc4c: 4241 clrw %d1 <== NOT EXECUTED
4fc4e: 8081 orl %d1,%d0 <== NOT EXECUTED
4fc50: 4281 clrl %d1 <== NOT EXECUTED
4fc52: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
4fc56: 8081 orl %d1,%d0 <== NOT EXECUTED
4fc58: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
4fc5c: e189 lsll #8,%d1 <== NOT EXECUTED
}
4fc5e: 8081 orl %d1,%d0 <== NOT EXECUTED
0005ad54 <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]);
5ad54: 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)
5ad56: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
return rtems_rfs_read_u32 (&handle->node->data.blocks[block]);
5ad5a: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
5ad5e: 5e80 addql #7,%d0 <== NOT EXECUTED
5ad60: e588 lsll #2,%d0 <== NOT EXECUTED
5ad62: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
5ad66: d1c0 addal %d0,%a0 <== NOT EXECUTED
5ad68: 4280 clrl %d0 <== NOT EXECUTED
5ad6a: 1010 moveb %a0@,%d0 <== NOT EXECUTED
}
5ad6c: 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]);
5ad6e: e3a8 lsll %d1,%d0 <== NOT EXECUTED
5ad70: 4281 clrl %d1 <== NOT EXECUTED
5ad72: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
5ad76: 4841 swap %d1 <== NOT EXECUTED
5ad78: 4241 clrw %d1 <== NOT EXECUTED
5ad7a: 8081 orl %d1,%d0 <== NOT EXECUTED
5ad7c: 4281 clrl %d1 <== NOT EXECUTED
5ad7e: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
5ad82: 8081 orl %d1,%d0 <== NOT EXECUTED
5ad84: 1228 0002 moveb %a0@(2),%d1 <== NOT EXECUTED
5ad88: e189 lsll #8,%d1 <== NOT EXECUTED
}
5ad8a: 8081 orl %d1,%d0 <== NOT EXECUTED
0004f3b6 <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);
4f3b6: 4280 clrl %d0 <== NOT EXECUTED
4f3b8: 7218 moveq #24,%d1 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4f3ba: 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);
}
4f3be: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
4f3c2: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED
4f3c6: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
4f3ca: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4f3cc: 4281 clrl %d1 <== NOT EXECUTED
4f3ce: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
4f3d2: 4841 swap %d1 <== NOT EXECUTED
4f3d4: 4241 clrw %d1 <== NOT EXECUTED
4f3d6: 8081 orl %d1,%d0 <== NOT EXECUTED
4f3d8: 4281 clrl %d1 <== NOT EXECUTED
4f3da: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
4f3de: 8081 orl %d1,%d0 <== NOT EXECUTED
4f3e0: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
4f3e4: e189 lsll #8,%d1 <== NOT EXECUTED
4f3e6: 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);
4f3e8: 4281 clrl %d1 <== NOT EXECUTED
4f3ea: 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);
4f3ee: 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);
4f3f2: 4280 clrl %d0 <== NOT EXECUTED
4f3f4: 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);
4f3f8: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
4f3fc: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4f400: 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);
4f402: 8081 orl %d1,%d0 <== NOT EXECUTED
4f404: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
4f408: 4eb9 0005 6112 jsr 56112 <rtems_rfs_block_get_size> <== NOT EXECUTED
}
4f40e: 4e5e unlk %fp <== NOT EXECUTED
...
0004eb08 <rtems_rfs_inode_load>:
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
4eb08: 4e56 0000 linkw %fp,#0
4eb0c: 2f0a movel %a2,%sp@-
4eb0e: 246e 000c moveal %fp@(12),%a2
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_LOAD))
4eb12: 2f3c 0010 0000 movel #1048576,%sp@-
4eb18: 42a7 clrl %sp@-
4eb1a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4eb20: 508f addql #8,%sp
4eb22: 4a00 tstb %d0
4eb24: 672e beqs 4eb54 <rtems_rfs_inode_load+0x4c> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-load: ino=%" PRIu32 " loads=%i loaded=%s\n",
4eb26: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4eb2a: 6708 beqs 4eb34 <rtems_rfs_inode_load+0x2c> <== NOT EXECUTED
4eb2c: 203c 0006 d750 movel #448336,%d0 <== NOT EXECUTED
4eb32: 6006 bras 4eb3a <rtems_rfs_inode_load+0x32> <== NOT EXECUTED
4eb34: 203c 0006 db8b movel #449419,%d0 <== NOT EXECUTED
4eb3a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4eb3c: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED
4eb40: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4eb44: 4879 0006 d754 pea 6d754 <_CPU_m68k_BFFFO_table+0xb37> <== NOT EXECUTED
4eb4a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4eb50: 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))
4eb54: 4aaa 000c tstl %a2@(12)
4eb58: 6636 bnes 4eb90 <rtems_rfs_inode_load+0x88>
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
4eb5a: 4878 0001 pea 1 <ADD>
4eb5e: 2f2a 001a movel %a2@(26),%sp@-
4eb62: 486a 0010 pea %a2@(16)
4eb66: 2f2e 0008 movel %fp@(8),%sp@-
4eb6a: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request>
handle->block, true);
if (rc > 0)
4eb70: 4fef 0010 lea %sp@(16),%sp
4eb74: 4a80 tstl %d0
4eb76: 6e1e bgts 4eb96 <rtems_rfs_inode_load+0x8e> <== NEVER TAKEN
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
handle->node += handle->offset;
4eb78: 202a 001e movel %a2@(30),%d0
4eb7c: 2200 movel %d0,%d1
4eb7e: ed88 lsll #6,%d0
4eb80: 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);
4eb82: 206a 0016 moveal %a2@(22),%a0
handle->node += handle->offset;
4eb86: 9081 subl %d1,%d0
4eb88: d0a8 001a addl %a0@(26),%d0
4eb8c: 2540 000c movel %d0,%a2@(12)
}
handle->loads++;
4eb90: 52aa 0022 addql #1,%a2@(34)
return 0;
4eb94: 4280 clrl %d0
}
4eb96: 246e fffc moveal %fp@(-4),%a2
4eb9a: 4e5e unlk %fp <== NOT EXECUTED
0004eb9e <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)
{
4eb9e: 4e56 fff0 linkw %fp,#-16
4eba2: 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))
4eba6: 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)
{
4ebac: 266e 0008 moveal %fp@(8),%a3
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
4ebb0: 42a7 clrl %sp@-
int
rtems_rfs_inode_open (rtems_rfs_file_system* fs,
rtems_rfs_ino ino,
rtems_rfs_inode_handle* handle,
bool load)
{
4ebb2: 242e 000c movel %fp@(12),%d2
4ebb6: 246e 0010 moveal %fp@(16),%a2
4ebba: 162e 0017 moveb %fp@(23),%d3
int group;
int gino;
int index;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_OPEN))
4ebbe: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4ebc4: 508f addql #8,%sp
4ebc6: 4a00 tstb %d0
4ebc8: 6710 beqs 4ebda <rtems_rfs_inode_open+0x3c> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-open: ino: %" PRIu32 "\n", ino);
4ebca: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ebcc: 4879 0006 d787 pea 6d787 <_CPU_m68k_BFFFO_table+0xb6a> <== NOT EXECUTED
4ebd2: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4ebd8: 508f addql #8,%sp <== NOT EXECUTED
if (ino == RTEMS_RFS_EMPTY_INO)
4ebda: 4a82 tstl %d2
4ebdc: 6774 beqs 4ec52 <rtems_rfs_inode_open+0xb4> <== NEVER TAKEN
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
4ebde: 2002 movel %d2,%d0
4ebe0: 5380 subql #1,%d0
4ebe2: b0ab 0014 cmpl %a3@(20),%d0
4ebe6: 626a bhis 4ec52 <rtems_rfs_inode_open+0xb4> <== NEVER TAKEN
return EINVAL;
handle->ino = ino;
4ebe8: 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);
4ebec: 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;
4ebf0: 42aa 000c clrl %a2@(12)
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
4ebf4: 4c6b 0001 002c remul %a3@(44),%d1,%d0
4ebfa: 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;
4ec00: 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;
4ec04: 4c6b 1002 0030 remul %a3@(48),%d2,%d1
4ec0a: 4c6b 1001 0030 remul %a3@(48),%d1,%d1
4ec10: 2542 001e movel %d2,%a2@(30)
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
4ec14: 744c moveq #76,%d2
4ec16: 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;
4ec1a: 2030 0800 movel %a0@(00000000,%d0:l),%d0
4ec1e: 5480 addql #2,%d0
handle->offset = gino % fs->inodes_per_block;
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
4ec20: d081 addl %d1,%d0
4ec22: 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;
4ec26: 4200 clrb %d0
handle->bnum = 0;
4ec28: 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;
4ec2c: 1540 0010 moveb %d0,%a2@(16)
handle->bnum = 0;
handle->buffer = NULL;
4ec30: 42aa 0016 clrl %a2@(22)
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
4ec34: 4a03 tstb %d3
4ec36: 6716 beqs 4ec4e <rtems_rfs_inode_open+0xb0> <== NEVER TAKEN
rc = rtems_rfs_inode_load (fs, handle);
4ec38: 2d4a 000c movel %a2,%fp@(12)
4ec3c: 2d4b 0008 movel %a3,%fp@(8)
return rc;
}
4ec40: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4ec46: 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);
4ec48: 4ef9 0004 eb08 jmp 4eb08 <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);
4ec4e: 4280 clrl %d0 <== NOT EXECUTED
4ec50: 6002 bras 4ec54 <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;
4ec52: 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;
}
4ec54: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED
4ec5a: 4e5e unlk %fp <== NOT EXECUTED
0004f414 <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)
{
4f414: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
4f418: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
4f41c: 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)
{
4f41e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f420: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
4f424: 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)
{
4f426: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED
4f42a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno);
4f42c: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f430: 2401 movel %d1,%d2 <== NOT EXECUTED
4f432: e6aa lsrl %d3,%d2 <== NOT EXECUTED
4f434: e588 lsll #2,%d0 <== NOT EXECUTED
4f436: 1382 0800 moveb %d2,%a1@(00000000,%d0:l) <== NOT EXECUTED
4f43a: 2401 movel %d1,%d2 <== NOT EXECUTED
4f43c: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f440: 4242 clrw %d2 <== NOT EXECUTED
4f442: 4842 swap %d2 <== NOT EXECUTED
4f444: 1382 0801 moveb %d2,%a1@(00000001,%d0:l) <== NOT EXECUTED
4f448: 2401 movel %d1,%d2 <== NOT EXECUTED
4f44a: e08a lsrl #8,%d2 <== NOT EXECUTED
4f44c: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f450: 1382 0802 moveb %d2,%a1@(00000002,%d0:l) <== NOT EXECUTED
4f454: 2268 000c moveal %a0@(12),%a1 <== NOT EXECUTED
4f458: 1381 0803 moveb %d1,%a1@(00000003,%d0:l) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f45c: 7001 moveq #1,%d0 <== NOT EXECUTED
}
4f45e: 241f movel %sp@+,%d2 <== NOT EXECUTED
4f460: 261f movel %sp@+,%d3 <== NOT EXECUTED
4f462: 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);
4f464: 1140 0010 moveb %d0,%a0@(16) <== NOT EXECUTED
}
0004ee8c <rtems_rfs_inode_time_stamp_now>:
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
4ee8c: 4e56 fff4 linkw %fp,#-12
4ee90: 48d7 040c moveml %d2-%d3/%a2,%sp@
4ee94: 246e 0008 moveal %fp@(8),%a2
4ee98: 162e 000f moveb %fp@(15),%d3
4ee9c: 142e 0013 moveb %fp@(19),%d2
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
4eea0: 4aaa 000c tstl %a2@(12)
4eea4: 6700 0082 beqw 4ef28 <rtems_rfs_inode_time_stamp_now+0x9c>
return ENXIO;
now = time (NULL);
4eea8: 42a7 clrl %sp@-
4eeaa: 4eb9 0006 0918 jsr 60918 <time>
if (atime)
4eeb0: 588f addql #4,%sp
4eeb2: 4a03 tstb %d3
4eeb4: 6736 beqs 4eeec <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);
4eeb6: 206a 000c moveal %a2@(12),%a0
4eeba: 2200 movel %d0,%d1
4eebc: 7618 moveq #24,%d3
4eebe: e6a9 lsrl %d3,%d1
4eec0: 1141 0010 moveb %d1,%a0@(16)
4eec4: 2200 movel %d0,%d1
4eec6: 206a 000c moveal %a2@(12),%a0
4eeca: 4241 clrw %d1
4eecc: 4841 swap %d1
4eece: 1141 0011 moveb %d1,%a0@(17)
4eed2: 2200 movel %d0,%d1
4eed4: e089 lsrl #8,%d1
4eed6: 206a 000c moveal %a2@(12),%a0
4eeda: 1141 0012 moveb %d1,%a0@(18)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4eede: 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);
4eee0: 206a 000c moveal %a2@(12),%a0
4eee4: 1140 0013 moveb %d0,%a0@(19)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4eee8: 1541 0010 moveb %d1,%a2@(16)
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
4eeec: 4a02 tstb %d2
4eeee: 673c beqs 4ef2c <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);
4eef0: 206a 000c moveal %a2@(12),%a0
4eef4: 2200 movel %d0,%d1
4eef6: 7418 moveq #24,%d2
4eef8: e4a9 lsrl %d2,%d1
4eefa: 1141 0014 moveb %d1,%a0@(20)
4eefe: 2200 movel %d0,%d1
4ef00: 206a 000c moveal %a2@(12),%a0
4ef04: 4241 clrw %d1
4ef06: 4841 swap %d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ef08: 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);
4ef0a: 1141 0015 moveb %d1,%a0@(21)
4ef0e: 2200 movel %d0,%d1
4ef10: e089 lsrl #8,%d1
4ef12: 206a 000c moveal %a2@(12),%a0
4ef16: 1141 0016 moveb %d1,%a0@(22)
4ef1a: 206a 000c moveal %a2@(12),%a0
4ef1e: 1140 0017 moveb %d0,%a0@(23)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ef22: 1543 0010 moveb %d3,%a2@(16)
4ef26: 6004 bras 4ef2c <rtems_rfs_inode_time_stamp_now+0xa0>
bool atime,
bool mtime)
{
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
return ENXIO;
4ef28: 7006 moveq #6,%d0 <== NOT EXECUTED
4ef2a: 6002 bras 4ef2e <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;
4ef2c: 4280 clrl %d0
}
4ef2e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4ef34: 4e5e unlk %fp <== NOT EXECUTED
0004ec5e <rtems_rfs_inode_unload>:
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
4ec5e: 4e56 0000 linkw %fp,#0
4ec62: 2f0a movel %a2,%sp@-
4ec64: 246e 000c moveal %fp@(12),%a2
4ec68: 2f02 movel %d2,%sp@-
4ec6a: 142e 0013 moveb %fp@(19),%d2
int rc = 0;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_INODE_UNLOAD))
4ec6e: 2f3c 0020 0000 movel #2097152,%sp@-
4ec74: 42a7 clrl %sp@-
4ec76: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
4ec7c: 508f addql #8,%sp
4ec7e: 4a00 tstb %d0
4ec80: 672e beqs 4ecb0 <rtems_rfs_inode_unload+0x52> <== ALWAYS TAKEN
printf ("rtems-rfs: inode-unload: ino=%" PRIu32 " loads=%i loaded=%s\n",
4ec82: 4aaa 000c tstl %a2@(12) <== NOT EXECUTED
4ec86: 6708 beqs 4ec90 <rtems_rfs_inode_unload+0x32> <== NOT EXECUTED
4ec88: 203c 0006 d750 movel #448336,%d0 <== NOT EXECUTED
4ec8e: 6006 bras 4ec96 <rtems_rfs_inode_unload+0x38> <== NOT EXECUTED
4ec90: 203c 0006 db8b movel #449419,%d0 <== NOT EXECUTED
4ec96: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ec98: 2f2a 0022 movel %a2@(34),%sp@- <== NOT EXECUTED
4ec9c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
4eca0: 4879 0006 d7a8 pea 6d7a8 <_CPU_m68k_BFFFO_table+0xb8b> <== NOT EXECUTED
4eca6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4ecac: 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))
4ecb0: 4aaa 000c tstl %a2@(12)
4ecb4: 6604 bnes 4ecba <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;
4ecb6: 4280 clrl %d0
4ecb8: 6070 bras 4ed2a <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)
4ecba: 202a 0022 movel %a2@(34),%d0
4ecbe: 6768 beqs 4ed28 <rtems_rfs_inode_unload+0xca> <== NEVER TAKEN
return EIO;
handle->loads--;
4ecc0: 5380 subql #1,%d0
4ecc2: 2540 0022 movel %d0,%a2@(34)
if (handle->loads == 0)
4ecc6: 66ee bnes 4ecb6 <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)
4ecc8: 4a2a 0010 tstb %a2@(16)
4eccc: 6744 beqs 4ed12 <rtems_rfs_inode_unload+0xb4>
4ecce: 4a02 tstb %d2
4ecd0: 6740 beqs 4ed12 <rtems_rfs_inode_unload+0xb4> <== NEVER TAKEN
rtems_rfs_inode_set_ctime (handle, time (NULL));
4ecd2: 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);
4ecd4: 7418 moveq #24,%d2
4ecd6: 4eb9 0006 0918 jsr 60918 <time>
4ecdc: 206a 000c moveal %a2@(12),%a0
4ece0: 2200 movel %d0,%d1
4ece2: e4a9 lsrl %d2,%d1
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ece4: 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);
4ece6: 1141 0018 moveb %d1,%a0@(24)
4ecea: 2200 movel %d0,%d1
4ecec: 206a 000c moveal %a2@(12),%a0
4ecf0: 4241 clrw %d1
4ecf2: 4841 swap %d1
4ecf4: 1141 0019 moveb %d1,%a0@(25)
4ecf8: 2200 movel %d0,%d1
4ecfa: e089 lsrl #8,%d1
4ecfc: 206a 000c moveal %a2@(12),%a0
4ed00: 1141 001a moveb %d1,%a0@(26)
4ed04: 206a 000c moveal %a2@(12),%a0
4ed08: 1140 001b moveb %d0,%a0@(27)
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4ed0c: 7001 moveq #1,%d0
4ed0e: 1540 0010 moveb %d0,%a2@(16)
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
4ed12: 486a 0010 pea %a2@(16)
4ed16: 2f2e 0008 movel %fp@(8),%sp@-
4ed1a: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release>
handle->node = NULL;
4ed20: 508f addql #8,%sp
4ed22: 42aa 000c clrl %a2@(12)
4ed26: 6002 bras 4ed2a <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;
4ed28: 7005 moveq #5,%d0 <== NOT EXECUTED
handle->node = NULL;
}
}
return rc;
}
4ed2a: 242e fff8 movel %fp@(-8),%d2
4ed2e: 246e fffc moveal %fp@(-4),%a2
4ed32: 4e5e unlk %fp <== NOT EXECUTED
00059a60 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
59a60: 4e56 ff8c linkw %fp,#-116 <== NOT EXECUTED
59a64: 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))
59a68: 2f3c 0100 0000 movel #16777216,%sp@- <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
59a6e: 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))
59a72: 42a7 clrl %sp@- <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
59a74: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
59a78: 286e 0010 moveal %fp@(16),%a4 <== NOT EXECUTED
59a7c: 2e2e 0014 movel %fp@(20),%d7 <== NOT EXECUTED
59a80: 2a2e 0018 movel %fp@(24),%d5 <== NOT EXECUTED
59a84: 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))
59a88: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59a8e: 508f addql #8,%sp <== NOT EXECUTED
59a90: 4a00 tstb %d0 <== NOT EXECUTED
59a92: 673c beqs 59ad0 <rtems_rfs_link+0x70> <== NOT EXECUTED
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
59a94: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59a96: 4879 0006 f2d1 pea 6f2d1 <CSWTCH.2+0x12bd> <== NOT EXECUTED
for (c = 0; c < length; c++)
59a9c: 264a moveal %a2,%a3 <== NOT EXECUTED
printf ("%c", name[c]);
59a9e: 4bf9 0005 d13c lea 5d13c <putchar>,%a5 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_LINK))
{
int c;
printf ("rtems-rfs: link: parent(%" PRIu32 ") -> ", parent);
59aa4: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
59aaa: 508f addql #8,%sp <== NOT EXECUTED
59aac: 600a bras 59ab8 <rtems_rfs_link+0x58> <== NOT EXECUTED
printf ("%c", name[c]);
59aae: 101b moveb %a3@+,%d0 <== NOT EXECUTED
59ab0: 49c0 extbl %d0 <== NOT EXECUTED
59ab2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59ab4: 4e95 jsr %a5@ <== NOT EXECUTED
59ab6: 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,
59ab8: 200b movel %a3,%d0 <== NOT EXECUTED
59aba: 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++)
59abc: b9c0 cmpal %d0,%a4 <== NOT EXECUTED
59abe: 6eee bgts 59aae <rtems_rfs_link+0x4e> <== NOT EXECUTED
printf ("%c", name[c]);
printf ("(%" PRIu32 ")\n", target);
59ac0: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59ac2: 4879 0006 f316 pea 6f316 <CSWTCH.2+0x1302> <== NOT EXECUTED
59ac8: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59ace: 508f addql #8,%sp <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
59ad0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59ad4: 280e movel %fp,%d4 <== NOT EXECUTED
59ad6: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
59adc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59ade: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59ae0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59ae2: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59ae8: 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);
59aec: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
59aee: 6600 0118 bnew 59c08 <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)))
59af2: 4a06 tstb %d6 <== NOT EXECUTED
59af4: 662e bnes 59b24 <rtems_rfs_link+0xc4> <== NOT EXECUTED
59af6: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
59afa: 4280 clrl %d0 <== NOT EXECUTED
59afc: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
59b00: e188 lsll #8,%d0 <== NOT EXECUTED
59b02: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
59b08: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
59b0e: 6614 bnes 59b24 <rtems_rfs_link+0xc4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
59b10: 2f04 movel %d4,%sp@- <== NOT EXECUTED
return ENOTSUP;
59b12: 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);
59b16: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59b18: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
59b1e: 508f addql #8,%sp <== NOT EXECUTED
59b20: 6000 00e6 braw 59c08 <rtems_rfs_link+0x1a8> <== NOT EXECUTED
return ENOTSUP;
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
59b24: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59b28: 280e movel %fp,%d4 <== NOT EXECUTED
59b2a: 0684 ffff ffb4 addil #-76,%d4 <== NOT EXECUTED
59b30: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59b32: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59b34: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59b36: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59b3c: 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);
59b40: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
59b42: 6710 beqs 59b54 <rtems_rfs_link+0xf4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
59b44: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59b48: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59b4a: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
59b50: 6000 00b4 braw 59c06 <rtems_rfs_link+0x1a6> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
59b54: 2f05 movel %d5,%sp@- <== NOT EXECUTED
59b56: 2f0c movel %a4,%sp@- <== NOT EXECUTED
59b58: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59b5a: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59b5c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59b5e: 4eb9 0005 792a jsr 5792a <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
59b64: 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);
59b68: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59b6a: 6f0c bles 59b78 <rtems_rfs_link+0x118> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &parent_inode);
59b6c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59b6e: 45f9 0004 ed36 lea 4ed36 <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
59b74: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59b76: 6058 bras 59bd0 <rtems_rfs_link+0x170> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
59b78: 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);
59b7c: 4280 clrl %d0 <== NOT EXECUTED
59b7e: 1010 moveb %a0@,%d0 <== NOT EXECUTED
59b80: 4281 clrl %d1 <== NOT EXECUTED
59b82: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
59b86: 45f9 0004 ed36 lea 4ed36 <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
59b8c: e188 lsll #8,%d0 <== NOT EXECUTED
59b8e: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
59b90: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
59b92: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED
59b98: 56c1 sne %d1 <== NOT EXECUTED
59b9a: 4881 extw %d1 <== NOT EXECUTED
59b9c: c081 andl %d1,%d0 <== NOT EXECUTED
59b9e: 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);
59ba0: 2200 movel %d0,%d1 <== NOT EXECUTED
59ba2: e089 lsrl #8,%d1 <== NOT EXECUTED
59ba4: 1081 moveb %d1,%a0@ <== NOT EXECUTED
59ba6: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
59baa: 1140 0001 moveb %d0,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59bae: 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);
59bb0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59bb4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59bb8: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED
59bbc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59bbe: 4eb9 0004 ee8c jsr 4ee8c <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
59bc4: 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);
59bc8: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
59bca: 6f14 bles 59be0 <rtems_rfs_link+0x180> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &parent_inode);
59bcc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59bce: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59bd0: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
59bd2: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59bd6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59bd8: 4e92 jsr %a2@ <== NOT EXECUTED
59bda: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
59bde: 6028 bras 59c08 <rtems_rfs_link+0x1a8> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
59be0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59be2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59be4: 4e92 jsr %a2@ <== NOT EXECUTED
if (rc > 0)
59be6: 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);
59be8: 2600 movel %d0,%d3 <== NOT EXECUTED
59bea: 200e movel %fp,%d0 <== NOT EXECUTED
59bec: 0680 ffff ffda addil #-38,%d0 <== NOT EXECUTED
if (rc > 0)
59bf2: 4a83 tstl %d3 <== NOT EXECUTED
59bf4: 6f08 bles 59bfe <rtems_rfs_link+0x19e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
59bf6: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59bf8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59bfa: 4e92 jsr %a2@ <== NOT EXECUTED
59bfc: 6008 bras 59c06 <rtems_rfs_link+0x1a6> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
59bfe: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59c00: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59c02: 4e92 jsr %a2@ <== NOT EXECUTED
59c04: 2600 movel %d0,%d3 <== NOT EXECUTED
59c06: 508f addql #8,%sp <== NOT EXECUTED
return rc;
}
59c08: 2003 movel %d3,%d0 <== NOT EXECUTED
59c0a: 4cee 3cfc ff8c moveml %fp@(-116),%d2-%d7/%a2-%a5 <== NOT EXECUTED
59c10: 4e5e unlk %fp <== NOT EXECUTED
0005a3e4 <rtems_rfs_mutex_create>:
RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
5a3e4: 4e56 0000 linkw %fp,#0
5a3e8: 2f02 movel %d2,%sp@-
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
5a3ea: 2f2e 0008 movel %fp@(8),%sp@-
5a3ee: 42a7 clrl %sp@-
5a3f0: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
5a3f4: 4878 0001 pea 1 <ADD>
5a3f8: 2f3c 5246 536d movel #1380340589,%sp@-
5a3fe: 4eb9 0004 a338 jsr 4a338 <rtems_semaphore_create>
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
5a404: 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'),
5a408: 2400 movel %d0,%d2
1, RTEMS_RFS_MUTEX_ATTRIBS, 0,
mutex);
if (sc != RTEMS_SUCCESSFUL)
5a40a: 672e beqs 5a43a <rtems_rfs_mutex_create+0x56> <== NEVER TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a40c: 4878 0004 pea 4 <CONTEXT_ARG>
5a410: 42a7 clrl %sp@-
5a412: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
5a418: 508f addql #8,%sp
5a41a: 4a00 tstb %d0
5a41c: 6720 beqs 5a43e <rtems_rfs_mutex_create+0x5a> <== ALWAYS TAKEN
printf ("rtems-rfs: mutex: open failed: %s\n",
5a41e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a420: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a426: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a428: 4879 0006 f4ef pea 6f4ef <CSWTCH.2+0x14db> <== NOT EXECUTED
5a42e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a434: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a438: 6004 bras 5a43e <rtems_rfs_mutex_create+0x5a> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
5a43a: 4280 clrl %d0 <== NOT EXECUTED
5a43c: 6002 bras 5a440 <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;
5a43e: 7005 moveq #5,%d0
}
#endif
return 0;
}
5a440: 242e fffc movel %fp@(-4),%d2
5a444: 4e5e unlk %fp <== NOT EXECUTED
0005a448 <rtems_rfs_mutex_destroy>:
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
5a448: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
5a44c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
5a450: 2f02 movel %d2,%sp@- <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
5a452: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a454: 4eb9 0004 a4d8 jsr 4a4d8 <rtems_semaphore_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a45a: 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);
5a45c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a45e: 672e beqs 5a48e <rtems_rfs_mutex_destroy+0x46> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a460: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a464: 42a7 clrl %sp@- <== NOT EXECUTED
5a466: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5a46c: 508f addql #8,%sp <== NOT EXECUTED
5a46e: 4a00 tstb %d0 <== NOT EXECUTED
5a470: 6720 beqs 5a492 <rtems_rfs_mutex_destroy+0x4a> <== NOT EXECUTED
printf ("rtems-rfs: mutex: close failed: %s\n",
5a472: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a474: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a47a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a47c: 4879 0006 f512 pea 6f512 <CSWTCH.2+0x14fe> <== NOT EXECUTED
5a482: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a488: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a48c: 6004 bras 5a492 <rtems_rfs_mutex_destroy+0x4a> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
5a48e: 4280 clrl %d0 <== NOT EXECUTED
5a490: 6002 bras 5a494 <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;
5a492: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
5a494: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5a498: 4e5e unlk %fp <== NOT EXECUTED
0005a940 <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)
5a940: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a944: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5a946: 42a7 clrl %sp@- <== NOT EXECUTED
5a948: 42a7 clrl %sp@- <== NOT EXECUTED
5a94a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
5a94e: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a954: 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);
5a958: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a95a: 672e beqs 5a98a <rtems_rfs_mutex_lock.isra.0+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a95c: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a960: 42a7 clrl %sp@- <== NOT EXECUTED
5a962: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5a968: 508f addql #8,%sp <== NOT EXECUTED
5a96a: 4a00 tstb %d0 <== NOT EXECUTED
5a96c: 6720 beqs 5a98e <rtems_rfs_mutex_lock.isra.0+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5a96e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a970: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a976: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a978: 4879 0006 d8d5 pea 6d8d5 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
5a97e: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a984: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a988: 6004 bras 5a98e <rtems_rfs_mutex_lock.isra.0+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
5a98a: 4280 clrl %d0 <== NOT EXECUTED
5a98c: 6002 bras 5a990 <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;
5a98e: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
5a990: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5a994: 4e5e unlk %fp <== NOT EXECUTED
0005a6d6 <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)
5a6d6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a6da: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5a6dc: 42a7 clrl %sp@- <== NOT EXECUTED
5a6de: 42a7 clrl %sp@- <== NOT EXECUTED
5a6e0: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
5a6e4: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a6ea: 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);
5a6ee: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a6f0: 672e beqs 5a720 <rtems_rfs_mutex_lock.isra.1+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a6f2: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a6f6: 42a7 clrl %sp@- <== NOT EXECUTED
5a6f8: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5a6fe: 508f addql #8,%sp <== NOT EXECUTED
5a700: 4a00 tstb %d0 <== NOT EXECUTED
5a702: 6720 beqs 5a724 <rtems_rfs_mutex_lock.isra.1+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5a704: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a706: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a70c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a70e: 4879 0006 d8d5 pea 6d8d5 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
5a714: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a71a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a71e: 6004 bras 5a724 <rtems_rfs_mutex_lock.isra.1+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
5a720: 4280 clrl %d0 <== NOT EXECUTED
5a722: 6002 bras 5a726 <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;
5a724: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
5a726: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5a72a: 4e5e unlk %fp <== NOT EXECUTED
0004ff24 <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)
4ff24: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4ff28: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
4ff2a: 42a7 clrl %sp@- <== NOT EXECUTED
4ff2c: 42a7 clrl %sp@- <== NOT EXECUTED
4ff2e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4ff32: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4ff38: 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);
4ff3c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4ff3e: 672e beqs 4ff6e <rtems_rfs_mutex_lock.isra.20+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
4ff40: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4ff44: 42a7 clrl %sp@- <== NOT EXECUTED
4ff46: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4ff4c: 508f addql #8,%sp <== NOT EXECUTED
4ff4e: 4a00 tstb %d0 <== NOT EXECUTED
4ff50: 6720 beqs 4ff72 <rtems_rfs_mutex_lock.isra.20+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
4ff52: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4ff54: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
4ff5a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ff5c: 4879 0006 d8d5 pea 6d8d5 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
4ff62: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4ff68: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ff6c: 6004 bras 4ff72 <rtems_rfs_mutex_lock.isra.20+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
4ff6e: 4280 clrl %d0 <== NOT EXECUTED
4ff70: 6002 bras 4ff74 <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;
4ff72: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
4ff74: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4ff78: 4e5e unlk %fp <== NOT EXECUTED
0005ad8e <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)
5ad8e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5ad92: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
5ad94: 42a7 clrl %sp@- <== NOT EXECUTED
5ad96: 42a7 clrl %sp@- <== NOT EXECUTED
5ad98: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
5ad9c: 4eb9 0004 60fc jsr 460fc <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5ada2: 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);
5ada6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5ada8: 672e beqs 5add8 <rtems_rfs_mutex_lock.isra.6+0x4a><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5adaa: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5adae: 42a7 clrl %sp@- <== NOT EXECUTED
5adb0: 4eb9 0005 bc64 jsr 5bc64 <rtems_rfs_trace> <== NOT EXECUTED
5adb6: 508f addql #8,%sp <== NOT EXECUTED
5adb8: 4a00 tstb %d0 <== NOT EXECUTED
5adba: 6720 beqs 5addc <rtems_rfs_mutex_lock.isra.6+0x4e><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5adbc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5adbe: 4eb9 0004 269c jsr 4269c <rtems_status_text> <== NOT EXECUTED
5adc4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5adc6: 4879 0008 cfac pea 8cfac <rtems_rtc_shell_usage+0xbaa> <== NOT EXECUTED
5adcc: 4eb9 0007 2760 jsr 72760 <printf> <== NOT EXECUTED
5add2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5add6: 6004 bras 5addc <rtems_rfs_mutex_lock.isra.6+0x4e><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
5add8: 4280 clrl %d0 <== NOT EXECUTED
5adda: 6002 bras 5adde <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;
5addc: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
5adde: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5ade2: 4e5e unlk %fp <== NOT EXECUTED
0004fed2 <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)
4fed2: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4fed6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_release (*mutex);
4fed8: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4fedc: 4eb9 0004 a67c jsr 4a67c <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4fee2: 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);
4fee4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
4fee6: 672e beqs 4ff16 <rtems_rfs_mutex_unlock.isra.19+0x44><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
4fee8: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
4feec: 42a7 clrl %sp@- <== NOT EXECUTED
4feee: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
4fef4: 508f addql #8,%sp <== NOT EXECUTED
4fef6: 4a00 tstb %d0 <== NOT EXECUTED
4fef8: 6720 beqs 4ff1a <rtems_rfs_mutex_unlock.isra.19+0x48><== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
4fefa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fefc: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
4ff02: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4ff04: 4879 0006 d8af pea 6d8af <_CPU_m68k_BFFFO_table+0xc92> <== NOT EXECUTED
4ff0a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
4ff10: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ff14: 6004 bras 4ff1a <rtems_rfs_mutex_unlock.isra.19+0x48><== NOT EXECUTED
rtems_status_text (sc));
#endif
return EIO;
}
#endif
return 0;
4ff16: 4280 clrl %d0 <== NOT EXECUTED
4ff18: 6002 bras 4ff1c <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;
4ff1a: 7005 moveq #5,%d0 <== NOT EXECUTED
}
#endif
return 0;
}
4ff1c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4ff20: 4e5e unlk %fp <== NOT EXECUTED
00056ba8 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
56ba8: 4e56 ffe4 linkw %fp,#-28
56bac: 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))
56bb0: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
56bb4: 246e 0008 moveal %fp@(8),%a2
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56bb8: 42a7 clrl %sp@-
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
56bba: 266e 000c moveal %fp@(12),%a3
56bbe: 182e 0013 moveb %fp@(19),%d4
rtems_rfs_buffer* buffer;
int rrc = 0;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56bc2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56bc8: 508f addql #8,%sp
56bca: 4a00 tstb %d0
56bcc: 6710 beqs 56bde <rtems_rfs_release_chain+0x36> <== ALWAYS TAKEN
printf ("rtems-rfs: release-chain: count=%" PRIu32 "\n", *count);
56bce: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
56bd0: 4879 0006 e108 pea 6e108 <CSWTCH.2+0xf4> <== NOT EXECUTED
56bd6: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56bdc: 508f addql #8,%sp <== NOT EXECUTED
56bde: 260a movel %a2,%d3
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
56be0: 4282 clrl %d2
56be2: 5883 addql #4,%d3
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
56be4: 49f9 0004 b048 lea 4b048 <_Chain_Get>,%a4
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
rc = rtems_rfs_buffer_io_release (buffer, modified);
56bea: 4bf9 0005 b9b6 lea 5b9b6 <rtems_rfs_buffer_bdbuf_release>,%a5
56bf0: 0284 0000 00ff andil #255,%d4
56bf6: 6020 bras 56c18 <rtems_rfs_release_chain+0x70>
56bf8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56bfa: 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)--;
56bfc: 5393 subql #1,%a3@ <== NOT EXECUTED
buffer->user = (void*) 0;
56bfe: 2040 moveal %d0,%a0 <== NOT EXECUTED
56c00: 42a8 0032 clrl %a0@(50) <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
56c04: 2f04 movel %d4,%sp@- <== NOT EXECUTED
56c06: 2f00 movel %d0,%sp@- <== NOT EXECUTED
56c08: 4e95 jsr %a5@ <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
56c0a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56c0e: 4a80 tstl %d0 <== NOT EXECUTED
56c10: 6f06 bles 56c18 <rtems_rfs_release_chain+0x70> <== NOT EXECUTED
56c12: 4a82 tstl %d2 <== NOT EXECUTED
56c14: 6602 bnes 56c18 <rtems_rfs_release_chain+0x70> <== NOT EXECUTED
56c16: 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))
56c18: b692 cmpl %a2@,%d3
56c1a: 66dc bnes 56bf8 <rtems_rfs_release_chain+0x50> <== NEVER TAKEN
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
56c1c: 2002 movel %d2,%d0
56c1e: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
56c24: 4e5e unlk %fp <== NOT EXECUTED
0004f7fc <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
4f7fc: 4e56 ffc0 linkw %fp,#-64 <== NOT EXECUTED
4f800: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f804: 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)
{
4f808: 48d7 00fc moveml %d2-%d7,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f80c: 2429 0008 movel %a1@(8),%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);
4f810: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f814: 280e movel %fp,%d4 <== NOT EXECUTED
4f816: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
4f81c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f81e: 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)
{
4f822: 362e 000e movew %fp@(14),%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);
4f826: 2f02 movel %d2,%sp@- <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (const rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
4f828: 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);
4f82c: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4f832: 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);
4f836: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (rc > 0)
4f838: 6f0e bles 4f848 <rtems_rfs_rtems_chown+0x4c> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("chown: opening inode", rc);
4f83a: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f840: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f842: 2085 movel %d5,%a0@ <== NOT EXECUTED
4f844: 6000 009a braw 4f8e0 <rtems_rfs_rtems_chown+0xe4> <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
4f848: 4eb9 0005 33e4 jsr 533e4 <geteuid> <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
4f84e: 206e ffe6 moveal %fp@(-26),%a0 <== 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;
4f852: 4281 clrl %d1 <== NOT EXECUTED
4f854: 1228 0006 moveb %a0@(6),%d1 <== NOT EXECUTED
4f858: 4287 clrl %d7 <== NOT EXECUTED
4f85a: 1e28 0007 moveb %a0@(7),%d7 <== NOT EXECUTED
4f85e: 4285 clrl %d5 <== NOT EXECUTED
4f860: e189 lsll #8,%d1 <== NOT EXECUTED
4f862: 3a00 movew %d0,%d5 <== NOT EXECUTED
4f864: 8287 orl %d7,%d1 <== NOT EXECUTED
4f866: b285 cmpl %d5,%d1 <== NOT EXECUTED
4f868: 671e beqs 4f888 <rtems_rfs_rtems_chown+0x8c> <== NOT EXECUTED
4f86a: 4a40 tstw %d0 <== NOT EXECUTED
4f86c: 671a beqs 4f888 <rtems_rfs_rtems_chown+0x8c> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
4f86e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f870: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f872: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: not able", EPERM);
4f878: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f87e: 508f addql #8,%sp <== NOT EXECUTED
4f880: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f882: 7001 moveq #1,%d0 <== NOT EXECUTED
4f884: 2080 movel %d0,%a0@ <== NOT EXECUTED
4f886: 6058 bras 4f8e0 <rtems_rfs_rtems_chown+0xe4> <== 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);
4f888: 2006 movel %d6,%d0 <== NOT EXECUTED
4f88a: 4281 clrl %d1 <== NOT EXECUTED
4f88c: 7818 moveq #24,%d4 <== NOT EXECUTED
4f88e: 3203 movew %d3,%d1 <== NOT EXECUTED
4f890: 4840 swap %d0 <== NOT EXECUTED
4f892: 4240 clrw %d0 <== NOT EXECUTED
4f894: 8081 orl %d1,%d0 <== NOT EXECUTED
4f896: 2200 movel %d0,%d1 <== NOT EXECUTED
4f898: e8a9 lsrl %d4,%d1 <== NOT EXECUTED
4f89a: 1141 0004 moveb %d1,%a0@(4) <== NOT EXECUTED
4f89e: 2200 movel %d0,%d1 <== NOT EXECUTED
4f8a0: e088 lsrl #8,%d0 <== NOT EXECUTED
4f8a2: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f8a6: 4241 clrw %d1 <== NOT EXECUTED
4f8a8: 4841 swap %d1 <== NOT EXECUTED
4f8aa: 1141 0005 moveb %d1,%a0@(5) <== NOT EXECUTED
4f8ae: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f8b2: 1140 0006 moveb %d0,%a0@(6) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f8b6: 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);
4f8b8: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f8bc: 1143 0007 moveb %d3,%a0@(7) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f8c0: 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);
4f8c4: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4f8c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f8ca: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
4f8d0: 508f addql #8,%sp <== NOT EXECUTED
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
4f8d2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f8d4: 670e beqs 4f8e4 <rtems_rfs_rtems_chown+0xe8> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("chown: closing inode", rc);
4f8d6: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f8dc: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f8de: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f8e0: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f8e2: 6002 bras 4f8e6 <rtems_rfs_rtems_chown+0xea> <== NOT EXECUTED
}
return 0;
4f8e4: 4280 clrl %d0 <== NOT EXECUTED
}
4f8e6: 4cee 00fc ffc0 moveml %fp@(-64),%d2-%d7 <== NOT EXECUTED
4f8ec: 4e5e unlk %fp <== NOT EXECUTED
0005a512 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
5a512: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a516: 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);
5a51a: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
5a51e: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
5a522: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a524: 4eb9 0005 b1c6 jsr 5b1c6 <rtems_deviceio_close> <== NOT EXECUTED
}
5a52a: 4e5e unlk %fp <== NOT EXECUTED
0005a49c <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
return 0;
}
5a49c: 4280 clrl %d0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, off_t length)
{
5a49e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
5a4a2: 4e5e unlk %fp <== NOT EXECUTED
0005a4a6 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
ioctl_command_t command,
void* buffer)
{
5a4a6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a4aa: 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);
5a4ae: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
5a4b2: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
5a4b6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5a4ba: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5a4be: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a4c0: 4eb9 0005 b2ee jsr 5b2ee <rtems_deviceio_control> <== NOT EXECUTED
}
5a4c6: 4e5e unlk %fp <== NOT EXECUTED
0005a5c6 <rtems_rfs_rtems_device_open>:
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
int oflag,
mode_t mode)
{
5a5c6: 4e56 ffc0 linkw %fp,#-64 <== NOT EXECUTED
5a5ca: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
5a5ce: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
5a5d2: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
5a5d6: 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);
5a5da: 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);
5a5de: 42a7 clrl %sp@- <== NOT EXECUTED
5a5e0: 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
};
5a5e2: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
5a5e6: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a5e8: 4eb9 0004 a574 jsr 4a574 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a5ee: 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);
5a5f2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a5f4: 672c beqs 5a622 <rtems_rfs_rtems_device_open+0x5c><== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a5f6: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a5fa: 42a7 clrl %sp@- <== NOT EXECUTED
5a5fc: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5a602: 508f addql #8,%sp <== NOT EXECUTED
5a604: 4a00 tstb %d0 <== NOT EXECUTED
5a606: 671a beqs 5a622 <rtems_rfs_rtems_device_open+0x5c><== NOT EXECUTED
printf ("rtems-rfs: mutex: obtain failed: %s\n",
5a608: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a60a: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a610: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a612: 4879 0006 d8d5 pea 6d8d5 <_CPU_m68k_BFFFO_table+0xcb8> <== NOT EXECUTED
5a618: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a61e: 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);
5a622: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a626: 280e movel %fp,%d4 <== NOT EXECUTED
5a628: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
5a62e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a630: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a632: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a634: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
5a63a: 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);
5a63e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a640: 6f12 bles 5a654 <rtems_rfs_rtems_device_open+0x8e><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
5a642: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a644: 4eba ff22 jsr %pc@(5a568 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
5a648: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5a64e: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a650: 2082 movel %d2,%a0@ <== NOT EXECUTED
5a652: 6040 bras 5a694 <rtems_rfs_rtems_device_open+0xce><== NOT EXECUTED
}
major = rtems_rfs_inode_get_block (&inode, 0);
5a654: 242e ffe6 movel %fp@(-26),%d2 <== NOT EXECUTED
5a658: 49fa fed4 lea %pc@(5a52e <rtems_rfs_inode_get_block.isra.0>),%a4<== NOT EXECUTED
5a65c: 42a7 clrl %sp@- <== NOT EXECUTED
5a65e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a660: 4e94 jsr %a4@ <== NOT EXECUTED
5a662: 508f addql #8,%sp <== NOT EXECUTED
5a664: 2600 movel %d0,%d3 <== NOT EXECUTED
minor = rtems_rfs_inode_get_block (&inode, 1);
5a666: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a66a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a66c: 4e94 jsr %a4@ <== NOT EXECUTED
5a66e: 508f addql #8,%sp <== NOT EXECUTED
5a670: 2400 movel %d0,%d2 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
5a672: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a674: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a676: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
5a67c: 508f addql #8,%sp <== NOT EXECUTED
5a67e: 41fa fee8 lea %pc@(5a568 <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);
5a682: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
5a684: 6f14 bles 5a69a <rtems_rfs_rtems_device_open+0xd4><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
5a686: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a688: 4e90 jsr %a0@ <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
5a68a: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5a690: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a692: 2084 movel %d4,%a0@ <== NOT EXECUTED
5a694: 588f addql #4,%sp <== NOT EXECUTED
5a696: 70ff moveq #-1,%d0 <== NOT EXECUTED
5a698: 6028 bras 5a6c2 <rtems_rfs_rtems_device_open+0xfc><== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
5a69a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a69c: 4e90 jsr %a0@ <== NOT EXECUTED
iop->data0 = major;
5a69e: 2743 0028 movel %d3,%a3@(40) <== NOT EXECUTED
iop->data1 = (void *) minor;
5a6a2: 2742 002c movel %d2,%a3@(44) <== NOT EXECUTED
return rtems_deviceio_open (iop, pathname, oflag, mode, minor, major);
5a6a6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a6a8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a6aa: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5a6ae: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5a6b2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5a6b6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5a6b8: 4eb9 0005 b190 jsr 5b190 <rtems_deviceio_open> <== NOT EXECUTED
5a6be: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
}
5a6c2: 4cee 1c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a4 <== NOT EXECUTED
5a6c8: 4e5e unlk %fp <== NOT EXECUTED
0005a4ee <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)
{
5a4ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a4f2: 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);
5a4f6: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
5a4fa: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
5a4fe: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5a502: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5a506: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a508: 4eb9 0005 b1f6 jsr 5b1f6 <rtems_deviceio_read> <== NOT EXECUTED
}
5a50e: 4e5e unlk %fp <== NOT EXECUTED
0005a4ca <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5a4ca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a4ce: 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);
5a4d2: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED
5a4d6: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED
5a4da: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5a4de: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5a4e2: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a4e4: 4eb9 0005 b272 jsr 5b272 <rtems_deviceio_write> <== NOT EXECUTED
}
5a4ea: 4e5e unlk %fp <== NOT EXECUTED
0005a6cc <rtems_rfs_rtems_dir_close>:
{
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
5a6cc: 4280 clrl %d0 <== NOT EXECUTED
* @param iop
* @retval 0 Always no error.
*/
static int
rtems_rfs_rtems_dir_close (rtems_libio_t* iop)
{
5a6ce: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
5a6d2: 4e5e unlk %fp <== NOT EXECUTED
0005a87e <rtems_rfs_rtems_dir_open>:
static int
rtems_rfs_rtems_dir_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
5a87e: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED
5a882: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ <== NOT EXECUTED
5a886: 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);
5a88a: 240e movel %fp,%d2 <== NOT EXECUTED
5a88c: 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);
5a892: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
5a896: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
5a89a: 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
};
5a89e: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
5a8a2: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5a8a4: 4eba fe30 jsr %pc@(5a6d6 <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);
5a8a8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a8ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a8ae: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a8b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a8b2: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
5a8b8: 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);
5a8bc: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
5a8be: 6714 beqs 5a8d4 <rtems_rfs_rtems_dir_open+0x56> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
5a8c0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a8c2: 4eba fe6a jsr %pc@(5a72e <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
5a8c6: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5a8cc: 588f addql #4,%sp <== NOT EXECUTED
5a8ce: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a8d0: 2083 movel %d3,%a0@ <== NOT EXECUTED
5a8d2: 603a bras 5a90e <rtems_rfs_rtems_dir_open+0x90> <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
5a8d4: 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);
5a8d8: 4280 clrl %d0 <== NOT EXECUTED
5a8da: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
5a8de: e188 lsll #8,%d0 <== NOT EXECUTED
5a8e0: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5a8e6: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
5a8ec: 6724 beqs 5a912 <rtems_rfs_rtems_dir_open+0x94> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
5a8ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a8f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a8f2: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a8f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a8fa: 4eba fe32 jsr %pc@(5a72e <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
5a8fe: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5a904: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a908: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a90a: 7014 moveq #20,%d0 <== NOT EXECUTED
5a90c: 2080 movel %d0,%a0@ <== NOT EXECUTED
5a90e: 70ff moveq #-1,%d0 <== NOT EXECUTED
5a910: 6022 bras 5a934 <rtems_rfs_rtems_dir_open+0xb6> <== NOT EXECUTED
}
iop->offset = 0;
5a912: 4280 clrl %d0 <== NOT EXECUTED
5a914: 4281 clrl %d1 <== NOT EXECUTED
5a916: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
5a91a: 2741 0008 movel %d1,%a3@(8) <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5a91e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a920: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a922: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a928: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a92a: 4eba fe02 jsr %pc@(5a72e <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
5a92e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return 0;
5a932: 4280 clrl %d0 <== NOT EXECUTED
}
5a934: 4cee 0c0c ffc8 moveml %fp@(-56),%d2-%d3/%a2-%a3 <== NOT EXECUTED
5a93a: 4e5e unlk %fp <== NOT EXECUTED
...
0005a78c <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
5a78c: 4e56 ffac linkw %fp,#-84 <== NOT EXECUTED
5a790: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
5a794: 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);
5a798: 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);
5a79c: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
5a7a0: 2468 0008 moveal %a0@(8),%a2 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
5a7a4: 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
};
5a7a8: 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);
5a7ac: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
5a7ae: 2c2e 0010 movel %fp@(16),%d6 <== NOT EXECUTED
5a7b2: 4eba ff22 jsr %pc@(5a6d6 <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);
5a7b6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a7ba: 2f0c movel %a4,%sp@- <== NOT EXECUTED
5a7bc: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a7be: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a7c0: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
5a7c6: 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);
5a7ca: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc)
5a7cc: 6768 beqs 5a836 <rtems_rfs_rtems_dir_read+0xaa> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
5a7ce: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a7d0: 4eba ff5c jsr %pc@(5a72e <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
5a7d4: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5a7da: 588f addql #4,%sp <== NOT EXECUTED
5a7dc: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a7de: 2084 movel %d4,%a0@ <== NOT EXECUTED
5a7e0: 78ff moveq #-1,%d4 <== NOT EXECUTED
5a7e2: 6000 008e braw 5a872 <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);
5a7e6: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5a7e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a7ea: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
5a7ee: 2f2b 0004 movel %a3@(4),%sp@- <== NOT EXECUTED
5a7f2: 486e ffda pea %fp@(-38) <== NOT EXECUTED
5a7f6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a7f8: 4e95 jsr %a5@ <== NOT EXECUTED
if (rc == ENOENT)
5a7fa: 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);
5a7fe: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (rc == ENOENT)
5a800: 7002 moveq #2,%d0 <== NOT EXECUTED
5a802: b08c cmpl %a4,%d0 <== NOT EXECUTED
5a804: 6756 beqs 5a85c <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
{
rc = 0;
break;
}
if (rc > 0)
5a806: 4a8c tstl %a4 <== NOT EXECUTED
5a808: 6f0e bles 5a818 <rtems_rfs_rtems_dir_read+0x8c> <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
5a80a: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5a810: 78ff moveq #-1,%d4 <== NOT EXECUTED
5a812: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a814: 208c movel %a4,%a0@ <== NOT EXECUTED
5a816: 6044 bras 5a85c <rtems_rfs_rtems_dir_read+0xd0> <== NOT EXECUTED
break;
}
iop->offset += size;
5a818: 262e ffd6 movel %fp@(-42),%d3 <== NOT EXECUTED
5a81c: 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,
5a81e: 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++)
5a824: 5285 addql #1,%d5 <== NOT EXECUTED
if (rc > 0)
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
break;
}
iop->offset += size;
5a826: d7ab 0008 addl %d3,%a3@(8) <== NOT EXECUTED
5a82a: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED
5a82e: d182 addxl %d2,%d0 <== NOT EXECUTED
5a830: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
5a834: 601c bras 5a852 <rtems_rfs_rtems_dir_read+0xc6> <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
5a836: 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);
5a83c: 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,
5a83e: 4285 clrl %d5 <== NOT EXECUTED
5a840: 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);
5a842: 0687 ffff ffd6 addil #-42,%d7 <== NOT EXECUTED
5a848: 4bf9 0005 7fc8 lea 57fc8 <rtems_rfs_dir_read>,%a5 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
5a84e: 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,
5a852: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
5a856: 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++)
5a858: bc85 cmpl %d5,%d6 <== NOT EXECUTED
5a85a: 668a bnes 5a7e6 <rtems_rfs_rtems_dir_read+0x5a> <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
5a85c: 486e ffda pea %fp@(-38) <== NOT EXECUTED
5a860: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a862: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5a868: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a86a: 4eba fec2 jsr %pc@(5a72e <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
5a86e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
return bytes_transferred;
}
5a872: 2004 movel %d4,%d0 <== NOT EXECUTED
5a874: 4cee 3cfc ffac moveml %fp@(-84),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5a87a: 4e5e unlk %fp <== NOT EXECUTED
0004fb6e <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)
{
4fb6e: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED
4fb72: 48d7 041c moveml %d2-%d4/%a2,%sp@ <== NOT EXECUTED
4fb76: 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);
4fb7a: 240e movel %fp,%d2 <== NOT EXECUTED
4fb7c: 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);
4fb82: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
4fb86: 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);
4fb8a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fb8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fb90: 2f2a 0020 movel %a2@(32),%sp@- <== NOT EXECUTED
4fb94: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fb96: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc == 0) {
4fb9c: 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);
4fba0: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc == 0) {
4fba2: 662e bnes 4fbd2 <rtems_rfs_rtems_eval_path+0x64> <== NOT EXECUTED
rtems_filesystem_eval_path_generic (
4fba4: 4879 0006 d9b0 pea 6d9b0 <rtems_rfs_rtems_eval_config> <== NOT EXECUTED
4fbaa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fbac: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fbae: 4eb9 0005 3764 jsr 53764 <rtems_filesystem_eval_path_generic><== NOT EXECUTED
ctx,
&inode,
&rtems_rfs_rtems_eval_config
);
rc = rtems_rfs_inode_close (fs, &inode);
4fbb4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fbb6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fbb8: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc != 0) {
4fbbe: 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);
4fbc2: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc != 0) {
4fbc4: 6724 beqs 4fbea <rtems_rfs_rtems_eval_path+0x7c> <== NOT EXECUTED
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
4fbc6: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fbcc: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fbce: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fbd0: 600a bras 4fbdc <rtems_rfs_rtems_eval_path+0x6e> <== NOT EXECUTED
);
}
} else {
rtems_filesystem_eval_path_error (
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
4fbd2: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fbd8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fbda: 2084 movel %d4,%a0@ <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: closing inode", rc)
);
}
} else {
rtems_filesystem_eval_path_error (
4fbdc: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4fbe0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fbe2: 4eb9 0004 7806 jsr 47806 <rtems_filesystem_eval_path_error><== NOT EXECUTED
4fbe8: 508f addql #8,%sp <== NOT EXECUTED
ctx,
rtems_rfs_rtems_error ("eval_path: opening inode", rc)
);
}
}
4fbea: 4cee 041c ffc8 moveml %fp@(-56),%d2-%d4/%a2 <== NOT EXECUTED
4fbf0: 4e5e unlk %fp <== NOT EXECUTED
00050152 <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;
50152: 4280 clrl %d0 <== NOT EXECUTED
50154: 7218 moveq #24,%d1 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
50156: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
5015a: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED
5015e: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
50162: 4282 clrl %d2 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
50164: 206b 000c moveal %a3@(12),%a0 <== NOT EXECUTED
50168: 1028 0004 moveb %a0@(4),%d0 <== NOT EXECUTED
5016c: 1428 0007 moveb %a0@(7),%d2 <== NOT EXECUTED
50170: e3a8 lsll %d1,%d0 <== NOT EXECUTED
50172: 4281 clrl %d1 <== NOT EXECUTED
50174: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED
50178: 4841 swap %d1 <== NOT EXECUTED
5017a: 4241 clrw %d1 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
5017c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
50180: 8081 orl %d1,%d0 <== NOT EXECUTED
50182: 4281 clrl %d1 <== NOT EXECUTED
50184: 1228 0006 moveb %a0@(6),%d1 <== NOT EXECUTED
50188: 4240 clrw %d0 <== NOT EXECUTED
5018a: 4840 swap %d0 <== NOT EXECUTED
5018c: e189 lsll #8,%d1 <== NOT EXECUTED
5018e: 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(
50192: 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);
50194: 4280 clrl %d0 <== NOT EXECUTED
50196: 8282 orl %d2,%d1 <== NOT EXECUTED
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
const char *token,
size_t tokenlen
)
{
50198: 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(
5019c: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5019e: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
501a2: 4281 clrl %d1 <== NOT EXECUTED
501a4: 1228 0003 moveb %a0@(3),%d1 <== NOT EXECUTED
501a8: e188 lsll #8,%d0 <== NOT EXECUTED
501aa: 8081 orl %d1,%d0 <== NOT EXECUTED
501ac: 2f00 movel %d0,%sp@- <== NOT EXECUTED
501ae: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
501b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
501b4: 4eb9 0005 371e jsr 5371e <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) {
501ba: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
501be: 4a00 tstb %d0 <== NOT EXECUTED
501c0: 676e beqs 50230 <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] == '.';
501c2: 7801 moveq #1,%d4 <== NOT EXECUTED
501c4: b883 cmpl %d3,%d4 <== NOT EXECUTED
501c6: 6610 bnes 501d8 <rtems_rfs_rtems_eval_token+0x86><== NOT EXECUTED
501c8: 722e moveq #46,%d1 <== NOT EXECUTED
501ca: 1014 moveb %a4@,%d0 <== NOT EXECUTED
501cc: b380 eorl %d1,%d0 <== NOT EXECUTED
501ce: 4a00 tstb %d0 <== NOT EXECUTED
501d0: 57c0 seq %d0 <== NOT EXECUTED
501d2: 49c0 extbl %d0 <== NOT EXECUTED
501d4: 4480 negl %d0 <== NOT EXECUTED
501d6: 6002 bras 501da <rtems_rfs_rtems_eval_token+0x88><== NOT EXECUTED
501d8: 4280 clrl %d0 <== NOT EXECUTED
if (rtems_filesystem_is_current_directory (token, tokenlen)) {
501da: 0800 0000 btst #0,%d0 <== NOT EXECUTED
501de: 6706 beqs 501e6 <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;
501e0: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
501e4: 604a bras 50230 <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);
501e6: 206a 002c moveal %a2@(44),%a0 <== NOT EXECUTED
501ea: 2428 0008 movel %a0@(8),%d2 <== NOT EXECUTED
rtems_rfs_ino entry_ino;
uint32_t entry_doff;
int rc = rtems_rfs_dir_lookup_ino (
501ee: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
501f2: 486e fff4 pea %fp@(-12) <== NOT EXECUTED
501f6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
501f8: 2f0c movel %a4,%sp@- <== NOT EXECUTED
501fa: 2f0b movel %a3,%sp@- <== NOT EXECUTED
501fc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
501fe: 4eb9 0005 74d6 jsr 574d6 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
tokenlen,
&entry_ino,
&entry_doff
);
if (rc == 0) {
50204: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
50208: 4a80 tstl %d0 <== NOT EXECUTED
5020a: 6600 0104 bnew 50310 <rtems_rfs_rtems_eval_token+0x1be><== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, inode);
5020e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50210: 2f02 movel %d2,%sp@- <== NOT EXECUTED
50212: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc == 0) {
50218: 508f addql #8,%sp <== NOT EXECUTED
5021a: 4a80 tstl %d0 <== NOT EXECUTED
5021c: 6718 beqs 50236 <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));
5021e: 4878 0026 pea 26 <OPER2+0x12> <== NOT EXECUTED
50222: 42a7 clrl %sp@- <== NOT EXECUTED
50224: 2f0b movel %a3,%sp@- <== NOT EXECUTED
50226: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
5022c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
50230: 7001 moveq #1,%d0 <== NOT EXECUTED
50232: 6000 0102 braw 50336 <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);
50236: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5023a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5023c: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
50240: 2f02 movel %d2,%sp@- <== NOT EXECUTED
50242: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
}
if (rc != 0) {
50248: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5024c: 4a80 tstl %d0 <== NOT EXECUTED
5024e: 6700 009c beqw 502ec <rtems_rfs_rtems_eval_token+0x19a><== NOT EXECUTED
50252: 60ca bras 5021e <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)) {
50254: 4a81 tstl %d1 <== NOT EXECUTED
50256: 6604 bnes 5025c <rtems_rfs_rtems_eval_token+0x10a><== NOT EXECUTED
50258: 4a03 tstb %d3 <== NOT EXECUTED
5025a: 667c bnes 502d8 <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);
5025c: 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;
50260: 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);
50266: 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;
5026a: 2d44 fffc movel %d4,%fp@(-4) <== NOT EXECUTED
char *link = malloc(len + 1);
5026e: 4eb9 0004 6910 jsr 46910 <malloc> <== NOT EXECUTED
if (link != NULL) {
50274: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_file_system* fs,
rtems_rfs_ino ino
)
{
size_t len = MAXPATHLEN;
char *link = malloc(len + 1);
50276: 2640 moveal %d0,%a3 <== NOT EXECUTED
if (link != NULL) {
50278: 4a80 tstl %d0 <== NOT EXECUTED
5027a: 674a beqs 502c6 <rtems_rfs_rtems_eval_token+0x174><== NOT EXECUTED
int rc = rtems_rfs_symlink_read (fs, ino, link, len, &len);
5027c: 486e fffc pea %fp@(-4) <== NOT EXECUTED
50280: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED
50284: 2f00 movel %d0,%sp@- <== NOT EXECUTED
50286: 2f03 movel %d3,%sp@- <== NOT EXECUTED
50288: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5028a: 4eb9 0005 a20c jsr 5a20c <rtems_rfs_symlink_read> <== NOT EXECUTED
if (rc == 0) {
50290: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
50294: 4a80 tstl %d0 <== NOT EXECUTED
50296: 6614 bnes 502ac <rtems_rfs_rtems_eval_token+0x15a><== NOT EXECUTED
rtems_filesystem_eval_path_recursive (ctx, link, len);
50298: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
5029c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5029e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
502a0: 4eb9 0004 7c46 jsr 47c46 <rtems_filesystem_eval_path_recursive><== NOT EXECUTED
502a6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
502aa: 600c bras 502b8 <rtems_rfs_rtems_eval_token+0x166><== NOT EXECUTED
} else {
rtems_filesystem_eval_path_error (ctx, 0);
502ac: 42a7 clrl %sp@- <== NOT EXECUTED
502ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED
502b0: 4eb9 0004 7806 jsr 47806 <rtems_filesystem_eval_path_error><== NOT EXECUTED
502b6: 508f addql #8,%sp <== NOT EXECUTED
}
free(link);
502b8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
502ba: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
502c0: 588f addql #4,%sp <== NOT EXECUTED
502c2: 6000 ff6c braw 50230 <rtems_rfs_rtems_eval_token+0xde><== NOT EXECUTED
} else {
rtems_filesystem_eval_path_error (ctx, ENOMEM);
502c6: 4878 000c pea c <OPER1> <== NOT EXECUTED
502ca: 2f0a movel %a2,%sp@- <== NOT EXECUTED
502cc: 4eb9 0004 7806 jsr 47806 <rtems_filesystem_eval_path_error><== NOT EXECUTED
502d2: 508f addql #8,%sp <== NOT EXECUTED
502d4: 6000 ff5a braw 50230 <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;
502d8: 2f0b movel %a3,%sp@- <== NOT EXECUTED
502da: 486a 0018 pea %a2@(24) <== NOT EXECUTED
502de: 4eb9 0005 03a0 jsr 503a0 <rtems_rfs_rtems_set_handlers> <== NOT EXECUTED
502e4: 508f addql #8,%sp <== NOT EXECUTED
502e6: 4a00 tstb %d0 <== NOT EXECUTED
502e8: 663c bnes 50326 <rtems_rfs_rtems_eval_token+0x1d4><== NOT EXECUTED
502ea: 6028 bras 50314 <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)
502ec: 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)) {
502ee: 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)
502f0: 4eba f178 jsr %pc@(4f46a <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);
502f4: 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;
502f8: 7210 moveq #16,%d1 <== NOT EXECUTED
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
502fa: 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)
502fc: 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;
502fe: c2aa 0010 andl %a2@(16),%d1 <== NOT EXECUTED
bool terminal = !rtems_filesystem_eval_path_has_path (ctx);
50302: 4483 negl %d3 <== NOT EXECUTED
50304: 42aa 000c clrl %a2@(12) <== NOT EXECUTED
rtems_filesystem_eval_path_clear_token (ctx);
if (is_sym_link && (follow_sym_link || !terminal)) {
50308: b880 cmpl %d0,%d4 <== NOT EXECUTED
5030a: 66cc bnes 502d8 <rtems_rfs_rtems_eval_token+0x186><== NOT EXECUTED
5030c: 6000 ff46 braw 50254 <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;
50310: 7002 moveq #2,%d0 <== NOT EXECUTED
50312: 6022 bras 50336 <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)
50314: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5031a: 2040 moveal %d0,%a0 <== NOT EXECUTED
5031c: 7005 moveq #5,%d0 <== NOT EXECUTED
5031e: 2080 movel %d0,%a0@ <== NOT EXECUTED
if (!terminal) {
status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE;
}
} else {
rtems_filesystem_eval_path_error (
50320: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
50324: 60a4 bras 502ca <rtems_rfs_rtems_eval_token+0x178><== NOT EXECUTED
void *arg,
const char *token,
size_t tokenlen
)
{
rtems_filesystem_eval_path_generic_status status =
50326: 4280 clrl %d0 <== NOT EXECUTED
50328: 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);
5032a: 256e fff4 0020 movel %fp@(-12),%a2@(32) <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (currentloc, entry_doff);
50330: 256e fff8 0024 movel %fp@(-8),%a2@(36) <== NOT EXECUTED
}
}
}
return status;
}
50336: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 <== NOT EXECUTED
5033c: 4e5e unlk %fp <== NOT EXECUTED
0004f8f0 <rtems_rfs_rtems_fchmod>:
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
4f8f0: 4e56 ffc4 linkw %fp,#-60 <== NOT EXECUTED
4f8f4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f8f8: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
}
static int
rtems_rfs_rtems_fchmod (const rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
4f8fc: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f900: 2629 0008 movel %a1@(8),%d3 <== 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);
4f904: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f908: 280e movel %fp,%d4 <== NOT EXECUTED
4f90a: 0684 ffff ffda addil #-38,%d4 <== NOT EXECUTED
4f910: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f912: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f916: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f918: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
4f91e: 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);
4f922: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f924: 6704 beqs 4f92a <rtems_rfs_rtems_fchmod+0x3a> <== NOT EXECUTED
4f926: 6000 0090 braw 4f9b8 <rtems_rfs_rtems_fchmod+0xc8> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
}
imode = rtems_rfs_inode_get_mode (&inode);
4f92a: 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);
4f92e: 4282 clrl %d2 <== NOT EXECUTED
4f930: 1428 0002 moveb %a0@(2),%d2 <== NOT EXECUTED
4f934: 4280 clrl %d0 <== NOT EXECUTED
4f936: 1028 0003 moveb %a0@(3),%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;
4f93a: 4286 clrl %d6 <== NOT EXECUTED
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
4f93c: 4285 clrl %d5 <== 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);
4f93e: e18a lsll #8,%d2 <== NOT EXECUTED
4f940: 8480 orl %d0,%d2 <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
4f942: 4eb9 0005 33e4 jsr 533e4 <geteuid> <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
4f948: 206e ffe6 moveal %fp@(-26),%a0 <== 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;
4f94c: 4281 clrl %d1 <== NOT EXECUTED
4f94e: 1228 0006 moveb %a0@(6),%d1 <== NOT EXECUTED
4f952: 1c28 0007 moveb %a0@(7),%d6 <== NOT EXECUTED
4f956: e189 lsll #8,%d1 <== NOT EXECUTED
4f958: 3a00 movew %d0,%d5 <== NOT EXECUTED
4f95a: 8286 orl %d6,%d1 <== NOT EXECUTED
4f95c: b285 cmpl %d5,%d1 <== NOT EXECUTED
4f95e: 671e beqs 4f97e <rtems_rfs_rtems_fchmod+0x8e> <== NOT EXECUTED
4f960: 4a40 tstw %d0 <== NOT EXECUTED
4f962: 671a beqs 4f97e <rtems_rfs_rtems_fchmod+0x8e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
4f964: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f966: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f968: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: checking uid", EPERM);
4f96e: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f974: 508f addql #8,%sp <== NOT EXECUTED
4f976: 7201 moveq #1,%d1 <== NOT EXECUTED
4f978: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f97a: 2081 movel %d1,%a0@ <== NOT EXECUTED
4f97c: 6044 bras 4f9c2 <rtems_rfs_rtems_fchmod+0xd2> <== NOT EXECUTED
}
#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);
4f97e: 202e 000c movel %fp@(12),%d0 <== 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);
4f982: 0282 ffff f000 andil #-4096,%d2 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4f988: 0280 0000 0fff andil #4095,%d0 <== NOT EXECUTED
4f98e: 8480 orl %d0,%d2 <== 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);
4f990: 2002 movel %d2,%d0 <== NOT EXECUTED
4f992: e088 lsrl #8,%d0 <== NOT EXECUTED
4f994: 1140 0002 moveb %d0,%a0@(2) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f998: 7001 moveq #1,%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);
4f99a: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f99e: 1142 0003 moveb %d2,%a0@(3) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f9a2: 1d40 ffea moveb %d0,%fp@(-22) <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
4f9a6: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4f9aa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f9ac: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4f9b2: 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);
4f9b4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4f9b6: 6f0e bles 4f9c6 <rtems_rfs_rtems_fchmod+0xd6> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
4f9b8: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f9be: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f9c0: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f9c2: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f9c4: 6002 bras 4f9c8 <rtems_rfs_rtems_fchmod+0xd8> <== NOT EXECUTED
}
return 0;
4f9c6: 4280 clrl %d0 <== NOT EXECUTED
}
4f9c8: 4cee 007c ffc4 moveml %fp@(-60),%d2-%d6 <== NOT EXECUTED
4f9ce: 4e5e unlk %fp <== NOT EXECUTED
0005036a <rtems_rfs_rtems_fdatasync>:
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
5036a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
5036e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
50372: 2068 0024 moveal %a0@(36),%a0 <== NOT EXECUTED
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
50376: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
50378: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
5037c: 4eb9 0005 71fe jsr 571fe <rtems_rfs_buffer_sync> <== NOT EXECUTED
if (rc)
50382: 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));
50384: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
50386: 670e beqs 50396 <rtems_rfs_rtems_fdatasync+0x2c> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
50388: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5038e: 2040 moveal %d0,%a0 <== NOT EXECUTED
50390: 70ff moveq #-1,%d0 <== NOT EXECUTED
50392: 2082 movel %d2,%a0@ <== NOT EXECUTED
50394: 6002 bras 50398 <rtems_rfs_rtems_fdatasync+0x2e> <== NOT EXECUTED
return 0;
50396: 4280 clrl %d0 <== NOT EXECUTED
}
50398: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
5039c: 4e5e unlk %fp <== NOT EXECUTED
0005aaf4 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
5aaf4: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5aaf8: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
5aafc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5ab00: 2668 001c moveal %a0@(28),%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
5ab04: 206b 001a moveal %a3@(26),%a0 <== NOT EXECUTED
5ab08: 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
};
5ab0c: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
5ab10: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ab12: 4eba fe2c jsr %pc@(5a940 <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);
5ab16: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5ab18: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ab1a: 4eb9 0005 84f4 jsr 584f4 <rtems_rfs_file_close> <== NOT EXECUTED
if (rc > 0)
5ab20: 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);
5ab24: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5ab26: 6f0c bles 5ab34 <rtems_rfs_rtems_file_close+0x40><== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
5ab28: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5ab2e: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ab30: 2082 movel %d2,%a0@ <== NOT EXECUTED
5ab32: 74ff moveq #-1,%d2 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5ab34: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ab36: 4eba fe60 jsr %pc@(5a998 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rc;
}
5ab3a: 2002 movel %d2,%d0 <== NOT EXECUTED
5ab3c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
5ab42: 4e5e unlk %fp <== NOT EXECUTED
0005abae <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
5abae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5abb2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
5abb6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5abb8: 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));
5abbc: 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
};
5abc0: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5abc4: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
* @return int
*/
static int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
off_t length)
{
5abc8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5abca: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5abcc: 4eba fd72 jsr %pc@(5a940 <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);
5abd0: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5abd4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5abd8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5abda: 4eb9 0005 8c0a jsr 58c0a <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
5abe0: 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);
5abe4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5abe6: 670c beqs 5abf4 <rtems_rfs_rtems_file_ftruncate+0x46><== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
5abe8: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5abee: 2040 moveal %d0,%a0 <== NOT EXECUTED
5abf0: 2082 movel %d2,%a0@ <== NOT EXECUTED
5abf2: 74ff moveq #-1,%d2 <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5abf4: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5abf8: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5abfc: 4eba fd9a jsr %pc@(5a998 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rc;
}
5ac00: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
5ac04: 2002 movel %d2,%d0 <== NOT EXECUTED
5ac06: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5ac0a: 4e5e unlk %fp <== NOT EXECUTED
0005ac0e <rtems_rfs_rtems_file_lseek>:
*/
static off_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
off_t offset,
int whence)
{
5ac0e: 4e56 ffdc linkw %fp,#-36 <== NOT EXECUTED
5ac12: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ <== NOT EXECUTED
5ac16: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5ac1a: 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));
5ac1e: 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
};
5ac22: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5ac26: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
5ac2a: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ac2c: 4eba fd12 jsr %pc@(5a940 <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;
5ac30: 282a 0004 movel %a2@(4),%d4 <== NOT EXECUTED
5ac34: 2a2a 0008 movel %a2@(8),%d5 <== NOT EXECUTED
new_offset = rtems_filesystem_default_lseek_file (iop, offset, whence);
5ac38: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
5ac3c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
5ac40: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
5ac44: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ac46: 4eb9 0005 aed8 jsr 5aed8 <rtems_filesystem_default_lseek_file><== NOT EXECUTED
if (new_offset != -1)
5ac4c: 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);
5ac50: 2400 movel %d0,%d2 <== NOT EXECUTED
5ac52: 2601 movel %d1,%d3 <== NOT EXECUTED
if (new_offset != -1)
5ac54: 70ff moveq #-1,%d0 <== NOT EXECUTED
5ac56: 72ff moveq #-1,%d1 <== NOT EXECUTED
5ac58: 9283 subl %d3,%d1 <== NOT EXECUTED
5ac5a: 9182 subxl %d2,%d0 <== NOT EXECUTED
5ac5c: 673a beqs 5ac98 <rtems_rfs_rtems_file_lseek+0x8a><== NOT EXECUTED
{
rtems_rfs_pos pos = iop->offset;
5ac5e: 204e moveal %fp,%a0 <== NOT EXECUTED
5ac60: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
5ac64: 222a 0008 movel %a2@(8),%d1 <== NOT EXECUTED
5ac68: 2101 movel %d1,%a0@- <== NOT EXECUTED
5ac6a: 2100 movel %d0,%a0@- <== NOT EXECUTED
int rc = rtems_rfs_file_seek (file, pos, &pos);
5ac6c: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5ac6e: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5ac70: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ac72: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5ac74: 4eb9 0005 8b2c jsr 58b2c <rtems_rfs_file_seek> <== NOT EXECUTED
if (rc)
5ac7a: 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);
5ac7e: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc)
5ac80: 6716 beqs 5ac98 <rtems_rfs_rtems_file_lseek+0x8a><== NOT EXECUTED
{
rtems_rfs_rtems_error ("file_lseek: lseek", rc);
5ac82: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5ac88: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ac8a: 2086 movel %d6,%a0@ <== NOT EXECUTED
iop->offset = old_offset;
5ac8c: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
5ac90: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED
new_offset = -1;
5ac94: 74ff moveq #-1,%d2 <== NOT EXECUTED
5ac96: 76ff moveq #-1,%d3 <== NOT EXECUTED
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5ac98: 206b 001a moveal %a3@(26),%a0 <== NOT EXECUTED
5ac9c: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5aca0: 4eba fcf6 jsr %pc@(5a998 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return new_offset;
}
5aca4: 2002 movel %d2,%d0 <== NOT EXECUTED
5aca6: 2203 movel %d3,%d1 <== NOT EXECUTED
5aca8: 4cee 0c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a3 <== NOT EXECUTED
5acae: 4e5e unlk %fp <== NOT EXECUTED
0005ab46 <rtems_rfs_rtems_file_open>:
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
int oflag,
mode_t mode)
{
5ab46: 4e56 fff0 linkw %fp,#-16 <== NOT EXECUTED
5ab4a: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
5ab4e: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
5ab52: 206b 0024 moveal %a3@(36),%a0 <== NOT EXECUTED
5ab56: 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
};
5ab5a: 206a 0080 moveal %a2@(128),%a0 <== NOT EXECUTED
5ab5e: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5ab60: 4eba fdde jsr %pc@(5a940 <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);
5ab64: 486e fffc pea %fp@(-4) <== NOT EXECUTED
5ab68: 42a7 clrl %sp@- <== NOT EXECUTED
5ab6a: 2f2b 0018 movel %a3@(24),%sp@- <== NOT EXECUTED
5ab6e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ab70: 4eb9 0005 8efc jsr 58efc <rtems_rfs_file_open> <== NOT EXECUTED
if (rc > 0)
5ab76: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
5ab7a: 41fa fe1c lea %pc@(5a998 <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);
5ab7e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5ab80: 6f14 bles 5ab96 <rtems_rfs_rtems_file_open+0x50> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
5ab82: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ab84: 4e90 jsr %a0@ <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-open: open", rc);
5ab86: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5ab8c: 588f addql #4,%sp <== NOT EXECUTED
5ab8e: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ab90: 70ff moveq #-1,%d0 <== NOT EXECUTED
5ab92: 2082 movel %d2,%a0@ <== NOT EXECUTED
5ab94: 600e bras 5aba4 <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);
5ab96: 276e fffc 001c movel %fp@(-4),%a3@(28) <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
5ab9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ab9e: 4e90 jsr %a0@ <== NOT EXECUTED
5aba0: 588f addql #4,%sp <== NOT EXECUTED
return 0;
5aba2: 4280 clrl %d0 <== NOT EXECUTED
}
5aba4: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED
5abaa: 4e5e unlk %fp <== NOT EXECUTED
0005a9f6 <rtems_rfs_rtems_file_read>:
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
5a9f6: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED
5a9fa: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
5a9fe: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5aa02: 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));
5aa06: 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
};
5aa0a: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5aa0e: 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);
5aa12: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
5aa14: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
5aa18: 4eba ff26 jsr %pc@(5a940 <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))
5aa1c: 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;
5aa20: 242b 0004 movel %a3@(4),%d2 <== NOT EXECUTED
5aa24: 262b 0008 movel %a3@(8),%d3 <== NOT EXECUTED
5aa28: 4868 007c pea %a0@(124) <== NOT EXECUTED
5aa2c: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5aa30: 4eb9 0005 6112 jsr 56112 <rtems_rfs_block_get_size> <== NOT EXECUTED
if (pos < rtems_rfs_file_size (file))
5aa36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5aa3a: 9283 subl %d3,%d1 <== NOT EXECUTED
5aa3c: 9182 subxl %d2,%d0 <== NOT EXECUTED
5aa3e: 626c bhis 5aaac <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;
5aa40: 4284 clrl %d4 <== NOT EXECUTED
5aa42: 6000 0082 braw 5aac6 <rtems_rfs_rtems_file_read+0xd0> <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
5aa46: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5aa4a: 486e fffc pea %fp@(-4) <== NOT EXECUTED
5aa4e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5aa50: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc > 0)
5aa52: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
5aa56: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc > 0)
5aa58: 6f02 bles 5aa5c <rtems_rfs_rtems_file_read+0x66> <== NOT EXECUTED
5aa5a: 6042 bras 5aa9e <rtems_rfs_rtems_file_read+0xa8> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
break;
}
if (size == 0)
5aa5c: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
5aa60: 6760 beqs 5aac2 <rtems_rfs_rtems_file_read+0xcc> <== NOT EXECUTED
break;
if (size > count)
5aa62: ba80 cmpl %d0,%d5 <== NOT EXECUTED
5aa64: 6404 bccs 5aa6a <rtems_rfs_rtems_file_read+0x74> <== NOT EXECUTED
size = count;
5aa66: 2d45 fffc movel %d5,%fp@(-4) <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
5aa6a: 2e2e fffc movel %fp@(-4),%d7 <== NOT EXECUTED
data += size;
count -= size;
5aa6e: 9a87 subl %d7,%d5 <== NOT EXECUTED
read += size;
5aa70: d887 addl %d7,%d4 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
5aa72: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
5aa76: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5aa78: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
5aa7c: d1ea 0012 addal %a2@(18),%a0 <== NOT EXECUTED
5aa80: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5aa82: 2f06 movel %d6,%sp@- <== NOT EXECUTED
data += size;
5aa84: dc87 addl %d7,%d6 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
5aa86: 4e95 jsr %a5@ <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
5aa88: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5aa8c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5aa8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5aa90: 4eb9 0005 892e jsr 5892e <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc > 0)
5aa96: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
data += size;
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
5aa9a: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc > 0)
5aa9c: 6f20 bles 5aabe <rtems_rfs_rtems_file_read+0xc8> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
5aa9e: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5aaa4: 78ff moveq #-1,%d4 <== NOT EXECUTED
5aaa6: 2040 moveal %d0,%a0 <== NOT EXECUTED
5aaa8: 2087 movel %d7,%a0@ <== NOT EXECUTED
5aaaa: 6030 bras 5aadc <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))
5aaac: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED
5aab0: 4284 clrl %d4 <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
5aab2: 49f9 0005 8762 lea 58762 <rtems_rfs_file_io_start>,%a4 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
5aab8: 4bf9 0005 ccf8 lea 5ccf8 <memcpy>,%a5 <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
5aabe: 4a85 tstl %d5 <== NOT EXECUTED
5aac0: 6684 bnes 5aa46 <rtems_rfs_rtems_file_read+0x50> <== NOT EXECUTED
break;
}
}
}
if (read >= 0)
5aac2: 4a84 tstl %d4 <== NOT EXECUTED
5aac4: 6d16 blts 5aadc <rtems_rfs_rtems_file_read+0xe6> <== NOT EXECUTED
iop->offset = pos + read;
5aac6: 2204 movel %d4,%d1 <== NOT EXECUTED
5aac8: 5bc0 smi %d0 <== NOT EXECUTED
5aaca: 49c0 extbl %d0 <== NOT EXECUTED
5aacc: 2a00 movel %d0,%d5 <== NOT EXECUTED
5aace: 2c01 movel %d1,%d6 <== NOT EXECUTED
5aad0: dc83 addl %d3,%d6 <== NOT EXECUTED
5aad2: db82 addxl %d2,%d5 <== NOT EXECUTED
5aad4: 2745 0004 movel %d5,%a3@(4) <== NOT EXECUTED
5aad8: 2746 0008 movel %d6,%a3@(8) <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5aadc: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5aae0: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5aae4: 4eba feb2 jsr %pc@(5a998 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return read;
}
5aae8: 2004 movel %d4,%d0 <== NOT EXECUTED
5aaea: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5aaf0: 4e5e unlk %fp <== NOT EXECUTED
0005acb2 <rtems_rfs_rtems_file_write>:
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5acb2: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
5acb6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
5acba: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
rtems_rfs_file_handle* file = rtems_rfs_rtems_get_iop_file_handle (iop);
5acbe: 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));
5acc2: 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
};
5acc6: 2068 0090 moveal %a0@(144),%a0 <== NOT EXECUTED
5acca: 2068 0080 moveal %a0@(128),%a0 <== NOT EXECUTED
5acce: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5acd0: 2a2e 0010 movel %fp@(16),%d5 <== NOT EXECUTED
5acd4: 4eba fc6a jsr %pc@(5a940 <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);
5acd8: 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;
5acdc: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED
5ace0: 222b 0008 movel %a3@(8),%d1 <== NOT EXECUTED
5ace4: 4868 007c pea %a0@(124) <== NOT EXECUTED
5ace8: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5acec: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
5acf0: 2d41 fffc movel %d1,%fp@(-4) <== NOT EXECUTED
5acf4: 4eb9 0005 6112 jsr 56112 <rtems_rfs_block_get_size> <== NOT EXECUTED
file_size = rtems_rfs_file_size (file);
if (pos > file_size)
5acfa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5acfe: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5ad02: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
5ad06: 2c02 movel %d2,%d6 <== NOT EXECUTED
5ad08: 2e03 movel %d3,%d7 <== NOT EXECUTED
5ad0a: 9e81 subl %d1,%d7 <== NOT EXECUTED
5ad0c: 9d80 subxl %d0,%d6 <== NOT EXECUTED
5ad0e: 6358 blss 5ad68 <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);
5ad10: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5ad12: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ad14: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ad16: 4eb9 0005 8c0a jsr 58c0a <rtems_rfs_file_set_size> <== NOT EXECUTED
5ad1c: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5ad20: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5ad22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5ad26: 6702 beqs 5ad2a <rtems_rfs_rtems_file_write+0x78><== NOT EXECUTED
5ad28: 6074 bras 5ad9e <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);
5ad2a: 486a 000e pea %a2@(14) <== NOT EXECUTED
5ad2e: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED
5ad32: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
5ad36: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5ad3a: 4eb9 0005 6040 jsr 56040 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
5ad40: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5ad44: 260e movel %fp,%d3 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5ad46: 4284 clrl %d4 <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5ad48: 0683 ffff fff4 addil #-12,%d3 <== NOT EXECUTED
5ad4e: 49f9 0005 8762 lea 58762 <rtems_rfs_file_io_start>,%a4 <== NOT EXECUTED
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
5ad54: 4bf9 0005 ccf8 lea 5ccf8 <memcpy>,%a5 <== NOT EXECUTED
data += size;
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
5ad5a: 2c3c 0005 892e movel #362798,%d6 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
5ad60: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
5ad64: 6000 00b2 braw 5ae18 <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)
5ad68: 2c02 movel %d2,%d6 <== NOT EXECUTED
5ad6a: 2e03 movel %d3,%d7 <== NOT EXECUTED
5ad6c: 9e81 subl %d1,%d7 <== NOT EXECUTED
5ad6e: 9d80 subxl %d0,%d6 <== NOT EXECUTED
5ad70: 64d2 bccs 5ad44 <rtems_rfs_rtems_file_write+0x92><== NOT EXECUTED
5ad72: 242b 000c movel %a3@(12),%d2 <== NOT EXECUTED
5ad76: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED
5ad7c: 67c6 beqs 5ad44 <rtems_rfs_rtems_file_write+0x92><== NOT EXECUTED
{
pos = file_size;
5ad7e: 204e moveal %fp,%a0 <== NOT EXECUTED
5ad80: 2101 movel %d1,%a0@- <== NOT EXECUTED
5ad82: 2100 movel %d0,%a0@- <== NOT EXECUTED
rc = rtems_rfs_file_seek (file, pos, &pos);
5ad84: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5ad86: 2f01 movel %d1,%sp@- <== NOT EXECUTED
5ad88: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5ad8a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ad8c: 4eb9 0005 8b2c jsr 58b2c <rtems_rfs_file_seek> <== NOT EXECUTED
if (rc)
5ad92: 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);
5ad96: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
5ad98: 67aa beqs 5ad44 <rtems_rfs_rtems_file_write+0x92><== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5ad9a: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5ad9e: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
5ada2: 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));
5ada4: 4eba fbf2 jsr %pc@(5a998 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write append seek", rc);
5ada8: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5adae: 588f addql #4,%sp <== NOT EXECUTED
5adb0: 2040 moveal %d0,%a0 <== NOT EXECUTED
5adb2: 2082 movel %d2,%a0@ <== NOT EXECUTED
5adb4: 6000 0092 braw 5ae48 <rtems_rfs_rtems_file_write+0x196><== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5adb8: 42a7 clrl %sp@- <== NOT EXECUTED
5adba: 2f03 movel %d3,%sp@- <== NOT EXECUTED
}
}
while (count)
{
size_t size = count;
5adbc: 2d45 fff4 movel %d5,%fp@(-12) <== NOT EXECUTED
rc = rtems_rfs_file_io_start (file, &size, false);
5adc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5adc2: 4e94 jsr %a4@ <== NOT EXECUTED
if (rc)
5adc4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
5adc8: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc)
5adca: 6702 beqs 5adce <rtems_rfs_rtems_file_write+0x11c><== NOT EXECUTED
5adcc: 603c bras 5ae0a <rtems_rfs_rtems_file_write+0x158><== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
break;
}
if (size > count)
5adce: baae fff4 cmpl %fp@(-12),%d5 <== NOT EXECUTED
5add2: 6404 bccs 5add8 <rtems_rfs_rtems_file_write+0x126><== NOT EXECUTED
size = count;
5add4: 2d45 fff4 movel %d5,%fp@(-12) <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
5add8: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
5addc: 2f2e fff4 movel %fp@(-12),%sp@- <== NOT EXECUTED
5ade0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5ade2: 2068 001a moveal %a0@(26),%a0 <== NOT EXECUTED
5ade6: d1ea 0012 addal %a2@(18),%a0 <== NOT EXECUTED
5adea: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5adec: 4e95 jsr %a5@ <== NOT EXECUTED
data += size;
5adee: 202e fff4 movel %fp@(-12),%d0 <== NOT EXECUTED
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
5adf2: 2046 moveal %d6,%a0 <== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
5adf4: d480 addl %d0,%d2 <== NOT EXECUTED
count -= size;
5adf6: 9a80 subl %d0,%d5 <== NOT EXECUTED
write += size;
5adf8: d880 addl %d0,%d4 <== NOT EXECUTED
rc = rtems_rfs_file_io_end (file, size, false);
5adfa: 42a7 clrl %sp@- <== NOT EXECUTED
5adfc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5adfe: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5ae00: 4e90 jsr %a0@ <== NOT EXECUTED
if (rc)
5ae02: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
data += size;
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
5ae06: 2e00 movel %d0,%d7 <== NOT EXECUTED
if (rc)
5ae08: 670e beqs 5ae18 <rtems_rfs_rtems_file_write+0x166><== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
5ae0a: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
5ae10: 78ff moveq #-1,%d4 <== NOT EXECUTED
5ae12: 2040 moveal %d0,%a0 <== NOT EXECUTED
5ae14: 2087 movel %d7,%a0@ <== NOT EXECUTED
5ae16: 6022 bras 5ae3a <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)
5ae18: 4a85 tstl %d5 <== NOT EXECUTED
5ae1a: 669c bnes 5adb8 <rtems_rfs_rtems_file_write+0x106><== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
if (write >= 0)
5ae1c: 4a84 tstl %d4 <== NOT EXECUTED
5ae1e: 6d1a blts 5ae3a <rtems_rfs_rtems_file_write+0x188><== NOT EXECUTED
iop->offset = pos + write;
5ae20: 2604 movel %d4,%d3 <== NOT EXECUTED
5ae22: 5bc2 smi %d2 <== NOT EXECUTED
5ae24: 49c2 extbl %d2 <== NOT EXECUTED
5ae26: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
5ae2a: 222e fffc movel %fp@(-4),%d1 <== NOT EXECUTED
5ae2e: d283 addl %d3,%d1 <== NOT EXECUTED
5ae30: d182 addxl %d2,%d0 <== NOT EXECUTED
5ae32: 2740 0004 movel %d0,%a3@(4) <== NOT EXECUTED
5ae36: 2741 0008 movel %d1,%a3@(8) <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
5ae3a: 206a 001a moveal %a2@(26),%a0 <== NOT EXECUTED
5ae3e: 2f28 0090 movel %a0@(144),%sp@- <== NOT EXECUTED
5ae42: 4eba fb54 jsr %pc@(5a998 <rtems_rfs_rtems_unlock>) <== NOT EXECUTED
5ae46: 588f addql #4,%sp <== NOT EXECUTED
return write;
}
5ae48: 2004 movel %d4,%d0 <== NOT EXECUTED
5ae4a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
5ae50: 4e5e unlk %fp <== NOT EXECUTED
0004fc62 <rtems_rfs_rtems_fstat>:
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
4fc62: 4e56 ffc0 linkw %fp,#-64 <== NOT EXECUTED
4fc66: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4fc6a: 2268 0014 moveal %a0@(20),%a1 <== NOT EXECUTED
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
4fc6e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4fc72: 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);
4fc76: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fc7a: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4fc7e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
}
int
rtems_rfs_rtems_fstat (const rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
4fc82: 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);
4fc86: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fc88: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
4fc8e: 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);
4fc92: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4fc94: 6704 beqs 4fc9a <rtems_rfs_rtems_fstat+0x38> <== NOT EXECUTED
4fc96: 6000 0220 braw 4feb8 <rtems_rfs_rtems_fstat+0x256> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("stat: opening inode", rc);
}
mode = rtems_rfs_inode_get_mode (&inode);
4fc9a: 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);
4fc9e: 4280 clrl %d0 <== NOT EXECUTED
4fca0: 102c 0002 moveb %a4@(2),%d0 <== NOT EXECUTED
4fca4: 4281 clrl %d1 <== NOT EXECUTED
4fca6: 122c 0003 moveb %a4@(3),%d1 <== NOT EXECUTED
4fcaa: e188 lsll #8,%d0 <== NOT EXECUTED
4fcac: 8081 orl %d1,%d0 <== NOT EXECUTED
4fcae: 3400 movew %d0,%d2 <== NOT EXECUTED
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
4fcb0: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4fcb6: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4fcbc: 6708 beqs 4fcc6 <rtems_rfs_rtems_fstat+0x64> <== NOT EXECUTED
4fcbe: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4fcc4: 6620 bnes 4fce6 <rtems_rfs_rtems_fstat+0x84> <== NOT EXECUTED
{
buf->st_rdev =
rtems_filesystem_make_dev_t (rtems_rfs_inode_get_block (&inode, 0),
4fcc6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fcca: 4bfa ff5c lea %pc@(4fc28 <rtems_rfs_inode_get_block.isra.12>),%a5<== NOT EXECUTED
4fcce: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4fcd0: 4e95 jsr %a5@ <== NOT EXECUTED
4fcd2: 508f addql #8,%sp <== NOT EXECUTED
4fcd4: 2600 movel %d0,%d3 <== NOT EXECUTED
4fcd6: 42a7 clrl %sp@- <== NOT EXECUTED
4fcd8: 2f0c movel %a4,%sp@- <== NOT EXECUTED
4fcda: 4e95 jsr %a5@ <== NOT EXECUTED
4fcdc: 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 =
4fcde: 2540 0016 movel %d0,%a2@(22) <== NOT EXECUTED
4fce2: 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);
4fce6: 222b 0010 movel %a3@(16),%d1 <== NOT EXECUTED
4fcea: 5bc0 smi %d0 <== NOT EXECUTED
4fcec: 49c0 extbl %d0 <== NOT EXECUTED
buf->st_ino = rtems_rfs_inode_ino (&inode);
4fcee: 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);
4fcf4: 2480 movel %d0,%a2@ <== NOT EXECUTED
4fcf6: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
buf->st_ino = rtems_rfs_inode_ino (&inode);
buf->st_mode = rtems_rfs_rtems_mode (mode);
4fcfa: 3f02 movew %d2,%sp@- <== NOT EXECUTED
4fcfc: 4267 clrw %sp@- <== NOT EXECUTED
4fcfe: 4eb9 0005 043e jsr 5043e <rtems_rfs_rtems_mode> <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
4fd04: 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);
4fd08: 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);
4fd0a: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
4fd0e: 4280 clrl %d0 <== NOT EXECUTED
4fd10: 1010 moveb %a0@,%d0 <== NOT EXECUTED
4fd12: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
4fd16: e188 lsll #8,%d0 <== NOT EXECUTED
4fd18: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
4fd1a: 3200 movew %d0,%d1 <== NOT EXECUTED
links = 0;
4fd1c: 0c81 0000 ffff cmpil #65535,%d1 <== NOT EXECUTED
4fd22: 56c1 sne %d1 <== NOT EXECUTED
4fd24: 4881 extw %d1 <== NOT EXECUTED
4fd26: 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;
4fd28: 4281 clrl %d1 <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
4fd2a: 3540 0010 movew %d0,%a2@(16) <== NOT EXECUTED
4fd2e: 4280 clrl %d0 <== NOT EXECUTED
4fd30: 1028 0006 moveb %a0@(6),%d0 <== NOT EXECUTED
4fd34: 1228 0007 moveb %a0@(7),%d1 <== NOT EXECUTED
4fd38: e188 lsll #8,%d0 <== NOT EXECUTED
4fd3a: 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;
4fd3c: 7218 moveq #24,%d1 <== NOT EXECUTED
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
4fd3e: 3540 0012 movew %d0,%a2@(18) <== NOT EXECUTED
4fd42: 4280 clrl %d0 <== NOT EXECUTED
4fd44: 1028 0004 moveb %a0@(4),%d0 <== NOT EXECUTED
4fd48: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fd4a: 4281 clrl %d1 <== NOT EXECUTED
4fd4c: 1228 0005 moveb %a0@(5),%d1 <== NOT EXECUTED
4fd50: 4841 swap %d1 <== NOT EXECUTED
4fd52: 4241 clrw %d1 <== NOT EXECUTED
4fd54: 8081 orl %d1,%d0 <== NOT EXECUTED
4fd56: 4240 clrw %d0 <== NOT EXECUTED
4fd58: 4840 swap %d0 <== NOT EXECUTED
4fd5a: 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));
4fd5e: 2eae ffe2 movel %fp@(-30),%sp@ <== NOT EXECUTED
4fd62: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fd64: 4eb9 0005 8ed0 jsr 58ed0 <rtems_rfs_file_get_shared> <== NOT EXECUTED
4fd6a: 242a 000c movel %a2@(12),%d2 <== NOT EXECUTED
4fd6e: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (shared)
4fd70: 508f addql #8,%sp <== NOT EXECUTED
4fd72: 0282 0000 f000 andil #61440,%d2 <== NOT EXECUTED
4fd78: 4a80 tstl %d0 <== NOT EXECUTED
4fd7a: 673a beqs 4fdb6 <rtems_rfs_rtems_fstat+0x154> <== NOT EXECUTED
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
4fd7c: 2568 0084 0026 movel %a0@(132),%a2@(38) <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
4fd82: 2568 0088 002e movel %a0@(136),%a2@(46) <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
4fd88: 2568 008c 0036 movel %a0@(140),%a2@(54) <== NOT EXECUTED
buf->st_blocks = rtems_rfs_file_shared_get_block_count (shared);
4fd8e: 2568 007c 0042 movel %a0@(124),%a2@(66) <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
4fd94: 0c82 0000 a000 cmpil #40960,%d2 <== NOT EXECUTED
4fd9a: 660a bnes 4fda6 <rtems_rfs_rtems_fstat+0x144> <== NOT EXECUTED
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
4fd9c: 4280 clrl %d0 <== NOT EXECUTED
4fd9e: 3028 0082 movew %a0@(130),%d0 <== NOT EXECUTED
4fda2: 6000 00dc braw 4fe80 <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);
4fda6: 4868 007c pea %a0@(124) <== NOT EXECUTED
4fdaa: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fdac: 4eb9 0005 6112 jsr 56112 <rtems_rfs_block_get_size> <== NOT EXECUTED
4fdb2: 6000 00e2 braw 4fe96 <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);
4fdb6: 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);
4fdba: 4280 clrl %d0 <== NOT EXECUTED
4fdbc: 1028 0010 moveb %a0@(16),%d0 <== NOT EXECUTED
4fdc0: 7218 moveq #24,%d1 <== NOT EXECUTED
4fdc2: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fdc4: 4281 clrl %d1 <== NOT EXECUTED
4fdc6: 1228 0011 moveb %a0@(17),%d1 <== NOT EXECUTED
4fdca: 4841 swap %d1 <== NOT EXECUTED
4fdcc: 4241 clrw %d1 <== NOT EXECUTED
4fdce: 8081 orl %d1,%d0 <== NOT EXECUTED
4fdd0: 4281 clrl %d1 <== NOT EXECUTED
4fdd2: 1228 0013 moveb %a0@(19),%d1 <== NOT EXECUTED
4fdd6: 8081 orl %d1,%d0 <== NOT EXECUTED
4fdd8: 1228 0012 moveb %a0@(18),%d1 <== NOT EXECUTED
4fddc: e189 lsll #8,%d1 <== NOT EXECUTED
4fdde: 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);
4fde0: 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);
4fde2: 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);
4fde6: 4280 clrl %d0 <== NOT EXECUTED
4fde8: 1028 0014 moveb %a0@(20),%d0 <== NOT EXECUTED
4fdec: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fdee: 4281 clrl %d1 <== NOT EXECUTED
4fdf0: 1228 0015 moveb %a0@(21),%d1 <== NOT EXECUTED
4fdf4: 4841 swap %d1 <== NOT EXECUTED
4fdf6: 4241 clrw %d1 <== NOT EXECUTED
4fdf8: 8081 orl %d1,%d0 <== NOT EXECUTED
4fdfa: 4281 clrl %d1 <== NOT EXECUTED
4fdfc: 1228 0017 moveb %a0@(23),%d1 <== NOT EXECUTED
4fe00: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe02: 1228 0016 moveb %a0@(22),%d1 <== NOT EXECUTED
4fe06: e189 lsll #8,%d1 <== NOT EXECUTED
4fe08: 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);
4fe0a: 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);
4fe0c: 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);
4fe10: 4280 clrl %d0 <== NOT EXECUTED
4fe12: 1028 0018 moveb %a0@(24),%d0 <== NOT EXECUTED
4fe16: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fe18: 4281 clrl %d1 <== NOT EXECUTED
4fe1a: 1228 0019 moveb %a0@(25),%d1 <== NOT EXECUTED
4fe1e: 4841 swap %d1 <== NOT EXECUTED
4fe20: 4241 clrw %d1 <== NOT EXECUTED
4fe22: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe24: 4281 clrl %d1 <== NOT EXECUTED
4fe26: 1228 001b moveb %a0@(27),%d1 <== NOT EXECUTED
4fe2a: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe2c: 1228 001a moveb %a0@(26),%d1 <== NOT EXECUTED
4fe30: e189 lsll #8,%d1 <== NOT EXECUTED
4fe32: 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);
4fe34: 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);
4fe36: 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);
4fe3a: 4280 clrl %d0 <== NOT EXECUTED
4fe3c: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
4fe40: e3a8 lsll %d1,%d0 <== NOT EXECUTED
4fe42: 4281 clrl %d1 <== NOT EXECUTED
4fe44: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
4fe48: 4841 swap %d1 <== NOT EXECUTED
4fe4a: 4241 clrw %d1 <== NOT EXECUTED
4fe4c: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe4e: 4281 clrl %d1 <== NOT EXECUTED
4fe50: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
4fe54: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe56: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
4fe5a: e189 lsll #8,%d1 <== NOT EXECUTED
4fe5c: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe5e: 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))
4fe62: 0c82 0000 a000 cmpil #40960,%d2 <== NOT EXECUTED
4fe68: 6620 bnes 4fe8a <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);
4fe6a: 4280 clrl %d0 <== NOT EXECUTED
4fe6c: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
4fe70: 4281 clrl %d1 <== NOT EXECUTED
4fe72: 1228 000b moveb %a0@(11),%d1 <== NOT EXECUTED
4fe76: e188 lsll #8,%d0 <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
4fe78: 8081 orl %d1,%d0 <== NOT EXECUTED
4fe7a: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
4fe80: 42aa 001e clrl %a2@(30) <== NOT EXECUTED
4fe84: 2540 0022 movel %d0,%a2@(34) <== NOT EXECUTED
4fe88: 6016 bras 4fea0 <rtems_rfs_rtems_fstat+0x23e> <== NOT EXECUTED
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
4fe8a: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4fe8e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4fe90: 4eb9 0004 f3b6 jsr 4f3b6 <rtems_rfs_inode_get_size> <== NOT EXECUTED
4fe96: 508f addql #8,%sp <== NOT EXECUTED
4fe98: 2540 001e movel %d0,%a2@(30) <== NOT EXECUTED
4fe9c: 2541 0022 movel %d1,%a2@(34) <== NOT EXECUTED
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
4fea0: 256b 0008 003e movel %a3@(8),%a2@(62) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
4fea6: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4feaa: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4feac: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4feb2: 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);
4feb4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4feb6: 6f0e bles 4fec6 <rtems_rfs_rtems_fstat+0x264> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("stat: closing inode", rc);
4feb8: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4febe: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fec0: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fec2: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fec4: 6002 bras 4fec8 <rtems_rfs_rtems_fstat+0x266> <== NOT EXECUTED
}
return 0;
4fec6: 4280 clrl %d0 <== NOT EXECUTED
}
4fec8: 4cee 3c0c ffc0 moveml %fp@(-64),%d2-%d3/%a2-%a5 <== NOT EXECUTED
4fece: 4e5e unlk %fp <== NOT EXECUTED
00050432 <rtems_rfs_rtems_imode>:
uint16_t
rtems_rfs_rtems_imode (mode_t mode)
{
50432: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return mode;
}
50436: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED
5043a: 4e5e unlk %fp <== NOT EXECUTED
0004ff7c <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
4ff7c: 4e56 ffdc linkw %fp,#-36
4ff80: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4ff84: 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;
4ff88: 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;
4ff8a: 4282 clrl %d2
/*
* Parse the options the user specifiies.
*/
while (options)
{
printf ("options=%s\n", options);
4ff8c: 4bf9 0005 cfac lea 5cfac <printf>,%a5
if (strncmp (options, "hold-bitmaps",
4ff92: 49f9 0005 dfac lea 5dfac <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);
4ff98: 283c 0005 e24e movel #385614,%d4
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
4ff9e: 2a3c 0005 d7d4 movel #382932,%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;
4ffa4: 246e 000c moveal %fp@(12),%a2
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
4ffa8: 6000 0098 braw 50042 <rtems_rfs_rtems_initialise+0xc6>
{
printf ("options=%s\n", options);
4ffac: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ffae: 4879 0006 d8fa pea 6d8fa <_CPU_m68k_BFFFO_table+0xcdd> <== NOT EXECUTED
4ffb4: 4e95 jsr %a5@ <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
4ffb6: 4878 000c pea c <OPER1> <== NOT EXECUTED
4ffba: 4879 0006 d906 pea 6d906 <_CPU_m68k_BFFFO_table+0xce9> <== NOT EXECUTED
4ffc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ffc2: 4e94 jsr %a4@ <== NOT EXECUTED
4ffc4: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4ffc8: 4a80 tstl %d0 <== NOT EXECUTED
4ffca: 6606 bnes 4ffd2 <rtems_rfs_rtems_initialise+0x56><== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
4ffcc: 103c 0001 moveb #1,%d0 <== NOT EXECUTED
4ffd0: 601a bras 4ffec <rtems_rfs_rtems_initialise+0x70><== NOT EXECUTED
else if (strncmp (options, "no-local-cache",
4ffd2: 4878 000e pea e <OPER1+0x2> <== NOT EXECUTED
4ffd6: 4879 0006 d913 pea 6d913 <_CPU_m68k_BFFFO_table+0xcf6> <== NOT EXECUTED
4ffdc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4ffde: 4e94 jsr %a4@ <== NOT EXECUTED
4ffe0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4ffe4: 4a80 tstl %d0 <== NOT EXECUTED
4ffe6: 6608 bnes 4fff0 <rtems_rfs_rtems_initialise+0x74><== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
4ffe8: 103c 0002 moveb #2,%d0 <== NOT EXECUTED
4ffec: 8480 orl %d0,%d2 <== NOT EXECUTED
4ffee: 6038 bras 50028 <rtems_rfs_rtems_initialise+0xac><== NOT EXECUTED
else if (strncmp (options, "max-held-bufs",
4fff0: 4878 000d pea d <OPER1+0x1> <== NOT EXECUTED
4fff4: 4879 0006 d922 pea 6d922 <_CPU_m68k_BFFFO_table+0xd05> <== NOT EXECUTED
4fffa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fffc: 4e94 jsr %a4@ <== NOT EXECUTED
4fffe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
50002: 4a80 tstl %d0 <== NOT EXECUTED
50004: 6614 bnes 5001a <rtems_rfs_rtems_initialise+0x9e><== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
50006: 42a7 clrl %sp@- <== NOT EXECUTED
50008: 2044 moveal %d4,%a0 <== NOT EXECUTED
5000a: 42a7 clrl %sp@- <== NOT EXECUTED
5000c: 486a 000e pea %a2@(14) <== NOT EXECUTED
50010: 4e90 jsr %a0@ <== NOT EXECUTED
50012: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
50016: 2600 movel %d0,%d3 <== NOT EXECUTED
50018: 600e bras 50028 <rtems_rfs_rtems_initialise+0xac><== NOT EXECUTED
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
5001a: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
50020: 7816 moveq #22,%d4 <== NOT EXECUTED
50022: 2040 moveal %d0,%a0 <== NOT EXECUTED
50024: 2084 movel %d4,%a0@ <== NOT EXECUTED
50026: 603e bras 50066 <rtems_rfs_rtems_initialise+0xea><== NOT EXECUTED
options = strchr (options, ',');
50028: 4878 002c pea 2c <OPER2+0x18> <== NOT EXECUTED
5002c: 2045 moveal %d5,%a0 <== NOT EXECUTED
5002e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
50030: 4e90 jsr %a0@ <== NOT EXECUTED
50032: 508f addql #8,%sp <== NOT EXECUTED
50034: 2440 moveal %d0,%a2 <== NOT EXECUTED
if (options)
50036: 4a80 tstl %d0 <== NOT EXECUTED
50038: 670e beqs 50048 <rtems_rfs_rtems_initialise+0xcc><== NOT EXECUTED
{
++options;
if (*options == '\0')
5003a: 4a2a 0001 tstb %a2@(1) <== NOT EXECUTED
5003e: 6708 beqs 50048 <rtems_rfs_rtems_initialise+0xcc><== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
options = strchr (options, ',');
if (options)
{
++options;
50040: 528a addql #1,%a2 <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
50042: 4a8a tstl %a2
50044: 6600 ff66 bnew 4ffac <rtems_rfs_rtems_initialise+0x30>
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
50048: 4878 0004 pea 4 <CONTEXT_ARG>
5004c: 4eb9 0004 6910 jsr 46910 <malloc>
if (!rtems)
50052: 588f addql #4,%sp
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
50054: 2440 moveal %d0,%a2
if (!rtems)
50056: 4a80 tstl %d0
50058: 6612 bnes 5006c <rtems_rfs_rtems_initialise+0xf0><== ALWAYS TAKEN
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
5005a: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
50060: 760c moveq #12,%d3 <== NOT EXECUTED
50062: 2040 moveal %d0,%a0 <== NOT EXECUTED
50064: 2083 movel %d3,%a0@ <== NOT EXECUTED
50066: 70ff moveq #-1,%d0
50068: 6000 00c4 braw 5012e <rtems_rfs_rtems_initialise+0x1b2>
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
5006c: 4292 clrl %a2@
rc = rtems_rfs_mutex_create (&rtems->access);
5006e: 2f00 movel %d0,%sp@-
50070: 4eb9 0005 a3e4 jsr 5a3e4 <rtems_rfs_mutex_create>
if (rc > 0)
50076: 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);
50078: 2840 moveal %d0,%a4
if (rc > 0)
5007a: 4a80 tstl %d0
5007c: 6f14 bles 50092 <rtems_rfs_rtems_initialise+0x116><== NEVER TAKEN
{
free (rtems);
5007e: 2f0a movel %a2,%sp@-
50080: 4eb9 0004 6348 jsr 46348 <free>
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
50086: 4eb9 0005 bd98 jsr 5bd98 <__errno>
5008c: 2040 moveal %d0,%a0
5008e: 208c movel %a4,%a0@
50090: 605a bras 500ec <rtems_rfs_rtems_initialise+0x170>
}
rc = rtems_rfs_mutex_lock (&rtems->access);
50092: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
50094: 4eba fe8e jsr %pc@(4ff24 <rtems_rfs_mutex_lock.isra.20>)<== NOT EXECUTED
if (rc > 0)
50098: 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);
5009a: 2840 moveal %d0,%a4 <== NOT EXECUTED
if (rc > 0)
5009c: 4a80 tstl %d0 <== NOT EXECUTED
5009e: 6f1e bles 500be <rtems_rfs_rtems_initialise+0x142><== NOT EXECUTED
{
rtems_rfs_mutex_destroy (&rtems->access);
500a0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
500a2: 4eb9 0005 a448 jsr 5a448 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
500a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
500aa: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
500b0: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
500b6: 508f addql #8,%sp <== NOT EXECUTED
500b8: 2040 moveal %d0,%a0 <== NOT EXECUTED
500ba: 208c movel %a4,%a0@ <== NOT EXECUTED
500bc: 60a8 bras 50066 <rtems_rfs_rtems_initialise+0xea><== NOT EXECUTED
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
500be: 486e fffc pea %fp@(-4) <== NOT EXECUTED
500c2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
500c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
500c6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
500c8: 2f2b 0036 movel %a3@(54),%sp@- <== NOT EXECUTED
500cc: 4eb9 0005 9296 jsr 59296 <rtems_rfs_fs_open> <== NOT EXECUTED
if (rc)
500d2: 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);
500d6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
500d8: 6718 beqs 500f2 <rtems_rfs_rtems_initialise+0x176><== NOT EXECUTED
{
free (rtems);
500da: 2f0a movel %a2,%sp@- <== NOT EXECUTED
500dc: 4eb9 0004 6348 jsr 46348 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
500e2: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
500e8: 2040 moveal %d0,%a0 <== NOT EXECUTED
500ea: 2082 movel %d2,%a0@ <== NOT EXECUTED
500ec: 588f addql #4,%sp
500ee: 6000 ff76 braw 50066 <rtems_rfs_rtems_initialise+0xea>
}
mt_entry->fs_info = fs;
500f2: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
mt_entry->ops = &rtems_rfs_ops;
500f6: 203c 0006 d930 movel #448816,%d0 <== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
500fc: 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;
50100: 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;
50104: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED
mt_entry->mt_fs_root->location.node_access = (void*) RTEMS_RFS_ROOT_INO;
50108: 7001 moveq #1,%d0 <== NOT EXECUTED
5010a: 2340 0008 movel %d0,%a1@(8) <== NOT EXECUTED
mt_entry->mt_fs_root->location.handlers = &rtems_rfs_rtems_dir_handlers;
5010e: 203c 0006 f562 movel #456034,%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);
50114: 2468 0080 moveal %a0@(128),%a2 <== NOT EXECUTED
50118: 2340 0010 movel %d0,%a1@(16) <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
5011c: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5011e: 4eb9 0005 7286 jsr 57286 <rtems_rfs_buffers_release> <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
50124: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
50126: 4eba fdaa jsr %pc@(4fed2 <rtems_rfs_mutex_unlock.isra.19>)<== NOT EXECUTED
5012a: 508f addql #8,%sp <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
return 0;
5012c: 4280 clrl %d0 <== NOT EXECUTED
}
5012e: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5
50134: 4e5e unlk %fp <== NOT EXECUTED
0004f4b6 <rtems_rfs_rtems_is_directory>:
static bool
rtems_rfs_rtems_is_directory(
rtems_filesystem_eval_path_context_t *ctx,
void *arg
)
{
4f4b6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_inode_handle* inode = arg;
return rtems_rfs_rtems_node_type_by_inode (inode)
4f4ba: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f4be: 4eba ffaa jsr %pc@(4f46a <rtems_rfs_rtems_node_type_by_inode>)<== NOT EXECUTED
4f4c2: 588f addql #4,%sp <== NOT EXECUTED
== RTEMS_FILESYSTEM_DIRECTORY;
}
4f4c4: 4e5e unlk %fp <== NOT EXECUTED
void *arg
)
{
rtems_rfs_inode_handle* inode = arg;
return rtems_rfs_rtems_node_type_by_inode (inode)
4f4c6: 4a80 tstl %d0 <== NOT EXECUTED
4f4c8: 57c0 seq %d0 <== NOT EXECUTED
== RTEMS_FILESYSTEM_DIRECTORY;
}
4f4ca: 4480 negl %d0 <== NOT EXECUTED
0004f55e <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)
{
4f55e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4f562: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
4f566: 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);
4f568: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
4f56c: 42a7 clrl %sp@- <== NOT EXECUTED
4f56e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f572: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
4f576: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4f57a: 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);
4f57e: 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);
4f582: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f586: 4eb9 0005 9a60 jsr 59a60 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
4f58c: 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);
4f590: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f592: 670e beqs 4f5a2 <rtems_rfs_rtems_link+0x44> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("link: linking", rc);
4f594: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f59a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f59c: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f59e: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f5a0: 6002 bras 4f5a4 <rtems_rfs_rtems_link+0x46> <== NOT EXECUTED
}
return 0;
4f5a2: 4280 clrl %d0 <== NOT EXECUTED
}
4f5a4: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4f5a8: 4e5e unlk %fp <== NOT EXECUTED
00050138 <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
)
{
50138: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
5013c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
50140: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED
50144: 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);
50148: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
)
{
rtems_rfs_file_system* fs = mt_entry->fs_info;
rtems_rfs_rtems_lock (fs);
}
5014c: 4e5e unlk %fp <== NOT EXECUTED
5014e: 6000 fdd4 braw 4ff24 <rtems_rfs_mutex_lock.isra.20> <== NOT EXECUTED
0004fa44 <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)
{
4fa44: 4e56 ffb8 linkw %fp,#-72 <== NOT EXECUTED
4fa48: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parentloc);
4fa4c: 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)
{
4fa50: 48d7 04fc moveml %d2-%d7/%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);
4fa54: 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);
4fa58: 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)
{
4fa5c: 262e 0014 movel %fp@(20),%d3 <== NOT EXECUTED
4fa60: 2c2e 0018 movel %fp@(24),%d6 <== NOT EXECUTED
4fa64: 2a2e 001c movel %fp@(28),%d5 <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
4fa68: 4eb9 0005 33e4 jsr 533e4 <geteuid> <== NOT EXECUTED
4fa6e: 3440 moveaw %d0,%a2 <== NOT EXECUTED
gid = getegid ();
4fa70: 4eb9 0005 33d0 jsr 533d0 <getegid> <== NOT EXECUTED
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
rtems_rfs_rtems_imode (mode),
4fa76: 2f03 movel %d3,%sp@- <== NOT EXECUTED
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
gid = getegid ();
4fa78: 3e00 movew %d0,%d7 <== NOT EXECUTED
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
rtems_rfs_rtems_imode (mode),
4fa7a: 4eb9 0005 0432 jsr 50432 <rtems_rfs_rtems_imode> <== NOT EXECUTED
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
4fa80: 486e ffd6 pea %fp@(-42) <== NOT EXECUTED
4fa84: 3f07 movew %d7,%sp@- <== NOT EXECUTED
4fa86: 4267 clrw %sp@- <== NOT EXECUTED
4fa88: 3f0a movew %a2,%sp@- <== NOT EXECUTED
4fa8a: 4267 clrw %sp@- <== NOT EXECUTED
4fa8c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fa90: 3f00 movew %d0,%sp@- <== NOT EXECUTED
4fa92: 4267 clrw %sp@- <== NOT EXECUTED
4fa94: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4fa98: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4fa9c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4fa9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4faa0: 4eb9 0004 f092 jsr 4f092 <rtems_rfs_inode_create> <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
4faa6: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED
#else
uid = 0;
gid = 0;
#endif
rc = rtems_rfs_inode_create (fs, parent, name, namelen,
4faaa: 2800 movel %d0,%d4 <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
4faac: 6f02 bles 4fab0 <rtems_rfs_rtems_mknod+0x6c> <== NOT EXECUTED
4faae: 601e bras 4face <rtems_rfs_rtems_mknod+0x8a> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("mknod: inode create", rc);
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
4fab0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fab4: 45ee ffda lea %fp@(-38),%a2 <== NOT EXECUTED
4fab8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4faba: 2f2e ffd6 movel %fp@(-42),%sp@- <== NOT EXECUTED
4fabe: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fac0: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4fac6: 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);
4faca: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc > 0)
4facc: 6f0e bles 4fadc <rtems_rfs_rtems_mknod+0x98> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("mknod: inode open", rc);
4face: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fad4: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fad6: 2084 movel %d4,%a0@ <== NOT EXECUTED
4fad8: 6000 0084 braw 4fb5e <rtems_rfs_rtems_mknod+0x11a> <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
4fadc: 2003 movel %d3,%d0 <== NOT EXECUTED
4fade: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4fae4: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4faea: 6756 beqs 4fb42 <rtems_rfs_rtems_mknod+0xfe> <== NOT EXECUTED
4faec: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
4faf2: 674e beqs 4fb42 <rtems_rfs_rtems_mknod+0xfe> <== NOT EXECUTED
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
4faf4: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4fafa: 6708 beqs 4fb04 <rtems_rfs_rtems_mknod+0xc0> <== NOT EXECUTED
4fafc: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4fb02: 6624 bnes 4fb28 <rtems_rfs_rtems_mknod+0xe4> <== NOT EXECUTED
{
int major;
int minor;
rtems_filesystem_split_dev_t (dev, major, minor);
rtems_rfs_inode_set_block (&inode, 0, major);
4fb04: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4fb06: 260e movel %fp,%d3 <== NOT EXECUTED
4fb08: 0683 ffff ffda addil #-38,%d3 <== NOT EXECUTED
4fb0e: 45fa f904 lea %pc@(4f414 <rtems_rfs_inode_set_block>),%a2<== NOT EXECUTED
4fb12: 42a7 clrl %sp@- <== NOT EXECUTED
4fb14: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fb16: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_set_block (&inode, 1, minor);
4fb18: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4fb1a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4fb1e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4fb20: 4e92 jsr %a2@ <== NOT EXECUTED
if (S_ISDIR(mode) || S_ISREG(mode))
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
{
4fb22: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
4fb26: 601a bras 4fb42 <rtems_rfs_rtems_mknod+0xfe> <== 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);
4fb28: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4fb2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
4fb2c: 7416 moveq #22,%d2 <== 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);
4fb2e: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
4fb34: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fb3a: 508f addql #8,%sp <== NOT EXECUTED
4fb3c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fb3e: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fb40: 601c bras 4fb5e <rtems_rfs_rtems_mknod+0x11a> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
4fb42: 486e ffda pea %fp@(-38) <== NOT EXECUTED
4fb46: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fb48: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4fb4e: 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);
4fb50: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4fb52: 6f0e bles 4fb62 <rtems_rfs_rtems_mknod+0x11e> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
4fb54: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fb5a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fb5c: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fb5e: 70ff moveq #-1,%d0 <== NOT EXECUTED
4fb60: 6002 bras 4fb64 <rtems_rfs_rtems_mknod+0x120> <== NOT EXECUTED
}
return 0;
4fb62: 4280 clrl %d0 <== NOT EXECUTED
}
4fb64: 4cee 04fc ffb8 moveml %fp@(-72),%d2-%d7/%a2 <== NOT EXECUTED
4fb6a: 4e5e unlk %fp <== NOT EXECUTED
0005043e <rtems_rfs_rtems_mode>:
mode_t
rtems_rfs_rtems_mode (int imode)
{
5043e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
50442: 202e 0008 movel %fp@(8),%d0 <== NOT EXECUTED
50446: 4e5e unlk %fp <== NOT EXECUTED
...
0004f9d2 <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)
{
4f9d2: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED
4f9d6: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f9da: 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)
{
4f9de: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f9e2: 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);
4f9e6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f9ea: 240e movel %fp,%d2 <== NOT EXECUTED
4f9ec: 0682 ffff ffda addil #-38,%d2 <== NOT EXECUTED
4f9f2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f9f4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f9f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f9fa: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
4fa00: 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);
4fa04: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
4fa06: 6f0c bles 4fa14 <rtems_rfs_rtems_node_type+0x42> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
4fa08: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fa0e: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fa10: 2083 movel %d3,%a0@ <== NOT EXECUTED
4fa12: 6022 bras 4fa36 <rtems_rfs_rtems_node_type+0x64> <== NOT EXECUTED
}
type = rtems_rfs_rtems_node_type_by_inode (&inode);
4fa14: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fa16: 4eba fa52 jsr %pc@(4f46a <rtems_rfs_rtems_node_type_by_inode>)<== NOT EXECUTED
4fa1a: 2600 movel %d0,%d3 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
4fa1c: 2e82 movel %d2,%sp@ <== NOT EXECUTED
4fa1e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4fa20: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
4fa26: 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);
4fa28: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
4fa2a: 6f0c bles 4fa38 <rtems_rfs_rtems_node_type+0x66> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
4fa2c: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4fa32: 2040 moveal %d0,%a0 <== NOT EXECUTED
4fa34: 2082 movel %d2,%a0@ <== NOT EXECUTED
4fa36: 76ff moveq #-1,%d3 <== NOT EXECUTED
}
return type;
}
4fa38: 2003 movel %d3,%d0 <== NOT EXECUTED
4fa3a: 4cee 001c ffcc moveml %fp@(-52),%d2-%d4 <== NOT EXECUTED
4fa40: 4e5e unlk %fp <== NOT EXECUTED
0004f46a <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);
4f46a: 4280 clrl %d0 <== NOT EXECUTED
);
}
static rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type_by_inode (rtems_rfs_inode_handle* inode)
{
4f46c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
}
4f470: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4f474: 2068 000c moveal %a0@(12),%a0 <== NOT EXECUTED
4f478: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
4f47c: 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))
4f47e: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
4f484: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
4f48a: 6720 beqs 4f4ac <rtems_rfs_rtems_node_type_by_inode+0x42><== NOT EXECUTED
return RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
4f48c: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
4f492: 671c beqs 4f4b0 <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))
4f494: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
4f49a: 6604 bnes 4f4a0 <rtems_rfs_rtems_node_type_by_inode+0x36><== NOT EXECUTED
return RTEMS_FILESYSTEM_DEVICE;
4f49c: 7001 moveq #1,%d0 <== NOT EXECUTED
4f49e: 6012 bras 4f4b2 <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))
4f4a0: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
4f4a6: 67f4 beqs 4f49c <rtems_rfs_rtems_node_type_by_inode+0x32><== NOT EXECUTED
return RTEMS_FILESYSTEM_DEVICE;
else
return RTEMS_FILESYSTEM_MEMORY_FILE;
4f4a8: 7004 moveq #4,%d0 <== NOT EXECUTED
4f4aa: 6006 bras 4f4b2 <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;
4f4ac: 4280 clrl %d0 <== NOT EXECUTED
4f4ae: 6002 bras 4f4b2 <rtems_rfs_rtems_node_type_by_inode+0x48><== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
return RTEMS_FILESYSTEM_SYM_LINK;
4f4b0: 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;
}
4f4b2: 4e5e unlk %fp <== NOT EXECUTED
0004f682 <rtems_rfs_rtems_readlink>:
static ssize_t
rtems_rfs_rtems_readlink (const rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
4f682: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
4f686: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4f68a: 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);
4f68c: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f690: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f694: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f698: 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);
4f69c: 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);
4f6a0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f6a4: 4eb9 0005 a20c jsr 5a20c <rtems_rfs_symlink_read> <== NOT EXECUTED
if (rc)
4f6aa: 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);
4f6ae: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f6b0: 670e beqs 4f6c0 <rtems_rfs_rtems_readlink+0x3e> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("readlink: reading link", rc);
4f6b2: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f6b8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f6ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f6bc: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f6be: 6004 bras 4f6c4 <rtems_rfs_rtems_readlink+0x42> <== NOT EXECUTED
}
return (ssize_t) length;
4f6c0: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4f6c4: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
4f6c8: 4e5e unlk %fp <== NOT EXECUTED
0004f5ac <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)
{
4f5ac: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
4f5b0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
4f5b4: 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)
{
4f5b8: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
4f5bc: 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);
4f5c0: 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);
4f5c4: 2628 0008 movel %a0@(8),%d3 <== NOT EXECUTED
doff = rtems_rfs_rtems_get_pathloc_doff (old_loc);
4f5c8: 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);
4f5cc: 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);
4f5d0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f5d4: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
4f5d8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f5da: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f5de: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED
4f5e2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
4f5e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f5e8: 4eb9 0005 9a60 jsr 59a60 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
4f5ee: 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);
4f5f2: 2800 movel %d0,%d4 <== NOT EXECUTED
if (rc)
4f5f4: 670c beqs 4f602 <rtems_rfs_rtems_rename+0x56> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: linking", rc);
4f5f6: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f5fc: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f5fe: 2084 movel %d4,%a0@ <== NOT EXECUTED
4f600: 6024 bras 4f626 <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,
4f602: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
4f606: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4f608: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f60a: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f60c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f60e: 4eb9 0005 9c14 jsr 59c14 <rtems_rfs_unlink> <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
4f614: 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,
4f618: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
4f61a: 670e beqs 4f62a <rtems_rfs_rtems_rename+0x7e> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rename: unlinking", rc);
4f61c: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f622: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f624: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f626: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f628: 6002 bras 4f62c <rtems_rfs_rtems_rename+0x80> <== NOT EXECUTED
}
return 0;
4f62a: 4280 clrl %d0 <== NOT EXECUTED
}
4f62c: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED
4f632: 4e5e unlk %fp <== NOT EXECUTED
0004f636 <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)
{
4f636: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
4f63a: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
4f63e: 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);
4f640: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f644: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
4f648: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED
4f64c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f650: 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);
4f654: 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);
4f658: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
4f65c: 4eb9 0005 9c14 jsr 59c14 <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
4f662: 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);
4f666: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f668: 670e beqs 4f678 <rtems_rfs_rtems_rmnod+0x42> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
4f66a: 4eb9 0005 bd98 jsr 5bd98 <__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_rmnod+0x44> <== NOT EXECUTED
}
return 0;
4f678: 4280 clrl %d0 <== NOT EXECUTED
}
4f67a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4f67e: 4e5e unlk %fp <== NOT EXECUTED
000503a0 <rtems_rfs_rtems_set_handlers>:
503a0: 4280 clrl %d0 <== NOT EXECUTED
503a2: 4281 clrl %d1 <== NOT EXECUTED
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
503a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
503a8: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
503ac: 2269 000c moveal %a1@(12),%a1 <== NOT EXECUTED
503b0: 1029 0002 moveb %a1@(2),%d0 <== NOT EXECUTED
503b4: 1229 0003 moveb %a1@(3),%d1 <== NOT EXECUTED
503b8: e188 lsll #8,%d0 <== NOT EXECUTED
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
503ba: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
503be: 8081 orl %d1,%d0 <== NOT EXECUTED
uint16_t mode = rtems_rfs_inode_get_mode (inode);
loc->handlers = NULL;
503c0: 42a8 0010 clrl %a0@(16) <== NOT EXECUTED
503c4: 3200 movew %d0,%d1 <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
503c6: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
503cc: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
503d2: 6608 bnes 503dc <rtems_rfs_rtems_set_handlers+0x3c><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (dir);
503d4: 203c 0006 f562 movel #456034,%d0 <== NOT EXECUTED
503da: 6016 bras 503f2 <rtems_rfs_rtems_set_handlers+0x52><== NOT EXECUTED
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
503dc: 0c80 0000 2000 cmpil #8192,%d0 <== NOT EXECUTED
503e2: 6708 beqs 503ec <rtems_rfs_rtems_set_handlers+0x4c><== NOT EXECUTED
503e4: 0c80 0000 6000 cmpil #24576,%d0 <== NOT EXECUTED
503ea: 660e bnes 503fa <rtems_rfs_rtems_set_handlers+0x5a><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (device);
503ec: 203c 0006 f536 movel #455990,%d0 <== NOT EXECUTED
503f2: 2140 0010 movel %d0,%a0@(16) <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
return false;
}
return true;
503f6: 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);
503f8: 6034 bras 5042e <rtems_rfs_rtems_set_handlers+0x8e><== NOT EXECUTED
else if (RTEMS_RFS_S_ISLNK (mode))
503fa: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
50400: 6608 bnes 5040a <rtems_rfs_rtems_set_handlers+0x6a><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
50402: 203c 0006 d984 movel #448900,%d0 <== NOT EXECUTED
50408: 60e8 bras 503f2 <rtems_rfs_rtems_set_handlers+0x52><== NOT EXECUTED
else if (RTEMS_RFS_S_ISREG (mode))
5040a: 0c80 0000 8000 cmpil #32768,%d0 <== NOT EXECUTED
50410: 6608 bnes 5041a <rtems_rfs_rtems_set_handlers+0x7a><== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (file);
50412: 203c 0006 f58e movel #456078,%d0 <== NOT EXECUTED
50418: 60d8 bras 503f2 <rtems_rfs_rtems_set_handlers+0x52><== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
5041a: 3f01 movew %d1,%sp@- <== NOT EXECUTED
5041c: 4267 clrw %sp@- <== NOT EXECUTED
5041e: 4879 0006 d9b8 pea 6d9b8 <rtems_rfs_rtems_eval_config+0x8> <== NOT EXECUTED
50424: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
return false;
5042a: 508f addql #8,%sp <== NOT EXECUTED
5042c: 4200 clrb %d0 <== NOT EXECUTED
}
return true;
}
5042e: 4e5e unlk %fp <== NOT EXECUTED
0004fbf4 <rtems_rfs_rtems_shutdown>:
/**
* Shutdown the file system.
*/
void
rtems_rfs_rtems_shutdown (rtems_filesystem_mount_table_entry_t* mt_entry)
{
4fbf4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
4fbf8: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4fbfc: 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)
{
4fc00: 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);
4fc02: 2428 0080 movel %a0@(128),%d2 <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
4fc06: 2f08 movel %a0,%sp@- <== NOT EXECUTED
4fc08: 4eb9 0005 99ee jsr 599ee <rtems_rfs_fs_close> <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
4fc0e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4fc10: 4eb9 0005 a448 jsr 5a448 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
4fc16: 508f addql #8,%sp <== NOT EXECUTED
4fc18: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
4fc1c: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
4fc20: 4e5e unlk %fp <== NOT EXECUTED
/* FIXME: Return value? */
rtems_rfs_fs_close(fs);
rtems_rfs_mutex_destroy (&rtems->access);
free (rtems);
4fc22: 4ef9 0004 6348 jmp 46348 <free> <== NOT EXECUTED
0004f4ce <rtems_rfs_rtems_statvfs>:
* @return int
*/
static int
rtems_rfs_rtems_statvfs (const rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
4f4ce: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f4d2: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
4f4d6: 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)
{
4f4da: 2f0b movel %a3,%sp@- <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f4dc: 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)
{
4f4e0: 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);
4f4e2: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4f4e6: 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)
{
4f4ea: 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);
4f4ee: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4f4f0: 4eb9 0004 ea62 jsr 4ea62 <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
4f4f6: 24ab 0008 movel %a3@(8),%a2@ <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
4f4fa: 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;
4f4fe: 202b 0004 movel %a3@(4),%d0 <== NOT EXECUTED
4f502: 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);
4f506: 2568 0020 0004 movel %a0@(32),%a2@(4) <== NOT EXECUTED
sb->f_blocks = rtems_rfs_fs_media_blocks (fs);
4f50c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
4f510: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
4f514: 2540 001c movel %d0,%a2@(28) <== NOT EXECUTED
sb->f_files = rtems_rfs_fs_inodes (fs);
4f518: 202b 0014 movel %a3@(20),%d0 <== NOT EXECUTED
4f51c: 2540 0020 movel %d0,%a2@(32) <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
4f520: 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);
4f524: 2553 0030 movel %a3@,%a2@(48) <== NOT EXECUTED
sb->f_namemax = rtems_rfs_fs_max_name (fs);
4f528: 256b 001c 0034 movel %a3@(28),%a2@(52) <== NOT EXECUTED
return 0;
}
4f52e: 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;
4f532: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED
sb->f_favail = sb->f_ffree;
4f536: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
4f53a: 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);
4f540: 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;
4f544: 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;
}
4f548: 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);
4f54a: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
4f54e: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
4f552: 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;
}
4f556: 246e fff0 moveal %fp@(-16),%a2 <== NOT EXECUTED
4f55a: 4e5e unlk %fp <== NOT EXECUTED
0004f6cc <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)
{
4f6cc: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
4f6d0: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
4f6d4: 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)
{
4f6d8: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
4f6dc: 2629 0008 movel %a1@(8),%d3 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
4f6e0: 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)
{
4f6e4: 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);
4f6e8: 4eb9 0005 33d0 jsr 533d0 <getegid> <== NOT EXECUTED
4f6ee: 3a00 movew %d0,%d5 <== NOT EXECUTED
4f6f0: 4eb9 0005 33e4 jsr 533e4 <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),
4f6f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
geteuid(), getegid(), parent);
4f6f8: 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),
4f6fa: 4eb9 0005 df90 jsr 5df90 <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,
4f700: 2e86 movel %d6,%sp@ <== NOT EXECUTED
4f702: 3f05 movew %d5,%sp@- <== NOT EXECUTED
4f704: 4267 clrw %sp@- <== NOT EXECUTED
4f706: 3f04 movew %d4,%sp@- <== NOT EXECUTED
4f708: 4267 clrw %sp@- <== NOT EXECUTED
4f70a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4f70c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4f70e: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
4f712: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4f716: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4f718: 4eb9 0005 9f9e jsr 59f9e <rtems_rfs_symlink> <== NOT EXECUTED
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
4f71e: 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,
4f722: 2400 movel %d0,%d2 <== NOT EXECUTED
target, strlen (target),
geteuid(), getegid(), parent);
if (rc)
4f724: 670e beqs 4f734 <rtems_rfs_rtems_symlink+0x68> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("symlink: linking", rc);
4f726: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f72c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f72e: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f730: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f732: 6002 bras 4f736 <rtems_rfs_rtems_symlink+0x6a> <== NOT EXECUTED
}
return 0;
4f734: 4280 clrl %d0 <== NOT EXECUTED
}
4f736: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED
4f73c: 4e5e unlk %fp <== NOT EXECUTED
0005a568 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
5a568: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5a56c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
5a570: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
5a572: 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)
{
5a576: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
rtems_rfs_buffers_release (fs);
5a578: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a57a: 4eb9 0005 7286 jsr 57286 <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);
5a580: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
5a582: 4eb9 0004 a67c jsr 4a67c <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a588: 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);
5a58a: 2400 movel %d0,%d2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
5a58c: 672c beqs 5a5ba <rtems_rfs_rtems_unlock+0x52> <== NOT EXECUTED
{
#if RTEMS_RFS_TRACE
if (rtems_rfs_trace (RTEMS_RFS_TRACE_MUTEX))
5a58e: 4878 0004 pea 4 <CONTEXT_ARG> <== NOT EXECUTED
5a592: 42a7 clrl %sp@- <== NOT EXECUTED
5a594: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5a59a: 508f addql #8,%sp <== NOT EXECUTED
5a59c: 4a00 tstb %d0 <== NOT EXECUTED
5a59e: 671a beqs 5a5ba <rtems_rfs_rtems_unlock+0x52> <== NOT EXECUTED
printf ("rtems-rfs: mutex: release failed: %s\n",
5a5a0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a5a2: 4eb9 0004 614c jsr 4614c <rtems_status_text> <== NOT EXECUTED
5a5a8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a5aa: 4879 0006 d8af pea 6d8af <_CPU_m68k_BFFFO_table+0xc92> <== NOT EXECUTED
5a5b0: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a5b6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
5a5ba: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5a5be: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
5a5c2: 4e5e unlk %fp <== NOT EXECUTED
00050340 <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
)
{
50340: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
50344: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
50348: 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
)
{
5034c: 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);
5034e: 2468 0080 moveal %a0@(128),%a2 <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
50352: 2f08 movel %a0,%sp@- <== NOT EXECUTED
50354: 4eb9 0005 7286 jsr 57286 <rtems_rfs_buffers_release> <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
5035a: 2d52 0008 movel %a2@,%fp@(8) <== NOT EXECUTED
5035e: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_file_system* fs = mt_entry->fs_info;
rtems_rfs_rtems_unlock (fs);
}
50360: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
50364: 4e5e unlk %fp <== NOT EXECUTED
50366: 6000 fb6a braw 4fed2 <rtems_rfs_mutex_unlock.isra.19> <== NOT EXECUTED
0004f740 <rtems_rfs_rtems_utime>:
static int
rtems_rfs_rtems_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
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_utime(const rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
4f74c: 48d7 007c moveml %d2-%d6,%sp@ <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
4f750: 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);
4f754: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4f758: 2a0e movel %fp,%d5 <== NOT EXECUTED
4f75a: 0685 ffff ffda addil #-38,%d5 <== NOT EXECUTED
4f760: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f762: 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)
{
4f766: 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);
4f76a: 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)
{
4f76c: 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);
4f770: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
4f776: 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);
4f77a: 2c00 movel %d0,%d6 <== NOT EXECUTED
if (rc)
4f77c: 670c beqs 4f78a <rtems_rfs_rtems_utime+0x4a> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: read inode", rc);
4f77e: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f784: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f786: 2086 movel %d6,%a0@ <== NOT EXECUTED
4f788: 6062 bras 4f7ec <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);
4f78a: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
4f78e: 7218 moveq #24,%d1 <== NOT EXECUTED
4f790: 2003 movel %d3,%d0 <== NOT EXECUTED
4f792: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
4f794: 1140 0010 moveb %d0,%a0@(16) <== NOT EXECUTED
4f798: 2003 movel %d3,%d0 <== NOT EXECUTED
4f79a: 4240 clrw %d0 <== NOT EXECUTED
4f79c: 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);
4f79e: 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);
4f7a2: 1143 0013 moveb %d3,%a0@(19) <== NOT EXECUTED
4f7a6: 1140 0011 moveb %d0,%a0@(17) <== NOT EXECUTED
4f7aa: 2003 movel %d3,%d0 <== NOT EXECUTED
4f7ac: e088 lsrl #8,%d0 <== NOT EXECUTED
4f7ae: 1140 0012 moveb %d0,%a0@(18) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
4f7b2: 7001 moveq #1,%d0 <== NOT EXECUTED
4f7b4: 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);
4f7b8: 2002 movel %d2,%d0 <== NOT EXECUTED
4f7ba: e2a8 lsrl %d1,%d0 <== NOT EXECUTED
4f7bc: 1140 0014 moveb %d0,%a0@(20) <== NOT EXECUTED
4f7c0: 2002 movel %d2,%d0 <== NOT EXECUTED
4f7c2: 4240 clrw %d0 <== NOT EXECUTED
4f7c4: 4840 swap %d0 <== NOT EXECUTED
4f7c6: 1140 0015 moveb %d0,%a0@(21) <== NOT EXECUTED
4f7ca: 2002 movel %d2,%d0 <== NOT EXECUTED
4f7cc: e088 lsrl #8,%d0 <== NOT EXECUTED
4f7ce: 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);
4f7d2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4f7d4: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4f7d6: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
4f7dc: 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);
4f7de: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
4f7e0: 670e beqs 4f7f0 <rtems_rfs_rtems_utime+0xb0> <== NOT EXECUTED
{
return rtems_rfs_rtems_error ("utime: closing inode", rc);
4f7e2: 4eb9 0005 bd98 jsr 5bd98 <__errno> <== NOT EXECUTED
4f7e8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4f7ea: 2082 movel %d2,%a0@ <== NOT EXECUTED
4f7ec: 70ff moveq #-1,%d0 <== NOT EXECUTED
4f7ee: 6002 bras 4f7f2 <rtems_rfs_rtems_utime+0xb2> <== NOT EXECUTED
}
return 0;
4f7f0: 4280 clrl %d0 <== NOT EXECUTED
}
4f7f2: 4cee 007c ffc4 moveml %fp@(-60),%d2-%d6 <== NOT EXECUTED
4f7f8: 4e5e unlk %fp <== NOT EXECUTED
00056c28 <rtems_rfs_scan_chain>:
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
56c28: 4e56 ffe8 linkw %fp,#-24
56c2c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
56c30: 286e 0008 moveal %fp@(8),%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
56c34: 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))
56c38: 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)
{
56c3c: 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))
56c40: 42a7 clrl %sp@-
*/
static rtems_rfs_buffer*
rtems_rfs_scan_chain (rtems_chain_control* chain,
uint32_t* count,
rtems_rfs_buffer_block block)
{
56c42: 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))
56c46: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56c4c: 508f addql #8,%sp
56c4e: 4a00 tstb %d0
56c50: 677a beqs 56ccc <rtems_rfs_scan_chain+0xa4> <== ALWAYS TAKEN
printf ("rtems-rfs: buffer-scan: count=%" PRIu32 ", block=%" PRIu32 ": ", *count, block);
56c52: 2f02 movel %d2,%sp@- <== NOT EXECUTED
56c54: 2f13 movel %a3@,%sp@- <== NOT EXECUTED
56c56: 4879 0006 e12d pea 6e12d <CSWTCH.2+0x119> <== NOT EXECUTED
56c5c: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56c62: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
56c66: 6064 bras 56ccc <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))
56c68: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
56c6c: 42a7 clrl %sp@-
56c6e: 4e95 jsr %a5@
56c70: 508f addql #8,%sp
56c72: 4a00 tstb %d0
56c74: 6710 beqs 56c86 <rtems_rfs_scan_chain+0x5e> <== ALWAYS TAKEN
printf ("%" PRIuPTR " ", ((intptr_t) buffer->user));
56c76: 2f2a 0032 movel %a2@(50),%sp@- <== NOT EXECUTED
56c7a: 2043 moveal %d3,%a0 <== NOT EXECUTED
56c7c: 4879 0006 e15c pea 6e15c <CSWTCH.2+0x148> <== NOT EXECUTED
56c82: 4e90 jsr %a0@ <== NOT EXECUTED
56c84: 508f addql #8,%sp <== NOT EXECUTED
if (((rtems_rfs_buffer_block) ((intptr_t)(buffer->user))) == block)
56c86: b4aa 0032 cmpl %a2@(50),%d2
56c8a: 663a bnes 56cc6 <rtems_rfs_scan_chain+0x9e> <== ALWAYS TAKEN
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56c8c: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> <== NOT EXECUTED
56c90: 42a7 clrl %sp@- <== NOT EXECUTED
56c92: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
56c98: 508f addql #8,%sp <== NOT EXECUTED
56c9a: 4a00 tstb %d0 <== NOT EXECUTED
56c9c: 6712 beqs 56cb0 <rtems_rfs_scan_chain+0x88> <== NOT EXECUTED
printf (": found block=%" PRIuPTR "\n",
56c9e: 2f2a 0032 movel %a2@(50),%sp@- <== NOT EXECUTED
56ca2: 4879 0006 e161 pea 6e161 <CSWTCH.2+0x14d> <== NOT EXECUTED
56ca8: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
56cae: 508f addql #8,%sp <== NOT EXECUTED
((intptr_t)(buffer->user)));
(*count)--;
56cb0: 5393 subql #1,%a3@ <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
56cb2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
56cb4: 4eb9 0005 45f4 jsr 545f4 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract (node);
rtems_chain_set_off_chain (node);
return buffer;
56cba: 588f addql #4,%sp <== NOT EXECUTED
56cbc: 200a movel %a2,%d0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
56cbe: 42aa 0004 clrl %a2@(4) <== NOT EXECUTED
56cc2: 4292 clrl %a2@ <== NOT EXECUTED
56cc4: 6038 bras 56cfe <rtems_rfs_scan_chain+0xd6> <== NOT EXECUTED
true);
if ((rc > 0) && (rrc == 0))
rrc = rc;
return rrc;
}
56cc6: 246a 0004 moveal %a2@(4),%a2
56cca: 600c bras 56cd8 <rtems_rfs_scan_chain+0xb0>
56ccc: 4bf9 0005 044c lea 5044c <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));
56cd2: 263c 0005 cfac movel #380844,%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))
56cd8: b9ca cmpal %a2,%a4
56cda: 668c bnes 56c68 <rtems_rfs_scan_chain+0x40>
return buffer;
}
node = rtems_chain_previous (node);
}
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
56cdc: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
56ce0: 42a7 clrl %sp@-
56ce2: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace>
56ce8: 508f addql #8,%sp
56cea: 4a00 tstb %d0
56cec: 670e beqs 56cfc <rtems_rfs_scan_chain+0xd4> <== ALWAYS TAKEN
printf (": not found\n");
56cee: 4879 0006 e174 pea 6e174 <CSWTCH.2+0x160> <== NOT EXECUTED
56cf4: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
56cfa: 588f addql #4,%sp <== NOT EXECUTED
return NULL;
56cfc: 4280 clrl %d0
}
56cfe: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
56d04: 4e5e unlk %fp <== NOT EXECUTED
0005582c <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,
5582c: 4e56 ffb8 linkw %fp,#-72
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
55830: 206e 0010 moveal %fp@(16),%a0
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55834: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
55838: 4210 clrb %a0@
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5583a: 246e 0008 moveal %fp@(8),%a2
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
5583e: 486e fffc pea %fp@(-4)
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55842: 242e 0014 movel %fp@(20),%d2
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
55846: 2f0a movel %a2,%sp@-
55848: 4eba ff96 jsr %pc@(557e0 <rtems_rfs_bitmap_load_map>)
if (rc > 0)
5584c: 508f addql #8,%sp
5584e: 4a80 tstl %d0
55850: 6e00 016c bgtw 559be <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;
55854: 206e 000c moveal %fp@(12),%a0
end_bit = test_bit + (window * direction);
55858: 2002 movel %d2,%d0
5585a: 720b moveq #11,%d1
5585c: e3a8 lsll %d1,%d0
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
5585e: 2c10 movel %a0@,%d6
end_bit = test_bit + (window * direction);
55860: d086 addl %d6,%d0
if (end_bit < 0)
55862: 6b0e bmis 55872 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x46><== NEVER TAKEN
end_bit = 0;
else if (end_bit >= control->size)
55864: 222a 000c movel %a2@(12),%d1
55868: b280 cmpl %d0,%d1
5586a: 6208 bhis 55874 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x48><== NEVER TAKEN
end_bit = control->size - 1;
5586c: 2001 movel %d1,%d0
5586e: 5380 subql #1,%d0
55870: 6002 bras 55874 <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;
55872: 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);
55874: 2606 movel %d6,%d3
55876: 780a moveq #10,%d4
55878: 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);
5587a: 2206 movel %d6,%d1
5587c: ea81 asrl #5,%d1
map_offset = rtems_rfs_bitmap_map_offset (test_bit);
5587e: 7e1f moveq #31,%d7
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
55880: 7a1f moveq #31,%d5
search_bits = &control->search_bits[search_index];
55882: e58b lsll #2,%d3
55884: 266a 0014 moveal %a2@(20),%a3
55888: d7c3 addal %d3,%a3
map_bits = &map[map_index];
5588a: 2601 movel %d1,%d3
5588c: e58b lsll #2,%d3
5588e: 206e fffc moveal %fp@(-4),%a0
55892: d1c3 addal %d3,%a0
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
55894: 2602 movel %d2,%d3
55896: 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);
55898: ce86 andl %d6,%d7
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
5589a: ca81 andl %d1,%d5
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
5589c: 2843 moveal %d3,%a4
5589e: 4a82 tstl %d2
558a0: 6f04 bles 558a6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x7a><== NEVER TAKEN
558a2: 4283 clrl %d3
558a4: 6002 bras 558a8 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x7c>
558a6: 761f moveq #31,%d3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
558a8: 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);
558aa: 3a7c 0001 moveaw #1,%a5
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
558ae: eb8c lsll #5,%d4
558b0: 2d44 fff4 movel %d4,%fp@(-12)
558b4: 6006 bras 558bc <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;
558b6: 7a1f moveq #31,%d5 <== NOT EXECUTED
558b8: 6002 bras 558bc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x90><== NOT EXECUTED
558ba: 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))
558bc: 2d53 fff8 movel %a3@,%fp@(-8)
558c0: 6700 00b4 beqw 55976 <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,
558c4: 2801 movel %d1,%d4
558c6: d882 addl %d2,%d4
558c8: 9a81 subl %d1,%d5
558ca: eb8c lsll #5,%d4
558cc: 2d45 ffe8 movel %d5,%fp@(-24)
558d0: d883 addl %d3,%d4
558d2: 2d44 ffe0 movel %d4,%fp@(-32)
558d6: 6000 008e braw 55966 <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);
558da: 2809 movel %a1,%d4
558dc: 2a0d movel %a5,%d5
558de: e9ad lsll %d4,%d5
558e0: 282e fff8 movel %fp@(-8),%d4
558e4: c885 andl %d5,%d4
558e6: 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))
558ea: 4a84 tstl %d4
558ec: 6754 beqs 55942 <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,
558ee: 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))
558f0: 2246 moveal %d6,%a1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
558f2: 2d47 ffec movel %d7,%fp@(-20)
558f6: 603e bras 55936 <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);
558f8: 2a0d movel %a5,%d5
558fa: 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))
558fc: 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);
558fe: 2e05 movel %d5,%d7
55900: 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))
55902: 672c beqs 55930 <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);
55904: 4687 notl %d7
55906: 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);
55908: 2087 movel %d7,%a0@
if (rtems_rfs_bitmap_match(*map_bits,
5590a: 6608 bnes 55914 <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);
5590c: 2a2e ffe4 movel %fp@(-28),%d5 <== NOT EXECUTED
55910: 4685 notl %d5 <== NOT EXECUTED
55912: 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--;
55914: 53aa 0010 subql #1,%a2@(16)
*bit = test_bit;
55918: 206e 000c moveal %fp@(12),%a0
5591c: 2089 movel %a1,%a0@
*found = true;
5591e: 206e 0010 moveal %fp@(16),%a0
55922: 10bc 0001 moveb #1,%a0@
rtems_rfs_buffer_mark_dirty (control->buffer);
55926: 2052 moveal %a2@,%a0
55928: 10bc 0001 moveb #1,%a0@
5592c: 6000 008e braw 559bc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x190>
return 0;
}
if (test_bit == end_bit)
55930: b089 cmpl %a1,%d0
55932: 670e beqs 55942 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x116><== NEVER TAKEN
break;
map_offset += direction;
test_bit += direction;
55934: d3c2 addal %d2,%a1
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55936: 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)
5593a: 781f moveq #31,%d4
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5593c: 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)
5593e: b887 cmpl %d7,%d4
55940: 64b6 bccs 558f8 <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;
55942: 2c2e ffe0 movel %fp@(-32),%d6 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
55946: d1cc addal %a4,%a0 <== NOT EXECUTED
map_index += direction;
55948: 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))
5594a: 4a82 tstl %d2 <== NOT EXECUTED
5594c: 6c06 bges 55954 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x128><== NOT EXECUTED
5594e: b086 cmpl %d6,%d0 <== NOT EXECUTED
55950: 6d0a blts 5595c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x130><== NOT EXECUTED
55952: 6050 bras 559a4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x178><== NOT EXECUTED
|| ((direction > 0) && (test_bit >= end_bit)))
55954: 4a82 tstl %d2 <== NOT EXECUTED
55956: 6704 beqs 5595c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x130><== NOT EXECUTED
55958: b086 cmpl %d6,%d0 <== NOT EXECUTED
5595a: 6f48 bles 559a4 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x178><== NOT EXECUTED
5595c: 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))
55960: 2e03 movel %d3,%d7 <== NOT EXECUTED
55962: dbae ffe0 addl %d5,%fp@(-32) <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
55966: 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)
5596a: 781f moveq #31,%d4
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
5596c: 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)
5596e: b889 cmpl %a1,%d4
55970: 6400 ff68 bccw 558da <rtems_rfs_search_map_for_clear_bit.constprop.1+0xae>
55974: 6030 bras 559a6 <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);
55976: 78e0 moveq #-32,%d4 <== NOT EXECUTED
55978: cc84 andl %d4,%d6 <== NOT EXECUTED
if (direction > 0)
5597a: 4a82 tstl %d2 <== NOT EXECUTED
5597c: 6f0e bles 5598c <rtems_rfs_search_map_for_clear_bit.constprop.1+0x160><== NOT EXECUTED
{
bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset;
5597e: 7820 moveq #32,%d4 <== NOT EXECUTED
55980: 9885 subl %d5,%d4 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
55982: 2a04 movel %d4,%d5 <== NOT EXECUTED
map_offset = 0;
55984: 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 ();
55986: eb8d lsll #5,%d5 <== NOT EXECUTED
55988: dc85 addl %d5,%d6 <== NOT EXECUTED
5598a: 600c bras 55998 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x16c><== NOT EXECUTED
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
5598c: 2805 movel %d5,%d4 <== NOT EXECUTED
5598e: 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;
55990: 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;
55992: eb8d lsll #5,%d5 <== NOT EXECUTED
55994: 4685 notl %d5 <== NOT EXECUTED
55996: dc85 addl %d5,%d6 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
55998: 4c02 4800 mulsl %d2,%d4 <== NOT EXECUTED
map_index += direction * bits_skipped;
5599c: 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;
5599e: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED
559a2: 6002 bras 559a6 <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;
559a4: 2e03 movel %d3,%d7 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
559a6: d7cc addal %a4,%a3 <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
559a8: 4a82 tstl %d2 <== NOT EXECUTED
559aa: 6e0a bgts 559b6 <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)));
559ac: 670e beqs 559bc <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))
559ae: b086 cmpl %d6,%d0 <== NOT EXECUTED
559b0: 6f00 ff04 blew 558b6 <rtems_rfs_search_map_for_clear_bit.constprop.1+0x8a><== NOT EXECUTED
559b4: 6006 bras 559bc <rtems_rfs_search_map_for_clear_bit.constprop.1+0x190><== NOT EXECUTED
|| ((direction > 0) && (test_bit <= end_bit)));
559b6: b086 cmpl %d6,%d0 <== NOT EXECUTED
559b8: 6c00 ff00 bgew 558ba <rtems_rfs_search_map_for_clear_bit.constprop.1+0x8e><== NOT EXECUTED
return 0;
559bc: 4280 clrl %d0
}
559be: 4cee 3cfc ffb8 moveml %fp@(-72),%d2-%d7/%a2-%a5
559c4: 4e5e unlk %fp <== NOT EXECUTED
00059f9e <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
59f9e: 4e56 ff58 linkw %fp,#-168 <== NOT EXECUTED
59fa2: 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))
59fa6: 42a7 clrl %sp@- <== NOT EXECUTED
59fa8: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
59fac: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
59fb0: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
59fb4: 2c2e 0014 movel %fp@(20),%d6 <== NOT EXECUTED
59fb8: 262e 0018 movel %fp@(24),%d3 <== NOT EXECUTED
59fbc: 282e 0024 movel %fp@(36),%d4 <== NOT EXECUTED
59fc0: 3a2e 001e movew %fp@(30),%d5 <== NOT EXECUTED
59fc4: 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))
59fc8: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59fce: 508f addql #8,%sp <== NOT EXECUTED
59fd0: 4a00 tstb %d0 <== NOT EXECUTED
59fd2: 660a bnes 59fde <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))
59fd4: b6aa 0008 cmpl %a2@(8),%d3 <== NOT EXECUTED
59fd8: 6400 0224 bccw 5a1fe <rtems_rfs_symlink+0x260> <== NOT EXECUTED
59fdc: 605a bras 5a038 <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);
59fde: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59fe0: 4879 0006 f4a0 pea 6f4a0 <CSWTCH.2+0x148c> <== NOT EXECUTED
for (c = 0; c < length; c++)
59fe6: 2642 moveal %d2,%a3 <== NOT EXECUTED
printf ("%c", name[c]);
59fe8: 49f9 0005 d13c lea 5d13c <putchar>,%a4 <== NOT EXECUTED
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK))
{
int c;
printf ("rtems-rfs: symlink: parent:%" PRIu32 " name:", parent);
59fee: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
for (c = 0; c < length; c++)
59ff4: 508f addql #8,%sp <== NOT EXECUTED
59ff6: 600a bras 5a002 <rtems_rfs_symlink+0x64> <== NOT EXECUTED
printf ("%c", name[c]);
59ff8: 101b moveb %a3@+,%d0 <== NOT EXECUTED
59ffa: 49c0 extbl %d0 <== NOT EXECUTED
59ffc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59ffe: 4e94 jsr %a4@ <== NOT EXECUTED
5a000: 588f addql #4,%sp <== NOT EXECUTED
return rc;
}
int
rtems_rfs_symlink (rtems_rfs_file_system* fs,
5a002: 200b movel %a3,%d0 <== NOT EXECUTED
5a004: 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++)
5a006: b0ae 0010 cmpl %fp@(16),%d0 <== NOT EXECUTED
5a00a: 6dec blts 59ff8 <rtems_rfs_symlink+0x5a> <== NOT EXECUTED
printf ("%c", name[c]);
printf (" link:");
5a00c: 4879 0006 f4c5 pea 6f4c5 <CSWTCH.2+0x14b1> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
5a012: 2646 moveal %d6,%a3 <== NOT EXECUTED
printf ("%c", link[c]);
5a014: 49f9 0005 d13c lea 5d13c <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:");
5a01a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
for (c = 0; c < link_length; c++)
5a020: 588f addql #4,%sp <== NOT EXECUTED
5a022: 600a bras 5a02e <rtems_rfs_symlink+0x90> <== NOT EXECUTED
printf ("%c", link[c]);
5a024: 101b moveb %a3@+,%d0 <== NOT EXECUTED
5a026: 49c0 extbl %d0 <== NOT EXECUTED
5a028: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a02a: 4e94 jsr %a4@ <== NOT EXECUTED
5a02c: 588f addql #4,%sp <== NOT EXECUTED
return rc;
}
int
rtems_rfs_symlink (rtems_rfs_file_system* fs,
5a02e: 200b movel %a3,%d0 <== NOT EXECUTED
5a030: 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++)
5a032: b680 cmpl %d0,%d3 <== NOT EXECUTED
5a034: 6eee bgts 5a024 <rtems_rfs_symlink+0x86> <== NOT EXECUTED
5a036: 609c bras 59fd4 <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),
5a038: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a03a: 4eb9 0005 df90 jsr 5df90 <strlen> <== NOT EXECUTED
5a040: 588f addql #4,%sp <== NOT EXECUTED
5a042: 486e ff7e pea %fp@(-130) <== NOT EXECUTED
5a046: 3f07 movew %d7,%sp@- <== NOT EXECUTED
5a048: 4267 clrw %sp@- <== NOT EXECUTED
5a04a: 3f05 movew %d5,%sp@- <== NOT EXECUTED
5a04c: 4267 clrw %sp@- <== NOT EXECUTED
5a04e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a052: 2f3c 0000 a1ff movel #41471,%sp@- <== NOT EXECUTED
5a058: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5a05a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a05c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a05e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a060: 4eb9 0004 f092 jsr 4f092 <rtems_rfs_inode_create> <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
5a066: 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),
5a06a: 2400 movel %d0,%d2 <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
5a06c: 6e00 0192 bgtw 5a200 <rtems_rfs_symlink+0x262> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
5a070: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a074: 280e movel %fp,%d4 <== NOT EXECUTED
5a076: 0684 ffff ff90 addil #-112,%d4 <== NOT EXECUTED
5a07c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a07e: 2f2e ff7e movel %fp@(-130),%sp@- <== NOT EXECUTED
5a082: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a084: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
5a08a: 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);
5a08e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a090: 6e00 016e bgtw 5a200 <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)
5a094: 7013 moveq #19,%d0 <== NOT EXECUTED
5a096: b083 cmpl %d3,%d0 <== NOT EXECUTED
5a098: 6554 bcss 5a0ee <rtems_rfs_symlink+0x150> <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
5a09a: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
5a09e: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5a0a2: 41e8 001c lea %a0@(28),%a0 <== NOT EXECUTED
5a0a6: 42a7 clrl %sp@- <== NOT EXECUTED
5a0a8: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a0aa: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
memcpy (inode.node->data.name, link, link_length);
5a0b0: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5a0b4: 41e8 001c lea %a0@(28),%a0 <== NOT EXECUTED
5a0b8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a0ba: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5a0bc: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5a0be: 4eb9 0005 ccf8 jsr 5ccf8 <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);
5a0c4: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5a0c8: 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);
5a0cc: 4200 clrb %d0 <== NOT EXECUTED
5a0ce: 1140 000c moveb %d0,%a0@(12) <== NOT EXECUTED
5a0d2: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5a0d6: 1140 000d moveb %d0,%a0@(13) <== NOT EXECUTED
5a0da: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5a0de: 1140 000e moveb %d0,%a0@(14) <== NOT EXECUTED
5a0e2: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5a0e6: 1140 000f moveb %d0,%a0@(15) <== NOT EXECUTED
5a0ea: 6000 00e0 braw 5a1cc <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);
5a0ee: 2a0e movel %fp,%d5 <== NOT EXECUTED
5a0f0: 0685 ffff ffb6 addil #-74,%d5 <== NOT EXECUTED
5a0f6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a0f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a0fa: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a0fc: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5a102: 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);
5a106: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a108: 6f04 bles 5a10e <rtems_rfs_symlink+0x170> <== NOT EXECUTED
5a10a: 6000 00b4 braw 5a1c0 <rtems_rfs_symlink+0x222> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
5a10e: 486e ff82 pea %fp@(-126) <== NOT EXECUTED
5a112: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a116: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a118: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a11a: 4eb9 0005 6646 jsr 56646 <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
5a120: 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);
5a124: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a126: 6f02 bles 5a12a <rtems_rfs_symlink+0x18c> <== NOT EXECUTED
5a128: 602a bras 5a154 <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);
5a12a: 42a7 clrl %sp@- <== NOT EXECUTED
5a12c: 2f2e ff82 movel %fp@(-126),%sp@- <== NOT EXECUTED
5a130: 47ee ff86 lea %fp@(-122),%a3 <== NOT EXECUTED
5a134: 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;
5a136: 4200 clrb %d0 <== NOT EXECUTED
5a138: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a13a: 1d40 ff86 moveb %d0,%fp@(-122) <== NOT EXECUTED
handle->bnum = 0;
5a13e: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
5a142: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
5a146: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
5a14c: 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);
5a150: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a152: 6f1c bles 5a170 <rtems_rfs_symlink+0x1d2> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
5a154: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a156: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a158: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5a15e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a160: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a162: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a168: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5a16c: 6000 0092 braw 5a200 <rtems_rfs_symlink+0x262> <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
5a170: 206e ff8c moveal %fp@(-116),%a0 <== NOT EXECUTED
5a174: 2428 001a movel %a0@(26),%d2 <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
5a178: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
5a17c: 4878 00ff pea ff <DBL_MANT_DIG+0xca> <== NOT EXECUTED
5a180: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a182: 4eb9 0005 ce5c jsr 5ce5c <memset> <== NOT EXECUTED
memcpy (data, link, link_length);
5a188: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a18a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5a18c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a18e: 4eb9 0005 ccf8 jsr 5ccf8 <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);
5a194: 2f0b movel %a3,%sp@- <== NOT EXECUTED
5a196: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a198: 4eb9 0005 6d08 jsr 56d08 <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);
5a19e: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
5a1a2: 2e85 movel %d5,%sp@ <== NOT EXECUTED
handle->dirty = false;
5a1a4: 4200 clrb %d0 <== NOT EXECUTED
5a1a6: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a1a8: 1d40 ff86 moveb %d0,%fp@(-122) <== NOT EXECUTED
handle->bnum = 0;
5a1ac: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
5a1b0: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
5a1b4: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
5a1ba: 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);
5a1bc: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
5a1be: 6f0c bles 5a1cc <rtems_rfs_symlink+0x22e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
5a1c0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a1c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a1c4: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a1ca: 602e bras 5a1fa <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);
5a1cc: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
return rc;
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
5a1d0: 0283 0000 ffff andil #65535,%d3 <== NOT EXECUTED
5a1d6: 2003 movel %d3,%d0 <== NOT EXECUTED
5a1d8: e088 lsrl #8,%d0 <== NOT EXECUTED
5a1da: 1140 000a moveb %d0,%a0@(10) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5a1de: 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);
5a1e0: 206e ff9c moveal %fp@(-100),%a0 <== NOT EXECUTED
5a1e4: 1143 000b moveb %d3,%a0@(11) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
5a1e8: 1d40 ffa0 moveb %d0,%fp@(-96) <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
5a1ec: 486e ff90 pea %fp@(-112) <== NOT EXECUTED
5a1f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5a1f2: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a1f8: 2400 movel %d0,%d2 <== NOT EXECUTED
5a1fa: 508f addql #8,%sp <== NOT EXECUTED
5a1fc: 6002 bras 5a200 <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;
5a1fe: 745b moveq #91,%d2 <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (&inode, link_length);
rc = rtems_rfs_inode_close (fs, &inode);
return rc;
}
5a200: 2002 movel %d2,%d0 <== NOT EXECUTED
5a202: 4cee 1cfc ff58 moveml %fp@(-168),%d2-%d7/%a2-%a4 <== NOT EXECUTED
5a208: 4e5e unlk %fp <== NOT EXECUTED
0005a20c <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)
{
5a20c: 4e56 ff64 linkw %fp,#-156 <== NOT EXECUTED
5a210: 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))
5a214: 42a7 clrl %sp@- <== NOT EXECUTED
5a216: 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)
{
5a21a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
5a21e: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
5a222: 2c2e 0010 movel %fp@(16),%d6 <== NOT EXECUTED
5a226: 282e 0014 movel %fp@(20),%d4 <== NOT EXECUTED
5a22a: 246e 0018 moveal %fp@(24),%a2 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
int rc;
if (rtems_rfs_trace (RTEMS_RFS_TRACE_SYMLINK_READ))
5a22e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
5a234: 508f addql #8,%sp <== NOT EXECUTED
5a236: 4a00 tstb %d0 <== NOT EXECUTED
5a238: 6710 beqs 5a24a <rtems_rfs_symlink_read+0x3e> <== NOT EXECUTED
printf ("rtems-rfs: symlink-read: link:%" PRIu32 "\n", link);
5a23a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a23c: 4879 0006 f4cc pea 6f4cc <CSWTCH.2+0x14b8> <== NOT EXECUTED
5a242: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
5a248: 508f addql #8,%sp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, link, &inode, true);
5a24a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
5a24e: 2a0e movel %fp,%d5 <== NOT EXECUTED
5a250: 0685 ffff ff90 addil #-112,%d5 <== NOT EXECUTED
5a256: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a258: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5a25a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a25c: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
5a262: 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);
5a266: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc)
5a268: 6600 016c bnew 5a3d6 <rtems_rfs_symlink_read+0x1ca> <== NOT EXECUTED
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
5a26c: 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);
5a270: 4280 clrl %d0 <== NOT EXECUTED
5a272: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
5a276: e188 lsll #8,%d0 <== NOT EXECUTED
5a278: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
5a27e: 0c80 0000 a000 cmpil #40960,%d0 <== NOT EXECUTED
5a284: 6714 beqs 5a29a <rtems_rfs_symlink_read+0x8e> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
5a286: 2f05 movel %d5,%sp@- <== NOT EXECUTED
return EINVAL;
5a288: 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);
5a28c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a28e: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a294: 508f addql #8,%sp <== NOT EXECUTED
5a296: 6000 013e braw 5a3d6 <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);
5a29a: 4280 clrl %d0 <== NOT EXECUTED
5a29c: 1028 000a moveb %a0@(10),%d0 <== NOT EXECUTED
5a2a0: 4281 clrl %d1 <== NOT EXECUTED
5a2a2: 1228 000b moveb %a0@(11),%d1 <== NOT EXECUTED
5a2a6: e188 lsll #8,%d0 <== NOT EXECUTED
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
5a2a8: 8081 orl %d1,%d0 <== NOT EXECUTED
if (size < *length)
5a2aa: b084 cmpl %d4,%d0 <== NOT EXECUTED
5a2ac: 6204 bhis 5a2b2 <rtems_rfs_symlink_read+0xa6> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
5a2ae: 2480 movel %d0,%a2@ <== NOT EXECUTED
5a2b0: 6002 bras 5a2b4 <rtems_rfs_symlink_read+0xa8> <== NOT EXECUTED
if (size < *length)
{
*length = size;
5a2b2: 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);
5a2b4: 4280 clrl %d0 <== NOT EXECUTED
5a2b6: 1028 000c moveb %a0@(12),%d0 <== NOT EXECUTED
5a2ba: 7218 moveq #24,%d1 <== NOT EXECUTED
5a2bc: e3a8 lsll %d1,%d0 <== NOT EXECUTED
5a2be: 4281 clrl %d1 <== NOT EXECUTED
5a2c0: 1228 000d moveb %a0@(13),%d1 <== NOT EXECUTED
5a2c4: 4841 swap %d1 <== NOT EXECUTED
5a2c6: 4241 clrw %d1 <== NOT EXECUTED
5a2c8: 8081 orl %d1,%d0 <== NOT EXECUTED
5a2ca: 4281 clrl %d1 <== NOT EXECUTED
5a2cc: 1228 000f moveb %a0@(15),%d1 <== NOT EXECUTED
5a2d0: 8081 orl %d1,%d0 <== NOT EXECUTED
5a2d2: 1228 000e moveb %a0@(14),%d1 <== NOT EXECUTED
5a2d6: e189 lsll #8,%d1 <== NOT EXECUTED
5a2d8: 8081 orl %d1,%d0 <== NOT EXECUTED
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
5a2da: 6616 bnes 5a2f2 <rtems_rfs_symlink_read+0xe6> <== NOT EXECUTED
{
memcpy (path, inode.node->data.name, *length);
5a2dc: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
5a2de: 4868 001c pea %a0@(28) <== NOT EXECUTED
5a2e2: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5a2e4: 4eb9 0005 ccf8 jsr 5ccf8 <memcpy> <== NOT EXECUTED
5a2ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5a2ee: 6000 00d6 braw 5a3c6 <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);
5a2f2: 2a0e movel %fp,%d5 <== NOT EXECUTED
5a2f4: 0685 ffff ffb6 addil #-74,%d5 <== NOT EXECUTED
5a2fa: 280e movel %fp,%d4 <== NOT EXECUTED
5a2fc: 0684 ffff ff90 addil #-112,%d4 <== NOT EXECUTED
5a302: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a304: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a306: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a308: 4eb9 0005 6168 jsr 56168 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
5a30e: 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);
5a312: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
5a314: 6f04 bles 5a31a <rtems_rfs_symlink_read+0x10e> <== NOT EXECUTED
5a316: 6000 00a2 braw 5a3ba <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);
5a31a: 486e ff82 pea %fp@(-126) <== NOT EXECUTED
5a31e: 42a7 clrl %sp@- <== NOT EXECUTED
5a320: 42a7 clrl %sp@- <== NOT EXECUTED
5a322: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a324: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a326: 4eb9 0005 6596 jsr 56596 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
5a32c: 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);
5a330: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
5a332: 6f02 bles 5a336 <rtems_rfs_symlink_read+0x12a> <== NOT EXECUTED
5a334: 602e bras 5a364 <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);
5a336: 42a7 clrl %sp@- <== NOT EXECUTED
5a338: 2f2e ff82 movel %fp@(-126),%sp@- <== NOT EXECUTED
5a33c: 2e0e movel %fp,%d7 <== NOT EXECUTED
5a33e: 0687 ffff ff86 addil #-122,%d7 <== NOT EXECUTED
5a344: 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;
5a346: 4200 clrb %d0 <== NOT EXECUTED
5a348: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a34a: 1d40 ff86 moveb %d0,%fp@(-122) <== NOT EXECUTED
handle->bnum = 0;
5a34e: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
5a352: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
5a356: 4eb9 0005 6e84 jsr 56e84 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
5a35c: 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);
5a360: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
5a362: 6f1a bles 5a37e <rtems_rfs_symlink_read+0x172> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
5a364: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a366: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a368: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
5a36e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a370: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a372: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a378: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
5a37c: 6058 bras 5a3d6 <rtems_rfs_symlink_read+0x1ca> <== NOT EXECUTED
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
5a37e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
5a380: 206e ff8c moveal %fp@(-116),%a0 <== NOT EXECUTED
5a384: 2f28 001a movel %a0@(26),%sp@- <== NOT EXECUTED
5a388: 2f06 movel %d6,%sp@- <== NOT EXECUTED
5a38a: 4eb9 0005 ccf8 jsr 5ccf8 <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);
5a390: 2f07 movel %d7,%sp@- <== NOT EXECUTED
5a392: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a394: 4eb9 0005 6d08 jsr 56d08 <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
5a39a: 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);
5a39c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5a39e: 1d41 ff86 moveb %d1,%fp@(-122) <== NOT EXECUTED
5a3a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
handle->bnum = 0;
5a3a4: 42ae ff88 clrl %fp@(-120) <== NOT EXECUTED
handle->buffer = NULL;
5a3a8: 42ae ff8c clrl %fp@(-116) <== NOT EXECUTED
5a3ac: 4eb9 0005 62ea jsr 562ea <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
5a3b2: 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);
5a3b6: 2600 movel %d0,%d3 <== NOT EXECUTED
if (rc > 0)
5a3b8: 6f0c bles 5a3c6 <rtems_rfs_symlink_read+0x1ba> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
5a3ba: 2f04 movel %d4,%sp@- <== NOT EXECUTED
5a3bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a3be: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a3c4: 600e bras 5a3d4 <rtems_rfs_symlink_read+0x1c8> <== NOT EXECUTED
return rc;
}
}
rc = rtems_rfs_inode_close (fs, &inode);
5a3c6: 486e ff90 pea %fp@(-112) <== NOT EXECUTED
5a3ca: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5a3cc: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
5a3d2: 2600 movel %d0,%d3 <== NOT EXECUTED
5a3d4: 508f addql #8,%sp <== NOT EXECUTED
return rc;
}
5a3d6: 2003 movel %d3,%d0 <== NOT EXECUTED
5a3d8: 4cee 04fc ff64 moveml %fp@(-156),%d2-%d7/%a2 <== NOT EXECUTED
5a3de: 4e5e unlk %fp <== NOT EXECUTED
...
0005049e <rtems_rfs_trace_clear_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
5049e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
504a2: 2239 0008 1088 movel 81088 <rtems_rfs_trace_flags+0x4>,%d1 <== NOT EXECUTED
return state;
}
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
504a8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
504aa: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
504ae: 4683 notl %d3 <== NOT EXECUTED
return state;
}
rtems_rfs_trace_mask
rtems_rfs_trace_clear_mask (rtems_rfs_trace_mask mask)
{
504b0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags &= ~mask;
504b2: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
504b6: 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;
504b8: 2039 0008 1084 movel 81084 <rtems_rfs_trace_flags>,%d0 <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
504be: c481 andl %d1,%d2 <== NOT EXECUTED
504c0: c680 andl %d0,%d3 <== NOT EXECUTED
504c2: 23c2 0008 1088 movel %d2,81088 <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
return state;
}
504c8: 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;
504ca: 23c3 0008 1084 movel %d3,81084 <rtems_rfs_trace_flags> <== NOT EXECUTED
return state;
}
504d0: 261f movel %sp@+,%d3 <== NOT EXECUTED
504d2: 4e5e unlk %fp <== NOT EXECUTED
0005046e <rtems_rfs_trace_set_mask>:
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
5046e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
50472: 2039 0008 1084 movel 81084 <rtems_rfs_trace_flags>,%d0 <== NOT EXECUTED
return result;
}
rtems_rfs_trace_mask
rtems_rfs_trace_set_mask (rtems_rfs_trace_mask mask)
{
50478: 2f02 movel %d2,%sp@- <== NOT EXECUTED
rtems_rfs_trace_mask state = rtems_rfs_trace_flags;
rtems_rfs_trace_flags |= mask;
5047a: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
5047e: 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;
50480: 2239 0008 1088 movel 81088 <rtems_rfs_trace_flags+0x4>,%d1 <== NOT EXECUTED
rtems_rfs_trace_flags |= mask;
50486: 23c2 0008 1084 movel %d2,81084 <rtems_rfs_trace_flags> <== NOT EXECUTED
5048c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
50490: 8481 orl %d1,%d2 <== NOT EXECUTED
50492: 23c2 0008 1088 movel %d2,81088 <rtems_rfs_trace_flags+0x4> <== NOT EXECUTED
return state;
}
50498: 241f movel %sp@+,%d2 <== NOT EXECUTED
5049a: 4e5e unlk %fp <== NOT EXECUTED
000504d6 <rtems_rfs_trace_shell_command>:
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
504d6: 4e56 ff30 linkw %fp,#-208 <== NOT EXECUTED
504da: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
const char* table[] =
504de: 4878 009c pea 9c <DBL_MANT_DIG+0x67> <== NOT EXECUTED
504e2: 45ee ff64 lea %fp@(-156),%a2 <== NOT EXECUTED
504e6: 4879 0006 dc22 pea 6dc22 <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++)
504ec: 7e01 moveq #1,%d7 <== NOT EXECUTED
return 1;
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
504ee: 47f9 0005 d974 lea 5d974 <strcmp>,%a3 <== NOT EXECUTED
504f4: 4bf9 0006 9058 lea 69058 <__ashldi3>,%a5 <== NOT EXECUTED
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
const char* table[] =
504fa: 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;
504fc: 7c01 moveq #1,%d6 <== NOT EXECUTED
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
{
const char* table[] =
504fe: 4eb9 0005 ccf8 jsr 5ccf8 <memcpy> <== NOT EXECUTED
rtems_rfs_trace_flags &= ~mask;
return state;
}
int
rtems_rfs_trace_shell_command (int argc, char *argv[])
50504: 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++)
50508: 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[])
5050c: 588c addql #4,%a4 <== NOT EXECUTED
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
rtems_rfs_trace_mask clear_value = 0;
5050e: 4284 clrl %d4 <== NOT EXECUTED
50510: 4285 clrl %d5 <== NOT EXECUTED
"file-close",
"file-io",
"file-set"
};
rtems_rfs_trace_mask set_value = 0;
50512: 4282 clrl %d2 <== NOT EXECUTED
50514: 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++)
50516: 6000 0158 braw 50670 <rtems_rfs_trace_shell_command+0x19a><== NOT EXECUTED
{
if (argv[arg][0] == '-')
5051a: 245c moveal %a4@+,%a2 <== NOT EXECUTED
5051c: 722d moveq #45,%d1 <== NOT EXECUTED
5051e: 1012 moveb %a2@,%d0 <== NOT EXECUTED
50520: 49c0 extbl %d0 <== NOT EXECUTED
50522: b280 cmpl %d0,%d1 <== NOT EXECUTED
50524: 6674 bnes 5059a <rtems_rfs_trace_shell_command+0xc4><== NOT EXECUTED
{
switch (argv[arg][1])
50526: 123c 0068 moveb #104,%d1 <== NOT EXECUTED
5052a: 102a 0001 moveb %a2@(1),%d0 <== NOT EXECUTED
5052e: 49c0 extbl %d0 <== NOT EXECUTED
50530: b280 cmpl %d0,%d1 <== NOT EXECUTED
50532: 670a beqs 5053e <rtems_rfs_trace_shell_command+0x68><== NOT EXECUTED
50534: 123c 006c moveb #108,%d1 <== NOT EXECUTED
50538: b280 cmpl %d0,%d1 <== NOT EXECUTED
5053a: 664a bnes 50586 <rtems_rfs_trace_shell_command+0xb0><== NOT EXECUTED
5053c: 6016 bras 50554 <rtems_rfs_trace_shell_command+0x7e><== NOT EXECUTED
{
case 'h':
printf ("usage: %s [-hl] [set/clear] [flags]\n", argv[0]);
5053e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
50542: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
50544: 4879 0006 d9dc pea 6d9dc <rtems_rfs_rtems_eval_config+0x2c><== NOT EXECUTED
5054a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
50550: 508f addql #8,%sp <== NOT EXECUTED
50552: 602c bras 50580 <rtems_rfs_trace_shell_command+0xaa><== NOT EXECUTED
return 0;
case 'l':
printf ("%s: valid flags to set or clear are:\n", argv[0]);
50554: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
50558: 47f9 0005 cfac lea 5cfac <printf>,%a3 <== NOT EXECUTED
5055e: 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[])
50562: 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]);
50564: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
50566: 4879 0006 da01 pea 6da01 <rtems_rfs_rtems_eval_config+0x51><== NOT EXECUTED
5056c: 4e93 jsr %a3@ <== NOT EXECUTED
5056e: 600a bras 5057a <rtems_rfs_trace_shell_command+0xa4><== NOT EXECUTED
for (t = 0; t < (sizeof (table) / sizeof (const char*)); t++)
printf (" %s\n", table[t]);
50570: 2f1a movel %a2@+,%sp@- <== NOT EXECUTED
50572: 4879 0006 da27 pea 6da27 <rtems_rfs_rtems_eval_config+0x77><== NOT EXECUTED
50578: 4e93 jsr %a3@ <== NOT EXECUTED
5057a: 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++)
5057c: b48a cmpl %a2,%d2 <== NOT EXECUTED
5057e: 66f0 bnes 50570 <rtems_rfs_trace_shell_command+0x9a><== NOT EXECUTED
printf (" %s\n", table[t]);
return 0;
50580: 4280 clrl %d0 <== NOT EXECUTED
50582: 6000 00f8 braw 5067c <rtems_rfs_trace_shell_command+0x1a6><== NOT EXECUTED
default:
printf ("error: unknown option\n");
50586: 4879 0006 da2d pea 6da2d <rtems_rfs_rtems_eval_config+0x7d><== NOT EXECUTED
5058c: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
50592: 588f addql #4,%sp <== NOT EXECUTED
return 1;
50594: 7001 moveq #1,%d0 <== NOT EXECUTED
50596: 6000 00e4 braw 5067c <rtems_rfs_trace_shell_command+0x1a6><== NOT EXECUTED
}
}
else
{
if (strcmp (argv[arg], "set") == 0)
5059a: 4879 0006 dc1e pea 6dc1e <rtems_rfs_rtems_eval_config+0x26e><== NOT EXECUTED
505a0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
505a2: 4e93 jsr %a3@ <== NOT EXECUTED
505a4: 508f addql #8,%sp <== NOT EXECUTED
505a6: 4a80 tstl %d0 <== NOT EXECUTED
505a8: 6602 bnes 505ac <rtems_rfs_trace_shell_command+0xd6><== NOT EXECUTED
set = true;
505aa: 7c01 moveq #1,%d6 <== NOT EXECUTED
if (strcmp (argv[arg], "clear") == 0)
505ac: 4879 0006 da43 pea 6da43 <rtems_rfs_rtems_eval_config+0x93><== NOT EXECUTED
505b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
505b4: 4e93 jsr %a3@ <== NOT EXECUTED
505b6: 508f addql #8,%sp <== NOT EXECUTED
505b8: 4a80 tstl %d0 <== NOT EXECUTED
505ba: 6774 beqs 50630 <rtems_rfs_trace_shell_command+0x15a><== NOT EXECUTED
set = false;
else if (strcmp (argv[arg], "all") == 0)
505bc: 4879 0006 f7c2 pea 6f7c2 <_global_impure_ptr+0x54> <== NOT EXECUTED
505c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
505c4: 4e93 jsr %a3@ <== NOT EXECUTED
505c6: 508f addql #8,%sp <== NOT EXECUTED
505c8: 4a80 tstl %d0 <== NOT EXECUTED
505ca: 6708 beqs 505d4 <rtems_rfs_trace_shell_command+0xfe><== NOT EXECUTED
505cc: 41ee ff64 lea %fp@(-156),%a0 <== NOT EXECUTED
505d0: 4281 clrl %d1 <== NOT EXECUTED
505d2: 600a bras 505de <rtems_rfs_trace_shell_command+0x108><== NOT EXECUTED
{
if (set)
505d4: 4a06 tstb %d6 <== NOT EXECUTED
505d6: 675c beqs 50634 <rtems_rfs_trace_shell_command+0x15e><== NOT EXECUTED
set_value = RTEMS_RFS_TRACE_ALL;
505d8: 74ff moveq #-1,%d2 <== NOT EXECUTED
505da: 76ff moveq #-1,%d3 <== NOT EXECUTED
505dc: 605a bras 50638 <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)
505de: 2f18 movel %a0@+,%sp@- <== NOT EXECUTED
505e0: 2d41 ff60 movel %d1,%fp@(-160) <== NOT EXECUTED
505e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
505e6: 2d48 ff5c movel %a0,%fp@(-164) <== NOT EXECUTED
505ea: 4e93 jsr %a3@ <== NOT EXECUTED
505ec: 222e ff60 movel %fp@(-160),%d1 <== NOT EXECUTED
505f0: 508f addql #8,%sp <== NOT EXECUTED
505f2: 206e ff5c moveal %fp@(-164),%a0 <== NOT EXECUTED
505f6: 4a80 tstl %d0 <== NOT EXECUTED
505f8: 662c bnes 50626 <rtems_rfs_trace_shell_command+0x150><== NOT EXECUTED
{
if (set)
505fa: 4a06 tstb %d6 <== NOT EXECUTED
505fc: 6714 beqs 50612 <rtems_rfs_trace_shell_command+0x13c><== NOT EXECUTED
set_value = 1ULL << t;
505fe: 2f01 movel %d1,%sp@- <== NOT EXECUTED
50600: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
50604: 42a7 clrl %sp@- <== NOT EXECUTED
50606: 4e95 jsr %a5@ <== NOT EXECUTED
50608: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5060c: 2400 movel %d0,%d2 <== NOT EXECUTED
5060e: 2601 movel %d1,%d3 <== NOT EXECUTED
50610: 6026 bras 50638 <rtems_rfs_trace_shell_command+0x162><== NOT EXECUTED
else
clear_value = 1ULL << t;
50612: 2f01 movel %d1,%sp@- <== NOT EXECUTED
50614: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
50618: 42a7 clrl %sp@- <== NOT EXECUTED
5061a: 4e95 jsr %a5@ <== NOT EXECUTED
5061c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
50620: 2800 movel %d0,%d4 <== NOT EXECUTED
50622: 2a01 movel %d1,%d5 <== NOT EXECUTED
50624: 6012 bras 50638 <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++)
50626: 5281 addql #1,%d1 <== NOT EXECUTED
50628: 7027 moveq #39,%d0 <== NOT EXECUTED
5062a: b081 cmpl %d1,%d0 <== NOT EXECUTED
5062c: 66b0 bnes 505de <rtems_rfs_trace_shell_command+0x108><== NOT EXECUTED
5062e: 6008 bras 50638 <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;
50630: 4206 clrb %d6 <== NOT EXECUTED
50632: 6004 bras 50638 <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;
50634: 78ff moveq #-1,%d4 <== NOT EXECUTED
50636: 7aff moveq #-1,%d5 <== NOT EXECUTED
}
}
}
rtems_rfs_trace_flags |= set_value;
rtems_rfs_trace_flags &= ~clear_value;
50638: 2005 movel %d5,%d0 <== NOT EXECUTED
5063a: 4680 notl %d0 <== NOT EXECUTED
5063c: 2440 moveal %d0,%a2 <== NOT EXECUTED
5063e: 2204 movel %d4,%d1 <== NOT EXECUTED
50640: 4681 notl %d1 <== NOT EXECUTED
50642: 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++)
50644: 5287 addql #1,%d7 <== NOT EXECUTED
break;
}
}
}
rtems_rfs_trace_flags |= set_value;
50646: 2039 0008 1088 movel 81088 <rtems_rfs_trace_flags+0x4>,%d0 <== NOT EXECUTED
5064c: 2239 0008 1084 movel 81084 <rtems_rfs_trace_flags>,%d1 <== NOT EXECUTED
50652: 8083 orl %d3,%d0 <== NOT EXECUTED
50654: 8282 orl %d2,%d1 <== NOT EXECUTED
50656: 2d40 ff58 movel %d0,%fp@(-168) <== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
5065a: 2009 movel %a1,%d0 <== NOT EXECUTED
5065c: c081 andl %d1,%d0 <== NOT EXECUTED
5065e: 220a movel %a2,%d1 <== NOT EXECUTED
50660: c2ae ff58 andl %fp@(-168),%d1 <== NOT EXECUTED
50664: 23c0 0008 1084 movel %d0,81084 <rtems_rfs_trace_flags> <== NOT EXECUTED
5066a: 23c1 0008 1088 movel %d1,81088 <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++)
50670: beae 0008 cmpl %fp@(8),%d7 <== NOT EXECUTED
50674: 6d00 fea4 bltw 5051a <rtems_rfs_trace_shell_command+0x44><== NOT EXECUTED
50678: 6000 ff06 braw 50580 <rtems_rfs_trace_shell_command+0xaa><== NOT EXECUTED
rtems_rfs_trace_flags &= ~clear_value;
}
}
return 0;
}
5067c: 4cee 3cfc ff30 moveml %fp@(-208),%d2-%d7/%a2-%a5 <== NOT EXECUTED
50682: 4e5e unlk %fp <== NOT EXECUTED
...
00059c14 <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)
{
59c14: 4e56 ff98 linkw %fp,#-104 <== NOT EXECUTED
59c18: 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))
59c1c: 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)
{
59c22: 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))
59c26: 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)
{
59c28: 2c2e 000c movel %fp@(12),%d6 <== NOT EXECUTED
59c2c: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED
59c30: 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))
59c34: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59c3a: 508f addql #8,%sp <== NOT EXECUTED
59c3c: 4a00 tstb %d0 <== NOT EXECUTED
59c3e: 6714 beqs 59c54 <rtems_rfs_unlink+0x40> <== NOT EXECUTED
printf ("rtems-rfs: unlink: parent(%" PRIu32 ") -X-> (%" PRIu32 ")\n", parent, target);
59c40: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59c42: 2f06 movel %d6,%sp@- <== NOT EXECUTED
59c44: 4879 0006 f2f2 pea 6f2f2 <CSWTCH.2+0x12de> <== NOT EXECUTED
59c4a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59c50: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, target, &target_inode, true);
59c54: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59c58: 45ee ffda lea %fp@(-38),%a2 <== NOT EXECUTED
59c5c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59c5e: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59c60: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59c62: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59c68: 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);
59c6c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
59c6e: 6600 0322 bnew 59f92 <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));
59c72: 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);
59c76: 4280 clrl %d0 <== NOT EXECUTED
59c78: 1028 0002 moveb %a0@(2),%d0 <== NOT EXECUTED
59c7c: e188 lsll #8,%d0 <== NOT EXECUTED
59c7e: 0280 0000 f000 andil #61440,%d0 <== NOT EXECUTED
59c84: 0c80 0000 4000 cmpil #16384,%d0 <== NOT EXECUTED
59c8a: 57c5 seq %d5 <== NOT EXECUTED
59c8c: 4485 negl %d5 <== NOT EXECUTED
if (dir)
59c8e: 4a05 tstb %d5 <== NOT EXECUTED
59c90: 677e beqs 59d10 <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
{
switch (dir_mode)
59c92: 4a87 tstl %d7 <== NOT EXECUTED
59c94: 6708 beqs 59c9e <rtems_rfs_unlink+0x8a> <== NOT EXECUTED
59c96: 7001 moveq #1,%d0 <== NOT EXECUTED
59c98: b087 cmpl %d7,%d0 <== NOT EXECUTED
59c9a: 6674 bnes 59d10 <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
59c9c: 6036 bras 59cd4 <rtems_rfs_unlink+0xc0> <== NOT EXECUTED
{
case rtems_rfs_unlink_dir_denied:
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59c9e: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59ca4: 42a7 clrl %sp@- <== NOT EXECUTED
59ca6: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59cac: 508f addql #8,%sp <== NOT EXECUTED
59cae: 4a00 tstb %d0 <== NOT EXECUTED
59cb0: 670e beqs 59cc0 <rtems_rfs_unlink+0xac> <== NOT EXECUTED
printf ("rtems-rfs: link is a directory\n");
59cb2: 4879 0006 f31d pea 6f31d <CSWTCH.2+0x1309> <== NOT EXECUTED
59cb8: 4eb9 0005 d1fc jsr 5d1fc <puts> <== NOT EXECUTED
59cbe: 588f addql #4,%sp <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
59cc0: 486e ffda pea %fp@(-38) <== NOT EXECUTED
return EISDIR;
59cc4: 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);
59cc6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59cc8: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
59cce: 508f addql #8,%sp <== NOT EXECUTED
59cd0: 6000 02c0 braw 59f92 <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
return EISDIR;
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
59cd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
59cd6: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59cd8: 4eb9 0005 830e jsr 5830e <rtems_rfs_dir_empty> <== NOT EXECUTED
if (rc > 0)
59cde: 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);
59ce0: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59ce2: 6f2c bles 59d10 <rtems_rfs_unlink+0xfc> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59ce4: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59cea: 42a7 clrl %sp@- <== NOT EXECUTED
59cec: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59cf2: 508f addql #8,%sp <== NOT EXECUTED
59cf4: 4a00 tstb %d0 <== NOT EXECUTED
59cf6: 6700 024c beqw 59f44 <rtems_rfs_unlink+0x330> <== NOT EXECUTED
printf ("rtems-rfs: dir-empty: %d: %s\n", rc, strerror (rc));
59cfa: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59cfc: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59d02: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59d04: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d06: 4879 0006 f33c pea 6f33c <CSWTCH.2+0x1328> <== NOT EXECUTED
59d0c: 6000 022c braw 59f3a <rtems_rfs_unlink+0x326> <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
59d10: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59d14: 2e0e movel %fp,%d7 <== NOT EXECUTED
59d16: 0687 ffff ffb4 addil #-76,%d7 <== NOT EXECUTED
59d1c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59d1e: 2f06 movel %d6,%sp@- <== NOT EXECUTED
59d20: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59d22: 4eb9 0004 eb9e jsr 4eb9e <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
59d28: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
59d2c: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc)
59d2e: 672c beqs 59d5c <rtems_rfs_unlink+0x148> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59d30: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59d36: 42a7 clrl %sp@- <== NOT EXECUTED
59d38: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59d3e: 508f addql #8,%sp <== NOT EXECUTED
59d40: 4a00 tstb %d0 <== NOT EXECUTED
59d42: 6700 0200 beqw 59f44 <rtems_rfs_unlink+0x330> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-open failed: %d: %s\n",
59d46: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d48: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59d4e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59d50: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d52: 4879 0006 f35a pea 6f35a <CSWTCH.2+0x1346> <== NOT EXECUTED
59d58: 6000 01e0 braw 59f3a <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);
59d5c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
59d60: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59d62: 2f07 movel %d7,%sp@- <== NOT EXECUTED
59d64: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59d66: 4eb9 0005 7c76 jsr 57c76 <rtems_rfs_dir_del_entry> <== NOT EXECUTED
if (rc > 0)
59d6c: 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);
59d70: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59d72: 6f2c bles 59da0 <rtems_rfs_unlink+0x18c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59d74: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59d7a: 42a7 clrl %sp@- <== NOT EXECUTED
59d7c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59d82: 508f addql #8,%sp <== NOT EXECUTED
59d84: 4a00 tstb %d0 <== NOT EXECUTED
59d86: 6700 0160 beqw 59ee8 <rtems_rfs_unlink+0x2d4> <== NOT EXECUTED
printf ("rtems-rfs: unlink: dir-del failed: %d: %s\n",
59d8a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d8c: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59d92: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59d94: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59d96: 4879 0006 f386 pea 6f386 <CSWTCH.2+0x1372> <== NOT EXECUTED
59d9c: 6000 0140 braw 59ede <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);
59da0: 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);
59da4: 4280 clrl %d0 <== NOT EXECUTED
59da6: 1010 moveb %a0@,%d0 <== NOT EXECUTED
59da8: 4282 clrl %d2 <== NOT EXECUTED
59daa: 1428 0001 moveb %a0@(1),%d2 <== NOT EXECUTED
59dae: e188 lsll #8,%d0 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59db0: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59db6: 8480 orl %d0,%d2 <== NOT EXECUTED
if (links == 0xffff)
59db8: 4280 clrl %d0 <== NOT EXECUTED
59dba: 3002 movew %d2,%d0 <== NOT EXECUTED
59dbc: 42a7 clrl %sp@- <== NOT EXECUTED
links = 0;
59dbe: 0c80 0000 ffff cmpil #65535,%d0 <== NOT EXECUTED
59dc4: 56c0 sne %d0 <== NOT EXECUTED
59dc6: 4880 extw %d0 <== NOT EXECUTED
59dc8: c480 andl %d0,%d2 <== NOT EXECUTED
59dca: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59dd0: 508f addql #8,%sp <== NOT EXECUTED
59dd2: 4a00 tstb %d0 <== NOT EXECUTED
59dd4: 6716 beqs 59dec <rtems_rfs_unlink+0x1d8> <== NOT EXECUTED
printf ("rtems-rfs: unlink: target:%" PRIu32 " links:%u\n", target, links);
59dd6: 3f02 movew %d2,%sp@- <== NOT EXECUTED
59dd8: 4267 clrw %sp@- <== NOT EXECUTED
59dda: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59ddc: 4879 0006 f3b1 pea 6f3b1 <CSWTCH.2+0x139d> <== NOT EXECUTED
59de2: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59de8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if (links > 1)
59dec: 4280 clrl %d0 <== NOT EXECUTED
59dee: 7201 moveq #1,%d1 <== NOT EXECUTED
59df0: 3002 movew %d2,%d0 <== NOT EXECUTED
59df2: b280 cmpl %d0,%d1 <== NOT EXECUTED
59df4: 641e bccs 59e14 <rtems_rfs_unlink+0x200> <== NOT EXECUTED
{
links--;
59df6: 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);
59df8: 2002 movel %d2,%d0 <== NOT EXECUTED
59dfa: e088 lsrl #8,%d0 <== NOT EXECUTED
59dfc: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
59e00: 1080 moveb %d0,%a0@ <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59e02: 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);
59e04: 206e ffe6 moveal %fp@(-26),%a0 <== NOT EXECUTED
59e08: 1142 0001 moveb %d2,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59e0c: 1d44 ffea moveb %d4,%fp@(-22) <== NOT EXECUTED
59e10: 6000 0086 braw 59e98 <rtems_rfs_unlink+0x284> <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
59e14: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59e18: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59e1a: 4eb9 0004 edb8 jsr 4edb8 <rtems_rfs_inode_delete> <== NOT EXECUTED
if (rc > 0)
59e20: 508f addql #8,%sp <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
59e22: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59e24: 6f2c bles 59e52 <rtems_rfs_unlink+0x23e> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59e26: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59e2c: 42a7 clrl %sp@- <== NOT EXECUTED
59e2e: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59e34: 508f addql #8,%sp <== NOT EXECUTED
59e36: 4a00 tstb %d0 <== NOT EXECUTED
59e38: 6700 00ae beqw 59ee8 <rtems_rfs_unlink+0x2d4> <== NOT EXECUTED
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
59e3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59e3e: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59e44: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59e46: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59e48: 4879 0006 f3d9 pea 6f3d9 <CSWTCH.2+0x13c5> <== NOT EXECUTED
59e4e: 6000 008e braw 59ede <rtems_rfs_unlink+0x2ca> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
59e52: 4a05 tstb %d5 <== NOT EXECUTED
59e54: 6742 beqs 59e98 <rtems_rfs_unlink+0x284> <== NOT EXECUTED
{
links = rtems_rfs_inode_get_links (&parent_inode);
59e56: 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);
59e5a: 4280 clrl %d0 <== NOT EXECUTED
59e5c: 1010 moveb %a0@,%d0 <== NOT EXECUTED
59e5e: 4281 clrl %d1 <== NOT EXECUTED
59e60: 1228 0001 moveb %a0@(1),%d1 <== NOT EXECUTED
if (links == 0xffff)
59e64: 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);
59e66: e188 lsll #8,%d0 <== NOT EXECUTED
59e68: 8081 orl %d1,%d0 <== NOT EXECUTED
if (links == 0xffff)
59e6a: 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);
59e6c: 3200 movew %d0,%d1 <== NOT EXECUTED
if (links == 0xffff)
59e6e: 0c82 0000 ffff cmpil #65535,%d2 <== NOT EXECUTED
59e74: 670c beqs 59e82 <rtems_rfs_unlink+0x26e> <== NOT EXECUTED
if (links > 1)
59e76: 7801 moveq #1,%d4 <== NOT EXECUTED
59e78: b882 cmpl %d2,%d4 <== NOT EXECUTED
59e7a: 6408 bccs 59e84 <rtems_rfs_unlink+0x270> <== NOT EXECUTED
links--;
59e7c: 2200 movel %d0,%d1 <== NOT EXECUTED
59e7e: 5381 subql #1,%d1 <== NOT EXECUTED
59e80: 6002 bras 59e84 <rtems_rfs_unlink+0x270> <== NOT EXECUTED
links = 0;
59e82: 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);
59e84: 2001 movel %d1,%d0 <== NOT EXECUTED
59e86: e088 lsrl #8,%d0 <== NOT EXECUTED
59e88: 1080 moveb %d0,%a0@ <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59e8a: 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);
59e8c: 206e ffc0 moveal %fp@(-64),%a0 <== NOT EXECUTED
59e90: 1141 0001 moveb %d1,%a0@(1) <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
59e94: 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);
59e98: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59e9c: 280e movel %fp,%d4 <== NOT EXECUTED
59e9e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
59ea2: 0684 ffff ffb4 addil #-76,%d4 <== NOT EXECUTED
59ea8: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59eaa: 4eb9 0004 ee8c jsr 4ee8c <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
59eb0: 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);
59eb4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59eb6: 6f4a bles 59f02 <rtems_rfs_unlink+0x2ee> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59eb8: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59ebe: 42a7 clrl %sp@- <== NOT EXECUTED
59ec0: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59ec6: 508f addql #8,%sp <== NOT EXECUTED
59ec8: 4a00 tstb %d0 <== NOT EXECUTED
59eca: 671c beqs 59ee8 <rtems_rfs_unlink+0x2d4> <== NOT EXECUTED
printf ("rtems-rfs: link: inode-time-stamp failed: %d: %s\n",
59ecc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59ece: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59ed4: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59ed6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59ed8: 4879 0006 f406 pea 6f406 <CSWTCH.2+0x13f2> <== NOT EXECUTED
59ede: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59ee4: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
59ee8: 486e ffb4 pea %fp@(-76) <== NOT EXECUTED
59eec: 45f9 0004 ed36 lea 4ed36 <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
59ef2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59ef4: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
59ef6: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59efa: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59efc: 4e92 jsr %a2@ <== NOT EXECUTED
59efe: 6000 008e braw 59f8e <rtems_rfs_unlink+0x37a> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
59f02: 2f04 movel %d4,%sp@- <== NOT EXECUTED
59f04: 45f9 0004 ed36 lea 4ed36 <rtems_rfs_inode_close>,%a2 <== NOT EXECUTED
59f0a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59f0c: 4e92 jsr %a2@ <== NOT EXECUTED
if (rc > 0)
59f0e: 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);
59f10: 2400 movel %d0,%d2 <== NOT EXECUTED
if (rc > 0)
59f12: 6f40 bles 59f54 <rtems_rfs_unlink+0x340> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59f14: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59f1a: 42a7 clrl %sp@- <== NOT EXECUTED
59f1c: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59f22: 508f addql #8,%sp <== NOT EXECUTED
59f24: 4a00 tstb %d0 <== NOT EXECUTED
59f26: 671c beqs 59f44 <rtems_rfs_unlink+0x330> <== NOT EXECUTED
printf ("rtems-rfs: link: parent inode-close failed: %d: %s\n",
59f28: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59f2a: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59f30: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59f32: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59f34: 4879 0006 f438 pea 6f438 <CSWTCH.2+0x1424> <== NOT EXECUTED
59f3a: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59f40: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_inode_close (fs, &target_inode);
59f44: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59f48: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59f4a: 4eb9 0004 ed36 jsr 4ed36 <rtems_rfs_inode_close> <== NOT EXECUTED
59f50: 508f addql #8,%sp <== NOT EXECUTED
59f52: 603e bras 59f92 <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
59f54: 486e ffda pea %fp@(-38) <== NOT EXECUTED
59f58: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59f5a: 4e92 jsr %a2@ <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59f5c: 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);
59f5e: 2400 movel %d0,%d2 <== NOT EXECUTED
if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
59f60: 6f30 bles 59f92 <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
59f62: 2f3c 0200 0000 movel #33554432,%sp@- <== NOT EXECUTED
59f68: 42a7 clrl %sp@- <== NOT EXECUTED
59f6a: 4eb9 0005 044c jsr 5044c <rtems_rfs_trace> <== NOT EXECUTED
59f70: 508f addql #8,%sp <== NOT EXECUTED
59f72: 4a00 tstb %d0 <== NOT EXECUTED
59f74: 671c beqs 59f92 <rtems_rfs_unlink+0x37e> <== NOT EXECUTED
printf ("rtems-rfs: link: target inode-close failed: %d: %s\n",
59f76: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59f78: 4eb9 0005 df0c jsr 5df0c <strerror> <== NOT EXECUTED
59f7e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59f80: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59f82: 4879 0006 f46c pea 6f46c <CSWTCH.2+0x1458> <== NOT EXECUTED
59f88: 4eb9 0005 cfac jsr 5cfac <printf> <== NOT EXECUTED
59f8e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rc, strerror (rc));
return rc;
}
59f92: 2002 movel %d2,%d0 <== NOT EXECUTED
59f94: 4cee 04fc ff98 moveml %fp@(-104),%d2-%d7/%a2 <== NOT EXECUTED
59f9a: 4e5e unlk %fp <== NOT EXECUTED
0005baca <rtems_shell_rfs_format>:
int
rtems_shell_rfs_format (int argc, char* argv[])
{
5baca: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED
5bace: 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));
5bad2: 4878 0016 pea 16 <OPER2+0x2> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
5bad6: 7401 moveq #1,%d2 <== NOT EXECUTED
int
rtems_shell_rfs_format (int argc, char* argv[])
{
rtems_rfs_format_config config;
const char* driver = NULL;
5bad8: 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);
5bada: 47f9 0007 5e22 lea 75e22 <strtoul>,%a3 <== NOT EXECUTED
{
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
5bae0: 42a7 clrl %sp@- <== NOT EXECUTED
5bae2: 486e ffea pea %fp@(-22) <== NOT EXECUTED
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
5bae6: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED
5baea: 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));
5baee: 4eb9 0007 193c jsr 7193c <memset> <== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
5baf4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5baf8: 6000 0108 braw 5bc02 <rtems_shell_rfs_format+0x138> <== NOT EXECUTED
{
if (argv[arg][0] == '-')
5bafc: 2072 2c00 moveal %a2@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
5bb00: 722d moveq #45,%d1 <== NOT EXECUTED
5bb02: 1010 moveb %a0@,%d0 <== NOT EXECUTED
5bb04: 49c0 extbl %d0 <== NOT EXECUTED
5bb06: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb08: 6600 00de bnew 5bbe8 <rtems_shell_rfs_format+0x11e> <== NOT EXECUTED
{
switch (argv[arg][1])
5bb0c: 123c 0069 moveb #105,%d1 <== NOT EXECUTED
5bb10: 1028 0001 moveb %a0@(1),%d0 <== NOT EXECUTED
5bb14: 49c0 extbl %d0 <== NOT EXECUTED
5bb16: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb18: 677c beqs 5bb96 <rtems_shell_rfs_format+0xcc> <== NOT EXECUTED
5bb1a: 6d16 blts 5bb32 <rtems_shell_rfs_format+0x68> <== NOT EXECUTED
5bb1c: 123c 0049 moveb #73,%d1 <== NOT EXECUTED
5bb20: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb22: 6700 0094 beqw 5bbb8 <rtems_shell_rfs_format+0xee> <== NOT EXECUTED
5bb26: 123c 0062 moveb #98,%d1 <== NOT EXECUTED
5bb2a: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb2c: 6600 00b0 bnew 5bbde <rtems_shell_rfs_format+0x114> <== NOT EXECUTED
5bb30: 6044 bras 5bb76 <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
5bb32: 7273 moveq #115,%d1 <== NOT EXECUTED
5bb34: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb36: 671e beqs 5bb56 <rtems_shell_rfs_format+0x8c> <== NOT EXECUTED
5bb38: 123c 0076 moveb #118,%d1 <== NOT EXECUTED
5bb3c: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb3e: 670c beqs 5bb4c <rtems_shell_rfs_format+0x82> <== NOT EXECUTED
5bb40: 123c 006f moveb #111,%d1 <== NOT EXECUTED
5bb44: b280 cmpl %d0,%d1 <== NOT EXECUTED
5bb46: 6600 0096 bnew 5bbde <rtems_shell_rfs_format+0x114> <== NOT EXECUTED
5bb4a: 6074 bras 5bbc0 <rtems_shell_rfs_format+0xf6> <== NOT EXECUTED
{
case 'v':
config.verbose = true;
5bb4c: 7001 moveq #1,%d0 <== NOT EXECUTED
5bb4e: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED
break;
5bb52: 6000 00ac braw 5bc00 <rtems_shell_rfs_format+0x136> <== NOT EXECUTED
case 's':
arg++;
5bb56: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5bb58: b882 cmpl %d2,%d4 <== NOT EXECUTED
5bb5a: 6e0a bgts 5bb66 <rtems_shell_rfs_format+0x9c> <== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
5bb5c: 4879 0008 d7ec pea 8d7ec <rtems_rtc_shell_usage+0x13ea> <== NOT EXECUTED
5bb62: 6000 00ae braw 5bc12 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
5bb66: 42a7 clrl %sp@- <== NOT EXECUTED
5bb68: 42a7 clrl %sp@- <== NOT EXECUTED
5bb6a: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5bb6e: 4e93 jsr %a3@ <== NOT EXECUTED
5bb70: 2d40 ffea movel %d0,%fp@(-22) <== NOT EXECUTED
5bb74: 603c bras 5bbb2 <rtems_shell_rfs_format+0xe8> <== NOT EXECUTED
break;
case 'b':
arg++;
5bb76: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5bb78: b882 cmpl %d2,%d4 <== NOT EXECUTED
5bb7a: 6e0a bgts 5bb86 <rtems_shell_rfs_format+0xbc> <== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
5bb7c: 4879 0008 d810 pea 8d810 <rtems_rtc_shell_usage+0x140e> <== NOT EXECUTED
5bb82: 6000 008e braw 5bc12 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
5bb86: 42a7 clrl %sp@- <== NOT EXECUTED
5bb88: 42a7 clrl %sp@- <== NOT EXECUTED
5bb8a: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5bb8e: 4e93 jsr %a3@ <== NOT EXECUTED
5bb90: 2d40 ffee movel %d0,%fp@(-18) <== NOT EXECUTED
5bb94: 601c bras 5bbb2 <rtems_shell_rfs_format+0xe8> <== NOT EXECUTED
break;
case 'i':
arg++;
5bb96: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5bb98: b882 cmpl %d2,%d4 <== NOT EXECUTED
5bb9a: 6e08 bgts 5bba4 <rtems_shell_rfs_format+0xda> <== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
5bb9c: 4879 0008 d83b pea 8d83b <rtems_rtc_shell_usage+0x1439> <== NOT EXECUTED
5bba2: 606e bras 5bc12 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
5bba4: 42a7 clrl %sp@- <== NOT EXECUTED
5bba6: 42a7 clrl %sp@- <== NOT EXECUTED
5bba8: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5bbac: 4e93 jsr %a3@ <== NOT EXECUTED
5bbae: 2d40 fff2 movel %d0,%fp@(-14) <== NOT EXECUTED
break;
5bbb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
5bbb6: 6048 bras 5bc00 <rtems_shell_rfs_format+0x136> <== NOT EXECUTED
case 'I':
config.initialise_inodes = true;
5bbb8: 7201 moveq #1,%d1 <== NOT EXECUTED
5bbba: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED
break;
5bbbe: 6040 bras 5bc00 <rtems_shell_rfs_format+0x136> <== NOT EXECUTED
case 'o':
arg++;
5bbc0: 5282 addql #1,%d2 <== NOT EXECUTED
if (arg >= argc)
5bbc2: b882 cmpl %d2,%d4 <== NOT EXECUTED
5bbc4: 6e08 bgts 5bbce <rtems_shell_rfs_format+0x104> <== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
5bbc6: 4879 0008 d866 pea 8d866 <rtems_rtc_shell_usage+0x1464> <== NOT EXECUTED
5bbcc: 6044 bras 5bc12 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
5bbce: 42a7 clrl %sp@- <== NOT EXECUTED
5bbd0: 42a7 clrl %sp@- <== NOT EXECUTED
5bbd2: 2f32 2c00 movel %a2@(00000000,%d2:l:4),%sp@- <== NOT EXECUTED
5bbd6: 4e93 jsr %a3@ <== NOT EXECUTED
5bbd8: 2d40 fff6 movel %d0,%fp@(-10) <== NOT EXECUTED
5bbdc: 60d4 bras 5bbb2 <rtems_shell_rfs_format+0xe8> <== NOT EXECUTED
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
5bbde: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5bbe0: 4879 0008 bdb8 pea 8bdb8 <iMinorError+0x2df> <== NOT EXECUTED
5bbe6: 600c bras 5bbf4 <rtems_shell_rfs_format+0x12a> <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
5bbe8: 4a83 tstl %d3 <== NOT EXECUTED
5bbea: 6712 beqs 5bbfe <rtems_shell_rfs_format+0x134> <== NOT EXECUTED
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
5bbec: 2f08 movel %a0,%sp@- <== NOT EXECUTED
5bbee: 4879 0008 d899 pea 8d899 <rtems_rtc_shell_usage+0x1497> <== NOT EXECUTED
5bbf4: 4eb9 0007 2760 jsr 72760 <printf> <== NOT EXECUTED
5bbfa: 508f addql #8,%sp <== NOT EXECUTED
5bbfc: 6054 bras 5bc52 <rtems_shell_rfs_format+0x188> <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
5bbfe: 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++)
5bc00: 5282 addql #1,%d2 <== NOT EXECUTED
5bc02: b882 cmpl %d2,%d4 <== NOT EXECUTED
5bc04: 6e00 fef6 bgtw 5bafc <rtems_shell_rfs_format+0x32> <== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
5bc08: 4a83 tstl %d3 <== NOT EXECUTED
5bc0a: 6610 bnes 5bc1c <rtems_shell_rfs_format+0x152> <== NOT EXECUTED
printf ("error: no driver name provided\n");
5bc0c: 4879 0008 d8c2 pea 8d8c2 <rtems_rtc_shell_usage+0x14c0> <== NOT EXECUTED
5bc12: 4eb9 0007 29b0 jsr 729b0 <puts> <== NOT EXECUTED
5bc18: 588f addql #4,%sp <== NOT EXECUTED
5bc1a: 6036 bras 5bc52 <rtems_shell_rfs_format+0x188> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
5bc1c: 486e ffea pea %fp@(-22) <== NOT EXECUTED
5bc20: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5bc22: 4eb9 0006 70d2 jsr 670d2 <rtems_rfs_format> <== NOT EXECUTED
5bc28: 508f addql #8,%sp <== NOT EXECUTED
5bc2a: 4a80 tstl %d0 <== NOT EXECUTED
5bc2c: 6c28 bges 5bc56 <rtems_shell_rfs_format+0x18c> <== NOT EXECUTED
{
printf ("error: format of %s failed: %s\n",
driver, strerror (errno));
5bc2e: 4eb9 0006 e674 jsr 6e674 <__errno> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
{
printf ("error: format of %s failed: %s\n",
5bc34: 2040 moveal %d0,%a0 <== NOT EXECUTED
5bc36: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
5bc38: 4eb9 0007 4774 jsr 74774 <strerror> <== NOT EXECUTED
5bc3e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5bc40: 2f03 movel %d3,%sp@- <== NOT EXECUTED
5bc42: 4879 0008 d8e1 pea 8d8e1 <rtems_rtc_shell_usage+0x14df> <== NOT EXECUTED
5bc48: 4eb9 0007 2760 jsr 72760 <printf> <== NOT EXECUTED
5bc4e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
driver, strerror (errno));
return 1;
5bc52: 7001 moveq #1,%d0 <== NOT EXECUTED
5bc54: 6002 bras 5bc58 <rtems_shell_rfs_format+0x18e> <== NOT EXECUTED
}
return 0;
5bc56: 4280 clrl %d0 <== NOT EXECUTED
}
5bc58: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 <== NOT EXECUTED
5bc5e: 4e5e unlk %fp <== NOT EXECUTED
...
00046968 <rtems_shutdown_executive>:
void rtems_shutdown_executive(
uint32_t result
)
{
if ( _System_state_Is_up( _System_state_Get() ) ) {
46968: 7003 moveq #3,%d0
*/
void rtems_shutdown_executive(
uint32_t result
)
{
4696a: 4e56 0000 linkw %fp,#0
if ( _System_state_Is_up( _System_state_Get() ) ) {
4696e: b0b9 0005 f30a cmpl 5f30a <_System_state_Current>,%d0
46974: 6624 bnes 4699a <rtems_shutdown_executive+0x32>
#if defined(RTEMS_SMP)
_SMP_Request_other_cores_to_shutdown();
#endif
_Per_CPU_Information[0].idle->Wait.return_code = result;
46976: 2079 0005 f326 moveal 5f326 <_Per_CPU_Information+0x16>,%a0
4697c: 103c 0004 moveb #4,%d0
46980: 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 );
46986: 4879 0005 eea2 pea 5eea2 <_Thread_BSP_context>
4698c: 23c0 0005 f30a movel %d0,5f30a <_System_state_Current>
46992: 4eb9 0004 953a jsr 4953a <_CPU_Context_Restart_self>
46998: 588f addql #4,%sp <== NOT EXECUTED
****** RETURN TO RTEMS_INITIALIZE_START_MULTITASKING() ******
****** AND THEN TO BOOT_CARD() ******
*******************************************************************
*******************************************************************/
}
_Internal_error_Occurred(
4699a: 4878 0014 pea 14 <OPER2>
4699e: 4878 0001 pea 1 <ADD>
469a2: 42a7 clrl %sp@-
469a4: 4eb9 0004 7550 jsr 47550 <_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 58d8 jsr 558d8 <_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 00fa moveal %a1@(250),%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 78c4 tstl 778c4 <_Per_CPU_Information+0x8>
51766: 6720 beqs 51788 <rtems_signal_send+0x70>
51768: b0b9 0007 78ca cmpl 778ca <_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 78c8 moveb %d0,778c8 <_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 58b8 jsr 558b8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5178e: 4280 clrl %d0
51790: 6010 bras 517a2 <rtems_signal_send+0x8a>
}
_Thread_Enable_dispatch();
51792: 4eb9 0005 58b8 jsr 558b8 <_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
...
0004c680 <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 )
{
4c680: 4e56 fff4 linkw %fp,#-12
4c684: 48d7 001c moveml %d2-%d4,%sp@
4c688: 242e 000c movel %fp@(12),%d2
4c68c: 2002 movel %d2,%d0
4c68e: 5080 addql #8,%d0
4c690: 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 )
4c694: 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 )
{
4c698: 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(
4c69c: 2040 moveal %d0,%a0
4c69e: 4868 001a pea %a0@(26)
4c6a2: 4eb9 0004 4410 jsr 44410 <malloc>
rtems_sparse_disk *sparse_disk = sparse_disk_allocate(
media_block_size,
blocks_with_buffer
);
if ( sparse_disk != NULL ) {
4c6a8: 588f addql #4,%sp
4c6aa: 4a80 tstl %d0
4c6ac: 6728 beqs 4c6d6 <rtems_sparse_disk_create_and_register+0x56><== NEVER TAKEN
sc = rtems_sparse_disk_register(
4c6ae: 4879 0004 c372 pea 4c372 <rtems_sparse_disk_free>
4c6b4: 0284 0000 00ff andil #255,%d4
4c6ba: 2f04 movel %d4,%sp@-
4c6bc: 2f2e 0014 movel %fp@(20),%sp@-
4c6c0: 2f03 movel %d3,%sp@-
4c6c2: 2f02 movel %d2,%sp@-
4c6c4: 2f00 movel %d0,%sp@-
4c6c6: 2f2e 0008 movel %fp@(8),%sp@-
4c6ca: 4eb9 0004 c596 jsr 4c596 <rtems_sparse_disk_register>
4c6d0: 4fef 001c lea %sp@(28),%sp
4c6d4: 6002 bras 4c6d8 <rtems_sparse_disk_create_and_register+0x58>
media_block_count,
fill_pattern,
rtems_sparse_disk_free
);
} else {
sc = RTEMS_NO_MEMORY;
4c6d6: 701a moveq #26,%d0 <== NOT EXECUTED
}
return sc;
}
4c6d8: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
4c6de: 4e5e unlk %fp
...
0004c596 <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 )
{
4c596: 4e56 ffd4 linkw %fp,#-44
4c59a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c59e: 282e 001c movel %fp@(28),%d4
4c5a2: 2c2e 0008 movel %fp@(8),%d6
4c5a6: 246e 000c moveal %fp@(12),%a2
4c5aa: 262e 0010 movel %fp@(16),%d3
4c5ae: 242e 0014 movel %fp@(20),%d2
4c5b2: 2a2e 0018 movel %fp@(24),%d5
4c5b6: 286e 0020 moveal %fp@(32),%a4
4c5ba: 1d44 ffff moveb %d4,%fp@(-1)
rtems_status_code sc;
if ( blocks_with_buffer <= media_block_count ) {
4c5be: ba82 cmpl %d2,%d5
4c5c0: 6500 00ae bcsw 4c670 <rtems_sparse_disk_register+0xda>
const uint8_t fill_pattern )
{
rtems_status_code sc;
rtems_blkdev_bnum i;
if ( NULL == sd )
4c5c4: 4a8a tstl %a2
4c5c6: 6700 00ac beqw 4c674 <rtems_sparse_disk_register+0xde>
return RTEMS_INVALID_ADDRESS;
uint8_t *data = (uint8_t *) sd;
size_t const key_table_size = blocks_with_buffer
4c5ca: 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 );
4c5cc: 47f9 0005 7e40 lea 57e40 <memset>,%a3
if ( NULL == sd )
return RTEMS_INVALID_ADDRESS;
uint8_t *data = (uint8_t *) sd;
size_t const key_table_size = blocks_with_buffer
4c5d2: 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 );
4c5d4: 2a47 moveal %d7,%a5
4c5d6: 4bed 001a lea %a5@(26),%a5
4c5da: 2f0d movel %a5,%sp@-
4c5dc: 42a7 clrl %sp@-
4c5de: 2f0a movel %a2,%sp@-
4c5e0: 4e93 jsr %a3@
sd->fill_pattern = fill_pattern;
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
4c5e2: 2002 movel %d2,%d0
4c5e4: 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;
4c5e8: 1544 0014 moveb %d4,%a2@(20)
memset( (uint8_t *) ( data + sizeof( rtems_sparse_disk ) + key_table_size ),
4c5ec: 2f00 movel %d0,%sp@-
4c5ee: 4280 clrl %d0
4c5f0: 102e ffff moveb %fp@(-1),%d0
4c5f4: 2f00 movel %d0,%sp@-
4c5f6: 4872 d800 pea %a2@(00000000,%a5:l)
4c5fa: 4e93 jsr %a3@
sd->fill_pattern,
data_size );
sd->delete_handler = sparse_disk_delete;
4c5fc: 254c 0010 movel %a4,%a2@(16)
sc = rtems_semaphore_create(
4c600: 2f0a movel %a2,%sp@-
4c602: 42a7 clrl %sp@-
4c604: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4c608: 4878 0001 pea 1 <ADD>
4c60c: 2f3c 5350 4152 movel #1397768530,%sp@-
4c612: 4eb9 0004 7a80 jsr 47a80 <rtems_semaphore_create>
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY,
0,
&sd->mutex
);
if ( sc != RTEMS_SUCCESSFUL ) {
4c618: 4fef 002c lea %sp@(44),%sp
4c61c: 4a80 tstl %d0
4c61e: 6656 bnes 4c676 <rtems_sparse_disk_register+0xe0><== NEVER TAKEN
return sc;
}
data += sizeof( rtems_sparse_disk );
4c620: 220a movel %a2,%d1
4c622: 0681 0000 001a addil #26,%d1
sd->blocks_with_buffer = blocks_with_buffer;
4c628: 2542 0004 movel %d2,%a2@(4)
sd->key_table = (rtems_sparse_disk_key *) data;
4c62c: 2541 0016 movel %d1,%a2@(22)
data += key_table_size;
4c630: d287 addl %d7,%d1
4c632: 600c bras 4c640 <rtems_sparse_disk_register+0xaa>
}
return sc;
}
rtems_status_code rtems_sparse_disk_register(
4c634: 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 ) {
4c636: 5280 addql #1,%d0
}
return sc;
}
rtems_status_code rtems_sparse_disk_register(
4c638: 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;
4c63a: 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 ) {
4c63e: d283 addl %d3,%d1
4c640: b480 cmpl %d0,%d2
4c642: 66f0 bnes 4c634 <rtems_sparse_disk_register+0x9e>
sd->key_table[i].data = data;
}
sd->media_block_size = media_block_size;
4c644: 2543 000c movel %d3,%a2@(12)
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
4c648: 203c 0004 c37e movel #312190,%d0
4c64e: 2d4a 0018 movel %a2,%fp@(24)
4c652: 2d45 0010 movel %d5,%fp@(16)
4c656: 2d43 000c movel %d3,%fp@(12)
4c65a: 2d46 0008 movel %d6,%fp@(8)
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c65e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
4c664: 2d40 0014 movel %d0,%fp@(20)
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c668: 4e5e unlk %fp
sparse_disk_delete,
fill_pattern
);
if ( RTEMS_SUCCESSFUL == sc ) {
sc = rtems_blkdev_create(
4c66a: 4ef9 0004 ea08 jmp 4ea08 <rtems_blkdev_create>
sparse_disk_ioctl,
sparse_disk
);
}
} else {
sc = RTEMS_INVALID_NUMBER;
4c670: 700a moveq #10,%d0 <== NOT EXECUTED
4c672: 6002 bras 4c676 <rtems_sparse_disk_register+0xe0><== NOT EXECUTED
{
rtems_status_code sc;
rtems_blkdev_bnum i;
if ( NULL == sd )
return RTEMS_INVALID_ADDRESS;
4c674: 7009 moveq #9,%d0 <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c676: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED
4c67c: 4e5e unlk %fp <== NOT EXECUTED
0005d0b0 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
5d0b0: 4e56 0000 linkw %fp,#0
5d0b4: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
5d0b8: 4aa8 0008 tstl %a0@(8)
5d0bc: 671c beqs 5d0da <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;
5d0be: 4878 0010 pea 10 <INVALID_OPERATION>
5d0c2: 4879 0009 7ea0 pea 97ea0 <Stack_check_Pattern>
5d0c8: 2068 00b2 moveal %a0@(178),%a0
5d0cc: 5088 addql #8,%a0
5d0ce: 2f08 movel %a0,%sp@-
5d0d0: 4eb9 0007 17d8 jsr 717d8 <memcpy>
5d0d6: 4fef 000c lea %sp@(12),%sp
}
5d0da: 4e5e unlk %fp <== NOT EXECUTED
0005d012 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
5d012: 4e56 0000 linkw %fp,#0
5d016: 2f0a movel %a2,%sp@-
5d018: 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 )
5d01c: 4ab9 0009 68ec tstl 968ec <Stack_check_Initialized>
5d022: 6668 bnes 5d08c <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 ];
5d024: 203c feed f00d movel #-17960947,%d0
5d02a: 23c0 0009 7ea0 movel %d0,97ea0 <Stack_check_Pattern>
5d030: 203c 0bad 0d06 movel #195890438,%d0
5d036: 23c0 0009 7ea4 movel %d0,97ea4 <Stack_check_Pattern+0x4>
5d03c: 203c dead f00d movel #-559026163,%d0
5d042: 23c0 0009 7ea8 movel %d0,97ea8 <Stack_check_Pattern+0x8>
5d048: 203c 600d 0d06 movel #1611468038,%d0
5d04e: 23c0 0009 7eac movel %d0,97eac <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) {
5d054: 2039 0009 79a4 movel 979a4 <_Per_CPU_Information>,%d0
5d05a: 6728 beqs 5d084 <rtems_stack_checker_create_extension+0x72><== NEVER TAKEN
5d05c: 2239 0009 79a8 movel 979a8 <_Per_CPU_Information+0x4>,%d1
5d062: 6720 beqs 5d084 <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 -
5d064: 9280 subl %d0,%d1
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
5d066: 2f01 movel %d1,%sp@-
5d068: 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;
5d06c: 23c0 0009 7eb4 movel %d0,97eb4 <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);
5d072: 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 -
5d074: 23c1 0009 7eb0 movel %d1,97eb0 <Stack_check_Interrupt_stack>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
5d07a: 4eb9 0007 193c jsr 7193c <memset>
5d080: 4fef 000c lea %sp@(12),%sp
}
#endif
Stack_check_Initialized = 1;
5d084: 7001 moveq #1,%d0
5d086: 23c0 0009 68ec movel %d0,968ec <Stack_check_Initialized>
Thread_Control *the_thread
)
{
Stack_check_Initialize();
if (the_thread)
5d08c: 4a8a tstl %a2
5d08e: 6716 beqs 5d0a6 <rtems_stack_checker_create_extension+0x94><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
5d090: 2f2a 00ae movel %a2@(174),%sp@-
5d094: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
5d098: 2f2a 00b2 movel %a2@(178),%sp@-
5d09c: 4eb9 0007 193c jsr 7193c <memset>
5d0a2: 4fef 000c lea %sp@(12),%sp
return true;
}
5d0a6: 246e fffc moveal %fp@(-4),%a2
5d0aa: 4e5e unlk %fp
5d0ac: 7001 moveq #1,%d0 <== NOT EXECUTED
0005d1f0 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
5d1f0: 4e56 0000 linkw %fp,#0
5d1f4: 2f0a movel %a2,%sp@-
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
5d1f6: 2479 0009 79b2 moveal 979b2 <_Per_CPU_Information+0xe>,%a2
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5d1fc: 206a 00b2 moveal %a2@(178),%a0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
5d200: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5d202: b1ce cmpal %fp,%a0
5d204: 620e bhis 5d214 <rtems_stack_checker_is_blown+0x24><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
5d206: 2008 movel %a0,%d0
5d208: d0aa 00ae addl %a2@(174),%d0
5d20c: b08e cmpl %fp,%d0
5d20e: 54c2 scc %d2
5d210: 4482 negl %d2
5d212: 6002 bras 5d216 <rtems_stack_checker_is_blown+0x26>
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
5d214: 4202 clrb %d2 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
5d216: 4ab9 0009 68ec tstl 968ec <Stack_check_Initialized>
5d21c: 6736 beqs 5d254 <rtems_stack_checker_is_blown+0x64><== NEVER TAKEN
pattern_ok = (!memcmp(
5d21e: 4878 0010 pea 10 <INVALID_OPERATION>
5d222: 4879 0009 7ea0 pea 97ea0 <Stack_check_Pattern>
5d228: 4868 0008 pea %a0@(8)
5d22c: 4eb9 0007 1748 jsr 71748 <memcmp>
5d232: 4fef 000c lea %sp@(12),%sp
5d236: 4a80 tstl %d0
5d238: 57c0 seq %d0
5d23a: 4480 negl %d0
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
5d23c: 4a02 tstb %d2
5d23e: 6704 beqs 5d244 <rtems_stack_checker_is_blown+0x54><== NEVER TAKEN
5d240: 4a00 tstb %d0
5d242: 6616 bnes 5d25a <rtems_stack_checker_is_blown+0x6a><== ALWAYS TAKEN
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
5d244: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
5d24a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5d24c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5d24e: 4eb9 0005 d0de jsr 5d0de <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;
5d254: 7001 moveq #1,%d0 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
5d256: 4a02 tstb %d2 <== NOT EXECUTED
5d258: 67ea beqs 5d244 <rtems_stack_checker_is_blown+0x54><== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
5d25a: 242e fff8 movel %fp@(-8),%d2
5d25e: 246e fffc moveal %fp@(-4),%a2
5d262: 4e5e unlk %fp
5d264: 4200 clrb %d0 <== NOT EXECUTED
0005d2ca <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
5d2ca: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
5d2ce: 4879 0005 f11c pea 5f11c <printk_plugin> <== NOT EXECUTED
5d2d4: 42a7 clrl %sp@- <== NOT EXECUTED
5d2d6: 4eb9 0005 d268 jsr 5d268 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
5d2dc: 508f addql #8,%sp <== NOT EXECUTED
}
5d2de: 4e5e unlk %fp <== NOT EXECUTED
...
0005d268 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5d268: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
5d26c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5d26e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
5d272: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5d274: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
if ( !print )
5d278: 4a8a tstl %a2 <== NOT EXECUTED
5d27a: 6742 beqs 5d2be <rtems_stack_checker_report_usage_with_plugin+0x56><== NOT EXECUTED
return;
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
5d27c: 4879 0008 e16a pea 8e16a <RTEMS_BDPART_MBR_MASTER_TYPE+0x3c3><== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
5d282: 23c2 0009 68f0 movel %d2,968f0 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
5d288: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
if ( !print )
return;
print_context = context;
print_handler = print;
5d28a: 23ca 0009 68f4 movel %a2,968f4 <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
5d290: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
5d292: 4879 0008 e181 pea 8e181 <RTEMS_BDPART_MBR_MASTER_TYPE+0x3da><== NOT EXECUTED
5d298: 2f02 movel %d2,%sp@- <== NOT EXECUTED
5d29a: 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 );
5d29c: 487a fc52 pea %pc@(5cef0 <Stack_check_Dump_threads_usage>)<== NOT EXECUTED
5d2a0: 4eb9 0006 0e4c jsr 60e4c <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);
5d2a6: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
5d2aa: 4eba fc44 jsr %pc@(5cef0 <Stack_check_Dump_threads_usage>)<== NOT EXECUTED
#endif
print_context = NULL;
print_handler = NULL;
5d2ae: 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;
5d2b2: 42b9 0009 68f0 clrl 968f0 <print_context> <== NOT EXECUTED
print_handler = NULL;
5d2b8: 42b9 0009 68f4 clrl 968f4 <print_handler> <== NOT EXECUTED
}
5d2be: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
5d2c2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
5d2c6: 4e5e unlk %fp <== NOT EXECUTED
0005d188 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
5d188: 4e56 0000 linkw %fp,#0
5d18c: 2f0a movel %a2,%sp@-
5d18e: 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);
5d192: 222a 00b2 movel %a2@(178),%d1
5d196: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5d198: 202a 00b2 movel %a2@(178),%d0
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
5d19c: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5d19e: b08e cmpl %fp,%d0
5d1a0: 620c bhis 5d1ae <rtems_stack_checker_switch_extension+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
5d1a2: d0aa 00ae addl %a2@(174),%d0
5d1a6: b08e cmpl %fp,%d0
5d1a8: 54c2 scc %d2
5d1aa: 4482 negl %d2
5d1ac: 6002 bras 5d1b0 <rtems_stack_checker_switch_extension+0x28>
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
5d1ae: 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,
5d1b0: 4878 0010 pea 10 <INVALID_OPERATION>
5d1b4: 4879 0009 7ea0 pea 97ea0 <Stack_check_Pattern>
5d1ba: 2f01 movel %d1,%sp@-
5d1bc: 4eb9 0007 1748 jsr 71748 <memcmp>
5d1c2: 4fef 000c lea %sp@(12),%sp
5d1c6: 4a80 tstl %d0
5d1c8: 57c0 seq %d0
5d1ca: 4480 negl %d0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
5d1cc: 4a02 tstb %d2
5d1ce: 6704 beqs 5d1d4 <rtems_stack_checker_switch_extension+0x4c><== NEVER TAKEN
5d1d0: 4a00 tstb %d0
5d1d2: 6610 bnes 5d1e4 <rtems_stack_checker_switch_extension+0x5c><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
5d1d4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
5d1da: 2f00 movel %d0,%sp@- <== NOT EXECUTED
5d1dc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5d1de: 4eb9 0005 d0de jsr 5d0de <Stack_check_report_blown_task> <== NOT EXECUTED
}
}
5d1e4: 242e fff8 movel %fp@(-8),%d2
5d1e8: 246e fffc moveal %fp@(-4),%a2
5d1ec: 4e5e unlk %fp <== NOT EXECUTED
0004c5bc <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
4c5bc: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4c5c0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
4c5c4: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED
4c5c8: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4c5cc: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
double result;
char *end;
if ( !n )
4c5d0: 4a8a tstl %a2 <== NOT EXECUTED
4c5d2: 6700 009c beqw 4c670 <rtems_string_to_double+0xb4> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c5d6: 4eb9 0004 ef9c jsr 4ef9c <__errno> <== NOT EXECUTED
*n = 0;
4c5dc: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c5de: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4c5e0: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c5e2: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
4c5e4: 2480 movel %d0,%a2@ <== NOT EXECUTED
4c5e6: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
result = strtod( s, &end );
4c5ea: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4c5ee: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4c5f0: 4eb9 0005 19cc jsr 519cc <strtod> <== NOT EXECUTED
if ( endptr )
4c5f6: 508f addql #8,%sp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
4c5f8: 2400 movel %d0,%d2 <== NOT EXECUTED
4c5fa: 2601 movel %d1,%d3 <== NOT EXECUTED
if ( endptr )
4c5fc: 4a8b tstl %a3 <== NOT EXECUTED
4c5fe: 6704 beqs 4c604 <rtems_string_to_double+0x48> <== NOT EXECUTED
*endptr = end;
4c600: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED
if ( end == s )
4c604: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED
4c608: 676a beqs 4c674 <rtems_string_to_double+0xb8> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c60a: 4eb9 0004 ef9c jsr 4ef9c <__errno> <== NOT EXECUTED
4c610: 7222 moveq #34,%d1 <== NOT EXECUTED
4c612: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c614: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4c616: 664e bnes 4c666 <rtems_string_to_double+0xaa> <== NOT EXECUTED
4c618: 42a7 clrl %sp@- <== NOT EXECUTED
4c61a: 42a7 clrl %sp@- <== NOT EXECUTED
4c61c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c61e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c620: 4eb9 0005 d4e4 jsr 5d4e4 <__eqdf2> <== NOT EXECUTED
4c626: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c62a: 4a80 tstl %d0 <== NOT EXECUTED
4c62c: 674a beqs 4c678 <rtems_string_to_double+0xbc> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
4c62e: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4c632: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED
4c638: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c63a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c63c: 4eb9 0005 d508 jsr 5d508 <__gtdf2> <== NOT EXECUTED
4c642: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c646: 4a80 tstl %d0 <== NOT EXECUTED
4c648: 6e2e bgts 4c678 <rtems_string_to_double+0xbc> <== NOT EXECUTED
4c64a: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4c64e: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED
4c654: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4c656: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4c658: 4eb9 0005 d550 jsr 5d550 <__ltdf2> <== NOT EXECUTED
4c65e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4c662: 4a80 tstl %d0 <== NOT EXECUTED
4c664: 6d12 blts 4c678 <rtems_string_to_double+0xbc> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
4c666: 2482 movel %d2,%a2@ <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
4c668: 4280 clrl %d0 <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4c66a: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED
4c66e: 600a bras 4c67a <rtems_string_to_double+0xbe> <== NOT EXECUTED
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c670: 7009 moveq #9,%d0 <== NOT EXECUTED
4c672: 6006 bras 4c67a <rtems_string_to_double+0xbe> <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c674: 700b moveq #11,%d0 <== NOT EXECUTED
4c676: 6002 bras 4c67a <rtems_string_to_double+0xbe> <== NOT EXECUTED
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
4c678: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4c67a: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED
4c680: 4e5e unlk %fp <== NOT EXECUTED
0004c684 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
4c684: 4e56 ffec linkw %fp,#-20
4c688: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4c68c: 262e 0008 movel %fp@(8),%d3
4c690: 246e 000c moveal %fp@(12),%a2
4c694: 266e 0010 moveal %fp@(16),%a3
float result;
char *end;
if ( !n )
4c698: 4a8a tstl %a2
4c69a: 677e beqs 4c71a <rtems_string_to_float+0x96>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c69c: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c6a2: 2040 moveal %d0,%a0
4c6a4: 4290 clrl %a0@
*n = 0;
4c6a6: 24bc 0000 0000 movel #0,%a2@
result = strtof( s, &end );
4c6ac: 486e fffc pea %fp@(-4)
4c6b0: 2f03 movel %d3,%sp@-
4c6b2: 4eb9 0005 19ec jsr 519ec <strtof>
if ( endptr )
4c6b8: 508f addql #8,%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
4c6ba: 2400 movel %d0,%d2
if ( endptr )
4c6bc: 4a8b tstl %a3
4c6be: 6704 beqs 4c6c4 <rtems_string_to_float+0x40>
*endptr = end;
4c6c0: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c6c4: b6ae fffc cmpl %fp@(-4),%d3
4c6c8: 6754 beqs 4c71e <rtems_string_to_float+0x9a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c6ca: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c6d0: 7222 moveq #34,%d1
4c6d2: 2040 moveal %d0,%a0
4c6d4: b290 cmpl %a0@,%d1
4c6d6: 663c bnes 4c714 <rtems_string_to_float+0x90>
4c6d8: 2f3c 0000 0000 movel #0,%sp@-
4c6de: 2f02 movel %d2,%sp@-
4c6e0: 4eb9 0005 d598 jsr 5d598 <__eqsf2>
4c6e6: 508f addql #8,%sp
4c6e8: 4a80 tstl %d0
4c6ea: 6736 beqs 4c722 <rtems_string_to_float+0x9e> <== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
4c6ec: 2f3c 7f7f ffff movel #2139095039,%sp@-
4c6f2: 2f02 movel %d2,%sp@-
4c6f4: 4eb9 0005 d5b4 jsr 5d5b4 <__gtsf2>
4c6fa: 508f addql #8,%sp
4c6fc: 4a80 tstl %d0
4c6fe: 6e22 bgts 4c722 <rtems_string_to_float+0x9e> <== NEVER TAKEN
4c700: 2f3c ff7f ffff movel #-8388609,%sp@-
4c706: 2f02 movel %d2,%sp@-
4c708: 4eb9 0005 d5d0 jsr 5d5d0 <__ltsf2>
4c70e: 508f addql #8,%sp
4c710: 4a80 tstl %d0
4c712: 6d0e blts 4c722 <rtems_string_to_float+0x9e> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
4c714: 2482 movel %d2,%a2@
return RTEMS_SUCCESSFUL;
4c716: 4280 clrl %d0
4c718: 600a bras 4c724 <rtems_string_to_float+0xa0>
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c71a: 7009 moveq #9,%d0
4c71c: 6006 bras 4c724 <rtems_string_to_float+0xa0>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c71e: 700b moveq #11,%d0
4c720: 6002 bras 4c724 <rtems_string_to_float+0xa0>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
4c722: 700a moveq #10,%d0 <== NOT EXECUTED
*n = result;
return RTEMS_SUCCESSFUL;
}
4c724: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c72a: 4e5e unlk %fp
...
00058c2c <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
58c2c: 4e56 ffec linkw %fp,#-20
58c30: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
58c34: 262e 0008 movel %fp@(8),%d3
58c38: 246e 000c moveal %fp@(12),%a2
58c3c: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
58c40: 4a8a tstl %a2
58c42: 6758 beqs 58c9c <rtems_string_to_int+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
58c44: 4eb9 0006 e674 jsr 6e674 <__errno>
58c4a: 2040 moveal %d0,%a0
58c4c: 4290 clrl %a0@
*n = 0;
58c4e: 4292 clrl %a2@
result = strtol( s, &end, base );
58c50: 2f2e 0014 movel %fp@(20),%sp@-
58c54: 486e fffc pea %fp@(-4)
58c58: 2f03 movel %d3,%sp@-
58c5a: 4eb9 0007 597e jsr 7597e <strtol>
if ( endptr )
58c60: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
58c64: 2400 movel %d0,%d2
if ( endptr )
58c66: 4a8b tstl %a3
58c68: 6704 beqs 58c6e <rtems_string_to_int+0x42>
*endptr = end;
58c6a: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
58c6e: b6ae fffc cmpl %fp@(-4),%d3
58c72: 672c beqs 58ca0 <rtems_string_to_int+0x74>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
58c74: 4eb9 0006 e674 jsr 6e674 <__errno>
58c7a: 7222 moveq #34,%d1
58c7c: 2040 moveal %d0,%a0
58c7e: b290 cmpl %a0@,%d1
58c80: 6614 bnes 58c96 <rtems_string_to_int+0x6a>
58c82: 4a82 tstl %d2
58c84: 671e beqs 58ca4 <rtems_string_to_int+0x78> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
58c86: 0c82 7fff ffff cmpil #2147483647,%d2
58c8c: 6716 beqs 58ca4 <rtems_string_to_int+0x78>
58c8e: 0c82 8000 0000 cmpil #-2147483648,%d2
58c94: 670e beqs 58ca4 <rtems_string_to_int+0x78> <== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
58c96: 2482 movel %d2,%a2@
return RTEMS_SUCCESSFUL;
58c98: 4280 clrl %d0
58c9a: 600a bras 58ca6 <rtems_string_to_int+0x7a>
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
58c9c: 7009 moveq #9,%d0
58c9e: 6006 bras 58ca6 <rtems_string_to_int+0x7a>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
58ca0: 700b moveq #11,%d0
58ca2: 6002 bras 58ca6 <rtems_string_to_int+0x7a>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
58ca4: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
58ca6: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
58cac: 4e5e unlk %fp <== NOT EXECUTED
0004c854 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
4c854: 4e56 ffec linkw %fp,#-20
4c858: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4c85c: 262e 0008 movel %fp@(8),%d3
4c860: 246e 000c moveal %fp@(12),%a2
4c864: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4c868: 4a8a tstl %a2
4c86a: 6758 beqs 4c8c4 <rtems_string_to_long+0x70>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c86c: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c872: 2040 moveal %d0,%a0
4c874: 4290 clrl %a0@
*n = 0;
4c876: 4292 clrl %a2@
result = strtol( s, &end, base );
4c878: 2f2e 0014 movel %fp@(20),%sp@-
4c87c: 486e fffc pea %fp@(-4)
4c880: 2f03 movel %d3,%sp@-
4c882: 4eb9 0005 1bce jsr 51bce <strtol>
if ( endptr )
4c888: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4c88c: 2400 movel %d0,%d2
if ( endptr )
4c88e: 4a8b tstl %a3
4c890: 6704 beqs 4c896 <rtems_string_to_long+0x42>
*endptr = end;
4c892: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c896: b6ae fffc cmpl %fp@(-4),%d3
4c89a: 672c beqs 4c8c8 <rtems_string_to_long+0x74>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c89c: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c8a2: 7222 moveq #34,%d1
4c8a4: 2040 moveal %d0,%a0
4c8a6: b290 cmpl %a0@,%d1
4c8a8: 6614 bnes 4c8be <rtems_string_to_long+0x6a>
4c8aa: 4a82 tstl %d2
4c8ac: 671e beqs 4c8cc <rtems_string_to_long+0x78> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
4c8ae: 0c82 7fff ffff cmpil #2147483647,%d2
4c8b4: 6716 beqs 4c8cc <rtems_string_to_long+0x78>
4c8b6: 0c82 8000 0000 cmpil #-2147483648,%d2
4c8bc: 670e beqs 4c8cc <rtems_string_to_long+0x78> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
4c8be: 2482 movel %d2,%a2@
return RTEMS_SUCCESSFUL;
4c8c0: 4280 clrl %d0
4c8c2: 600a bras 4c8ce <rtems_string_to_long+0x7a>
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c8c4: 7009 moveq #9,%d0
4c8c6: 6006 bras 4c8ce <rtems_string_to_long+0x7a>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c8c8: 700b moveq #11,%d0
4c8ca: 6002 bras 4c8ce <rtems_string_to_long+0x7a>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4c8cc: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4c8ce: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c8d4: 4e5e unlk %fp <== NOT EXECUTED
0004c7b4 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
4c7b4: 4e56 ffe8 linkw %fp,#-24
4c7b8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
4c7bc: 282e 0008 movel %fp@(8),%d4
4c7c0: 246e 000c moveal %fp@(12),%a2
4c7c4: 266e 0010 moveal %fp@(16),%a3
long long result;
char *end;
if ( !n )
4c7c8: 4a8a tstl %a2
4c7ca: 6774 beqs 4c840 <rtems_string_to_long_long+0x8c> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c7cc: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c7d2: 2040 moveal %d0,%a0
*n = 0;
4c7d4: 4280 clrl %d0
4c7d6: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c7d8: 4290 clrl %a0@
*n = 0;
4c7da: 2480 movel %d0,%a2@
4c7dc: 2541 0004 movel %d1,%a2@(4)
result = strtoll( s, &end, base );
4c7e0: 2f2e 0014 movel %fp@(20),%sp@-
4c7e4: 486e fffc pea %fp@(-4)
4c7e8: 2f04 movel %d4,%sp@-
4c7ea: 4eb9 0005 1bf0 jsr 51bf0 <strtoll>
if ( endptr )
4c7f0: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
4c7f4: 2400 movel %d0,%d2
4c7f6: 2601 movel %d1,%d3
if ( endptr )
4c7f8: 4a8b tstl %a3
4c7fa: 6704 beqs 4c800 <rtems_string_to_long_long+0x4c> <== NEVER TAKEN
*endptr = end;
4c7fc: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c800: b8ae fffc cmpl %fp@(-4),%d4
4c804: 673e beqs 4c844 <rtems_string_to_long_long+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c806: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c80c: 7222 moveq #34,%d1
4c80e: 2040 moveal %d0,%a0
4c810: b290 cmpl %a0@,%d1
4c812: 6622 bnes 4c836 <rtems_string_to_long_long+0x82>
4c814: 2002 movel %d2,%d0
4c816: 8083 orl %d3,%d0
4c818: 672e beqs 4c848 <rtems_string_to_long_long+0x94> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
4c81a: 203c 7fff ffff movel #2147483647,%d0
4c820: 72ff moveq #-1,%d1
4c822: 9283 subl %d3,%d1
4c824: 9182 subxl %d2,%d0
4c826: 6720 beqs 4c848 <rtems_string_to_long_long+0x94>
4c828: 203c 8000 0000 movel #-2147483648,%d0
4c82e: 4281 clrl %d1
4c830: 9283 subl %d3,%d1
4c832: 9182 subxl %d2,%d0
4c834: 6712 beqs 4c848 <rtems_string_to_long_long+0x94> <== ALWAYS TAKEN
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4c836: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4c838: 2482 movel %d2,%a2@
4c83a: 2543 0004 movel %d3,%a2@(4)
4c83e: 600a bras 4c84a <rtems_string_to_long_long+0x96>
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c840: 7009 moveq #9,%d0
4c842: 6006 bras 4c84a <rtems_string_to_long_long+0x96>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c844: 700b moveq #11,%d0
4c846: 6002 bras 4c84a <rtems_string_to_long_long+0x96>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
4c848: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4c84a: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
4c850: 4e5e unlk %fp <== NOT EXECUTED
00058ccc <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
58ccc: 4e56 ffec linkw %fp,#-20
58cd0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
58cd4: 262e 0008 movel %fp@(8),%d3
58cd8: 246e 000c moveal %fp@(12),%a2
58cdc: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
58ce0: 4a8a tstl %a2
58ce2: 6764 beqs 58d48 <rtems_string_to_unsigned_char+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
58ce4: 4eb9 0006 e674 jsr 6e674 <__errno>
58cea: 2040 moveal %d0,%a0
58cec: 4290 clrl %a0@
*n = 0;
58cee: 4212 clrb %a2@
result = strtoul( s, &end, base );
58cf0: 2f2e 0014 movel %fp@(20),%sp@-
58cf4: 486e fffc pea %fp@(-4)
58cf8: 2f03 movel %d3,%sp@-
58cfa: 4eb9 0007 5e22 jsr 75e22 <strtoul>
if ( endptr )
58d00: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
58d04: 2400 movel %d0,%d2
if ( endptr )
58d06: 4a8b tstl %a3
58d08: 6704 beqs 58d0e <rtems_string_to_unsigned_char+0x42>
*endptr = end;
58d0a: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
58d0e: b6ae fffc cmpl %fp@(-4),%d3
58d12: 6738 beqs 58d4c <rtems_string_to_unsigned_char+0x80>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
58d14: 4eb9 0006 e674 jsr 6e674 <__errno>
58d1a: 7222 moveq #34,%d1
58d1c: 2040 moveal %d0,%a0
58d1e: b290 cmpl %a0@,%d1
58d20: 660a bnes 58d2c <rtems_string_to_unsigned_char+0x60>
(( result == 0 ) || ( result == ULONG_MAX )))
58d22: 2002 movel %d2,%d0
58d24: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
58d26: 72fd moveq #-3,%d1
58d28: b280 cmpl %d0,%d1
58d2a: 6524 bcss 58d50 <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 ) {
58d2c: 0c82 0000 00ff cmpil #255,%d2
58d32: 630e blss 58d42 <rtems_string_to_unsigned_char+0x76>
errno = ERANGE;
58d34: 4eb9 0006 e674 jsr 6e674 <__errno>
58d3a: 2040 moveal %d0,%a0
58d3c: 7022 moveq #34,%d0
58d3e: 2080 movel %d0,%a0@
58d40: 600e bras 58d50 <rtems_string_to_unsigned_char+0x84>
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
58d42: 4280 clrl %d0
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
58d44: 1482 moveb %d2,%a2@
58d46: 600a bras 58d52 <rtems_string_to_unsigned_char+0x86>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
58d48: 7009 moveq #9,%d0
58d4a: 6006 bras 58d52 <rtems_string_to_unsigned_char+0x86>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
58d4c: 700b moveq #11,%d0
58d4e: 6002 bras 58d52 <rtems_string_to_unsigned_char+0x86>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
58d50: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
58d52: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
58d58: 4e5e unlk %fp <== NOT EXECUTED
0004c984 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
4c984: 4e56 ffec linkw %fp,#-20
4c988: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4c98c: 242e 0008 movel %fp@(8),%d2
4c990: 246e 000c moveal %fp@(12),%a2
4c994: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4c998: 4a8a tstl %a2
4c99a: 674e beqs 4c9ea <rtems_string_to_unsigned_int+0x66>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4c99c: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c9a2: 2040 moveal %d0,%a0
4c9a4: 4290 clrl %a0@
*n = 0;
4c9a6: 4292 clrl %a2@
result = strtoul( s, &end, base );
4c9a8: 2f2e 0014 movel %fp@(20),%sp@-
4c9ac: 486e fffc pea %fp@(-4)
4c9b0: 2f02 movel %d2,%sp@-
4c9b2: 4eb9 0005 2072 jsr 52072 <strtoul>
if ( endptr )
4c9b8: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4c9bc: 2600 movel %d0,%d3
if ( endptr )
4c9be: 4a8b tstl %a3
4c9c0: 6704 beqs 4c9c6 <rtems_string_to_unsigned_int+0x42>
*endptr = end;
4c9c2: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4c9c6: b4ae fffc cmpl %fp@(-4),%d2
4c9ca: 6722 beqs 4c9ee <rtems_string_to_unsigned_int+0x6a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c9cc: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4c9d2: 7222 moveq #34,%d1
4c9d4: 2040 moveal %d0,%a0
4c9d6: b290 cmpl %a0@,%d1
4c9d8: 660a bnes 4c9e4 <rtems_string_to_unsigned_int+0x60>
(( result == 0 ) || ( result == ULONG_MAX )))
4c9da: 2003 movel %d3,%d0
4c9dc: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4c9de: 72fd moveq #-3,%d1
4c9e0: b280 cmpl %d0,%d1
4c9e2: 650e bcss 4c9f2 <rtems_string_to_unsigned_int+0x6e><== ALWAYS TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4c9e4: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
4c9e6: 4280 clrl %d0
4c9e8: 600a bras 4c9f4 <rtems_string_to_unsigned_int+0x70>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4c9ea: 7009 moveq #9,%d0
4c9ec: 6006 bras 4c9f4 <rtems_string_to_unsigned_int+0x70>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4c9ee: 700b moveq #11,%d0
4c9f0: 6002 bras 4c9f4 <rtems_string_to_unsigned_int+0x70>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
4c9f2: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4c9f4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c9fa: 4e5e unlk %fp
...
00049c10 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
49c10: 4e56 ffec linkw %fp,#-20
49c14: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
49c18: 242e 0008 movel %fp@(8),%d2
49c1c: 246e 000c moveal %fp@(12),%a2
49c20: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
49c24: 4a8a tstl %a2
49c26: 674e beqs 49c76 <rtems_string_to_unsigned_long+0x66>
return RTEMS_INVALID_ADDRESS;
errno = 0;
49c28: 4eb9 0006 e674 jsr 6e674 <__errno>
49c2e: 2040 moveal %d0,%a0
49c30: 4290 clrl %a0@
*n = 0;
49c32: 4292 clrl %a2@
result = strtoul( s, &end, base );
49c34: 2f2e 0014 movel %fp@(20),%sp@-
49c38: 486e fffc pea %fp@(-4)
49c3c: 2f02 movel %d2,%sp@-
49c3e: 4eb9 0007 5e22 jsr 75e22 <strtoul>
if ( endptr )
49c44: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
49c48: 2600 movel %d0,%d3
if ( endptr )
49c4a: 4a8b tstl %a3
49c4c: 6704 beqs 49c52 <rtems_string_to_unsigned_long+0x42>
*endptr = end;
49c4e: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
49c52: b4ae fffc cmpl %fp@(-4),%d2
49c56: 6722 beqs 49c7a <rtems_string_to_unsigned_long+0x6a>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
49c58: 4eb9 0006 e674 jsr 6e674 <__errno>
49c5e: 7222 moveq #34,%d1
49c60: 2040 moveal %d0,%a0
49c62: b290 cmpl %a0@,%d1
49c64: 660a bnes 49c70 <rtems_string_to_unsigned_long+0x60>
(( result == 0 ) || ( result == ULONG_MAX )))
49c66: 2003 movel %d3,%d0
49c68: 5380 subql #1,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
49c6a: 72fd moveq #-3,%d1
49c6c: b280 cmpl %d0,%d1
49c6e: 650e bcss 49c7e <rtems_string_to_unsigned_long+0x6e><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
49c70: 2483 movel %d3,%a2@
return RTEMS_SUCCESSFUL;
49c72: 4280 clrl %d0
49c74: 600a bras 49c80 <rtems_string_to_unsigned_long+0x70>
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
49c76: 7009 moveq #9,%d0
49c78: 6006 bras 49c80 <rtems_string_to_unsigned_long+0x70>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
49c7a: 700b moveq #11,%d0
49c7c: 6002 bras 49c80 <rtems_string_to_unsigned_long+0x70>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
49c7e: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
49c80: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
49c86: 4e5e unlk %fp
...
0004ca00 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
4ca00: 4e56 ffe4 linkw %fp,#-28
4ca04: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4ca08: 282e 0008 movel %fp@(8),%d4
4ca0c: 246e 000c moveal %fp@(12),%a2
4ca10: 266e 0010 moveal %fp@(16),%a3
unsigned long long result;
char *end;
if ( !n )
4ca14: 4a8a tstl %a2
4ca16: 6764 beqs 4ca7c <rtems_string_to_unsigned_long_long+0x7c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4ca18: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4ca1e: 2040 moveal %d0,%a0
*n = 0;
4ca20: 4280 clrl %d0
4ca22: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4ca24: 4290 clrl %a0@
*n = 0;
4ca26: 2480 movel %d0,%a2@
4ca28: 2541 0004 movel %d1,%a2@(4)
result = strtoull( s, &end, base );
4ca2c: 2f2e 0014 movel %fp@(20),%sp@-
4ca30: 486e fffc pea %fp@(-4)
4ca34: 2f04 movel %d4,%sp@-
4ca36: 4eb9 0005 2094 jsr 52094 <strtoull>
if ( endptr )
4ca3c: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
4ca40: 2400 movel %d0,%d2
4ca42: 2601 movel %d1,%d3
if ( endptr )
4ca44: 4a8b tstl %a3
4ca46: 6704 beqs 4ca4c <rtems_string_to_unsigned_long_long+0x4c>
*endptr = end;
4ca48: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4ca4c: b8ae fffc cmpl %fp@(-4),%d4
4ca50: 672e beqs 4ca80 <rtems_string_to_unsigned_long_long+0x80>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4ca52: 4eb9 0004 ef9c jsr 4ef9c <__errno>
4ca58: 7222 moveq #34,%d1
4ca5a: 2040 moveal %d0,%a0
4ca5c: b290 cmpl %a0@,%d1
4ca5e: 6612 bnes 4ca72 <rtems_string_to_unsigned_long_long+0x72>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4ca60: 70ff moveq #-1,%d0
4ca62: 72ff moveq #-1,%d1
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4ca64: 78ff moveq #-1,%d4
4ca66: 7afd moveq #-3,%d5
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
4ca68: d283 addl %d3,%d1
4ca6a: d182 addxl %d2,%d0
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4ca6c: 9a81 subl %d1,%d5
4ca6e: 9980 subxl %d0,%d4
4ca70: 6512 bcss 4ca84 <rtems_string_to_unsigned_long_long+0x84><== ALWAYS TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4ca72: 4280 clrl %d0
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4ca74: 2482 movel %d2,%a2@
4ca76: 2543 0004 movel %d3,%a2@(4)
4ca7a: 600a bras 4ca86 <rtems_string_to_unsigned_long_long+0x86>
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4ca7c: 7009 moveq #9,%d0
4ca7e: 6006 bras 4ca86 <rtems_string_to_unsigned_long_long+0x86>
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
4ca80: 700b moveq #11,%d0
4ca82: 6002 bras 4ca86 <rtems_string_to_unsigned_long_long+0x86>
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
4ca84: 700a moveq #10,%d0
*n = result;
return RTEMS_SUCCESSFUL;
}
4ca86: 4cee 0c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a3
4ca8c: 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 0006 0b58 cmpil #396120,%d0
42614: 670a beqs 42620 <rtems_tarfs_load+0x50>
rootloc.mt_entry->ops != &IMFS_ops
&& rootloc.mt_entry->ops != &fifoIMFS_ops
42616: 0c80 0006 1546 cmpil #398662,%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 13ac lea 513ac <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 0006 0bdc pea 60bdc <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 9e00 lea 49e00 <_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 14a8 jsr 514a8 <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 9e44 jsr 49e44 <_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 0005 0e88 jsr 50e88 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
426ea: 2f03 movel %d3,%sp@-
426ec: 4eb9 0005 1390 jsr 51390 <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 da59 pea 5da59 <_rodata_start+0x19> <== NOT EXECUTED
4270c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4270e: 4eb9 0005 0d60 jsr 50d60 <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 0005 0d60 jsr 50d60 <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 1390 jsr 51390 <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 12ce movel #398030,%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 a4a4 jsr 4a4a4 <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
...
0004e9c0 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4e9c0: 4e56 ffe4 linkw %fp,#-28
4e9c4: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4e9c8: 262e 0008 movel %fp@(8),%d3
4e9cc: 282e 000c movel %fp@(12),%d4
4e9d0: 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 )
4e9d4: 4a8c tstl %a4
4e9d6: 6700 0108 beqw 4eae0 <rtems_task_mode+0x120>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4e9da: 2679 0006 2c52 moveal 62c52 <_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;
4e9e0: 4a2b 0070 tstb %a3@(112)
4e9e4: 57c2 seq %d2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4e9e6: 246b 00fa moveal %a3@(250),%a2
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4e9ea: 49c2 extbl %d2
4e9ec: 0282 0000 0100 andil #256,%d2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4e9f2: 4aab 0076 tstl %a3@(118)
4e9f6: 6704 beqs 4e9fc <rtems_task_mode+0x3c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4e9f8: 08c2 0009 bset #9,%d2
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4e9fc: 4a2a 0008 tstb %a2@(8)
4ea00: 57c5 seq %d5
old_mode |= _ISR_Get_level();
4ea02: 4eb9 0004 a81c jsr 4a81c <_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;
4ea08: 49c5 extbl %d5
4ea0a: 0285 0000 0400 andil #1024,%d5
4ea10: 8085 orl %d5,%d0
old_mode |= _ISR_Get_level();
4ea12: 8082 orl %d2,%d0
4ea14: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4ea16: 0804 0008 btst #8,%d4
4ea1a: 670e beqs 4ea2a <rtems_task_mode+0x6a>
4ea1c: 2203 movel %d3,%d1
4ea1e: 7001 moveq #1,%d0
4ea20: e089 lsrl #8,%d1
4ea22: b181 eorl %d0,%d1
4ea24: c280 andl %d0,%d1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4ea26: 1741 0070 moveb %d1,%a3@(112)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4ea2a: 0804 0009 btst #9,%d4
4ea2e: 671c beqs 4ea4c <rtems_task_mode+0x8c>
if ( _Modes_Is_timeslice(mode_set) ) {
4ea30: 0803 0009 btst #9,%d3
4ea34: 6712 beqs 4ea48 <rtems_task_mode+0x88>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ea36: 41f9 0006 27c2 lea 627c2 <_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;
4ea3c: 7201 moveq #1,%d1
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ea3e: 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;
4ea42: 2741 0076 movel %d1,%a3@(118)
4ea46: 6004 bras 4ea4c <rtems_task_mode+0x8c>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4ea48: 42ab 0076 clrl %a3@(118)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ea4c: 7007 moveq #7,%d0
4ea4e: c084 andl %d4,%d0
4ea50: 6712 beqs 4ea64 <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 ) );
4ea52: 40c1 movew %sr,%d1
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4ea54: 7007 moveq #7,%d0
4ea56: 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 ) );
4ea58: 0281 0000 f8ff andil #63743,%d1
4ea5e: e188 lsll #8,%d0
4ea60: 8280 orl %d0,%d1
4ea62: 46c1 movew %d1,%sr
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4ea64: 0804 000a btst #10,%d4
4ea68: 6742 beqs 4eaac <rtems_task_mode+0xec>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
4ea6a: 720a moveq #10,%d1
4ea6c: 2003 movel %d3,%d0
4ea6e: e2a8 lsrl %d1,%d0
4ea70: 123c 0001 moveb #1,%d1
4ea74: b380 eorl %d1,%d0
4ea76: c081 andl %d1,%d0
if ( is_asr_enabled != asr->is_enabled ) {
4ea78: 4281 clrl %d1
4ea7a: 122a 0008 moveb %a2@(8),%d1
4ea7e: b280 cmpl %d0,%d1
4ea80: 672a beqs 4eaac <rtems_task_mode+0xec>
asr->is_enabled = is_asr_enabled;
4ea82: 1540 0008 moveb %d0,%a2@(8)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4ea86: 203c 0000 0700 movel #1792,%d0
4ea8c: 40c1 movew %sr,%d1
4ea8e: 8081 orl %d1,%d0
4ea90: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4ea92: 202a 0016 movel %a2@(22),%d0
information->signals_pending = information->signals_posted;
4ea96: 256a 0012 0016 movel %a2@(18),%a2@(22)
information->signals_posted = _signals;
4ea9c: 2540 0012 movel %d0,%a2@(18)
_ISR_Enable( _level );
4eaa0: 46c1 movew %d1,%sr
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
4eaa2: 4aaa 0012 tstl %a2@(18)
4eaa6: 56c0 sne %d0
4eaa8: 4480 negl %d0
4eaaa: 6002 bras 4eaae <rtems_task_mode+0xee>
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4eaac: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4eaae: 7203 moveq #3,%d1
4eab0: b2b9 0006 2c3e cmpl 62c3e <_System_state_Current>,%d1
4eab6: 662c bnes 4eae4 <rtems_task_mode+0x124>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4eab8: 2079 0006 2c52 moveal 62c52 <_Per_CPU_Information+0xe>,%a0
if ( are_signals_pending ||
4eabe: 4a00 tstb %d0
4eac0: 660e bnes 4ead0 <rtems_task_mode+0x110>
4eac2: b1f9 0006 2c56 cmpal 62c56 <_Per_CPU_Information+0x12>,%a0
4eac8: 671a beqs 4eae4 <rtems_task_mode+0x124>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
4eaca: 4a28 0070 tstb %a0@(112)
4eace: 6714 beqs 4eae4 <rtems_task_mode+0x124> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
4ead0: 7001 moveq #1,%d0
4ead2: 13c0 0006 2c50 moveb %d0,62c50 <_Per_CPU_Information+0xc>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
4ead8: 4eb9 0004 97cc jsr 497cc <_Thread_Dispatch>
4eade: 6004 bras 4eae4 <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;
4eae0: 7009 moveq #9,%d0
4eae2: 6002 bras 4eae6 <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;
4eae4: 4280 clrl %d0
}
4eae6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4eaec: 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 0006 0dfc moveb 60dfc <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 bf88 jsr 4bf88 <_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 bb18 jsr 4bb18 <_Thread_Change_priority>
49e4e: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
49e52: 4eb9 0004 bf68 jsr 4bf68 <_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 6414 jsr 46414 <_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 0106 moveal %a1@(262),%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 63f4 jsr 463f4 <_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 63f4 jsr 463f4 <_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 edf8 movel 5edf8 <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 e5cc addil #386508,%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 69f0 jsr 469f0 <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 edfc movel %a0,5edfc <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 ee00 movel %a0,5ee00 <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 edf8 movel 5edf8 <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 69f0 jsr 469f0 <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 e67c moveal 5e67c <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 e5d8 addil #386520,%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 e5d8 addil #386520,%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 e5e0 addil #386528,%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 d7b8 jsr 4d7b8 <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 d7b8 jsr 4d7b8 <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 e5cc addil #386508,%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 e5c8 lea 5e5c8 <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 edf8 movel 5edf8 <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 ee00 moveal 5ee00 <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 edf8 movel 5edf8 <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 d6dc lea 5d6dc <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 edf8 movel 5edf8 <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 d6e0 lea 5d6e0 <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 edf8 movel 5edf8 <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 d6e4 movel 5d6e4 <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 edf8 movel 5edf8 <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 ee00 movel %a2,5ee00 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
444ea: 4ab9 0005 edfc tstl 5edfc <rtems_termios_ttyTail>
444f0: 6606 bnes 444f8 <rtems_termios_open+0x146>
rtems_termios_ttyTail = tty;
444f2: 23ca 0005 edfc movel %a2,5edfc <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 d6e8 moveb 5d6e8 <c.6751>,%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 d6e8 moveb 5d6e8 <c.6751>,%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 d6e8 moveb 5d6e8 <c.6751>,%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 d7b8 jsr 4d7b8 <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 d6e8 moveb 5d6e8 <c.6751>,%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 d6e8 moveb 5d6e8 <c.6751>,%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 d6e8 moveb 5d6e8 <c.6751>,%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 d6e8 moveb 5d6e8 <c.6751>,%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 d6e8 moveb %d0,5d6e8 <c.6751>
}
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 69f0 jsr 469f0 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
44768: 2f39 0005 edf8 movel 5edf8 <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 69f0 jsr 469f0 <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 e5d0 addil #386512,%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 d6e4 movel 5d6e4 <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 e5dc addil #386524,%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 e5d4 addil #386516,%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 7ce6 pea 77ce6 <_Timer_Information>
5203a: 4eb9 0005 4c48 jsr 54c48 <_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 6644 jsr 56644 <_Watchdog_Remove>
5205e: 588f addql #4,%sp
_Thread_Enable_dispatch();
52060: 4eb9 0005 58b8 jsr 558b8 <_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 7ce6 pea 77ce6 <_Timer_Information>
523b6: 4eb9 0005 4c48 jsr 54c48 <_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 6644 jsr 56644 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
523da: 2f0a movel %a2,%sp@-
523dc: 4879 0007 7516 pea 77516 <_Watchdog_Ticks_chain>
523e2: 4eb9 0005 6520 jsr 56520 <_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 7d20 moveal 77d20 <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
523fa: 4eb9 0005 6644 jsr 56644 <_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 58b8 jsr 558b8 <_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 7d20 moveal 77d20 <_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 7430 tstb 77430 <_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 6f48 lea 66f48 <__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 7420 movel 77420 <_TOD+0x4>,%sp@-
52552: 2f39 0007 741c movel 7741c <_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 7ce6 pea 77ce6 <_Timer_Information>
5256e: 4eb9 0005 4c48 jsr 54c48 <_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 6644 jsr 56644 <_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 7420 movel 77420 <_TOD+0x4>,%sp@-
525b0: 2f39 0007 741c movel 7741c <_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 58b8 jsr 558b8 <_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 d85c moveal 5d85c <_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 d316 jsr 4d316 <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 edbc movel 5edbc <rtems_panic_in_progress>,%d0
428b8: 2200 movel %d0,%d1
428ba: 5281 addql #1,%d1
428bc: 23c1 0005 edbc movel %d1,5edbc <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 eed6 movel 5eed6 <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED
++level;
428cc: 5280 addql #1,%d0 <== NOT EXECUTED
_Thread_Dispatch_disable_level = level;
428ce: 23c0 0005 eed6 movel %d0,5eed6 <_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 edbc cmpl 5edbc <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 cf98 jsr 4cf98 <__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 d85c moveal 5d85c <_impure_ptr>,%a0
428f6: 2f2e 000c movel %fp@(12),%sp@-
428fa: 2f28 000c movel %a0@(12),%sp@-
428fe: 4eb9 0005 3f68 jsr 53f68 <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 d85c moveal 5d85c <_impure_ptr>,%a0
4291c: 2f00 movel %d0,%sp@-
4291e: 4879 0005 c02f pea 5c02f <IMFS_node_control_default+0x19>
42924: 2f28 000c movel %a0@(12),%sp@-
42928: 4eb9 0004 d6c6 jsr 4d6c6 <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 e2dc lea 4e2dc <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 d85c moveal 5d85c <_impure_ptr>,%a0
42956: 2f00 movel %d0,%sp@-
42958: 4879 0005 c03d pea 5c03d <IMFS_node_control_default+0x27>
4295e: 2f28 000c movel %a0@(12),%sp@-
42962: 4eb9 0004 d6c6 jsr 4d6c6 <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 c04a pea 5c04a <IMFS_node_control_default+0x34>
42978: 2079 0005 d85c moveal 5d85c <_impure_ptr>,%a0
4297e: 2f28 000c movel %a0@(12),%sp@-
42982: 4eb9 0004 d6c6 jsr 4d6c6 <fprintf>
42988: 4fef 000c lea %sp@(12),%sp
4298c: d480 addl %d0,%d2
}
chars_written += fprintf(stderr, "\n");
4298e: 4879 0005 bc15 pea 5bc15 <Configuration_Initial_Extensions+0x351>
42994: 2079 0005 d85c moveal 5d85c <_impure_ptr>,%a0
4299a: 2f28 000c movel %a0@(12),%sp@-
4299e: 4eb9 0004 d6c6 jsr 4d6c6 <fprintf>
(void) fflush(stderr);
429a4: 2079 0005 d85c moveal 5d85c <_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 d316 jsr 4d316 <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
00046c60 <rtems_workspace_greedy_free>:
void rtems_workspace_greedy_free( void *opaque )
{
46c60: 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;
46c64: 2239 0006 0782 movel 60782 <_Thread_Dispatch_disable_level>,%d1
++level;
46c6a: 5281 addql #1,%d1
46c6c: 202e 0008 movel %fp@(8),%d0
_Thread_Dispatch_disable_level = level;
46c70: 23c1 0006 0782 movel %d1,60782 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_Heap_Greedy_free( &_Workspace_Area, opaque );
46c76: 2f00 movel %d0,%sp@-
46c78: 4879 0006 0792 pea 60792 <_Workspace_Area>
46c7e: 4eb9 0004 77a0 jsr 477a0 <_Heap_Greedy_free>
_Thread_Enable_dispatch();
46c84: 508f addql #8,%sp
}
46c86: 4e5e unlk %fp
void rtems_workspace_greedy_free( void *opaque )
{
_Thread_Disable_dispatch();
_Heap_Greedy_free( &_Workspace_Area, opaque );
_Thread_Enable_dispatch();
46c88: 4ef9 0004 8c38 jmp 48c38 <_Thread_Enable_dispatch>
...
0005e5d4 <scanInt>:
/**
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
5e5d4: 4e56 ffe4 linkw %fp,#-28
5e5d8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
5e5dc: 246e 0008 moveal %fp@(8),%a2
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
5e5e0: 4283 clrl %d3
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
5e5e2: 283c 7fff ffff movel #2147483647,%d4
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
5e5e8: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
5e5ea: 47f9 0007 3500 lea 73500 <__srget_r>,%a3
5e5f0: 202a 0004 movel %a2@(4),%d0
5e5f4: 5380 subql #1,%d0
5e5f6: 2540 0004 movel %d0,%a2@(4)
5e5fa: 6c0e bges 5e60a <scanInt+0x36> <== ALWAYS TAKEN
5e5fc: 2f0a movel %a2,%sp@- <== NOT EXECUTED
5e5fe: 2f39 0009 31b4 movel 931b4 <_impure_ptr>,%sp@- <== NOT EXECUTED
5e604: 4e93 jsr %a3@ <== NOT EXECUTED
5e606: 508f addql #8,%sp <== NOT EXECUTED
5e608: 600a bras 5e614 <scanInt+0x40> <== NOT EXECUTED
5e60a: 2052 moveal %a2@,%a0
5e60c: 4280 clrl %d0
5e60e: 1010 moveb %a0@,%d0
5e610: 5288 addql #1,%a0
5e612: 2488 movel %a0,%a2@
if (c == ':')
5e614: 723a moveq #58,%d1
5e616: b280 cmpl %d0,%d1
5e618: 6752 beqs 5e66c <scanInt+0x98>
break;
if (sign == 0) {
5e61a: 4a83 tstl %d3
5e61c: 660e bnes 5e62c <scanInt+0x58>
if (c == '-') {
5e61e: 7a2d moveq #45,%d5
5e620: ba80 cmpl %d0,%d5
5e622: 6606 bnes 5e62a <scanInt+0x56>
sign = -1;
limit++;
5e624: 5284 addql #1,%d4
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
5e626: 76ff moveq #-1,%d3
limit++;
continue;
5e628: 60c6 bras 5e5f0 <scanInt+0x1c>
}
sign = 1;
5e62a: 7601 moveq #1,%d3
}
if (!isdigit(c))
5e62c: 2079 0009 31a8 moveal 931a8 <__ctype_ptr__>,%a0
5e632: 7c04 moveq #4,%d6
5e634: 1230 0801 moveb %a0@(00000001,%d0:l),%d1
5e638: c286 andl %d6,%d1
5e63a: 4a01 tstb %d1
5e63c: 6740 beqs 5e67e <scanInt+0xaa>
return 0;
d = c - '0';
if ((i > (limit / 10))
5e63e: 2204 movel %d4,%d1
5e640: 1c3c 000a moveb #10,%d6
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
5e644: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
5e64a: 4c46 1005 remul %d6,%d5,%d1
5e64e: 4c46 1001 remul %d6,%d1,%d1
5e652: b282 cmpl %d2,%d1
5e654: 6528 bcss 5e67e <scanInt+0xaa>
|| ((i == (limit / 10)) && (d > (limit % 10))))
5e656: 6604 bnes 5e65c <scanInt+0x88>
5e658: ba80 cmpl %d0,%d5
5e65a: 6522 bcss 5e67e <scanInt+0xaa> <== ALWAYS TAKEN
return 0;
i = i * 10 + d;
5e65c: 2202 movel %d2,%d1
5e65e: e789 lsll #3,%d1
5e660: 2241 moveal %d1,%a1
5e662: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0
5e666: 2400 movel %d0,%d2
5e668: d488 addl %a0,%d2
5e66a: 6084 bras 5e5f0 <scanInt+0x1c>
}
if (sign == 0)
5e66c: 4a83 tstl %d3
5e66e: 670e beqs 5e67e <scanInt+0xaa> <== NEVER TAKEN
return 0;
*val = i * sign;
5e670: 4c02 3800 mulsl %d2,%d3
return 1;
5e674: 7001 moveq #1,%d0
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
5e676: 206e 000c moveal %fp@(12),%a0
5e67a: 2083 movel %d3,%a0@
return 1;
5e67c: 6002 bras 5e680 <scanInt+0xac>
continue;
}
sign = 1;
}
if (!isdigit(c))
return 0;
5e67e: 4280 clrl %d0
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
}
5e680: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
5e686: 4e5e unlk %fp <== NOT EXECUTED
0005e718 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
5e718: 4e56 ffe4 linkw %fp,#-28
5e71c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
5e720: 42a7 clrl %sp@-
5e722: 280e movel %fp,%d4
5e724: 0684 0000 0014 addil #20,%d4
5e72a: 260e movel %fp,%d3
5e72c: 0683 0000 0010 addil #16,%d3
5e732: 47fa ff56 lea %pc@(5e68a <scanString>),%a3
5e736: 2f04 movel %d4,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
5e738: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
5e73c: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
5e73e: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
5e742: 2f0a movel %a2,%sp@-
5e744: 2f02 movel %d2,%sp@-
5e746: 4e93 jsr %a3@
5e748: 4fef 0014 lea %sp@(20),%sp
5e74c: 4a80 tstl %d0
5e74e: 6606 bnes 5e756 <scangr+0x3e>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
5e750: 4280 clrl %d0
5e752: 6000 00b0 braw 5e804 <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)
5e756: 42a7 clrl %sp@-
5e758: 2f04 movel %d4,%sp@-
5e75a: 2f03 movel %d3,%sp@-
5e75c: 486a 0004 pea %a2@(4)
5e760: 2f02 movel %d2,%sp@-
5e762: 4e93 jsr %a3@
5e764: 4fef 0014 lea %sp@(20),%sp
5e768: 4a80 tstl %d0
5e76a: 67e4 beqs 5e750 <scangr+0x38> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
5e76c: 486e fff8 pea %fp@(-8)
5e770: 2f02 movel %d2,%sp@-
5e772: 4eba fe60 jsr %pc@(5e5d4 <scanInt>)
5e776: 508f addql #8,%sp
5e778: 4a80 tstl %d0
5e77a: 67d4 beqs 5e750 <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
5e77c: 4878 0001 pea 1 <ADD>
5e780: 2f04 movel %d4,%sp@-
5e782: 2f03 movel %d3,%sp@-
5e784: 486e fffc pea %fp@(-4)
5e788: 2f02 movel %d2,%sp@-
5e78a: 4e93 jsr %a3@
5e78c: 4fef 0014 lea %sp@(20),%sp
5e790: 4a80 tstl %d0
5e792: 67bc beqs 5e750 <scangr+0x38> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5e794: 222e fffc movel %fp@(-4),%d1
5e798: 7001 moveq #1,%d0
5e79a: 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;
5e79c: 356e fffa 0008 movew %fp@(-6),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5e7a2: 600a bras 5e7ae <scangr+0x96>
if(*cp == ',')
5e7a4: 49c2 extbl %d2
5e7a6: 762c moveq #44,%d3
5e7a8: b682 cmpl %d2,%d3
5e7aa: 6602 bnes 5e7ae <scangr+0x96>
memcount++;
5e7ac: 5280 addql #1,%d0
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5e7ae: 1418 moveb %a0@+,%d2
5e7b0: 66f2 bnes 5e7a4 <scangr+0x8c>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
5e7b2: e588 lsll #2,%d0
5e7b4: 0680 0000 0013 addil #19,%d0
5e7ba: b0ae 0014 cmpl %fp@(20),%d0
5e7be: 6290 bhis 5e750 <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
5e7c0: 202e 0010 movel %fp@(16),%d0
5e7c4: 74f0 moveq #-16,%d2
5e7c6: 0680 0000 000f addil #15,%d0
5e7cc: c082 andl %d2,%d0
5e7ce: 2540 000a movel %d0,%a2@(10)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
5e7d2: 2040 moveal %d0,%a0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5e7d4: 7001 moveq #1,%d0
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
5e7d6: 2081 movel %d1,%a0@
5e7d8: 206e fffc moveal %fp@(-4),%a0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5e7dc: 6018 bras 5e7f6 <scangr+0xde>
if(*cp == ',') {
5e7de: 49c1 extbl %d1
5e7e0: 742c moveq #44,%d2
5e7e2: b481 cmpl %d1,%d2
5e7e4: 6610 bnes 5e7f6 <scangr+0xde>
*cp = '\0';
5e7e6: 4203 clrb %d3
5e7e8: 1143 ffff moveb %d3,%a0@(-1)
grp->gr_mem[memcount++] = cp + 1;
5e7ec: 226a 000a moveal %a2@(10),%a1
5e7f0: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4)
5e7f4: 5280 addql #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
5e7f6: 1218 moveb %a0@+,%d1
5e7f8: 66e4 bnes 5e7de <scangr+0xc6>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
5e7fa: 206a 000a moveal %a2@(10),%a0
5e7fe: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
return 1;
5e802: 7001 moveq #1,%d0
}
5e804: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3
5e80a: 4e5e unlk %fp <== NOT EXECUTED
0005e80e <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
5e80e: 4e56 ffe0 linkw %fp,#-32
5e812: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
5e816: 42a7 clrl %sp@-
5e818: 280e movel %fp,%d4
5e81a: 0684 0000 0014 addil #20,%d4
5e820: 260e movel %fp,%d3
5e822: 0683 0000 0010 addil #16,%d3
5e828: 47fa fe60 lea %pc@(5e68a <scanString>),%a3
5e82c: 2f04 movel %d4,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
5e82e: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
5e832: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
5e834: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
5e838: 2f0a movel %a2,%sp@-
5e83a: 2f02 movel %d2,%sp@-
5e83c: 4e93 jsr %a3@
5e83e: 4fef 0014 lea %sp@(20),%sp
5e842: 4a80 tstl %d0
5e844: 6606 bnes 5e84c <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;
5e846: 4280 clrl %d0
5e848: 6000 00a2 braw 5e8ec <scanpw+0xde>
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
5e84c: 42a7 clrl %sp@-
5e84e: 2f04 movel %d4,%sp@-
5e850: 2f03 movel %d3,%sp@-
5e852: 486a 0004 pea %a2@(4)
5e856: 2f02 movel %d2,%sp@-
5e858: 4e93 jsr %a3@
5e85a: 4fef 0014 lea %sp@(20),%sp
5e85e: 4a80 tstl %d0
5e860: 67e4 beqs 5e846 <scanpw+0x38> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
5e862: 486e fff8 pea %fp@(-8)
5e866: 49fa fd6c lea %pc@(5e5d4 <scanInt>),%a4
5e86a: 2f02 movel %d2,%sp@-
5e86c: 4e94 jsr %a4@
5e86e: 508f addql #8,%sp
5e870: 4a80 tstl %d0
5e872: 67d2 beqs 5e846 <scanpw+0x38>
|| !scanInt(fp, &pwgid)
5e874: 486e fffc pea %fp@(-4)
5e878: 2f02 movel %d2,%sp@-
5e87a: 4e94 jsr %a4@
5e87c: 508f addql #8,%sp
5e87e: 4a80 tstl %d0
5e880: 67c4 beqs 5e846 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
5e882: 42a7 clrl %sp@-
5e884: 2f04 movel %d4,%sp@-
5e886: 2f03 movel %d3,%sp@-
5e888: 486a 000c pea %a2@(12)
5e88c: 2f02 movel %d2,%sp@-
5e88e: 4e93 jsr %a3@
5e890: 4fef 0014 lea %sp@(20),%sp
5e894: 4a80 tstl %d0
5e896: 67ae beqs 5e846 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
5e898: 42a7 clrl %sp@-
5e89a: 2f04 movel %d4,%sp@-
5e89c: 2f03 movel %d3,%sp@-
5e89e: 486a 0010 pea %a2@(16)
5e8a2: 2f02 movel %d2,%sp@-
5e8a4: 4e93 jsr %a3@
5e8a6: 4fef 0014 lea %sp@(20),%sp
5e8aa: 4a80 tstl %d0
5e8ac: 6798 beqs 5e846 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
5e8ae: 42a7 clrl %sp@-
5e8b0: 2f04 movel %d4,%sp@-
5e8b2: 2f03 movel %d3,%sp@-
5e8b4: 486a 0014 pea %a2@(20)
5e8b8: 2f02 movel %d2,%sp@-
5e8ba: 4e93 jsr %a3@
5e8bc: 4fef 0014 lea %sp@(20),%sp
5e8c0: 4a80 tstl %d0
5e8c2: 6782 beqs 5e846 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
5e8c4: 4878 0001 pea 1 <ADD>
5e8c8: 2f04 movel %d4,%sp@-
5e8ca: 2f03 movel %d3,%sp@-
5e8cc: 486a 0018 pea %a2@(24)
5e8d0: 2f02 movel %d2,%sp@-
5e8d2: 4e93 jsr %a3@
5e8d4: 4fef 0014 lea %sp@(20),%sp
5e8d8: 4a80 tstl %d0
5e8da: 6700 ff6a beqw 5e846 <scanpw+0x38>
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
5e8de: 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;
5e8e0: 356e fffa 0008 movew %fp@(-6),%a2@(8)
pwd->pw_gid = pwgid;
5e8e6: 356e fffe 000a movew %fp@(-2),%a2@(10)
return 1;
}
5e8ec: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
5e8f2: 4e5e unlk %fp <== NOT EXECUTED
000468fc <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
468fc: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
468fe: 4e56 0000 linkw %fp,#0
46902: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
46906: b081 cmpl %d1,%d0
46908: 650c bcss 46916 <sched_get_priority_max+0x1a>
4690a: 103c 0001 moveb #1,%d0
4690e: e3a8 lsll %d1,%d0
46910: 7217 moveq #23,%d1
46912: c081 andl %d1,%d0
46914: 6610 bnes 46926 <sched_get_priority_max+0x2a> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
46916: 4eb9 0004 dab4 jsr 4dab4 <__errno>
4691c: 2040 moveal %d0,%a0
4691e: 7016 moveq #22,%d0
46920: 2080 movel %d0,%a0@
46922: 70ff moveq #-1,%d0
46924: 600a bras 46930 <sched_get_priority_max+0x34>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
46926: 4280 clrl %d0
46928: 1039 0005 e4ec moveb 5e4ec <rtems_maximum_priority>,%d0
4692e: 5380 subql #1,%d0
}
46930: 4e5e unlk %fp <== NOT EXECUTED
00046934 <sched_get_priority_min>:
*/
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
46934: 7004 moveq #4,%d0
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*/
int sched_get_priority_min(
int policy
)
{
46936: 4e56 0000 linkw %fp,#0
4693a: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
4693e: b081 cmpl %d1,%d0
46940: 650c bcss 4694e <sched_get_priority_min+0x1a>
46942: 103c 0001 moveb #1,%d0
46946: e3a8 lsll %d1,%d0
46948: 7217 moveq #23,%d1
4694a: c081 andl %d1,%d0
4694c: 6610 bnes 4695e <sched_get_priority_min+0x2a> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4694e: 4eb9 0004 dab4 jsr 4dab4 <__errno>
46954: 2040 moveal %d0,%a0
46956: 7016 moveq #22,%d0
46958: 2080 movel %d0,%a0@
4695a: 70ff moveq #-1,%d0
4695c: 6002 bras 46960 <sched_get_priority_min+0x2c>
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
4695e: 7001 moveq #1,%d0
}
46960: 4e5e unlk %fp <== NOT EXECUTED
00046964 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
46964: 4e56 0000 linkw %fp,#0
46968: 2f03 movel %d3,%sp@-
4696a: 262e 0008 movel %fp@(8),%d3
4696e: 2f02 movel %d2,%sp@-
46970: 242e 000c movel %fp@(12),%d2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
46974: 4a83 tstl %d3
46976: 6718 beqs 46990 <sched_rr_get_interval+0x2c> <== NEVER TAKEN
46978: 4eb9 0004 2f9c jsr 42f9c <getpid>
4697e: b083 cmpl %d3,%d0
46980: 670e beqs 46990 <sched_rr_get_interval+0x2c>
rtems_set_errno_and_return_minus_one( ESRCH );
46982: 4eb9 0004 dab4 jsr 4dab4 <__errno>
46988: 7203 moveq #3,%d1
4698a: 2040 moveal %d0,%a0
4698c: 2081 movel %d1,%a0@
4698e: 6010 bras 469a0 <sched_rr_get_interval+0x3c>
if ( !interval )
46990: 4a82 tstl %d2
46992: 6610 bnes 469a4 <sched_rr_get_interval+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
46994: 4eb9 0004 dab4 jsr 4dab4 <__errno>
4699a: 2040 moveal %d0,%a0
4699c: 7016 moveq #22,%d0
4699e: 2080 movel %d0,%a0@
469a0: 70ff moveq #-1,%d0
469a2: 6012 bras 469b6 <sched_rr_get_interval+0x52>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
469a4: 2f02 movel %d2,%sp@-
469a6: 2f39 0005 fd8e movel 5fd8e <_Thread_Ticks_per_timeslice>,%sp@-
469ac: 4eb9 0004 9d44 jsr 49d44 <_Timespec_From_ticks>
return 0;
469b2: 508f addql #8,%sp
469b4: 4280 clrl %d0
}
469b6: 242e fff8 movel %fp@(-8),%d2
469ba: 262e fffc movel %fp@(-4),%d3
469be: 4e5e unlk %fp
...
00046e08 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
46e08: 4e56 ffdc linkw %fp,#-36
*
* 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;
46e0c: 2039 0006 3440 movel 63440 <_Thread_Dispatch_disable_level>,%d0
++level;
46e12: 5280 addql #1,%d0
46e14: 48d7 043c moveml %d2-%d5/%a2,%sp@
46e18: 262e 0008 movel %fp@(8),%d3
46e1c: 282e 000c movel %fp@(12),%d4
_Thread_Dispatch_disable_level = level;
46e20: 23c0 0006 3440 movel %d0,63440 <_Thread_Dispatch_disable_level>
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
46e26: 2a04 movel %d4,%d5
46e28: 0285 0000 0200 andil #512,%d5
46e2e: 6706 beqs 46e36 <sem_open+0x2e>
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
46e30: 246e 0014 moveal %fp@(20),%a2
46e34: 6002 bras 46e38 <sem_open+0x30>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
46e36: 95ca subal %a2,%a2
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
46e38: 486e fffc pea %fp@(-4)
46e3c: 486e fff0 pea %fp@(-16)
46e40: 2f03 movel %d3,%sp@-
46e42: 4879 0006 365c pea 6365c <_POSIX_Semaphore_Information>
46e48: 4eb9 0004 6894 jsr 46894 <_POSIX_Name_to_id>
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
46e4e: 4fef 0010 lea %sp@(16),%sp
46e52: 2400 movel %d0,%d2
46e54: 671c beqs 46e72 <sem_open+0x6a>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
46e56: 7002 moveq #2,%d0
46e58: b082 cmpl %d2,%d0
46e5a: 6604 bnes 46e60 <sem_open+0x58>
46e5c: 4a85 tstl %d5
46e5e: 6662 bnes 46ec2 <sem_open+0xba>
_Thread_Enable_dispatch();
46e60: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
46e66: 4eb9 0004 ea90 jsr 4ea90 <__errno>
46e6c: 2040 moveal %d0,%a0
46e6e: 2082 movel %d2,%a0@
46e70: 607e bras 46ef0 <sem_open+0xe8>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
46e72: 0284 0000 0a00 andil #2560,%d4
46e78: 0c84 0000 0a00 cmpil #2560,%d4
46e7e: 6614 bnes 46e94 <sem_open+0x8c>
_Thread_Enable_dispatch();
46e80: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
46e86: 4eb9 0004 ea90 jsr 4ea90 <__errno>
46e8c: 2040 moveal %d0,%a0
46e8e: 7011 moveq #17,%d0
46e90: 2080 movel %d0,%a0@
46e92: 605c bras 46ef0 <sem_open+0xe8>
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
46e94: 486e fff8 pea %fp@(-8)
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
46e98: 45f9 0004 9fdc lea 49fdc <_Thread_Enable_dispatch>,%a2
46e9e: 2f2e fff0 movel %fp@(-16),%sp@-
46ea2: 4879 0006 365c pea 6365c <_POSIX_Semaphore_Information>
46ea8: 4eb9 0004 9318 jsr 49318 <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
the_semaphore->open_count += 1;
46eae: 2040 moveal %d0,%a0
46eb0: 52a8 0016 addql #1,%a0@(22)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
46eb4: 2d40 fff4 movel %d0,%fp@(-12)
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
46eb8: 4e92 jsr %a2@
_Thread_Enable_dispatch();
46eba: 4e92 jsr %a2@
goto return_id;
46ebc: 4fef 000c lea %sp@(12),%sp
46ec0: 6026 bras 46ee8 <sem_open+0xe0>
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
46ec2: 486e fff4 pea %fp@(-12)
46ec6: 2f0a movel %a2,%sp@-
46ec8: 42a7 clrl %sp@-
46eca: 2f2e fffc movel %fp@(-4),%sp@-
46ece: 2f03 movel %d3,%sp@-
46ed0: 4eb9 0004 c93c jsr 4c93c <_POSIX_Semaphore_Create_support>
46ed6: 2400 movel %d0,%d2
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
46ed8: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
if ( status == -1 )
46ede: 4fef 0014 lea %sp@(20),%sp
46ee2: 70ff moveq #-1,%d0
46ee4: b082 cmpl %d2,%d0
46ee6: 6708 beqs 46ef0 <sem_open+0xe8> <== NEVER TAKEN
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
46ee8: 202e fff4 movel %fp@(-12),%d0
46eec: 5080 addql #8,%d0
46eee: 6002 bras 46ef2 <sem_open+0xea>
*/
_Thread_Enable_dispatch();
if ( status == -1 )
return SEM_FAILED;
46ef0: 70ff moveq #-1,%d0
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
#endif
}
46ef2: 4cee 043c ffdc moveml %fp@(-36),%d2-%d5/%a2
46ef8: 4e5e unlk %fp <== NOT EXECUTED
00046828 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
46828: 4e56 fff0 linkw %fp,#-16
4682c: 222e 0010 movel %fp@(16),%d1
46830: 48d7 041c moveml %d2-%d4/%a2,%sp@
46834: 242e 0008 movel %fp@(8),%d2
46838: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
if ( oact )
4683c: 4a81 tstl %d1
4683e: 6722 beqs 46862 <sigaction+0x3a>
*oact = _POSIX_signals_Vectors[ sig ];
46840: 2602 movel %d2,%d3
46842: 2002 movel %d2,%d0
46844: 4878 000c pea c <OPER1>
46848: e58b lsll #2,%d3
4684a: e988 lsll #4,%d0
4684c: 9083 subl %d3,%d0
4684e: 0680 0006 0ef8 addil #397048,%d0
46854: 2f00 movel %d0,%sp@-
46856: 2f01 movel %d1,%sp@-
46858: 4eb9 0004 e5c8 jsr 4e5c8 <memcpy>
4685e: 4fef 000c lea %sp@(12),%sp
if ( !sig )
46862: 4a82 tstl %d2
46864: 6602 bnes 46868 <sigaction+0x40>
46866: 6012 bras 4687a <sigaction+0x52>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
46868: 2002 movel %d2,%d0
4686a: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
4686c: 721f moveq #31,%d1
4686e: b280 cmpl %d0,%d1
46870: 6402 bccs 46874 <sigaction+0x4c>
46872: 6006 bras 4687a <sigaction+0x52>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
46874: 7009 moveq #9,%d0
46876: b082 cmpl %d2,%d0
46878: 6610 bnes 4688a <sigaction+0x62>
rtems_set_errno_and_return_minus_one( EINVAL );
4687a: 4eb9 0004 dd90 jsr 4dd90 <__errno>
46880: 2040 moveal %d0,%a0
46882: 7016 moveq #22,%d0
46884: 2080 movel %d0,%a0@
46886: 70ff moveq #-1,%d0
46888: 6068 bras 468f2 <sigaction+0xca>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
4688a: 4a8a tstl %a2
4688c: 6762 beqs 468f0 <sigaction+0xc8> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
4688e: 203c 0000 0700 movel #1792,%d0
46894: 40c4 movew %sr,%d4
46896: 8084 orl %d4,%d0
46898: 46c0 movew %d0,%sr
4689a: 2602 movel %d2,%d3
4689c: e58b lsll #2,%d3
if ( act->sa_handler == SIG_DFL ) {
4689e: 4aaa 0008 tstl %a2@(8)
468a2: 6626 bnes 468ca <sigaction+0xa2>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
468a4: 4878 000c pea c <OPER1>
468a8: e98a lsll #4,%d2
468aa: 9483 subl %d3,%d2
468ac: 2002 movel %d2,%d0
468ae: 0680 0005 e556 addil #386390,%d0
468b4: 0682 0006 0ef8 addil #397048,%d2
468ba: 2f00 movel %d0,%sp@-
468bc: 2f02 movel %d2,%sp@-
468be: 4eb9 0004 e5c8 jsr 4e5c8 <memcpy>
468c4: 4fef 000c lea %sp@(12),%sp
468c8: 6024 bras 468ee <sigaction+0xc6>
} else {
_POSIX_signals_Clear_process_signals( sig );
468ca: 2f02 movel %d2,%sp@-
_POSIX_signals_Vectors[ sig ] = *act;
468cc: e98a lsll #4,%d2
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
468ce: 4eb9 0004 b8f8 jsr 4b8f8 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
468d4: 4878 000c pea c <OPER1>
468d8: 9483 subl %d3,%d2
468da: 0682 0006 0ef8 addil #397048,%d2
468e0: 2f0a movel %a2,%sp@-
468e2: 2f02 movel %d2,%sp@-
468e4: 4eb9 0004 e5c8 jsr 4e5c8 <memcpy>
468ea: 4fef 0010 lea %sp@(16),%sp
}
_ISR_Enable( level );
468ee: 46c4 movew %d4,%sr
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
468f0: 4280 clrl %d0
}
468f2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
468f8: 4e5e unlk %fp <== NOT EXECUTED
00046cb8 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
46cb8: 4e56 ffdc linkw %fp,#-36
46cbc: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
46cc0: 266e 0008 moveal %fp@(8),%a3
46cc4: 246e 000c moveal %fp@(12),%a2
46cc8: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
46ccc: 4a8b tstl %a3
46cce: 6602 bnes 46cd2 <sigtimedwait+0x1a>
46cd0: 6030 bras 46d02 <sigtimedwait+0x4a>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
46cd2: 4a82 tstl %d2
46cd4: 673c beqs 46d12 <sigtimedwait+0x5a>
if ( !_Timespec_Is_valid( timeout ) )
46cd6: 2f02 movel %d2,%sp@-
46cd8: 4eb9 0004 a18c jsr 4a18c <_Timespec_Is_valid>
46cde: 588f addql #4,%sp
46ce0: 4a00 tstb %d0
46ce2: 6610 bnes 46cf4 <sigtimedwait+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
46ce4: 4eb9 0004 e348 jsr 4e348 <__errno>
46cea: 7616 moveq #22,%d3
46cec: 2240 moveal %d0,%a1
46cee: 2283 movel %d3,%a1@
46cf0: 6000 0142 braw 46e34 <sigtimedwait+0x17c>
interval = _Timespec_To_ticks( timeout );
46cf4: 2f02 movel %d2,%sp@-
46cf6: 4eb9 0004 a1b4 jsr 4a1b4 <_Timespec_To_ticks>
if ( !interval )
46cfc: 588f addql #4,%sp
46cfe: 4a80 tstl %d0
46d00: 6612 bnes 46d14 <sigtimedwait+0x5c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
46d02: 4eb9 0004 e348 jsr 4e348 <__errno>
46d08: 7416 moveq #22,%d2
46d0a: 2040 moveal %d0,%a0
46d0c: 2082 movel %d2,%a0@
46d0e: 6000 0124 braw 46e34 <sigtimedwait+0x17c>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
46d12: 4280 clrl %d0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
46d14: 4a8a tstl %a2
46d16: 6604 bnes 46d1c <sigtimedwait+0x64>
46d18: 45ee fff4 lea %fp@(-12),%a2
the_thread = _Thread_Executing;
46d1c: 2079 0006 12ae moveal 612ae <_Per_CPU_Information+0xe>,%a0
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
46d22: 223c 0000 0700 movel #1792,%d1
the_info = ( info ) ? info : &signal_information;
the_thread = _Thread_Executing;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
46d28: 2868 00fe moveal %a0@(254),%a4
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
46d2c: 40c3 movew %sr,%d3
46d2e: 8283 orl %d3,%d1
46d30: 46c1 movew %d1,%sr
if ( *set & api->signals_pending ) {
46d32: 2413 movel %a3@,%d2
46d34: 2802 movel %d2,%d4
46d36: 222c 00d4 movel %a4@(212),%d1
46d3a: c881 andl %d1,%d4
46d3c: 6728 beqs 46d66 <sigtimedwait+0xae>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
46d3e: 2f01 movel %d1,%sp@-
46d40: 4eba ff2a jsr %pc@(46c6c <_POSIX_signals_Get_lowest>)
46d44: 2480 movel %d0,%a2@
_POSIX_signals_Clear_signals(
46d46: 4297 clrl %sp@
46d48: 42a7 clrl %sp@-
46d4a: 2f0a movel %a2,%sp@-
46d4c: 2f00 movel %d0,%sp@-
46d4e: 2f0c movel %a4,%sp@-
46d50: 4eb9 0004 bfec jsr 4bfec <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
46d56: 46c3 movew %d3,%sr
the_info->si_code = SI_USER;
46d58: 7001 moveq #1,%d0
the_info->si_value.sival_int = 0;
46d5a: 42aa 0008 clrl %a2@(8)
return the_info->si_signo;
46d5e: 2412 movel %a2@,%d2
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
46d60: 2540 0004 movel %d0,%a2@(4)
46d64: 6032 bras 46d98 <sigtimedwait+0xe0>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
46d66: 2239 0006 14dc movel 614dc <_POSIX_signals_Pending>,%d1
46d6c: c481 andl %d1,%d2
46d6e: 6730 beqs 46da0 <sigtimedwait+0xe8>
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
46d70: 2f01 movel %d1,%sp@-
46d72: 4eba fef8 jsr %pc@(46c6c <_POSIX_signals_Get_lowest>)
46d76: 2400 movel %d0,%d2
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
46d78: 4297 clrl %sp@
46d7a: 4878 0001 pea 1 <ADD>
46d7e: 2f0a movel %a2,%sp@-
46d80: 2f00 movel %d0,%sp@-
46d82: 2f0c movel %a4,%sp@-
46d84: 4eb9 0004 bfec jsr 4bfec <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
46d8a: 46c3 movew %d3,%sr
the_info->si_signo = signo;
the_info->si_code = SI_USER;
46d8c: 7201 moveq #1,%d1
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
46d8e: 2482 movel %d2,%a2@
the_info->si_code = SI_USER;
46d90: 2541 0004 movel %d1,%a2@(4)
the_info->si_value.sival_int = 0;
46d94: 42aa 0008 clrl %a2@(8)
46d98: 4fef 0014 lea %sp@(20),%sp
46d9c: 6000 0098 braw 46e36 <sigtimedwait+0x17e>
return signo;
}
the_info->si_signo = -1;
46da0: 72ff moveq #-1,%d1
46da2: 2481 movel %d1,%a2@
*
* 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;
46da4: 2239 0006 0e66 movel 60e66 <_Thread_Dispatch_disable_level>,%d1
++level;
46daa: 5281 addql #1,%d1
_Thread_Dispatch_disable_level = level;
46dac: 23c1 0006 0e66 movel %d1,60e66 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
46db2: 7204 moveq #4,%d1
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
46db4: 43f9 0006 1474 lea 61474 <_POSIX_signals_Wait_queue>,%a1
the_thread->Wait.return_code = EINTR;
46dba: 2141 0034 movel %d1,%a0@(52)
the_thread->Wait.option = *set;
46dbe: 2153 0030 movel %a3@,%a0@(48)
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;
46dc2: 123c 0001 moveb #1,%d1
the_thread->Wait.return_argument = the_info;
46dc6: 214a 0028 movel %a2,%a0@(40)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
46dca: 2149 0044 movel %a1,%a0@(68)
46dce: 23c1 0006 14a4 movel %d1,614a4 <_POSIX_signals_Wait_queue+0x30>
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
46dd4: 46c3 movew %d3,%sr
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
46dd6: 4879 0004 9fb0 pea 49fb0 <_Thread_queue_Timeout>
46ddc: 2f00 movel %d0,%sp@-
46dde: 4879 0006 1474 pea 61474 <_POSIX_signals_Wait_queue>
46de4: 4eb9 0004 9cc0 jsr 49cc0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
46dea: 4eb9 0004 9878 jsr 49878 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
46df0: 42a7 clrl %sp@-
46df2: 42a7 clrl %sp@-
46df4: 2f0a movel %a2,%sp@-
46df6: 2f12 movel %a2@,%sp@-
46df8: 2f0c movel %a4,%sp@-
46dfa: 4eb9 0004 bfec jsr 4bfec <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
46e00: 2079 0006 12ae moveal 612ae <_Per_CPU_Information+0xe>,%a0
46e06: 4fef 0020 lea %sp@(32),%sp
46e0a: 7004 moveq #4,%d0
46e0c: b0a8 0034 cmpl %a0@(52),%d0
46e10: 6610 bnes 46e22 <sigtimedwait+0x16a>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
46e12: 2412 movel %a2@,%d2
46e14: 2202 movel %d2,%d1
46e16: 5381 subql #1,%d1
46e18: 103c 0001 moveb #1,%d0
46e1c: e3a8 lsll %d1,%d0
46e1e: c093 andl %a3@,%d0
46e20: 6614 bnes 46e36 <sigtimedwait+0x17e>
errno = _Thread_Executing->Wait.return_code;
46e22: 4eb9 0004 e348 jsr 4e348 <__errno>
46e28: 2079 0006 12ae moveal 612ae <_Per_CPU_Information+0xe>,%a0
46e2e: 2240 moveal %d0,%a1
46e30: 22a8 0034 movel %a0@(52),%a1@
return -1;
46e34: 74ff moveq #-1,%d2
}
return the_info->si_signo;
}
46e36: 2002 movel %d2,%d0
46e38: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4
46e3e: 4e5e unlk %fp
...
00048800 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
48800: 4e56 0000 linkw %fp,#0
48804: 2f0a movel %a2,%sp@-
48806: 246e 000c moveal %fp@(12),%a2
int status;
status = sigtimedwait( set, NULL, NULL );
4880a: 42a7 clrl %sp@-
4880c: 42a7 clrl %sp@-
4880e: 2f2e 0008 movel %fp@(8),%sp@-
48812: 4eb9 0004 865c jsr 4865c <sigtimedwait>
if ( status != -1 ) {
48818: 4fef 000c lea %sp@(12),%sp
4881c: 72ff moveq #-1,%d1
4881e: b280 cmpl %d0,%d1
48820: 6708 beqs 4882a <sigwait+0x2a>
if ( sig )
48822: 4a8a tstl %a2
48824: 6710 beqs 48836 <sigwait+0x36> <== NEVER TAKEN
*sig = status;
48826: 2480 movel %d0,%a2@
48828: 600c bras 48836 <sigwait+0x36>
return 0;
}
return errno;
4882a: 4eb9 0004 fa7c jsr 4fa7c <__errno>
48830: 2040 moveal %d0,%a0
48832: 2010 movel %a0@,%d0
48834: 6002 bras 48838 <sigwait+0x38>
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
48836: 4280 clrl %d0
}
return errno;
}
48838: 246e fffc moveal %fp@(-4),%a2
4883c: 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
0004c37e <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 )
{
4c37e: 4e56 ffc4 linkw %fp,#-60
4c382: 206e 0008 moveal %fp@(8),%a0
4c386: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c38a: 202e 000c movel %fp@(12),%d0
4c38e: 266e 0010 moveal %fp@(16),%a3
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
4c392: 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 ) {
4c396: 0c80 c018 4201 cmpil #-1072152063,%d0
4c39c: 6600 0186 bnew 4c524 <sparse_disk_ioctl+0x1a6>
rtems_blkdev_request *r = argp;
switch ( r->req ) {
4c3a0: 2d53 fff4 movel %a3@,%fp@(-12)
4c3a4: 7001 moveq #1,%d0
4c3a6: b0ae fff4 cmpl %fp@(-12),%d0
4c3aa: 6500 01be bcsw 4c56a <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 );
4c3ae: 42a7 clrl %sp@-
static int sparse_disk_read_write(
rtems_sparse_disk *sparse_disk,
rtems_blkdev_request *req,
const bool read )
{
int rv = 0;
4c3b0: 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;
4c3b2: 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(
4c3b4: 49f9 0005 73c4 lea 573c4 <bsearch>,%a4
key = sparse_disk_get_new_block( sparse_disk, block );
}
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
4c3ba: 4bf9 0005 7dd0 lea 57dd0 <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 );
4c3c0: 42a7 clrl %sp@-
4c3c2: 2f12 movel %a2@,%sp@-
4c3c4: 4eb9 0004 7cbc jsr 47cbc <rtems_semaphore_obtain>
4c3ca: 4fef 000c lea %sp@(12),%sp
4c3ce: 6000 0128 braw 4c4f8 <sparse_disk_ioctl+0x17a>
for ( req_buffer = 0;
( 0 <= rv ) && ( req_buffer < req->bufnum );
++req_buffer ) {
scatter_gather = &req->bufs[req_buffer];
4c3d2: 2005 movel %d5,%d0
bytes_handled = 0;
4c3d4: 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];
4c3d6: e988 lsll #4,%d0
4c3d8: 41f3 0818 lea %a3@(00000018,%d0:l),%a0
bytes_handled = 0;
buff = (uint8_t *) scatter_gather->buffer;
4c3dc: 2228 0008 movel %a0@(8),%d1
block = scatter_gather->block;
4c3e0: 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;
4c3e2: 2d41 fff0 movel %d1,%fp@(-16)
block = scatter_gather->block;
buff_size = scatter_gather->length;
4c3e6: 2428 0004 movel %a0@(4),%d2
4c3ea: 6000 0100 braw 4c4ec <sparse_disk_ioctl+0x16e>
4c3ee: 282e fff0 movel %fp@(-16),%d4
4c3f2: d887 addl %d7,%d4
while ( ( 0 <= rv ) && ( 0 < buff_size ) ) {
if ( read )
4c3f4: 4aae fff4 tstl %fp@(-12)
4c3f8: 6656 bnes 4c450 <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 = {
4c3fa: 2d43 fff8 movel %d3,%fp@(-8)
.block = block,
.data = NULL
};
size_t bytes_to_copy = sparse_disk->media_block_size;
4c3fe: 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 = {
4c402: 42ae fffc clrl %fp@(-4)
4c406: 2c02 movel %d2,%d6
4c408: b082 cmpl %d2,%d0
4c40a: 6402 bccs 4c40e <sparse_disk_ioctl+0x90>
4c40c: 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(
4c40e: 487a ff40 pea %pc@(4c350 <sparse_disk_compare>)
4c412: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4c416: 2f2a 0008 movel %a2@(8),%sp@-
4c41a: 2f2a 0016 movel %a2@(22),%sp@-
4c41e: 486e fff8 pea %fp@(-8)
4c422: 4e94 jsr %a4@
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL != key )
4c424: 4fef 0014 lea %sp@(20),%sp
4c428: 4a80 tstl %d0
4c42a: 670e beqs 4c43a <sparse_disk_ioctl+0xbc>
memcpy( buffer, key->data, bytes_to_copy );
4c42c: 2040 moveal %d0,%a0
4c42e: 2f06 movel %d6,%sp@-
4c430: 2f28 0004 movel %a0@(4),%sp@-
4c434: 2f04 movel %d4,%sp@-
4c436: 6000 00a4 braw 4c4dc <sparse_disk_ioctl+0x15e>
else
memset( buffer, sparse_disk->fill_pattern, buffer_size );
4c43a: 2f02 movel %d2,%sp@-
4c43c: 4280 clrl %d0
4c43e: 102a 0014 moveb %a2@(20),%d0
4c442: 2f00 movel %d0,%sp@-
4c444: 2f04 movel %d4,%sp@-
4c446: 4eb9 0005 7e40 jsr 57e40 <memset>
4c44c: 6000 0090 braw 4c4de <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 = {
4c450: 2d43 fff8 movel %d3,%fp@(-8)
.block = block,
.data = NULL
};
size_t bytes_to_copy = sparse_disk->media_block_size;
4c454: 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 = {
4c458: 42ae fffc clrl %fp@(-4)
4c45c: 2c02 movel %d2,%d6
4c45e: b082 cmpl %d2,%d0
4c460: 6402 bccs 4c464 <sparse_disk_ioctl+0xe6>
4c462: 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(
4c464: 487a feea pea %pc@(4c350 <sparse_disk_compare>)
4c468: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4c46c: 2f2a 0008 movel %a2@(8),%sp@-
4c470: 2f2a 0016 movel %a2@(22),%sp@-
4c474: 486e fff8 pea %fp@(-8)
4c478: 4e94 jsr %a4@
sparse_disk->used_count,
sizeof( rtems_sparse_disk_key ),
sparse_disk_compare
);
if ( NULL == key ) {
4c47a: 4fef 0014 lea %sp@(20),%sp
4c47e: 4a80 tstl %d0
4c480: 6650 bnes 4c4d2 <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 )
4c482: 2004 movel %d4,%d0
4c484: 2044 moveal %d4,%a0
4c486: d086 addl %d6,%d0
4c488: 6010 bras 4c49a <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 ) {
4c48a: 4281 clrl %d1
4c48c: 1218 moveb %a0@+,%d1
4c48e: 2241 moveal %d1,%a1
4c490: 122a 0014 moveb %a2@(20),%d1
4c494: b289 cmpl %a1,%d1
4c496: 6600 00e2 bnew 4c57a <sparse_disk_ioctl+0x1fc>
4c49a: b088 cmpl %a0,%d0
4c49c: 66ec bnes 4c48a <sparse_disk_ioctl+0x10c>
4c49e: 6042 bras 4c4e2 <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];
4c4a0: 2001 movel %d1,%d0
key->block = block;
++sparse_disk->used_count;
4c4a2: 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];
4c4a4: e788 lsll #3,%d0
4c4a6: 206a 0016 moveal %a2@(22),%a0
4c4aa: d088 addl %a0,%d0
key->block = block;
4c4ac: 2240 moveal %d0,%a1
4c4ae: 2283 movel %d3,%a1@
++sparse_disk->used_count;
4c4b0: 2541 0008 movel %d1,%a2@(8)
qsort( sparse_disk->key_table, sparse_disk->used_count,
4c4b4: 487a fe9a pea %pc@(4c350 <sparse_disk_compare>)
4c4b8: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
4c4bc: 2f01 movel %d1,%sp@-
4c4be: 2d40 ffec movel %d0,%fp@(-20)
4c4c2: 2f08 movel %a0,%sp@-
4c4c4: 4eb9 0005 7eac jsr 57eac <qsort>
4c4ca: 202e ffec movel %fp@(-20),%d0
4c4ce: 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 );
4c4d2: 2f06 movel %d6,%sp@-
4c4d4: 2040 moveal %d0,%a0
4c4d6: 2f04 movel %d4,%sp@-
4c4d8: 2f28 0004 movel %a0@(4),%sp@-
4c4dc: 4e95 jsr %a5@
4c4de: 4fef 000c lea %sp@(12),%sp
rv = sparse_disk_write_block( sparse_disk,
block,
&buff[bytes_handled],
buff_size );
++block;
4c4e2: 5283 addql #1,%d3
bytes_handled += rv;
4c4e4: de86 addl %d6,%d7
buff_size -= rv;
4c4e6: 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 ) ) {
4c4e8: 4a86 tstl %d6
4c4ea: 6d06 blts 4c4f2 <sparse_disk_ioctl+0x174> <== NEVER TAKEN
4c4ec: 4a82 tstl %d2
4c4ee: 6600 fefe bnew 4c3ee <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 ) {
4c4f2: 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;
4c4f4: 4a86 tstl %d6
4c4f6: 6d08 blts 4c500 <sparse_disk_ioctl+0x182> <== NEVER TAKEN
( 0 <= rv ) && ( req_buffer < req->bufnum );
4c4f8: baab 0010 cmpl %a3@(16),%d5
4c4fc: 6500 fed4 bcsw 4c3d2 <sparse_disk_ioctl+0x54>
bytes_handled += rv;
buff_size -= rv;
}
}
rtems_semaphore_release( sparse_disk->mutex );
4c500: 2f12 movel %a2@,%sp@-
4c502: 4eb9 0004 7dc4 jsr 47dc4 <rtems_semaphore_release>
4c508: 206b 0004 moveal %a3@(4),%a0
if ( 0 > rv )
4c50c: 588f addql #4,%sp
4c50e: 4a86 tstl %d6
4c510: 6c06 bges 4c518 <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);
4c512: 4878 001b pea 1b <OPER2+0x7> <== NOT EXECUTED
4c516: 6002 bras 4c51a <sparse_disk_ioctl+0x19c> <== NOT EXECUTED
4c518: 42a7 clrl %sp@-
4c51a: 2f0b movel %a3,%sp@-
4c51c: 4e90 jsr %a0@
4c51e: 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 );
4c520: 4280 clrl %d0
4c522: 6068 bras 4c58c <sparse_disk_ioctl+0x20e>
default:
break;
}
} else if ( RTEMS_BLKIO_DELETED == req ) {
4c524: 0c80 2000 4207 cmpil #536887815,%d0
4c52a: 662c bnes 4c558 <sparse_disk_ioctl+0x1da>
sc = rtems_semaphore_delete( sd->mutex );
4c52c: 2f12 movel %a2@,%sp@-
4c52e: 4eb9 0004 7c20 jsr 47c20 <rtems_semaphore_delete>
if ( RTEMS_SUCCESSFUL != sc )
4c534: 588f addql #4,%sp
4c536: 4a80 tstl %d0
4c538: 670c beqs 4c546 <sparse_disk_ioctl+0x1c8> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xdeadbeef );
4c53a: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4c540: 4eb9 0004 8424 jsr 48424 <rtems_fatal_error_occurred> <== NOT EXECUTED
sd->mutex = RTEMS_ID_NONE;
if ( NULL != sd->delete_handler )
4c546: 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;
4c54a: 4292 clrl %a2@
if ( NULL != sd->delete_handler )
4c54c: 4a88 tstl %a0
4c54e: 67d0 beqs 4c520 <sparse_disk_ioctl+0x1a2> <== NEVER TAKEN
( *sd->delete_handler )( sd );
4c550: 2f0a movel %a2,%sp@-
4c552: 4e90 jsr %a0@
4c554: 588f addql #4,%sp
4c556: 60c8 bras 4c520 <sparse_disk_ioctl+0x1a2>
return 0;
} else {
return rtems_blkdev_ioctl( dd, req, argp );
4c558: 2f0b movel %a3,%sp@-
4c55a: 2f00 movel %d0,%sp@-
4c55c: 2f08 movel %a0,%sp@-
4c55e: 4eb9 0004 eb84 jsr 4eb84 <rtems_blkdev_ioctl>
4c564: 4fef 000c lea %sp@(12),%sp
4c568: 6022 bras 4c58c <sparse_disk_ioctl+0x20e>
}
errno = EINVAL;
4c56a: 4eb9 0005 7428 jsr 57428 <__errno> <== NOT EXECUTED
4c570: 2240 moveal %d0,%a1 <== NOT EXECUTED
4c572: 7016 moveq #22,%d0 <== NOT EXECUTED
4c574: 2280 movel %d0,%a1@ <== NOT EXECUTED
return -1;
4c576: 70ff moveq #-1,%d0 <== NOT EXECUTED
4c578: 6012 bras 4c58c <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 ) {
4c57a: 222a 0008 movel %a2@(8),%d1
4c57e: b2aa 0004 cmpl %a2@(4),%d1
4c582: 6500 ff1c bcsw 4c4a0 <sparse_disk_ioctl+0x122>
}
if ( NULL != key )
memcpy( key->data, buffer, bytes_to_copy );
else if ( block_needs_writing )
return -1;
4c586: 7cff moveq #-1,%d6 <== NOT EXECUTED
4c588: 6000 ff58 braw 4c4e2 <sparse_disk_ioctl+0x164> <== NOT EXECUTED
return rtems_blkdev_ioctl( dd, req, argp );
}
errno = EINVAL;
return -1;
}
4c58c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
4c592: 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 00f6 movel %a0@(246),%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 0006 0b0e moveal 60b0e <_Per_CPU_Information+0xe>,%a1
44e7c: 2429 00f6 movel %a1@(246),%d2
_Thread_Executing->libc_reent = this_reent;
44e80: 2340 00f6 movel %d0,%a1@(246)
_fwalk (t->libc_reent, sync_wrapper);
44e84: 487a 0020 pea %pc@(44ea6 <sync_wrapper>)
44e88: 2f28 00f6 movel %a0@(246),%sp@-
44e8c: 4eb9 0004 eb94 jsr 4eb94 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
44e92: 2079 0006 0b0e moveal 60b0e <_Per_CPU_Information+0xe>,%a0
44e98: 508f addql #8,%sp
44e9a: 2142 00f6 movel %d2,%a0@(246)
}
}
44e9e: 242e fffc movel %fp@(-4),%d2
44ea2: 4e5e unlk %fp <== NOT EXECUTED
00045d08 <sysconf>:
long sysconf(
int name
)
{
if ( name == _SC_CLK_TCK )
45d08: 7002 moveq #2,%d0
*/
long sysconf(
int name
)
{
45d0a: 4e56 0000 linkw %fp,#0
45d0e: 222e 0008 movel %fp@(8),%d1
45d12: 2f02 movel %d2,%sp@-
if ( name == _SC_CLK_TCK )
45d14: b081 cmpl %d1,%d0
45d16: 6612 bnes 45d2a <sysconf+0x22>
return (TOD_MICROSECONDS_PER_SECOND /
45d18: 41f9 0005 bc38 lea 5bc38 <Configuration+0xc>,%a0
45d1e: 203c 000f 4240 movel #1000000,%d0
45d24: 4c50 0000 remul %a0@,%d0,%d0
45d28: 6040 bras 45d6a <sysconf+0x62>
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
45d2a: 7004 moveq #4,%d0
45d2c: b081 cmpl %d1,%d0
45d2e: 6608 bnes 45d38 <sysconf+0x30>
return rtems_libio_number_iops;
45d30: 2039 0005 d9c4 movel 5d9c4 <rtems_libio_number_iops>,%d0
45d36: 6032 bras 45d6a <sysconf+0x62>
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
45d38: 203c 0000 0400 movel #1024,%d0
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
45d3e: 7433 moveq #51,%d2
45d40: b481 cmpl %d1,%d2
45d42: 6726 beqs 45d6a <sysconf+0x62>
return 1024;
if ( name == _SC_PAGESIZE )
45d44: 143c 0008 moveb #8,%d2
return PAGE_SIZE;
45d48: 303c 1000 movew #4096,%d0
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024;
if ( name == _SC_PAGESIZE )
45d4c: b481 cmpl %d1,%d2
45d4e: 671a beqs 45d6a <sysconf+0x62>
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
45d50: 143c 004f moveb #79,%d2
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
45d54: 303c 0020 movew #32,%d0
return 1024;
if ( name == _SC_PAGESIZE )
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
45d58: b481 cmpl %d1,%d2
45d5a: 670e beqs 45d6a <sysconf+0x62> <== NEVER TAKEN
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
45d5c: 4eb9 0004 d298 jsr 4d298 <__errno>
45d62: 2040 moveal %d0,%a0
45d64: 7016 moveq #22,%d0
45d66: 2080 movel %d0,%a0@
45d68: 70ff moveq #-1,%d0
}
45d6a: 242e fffc movel %fp@(-4),%d2
45d6e: 4e5e unlk %fp
...
00050308 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
50308: 4e56 0000 linkw %fp,#0
5030c: 202e 000c movel %fp@(12),%d0
50310: 2f03 movel %d3,%sp@-
50312: 262e 0010 movel %fp@(16),%d3
50316: 2f02 movel %d2,%sp@-
50318: 242e 0008 movel %fp@(8),%d2
switch (opt) {
5031c: 4a80 tstl %d0
5031e: 672c beqs 5034c <tcsetattr+0x44>
50320: 7201 moveq #1,%d1
50322: b280 cmpl %d0,%d1
50324: 6710 beqs 50336 <tcsetattr+0x2e>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
50326: 4eb9 0005 3f7c jsr 53f7c <__errno>
5032c: 2040 moveal %d0,%a0
5032e: 20bc 0000 0086 movel #134,%a0@
50334: 6034 bras 5036a <tcsetattr+0x62>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
50336: 42a7 clrl %sp@-
50338: 4878 0003 pea 3 <DIVIDE>
5033c: 2f02 movel %d2,%sp@-
5033e: 4eb9 0005 33ac jsr 533ac <ioctl>
50344: 4fef 000c lea %sp@(12),%sp
50348: 4a80 tstl %d0
5034a: 6d1e blts 5036a <tcsetattr+0x62> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
5034c: 2d43 0010 movel %d3,%fp@(16)
50350: 7002 moveq #2,%d0
50352: 2d42 0008 movel %d2,%fp@(8)
}
}
50356: 242e fff8 movel %fp@(-8),%d2
5035a: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
5035e: 2d40 000c movel %d0,%fp@(12)
}
}
50362: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
50364: 4ef9 0005 33ac jmp 533ac <ioctl>
}
}
5036a: 242e fff8 movel %fp@(-8),%d2
5036e: 70ff moveq #-1,%d0
50370: 262e fffc movel %fp@(-4),%d3
50374: 4e5e unlk %fp <== NOT EXECUTED
00046efc <timer_create>:
timer_t *timerid
)
{
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
46efc: 7001 moveq #1,%d0
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
46efe: 4e56 0000 linkw %fp,#0
46f02: 2f0b movel %a3,%sp@-
46f04: 266e 0010 moveal %fp@(16),%a3
46f08: 2f0a movel %a2,%sp@-
46f0a: 246e 000c moveal %fp@(12),%a2
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
46f0e: b0ae 0008 cmpl %fp@(8),%d0
46f12: 6702 beqs 46f16 <timer_create+0x1a>
46f14: 6026 bras 46f3c <timer_create+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
46f16: 4a8b tstl %a3
46f18: 6602 bnes 46f1c <timer_create+0x20>
46f1a: 6020 bras 46f3c <timer_create+0x40>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
46f1c: 4a8a tstl %a2
46f1e: 672a beqs 46f4a <timer_create+0x4e>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
46f20: 2012 movel %a2@,%d0
46f22: 7201 moveq #1,%d1
46f24: 5380 subql #1,%d0
46f26: b280 cmpl %d0,%d1
46f28: 6402 bccs 46f2c <timer_create+0x30> <== ALWAYS TAKEN
46f2a: 6010 bras 46f3c <timer_create+0x40> <== NOT EXECUTED
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
46f2c: 202a 0004 movel %a2@(4),%d0
46f30: 6602 bnes 46f34 <timer_create+0x38> <== ALWAYS TAKEN
46f32: 6008 bras 46f3c <timer_create+0x40> <== NOT EXECUTED
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
46f34: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
46f36: 721f moveq #31,%d1
46f38: b280 cmpl %d0,%d1
46f3a: 640e bccs 46f4a <timer_create+0x4e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
46f3c: 4eb9 0004 ea90 jsr 4ea90 <__errno>
46f42: 7216 moveq #22,%d1
46f44: 2040 moveal %d0,%a0
46f46: 2081 movel %d1,%a0@
46f48: 6034 bras 46f7e <timer_create+0x82>
*
* 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;
46f4a: 2039 0006 3440 movel 63440 <_Thread_Dispatch_disable_level>,%d0
++level;
46f50: 5280 addql #1,%d0
_Thread_Dispatch_disable_level = level;
46f52: 23c0 0006 3440 movel %d0,63440 <_Thread_Dispatch_disable_level>
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
46f58: 4879 0006 3696 pea 63696 <_POSIX_Timer_Information>
46f5e: 4eb9 0004 8ea0 jsr 48ea0 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
46f64: 588f addql #4,%sp
46f66: 2040 moveal %d0,%a0
46f68: 4a80 tstl %d0
46f6a: 6616 bnes 46f82 <timer_create+0x86>
_Thread_Enable_dispatch();
46f6c: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
46f72: 4eb9 0004 ea90 jsr 4ea90 <__errno>
46f78: 2040 moveal %d0,%a0
46f7a: 700b moveq #11,%d0
46f7c: 2080 movel %d0,%a0@
46f7e: 70ff moveq #-1,%d0
46f80: 606e bras 46ff0 <timer_create+0xf4>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
46f82: 7002 moveq #2,%d0
46f84: 1140 003c moveb %d0,%a0@(60)
ptimer->thread_id = _Thread_Executing->Object.id;
46f88: 2279 0006 38c2 moveal 638c2 <_Per_CPU_Information+0xe>,%a1
46f8e: 2169 0008 0038 movel %a1@(8),%a0@(56)
if ( evp != NULL ) {
46f94: 4a8a tstl %a2
46f96: 6710 beqs 46fa8 <timer_create+0xac>
ptimer->inf.sigev_notify = evp->sigev_notify;
46f98: 2152 003e movel %a2@,%a0@(62)
ptimer->inf.sigev_signo = evp->sigev_signo;
46f9c: 216a 0004 0042 movel %a2@(4),%a0@(66)
ptimer->inf.sigev_value = evp->sigev_value;
46fa2: 216a 0008 0046 movel %a2@(8),%a0@(70)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
46fa8: 2028 0008 movel %a0@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46fac: 2200 movel %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46fae: 2279 0006 36ae moveal 636ae <_POSIX_Timer_Information+0x18>,%a1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46fb4: 0281 0000 ffff andil #65535,%d1
}
ptimer->overrun = 0;
46fba: 42a8 0066 clrl %a0@(102)
ptimer->timer_data.it_value.tv_sec = 0;
46fbe: 42a8 005a clrl %a0@(90)
ptimer->timer_data.it_value.tv_nsec = 0;
46fc2: 42a8 005e clrl %a0@(94)
ptimer->timer_data.it_interval.tv_sec = 0;
46fc6: 42a8 0052 clrl %a0@(82)
ptimer->timer_data.it_interval.tv_nsec = 0;
46fca: 42a8 0056 clrl %a0@(86)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46fce: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine;
46fd2: 42a8 002c clrl %a0@(44)
the_watchdog->id = id;
46fd6: 42a8 0030 clrl %a0@(48)
the_watchdog->user_data = user_data;
46fda: 42a8 0034 clrl %a0@(52)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46fde: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
46fe2: 42a8 000c clrl %a0@(12)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
46fe6: 2680 movel %d0,%a3@
_Thread_Enable_dispatch();
46fe8: 4eb9 0004 9fdc jsr 49fdc <_Thread_Enable_dispatch>
return 0;
46fee: 4280 clrl %d0
}
46ff0: 246e fff8 moveal %fp@(-8),%a2
46ff4: 266e fffc moveal %fp@(-4),%a3
46ff8: 4e5e unlk %fp <== NOT EXECUTED
00045f20 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
45f20: 4e56 ffd0 linkw %fp,#-48
45f24: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
45f28: 246e 000c moveal %fp@(12),%a2
45f2c: 266e 0010 moveal %fp@(16),%a3
45f30: 242e 0014 movel %fp@(20),%d2
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
45f34: 4a8b tstl %a3
45f36: 6604 bnes 45f3c <timer_settime+0x1c> <== ALWAYS TAKEN
45f38: 6000 017a braw 460b4 <timer_settime+0x194> <== NOT EXECUTED
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
45f3c: 486b 0008 pea %a3@(8)
45f40: 49f9 0004 9590 lea 49590 <_Timespec_Is_valid>,%a4
45f46: 4e94 jsr %a4@
45f48: 588f addql #4,%sp
45f4a: 4a00 tstb %d0
45f4c: 6604 bnes 45f52 <timer_settime+0x32>
45f4e: 6000 0164 braw 460b4 <timer_settime+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
45f52: 2f0b movel %a3,%sp@-
45f54: 4e94 jsr %a4@
45f56: 588f addql #4,%sp
45f58: 4a00 tstb %d0
45f5a: 6604 bnes 45f60 <timer_settime+0x40> <== ALWAYS TAKEN
45f5c: 6000 0156 braw 460b4 <timer_settime+0x194> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
45f60: 7004 moveq #4,%d0
45f62: b08a cmpl %a2,%d0
45f64: 6708 beqs 45f6e <timer_settime+0x4e>
45f66: 4a8a tstl %a2
45f68: 6704 beqs 45f6e <timer_settime+0x4e>
45f6a: 6000 0148 braw 460b4 <timer_settime+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
45f6e: 4878 0010 pea 10 <INVALID_OPERATION>
45f72: 2f0b movel %a3,%sp@-
45f74: 486e fff0 pea %fp@(-16)
45f78: 4eb9 0004 e000 jsr 4e000 <memcpy>
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
45f7e: 4fef 000c lea %sp@(12),%sp
45f82: 7004 moveq #4,%d0
45f84: b08a cmpl %a2,%d0
45f86: 6634 bnes 45fbc <timer_settime+0x9c>
struct timespec now;
_TOD_Get( &now );
45f88: 45ee ffe8 lea %fp@(-24),%a2
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
45f8c: 260e movel %fp,%d3
45f8e: 5183 subql #8,%d3
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
45f90: 2f0a movel %a2,%sp@-
45f92: 4eba ff2c jsr %pc@(45ec0 <_TOD_Get>)
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
45f96: 2f0a movel %a2,%sp@-
45f98: 2f03 movel %d3,%sp@-
45f9a: 4eb9 0004 95b8 jsr 495b8 <_Timespec_Less_than>
45fa0: 4fef 000c lea %sp@(12),%sp
45fa4: 4a00 tstb %d0
45fa6: 6704 beqs 45fac <timer_settime+0x8c>
45fa8: 6000 010a braw 460b4 <timer_settime+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
45fac: 2f03 movel %d3,%sp@-
45fae: 2f03 movel %d3,%sp@-
45fb0: 2f0a movel %a2,%sp@-
45fb2: 4eb9 0004 95e8 jsr 495e8 <_Timespec_Subtract>
45fb8: 4fef 000c lea %sp@(12),%sp
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
45fbc: 486e ffe4 pea %fp@(-28)
45fc0: 2f2e 0008 movel %fp@(8),%sp@-
45fc4: 4879 0005 fb52 pea 5fb52 <_POSIX_Timer_Information>
45fca: 4eb9 0004 8080 jsr 48080 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
45fd0: 4fef 000c lea %sp@(12),%sp
45fd4: 2440 moveal %d0,%a2
45fd6: 4aae ffe4 tstl %fp@(-28)
45fda: 6600 00d8 bnew 460b4 <timer_settime+0x194>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
45fde: 4aae fff8 tstl %fp@(-8)
45fe2: 664e bnes 46032 <timer_settime+0x112> <== NEVER TAKEN
45fe4: 4aae fffc tstl %fp@(-4)
45fe8: 6648 bnes 46032 <timer_settime+0x112> <== NEVER TAKEN
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
45fea: 486a 0010 pea %a2@(16)
45fee: 4eb9 0004 9960 jsr 49960 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
45ff4: 588f addql #4,%sp
45ff6: 4a82 tstl %d2
45ff8: 6714 beqs 4600e <timer_settime+0xee> <== NEVER TAKEN
*ovalue = ptimer->timer_data;
45ffa: 4878 0010 pea 10 <INVALID_OPERATION>
45ffe: 486a 0052 pea %a2@(82)
46002: 2f02 movel %d2,%sp@-
46004: 4eb9 0004 e000 jsr 4e000 <memcpy>
4600a: 4fef 000c lea %sp@(12),%sp
/* The new data are set */
ptimer->timer_data = normalize;
4600e: 4878 0010 pea 10 <INVALID_OPERATION>
46012: 486e fff0 pea %fp@(-16)
46016: 486a 0052 pea %a2@(82)
4601a: 4eb9 0004 e000 jsr 4e000 <memcpy>
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
46020: 7004 moveq #4,%d0
46022: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */
_Thread_Enable_dispatch();
46026: 4eb9 0004 8c7c jsr 48c7c <_Thread_Enable_dispatch>
4602c: 4fef 000c lea %sp@(12),%sp
46030: 607e bras 460b0 <timer_settime+0x190>
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
46032: 2f0b movel %a3,%sp@-
46034: 47f9 0004 9630 lea 49630 <_Timespec_To_ticks>,%a3
4603a: 4e93 jsr %a3@
4603c: 2540 0062 movel %d0,%a2@(98)
initial_period = _Timespec_To_ticks( &normalize.it_value );
46040: 486e fff8 pea %fp@(-8)
46044: 4e93 jsr %a3@
activated = _POSIX_Timer_Insert_helper(
46046: 2f0a movel %a2,%sp@-
46048: 4879 0004 60cc pea 460cc <_POSIX_Timer_TSR>
4604e: 2f2a 0008 movel %a2@(8),%sp@-
46052: 2f00 movel %d0,%sp@-
46054: 486a 0010 pea %a2@(16)
46058: 4eb9 0004 b624 jsr 4b624 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
4605e: 4fef 001c lea %sp@(28),%sp
46062: 4a00 tstb %d0
46064: 6608 bnes 4606e <timer_settime+0x14e>
_Thread_Enable_dispatch();
46066: 4eb9 0004 8c7c jsr 48c7c <_Thread_Enable_dispatch>
4606c: 6042 bras 460b0 <timer_settime+0x190>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
4606e: 4a82 tstl %d2
46070: 6714 beqs 46086 <timer_settime+0x166>
*ovalue = ptimer->timer_data;
46072: 4878 0010 pea 10 <INVALID_OPERATION>
46076: 486a 0052 pea %a2@(82)
4607a: 2f02 movel %d2,%sp@-
4607c: 4eb9 0004 e000 jsr 4e000 <memcpy>
46082: 4fef 000c lea %sp@(12),%sp
ptimer->timer_data = normalize;
46086: 4878 0010 pea 10 <INVALID_OPERATION>
4608a: 486e fff0 pea %fp@(-16)
4608e: 486a 0052 pea %a2@(82)
46092: 4eb9 0004 e000 jsr 4e000 <memcpy>
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
46098: 7003 moveq #3,%d0
4609a: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
4609e: 486a 006a pea %a2@(106)
460a2: 4eba fe1c jsr %pc@(45ec0 <_TOD_Get>)
_Thread_Enable_dispatch();
460a6: 4eb9 0004 8c7c jsr 48c7c <_Thread_Enable_dispatch>
460ac: 4fef 0010 lea %sp@(16),%sp
return 0;
460b0: 4280 clrl %d0
460b2: 600e bras 460c2 <timer_settime+0x1a2>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
460b4: 4eb9 0004 d7e0 jsr 4d7e0 <__errno>
460ba: 2040 moveal %d0,%a0
460bc: 7016 moveq #22,%d0
460be: 2080 movel %d0,%a0@
460c0: 70ff moveq #-1,%d0
}
460c2: 4cee 1c0c ffd0 moveml %fp@(-48),%d2-%d3/%a2-%a4
460c8: 4e5e unlk %fp <== NOT EXECUTED
00045ff2 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
45ff2: 4e56 ffe8 linkw %fp,#-24
45ff6: 48d7 041c moveml %d2-%d4/%a2,%sp@
45ffa: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
45ffe: 4ab9 0006 0d7c tstl 60d7c <_POSIX_signals_Ualarm_timer+0x1c>
46004: 6620 bnes 46026 <ualarm+0x34>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46006: 42b9 0006 0d68 clrl 60d68 <_POSIX_signals_Ualarm_timer+0x8>
the_watchdog->routine = routine;
4600c: 203c 0004 5fb0 movel #286640,%d0
the_watchdog->id = id;
46012: 42b9 0006 0d80 clrl 60d80 <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46018: 23c0 0006 0d7c movel %d0,60d7c <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id;
the_watchdog->user_data = user_data;
4601e: 42b9 0006 0d84 clrl 60d84 <_POSIX_signals_Ualarm_timer+0x24>
46024: 6056 bras 4607c <ualarm+0x8a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
46026: 4879 0006 0d60 pea 60d60 <_POSIX_signals_Ualarm_timer>
4602c: 4eb9 0004 97b0 jsr 497b0 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
46032: 588f addql #4,%sp
46034: 7201 moveq #1,%d1
46036: 5580 subql #2,%d0
46038: b280 cmpl %d0,%d1
4603a: 6540 bcss 4607c <ualarm+0x8a> <== NEVER TAKEN
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
4603c: 2039 0006 0d74 movel 60d74 <_POSIX_signals_Ualarm_timer+0x14>,%d0
46042: d0b9 0006 0d6c addl 60d6c <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
46048: 486e fff8 pea %fp@(-8)
4604c: 90b9 0006 0d78 subl 60d78 <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
46052: 283c 000f 4240 movel #1000000,%d4
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
46058: 2f00 movel %d0,%sp@-
4605a: 4eb9 0004 93c4 jsr 493c4 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
46060: 202e fff8 movel %fp@(-8),%d0
46064: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
46068: 283c 0000 03e8 movel #1000,%d4
4606e: 508f addql #8,%sp
46070: 262e fffc movel %fp@(-4),%d3
46074: 4c44 3803 remsl %d4,%d3,%d3
46078: d680 addl %d0,%d3
4607a: 6002 bras 4607e <ualarm+0x8c>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
4607c: 4283 clrl %d3
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
4607e: 4a82 tstl %d2
46080: 674e beqs 460d0 <ualarm+0xde>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
46082: 283c 0000 03e8 movel #1000,%d4
ticks = _Timespec_To_ticks( &tp );
46088: 45f9 0004 9400 lea 49400 <_Timespec_To_ticks>,%a2
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
4608e: 223c 000f 4240 movel #1000000,%d1
46094: 4c41 2000 remul %d1,%d0,%d2
46098: 4c41 2002 remul %d1,%d2,%d2
4609c: 2d42 fff8 movel %d2,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
460a0: 4c00 4800 mulsl %d0,%d4
ticks = _Timespec_To_ticks( &tp );
460a4: 240e movel %fp,%d2
460a6: 5182 subql #8,%d2
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
460a8: 2d44 fffc movel %d4,%fp@(-4)
ticks = _Timespec_To_ticks( &tp );
460ac: 2f02 movel %d2,%sp@-
460ae: 4e92 jsr %a2@
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
460b0: 2f02 movel %d2,%sp@-
460b2: 4e92 jsr %a2@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
460b4: 4879 0006 0d60 pea 60d60 <_POSIX_signals_Ualarm_timer>
460ba: 4879 0006 0602 pea 60602 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
460c0: 23c0 0006 0d6c movel %d0,60d6c <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
460c6: 4eb9 0004 968c jsr 4968c <_Watchdog_Insert>
460cc: 4fef 0010 lea %sp@(16),%sp
}
return remaining;
}
460d0: 2003 movel %d3,%d0
460d2: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
460d8: 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 dc8c moveal 5dc8c <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 d490 jsr 4d490 <__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 d490 jsr 4d490 <__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 6f10 jsr 46f10 <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 a52c lea 4a52c <rtems_putc>,%a4
for (n = 0; n < count; n++) {
rtems_putc("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45a82: 4bf9 0005 c710 lea 5c710 <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 c68e movel #378510,%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
...
0005aeec <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5aeec: 4e56 0000 linkw %fp,#0
5aef0: 202e 0008 movel %fp@(8),%d0
5aef4: 2f0a movel %a2,%sp@-
5aef6: 222e 000c movel %fp@(12),%d1
5aefa: 226e 0010 moveal %fp@(16),%a1
5aefe: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5af00: b0b9 0005 d6a0 cmpl 5d6a0 <rtems_libio_number_iops>,%d0
5af06: 6502 bcss 5af0a <write+0x1e>
5af08: 6036 bras 5af40 <write+0x54>
iop = rtems_libio_iop( fd );
5af0a: 2400 movel %d0,%d2
5af0c: ed88 lsll #6,%d0
5af0e: e98a lsll #4,%d2
5af10: 2079 0005 edc0 moveal 5edc0 <rtems_libio_iops>,%a0
5af16: 9082 subl %d2,%d0
5af18: d1c0 addal %d0,%a0
rtems_libio_check_is_open( iop );
5af1a: 2028 000c movel %a0@(12),%d0
5af1e: 0800 0008 btst #8,%d0
5af22: 6602 bnes 5af26 <write+0x3a>
5af24: 601a bras 5af40 <write+0x54>
rtems_libio_check_buffer( buffer );
5af26: 4a81 tstl %d1
5af28: 660e bnes 5af38 <write+0x4c> <== ALWAYS TAKEN
5af2a: 4eb9 0004 cf98 jsr 4cf98 <__errno> <== NOT EXECUTED
5af30: 7216 moveq #22,%d1 <== NOT EXECUTED
5af32: 2040 moveal %d0,%a0 <== NOT EXECUTED
5af34: 2081 movel %d1,%a0@ <== NOT EXECUTED
5af36: 6014 bras 5af4c <write+0x60> <== NOT EXECUTED
rtems_libio_check_count( count );
5af38: 4a89 tstl %a1
5af3a: 6734 beqs 5af70 <write+0x84>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
5af3c: 44c0 movew %d0,%ccr
5af3e: 6710 beqs 5af50 <write+0x64>
5af40: 4eb9 0004 cf98 jsr 4cf98 <__errno>
5af46: 2040 moveal %d0,%a0
5af48: 7009 moveq #9,%d0
5af4a: 2080 movel %d0,%a0@
5af4c: 70ff moveq #-1,%d0
5af4e: 6022 bras 5af72 <write+0x86>
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5af50: 2468 0020 moveal %a0@(32),%a2
5af54: 2d49 0010 movel %a1,%fp@(16)
}
5af58: 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 );
5af5c: 2d41 000c movel %d1,%fp@(12)
5af60: 2d48 0008 movel %a0,%fp@(8)
5af64: 226a 000c moveal %a2@(12),%a1
}
5af68: 246e fffc moveal %fp@(-4),%a2
5af6c: 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 );
5af6e: 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 );
5af70: 4280 clrl %d0
/*
* Now process the write() request.
*/
return (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
}
5af72: 242e fff8 movel %fp@(-8),%d2
5af76: 246e fffc moveal %fp@(-4),%a2
5af7a: 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 dec0 cmpl 5dec0 <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 f5e0 moveal 5f5e0 <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 da5c jsr 4da5c <__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 da5c jsr 4da5c <__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